@karmaniverous/stan-cli 0.12.3 → 0.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -0
- package/dist/cjs/index-CQYvnMvw-CcETnrF6.js +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cli/{apply-2mlYJk5r.js → apply-BiPfHJYS.js} +2 -2
- package/dist/cli/{index-DXJaQ46Q.js → index-C3h8BxZl.js} +67 -48
- package/dist/cli/index-CQYvnMvw-BR-mVR0o.js +20 -0
- package/dist/cli/stan.js +427 -161
- package/dist/mjs/index-CQYvnMvw-r3et3BtD.js +1 -0
- package/dist/mjs/index.js +1 -1
- package/package.json +18 -18
- package/dist/cjs/index-ucZa1KMb-CeffVEuy.js +0 -1
- package/dist/cli/index-ucZa1KMb-CNGeWGvV.js +0 -20
- package/dist/mjs/index-ucZa1KMb-DZqceYU7.js +0 -1
package/dist/mjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{existsSync as t,rmSync as n,readFileSync as r,createWriteStream as s}from"node:fs";import{copyFile as o,readdir as i,readFile as a,writeFile as c,rm as u,stat as l,appendFile as f,mkdir as p}from"node:fs/promises";import d,{resolve as h,dirname as m,join as g,delimiter as y}from"node:path";import{ensureDir as b}from"fs-extra";import v from"node:process";import{fileURLToPath as D}from"node:url";import w from"process";import _ from"buffer";import{createHash as E}from"node:crypto";import{spawn as k}from"node:child_process";import S from"os";import A from"path";import C from"util";import P from"stream";import O from"events";import T from"fs";import x from"node:os";import N from"node:tty";import $ from"child_process";import{createRequire as L}from"node:module";import{emitKeypressEvents as R}from"node:readline";const F="archive.tar",I="archive.prev.tar",M=e=>e.replace(/\\/g,"/"),j=(e,t)=>{const n=M(e).replace(/\/+$/,""),r=M(t);return r===n||r.startsWith(`${n}/`)},B=(e,t)=>{const n=M(e);return j(`${n}/diff`,t)||j(`${n}/patch`,t)},z=j,H=e=>{const t=e.replace(/\\/g,"/");return e=>!(B(t,e)||((e,t)=>{const n=M(e);return M(t)===`${n}/output/${F}`||M(t)===`${n}/output/archive.diff.tar`||M(t)===`${n}/output/archive.warnings.txt`})(t,e))},K=(e,t)=>{const n=`${t.replace(/\\/g,"/")}/output`;return Array.from(new Set([...e,n]))},U=(e,t)=>{const n=(e??"").trim();n&&"No archive warnings."!==n&&t?.(n)};var q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Z(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var G,W,J,V,Y,Q,X,ee,te,ne,re,se,oe={exports:{}},ie=(G||(G=1,function(e){function t(e){return Array.isArray(e)?e:[e]}const n=/^\s+$/,r=/(?:[^\\]|^)\\$/,s=/^\\!/,o=/^\\#/,i=/\r?\n/g,a=/^\.{0,2}\/|^\.{1,2}$/,c=/\/$/,u="/";let l="node-ignore";"undefined"!=typeof Symbol&&(l=Symbol.for("node-ignore"));const f=l,p=(e,t,n)=>(Object.defineProperty(e,t,{value:n}),n),d=/([0-z])-([0-z])/g,h=()=>!1,m=[[/^\uFEFF/,()=>""],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,n)=>t+(0===n.indexOf("\\")?" ":"")],[/(\\+?)\s/g,(e,t)=>{const{length:n}=t;return t.slice(0,n-n%2)+" "}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6<n.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,n)=>t+n.replace(/\\\*/g,"[^\\/]*")],[/\\\\\\(?=[$.|*+(){^])/g,()=>"\\"],[/\\\\/g,()=>"\\"],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,r,s)=>"\\"===t?`\\[${n}${(e=>{const{length:t}=e;return e.slice(0,t-t%2)})(r)}${s}`:"]"===s&&r.length%2==0?`[${(e=>e.replace(d,(e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:""))(n)}${r}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`]],g=/(^|\\\/)?\\\*$/,y="regex",b="checkRegex",v={[y]:(e,t)=>(t?`${t}[^/]+`:"[^/]*")+"(?=$|\\/$)",[b]:(e,t)=>(t?`${t}[^/]*`:"[^/]*")+"(?=$|\\/$)"},D=e=>"string"==typeof e;class w{constructor(e,t,n,r,s,o){this.pattern=e,this.mark=t,this.negative=s,p(this,"body",n),p(this,"ignoreCase",r),p(this,"regexPrefix",o)}get regex(){const e="_"+y;return this[e]?this[e]:this._make(y,e)}get checkRegex(){const e="_"+b;return this[e]?this[e]:this._make(b,e)}_make(e,t){const n=this.regexPrefix.replace(g,v[e]),r=this.ignoreCase?new RegExp(n,"i"):new RegExp(n);return p(this,t,r)}}class _{constructor(e){this._ignoreCase=e,this._rules=[]}_add(e){if(e&&e[f])return this._rules=this._rules.concat(e._rules._rules),void(this._added=!0);if(D(e)&&(e={pattern:e}),(e=>e&&D(e)&&!n.test(e)&&!r.test(e)&&0!==e.indexOf("#"))(e.pattern)){const t=(({pattern:e,mark:t},n)=>{let r=!1,i=e;0===i.indexOf("!")&&(r=!0,i=i.substr(1)),i=i.replace(s,"!").replace(o,"#");const a=(e=>m.reduce((t,[n,r])=>t.replace(n,r.bind(e)),e))(i);return new w(e,t,i,n,r,a)})(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,t(D(e)?(e=>e.split(i).filter(Boolean))(e):e).forEach(this._add,this),this._added}test(e,t,n){let r,s=!1,o=!1;this._rules.forEach(i=>{const{negative:a}=i;o===a&&s!==o||a&&!s&&!o&&!t||i[n].test(e)&&(s=!a,o=a,r=a?void 0:i)});const i={ignored:s,unignored:o};return r&&(i.rule=r),i}}const E=(e,t)=>{throw new t(e)},k=(e,t,n)=>D(e)?e?!k.isNotRelative(e)||n(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):n("path must not be empty",TypeError):n(`path must be a string, but got \`${t}\``,TypeError),S=e=>a.test(e);k.isNotRelative=S,k.convert=e=>e;class A{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){p(this,f,!0),this._rules=new _(t),this._strictPathCheck=!n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add(e){return this._rules.add(e)&&this._initCache(),this}addPattern(e){return this.add(e)}_test(e,t,n,r){const s=e&&k.convert(e);return k(s,e,this._strictPathCheck?E:h),this._t(s,t,n,r)}checkIgnore(e){if(!c.test(e))return this.test(e);const t=e.split(u).filter(Boolean);if(t.pop(),t.length){const e=this._t(t.join(u)+u,this._testCache,!0,t);if(e.ignored)return e}return this._rules.test(e,!1,b)}_t(e,t,n,r){if(e in t)return t[e];if(r||(r=e.split(u).filter(Boolean)),r.pop(),!r.length)return t[e]=this._rules.test(e,n,y);const s=this._t(r.join(u)+u,t,n,r);return t[e]=s.ignored?s:this._rules.test(e,n,y)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return t(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}}const C=e=>new A(e),P=()=>{k.convert=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,"/");const e=/^[a-z]:\//i;k.isNotRelative=t=>e.test(t)||S(t)};"undefined"!=typeof process&&"win32"===process.platform&&P(),e.exports=C,C.default=C,e.exports.isPathValid=e=>k(e&&k.convert(e),e,h),p(e.exports,Symbol.for("setupWindows"),P)}(oe)),oe.exports),ae=Z(ie),ce={};function ue(){if(J)return W;J=1;const e="\\\\/",t=`[^${e}]`,n="\\.",r="\\/",s="[^/]",o=`(?:${r}|$)`,i=`(?:^|${r})`,a=`${n}{1,2}${o}`,c={DOT_LITERAL:n,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:r,ONE_CHAR:"(?=.)",QMARK:s,END_ANCHOR:o,DOTS_SLASH:a,NO_DOT:`(?!${n})`,NO_DOTS:`(?!${i}${a})`,NO_DOT_SLASH:`(?!${n}{0,1}${o})`,NO_DOTS_SLASH:`(?!${a})`,QMARK_NO_DOT:`[^.${r}]`,STAR:`${s}*?`,START_ANCHOR:i,SEP:"/"},u={...c,SLASH_LITERAL:`[${e}]`,QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${n}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${e}])${n}{1,2}(?:[${e}]|$))`,NO_DOT_SLASH:`(?!${n}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`,SEP:"\\"};return W={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?u:c}}function le(){return V||(V=1,function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:s}=ue();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(s,"\\$1"),e.toPosixSlashes=e=>e.replace(t,"/"),e.isWindows=()=>{if("undefined"!=typeof navigator&&navigator.platform){const e=navigator.platform.toLowerCase();return"win32"===e||"windows"===e}return!("undefined"==typeof process||!process.platform)&&"win32"===process.platform},e.removeBackslashes=e=>e.replace(n,e=>"\\"===e?"":e),e.escapeLast=(t,n,r)=>{const s=t.lastIndexOf(n,r);return-1===s?t:"\\"===t[s-1]?e.escapeLast(t,n,s-1):`${t.slice(0,s)}\\${t.slice(s)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(r=`(?:^(?!${r}).*$)`),r},e.basename=(e,{windows:t}={})=>{const n=e.split(t?/[\\/]/:"/"),r=n[n.length-1];return""===r?n[n.length-2]:r}}(ce)),ce}function fe(){if(ne)return te;ne=1;const e=function(){if(Q)return Y;Q=1;const e=le(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:s,CHAR_DOT:o,CHAR_EXCLAMATION_MARK:i,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:u,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:f,CHAR_QUESTION_MARK:p,CHAR_RIGHT_CURLY_BRACE:d,CHAR_RIGHT_PARENTHESES:h,CHAR_RIGHT_SQUARE_BRACKET:m}=ue(),g=e=>e===a||e===r,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return Y=(b,v)=>{const D=v||{},w=b.length-1,_=!0===D.parts||!0===D.scanToEnd,E=[],k=[],S=[];let A,C,P=b,O=-1,T=0,x=0,N=!1,$=!1,L=!1,R=!1,F=!1,I=!1,M=!1,j=!1,B=!1,z=!1,H=0,K={value:"",depth:0,isGlob:!1};const U=()=>O>=w,q=()=>P.charCodeAt(O+1),Z=()=>(A=C,P.charCodeAt(++O));for(;O<w;){let e;if(C=Z(),C!==r){if(!0===I||C===c){for(H++;!0!==U()&&(C=Z());)if(C!==r)if(C!==c){if(!0!==I&&C===o&&(C=Z())===o){if(N=K.isBrace=!0,L=K.isGlob=!0,z=!0,!0===_)continue;break}if(!0!==I&&C===s){if(N=K.isBrace=!0,L=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===d&&(H--,0===H)){I=!1,N=K.isBrace=!0,z=!0;break}}else H++;else M=K.backslashes=!0,Z();if(!0===_)continue;break}if(C!==a){if(!0!==D.noext&&1==(C===f||C===n||C===t||C===p||C===i)&&q()===u){if(L=K.isGlob=!0,R=K.isExtglob=!0,z=!0,C===i&&O===T&&(B=!0),!0===_){for(;!0!==U()&&(C=Z());)if(C!==r){if(C===h){L=K.isGlob=!0,z=!0;break}}else M=K.backslashes=!0,C=Z();continue}break}if(C===t){if(A===t&&(F=K.isGlobstar=!0),L=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===p){if(L=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===l){for(;!0!==U()&&(e=Z());)if(e!==r){if(e===m){$=K.isBracket=!0,L=K.isGlob=!0,z=!0;break}}else M=K.backslashes=!0,Z();if(!0===_)continue;break}if(!0===D.nonegate||C!==i||O!==T){if(!0!==D.noparen&&C===u){if(L=K.isGlob=!0,!0===_){for(;!0!==U()&&(C=Z());)if(C!==u){if(C===h){z=!0;break}}else M=K.backslashes=!0,C=Z();continue}break}if(!0===L){if(z=!0,!0===_)continue;break}}else j=K.negated=!0,T++}else{if(E.push(O),k.push(K),K={value:"",depth:0,isGlob:!1},!0===z)continue;if(A===o&&O===T+1){T+=2;continue}x=O+1}}else M=K.backslashes=!0,C=Z(),C===c&&(I=!0)}!0===D.noext&&(R=!1,L=!1);let G=P,W="",J="";T>0&&(W=P.slice(0,T),P=P.slice(T),x-=T),G&&!0===L&&x>0?(G=P.slice(0,x),J=P.slice(x)):!0===L?(G="",J=P):G=P,G&&""!==G&&"/"!==G&&G!==P&&g(G.charCodeAt(G.length-1))&&(G=G.slice(0,-1)),!0===D.unescape&&(J&&(J=e.removeBackslashes(J)),G&&!0===M&&(G=e.removeBackslashes(G)));const V={prefix:W,input:b,start:T,base:G,glob:J,isBrace:N,isBracket:$,isGlob:L,isExtglob:R,isGlobstar:F,negated:j,negatedExtglob:B};if(!0===D.tokens&&(V.maxDepth=0,g(C)||k.push(K),V.tokens=k),!0===D.parts||!0===D.tokens){let e;for(let t=0;t<E.length;t++){const n=e?e+1:T,r=E[t],s=b.slice(n,r);D.tokens&&(0===t&&0!==T?(k[t].isPrefix=!0,k[t].value=W):k[t].value=s,y(k[t]),V.maxDepth+=k[t].depth),0===t&&""===s||S.push(s),e=r}if(e&&e+1<b.length){const t=b.slice(e+1);S.push(t),D.tokens&&(k[k.length-1].value=t,y(k[k.length-1]),V.maxDepth+=k[k.length-1].depth)}V.slashes=E,V.parts=S}return V},Y}(),t=function(){if(ee)return X;ee=1;const e=ue(),t=le(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_BACKREF:o,REPLACEMENTS:i}=e,a=(e,n)=>{if("function"==typeof n.expandRange)return n.expandRange(...e,n);e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(n){return e.map(e=>t.escapeRegex(e)).join("..")}return r},c=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,u=(l,f)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=i[l]||l;const p={...f},d="number"==typeof p.maxLength?Math.min(n,p.maxLength):n;let h=l.length;if(h>d)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${d}`);const m={type:"bos",value:"",output:p.prepend||""},g=[m],y=p.capture?"":"?:",b=e.globChars(p.windows),v=e.extglobChars(b),{DOT_LITERAL:D,PLUS_LITERAL:w,SLASH_LITERAL:_,ONE_CHAR:E,DOTS_SLASH:k,NO_DOT:S,NO_DOT_SLASH:A,NO_DOTS_SLASH:C,QMARK:P,QMARK_NO_DOT:O,STAR:T,START_ANCHOR:x}=b,N=e=>`(${y}(?:(?!${x}${e.dot?k:D}).)*?)`,$=p.dot?"":S,L=p.dot?P:O;let R=!0===p.bash?N(p):T;p.capture&&(R=`(${R})`),"boolean"==typeof p.noext&&(p.noextglob=p.noext);const F={input:l,index:-1,start:0,dot:!0===p.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};l=t.removePrefix(l,F),h=l.length;const I=[],M=[],j=[];let B,z=m;const H=()=>F.index===h-1,K=F.peek=(e=1)=>l[F.index+e],U=F.advance=()=>l[++F.index]||"",q=()=>l.slice(F.index+1),Z=(e="",t=0)=>{F.consumed+=e,F.index+=t},G=e=>{F.output+=null!=e.output?e.output:e.value,Z(e.value)},W=()=>{let e=1;for(;"!"===K()&&("("!==K(2)||"?"===K(3));)U(),F.start++,e++;return e%2!=0&&(F.negated=!0,F.start++,!0)},J=e=>{F[e]++,j.push(e)},V=e=>{F[e]--,j.pop()},Y=e=>{if("globstar"===z.type){const t=F.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||I.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(F.output=F.output.slice(0,-z.output.length),z.type="star",z.value="*",z.output=R,F.output+=z.output)}if(I.length&&"paren"!==e.type&&(I[I.length-1].inner+=e.value),(e.value||e.output)&&G(e),z&&"text"===z.type&&"text"===e.type)return z.output=(z.output||z.value)+e.value,void(z.value+=e.value);e.prev=z,g.push(e),z=e},Q=(e,t)=>{const n={...v[t],conditions:1,inner:""};n.prev=z,n.parens=F.parens,n.output=F.output;const r=(p.capture?"(":"")+n.open;J("parens"),Y({type:e,value:t,output:F.output?"":E}),Y({type:"paren",extglob:!0,value:U(),output:r}),I.push(n)},X=e=>{let t,n=e.close+(p.capture?")":"");if("negate"===e.type){let r=R;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(r=N(p)),(r!==R||H()||/^\)+$/.test(q()))&&(n=e.close=`)$))${r}`),e.inner.includes("*")&&(t=q())&&/^\.[^\\/.]+$/.test(t)){const s=u(t,{...f,fastpaths:!1}).output;n=e.close=`)${s})${r})`}"bos"===e.prev.type&&(F.negatedExtglob=!0)}Y({type:"paren",extglob:!0,value:B,output:n}),V("parens")};if(!1!==p.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let e=!1,n=l.replace(o,(t,n,r,s,o,i)=>"\\"===s?(e=!0,t):"?"===s?n?n+s+(o?P.repeat(o.length):""):0===i?L+(o?P.repeat(o.length):""):P.repeat(r.length):"."===s?D.repeat(r.length):"*"===s?n?n+s+(o?R:""):R:n?t:`\\${t}`);return!0===e&&(n=!0===p.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===l&&!0===p.contains?(F.output=l,F):(F.output=t.wrapOutput(n,F,f),F)}for(;!H();){if(B=U(),"\0"===B)continue;if("\\"===B){const e=K();if("/"===e&&!0!==p.bash)continue;if("."===e||";"===e)continue;if(!e){B+="\\",Y({type:"text",value:B});continue}const t=/^\\+/.exec(q());let n=0;if(t&&t[0].length>2&&(n=t[0].length,F.index+=n,n%2!=0&&(B+="\\")),!0===p.unescape?B=U():B+=U(),0===F.brackets){Y({type:"text",value:B});continue}}if(F.brackets>0&&("]"!==B||"["===z.value||"[^"===z.value)){if(!1!==p.posix&&":"===B){const e=z.value.slice(1);if(e.includes("[")&&(z.posix=!0,e.includes(":"))){const e=z.value.lastIndexOf("["),t=z.value.slice(0,e),n=z.value.slice(e+2),s=r[n];if(s){z.value=t+s,F.backtrack=!0,U(),m.output||1!==g.indexOf(z)||(m.output=E);continue}}}("["===B&&":"!==K()||"-"===B&&"]"===K())&&(B=`\\${B}`),"]"!==B||"["!==z.value&&"[^"!==z.value||(B=`\\${B}`),!0===p.posix&&"!"===B&&"["===z.value&&(B="^"),z.value+=B,G({value:B});continue}if(1===F.quotes&&'"'!==B){B=t.escapeRegex(B),z.value+=B,G({value:B});continue}if('"'===B){F.quotes=1===F.quotes?0:1,!0===p.keepQuotes&&Y({type:"text",value:B});continue}if("("===B){J("parens"),Y({type:"paren",value:B});continue}if(")"===B){if(0===F.parens&&!0===p.strictBrackets)throw new SyntaxError(c("opening","("));const e=I[I.length-1];if(e&&F.parens===e.parens+1){X(I.pop());continue}Y({type:"paren",value:B,output:F.parens?")":"\\)"}),V("parens");continue}if("["===B){if(!0!==p.nobracket&&q().includes("]"))J("brackets");else{if(!0!==p.nobracket&&!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));B=`\\${B}`}Y({type:"bracket",value:B});continue}if("]"===B){if(!0===p.nobracket||z&&"bracket"===z.type&&1===z.value.length){Y({type:"text",value:B,output:`\\${B}`});continue}if(0===F.brackets){if(!0===p.strictBrackets)throw new SyntaxError(c("opening","["));Y({type:"text",value:B,output:`\\${B}`});continue}V("brackets");const e=z.value.slice(1);if(!0===z.posix||"^"!==e[0]||e.includes("/")||(B=`/${B}`),z.value+=B,G({value:B}),!1===p.literalBrackets||t.hasRegexChars(e))continue;const n=t.escapeRegex(z.value);if(F.output=F.output.slice(0,-z.value.length),!0===p.literalBrackets){F.output+=n,z.value=n;continue}z.value=`(${y}${n}|${z.value})`,F.output+=z.value;continue}if("{"===B&&!0!==p.nobrace){J("braces");const e={type:"brace",value:B,output:"(",outputIndex:F.output.length,tokensIndex:F.tokens.length};M.push(e),Y(e);continue}if("}"===B){const e=M[M.length-1];if(!0===p.nobrace||!e){Y({type:"text",value:B,output:B});continue}let t=")";if(!0===e.dots){const e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=a(n,p),F.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=F.output.slice(0,e.outputIndex),r=F.tokens.slice(e.tokensIndex);e.value=e.output="\\{",B=t="\\}",F.output=n;for(const e of r)F.output+=e.output||e.value}Y({type:"brace",value:B,output:t}),V("braces"),M.pop();continue}if("|"===B){I.length>0&&I[I.length-1].conditions++,Y({type:"text",value:B});continue}if(","===B){let e=B;const t=M[M.length-1];t&&"braces"===j[j.length-1]&&(t.comma=!0,e="|"),Y({type:"comma",value:B,output:e});continue}if("/"===B){if("dot"===z.type&&F.index===F.start+1){F.start=F.index+1,F.consumed="",F.output="",g.pop(),z=m;continue}Y({type:"slash",value:B,output:_});continue}if("."===B){if(F.braces>0&&"dot"===z.type){"."===z.value&&(z.output=D);const e=M[M.length-1];z.type="dots",z.output+=B,z.value+=B,e.dots=!0;continue}if(F.braces+F.parens===0&&"bos"!==z.type&&"slash"!==z.type){Y({type:"text",value:B,output:D});continue}Y({type:"dot",value:B,output:D});continue}if("?"===B){if((!z||"("!==z.value)&&!0!==p.noextglob&&"("===K()&&"?"!==K(2)){Q("qmark",B);continue}if(z&&"paren"===z.type){const e=K();let t=B;("("===z.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(q()))&&(t=`\\${B}`),Y({type:"text",value:B,output:t});continue}if(!0!==p.dot&&("slash"===z.type||"bos"===z.type)){Y({type:"qmark",value:B,output:O});continue}Y({type:"qmark",value:B,output:P});continue}if("!"===B){if(!0!==p.noextglob&&"("===K()&&("?"!==K(2)||!/[!=<:]/.test(K(3)))){Q("negate",B);continue}if(!0!==p.nonegate&&0===F.index){W();continue}}if("+"===B){if(!0!==p.noextglob&&"("===K()&&"?"!==K(2)){Q("plus",B);continue}if(z&&"("===z.value||!1===p.regex){Y({type:"plus",value:B,output:w});continue}if(z&&("bracket"===z.type||"paren"===z.type||"brace"===z.type)||F.parens>0){Y({type:"plus",value:B});continue}Y({type:"plus",value:w});continue}if("@"===B){if(!0!==p.noextglob&&"("===K()&&"?"!==K(2)){Y({type:"at",extglob:!0,value:B,output:""});continue}Y({type:"text",value:B});continue}if("*"!==B){"$"!==B&&"^"!==B||(B=`\\${B}`);const e=s.exec(q());e&&(B+=e[0],F.index+=e[0].length),Y({type:"text",value:B});continue}if(z&&("globstar"===z.type||!0===z.star)){z.type="star",z.star=!0,z.value+=B,z.output=R,F.backtrack=!0,F.globstar=!0,Z(B);continue}let e=q();if(!0!==p.noextglob&&/^\([^?]/.test(e)){Q("star",B);continue}if("star"===z.type){if(!0===p.noglobstar){Z(B);continue}const t=z.prev,n=t.prev,r="slash"===t.type||"bos"===t.type,s=n&&("star"===n.type||"globstar"===n.type);if(!0===p.bash&&(!r||e[0]&&"/"!==e[0])){Y({type:"star",value:B,output:""});continue}const o=F.braces>0&&("comma"===t.type||"brace"===t.type),i=I.length&&("pipe"===t.type||"paren"===t.type);if(!r&&"paren"!==t.type&&!o&&!i){Y({type:"star",value:B,output:""});continue}for(;"/**"===e.slice(0,3);){const t=l[F.index+4];if(t&&"/"!==t)break;e=e.slice(3),Z("/**",3)}if("bos"===t.type&&H()){z.type="globstar",z.value+=B,z.output=N(p),F.output=z.output,F.globstar=!0,Z(B);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!s&&H()){F.output=F.output.slice(0,-(t.output+z.output).length),t.output=`(?:${t.output}`,z.type="globstar",z.output=N(p)+(p.strictSlashes?")":"|$)"),z.value+=B,F.globstar=!0,F.output+=t.output+z.output,Z(B);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const n=void 0!==e[1]?"|$":"";F.output=F.output.slice(0,-(t.output+z.output).length),t.output=`(?:${t.output}`,z.type="globstar",z.output=`${N(p)}${_}|${_}${n})`,z.value+=B,F.output+=t.output+z.output,F.globstar=!0,Z(B+U()),Y({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){z.type="globstar",z.value+=B,z.output=`(?:^|${_}|${N(p)}${_})`,F.output=z.output,F.globstar=!0,Z(B+U()),Y({type:"slash",value:"/",output:""});continue}F.output=F.output.slice(0,-z.output.length),z.type="globstar",z.output=N(p),z.value+=B,F.output+=z.output,F.globstar=!0,Z(B);continue}const n={type:"star",value:B,output:R};!0!==p.bash?!z||"bracket"!==z.type&&"paren"!==z.type||!0!==p.regex?(F.index!==F.start&&"slash"!==z.type&&"dot"!==z.type||("dot"===z.type?(F.output+=A,z.output+=A):!0===p.dot?(F.output+=C,z.output+=C):(F.output+=$,z.output+=$),"*"!==K()&&(F.output+=E,z.output+=E)),Y(n)):(n.output=B,Y(n)):(n.output=".*?","bos"!==z.type&&"slash"!==z.type||(n.output=$+n.output),Y(n))}for(;F.brackets>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));F.output=t.escapeLast(F.output,"["),V("brackets")}for(;F.parens>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing",")"));F.output=t.escapeLast(F.output,"("),V("parens")}for(;F.braces>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","}"));F.output=t.escapeLast(F.output,"{"),V("braces")}if(!0===p.strictSlashes||"star"!==z.type&&"bracket"!==z.type||Y({type:"maybe_slash",value:"",output:`${_}?`}),!0===F.backtrack){F.output="";for(const e of F.tokens)F.output+=null!=e.output?e.output:e.value,e.suffix&&(F.output+=e.suffix)}return F};return u.fastpaths=(r,s)=>{const o={...s},a="number"==typeof o.maxLength?Math.min(n,o.maxLength):n,c=r.length;if(c>a)throw new SyntaxError(`Input length: ${c}, exceeds maximum allowed length: ${a}`);r=i[r]||r;const{DOT_LITERAL:u,SLASH_LITERAL:l,ONE_CHAR:f,DOTS_SLASH:p,NO_DOT:d,NO_DOTS:h,NO_DOTS_SLASH:m,STAR:g,START_ANCHOR:y}=e.globChars(o.windows),b=o.dot?h:d,v=o.dot?m:d,D=o.capture?"":"?:";let w=!0===o.bash?".*?":g;o.capture&&(w=`(${w})`);const _=e=>!0===e.noglobstar?w:`(${D}(?:(?!${y}${e.dot?p:u}).)*?)`,E=e=>{switch(e){case"*":return`${b}${f}${w}`;case".*":return`${u}${f}${w}`;case"*.*":return`${b}${w}${u}${f}${w}`;case"*/*":return`${b}${w}${l}${f}${v}${w}`;case"**":return b+_(o);case"**/*":return`(?:${b}${_(o)}${l})?${v}${f}${w}`;case"**/*.*":return`(?:${b}${_(o)}${l})?${v}${w}${u}${f}${w}`;case"**/.*":return`(?:${b}${_(o)}${l})?${u}${f}${w}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=E(t[1]);if(!n)return;return n+u+t[2]}}},k=t.removePrefix(r,{negated:!1,prefix:""});let S=E(k);return S&&!0!==o.strictSlashes&&(S+=`${l}?`),S},X=u}(),n=le(),r=ue(),s=(e,t,n=!1)=>{if(Array.isArray(e)){const r=e.map(e=>s(e,t,n)),o=e=>{for(const t of r){const n=t(e);if(n)return n}return!1};return o}const r=(o=e)&&"object"==typeof o&&!Array.isArray(o)&&e.tokens&&e.input;var o;if(""===e||"string"!=typeof e&&!r)throw new TypeError("Expected pattern to be a non-empty string");const i=t||{},a=i.windows,c=r?s.compileRe(e,t):s.makeRe(e,t,!1,!0),u=c.state;delete c.state;let l=()=>!1;if(i.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};l=s(i.ignore,e,n)}const f=(n,r=!1)=>{const{isMatch:o,match:f,output:p}=s.test(n,c,t,{glob:e,posix:a}),d={glob:e,state:u,regex:c,posix:a,input:n,output:p,match:f,isMatch:o};return"function"==typeof i.onResult&&i.onResult(d),!1===o?(d.isMatch=!1,!!r&&d):l(n)?("function"==typeof i.onIgnore&&i.onIgnore(d),d.isMatch=!1,!!r&&d):("function"==typeof i.onMatch&&i.onMatch(d),!r||d)};return n&&(f.state=u),f};return s.test=(e,t,r,{glob:o,posix:i}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=r||{},c=a.format||(i?n.toPosixSlashes:null);let u=e===o,l=u&&c?c(e):e;return!1===u&&(l=c?c(e):e,u=l===o),!1!==u&&!0!==a.capture||(u=!0===a.matchBase||!0===a.basename?s.matchBase(e,t,r,i):t.exec(l)),{isMatch:Boolean(u),match:u,output:l}},s.matchBase=(e,t,r)=>(t instanceof RegExp?t:s.makeRe(t,r)).test(n.basename(e)),s.isMatch=(e,t,n)=>s(t,n)(e),s.parse=(e,n)=>Array.isArray(e)?e.map(e=>s.parse(e,n)):t(e,{...n,fastpaths:!1}),s.scan=(t,n)=>e(t,n),s.compileRe=(e,t,n=!1,r=!1)=>{if(!0===n)return e.output;const o=t||{},i=o.contains?"":"^",a=o.contains?"":"$";let c=`${i}(?:${e.output})${a}`;e&&!0===e.negated&&(c=`^(?!${c}).*$`);const u=s.toRegex(c,t);return!0===r&&(u.state=e),u},s.makeRe=(e,n={},r=!1,o=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return!1===n.fastpaths||"."!==e[0]&&"*"!==e[0]||(i.output=t.fastpaths(e,n)),i.output||(i=t(e,n)),s.compileRe(i,n,r,o)},s.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},s.constants=r,te=s}var pe=Z(function(){if(se)return re;se=1;const e=fe(),t=le();function n(n,r,s=!1){return!r||null!==r.windows&&void 0!==r.windows||(r={...r,windows:t.isWindows()}),e(n,r,s)}return Object.assign(n,e),re=n}());async function de(e){const t=[],n=["."];for(;n.length;){const r=n.pop(),s=h(e,r),o=await i(s,{withFileTypes:!0});for(const e of o){const s="."===r?e.name:g(r,e.name);e.isDirectory()?n.push(s):t.push(s.replace(/\\/g,"/"))}}return t}const he=(e,t)=>{const n=t.replace(/\\/g,"/").replace(/\/+$/,"");return e===n||e.startsWith(n+"/")},me=e=>{const t=e.replace(/\\/g,"/").replace(/^\.\/+/,"").replace(/\/+$/,"");if(!/[*?[\]{}()!]/.test(n=t)&&!n.includes("**"))return t?e=>he(e,t):()=>!1;var n;const r=pe(t,{dot:!0});return e=>r(e)};async function ge(e,{cwd:n,stanPath:r,includeOutputDir:s,includes:o=[],excludes:i=[],anchors:c=[]}){const u=r.replace(/\\/g,"/"),l=((e,t)=>{const n=new Set;for(const r of e){if("package.json"===r)continue;if(!r.endsWith("/package.json"))continue;const e=r.slice(0,-13);e.startsWith("node_modules/")||e.startsWith(".git/")||e===t||e.startsWith(`${t}/`)||e.length>0&&n.add(e)}return Array.from(n)})(e,u),f=await(async e=>{const n=h(e,".gitignore");if(!t(n))return null;try{const e=await a(n,"utf8"),t=ae();return t.add(e),t}catch{return null}})(n),p=[e=>he(e,"node_modules"),e=>he(e,".git"),...f?[e=>f.ignores(e)]:[],...i.map(me),...l.map(e=>t=>he(t,e)),e=>B(u,e)];s||p.push(e=>z(`${u}/output`,e));const d=e.filter(e=>!p.some(t=>t(e)));if(o.length>0){const t=o.map(me),n=[e=>B(u,e),...s?[]:[e=>z(`${u}/output`,e)]],r=new Set(d);for(const n of e)t.some(e=>e(n))&&r.add(n);const a=i.map(me),l=new Set(e.filter(e=>r.has(e)&&!n.some(t=>t(e))&&!a.some(t=>t(e))));if(c.length>0){const t=c.map(me);for(const n of e)!(B(u,n)||!s&&z(`${u}/output`,n))&&t.some(e=>e(n))&&l.add(n)}return e.filter(e=>l.has(e))}if(c.length>0){const t=c.map(me),n=new Set(d);for(const r of e)!(B(u,r)||!s&&z(`${u}/output`,r))&&t.some(e=>e(r))&&n.add(r);return e.filter(e=>n.has(e))}return d}async function ye(e,t){const n=(await(async()=>{try{const e=await Promise.resolve().then(function(){return uc}),t=e.makeStanDirs,n=e.default?.makeStanDirs,r="function"==typeof t?t:n;if("function"==typeof r)return r}catch{}throw new Error("makeStanDirs export not found in ./paths")})())(e,t);return await b(n.rootAbs),await b(n.outputAbs),await b(n.diffAbs),await b(n.patchAbs),{rootAbs:n.rootAbs,outputAbs:n.outputAbs,diffAbs:n.diffAbs,patchAbs:n.patchAbs}}async function be(e,t){const n=await ye(e,t);return{outDir:n.outputAbs,diffDir:n.diffAbs}}const ve="code -g {file}",De=e=>e instanceof URL?D(e):e;function we({cwd:t}={}){const n=function(t,{cwd:n=v.cwd(),type:r="file",stopAt:s}={}){let o=d.resolve(De(n)??"");const{root:i}=d.parse(o);s=d.resolve(o,De(s)??i);const a=d.isAbsolute(t);for(;o;){const n=a?t:d.join(o,t);try{const t=e.statSync(n,{throwIfNoEntry:!1});if("file"===r&&t?.isFile()||"directory"===r&&t?.isDirectory())return n}catch{}if(o===s||o===i)break;o=d.dirname(o)}}("package.json",{cwd:t});return n&&d.dirname(n)}const _e=["stan.config.yml","stan.config.yaml","stan.config.json"],Ee=e=>{for(const n of _e){const r=h(e,n);if(t(r))return r}return null},ke=e=>{const t=Ee(e);if(t)return t;const n=new Set;let r=e;for(;r;){const e=we({cwd:r});if(!e||n.has(e))break;n.add(e);const t=Ee(e);if(t)return t;const s=m(e);if(s===e||n.has(s))break;r=s}return null};var Se,Ae={},Ce={},Pe={},Oe={};function Te(){if(Se)return Oe;Se=1;const e=Symbol.for("yaml.alias"),t=Symbol.for("yaml.document"),n=Symbol.for("yaml.map"),r=Symbol.for("yaml.pair"),s=Symbol.for("yaml.scalar"),o=Symbol.for("yaml.seq"),i=Symbol.for("yaml.node.type"),a=e=>!!e&&"object"==typeof e&&e[i]===s;function c(e){if(e&&"object"==typeof e)switch(e[i]){case n:case o:return!0}return!1}return Oe.ALIAS=e,Oe.DOC=t,Oe.MAP=n,Oe.NODE_TYPE=i,Oe.PAIR=r,Oe.SCALAR=s,Oe.SEQ=o,Oe.hasAnchor=e=>(a(e)||c(e))&&!!e.anchor,Oe.isAlias=t=>!!t&&"object"==typeof t&&t[i]===e,Oe.isCollection=c,Oe.isDocument=e=>!!e&&"object"==typeof e&&e[i]===t,Oe.isMap=e=>!!e&&"object"==typeof e&&e[i]===n,Oe.isNode=function(t){if(t&&"object"==typeof t)switch(t[i]){case e:case n:case s:case o:return!0}return!1},Oe.isPair=e=>!!e&&"object"==typeof e&&e[i]===r,Oe.isScalar=a,Oe.isSeq=e=>!!e&&"object"==typeof e&&e[i]===o,Oe}var xe,Ne,$e={};function Le(){if(xe)return $e;xe=1;var e=Te();const t=Symbol("break visit"),n=Symbol("skip children"),r=Symbol("remove node");function s(t,n){const s=c(n);e.isDocument(t)?o(null,t.contents,s,Object.freeze([t]))===r&&(t.contents=null):o(null,t,s,Object.freeze([]))}function o(n,s,i,a){const c=u(n,s,i,a);if(e.isNode(c)||e.isPair(c))return l(n,a,c),o(n,c,i,a);if("symbol"!=typeof c)if(e.isCollection(s)){a=Object.freeze(a.concat(s));for(let e=0;e<s.items.length;++e){const n=o(e,s.items[e],i,a);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===r&&(s.items.splice(e,1),e-=1)}}}else if(e.isPair(s)){a=Object.freeze(a.concat(s));const e=o("key",s.key,i,a);if(e===t)return t;e===r&&(s.key=null);const n=o("value",s.value,i,a);if(n===t)return t;n===r&&(s.value=null)}return c}async function i(t,n){const s=c(n);e.isDocument(t)?await a(null,t.contents,s,Object.freeze([t]))===r&&(t.contents=null):await a(null,t,s,Object.freeze([]))}async function a(n,s,o,i){const c=await u(n,s,o,i);if(e.isNode(c)||e.isPair(c))return l(n,i,c),a(n,c,o,i);if("symbol"!=typeof c)if(e.isCollection(s)){i=Object.freeze(i.concat(s));for(let e=0;e<s.items.length;++e){const n=await a(e,s.items[e],o,i);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===r&&(s.items.splice(e,1),e-=1)}}}else if(e.isPair(s)){i=Object.freeze(i.concat(s));const e=await a("key",s.key,o,i);if(e===t)return t;e===r&&(s.key=null);const n=await a("value",s.value,o,i);if(n===t)return t;n===r&&(s.value=null)}return c}function c(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 u(t,n,r,s){return"function"==typeof r?r(t,n,s):e.isMap(n)?r.Map?.(t,n,s):e.isSeq(n)?r.Seq?.(t,n,s):e.isPair(n)?r.Pair?.(t,n,s):e.isScalar(n)?r.Scalar?.(t,n,s):e.isAlias(n)?r.Alias?.(t,n,s):void 0}function l(t,n,r){const s=n[n.length-1];if(e.isCollection(s))s.items[t]=r;else if(e.isPair(s))"key"===t?s.key=r:s.value=r;else{if(!e.isDocument(s)){const t=e.isAlias(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${t} parent`)}s.contents=r}}return s.BREAK=t,s.SKIP=n,s.REMOVE=r,i.BREAK=t,i.SKIP=n,i.REMOVE=r,$e.visit=s,$e.visitAsync=i,$e}function Re(){if(Ne)return Pe;Ne=1;var e=Te(),t=Le();const n={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},r=e=>e.replace(/[!,[\]{}]/g,e=>n[e]);class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){const e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),r=n.shift();switch(r){case"%TAG":{if(2!==n.length&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[e,r]=n;return this.tags[e]=r,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==n.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=n;return"1.1"===e||"1.2"===e?(this.yaml.version=e,!0):(t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1)}default:return t(0,`Unknown directive ${r}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const n=e.slice(2,-1);return"!"===n||"!!"===n?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),n)}const[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);const s=this.tags[n];if(s)try{return s+decodeURIComponent(r)}catch(e){return t(String(e)),null}return"!"===n?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+r(e.substring(n.length));return"!"===e[0]?e:`!<${e}>`}toString(n){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let o;if(n&&s.length>0&&e.isNode(n.contents)){const r={};t.visit(n.contents,(t,n)=>{e.isNode(n)&&n.tag&&(r[n.tag]=!0)}),o=Object.keys(r)}else o=[];for(const[e,t]of s)"!!"===e&&"tag:yaml.org,2002:"===t||n&&!o.some(e=>e.startsWith(t))||r.push(`%TAG ${e} ${t}`);return r.join("\n")}}return s.defaultYaml={explicit:!1,version:"1.2"},s.defaultTags={"!!":"tag:yaml.org,2002:"},Pe.Directives=s,Pe}var Fe,Ie={},Me={},je={};function Be(){if(Fe)return je;Fe=1;var e=Te(),t=Le();function n(e){const n=new Set;return t.visit(e,{Value(e,t){t.anchor&&n.add(t.anchor)}}),n}function r(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}return je.anchorIsValid=function(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0},je.anchorNames=n,je.createNodeAnchors=function(t,s){const o=[],i=new Map;let a=null;return{onAnchor:e=>{o.push(e),a??(a=n(t));const i=r(s,a);return a.add(i),i},setAnchors:()=>{for(const t of o){const n=i.get(t);if("object"!=typeof n||!n.anchor||!e.isScalar(n.node)&&!e.isCollection(n.node)){const e=new Error("Failed to resolve repeated object (this should not happen)");throw e.source=t,e}n.node.anchor=n.anchor}},sourceObjects:i}},je.findNewAnchor=r,je}var ze,He={},Ke={};function Ue(){return ze||(ze=1,Ke.applyReviver=function e(t,n,r,s){if(s&&"object"==typeof s)if(Array.isArray(s))for(let n=0,r=s.length;n<r;++n){const r=s[n],o=e(t,s,String(n),r);void 0===o?delete s[n]:o!==r&&(s[n]=o)}else if(s instanceof Map)for(const n of Array.from(s.keys())){const r=s.get(n),o=e(t,s,n,r);void 0===o?s.delete(n):o!==r&&s.set(n,o)}else if(s instanceof Set)for(const n of Array.from(s)){const r=e(t,s,n,n);void 0===r?s.delete(n):r!==n&&(s.delete(n),s.add(r))}else for(const[n,r]of Object.entries(s)){const o=e(t,s,n,r);void 0===o?delete s[n]:o!==r&&(s[n]=o)}return t.call(n,r,s)}),Ke}var qe,Ze,Ge,We={};function Je(){if(qe)return We;qe=1;var e=Te();return We.toJS=function t(n,r,s){if(Array.isArray(n))return n.map((e,n)=>t(e,String(n),s));if(n&&"function"==typeof n.toJSON){if(!s||!e.hasAnchor(n))return n.toJSON(r,s);const t={aliasCount:0,count:1,res:void 0};s.anchors.set(n,t),s.onCreate=e=>{t.res=e,delete s.onCreate};const o=n.toJSON(r,s);return s.onCreate&&s.onCreate(o),o}return"bigint"!=typeof n||s?.keep?n:Number(n)},We}function Ve(){if(Ze)return He;Ze=1;var e=Ue(),t=Te(),n=Je();return He.NodeBase=class{constructor(e){Object.defineProperty(this,t.NODE_TYPE,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(r,{mapAsMap:s,maxAliasCount:o,onAnchor:i,reviver:a}={}){if(!t.isDocument(r))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:r,keep:!0,mapAsMap:!0===s,mapKeyWarned:!1,maxAliasCount:"number"==typeof o?o:100},u=n.toJS(this,"",c);if("function"==typeof i)for(const{count:e,res:t}of c.anchors.values())i(t,e);return"function"==typeof a?e.applyReviver(a,{"":u},"",u):u}},He}function Ye(){if(Ge)return Me;Ge=1;var e=Be(),t=Le(),n=Te(),r=Ve(),s=Je();let o=class extends r.NodeBase{constructor(e){super(n.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){let s,o;r?.aliasResolveCache?s=r.aliasResolveCache:(s=[],t.visit(e,{Node:(e,t)=>{(n.isAlias(t)||n.hasAnchor(t))&&s.push(t)}}),r&&(r.aliasResolveCache=s));for(const e of s){if(e===this)break;e.anchor===this.source&&(o=e)}return o}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:r,maxAliasCount:o}=t,a=this.resolve(r,t);if(!a){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let c=n.get(a);if(c||(s.toJS(a,null,t),c=n.get(a)),!c||void 0===c.res)throw new ReferenceError("This should not happen: Alias anchor was not resolved?");if(o>=0&&(c.count+=1,0===c.aliasCount&&(c.aliasCount=i(r,a,n)),c.count*c.aliasCount>o))throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack");return c.res}toString(t,n,r){const s=`*${this.source}`;if(t){if(e.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(t.implicitKey)return`${s} `}return s}};function i(e,t,r){if(n.isAlias(t)){const n=t.resolve(e),s=r&&n&&r.get(n);return s?s.count*s.aliasCount:0}if(n.isCollection(t)){let n=0;for(const s of t.items){const t=i(e,s,r);t>n&&(n=t)}return n}if(n.isPair(t)){const n=i(e,t.key,r),s=i(e,t.value,r);return Math.max(n,s)}return 1}return Me.Alias=o,Me}var Qe,Xe,et,tt={},nt={},rt={};function st(){if(Qe)return rt;Qe=1;var e=Te(),t=Ve(),n=Je();let r=class extends t.NodeBase{constructor(t){super(e.SCALAR),this.value=t}toJSON(e,t){return t?.keep?this.value:n.toJS(this.value,e,t)}toString(){return String(this.value)}};return r.BLOCK_FOLDED="BLOCK_FOLDED",r.BLOCK_LITERAL="BLOCK_LITERAL",r.PLAIN="PLAIN",r.QUOTE_DOUBLE="QUOTE_DOUBLE",r.QUOTE_SINGLE="QUOTE_SINGLE",rt.Scalar=r,rt.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e,rt}function ot(){if(Xe)return nt;Xe=1;var e=Ye(),t=Te(),n=st();return nt.createNode=function(r,s,o){if(t.isDocument(r)&&(r=r.contents),t.isNode(r))return r;if(t.isPair(r)){const e=o.schema[t.MAP].createNode?.(o.schema,null,o);return e.items.push(r),e}(r instanceof String||r instanceof Number||r instanceof Boolean||"undefined"!=typeof BigInt&&r instanceof BigInt)&&(r=r.valueOf());const{aliasDuplicateObjects:i,onAnchor:a,onTagObj:c,schema:u,sourceObjects:l}=o;let f;if(i&&r&&"object"==typeof r){if(f=l.get(r),f)return f.anchor??(f.anchor=a(r)),new e.Alias(f.anchor);f={anchor:null,node:null},l.set(r,f)}s?.startsWith("!!")&&(s="tag:yaml.org,2002:"+s.slice(2));let p=function(e,t,n){if(t){const e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}(r,s,u.tags);if(!p){if(r&&"function"==typeof r.toJSON&&(r=r.toJSON()),!r||"object"!=typeof r){const e=new n.Scalar(r);return f&&(f.node=e),e}p=r instanceof Map?u[t.MAP]:Symbol.iterator in Object(r)?u[t.SEQ]:u[t.MAP]}c&&(c(p),delete o.onTagObj);const d=p?.createNode?p.createNode(o.schema,r,o):"function"==typeof p?.nodeClass?.from?p.nodeClass.from(o.schema,r,o):new n.Scalar(r);return s?d.tag=s:p.default||(d.tag=p.tag),f&&(f.node=d),d},nt}function it(){if(et)return tt;et=1;var e=ot(),t=Te(),n=Ve();function r(t,n,r){let s=r;for(let e=n.length-1;e>=0;--e){const t=n[e];if("number"==typeof t&&Number.isInteger(t)&&t>=0){const e=[];e[t]=s,s=e}else s=new Map([[t,s]])}return e.createNode(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const s=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;let o=class extends n.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(n=>t.isNode(n)||t.isPair(n)?n.clone(e):n),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(s(e))this.add(n);else{const[s,...o]=e,i=this.get(s,!0);if(t.isCollection(i))i.addIn(o,n);else{if(void 0!==i||!this.schema)throw new Error(`Expected YAML collection at ${s}. Remaining path: ${o}`);this.set(s,r(this.schema,o,n))}}}deleteIn(e){const[n,...r]=e;if(0===r.length)return this.delete(n);const s=this.get(n,!0);if(t.isCollection(s))return s.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...s]=e,o=this.get(r,!0);return 0===s.length?!n&&t.isScalar(o)?o.value:o:t.isCollection(o)?o.getIn(s,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!t.isPair(n))return!1;const r=n.value;return null==r||e&&t.isScalar(r)&&null==r.value&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(0===r.length)return this.has(n);const s=this.get(n,!0);return!!t.isCollection(s)&&s.hasIn(r)}setIn(e,n){const[s,...o]=e;if(0===o.length)this.set(s,n);else{const e=this.get(s,!0);if(t.isCollection(e))e.setIn(o,n);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${s}. Remaining path: ${o}`);this.set(s,r(this.schema,o,n))}}}};return tt.Collection=o,tt.collectionFromPath=r,tt.isEmptyPath=s,tt}var at,ct={},ut={},lt={},ft={};function pt(){if(at)return ft;function e(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}return at=1,ft.indentComment=e,ft.lineComment=(t,n,r)=>t.endsWith("\n")?e(r,n):r.includes("\n")?"\n"+e(r,n):(t.endsWith(" ")?"":" ")+r,ft.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#"),ft}var dt,ht,mt,gt,yt={},bt={};function vt(){if(ht)return yt;ht=1;var e=st(),t=function(){if(dt)return bt;dt=1;const e="block",t="quoted";function n(e,t,n){let r=t,s=t+1,o=e[s];for(;" "===o||"\t"===o;)if(t<s+n)o=e[++t];else{do{o=e[++t]}while(o&&"\n"!==o);r=t,s=t+1,o=e[s]}return r}return bt.FOLD_BLOCK=e,bt.FOLD_FLOW="flow",bt.FOLD_QUOTED=t,bt.foldFlowLines=function(r,s,o="flow",{indentAtStart:i,lineWidth:a=80,minContentWidth:c=20,onFold:u,onOverflow:l}={}){if(!a||a<0)return r;a<c&&(c=0);const f=Math.max(1+c,1+a-s.length);if(r.length<=f)return r;const p=[],d={};let h,m,g=a-s.length;"number"==typeof i&&(i>a-Math.max(2,c)?p.push(0):g=a-i);let y=!1,b=-1,v=-1,D=-1;o===e&&(b=n(r,b,s.length),-1!==b&&(g=b+f));for(let i;i=r[b+=1];){if(o===t&&"\\"===i){switch(v=b,r[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}D=b}if("\n"===i)o===e&&(b=n(r,b,s.length)),g=b+s.length+f,h=void 0;else{if(" "===i&&m&&" "!==m&&"\n"!==m&&"\t"!==m){const e=r[b+1];e&&" "!==e&&"\n"!==e&&"\t"!==e&&(h=b)}if(b>=g)if(h)p.push(h),g=h+f,h=void 0;else if(o===t){for(;" "===m||"\t"===m;)m=i,i=r[b+=1],y=!0;const e=b>D+1?b-2:v-1;if(d[e])return r;p.push(e),d[e]=!0,g=e+f,h=void 0}else y=!0}m=i}if(y&&l&&l(),0===p.length)return r;u&&u();let w=r.slice(0,p[0]);for(let e=0;e<p.length;++e){const n=p[e],i=p[e+1]||r.length;0===n?w=`\n${s}${r.slice(0,i)}`:(o===t&&d[n]&&(w+=`${r[n]}\\`),w+=`\n${s}${r.slice(n+1,i)}`)}return w},bt}();const n=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),r=e=>/^(%|---|\.\.\.)/m.test(e);function s(e,s){const o=JSON.stringify(e);if(s.options.doubleQuotedAsJSON)return o;const{implicitKey:i}=s,a=s.options.doubleQuotedMinMultiLineLength,c=s.indent||(r(e)?" ":"");let u="",l=0;for(let e=0,t=o[e];t;t=o[++e])if(" "===t&&"\\"===o[e+1]&&"n"===o[e+2]&&(u+=o.slice(l,e)+"\\ ",e+=1,l=e,t="\\"),"\\"===t)switch(o[e+1]){case"u":{u+=o.slice(l,e);const t=o.substr(e+2,4);switch(t){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:"00"===t.substr(0,2)?u+="\\x"+t.substr(2):u+=o.substr(e,6)}e+=5,l=e+1}break;case"n":if(i||'"'===o[e+2]||o.length<a)e+=1;else{for(u+=o.slice(l,e)+"\n\n";"\\"===o[e+2]&&"n"===o[e+3]&&'"'!==o[e+4];)u+="\n",e+=2;u+=c," "===o[e+2]&&(u+="\\"),e+=1,l=e+1}break;default:e+=1}return u=l?u+o.slice(l):o,i?u:t.foldFlowLines(u,c,t.FOLD_QUOTED,n(s,!1))}function o(e,o){if(!1===o.options.singleQuote||o.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return s(e,o);const i=o.indent||(r(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${i}`)+"'";return o.implicitKey?a:t.foldFlowLines(a,i,t.FOLD_FLOW,n(o,!1))}function i(e,t){const{singleQuote:n}=t.options;let r;if(!1===n)r=s;else{const t=e.includes('"'),i=e.includes("'");r=t&&!i?o:i&&!t?s:n?o:s}return r(e,t)}let a;try{a=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{a=/\n+(?!\n|$)/g}function c({comment:s,type:o,value:c},u,l,f){const{blockQuote:p,commentString:d,lineWidth:h}=u.options;if(!p||/\n[\t ]+$/.test(c))return i(c,u);const m=u.indent||(u.forceBlockIndent||r(c)?" ":""),g="literal"===p||"folded"!==p&&o!==e.Scalar.BLOCK_FOLDED&&(o===e.Scalar.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;const r=t-n,s=e.length;if(s<=r)return!1;for(let t=0,n=0;t<s;++t)if("\n"===e[t]){if(t-n>r)return!0;if(n=t+1,s-n<=r)return!1}return!0}(c,h,m.length));if(!c)return g?"|\n":">\n";let y,b;for(b=c.length;b>0;--b){const e=c[b-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let v=c.substring(b);const D=v.indexOf("\n");-1===D?y="-":c===v||D!==v.length-1?(y="+",f&&f()):y="",v&&(c=c.slice(0,-v.length),"\n"===v[v.length-1]&&(v=v.slice(0,-1)),v=v.replace(a,`$&${m}`));let w,_=!1,E=-1;for(w=0;w<c.length;++w){const e=c[w];if(" "===e)_=!0;else{if("\n"!==e)break;E=w}}let k=c.substring(0,E<w?E+1:w);k&&(c=c.substring(k.length),k=k.replace(/\n+/g,`$&${m}`));let S=(_?m?"2":"1":"")+y;if(s&&(S+=" "+d(s.replace(/ ?[\r\n]+/g," ")),l&&l()),!g){const r=c.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${m}`);let s=!1;const i=n(u,!0);"folded"!==p&&o!==e.Scalar.BLOCK_FOLDED&&(i.onOverflow=()=>{s=!0});const a=t.foldFlowLines(`${k}${r}${v}`,m,t.FOLD_BLOCK,i);if(!s)return`>${S}\n${m}${a}`}return`|${S}\n${m}${k}${c=c.replace(/\n+/g,`$&${m}`)}${v}`}return yt.stringifyString=function(a,u,l,f){const{implicitKey:p,inFlow:d}=u,h="string"==typeof a.value?a:Object.assign({},a,{value:String(a.value)});let{type:m}=a;m!==e.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(h.value)&&(m=e.Scalar.QUOTE_DOUBLE);const g=a=>{switch(a){case e.Scalar.BLOCK_FOLDED:case e.Scalar.BLOCK_LITERAL:return p||d?i(h.value,u):c(h,u,l,f);case e.Scalar.QUOTE_DOUBLE:return s(h.value,u);case e.Scalar.QUOTE_SINGLE:return o(h.value,u);case e.Scalar.PLAIN:return function(s,o,a,u){const{type:l,value:f}=s,{actualString:p,implicitKey:d,indent:h,indentStep:m,inFlow:g}=o;if(d&&f.includes("\n")||g&&/[[\]{},]/.test(f))return i(f,o);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(f))return d||g||!f.includes("\n")?i(f,o):c(s,o,a,u);if(!d&&!g&&l!==e.Scalar.PLAIN&&f.includes("\n"))return c(s,o,a,u);if(r(f)){if(""===h)return o.forceBlockIndent=!0,c(s,o,a,u);if(d&&h===m)return i(f,o)}const y=f.replace(/\n+/g,`$&\n${h}`);if(p){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(y),{compat:t,tags:n}=o.doc.schema;if(n.some(e)||t?.some(e))return i(f,o)}return d?y:t.foldFlowLines(y,h,t.FOLD_FLOW,n(o,!1))}(h,u,l,f);default:return null}};let y=g(m);if(null===y){const{defaultKeyType:e,defaultStringType:t}=u.options,n=p&&e||t;if(y=g(n),null===y)throw new Error(`Unsupported default string type ${n}`)}return y},yt}function Dt(){if(mt)return lt;mt=1;var e=Be(),t=Te(),n=pt(),r=vt();return lt.createStringifyContext=function(e,t){const r=Object.assign({blockQuote:!0,commentString:n.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let s;switch(r.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:s,options:r}},lt.stringify=function(n,s,o,i){if(t.isPair(n))return n.toString(s,o,i);if(t.isAlias(n)){if(s.doc.directives)return n.toString(s);if(s.resolvedAliases?.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");s.resolvedAliases?s.resolvedAliases.add(n):s.resolvedAliases=new Set([n]),n=n.resolve(s.doc)}let a;const c=t.isNode(n)?n:s.doc.createNode(n,{onTagObj:e=>a=e});a??(a=function(e,n){if(n.tag){const t=e.filter(e=>e.tag===n.tag);if(t.length>0)return t.find(e=>e.format===n.format)??t[0]}let r,s;if(t.isScalar(n)){s=n.value;let t=e.filter(e=>e.identify?.(s));if(t.length>1){const e=t.filter(e=>e.test);e.length>0&&(t=e)}r=t.find(e=>e.format===n.format)??t.find(e=>!e.format)}else s=n,r=e.find(e=>e.nodeClass&&s instanceof e.nodeClass);if(!r)throw new Error(`Tag not resolved for ${s?.constructor?.name??(null===s?"null":typeof s)} value`);return r}(s.doc.schema.tags,c));const u=function(n,r,{anchors:s,doc:o}){if(!o.directives)return"";const i=[],a=(t.isScalar(n)||t.isCollection(n))&&n.anchor;a&&e.anchorIsValid(a)&&(s.add(a),i.push(`&${a}`));const c=n.tag??(r.default?null:r.tag);return c&&i.push(o.directives.tagString(c)),i.join(" ")}(c,a,s);u.length>0&&(s.indentAtStart=(s.indentAtStart??0)+u.length+1);const l="function"==typeof a.stringify?a.stringify(c,s,o,i):t.isScalar(c)?r.stringifyString(c,s,o,i):c.toString(s,o,i);return u?t.isScalar(c)||"{"===l[0]||"["===l[0]?`${u} ${l}`:`${u}\n${s.indent}${l}`:l},lt}var wt,_t={},Et={};function kt(){if(wt)return Et;wt=1;var e=w;return Et.debug=function(e,...t){"debug"===e&&console.log(...t)},Et.warn=function(t,n){"debug"!==t&&"warn"!==t||("function"==typeof e.emitWarning?e.emitWarning(n):console.warn(n))},Et}var St,At,Ct,Pt={};function Ot(){if(St)return Pt;St=1;var e=Te(),t=st();const n="<<",r={identify:e=>e===n||"symbol"==typeof e&&e.description===n,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new t.Scalar(Symbol(n)),{addToJSMap:s}),stringify:()=>n};function s(t,n,r){if(r=t&&e.isAlias(r)?r.resolve(t.doc):r,e.isSeq(r))for(const e of r.items)o(t,n,e);else if(Array.isArray(r))for(const e of r)o(t,n,e);else o(t,n,r)}function o(t,n,r){const s=t&&e.isAlias(r)?r.resolve(t.doc):r;if(!e.isMap(s))throw new Error("Merge sources must be maps or map aliases");const o=s.toJSON(null,t,Map);for(const[e,t]of o)n instanceof Map?n.has(e)||n.set(e,t):n instanceof Set?n.add(e):Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(n,e,{value:t,writable:!0,enumerable:!0,configurable:!0});return n}return Pt.addMergeToJSMap=s,Pt.isMergeKey=(n,s)=>(r.identify(s)||e.isScalar(s)&&(!s.type||s.type===t.Scalar.PLAIN)&&r.identify(s.value))&&n?.doc.schema.tags.some(e=>e.tag===r.tag&&e.default),Pt.merge=r,Pt}function Tt(){if(At)return _t;At=1;var e=kt(),t=Ot(),n=Dt(),r=Te(),s=Je();return _t.addPairToJSMap=function(o,i,{key:a,value:c}){if(r.isNode(a)&&a.addToJSMap)a.addToJSMap(o,i,c);else if(t.isMergeKey(o,a))t.addMergeToJSMap(o,i,c);else{const t=s.toJS(a,"",o);if(i instanceof Map)i.set(t,s.toJS(c,t,o));else if(i instanceof Set)i.add(t);else{const u=function(t,s,o){if(null===s)return"";if("object"!=typeof s)return String(s);if(r.isNode(t)&&o?.doc){const r=n.createStringifyContext(o.doc,{});r.anchors=new Set;for(const e of o.anchors.keys())r.anchors.add(e.anchor);r.inFlow=!0,r.inStringifyKey=!0;const s=t.toString(r);if(!o.mapKeyWarned){let t=JSON.stringify(s);t.length>40&&(t=t.substring(0,36)+'..."'),e.warn(o.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${t}. Set mapAsMap: true to use object keys.`),o.mapKeyWarned=!0}return s}return JSON.stringify(s)}(a,t,o),l=s.toJS(c,u,o);u in i?Object.defineProperty(i,u,{value:l,writable:!0,enumerable:!0,configurable:!0}):i[u]=l}}return i},_t}function xt(){if(Ct)return ct;Ct=1;var e=ot(),t=function(){if(gt)return ut;gt=1;var e=Te(),t=st(),n=Dt(),r=pt();return ut.stringifyPair=function({key:s,value:o},i,a,c){const{allNullValues:u,doc:l,indent:f,indentStep:p,options:{commentString:d,indentSeq:h,simpleKeys:m}}=i;let g=e.isNode(s)&&s.comment||null;if(m){if(g)throw new Error("With simple keys, key nodes cannot have comments");if(e.isCollection(s)||!e.isNode(s)&&"object"==typeof s)throw new Error("With simple keys, collection cannot be used as a key value")}let y=!m&&(!s||g&&null==o&&!i.inFlow||e.isCollection(s)||(e.isScalar(s)?s.type===t.Scalar.BLOCK_FOLDED||s.type===t.Scalar.BLOCK_LITERAL:"object"==typeof s));i=Object.assign({},i,{allNullValues:!1,implicitKey:!y&&(m||!u),indent:f+p});let b,v,D,w=!1,_=!1,E=n.stringify(s,i,()=>w=!0,()=>_=!0);if(!y&&!i.inFlow&&E.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");y=!0}if(i.inFlow){if(u||null==o)return w&&a&&a(),""===E?"?":y?`? ${E}`:E}else if(u&&!m||null==o&&y)return E=`? ${E}`,g&&!w?E+=r.lineComment(E,i.indent,d(g)):_&&c&&c(),E;w&&(g=null),y?(g&&(E+=r.lineComment(E,i.indent,d(g))),E=`? ${E}\n${f}:`):(E=`${E}:`,g&&(E+=r.lineComment(E,i.indent,d(g)))),e.isNode(o)?(b=!!o.spaceBefore,v=o.commentBefore,D=o.comment):(b=!1,v=null,D=null,o&&"object"==typeof o&&(o=l.createNode(o))),i.implicitKey=!1,y||g||!e.isScalar(o)||(i.indentAtStart=E.length+1),_=!1,h||!(p.length>=2)||i.inFlow||y||!e.isSeq(o)||o.flow||o.tag||o.anchor||(i.indent=i.indent.substring(2));let k=!1;const S=n.stringify(o,i,()=>k=!0,()=>_=!0);let A=" ";if(g||b||v){if(A=b?"\n":"",v){const e=d(v);A+=`\n${r.indentComment(e,i.indent)}`}""!==S||i.inFlow?A+=`\n${i.indent}`:"\n"===A&&(A="\n\n")}else if(!y&&e.isCollection(o)){const e=S[0],t=S.indexOf("\n"),n=-1!==t,r=i.inFlow??o.flow??0===o.items.length;if(n||!r){let r=!1;if(n&&("&"===e||"!"===e)){let n=S.indexOf(" ");"&"===e&&-1!==n&&n<t&&"!"===S[n+1]&&(n=S.indexOf(" ",n+1)),(-1===n||t<n)&&(r=!0)}r||(A=`\n${i.indent}`)}}else""!==S&&"\n"!==S[0]||(A="");return E+=A+S,i.inFlow?k&&a&&a():D&&!k?E+=r.lineComment(E,i.indent,d(D)):_&&c&&c(),E},ut}(),n=Tt(),r=Te();let s=class e{constructor(e,t=null){Object.defineProperty(this,r.NODE_TYPE,{value:r.PAIR}),this.key=e,this.value=t}clone(t){let{key:n,value:s}=this;return r.isNode(n)&&(n=n.clone(t)),r.isNode(s)&&(s=s.clone(t)),new e(n,s)}toJSON(e,t){const r=t?.mapAsMap?new Map:{};return n.addPairToJSMap(t,r,this)}toString(e,n,r){return e?.doc?t.stringifyPair(this,e,n,r):JSON.stringify(this)}};return ct.Pair=s,ct.createPair=function(t,n,r){const o=e.createNode(t,void 0,r),i=e.createNode(n,void 0,r);return new s(o,i)},ct}var Nt,$t,Lt,Rt={},Ft={},It={},Mt={};function jt(){if(Nt)return Mt;Nt=1;var e=Te(),t=Dt(),n=pt();function r({comment:r,items:s},i,{blockItemPrefix:a,flowChars:c,itemIndent:u,onChompKeep:l,onComment:f}){const{indent:p,options:{commentString:d}}=i,h=Object.assign({},i,{indent:u,type:null});let m=!1;const g=[];for(let r=0;r<s.length;++r){const c=s[r];let l=null;if(e.isNode(c))!m&&c.spaceBefore&&g.push(""),o(i,g,c.commentBefore,m),c.comment&&(l=c.comment);else if(e.isPair(c)){const t=e.isNode(c.key)?c.key:null;t&&(!m&&t.spaceBefore&&g.push(""),o(i,g,t.commentBefore,m))}m=!1;let f=t.stringify(c,h,()=>l=null,()=>m=!0);l&&(f+=n.lineComment(f,u,d(l))),m&&l&&(m=!1),g.push(a+f)}let y;if(0===g.length)y=c.start+c.end;else{y=g[0];for(let e=1;e<g.length;++e){const t=g[e];y+=t?`\n${p}${t}`:"\n"}}return r?(y+="\n"+n.indentComment(d(r),p),f&&f()):m&&l&&l(),y}function s({items:r},s,{flowChars:i,itemIndent:a}){const{indent:c,indentStep:u,flowCollectionPadding:l,options:{commentString:f}}=s;a+=u;const p=Object.assign({},s,{indent:a,inFlow:!0,type:null});let d=!1,h=0;const m=[];for(let i=0;i<r.length;++i){const c=r[i];let u=null;if(e.isNode(c))c.spaceBefore&&m.push(""),o(s,m,c.commentBefore,!1),c.comment&&(u=c.comment);else if(e.isPair(c)){const t=e.isNode(c.key)?c.key:null;t&&(t.spaceBefore&&m.push(""),o(s,m,t.commentBefore,!1),t.comment&&(d=!0));const n=e.isNode(c.value)?c.value:null;n?(n.comment&&(u=n.comment),n.commentBefore&&(d=!0)):null==c.value&&t?.comment&&(u=t.comment)}u&&(d=!0);let l=t.stringify(c,p,()=>u=null);i<r.length-1&&(l+=","),u&&(l+=n.lineComment(l,a,f(u))),!d&&(m.length>h||l.includes("\n"))&&(d=!0),m.push(l),h=m.length}const{start:g,end:y}=i;if(0===m.length)return g+y;if(!d){const e=m.reduce((e,t)=>e+t.length+2,2);d=s.options.lineWidth>0&&e>s.options.lineWidth}if(d){let e=g;for(const t of m)e+=t?`\n${u}${c}${t}`:"\n";return`${e}\n${c}${y}`}return`${g}${l}${m.join(" ")}${l}${y}`}function o({indent:e,options:{commentString:t}},r,s,o){if(s&&o&&(s=s.replace(/^\n+/,"")),s){const o=n.indentComment(t(s),e);r.push(o.trimStart())}}return Mt.stringifyCollection=function(e,t,n){return(t.inFlow??e.flow?s:r)(e,t,n)},Mt}function Bt(){if($t)return It;$t=1;var e=jt(),t=Tt(),n=it(),r=Te(),s=xt(),o=st();function i(e,t){const n=r.isScalar(t)?t.value:t;for(const s of e)if(r.isPair(s)){if(s.key===t||s.key===n)return s;if(r.isScalar(s.key)&&s.key.value===n)return s}}let a=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(r.MAP,e),this.items=[]}static from(e,t,n){const{keepUndefined:r,replacer:o}=n,i=new this(e),a=(e,a)=>{if("function"==typeof o)a=o.call(t,e,a);else if(Array.isArray(o)&&!o.includes(e))return;(void 0!==a||r)&&i.items.push(s.createPair(e,a,n))};if(t instanceof Map)for(const[e,n]of t)a(e,n);else if(t&&"object"==typeof t)for(const e of Object.keys(t))a(e,t[e]);return"function"==typeof e.sortMapEntries&&i.items.sort(e.sortMapEntries),i}add(e,t){let n;n=r.isPair(e)?e:e&&"object"==typeof e&&"key"in e?new s.Pair(e.key,e.value):new s.Pair(e,e?.value);const a=i(this.items,n.key),c=this.schema?.sortMapEntries;if(a){if(!t)throw new Error(`Key ${n.key} already set`);r.isScalar(a.value)&&o.isScalarValue(n.value)?a.value.value=n.value:a.value=n.value}else if(c){const e=this.items.findIndex(e=>c(n,e)<0);-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){const t=i(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=i(this.items,e),s=n?.value;return(!t&&r.isScalar(s)?s.value:s)??void 0}has(e){return!!i(this.items,e)}set(e,t){this.add(new s.Pair(e,t),!0)}toJSON(e,n,r){const s=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(s);for(const e of this.items)t.addPairToJSMap(n,s,e);return s}toString(t,n,s){if(!t)return JSON.stringify(this);for(const e of this.items)if(!r.isPair(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),e.stringifyCollection(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:s,onComment:n})}};return It.YAMLMap=a,It.findPair=i,It}function zt(){if(Lt)return Ft;Lt=1;var e=Te(),t=Bt();const n={collection:"map",default:!0,nodeClass:t.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:(t,n)=>(e.isMap(t)||n("Expected a mapping for this tag"),t),createNode:(e,n,r)=>t.YAMLMap.from(e,n,r)};return Ft.map=n,Ft}var Ht,Kt,Ut={},qt={};function Zt(){if(Ht)return qt;Ht=1;var e=ot(),t=jt(),n=it(),r=Te(),s=st(),o=Je();let i=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(r.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=a(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){const n=a(e);if("number"!=typeof n)return;const s=this.items[n];return!t&&r.isScalar(s)?s.value:s}has(e){const t=a(e);return"number"==typeof t&&t<this.items.length}set(e,t){const n=a(e);if("number"!=typeof n)throw new Error(`Expected a valid index, not ${e}.`);const o=this.items[n];r.isScalar(o)&&s.isScalarValue(t)?o.value=t:this.items[n]=t}toJSON(e,t){const n=[];t?.onCreate&&t.onCreate(n);let r=0;for(const e of this.items)n.push(o.toJS(e,String(r++),t));return n}toString(e,n,r){return e?t.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){const{replacer:s}=r,o=new this(t);if(n&&Symbol.iterator in Object(n)){let t=0;for(let i of n){if("function"==typeof s){const e=n instanceof Set?i:String(t++);i=s.call(n,e,i)}o.items.push(e.createNode(i,void 0,r))}}return o}};function a(e){let t=r.isScalar(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}return qt.YAMLSeq=i,qt}function Gt(){if(Kt)return Ut;Kt=1;var e=Te(),t=Zt();const n={collection:"seq",default:!0,nodeClass:t.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:(t,n)=>(e.isSeq(t)||n("Expected a sequence for this tag"),t),createNode:(e,n,r)=>t.YAMLSeq.from(e,n,r)};return Ut.seq=n,Ut}var Wt,Jt={};function Vt(){if(Wt)return Jt;Wt=1;var e=vt();const t={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(t,n,r,s)=>(n=Object.assign({actualString:!0},n),e.stringifyString(t,n,r,s))};return Jt.string=t,Jt}var Yt,Qt={},Xt={};function en(){if(Yt)return Xt;Yt=1;var e=st();const t={identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new e.Scalar(null),stringify:({source:e},n)=>"string"==typeof e&&t.test.test(e)?e:n.options.nullStr};return Xt.nullTag=t,Xt}var tn,nn={};function rn(){if(tn)return nn;tn=1;var e=st();const t={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new e.Scalar("t"===t[0]||"T"===t[0]),stringify:({source:e,value:n},r)=>e&&t.test.test(e)&&n===("t"===e[0]||"T"===e[0])?e:n?r.options.trueStr:r.options.falseStr};return nn.boolTag=t,nn}var sn,on,an={},cn={};function un(){return sn||(sn=1,cn.stringifyNumber=function({format:e,minFractionDigits:t,tag:n,value:r}){if("bigint"==typeof r)return String(r);const s="number"==typeof r?r:Number(r);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let o=JSON.stringify(r);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(o)){let e=o.indexOf(".");e<0&&(e=o.length,o+=".");let n=t-(o.length-e-1);for(;n-- >0;)o+="0"}return o}),cn}function ln(){if(on)return an;on=1;var e=st(),t=un();const n={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]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:t.stringifyNumber},r={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){const n=Number(e.value);return isFinite(n)?n.toExponential():t.stringifyNumber(e)}},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const n=new e.Scalar(parseFloat(t)),r=t.indexOf(".");return-1!==r&&"0"===t[t.length-1]&&(n.minFractionDigits=t.length-r-1),n},stringify:t.stringifyNumber};return an.float=s,an.floatExp=r,an.floatNaN=n,an}var fn,pn={};function dn(){if(fn)return pn;fn=1;var e=un();const t=e=>"bigint"==typeof e||Number.isInteger(e),n=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function r(n,r,s){const{value:o}=n;return t(o)&&o>=0?s+o.toString(r):e.stringifyNumber(n)}const s={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>n(e,2,8,r),stringify:e=>r(e,8,"0o")},o={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>n(e,0,10,r),stringify:e.stringifyNumber},i={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>n(e,2,16,r),stringify:e=>r(e,16,"0x")};return pn.int=o,pn.intHex=i,pn.intOct=s,pn}var hn,mn={};var gn,yn={};var bn,vn={};function Dn(){if(bn)return vn;bn=1;var e=_,t=st(),n=vt();const r={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,n){if("function"==typeof e.Buffer)return e.Buffer.from(t,"base64");if("function"==typeof atob){const e=atob(t.replace(/[\n\r]/g,"")),n=new Uint8Array(e.length);for(let t=0;t<e.length;++t)n[t]=e.charCodeAt(t);return n}return n("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:r,type:s,value:o},i,a,c){if(!o)return"";const u=o;let l;if("function"==typeof e.Buffer)l=u instanceof e.Buffer?u.toString("base64"):e.Buffer.from(u.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<u.length;++t)e+=String.fromCharCode(u[t]);l=btoa(e)}}if(s??(s=t.Scalar.BLOCK_LITERAL),s!==t.Scalar.QUOTE_DOUBLE){const e=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),n=Math.ceil(l.length/e),r=new Array(n);for(let t=0,s=0;t<n;++t,s+=e)r[t]=l.substr(s,e);l=r.join(s===t.Scalar.BLOCK_LITERAL?"\n":" ")}return n.stringifyString({comment:r,type:s,value:l},i,a,c)}};return vn.binary=r,vn}var wn,_n,En={},kn={};function Sn(){if(wn)return kn;wn=1;var e=Te(),t=xt(),n=st(),r=Zt();function s(r,s){if(e.isSeq(r))for(let o=0;o<r.items.length;++o){let i=r.items[o];if(!e.isPair(i)){if(e.isMap(i)){i.items.length>1&&s("Each pair must have its own sequence indicator");const e=i.items[0]||new t.Pair(new n.Scalar(null));if(i.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${i.commentBefore}\n${e.key.commentBefore}`:i.commentBefore),i.comment){const t=e.value??e.key;t.comment=t.comment?`${i.comment}\n${t.comment}`:i.comment}i=e}r.items[o]=e.isPair(i)?i:new t.Pair(i)}}else s("Expected a sequence for this tag");return r}function o(e,n,s){const{replacer:o}=s,i=new r.YAMLSeq(e);i.tag="tag:yaml.org,2002:pairs";let a=0;if(n&&Symbol.iterator in Object(n))for(let e of n){let r,c;if("function"==typeof o&&(e=o.call(n,String(a++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);r=e[0],c=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);r=t[0],c=e[r]}else r=e;i.items.push(t.createPair(r,c,s))}return i}const i={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:s,createNode:o};return kn.createPairs=o,kn.pairs=i,kn.resolvePairs=s,kn}function An(){if(_n)return En;_n=1;var e=Te(),t=Je(),n=Bt(),r=Zt(),s=Sn();class o extends r.YAMLSeq{constructor(){super(),this.add=n.YAMLMap.prototype.add.bind(this),this.delete=n.YAMLMap.prototype.delete.bind(this),this.get=n.YAMLMap.prototype.get.bind(this),this.has=n.YAMLMap.prototype.has.bind(this),this.set=n.YAMLMap.prototype.set.bind(this),this.tag=o.tag}toJSON(n,r){if(!r)return super.toJSON(n);const s=new Map;r?.onCreate&&r.onCreate(s);for(const n of this.items){let o,i;if(e.isPair(n)?(o=t.toJS(n.key,"",r),i=t.toJS(n.value,o,r)):o=t.toJS(n,"",r),s.has(o))throw new Error("Ordered maps must not include duplicate keys");s.set(o,i)}return s}static from(e,t,n){const r=s.createPairs(e,t,n),o=new this;return o.items=r.items,o}}o.tag="tag:yaml.org,2002:omap";const i={collection:"seq",identify:e=>e instanceof Map,nodeClass:o,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,n){const r=s.resolvePairs(t,n),i=[];for(const{key:t}of r.items)e.isScalar(t)&&(i.includes(t.value)?n(`Ordered maps must not include duplicate keys: ${t.value}`):i.push(t.value));return Object.assign(new o,r)},createNode:(e,t,n)=>o.from(e,t,n)};return En.YAMLOMap=o,En.omap=i,En}var Cn,Pn={},On={};var Tn,xn={};var Nn,$n={};var Ln,Rn={};function Fn(){if(Ln)return Rn;Ln=1;var e=Te(),t=xt(),n=Bt();class r extends n.YAMLMap{constructor(e){super(e),this.tag=r.tag}add(r){let s;s=e.isPair(r)?r:r&&"object"==typeof r&&"key"in r&&"value"in r&&null===r.value?new t.Pair(r.key,null):new t.Pair(r,null),n.findPair(this.items,s.key)||this.items.push(s)}get(t,r){const s=n.findPair(this.items,t);return!r&&e.isPair(s)?e.isScalar(s.key)?s.key.value:s.key:s}set(e,r){if("boolean"!=typeof r)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof r);const s=n.findPair(this.items,e);s&&!r?this.items.splice(this.items.indexOf(s),1):!s&&r&&this.items.push(new t.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,n,r){const{replacer:s}=r,o=new this(e);if(n&&Symbol.iterator in Object(n))for(let e of n)"function"==typeof s&&(e=s.call(n,e,e)),o.items.push(t.createPair(e,null,r));return o}}r.tag="tag:yaml.org,2002:set";const s={collection:"map",identify:e=>e instanceof Set,nodeClass:r,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>r.from(e,t,n),resolve(t,n){if(e.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new r,t);n("Set items must all have null values")}else n("Expected a mapping for this tag");return t}};return Rn.YAMLSet=r,Rn.set=s,Rn}var In,Mn,jn,Bn,zn={};function Hn(){if(In)return zn;In=1;var e=un();function t(e,t){const n=e[0],r="-"===n||"+"===n?e.substring(1):e,s=e=>t?BigInt(e):Number(e),o=r.replace(/_/g,"").split(":").reduce((e,t)=>e*s(60)+s(t),s(0));return"-"===n?s(-1)*o:o}function n(t){let{value:n}=t,r=e=>e;if("bigint"==typeof n)r=e=>BigInt(e);else if(isNaN(n)||!isFinite(n))return e.stringifyNumber(t);let s="";n<0&&(s="-",n*=r(-1));const o=r(60),i=[n%o];return n<60?i.unshift(0):(n=(n-i[0])/o,i.unshift(n%o),n>=60&&(n=(n-i[0])/o,i.unshift(n))),s+i.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const r={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,n,{intAsBigInt:r})=>t(e,r),stringify:n},s={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=>t(e,!1),stringify:n},o={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){const n=e.match(o.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,s,i,a,c,u]=n.map(Number),l=n[7]?Number((n[7]+"00").substr(1,3)):0;let f=Date.UTC(r,s-1,i,a||0,c||0,u||0,l);const p=n[8];if(p&&"Z"!==p){let e=t(p,!1);Math.abs(e)<30&&(e*=60),f-=6e4*e}return new Date(f)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};return zn.floatTime=s,zn.intTime=r,zn.timestamp=o,zn}function Kn(){if(Mn)return Pn;Mn=1;var e=zt(),t=en(),n=Gt(),r=Vt(),s=Dn(),o=function(){if(Cn)return On;Cn=1;var e=st();function t({value:e,source:t},s){return t&&(e?n:r).test.test(t)?t:e?s.options.trueStr:s.options.falseStr}const n={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:()=>new e.Scalar(!0),stringify:t},r={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 e.Scalar(!1),stringify:t};return On.falseTag=r,On.trueTag=n,On}(),i=function(){if(Tn)return xn;Tn=1;var e=st(),t=un();const n={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]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:t.stringifyNumber},r={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){const n=Number(e.value);return isFinite(n)?n.toExponential():t.stringifyNumber(e)}},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const n=new e.Scalar(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(-1!==r){const e=t.substring(r+1).replace(/_/g,"");"0"===e[e.length-1]&&(n.minFractionDigits=e.length)}return n},stringify:t.stringifyNumber};return xn.float=s,xn.floatExp=r,xn.floatNaN=n,xn}(),a=function(){if(Nn)return $n;Nn=1;var e=un();const t=e=>"bigint"==typeof e||Number.isInteger(e);function n(e,t,n,{intAsBigInt:r}){const s=e[0];if("-"!==s&&"+"!==s||(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===s?BigInt(-1)*t:t}const o=parseInt(e,n);return"-"===s?-1*o:o}function r(n,r,s){const{value:o}=n;if(t(o)){const e=o.toString(r);return o<0?"-"+s+e.substr(1):s+e}return e.stringifyNumber(n)}const s={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>n(e,2,2,r),stringify:e=>r(e,2,"0b")},o={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>n(e,1,8,r),stringify:e=>r(e,8,"0")},i={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>n(e,0,10,r),stringify:e.stringifyNumber},a={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>n(e,2,16,r),stringify:e=>r(e,16,"0x")};return $n.int=i,$n.intBin=s,$n.intHex=a,$n.intOct=o,$n}(),c=Ot(),u=An(),l=Sn(),f=Fn(),p=Hn();const d=[e.map,n.seq,r.string,t.nullTag,o.trueTag,o.falseTag,a.intBin,a.intOct,a.int,a.intHex,i.floatNaN,i.floatExp,i.float,s.binary,c.merge,u.omap,l.pairs,f.set,p.intTime,p.floatTime,p.timestamp];return Pn.schema=d,Pn}function Un(){if(jn)return Qt;jn=1;var e=zt(),t=en(),n=Gt(),r=Vt(),s=rn(),o=ln(),i=dn(),a=function(){if(hn)return mn;hn=1;var e=zt(),t=en(),n=Gt(),r=Vt(),s=rn(),o=ln(),i=dn();const a=[e.map,n.seq,r.string,t.nullTag,s.boolTag,i.intOct,i.int,i.intHex,o.floatNaN,o.floatExp,o.float];return mn.schema=a,mn}(),c=function(){if(gn)return yn;gn=1;var e=st(),t=zt(),n=Gt();function r(e){return"bigint"==typeof e||Number.isInteger(e)}const s=({value:e})=>JSON.stringify(e),o=[{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:s},{identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:s},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:s},{identify:r,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})=>r(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:s}],i={default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)},a=[t.map,n.seq].concat(o,i);return yn.schema=a,yn}(),u=Dn(),l=Ot(),f=An(),p=Sn(),d=Kn(),h=Fn(),m=Hn();const g=new Map([["core",a.schema],["failsafe",[e.map,n.seq,r.string]],["json",c.schema],["yaml11",d.schema],["yaml-1.1",d.schema]]),y={binary:u.binary,bool:s.boolTag,float:o.float,floatExp:o.floatExp,floatNaN:o.floatNaN,floatTime:m.floatTime,int:i.int,intHex:i.intHex,intOct:i.intOct,intTime:m.intTime,map:e.map,merge:l.merge,null:t.nullTag,omap:f.omap,pairs:p.pairs,seq:n.seq,set:h.set,timestamp:m.timestamp},b={"tag:yaml.org,2002:binary":u.binary,"tag:yaml.org,2002:merge":l.merge,"tag:yaml.org,2002:omap":f.omap,"tag:yaml.org,2002:pairs":p.pairs,"tag:yaml.org,2002:set":h.set,"tag:yaml.org,2002:timestamp":m.timestamp};return Qt.coreKnownTags=b,Qt.getTags=function(e,t,n){const r=g.get(t);if(r&&!e)return n&&!r.includes(l.merge)?r.concat(l.merge):r.slice();let s=r;if(!s){if(!Array.isArray(e)){const e=Array.from(g.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}s=[]}if(Array.isArray(e))for(const t of e)s=s.concat(t);else"function"==typeof e&&(s=e(s.slice()));return n&&(s=s.concat(l.merge)),s.reduce((e,t)=>{const n="string"==typeof t?y[t]:t;if(!n){const e=JSON.stringify(t),n=Object.keys(y).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])},Qt}function qn(){if(Bn)return Rt;Bn=1;var e=Te(),t=zt(),n=Gt(),r=Vt(),s=Un();const o=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;return Rt.Schema=class i{constructor({compat:i,customTags:a,merge:c,resolveKnownTags:u,schema:l,sortMapEntries:f,toStringDefaults:p}){this.compat=Array.isArray(i)?s.getTags(i,"compat"):i?s.getTags(null,i):null,this.name="string"==typeof l&&l||"core",this.knownTags=u?s.coreKnownTags:{},this.tags=s.getTags(a,this.name,c),this.toStringOptions=p??null,Object.defineProperty(this,e.MAP,{value:t.map}),Object.defineProperty(this,e.SCALAR,{value:r.string}),Object.defineProperty(this,e.SEQ,{value:n.seq}),this.sortMapEntries="function"==typeof f?f:!0===f?o:null}clone(){const e=Object.create(i.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}},Rt}var Zn,Gn,Wn={};function Jn(){if(Gn)return Ie;Gn=1;var e=Ye(),t=it(),n=Te(),r=xt(),s=Je(),o=qn(),i=function(){if(Zn)return Wn;Zn=1;var e=Te(),t=Dt(),n=pt();return Wn.stringifyDocument=function(r,s){const o=[];let i=!0===s.directives;if(!1!==s.directives&&r.directives){const e=r.directives.toString(r);e?(o.push(e),i=!0):r.directives.docStart&&(i=!0)}i&&o.push("---");const a=t.createStringifyContext(r,s),{commentString:c}=a.options;if(r.commentBefore){1!==o.length&&o.unshift("");const e=c(r.commentBefore);o.unshift(n.indentComment(e,""))}let u=!1,l=null;if(r.contents){if(e.isNode(r.contents)){if(r.contents.spaceBefore&&i&&o.push(""),r.contents.commentBefore){const e=c(r.contents.commentBefore);o.push(n.indentComment(e,""))}a.forceBlockIndent=!!r.comment,l=r.contents.comment}const s=l?void 0:()=>u=!0;let f=t.stringify(r.contents,a,()=>l=null,s);l&&(f+=n.lineComment(f,"",c(l))),"|"!==f[0]&&">"!==f[0]||"---"!==o[o.length-1]?o.push(f):o[o.length-1]=`--- ${f}`}else o.push(t.stringify(r.contents,a));if(r.directives?.docEnd)if(r.comment){const e=c(r.comment);e.includes("\n")?(o.push("..."),o.push(n.indentComment(e,""))):o.push(`... ${e}`)}else o.push("...");else{let e=r.comment;e&&u&&(e=e.replace(/^\n+/,"")),e&&(u&&!l||""===o[o.length-1]||o.push(""),o.push(n.indentComment(c(e),"")))}return o.join("\n")+"\n"},Wn}(),a=Be(),c=Ue(),u=ot(),l=Re();function f(e){if(n.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}return Ie.Document=class p{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,n.NODE_TYPE,{value:n.DOC});let s=null;"function"==typeof t||Array.isArray(t)?s=t:void 0===r&&t&&(r=t,t=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=o;let{version:i}=o;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(i=this.directives.yaml.version)):this.directives=new l.Directives({version:i}),this.setSchema(i,r),this.contents=void 0===e?null:this.createNode(e,s,r)}clone(){const e=Object.create(p.prototype,{[n.NODE_TYPE]:{value:n.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=n.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){f(this.contents)&&this.contents.add(e)}addIn(e,t){f(this.contents)&&this.contents.addIn(e,t)}createAlias(t,n){if(!t.anchor){const e=a.anchorNames(this);t.anchor=!n||e.has(n)?a.findNewAnchor(n||"a",e):n}return new e.Alias(t.anchor)}createNode(e,t,r){let s;if("function"==typeof t)e=t.call({"":e},"",e),s=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,n=t.filter(e).map(String);n.length>0&&(t=t.concat(n)),s=t}else void 0===r&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:o,anchorPrefix:i,flow:c,keepUndefined:l,onTagObj:f,tag:p}=r??{},{onAnchor:d,setAnchors:h,sourceObjects:m}=a.createNodeAnchors(this,i||"a"),g={aliasDuplicateObjects:o??!0,keepUndefined:l??!1,onAnchor:d,onTagObj:f,replacer:s,schema:this.schema,sourceObjects:m},y=u.createNode(e,p,g);return c&&n.isCollection(y)&&(y.flow=!0),h(),y}createPair(e,t,n={}){const s=this.createNode(e,null,n),o=this.createNode(t,null,n);return new r.Pair(s,o)}delete(e){return!!f(this.contents)&&this.contents.delete(e)}deleteIn(e){return t.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):!!f(this.contents)&&this.contents.deleteIn(e)}get(e,t){return n.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,r){return t.isEmptyPath(e)?!r&&n.isScalar(this.contents)?this.contents.value:this.contents:n.isCollection(this.contents)?this.contents.getIn(e,r):void 0}has(e){return!!n.isCollection(this.contents)&&this.contents.has(e)}hasIn(e){return t.isEmptyPath(e)?void 0!==this.contents:!!n.isCollection(this.contents)&&this.contents.hasIn(e)}set(e,n){null==this.contents?this.contents=t.collectionFromPath(this.schema,[e],n):f(this.contents)&&this.contents.set(e,n)}setIn(e,n){t.isEmptyPath(e)?this.contents=n:null==this.contents?this.contents=t.collectionFromPath(this.schema,Array.from(e),n):f(this.contents)&&this.contents.setIn(e,n)}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.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new l.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const t=JSON.stringify(e);throw new 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)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new o.Schema(Object.assign(n,t))}}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:o,reviver:i}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},u=s.toJS(this.contents,t??"",a);if("function"==typeof o)for(const{count:e,res:t}of a.anchors.values())o(t,e);return"function"==typeof i?c.applyReviver(i,{"":u},"",u):u}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return i.stringifyDocument(this,e)}},Ie}var Vn,Yn={};function Qn(){if(Vn)return Yn;Vn=1;class e extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}}return Yn.YAMLError=e,Yn.YAMLParseError=class extends e{constructor(e,t,n){super("YAMLParseError",e,t,n)}},Yn.YAMLWarning=class extends e{constructor(e,t,n){super("YAMLWarning",e,t,n)}},Yn.prettifyError=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map(e=>t.linePos(e));const{line:r,col:s}=n.linePos[0];n.message+=` at line ${r}, column ${s}`;let o=s-1,i=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(o>=60&&i.length>80){const e=Math.min(o-39,i.length-79);i="…"+i.substring(e),o-=e-1}if(i.length>80&&(i=i.substring(0,79)+"…"),r>1&&/^ *$/.test(i.substring(0,o))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+"…\n"),i=n+i}if(/[^ ]/.test(i)){let e=1;const t=n.linePos[1];t&&t.line===r&&t.col>s&&(e=Math.max(1,Math.min(t.col-s,80-o)));const a=" ".repeat(o)+"^".repeat(e);n.message+=`:\n\n${i}\n${a}\n`}},Yn}var Xn,er={},tr={},nr={},rr={},sr={};function or(){return Xn||(Xn=1,sr.resolveProps=function(e,{flow:t,indicator:n,next:r,offset:s,onError:o,parentIndent:i,startOnNewline:a}){let c=!1,u=a,l=a,f="",p="",d=!1,h=!1,m=null,g=null,y=null,b=null,v=null,D=null,w=null;for(const s of e)switch(h&&("space"!==s.type&&"newline"!==s.type&&"comma"!==s.type&&o(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),m&&(u&&"comment"!==s.type&&"newline"!==s.type&&o(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),s.type){case"space":t||"doc-start"===n&&"flow-collection"===r?.type||!s.source.includes("\t")||(m=s),l=!0;break;case"comment":{l||o(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=s.source.substring(1)||" ";f?f+=p+e:f=e,p="",u=!1;break}case"newline":u?f?f+=s.source:D&&"seq-item-ind"===n||(c=!0):p+=s.source,u=!0,d=!0,(g||y)&&(b=s),l=!0;break;case"anchor":g&&o(s,"MULTIPLE_ANCHORS","A node can have at most one anchor"),s.source.endsWith(":")&&o(s.offset+s.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=s,w??(w=s.offset),u=!1,l=!1,h=!0;break;case"tag":y&&o(s,"MULTIPLE_TAGS","A node can have at most one tag"),y=s,w??(w=s.offset),u=!1,l=!1,h=!0;break;case n:(g||y)&&o(s,"BAD_PROP_ORDER",`Anchors and tags must be after the ${s.source} indicator`),D&&o(s,"UNEXPECTED_TOKEN",`Unexpected ${s.source} in ${t??"collection"}`),D=s,u="seq-item-ind"===n||"explicit-key-ind"===n,l=!1;break;case"comma":if(t){v&&o(s,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),v=s,u=!1,l=!1;break}default:o(s,"UNEXPECTED_TOKEN",`Unexpected ${s.type} token`),u=!1,l=!1}const _=e[e.length-1],E=_?_.offset+_.source.length:s;return h&&r&&"space"!==r.type&&"newline"!==r.type&&"comma"!==r.type&&("scalar"!==r.type||""!==r.source)&&o(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(u&&m.indent<=i||"block-map"===r?.type||"block-seq"===r?.type)&&o(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:D,spaceBefore:c,comment:f,hasNewline:d,anchor:g,tag:y,newlineAfterProp:b,end:E,start:w??E}}),sr}var ir,ar={};function cr(){return ir||(ir=1,ar.containsNewline=function e(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes("\n"))return!0;if(t.end)for(const e of t.end)if("newline"===e.type)return!0;return!1;case"flow-collection":for(const n of t.items){for(const e of n.start)if("newline"===e.type)return!0;if(n.sep)for(const e of n.sep)if("newline"===e.type)return!0;if(e(n.key)||e(n.value))return!0}return!1;default:return!0}}),ar}var ur,lr={};function fr(){if(ur)return lr;ur=1;var e=cr();return lr.flowIndentCheck=function(t,n,r){if("flow-collection"===n?.type){const s=n.end[0];s.indent!==t||"]"!==s.source&&"}"!==s.source||!e.containsNewline(n)||r(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}},lr}var pr,dr,hr={};function mr(){if(pr)return hr;pr=1;var e=Te();return hr.mapIncludes=function(t,n,r){const{uniqueKeys:s}=t.options;if(!1===s)return!1;const o="function"==typeof s?s:(t,n)=>t===n||e.isScalar(t)&&e.isScalar(n)&&t.value===n.value;return n.some(e=>o(e.key,r))},hr}var gr,yr={};var br,vr,Dr,wr={},_r={};function Er(){return br||(br=1,_r.resolveEnd=function(e,t,n,r){let s="";if(e){let o=!1,i="";for(const a of e){const{source:e,type:c}=a;switch(c){case"space":o=!0;break;case"comment":{n&&!o&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";s?s+=i+t:s=t,i="";break}case"newline":s&&(i+=e),o=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=e.length}}return{comment:s,offset:t}}),_r}function kr(){if(Dr)return nr;Dr=1;var e=Te(),t=st(),n=Bt(),r=Zt(),s=function(){if(dr)return rr;dr=1;var e=xt(),t=Bt(),n=or(),r=cr(),s=fr(),o=mr();const i="All mapping items must start at the same column";return rr.resolveBlockMap=function({composeNode:a,composeEmptyNode:c},u,l,f,p){const d=new(p?.nodeClass??t.YAMLMap)(u.schema);u.atRoot&&(u.atRoot=!1);let h=l.offset,m=null;for(const t of l.items){const{start:p,key:g,sep:y,value:b}=t,v=n.resolveProps(p,{indicator:"explicit-key-ind",next:g??y?.[0],offset:h,onError:f,parentIndent:l.indent,startOnNewline:!0}),D=!v.found;if(D){if(g&&("block-seq"===g.type?f(h,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in g&&g.indent!==l.indent&&f(h,"BAD_INDENT",i)),!v.anchor&&!v.tag&&!y){m=v.end,v.comment&&(d.comment?d.comment+="\n"+v.comment:d.comment=v.comment);continue}(v.newlineAfterProp||r.containsNewline(g))&&f(g??p[p.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else v.found?.indent!==l.indent&&f(h,"BAD_INDENT",i);u.atKey=!0;const w=v.end,_=g?a(u,g,v,f):c(u,w,p,null,v,f);u.schema.compat&&s.flowIndentCheck(l.indent,g,f),u.atKey=!1,o.mapIncludes(u,d.items,_)&&f(w,"DUPLICATE_KEY","Map keys must be unique");const E=n.resolveProps(y??[],{indicator:"map-value-ind",next:b,offset:_.range[2],onError:f,parentIndent:l.indent,startOnNewline:!g||"block-scalar"===g.type});if(h=E.end,E.found){D&&("block-map"!==b?.type||E.hasNewline||f(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),u.options.strict&&v.start<E.found.offset-1024&&f(_.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const n=b?a(u,b,E,f):c(u,h,y,null,E,f);u.schema.compat&&s.flowIndentCheck(l.indent,b,f),h=n.range[2];const r=new e.Pair(_,n);u.options.keepSourceTokens&&(r.srcToken=t),d.items.push(r)}else{D&&f(_.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),E.comment&&(_.comment?_.comment+="\n"+E.comment:_.comment=E.comment);const n=new e.Pair(_);u.options.keepSourceTokens&&(n.srcToken=t),d.items.push(n)}}return m&&m<h&&f(m,"IMPOSSIBLE","Map comment with trailing content"),d.range=[l.offset,h,m??h],d},rr}(),o=function(){if(gr)return yr;gr=1;var e=Zt(),t=or(),n=fr();return yr.resolveBlockSeq=function({composeNode:r,composeEmptyNode:s},o,i,a,c){const u=new(c?.nodeClass??e.YAMLSeq)(o.schema);o.atRoot&&(o.atRoot=!1),o.atKey&&(o.atKey=!1);let l=i.offset,f=null;for(const{start:e,value:c}of i.items){const p=t.resolveProps(e,{indicator:"seq-item-ind",next:c,offset:l,onError:a,parentIndent:i.indent,startOnNewline:!0});if(!p.found){if(!(p.anchor||p.tag||c)){f=p.end,p.comment&&(u.comment=p.comment);continue}c&&"block-seq"===c.type?a(p.end,"BAD_INDENT","All sequence items must start at the same column"):a(l,"MISSING_CHAR","Sequence item without - indicator")}const d=c?r(o,c,p,a):s(o,p.end,e,null,p,a);o.schema.compat&&n.flowIndentCheck(i.indent,c,a),l=d.range[2],u.items.push(d)}return u.range=[i.offset,l,f??l],u},yr}(),i=function(){if(vr)return wr;vr=1;var e=Te(),t=xt(),n=Bt(),r=Zt(),s=Er(),o=or(),i=cr(),a=mr();const c="Block collections are not allowed within flow collections",u=e=>e&&("block-map"===e.type||"block-seq"===e.type);return wr.resolveFlowCollection=function({composeNode:l,composeEmptyNode:f},p,d,h,m){const g="{"===d.start.source,y=g?"flow map":"flow sequence",b=new(m?.nodeClass??(g?n.YAMLMap:r.YAMLSeq))(p.schema);b.flow=!0;const v=p.atRoot;v&&(p.atRoot=!1),p.atKey&&(p.atKey=!1);let D=d.offset+d.start.source.length;for(let r=0;r<d.items.length;++r){const s=d.items[r],{start:m,key:v,sep:w,value:_}=s,E=o.resolveProps(m,{flow:y,indicator:"explicit-key-ind",next:v??w?.[0],offset:D,onError:h,parentIndent:d.indent,startOnNewline:!1});if(!E.found){if(!(E.anchor||E.tag||w||_)){0===r&&E.comma?h(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`):r<d.items.length-1&&h(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${y}`),E.comment&&(b.comment?b.comment+="\n"+E.comment:b.comment=E.comment),D=E.end;continue}!g&&p.options.strict&&i.containsNewline(v)&&h(v,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===r)E.comma&&h(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`);else if(E.comma||h(E.start,"MISSING_CHAR",`Missing , between ${y} items`),E.comment){let t="";e:for(const e of m)switch(e.type){case"comma":case"space":break;case"comment":t=e.source.substring(1);break e;default:break e}if(t){let n=b.items[b.items.length-1];e.isPair(n)&&(n=n.value??n.key),n.comment?n.comment+="\n"+t:n.comment=t,E.comment=E.comment.substring(t.length+1)}}if(g||w||E.found){p.atKey=!0;const e=E.end,r=v?l(p,v,E,h):f(p,e,m,null,E,h);u(v)&&h(r.range,"BLOCK_IN_FLOW",c),p.atKey=!1;const i=o.resolveProps(w??[],{flow:y,indicator:"map-value-ind",next:_,offset:r.range[2],onError:h,parentIndent:d.indent,startOnNewline:!1});if(i.found){if(!g&&!E.found&&p.options.strict){if(w)for(const e of w){if(e===i.found)break;if("newline"===e.type){h(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}E.start<i.found.offset-1024&&h(i.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else _&&("source"in _&&_.source&&":"===_.source[0]?h(_,"MISSING_CHAR",`Missing space after : in ${y}`):h(i.start,"MISSING_CHAR",`Missing , or : between ${y} items`));const k=_?l(p,_,i,h):i.found?f(p,i.end,w,null,i,h):null;k?u(_)&&h(k.range,"BLOCK_IN_FLOW",c):i.comment&&(r.comment?r.comment+="\n"+i.comment:r.comment=i.comment);const S=new t.Pair(r,k);if(p.options.keepSourceTokens&&(S.srcToken=s),g){const t=b;a.mapIncludes(p,t.items,r)&&h(e,"DUPLICATE_KEY","Map keys must be unique"),t.items.push(S)}else{const e=new n.YAMLMap(p.schema);e.flow=!0,e.items.push(S);const t=(k??r).range;e.range=[r.range[0],t[1],t[2]],b.items.push(e)}D=k?k.range[2]:i.end}else{const e=_?l(p,_,E,h):f(p,E.end,w,null,E,h);b.items.push(e),D=e.range[2],u(_)&&h(e.range,"BLOCK_IN_FLOW",c)}}const w=g?"}":"]",[_,...E]=d.end;let k=D;if(_&&_.source===w)k=_.offset+_.source.length;else{const e=y[0].toUpperCase()+y.substring(1);h(D,v?"MISSING_CHAR":"BAD_INDENT",v?`${e} must end with a ${w}`:`${e} in block collection must be sufficiently indented and end with a ${w}`),_&&1!==_.source.length&&E.unshift(_)}if(E.length>0){const e=s.resolveEnd(E,k,p.options.strict,h);e.comment&&(b.comment?b.comment+="\n"+e.comment:b.comment=e.comment),b.range=[d.offset,k,e.offset]}else b.range=[d.offset,k,k];return b},wr}();function a(e,t,n,r,a,c){const u="block-map"===n.type?s.resolveBlockMap(e,t,n,r,c):"block-seq"===n.type?o.resolveBlockSeq(e,t,n,r,c):i.resolveFlowCollection(e,t,n,r,c),l=u.constructor;return"!"===a||a===l.tagName?(u.tag=l.tagName,u):(a&&(u.tag=a),u)}return nr.composeCollection=function(s,o,i,c,u){const l=c.tag,f=l?o.directives.tagName(l.source,e=>u(l,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===i.type){const{anchor:e,newlineAfterProp:t}=c,n=e&&l?e.offset>l.offset?e:l:e??l;n&&(!t||t.offset<n.offset)&&u(n,"MISSING_CHAR","Missing newline after block sequence props")}const p="block-map"===i.type?"map":"block-seq"===i.type?"seq":"{"===i.start.source?"map":"seq";if(!l||!f||"!"===f||f===n.YAMLMap.tagName&&"map"===p||f===r.YAMLSeq.tagName&&"seq"===p)return a(s,o,i,u,f);let d=o.schema.tags.find(e=>e.tag===f&&e.collection===p);if(!d){const e=o.schema.knownTags[f];if(!e||e.collection!==p)return e?u(l,"BAD_COLLECTION_TYPE",`${e.tag} used for ${p} collection, but expects ${e.collection??"scalar"}`,!0):u(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${f}`,!0),a(s,o,i,u,f);o.schema.tags.push(Object.assign({},e,{default:!1})),d=e}const h=a(s,o,i,u,f,d),m=d.resolve?.(h,e=>u(l,"TAG_RESOLVE_FAILED",e),o.options)??h,g=e.isNode(m)?m:new t.Scalar(m);return g.range=h.range,g.tag=f,d?.format&&(g.format=d.format),g},nr}var Sr,Ar={},Cr={};function Pr(){if(Sr)return Cr;Sr=1;var e=st();return Cr.resolveBlockScalar=function(t,n,r){const s=n.offset,o=function({offset:e,props:t},n,r){if("block-scalar-header"!==t[0].type)return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=t[0],o=s[0];let i=0,a="",c=-1;for(let t=1;t<s.length;++t){const n=s[t];if(a||"-"!==n&&"+"!==n){const r=Number(n);!i&&r?i=r:-1===c&&(c=e+t)}else a=n}-1!==c&&r(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let u=!1,l="",f=s.length;for(let e=1;e<t.length;++e){const s=t[e];switch(s.type){case"space":u=!0;case"newline":f+=s.source.length;break;case"comment":n&&!u&&r(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=s.source.length,l=s.source.substring(1);break;case"error":r(s,"UNEXPECTED_TOKEN",s.message),f+=s.source.length;break;default:{r(s,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${s.type}`);const e=s.source;e&&"string"==typeof e&&(f+=e.length)}}}return{mode:o,indent:i,chomp:a,comment:l,length:f}}(n,t.options.strict,r);if(!o)return{value:"",type:null,comment:"",range:[s,s,s]};const i=">"===o.mode?e.Scalar.BLOCK_FOLDED:e.Scalar.BLOCK_LITERAL,a=n.source?function(e){const t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),s=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let e=1;e<t.length;e+=2)s.push([t[e],t[e+1]]);return s}(n.source):[];let c=a.length;for(let e=a.length-1;e>=0;--e){const t=a[e][1];if(""!==t&&"\r"!==t)break;c=e}if(0===c){const e="+"===o.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let t=s+o.length;return n.source&&(t+=n.source.length),{value:e,type:i,comment:o.comment,range:[s,t,t]}}let u=n.indent+o.indent,l=n.offset+o.length,f=0;for(let e=0;e<c;++e){const[n,s]=a[e];if(""!==s&&"\r"!==s){if(n.length<u){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";r(l+n.length,"MISSING_CHAR",e)}0===o.indent&&(u=n.length),f=e,0!==u||t.atRoot||r(l,"BAD_INDENT","Block scalar values in collections must be indented");break}0===o.indent&&n.length>u&&(u=n.length),l+=n.length+s.length+1}for(let e=a.length-1;e>=c;--e)a[e][0].length>u&&(c=e+1);let p="",d="",h=!1;for(let e=0;e<f;++e)p+=a[e][0].slice(u)+"\n";for(let t=f;t<c;++t){let[n,s]=a[t];l+=n.length+s.length+1;const c="\r"===s[s.length-1];if(c&&(s=s.slice(0,-1)),s&&n.length<u){const e="Block scalar lines must not be less indented than their "+(o.indent?"explicit indentation indicator":"first line");r(l-s.length-(c?2:1),"BAD_INDENT",e),n=""}i===e.Scalar.BLOCK_LITERAL?(p+=d+n.slice(u)+s,d="\n"):n.length>u||"\t"===s[0]?(" "===d?d="\n":h||"\n"!==d||(d="\n\n"),p+=d+n.slice(u)+s,d="\n",h=!0):""===s?"\n"===d?p+="\n":d="\n":(p+=d+s,d=" ",h=!1)}switch(o.chomp){case"-":break;case"+":for(let e=c;e<a.length;++e)p+="\n"+a[e][0].slice(u);"\n"!==p[p.length-1]&&(p+="\n");break;default:p+="\n"}const m=s+o.length+n.source.length;return{value:p,type:i,comment:o.comment,range:[s,m,m]}},Cr}var Or,Tr,xr={};function Nr(){if(Or)return xr;Or=1;var e=st(),t=Er();function n(e){let t,n;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy"),n=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let s=r[1],o=" ",i=t.lastIndex;for(n.lastIndex=i;r=n.exec(e);)""===r[1]?"\n"===o?s+=o:o="\n":(s+=o+r[1],o=" "),i=n.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=i,r=a.exec(e),s+o+(r?.[1]??"")}function r(e,t){let n="",r=e[t+1];for(;!(" "!==r&&"\t"!==r&&"\n"!==r&&"\r"!==r||"\r"===r&&"\n"!==e[t+2]);)"\n"===r&&(n+="\n"),r=e[(t+=1)+1];return n||(n=" "),{fold:n,offset:t}}const s={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function o(e,t,n,r){const s=e.substr(t,n),o=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;if(isNaN(o)){const s=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}return String.fromCodePoint(o)}return xr.resolveFlowScalar=function(i,a,c){const{offset:u,type:l,source:f,end:p}=i;let d,h;const m=(e,t,n)=>c(u+e,t,n);switch(l){case"scalar":d=e.Scalar.PLAIN,h=function(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),n(e)}(f,m);break;case"single-quoted-scalar":d=e.Scalar.QUOTE_SINGLE,h=function(e,t){return"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote"),n(e.slice(1,-1)).replace(/''/g,"'")}(f,m);break;case"double-quoted-scalar":d=e.Scalar.QUOTE_DOUBLE,h=function(e,t){let n="";for(let i=1;i<e.length-1;++i){const a=e[i];if("\r"!==a||"\n"!==e[i+1])if("\n"===a){const{fold:t,offset:s}=r(e,i);n+=t,i=s}else if("\\"===a){let r=e[++i];const a=s[r];if(a)n+=a;else if("\n"===r)for(r=e[i+1];" "===r||"\t"===r;)r=e[1+ ++i];else if("\r"===r&&"\n"===e[i+1])for(r=e[1+ ++i];" "===r||"\t"===r;)r=e[1+ ++i];else if("x"===r||"u"===r||"U"===r){const s={x:2,u:4,U:8}[r];n+=o(e,i+1,s,t),i+=s}else{const r=e.substr(i-1,2);t(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${r}`),n+=r}}else if(" "===a||"\t"===a){const t=i;let r=e[i+1];for(;" "===r||"\t"===r;)r=e[1+ ++i];"\n"===r||"\r"===r&&"\n"===e[i+2]||(n+=i>t?e.slice(t,i+1):a)}else n+=a}return'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}(f,m);break;default:return c(i,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[u,u+f.length,u+f.length]}}const g=u+f.length,y=t.resolveEnd(p,g,a,c);return{value:h,type:d,comment:y.comment,range:[u,g,y.offset]}},xr}var $r,Lr,Rr,Fr,Ir={};function Mr(){if(Lr)return tr;Lr=1;var e=Ye(),t=Te(),n=kr(),r=function(){if(Tr)return Ar;Tr=1;var e=Te(),t=st(),n=Pr(),r=Nr();return Ar.composeScalar=function(s,o,i,a){const{value:c,type:u,comment:l,range:f}="block-scalar"===o.type?n.resolveBlockScalar(s,o,a):r.resolveFlowScalar(o,s.options.strict,a),p=i?s.directives.tagName(i.source,e=>a(i,"TAG_RESOLVE_FAILED",e)):null;let d,h;d=s.options.stringKeys&&s.atKey?s.schema[e.SCALAR]:p?function(t,n,r,s,o){if("!"===r)return t[e.SCALAR];const i=[];for(const e of t.tags)if(!e.collection&&e.tag===r){if(!e.default||!e.test)return e;i.push(e)}for(const e of i)if(e.test?.test(n))return e;const a=t.knownTags[r];return a&&!a.collection?(t.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(o(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,"tag:yaml.org,2002:str"!==r),t[e.SCALAR])}(s.schema,c,p,i,a):"scalar"===o.type?function({atKey:t,directives:n,schema:r},s,o,i){const a=r.tags.find(e=>(!0===e.default||t&&"key"===e.default)&&e.test?.test(s))||r[e.SCALAR];if(r.compat){const t=r.compat.find(e=>e.default&&e.test?.test(s))??r[e.SCALAR];a.tag!==t.tag&&i(o,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${n.tagString(a.tag)} or ${n.tagString(t.tag)}`,!0)}return a}(s,c,o,a):s.schema[e.SCALAR];try{const n=d.resolve(c,e=>a(i??o,"TAG_RESOLVE_FAILED",e),s.options);h=e.isScalar(n)?n:new t.Scalar(n)}catch(e){const n=e instanceof Error?e.message:String(e);a(i??o,"TAG_RESOLVE_FAILED",n),h=new t.Scalar(c)}return h.range=f,h.source=c,u&&(h.type=u),p&&(h.tag=p),d.format&&(h.format=d.format),l&&(h.comment=l),h},Ar}(),s=Er(),o=($r||($r=1,Ir.emptyScalarPosition=function(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++r];"space"===n?.type;)e+=n.source.length,n=t[++r];break}}return e}),Ir);const i={composeNode:a,composeEmptyNode:c};function a(o,a,u,l){const f=o.atKey,{spaceBefore:p,comment:d,anchor:h,tag:m}=u;let g,y=!0;switch(a.type){case"alias":g=function({options:t},{offset:n,source:r,end:o},i){const a=new e.Alias(r.substring(1));""===a.source&&i(n,"BAD_ALIAS","Alias cannot be an empty string"),a.source.endsWith(":")&&i(n+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=n+r.length,u=s.resolveEnd(o,c,t.strict,i);return a.range=[n,c,u.offset],u.comment&&(a.comment=u.comment),a}(o,a,l),(h||m)&&l(a,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":g=r.composeScalar(o,a,m,l),h&&(g.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":g=n.composeCollection(i,o,a,u,l),h&&(g.anchor=h.source.substring(1));break;default:l(a,"UNEXPECTED_TOKEN","error"===a.type?a.message:`Unsupported token (type: ${a.type})`),g=c(o,a.offset,void 0,null,u,l),y=!1}return h&&""===g.anchor&&l(h,"BAD_ALIAS","Anchor cannot be an empty string"),f&&o.options.stringKeys&&(!t.isScalar(g)||"string"!=typeof g.value||g.tag&&"tag:yaml.org,2002:str"!==g.tag)&&l(m??a,"NON_STRING_KEY","With stringKeys, all keys must be strings"),p&&(g.spaceBefore=!0),d&&("scalar"===a.type&&""===a.source?g.comment=d:g.commentBefore=d),o.options.keepSourceTokens&&y&&(g.srcToken=a),g}function c(e,t,n,s,{spaceBefore:i,comment:a,anchor:c,tag:u,end:l},f){const p={type:"scalar",offset:o.emptyScalarPosition(t,n,s),indent:-1,source:""},d=r.composeScalar(e,p,u,f);return c&&(d.anchor=c.source.substring(1),""===d.anchor&&f(c,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(d.spaceBefore=!0),a&&(d.comment=a,d.range[2]=l),d}return tr.composeEmptyNode=c,tr.composeNode=a,tr}function jr(){if(Fr)return Ce;Fr=1;var e=w,t=Re(),n=Jn(),r=Qn(),s=Te(),o=function(){if(Rr)return er;Rr=1;var e=Jn(),t=Mr(),n=Er(),r=or();return er.composeDoc=function(s,o,{offset:i,start:a,value:c,end:u},l){const f=Object.assign({_directives:o},s),p=new e.Document(void 0,f),d={atKey:!1,atRoot:!0,directives:p.directives,options:p.options,schema:p.schema},h=r.resolveProps(a,{indicator:"doc-start",next:c??u?.[0],offset:i,onError:l,parentIndent:0,startOnNewline:!0});h.found&&(p.directives.docStart=!0,!c||"block-map"!==c.type&&"block-seq"!==c.type||h.hasNewline||l(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),p.contents=c?t.composeNode(d,c,h,l):t.composeEmptyNode(d,h.end,a,null,h,l);const m=p.contents.range[2],g=n.resolveEnd(u,m,!1,l);return g.comment&&(p.comment=g.comment),p.range=[i,m,g.offset],p},er}(),i=Er();function a(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+("string"==typeof n?n.length:1)]}function c(e){let t="",n=!1,r=!1;for(let s=0;s<e.length;++s){const o=e[s];switch(o[0]){case"#":t+=(""===t?"":r?"\n\n":"\n")+(o.substring(1)||" "),n=!0,r=!1;break;case"%":"#"!==e[s+1]?.[0]&&(s+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}return Ce.Composer=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,s)=>{const o=a(e);s?this.warnings.push(new r.YAMLWarning(o,t,n)):this.errors.push(new r.YAMLParseError(o,t,n))},this.directives=new t.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:r}=c(this.prelude);if(n){const o=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!o)e.commentBefore=n;else if(s.isCollection(o)&&!o.flow&&o.items.length>0){let e=o.items[0];s.isPair(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{const e=o.commentBefore;o.commentBefore=e?`${n}\n${e}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:c(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(const t of e)yield*this.next(t);yield*this.end(t,n)}*next(t){switch(e.env.LOG_STREAM&&console.dir(t,{depth:null}),t.type){case"directive":this.directives.add(t.source,(e,n,r)=>{const s=a(t);s[0]+=e,this.onError(s,"BAD_DIRECTIVE",n,r)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const e=o.composeDoc(this.options,this.directives,t,this.onError);this.atDirectives&&!e.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(e,!1),this.doc&&(yield this.doc),this.doc=e,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const e=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,n=new r.YAMLParseError(a(t),"UNEXPECTED_TOKEN",e);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const e="Unexpected doc-end without preceding document";this.errors.push(new r.YAMLParseError(a(t),"UNEXPECTED_TOKEN",e));break}this.doc.directives.docEnd=!0;const e=i.resolveEnd(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),e.comment){const t=this.doc.comment;this.doc.comment=t?`${t}\n${e.comment}`:e.comment}this.doc.range[2]=e.offset;break}default:this.errors.push(new r.YAMLParseError(a(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),r=new n.Document(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}},Ce}var Br,zr={},Hr={};var Kr,Ur={};var qr,Zr,Gr={};function Wr(){if(Zr)return zr;Zr=1;var e=function(){if(Br)return Hr;Br=1;var e=Pr(),t=Nr(),n=Qn(),r=vt();function s(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function o(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const r=e.props.slice(1);let s=t.length;"block-scalar-header"===e.props[0].type&&(s-=e.props[0].source.length);for(const e of r)e.offset+=s;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{const r={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:n,source:t,end:[r]});break}default:{const r="indent"in e?e.indent:-1,s="end"in e&&Array.isArray(e.end)?e.end.filter(e=>"space"===e.type||"comment"===e.type||"newline"===e.type):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:n,indent:r,source:t,end:s})}}}return Hr.createScalarToken=function(e,t){const{implicitKey:n=!1,indent:o,inFlow:i=!1,offset:a=-1,type:c="PLAIN"}=t,u=r.stringifyString({type:c,value:e},{implicitKey:n,indent:o>0?" ".repeat(o):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:o,source:"\n"}];switch(u[0]){case"|":case">":{const e=u.indexOf("\n"),t=u.substring(0,e),n=u.substring(e+1)+"\n",r=[{type:"block-scalar-header",offset:a,indent:o,source:t}];return s(r,l)||r.push({type:"newline",offset:-1,indent:o,source:"\n"}),{type:"block-scalar",offset:a,indent:o,props:r,source:n}}case'"':return{type:"double-quoted-scalar",offset:a,indent:o,source:u,end:l};case"'":return{type:"single-quoted-scalar",offset:a,indent:o,source:u,end:l};default:return{type:"scalar",offset:a,indent:o,source:u,end:l}}},Hr.resolveAsScalar=function(r,s=!0,o){if(r){const i=(e,t,r)=>{const s="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!o)throw new n.YAMLParseError([s,s+1],t,r);o(s,t,r)};switch(r.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return t.resolveFlowScalar(r,s,i);case"block-scalar":return e.resolveBlockScalar({options:{strict:s}},r,i)}}return null},Hr.setScalarValue=function(e,t,n={}){let{afterKey:i=!1,implicitKey:a=!1,inFlow:c=!1,type:u}=n,l="indent"in e?e.indent:null;if(i&&"number"==typeof l&&(l+=2),!u)switch(e.type){case"single-quoted-scalar":u="QUOTE_SINGLE";break;case"double-quoted-scalar":u="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");u=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:u="PLAIN"}const f=r.stringifyString({type:u,value:t},{implicitKey:a||null===l,indent:null!==l&&l>0?" ".repeat(l):"",inFlow:c,options:{blockQuote:!0,lineWidth:-1}});switch(f[0]){case"|":case">":!function(e,t){const n=t.indexOf("\n"),r=t.substring(0,n),o=t.substring(n+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=r,e.source=o}else{const{offset:t}=e,n="indent"in e?e.indent:-1,i=[{type:"block-scalar-header",offset:t,indent:n,source:r}];s(i,"end"in e?e.end:void 0)||i.push({type:"newline",offset:-1,indent:n,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:n,props:i,source:o})}}(e,f);break;case'"':o(e,f,"double-quoted-scalar");break;case"'":o(e,f,"single-quoted-scalar");break;default:o(e,f,"scalar")}},Hr}(),t=function(){if(Kr)return Ur;function e(n){switch(n.type){case"block-scalar":{let t="";for(const r of n.props)t+=e(r);return t+n.source}case"block-map":case"block-seq":{let e="";for(const r of n.items)e+=t(r);return e}case"flow-collection":{let e=n.start.source;for(const r of n.items)e+=t(r);for(const t of n.end)e+=t.source;return e}case"document":{let e=t(n);if(n.end)for(const t of n.end)e+=t.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(const t of n.end)e+=t.source;return e}}}function t({start:t,key:n,sep:r,value:s}){let o="";for(const e of t)o+=e.source;if(n&&(o+=e(n)),r)for(const e of r)o+=e.source;return s&&(o+=e(s)),o}return Kr=1,Ur.stringify=n=>"type"in n?e(n):t(n),Ur}(),n=function(){if(qr)return Gr;qr=1;const e=Symbol("break visit"),t=Symbol("skip children"),n=Symbol("remove item");function r(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),s(Object.freeze([]),e,t)}function s(t,r,o){let i=o(r,t);if("symbol"==typeof i)return i;for(const a of["key","value"]){const c=r[a];if(c&&"items"in c){for(let r=0;r<c.items.length;++r){const i=s(Object.freeze(t.concat([[a,r]])),c.items[r],o);if("number"==typeof i)r=i-1;else{if(i===e)return e;i===n&&(c.items.splice(r,1),r-=1)}}"function"==typeof i&&"key"===a&&(i=i(r,t))}}return"function"==typeof i?i(r,t):i}return r.BREAK=e,r.SKIP=t,r.REMOVE=n,r.itemAtPath=(e,t)=>{let n=e;for(const[e,r]of t){const t=n?.[e];if(!t||!("items"in t))return;n=t.items[r]}return n},r.parentCollection=(e,t)=>{const n=r.itemAtPath(e,t.slice(0,-1)),s=t[t.length-1][0],o=n?.[s];if(o&&"items"in o)return o;throw new Error("Parent collection not found")},Gr.visit=r,Gr}();return zr.createScalarToken=e.createScalarToken,zr.resolveAsScalar=e.resolveAsScalar,zr.setScalarValue=e.setScalarValue,zr.stringify=t.stringify,zr.visit=n.visit,zr.BOM="\ufeff",zr.DOCUMENT="",zr.FLOW_END="",zr.SCALAR="",zr.isCollection=e=>!!e&&"items"in e,zr.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),zr.prettyToken=function(e){switch(e){case"\ufeff":return"<BOM>";case"":return"<DOC>";case"":return"<FLOW_END>";case"":return"<SCALAR>";default:return JSON.stringify(e)}},zr.tokenType=function(e){switch(e){case"\ufeff":return"byte-order-mark";case"":return"doc-mode";case"":return"flow-error-end";case"":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"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null},zr}var Jr,Vr={};function Yr(){if(Jr)return Vr;Jr=1;var e=Wr();function t(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const n=new Set("0123456789ABCDEFabcdef"),r=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),s=new Set(",[]{}"),o=new Set(" ,[]{}\n\r\t"),i=e=>!e||o.has(e);return Vr.Lexer=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("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;)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 n=this.buffer[e];if(this.indentNext>0){let t=0;for(;" "===n;)n=this.buffer[++t+e];if("\r"===n){const n=this.buffer[t+e+1];if("\n"===n||!n&&!this.atEnd)return e+t+1}return"\n"===n||t>=this.indentNext||!n&&!this.atEnd?e+t:-1}if("-"===n||"."===n){const n=this.buffer.substr(e,3);if(("---"===n||"..."===n)&&t(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 t=this.getLine();if(null===t)return this.setNext("stream");if(t[0]===e.BOM&&(yield*this.pushCount(1),t=t.substring(1)),"%"===t[0]){let e=t.length,n=t.indexOf("#");for(;-1!==n;){const r=t[n-1];if(" "===r||"\t"===r){e=n-1;break}n=t.indexOf("#",n+1)}for(;;){const n=t[e-1];if(" "!==n&&"\t"!==n)break;e-=1}const r=(yield*this.pushCount(e))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){const e=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-e),yield*this.pushNewline(),"stream"}return yield e.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){const 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");const e=this.peek(3);if(("---"===e||"..."===e)&&t(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&&!t(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&t(n)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const 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(i),"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 n,r,s=-1;do{n=yield*this.pushNewline(),n>0?(r=yield*this.pushSpaces(!1),this.indentValue=s=r):r=0,r+=(yield*this.pushSpaces(!0))}while(n+r>0);const o=this.getLine();if(null===o)return this.setNext("flow");if((-1!==s&&s<this.indentNext&&"#"!==o[0]||0===s&&(o.startsWith("---")||o.startsWith("..."))&&t(o[3]))&&(s!==this.indentNext-1||1!==this.flowLevel||"]"!==o[0]&&"}"!==o[0]))return this.flowLevel=0,yield e.FLOW_END,yield*this.parseLineStart();let a=0;for(;","===o[a];)a+=(yield*this.pushCount(1)),a+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(a+=(yield*this.pushIndicators()),o[a]){case void 0:return"flow";case"#":return yield*this.pushCount(o.length-a),"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(i),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||t(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let 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)}const n=this.buffer.substring(0,t);let r=n.indexOf("\n",this.pos);if(-1!==r){for(;-1!==r;){const e=this.continueScalar(r+1);if(-1===e)break;r=n.indexOf("\n",e)}-1!==r&&(t=r-("\r"===n[r-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(;;){const 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=>t(e)||"#"===e)}*parseBlockScalar(){let t,n=this.pos-1,r=0;e:for(let e=this.pos;t=this.buffer[e];++e)switch(t){case" ":r+=1;break;case"\n":n=e,r=0;break;case"\r":{const t=this.buffer[e+1];if(!t&&!this.atEnd)return this.setNext("block-scalar");if("\n"===t)break}default:break e}if(!t&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=r:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(n+1);if(-1===e)break;n=this.buffer.indexOf("\n",e)}while(-1!==n);if(-1===n){if(!this.atEnd)return this.setNext("block-scalar");n=this.buffer.length}}let s=n+1;for(t=this.buffer[s];" "===t;)t=this.buffer[++s];if("\t"===t){for(;"\t"===t||" "===t||"\r"===t||"\n"===t;)t=this.buffer[++s];n=s-1}else if(!this.blockScalarKeep)for(;;){let e=n-1,t=this.buffer[e];"\r"===t&&(t=this.buffer[--e]);const s=e;for(;" "===t;)t=this.buffer[--e];if(!("\n"===t&&e>=this.pos&&e+1+r>s))break;n=e}return yield e.SCALAR,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let r,o=this.pos-1,i=this.pos-1;for(;r=this.buffer[++i];)if(":"===r){const e=this.buffer[i+1];if(t(e)||n&&s.has(e))break;o=i}else if(t(r)){let e=this.buffer[i+1];if("\r"===r&&("\n"===e?(i+=1,r="\n",e=this.buffer[i+1]):o=i),"#"===e||n&&s.has(e))break;if("\n"===r){const e=this.continueScalar(i+1);if(-1===e)break;i=Math.max(i,e-2)}}else{if(n&&s.has(r))break;o=i}return r||this.atEnd?(yield e.SCALAR,yield*this.pushToIndex(o+1,!0),n?"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){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(i))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(t(n)||e&&s.has(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,n=this.buffer[e];for(;!t(n)&&">"!==n;)n=this.buffer[++e];return yield*this.pushToIndex(">"===n?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(r.has(t))t=this.buffer[++e];else{if("%"!==t||!n.has(this.buffer[e+1])||!n.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const 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"===t);const r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},Vr}var Qr,Xr={};function es(){return Qr||(Qr=1,Xr.LineCounter=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){const r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}return this.lineStarts[t]===e?{line:t+1,col:1}:0===t?{line:0,col:e}:{line:t,col:e-this.lineStarts[t-1]+1}}}}),Xr}var ts,ns={};function rs(){if(ts)return ns;ts=1;var e=w,t=Wr(),n=Yr();function r(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function s(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 o(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 i(e){switch(e.type){case"document":return e.start;case"block-map":{const 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 a(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(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function c(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||r(t.start,"explicit-key-ind")||r(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,o(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}return ns.Parser=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new n.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(n){if(this.source=n,e.env.LOG_TOKENS&&console.log("|",t.prettyToken(n)),this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=n.length);const r=t.tokenType(n);if(r)if("scalar"===r)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+n.length);break;case"space":this.atNewLine&&" "===n[0]&&(this.indent+=n.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=n.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=n.length}else{const e=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:e,source:n}),this.offset+=n.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(){const e=this.peek(1);if("doc-end"!==this.type||e&&"doc-end"===e.type){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()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const 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&&c(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const n=e.items[e.items.length-1];if(n.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!n.sep)return Object.assign(n,{key:t,sep:[]}),void(this.onKeyLine=!n.explicitKey);n.value=t;break}case"block-seq":{const n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{const n=e.items[e.items.length-1];return void(!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]}))}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)){const n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&-1===s(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{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}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":return void(-1!==s(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){const t=a(i(this.peek(2)));let n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];const r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);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){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.type?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)){const n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const n=!this.onKeyLine&&this.indent===e.indent,s=n&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let i=[];if(s&&t.sep&&!t.value){const n=[];for(let r=0;r<t.sep.length;++r){const s=t.sep[r];switch(s.type){case"newline":n.push(r);break;case"space":break;case"comment":s.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":return void(s||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?s||t.value?(i.push(this.sourceToken),e.items.push({start:i,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),void(this.onKeyLine=!0);case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(r(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(o(t.key)&&!r(t.sep,"newline")){const e=a(t.start),n=t.key,r=t.sep;r.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:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else if(r(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=a(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||s?e.items.push({start:i,key:null,sep:[this.sourceToken]}):r(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]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(s||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0))}default:{const s=this.startBlockValue(e);if(s){if("block-seq"===s.type){if(!t.explicitKey&&t.sep&&!r(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:i});return void this.stack.push(s)}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.type?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)){const n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||r(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const 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&&"flow-collection"===e.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const 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))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const n=a(i(t));c(e);const r=e.end.splice(1,e.end.length);r.push(this.sourceToken);const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}}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;const t=a(i(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;const t=a(i(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())}}},ns}var ss,os,is={};var as=function(){if(os)return Ae;os=1;var e=jr(),t=Jn(),n=qn(),r=Qn(),s=Ye(),o=Te(),i=xt(),a=st(),c=Bt(),u=Zt(),l=Wr(),f=Yr(),p=es(),d=rs(),h=function(){if(ss)return is;ss=1;var e=jr(),t=Jn(),n=Qn(),r=kt(),s=Te(),o=es(),i=rs();function a(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new o.LineCounter||null,prettyErrors:t}}function c(t,r={}){const{lineCounter:s,prettyErrors:o}=a(r),c=new i.Parser(s?.addNewLine),u=new e.Composer(r);let l=null;for(const e of u.compose(c.parse(t),!0,t.length))if(l){if("silent"!==l.options.logLevel){l.errors.push(new n.YAMLParseError(e.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else l=e;return o&&s&&(l.errors.forEach(n.prettifyError(t,s)),l.warnings.forEach(n.prettifyError(t,s))),l}return is.parse=function(e,t,n){let s;"function"==typeof t?s=t:void 0===n&&t&&"object"==typeof t&&(n=t);const o=c(e,n);if(!o)return null;if(o.warnings.forEach(e=>r.warn(o.options.logLevel,e)),o.errors.length>0){if("silent"!==o.options.logLevel)throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:s},n))},is.parseAllDocuments=function(t,r={}){const{lineCounter:s,prettyErrors:o}=a(r),c=new i.Parser(s?.addNewLine),u=new e.Composer(r),l=Array.from(u.compose(c.parse(t)));if(o&&s)for(const e of l)e.errors.forEach(n.prettifyError(t,s)),e.warnings.forEach(n.prettifyError(t,s));return l.length>0?l:Object.assign([],{empty:!0},u.streamInfo())},is.parseDocument=c,is.stringify=function(e,n,r){let o=null;if("function"==typeof n||Array.isArray(n)?o=n:void 0===r&&n&&(r=n),"string"==typeof r&&(r=r.length),"number"==typeof r){const e=Math.round(r);r=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=r??n??{};if(!e)return}return s.isDocument(e)&&!o?e.toString(r):new t.Document(e,o,r).toString(r)},is}(),m=Le();return Ae.Composer=e.Composer,Ae.Document=t.Document,Ae.Schema=n.Schema,Ae.YAMLError=r.YAMLError,Ae.YAMLParseError=r.YAMLParseError,Ae.YAMLWarning=r.YAMLWarning,Ae.Alias=s.Alias,Ae.isAlias=o.isAlias,Ae.isCollection=o.isCollection,Ae.isDocument=o.isDocument,Ae.isMap=o.isMap,Ae.isNode=o.isNode,Ae.isPair=o.isPair,Ae.isScalar=o.isScalar,Ae.isSeq=o.isSeq,Ae.Pair=i.Pair,Ae.Scalar=a.Scalar,Ae.YAMLMap=c.YAMLMap,Ae.YAMLSeq=u.YAMLSeq,Ae.CST=l,Ae.Lexer=f.Lexer,Ae.LineCounter=p.LineCounter,Ae.Parser=d.Parser,Ae.parse=h.parse,Ae.parseAllDocuments=h.parseAllDocuments,Ae.parseDocument=h.parseDocument,Ae.stringify=h.stringify,Ae.visit=m.visit,Ae.visitAsync=m.visitAsync,Ae}();function cs(e,t,n){function r(n,r){var s;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(s=n._zod).traits??(s.traits=new Set),n._zod.traits.add(e),t(n,r);for(const e in i.prototype)e in n||Object.defineProperty(n,e,{value:i.prototype[e].bind(n)});n._zod.constr=i,n._zod.def=r}const s=n?.Parent??Object;class o extends s{}function i(e){var t;const s=n?.Parent?new o:this;r(s,e),(t=s._zod).deferred??(t.deferred=[]);for(const e of s._zod.deferred)e();return s}return Object.defineProperty(o,"name",{value:e}),Object.defineProperty(i,"init",{value:r}),Object.defineProperty(i,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}Z(as);class us extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ls extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const fs={};function ps(e){return fs}function ds(e,t){return"bigint"==typeof t?t.toString():t}function hs(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ms(e){return null==e}function gs(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const ys=Symbol("evaluating");function bs(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==ys)return void 0===r&&(r=ys,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function vs(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ds(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ws(e){return JSON.stringify(e)}const _s="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Es(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const ks=hs(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function Ss(e){if(!1===Es(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!1!==Es(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function As(e){return Ss(e)?{...e}:Array.isArray(e)?[...e]:e}const Cs=new Set(["string","number","symbol"]);function Ps(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Os(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function Ts(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}function xs(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function Ns(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function $s(e){return"string"==typeof e?e:e?.message}function Ls(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const s=$s(e.inst?._zod.def?.error?.(e))??$s(t?.error?.(e))??$s(n.customError?.(e))??$s(n.localeError?.(e))??"Invalid input";r.message=s}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Rs(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function Fs(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const Is=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ds,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ms=cs("$ZodError",Is),js=cs("$ZodError",Is,{Parent:Error}),Bs=e=>(t,n,r,s)=>{const o=r?Object.assign(r,{async:!1}):{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new us;if(i.issues.length){const t=new(s?.Err??e)(i.issues.map(e=>Ls(e,o,ps())));throw _s(t,s?.callee),t}return i.value},zs=e=>async(t,n,r,s)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise&&(i=await i),i.issues.length){const t=new(s?.Err??e)(i.issues.map(e=>Ls(e,o,ps())));throw _s(t,s?.callee),t}return i.value},Hs=e=>(t,n,r)=>{const s=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},s);if(o instanceof Promise)throw new us;return o.issues.length?{success:!1,error:new(e??Ms)(o.issues.map(e=>Ls(e,s,ps())))}:{success:!0,data:o.value}},Ks=Hs(js),Us=e=>async(t,n,r)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},s);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(e=>Ls(e,s,ps())))}:{success:!0,data:o.value}},qs=Us(js),Zs=/^[cC][^\s-]{8,}$/,Gs=/^[0-9a-z]+$/,Ws=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Js=/^[0-9a-vA-V]{20}$/,Vs=/^[A-Za-z0-9]{27}$/,Ys=/^[a-zA-Z0-9_-]{21}$/,Qs=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Xs=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,eo=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,to=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,no=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ro=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,so=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,oo=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,io=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ao=/^[A-Za-z0-9_-]*$/,co=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,uo=/^\+(?:[0-9]){6,14}[0-9]$/,lo="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",fo=new RegExp(`^${lo}$`);function po(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}const ho=/^[^A-Z]*$/,mo=/^[^a-z]*$/,go=cs("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),yo=cs("$ZodCheckMaxLength",(e,t)=>{var n;go.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!ms(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const s=Rs(r);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),bo=cs("$ZodCheckMinLength",(e,t)=>{var n;go.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!ms(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const s=Rs(r);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),vo=cs("$ZodCheckLengthEquals",(e,t)=>{var n;go.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!ms(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const r=n.value,s=r.length;if(s===t.length)return;const o=Rs(r),i=s>t.length;n.issues.push({origin:o,...i?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Do=cs("$ZodCheckStringFormat",(e,t)=>{var n,r;go.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),wo=cs("$ZodCheckRegex",(e,t)=>{Do.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),_o=cs("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ho),Do.init(e,t)}),Eo=cs("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=mo),Do.init(e,t)}),ko=cs("$ZodCheckIncludes",(e,t)=>{go.init(e,t);const n=Ps(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),So=cs("$ZodCheckStartsWith",(e,t)=>{go.init(e,t);const n=new RegExp(`^${Ps(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Ao=cs("$ZodCheckEndsWith",(e,t)=>{go.init(e,t);const n=new RegExp(`.*${Ps(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Co=cs("$ZodCheckOverwrite",(e,t)=>{go.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class Po{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of r)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}const Oo={major:4,minor:1,patch:12},To=cs("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Oo;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const t of r)for(const n of t._zod.onattach)n(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let r,s=xs(e);for(const o of t){if(o._zod.def.when){if(!o._zod.def.when(e))continue}else if(s)continue;const t=e.issues.length,i=o._zod.check(e);if(i instanceof Promise&&!1===n?.async)throw new us;if(r||i instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await i,e.issues.length!==t&&(s||(s=xs(e,t)))});else{if(e.issues.length===t)continue;s||(s=xs(e,t))}}return r?r.then(()=>e):e},n=(n,s,o)=>{if(xs(n))return n.aborted=!0,n;const i=t(s,r,o);if(i instanceof Promise){if(!1===o.async)throw new us;return i.then(t=>e._zod.parse(t,o))}return e._zod.parse(i,o)};e._zod.run=(s,o)=>{if(o.skipChecks)return e._zod.parse(s,o);if("backward"===o.direction){const t=e._zod.parse({value:s.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,s,o)):n(t,s,o)}const i=e._zod.parse(s,o);if(i instanceof Promise){if(!1===o.async)throw new us;return i.then(e=>t(e,r,o))}return t(i,r,o)}}e["~standard"]={validate:t=>{try{const n=Ks(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return qs(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),xo=cs("$ZodString",(e,t)=>{var n;To.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=e._zod.bag,new RegExp(`^${n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*"}$`)),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),No=cs("$ZodStringFormat",(e,t)=>{Do.init(e,t),xo.init(e,t)}),$o=cs("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Xs),No.init(e,t)}),Lo=cs("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=eo(e))}else t.pattern??(t.pattern=eo());No.init(e,t)}),Ro=cs("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=to),No.init(e,t)}),Fo=cs("$ZodURL",(e,t)=>{No.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),s=new URL(r);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:co.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=s.href:n.value=r)}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Io=cs("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),No.init(e,t)}),Mo=cs("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ys),No.init(e,t)}),jo=cs("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Zs),No.init(e,t)}),Bo=cs("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Gs),No.init(e,t)}),zo=cs("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ws),No.init(e,t)}),Ho=cs("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Js),No.init(e,t)}),Ko=cs("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Vs),No.init(e,t)}),Uo=cs("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=po({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${lo}T(?:${r})$`)}(t)),No.init(e,t)}),qo=cs("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=fo),No.init(e,t)}),Zo=cs("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${po(t)}$`)),No.init(e,t)}),Go=cs("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Qs),No.init(e,t)}),Wo=cs("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=no),No.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv4"})}),Jo=cs("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=ro),No.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Vo=cs("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=so),No.init(e,t)}),Yo=cs("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=oo),No.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(2!==r.length)throw new Error;const[e,t]=r;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Qo(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Xo=cs("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=io),No.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{Qo(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),ei=cs("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ao),No.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{(function(e){if(!ao.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Qo(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),ti=cs("$ZodE164",(e,t)=>{t.pattern??(t.pattern=uo),No.init(e,t)}),ni=cs("$ZodJWT",(e,t)=>{No.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[r]=n;if(!r)return!1;const s=JSON.parse(atob(r));return!("typ"in s&&"JWT"!==s?.typ||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),ri=cs("$ZodUnknown",(e,t)=>{To.init(e,t),e._zod.parse=e=>e}),si=cs("$ZodNever",(e,t)=>{To.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function oi(e,t,n){e.issues.length&&t.issues.push(...Ns(n,e.issues)),t.value[n]=e.value}const ii=cs("$ZodArray",(e,t)=>{To.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const o=[];for(let e=0;e<s.length;e++){const i=s[e],a=t.element._zod.run({value:i,issues:[]},r);a instanceof Promise?o.push(a.then(t=>oi(t,n,e))):oi(a,n,e)}return o.length?Promise.all(o).then(()=>n):n}});function ai(e,t,n,r){e.issues.length&&t.issues.push(...Ns(n,e.issues)),void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function ci(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=(r=e.shape,Object.keys(r).filter(e=>"optional"===r[e]._zod.optin&&"optional"===r[e]._zod.optout));var r;return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function ui(e,t,n,r,s,o){const i=[],a=s.keySet,c=s.catchall._zod,u=c.def.type;for(const s of Object.keys(t)){if(a.has(s))continue;if("never"===u){i.push(s);continue}const o=c.run({value:t[s],issues:[]},r);o instanceof Promise?e.push(o.then(e=>ai(e,n,s,t))):ai(o,n,s,t)}return i.length&&n.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const li=cs("$ZodObject",(e,t)=>{To.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const r=hs(()=>ci(t));bs(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(const e of r.values)n[t].add(e)}}return n});const s=Es,o=t.catchall;let i;e._zod.parse=(t,n)=>{i??(i=r.value);const a=t.value;if(!s(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};const c=[],u=i.shape;for(const e of i.keys){const r=u[e]._zod.run({value:a[e],issues:[]},n);r instanceof Promise?c.push(r.then(n=>ai(n,t,e,a))):ai(r,t,e,a)}return o?ui(c,a,t,n,r.value,e):c.length?Promise.all(c).then(()=>t):t}}),fi=cs("$ZodObjectJIT",(e,t)=>{li.init(e,t);const n=e._zod.parse,r=hs(()=>ci(t));let s;const o=Es,i=!fs.jitless,a=i&&ks.value,c=t.catchall;let u;e._zod.parse=(l,f)=>{u??(u=r.value);const p=l.value;return o(p)?i&&a&&!1===f?.async&&!0!==f.jitless?(s||(s=(e=>{const t=new Po(["shape","payload","ctx"]),n=r.value,s=e=>{const t=ws(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const o=Object.create(null);let i=0;for(const e of n.keys)o[e]="key_"+i++;t.write("const newResult = {};");for(const e of n.keys){const n=o[e],r=ws(e);t.write(`const ${n} = ${s(e)};`),t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${r}, ...iss.path] : [${r}]\n })));\n }\n \n \n if (${n}.value === undefined) {\n if (${r} in input) {\n newResult[${r}] = undefined;\n }\n } else {\n newResult[${r}] = ${n}.value;\n }\n \n `)}t.write("payload.value = newResult;"),t.write("return payload;");const a=t.compile();return(t,n)=>a(e,t,n)})(t.shape)),l=s(l,f),c?ui([],p,l,f,u,e):l):n(l,f):(l.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),l)}});function pi(e,t,n,r){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const s=e.filter(e=>!xs(e));return 1===s.length?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Ls(e,r,ps())))}),t)}const di=cs("$ZodUnion",(e,t)=>{To.init(e,t),bs(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),bs(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),bs(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),bs(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>gs(e.source)).join("|")})$`)}});const n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=(s,o)=>{if(n)return r(s,o);let i=!1;const a=[];for(const e of t.options){const t=e._zod.run({value:s.value,issues:[]},o);if(t instanceof Promise)a.push(t),i=!0;else{if(0===t.issues.length)return t;a.push(t)}}return i?Promise.all(a).then(t=>pi(t,s,e,o)):pi(a,s,e,o)}}),hi=cs("$ZodIntersection",(e,t)=>{To.init(e,t),e._zod.parse=(e,n)=>{const r=e.value,s=t.left._zod.run({value:r,issues:[]},n),o=t.right._zod.run({value:r,issues:[]},n);return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([t,n])=>gi(e,t,n)):gi(e,s,o)}});function mi(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(Ss(e)&&Ss(t)){const n=Object.keys(t),r=Object.keys(e).filter(e=>-1!==n.indexOf(e)),s={...e,...t};for(const n of r){const r=mi(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};s[n]=r.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const s=mi(e[r],t[r]);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function gi(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),xs(e))return e;const r=mi(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const yi=cs("$ZodRecord",(e,t)=>{To.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Ss(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const o=[];if(t.keyType._zod.values){const i=t.keyType._zod.values;n.value={};for(const e of i)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){const i=t.valueType._zod.run({value:s[e],issues:[]},r);i instanceof Promise?o.push(i.then(t=>{t.issues.length&&n.issues.push(...Ns(e,t.issues)),n.value[e]=t.value})):(i.issues.length&&n.issues.push(...Ns(e,i.issues)),n.value[e]=i.value)}let a;for(const e in s)i.has(e)||(a=a??[],a.push(e));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:a})}else{n.value={};for(const i of Reflect.ownKeys(s)){if("__proto__"===i)continue;const a=t.keyType._zod.run({value:i,issues:[]},r);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(e=>Ls(e,r,ps())),input:i,path:[i],inst:e}),n.value[a.value]=a.value;continue}const c=t.valueType._zod.run({value:s[i],issues:[]},r);c instanceof Promise?o.push(c.then(e=>{e.issues.length&&n.issues.push(...Ns(i,e.issues)),n.value[a.value]=e.value})):(c.issues.length&&n.issues.push(...Ns(i,c.issues)),n.value[a.value]=c.value)}}return o.length?Promise.all(o).then(()=>n):n}}),bi=cs("$ZodEnum",(e,t)=>{To.init(e,t);const n=function(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(e=>Cs.has(typeof e)).map(e=>"string"==typeof e?Ps(e):e.toString()).join("|")})$`),e._zod.parse=(t,s)=>{const o=t.value;return r.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),vi=cs("$ZodTransform",(e,t)=>{To.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new ls(e.constructor.name);const s=t.transform(n.value,n);if(r.async)return(s instanceof Promise?s:Promise.resolve(s)).then(e=>(n.value=e,n));if(s instanceof Promise)throw new us;return n.value=s,n}});function Di(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const wi=cs("$ZodOptional",(e,t)=>{To.init(e,t),e._zod.optin="optional",e._zod.optout="optional",bs(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),bs(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${gs(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>Di(t,e.value)):Di(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),_i=cs("$ZodNullable",(e,t)=>{To.init(e,t),bs(e._zod,"optin",()=>t.innerType._zod.optin),bs(e._zod,"optout",()=>t.innerType._zod.optout),bs(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${gs(e.source)}|null)$`):void 0}),bs(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),Ei=cs("$ZodDefault",(e,t)=>{To.init(e,t),e._zod.optin="optional",bs(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>ki(e,t)):ki(r,t)}});function ki(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Si=cs("$ZodPrefault",(e,t)=>{To.init(e,t),e._zod.optin="optional",bs(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Ai=cs("$ZodNonOptional",(e,t)=>{To.init(e,t),bs(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(t=>Ci(t,e)):Ci(s,e)}});function Ci(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Pi=cs("$ZodCatch",(e,t)=>{To.init(e,t),bs(e._zod,"optin",()=>t.innerType._zod.optin),bs(e._zod,"optout",()=>t.innerType._zod.optout),bs(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Ls(e,n,ps()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Ls(e,n,ps()))},input:e.value}),e.issues=[]),e)}}),Oi=cs("$ZodPipe",(e,t)=>{To.init(e,t),bs(e._zod,"values",()=>t.in._zod.values),bs(e._zod,"optin",()=>t.in._zod.optin),bs(e._zod,"optout",()=>t.out._zod.optout),bs(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Ti(e,t.in,n)):Ti(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Ti(e,t.out,n)):Ti(r,t.out,n)}});function Ti(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const xi=cs("$ZodReadonly",(e,t)=>{To.init(e,t),bs(e._zod,"propValues",()=>t.innerType._zod.propValues),bs(e._zod,"values",()=>t.innerType._zod.values),bs(e._zod,"optin",()=>t.innerType._zod.optin),bs(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Ni):Ni(r)}});function Ni(e){return e.value=Object.freeze(e.value),e}const $i=cs("$ZodCustom",(e,t)=>{go.init(e,t),To.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const r=n.value,s=t.fn(r);if(s instanceof Promise)return s.then(t=>Li(t,n,r,e));Li(s,n,r,e)}});function Li(e,t,n,r){if(!e){const e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Fs(e))}}class Ri{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];if(this._map.set(e,n),n&&"object"==typeof n&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}const Fi=new Ri;function Ii(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ts(t)})}function Mi(e,t){return new yo({check:"max_length",...Ts(t),maximum:e})}function ji(e,t){return new bo({check:"min_length",...Ts(t),minimum:e})}function Bi(e,t){return new vo({check:"length_equals",...Ts(t),length:e})}function zi(e){return new Co({check:"overwrite",tx:e})}const Hi=cs("ZodISODateTime",(e,t)=>{Uo.init(e,t),fa.init(e,t)});const Ki=cs("ZodISODate",(e,t)=>{qo.init(e,t),fa.init(e,t)});const Ui=cs("ZodISOTime",(e,t)=>{Zo.init(e,t),fa.init(e,t)});const qi=cs("ZodISODuration",(e,t)=>{Go.init(e,t),fa.init(e,t)});const Zi=(e,t)=>{Ms.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t=e=>e.message){const n={_errors:[]},r=e=>{for(const s of e.issues)if("invalid_union"===s.code&&s.errors.length)s.errors.map(e=>r({issues:e}));else if("invalid_key"===s.code)r({issues:s.issues});else if("invalid_element"===s.code)r({issues:s.issues});else if(0===s.path.length)n._errors.push(t(s));else{let e=n,r=0;for(;r<s.path.length;){const n=s.path[r];r===s.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(s))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){const n={},r=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,ds,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,ds,2)}},isEmpty:{get:()=>0===e.issues.length}})};cs("ZodError",Zi);const Gi=cs("ZodError",Zi,{Parent:Error}),Wi=Bs(Gi),Ji=zs(Gi),Vi=Hs(Gi),Yi=Us(Gi),Qi=(ua=Gi,(e,t,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Bs(ua)(e,t,r)}),Xi=(e=>(t,n,r)=>Bs(e)(t,n,r))(Gi),ea=(e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return zs(e)(t,n,s)})(Gi),ta=(e=>async(t,n,r)=>zs(e)(t,n,r))(Gi),na=(e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Hs(e)(t,n,s)})(Gi),ra=(e=>(t,n,r)=>Hs(e)(t,n,r))(Gi),sa=(e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Us(e)(t,n,s)})(Gi),oa=(e=>async(t,n,r)=>Us(e)(t,n,r))(Gi),ia=cs("ZodType",(e,t)=>(To.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Ds(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]})),e.clone=(t,n)=>Os(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Wi(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Vi(e,t,n),e.parseAsync=async(t,n)=>Ji(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Yi(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Qi(e,t,n),e.decode=(t,n)=>Xi(e,t,n),e.encodeAsync=async(t,n)=>ea(e,t,n),e.decodeAsync=async(t,n)=>ta(e,t,n),e.safeEncode=(t,n)=>na(e,t,n),e.safeDecode=(t,n)=>ra(e,t,n),e.safeEncodeAsync=async(t,n)=>sa(e,t,n),e.safeDecodeAsync=async(t,n)=>oa(e,t,n),e.refine=(t,n)=>e.check(function(e,t={}){return function(e,t,n){return new tc({type:"custom",check:"custom",fn:t,...Ts(n)})}(0,e,t)}(t,n)),e.superRefine=t=>e.check(function(e){const t=function(e){const t=new go({check:"custom",...Ts(void 0)});return t._zod.check=e,t}(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(Fs(e,n.value,t._zod.def));else{const r=e;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(Fs(r))}},e(n.value,n)));return t}(t)),e.overwrite=t=>e.check(zi(t)),e.optional=()=>qa(e),e.nullable=()=>Ga(e),e.nullish=()=>qa(Ga(e)),e.nonoptional=t=>function(e,t){return new Va({type:"nonoptional",innerType:e,...Ts(t)})}(e,t),e.array=()=>Fa(e),e.or=t=>ja([e,t]),e.and=t=>new Ba({type:"intersection",left:e,right:t}),e.transform=t=>Xa(e,new Ka({type:"transform",transform:t})),e.default=t=>{return n=t,new Wa({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():As(n)}});var n},e.prefault=t=>{return n=t,new Ja({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():As(n)}});var n},e.catch=t=>{return new Ya({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>Xa(e,t),e.readonly=()=>new ec({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return Fi.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>Fi.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return Fi.get(e);const n=e.clone();return Fi.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),aa=cs("_ZodString",(e,t)=>{xo.init(e,t),ia.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(function(e,t){return new wo({check:"string_format",format:"regex",...Ts(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new ko({check:"string_format",format:"includes",...Ts(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new So({check:"string_format",format:"starts_with",...Ts(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new Ao({check:"string_format",format:"ends_with",...Ts(t),suffix:e})}(...t)),e.min=(...t)=>e.check(ji(...t)),e.max=(...t)=>e.check(Mi(...t)),e.length=(...t)=>e.check(Bi(...t)),e.nonempty=(...t)=>e.check(ji(1,...t)),e.lowercase=t=>e.check(function(e){return new _o({check:"string_format",format:"lowercase",...Ts(e)})}(t)),e.uppercase=t=>e.check(function(e){return new Eo({check:"string_format",format:"uppercase",...Ts(e)})}(t)),e.trim=()=>e.check(zi(e=>e.trim())),e.normalize=(...t)=>e.check(function(e){return zi(t=>t.normalize(e))}(...t)),e.toLowerCase=()=>e.check(zi(e=>e.toLowerCase())),e.toUpperCase=()=>e.check(zi(e=>e.toUpperCase()))}),ca=cs("ZodString",(e,t)=>{xo.init(e,t),aa.init(e,t),e.email=t=>e.check(function(e,t){return new pa({type:"string",format:"email",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.url=t=>e.check(function(e,t){return new ma({type:"string",format:"url",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.jwt=t=>e.check(function(e,t){return new Ta({type:"string",format:"jwt",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.emoji=t=>e.check(function(e,t){return new ga({type:"string",format:"emoji",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.guid=t=>e.check(Ii(da,t)),e.uuid=t=>e.check(function(e,t){return new ha({type:"string",format:"uuid",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.uuidv4=t=>e.check(function(e,t){return new ha({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ts(t)})}(0,t)),e.uuidv6=t=>e.check(function(e,t){return new ha({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ts(t)})}(0,t)),e.uuidv7=t=>e.check(function(e,t){return new ha({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ts(t)})}(0,t)),e.nanoid=t=>e.check(function(e,t){return new ya({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.guid=t=>e.check(Ii(da,t)),e.cuid=t=>e.check(function(e,t){return new ba({type:"string",format:"cuid",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.cuid2=t=>e.check(function(e,t){return new va({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.ulid=t=>e.check(function(e,t){return new Da({type:"string",format:"ulid",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.base64=t=>e.check(function(e,t){return new Ca({type:"string",format:"base64",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.base64url=t=>e.check(function(e,t){return new Pa({type:"string",format:"base64url",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.xid=t=>e.check(function(e,t){return new wa({type:"string",format:"xid",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.ksuid=t=>e.check(function(e,t){return new _a({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.ipv4=t=>e.check(function(e,t){return new Ea({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.ipv6=t=>e.check(function(e,t){return new ka({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.cidrv4=t=>e.check(function(e,t){return new Sa({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.cidrv6=t=>e.check(function(e,t){return new Aa({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.e164=t=>e.check(function(e,t){return new Oa({type:"string",format:"e164",check:"string_format",abort:!1,...Ts(t)})}(0,t)),e.datetime=t=>e.check(function(e){return new Hi({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ts(e)})}(t)),e.date=t=>e.check(function(e){return new Ki({type:"string",format:"date",check:"string_format",...Ts(e)})}(t)),e.time=t=>e.check(function(e){return new Ui({type:"string",format:"time",check:"string_format",precision:null,...Ts(e)})}(t)),e.duration=t=>e.check(function(e){return new qi({type:"string",format:"duration",check:"string_format",...Ts(e)})}(t))});var ua;function la(e){return new ca({type:"string",...Ts(e)})}const fa=cs("ZodStringFormat",(e,t)=>{No.init(e,t),aa.init(e,t)}),pa=cs("ZodEmail",(e,t)=>{Ro.init(e,t),fa.init(e,t)}),da=cs("ZodGUID",(e,t)=>{$o.init(e,t),fa.init(e,t)}),ha=cs("ZodUUID",(e,t)=>{Lo.init(e,t),fa.init(e,t)}),ma=cs("ZodURL",(e,t)=>{Fo.init(e,t),fa.init(e,t)}),ga=cs("ZodEmoji",(e,t)=>{Io.init(e,t),fa.init(e,t)}),ya=cs("ZodNanoID",(e,t)=>{Mo.init(e,t),fa.init(e,t)}),ba=cs("ZodCUID",(e,t)=>{jo.init(e,t),fa.init(e,t)}),va=cs("ZodCUID2",(e,t)=>{Bo.init(e,t),fa.init(e,t)}),Da=cs("ZodULID",(e,t)=>{zo.init(e,t),fa.init(e,t)}),wa=cs("ZodXID",(e,t)=>{Ho.init(e,t),fa.init(e,t)}),_a=cs("ZodKSUID",(e,t)=>{Ko.init(e,t),fa.init(e,t)}),Ea=cs("ZodIPv4",(e,t)=>{Wo.init(e,t),fa.init(e,t)}),ka=cs("ZodIPv6",(e,t)=>{Jo.init(e,t),fa.init(e,t)}),Sa=cs("ZodCIDRv4",(e,t)=>{Vo.init(e,t),fa.init(e,t)}),Aa=cs("ZodCIDRv6",(e,t)=>{Yo.init(e,t),fa.init(e,t)}),Ca=cs("ZodBase64",(e,t)=>{Xo.init(e,t),fa.init(e,t)}),Pa=cs("ZodBase64URL",(e,t)=>{ei.init(e,t),fa.init(e,t)}),Oa=cs("ZodE164",(e,t)=>{ti.init(e,t),fa.init(e,t)}),Ta=cs("ZodJWT",(e,t)=>{ni.init(e,t),fa.init(e,t)}),xa=cs("ZodUnknown",(e,t)=>{ri.init(e,t),ia.init(e,t)});function Na(){return new xa({type:"unknown"})}const $a=cs("ZodNever",(e,t)=>{si.init(e,t),ia.init(e,t)});function La(e){return new $a({type:"never",...Ts(e)})}const Ra=cs("ZodArray",(e,t)=>{ii.init(e,t),ia.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(ji(t,n)),e.nonempty=t=>e.check(ji(1,t)),e.max=(t,n)=>e.check(Mi(t,n)),e.length=(t,n)=>e.check(Bi(t,n)),e.unwrap=()=>e.element});function Fa(e,t){return function(e,t,n){return new Ra({type:"array",element:t,...Ts(n)})}(0,e,t)}const Ia=cs("ZodObject",(e,t)=>{fi.init(e,t),ia.init(e,t),bs(e,"shape",()=>t.shape),e.keyof=()=>function(e){const t=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Ha({type:"enum",entries:t,...Ts(void 0)})}(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Na()}),e.loose=()=>e.clone({...e._zod.def,catchall:Na()}),e.strict=()=>e.clone({...e._zod.def,catchall:La()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!Ss(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const r=Ds(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return vs(this,"shape",n),n},checks:[]});return Os(e,r)}(e,t),e.safeExtend=t=>function(e,t){if(!Ss(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return vs(this,"shape",n),n},checks:e._zod.def.checks};return Os(e,n)}(e,t),e.merge=t=>function(e,t){const n=Ds(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return vs(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Os(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def;return Os(e,Ds(e._zod.def,{get shape(){const e={};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return vs(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,r=Ds(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return vs(this,"shape",r),r},checks:[]});return Os(e,r)}(e,t),e.partial=(...t)=>function(e,t,n){const r=Ds(t._zod.def,{get shape(){const r=t._zod.def.shape,s={...r};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(s[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(const t in r)s[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return vs(this,"shape",s),s},checks:[]});return Os(t,r)}(Ua,e,t[0]),e.required=(...t)=>function(e,t,n){const r=Ds(t._zod.def,{get shape(){const r=t._zod.def.shape,s={...r};if(n)for(const t in n){if(!(t in s))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(s[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(const t in r)s[t]=new e({type:"nonoptional",innerType:r[t]});return vs(this,"shape",s),s},checks:[]});return Os(t,r)}(Va,e,t[0])}),Ma=cs("ZodUnion",(e,t)=>{di.init(e,t),ia.init(e,t),e.options=t.options});function ja(e,t){return new Ma({type:"union",options:e,...Ts(t)})}const Ba=cs("ZodIntersection",(e,t)=>{hi.init(e,t),ia.init(e,t)}),za=cs("ZodRecord",(e,t)=>{yi.init(e,t),ia.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType}),Ha=cs("ZodEnum",(e,t)=>{bi.init(e,t),ia.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const s={};for(const r of e){if(!n.has(r))throw new Error(`Key ${r} not found in enum`);s[r]=t.entries[r]}return new Ha({...t,checks:[],...Ts(r),entries:s})},e.exclude=(e,r)=>{const s={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete s[t]}return new Ha({...t,checks:[],...Ts(r),entries:s})}}),Ka=cs("ZodTransform",(e,t)=>{vi.init(e,t),ia.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new ls(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(Fs(r,n.value,t));else{const t=r;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(Fs(t))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(e=>(n.value=e,n)):(n.value=s,n)}}),Ua=cs("ZodOptional",(e,t)=>{wi.init(e,t),ia.init(e,t),e.unwrap=()=>e._zod.def.innerType});function qa(e){return new Ua({type:"optional",innerType:e})}const Za=cs("ZodNullable",(e,t)=>{_i.init(e,t),ia.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ga(e){return new Za({type:"nullable",innerType:e})}const Wa=cs("ZodDefault",(e,t)=>{Ei.init(e,t),ia.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),Ja=cs("ZodPrefault",(e,t)=>{Si.init(e,t),ia.init(e,t),e.unwrap=()=>e._zod.def.innerType}),Va=cs("ZodNonOptional",(e,t)=>{Ai.init(e,t),ia.init(e,t),e.unwrap=()=>e._zod.def.innerType}),Ya=cs("ZodCatch",(e,t)=>{Pi.init(e,t),ia.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),Qa=cs("ZodPipe",(e,t)=>{Oi.init(e,t),ia.init(e,t),e.in=t.in,e.out=t.out});function Xa(e,t){return new Qa({type:"pipe",in:e,out:t})}const ec=cs("ZodReadonly",(e,t)=>{xi.init(e,t),ia.init(e,t),e.unwrap=()=>e._zod.def.innerType}),tc=cs("ZodCustom",(e,t)=>{$i.init(e,t),ia.init(e,t)}),nc=Fa(la()).default([]).optional(),rc=ja([la(),Fa(la())]),sc=(oc=la(),ic=rc,new za({type:"record",keyType:oc,valueType:ic,...Ts(undefined)})).optional();var oc,ic;function ac(e,t){const n=t.replace(/\\/g,"/").replace(/^\.\/+/,""),r=`${n}/system`,s=`${n}/output`,o=`${n}/diff`,i=`${n}/dist`,a=`${n}/patch`,c=`${n}/imports`;return{rootRel:n,systemRel:r,outputRel:s,diffRel:o,distRel:i,patchRel:a,importsRel:c,rootAbs:h(e,n),systemAbs:h(e,r),outputAbs:h(e,s),diffAbs:h(e,o),distAbs:h(e,i),patchAbs:h(e,a),importsAbs:h(e,c)}}(function(){const e={type:"object",shape:{stanPath:la().min(1,{message:"stanPath must be a non-empty string"}),includes:nc,excludes:nc,imports:sc}??{},...Ts(void 0)};return new Ia(e)})().strict();var cc={makeStanDirs:ac},uc=Object.freeze({__proto__:null,default:cc,makeStanDirs:ac});async function lc({cwd:e,stanPath:n,baseName:r,includes:s,excludes:o,updateSnapshot:i="createIfMissing",includeOutputDirInDiff:u=!1,anchors:l,onArchiveWarnings:f}){const{outDir:p,diffDir:d}=await be(e,n),m=await de(e),y=await ge(m,{cwd:e,stanPath:n,includeOutputDir:!1,includes:s??[],excludes:o??[],anchors:l??[]}),b=await(async(e,t)=>{const n={};for(const r of t){const t=h(e,r),s=await a(t),o=E("sha256").update(s).digest("hex");n[r]=o}return n})(e,y),v=(e=>g(e,".archive.snapshot.json"))(d),D=t(v),w=D?JSON.parse(await a(v,"utf8")):{},_=D?y.filter(e=>!w[e]||w[e]!==b[e]):[...y],k=await(async()=>{try{const e=await import("./classifier-Bqzr65UC-DJLYQY2b.js"),t=e.classifyForArchive,n=e.default?.classifyForArchive,r="function"==typeof t?t:n;if("function"==typeof r)return r}catch{}throw new Error("classifyForArchive export not found in ./classifier")})(),{textFiles:S,warningsBody:A}=await k(e,_),C=S;U(A,f);const P=g(p,`${r}.diff.tar`),O=await import("./index-ucZa1KMb-DZqceYU7.js");if(u)await O.create({file:P,cwd:e,filter:H(n)},K(C,n));else if(0===C.length){const t=(e=>g(e,".stan_no_changes"))(d);await c(t,"no changes","utf8");const r=[`${n.replace(/\\/g,"/")}/diff/.stan_no_changes`];await O.create({file:P,cwd:e},r)}else{const t=Array.from(new Set([...C]));await O.create({file:P,cwd:e},t)}return"replace"===i?await c(v,JSON.stringify(b,null,2),"utf8"):"createIfMissing"!==i||D||await c(v,JSON.stringify(b,null,2),"utf8"),{diffPath:P}}var fc,pc={},dc={},hc={};var mc,gc={};var yc,bc,vc={},Dc={};var wc,_c,Ec,kc,Sc,Ac,Cc={};function Pc(){if(kc)return Ec;kc=1;var e=_c?wc:(_c=1,wc=function(e){if("string"!=typeof e||""===e)return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1}),t={"{":"}","(":")","[":"]"},n=function(e){if("!"===e[0])return!0;for(var n=0,r=-2,s=-2,o=-2,i=-2,a=-2;n<e.length;){if("*"===e[n])return!0;if("?"===e[n+1]&&/[\].+)]/.test(e[n]))return!0;if(-1!==s&&"["===e[n]&&"]"!==e[n+1]&&(s<n&&(s=e.indexOf("]",n)),s>n)){if(-1===a||a>s)return!0;if(-1===(a=e.indexOf("\\",n))||a>s)return!0}if(-1!==o&&"{"===e[n]&&"}"!==e[n+1]&&(o=e.indexOf("}",n))>n&&(-1===(a=e.indexOf("\\",n))||a>o))return!0;if(-1!==i&&"("===e[n]&&"?"===e[n+1]&&/[:!=]/.test(e[n+2])&&")"!==e[n+3]&&(i=e.indexOf(")",n))>n&&(-1===(a=e.indexOf("\\",n))||a>i))return!0;if(-1!==r&&"("===e[n]&&"|"!==e[n+1]&&(r<n&&(r=e.indexOf("|",n)),-1!==r&&")"!==e[r+1]&&(i=e.indexOf(")",r))>r&&(-1===(a=e.indexOf("\\",r))||a>i)))return!0;if("\\"===e[n]){var c=e[n+1];n+=2;var u=t[c];if(u){var l=e.indexOf(u,n);-1!==l&&(n=l+1)}if("!"===e[n])return!0}else n++}return!1},r=function(e){if("!"===e[0])return!0;for(var n=0;n<e.length;){if(/[*?{}()[\]]/.test(e[n]))return!0;if("\\"===e[n]){var r=e[n+1];n+=2;var s=t[r];if(s){var o=e.indexOf(s,n);-1!==o&&(n=o+1)}if("!"===e[n])return!0}else n++}return!1};return Ec=function(t,s){if("string"!=typeof t||""===t)return!1;if(e(t))return!0;var o=n;return s&&!1===s.strict&&(o=r),o(t)}}var Oc,Tc,xc,Nc,$c,Lc,Rc,Fc,Ic,Mc,jc,Bc,zc,Hc,Kc,Uc,qc,Zc,Gc,Wc={};function Jc(){return Oc||(Oc=1,(e=Wc).isInteger=e=>"number"==typeof e?Number.isInteger(e):"string"==typeof e&&""!==e.trim()&&Number.isInteger(Number(e)),e.find=(e,t)=>e.nodes.find(e=>e.type===t),e.exceedsLimit=(t,n,r=1,s)=>!1!==s&&!(!e.isInteger(t)||!e.isInteger(n))&&(Number(n)-Number(t))/Number(r)>=s,e.escapeNode=(e,t=0,n)=>{const r=e.nodes[t];r&&(n&&r.type===n||"open"===r.type||"close"===r.type)&&!0!==r.escaped&&(r.value="\\"+r.value,r.escaped=!0)},e.encloseBrace=e=>!("brace"!==e.type||e.commas>>0+e.ranges|0||(e.invalid=!0,0)),e.isInvalidBrace=e=>!("brace"!==e.type||!0!==e.invalid&&!e.dollar&&(e.commas>>0+e.ranges|0&&!0===e.open&&!0===e.close||(e.invalid=!0,0))),e.isOpenOrClose=e=>"open"===e.type||"close"===e.type||!0===e.open||!0===e.close,e.reduce=e=>e.reduce((e,t)=>("text"===t.type&&e.push(t.value),"range"===t.type&&(t.type="text"),e),[]),e.flatten=(...e)=>{const t=[],n=e=>{for(let r=0;r<e.length;r++){const s=e[r];Array.isArray(s)?n(s):void 0!==s&&t.push(s)}return t};return n(e),t}),Wc;var e}function Vc(){if(xc)return Tc;xc=1;const e=Jc();return Tc=(t,n={})=>{const r=(t,s={})=>{const o=n.escapeInvalid&&e.isInvalidBrace(s),i=!0===t.invalid&&!0===n.escapeInvalid;let a="";if(t.value)return(o||i)&&e.isOpenOrClose(t)?"\\"+t.value:t.value;if(t.value)return t.value;if(t.nodes)for(const e of t.nodes)a+=r(e);return a};return r(t)}}function Yc(){if(Rc)return Lc;Rc=1;const e=$c?Nc:($c=1,Nc=function(e){return"number"==typeof e?e-e===0:"string"==typeof e&&""!==e.trim()&&(Number.isFinite?Number.isFinite(+e):isFinite(+e))}),t=(n,o,i)=>{if(!1===e(n))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===o||n===o)return String(n);if(!1===e(o))throw new TypeError("toRegexRange: expected the second argument to be a number.");let a={relaxZeros:!0,...i};"boolean"==typeof a.strictZeros&&(a.relaxZeros=!1===a.strictZeros);let c=n+":"+o+"="+String(a.relaxZeros)+String(a.shorthand)+String(a.capture)+String(a.wrap);if(t.cache.hasOwnProperty(c))return t.cache[c].result;let u=Math.min(n,o),l=Math.max(n,o);if(1===Math.abs(u-l)){let e=n+"|"+o;return a.capture?`(${e})`:!1===a.wrap?e:`(?:${e})`}let p=f(n)||f(o),d={min:n,max:o,a:u,b:l},h=[],m=[];return p&&(d.isPadded=p,d.maxLen=String(d.max).length),u<0&&(m=r(l<0?Math.abs(l):1,Math.abs(u),d,a),u=d.a=0),l>=0&&(h=r(u,l,d,a)),d.negatives=m,d.positives=h,d.result=function(e,t){let n=s(e,t,"-",!1)||[],r=s(t,e,"",!1)||[],o=s(e,t,"-?",!0)||[];return n.concat(o).concat(r).join("|")}(m,h),!0===a.capture?d.result=`(${d.result})`:!1!==a.wrap&&h.length+m.length>1&&(d.result=`(?:${d.result})`),t.cache[c]=d,d.result};function n(e,t,n){if(e===t)return{pattern:e,count:[],digits:0};let r=function(e,t){let n=[];for(let r=0;r<e.length;r++)n.push([e[r],t[r]]);return n}(e,t),s=r.length,o="",i=0;for(let e=0;e<s;e++){let[t,n]=r[e];t===n?o+=t:"0"!==t||"9"!==n?o+=l(t,n):i++}return i&&(o+=!0===n.shorthand?"\\d":"[0-9]"),{pattern:o,count:[i],digits:s}}function r(e,t,r,s){let i,l=function(e,t){let n=1,r=1,s=a(e,n),i=new Set([t]);for(;e<=s&&s<=t;)i.add(s),n+=1,s=a(e,n);for(s=c(t+1,r)-1;e<s&&s<=t;)i.add(s),r+=1,s=c(t+1,r)-1;return i=[...i],i.sort(o),i}(e,t),f=[],d=e;for(let e=0;e<l.length;e++){let t=l[e],o=n(String(d),String(t),s),a="";r.isPadded||!i||i.pattern!==o.pattern?(r.isPadded&&(a=p(t,r,s)),o.string=a+o.pattern+u(o.count),f.push(o),d=t+1,i=o):(i.count.length>1&&i.count.pop(),i.count.push(o.count[0]),i.string=i.pattern+u(i.count),d=t+1)}return f}function s(e,t,n,r,s){let o=[];for(let s of e){let{string:e}=s;r||i(t,"string",e)||o.push(n+e),r&&i(t,"string",e)&&o.push(n+e)}return o}function o(e,t){return e>t?1:t>e?-1:0}function i(e,t,n){return e.some(e=>e[t]===n)}function a(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function c(e,t){return e-e%Math.pow(10,t)}function u(e){let[t=0,n=""]=e;return n||t>1?`{${t+(n?","+n:"")}}`:""}function l(e,t,n){return`[${e}${t-e===1?"":"-"}${t}]`}function f(e){return/^-?(0+)\d/.test(e)}function p(e,t,n){if(!t.isPadded)return e;let r=Math.abs(t.maxLen-String(e).length),s=!1!==n.relaxZeros;switch(r){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:return s?`0{0,${r}}`:`0{${r}}`}}return t.cache={},t.clearCache=()=>t.cache={},Lc=t}function Qc(){if(Ic)return Fc;Ic=1;const e=C,t=Yc(),n=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),r=e=>"number"==typeof e||"string"==typeof e&&""!==e,s=e=>Number.isInteger(+e),o=e=>{let t=`${e}`,n=-1;if("-"===t[0]&&(t=t.slice(1)),"0"===t)return!1;for(;"0"===t[++n];);return n>0},i=(e,t,n)=>{if(t>0){let n="-"===e[0]?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return!1===n?String(e):e},a=(e,t)=>{let n="-"===e[0]?"-":"";for(n&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return n?"-"+e:e},c=(e,n,r,s)=>{if(r)return t(e,n,{wrap:!1,...s});let o=String.fromCharCode(e);return e===n?o:`[${o}-${String.fromCharCode(n)}]`},u=(e,n,r)=>{if(Array.isArray(e)){let t=!0===r.wrap,n=r.capture?"":"?:";return t?`(${n}${e.join("|")})`:e.join("|")}return t(e,n,r)},l=(...t)=>new RangeError("Invalid range arguments: "+e.inspect(...t)),f=(e,t,n)=>{if(!0===n.strictRanges)throw l([e,t]);return[]},p=(e,t,n=1,r={})=>{let s=Number(e),f=Number(t);if(!Number.isInteger(s)||!Number.isInteger(f)){if(!0===r.strictRanges)throw l([e,t]);return[]}0===s&&(s=0),0===f&&(f=0);let p=s>f,d=String(e),h=String(t),m=String(n);n=Math.max(Math.abs(n),1);let g=o(d)||o(h)||o(m),y=g?Math.max(d.length,h.length,m.length):0,b=!1===g&&!1===((e,t,n)=>"string"==typeof e||"string"==typeof t||!0===n.stringify)(e,t,r),v=r.transform||(e=>t=>!0===e?Number(t):String(t))(b);if(r.toRegex&&1===n)return c(a(e,y),a(t,y),!0,r);let D={negatives:[],positives:[]},w=e=>D[e<0?"negatives":"positives"].push(Math.abs(e)),_=[],E=0;for(;p?s>=f:s<=f;)!0===r.toRegex&&n>1?w(s):_.push(i(v(s,E),y,b)),s=p?s-n:s+n,E++;return!0===r.toRegex?n>1?((e,t,n)=>{e.negatives.sort((e,t)=>e<t?-1:e>t?1:0),e.positives.sort((e,t)=>e<t?-1:e>t?1:0);let r,s=t.capture?"":"?:",o="",i="";return e.positives.length&&(o=e.positives.map(e=>a(String(e),n)).join("|")),e.negatives.length&&(i=`-(${s}${e.negatives.map(e=>a(String(e),n)).join("|")})`),r=o&&i?`${o}|${i}`:o||i,t.wrap?`(${s}${r})`:r})(D,r,y):u(_,null,{wrap:!1,...r}):_},d=(e,t,o,i={})=>{if(null==t&&r(e))return[e];if(!r(e)||!r(t))return f(e,t,i);if("function"==typeof o)return d(e,t,1,{transform:o});if(n(o))return d(e,t,0,o);let a={...i};return!0===a.capture&&(a.wrap=!0),o=o||a.step||1,s(o)?s(e)&&s(t)?p(e,t,o,a):((e,t,n=1,r={})=>{if(!s(e)&&e.length>1||!s(t)&&t.length>1)return f(e,t,r);let o=r.transform||(e=>String.fromCharCode(e)),i=`${e}`.charCodeAt(0),a=`${t}`.charCodeAt(0),l=i>a,p=Math.min(i,a),d=Math.max(i,a);if(r.toRegex&&1===n)return c(p,d,!1,r);let h=[],m=0;for(;l?i>=a:i<=a;)h.push(o(i,m)),i=l?i-n:i+n,m++;return!0===r.toRegex?u(h,null,{wrap:!1,options:r}):h})(e,t,Math.max(Math.abs(o),1),a):null==o||n(o)?d(e,t,1,o):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(o,a)};return Fc=d}function Xc(){if(Gc)return Zc;Gc=1;const e=Vc(),t=function(){if(jc)return Mc;jc=1;const e=Qc(),t=Jc();return Mc=(n,r={})=>{const s=(n,o={})=>{const i=t.isInvalidBrace(o),a=!0===n.invalid&&!0===r.escapeInvalid,c=!0===i||!0===a,u=!0===r.escapeInvalid?"\\":"";let l="";if(!0===n.isOpen)return u+n.value;if(!0===n.isClose)return console.log("node.isClose",u,n.value),u+n.value;if("open"===n.type)return c?u+n.value:"(";if("close"===n.type)return c?u+n.value:")";if("comma"===n.type)return"comma"===n.prev.type?"":c?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){const s=t.reduce(n.nodes),o=e(...s,{...r,wrap:!1,toRegex:!0,strictZeros:!0});if(0!==o.length)return s.length>1&&o.length>1?`(${o})`:o}if(n.nodes)for(const e of n.nodes)l+=s(e,n);return l};return s(n)}}(),n=function(){if(zc)return Bc;zc=1;const e=Qc(),t=Vc(),n=Jc(),r=(e="",t="",s=!1)=>{const o=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return s?n.flatten(t).map(e=>`{${e}}`):t;for(const n of e)if(Array.isArray(n))for(const e of n)o.push(r(e,t,s));else for(let e of t)!0===s&&"string"==typeof e&&(e=`{${e}}`),o.push(Array.isArray(e)?r(n,e,s):n+e);return n.flatten(o)};return Bc=(s,o={})=>{const i=void 0===o.rangeLimit?1e3:o.rangeLimit,a=(s,c={})=>{s.queue=[];let u=c,l=c.queue;for(;"brace"!==u.type&&"root"!==u.type&&u.parent;)u=u.parent,l=u.queue;if(s.invalid||s.dollar)return void l.push(r(l.pop(),t(s,o)));if("brace"===s.type&&!0!==s.invalid&&2===s.nodes.length)return void l.push(r(l.pop(),["{}"]));if(s.nodes&&s.ranges>0){const a=n.reduce(s.nodes);if(n.exceedsLimit(...a,o.step,i))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let c=e(...a,o);return 0===c.length&&(c=t(s,o)),l.push(r(l.pop(),c)),void(s.nodes=[])}const f=n.encloseBrace(s);let p=s.queue,d=s;for(;"brace"!==d.type&&"root"!==d.type&&d.parent;)d=d.parent,p=d.queue;for(let e=0;e<s.nodes.length;e++){const t=s.nodes[e];"comma"!==t.type||"brace"!==s.type?"close"!==t.type?t.value&&"open"!==t.type?p.push(r(p.pop(),t.value)):t.nodes&&a(t,s):l.push(r(l.pop(),p,f)):(1===e&&p.push(""),p.push(""))}return p};return n.flatten(a(s))},Bc}(),r=function(){if(qc)return Uc;qc=1;const e=Vc(),{MAX_LENGTH:t,CHAR_BACKSLASH:n,CHAR_BACKTICK:r,CHAR_COMMA:s,CHAR_DOT:o,CHAR_LEFT_PARENTHESES:i,CHAR_RIGHT_PARENTHESES:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_RIGHT_CURLY_BRACE:u,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_RIGHT_SQUARE_BRACKET:f,CHAR_DOUBLE_QUOTE:p,CHAR_SINGLE_QUOTE:d,CHAR_NO_BREAK_SPACE:h,CHAR_ZERO_WIDTH_NOBREAK_SPACE:m}=Kc?Hc:(Kc=1,Hc={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"});return Uc=(g,y={})=>{if("string"!=typeof g)throw new TypeError("Expected a string");const b=y||{},v="number"==typeof b.maxLength?Math.min(t,b.maxLength):t;if(g.length>v)throw new SyntaxError(`Input length (${g.length}), exceeds max characters (${v})`);const D={type:"root",input:g,nodes:[]},w=[D];let _=D,E=D,k=0;const S=g.length;let A,C=0,P=0;const O=()=>g[C++],T=e=>{if("text"===e.type&&"dot"===E.type&&(E.type="text"),!E||"text"!==E.type||"text"!==e.type)return _.nodes.push(e),e.parent=_,e.prev=E,E=e,e;E.value+=e.value};for(T({type:"bos"});C<S;)if(_=w[w.length-1],A=O(),A!==m&&A!==h)if(A!==n)if(A!==f){if(A===l){let e;for(k++;C<S&&(e=O());)if(A+=e,e!==l)if(e!==n){if(e===f&&(k--,0===k))break}else A+=O();else k++;T({type:"text",value:A});continue}if(A!==i)if(A!==a){if(A===p||A===d||A===r){const e=A;let t;for(!0!==y.keepQuotes&&(A="");C<S&&(t=O());)if(t!==n){if(t===e){!0===y.keepQuotes&&(A+=t);break}A+=t}else A+=t+O();T({type:"text",value:A});continue}if(A===c){P++;const e=E.value&&"$"===E.value.slice(-1)||!0===_.dollar;_=T({type:"brace",open:!0,close:!1,dollar:e,depth:P,commas:0,ranges:0,nodes:[]}),w.push(_),T({type:"open",value:A});continue}if(A===u){if("brace"!==_.type){T({type:"text",value:A});continue}const e="close";_=w.pop(),_.close=!0,T({type:e,value:A}),P--,_=w[w.length-1];continue}if(A===s&&P>0){if(_.ranges>0){_.ranges=0;const t=_.nodes.shift();_.nodes=[t,{type:"text",value:e(_)}]}T({type:"comma",value:A}),_.commas++}else{if(A===o&&P>0&&0===_.commas){const e=_.nodes;if(0===P||0===e.length){T({type:"text",value:A});continue}if("dot"===E.type){if(_.range=[],E.value+=A,E.type="range",3!==_.nodes.length&&5!==_.nodes.length){_.invalid=!0,_.ranges=0,E.type="text";continue}_.ranges++,_.args=[];continue}if("range"===E.type){e.pop();const t=e[e.length-1];t.value+=E.value+A,E=t,_.ranges--;continue}T({type:"dot",value:A});continue}T({type:"text",value:A})}}else{if("paren"!==_.type){T({type:"text",value:A});continue}_=w.pop(),T({type:"text",value:A}),_=w[w.length-1]}else _=T({type:"paren",nodes:[]}),w.push(_),T({type:"text",value:A})}else T({type:"text",value:"\\"+A});else T({type:"text",value:(y.keepEscaping?A:"")+O()});do{if(_=w.pop(),"root"!==_.type){_.nodes.forEach(e=>{e.nodes||("open"===e.type&&(e.isOpen=!0),"close"===e.type&&(e.isClose=!0),e.nodes||(e.type="text"),e.invalid=!0)});const e=w[w.length-1],t=e.nodes.indexOf(_);e.nodes.splice(t,1,..._.nodes)}}while(w.length>0);return T({type:"eos"}),D}}(),s=(e,t={})=>{let n=[];if(Array.isArray(e))for(const r of e){const e=s.create(r,t);Array.isArray(e)?n.push(...e):n.push(e)}else n=[].concat(s.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(n=[...new Set(n)]),n};return s.parse=(e,t={})=>r(e,t),s.stringify=(t,n={})=>e("string"==typeof t?s.parse(t,n):t,n),s.compile=(e,n={})=>("string"==typeof e&&(e=s.parse(e,n)),t(e,n)),s.expand=(e,t={})=>{"string"==typeof e&&(e=s.parse(e,t));let r=n(e,t);return!0===t.noempty&&(r=r.filter(Boolean)),!0===t.nodupes&&(r=[...new Set(r)]),r},s.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?s.compile(e,t):s.expand(e,t),Zc=s}var eu,tu,nu,ru,su,ou,iu,au,cu,uu,lu,fu,pu,du,hu={};function mu(){if(tu)return eu;tu=1;const e=A,t="\\\\/",n=`[^${t}]`,r="\\.",s="\\/",o="[^/]",i=`(?:${s}|$)`,a=`(?:^|${s})`,c=`${r}{1,2}${i}`,u={DOT_LITERAL:r,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:s,ONE_CHAR:"(?=.)",QMARK:o,END_ANCHOR:i,DOTS_SLASH:c,NO_DOT:`(?!${r})`,NO_DOTS:`(?!${a}${c})`,NO_DOT_SLASH:`(?!${r}{0,1}${i})`,NO_DOTS_SLASH:`(?!${c})`,QMARK_NO_DOT:`[^.${s}]`,STAR:`${o}*?`,START_ANCHOR:a},l={...u,SLASH_LITERAL:`[${t}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${r}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${r})`,NO_DOTS:`(?!(?:^|[${t}])${r}{1,2}(?:[${t}]|$))`,NO_DOT_SLASH:`(?!${r}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${r}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`};return eu={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:e.sep,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?l:u}}function gu(){return nu||(nu=1,function(e){const t=A,n="win32"===process.platform,{REGEX_BACKSLASH:r,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_GLOBAL:i}=mu();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>o.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,"\\$1"),e.toPosixSlashes=e=>e.replace(r,"/"),e.removeBackslashes=e=>e.replace(s,e=>"\\"===e?"":e),e.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},e.isWindows=e=>e&&"boolean"==typeof e.windows?e.windows:!0===n||"\\"===t.sep,e.escapeLast=(t,n,r)=>{const s=t.lastIndexOf(n,r);return-1===s?t:"\\"===t[s-1]?e.escapeLast(t,n,s-1):`${t.slice(0,s)}\\${t.slice(s)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(r=`(?:^(?!${r}).*$)`),r}}(hu)),hu}function yu(){return lu?uu:(lu=1,uu=function(){if(cu)return au;cu=1;const e=A,t=function(){if(su)return ru;su=1;const e=gu(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:s,CHAR_DOT:o,CHAR_EXCLAMATION_MARK:i,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:u,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:f,CHAR_QUESTION_MARK:p,CHAR_RIGHT_CURLY_BRACE:d,CHAR_RIGHT_PARENTHESES:h,CHAR_RIGHT_SQUARE_BRACKET:m}=mu(),g=e=>e===a||e===r,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return ru=(b,v)=>{const D=v||{},w=b.length-1,_=!0===D.parts||!0===D.scanToEnd,E=[],k=[],S=[];let A,C,P=b,O=-1,T=0,x=0,N=!1,$=!1,L=!1,R=!1,F=!1,I=!1,M=!1,j=!1,B=!1,z=!1,H=0,K={value:"",depth:0,isGlob:!1};const U=()=>O>=w,q=()=>P.charCodeAt(O+1),Z=()=>(A=C,P.charCodeAt(++O));for(;O<w;){let e;if(C=Z(),C!==r){if(!0===I||C===c){for(H++;!0!==U()&&(C=Z());)if(C!==r)if(C!==c){if(!0!==I&&C===o&&(C=Z())===o){if(N=K.isBrace=!0,L=K.isGlob=!0,z=!0,!0===_)continue;break}if(!0!==I&&C===s){if(N=K.isBrace=!0,L=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===d&&(H--,0===H)){I=!1,N=K.isBrace=!0,z=!0;break}}else H++;else M=K.backslashes=!0,Z();if(!0===_)continue;break}if(C!==a){if(!0!==D.noext&&1==(C===f||C===n||C===t||C===p||C===i)&&q()===u){if(L=K.isGlob=!0,R=K.isExtglob=!0,z=!0,C===i&&O===T&&(B=!0),!0===_){for(;!0!==U()&&(C=Z());)if(C!==r){if(C===h){L=K.isGlob=!0,z=!0;break}}else M=K.backslashes=!0,C=Z();continue}break}if(C===t){if(A===t&&(F=K.isGlobstar=!0),L=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===p){if(L=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===l){for(;!0!==U()&&(e=Z());)if(e!==r){if(e===m){$=K.isBracket=!0,L=K.isGlob=!0,z=!0;break}}else M=K.backslashes=!0,Z();if(!0===_)continue;break}if(!0===D.nonegate||C!==i||O!==T){if(!0!==D.noparen&&C===u){if(L=K.isGlob=!0,!0===_){for(;!0!==U()&&(C=Z());)if(C!==u){if(C===h){z=!0;break}}else M=K.backslashes=!0,C=Z();continue}break}if(!0===L){if(z=!0,!0===_)continue;break}}else j=K.negated=!0,T++}else{if(E.push(O),k.push(K),K={value:"",depth:0,isGlob:!1},!0===z)continue;if(A===o&&O===T+1){T+=2;continue}x=O+1}}else M=K.backslashes=!0,C=Z(),C===c&&(I=!0)}!0===D.noext&&(R=!1,L=!1);let G=P,W="",J="";T>0&&(W=P.slice(0,T),P=P.slice(T),x-=T),G&&!0===L&&x>0?(G=P.slice(0,x),J=P.slice(x)):!0===L?(G="",J=P):G=P,G&&""!==G&&"/"!==G&&G!==P&&g(G.charCodeAt(G.length-1))&&(G=G.slice(0,-1)),!0===D.unescape&&(J&&(J=e.removeBackslashes(J)),G&&!0===M&&(G=e.removeBackslashes(G)));const V={prefix:W,input:b,start:T,base:G,glob:J,isBrace:N,isBracket:$,isGlob:L,isExtglob:R,isGlobstar:F,negated:j,negatedExtglob:B};if(!0===D.tokens&&(V.maxDepth=0,g(C)||k.push(K),V.tokens=k),!0===D.parts||!0===D.tokens){let e;for(let t=0;t<E.length;t++){const n=e?e+1:T,r=E[t],s=b.slice(n,r);D.tokens&&(0===t&&0!==T?(k[t].isPrefix=!0,k[t].value=W):k[t].value=s,y(k[t]),V.maxDepth+=k[t].depth),0===t&&""===s||S.push(s),e=r}if(e&&e+1<b.length){const t=b.slice(e+1);S.push(t),D.tokens&&(k[k.length-1].value=t,y(k[k.length-1]),V.maxDepth+=k[k.length-1].depth)}V.slashes=E,V.parts=S}return V},ru}(),n=function(){if(iu)return ou;iu=1;const e=mu(),t=gu(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_BACKREF:o,REPLACEMENTS:i}=e,a=(e,n)=>{if("function"==typeof n.expandRange)return n.expandRange(...e,n);e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(n){return e.map(e=>t.escapeRegex(e)).join("..")}return r},c=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,u=(l,f)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=i[l]||l;const p={...f},d="number"==typeof p.maxLength?Math.min(n,p.maxLength):n;let h=l.length;if(h>d)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${d}`);const m={type:"bos",value:"",output:p.prepend||""},g=[m],y=p.capture?"":"?:",b=t.isWindows(f),v=e.globChars(b),D=e.extglobChars(v),{DOT_LITERAL:w,PLUS_LITERAL:_,SLASH_LITERAL:E,ONE_CHAR:k,DOTS_SLASH:S,NO_DOT:A,NO_DOT_SLASH:C,NO_DOTS_SLASH:P,QMARK:O,QMARK_NO_DOT:T,STAR:x,START_ANCHOR:N}=v,$=e=>`(${y}(?:(?!${N}${e.dot?S:w}).)*?)`,L=p.dot?"":A,R=p.dot?O:T;let F=!0===p.bash?$(p):x;p.capture&&(F=`(${F})`),"boolean"==typeof p.noext&&(p.noextglob=p.noext);const I={input:l,index:-1,start:0,dot:!0===p.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};l=t.removePrefix(l,I),h=l.length;const M=[],j=[],B=[];let z,H=m;const K=()=>I.index===h-1,U=I.peek=(e=1)=>l[I.index+e],q=I.advance=()=>l[++I.index]||"",Z=()=>l.slice(I.index+1),G=(e="",t=0)=>{I.consumed+=e,I.index+=t},W=e=>{I.output+=null!=e.output?e.output:e.value,G(e.value)},J=()=>{let e=1;for(;"!"===U()&&("("!==U(2)||"?"===U(3));)q(),I.start++,e++;return e%2!=0&&(I.negated=!0,I.start++,!0)},V=e=>{I[e]++,B.push(e)},Y=e=>{I[e]--,B.pop()},Q=e=>{if("globstar"===H.type){const t=I.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||M.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(I.output=I.output.slice(0,-H.output.length),H.type="star",H.value="*",H.output=F,I.output+=H.output)}if(M.length&&"paren"!==e.type&&(M[M.length-1].inner+=e.value),(e.value||e.output)&&W(e),H&&"text"===H.type&&"text"===e.type)return H.value+=e.value,void(H.output=(H.output||"")+e.value);e.prev=H,g.push(e),H=e},X=(e,t)=>{const n={...D[t],conditions:1,inner:""};n.prev=H,n.parens=I.parens,n.output=I.output;const r=(p.capture?"(":"")+n.open;V("parens"),Q({type:e,value:t,output:I.output?"":k}),Q({type:"paren",extglob:!0,value:q(),output:r}),M.push(n)},ee=e=>{let t,n=e.close+(p.capture?")":"");if("negate"===e.type){let r=F;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(r=$(p)),(r!==F||K()||/^\)+$/.test(Z()))&&(n=e.close=`)$))${r}`),e.inner.includes("*")&&(t=Z())&&/^\.[^\\/.]+$/.test(t)){const s=u(t,{...f,fastpaths:!1}).output;n=e.close=`)${s})${r})`}"bos"===e.prev.type&&(I.negatedExtglob=!0)}Q({type:"paren",extglob:!0,value:z,output:n}),Y("parens")};if(!1!==p.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let e=!1,n=l.replace(o,(t,n,r,s,o,i)=>"\\"===s?(e=!0,t):"?"===s?n?n+s+(o?O.repeat(o.length):""):0===i?R+(o?O.repeat(o.length):""):O.repeat(r.length):"."===s?w.repeat(r.length):"*"===s?n?n+s+(o?F:""):F:n?t:`\\${t}`);return!0===e&&(n=!0===p.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===l&&!0===p.contains?(I.output=l,I):(I.output=t.wrapOutput(n,I,f),I)}for(;!K();){if(z=q(),"\0"===z)continue;if("\\"===z){const e=U();if("/"===e&&!0!==p.bash)continue;if("."===e||";"===e)continue;if(!e){z+="\\",Q({type:"text",value:z});continue}const t=/^\\+/.exec(Z());let n=0;if(t&&t[0].length>2&&(n=t[0].length,I.index+=n,n%2!=0&&(z+="\\")),!0===p.unescape?z=q():z+=q(),0===I.brackets){Q({type:"text",value:z});continue}}if(I.brackets>0&&("]"!==z||"["===H.value||"[^"===H.value)){if(!1!==p.posix&&":"===z){const e=H.value.slice(1);if(e.includes("[")&&(H.posix=!0,e.includes(":"))){const e=H.value.lastIndexOf("["),t=H.value.slice(0,e),n=H.value.slice(e+2),s=r[n];if(s){H.value=t+s,I.backtrack=!0,q(),m.output||1!==g.indexOf(H)||(m.output=k);continue}}}("["===z&&":"!==U()||"-"===z&&"]"===U())&&(z=`\\${z}`),"]"!==z||"["!==H.value&&"[^"!==H.value||(z=`\\${z}`),!0===p.posix&&"!"===z&&"["===H.value&&(z="^"),H.value+=z,W({value:z});continue}if(1===I.quotes&&'"'!==z){z=t.escapeRegex(z),H.value+=z,W({value:z});continue}if('"'===z){I.quotes=1===I.quotes?0:1,!0===p.keepQuotes&&Q({type:"text",value:z});continue}if("("===z){V("parens"),Q({type:"paren",value:z});continue}if(")"===z){if(0===I.parens&&!0===p.strictBrackets)throw new SyntaxError(c("opening","("));const e=M[M.length-1];if(e&&I.parens===e.parens+1){ee(M.pop());continue}Q({type:"paren",value:z,output:I.parens?")":"\\)"}),Y("parens");continue}if("["===z){if(!0!==p.nobracket&&Z().includes("]"))V("brackets");else{if(!0!==p.nobracket&&!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));z=`\\${z}`}Q({type:"bracket",value:z});continue}if("]"===z){if(!0===p.nobracket||H&&"bracket"===H.type&&1===H.value.length){Q({type:"text",value:z,output:`\\${z}`});continue}if(0===I.brackets){if(!0===p.strictBrackets)throw new SyntaxError(c("opening","["));Q({type:"text",value:z,output:`\\${z}`});continue}Y("brackets");const e=H.value.slice(1);if(!0===H.posix||"^"!==e[0]||e.includes("/")||(z=`/${z}`),H.value+=z,W({value:z}),!1===p.literalBrackets||t.hasRegexChars(e))continue;const n=t.escapeRegex(H.value);if(I.output=I.output.slice(0,-H.value.length),!0===p.literalBrackets){I.output+=n,H.value=n;continue}H.value=`(${y}${n}|${H.value})`,I.output+=H.value;continue}if("{"===z&&!0!==p.nobrace){V("braces");const e={type:"brace",value:z,output:"(",outputIndex:I.output.length,tokensIndex:I.tokens.length};j.push(e),Q(e);continue}if("}"===z){const e=j[j.length-1];if(!0===p.nobrace||!e){Q({type:"text",value:z,output:z});continue}let t=")";if(!0===e.dots){const e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=a(n,p),I.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=I.output.slice(0,e.outputIndex),r=I.tokens.slice(e.tokensIndex);e.value=e.output="\\{",z=t="\\}",I.output=n;for(const e of r)I.output+=e.output||e.value}Q({type:"brace",value:z,output:t}),Y("braces"),j.pop();continue}if("|"===z){M.length>0&&M[M.length-1].conditions++,Q({type:"text",value:z});continue}if(","===z){let e=z;const t=j[j.length-1];t&&"braces"===B[B.length-1]&&(t.comma=!0,e="|"),Q({type:"comma",value:z,output:e});continue}if("/"===z){if("dot"===H.type&&I.index===I.start+1){I.start=I.index+1,I.consumed="",I.output="",g.pop(),H=m;continue}Q({type:"slash",value:z,output:E});continue}if("."===z){if(I.braces>0&&"dot"===H.type){"."===H.value&&(H.output=w);const e=j[j.length-1];H.type="dots",H.output+=z,H.value+=z,e.dots=!0;continue}if(I.braces+I.parens===0&&"bos"!==H.type&&"slash"!==H.type){Q({type:"text",value:z,output:w});continue}Q({type:"dot",value:z,output:w});continue}if("?"===z){if((!H||"("!==H.value)&&!0!==p.noextglob&&"("===U()&&"?"!==U(2)){X("qmark",z);continue}if(H&&"paren"===H.type){const e=U();let n=z;if("<"===e&&!t.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===H.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(Z()))&&(n=`\\${z}`),Q({type:"text",value:z,output:n});continue}if(!0!==p.dot&&("slash"===H.type||"bos"===H.type)){Q({type:"qmark",value:z,output:T});continue}Q({type:"qmark",value:z,output:O});continue}if("!"===z){if(!0!==p.noextglob&&"("===U()&&("?"!==U(2)||!/[!=<:]/.test(U(3)))){X("negate",z);continue}if(!0!==p.nonegate&&0===I.index){J();continue}}if("+"===z){if(!0!==p.noextglob&&"("===U()&&"?"!==U(2)){X("plus",z);continue}if(H&&"("===H.value||!1===p.regex){Q({type:"plus",value:z,output:_});continue}if(H&&("bracket"===H.type||"paren"===H.type||"brace"===H.type)||I.parens>0){Q({type:"plus",value:z});continue}Q({type:"plus",value:_});continue}if("@"===z){if(!0!==p.noextglob&&"("===U()&&"?"!==U(2)){Q({type:"at",extglob:!0,value:z,output:""});continue}Q({type:"text",value:z});continue}if("*"!==z){"$"!==z&&"^"!==z||(z=`\\${z}`);const e=s.exec(Z());e&&(z+=e[0],I.index+=e[0].length),Q({type:"text",value:z});continue}if(H&&("globstar"===H.type||!0===H.star)){H.type="star",H.star=!0,H.value+=z,H.output=F,I.backtrack=!0,I.globstar=!0,G(z);continue}let e=Z();if(!0!==p.noextglob&&/^\([^?]/.test(e)){X("star",z);continue}if("star"===H.type){if(!0===p.noglobstar){G(z);continue}const t=H.prev,n=t.prev,r="slash"===t.type||"bos"===t.type,s=n&&("star"===n.type||"globstar"===n.type);if(!0===p.bash&&(!r||e[0]&&"/"!==e[0])){Q({type:"star",value:z,output:""});continue}const o=I.braces>0&&("comma"===t.type||"brace"===t.type),i=M.length&&("pipe"===t.type||"paren"===t.type);if(!r&&"paren"!==t.type&&!o&&!i){Q({type:"star",value:z,output:""});continue}for(;"/**"===e.slice(0,3);){const t=l[I.index+4];if(t&&"/"!==t)break;e=e.slice(3),G("/**",3)}if("bos"===t.type&&K()){H.type="globstar",H.value+=z,H.output=$(p),I.output=H.output,I.globstar=!0,G(z);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!s&&K()){I.output=I.output.slice(0,-(t.output+H.output).length),t.output=`(?:${t.output}`,H.type="globstar",H.output=$(p)+(p.strictSlashes?")":"|$)"),H.value+=z,I.globstar=!0,I.output+=t.output+H.output,G(z);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const n=void 0!==e[1]?"|$":"";I.output=I.output.slice(0,-(t.output+H.output).length),t.output=`(?:${t.output}`,H.type="globstar",H.output=`${$(p)}${E}|${E}${n})`,H.value+=z,I.output+=t.output+H.output,I.globstar=!0,G(z+q()),Q({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){H.type="globstar",H.value+=z,H.output=`(?:^|${E}|${$(p)}${E})`,I.output=H.output,I.globstar=!0,G(z+q()),Q({type:"slash",value:"/",output:""});continue}I.output=I.output.slice(0,-H.output.length),H.type="globstar",H.output=$(p),H.value+=z,I.output+=H.output,I.globstar=!0,G(z);continue}const n={type:"star",value:z,output:F};!0!==p.bash?!H||"bracket"!==H.type&&"paren"!==H.type||!0!==p.regex?(I.index!==I.start&&"slash"!==H.type&&"dot"!==H.type||("dot"===H.type?(I.output+=C,H.output+=C):!0===p.dot?(I.output+=P,H.output+=P):(I.output+=L,H.output+=L),"*"!==U()&&(I.output+=k,H.output+=k)),Q(n)):(n.output=z,Q(n)):(n.output=".*?","bos"!==H.type&&"slash"!==H.type||(n.output=L+n.output),Q(n))}for(;I.brackets>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));I.output=t.escapeLast(I.output,"["),Y("brackets")}for(;I.parens>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing",")"));I.output=t.escapeLast(I.output,"("),Y("parens")}for(;I.braces>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","}"));I.output=t.escapeLast(I.output,"{"),Y("braces")}if(!0===p.strictSlashes||"star"!==H.type&&"bracket"!==H.type||Q({type:"maybe_slash",value:"",output:`${E}?`}),!0===I.backtrack){I.output="";for(const e of I.tokens)I.output+=null!=e.output?e.output:e.value,e.suffix&&(I.output+=e.suffix)}return I};return u.fastpaths=(r,s)=>{const o={...s},a="number"==typeof o.maxLength?Math.min(n,o.maxLength):n,c=r.length;if(c>a)throw new SyntaxError(`Input length: ${c}, exceeds maximum allowed length: ${a}`);r=i[r]||r;const u=t.isWindows(s),{DOT_LITERAL:l,SLASH_LITERAL:f,ONE_CHAR:p,DOTS_SLASH:d,NO_DOT:h,NO_DOTS:m,NO_DOTS_SLASH:g,STAR:y,START_ANCHOR:b}=e.globChars(u),v=o.dot?m:h,D=o.dot?g:h,w=o.capture?"":"?:";let _=!0===o.bash?".*?":y;o.capture&&(_=`(${_})`);const E=e=>!0===e.noglobstar?_:`(${w}(?:(?!${b}${e.dot?d:l}).)*?)`,k=e=>{switch(e){case"*":return`${v}${p}${_}`;case".*":return`${l}${p}${_}`;case"*.*":return`${v}${_}${l}${p}${_}`;case"*/*":return`${v}${_}${f}${p}${D}${_}`;case"**":return v+E(o);case"**/*":return`(?:${v}${E(o)}${f})?${D}${p}${_}`;case"**/*.*":return`(?:${v}${E(o)}${f})?${D}${_}${l}${p}${_}`;case"**/.*":return`(?:${v}${E(o)}${f})?${l}${p}${_}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=k(t[1]);if(!n)return;return n+l+t[2]}}},S=t.removePrefix(r,{negated:!1,prefix:""});let A=k(S);return A&&!0!==o.strictSlashes&&(A+=`${f}?`),A},ou=u}(),r=gu(),s=mu(),o=(e,t,n=!1)=>{if(Array.isArray(e)){const r=e.map(e=>o(e,t,n)),s=e=>{for(const t of r){const n=t(e);if(n)return n}return!1};return s}const s=(i=e)&&"object"==typeof i&&!Array.isArray(i)&&e.tokens&&e.input;var i;if(""===e||"string"!=typeof e&&!s)throw new TypeError("Expected pattern to be a non-empty string");const a=t||{},c=r.isWindows(t),u=s?o.compileRe(e,t):o.makeRe(e,t,!1,!0),l=u.state;delete u.state;let f=()=>!1;if(a.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};f=o(a.ignore,e,n)}const p=(n,r=!1)=>{const{isMatch:s,match:i,output:p}=o.test(n,u,t,{glob:e,posix:c}),d={glob:e,state:l,regex:u,posix:c,input:n,output:p,match:i,isMatch:s};return"function"==typeof a.onResult&&a.onResult(d),!1===s?(d.isMatch=!1,!!r&&d):f(n)?("function"==typeof a.onIgnore&&a.onIgnore(d),d.isMatch=!1,!!r&&d):("function"==typeof a.onMatch&&a.onMatch(d),!r||d)};return n&&(p.state=l),p};return o.test=(e,t,n,{glob:s,posix:i}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=n||{},c=a.format||(i?r.toPosixSlashes:null);let u=e===s,l=u&&c?c(e):e;return!1===u&&(l=c?c(e):e,u=l===s),!1!==u&&!0!==a.capture||(u=!0===a.matchBase||!0===a.basename?o.matchBase(e,t,n,i):t.exec(l)),{isMatch:Boolean(u),match:u,output:l}},o.matchBase=(t,n,s,i=r.isWindows(s))=>(n instanceof RegExp?n:o.makeRe(n,s)).test(e.basename(t)),o.isMatch=(e,t,n)=>o(t,n)(e),o.parse=(e,t)=>Array.isArray(e)?e.map(e=>o.parse(e,t)):n(e,{...t,fastpaths:!1}),o.scan=(e,n)=>t(e,n),o.compileRe=(e,t,n=!1,r=!1)=>{if(!0===n)return e.output;const s=t||{},i=s.contains?"":"^",a=s.contains?"":"$";let c=`${i}(?:${e.output})${a}`;e&&!0===e.negated&&(c=`^(?!${c}).*$`);const u=o.toRegex(c,t);return!0===r&&(u.state=e),u},o.makeRe=(e,t={},r=!1,s=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(i.output=n.fastpaths(e,t)),i.output||(i=n(e,t)),o.compileRe(i,t,r,s)},o.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},o.constants=s,au=o}())}var bu,vu,Du,wu={};function _u(){if(vu)return bu;vu=1;const e=P.PassThrough,t=Array.prototype.slice;function n(t,r){if(Array.isArray(t))for(let e=0,s=t.length;e<s;e++)t[e]=n(t[e],r);else{if(!t._readableState&&t.pipe&&(t=t.pipe(e(r))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}return bu=function(){const r=[],s=t.call(arguments);let o=!1,i=s[s.length-1];i&&!Array.isArray(i)&&null==i.pipe?s.pop():i={};const a=!1!==i.end,c=!0===i.pipeError;null==i.objectMode&&(i.objectMode=!0),null==i.highWaterMark&&(i.highWaterMark=65536);const u=e(i);function l(){for(let e=0,t=arguments.length;e<t;e++)r.push(n(arguments[e],i));return f(),this}function f(){if(o)return;o=!0;let e=r.shift();if(!e)return void process.nextTick(p);Array.isArray(e)||(e=[e]);let t=e.length+1;function n(){--t>0||(o=!1,f())}function s(e){function t(){e.removeListener("merge2UnpipeEnd",t),e.removeListener("end",t),c&&e.removeListener("error",r),n()}function r(e){u.emit("error",e)}if(e._readableState.endEmitted)return n();e.on("merge2UnpipeEnd",t),e.on("end",t),c&&e.on("error",r),e.pipe(u,{end:!1}),e.resume()}for(let t=0;t<e.length;t++)s(e[t]);n()}function p(){o=!1,u.emit("queueDrain"),a&&u.end()}return u.setMaxListeners(0),u.add=l,u.on("unpipe",function(e){e.emit("merge2UnpipeEnd")}),s.length&&l.apply(null,s),u},bu}var Eu,ku,Su,Au={};function Cu(){if(ku)return dc;ku=1,Object.defineProperty(dc,"__esModule",{value:!0}),dc.string=dc.stream=dc.pattern=dc.path=dc.fs=dc.errno=dc.array=void 0;const e=(fc||(fc=1,Object.defineProperty(hc,"__esModule",{value:!0}),hc.splitWhen=hc.flatten=void 0,hc.flatten=function(e){return e.reduce((e,t)=>[].concat(e,t),[])},hc.splitWhen=function(e,t){const n=[[]];let r=0;for(const s of e)t(s)?(r++,n[r]=[]):n[r].push(s);return n}),hc);dc.array=e;const t=(mc||(mc=1,Object.defineProperty(gc,"__esModule",{value:!0}),gc.isEnoentCodeError=void 0,gc.isEnoentCodeError=function(e){return"ENOENT"===e.code}),gc);dc.errno=t;const n=function(){if(yc)return vc;yc=1,Object.defineProperty(vc,"__esModule",{value:!0}),vc.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return vc.createDirentFromStats=function(t,n){return new e(t,n)},vc}();dc.fs=n;const r=function(){if(bc)return Dc;bc=1,Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.convertPosixPathToPattern=Dc.convertWindowsPathToPattern=Dc.convertPathToPattern=Dc.escapePosixPath=Dc.escapeWindowsPath=Dc.escape=Dc.removeLeadingDotSegment=Dc.makeAbsolute=Dc.unixify=void 0;const e=A,t="win32"===S.platform(),n=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,r=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,s=/^\\\\([.?])/,o=/\\(?![!()+@[\]{}])/g;function i(e){return e.replace(r,"\\$2")}function a(e){return e.replace(n,"\\$2")}function c(e){return i(e).replace(s,"//$1").replace(o,"/")}function u(e){return a(e)}return Dc.unixify=function(e){return e.replace(/\\/g,"/")},Dc.makeAbsolute=function(t,n){return e.resolve(t,n)},Dc.removeLeadingDotSegment=function(e){if("."===e.charAt(0)){const t=e.charAt(1);if("/"===t||"\\"===t)return e.slice(2)}return e},Dc.escape=t?i:a,Dc.escapeWindowsPath=i,Dc.escapePosixPath=a,Dc.convertPathToPattern=t?c:u,Dc.convertWindowsPathToPattern=c,Dc.convertPosixPathToPattern=u,Dc}();dc.path=r;const s=function(){if(du)return Cc;du=1,Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.isAbsolute=Cc.partitionAbsoluteAndRelative=Cc.removeDuplicateSlashes=Cc.matchAny=Cc.convertPatternsToRe=Cc.makeRe=Cc.getPatternParts=Cc.expandBraceExpansion=Cc.expandPatternsWithBraceExpansion=Cc.isAffectDepthOfReadingPattern=Cc.endsWithSlashGlobStar=Cc.hasGlobStar=Cc.getBaseDirectory=Cc.isPatternRelatedToParentDirectory=Cc.getPatternsOutsideCurrentDirectory=Cc.getPatternsInsideCurrentDirectory=Cc.getPositivePatterns=Cc.getNegativePatterns=Cc.isPositivePattern=Cc.isNegativePattern=Cc.convertToNegativePattern=Cc.convertToPositivePattern=Cc.isDynamicPattern=Cc.isStaticPattern=void 0;const e=A,t=function(){if(Ac)return Sc;Ac=1;var e=Pc(),t=A.posix.dirname,n="win32"===S.platform(),r=/\\/g,s=/[\{\[].*[\}\]]$/,o=/(^|[^\\])([\{\[]|\([^\)]+$)/,i=/\\([\!\*\?\|\[\]\(\)\{\}])/g;return Sc=function(a,c){Object.assign({flipBackslashes:!0},c).flipBackslashes&&n&&a.indexOf("/")<0&&(a=a.replace(r,"/")),s.test(a)&&(a+="/"),a+="a";do{a=t(a)}while(e(a)||o.test(a));return a.replace(i,"$1")}}(),n=function(){if(pu)return fu;pu=1;const e=C,t=Xc(),n=yu(),r=gu(),s=e=>""===e||"./"===e,o=e=>{const t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},i=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let s=new Set,o=new Set,i=new Set,a=0,c=e=>{i.add(e.output),r&&r.onResult&&r.onResult(e)};for(let i=0;i<t.length;i++){let u=n(String(t[i]),{...r,onResult:c},!0),l=u.state.negated||u.state.negatedExtglob;l&&a++;for(let t of e){let e=u(t,!0);(l?!e.isMatch:e.isMatch)&&(l?s.add(e.output):(s.delete(e.output),o.add(e.output)))}}let u=(a===t.length?[...i]:[...o]).filter(e=>!s.has(e));if(r&&0===u.length){if(!0===r.failglob)throw new Error(`No matches found for "${t.join(", ")}"`);if(!0===r.nonull||!0===r.nullglob)return r.unescape?t.map(e=>e.replace(/\\/g,"")):t}return u};return i.match=i,i.matcher=(e,t)=>n(e,t),i.any=i.isMatch=(e,t,r)=>n(t,r)(e),i.not=(e,t,n={})=>{t=[].concat(t).map(String);let r=new Set,s=[],o=new Set(i(e,t,{...n,onResult:e=>{n.onResult&&n.onResult(e),s.push(e.output)}}));for(let e of s)o.has(e)||r.add(e);return[...r]},i.contains=(t,n,r)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);if(Array.isArray(n))return n.some(e=>i.contains(t,e,r));if("string"==typeof n){if(s(t)||s(n))return!1;if(t.includes(n)||t.startsWith("./")&&t.slice(2).includes(n))return!0}return i.isMatch(t,n,{...r,contains:!0})},i.matchKeys=(e,t,n)=>{if(!r.isObject(e))throw new TypeError("Expected the first argument to be an object");let s=i(Object.keys(e),t,n),o={};for(let t of s)o[t]=e[t];return o},i.some=(e,t,r)=>{let s=[].concat(e);for(let e of[].concat(t)){let t=n(String(e),r);if(s.some(e=>t(e)))return!0}return!1},i.every=(e,t,r)=>{let s=[].concat(e);for(let e of[].concat(t)){let t=n(String(e),r);if(!s.every(e=>t(e)))return!1}return!0},i.all=(t,r,s)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);return[].concat(r).every(e=>n(e,s)(t))},i.capture=(e,t,s)=>{let o=r.isWindows(s),i=n.makeRe(String(e),{...s,capture:!0}).exec(o?r.toPosixSlashes(t):t);if(i)return i.slice(1).map(e=>void 0===e?"":e)},i.makeRe=(...e)=>n.makeRe(...e),i.scan=(...e)=>n.scan(...e),i.parse=(e,r)=>{let s=[];for(let o of[].concat(e||[]))for(let e of t(String(o),r))s.push(n.parse(e,r));return s},i.braces=(e,n)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return n&&!0===n.nobrace||!o(e)?[e]:t(e,n)},i.braceExpand=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return i.braces(e,{...t,expand:!0})},i.hasBraces=o,fu=i}(),r=/[*?]|^!/,s=/\[[^[]*]/,o=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,i=/[!*+?@]\([^(]*\)/,a=/,|\.\./,c=/(?!^)\/{2,}/g;function u(e,t={}){return!l(e,t)}function l(e,t={}){return!(""===e||!(!1===t.caseSensitiveMatch||e.includes("\\")||r.test(e)||s.test(e)||o.test(e)||!1!==t.extglob&&i.test(e)||!1!==t.braceExpansion&&function(e){const t=e.indexOf("{");if(-1===t)return!1;const n=e.indexOf("}",t+1);if(-1===n)return!1;const r=e.slice(t,n);return a.test(r)}(e)))}function f(e){return e.startsWith("!")&&"("!==e[1]}function p(e){return!f(e)}function d(e){return e.startsWith("..")||e.startsWith("./..")}function h(e){return e.endsWith("/**")}function m(e){const t=n.braces(e,{expand:!0,nodupes:!0,keepEscaping:!0});return t.sort((e,t)=>e.length-t.length),t.filter(e=>""!==e)}function g(e,t){return n.makeRe(e,t)}function y(t){return e.isAbsolute(t)}return Cc.isStaticPattern=u,Cc.isDynamicPattern=l,Cc.convertToPositivePattern=function(e){return f(e)?e.slice(1):e},Cc.convertToNegativePattern=function(e){return"!"+e},Cc.isNegativePattern=f,Cc.isPositivePattern=p,Cc.getNegativePatterns=function(e){return e.filter(f)},Cc.getPositivePatterns=function(e){return e.filter(p)},Cc.getPatternsInsideCurrentDirectory=function(e){return e.filter(e=>!d(e))},Cc.getPatternsOutsideCurrentDirectory=function(e){return e.filter(d)},Cc.isPatternRelatedToParentDirectory=d,Cc.getBaseDirectory=function(e){return t(e,{flipBackslashes:!1})},Cc.hasGlobStar=function(e){return e.includes("**")},Cc.endsWithSlashGlobStar=h,Cc.isAffectDepthOfReadingPattern=function(t){const n=e.basename(t);return h(t)||u(n)},Cc.expandPatternsWithBraceExpansion=function(e){return e.reduce((e,t)=>e.concat(m(t)),[])},Cc.expandBraceExpansion=m,Cc.getPatternParts=function(e,t){let{parts:r}=n.scan(e,Object.assign(Object.assign({},t),{parts:!0}));return 0===r.length&&(r=[e]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r},Cc.makeRe=g,Cc.convertPatternsToRe=function(e,t){return e.map(e=>g(e,t))},Cc.matchAny=function(e,t){return t.some(t=>t.test(e))},Cc.removeDuplicateSlashes=function(e){return e.replace(c,"/")},Cc.partitionAbsoluteAndRelative=function(e){const t=[],n=[];for(const r of e)y(r)?t.push(r):n.push(r);return[t,n]},Cc.isAbsolute=y,Cc}();dc.pattern=s;const o=function(){if(Du)return wu;Du=1,Object.defineProperty(wu,"__esModule",{value:!0}),wu.merge=void 0;const e=_u();function t(e){e.forEach(e=>e.emit("close"))}return wu.merge=function(n){const r=e(n);return n.forEach(e=>{e.once("error",e=>r.emit("error",e))}),r.once("close",()=>t(n)),r.once("end",()=>t(n)),r},wu}();dc.stream=o;const i=(Eu||(Eu=1,Object.defineProperty(Au,"__esModule",{value:!0}),Au.isEmpty=Au.isString=void 0,Au.isString=function(e){return"string"==typeof e},Au.isEmpty=function(e){return""===e}),Au);return dc.string=i,dc}var Pu,Ou={},Tu={},xu={},Nu={},$u={},Lu={},Ru={},Fu={},Iu={};var Mu,ju,Bu,zu,Hu,Ku,Uu,qu,Zu={},Gu={},Wu={};function Ju(){if(zu)return Fu;zu=1,Object.defineProperty(Fu,"__esModule",{value:!0}),Fu.statSync=Fu.stat=Fu.Settings=void 0;const e=function(){if(Pu)return Iu;function e(e,t){e(t)}function t(e,t){e(null,t)}return Pu=1,Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.read=void 0,Iu.read=function(n,r,s){r.fs.lstat(n,(o,i)=>{null===o?i.isSymbolicLink()&&r.followSymbolicLink?r.fs.stat(n,(n,o)=>{if(null!==n)return r.throwErrorOnBrokenSymbolicLink?void e(s,n):void t(s,i);r.markSymbolicLink&&(o.isSymbolicLink=()=>!0),t(s,o)}):t(s,i):e(s,o)})},Iu}(),t=(Mu||(Mu=1,Object.defineProperty(Zu,"__esModule",{value:!0}),Zu.read=void 0,Zu.read=function(e,t){const n=t.fs.lstatSync(e);if(!n.isSymbolicLink()||!t.followSymbolicLink)return n;try{const n=t.fs.statSync(e);return t.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(e){if(!t.throwErrorOnBrokenSymbolicLink)return n;throw e}}),Zu),n=function(){if(Bu)return Gu;Bu=1,Object.defineProperty(Gu,"__esModule",{value:!0});const e=(ju||(ju=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const t=T;e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Wu)),Wu);return Gu.default=class{constructor(t={}){this._options=t,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=e.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,t){return null!=e?e:t}},Gu}();function r(e={}){return e instanceof n.default?e:new n.default(e)}return Fu.Settings=n.default,Fu.stat=function(t,n,s){"function"!=typeof n?e.read(t,r(n),s):e.read(t,r(),n)},Fu.statSync=function(e,n){const s=r(n);return t.read(e,s)},Fu}var Vu,Yu={};function Qu(){if(Vu)return Yu;Vu=1,Object.defineProperty(Yu,"__esModule",{value:!0}),Yu.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),n=Number.parseInt(e[1],10),r=t>10,s=10===t&&n>=10;return Yu.IS_SUPPORT_READDIR_WITH_FILE_TYPES=r||s,Yu}var Xu,el,tl={},nl={};function rl(){if(el)return tl;el=1,Object.defineProperty(tl,"__esModule",{value:!0}),tl.fs=void 0;const e=function(){if(Xu)return nl;Xu=1,Object.defineProperty(nl,"__esModule",{value:!0}),nl.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return nl.createDirentFromStats=function(t,n){return new e(t,n)},nl}();return tl.fs=e,tl}var sl,ol,il={};function al(){return sl||(sl=1,Object.defineProperty(il,"__esModule",{value:!0}),il.joinPathSegments=void 0,il.joinPathSegments=function(e,t,n){return e.endsWith(n)?e+t:e+n+t}),il}function cl(){if(ol)return Ru;ol=1,Object.defineProperty(Ru,"__esModule",{value:!0}),Ru.readdir=Ru.readdirWithFileTypes=Ru.read=void 0;const e=Ju(),t=function(){if(qu)return Uu;qu=1,Uu=function(t,n){let r,s,o,i=!0;function a(t){function s(){n&&n(t,r),n=null}i?e(s):s()}function c(e,t,n){r[e]=n,(0===--s||t)&&a(t)}Array.isArray(t)?(r=[],s=t.length):(o=Object.keys(t),r={},s=o.length),s?o?o.forEach(function(e){t[e](function(t,n){c(e,t,n)})}):t.forEach(function(e,t){e(function(e,n){c(t,e,n)})}):a(null),i=!1};const e=function(){if(Ku)return Hu;let e;return Ku=1,Hu="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:q):t=>(e||(e=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))}();return Uu}(),n=Qu(),r=rl(),s=al();function o(e,n,o){n.fs.readdir(e,{withFileTypes:!0},(i,u)=>{if(null!==i)return void a(o,i);const l=u.map(t=>({dirent:t,name:t.name,path:s.joinPathSegments(e,t.name,n.pathSegmentSeparator)}));if(!n.followSymbolicLinks)return void c(o,l);const f=l.map(e=>function(e,t){return n=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(s,o)=>{if(null!==s)return t.throwErrorOnBrokenSymbolicLink?void n(s):void n(null,e);e.dirent=r.fs.createDirentFromStats(e.name,o),n(null,e)}):n(null,e)}}(e,n));t(f,(e,t)=>{null===e?c(o,t):a(o,e)})})}function i(n,o,i){o.fs.readdir(n,(u,l)=>{if(null!==u)return void a(i,u);const f=l.map(t=>{const i=s.joinPathSegments(n,t,o.pathSegmentSeparator);return n=>{e.stat(i,o.fsStatSettings,(e,s)=>{if(null!==e)return void n(e);const a={name:t,path:i,dirent:r.fs.createDirentFromStats(t,s)};o.stats&&(a.stats=s),n(null,a)})}});t(f,(e,t)=>{null===e?c(i,t):a(i,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Ru.read=function(e,t,r){t.stats||!n.IS_SUPPORT_READDIR_WITH_FILE_TYPES?i(e,t,r):o(e,t,r)},Ru.readdirWithFileTypes=o,Ru.readdir=i,Ru}var ul,ll,fl,pl,dl={},hl={},ml={};function gl(){if(pl)return Lu;pl=1,Object.defineProperty(Lu,"__esModule",{value:!0}),Lu.Settings=Lu.scandirSync=Lu.scandir=void 0;const e=cl(),t=function(){if(ul)return dl;ul=1,Object.defineProperty(dl,"__esModule",{value:!0}),dl.readdir=dl.readdirWithFileTypes=dl.read=void 0;const e=Ju(),t=Qu(),n=rl(),r=al();function s(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(s=>{const o={dirent:s,name:s.name,path:r.joinPathSegments(e,s.name,t.pathSegmentSeparator)};if(o.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(o.path);o.dirent=n.fs.createDirentFromStats(o.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return o})}function o(t,s){return s.fs.readdirSync(t).map(o=>{const i=r.joinPathSegments(t,o,s.pathSegmentSeparator),a=e.statSync(i,s.fsStatSettings),c={name:o,path:i,dirent:n.fs.createDirentFromStats(o,a)};return s.stats&&(c.stats=a),c})}return dl.read=function(e,n){return!n.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,n):o(e,n)},dl.readdirWithFileTypes=s,dl.readdir=o,dl}(),n=function(){if(fl)return hl;fl=1,Object.defineProperty(hl,"__esModule",{value:!0});const e=A,t=Ju(),n=(ll||(ll=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const t=T;e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(ml)),ml);return hl.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},hl}();function r(e={}){return e instanceof n.default?e:new n.default(e)}return Lu.Settings=n.default,Lu.scandir=function(t,n,s){"function"!=typeof n?e.read(t,r(n),s):e.read(t,r(),n)},Lu.scandirSync=function(e,n){const s=r(n);return t.read(e,s)},Lu}var yl,bl,vl,Dl={exports:{}};var wl,_l={};function El(){return wl||(wl=1,Object.defineProperty(_l,"__esModule",{value:!0}),_l.joinPathSegments=_l.replacePathSegmentSeparator=_l.isAppliedFilter=_l.isFatalError=void 0,_l.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},_l.isAppliedFilter=function(e,t){return null===e||e(t)},_l.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},_l.joinPathSegments=function(e,t,n){return""===e?t:e.endsWith(n)?e+t:e+n+t}),_l}var kl,Sl,Al,Cl={};function Pl(){if(kl)return Cl;kl=1,Object.defineProperty(Cl,"__esModule",{value:!0});const e=El();return Cl.default=class{constructor(t,n){this._root=t,this._settings=n,this._root=e.replacePathSegmentSeparator(t,n.pathSegmentSeparator)}},Cl}function Ol(){if(Sl)return $u;Sl=1,Object.defineProperty($u,"__esModule",{value:!0});const e=O,t=gl(),n=function(){if(vl)return Dl.exports;vl=1;var e=bl?yl:(bl=1,yl=function(e){var t=new e,n=t;return{get:function(){var r=t;return r.next?t=r.next:(t=new e,n=t),r.next=null,r},release:function(e){n.next=e,n=e}}});function t(t,s,o){if("function"==typeof t&&(o=s,s=t,t=null),!(o>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var i=e(r),a=null,c=null,u=0,l=null,f={push:function(e,r){var d=i.get();d.context=t,d.release=p,d.value=e,d.callback=r||n,d.errorHandler=l,u>=o||f.paused?c?(c.next=d,c=d):(a=d,c=d,f.saturated()):(u++,s.call(t,d.value,d.worked))},drain:n,saturated:n,pause:function(){f.paused=!0},paused:!1,get concurrency(){return o},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(o=e,!f.paused)for(;a&&u<o;)u++,p()},running:function(){return u},resume:function(){if(f.paused){if(f.paused=!1,null===a)return u++,void p();for(;a&&u<o;)u++,p()}},idle:function(){return 0===u&&0===f.length()},length:function(){for(var e=a,t=0;e;)e=e.next,t++;return t},getQueue:function(){for(var e=a,t=[];e;)t.push(e.value),e=e.next;return t},unshift:function(e,r){var d=i.get();d.context=t,d.release=p,d.value=e,d.callback=r||n,d.errorHandler=l,u>=o||f.paused?a?(d.next=a,a=d):(a=d,c=d,f.saturated()):(u++,s.call(t,d.value,d.worked))},empty:n,kill:function(){a=null,c=null,f.drain=n},killAndDrain:function(){a=null,c=null,f.drain(),f.drain=n},error:function(e){l=e}};return f;function p(e){e&&i.release(e);var n=a;n&&u<=o?f.paused?u--:(c===a&&(c=null),a=n.next,n.next=null,s.call(t,n.value,n.worked),null===c&&f.empty()):0===--u&&f.drain()}}function n(){}function r(){this.value=null,this.callback=n,this.next=null,this.release=n,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,r){var s=e.callback,o=e.errorHandler,i=e.value;e.value=null,e.callback=n,e.errorHandler&&o(t,i),s.call(e.context,t,r),e.release(e)}}return Dl.exports=t,Dl.exports.promise=function(e,r,s){"function"==typeof e&&(s=r,r=e,e=null);var o=t(e,function(e,t){r.call(this,e).then(function(e){t(null,e)},t)},s),i=o.push,a=o.unshift;return o.push=function(e){var t=new Promise(function(t,n){i(e,function(e,r){e?n(e):t(r)})});return t.catch(n),t},o.unshift=function(e){var t=new Promise(function(t,n){a(e,function(e,r){e?n(e):t(r)})});return t.catch(n),t},o.drained=function(){var e=new Promise(function(e){process.nextTick(function(){if(o.idle())e();else{var t=o.drain;o.drain=function(){"function"==typeof t&&t(),e(),o.drain=t}}})});return e},o},Dl.exports}(),r=El(),s=Pl();class o extends s.default{constructor(r,s){super(r,s),this._settings=s,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=n(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const n={directory:e,base:t};this._queue.push(n,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(n,r)=>{if(null===n){for(const t of r)this._handleEntry(t,e.base);t(null,void 0)}else t(n,void 0)})}_handleError(e){!this._isDestroyed&&r.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const n=e.path;void 0!==t&&(e.path=r.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),r.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&r.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return $u.default=o,$u}var Tl,xl,Nl,$l={},Ll={},Rl={};var Fl,Il,Ml={};function jl(){if(Il)return xu;Il=1,Object.defineProperty(xu,"__esModule",{value:!0}),xu.Settings=xu.walkStream=xu.walkSync=xu.walk=void 0;const e=function(){if(Al)return Nu;Al=1,Object.defineProperty(Nu,"__esModule",{value:!0});const e=Ol();return Nu.default=class{constructor(t,n){this._root=t,this._settings=n,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Nu}(),t=function(){if(Tl)return $l;Tl=1,Object.defineProperty($l,"__esModule",{value:!0});const e=P,t=Ol();return $l.default=class{constructor(n,r){this._root=n,this._settings=r,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},$l}(),n=function(){if(Nl)return Ll;Nl=1,Object.defineProperty(Ll,"__esModule",{value:!0});const e=function(){if(xl)return Rl;xl=1,Object.defineProperty(Rl,"__esModule",{value:!0});const e=gl(),t=El(),n=Pl();class r extends n.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const n=this._scandir(e,this._settings.fsScandirSettings);for(const e of n)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,n){const r=e.path;void 0!==n&&(e.path=t.joinPathSegments(n,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===n?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return Rl.default=r,Rl}();return Ll.default=class{constructor(t,n){this._root=t,this._settings=n,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},Ll}(),r=function(){if(Fl)return Ml;Fl=1,Object.defineProperty(Ml,"__esModule",{value:!0});const e=A,t=gl();return Ml.default=class{constructor(n={}){this._options=n,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ml}();function s(e={}){return e instanceof r.default?e:new r.default(e)}return xu.Settings=r.default,xu.walk=function(t,n,r){"function"!=typeof n?new e.default(t,s(n)).read(r):new e.default(t,s()).read(n)},xu.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},xu.walkStream=function(e,n){const r=s(n);return new t.default(e,r).read()},xu}var Bl,zl={};function Hl(){if(Bl)return zl;Bl=1,Object.defineProperty(zl,"__esModule",{value:!0});const e=A,t=Ju(),n=Cu();return zl.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},zl}var Kl,Ul,ql={};function Zl(){if(Kl)return ql;Kl=1,Object.defineProperty(ql,"__esModule",{value:!0});const e=P,t=Ju(),n=jl(),r=Hl();class s extends r.default{constructor(){super(...arguments),this._walkStream=n.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,n){const r=t.map(this._getFullEntryPath,this),s=new e.PassThrough({objectMode:!0});s._write=(e,o,i)=>this._getEntry(r[e],t[e],n).then(t=>{null!==t&&n.entryFilter(t)&&s.push(t),e===r.length-1&&s.end(),i()}).catch(i);for(let e=0;e<r.length;e++)s.write(e);return s}_getEntry(e,t,n){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(n.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,n)=>{this._stat(e,this._fsStatSettings,(e,r)=>null===e?t(r):n(e))})}}return ql.default=s,ql}var Gl,Wl,Jl,Vl={},Yl={},Ql={},Xl={};var ef,tf,nf,rf,sf,of={},af={},cf={};function uf(){if(rf)return Vl;rf=1,Object.defineProperty(Vl,"__esModule",{value:!0});const e=A,t=function(){if(Jl)return Yl;Jl=1,Object.defineProperty(Yl,"__esModule",{value:!0});const e=Cu(),t=function(){if(Wl)return Ql;Wl=1,Object.defineProperty(Ql,"__esModule",{value:!0});const e=function(){if(Gl)return Xl;Gl=1,Object.defineProperty(Xl,"__esModule",{value:!0});const e=Cu();return Xl.default=class{constructor(e,t,n){this._patterns=e,this._settings=t,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),n=this._splitSegmentsIntoSections(t);this._storage.push({complete:n.length<=1,pattern:e,segments:t,sections:n})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},Xl}();class t extends e.default{match(e){const t=e.split("/"),n=t.length,r=this._storage.filter(e=>!e.complete||e.segments.length>n);for(const e of r){const r=e.sections[0];if(!e.complete&&n>r.length)return!0;if(t.every((t,n)=>{const r=e.segments[n];return!(!r.dynamic||!r.patternRe.test(t))||!r.dynamic&&r.pattern===t}))return!0}return!1}}return Ql.default=t,Ql}();return Yl.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,n){const r=this._getMatcher(t),s=this._getNegativePatternsRe(n);return t=>this._filter(e,t,r,s)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const n=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(n,this._micromatchOptions)}_filter(t,n,r,s){if(this._isSkippedByDeep(t,n.path))return!1;if(this._isSkippedSymbolicLink(n))return!1;const o=e.path.removeLeadingDotSegment(n.path);return!this._isSkippedByPositivePatterns(o,r)&&this._isSkippedByNegativePatterns(o,s)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const n=t.split("/").length;return""===e?n:n-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,n){return!e.pattern.matchAny(t,n)}},Yl}(),n=function(){if(ef)return of;ef=1,Object.defineProperty(of,"__esModule",{value:!0});const e=Cu();return of.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,n){const[r,s]=e.pattern.partitionAbsoluteAndRelative(n),o={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(s,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,o)}_filter(t,n){const r=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(r))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const s=this._isMatchToPatternsSet(r,n,t.dirent.isDirectory());return this._settings.unique&&s&&this._createIndexRecord(r),s}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,n){return!!this._isMatchToPatterns(e,t.positive.all,n)&&!this._isMatchToPatterns(e,t.negative.relative,n)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,n)}_isMatchToAbsoluteNegative(t,n,r){if(0===n.length)return!1;const s=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(s,n,r)}_isMatchToPatterns(t,n,r){if(0===n.length)return!1;const s=e.pattern.matchAny(t,n);return!s&&r?e.pattern.matchAny(t+"/",n):s}},of}(),r=function(){if(tf)return af;tf=1,Object.defineProperty(af,"__esModule",{value:!0});const e=Cu();return af.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},af}(),s=function(){if(nf)return cf;nf=1,Object.defineProperty(cf,"__esModule",{value:!0});const e=Cu();return cf.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let n=t.path;return this._settings.absolute&&(n=e.path.makeAbsolute(this._settings.cwd,n),n=e.path.unixify(n)),this._settings.markDirectories&&t.dirent.isDirectory()&&(n+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:n}):n}},cf}();return Vl.default=class{constructor(e){this._settings=e,this.errorFilter=new r.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new s.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},Vl}var lf,ff,pf,df={},hf={},mf={};var gf,yf,bf,vf,Df,wf={},_f=function(){if(bf)return yf;bf=1;const e=function(){if(Su)return pc;Su=1,Object.defineProperty(pc,"__esModule",{value:!0}),pc.convertPatternGroupToTask=pc.convertPatternGroupsToTasks=pc.groupPatternsByBaseDirectory=pc.getNegativePatternsAsPositive=pc.getPositivePatterns=pc.convertPatternsToTasks=pc.generate=void 0;const e=Cu();function t(t,n){let r=t;return n.braceExpansion&&(r=e.pattern.expandPatternsWithBraceExpansion(r)),n.baseNameMatch&&(r=r.map(e=>e.includes("/")?e:`**/${e}`)),r.map(t=>e.pattern.removeDuplicateSlashes(t))}function n(t,n,r){const s=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),u=e.pattern.getPatternsInsideCurrentDirectory(t),l=o(c),f=o(u);return s.push(...i(l,n,r)),"."in f?s.push(a(".",u,n,r)):s.push(...i(f,n,r)),s}function r(t){return e.pattern.getPositivePatterns(t)}function s(t,n){return e.pattern.getNegativePatterns(t).concat(n).map(e.pattern.convertToPositivePattern)}function o(t){return t.reduce((t,n)=>{const r=e.pattern.getBaseDirectory(n);return r in t?t[r].push(n):t[r]=[n],t},{})}function i(e,t,n){return Object.keys(e).map(r=>a(r,e[r],t,n))}function a(t,n,r,s){return{dynamic:s,positive:n,negative:r,base:t,patterns:[].concat(n,r.map(e.pattern.convertToNegativePattern))}}return pc.generate=function(o,i){const a=t(o,i),c=t(i.ignore,i),u=r(a),l=s(a,c),f=u.filter(t=>e.pattern.isStaticPattern(t,i)),p=u.filter(t=>e.pattern.isDynamicPattern(t,i)),d=n(f,l,!1),h=n(p,l,!0);return d.concat(h)},pc.convertPatternsToTasks=n,pc.getPositivePatterns=r,pc.getNegativePatternsAsPositive=s,pc.groupPatternsByBaseDirectory=o,pc.convertPatternGroupsToTasks=i,pc.convertPatternGroupToTask=a,pc}(),t=function(){if(sf)return Ou;sf=1,Object.defineProperty(Ou,"__esModule",{value:!0});const e=function(){if(Ul)return Tu;Ul=1,Object.defineProperty(Tu,"__esModule",{value:!0});const e=jl(),t=Hl(),n=Zl();class r extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new n.default(this._settings)}dynamic(e,t){return new Promise((n,r)=>{this._walkAsync(e,t,(e,t)=>{null===e?n(t):r(e)})})}async static(e,t){const n=[],r=this._readerStream.static(e,t);return new Promise((e,t)=>{r.once("error",t),r.on("data",e=>n.push(e)),r.once("end",()=>e(n))})}}return Tu.default=r,Tu}(),t=uf();class n extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),n=this._getReaderOptions(e);return(await this.api(t,e,n)).map(e=>n.transform(e))}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}return Ou.default=n,Ou}(),n=function(){if(lf)return df;lf=1,Object.defineProperty(df,"__esModule",{value:!0});const e=P,t=Zl(),n=uf();class r extends n.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const n=this._getRootDirectory(t),r=this._getReaderOptions(t),s=this.api(n,t,r),o=new e.Readable({objectMode:!0,read:()=>{}});return s.once("error",e=>o.emit("error",e)).on("data",e=>o.emit("data",r.transform(e))).once("end",()=>o.emit("end")),o.once("close",()=>s.destroy()),o}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}return df.default=r,df}(),r=function(){if(pf)return hf;pf=1,Object.defineProperty(hf,"__esModule",{value:!0});const e=function(){if(ff)return mf;ff=1,Object.defineProperty(mf,"__esModule",{value:!0});const e=Ju(),t=jl(),n=Hl();class r extends n.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const n=[];for(const r of e){const e=this._getFullEntryPath(r),s=this._getEntry(e,r,t);null!==s&&t.entryFilter(s)&&n.push(s)}return n}_getEntry(e,t,n){try{const n=this._getStat(e);return this._makeEntry(n,t)}catch(e){if(n.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return mf.default=r,mf}(),t=uf();class n extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(t,e,n).map(n.transform)}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}return hf.default=n,hf}(),s=(gf||(gf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const t=T,n=S,r=Math.max(n.cpus().length,1);e.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:t.lstat,lstatSync:t.lstatSync,stat:t.stat,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync},e.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,r),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},e.DEFAULT_FILE_SYSTEM_ADAPTER),t)}}}(wf)),wf),o=Cu();async function i(e,n){c(e);const r=a(e,t.default,n),s=await Promise.all(r);return o.array.flatten(s)}function a(t,n,r){const o=[].concat(t),i=new s.default(r),a=e.generate(o,i),c=new n(i);return a.map(c.read,c)}function c(e){if(![].concat(e).every(e=>o.string.isString(e)&&!o.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(t){function i(e,t){c(e);const n=a(e,r.default,t);return o.array.flatten(n)}function u(e,t){c(e);const r=a(e,n.default,t);return o.stream.merge(r)}var l,f;t.glob=t,t.globSync=i,t.globStream=u,t.async=t,t.sync=i,t.stream=u,t.generateTasks=function(t,n){c(t);const r=[].concat(t),o=new s.default(n);return e.generate(r,o)},t.isDynamicPattern=function(e,t){c(e);const n=new s.default(t);return o.pattern.isDynamicPattern(e,n)},t.escapePath=function(e){return c(e),o.path.escape(e)},t.convertPathToPattern=function(e){return c(e),o.path.convertPathToPattern(e)},(l=t.posix||(t.posix={})).escapePath=function(e){return c(e),o.path.escapePosixPath(e)},l.convertPathToPattern=function(e){return c(e),o.path.convertPosixPathToPattern(e)},(f=t.win32||(t.win32={})).escapePath=function(e){return c(e),o.path.escapeWindowsPath(e)},f.convertPathToPattern=function(e){return c(e),o.path.convertWindowsPathToPattern(e)}}(i||(i={})),yf=i}(),Ef=Z(_f),kf=function(){if(Df)return vf;Df=1;var e=Pc(),t=A.posix.dirname,n="win32"===S.platform(),r="/",s=/\\/g,o=/\\([!*?|[\](){}])/g;function i(t){return!!/\([^()]+$/.test(t)||"{"===t[0]||"["===t[0]||!!/[^\\][{[]/.test(t)||e(t)}return vf=function(e,a){Object.assign({flipBackslashes:!0},a).flipBackslashes&&n&&e.indexOf(r)<0&&(e=e.replace(s,r)),function(e){var t;switch(e.slice(-1)){case"}":t="{";break;case"]":t="[";break;default:return!1}var n=e.indexOf(t);return!(n<0)&&e.slice(n+1,-1).includes(r)}(e)&&(e+=r),e+="a";do{e=t(e)}while(i(e));return e.replace(o,"$1")}}(),Sf=Z(kf);const Af=e=>""!==e&&".."!==e,Cf=e=>{if("string"!=typeof e||!e.trim())return null;const t=e.trim().replace(/[^A-Za-z0-9@/_-]/g,"_").replace(/\/{2,}/g,"/").trim().split("/").filter(e=>e.length>0);if(0===t.length)return null;for(const e of t)if(!Af(e))return null;return t.join("/")},Pf=async e=>{try{return(await l(e)).isFile()}catch{return!1}},Of="0.4.6";function Tf(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:i,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);const s=i.prototype,o=Object.keys(s);for(let e=0;e<o.length;e++){const t=o[e];t in n||(n[t]=s[t].bind(n))}}const s=n?.Parent??Object;class o extends s{}function i(e){var t;const s=n?.Parent?new o:this;r(s,e),(t=s._zod).deferred??(t.deferred=[]);for(const e of s._zod.deferred)e();return s}return Object.defineProperty(o,"name",{value:e}),Object.defineProperty(i,"init",{value:r}),Object.defineProperty(i,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class xf extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Nf extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const $f={};function Lf(e){return $f}function Rf(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function Ff(e,t){return"bigint"==typeof t?t.toString():t}function If(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Mf(e){return null==e}function jf(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const Bf=Symbol("evaluating");function zf(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Bf)return void 0===r&&(r=Bf,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Hf(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Kf(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Uf(e){return JSON.stringify(e)}const qf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Zf(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const Gf=If(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function Wf(e){if(!1===Zf(e))return!1;const t=e.constructor;if(void 0===t)return!0;if("function"!=typeof t)return!0;const n=t.prototype;return!1!==Zf(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function Jf(e){return Wf(e)?{...e}:Array.isArray(e)?[...e]:e}const Vf=new Set(["string","number","symbol"]);function Yf(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Qf(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function Xf(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}const ep={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function tp(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function np(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function rp(e){return"string"==typeof e?e:e?.message}function sp(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const s=rp(e.inst?._zod.def?.error?.(e))??rp(t?.error?.(e))??rp(n.customError?.(e))??rp(n.localeError?.(e))??"Invalid input";r.message=s}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function op(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function ip(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const ap=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Ff,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},cp=Tf("$ZodError",ap),up=Tf("$ZodError",ap,{Parent:Error});const lp=e=>(t,n,r,s)=>{const o=r?Object.assign(r,{async:!1}):{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new xf;if(i.issues.length){const t=new(s?.Err??e)(i.issues.map(e=>sp(e,o,Lf())));throw qf(t,s?.callee),t}return i.value},fp=e=>async(t,n,r,s)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise&&(i=await i),i.issues.length){const t=new(s?.Err??e)(i.issues.map(e=>sp(e,o,Lf())));throw qf(t,s?.callee),t}return i.value},pp=e=>(t,n,r)=>{const s=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},s);if(o instanceof Promise)throw new xf;return o.issues.length?{success:!1,error:new(e??cp)(o.issues.map(e=>sp(e,s,Lf())))}:{success:!0,data:o.value}},dp=pp(up),hp=e=>async(t,n,r)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},s);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(e=>sp(e,s,Lf())))}:{success:!0,data:o.value}},mp=hp(up),gp=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return lp(e)(t,n,s)},yp=e=>(t,n,r)=>lp(e)(t,n,r),bp=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return fp(e)(t,n,s)},vp=e=>async(t,n,r)=>fp(e)(t,n,r),Dp=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return pp(e)(t,n,s)},wp=e=>(t,n,r)=>pp(e)(t,n,r),_p=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return hp(e)(t,n,s)},Ep=e=>async(t,n,r)=>hp(e)(t,n,r),kp=/^[cC][^\s-]{8,}$/,Sp=/^[0-9a-z]+$/,Ap=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Cp=/^[0-9a-vA-V]{20}$/,Pp=/^[A-Za-z0-9]{27}$/,Op=/^[a-zA-Z0-9_-]{21}$/,Tp=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,xp=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Np=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,$p=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;const Lp=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Rp=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Fp=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ip=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Mp=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,jp=/^[A-Za-z0-9_-]*$/,Bp=/^\+(?:[0-9]){6,14}[0-9]$/,zp="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Hp=new RegExp(`^${zp}$`);function Kp(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}const Up=/^-?\d+$/,qp=/^-?\d+(?:\.\d+)?/,Zp=/^(?:true|false)$/i,Gp=/^[^A-Z]*$/,Wp=/^[^a-z]*$/,Jp=Tf("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Vp={number:"number",bigint:"bigint",object:"date"},Yp=Tf("$ZodCheckLessThan",(e,t)=>{Jp.init(e,t);const n=Vp[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Qp=Tf("$ZodCheckGreaterThan",(e,t)=>{Jp.init(e,t);const n=Vp[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Xp=Tf("$ZodCheckMultipleOf",(e,t)=>{Jp.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let s=(r.split(".")[1]||"").length;if(0===s&&/\d?e-\d?/.test(r)){const e=r.match(/\d?e-(\d?)/);e?.[1]&&(s=Number.parseInt(e[1]))}const o=n>s?n:s;return Number.parseInt(e.toFixed(o).replace(".",""))%Number.parseInt(t.toFixed(o).replace(".",""))/10**o}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ed=Tf("$ZodCheckNumberFormat",(e,t)=>{Jp.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[s,o]=ep[t.format];e._zod.onattach.push(e=>{const r=e._zod.bag;r.format=t.format,r.minimum=s,r.maximum=o,n&&(r.pattern=Up)}),e._zod.check=i=>{const a=i.value;if(n){if(!Number.isInteger(a))return void i.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?i.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}):i.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}))}a<s&&i.issues.push({origin:"number",input:a,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),a>o&&i.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inst:e})}}),td=Tf("$ZodCheckMaxLength",(e,t)=>{var n;Jp.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Mf(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const s=op(r);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),nd=Tf("$ZodCheckMinLength",(e,t)=>{var n;Jp.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Mf(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const s=op(r);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),rd=Tf("$ZodCheckLengthEquals",(e,t)=>{var n;Jp.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Mf(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const r=n.value,s=r.length;if(s===t.length)return;const o=op(r),i=s>t.length;n.issues.push({origin:o,...i?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),sd=Tf("$ZodCheckStringFormat",(e,t)=>{var n,r;Jp.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),od=Tf("$ZodCheckRegex",(e,t)=>{sd.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),id=Tf("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Gp),sd.init(e,t)}),ad=Tf("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Wp),sd.init(e,t)}),cd=Tf("$ZodCheckIncludes",(e,t)=>{Jp.init(e,t);const n=Yf(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ud=Tf("$ZodCheckStartsWith",(e,t)=>{Jp.init(e,t);const n=new RegExp(`^${Yf(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),ld=Tf("$ZodCheckEndsWith",(e,t)=>{Jp.init(e,t);const n=new RegExp(`.*${Yf(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),fd=Tf("$ZodCheckOverwrite",(e,t)=>{Jp.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class pd{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of r)this.content.push(e)}compile(){const e=Function,t=this?.args,n=[...(this?.content??[""]).map(e=>` ${e}`)];return new e(...t,n.join("\n"))}}const dd={major:4,minor:2,patch:1},hd=Tf("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=dd;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const t of r)for(const n of t._zod.onattach)n(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let r,s=tp(e);for(const o of t){if(o._zod.def.when){if(!o._zod.def.when(e))continue}else if(s)continue;const t=e.issues.length,i=o._zod.check(e);if(i instanceof Promise&&!1===n?.async)throw new xf;if(r||i instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await i;e.issues.length!==t&&(s||(s=tp(e,t)))});else{if(e.issues.length===t)continue;s||(s=tp(e,t))}}return r?r.then(()=>e):e},n=(n,s,o)=>{if(tp(n))return n.aborted=!0,n;const i=t(s,r,o);if(i instanceof Promise){if(!1===o.async)throw new xf;return i.then(t=>e._zod.parse(t,o))}return e._zod.parse(i,o)};e._zod.run=(s,o)=>{if(o.skipChecks)return e._zod.parse(s,o);if("backward"===o.direction){const t=e._zod.parse({value:s.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,s,o)):n(t,s,o)}const i=e._zod.parse(s,o);if(i instanceof Promise){if(!1===o.async)throw new xf;return i.then(e=>t(e,r,o))}return t(i,r,o)}}e["~standard"]={validate:t=>{try{const n=dp(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return mp(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),md=Tf("$ZodString",(e,t)=>{var n;hd.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=e._zod.bag,new RegExp(`^${n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*"}$`)),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),gd=Tf("$ZodStringFormat",(e,t)=>{sd.init(e,t),md.init(e,t)}),yd=Tf("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=xp),gd.init(e,t)}),bd=Tf("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Np(e))}else t.pattern??(t.pattern=Np());gd.init(e,t)}),vd=Tf("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=$p),gd.init(e,t)}),Dd=Tf("$ZodURL",(e,t)=>{gd.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),s=new URL(r);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=s.href:n.value=r)}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),wd=Tf("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),gd.init(e,t)}),_d=Tf("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Op),gd.init(e,t)}),Ed=Tf("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=kp),gd.init(e,t)}),kd=Tf("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Sp),gd.init(e,t)}),Sd=Tf("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ap),gd.init(e,t)}),Ad=Tf("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Cp),gd.init(e,t)}),Cd=Tf("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Pp),gd.init(e,t)}),Pd=Tf("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=Kp({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${zp}T(?:${r})$`)}(t)),gd.init(e,t)}),Od=Tf("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Hp),gd.init(e,t)}),Td=Tf("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${Kp(t)}$`)),gd.init(e,t)}),xd=Tf("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Tp),gd.init(e,t)}),Nd=Tf("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Lp),gd.init(e,t),e._zod.bag.format="ipv4"}),$d=Tf("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Rp),gd.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Ld=Tf("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Fp),gd.init(e,t)}),Rd=Tf("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ip),gd.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(2!==r.length)throw new Error;const[e,t]=r;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Fd(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Id=Tf("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Mp),gd.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Fd(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});const Md=Tf("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=jp),gd.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{(function(e){if(!jp.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Fd(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),jd=Tf("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Bp),gd.init(e,t)});const Bd=Tf("$ZodJWT",(e,t)=>{gd.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[r]=n;if(!r)return!1;const s=JSON.parse(atob(r));return!("typ"in s&&"JWT"!==s?.typ||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),zd=Tf("$ZodNumber",(e,t)=>{hd.init(e,t),e._zod.pattern=e._zod.bag.pattern??qp,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const s=n.value;if("number"==typeof s&&!Number.isNaN(s)&&Number.isFinite(s))return n;const o="number"==typeof s?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...o?{received:o}:{}}),n}}),Hd=Tf("$ZodNumberFormat",(e,t)=>{ed.init(e,t),zd.init(e,t)}),Kd=Tf("$ZodBoolean",(e,t)=>{hd.init(e,t),e._zod.pattern=Zp,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const s=n.value;return"boolean"==typeof s||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),Ud=Tf("$ZodUnknown",(e,t)=>{hd.init(e,t),e._zod.parse=e=>e}),qd=Tf("$ZodNever",(e,t)=>{hd.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function Zd(e,t,n){e.issues.length&&t.issues.push(...np(n,e.issues)),t.value[n]=e.value}const Gd=Tf("$ZodArray",(e,t)=>{hd.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const o=[];for(let e=0;e<s.length;e++){const i=s[e],a=t.element._zod.run({value:i,issues:[]},r);a instanceof Promise?o.push(a.then(t=>Zd(t,n,e))):Zd(a,n,e)}return o.length?Promise.all(o).then(()=>n):n}});function Wd(e,t,n,r){e.issues.length&&t.issues.push(...np(n,e.issues)),void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Jd(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=(r=e.shape,Object.keys(r).filter(e=>"optional"===r[e]._zod.optin&&"optional"===r[e]._zod.optout));var r;return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Vd(e,t,n,r,s,o){const i=[],a=s.keySet,c=s.catchall._zod,u=c.def.type;for(const s in t){if(a.has(s))continue;if("never"===u){i.push(s);continue}const o=c.run({value:t[s],issues:[]},r);o instanceof Promise?e.push(o.then(e=>Wd(e,n,s,t))):Wd(o,n,s,t)}return i.length&&n.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const Yd=Tf("$ZodObject",(e,t)=>{hd.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const r=If(()=>Jd(t));zf(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(const e of r.values)n[t].add(e)}}return n});const s=Zf,o=t.catchall;let i;e._zod.parse=(t,n)=>{i??(i=r.value);const a=t.value;if(!s(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};const c=[],u=i.shape;for(const e of i.keys){const r=u[e]._zod.run({value:a[e],issues:[]},n);r instanceof Promise?c.push(r.then(n=>Wd(n,t,e,a))):Wd(r,t,e,a)}return o?Vd(c,a,t,n,r.value,e):c.length?Promise.all(c).then(()=>t):t}}),Qd=Tf("$ZodObjectJIT",(e,t)=>{Yd.init(e,t);const n=e._zod.parse,r=If(()=>Jd(t));let s;const o=Zf,i=!$f.jitless,a=i&&Gf.value,c=t.catchall;let u;e._zod.parse=(l,f)=>{u??(u=r.value);const p=l.value;return o(p)?i&&a&&!1===f?.async&&!0!==f.jitless?(s||(s=(e=>{const t=new pd(["shape","payload","ctx"]),n=r.value,s=e=>{const t=Uf(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const o=Object.create(null);let i=0;for(const e of n.keys)o[e]="key_"+i++;t.write("const newResult = {};");for(const e of n.keys){const n=o[e],r=Uf(e);t.write(`const ${n} = ${s(e)};`),t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${r}, ...iss.path] : [${r}]\n })));\n }\n \n \n if (${n}.value === undefined) {\n if (${r} in input) {\n newResult[${r}] = undefined;\n }\n } else {\n newResult[${r}] = ${n}.value;\n }\n \n `)}t.write("payload.value = newResult;"),t.write("return payload;");const a=t.compile();return(t,n)=>a(e,t,n)})(t.shape)),l=s(l,f),c?Vd([],p,l,f,u,e):l):n(l,f):(l.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),l)}});function Xd(e,t,n,r){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const s=e.filter(e=>!tp(e));return 1===s.length?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>sp(e,r,Lf())))}),t)}const eh=Tf("$ZodUnion",(e,t)=>{hd.init(e,t),zf(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),zf(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),zf(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),zf(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>jf(e.source)).join("|")})$`)}});const n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=(s,o)=>{if(n)return r(s,o);let i=!1;const a=[];for(const e of t.options){const t=e._zod.run({value:s.value,issues:[]},o);if(t instanceof Promise)a.push(t),i=!0;else{if(0===t.issues.length)return t;a.push(t)}}return i?Promise.all(a).then(t=>Xd(t,s,e,o)):Xd(a,s,e,o)}}),th=Tf("$ZodIntersection",(e,t)=>{hd.init(e,t),e._zod.parse=(e,n)=>{const r=e.value,s=t.left._zod.run({value:r,issues:[]},n),o=t.right._zod.run({value:r,issues:[]},n);return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([t,n])=>rh(e,t,n)):rh(e,s,o)}});function nh(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(Wf(e)&&Wf(t)){const n=Object.keys(t),r=Object.keys(e).filter(e=>-1!==n.indexOf(e)),s={...e,...t};for(const n of r){const r=nh(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};s[n]=r.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const s=nh(e[r],t[r]);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function rh(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),tp(e))return e;const r=nh(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const sh=Tf("$ZodRecord",(e,t)=>{hd.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Wf(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const o=[],i=t.keyType._zod.values;if(i){n.value={};const a=new Set;for(const e of i)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){a.add("number"==typeof e?e.toString():e);const i=t.valueType._zod.run({value:s[e],issues:[]},r);i instanceof Promise?o.push(i.then(t=>{t.issues.length&&n.issues.push(...np(e,t.issues)),n.value[e]=t.value})):(i.issues.length&&n.issues.push(...np(e,i.issues)),n.value[e]=i.value)}let c;for(const e in s)a.has(e)||(c=c??[],c.push(e));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:c})}else{n.value={};for(const i of Reflect.ownKeys(s)){if("__proto__"===i)continue;const a=t.keyType._zod.run({value:i,issues:[]},r);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){"loose"===t.mode?n.value[i]=s[i]:n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(e=>sp(e,r,Lf())),input:i,path:[i],inst:e});continue}const c=t.valueType._zod.run({value:s[i],issues:[]},r);c instanceof Promise?o.push(c.then(e=>{e.issues.length&&n.issues.push(...np(i,e.issues)),n.value[a.value]=e.value})):(c.issues.length&&n.issues.push(...np(i,c.issues)),n.value[a.value]=c.value)}}return o.length?Promise.all(o).then(()=>n):n}}),oh=Tf("$ZodEnum",(e,t)=>{hd.init(e,t);const n=Rf(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(e=>Vf.has(typeof e)).map(e=>"string"==typeof e?Yf(e):e.toString()).join("|")})$`),e._zod.parse=(t,s)=>{const o=t.value;return r.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),ih=Tf("$ZodTransform",(e,t)=>{hd.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new Nf(e.constructor.name);const s=t.transform(n.value,n);if(r.async){return(s instanceof Promise?s:Promise.resolve(s)).then(e=>(n.value=e,n))}if(s instanceof Promise)throw new xf;return n.value=s,n}});function ah(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const ch=Tf("$ZodOptional",(e,t)=>{hd.init(e,t),e._zod.optin="optional",e._zod.optout="optional",zf(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),zf(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${jf(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>ah(t,e.value)):ah(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),uh=Tf("$ZodNullable",(e,t)=>{hd.init(e,t),zf(e._zod,"optin",()=>t.innerType._zod.optin),zf(e._zod,"optout",()=>t.innerType._zod.optout),zf(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${jf(e.source)}|null)$`):void 0}),zf(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),lh=Tf("$ZodDefault",(e,t)=>{hd.init(e,t),e._zod.optin="optional",zf(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>fh(e,t)):fh(r,t)}});function fh(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const ph=Tf("$ZodPrefault",(e,t)=>{hd.init(e,t),e._zod.optin="optional",zf(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),dh=Tf("$ZodNonOptional",(e,t)=>{hd.init(e,t),zf(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(t=>hh(t,e)):hh(s,e)}});function hh(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const mh=Tf("$ZodCatch",(e,t)=>{hd.init(e,t),zf(e._zod,"optin",()=>t.innerType._zod.optin),zf(e._zod,"optout",()=>t.innerType._zod.optout),zf(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>sp(e,n,Lf()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>sp(e,n,Lf()))},input:e.value}),e.issues=[]),e)}}),gh=Tf("$ZodPipe",(e,t)=>{hd.init(e,t),zf(e._zod,"values",()=>t.in._zod.values),zf(e._zod,"optin",()=>t.in._zod.optin),zf(e._zod,"optout",()=>t.out._zod.optout),zf(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>yh(e,t.in,n)):yh(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>yh(e,t.out,n)):yh(r,t.out,n)}});function yh(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const bh=Tf("$ZodReadonly",(e,t)=>{hd.init(e,t),zf(e._zod,"propValues",()=>t.innerType._zod.propValues),zf(e._zod,"values",()=>t.innerType._zod.values),zf(e._zod,"optin",()=>t.innerType?._zod?.optin),zf(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(vh):vh(r)}});function vh(e){return e.value=Object.freeze(e.value),e}const Dh=Tf("$ZodCustom",(e,t)=>{Jp.init(e,t),hd.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const r=n.value,s=t.fn(r);if(s instanceof Promise)return s.then(t=>wh(t,n,r,e));wh(s,n,r,e)}});function wh(e,t,n,r){if(!e){const e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(ip(e))}}var _h;class Eh{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];if(this._map.set(e,n),n&&"object"==typeof n&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}(_h=globalThis).__zod_globalRegistry??(_h.__zod_globalRegistry=new Eh);const kh=globalThis.__zod_globalRegistry;function Sh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Xf(t)})}function Ah(e,t){return new Yp({check:"less_than",...Xf(t),value:e,inclusive:!1})}function Ch(e,t){return new Yp({check:"less_than",...Xf(t),value:e,inclusive:!0})}function Ph(e,t){return new Qp({check:"greater_than",...Xf(t),value:e,inclusive:!1})}function Oh(e,t){return new Qp({check:"greater_than",...Xf(t),value:e,inclusive:!0})}function Th(e,t){return new Xp({check:"multiple_of",...Xf(t),value:e})}function xh(e,t){return new td({check:"max_length",...Xf(t),maximum:e})}function Nh(e,t){return new nd({check:"min_length",...Xf(t),minimum:e})}function $h(e,t){return new rd({check:"length_equals",...Xf(t),length:e})}function Lh(e){return new fd({check:"overwrite",tx:e})}function Rh(e){const t=function(e,t){const n=new Jp({check:"custom",...Xf(t)});return n._zod.check=e,n}(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(ip(e,n.value,t._zod.def));else{const r=e;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(ip(r))}},e(n.value,n)));return t}function Fh(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??kh,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ih(e,t,n={path:[],schemaPath:[]}){var r;const s=e._zod.def,o=t.seen.get(e);if(o){o.count++;return n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema}const i={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,i);const a=e._zod.toJSONSchema?.();if(a)i.schema=a;else{const r={...n,schemaPath:[...n.schemaPath,e],path:n.path},o=e._zod.parent;if(o)i.ref=o,Ih(o,t,r),t.seen.get(o).isParent=!0;else if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,r);else{const n=i.schema,o=t.processors[s.type];if(!o)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);o(e,t,n,r)}}const c=t.metadataRegistry.get(e);c&&Object.assign(i.schema,c),"input"===t.io&&Bh(e)&&(delete i.schema.examples,delete i.schema.default),"input"===t.io&&i.schema._prefault&&((r=i.schema).default??(r.default=i.schema._prefault)),delete i.schema._prefault;return t.seen.get(e).schema}function Mh(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=t=>{if(t[1].schema.$ref)return;const r=t[1],{ref:s,defId:o}=(t=>{const r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){const n=e.external.registry.get(t[0])?.id,s=e.external.uri??(e=>e);if(n)return{ref:s(n)};const o=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=o,{defId:o,ref:`${s("__shared")}#/${r}/${o}`}}if(t[1]===n)return{ref:"#"};const s=`#/${r}/`,o=t[1].schema.id??"__schema"+e.counter++;return{defId:o,ref:s+o}})(t);r.def={...r.schema},o&&(r.defId=o);const i=r.schema;for(const e in i)delete i[e];i.$ref=s};if("throw"===e.cycles)for(const t of e.seen.entries()){const e=t[1];if(e.cycle)throw new Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const n of e.seen.entries()){const s=n[1];if(t===n[0]){r(n);continue}if(e.external){const s=e.external.registry.get(n[0])?.id;if(t!==n[0]&&s){r(n);continue}}const o=e.metadataRegistry.get(n[0])?.id;o?r(n):(s.cycle||s.count>1&&"ref"===e.reused)&&r(n)}}function jh(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=t=>{const n=e.seen.get(t),s=n.def??n.schema,o={...s};if(null===n.ref)return;const i=n.ref;if(n.ref=null,i){r(i);const t=e.seen.get(i).schema;!t.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?(Object.assign(s,t),Object.assign(s,o)):(s.allOf=s.allOf??[],s.allOf.push(t))}n.isParent||e.override({zodSchema:t,jsonSchema:s,path:n.path??[]})};for(const t of[...e.seen.entries()].reverse())r(t[0]);const s={};if("draft-2020-12"===e.target?s.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?s.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const n=e.external.registry.get(t)?.id;if(!n)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(n)}Object.assign(s,n.def??n.schema);const o=e.external?.defs??{};for(const t of e.seen.entries()){const e=t[1];e.def&&e.defId&&(o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&("draft-2020-12"===e.target?s.$defs=o:s.definitions=o);try{const e=JSON.parse(JSON.stringify(s));return Object.defineProperty(e,"~standard",{value:{...t["~standard"],jsonSchema:{input:zh(t,"input"),output:zh(t,"output")}},enumerable:!1,writable:!1}),e}catch(e){throw new Error("Error converting schema to JSON.")}}function Bh(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if("transform"===r.type)return!0;if("array"===r.type)return Bh(r.element,n);if("set"===r.type)return Bh(r.valueType,n);if("lazy"===r.type)return Bh(r.getter(),n);if("promise"===r.type||"optional"===r.type||"nonoptional"===r.type||"nullable"===r.type||"readonly"===r.type||"default"===r.type||"prefault"===r.type)return Bh(r.innerType,n);if("intersection"===r.type)return Bh(r.left,n)||Bh(r.right,n);if("record"===r.type||"map"===r.type)return Bh(r.keyType,n)||Bh(r.valueType,n);if("pipe"===r.type)return Bh(r.in,n)||Bh(r.out,n);if("object"===r.type){for(const e in r.shape)if(Bh(r.shape[e],n))return!0;return!1}if("union"===r.type){for(const e of r.options)if(Bh(e,n))return!0;return!1}if("tuple"===r.type){for(const e of r.items)if(Bh(e,n))return!0;return!(!r.rest||!Bh(r.rest,n))}return!1}const zh=(e,t)=>n=>{const{libraryOptions:r,target:s}=n??{},o=Fh({...r??{},target:s,io:t,processors:{}});return Ih(e,o),Mh(o,e),jh(o,e)},Hh={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Kh=Tf("ZodISODateTime",(e,t)=>{Pd.init(e,t),gm.init(e,t)});function Uh(e){return function(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Xf(t)})}(Kh,e)}const qh=Tf("ZodISODate",(e,t)=>{Od.init(e,t),gm.init(e,t)});function Zh(e){return function(e,t){return new e({type:"string",format:"date",check:"string_format",...Xf(t)})}(qh,e)}const Gh=Tf("ZodISOTime",(e,t)=>{Td.init(e,t),gm.init(e,t)});function Wh(e){return function(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Xf(t)})}(Gh,e)}const Jh=Tf("ZodISODuration",(e,t)=>{xd.init(e,t),gm.init(e,t)});function Vh(e){return function(e,t){return new e({type:"string",format:"duration",check:"string_format",...Xf(t)})}(Jh,e)}const Yh=(e,t)=>{cp.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t=e=>e.message){const n={_errors:[]},r=e=>{for(const s of e.issues)if("invalid_union"===s.code&&s.errors.length)s.errors.map(e=>r({issues:e}));else if("invalid_key"===s.code)r({issues:s.issues});else if("invalid_element"===s.code)r({issues:s.issues});else if(0===s.path.length)n._errors.push(t(s));else{let e=n,r=0;for(;r<s.path.length;){const n=s.path[r];r===s.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(s))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){const n={},r=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Ff,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Ff,2)}},isEmpty:{get:()=>0===e.issues.length}})},Qh=Tf("ZodError",Yh),Xh=Tf("ZodError",Yh,{Parent:Error}),em=lp(Xh),tm=fp(Xh),nm=pp(Xh),rm=hp(Xh),sm=gp(Xh),om=yp(Xh),im=bp(Xh),am=vp(Xh),cm=Dp(Xh),um=wp(Xh),lm=_p(Xh),fm=Ep(Xh),pm=Tf("ZodType",(e,t)=>(hd.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:zh(e,"input"),output:zh(e,"output")}}),e.toJSONSchema=((e,t={})=>n=>{const r=Fh({...n,processors:t});return Ih(e,r),Mh(r,e),jh(r,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Kf(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]})),e.clone=(t,n)=>Qf(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>em(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>nm(e,t,n),e.parseAsync=async(t,n)=>tm(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>rm(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>sm(e,t,n),e.decode=(t,n)=>om(e,t,n),e.encodeAsync=async(t,n)=>im(e,t,n),e.decodeAsync=async(t,n)=>am(e,t,n),e.safeEncode=(t,n)=>cm(e,t,n),e.safeDecode=(t,n)=>um(e,t,n),e.safeEncodeAsync=async(t,n)=>lm(e,t,n),e.safeDecodeAsync=async(t,n)=>fm(e,t,n),e.refine=(t,n)=>e.check(function(e,t={}){return function(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Xf(n)})}(pg,e,t)}(t,n)),e.superRefine=t=>e.check(function(e){return Rh(e)}(t)),e.overwrite=t=>e.check(Lh(t)),e.optional=()=>ng(e),e.nullable=()=>sg(e),e.nullish=()=>ng(sg(e)),e.nonoptional=t=>function(e,t){return new ag({type:"nonoptional",innerType:e,...Xf(t)})}(e,t),e.array=()=>Zm(e),e.or=t=>Vm([e,t]),e.and=t=>new Ym({type:"intersection",left:e,right:t}),e.transform=t=>lg(e,function(e){return new eg({type:"transform",transform:e})}(t)),e.default=t=>{return n=t,new og({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():Jf(n)}});var n},e.prefault=t=>{return n=t,new ig({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():Jf(n)}});var n},e.catch=t=>{return new cg({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>lg(e,t),e.readonly=()=>new fg({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return kh.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>kh.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return kh.get(e);const n=e.clone();return kh.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),dm=Tf("_ZodString",(e,t)=>{md.init(e,t),pm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=n;r.type="string";const{minimum:s,maximum:o,format:i,patterns:a,contentEncoding:c}=e._zod.bag;if("number"==typeof s&&(r.minLength=s),"number"==typeof o&&(r.maxLength=o),i&&(r.format=Hh[i]??i,""===r.format&&delete r.format),c&&(r.contentEncoding=c),a&&a.size>0){const e=[...a];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,n);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(function(e,t){return new od({check:"string_format",format:"regex",...Xf(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new cd({check:"string_format",format:"includes",...Xf(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new ud({check:"string_format",format:"starts_with",...Xf(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new ld({check:"string_format",format:"ends_with",...Xf(t),suffix:e})}(...t)),e.min=(...t)=>e.check(Nh(...t)),e.max=(...t)=>e.check(xh(...t)),e.length=(...t)=>e.check($h(...t)),e.nonempty=(...t)=>e.check(Nh(1,...t)),e.lowercase=t=>e.check(function(e){return new id({check:"string_format",format:"lowercase",...Xf(e)})}(t)),e.uppercase=t=>e.check(function(e){return new ad({check:"string_format",format:"uppercase",...Xf(e)})}(t)),e.trim=()=>e.check(Lh(e=>e.trim())),e.normalize=(...t)=>e.check(function(e){return Lh(t=>t.normalize(e))}(...t)),e.toLowerCase=()=>e.check(Lh(e=>e.toLowerCase())),e.toUpperCase=()=>e.check(Lh(e=>e.toUpperCase())),e.slugify=()=>e.check(Lh(e=>function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}(e)))}),hm=Tf("ZodString",(e,t)=>{md.init(e,t),dm.init(e,t),e.email=t=>e.check(function(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Xf(t)})}(ym,t)),e.url=t=>e.check(function(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Xf(t)})}(Dm,t)),e.jwt=t=>e.check(function(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Xf(t)})}(Rm,t)),e.emoji=t=>e.check(function(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Xf(t)})}(wm,t)),e.guid=t=>e.check(Sh(bm,t)),e.uuid=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Xf(t)})}(vm,t)),e.uuidv4=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Xf(t)})}(vm,t)),e.uuidv6=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Xf(t)})}(vm,t)),e.uuidv7=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Xf(t)})}(vm,t)),e.nanoid=t=>e.check(function(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Xf(t)})}(_m,t)),e.guid=t=>e.check(Sh(bm,t)),e.cuid=t=>e.check(function(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Xf(t)})}(Em,t)),e.cuid2=t=>e.check(function(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Xf(t)})}(km,t)),e.ulid=t=>e.check(function(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Xf(t)})}(Sm,t)),e.base64=t=>e.check(function(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Xf(t)})}(Nm,t)),e.base64url=t=>e.check(function(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Xf(t)})}($m,t)),e.xid=t=>e.check(function(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Xf(t)})}(Am,t)),e.ksuid=t=>e.check(function(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Xf(t)})}(Cm,t)),e.ipv4=t=>e.check(function(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Xf(t)})}(Pm,t)),e.ipv6=t=>e.check(function(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Xf(t)})}(Om,t)),e.cidrv4=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Xf(t)})}(Tm,t)),e.cidrv6=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Xf(t)})}(xm,t)),e.e164=t=>e.check(function(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Xf(t)})}(Lm,t)),e.datetime=t=>e.check(Uh(t)),e.date=t=>e.check(Zh(t)),e.time=t=>e.check(Wh(t)),e.duration=t=>e.check(Vh(t))});function mm(e){return function(e,t){return new e({type:"string",...Xf(t)})}(hm,e)}const gm=Tf("ZodStringFormat",(e,t)=>{gd.init(e,t),dm.init(e,t)}),ym=Tf("ZodEmail",(e,t)=>{vd.init(e,t),gm.init(e,t)}),bm=Tf("ZodGUID",(e,t)=>{yd.init(e,t),gm.init(e,t)}),vm=Tf("ZodUUID",(e,t)=>{bd.init(e,t),gm.init(e,t)}),Dm=Tf("ZodURL",(e,t)=>{Dd.init(e,t),gm.init(e,t)}),wm=Tf("ZodEmoji",(e,t)=>{wd.init(e,t),gm.init(e,t)}),_m=Tf("ZodNanoID",(e,t)=>{_d.init(e,t),gm.init(e,t)}),Em=Tf("ZodCUID",(e,t)=>{Ed.init(e,t),gm.init(e,t)}),km=Tf("ZodCUID2",(e,t)=>{kd.init(e,t),gm.init(e,t)}),Sm=Tf("ZodULID",(e,t)=>{Sd.init(e,t),gm.init(e,t)}),Am=Tf("ZodXID",(e,t)=>{Ad.init(e,t),gm.init(e,t)}),Cm=Tf("ZodKSUID",(e,t)=>{Cd.init(e,t),gm.init(e,t)}),Pm=Tf("ZodIPv4",(e,t)=>{Nd.init(e,t),gm.init(e,t)}),Om=Tf("ZodIPv6",(e,t)=>{$d.init(e,t),gm.init(e,t)}),Tm=Tf("ZodCIDRv4",(e,t)=>{Ld.init(e,t),gm.init(e,t)}),xm=Tf("ZodCIDRv6",(e,t)=>{Rd.init(e,t),gm.init(e,t)}),Nm=Tf("ZodBase64",(e,t)=>{Id.init(e,t),gm.init(e,t)}),$m=Tf("ZodBase64URL",(e,t)=>{Md.init(e,t),gm.init(e,t)}),Lm=Tf("ZodE164",(e,t)=>{jd.init(e,t),gm.init(e,t)}),Rm=Tf("ZodJWT",(e,t)=>{Bd.init(e,t),gm.init(e,t)}),Fm=Tf("ZodNumber",(e,t)=>{zd.init(e,t),pm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=n,{minimum:s,maximum:o,format:i,multipleOf:a,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;"string"==typeof i&&i.includes("int")?r.type="integer":r.type="number","number"==typeof u&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.minimum=u,r.exclusiveMinimum=!0):r.exclusiveMinimum=u),"number"==typeof s&&(r.minimum=s,"number"==typeof u&&"draft-04"!==t.target&&(u>=s?delete r.minimum:delete r.exclusiveMinimum)),"number"==typeof c&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.maximum=c,r.exclusiveMaximum=!0):r.exclusiveMaximum=c),"number"==typeof o&&(r.maximum=o,"number"==typeof c&&"draft-04"!==t.target&&(c<=o?delete r.maximum:delete r.exclusiveMaximum)),"number"==typeof a&&(r.multipleOf=a)})(e,t,n),e.gt=(t,n)=>e.check(Ph(t,n)),e.gte=(t,n)=>e.check(Oh(t,n)),e.min=(t,n)=>e.check(Oh(t,n)),e.lt=(t,n)=>e.check(Ah(t,n)),e.lte=(t,n)=>e.check(Ch(t,n)),e.max=(t,n)=>e.check(Ch(t,n)),e.int=t=>e.check(Mm(t)),e.safe=t=>e.check(Mm(t)),e.positive=t=>e.check(Ph(0,t)),e.nonnegative=t=>e.check(Oh(0,t)),e.negative=t=>e.check(Ah(0,t)),e.nonpositive=t=>e.check(Ch(0,t)),e.multipleOf=(t,n)=>e.check(Th(t,n)),e.step=(t,n)=>e.check(Th(t,n)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});const Im=Tf("ZodNumberFormat",(e,t)=>{Hd.init(e,t),Fm.init(e,t)});function Mm(e){return function(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Xf(t)})}(Im,e)}const jm=Tf("ZodBoolean",(e,t)=>{Kd.init(e,t),pm.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.type="boolean"})(0,0,t)});function Bm(e){return function(e,t){return new e({type:"boolean",...Xf(t)})}(jm,e)}const zm=Tf("ZodUnknown",(e,t)=>{Ud.init(e,t),pm.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Hm(){return new zm({type:"unknown"})}const Km=Tf("ZodNever",(e,t)=>{qd.init(e,t),pm.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.not={}})(0,0,t)});function Um(e){return function(e,t){return new e({type:"never",...Xf(t)})}(Km,e)}const qm=Tf("ZodArray",(e,t)=>{Gd.init(e,t),pm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=n,o=e._zod.def,{minimum:i,maximum:a}=e._zod.bag;"number"==typeof i&&(s.minItems=i),"number"==typeof a&&(s.maxItems=a),s.type="array",s.items=Ih(o.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(Nh(t,n)),e.nonempty=t=>e.check(Nh(1,t)),e.max=(t,n)=>e.check(xh(t,n)),e.length=(t,n)=>e.check($h(t,n)),e.unwrap=()=>e.element});function Zm(e,t){return function(e,t,n){return new e({type:"array",element:t,...Xf(n)})}(qm,e,t)}const Gm=Tf("ZodObject",(e,t)=>{Qd.init(e,t),pm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=n,o=e._zod.def;s.type="object",s.properties={};const i=o.shape;for(const e in i)s.properties[e]=Ih(i[e],t,{...r,path:[...r.path,"properties",e]});const a=new Set(Object.keys(i)),c=new Set([...a].filter(e=>{const n=o.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));c.size>0&&(s.required=Array.from(c)),"never"===o.catchall?._zod.def.type?s.additionalProperties=!1:o.catchall?o.catchall&&(s.additionalProperties=Ih(o.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(s.additionalProperties=!1)})(e,t,n,r),zf(e,"shape",()=>t.shape),e.keyof=()=>function(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Xm({type:"enum",entries:n,...Xf(t)})}(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Hm()}),e.loose=()=>e.clone({...e._zod.def,catchall:Hm()}),e.strict=()=>e.clone({...e._zod.def,catchall:Um()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!Wf(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const r=Kf(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Hf(this,"shape",n),n},checks:[]});return Qf(e,r)}(e,t),e.safeExtend=t=>function(e,t){if(!Wf(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return Hf(this,"shape",n),n},checks:e._zod.def.checks};return Qf(e,n)}(e,t),e.merge=t=>function(e,t){const n=Kf(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return Hf(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Qf(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def;return Qf(e,Kf(e._zod.def,{get shape(){const e={};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Hf(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,r=Kf(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Hf(this,"shape",r),r},checks:[]});return Qf(e,r)}(e,t),e.partial=(...t)=>function(e,t,n){const r=Kf(t._zod.def,{get shape(){const r=t._zod.def.shape,s={...r};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(s[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(const t in r)s[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return Hf(this,"shape",s),s},checks:[]});return Qf(t,r)}(tg,e,t[0]),e.required=(...t)=>function(e,t,n){const r=Kf(t._zod.def,{get shape(){const r=t._zod.def.shape,s={...r};if(n)for(const t in n){if(!(t in s))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(s[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(const t in r)s[t]=new e({type:"nonoptional",innerType:r[t]});return Hf(this,"shape",s),s},checks:[]});return Qf(t,r)}(ag,e,t[0])});function Wm(e,t){const n={type:"object",shape:e??{},...Xf(t)};return new Gm(n)}const Jm=Tf("ZodUnion",(e,t)=>{eh.init(e,t),pm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def,o=!1===s.inclusive,i=s.options.map((e,n)=>Ih(e,t,{...r,path:[...r.path,o?"oneOf":"anyOf",n]}));o?n.oneOf=i:n.anyOf=i})(e,t,n,r),e.options=t.options});function Vm(e,t){return new Jm({type:"union",options:e,...Xf(t)})}const Ym=Tf("ZodIntersection",(e,t)=>{th.init(e,t),pm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def,o=Ih(s.left,t,{...r,path:[...r.path,"allOf",0]}),i=Ih(s.right,t,{...r,path:[...r.path,"allOf",1]}),a=e=>"allOf"in e&&1===Object.keys(e).length,c=[...a(o)?o.allOf:[o],...a(i)?i.allOf:[i]];n.allOf=c})(e,t,n,r)});const Qm=Tf("ZodRecord",(e,t)=>{sh.init(e,t),pm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=n,o=e._zod.def;s.type="object","draft-07"!==t.target&&"draft-2020-12"!==t.target||(s.propertyNames=Ih(o.keyType,t,{...r,path:[...r.path,"propertyNames"]})),s.additionalProperties=Ih(o.valueType,t,{...r,path:[...r.path,"additionalProperties"]})})(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});const Xm=Tf("ZodEnum",(e,t)=>{oh.init(e,t),pm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=Rf(e._zod.def.entries);r.every(e=>"number"==typeof e)&&(n.type="number"),r.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=r})(e,0,n),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const s={};for(const r of e){if(!n.has(r))throw new Error(`Key ${r} not found in enum`);s[r]=t.entries[r]}return new Xm({...t,checks:[],...Xf(r),entries:s})},e.exclude=(e,r)=>{const s={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete s[t]}return new Xm({...t,checks:[],...Xf(r),entries:s})}});const eg=Tf("ZodTransform",(e,t)=>{ih.init(e,t),pm.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema")})(0,e),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new Nf(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(ip(r,n.value,t));else{const t=r;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(ip(t))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(e=>(n.value=e,n)):(n.value=s,n)}});const tg=Tf("ZodOptional",(e,t)=>{ch.init(e,t),pm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def;Ih(s.innerType,t,r),t.seen.get(e).ref=s.innerType})(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});function ng(e){return new tg({type:"optional",innerType:e})}const rg=Tf("ZodNullable",(e,t)=>{uh.init(e,t),pm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def,o=Ih(s.innerType,t,r),i=t.seen.get(e);"openapi-3.0"===t.target?(i.ref=s.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function sg(e){return new rg({type:"nullable",innerType:e})}const og=Tf("ZodDefault",(e,t)=>{lh.init(e,t),pm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def;Ih(s.innerType,t,r),t.seen.get(e).ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});const ig=Tf("ZodPrefault",(e,t)=>{ph.init(e,t),pm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def;Ih(s.innerType,t,r),t.seen.get(e).ref=s.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});const ag=Tf("ZodNonOptional",(e,t)=>{dh.init(e,t),pm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def;Ih(s.innerType,t,r),t.seen.get(e).ref=s.innerType})(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});const cg=Tf("ZodCatch",(e,t)=>{mh.init(e,t),pm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def;let o;Ih(s.innerType,t,r),t.seen.get(e).ref=s.innerType;try{o=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=o})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});const ug=Tf("ZodPipe",(e,t)=>{gh.init(e,t),pm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def,o="input"===t.io?"transform"===s.in._zod.def.type?s.out:s.in:s.out;Ih(o,t,r),t.seen.get(e).ref=o})(e,t,0,r),e.in=t.in,e.out=t.out});function lg(e,t){return new ug({type:"pipe",in:e,out:t})}const fg=Tf("ZodReadonly",(e,t)=>{bh.init(e,t),pm.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def;Ih(s.innerType,t,r),t.seen.get(e).ref=s.innerType,n.readOnly=!0})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});const pg=Tf("ZodCustom",(e,t)=>{Dh.init(e,t),pm.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")})(0,e)});function dg(e){return function(e,t){return new e({type:"number",coerce:!0,checks:[],...Xf(t)})}(Fm,e)}const hg=Vm([Bm(),mm(),function(e,t){return new e({type:"number",checks:[],...Xf(t)})}(Fm,mg)]).transform(e=>{if("boolean"==typeof e)return e;if("number"==typeof e)return 1===e;const t=e.trim().toLowerCase();return"1"===t||"true"===t||"0"!==t&&"false"!==t&&void 0}).optional();var mg;const gg=Wm({script:mm().min(1,{message:"script must be a non-empty string"}),warnPattern:mm().min(1,{message:"warnPattern must be a non-empty string"}).optional().refine(e=>"string"!=typeof e||(e=>{try{return new RegExp(e),!0}catch{return!1}})(e),{message:"warnPattern: invalid regular expression"}),warnPatternFlags:mm().optional().refine(e=>"string"!=typeof e||(e=>{try{return new RegExp("",e),!0}catch{return!1}})(e),{message:"warnPatternFlags: invalid regex flags"})}).strict(),yg=function(e,t,n){return new Qm({type:"record",keyType:e,valueType:t,...Xf(n)})}(mm(),Vm([mm().min(1),gg])).default({}),bg=Wm({archive:hg,combine:hg,keep:hg,sequential:hg,live:hg,plan:hg,facets:hg,hangWarn:dg().int().positive().optional(),hangKill:dg().int().positive().optional(),hangKillGrace:dg().int().positive().optional(),scripts:Vm([Bm(),Zm(mm())]).optional(),prompt:mm().optional()}).strict().optional(),vg=Wm({file:mm().optional()}).strict().optional(),Dg=Wm({stash:hg}).strict().optional(),wg=Wm({debug:hg,boring:hg,patch:vg,run:bg,snap:Dg}).strict().optional(),_g=Wm({scripts:yg,cliDefaults:wg,patchOpenCommand:mm().optional(),maxUndos:dg().int().positive().optional(),devMode:hg}).strict(),Eg=e=>{if(["archive","init"].filter(t=>Object.prototype.hasOwnProperty.call(e,t)).length>0)throw new Error('scripts: keys "archive" and "init" not allowed')};var kg="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Sg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ag,Cg={},Pg={},Og={},Tg={};function xg(){if(Ag)return Tg;Ag=1;const e=Symbol.for("yaml.alias"),t=Symbol.for("yaml.document"),n=Symbol.for("yaml.map"),r=Symbol.for("yaml.pair"),s=Symbol.for("yaml.scalar"),o=Symbol.for("yaml.seq"),i=Symbol.for("yaml.node.type"),a=e=>!!e&&"object"==typeof e&&e[i]===s;function c(e){if(e&&"object"==typeof e)switch(e[i]){case n:case o:return!0}return!1}return Tg.ALIAS=e,Tg.DOC=t,Tg.MAP=n,Tg.NODE_TYPE=i,Tg.PAIR=r,Tg.SCALAR=s,Tg.SEQ=o,Tg.hasAnchor=e=>(a(e)||c(e))&&!!e.anchor,Tg.isAlias=t=>!!t&&"object"==typeof t&&t[i]===e,Tg.isCollection=c,Tg.isDocument=e=>!!e&&"object"==typeof e&&e[i]===t,Tg.isMap=e=>!!e&&"object"==typeof e&&e[i]===n,Tg.isNode=function(t){if(t&&"object"==typeof t)switch(t[i]){case e:case n:case s:case o:return!0}return!1},Tg.isPair=e=>!!e&&"object"==typeof e&&e[i]===r,Tg.isScalar=a,Tg.isSeq=e=>!!e&&"object"==typeof e&&e[i]===o,Tg}var Ng,$g,Lg={};function Rg(){if(Ng)return Lg;Ng=1;var e=xg();const t=Symbol("break visit"),n=Symbol("skip children"),r=Symbol("remove node");function s(t,n){const s=c(n);if(e.isDocument(t)){o(null,t.contents,s,Object.freeze([t]))===r&&(t.contents=null)}else o(null,t,s,Object.freeze([]))}function o(n,s,i,a){const c=u(n,s,i,a);if(e.isNode(c)||e.isPair(c))return l(n,a,c),o(n,c,i,a);if("symbol"!=typeof c)if(e.isCollection(s)){a=Object.freeze(a.concat(s));for(let e=0;e<s.items.length;++e){const n=o(e,s.items[e],i,a);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===r&&(s.items.splice(e,1),e-=1)}}}else if(e.isPair(s)){a=Object.freeze(a.concat(s));const e=o("key",s.key,i,a);if(e===t)return t;e===r&&(s.key=null);const n=o("value",s.value,i,a);if(n===t)return t;n===r&&(s.value=null)}return c}async function i(t,n){const s=c(n);if(e.isDocument(t)){await a(null,t.contents,s,Object.freeze([t]))===r&&(t.contents=null)}else await a(null,t,s,Object.freeze([]))}async function a(n,s,o,i){const c=await u(n,s,o,i);if(e.isNode(c)||e.isPair(c))return l(n,i,c),a(n,c,o,i);if("symbol"!=typeof c)if(e.isCollection(s)){i=Object.freeze(i.concat(s));for(let e=0;e<s.items.length;++e){const n=await a(e,s.items[e],o,i);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===r&&(s.items.splice(e,1),e-=1)}}}else if(e.isPair(s)){i=Object.freeze(i.concat(s));const e=await a("key",s.key,o,i);if(e===t)return t;e===r&&(s.key=null);const n=await a("value",s.value,o,i);if(n===t)return t;n===r&&(s.value=null)}return c}function c(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 u(t,n,r,s){return"function"==typeof r?r(t,n,s):e.isMap(n)?r.Map?.(t,n,s):e.isSeq(n)?r.Seq?.(t,n,s):e.isPair(n)?r.Pair?.(t,n,s):e.isScalar(n)?r.Scalar?.(t,n,s):e.isAlias(n)?r.Alias?.(t,n,s):void 0}function l(t,n,r){const s=n[n.length-1];if(e.isCollection(s))s.items[t]=r;else if(e.isPair(s))"key"===t?s.key=r:s.value=r;else{if(!e.isDocument(s)){const t=e.isAlias(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${t} parent`)}s.contents=r}}return s.BREAK=t,s.SKIP=n,s.REMOVE=r,i.BREAK=t,i.SKIP=n,i.REMOVE=r,Lg.visit=s,Lg.visitAsync=i,Lg}function Fg(){if($g)return Og;$g=1;var e=xg(),t=Rg();const n={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},r=e=>e.replace(/[!,[\]{}]/g,e=>n[e]);class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){const e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),r=n.shift();switch(r){case"%TAG":{if(2!==n.length&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[e,r]=n;return this.tags[e]=r,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==n.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=n;if("1.1"===e||"1.2"===e)return this.yaml.version=e,!0;return t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1}default:return t(0,`Unknown directive ${r}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const n=e.slice(2,-1);return"!"===n||"!!"===n?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),n)}const[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);const s=this.tags[n];if(s)try{return s+decodeURIComponent(r)}catch(e){return t(String(e)),null}return"!"===n?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+r(e.substring(n.length));return"!"===e[0]?e:`!<${e}>`}toString(n){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let o;if(n&&s.length>0&&e.isNode(n.contents)){const r={};t.visit(n.contents,(t,n)=>{e.isNode(n)&&n.tag&&(r[n.tag]=!0)}),o=Object.keys(r)}else o=[];for(const[e,t]of s)"!!"===e&&"tag:yaml.org,2002:"===t||n&&!o.some(e=>e.startsWith(t))||r.push(`%TAG ${e} ${t}`);return r.join("\n")}}return s.defaultYaml={explicit:!1,version:"1.2"},s.defaultTags={"!!":"tag:yaml.org,2002:"},Og.Directives=s,Og}var Ig,Mg={},jg={},Bg={};function zg(){if(Ig)return Bg;Ig=1;var e=xg(),t=Rg();function n(e){const n=new Set;return t.visit(e,{Value(e,t){t.anchor&&n.add(t.anchor)}}),n}function r(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}return Bg.anchorIsValid=function(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0},Bg.anchorNames=n,Bg.createNodeAnchors=function(t,s){const o=[],i=new Map;let a=null;return{onAnchor:e=>{o.push(e),a??(a=n(t));const i=r(s,a);return a.add(i),i},setAnchors:()=>{for(const t of o){const n=i.get(t);if("object"!=typeof n||!n.anchor||!e.isScalar(n.node)&&!e.isCollection(n.node)){const e=new Error("Failed to resolve repeated object (this should not happen)");throw e.source=t,e}n.node.anchor=n.anchor}},sourceObjects:i}},Bg.findNewAnchor=r,Bg}var Hg,Kg={},Ug={};function qg(){if(Hg)return Ug;return Hg=1,Ug.applyReviver=function e(t,n,r,s){if(s&&"object"==typeof s)if(Array.isArray(s))for(let n=0,r=s.length;n<r;++n){const r=s[n],o=e(t,s,String(n),r);void 0===o?delete s[n]:o!==r&&(s[n]=o)}else if(s instanceof Map)for(const n of Array.from(s.keys())){const r=s.get(n),o=e(t,s,n,r);void 0===o?s.delete(n):o!==r&&s.set(n,o)}else if(s instanceof Set)for(const n of Array.from(s)){const r=e(t,s,n,n);void 0===r?s.delete(n):r!==n&&(s.delete(n),s.add(r))}else for(const[n,r]of Object.entries(s)){const o=e(t,s,n,r);void 0===o?delete s[n]:o!==r&&(s[n]=o)}return t.call(n,r,s)},Ug}var Zg,Gg,Wg,Jg={};function Vg(){if(Zg)return Jg;Zg=1;var e=xg();return Jg.toJS=function t(n,r,s){if(Array.isArray(n))return n.map((e,n)=>t(e,String(n),s));if(n&&"function"==typeof n.toJSON){if(!s||!e.hasAnchor(n))return n.toJSON(r,s);const t={aliasCount:0,count:1,res:void 0};s.anchors.set(n,t),s.onCreate=e=>{t.res=e,delete s.onCreate};const o=n.toJSON(r,s);return s.onCreate&&s.onCreate(o),o}return"bigint"!=typeof n||s?.keep?n:Number(n)},Jg}function Yg(){if(Gg)return Kg;Gg=1;var e=qg(),t=xg(),n=Vg();return Kg.NodeBase=class{constructor(e){Object.defineProperty(this,t.NODE_TYPE,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(r,{mapAsMap:s,maxAliasCount:o,onAnchor:i,reviver:a}={}){if(!t.isDocument(r))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:r,keep:!0,mapAsMap:!0===s,mapKeyWarned:!1,maxAliasCount:"number"==typeof o?o:100},u=n.toJS(this,"",c);if("function"==typeof i)for(const{count:e,res:t}of c.anchors.values())i(t,e);return"function"==typeof a?e.applyReviver(a,{"":u},"",u):u}},Kg}function Qg(){if(Wg)return jg;Wg=1;var e=zg(),t=Rg(),n=xg(),r=Yg(),s=Vg();let o=class extends r.NodeBase{constructor(e){super(n.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){let s,o;r?.aliasResolveCache?s=r.aliasResolveCache:(s=[],t.visit(e,{Node:(e,t)=>{(n.isAlias(t)||n.hasAnchor(t))&&s.push(t)}}),r&&(r.aliasResolveCache=s));for(const e of s){if(e===this)break;e.anchor===this.source&&(o=e)}return o}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:r,maxAliasCount:o}=t,a=this.resolve(r,t);if(!a){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let c=n.get(a);if(c||(s.toJS(a,null,t),c=n.get(a)),void 0===c?.res){throw new ReferenceError("This should not happen: Alias anchor was not resolved?")}if(o>=0&&(c.count+=1,0===c.aliasCount&&(c.aliasCount=i(r,a,n)),c.count*c.aliasCount>o)){throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return c.res}toString(t,n,r){const s=`*${this.source}`;if(t){if(e.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(t.implicitKey)return`${s} `}return s}};function i(e,t,r){if(n.isAlias(t)){const n=t.resolve(e),s=r&&n&&r.get(n);return s?s.count*s.aliasCount:0}if(n.isCollection(t)){let n=0;for(const s of t.items){const t=i(e,s,r);t>n&&(n=t)}return n}if(n.isPair(t)){const n=i(e,t.key,r),s=i(e,t.value,r);return Math.max(n,s)}return 1}return jg.Alias=o,jg}var Xg,ey,ty,ny={},ry={},sy={};function oy(){if(Xg)return sy;Xg=1;var e=xg(),t=Yg(),n=Vg();let r=class extends t.NodeBase{constructor(t){super(e.SCALAR),this.value=t}toJSON(e,t){return t?.keep?this.value:n.toJS(this.value,e,t)}toString(){return String(this.value)}};return r.BLOCK_FOLDED="BLOCK_FOLDED",r.BLOCK_LITERAL="BLOCK_LITERAL",r.PLAIN="PLAIN",r.QUOTE_DOUBLE="QUOTE_DOUBLE",r.QUOTE_SINGLE="QUOTE_SINGLE",sy.Scalar=r,sy.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e,sy}function iy(){if(ey)return ry;ey=1;var e=Qg(),t=xg(),n=oy();return ry.createNode=function(r,s,o){if(t.isDocument(r)&&(r=r.contents),t.isNode(r))return r;if(t.isPair(r)){const e=o.schema[t.MAP].createNode?.(o.schema,null,o);return e.items.push(r),e}(r instanceof String||r instanceof Number||r instanceof Boolean||"undefined"!=typeof BigInt&&r instanceof BigInt)&&(r=r.valueOf());const{aliasDuplicateObjects:i,onAnchor:a,onTagObj:c,schema:u,sourceObjects:l}=o;let f;if(i&&r&&"object"==typeof r){if(f=l.get(r),f)return f.anchor??(f.anchor=a(r)),new e.Alias(f.anchor);f={anchor:null,node:null},l.set(r,f)}s?.startsWith("!!")&&(s="tag:yaml.org,2002:"+s.slice(2));let p=function(e,t,n){if(t){const e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}(r,s,u.tags);if(!p){if(r&&"function"==typeof r.toJSON&&(r=r.toJSON()),!r||"object"!=typeof r){const e=new n.Scalar(r);return f&&(f.node=e),e}p=r instanceof Map?u[t.MAP]:Symbol.iterator in Object(r)?u[t.SEQ]:u[t.MAP]}c&&(c(p),delete o.onTagObj);const d=p?.createNode?p.createNode(o.schema,r,o):"function"==typeof p?.nodeClass?.from?p.nodeClass.from(o.schema,r,o):new n.Scalar(r);return s?d.tag=s:p.default||(d.tag=p.tag),f&&(f.node=d),d},ry}function ay(){if(ty)return ny;ty=1;var e=iy(),t=xg(),n=Yg();function r(t,n,r){let s=r;for(let e=n.length-1;e>=0;--e){const t=n[e];if("number"==typeof t&&Number.isInteger(t)&&t>=0){const e=[];e[t]=s,s=e}else s=new Map([[t,s]])}return e.createNode(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const s=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;let o=class extends n.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(n=>t.isNode(n)||t.isPair(n)?n.clone(e):n),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(s(e))this.add(n);else{const[s,...o]=e,i=this.get(s,!0);if(t.isCollection(i))i.addIn(o,n);else{if(void 0!==i||!this.schema)throw new Error(`Expected YAML collection at ${s}. Remaining path: ${o}`);this.set(s,r(this.schema,o,n))}}}deleteIn(e){const[n,...r]=e;if(0===r.length)return this.delete(n);const s=this.get(n,!0);if(t.isCollection(s))return s.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...s]=e,o=this.get(r,!0);return 0===s.length?!n&&t.isScalar(o)?o.value:o:t.isCollection(o)?o.getIn(s,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!t.isPair(n))return!1;const r=n.value;return null==r||e&&t.isScalar(r)&&null==r.value&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(0===r.length)return this.has(n);const s=this.get(n,!0);return!!t.isCollection(s)&&s.hasIn(r)}setIn(e,n){const[s,...o]=e;if(0===o.length)this.set(s,n);else{const e=this.get(s,!0);if(t.isCollection(e))e.setIn(o,n);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${s}. Remaining path: ${o}`);this.set(s,r(this.schema,o,n))}}}};return ny.Collection=o,ny.collectionFromPath=r,ny.isEmptyPath=s,ny}var cy,uy={},ly={},fy={},py={};function dy(){if(cy)return py;cy=1;function e(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}return py.indentComment=e,py.lineComment=(t,n,r)=>t.endsWith("\n")?e(r,n):r.includes("\n")?"\n"+e(r,n):(t.endsWith(" ")?"":" ")+r,py.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#"),py}var hy,my,gy,yy,by={},vy={};function Dy(){if(hy)return vy;hy=1;const e="block",t="quoted";function n(e,t,n){let r=t,s=t+1,o=e[s];for(;" "===o||"\t"===o;)if(t<s+n)o=e[++t];else{do{o=e[++t]}while(o&&"\n"!==o);r=t,s=t+1,o=e[s]}return r}return vy.FOLD_BLOCK=e,vy.FOLD_FLOW="flow",vy.FOLD_QUOTED=t,vy.foldFlowLines=function(r,s,o="flow",{indentAtStart:i,lineWidth:a=80,minContentWidth:c=20,onFold:u,onOverflow:l}={}){if(!a||a<0)return r;a<c&&(c=0);const f=Math.max(1+c,1+a-s.length);if(r.length<=f)return r;const p=[],d={};let h,m,g=a-s.length;"number"==typeof i&&(i>a-Math.max(2,c)?p.push(0):g=a-i);let y=!1,b=-1,v=-1,D=-1;o===e&&(b=n(r,b,s.length),-1!==b&&(g=b+f));for(let i;i=r[b+=1];){if(o===t&&"\\"===i){switch(v=b,r[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}D=b}if("\n"===i)o===e&&(b=n(r,b,s.length)),g=b+s.length+f,h=void 0;else{if(" "===i&&m&&" "!==m&&"\n"!==m&&"\t"!==m){const e=r[b+1];e&&" "!==e&&"\n"!==e&&"\t"!==e&&(h=b)}if(b>=g)if(h)p.push(h),g=h+f,h=void 0;else if(o===t){for(;" "===m||"\t"===m;)m=i,i=r[b+=1],y=!0;const e=b>D+1?b-2:v-1;if(d[e])return r;p.push(e),d[e]=!0,g=e+f,h=void 0}else y=!0}m=i}if(y&&l&&l(),0===p.length)return r;u&&u();let w=r.slice(0,p[0]);for(let e=0;e<p.length;++e){const n=p[e],i=p[e+1]||r.length;0===n?w=`\n${s}${r.slice(0,i)}`:(o===t&&d[n]&&(w+=`${r[n]}\\`),w+=`\n${s}${r.slice(n+1,i)}`)}return w},vy}function wy(){if(my)return by;my=1;var e=oy(),t=Dy();const n=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),r=e=>/^(%|---|\.\.\.)/m.test(e);function s(e,s){const o=JSON.stringify(e);if(s.options.doubleQuotedAsJSON)return o;const{implicitKey:i}=s,a=s.options.doubleQuotedMinMultiLineLength,c=s.indent||(r(e)?" ":"");let u="",l=0;for(let e=0,t=o[e];t;t=o[++e])if(" "===t&&"\\"===o[e+1]&&"n"===o[e+2]&&(u+=o.slice(l,e)+"\\ ",e+=1,l=e,t="\\"),"\\"===t)switch(o[e+1]){case"u":{u+=o.slice(l,e);const t=o.substr(e+2,4);switch(t){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:"00"===t.substr(0,2)?u+="\\x"+t.substr(2):u+=o.substr(e,6)}e+=5,l=e+1}break;case"n":if(i||'"'===o[e+2]||o.length<a)e+=1;else{for(u+=o.slice(l,e)+"\n\n";"\\"===o[e+2]&&"n"===o[e+3]&&'"'!==o[e+4];)u+="\n",e+=2;u+=c," "===o[e+2]&&(u+="\\"),e+=1,l=e+1}break;default:e+=1}return u=l?u+o.slice(l):o,i?u:t.foldFlowLines(u,c,t.FOLD_QUOTED,n(s,!1))}function o(e,o){if(!1===o.options.singleQuote||o.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return s(e,o);const i=o.indent||(r(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${i}`)+"'";return o.implicitKey?a:t.foldFlowLines(a,i,t.FOLD_FLOW,n(o,!1))}function i(e,t){const{singleQuote:n}=t.options;let r;if(!1===n)r=s;else{const t=e.includes('"'),i=e.includes("'");r=t&&!i?o:i&&!t?s:n?o:s}return r(e,t)}let a;try{a=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{a=/\n+(?!\n|$)/g}function c({comment:s,type:o,value:c},u,l,f){const{blockQuote:p,commentString:d,lineWidth:h}=u.options;if(!p||/\n[\t ]+$/.test(c))return i(c,u);const m=u.indent||(u.forceBlockIndent||r(c)?" ":""),g="literal"===p||"folded"!==p&&o!==e.Scalar.BLOCK_FOLDED&&(o===e.Scalar.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;const r=t-n,s=e.length;if(s<=r)return!1;for(let t=0,n=0;t<s;++t)if("\n"===e[t]){if(t-n>r)return!0;if(n=t+1,s-n<=r)return!1}return!0}(c,h,m.length));if(!c)return g?"|\n":">\n";let y,b;for(b=c.length;b>0;--b){const e=c[b-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let v=c.substring(b);const D=v.indexOf("\n");-1===D?y="-":c===v||D!==v.length-1?(y="+",f&&f()):y="",v&&(c=c.slice(0,-v.length),"\n"===v[v.length-1]&&(v=v.slice(0,-1)),v=v.replace(a,`$&${m}`));let w,_=!1,E=-1;for(w=0;w<c.length;++w){const e=c[w];if(" "===e)_=!0;else{if("\n"!==e)break;E=w}}let k=c.substring(0,E<w?E+1:w);k&&(c=c.substring(k.length),k=k.replace(/\n+/g,`$&${m}`));let S=(_?m?"2":"1":"")+y;if(s&&(S+=" "+d(s.replace(/ ?[\r\n]+/g," ")),l&&l()),!g){const r=c.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${m}`);let s=!1;const i=n(u,!0);"folded"!==p&&o!==e.Scalar.BLOCK_FOLDED&&(i.onOverflow=()=>{s=!0});const a=t.foldFlowLines(`${k}${r}${v}`,m,t.FOLD_BLOCK,i);if(!s)return`>${S}\n${m}${a}`}return`|${S}\n${m}${k}${c=c.replace(/\n+/g,`$&${m}`)}${v}`}return by.stringifyString=function(a,u,l,f){const{implicitKey:p,inFlow:d}=u,h="string"==typeof a.value?a:Object.assign({},a,{value:String(a.value)});let{type:m}=a;m!==e.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(h.value)&&(m=e.Scalar.QUOTE_DOUBLE);const g=a=>{switch(a){case e.Scalar.BLOCK_FOLDED:case e.Scalar.BLOCK_LITERAL:return p||d?i(h.value,u):c(h,u,l,f);case e.Scalar.QUOTE_DOUBLE:return s(h.value,u);case e.Scalar.QUOTE_SINGLE:return o(h.value,u);case e.Scalar.PLAIN:return function(s,o,a,u){const{type:l,value:f}=s,{actualString:p,implicitKey:d,indent:h,indentStep:m,inFlow:g}=o;if(d&&f.includes("\n")||g&&/[[\]{},]/.test(f))return i(f,o);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(f))return d||g||!f.includes("\n")?i(f,o):c(s,o,a,u);if(!d&&!g&&l!==e.Scalar.PLAIN&&f.includes("\n"))return c(s,o,a,u);if(r(f)){if(""===h)return o.forceBlockIndent=!0,c(s,o,a,u);if(d&&h===m)return i(f,o)}const y=f.replace(/\n+/g,`$&\n${h}`);if(p){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(y),{compat:t,tags:n}=o.doc.schema;if(n.some(e)||t?.some(e))return i(f,o)}return d?y:t.foldFlowLines(y,h,t.FOLD_FLOW,n(o,!1))}(h,u,l,f);default:return null}};let y=g(m);if(null===y){const{defaultKeyType:e,defaultStringType:t}=u.options,n=p&&e||t;if(y=g(n),null===y)throw new Error(`Unsupported default string type ${n}`)}return y},by}function _y(){if(gy)return fy;gy=1;var e=zg(),t=xg(),n=dy(),r=wy();return fy.createStringifyContext=function(e,t){const r=Object.assign({blockQuote:!0,commentString:n.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let s;switch(r.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:s,options:r}},fy.stringify=function(n,s,o,i){if(t.isPair(n))return n.toString(s,o,i);if(t.isAlias(n)){if(s.doc.directives)return n.toString(s);if(s.resolvedAliases?.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");s.resolvedAliases?s.resolvedAliases.add(n):s.resolvedAliases=new Set([n]),n=n.resolve(s.doc)}let a;const c=t.isNode(n)?n:s.doc.createNode(n,{onTagObj:e=>a=e});a??(a=function(e,n){if(n.tag){const t=e.filter(e=>e.tag===n.tag);if(t.length>0)return t.find(e=>e.format===n.format)??t[0]}let r,s;if(t.isScalar(n)){s=n.value;let t=e.filter(e=>e.identify?.(s));if(t.length>1){const e=t.filter(e=>e.test);e.length>0&&(t=e)}r=t.find(e=>e.format===n.format)??t.find(e=>!e.format)}else s=n,r=e.find(e=>e.nodeClass&&s instanceof e.nodeClass);if(!r)throw new Error(`Tag not resolved for ${s?.constructor?.name??(null===s?"null":typeof s)} value`);return r}(s.doc.schema.tags,c));const u=function(n,r,{anchors:s,doc:o}){if(!o.directives)return"";const i=[],a=(t.isScalar(n)||t.isCollection(n))&&n.anchor;a&&e.anchorIsValid(a)&&(s.add(a),i.push(`&${a}`));const c=n.tag??(r.default?null:r.tag);return c&&i.push(o.directives.tagString(c)),i.join(" ")}(c,a,s);u.length>0&&(s.indentAtStart=(s.indentAtStart??0)+u.length+1);const l="function"==typeof a.stringify?a.stringify(c,s,o,i):t.isScalar(c)?r.stringifyString(c,s,o,i):c.toString(s,o,i);return u?t.isScalar(c)||"{"===l[0]||"["===l[0]?`${u} ${l}`:`${u}\n${s.indent}${l}`:l},fy}function Ey(){if(yy)return ly;yy=1;var e=xg(),t=oy(),n=_y(),r=dy();return ly.stringifyPair=function({key:s,value:o},i,a,c){const{allNullValues:u,doc:l,indent:f,indentStep:p,options:{commentString:d,indentSeq:h,simpleKeys:m}}=i;let g=e.isNode(s)&&s.comment||null;if(m){if(g)throw new Error("With simple keys, key nodes cannot have comments");if(e.isCollection(s)||!e.isNode(s)&&"object"==typeof s){throw new Error("With simple keys, collection cannot be used as a key value")}}let y=!m&&(!s||g&&null==o&&!i.inFlow||e.isCollection(s)||(e.isScalar(s)?s.type===t.Scalar.BLOCK_FOLDED||s.type===t.Scalar.BLOCK_LITERAL:"object"==typeof s));i=Object.assign({},i,{allNullValues:!1,implicitKey:!y&&(m||!u),indent:f+p});let b,v,D,w=!1,_=!1,E=n.stringify(s,i,()=>w=!0,()=>_=!0);if(!y&&!i.inFlow&&E.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");y=!0}if(i.inFlow){if(u||null==o)return w&&a&&a(),""===E?"?":y?`? ${E}`:E}else if(u&&!m||null==o&&y)return E=`? ${E}`,g&&!w?E+=r.lineComment(E,i.indent,d(g)):_&&c&&c(),E;w&&(g=null),y?(g&&(E+=r.lineComment(E,i.indent,d(g))),E=`? ${E}\n${f}:`):(E=`${E}:`,g&&(E+=r.lineComment(E,i.indent,d(g)))),e.isNode(o)?(b=!!o.spaceBefore,v=o.commentBefore,D=o.comment):(b=!1,v=null,D=null,o&&"object"==typeof o&&(o=l.createNode(o))),i.implicitKey=!1,y||g||!e.isScalar(o)||(i.indentAtStart=E.length+1),_=!1,h||!(p.length>=2)||i.inFlow||y||!e.isSeq(o)||o.flow||o.tag||o.anchor||(i.indent=i.indent.substring(2));let k=!1;const S=n.stringify(o,i,()=>k=!0,()=>_=!0);let A=" ";if(g||b||v){if(A=b?"\n":"",v){const e=d(v);A+=`\n${r.indentComment(e,i.indent)}`}""!==S||i.inFlow?A+=`\n${i.indent}`:"\n"===A&&D&&(A="\n\n")}else if(!y&&e.isCollection(o)){const e=S[0],t=S.indexOf("\n"),n=-1!==t,r=i.inFlow??o.flow??0===o.items.length;if(n||!r){let r=!1;if(n&&("&"===e||"!"===e)){let n=S.indexOf(" ");"&"===e&&-1!==n&&n<t&&"!"===S[n+1]&&(n=S.indexOf(" ",n+1)),(-1===n||t<n)&&(r=!0)}r||(A=`\n${i.indent}`)}}else""!==S&&"\n"!==S[0]||(A="");return E+=A+S,i.inFlow?k&&a&&a():D&&!k?E+=r.lineComment(E,i.indent,d(D)):_&&c&&c(),E},ly}var ky,Sy={},Ay={};function Cy(){if(ky)return Ay;ky=1;var e=w;return Ay.debug=function(e,...t){"debug"===e&&console.log(...t)},Ay.warn=function(t,n){"debug"!==t&&"warn"!==t||("function"==typeof e.emitWarning?e.emitWarning(n):console.warn(n))},Ay}var Py,Oy,Ty,xy={};function Ny(){if(Py)return xy;Py=1;var e=xg(),t=oy();const n="<<",r={identify:e=>e===n||"symbol"==typeof e&&e.description===n,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new t.Scalar(Symbol(n)),{addToJSMap:s}),stringify:()=>n};function s(t,n,r){if(r=t&&e.isAlias(r)?r.resolve(t.doc):r,e.isSeq(r))for(const e of r.items)o(t,n,e);else if(Array.isArray(r))for(const e of r)o(t,n,e);else o(t,n,r)}function o(t,n,r){const s=t&&e.isAlias(r)?r.resolve(t.doc):r;if(!e.isMap(s))throw new Error("Merge sources must be maps or map aliases");const o=s.toJSON(null,t,Map);for(const[e,t]of o)n instanceof Map?n.has(e)||n.set(e,t):n instanceof Set?n.add(e):Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(n,e,{value:t,writable:!0,enumerable:!0,configurable:!0});return n}return xy.addMergeToJSMap=s,xy.isMergeKey=(n,s)=>(r.identify(s)||e.isScalar(s)&&(!s.type||s.type===t.Scalar.PLAIN)&&r.identify(s.value))&&n?.doc.schema.tags.some(e=>e.tag===r.tag&&e.default),xy.merge=r,xy}function $y(){if(Oy)return Sy;Oy=1;var e=Cy(),t=Ny(),n=_y(),r=xg(),s=Vg();return Sy.addPairToJSMap=function(o,i,{key:a,value:c}){if(r.isNode(a)&&a.addToJSMap)a.addToJSMap(o,i,c);else if(t.isMergeKey(o,a))t.addMergeToJSMap(o,i,c);else{const t=s.toJS(a,"",o);if(i instanceof Map)i.set(t,s.toJS(c,t,o));else if(i instanceof Set)i.add(t);else{const u=function(t,s,o){if(null===s)return"";if("object"!=typeof s)return String(s);if(r.isNode(t)&&o?.doc){const r=n.createStringifyContext(o.doc,{});r.anchors=new Set;for(const e of o.anchors.keys())r.anchors.add(e.anchor);r.inFlow=!0,r.inStringifyKey=!0;const s=t.toString(r);if(!o.mapKeyWarned){let t=JSON.stringify(s);t.length>40&&(t=t.substring(0,36)+'..."'),e.warn(o.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${t}. Set mapAsMap: true to use object keys.`),o.mapKeyWarned=!0}return s}return JSON.stringify(s)}(a,t,o),l=s.toJS(c,u,o);u in i?Object.defineProperty(i,u,{value:l,writable:!0,enumerable:!0,configurable:!0}):i[u]=l}}return i},Sy}function Ly(){if(Ty)return uy;Ty=1;var e=iy(),t=Ey(),n=$y(),r=xg();let s=class e{constructor(e,t=null){Object.defineProperty(this,r.NODE_TYPE,{value:r.PAIR}),this.key=e,this.value=t}clone(t){let{key:n,value:s}=this;return r.isNode(n)&&(n=n.clone(t)),r.isNode(s)&&(s=s.clone(t)),new e(n,s)}toJSON(e,t){const r=t?.mapAsMap?new Map:{};return n.addPairToJSMap(t,r,this)}toString(e,n,r){return e?.doc?t.stringifyPair(this,e,n,r):JSON.stringify(this)}};return uy.Pair=s,uy.createPair=function(t,n,r){const o=e.createNode(t,void 0,r),i=e.createNode(n,void 0,r);return new s(o,i)},uy}var Ry,Fy,Iy,My={},jy={},By={},zy={};function Hy(){if(Ry)return zy;Ry=1;var e=xg(),t=_y(),n=dy();function r({comment:r,items:s},i,{blockItemPrefix:a,flowChars:c,itemIndent:u,onChompKeep:l,onComment:f}){const{indent:p,options:{commentString:d}}=i,h=Object.assign({},i,{indent:u,type:null});let m=!1;const g=[];for(let r=0;r<s.length;++r){const c=s[r];let l=null;if(e.isNode(c))!m&&c.spaceBefore&&g.push(""),o(i,g,c.commentBefore,m),c.comment&&(l=c.comment);else if(e.isPair(c)){const t=e.isNode(c.key)?c.key:null;t&&(!m&&t.spaceBefore&&g.push(""),o(i,g,t.commentBefore,m))}m=!1;let f=t.stringify(c,h,()=>l=null,()=>m=!0);l&&(f+=n.lineComment(f,u,d(l))),m&&l&&(m=!1),g.push(a+f)}let y;if(0===g.length)y=c.start+c.end;else{y=g[0];for(let e=1;e<g.length;++e){const t=g[e];y+=t?`\n${p}${t}`:"\n"}}return r?(y+="\n"+n.indentComment(d(r),p),f&&f()):m&&l&&l(),y}function s({items:r},s,{flowChars:i,itemIndent:a}){const{indent:c,indentStep:u,flowCollectionPadding:l,options:{commentString:f}}=s;a+=u;const p=Object.assign({},s,{indent:a,inFlow:!0,type:null});let d=!1,h=0;const m=[];for(let i=0;i<r.length;++i){const c=r[i];let u=null;if(e.isNode(c))c.spaceBefore&&m.push(""),o(s,m,c.commentBefore,!1),c.comment&&(u=c.comment);else if(e.isPair(c)){const t=e.isNode(c.key)?c.key:null;t&&(t.spaceBefore&&m.push(""),o(s,m,t.commentBefore,!1),t.comment&&(d=!0));const n=e.isNode(c.value)?c.value:null;n?(n.comment&&(u=n.comment),n.commentBefore&&(d=!0)):null==c.value&&t?.comment&&(u=t.comment)}u&&(d=!0);let l=t.stringify(c,p,()=>u=null);i<r.length-1&&(l+=","),u&&(l+=n.lineComment(l,a,f(u))),!d&&(m.length>h||l.includes("\n"))&&(d=!0),m.push(l),h=m.length}const{start:g,end:y}=i;if(0===m.length)return g+y;if(!d){const e=m.reduce((e,t)=>e+t.length+2,2);d=s.options.lineWidth>0&&e>s.options.lineWidth}if(d){let e=g;for(const t of m)e+=t?`\n${u}${c}${t}`:"\n";return`${e}\n${c}${y}`}return`${g}${l}${m.join(" ")}${l}${y}`}function o({indent:e,options:{commentString:t}},r,s,o){if(s&&o&&(s=s.replace(/^\n+/,"")),s){const o=n.indentComment(t(s),e);r.push(o.trimStart())}}return zy.stringifyCollection=function(e,t,n){return(t.inFlow??e.flow?s:r)(e,t,n)},zy}function Ky(){if(Fy)return By;Fy=1;var e=Hy(),t=$y(),n=ay(),r=xg(),s=Ly(),o=oy();function i(e,t){const n=r.isScalar(t)?t.value:t;for(const s of e)if(r.isPair(s)){if(s.key===t||s.key===n)return s;if(r.isScalar(s.key)&&s.key.value===n)return s}}let a=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(r.MAP,e),this.items=[]}static from(e,t,n){const{keepUndefined:r,replacer:o}=n,i=new this(e),a=(e,a)=>{if("function"==typeof o)a=o.call(t,e,a);else if(Array.isArray(o)&&!o.includes(e))return;(void 0!==a||r)&&i.items.push(s.createPair(e,a,n))};if(t instanceof Map)for(const[e,n]of t)a(e,n);else if(t&&"object"==typeof t)for(const e of Object.keys(t))a(e,t[e]);return"function"==typeof e.sortMapEntries&&i.items.sort(e.sortMapEntries),i}add(e,t){let n;n=r.isPair(e)?e:e&&"object"==typeof e&&"key"in e?new s.Pair(e.key,e.value):new s.Pair(e,e?.value);const a=i(this.items,n.key),c=this.schema?.sortMapEntries;if(a){if(!t)throw new Error(`Key ${n.key} already set`);r.isScalar(a.value)&&o.isScalarValue(n.value)?a.value.value=n.value:a.value=n.value}else if(c){const e=this.items.findIndex(e=>c(n,e)<0);-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){const t=i(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=i(this.items,e),s=n?.value;return(!t&&r.isScalar(s)?s.value:s)??void 0}has(e){return!!i(this.items,e)}set(e,t){this.add(new s.Pair(e,t),!0)}toJSON(e,n,r){const s=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(s);for(const e of this.items)t.addPairToJSMap(n,s,e);return s}toString(t,n,s){if(!t)return JSON.stringify(this);for(const e of this.items)if(!r.isPair(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),e.stringifyCollection(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:s,onComment:n})}};return By.YAMLMap=a,By.findPair=i,By}function Uy(){if(Iy)return jy;Iy=1;var e=xg(),t=Ky();const n={collection:"map",default:!0,nodeClass:t.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:(t,n)=>(e.isMap(t)||n("Expected a mapping for this tag"),t),createNode:(e,n,r)=>t.YAMLMap.from(e,n,r)};return jy.map=n,jy}var qy,Zy,Gy={},Wy={};function Jy(){if(qy)return Wy;qy=1;var e=iy(),t=Hy(),n=ay(),r=xg(),s=oy(),o=Vg();let i=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(r.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=a(e);if("number"!=typeof t)return!1;return this.items.splice(t,1).length>0}get(e,t){const n=a(e);if("number"!=typeof n)return;const s=this.items[n];return!t&&r.isScalar(s)?s.value:s}has(e){const t=a(e);return"number"==typeof t&&t<this.items.length}set(e,t){const n=a(e);if("number"!=typeof n)throw new Error(`Expected a valid index, not ${e}.`);const o=this.items[n];r.isScalar(o)&&s.isScalarValue(t)?o.value=t:this.items[n]=t}toJSON(e,t){const n=[];t?.onCreate&&t.onCreate(n);let r=0;for(const e of this.items)n.push(o.toJS(e,String(r++),t));return n}toString(e,n,r){return e?t.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){const{replacer:s}=r,o=new this(t);if(n&&Symbol.iterator in Object(n)){let t=0;for(let i of n){if("function"==typeof s){const e=n instanceof Set?i:String(t++);i=s.call(n,e,i)}o.items.push(e.createNode(i,void 0,r))}}return o}};function a(e){let t=r.isScalar(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}return Wy.YAMLSeq=i,Wy}function Vy(){if(Zy)return Gy;Zy=1;var e=xg(),t=Jy();const n={collection:"seq",default:!0,nodeClass:t.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:(t,n)=>(e.isSeq(t)||n("Expected a sequence for this tag"),t),createNode:(e,n,r)=>t.YAMLSeq.from(e,n,r)};return Gy.seq=n,Gy}var Yy,Qy={};function Xy(){if(Yy)return Qy;Yy=1;var e=wy();const t={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(t,n,r,s)=>(n=Object.assign({actualString:!0},n),e.stringifyString(t,n,r,s))};return Qy.string=t,Qy}var eb,tb={},nb={};function rb(){if(eb)return nb;eb=1;var e=oy();const t={identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new e.Scalar(null),stringify:({source:e},n)=>"string"==typeof e&&t.test.test(e)?e:n.options.nullStr};return nb.nullTag=t,nb}var sb,ob={};function ib(){if(sb)return ob;sb=1;var e=oy();const t={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new e.Scalar("t"===t[0]||"T"===t[0]),stringify({source:e,value:n},r){if(e&&t.test.test(e)){if(n===("t"===e[0]||"T"===e[0]))return e}return n?r.options.trueStr:r.options.falseStr}};return ob.boolTag=t,ob}var ab,cb,ub={},lb={};function fb(){if(ab)return lb;return ab=1,lb.stringifyNumber=function({format:e,minFractionDigits:t,tag:n,value:r}){if("bigint"==typeof r)return String(r);const s="number"==typeof r?r:Number(r);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let o=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(o)){let e=o.indexOf(".");e<0&&(e=o.length,o+=".");let n=t-(o.length-e-1);for(;n-- >0;)o+="0"}return o},lb}function pb(){if(cb)return ub;cb=1;var e=oy(),t=fb();const n={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]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:t.stringifyNumber},r={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){const n=Number(e.value);return isFinite(n)?n.toExponential():t.stringifyNumber(e)}},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const n=new e.Scalar(parseFloat(t)),r=t.indexOf(".");return-1!==r&&"0"===t[t.length-1]&&(n.minFractionDigits=t.length-r-1),n},stringify:t.stringifyNumber};return ub.float=s,ub.floatExp=r,ub.floatNaN=n,ub}var db,hb={};function mb(){if(db)return hb;db=1;var e=fb();const t=e=>"bigint"==typeof e||Number.isInteger(e),n=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function r(n,r,s){const{value:o}=n;return t(o)&&o>=0?s+o.toString(r):e.stringifyNumber(n)}const s={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>n(e,2,8,r),stringify:e=>r(e,8,"0o")},o={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>n(e,0,10,r),stringify:e.stringifyNumber},i={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>n(e,2,16,r),stringify:e=>r(e,16,"0x")};return hb.int=o,hb.intHex=i,hb.intOct=s,hb}var gb,yb={};function bb(){if(gb)return yb;gb=1;var e=Uy(),t=rb(),n=Vy(),r=Xy(),s=ib(),o=pb(),i=mb();const a=[e.map,n.seq,r.string,t.nullTag,s.boolTag,i.intOct,i.int,i.intHex,o.floatNaN,o.floatExp,o.float];return yb.schema=a,yb}var vb,Db={};function wb(){if(vb)return Db;vb=1;var e=oy(),t=Uy(),n=Vy();function r(e){return"bigint"==typeof e||Number.isInteger(e)}const s=({value:e})=>JSON.stringify(e),o=[{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:s},{identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:s},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:s},{identify:r,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})=>r(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:s}],i={default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)},a=[t.map,n.seq].concat(o,i);return Db.schema=a,Db}var _b,Eb={};function kb(){if(_b)return Eb;_b=1;var e=_,t=oy(),n=wy();const r={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,n){if("function"==typeof e.Buffer)return e.Buffer.from(t,"base64");if("function"==typeof atob){const e=atob(t.replace(/[\n\r]/g,"")),n=new Uint8Array(e.length);for(let t=0;t<e.length;++t)n[t]=e.charCodeAt(t);return n}return n("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:r,type:s,value:o},i,a,c){if(!o)return"";const u=o;let l;if("function"==typeof e.Buffer)l=u instanceof e.Buffer?u.toString("base64"):e.Buffer.from(u.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<u.length;++t)e+=String.fromCharCode(u[t]);l=btoa(e)}}if(s??(s=t.Scalar.BLOCK_LITERAL),s!==t.Scalar.QUOTE_DOUBLE){const e=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),n=Math.ceil(l.length/e),r=new Array(n);for(let t=0,s=0;t<n;++t,s+=e)r[t]=l.substr(s,e);l=r.join(s===t.Scalar.BLOCK_LITERAL?"\n":" ")}return n.stringifyString({comment:r,type:s,value:l},i,a,c)}};return Eb.binary=r,Eb}var Sb,Ab,Cb={},Pb={};function Ob(){if(Sb)return Pb;Sb=1;var e=xg(),t=Ly(),n=oy(),r=Jy();function s(r,s){if(e.isSeq(r))for(let o=0;o<r.items.length;++o){let i=r.items[o];if(!e.isPair(i)){if(e.isMap(i)){i.items.length>1&&s("Each pair must have its own sequence indicator");const e=i.items[0]||new t.Pair(new n.Scalar(null));if(i.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${i.commentBefore}\n${e.key.commentBefore}`:i.commentBefore),i.comment){const t=e.value??e.key;t.comment=t.comment?`${i.comment}\n${t.comment}`:i.comment}i=e}r.items[o]=e.isPair(i)?i:new t.Pair(i)}}else s("Expected a sequence for this tag");return r}function o(e,n,s){const{replacer:o}=s,i=new r.YAMLSeq(e);i.tag="tag:yaml.org,2002:pairs";let a=0;if(n&&Symbol.iterator in Object(n))for(let e of n){let r,c;if("function"==typeof o&&(e=o.call(n,String(a++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);r=e[0],c=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);r=t[0],c=e[r]}else r=e;i.items.push(t.createPair(r,c,s))}return i}const i={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:s,createNode:o};return Pb.createPairs=o,Pb.pairs=i,Pb.resolvePairs=s,Pb}function Tb(){if(Ab)return Cb;Ab=1;var e=xg(),t=Vg(),n=Ky(),r=Jy(),s=Ob();class o extends r.YAMLSeq{constructor(){super(),this.add=n.YAMLMap.prototype.add.bind(this),this.delete=n.YAMLMap.prototype.delete.bind(this),this.get=n.YAMLMap.prototype.get.bind(this),this.has=n.YAMLMap.prototype.has.bind(this),this.set=n.YAMLMap.prototype.set.bind(this),this.tag=o.tag}toJSON(n,r){if(!r)return super.toJSON(n);const s=new Map;r?.onCreate&&r.onCreate(s);for(const n of this.items){let o,i;if(e.isPair(n)?(o=t.toJS(n.key,"",r),i=t.toJS(n.value,o,r)):o=t.toJS(n,"",r),s.has(o))throw new Error("Ordered maps must not include duplicate keys");s.set(o,i)}return s}static from(e,t,n){const r=s.createPairs(e,t,n),o=new this;return o.items=r.items,o}}o.tag="tag:yaml.org,2002:omap";const i={collection:"seq",identify:e=>e instanceof Map,nodeClass:o,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,n){const r=s.resolvePairs(t,n),i=[];for(const{key:t}of r.items)e.isScalar(t)&&(i.includes(t.value)?n(`Ordered maps must not include duplicate keys: ${t.value}`):i.push(t.value));return Object.assign(new o,r)},createNode:(e,t,n)=>o.from(e,t,n)};return Cb.YAMLOMap=o,Cb.omap=i,Cb}var xb,Nb={},$b={};function Lb(){if(xb)return $b;xb=1;var e=oy();function t({value:e,source:t},s){return t&&(e?n:r).test.test(t)?t:e?s.options.trueStr:s.options.falseStr}const n={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:()=>new e.Scalar(!0),stringify:t},r={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 e.Scalar(!1),stringify:t};return $b.falseTag=r,$b.trueTag=n,$b}var Rb,Fb={};function Ib(){if(Rb)return Fb;Rb=1;var e=oy(),t=fb();const n={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]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:t.stringifyNumber},r={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){const n=Number(e.value);return isFinite(n)?n.toExponential():t.stringifyNumber(e)}},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const n=new e.Scalar(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(-1!==r){const e=t.substring(r+1).replace(/_/g,"");"0"===e[e.length-1]&&(n.minFractionDigits=e.length)}return n},stringify:t.stringifyNumber};return Fb.float=s,Fb.floatExp=r,Fb.floatNaN=n,Fb}var Mb,jb={};function Bb(){if(Mb)return jb;Mb=1;var e=fb();const t=e=>"bigint"==typeof e||Number.isInteger(e);function n(e,t,n,{intAsBigInt:r}){const s=e[0];if("-"!==s&&"+"!==s||(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===s?BigInt(-1)*t:t}const o=parseInt(e,n);return"-"===s?-1*o:o}function r(n,r,s){const{value:o}=n;if(t(o)){const e=o.toString(r);return o<0?"-"+s+e.substr(1):s+e}return e.stringifyNumber(n)}const s={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>n(e,2,2,r),stringify:e=>r(e,2,"0b")},o={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>n(e,1,8,r),stringify:e=>r(e,8,"0")},i={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>n(e,0,10,r),stringify:e.stringifyNumber},a={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>n(e,2,16,r),stringify:e=>r(e,16,"0x")};return jb.int=i,jb.intBin=s,jb.intHex=a,jb.intOct=o,jb}var zb,Hb={};function Kb(){if(zb)return Hb;zb=1;var e=xg(),t=Ly(),n=Ky();class r extends n.YAMLMap{constructor(e){super(e),this.tag=r.tag}add(r){let s;s=e.isPair(r)?r:r&&"object"==typeof r&&"key"in r&&"value"in r&&null===r.value?new t.Pair(r.key,null):new t.Pair(r,null);n.findPair(this.items,s.key)||this.items.push(s)}get(t,r){const s=n.findPair(this.items,t);return!r&&e.isPair(s)?e.isScalar(s.key)?s.key.value:s.key:s}set(e,r){if("boolean"!=typeof r)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof r);const s=n.findPair(this.items,e);s&&!r?this.items.splice(this.items.indexOf(s),1):!s&&r&&this.items.push(new t.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,n,r){const{replacer:s}=r,o=new this(e);if(n&&Symbol.iterator in Object(n))for(let e of n)"function"==typeof s&&(e=s.call(n,e,e)),o.items.push(t.createPair(e,null,r));return o}}r.tag="tag:yaml.org,2002:set";const s={collection:"map",identify:e=>e instanceof Set,nodeClass:r,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>r.from(e,t,n),resolve(t,n){if(e.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new r,t);n("Set items must all have null values")}else n("Expected a mapping for this tag");return t}};return Hb.YAMLSet=r,Hb.set=s,Hb}var Ub,qb,Zb,Gb,Wb={};function Jb(){if(Ub)return Wb;Ub=1;var e=fb();function t(e,t){const n=e[0],r="-"===n||"+"===n?e.substring(1):e,s=e=>t?BigInt(e):Number(e),o=r.replace(/_/g,"").split(":").reduce((e,t)=>e*s(60)+s(t),s(0));return"-"===n?s(-1)*o:o}function n(t){let{value:n}=t,r=e=>e;if("bigint"==typeof n)r=e=>BigInt(e);else if(isNaN(n)||!isFinite(n))return e.stringifyNumber(t);let s="";n<0&&(s="-",n*=r(-1));const o=r(60),i=[n%o];return n<60?i.unshift(0):(n=(n-i[0])/o,i.unshift(n%o),n>=60&&(n=(n-i[0])/o,i.unshift(n))),s+i.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const r={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,n,{intAsBigInt:r})=>t(e,r),stringify:n},s={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=>t(e,!1),stringify:n},o={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){const n=e.match(o.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,s,i,a,c,u]=n.map(Number),l=n[7]?Number((n[7]+"00").substr(1,3)):0;let f=Date.UTC(r,s-1,i,a||0,c||0,u||0,l);const p=n[8];if(p&&"Z"!==p){let e=t(p,!1);Math.abs(e)<30&&(e*=60),f-=6e4*e}return new Date(f)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};return Wb.floatTime=s,Wb.intTime=r,Wb.timestamp=o,Wb}function Vb(){if(qb)return Nb;qb=1;var e=Uy(),t=rb(),n=Vy(),r=Xy(),s=kb(),o=Lb(),i=Ib(),a=Bb(),c=Ny(),u=Tb(),l=Ob(),f=Kb(),p=Jb();const d=[e.map,n.seq,r.string,t.nullTag,o.trueTag,o.falseTag,a.intBin,a.intOct,a.int,a.intHex,i.floatNaN,i.floatExp,i.float,s.binary,c.merge,u.omap,l.pairs,f.set,p.intTime,p.floatTime,p.timestamp];return Nb.schema=d,Nb}function Yb(){if(Zb)return tb;Zb=1;var e=Uy(),t=rb(),n=Vy(),r=Xy(),s=ib(),o=pb(),i=mb(),a=bb(),c=wb(),u=kb(),l=Ny(),f=Tb(),p=Ob(),d=Vb(),h=Kb(),m=Jb();const g=new Map([["core",a.schema],["failsafe",[e.map,n.seq,r.string]],["json",c.schema],["yaml11",d.schema],["yaml-1.1",d.schema]]),y={binary:u.binary,bool:s.boolTag,float:o.float,floatExp:o.floatExp,floatNaN:o.floatNaN,floatTime:m.floatTime,int:i.int,intHex:i.intHex,intOct:i.intOct,intTime:m.intTime,map:e.map,merge:l.merge,null:t.nullTag,omap:f.omap,pairs:p.pairs,seq:n.seq,set:h.set,timestamp:m.timestamp},b={"tag:yaml.org,2002:binary":u.binary,"tag:yaml.org,2002:merge":l.merge,"tag:yaml.org,2002:omap":f.omap,"tag:yaml.org,2002:pairs":p.pairs,"tag:yaml.org,2002:set":h.set,"tag:yaml.org,2002:timestamp":m.timestamp};return tb.coreKnownTags=b,tb.getTags=function(e,t,n){const r=g.get(t);if(r&&!e)return n&&!r.includes(l.merge)?r.concat(l.merge):r.slice();let s=r;if(!s){if(!Array.isArray(e)){const e=Array.from(g.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}s=[]}if(Array.isArray(e))for(const t of e)s=s.concat(t);else"function"==typeof e&&(s=e(s.slice()));return n&&(s=s.concat(l.merge)),s.reduce((e,t)=>{const n="string"==typeof t?y[t]:t;if(!n){const e=JSON.stringify(t),n=Object.keys(y).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])},tb}function Qb(){if(Gb)return My;Gb=1;var e=xg(),t=Uy(),n=Vy(),r=Xy(),s=Yb();const o=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;return My.Schema=class i{constructor({compat:i,customTags:a,merge:c,resolveKnownTags:u,schema:l,sortMapEntries:f,toStringDefaults:p}){this.compat=Array.isArray(i)?s.getTags(i,"compat"):i?s.getTags(null,i):null,this.name="string"==typeof l&&l||"core",this.knownTags=u?s.coreKnownTags:{},this.tags=s.getTags(a,this.name,c),this.toStringOptions=p??null,Object.defineProperty(this,e.MAP,{value:t.map}),Object.defineProperty(this,e.SCALAR,{value:r.string}),Object.defineProperty(this,e.SEQ,{value:n.seq}),this.sortMapEntries="function"==typeof f?f:!0===f?o:null}clone(){const e=Object.create(i.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}},My}var Xb,ev,tv={};function nv(){if(Xb)return tv;Xb=1;var e=xg(),t=_y(),n=dy();return tv.stringifyDocument=function(r,s){const o=[];let i=!0===s.directives;if(!1!==s.directives&&r.directives){const e=r.directives.toString(r);e?(o.push(e),i=!0):r.directives.docStart&&(i=!0)}i&&o.push("---");const a=t.createStringifyContext(r,s),{commentString:c}=a.options;if(r.commentBefore){1!==o.length&&o.unshift("");const e=c(r.commentBefore);o.unshift(n.indentComment(e,""))}let u=!1,l=null;if(r.contents){if(e.isNode(r.contents)){if(r.contents.spaceBefore&&i&&o.push(""),r.contents.commentBefore){const e=c(r.contents.commentBefore);o.push(n.indentComment(e,""))}a.forceBlockIndent=!!r.comment,l=r.contents.comment}const s=l?void 0:()=>u=!0;let f=t.stringify(r.contents,a,()=>l=null,s);l&&(f+=n.lineComment(f,"",c(l))),"|"!==f[0]&&">"!==f[0]||"---"!==o[o.length-1]?o.push(f):o[o.length-1]=`--- ${f}`}else o.push(t.stringify(r.contents,a));if(r.directives?.docEnd)if(r.comment){const e=c(r.comment);e.includes("\n")?(o.push("..."),o.push(n.indentComment(e,""))):o.push(`... ${e}`)}else o.push("...");else{let e=r.comment;e&&u&&(e=e.replace(/^\n+/,"")),e&&(u&&!l||""===o[o.length-1]||o.push(""),o.push(n.indentComment(c(e),"")))}return o.join("\n")+"\n"},tv}function rv(){if(ev)return Mg;ev=1;var e=Qg(),t=ay(),n=xg(),r=Ly(),s=Vg(),o=Qb(),i=nv(),a=zg(),c=qg(),u=iy(),l=Fg();function f(e){if(n.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}return Mg.Document=class p{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,n.NODE_TYPE,{value:n.DOC});let s=null;"function"==typeof t||Array.isArray(t)?s=t:void 0===r&&t&&(r=t,t=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=o;let{version:i}=o;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(i=this.directives.yaml.version)):this.directives=new l.Directives({version:i}),this.setSchema(i,r),this.contents=void 0===e?null:this.createNode(e,s,r)}clone(){const e=Object.create(p.prototype,{[n.NODE_TYPE]:{value:n.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=n.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){f(this.contents)&&this.contents.add(e)}addIn(e,t){f(this.contents)&&this.contents.addIn(e,t)}createAlias(t,n){if(!t.anchor){const e=a.anchorNames(this);t.anchor=!n||e.has(n)?a.findNewAnchor(n||"a",e):n}return new e.Alias(t.anchor)}createNode(e,t,r){let s;if("function"==typeof t)e=t.call({"":e},"",e),s=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,n=t.filter(e).map(String);n.length>0&&(t=t.concat(n)),s=t}else void 0===r&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:o,anchorPrefix:i,flow:c,keepUndefined:l,onTagObj:f,tag:p}=r??{},{onAnchor:d,setAnchors:h,sourceObjects:m}=a.createNodeAnchors(this,i||"a"),g={aliasDuplicateObjects:o??!0,keepUndefined:l??!1,onAnchor:d,onTagObj:f,replacer:s,schema:this.schema,sourceObjects:m},y=u.createNode(e,p,g);return c&&n.isCollection(y)&&(y.flow=!0),h(),y}createPair(e,t,n={}){const s=this.createNode(e,null,n),o=this.createNode(t,null,n);return new r.Pair(s,o)}delete(e){return!!f(this.contents)&&this.contents.delete(e)}deleteIn(e){return t.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):!!f(this.contents)&&this.contents.deleteIn(e)}get(e,t){return n.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,r){return t.isEmptyPath(e)?!r&&n.isScalar(this.contents)?this.contents.value:this.contents:n.isCollection(this.contents)?this.contents.getIn(e,r):void 0}has(e){return!!n.isCollection(this.contents)&&this.contents.has(e)}hasIn(e){return t.isEmptyPath(e)?void 0!==this.contents:!!n.isCollection(this.contents)&&this.contents.hasIn(e)}set(e,n){null==this.contents?this.contents=t.collectionFromPath(this.schema,[e],n):f(this.contents)&&this.contents.set(e,n)}setIn(e,n){t.isEmptyPath(e)?this.contents=n:null==this.contents?this.contents=t.collectionFromPath(this.schema,Array.from(e),n):f(this.contents)&&this.contents.setIn(e,n)}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.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new l.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const t=JSON.stringify(e);throw new 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)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new o.Schema(Object.assign(n,t))}}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:o,reviver:i}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},u=s.toJS(this.contents,t??"",a);if("function"==typeof o)for(const{count:e,res:t}of a.anchors.values())o(t,e);return"function"==typeof i?c.applyReviver(i,{"":u},"",u):u}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return i.stringifyDocument(this,e)}},Mg}var sv,ov={};function iv(){if(sv)return ov;sv=1;class e extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}}return ov.YAMLError=e,ov.YAMLParseError=class extends e{constructor(e,t,n){super("YAMLParseError",e,t,n)}},ov.YAMLWarning=class extends e{constructor(e,t,n){super("YAMLWarning",e,t,n)}},ov.prettifyError=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map(e=>t.linePos(e));const{line:r,col:s}=n.linePos[0];n.message+=` at line ${r}, column ${s}`;let o=s-1,i=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(o>=60&&i.length>80){const e=Math.min(o-39,i.length-79);i="…"+i.substring(e),o-=e-1}if(i.length>80&&(i=i.substring(0,79)+"…"),r>1&&/^ *$/.test(i.substring(0,o))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+"…\n"),i=n+i}if(/[^ ]/.test(i)){let e=1;const t=n.linePos[1];t?.line===r&&t.col>s&&(e=Math.max(1,Math.min(t.col-s,80-o)));const a=" ".repeat(o)+"^".repeat(e);n.message+=`:\n\n${i}\n${a}\n`}},ov}var av,cv={},uv={},lv={},fv={},pv={};function dv(){if(av)return pv;return av=1,pv.resolveProps=function(e,{flow:t,indicator:n,next:r,offset:s,onError:o,parentIndent:i,startOnNewline:a}){let c=!1,u=a,l=a,f="",p="",d=!1,h=!1,m=null,g=null,y=null,b=null,v=null,D=null,w=null;for(const s of e)switch(h&&("space"!==s.type&&"newline"!==s.type&&"comma"!==s.type&&o(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),m&&(u&&"comment"!==s.type&&"newline"!==s.type&&o(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),s.type){case"space":t||"doc-start"===n&&"flow-collection"===r?.type||!s.source.includes("\t")||(m=s),l=!0;break;case"comment":{l||o(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=s.source.substring(1)||" ";f?f+=p+e:f=e,p="",u=!1;break}case"newline":u?f?f+=s.source:D&&"seq-item-ind"===n||(c=!0):p+=s.source,u=!0,d=!0,(g||y)&&(b=s),l=!0;break;case"anchor":g&&o(s,"MULTIPLE_ANCHORS","A node can have at most one anchor"),s.source.endsWith(":")&&o(s.offset+s.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=s,w??(w=s.offset),u=!1,l=!1,h=!0;break;case"tag":y&&o(s,"MULTIPLE_TAGS","A node can have at most one tag"),y=s,w??(w=s.offset),u=!1,l=!1,h=!0;break;case n:(g||y)&&o(s,"BAD_PROP_ORDER",`Anchors and tags must be after the ${s.source} indicator`),D&&o(s,"UNEXPECTED_TOKEN",`Unexpected ${s.source} in ${t??"collection"}`),D=s,u="seq-item-ind"===n||"explicit-key-ind"===n,l=!1;break;case"comma":if(t){v&&o(s,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),v=s,u=!1,l=!1;break}default:o(s,"UNEXPECTED_TOKEN",`Unexpected ${s.type} token`),u=!1,l=!1}const _=e[e.length-1],E=_?_.offset+_.source.length:s;return h&&r&&"space"!==r.type&&"newline"!==r.type&&"comma"!==r.type&&("scalar"!==r.type||""!==r.source)&&o(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(u&&m.indent<=i||"block-map"===r?.type||"block-seq"===r?.type)&&o(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:D,spaceBefore:c,comment:f,hasNewline:d,anchor:g,tag:y,newlineAfterProp:b,end:E,start:w??E}},pv}var hv,mv={};function gv(){if(hv)return mv;return hv=1,mv.containsNewline=function e(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes("\n"))return!0;if(t.end)for(const e of t.end)if("newline"===e.type)return!0;return!1;case"flow-collection":for(const n of t.items){for(const e of n.start)if("newline"===e.type)return!0;if(n.sep)for(const e of n.sep)if("newline"===e.type)return!0;if(e(n.key)||e(n.value))return!0}return!1;default:return!0}},mv}var yv,bv={};function vv(){if(yv)return bv;yv=1;var e=gv();return bv.flowIndentCheck=function(t,n,r){if("flow-collection"===n?.type){const s=n.end[0];if(s.indent===t&&("]"===s.source||"}"===s.source)&&e.containsNewline(n)){r(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}},bv}var Dv,wv,_v={};function Ev(){if(Dv)return _v;Dv=1;var e=xg();return _v.mapIncludes=function(t,n,r){const{uniqueKeys:s}=t.options;if(!1===s)return!1;const o="function"==typeof s?s:(t,n)=>t===n||e.isScalar(t)&&e.isScalar(n)&&t.value===n.value;return n.some(e=>o(e.key,r))},_v}function kv(){if(wv)return fv;wv=1;var e=Ly(),t=Ky(),n=dv(),r=gv(),s=vv(),o=Ev();const i="All mapping items must start at the same column";return fv.resolveBlockMap=function({composeNode:a,composeEmptyNode:c},u,l,f,p){const d=new(p?.nodeClass??t.YAMLMap)(u.schema);u.atRoot&&(u.atRoot=!1);let h=l.offset,m=null;for(const t of l.items){const{start:p,key:g,sep:y,value:b}=t,v=n.resolveProps(p,{indicator:"explicit-key-ind",next:g??y?.[0],offset:h,onError:f,parentIndent:l.indent,startOnNewline:!0}),D=!v.found;if(D){if(g&&("block-seq"===g.type?f(h,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in g&&g.indent!==l.indent&&f(h,"BAD_INDENT",i)),!v.anchor&&!v.tag&&!y){m=v.end,v.comment&&(d.comment?d.comment+="\n"+v.comment:d.comment=v.comment);continue}(v.newlineAfterProp||r.containsNewline(g))&&f(g??p[p.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else v.found?.indent!==l.indent&&f(h,"BAD_INDENT",i);u.atKey=!0;const w=v.end,_=g?a(u,g,v,f):c(u,w,p,null,v,f);u.schema.compat&&s.flowIndentCheck(l.indent,g,f),u.atKey=!1,o.mapIncludes(u,d.items,_)&&f(w,"DUPLICATE_KEY","Map keys must be unique");const E=n.resolveProps(y??[],{indicator:"map-value-ind",next:b,offset:_.range[2],onError:f,parentIndent:l.indent,startOnNewline:!g||"block-scalar"===g.type});if(h=E.end,E.found){D&&("block-map"!==b?.type||E.hasNewline||f(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),u.options.strict&&v.start<E.found.offset-1024&&f(_.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const n=b?a(u,b,E,f):c(u,h,y,null,E,f);u.schema.compat&&s.flowIndentCheck(l.indent,b,f),h=n.range[2];const r=new e.Pair(_,n);u.options.keepSourceTokens&&(r.srcToken=t),d.items.push(r)}else{D&&f(_.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),E.comment&&(_.comment?_.comment+="\n"+E.comment:_.comment=E.comment);const n=new e.Pair(_);u.options.keepSourceTokens&&(n.srcToken=t),d.items.push(n)}}return m&&m<h&&f(m,"IMPOSSIBLE","Map comment with trailing content"),d.range=[l.offset,h,m??h],d},fv}var Sv,Av={};function Cv(){if(Sv)return Av;Sv=1;var e=Jy(),t=dv(),n=vv();return Av.resolveBlockSeq=function({composeNode:r,composeEmptyNode:s},o,i,a,c){const u=new(c?.nodeClass??e.YAMLSeq)(o.schema);o.atRoot&&(o.atRoot=!1),o.atKey&&(o.atKey=!1);let l=i.offset,f=null;for(const{start:e,value:c}of i.items){const p=t.resolveProps(e,{indicator:"seq-item-ind",next:c,offset:l,onError:a,parentIndent:i.indent,startOnNewline:!0});if(!p.found){if(!(p.anchor||p.tag||c)){f=p.end,p.comment&&(u.comment=p.comment);continue}"block-seq"===c?.type?a(p.end,"BAD_INDENT","All sequence items must start at the same column"):a(l,"MISSING_CHAR","Sequence item without - indicator")}const d=c?r(o,c,p,a):s(o,p.end,e,null,p,a);o.schema.compat&&n.flowIndentCheck(i.indent,c,a),l=d.range[2],u.items.push(d)}return u.range=[i.offset,l,f??l],u},Av}var Pv,Ov,Tv,xv={},Nv={};function $v(){if(Pv)return Nv;return Pv=1,Nv.resolveEnd=function(e,t,n,r){let s="";if(e){let o=!1,i="";for(const a of e){const{source:e,type:c}=a;switch(c){case"space":o=!0;break;case"comment":{n&&!o&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";s?s+=i+t:s=t,i="";break}case"newline":s&&(i+=e),o=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=e.length}}return{comment:s,offset:t}},Nv}function Lv(){if(Ov)return xv;Ov=1;var e=xg(),t=Ly(),n=Ky(),r=Jy(),s=$v(),o=dv(),i=gv(),a=Ev();const c="Block collections are not allowed within flow collections",u=e=>e&&("block-map"===e.type||"block-seq"===e.type);return xv.resolveFlowCollection=function({composeNode:l,composeEmptyNode:f},p,d,h,m){const g="{"===d.start.source,y=g?"flow map":"flow sequence",b=new(m?.nodeClass??(g?n.YAMLMap:r.YAMLSeq))(p.schema);b.flow=!0;const v=p.atRoot;v&&(p.atRoot=!1),p.atKey&&(p.atKey=!1);let D=d.offset+d.start.source.length;for(let r=0;r<d.items.length;++r){const s=d.items[r],{start:m,key:v,sep:w,value:_}=s,E=o.resolveProps(m,{flow:y,indicator:"explicit-key-ind",next:v??w?.[0],offset:D,onError:h,parentIndent:d.indent,startOnNewline:!1});if(!E.found){if(!(E.anchor||E.tag||w||_)){0===r&&E.comma?h(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`):r<d.items.length-1&&h(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${y}`),E.comment&&(b.comment?b.comment+="\n"+E.comment:b.comment=E.comment),D=E.end;continue}!g&&p.options.strict&&i.containsNewline(v)&&h(v,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===r)E.comma&&h(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`);else if(E.comma||h(E.start,"MISSING_CHAR",`Missing , between ${y} items`),E.comment){let t="";e:for(const e of m)switch(e.type){case"comma":case"space":break;case"comment":t=e.source.substring(1);break e;default:break e}if(t){let n=b.items[b.items.length-1];e.isPair(n)&&(n=n.value??n.key),n.comment?n.comment+="\n"+t:n.comment=t,E.comment=E.comment.substring(t.length+1)}}if(g||w||E.found){p.atKey=!0;const e=E.end,r=v?l(p,v,E,h):f(p,e,m,null,E,h);u(v)&&h(r.range,"BLOCK_IN_FLOW",c),p.atKey=!1;const i=o.resolveProps(w??[],{flow:y,indicator:"map-value-ind",next:_,offset:r.range[2],onError:h,parentIndent:d.indent,startOnNewline:!1});if(i.found){if(!g&&!E.found&&p.options.strict){if(w)for(const e of w){if(e===i.found)break;if("newline"===e.type){h(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}E.start<i.found.offset-1024&&h(i.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else _&&("source"in _&&":"===_.source?.[0]?h(_,"MISSING_CHAR",`Missing space after : in ${y}`):h(i.start,"MISSING_CHAR",`Missing , or : between ${y} items`));const k=_?l(p,_,i,h):i.found?f(p,i.end,w,null,i,h):null;k?u(_)&&h(k.range,"BLOCK_IN_FLOW",c):i.comment&&(r.comment?r.comment+="\n"+i.comment:r.comment=i.comment);const S=new t.Pair(r,k);if(p.options.keepSourceTokens&&(S.srcToken=s),g){const t=b;a.mapIncludes(p,t.items,r)&&h(e,"DUPLICATE_KEY","Map keys must be unique"),t.items.push(S)}else{const e=new n.YAMLMap(p.schema);e.flow=!0,e.items.push(S);const t=(k??r).range;e.range=[r.range[0],t[1],t[2]],b.items.push(e)}D=k?k.range[2]:i.end}else{const e=_?l(p,_,E,h):f(p,E.end,w,null,E,h);b.items.push(e),D=e.range[2],u(_)&&h(e.range,"BLOCK_IN_FLOW",c)}}const w=g?"}":"]",[_,...E]=d.end;let k=D;if(_?.source===w)k=_.offset+_.source.length;else{const e=y[0].toUpperCase()+y.substring(1);h(D,v?"MISSING_CHAR":"BAD_INDENT",v?`${e} must end with a ${w}`:`${e} in block collection must be sufficiently indented and end with a ${w}`),_&&1!==_.source.length&&E.unshift(_)}if(E.length>0){const e=s.resolveEnd(E,k,p.options.strict,h);e.comment&&(b.comment?b.comment+="\n"+e.comment:b.comment=e.comment),b.range=[d.offset,k,e.offset]}else b.range=[d.offset,k,k];return b},xv}function Rv(){if(Tv)return lv;Tv=1;var e=xg(),t=oy(),n=Ky(),r=Jy(),s=kv(),o=Cv(),i=Lv();function a(e,t,n,r,a,c){const u="block-map"===n.type?s.resolveBlockMap(e,t,n,r,c):"block-seq"===n.type?o.resolveBlockSeq(e,t,n,r,c):i.resolveFlowCollection(e,t,n,r,c),l=u.constructor;return"!"===a||a===l.tagName?(u.tag=l.tagName,u):(a&&(u.tag=a),u)}return lv.composeCollection=function(s,o,i,c,u){const l=c.tag,f=l?o.directives.tagName(l.source,e=>u(l,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===i.type){const{anchor:e,newlineAfterProp:t}=c,n=e&&l?e.offset>l.offset?e:l:e??l;if(n&&(!t||t.offset<n.offset)){u(n,"MISSING_CHAR","Missing newline after block sequence props")}}const p="block-map"===i.type?"map":"block-seq"===i.type?"seq":"{"===i.start.source?"map":"seq";if(!l||!f||"!"===f||f===n.YAMLMap.tagName&&"map"===p||f===r.YAMLSeq.tagName&&"seq"===p)return a(s,o,i,u,f);let d=o.schema.tags.find(e=>e.tag===f&&e.collection===p);if(!d){const e=o.schema.knownTags[f];if(e?.collection!==p)return e?u(l,"BAD_COLLECTION_TYPE",`${e.tag} used for ${p} collection, but expects ${e.collection??"scalar"}`,!0):u(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${f}`,!0),a(s,o,i,u,f);o.schema.tags.push(Object.assign({},e,{default:!1})),d=e}const h=a(s,o,i,u,f,d),m=d.resolve?.(h,e=>u(l,"TAG_RESOLVE_FAILED",e),o.options)??h,g=e.isNode(m)?m:new t.Scalar(m);return g.range=h.range,g.tag=f,d?.format&&(g.format=d.format),g},lv}var Fv,Iv={},Mv={};function jv(){if(Fv)return Mv;Fv=1;var e=oy();return Mv.resolveBlockScalar=function(t,n,r){const s=n.offset,o=function({offset:e,props:t},n,r){if("block-scalar-header"!==t[0].type)return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=t[0],o=s[0];let i=0,a="",c=-1;for(let t=1;t<s.length;++t){const n=s[t];if(a||"-"!==n&&"+"!==n){const r=Number(n);!i&&r?i=r:-1===c&&(c=e+t)}else a=n}-1!==c&&r(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let u=!1,l="",f=s.length;for(let e=1;e<t.length;++e){const s=t[e];switch(s.type){case"space":u=!0;case"newline":f+=s.source.length;break;case"comment":if(n&&!u){r(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters")}f+=s.source.length,l=s.source.substring(1);break;case"error":r(s,"UNEXPECTED_TOKEN",s.message),f+=s.source.length;break;default:{r(s,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${s.type}`);const e=s.source;e&&"string"==typeof e&&(f+=e.length)}}}return{mode:o,indent:i,chomp:a,comment:l,length:f}}(n,t.options.strict,r);if(!o)return{value:"",type:null,comment:"",range:[s,s,s]};const i=">"===o.mode?e.Scalar.BLOCK_FOLDED:e.Scalar.BLOCK_LITERAL,a=n.source?function(e){const t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),s=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let e=1;e<t.length;e+=2)s.push([t[e],t[e+1]]);return s}(n.source):[];let c=a.length;for(let e=a.length-1;e>=0;--e){const t=a[e][1];if(""!==t&&"\r"!==t)break;c=e}if(0===c){const e="+"===o.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let t=s+o.length;return n.source&&(t+=n.source.length),{value:e,type:i,comment:o.comment,range:[s,t,t]}}let u=n.indent+o.indent,l=n.offset+o.length,f=0;for(let e=0;e<c;++e){const[n,s]=a[e];if(""!==s&&"\r"!==s){if(n.length<u){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";r(l+n.length,"MISSING_CHAR",e)}if(0===o.indent&&(u=n.length),f=e,0===u&&!t.atRoot){r(l,"BAD_INDENT","Block scalar values in collections must be indented")}break}0===o.indent&&n.length>u&&(u=n.length),l+=n.length+s.length+1}for(let e=a.length-1;e>=c;--e)a[e][0].length>u&&(c=e+1);let p="",d="",h=!1;for(let e=0;e<f;++e)p+=a[e][0].slice(u)+"\n";for(let t=f;t<c;++t){let[n,s]=a[t];l+=n.length+s.length+1;const c="\r"===s[s.length-1];if(c&&(s=s.slice(0,-1)),s&&n.length<u){const e=`Block scalar lines must not be less indented than their ${o.indent?"explicit indentation indicator":"first line"}`;r(l-s.length-(c?2:1),"BAD_INDENT",e),n=""}i===e.Scalar.BLOCK_LITERAL?(p+=d+n.slice(u)+s,d="\n"):n.length>u||"\t"===s[0]?(" "===d?d="\n":h||"\n"!==d||(d="\n\n"),p+=d+n.slice(u)+s,d="\n",h=!0):""===s?"\n"===d?p+="\n":d="\n":(p+=d+s,d=" ",h=!1)}switch(o.chomp){case"-":break;case"+":for(let e=c;e<a.length;++e)p+="\n"+a[e][0].slice(u);"\n"!==p[p.length-1]&&(p+="\n");break;default:p+="\n"}const m=s+o.length+n.source.length;return{value:p,type:i,comment:o.comment,range:[s,m,m]}},Mv}var Bv,zv,Hv={};function Kv(){if(Bv)return Hv;Bv=1;var e=oy(),t=$v();function n(e){let t,n;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy"),n=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let s=r[1],o=" ",i=t.lastIndex;for(n.lastIndex=i;r=n.exec(e);)""===r[1]?"\n"===o?s+=o:o="\n":(s+=o+r[1],o=" "),i=n.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=i,r=a.exec(e),s+o+(r?.[1]??"")}function r(e,t){let n="",r=e[t+1];for(;!(" "!==r&&"\t"!==r&&"\n"!==r&&"\r"!==r||"\r"===r&&"\n"!==e[t+2]);)"\n"===r&&(n+="\n"),r=e[(t+=1)+1];return n||(n=" "),{fold:n,offset:t}}const s={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function o(e,t,n,r){const s=e.substr(t,n),o=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;if(isNaN(o)){const s=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}return String.fromCodePoint(o)}return Hv.resolveFlowScalar=function(i,a,c){const{offset:u,type:l,source:f,end:p}=i;let d,h;const m=(e,t,n)=>c(u+e,t,n);switch(l){case"scalar":d=e.Scalar.PLAIN,h=function(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`);return n(e)}(f,m);break;case"single-quoted-scalar":d=e.Scalar.QUOTE_SINGLE,h=function(e,t){"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote");return n(e.slice(1,-1)).replace(/''/g,"'")}(f,m);break;case"double-quoted-scalar":d=e.Scalar.QUOTE_DOUBLE,h=function(e,t){let n="";for(let i=1;i<e.length-1;++i){const a=e[i];if("\r"!==a||"\n"!==e[i+1])if("\n"===a){const{fold:t,offset:s}=r(e,i);n+=t,i=s}else if("\\"===a){let r=e[++i];const a=s[r];if(a)n+=a;else if("\n"===r)for(r=e[i+1];" "===r||"\t"===r;)r=e[1+ ++i];else if("\r"===r&&"\n"===e[i+1])for(r=e[1+ ++i];" "===r||"\t"===r;)r=e[1+ ++i];else if("x"===r||"u"===r||"U"===r){const s={x:2,u:4,U:8}[r];n+=o(e,i+1,s,t),i+=s}else{const r=e.substr(i-1,2);t(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${r}`),n+=r}}else if(" "===a||"\t"===a){const t=i;let r=e[i+1];for(;" "===r||"\t"===r;)r=e[1+ ++i];"\n"===r||"\r"===r&&"\n"===e[i+2]||(n+=i>t?e.slice(t,i+1):a)}else n+=a}'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote');return n}(f,m);break;default:return c(i,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[u,u+f.length,u+f.length]}}const g=u+f.length,y=t.resolveEnd(p,g,a,c);return{value:h,type:d,comment:y.comment,range:[u,g,y.offset]}},Hv}function Uv(){if(zv)return Iv;zv=1;var e=xg(),t=oy(),n=jv(),r=Kv();return Iv.composeScalar=function(s,o,i,a){const{value:c,type:u,comment:l,range:f}="block-scalar"===o.type?n.resolveBlockScalar(s,o,a):r.resolveFlowScalar(o,s.options.strict,a),p=i?s.directives.tagName(i.source,e=>a(i,"TAG_RESOLVE_FAILED",e)):null;let d,h;d=s.options.stringKeys&&s.atKey?s.schema[e.SCALAR]:p?function(t,n,r,s,o){if("!"===r)return t[e.SCALAR];const i=[];for(const e of t.tags)if(!e.collection&&e.tag===r){if(!e.default||!e.test)return e;i.push(e)}for(const e of i)if(e.test?.test(n))return e;const a=t.knownTags[r];if(a&&!a.collection)return t.tags.push(Object.assign({},a,{default:!1,test:void 0})),a;return o(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,"tag:yaml.org,2002:str"!==r),t[e.SCALAR]}(s.schema,c,p,i,a):"scalar"===o.type?function({atKey:t,directives:n,schema:r},s,o,i){const a=r.tags.find(e=>(!0===e.default||t&&"key"===e.default)&&e.test?.test(s))||r[e.SCALAR];if(r.compat){const t=r.compat.find(e=>e.default&&e.test?.test(s))??r[e.SCALAR];if(a.tag!==t.tag){i(o,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${n.tagString(a.tag)} or ${n.tagString(t.tag)}`,!0)}}return a}(s,c,o,a):s.schema[e.SCALAR];try{const n=d.resolve(c,e=>a(i??o,"TAG_RESOLVE_FAILED",e),s.options);h=e.isScalar(n)?n:new t.Scalar(n)}catch(e){const n=e instanceof Error?e.message:String(e);a(i??o,"TAG_RESOLVE_FAILED",n),h=new t.Scalar(c)}return h.range=f,h.source=c,u&&(h.type=u),p&&(h.tag=p),d.format&&(h.format=d.format),l&&(h.comment=l),h},Iv}var qv,Zv,Gv,Wv,Jv={};function Vv(){if(qv)return Jv;return qv=1,Jv.emptyScalarPosition=function(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++r];"space"===n?.type;)e+=n.source.length,n=t[++r];break}}return e},Jv}function Yv(){if(Zv)return uv;Zv=1;var e=Qg(),t=xg(),n=Rv(),r=Uv(),s=$v(),o=Vv();const i={composeNode:a,composeEmptyNode:c};function a(o,a,u,l){const f=o.atKey,{spaceBefore:p,comment:d,anchor:h,tag:m}=u;let g,y=!0;switch(a.type){case"alias":g=function({options:t},{offset:n,source:r,end:o},i){const a=new e.Alias(r.substring(1));""===a.source&&i(n,"BAD_ALIAS","Alias cannot be an empty string");a.source.endsWith(":")&&i(n+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=n+r.length,u=s.resolveEnd(o,c,t.strict,i);a.range=[n,c,u.offset],u.comment&&(a.comment=u.comment);return a}(o,a,l),(h||m)&&l(a,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":g=r.composeScalar(o,a,m,l),h&&(g.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":g=n.composeCollection(i,o,a,u,l),h&&(g.anchor=h.source.substring(1));break;default:l(a,"UNEXPECTED_TOKEN","error"===a.type?a.message:`Unsupported token (type: ${a.type})`),g=c(o,a.offset,void 0,null,u,l),y=!1}if(h&&""===g.anchor&&l(h,"BAD_ALIAS","Anchor cannot be an empty string"),f&&o.options.stringKeys&&(!t.isScalar(g)||"string"!=typeof g.value||g.tag&&"tag:yaml.org,2002:str"!==g.tag)){l(m??a,"NON_STRING_KEY","With stringKeys, all keys must be strings")}return p&&(g.spaceBefore=!0),d&&("scalar"===a.type&&""===a.source?g.comment=d:g.commentBefore=d),o.options.keepSourceTokens&&y&&(g.srcToken=a),g}function c(e,t,n,s,{spaceBefore:i,comment:a,anchor:c,tag:u,end:l},f){const p={type:"scalar",offset:o.emptyScalarPosition(t,n,s),indent:-1,source:""},d=r.composeScalar(e,p,u,f);return c&&(d.anchor=c.source.substring(1),""===d.anchor&&f(c,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(d.spaceBefore=!0),a&&(d.comment=a,d.range[2]=l),d}return uv.composeEmptyNode=c,uv.composeNode=a,uv}function Qv(){if(Gv)return cv;Gv=1;var e=rv(),t=Yv(),n=$v(),r=dv();return cv.composeDoc=function(s,o,{offset:i,start:a,value:c,end:u},l){const f=Object.assign({_directives:o},s),p=new e.Document(void 0,f),d={atKey:!1,atRoot:!0,directives:p.directives,options:p.options,schema:p.schema},h=r.resolveProps(a,{indicator:"doc-start",next:c??u?.[0],offset:i,onError:l,parentIndent:0,startOnNewline:!0});h.found&&(p.directives.docStart=!0,!c||"block-map"!==c.type&&"block-seq"!==c.type||h.hasNewline||l(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),p.contents=c?t.composeNode(d,c,h,l):t.composeEmptyNode(d,h.end,a,null,h,l);const m=p.contents.range[2],g=n.resolveEnd(u,m,!1,l);return g.comment&&(p.comment=g.comment),p.range=[i,m,g.offset],p},cv}function Xv(){if(Wv)return Pg;Wv=1;var e=w,t=Fg(),n=rv(),r=iv(),s=xg(),o=Qv(),i=$v();function a(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+("string"==typeof n?n.length:1)]}function c(e){let t="",n=!1,r=!1;for(let s=0;s<e.length;++s){const o=e[s];switch(o[0]){case"#":t+=(""===t?"":r?"\n\n":"\n")+(o.substring(1)||" "),n=!0,r=!1;break;case"%":"#"!==e[s+1]?.[0]&&(s+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}return Pg.Composer=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,s)=>{const o=a(e);s?this.warnings.push(new r.YAMLWarning(o,t,n)):this.errors.push(new r.YAMLParseError(o,t,n))},this.directives=new t.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:r}=c(this.prelude);if(n){const o=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!o)e.commentBefore=n;else if(s.isCollection(o)&&!o.flow&&o.items.length>0){let e=o.items[0];s.isPair(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{const e=o.commentBefore;o.commentBefore=e?`${n}\n${e}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:c(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(const t of e)yield*this.next(t);yield*this.end(t,n)}*next(t){switch(e.env.LOG_STREAM&&console.dir(t,{depth:null}),t.type){case"directive":this.directives.add(t.source,(e,n,r)=>{const s=a(t);s[0]+=e,this.onError(s,"BAD_DIRECTIVE",n,r)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const e=o.composeDoc(this.options,this.directives,t,this.onError);this.atDirectives&&!e.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(e,!1),this.doc&&(yield this.doc),this.doc=e,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const e=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,n=new r.YAMLParseError(a(t),"UNEXPECTED_TOKEN",e);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const e="Unexpected doc-end without preceding document";this.errors.push(new r.YAMLParseError(a(t),"UNEXPECTED_TOKEN",e));break}this.doc.directives.docEnd=!0;const e=i.resolveEnd(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),e.comment){const t=this.doc.comment;this.doc.comment=t?`${t}\n${e.comment}`:e.comment}this.doc.range[2]=e.offset;break}default:this.errors.push(new r.YAMLParseError(a(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),r=new n.Document(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}},Pg}var eD,tD={},nD={};function rD(){if(eD)return nD;eD=1;var e=jv(),t=Kv(),n=iv(),r=wy();function s(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function o(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const r=e.props.slice(1);let s=t.length;"block-scalar-header"===e.props[0].type&&(s-=e.props[0].source.length);for(const e of r)e.offset+=s;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{const r={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:n,source:t,end:[r]});break}default:{const r="indent"in e?e.indent:-1,s="end"in e&&Array.isArray(e.end)?e.end.filter(e=>"space"===e.type||"comment"===e.type||"newline"===e.type):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:n,indent:r,source:t,end:s})}}}return nD.createScalarToken=function(e,t){const{implicitKey:n=!1,indent:o,inFlow:i=!1,offset:a=-1,type:c="PLAIN"}=t,u=r.stringifyString({type:c,value:e},{implicitKey:n,indent:o>0?" ".repeat(o):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:o,source:"\n"}];switch(u[0]){case"|":case">":{const e=u.indexOf("\n"),t=u.substring(0,e),n=u.substring(e+1)+"\n",r=[{type:"block-scalar-header",offset:a,indent:o,source:t}];return s(r,l)||r.push({type:"newline",offset:-1,indent:o,source:"\n"}),{type:"block-scalar",offset:a,indent:o,props:r,source:n}}case'"':return{type:"double-quoted-scalar",offset:a,indent:o,source:u,end:l};case"'":return{type:"single-quoted-scalar",offset:a,indent:o,source:u,end:l};default:return{type:"scalar",offset:a,indent:o,source:u,end:l}}},nD.resolveAsScalar=function(r,s=!0,o){if(r){const i=(e,t,r)=>{const s="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!o)throw new n.YAMLParseError([s,s+1],t,r);o(s,t,r)};switch(r.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return t.resolveFlowScalar(r,s,i);case"block-scalar":return e.resolveBlockScalar({options:{strict:s}},r,i)}}return null},nD.setScalarValue=function(e,t,n={}){let{afterKey:i=!1,implicitKey:a=!1,inFlow:c=!1,type:u}=n,l="indent"in e?e.indent:null;if(i&&"number"==typeof l&&(l+=2),!u)switch(e.type){case"single-quoted-scalar":u="QUOTE_SINGLE";break;case"double-quoted-scalar":u="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");u=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:u="PLAIN"}const f=r.stringifyString({type:u,value:t},{implicitKey:a||null===l,indent:null!==l&&l>0?" ".repeat(l):"",inFlow:c,options:{blockQuote:!0,lineWidth:-1}});switch(f[0]){case"|":case">":!function(e,t){const n=t.indexOf("\n"),r=t.substring(0,n),o=t.substring(n+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=r,e.source=o}else{const{offset:t}=e,n="indent"in e?e.indent:-1,i=[{type:"block-scalar-header",offset:t,indent:n,source:r}];s(i,"end"in e?e.end:void 0)||i.push({type:"newline",offset:-1,indent:n,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:n,props:i,source:o})}}(e,f);break;case'"':o(e,f,"double-quoted-scalar");break;case"'":o(e,f,"single-quoted-scalar");break;default:o(e,f,"scalar")}},nD}var sD,oD={};function iD(){if(sD)return oD;sD=1;function e(n){switch(n.type){case"block-scalar":{let t="";for(const r of n.props)t+=e(r);return t+n.source}case"block-map":case"block-seq":{let e="";for(const r of n.items)e+=t(r);return e}case"flow-collection":{let e=n.start.source;for(const r of n.items)e+=t(r);for(const t of n.end)e+=t.source;return e}case"document":{let e=t(n);if(n.end)for(const t of n.end)e+=t.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(const t of n.end)e+=t.source;return e}}}function t({start:t,key:n,sep:r,value:s}){let o="";for(const e of t)o+=e.source;if(n&&(o+=e(n)),r)for(const e of r)o+=e.source;return s&&(o+=e(s)),o}return oD.stringify=n=>"type"in n?e(n):t(n),oD}var aD,cD,uD={};function lD(){if(aD)return uD;aD=1;const e=Symbol("break visit"),t=Symbol("skip children"),n=Symbol("remove item");function r(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),s(Object.freeze([]),e,t)}function s(t,r,o){let i=o(r,t);if("symbol"==typeof i)return i;for(const a of["key","value"]){const c=r[a];if(c&&"items"in c){for(let r=0;r<c.items.length;++r){const i=s(Object.freeze(t.concat([[a,r]])),c.items[r],o);if("number"==typeof i)r=i-1;else{if(i===e)return e;i===n&&(c.items.splice(r,1),r-=1)}}"function"==typeof i&&"key"===a&&(i=i(r,t))}}return"function"==typeof i?i(r,t):i}return r.BREAK=e,r.SKIP=t,r.REMOVE=n,r.itemAtPath=(e,t)=>{let n=e;for(const[e,r]of t){const t=n?.[e];if(!t||!("items"in t))return;n=t.items[r]}return n},r.parentCollection=(e,t)=>{const n=r.itemAtPath(e,t.slice(0,-1)),s=t[t.length-1][0],o=n?.[s];if(o&&"items"in o)return o;throw new Error("Parent collection not found")},uD.visit=r,uD}function fD(){if(cD)return tD;cD=1;var e=rD(),t=iD(),n=lD();return tD.createScalarToken=e.createScalarToken,tD.resolveAsScalar=e.resolveAsScalar,tD.setScalarValue=e.setScalarValue,tD.stringify=t.stringify,tD.visit=n.visit,tD.BOM="\ufeff",tD.DOCUMENT="",tD.FLOW_END="",tD.SCALAR="",tD.isCollection=e=>!!e&&"items"in e,tD.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),tD.prettyToken=function(e){switch(e){case"\ufeff":return"<BOM>";case"":return"<DOC>";case"":return"<FLOW_END>";case"":return"<SCALAR>";default:return JSON.stringify(e)}},tD.tokenType=function(e){switch(e){case"\ufeff":return"byte-order-mark";case"":return"doc-mode";case"":return"flow-error-end";case"":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"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null},tD}var pD,dD={};function hD(){if(pD)return dD;pD=1;var e=fD();function t(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const n=new Set("0123456789ABCDEFabcdef"),r=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),s=new Set(",[]{}"),o=new Set(" ,[]{}\n\r\t"),i=e=>!e||o.has(e);return dD.Lexer=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("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;)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 n=this.buffer[e];if(this.indentNext>0){let t=0;for(;" "===n;)n=this.buffer[++t+e];if("\r"===n){const n=this.buffer[t+e+1];if("\n"===n||!n&&!this.atEnd)return e+t+1}return"\n"===n||t>=this.indentNext||!n&&!this.atEnd?e+t:-1}if("-"===n||"."===n){const n=this.buffer.substr(e,3);if(("---"===n||"..."===n)&&t(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 t=this.getLine();if(null===t)return this.setNext("stream");if(t[0]===e.BOM&&(yield*this.pushCount(1),t=t.substring(1)),"%"===t[0]){let e=t.length,n=t.indexOf("#");for(;-1!==n;){const r=t[n-1];if(" "===r||"\t"===r){e=n-1;break}n=t.indexOf("#",n+1)}for(;;){const n=t[e-1];if(" "!==n&&"\t"!==n)break;e-=1}const r=(yield*this.pushCount(e))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){const e=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-e),yield*this.pushNewline(),"stream"}return yield e.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){const 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");const e=this.peek(3);if(("---"===e||"..."===e)&&t(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&&!t(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&t(n)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const 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(i),"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 n,r,s=-1;do{n=yield*this.pushNewline(),n>0?(r=yield*this.pushSpaces(!1),this.indentValue=s=r):r=0,r+=(yield*this.pushSpaces(!0))}while(n+r>0);const o=this.getLine();if(null===o)return this.setNext("flow");if(-1!==s&&s<this.indentNext&&"#"!==o[0]||0===s&&(o.startsWith("---")||o.startsWith("..."))&&t(o[3])){if(!(s===this.indentNext-1&&1===this.flowLevel&&("]"===o[0]||"}"===o[0])))return this.flowLevel=0,yield e.FLOW_END,yield*this.parseLineStart()}let a=0;for(;","===o[a];)a+=(yield*this.pushCount(1)),a+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(a+=(yield*this.pushIndicators()),o[a]){case void 0:return"flow";case"#":return yield*this.pushCount(o.length-a),"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(i),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||t(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let 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)}const n=this.buffer.substring(0,t);let r=n.indexOf("\n",this.pos);if(-1!==r){for(;-1!==r;){const e=this.continueScalar(r+1);if(-1===e)break;r=n.indexOf("\n",e)}-1!==r&&(t=r-("\r"===n[r-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(;;){const 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=>t(e)||"#"===e)}*parseBlockScalar(){let t,n=this.pos-1,r=0;e:for(let e=this.pos;t=this.buffer[e];++e)switch(t){case" ":r+=1;break;case"\n":n=e,r=0;break;case"\r":{const t=this.buffer[e+1];if(!t&&!this.atEnd)return this.setNext("block-scalar");if("\n"===t)break}default:break e}if(!t&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=r:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(n+1);if(-1===e)break;n=this.buffer.indexOf("\n",e)}while(-1!==n);if(-1===n){if(!this.atEnd)return this.setNext("block-scalar");n=this.buffer.length}}let s=n+1;for(t=this.buffer[s];" "===t;)t=this.buffer[++s];if("\t"===t){for(;"\t"===t||" "===t||"\r"===t||"\n"===t;)t=this.buffer[++s];n=s-1}else if(!this.blockScalarKeep)for(;;){let e=n-1,t=this.buffer[e];"\r"===t&&(t=this.buffer[--e]);const s=e;for(;" "===t;)t=this.buffer[--e];if(!("\n"===t&&e>=this.pos&&e+1+r>s))break;n=e}return yield e.SCALAR,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let r,o=this.pos-1,i=this.pos-1;for(;r=this.buffer[++i];)if(":"===r){const e=this.buffer[i+1];if(t(e)||n&&s.has(e))break;o=i}else if(t(r)){let e=this.buffer[i+1];if("\r"===r&&("\n"===e?(i+=1,r="\n",e=this.buffer[i+1]):o=i),"#"===e||n&&s.has(e))break;if("\n"===r){const e=this.continueScalar(i+1);if(-1===e)break;i=Math.max(i,e-2)}}else{if(n&&s.has(r))break;o=i}return r||this.atEnd?(yield e.SCALAR,yield*this.pushToIndex(o+1,!0),n?"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){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(i))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(t(n)||e&&s.has(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,n=this.buffer[e];for(;!t(n)&&">"!==n;)n=this.buffer[++e];return yield*this.pushToIndex(">"===n?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(r.has(t))t=this.buffer[++e];else{if("%"!==t||!n.has(this.buffer[e+1])||!n.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const 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"===t);const r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},dD}var mD,gD={};function yD(){if(mD)return gD;mD=1;return gD.LineCounter=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){const r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(0===t)return{line:0,col:e};return{line:t,col:e-this.lineStarts[t-1]+1}}}},gD}var bD,vD={};function DD(){if(bD)return vD;bD=1;var e=w,t=fD(),n=hD();function r(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function s(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 o(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 i(e){switch(e.type){case"document":return e.start;case"block-map":{const 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 a(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(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function c(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||r(t.start,"explicit-key-ind")||r(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,o(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}return vD.Parser=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new n.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(n){if(this.source=n,e.env.LOG_TOKENS&&console.log("|",t.prettyToken(n)),this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=n.length);const r=t.tokenType(n);if(r)if("scalar"===r)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+n.length);break;case"space":this.atNewLine&&" "===n[0]&&(this.indent+=n.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=n.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=n.length}else{const e=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:e,source:n}),this.offset+=n.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(){const e=this.peek(1);if("doc-end"!==this.type||"doc-end"===e?.type){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()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const 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&&c(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const n=e.items[e.items.length-1];if(n.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!n.sep)return Object.assign(n,{key:t,sep:[]}),void(this.onKeyLine=!n.explicitKey);n.value=t;break}case"block-seq":{const n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{const n=e.items[e.items.length-1];return void(!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]}))}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)){const n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&-1===s(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{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}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":return void(-1!==s(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){const t=a(i(this.peek(2)));let n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];const r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);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){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.type?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)){const n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const n=!this.onKeyLine&&this.indent===e.indent,s=n&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let i=[];if(s&&t.sep&&!t.value){const n=[];for(let r=0;r<t.sep.length;++r){const s=t.sep[r];switch(s.type){case"newline":n.push(r);break;case"space":break;case"comment":s.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":return void(s||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?s||t.value?(i.push(this.sourceToken),e.items.push({start:i,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),void(this.onKeyLine=!0);case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(r(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(o(t.key)&&!r(t.sep,"newline")){const e=a(t.start),n=t.key,r=t.sep;r.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:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else if(r(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=a(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||s?e.items.push({start:i,key:null,sep:[this.sourceToken]}):r(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]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(s||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0))}default:{const s=this.startBlockValue(e);if(s){if("block-seq"===s.type){if(!t.explicitKey&&t.sep&&!r(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:i});return void this.stack.push(s)}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.type?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)){const n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||r(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while("flow-collection"===e?.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const 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))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const n=a(i(t));c(e);const r=e.end.splice(1,e.end.length);r.push(this.sourceToken);const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}}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;const t=a(i(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;const t=a(i(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())}}},vD}var wD,_D,ED={};function kD(){if(wD)return ED;wD=1;var e=Xv(),t=rv(),n=iv(),r=Cy(),s=xg(),o=yD(),i=DD();function a(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new o.LineCounter||null,prettyErrors:t}}function c(t,r={}){const{lineCounter:s,prettyErrors:o}=a(r),c=new i.Parser(s?.addNewLine),u=new e.Composer(r);let l=null;for(const e of u.compose(c.parse(t),!0,t.length))if(l){if("silent"!==l.options.logLevel){l.errors.push(new n.YAMLParseError(e.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else l=e;return o&&s&&(l.errors.forEach(n.prettifyError(t,s)),l.warnings.forEach(n.prettifyError(t,s))),l}return ED.parse=function(e,t,n){let s;"function"==typeof t?s=t:void 0===n&&t&&"object"==typeof t&&(n=t);const o=c(e,n);if(!o)return null;if(o.warnings.forEach(e=>r.warn(o.options.logLevel,e)),o.errors.length>0){if("silent"!==o.options.logLevel)throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:s},n))},ED.parseAllDocuments=function(t,r={}){const{lineCounter:s,prettyErrors:o}=a(r),c=new i.Parser(s?.addNewLine),u=new e.Composer(r),l=Array.from(u.compose(c.parse(t)));if(o&&s)for(const e of l)e.errors.forEach(n.prettifyError(t,s)),e.warnings.forEach(n.prettifyError(t,s));return l.length>0?l:Object.assign([],{empty:!0},u.streamInfo())},ED.parseDocument=c,ED.stringify=function(e,n,r){let o=null;if("function"==typeof n||Array.isArray(n)?o=n:void 0===r&&n&&(r=n),"string"==typeof r&&(r=r.length),"number"==typeof r){const e=Math.round(r);r=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=r??n??{};if(!e)return}return s.isDocument(e)&&!o?e.toString(r):new t.Document(e,o,r).toString(r)},ED}var SD=function(){if(_D)return Cg;_D=1;var e=Xv(),t=rv(),n=Qb(),r=iv(),s=Qg(),o=xg(),i=Ly(),a=oy(),c=Ky(),u=Jy(),l=fD(),f=hD(),p=yD(),d=DD(),h=kD(),m=Rg();return Cg.Composer=e.Composer,Cg.Document=t.Document,Cg.Schema=n.Schema,Cg.YAMLError=r.YAMLError,Cg.YAMLParseError=r.YAMLParseError,Cg.YAMLWarning=r.YAMLWarning,Cg.Alias=s.Alias,Cg.isAlias=o.isAlias,Cg.isCollection=o.isCollection,Cg.isDocument=o.isDocument,Cg.isMap=o.isMap,Cg.isNode=o.isNode,Cg.isPair=o.isPair,Cg.isScalar=o.isScalar,Cg.isSeq=o.isSeq,Cg.Pair=i.Pair,Cg.Scalar=a.Scalar,Cg.YAMLMap=c.YAMLMap,Cg.YAMLSeq=u.YAMLSeq,Cg.CST=l,Cg.Lexer=f.Lexer,Cg.LineCounter=p.LineCounter,Cg.Parser=d.Parser,Cg.parse=h.parse,Cg.parseAllDocuments=h.parseAllDocuments,Cg.parseDocument=h.parseDocument,Cg.stringify=h.stringify,Cg.visit=m.visit,Cg.visitAsync=m.visitAsync,Cg}(),AD=Sg(SD);const CD=(e,t)=>e.endsWith(".json")?JSON.parse(t):AD.parse(t),PD=(e,t)=>{if((()=>{try{return"1"===process.env.STAN_DEBUG}catch{return!1}})())try{console.error(`stan: debug: fallback: ${e}: ${t}`)}catch{}},OD=e=>{try{"function"==typeof Eg&&Eg(e)}catch{}},TD=(e,t)=>{const n=e&&"object"==typeof e?e:{};let r;try{if(!("function"==typeof _g.parse)){const e=n.scripts,t=e&&"object"==typeof e?e:{};OD(t);const r=n.patchOpenCommand,s="string"==typeof r&&r.length>0?r:ve;return{scripts:t,cliDefaults:n.cliDefaults,patchOpenCommand:s,maxUndos:n.maxUndos,devMode:n.devMode}}r=_g.parse(n)}catch(e){const n=t.replace(/\\/g,"/");throw new Error(`stan-cli: invalid config in ${n}\n${(e=>e instanceof Qh?e.issues.map(e=>`${e.path.join(".")||"(root)"}: ${e.message}`).join("\n"):String(e))(e)}`)}return OD(r.scripts),{scripts:r.scripts,cliDefaults:r.cliDefaults,patchOpenCommand:"string"==typeof r.patchOpenCommand&&r.patchOpenCommand.length>0?r.patchOpenCommand:ve,maxUndos:r.maxUndos,devMode:r.devMode}},xD=e=>{const t=ke(e);if(!t)return{scripts:{},patchOpenCommand:ve};const n=r(t,"utf8"),s=CD(t,n),o=s&&"object"==typeof s?s:{};if(o["stan-cli"]&&"object"==typeof o["stan-cli"])return TD(o["stan-cli"],t);const i=(e=>{const t=["scripts","cliDefaults","patchOpenCommand","maxUndos","devMode"],n={};for(const r of t)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n})(o);if(Object.keys(i).length>0){if(!(()=>{try{const e=process.env.STAN_ACCEPT_LEGACY,t=("string"==typeof e?e:"").trim().toLowerCase();return"1"===t||"true"===t}catch{return!1}})()){const e=t.replace(/\\/g,"/");throw new Error([`stan-cli: legacy configuration detected in ${e} (missing top-level "stan-cli").`,'Run "stan init" to migrate your config (a .bak is written next to the file),',"or set STAN_ACCEPT_LEGACY=1 to temporarily accept legacy keys during the transition."].join(" "))}return PD("cli.config:loadSync",`using legacy top-level CLI keys from ${t.replace(/\\/g,"/")}; run "stan init" to migrate`),Object.prototype.hasOwnProperty.call(o,"stan-core")||PD("run.action:engine-legacy",`detected legacy root keys (no "stan-core") in ${t.replace(/\\/g,"/")}`),TD(i,t)}return{scripts:{},patchOpenCommand:ve}},ND=e=>{try{const t=xD(e);let n=Object.keys(t.scripts);if(!n.length)try{const t=(e=>{try{const t=ke(e??process.cwd());if(!t)return{};const n=r(t,"utf8"),s=CD(t,n);return s&&"object"==typeof s?s:{}}catch{return{}}})(e),s=(e=>{const t=e["stan-cli"];return t&&"object"==typeof t?t:null})(t),o=(s&&"object"==typeof s.scripts?s.scripts:t.scripts)??{};n=Object.keys((e=>{const t={};if(!e||"object"!=typeof e)return t;for(const[n,r]of Object.entries(e))"string"==typeof r&&r.trim().length?t[n]=r:r&&"object"==typeof r&&"string"==typeof r.script&&(t[n]=String(r.script));return t})(o))}catch{}if(!n.length)return"";const s=n[0]||"lint";return["","Default: runs all scripts and writes archives.","","Available script keys:",` ${n.join(", ")}`,"","Examples:"," stan run # all scripts, with archives",` stan run -s ${s}`,` stan run -q -x ${s}`," stan run -A # no archives"," stan run -S -A -p # plan only, no scripts, no archives",` stan run -c -s ${s}`,""].join("\n")}catch(e){return"1"===process.env.STAN_DEBUG&&console.error("stan: unable to load config for help footer",e),""}},$D=()=>new Promise(e=>setImmediate(e)),LD=(e=0)=>t=>`[${t+e}m`,RD=(e=0)=>t=>`[${38+e};5;${t}m`,FD=(e=0)=>(t,n,r)=>`[${38+e};2;${t};${n};${r}m`,ID={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(ID.modifier);Object.keys(ID.color),Object.keys(ID.bgColor);const MD=function(){const e=new Map;for(const[t,n]of Object.entries(ID)){for(const[t,r]of Object.entries(n))ID[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=ID[t],e.set(r[0],r[1]);Object.defineProperty(ID,t,{value:n,enumerable:!1})}return Object.defineProperty(ID,"codes",{value:e,enumerable:!1}),ID.color.close="[39m",ID.bgColor.close="[49m",ID.color.ansi=LD(),ID.color.ansi256=RD(),ID.color.ansi16m=FD(),ID.bgColor.ansi=LD(10),ID.bgColor.ansi256=RD(10),ID.bgColor.ansi16m=FD(10),Object.defineProperties(ID,{rgbToAnsi256:{value:(e,t,n)=>e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value(e){const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;3===n.length&&(n=[...n].map(e=>e+e).join(""));const r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},enumerable:!1},hexToAnsi256:{value:e=>ID.rgbToAnsi256(...ID.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return e-8+90;let t,n,r;if(e>=232)t=(10*(e-232)+8)/255,n=t,r=t;else{const s=(e-=16)%36;t=Math.floor(e/36)/5,n=Math.floor(s/6)/5,r=s%6/5}const s=2*Math.max(t,n,r);if(0===s)return 30;let o=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return 2===s&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>ID.ansi256ToAnsi(ID.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>ID.ansi256ToAnsi(ID.hexToAnsi256(e)),enumerable:!1}}),ID}();function jD(e,t=(globalThis.Deno?globalThis.Deno.args:v.argv)){const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),s=t.indexOf("--");return-1!==r&&(-1===s||r<s)}const{env:BD}=v;let zD;function HD(e,{streamIsTTY:t,sniffFlags:n=!0}={}){const r=function(){if("FORCE_COLOR"in BD)return"true"===BD.FORCE_COLOR?1:"false"===BD.FORCE_COLOR?0:0===BD.FORCE_COLOR.length?1:Math.min(Number.parseInt(BD.FORCE_COLOR,10),3)}();void 0!==r&&(zD=r);const s=n?zD:r;if(0===s)return 0;if(n){if(jD("color=16m")||jD("color=full")||jD("color=truecolor"))return 3;if(jD("color=256"))return 2}if("TF_BUILD"in BD&&"AGENT_NAME"in BD)return 1;if(e&&!t&&void 0===s)return 0;const o=s||0;if("dumb"===BD.TERM)return o;if("win32"===v.platform){const e=x.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in BD)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(e=>e in BD)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(e=>e in BD)||"codeship"===BD.CI_NAME?1:o;if("TEAMCITY_VERSION"in BD)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(BD.TEAMCITY_VERSION)?1:0;if("truecolor"===BD.COLORTERM)return 3;if("xterm-kitty"===BD.TERM)return 3;if("xterm-ghostty"===BD.TERM)return 3;if("wezterm"===BD.TERM)return 3;if("TERM_PROGRAM"in BD){const e=Number.parseInt((BD.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(BD.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(BD.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(BD.TERM)||"COLORTERM"in BD?1:o}function KD(e,t={}){return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(HD(e,{streamIsTTY:e&&e.isTTY,...t}))}jD("no-color")||jD("no-colors")||jD("color=false")||jD("color=never")?zD=0:(jD("color")||jD("colors")||jD("color=true")||jD("color=always"))&&(zD=1);const UD={stdout:KD({isTTY:N.isatty(1)}),stderr:KD({isTTY:N.isatty(2)})};function qD(e,t,n){let r=e.indexOf(t);if(-1===r)return e;const s=t.length;let o=0,i="";do{i+=e.slice(o,r)+t+n,o=r+s,r=e.indexOf(t,o)}while(-1!==r);return i+=e.slice(o),i}const{stdout:ZD,stderr:GD}=UD,WD=Symbol("GENERATOR"),JD=Symbol("STYLER"),VD=Symbol("IS_EMPTY"),YD=["ansi","ansi","ansi256","ansi16m"],QD=Object.create(null),XD=e=>{const t=(...e)=>e.join(" ");return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const n=ZD?ZD.level:0;e.level=void 0===t.level?n:t.level})(t,e),Object.setPrototypeOf(t,ew.prototype),t};function ew(e){return XD(e)}Object.setPrototypeOf(ew.prototype,Function.prototype);for(const[e,t]of Object.entries(MD))QD[e]={get(){const n=ow(this,sw(t.open,t.close,this[JD]),this[VD]);return Object.defineProperty(this,e,{value:n}),n}};QD.visible={get(){const e=ow(this,this[JD],!0);return Object.defineProperty(this,"visible",{value:e}),e}};const tw=(e,t,n,...r)=>"rgb"===e?"ansi16m"===t?MD[n].ansi16m(...r):"ansi256"===t?MD[n].ansi256(MD.rgbToAnsi256(...r)):MD[n].ansi(MD.rgbToAnsi(...r)):"hex"===e?tw("rgb",t,n,...MD.hexToRgb(...r)):MD[n][e](...r),nw=["rgb","hex","ansi256"];for(const e of nw){QD[e]={get(){const{level:t}=this;return function(...n){const r=sw(tw(e,YD[t],"color",...n),MD.color.close,this[JD]);return ow(this,r,this[VD])}}};QD["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...n){const r=sw(tw(e,YD[t],"bgColor",...n),MD.bgColor.close,this[JD]);return ow(this,r,this[VD])}}}}const rw=Object.defineProperties(()=>{},{...QD,level:{enumerable:!0,get(){return this[WD].level},set(e){this[WD].level=e}}}),sw=(e,t,n)=>{let r,s;return void 0===n?(r=e,s=t):(r=n.openAll+e,s=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:s,parent:n}},ow=(e,t,n)=>{const r=(...e)=>iw(r,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(r,rw),r[WD]=e,r[JD]=t,r[VD]=n,r},iw=(e,t)=>{if(e.level<=0||!t)return e[VD]?"":t;let n=e[JD];if(void 0===n)return t;const{openAll:r,closeAll:s}=n;if(t.includes(""))for(;void 0!==n;)t=qD(t,n.close,n.open),n=n.parent;const o=t.indexOf("\n");return-1!==o&&(t=function(e,t,n,r){let s=0,o="";do{const i="\r"===e[r-1];o+=e.slice(s,i?r-1:r)+t+(i?"\r\n":"\n")+n,s=r+1,r=e.indexOf("\n",s)}while(-1!==r);return o+=e.slice(s),o}(t,s,r,o)),r+t+s};Object.defineProperties(ew.prototype,QD);const aw=ew();function cw(){const e=Boolean(process.stdout.isTTY);return"1"===process.env.STAN_BORING||"1"===process.env.NO_COLOR||"0"===process.env.FORCE_COLOR||!e}function uw(e){return cw()?e:aw.green(e)}function lw(e){return cw()?e:aw.cyan(e)}function fw(e){return cw()?e:aw.blue(e)}function pw(e){return cw()?e:aw.red(e)}function dw(e){return cw()?e:aw.black(e)}function hw(e){return cw()?e:aw.gray(e)}function mw(e){return cw()?e:aw.hex("#FFA500")(e)}function gw(e){return cw()?e:aw.bold(e)}function yw(e){return cw()?e:aw.dim(e)}ew({level:GD?GD.level:0});const bw=(e,t)=>{const{selection:n,config:r,mode:s,behavior:o}=t,i=null==n?Object.keys(r.scripts):n,a=d.join(r.stanPath,"output").replace(/\\/g,"/");return`stan:\n ${[cw()?"STAN run plan":gw("STAN run plan"),"mode: "+("sequential"===s?"sequential":"concurrent"),`output: ${a}/`,..."string"==typeof o.prompt&&o.prompt.trim().length?[`prompt: ${o.prompt}`]:[],`scripts: ${i.length?i.join(", "):"none"}`,"archive: "+(o.archive?"yes":"no"),"combine: "+(o.combine?"yes":"no"),"keep output dir: "+(o.keep?"yes":"no"),"live: "+(o.live?"yes":"no"),`hang warn: ${"number"==typeof o.hangWarn?o.hangWarn.toString():"n/a"}s`,`hang kill: ${"number"==typeof o.hangKill?o.hangKill.toString():"n/a"}s`,`hang kill grace: ${"number"==typeof o.hangKillGrace?o.hangKillGrace.toString():"n/a"}s`,...Array.isArray(r.overlayPlan)&&r.overlayPlan.length?["facet view:",...r.overlayPlan.map(e=>` ${e}`)]:[]].join("\n ")}`};var vw,Dw,ww,_w,Ew={},kw={},Sw={},Aw={},Cw={exports:{}};function Pw(){return Dw?vw:(Dw=1,vw=({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")})}function Ow(){if(_w)return ww;_w=1;const e=Pw();return ww=t=>"string"==typeof t?t.replace(e(),""):t,ww}var Tw,xw,Nw,$w,Lw={exports:{}};function Rw(){if(Tw)return Lw.exports;Tw=1;const e=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));return Lw.exports=e,Lw.exports.default=e,Lw.exports}function Fw(){return Nw?xw:(Nw=1,xw=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g})}function Iw(){if($w)return Cw.exports;$w=1;const e=Ow(),t=Rw(),n=Fw(),r=r=>{if("string"!=typeof r||0===r.length)return 0;if(0===(r=e(r)).length)return 0;r=r.replace(n()," ");let s=0;for(let e=0;e<r.length;e++){const n=r.codePointAt(e);n<=31||n>=127&&n<=159||(n>=768&&n<=879||(n>65535&&e++,s+=t(n)?2:1))}return s};return Cw.exports=r,Cw.exports.default=r,Cw.exports}var Mw,jw,Bw={};var zw,Hw,Kw,Uw,qw,Zw,Gw,Ww,Jw,Vw,Yw,Qw={exports:{}};function Xw(){if(Uw)return Kw;Uw=1;const e=Hw?zw:(Hw=1,zw={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),t={};for(const n of Object.keys(e))t[e[n]]=n;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Kw=n;for(const e of Object.keys(n)){if(!("channels"in n[e]))throw new Error("missing channels property: "+e);if(!("labels"in n[e]))throw new Error("missing channel labels property: "+e);if(n[e].labels.length!==n[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=n[e];delete n[e].channels,delete n[e].labels,Object.defineProperty(n[e],"channels",{value:t}),Object.defineProperty(n[e],"labels",{value:r})}function r(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}return n.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,s=Math.min(t,n,r),o=Math.max(t,n,r),i=o-s;let a,c;o===s?a=0:t===o?a=(n-r)/i:n===o?a=2+(r-t)/i:r===o&&(a=4+(t-n)/i),a=Math.min(60*a,360),a<0&&(a+=360);const u=(s+o)/2;return c=o===s?0:u<=.5?i/(o+s):i/(2-o-s),[a,100*c,100*u]},n.rgb.hsv=function(e){let t,n,r,s,o;const i=e[0]/255,a=e[1]/255,c=e[2]/255,u=Math.max(i,a,c),l=u-Math.min(i,a,c),f=function(e){return(u-e)/6/l+.5};return 0===l?(s=0,o=0):(o=l/u,t=f(i),n=f(a),r=f(c),i===u?s=r-n:a===u?s=1/3+t-r:c===u&&(s=2/3+n-t),s<0?s+=1:s>1&&(s-=1)),[360*s,100*o,100*u]},n.rgb.hwb=function(e){const t=e[0],r=e[1];let s=e[2];const o=n.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(r,s));return s=1-1/255*Math.max(t,Math.max(r,s)),[o,100*i,100*s]},n.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,s=Math.min(1-t,1-n,1-r);return[100*((1-t-s)/(1-s)||0),100*((1-n-s)/(1-s)||0),100*((1-r-s)/(1-s)||0),100*s]},n.rgb.keyword=function(n){const s=t[n];if(s)return s;let o,i=1/0;for(const t of Object.keys(e)){const s=r(n,e[t]);s<i&&(i=s,o=t)}return o},n.keyword.rgb=function(t){return e[t]},n.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let r=t[0],s=t[1],o=t[2];r/=95.047,s/=100,o/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;return[116*s-16,500*(r-s),200*(s-o)]},n.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let s,o,i;if(0===n)return i=255*r,[i,i,i];s=r<.5?r*(1+n):r+n-r*n;const a=2*r-s,c=[0,0,0];for(let e=0;e<3;e++)o=t+1/3*-(e-1),o<0&&o++,o>1&&o--,i=6*o<1?a+6*(s-a)*o:2*o<1?s:3*o<2?a+(s-a)*(2/3-o)*6:a,c[e]=255*i;return c},n.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,s=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,s*=o<=1?o:2-o;return[t,100*(0===r?2*s/(o+s):2*n/(r+n)),100*((r+n)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const s=Math.floor(t)%6,o=t-Math.floor(t),i=255*r*(1-n),a=255*r*(1-n*o),c=255*r*(1-n*(1-o));switch(r*=255,s){case 0:return[r,c,i];case 1:return[a,r,i];case 2:return[i,r,c];case 3:return[i,a,r];case 4:return[c,i,r];case 5:return[r,i,a]}},n.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,s=Math.max(r,.01);let o,i;i=(2-n)*r;const a=(2-n)*s;return o=n*s,o/=a<=1?a:2-a,o=o||0,i/=2,[t,100*o,100*i]},n.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const s=n+r;let o;s>1&&(n/=s,r/=s);const i=Math.floor(6*t),a=1-r;o=6*t-i,1&i&&(o=1-o);const c=n+o*(a-n);let u,l,f;switch(i){default:case 6:case 0:u=a,l=c,f=n;break;case 1:u=c,l=a,f=n;break;case 2:u=n,l=a,f=c;break;case 3:u=n,l=c,f=a;break;case 4:u=c,l=n,f=a;break;case 5:u=a,l=n,f=c}return[255*u,255*l,255*f]},n.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,s=e[3]/100;return[255*(1-Math.min(1,t*(1-s)+s)),255*(1-Math.min(1,n*(1-s)+s)),255*(1-Math.min(1,r*(1-s)+s))]},n.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let s,o,i;return s=3.2406*t+-1.5372*n+-.4986*r,o=-.9689*t+1.8758*n+.0415*r,i=.0557*t+-.204*n+1.057*r,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),[255*s,255*o,255*i]},n.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},n.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const s=n**3,o=t**3,i=r**3;return n=s>.008856?s:(n-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,r=i>.008856?i:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},n.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let s;s=360*Math.atan2(r,n)/2/Math.PI,s<0&&(s+=360);return[t,Math.sqrt(n*n+r*r),s]},n.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},n.rgb.ansi16=function(e,t=null){const[r,s,o]=e;let i=null===t?n.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),0===i)return 30;let a=30+(Math.round(o/255)<<2|Math.round(s/255)<<1|Math.round(r/255));return 2===i&&(a+=60),a},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t===n&&n===r)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map(e=>e+e).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},n.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,s=Math.max(Math.max(t,n),r),o=Math.min(Math.min(t,n),r),i=s-o;let a,c;return a=i<1?o/(1-i):0,c=i<=0?0:s===t?(n-r)/i%6:s===n?2+(r-t)/i:4+(t-n)/i,c/=6,c%=1,[360*c,100*i,100*a]},n.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let s=0;return r<1&&(s=(n-.5*r)/(1-r)),[e[0],100*r,100*s]},n.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let s=0;return r<1&&(s=(n-r)/(1-r)),[e[0],100*r,100*s]},n.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const s=[0,0,0],o=t%1*6,i=o%1,a=1-i;let c=0;switch(Math.floor(o)){case 0:s[0]=1,s[1]=i,s[2]=0;break;case 1:s[0]=a,s[1]=1,s[2]=0;break;case 2:s[0]=0,s[1]=1,s[2]=i;break;case 3:s[0]=0,s[1]=a,s[2]=1;break;case 4:s[0]=i,s[1]=0,s[2]=1;break;default:s[0]=1,s[1]=0,s[2]=a}return c=(1-n)*r,[255*(n*s[0]+c),255*(n*s[1]+c),255*(n*s[2]+c)]},n.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},n.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},n.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},n.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let s=0;return r<1&&(s=(n-r)/(1-r)),[e[0],100*r,100*s]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},Kw}function e_(){if(Zw)return qw;Zw=1;const e=Xw();function t(t){const n=function(){const t={},n=Object.keys(e);for(let e=n.length,r=0;r<e;r++)t[n[r]]={distance:-1,parent:null};return t}(),r=[t];for(n[t].distance=0;r.length;){const t=r.pop(),s=Object.keys(e[t]);for(let e=s.length,o=0;o<e;o++){const e=s[o],i=n[e];-1===i.distance&&(i.distance=n[t].distance+1,i.parent=t,r.unshift(e))}}return n}function n(e,t){return function(n){return t(e(n))}}function r(t,r){const s=[r[t].parent,t];let o=e[r[t].parent][t],i=r[t].parent;for(;r[i].parent;)s.unshift(r[i].parent),o=n(e[r[i].parent][i],o),i=r[i].parent;return o.conversion=s,o}return qw=function(e){const n=t(e),s={},o=Object.keys(n);for(let e=o.length,t=0;t<e;t++){const e=o[t];null!==n[e].parent&&(s[e]=r(e,n))}return s},qw}function t_(){if(Ww)return Gw;Ww=1;const e=Xw(),t=e_(),n={};return Object.keys(e).forEach(r=>{n[r]={},Object.defineProperty(n[r],"channels",{value:e[r].channels}),Object.defineProperty(n[r],"labels",{value:e[r].labels});const s=t(r);Object.keys(s).forEach(e=>{const t=s[e];n[r][e]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(t),n[r][e].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)})}),Gw=n}function n_(){return Jw||(Jw=1,function(e){const t=(e,t)=>(...n)=>`[${e(...n)+t}m`,n=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};5;${r}m`},r=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};2;${r[0]};${r[1]};${r[2]}m`},s=e=>e,o=(e,t,n)=>[e,t,n],i=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{const r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})};let a;const c=(e,t,n,r)=>{void 0===a&&(a=t_());const s=r?10:0,o={};for(const[r,i]of Object.entries(a)){const a="ansi16"===r?"ansi":r;r===t?o[a]=e(n,s):"object"==typeof i&&(o[a]=e(i[t],s))}return o};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,a={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};a.color.gray=a.color.blackBright,a.bgColor.bgGray=a.bgColor.bgBlackBright,a.color.grey=a.color.blackBright,a.bgColor.bgGrey=a.bgColor.bgBlackBright;for(const[t,n]of Object.entries(a)){for(const[t,r]of Object.entries(n))a[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=a[t],e.set(r[0],r[1]);Object.defineProperty(a,t,{value:n,enumerable:!1})}return Object.defineProperty(a,"codes",{value:e,enumerable:!1}),a.color.close="[39m",a.bgColor.close="[49m",i(a.color,"ansi",()=>c(t,"ansi16",s,!1)),i(a.color,"ansi256",()=>c(n,"ansi256",s,!1)),i(a.color,"ansi16m",()=>c(r,"rgb",o,!1)),i(a.bgColor,"ansi",()=>c(t,"ansi16",s,!0)),i(a.bgColor,"ansi256",()=>c(n,"ansi256",s,!0)),i(a.bgColor,"ansi16m",()=>c(r,"rgb",o,!0)),a}})}(Qw)),Qw.exports}function r_(){if(Yw)return Vw;Yw=1;const e=Rw(),t=function(){if(jw)return Mw;jw=1;const e="[\ud800-\udbff][\udc00-\udfff]";return Mw=t=>t&&t.exact?new RegExp(`^${e}$`):new RegExp(e,"g")}(),n=n_(),r=["",""],s=e=>`${r[0]}[${e}m`,o=(e,t,r)=>{let o=[];e=[...e];for(let r of e){const i=r;r.includes(";")&&(r=r.split(";")[0][0]+"0");const a=n.codes.get(Number.parseInt(r,10));if(a){const n=e.indexOf(a.toString());-1===n?o.push(s(t?a:i)):e.splice(n,1)}else{if(t){o.push(s(0));break}o.push(s(i))}}if(t&&(o=o.filter((e,t)=>o.indexOf(e)===t),void 0!==r)){const e=s(n.codes.get(Number.parseInt(r,10)));o=o.reduce((t,n)=>n===e?[n,...t]:[...t,n],[])}return o.join("")};return Vw=(n,s,i)=>{const a=[...n],c=[];let u,l="number"==typeof i?i:a.length,f=!1,p=0,d="";for(const[h,m]of a.entries()){let a=!1;if(r.includes(m)){const e=/\d[^m]*/.exec(n.slice(h,h+18));u=e&&e.length>0?e[0]:void 0,p<l&&(f=!0,void 0!==u&&c.push(u))}else f&&"m"===m&&(f=!1,a=!0);if(f||a||p++,!t({exact:!0}).test(m)&&e(m.codePointAt())&&(p++,"number"!=typeof i&&l++),p>s&&p<=l)d+=m;else if(p!==s||f||void 0===u){if(p>=l){d+=o(c,!0,u);break}}else d=o(c)}return d},Vw}var s_,o_,i_,a_,c_={};function u_(){if(s_)return c_;s_=1,Object.defineProperty(c_,"__esModule",{value:!0}),c_.getBorderCharacters=void 0;return c_.getBorderCharacters=e=>{if("honeywell"===e)return{topBody:"═",topJoin:"╤",topLeft:"╔",topRight:"╗",bottomBody:"═",bottomJoin:"╧",bottomLeft:"╚",bottomRight:"╝",bodyLeft:"║",bodyRight:"║",bodyJoin:"│",headerJoin:"┬",joinBody:"─",joinLeft:"╟",joinRight:"╢",joinJoin:"┼",joinMiddleDown:"┬",joinMiddleUp:"┴",joinMiddleLeft:"┤",joinMiddleRight:"├"};if("norc"===e)return{topBody:"─",topJoin:"┬",topLeft:"┌",topRight:"┐",bottomBody:"─",bottomJoin:"┴",bottomLeft:"└",bottomRight:"┘",bodyLeft:"│",bodyRight:"│",bodyJoin:"│",headerJoin:"┬",joinBody:"─",joinLeft:"├",joinRight:"┤",joinJoin:"┼",joinMiddleDown:"┬",joinMiddleUp:"┴",joinMiddleLeft:"┤",joinMiddleRight:"├"};if("ramac"===e)return{topBody:"-",topJoin:"+",topLeft:"+",topRight:"+",bottomBody:"-",bottomJoin:"+",bottomLeft:"+",bottomRight:"+",bodyLeft:"|",bodyRight:"|",bodyJoin:"|",headerJoin:"+",joinBody:"-",joinLeft:"|",joinRight:"|",joinJoin:"|",joinMiddleDown:"+",joinMiddleUp:"+",joinMiddleLeft:"+",joinMiddleRight:"+"};if("void"===e)return{topBody:"",topJoin:"",topLeft:"",topRight:"",bottomBody:"",bottomJoin:"",bottomLeft:"",bottomRight:"",bodyLeft:"",bodyRight:"",bodyJoin:"",headerJoin:"",joinBody:"",joinLeft:"",joinRight:"",joinJoin:"",joinMiddleDown:"",joinMiddleUp:"",joinMiddleLeft:"",joinMiddleRight:""};throw new Error('Unknown border template "'+e+'".')},c_}function l_(){if(o_)return Bw;o_=1;var e=Bw&&Bw.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Bw,"__esModule",{value:!0}),Bw.isCellInRange=Bw.areCellEqual=Bw.calculateRangeCoordinate=Bw.flatten=Bw.extractTruncates=Bw.sumArray=Bw.sequence=Bw.distributeUnevenly=Bw.countSpaceSequence=Bw.groupBySizes=Bw.makeBorderConfig=Bw.splitAnsi=Bw.normalizeString=void 0;const t=e(r_()),n=e(Iw()),r=e(Ow()),s=u_();Bw.normalizeString=e=>e.replace(/\r\n/g,"\n");Bw.splitAnsi=e=>{const s=(0,r.default)(e).split("\n").map(n.default),o=[];let i=0;return s.forEach(n=>{o.push(0===n?"":(0,t.default)(e,i,i+n)),i+=n+1}),o};Bw.makeBorderConfig=e=>({...(0,s.getBorderCharacters)("honeywell"),...e});Bw.groupBySizes=(e,t)=>{let n=0;return t.map(t=>{const r=e.slice(n,n+t);return n+=t,r})};Bw.countSpaceSequence=e=>{var t,n;return null!==(n=null===(t=e.match(/\s+/g))||void 0===t?void 0:t.length)&&void 0!==n?n:0};Bw.distributeUnevenly=(e,t)=>Array.from({length:t}).fill(Math.floor(e/t)).map((n,r)=>n+(r<e%t?1:0));Bw.sequence=(e,t)=>Array.from({length:t-e+1},(t,n)=>n+e);Bw.sumArray=e=>e.reduce((e,t)=>e+t,0);Bw.extractTruncates=e=>e.columns.map(({truncate:e})=>e);Bw.flatten=e=>[].concat(...e);Bw.calculateRangeCoordinate=e=>{const{row:t,col:n,colSpan:r=1,rowSpan:s=1}=e;return{bottomRight:{col:n+r-1,row:t+s-1},topLeft:{col:n,row:t}}};Bw.areCellEqual=(e,t)=>e.row===t.row&&e.col===t.col;return Bw.isCellInRange=(e,{topLeft:t,bottomRight:n})=>t.row<=e.row&&e.row<=n.row&&t.col<=e.col&&e.col<=n.col,Bw}function f_(){if(i_)return Aw;i_=1;var e=Aw&&Aw.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Aw,"__esModule",{value:!0}),Aw.alignString=void 0;const t=e(Iw()),n=l_(),r=(e,t)=>e+" ".repeat(t);return Aw.alignString=(e,s,o)=>{const i=(0,t.default)(e);if(i===s)return e;if(i>s)throw new Error("Subject parameter value width cannot be greater than the container width.");if(0===i)return" ".repeat(s);const a=s-i;return"left"===o?r(e,a):"right"===o?((e,t)=>" ".repeat(t)+e)(e,a):"justify"===o?((e,t)=>{const s=(0,n.countSpaceSequence)(e);if(0===s)return r(e,t);const o=(0,n.distributeUnevenly)(t,s);if(Math.max(...o)>3)return r(e,t);let i=0;return e.replace(/\s+/g,e=>e+" ".repeat(o[i++]))})(e,a):((e,t)=>" ".repeat(Math.floor(t/2))+e+" ".repeat(Math.ceil(t/2)))(e,a)},Aw}function p_(){if(a_)return Sw;a_=1,Object.defineProperty(Sw,"__esModule",{value:!0}),Sw.alignTableData=void 0;const e=f_();return Sw.alignTableData=(t,n)=>t.map((t,r)=>t.map((t,s)=>{var o;const{width:i,alignment:a}=n.columns[s];return(null===(o=n.spanningCellManager)||void 0===o?void 0:o.getContainingRange({col:s,row:r},{mapped:!0}))?t:(0,e.alignString)(t,i,a)})),Sw}var d_,h_={},m_={},g_={},y_={};function b_(){if(d_)return y_;d_=1;var e=y_&&y_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(y_,"__esModule",{value:!0}),y_.wrapString=void 0;const t=e(r_()),n=e(Iw());return y_.wrapString=(e,r)=>{let s=e;const o=[];do{o.push((0,t.default)(s,0,r)),s=(0,t.default)(s,r).trim()}while((0,n.default)(s));return o},y_}var v_,D_,w_,__,E_={};function k_(){if(v_)return E_;v_=1;var e=E_&&E_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(E_,"__esModule",{value:!0}),E_.wrapWord=void 0;const t=e(r_()),n=e(Ow());return E_.wrapWord=(e,r)=>{const s=[];let o=0;return((e,t)=>{let r=(0,n.default)(e);const s=[],o=new RegExp("(^.{1,"+String(Math.max(t,1))+"}(\\s+|$))|(^.{1,"+String(Math.max(t-1,1))+"}(\\\\|/|_|\\.|,|;|-))");do{let e;const n=o.exec(r);if(n){e=n[0],r=r.slice(e.length);const t=e.trim().length,o=e.length-t;s.push([t,o])}else e=r.slice(0,t),r=r.slice(t),s.push([e.length,0])}while(r.length);return s})(e,r).forEach(([n,r])=>{s.push((0,t.default)(e,o,o+n)),o+=n+r}),s},E_}function S_(){if(D_)return g_;D_=1,Object.defineProperty(g_,"__esModule",{value:!0}),g_.wrapCell=void 0;const e=l_(),t=b_(),n=k_();return g_.wrapCell=(r,s,o)=>{const i=(0,e.splitAnsi)(r);for(let e=0;e<i.length;){let r;r=o?(0,n.wrapWord)(i[e],s):(0,t.wrapString)(i[e],s),i.splice(e,1,...r),e+=r.length}return i},g_}function A_(){if(w_)return m_;w_=1,Object.defineProperty(m_,"__esModule",{value:!0}),m_.calculateCellHeight=void 0;const e=S_();return m_.calculateCellHeight=(t,n,r=!1)=>(0,e.wrapCell)(t,n,r).length,m_}function C_(){if(__)return h_;__=1,Object.defineProperty(h_,"__esModule",{value:!0}),h_.calculateRowHeights=void 0;const e=A_(),t=l_();return h_.calculateRowHeights=(n,r)=>{const s=[];for(const[o,i]of n.entries()){let a=1;i.forEach((i,c)=>{var u;const l=null===(u=r.spanningCellManager)||void 0===u?void 0:u.getContainingRange({col:c,row:o});if(!l){const t=(0,e.calculateCellHeight)(i,r.columns[c].width,r.columns[c].wrapWord);return void(a=Math.max(a,t))}const{topLeft:f,bottomRight:p,height:d}=l;if(o===p.row){const e=(0,t.sumArray)(s.slice(f.row)),o=p.row-f.row,i=(0,t.sequence)(f.row+1,p.row).filter(e=>{var t;return!(null===(t=r.drawHorizontalLine)||void 0===t?void 0:t.call(r,e,n.length))}).length,c=d-e-o+i;a=Math.max(a,c)}}),s.push(a)}return s},h_}var P_,O_,T_={},x_={};function N_(){if(P_)return x_;P_=1,Object.defineProperty(x_,"__esModule",{value:!0}),x_.drawContent=void 0;return x_.drawContent=e=>{const{contents:t,separatorGetter:n,drawSeparator:r,spanningCellManager:s,rowIndex:o,elementType:i}=e,a=t.length,c=[];return r(0,a)&&c.push(n(0,a)),t.forEach((e,t)=>{if(i&&"border"!==i&&"row"!==i||c.push(e),"cell"===i&&void 0===o&&c.push(e),"cell"===i&&void 0!==o){const n=null==s?void 0:s.getContainingRange({col:t,row:o});n&&t!==n.topLeft.col||c.push(e)}if(t+1<a&&r(t+1,a)){const e=n(t+1,a);if("cell"===i&&void 0!==o){const n={col:t+1,row:o},r=null==s?void 0:s.getContainingRange(n);r&&r.topLeft.col!==n.col||c.push(e)}else c.push(e)}}),r(a,a)&&c.push(n(a,a)),c.join("")},x_}function $_(){return O_||(O_=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createTableBorderGetter=e.drawBorderBottom=e.drawBorderJoin=e.drawBorderTop=e.drawBorder=e.createSeparatorGetter=e.drawBorderSegments=void 0;const t=N_();e.drawBorderSegments=(e,t)=>{const{separator:n,horizontalBorderIndex:r,spanningCellManager:s}=t;return e.map((e,t)=>{const o=n.body.repeat(e);if(void 0===r)return o;const i=null==s?void 0:s.getContainingRange({col:t,row:r});if(!i)return o;const{topLeft:a}=i;return r===a.row?o:t!==a.col?"":i.extractBorderContent(r)})};e.createSeparatorGetter=e=>{const{separator:t,spanningCellManager:n,horizontalBorderIndex:r,rowCount:s}=e;return(e,o)=>{const i=null==n?void 0:n.inSameRange;if(void 0!==r&&i){const n={col:e,row:r-1},a={col:e-1,row:r},c={col:e-1,row:r-1},u={col:e,row:r},l=[[c,n],[n,u],[u,a],[a,c]];if(0===e)return i(u,n)&&t.bodyJoinOuter?t.bodyJoinOuter:t.left;if(e===o)return i(c,a)&&t.bodyJoinOuter?t.bodyJoinOuter:t.right;if(0===r)return i(u,a)?t.body:t.join;if(r===s)return i(n,c)?t.body:t.join;const f=l.map(e=>i(...e)).filter(Boolean).length;if(0===f)return t.join;if(4===f)return"";if(2===f)return i(...l[1])&&i(...l[3])&&t.bodyJoinInner?t.bodyJoinInner:t.body;if(1===f){if(!(t.joinRight&&t.joinLeft&&t.joinUp&&t.joinDown))throw new Error(`Can not get border separator for position [${r}, ${e}]`);return i(...l[0])?t.joinDown:i(...l[1])?t.joinLeft:i(...l[2])?t.joinUp:t.joinRight}throw new Error("Invalid case")}return 0===e?t.left:e===o?t.right:t.join}};e.drawBorder=(n,r)=>{const s=(0,e.drawBorderSegments)(n,r),{drawVerticalLine:o,horizontalBorderIndex:i,spanningCellManager:a}=r;return(0,t.drawContent)({contents:s,drawSeparator:o,elementType:"border",rowIndex:i,separatorGetter:(0,e.createSeparatorGetter)(r),spanningCellManager:a})+"\n"};e.drawBorderTop=(t,n)=>{const{border:r}=n,s=(0,e.drawBorder)(t,{...n,separator:{body:r.topBody,join:r.topJoin,left:r.topLeft,right:r.topRight}});return"\n"===s?"":s};e.drawBorderJoin=(t,n)=>{const{border:r}=n;return(0,e.drawBorder)(t,{...n,separator:{body:r.joinBody,bodyJoinInner:r.bodyJoin,bodyJoinOuter:r.bodyLeft,join:r.joinJoin,joinDown:r.joinMiddleDown,joinLeft:r.joinMiddleLeft,joinRight:r.joinMiddleRight,joinUp:r.joinMiddleUp,left:r.joinLeft,right:r.joinRight}})};e.drawBorderBottom=(t,n)=>{const{border:r}=n;return(0,e.drawBorder)(t,{...n,separator:{body:r.bottomBody,join:r.bottomJoin,left:r.bottomLeft,right:r.bottomRight}})};e.createTableBorderGetter=(t,n)=>(r,s)=>{const o={...n,horizontalBorderIndex:r};return 0===r?(0,e.drawBorderTop)(t,o):r===s?(0,e.drawBorderBottom)(t,o):(0,e.drawBorderJoin)(t,o)}}(T_)),T_}var L_,R_={};function F_(){if(L_)return R_;L_=1,Object.defineProperty(R_,"__esModule",{value:!0}),R_.drawRow=void 0;const e=N_();return R_.drawRow=(t,n)=>{const{border:r,drawVerticalLine:s,rowIndex:o,spanningCellManager:i}=n;return(0,e.drawContent)({contents:t,drawSeparator:s,elementType:"cell",rowIndex:o,separatorGetter:(e,t)=>0===e?r.bodyLeft:e===t?r.bodyRight:r.bodyJoin,spanningCellManager:i})+"\n"},R_}var I_,M_,j_,B_,z_,H_,K_={},U_={},q_={},Z_={};function G_(){if(j_)return Z_;j_=1,Object.defineProperty(Z_,"__esModule",{value:!0});const e=(M_||(M_=1,I_=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,s,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(s=r;0!==s--;)if(!e(t[s],n[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(s=r;0!==s--;)if(!Object.prototype.hasOwnProperty.call(n,o[s]))return!1;for(s=r;0!==s--;){var i=o[s];if(!e(t[i],n[i]))return!1}return!0}return t!=t&&n!=n}),I_);return e.code='require("ajv/dist/runtime/equal").default',Z_.default=e,Z_}function W_(){return B_||(B_=1,function(e){e["config.json"]=function e(n,{instancePath:s="",parentData:i,parentDataProperty:c,rootData:u=n}={}){let l=null,f=0;if(n&&"object"==typeof n&&!Array.isArray(n)){for(const e in n)if("border"!==e&&"header"!==e&&"columns"!==e&&"columnDefault"!==e&&"drawVerticalLine"!==e&&"drawHorizontalLine"!==e&&"singleLine"!==e&&"spanningCells"!==e){const t={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===l?l=[t]:l.push(t),f++}if(void 0!==n.border&&(o(n.border,{instancePath:s+"/border",parentData:n,parentDataProperty:"border",rootData:u})||(l=null===l?o.errors:l.concat(o.errors),f=l.length)),void 0!==n.header){let e=n.header;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.content){const e={instancePath:s+"/header",schemaPath:"#/properties/header/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};null===l?l=[e]:l.push(e),f++}for(const t in e)if("content"!==t&&"alignment"!==t&&"wrapWord"!==t&&"truncate"!==t&&"paddingLeft"!==t&&"paddingRight"!==t){const e={instancePath:s+"/header",schemaPath:"#/properties/header/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:t},message:"must NOT have additional properties"};null===l?l=[e]:l.push(e),f++}if(void 0!==e.content&&"string"!=typeof e.content){const e={instancePath:s+"/header/content",schemaPath:"#/properties/header/properties/content/type",keyword:"type",params:{type:"string"},message:"must be string"};null===l?l=[e]:l.push(e),f++}if(void 0!==e.alignment&&(a(e.alignment,{instancePath:s+"/header/alignment",parentData:e,parentDataProperty:"alignment",rootData:u})||(l=null===l?a.errors:l.concat(a.errors),f=l.length)),void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:s+"/header/wrapWord",schemaPath:"#/properties/header/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===l?l=[e]:l.push(e),f++}if(void 0!==e.truncate){let t=e.truncate;if("number"!=typeof t||t%1||isNaN(t)||!isFinite(t)){const e={instancePath:s+"/header/truncate",schemaPath:"#/properties/header/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}if(void 0!==e.paddingLeft){let t=e.paddingLeft;if("number"!=typeof t||t%1||isNaN(t)||!isFinite(t)){const e={instancePath:s+"/header/paddingLeft",schemaPath:"#/properties/header/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}if(void 0!==e.paddingRight){let t=e.paddingRight;if("number"!=typeof t||t%1||isNaN(t)||!isFinite(t)){const e={instancePath:s+"/header/paddingRight",schemaPath:"#/properties/header/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}}else{const e={instancePath:s+"/header",schemaPath:"#/properties/header/type",keyword:"type",params:{type:"object"},message:"must be object"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.columns&&(d(n.columns,{instancePath:s+"/columns",parentData:n,parentDataProperty:"columns",rootData:u})||(l=null===l?d.errors:l.concat(d.errors),f=l.length)),void 0!==n.columnDefault&&(h(n.columnDefault,{instancePath:s+"/columnDefault",parentData:n,parentDataProperty:"columnDefault",rootData:u})||(l=null===l?h.errors:l.concat(h.errors),f=l.length)),void 0!==n.drawVerticalLine&&"function"!=typeof n.drawVerticalLine){const e={instancePath:s+"/drawVerticalLine",schemaPath:"#/properties/drawVerticalLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===l?l=[e]:l.push(e),f++}if(void 0!==n.drawHorizontalLine&&"function"!=typeof n.drawHorizontalLine){const e={instancePath:s+"/drawHorizontalLine",schemaPath:"#/properties/drawHorizontalLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===l?l=[e]:l.push(e),f++}if(void 0!==n.singleLine&&"boolean"!=typeof n.singleLine){const e={instancePath:s+"/singleLine",schemaPath:"#/properties/singleLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===l?l=[e]:l.push(e),f++}if(void 0!==n.spanningCells){let e=n.spanningCells;if(Array.isArray(e)){const n=e.length;for(let o=0;o<n;o++){let n=e[o];if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0===n.row){const e={instancePath:s+"/spanningCells/"+o,schemaPath:"#/properties/spanningCells/items/required",keyword:"required",params:{missingProperty:"row"},message:"must have required property 'row'"};null===l?l=[e]:l.push(e),f++}if(void 0===n.col){const e={instancePath:s+"/spanningCells/"+o,schemaPath:"#/properties/spanningCells/items/required",keyword:"required",params:{missingProperty:"col"},message:"must have required property 'col'"};null===l?l=[e]:l.push(e),f++}for(const e in n)if(!r.call(t.properties.spanningCells.items.properties,e)){const t={instancePath:s+"/spanningCells/"+o,schemaPath:"#/properties/spanningCells/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===l?l=[t]:l.push(t),f++}if(void 0!==n.col){let e=n.col;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+o+"/col",schemaPath:"#/properties/spanningCells/items/properties/col/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}if("number"==typeof e&&isFinite(e)&&(e<0||isNaN(e))){const e={instancePath:s+"/spanningCells/"+o+"/col",schemaPath:"#/properties/spanningCells/items/properties/col/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.row){let e=n.row;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+o+"/row",schemaPath:"#/properties/spanningCells/items/properties/row/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}if("number"==typeof e&&isFinite(e)&&(e<0||isNaN(e))){const e={instancePath:s+"/spanningCells/"+o+"/row",schemaPath:"#/properties/spanningCells/items/properties/row/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.colSpan){let e=n.colSpan;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+o+"/colSpan",schemaPath:"#/properties/spanningCells/items/properties/colSpan/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}if("number"==typeof e&&isFinite(e)&&(e<1||isNaN(e))){const e={instancePath:s+"/spanningCells/"+o+"/colSpan",schemaPath:"#/properties/spanningCells/items/properties/colSpan/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.rowSpan){let e=n.rowSpan;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+o+"/rowSpan",schemaPath:"#/properties/spanningCells/items/properties/rowSpan/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}if("number"==typeof e&&isFinite(e)&&(e<1||isNaN(e))){const e={instancePath:s+"/spanningCells/"+o+"/rowSpan",schemaPath:"#/properties/spanningCells/items/properties/rowSpan/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.alignment&&(a(n.alignment,{instancePath:s+"/spanningCells/"+o+"/alignment",parentData:n,parentDataProperty:"alignment",rootData:u})||(l=null===l?a.errors:l.concat(a.errors),f=l.length)),void 0!==n.verticalAlignment&&(m(n.verticalAlignment,{instancePath:s+"/spanningCells/"+o+"/verticalAlignment",parentData:n,parentDataProperty:"verticalAlignment",rootData:u})||(l=null===l?m.errors:l.concat(m.errors),f=l.length)),void 0!==n.wrapWord&&"boolean"!=typeof n.wrapWord){const e={instancePath:s+"/spanningCells/"+o+"/wrapWord",schemaPath:"#/properties/spanningCells/items/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===l?l=[e]:l.push(e),f++}if(void 0!==n.truncate){let e=n.truncate;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+o+"/truncate",schemaPath:"#/properties/spanningCells/items/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.paddingLeft){let e=n.paddingLeft;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+o+"/paddingLeft",schemaPath:"#/properties/spanningCells/items/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.paddingRight){let e=n.paddingRight;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+o+"/paddingRight",schemaPath:"#/properties/spanningCells/items/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}}else{const e={instancePath:s+"/spanningCells/"+o,schemaPath:"#/properties/spanningCells/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===l?l=[e]:l.push(e),f++}}}else{const e={instancePath:s+"/spanningCells",schemaPath:"#/properties/spanningCells/type",keyword:"type",params:{type:"array"},message:"must be array"};null===l?l=[e]:l.push(e),f++}}}else{const e={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===l?l=[e]:l.push(e),f++}return e.errors=l,0===f};const t={properties:{spanningCells:{items:{properties:{col:{type:"integer",minimum:0},row:{type:"integer",minimum:0},colSpan:{type:"integer",minimum:1},rowSpan:{type:"integer",minimum:1},alignment:{$ref:"shared.json#/definitions/alignment"},verticalAlignment:{$ref:"shared.json#/definitions/verticalAlignment"},wrapWord:{type:"boolean"},truncate:{type:"integer"},paddingLeft:{type:"integer"},paddingRight:{type:"integer"}}}}}},n={properties:{topBody:{$ref:"#/definitions/border"},topJoin:{$ref:"#/definitions/border"},topLeft:{$ref:"#/definitions/border"},topRight:{$ref:"#/definitions/border"},bottomBody:{$ref:"#/definitions/border"},bottomJoin:{$ref:"#/definitions/border"},bottomLeft:{$ref:"#/definitions/border"},bottomRight:{$ref:"#/definitions/border"},bodyLeft:{$ref:"#/definitions/border"},bodyRight:{$ref:"#/definitions/border"},bodyJoin:{$ref:"#/definitions/border"},headerJoin:{$ref:"#/definitions/border"},joinBody:{$ref:"#/definitions/border"},joinLeft:{$ref:"#/definitions/border"},joinRight:{$ref:"#/definitions/border"},joinJoin:{$ref:"#/definitions/border"},joinMiddleUp:{$ref:"#/definitions/border"},joinMiddleDown:{$ref:"#/definitions/border"},joinMiddleLeft:{$ref:"#/definitions/border"},joinMiddleRight:{$ref:"#/definitions/border"}}},r=Object.prototype.hasOwnProperty;function s(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let i=null,a=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===i?i=[e]:i.push(e),a++}return s.errors=i,0===a}function o(e,{instancePath:t="",parentData:i,parentDataProperty:a,rootData:c=e}={}){let u=null,l=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if(!r.call(n.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===u?u=[e]:u.push(e),l++}void 0!==e.topBody&&(s(e.topBody,{instancePath:t+"/topBody",parentData:e,parentDataProperty:"topBody",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.topJoin&&(s(e.topJoin,{instancePath:t+"/topJoin",parentData:e,parentDataProperty:"topJoin",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.topLeft&&(s(e.topLeft,{instancePath:t+"/topLeft",parentData:e,parentDataProperty:"topLeft",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.topRight&&(s(e.topRight,{instancePath:t+"/topRight",parentData:e,parentDataProperty:"topRight",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bottomBody&&(s(e.bottomBody,{instancePath:t+"/bottomBody",parentData:e,parentDataProperty:"bottomBody",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bottomJoin&&(s(e.bottomJoin,{instancePath:t+"/bottomJoin",parentData:e,parentDataProperty:"bottomJoin",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bottomLeft&&(s(e.bottomLeft,{instancePath:t+"/bottomLeft",parentData:e,parentDataProperty:"bottomLeft",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bottomRight&&(s(e.bottomRight,{instancePath:t+"/bottomRight",parentData:e,parentDataProperty:"bottomRight",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bodyLeft&&(s(e.bodyLeft,{instancePath:t+"/bodyLeft",parentData:e,parentDataProperty:"bodyLeft",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bodyRight&&(s(e.bodyRight,{instancePath:t+"/bodyRight",parentData:e,parentDataProperty:"bodyRight",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bodyJoin&&(s(e.bodyJoin,{instancePath:t+"/bodyJoin",parentData:e,parentDataProperty:"bodyJoin",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.headerJoin&&(s(e.headerJoin,{instancePath:t+"/headerJoin",parentData:e,parentDataProperty:"headerJoin",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinBody&&(s(e.joinBody,{instancePath:t+"/joinBody",parentData:e,parentDataProperty:"joinBody",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinLeft&&(s(e.joinLeft,{instancePath:t+"/joinLeft",parentData:e,parentDataProperty:"joinLeft",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinRight&&(s(e.joinRight,{instancePath:t+"/joinRight",parentData:e,parentDataProperty:"joinRight",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinJoin&&(s(e.joinJoin,{instancePath:t+"/joinJoin",parentData:e,parentDataProperty:"joinJoin",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinMiddleUp&&(s(e.joinMiddleUp,{instancePath:t+"/joinMiddleUp",parentData:e,parentDataProperty:"joinMiddleUp",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinMiddleDown&&(s(e.joinMiddleDown,{instancePath:t+"/joinMiddleDown",parentData:e,parentDataProperty:"joinMiddleDown",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinMiddleLeft&&(s(e.joinMiddleLeft,{instancePath:t+"/joinMiddleLeft",parentData:e,parentDataProperty:"joinMiddleLeft",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinMiddleRight&&(s(e.joinMiddleRight,{instancePath:t+"/joinMiddleRight",parentData:e,parentDataProperty:"joinMiddleRight",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length))}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===u?u=[e]:u.push(e),l++}return o.errors=u,0===l}const i={enum:["left","right","center","justify"]};function a(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,c=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),c++}if("left"!==e&&"right"!==e&&"center"!==e&&"justify"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:i.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),c++}return a.errors=o,0===c}G_().default;const c=new RegExp("^[0-9]+$","u");function u(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),a++}if("left"!==e&&"right"!==e&&"center"!==e&&"justify"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:i.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),a++}return u.errors=o,0===a}const l={enum:["top","middle","bottom"]};function f(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,i=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),i++}if("top"!==e&&"middle"!==e&&"bottom"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:l.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),i++}return f.errors=o,0===i}function p(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,i=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if("alignment"!==n&&"verticalAlignment"!==n&&"width"!==n&&"wrapWord"!==n&&"truncate"!==n&&"paddingLeft"!==n&&"paddingRight"!==n){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===o?o=[e]:o.push(e),i++}if(void 0!==e.alignment&&(u(e.alignment,{instancePath:t+"/alignment",parentData:e,parentDataProperty:"alignment",rootData:s})||(o=null===o?u.errors:o.concat(u.errors),i=o.length)),void 0!==e.verticalAlignment&&(f(e.verticalAlignment,{instancePath:t+"/verticalAlignment",parentData:e,parentDataProperty:"verticalAlignment",rootData:s})||(o=null===o?f.errors:o.concat(f.errors),i=o.length)),void 0!==e.width){let n=e.width;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}if("number"==typeof n&&isFinite(n)&&(n<1||isNaN(n))){const e={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===o?o=[e]:o.push(e),i++}}if(void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:t+"/wrapWord",schemaPath:"#/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),i++}if(void 0!==e.truncate){let n=e.truncate;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/truncate",schemaPath:"#/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}}if(void 0!==e.paddingLeft){let n=e.paddingLeft;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingLeft",schemaPath:"#/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}}if(void 0!==e.paddingRight){let n=e.paddingRight;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingRight",schemaPath:"#/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),i++}return p.errors=o,0===i}function d(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,i=0;const a=i;let u=!1,l=null;const f=i;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if(!c.test(n)){const e={instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===o?o=[e]:o.push(e),i++}for(const n in e)c.test(n)&&(p(e[n],{instancePath:t+"/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:n,rootData:s})||(o=null===o?p.errors:o.concat(p.errors),i=o.length))}else{const e={instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),i++}(m=f===i)&&(u=!0,l=0);const h=i;if(Array.isArray(e)){const n=e.length;for(let r=0;r<n;r++)p(e[r],{instancePath:t+"/"+r,parentData:e,parentDataProperty:r,rootData:s})||(o=null===o?p.errors:o.concat(p.errors),i=o.length)}else{const e={instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),i++}var m;if((m=h===i)&&u?(u=!1,l=[l,1]):m&&(u=!0,l=1),u)i=a,null!==o&&(a?o.length=a:o=null);else{const e={instancePath:t,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),i++}return d.errors=o,0===i}function h(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,i=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if("alignment"!==n&&"verticalAlignment"!==n&&"width"!==n&&"wrapWord"!==n&&"truncate"!==n&&"paddingLeft"!==n&&"paddingRight"!==n){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===o?o=[e]:o.push(e),i++}if(void 0!==e.alignment&&(u(e.alignment,{instancePath:t+"/alignment",parentData:e,parentDataProperty:"alignment",rootData:s})||(o=null===o?u.errors:o.concat(u.errors),i=o.length)),void 0!==e.verticalAlignment&&(f(e.verticalAlignment,{instancePath:t+"/verticalAlignment",parentData:e,parentDataProperty:"verticalAlignment",rootData:s})||(o=null===o?f.errors:o.concat(f.errors),i=o.length)),void 0!==e.width){let n=e.width;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}if("number"==typeof n&&isFinite(n)&&(n<1||isNaN(n))){const e={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===o?o=[e]:o.push(e),i++}}if(void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:t+"/wrapWord",schemaPath:"#/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),i++}if(void 0!==e.truncate){let n=e.truncate;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/truncate",schemaPath:"#/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}}if(void 0!==e.paddingLeft){let n=e.paddingLeft;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingLeft",schemaPath:"#/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}}if(void 0!==e.paddingRight){let n=e.paddingRight;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingRight",schemaPath:"#/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),i++}return h.errors=o,0===i}function m(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,i=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),i++}if("top"!==e&&"middle"!==e&&"bottom"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:l.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),i++}return m.errors=o,0===i}function g(e,{instancePath:t="",parentData:o,parentDataProperty:i,rootData:a=e}={}){let c=null,u=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if(!r.call(n.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===c?c=[e]:c.push(e),u++}void 0!==e.topBody&&(s(e.topBody,{instancePath:t+"/topBody",parentData:e,parentDataProperty:"topBody",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.topJoin&&(s(e.topJoin,{instancePath:t+"/topJoin",parentData:e,parentDataProperty:"topJoin",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.topLeft&&(s(e.topLeft,{instancePath:t+"/topLeft",parentData:e,parentDataProperty:"topLeft",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.topRight&&(s(e.topRight,{instancePath:t+"/topRight",parentData:e,parentDataProperty:"topRight",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bottomBody&&(s(e.bottomBody,{instancePath:t+"/bottomBody",parentData:e,parentDataProperty:"bottomBody",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bottomJoin&&(s(e.bottomJoin,{instancePath:t+"/bottomJoin",parentData:e,parentDataProperty:"bottomJoin",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bottomLeft&&(s(e.bottomLeft,{instancePath:t+"/bottomLeft",parentData:e,parentDataProperty:"bottomLeft",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bottomRight&&(s(e.bottomRight,{instancePath:t+"/bottomRight",parentData:e,parentDataProperty:"bottomRight",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bodyLeft&&(s(e.bodyLeft,{instancePath:t+"/bodyLeft",parentData:e,parentDataProperty:"bodyLeft",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bodyRight&&(s(e.bodyRight,{instancePath:t+"/bodyRight",parentData:e,parentDataProperty:"bodyRight",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bodyJoin&&(s(e.bodyJoin,{instancePath:t+"/bodyJoin",parentData:e,parentDataProperty:"bodyJoin",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.headerJoin&&(s(e.headerJoin,{instancePath:t+"/headerJoin",parentData:e,parentDataProperty:"headerJoin",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinBody&&(s(e.joinBody,{instancePath:t+"/joinBody",parentData:e,parentDataProperty:"joinBody",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinLeft&&(s(e.joinLeft,{instancePath:t+"/joinLeft",parentData:e,parentDataProperty:"joinLeft",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinRight&&(s(e.joinRight,{instancePath:t+"/joinRight",parentData:e,parentDataProperty:"joinRight",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinJoin&&(s(e.joinJoin,{instancePath:t+"/joinJoin",parentData:e,parentDataProperty:"joinJoin",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinMiddleUp&&(s(e.joinMiddleUp,{instancePath:t+"/joinMiddleUp",parentData:e,parentDataProperty:"joinMiddleUp",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinMiddleDown&&(s(e.joinMiddleDown,{instancePath:t+"/joinMiddleDown",parentData:e,parentDataProperty:"joinMiddleDown",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinMiddleLeft&&(s(e.joinMiddleLeft,{instancePath:t+"/joinMiddleLeft",parentData:e,parentDataProperty:"joinMiddleLeft",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinMiddleRight&&(s(e.joinMiddleRight,{instancePath:t+"/joinMiddleRight",parentData:e,parentDataProperty:"joinMiddleRight",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length))}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===c?c=[e]:c.push(e),u++}return g.errors=c,0===u}function y(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,i=0;const a=i;let u=!1,l=null;const f=i;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if(!c.test(n)){const e={instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===o?o=[e]:o.push(e),i++}for(const n in e)c.test(n)&&(p(e[n],{instancePath:t+"/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:n,rootData:s})||(o=null===o?p.errors:o.concat(p.errors),i=o.length))}else{const e={instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),i++}(h=f===i)&&(u=!0,l=0);const d=i;if(Array.isArray(e)){const n=e.length;for(let r=0;r<n;r++)p(e[r],{instancePath:t+"/"+r,parentData:e,parentDataProperty:r,rootData:s})||(o=null===o?p.errors:o.concat(p.errors),i=o.length)}else{const e={instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),i++}var h;if((h=d===i)&&u?(u=!1,l=[l,1]):h&&(u=!0,l=1),u)i=a,null!==o&&(a?o.length=a:o=null);else{const e={instancePath:t,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),i++}return y.errors=o,0===i}function b(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,i=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if("alignment"!==n&&"verticalAlignment"!==n&&"width"!==n&&"wrapWord"!==n&&"truncate"!==n&&"paddingLeft"!==n&&"paddingRight"!==n){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===o?o=[e]:o.push(e),i++}if(void 0!==e.alignment&&(u(e.alignment,{instancePath:t+"/alignment",parentData:e,parentDataProperty:"alignment",rootData:s})||(o=null===o?u.errors:o.concat(u.errors),i=o.length)),void 0!==e.verticalAlignment&&(f(e.verticalAlignment,{instancePath:t+"/verticalAlignment",parentData:e,parentDataProperty:"verticalAlignment",rootData:s})||(o=null===o?f.errors:o.concat(f.errors),i=o.length)),void 0!==e.width){let n=e.width;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}if("number"==typeof n&&isFinite(n)&&(n<1||isNaN(n))){const e={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===o?o=[e]:o.push(e),i++}}if(void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:t+"/wrapWord",schemaPath:"#/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),i++}if(void 0!==e.truncate){let n=e.truncate;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/truncate",schemaPath:"#/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}}if(void 0!==e.paddingLeft){let n=e.paddingLeft;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingLeft",schemaPath:"#/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}}if(void 0!==e.paddingRight){let n=e.paddingRight;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingRight",schemaPath:"#/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),i++}return b.errors=o,0===i}e["streamConfig.json"]=function e(t,{instancePath:n="",parentData:r,parentDataProperty:s,rootData:o=t}={}){let i=null,a=0;if(t&&"object"==typeof t&&!Array.isArray(t)){if(void 0===t.columnDefault){const e={instancePath:n,schemaPath:"#/required",keyword:"required",params:{missingProperty:"columnDefault"},message:"must have required property 'columnDefault'"};null===i?i=[e]:i.push(e),a++}if(void 0===t.columnCount){const e={instancePath:n,schemaPath:"#/required",keyword:"required",params:{missingProperty:"columnCount"},message:"must have required property 'columnCount'"};null===i?i=[e]:i.push(e),a++}for(const e in t)if("border"!==e&&"columns"!==e&&"columnDefault"!==e&&"columnCount"!==e&&"drawVerticalLine"!==e){const t={instancePath:n,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===i?i=[t]:i.push(t),a++}if(void 0!==t.border&&(g(t.border,{instancePath:n+"/border",parentData:t,parentDataProperty:"border",rootData:o})||(i=null===i?g.errors:i.concat(g.errors),a=i.length)),void 0!==t.columns&&(y(t.columns,{instancePath:n+"/columns",parentData:t,parentDataProperty:"columns",rootData:o})||(i=null===i?y.errors:i.concat(y.errors),a=i.length)),void 0!==t.columnDefault&&(b(t.columnDefault,{instancePath:n+"/columnDefault",parentData:t,parentDataProperty:"columnDefault",rootData:o})||(i=null===i?b.errors:i.concat(b.errors),a=i.length)),void 0!==t.columnCount){let e=t.columnCount;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:n+"/columnCount",schemaPath:"#/properties/columnCount/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),a++}if("number"==typeof e&&isFinite(e)&&(e<1||isNaN(e))){const e={instancePath:n+"/columnCount",schemaPath:"#/properties/columnCount/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===i?i=[e]:i.push(e),a++}}if(void 0!==t.drawVerticalLine&&"function"!=typeof t.drawVerticalLine){const e={instancePath:n+"/drawVerticalLine",schemaPath:"#/properties/drawVerticalLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===i?i=[e]:i.push(e),a++}}else{const e={instancePath:n,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),a++}return e.errors=i,0===a}}(q_)),q_}function J_(){if(z_)return U_;z_=1;var e=U_&&U_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(U_,"__esModule",{value:!0}),U_.validateConfig=void 0;const t=e(W_());return U_.validateConfig=(e,n)=>{const r=t.default[e];if(!r(n)&&r.errors){const e=r.errors.map(e=>({message:e.message,params:e.params,schemaPath:e.schemaPath}));throw console.log("config",n),console.log("errors",e),new Error("Invalid config.")}},U_}function V_(){if(H_)return K_;H_=1,Object.defineProperty(K_,"__esModule",{value:!0}),K_.makeStreamConfig=void 0;const e=l_(),t=J_(),n=(e,t={},n)=>Array.from({length:e}).map((e,r)=>({alignment:"left",paddingLeft:1,paddingRight:1,truncate:Number.POSITIVE_INFINITY,verticalAlignment:"top",wrapWord:!1,...n,...t[r]}));return K_.makeStreamConfig=r=>{if((0,t.validateConfig)("streamConfig.json",r),void 0===r.columnDefault.width)throw new Error("Must provide config.columnDefault.width when creating a stream.");return{drawVerticalLine:()=>!0,...r,border:(0,e.makeBorderConfig)(r.border),columns:n(r.columnCount,r.columns,r.columnDefault)}},K_}var Y_,Q_={};function X_(){return Y_||(Y_=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mapDataUsingRowHeights=e.padCellVertically=void 0;const t=l_(),n=S_(),r=e=>new Array(e).fill("");e.padCellVertically=(e,t,n)=>{const s=t-e.length;return"top"===n?[...e,...r(s)]:"bottom"===n?[...r(s),...e]:[...r(Math.floor(s/2)),...e,...r(Math.ceil(s/2))]};e.mapDataUsingRowHeights=(r,s,o)=>{const i=r[0].length,a=r.map((t,r)=>{const a=s[r],c=Array.from({length:a},()=>new Array(i).fill(""));return t.forEach((t,s)=>{var i;const u=null===(i=o.spanningCellManager)||void 0===i?void 0:i.getContainingRange({col:s,row:r});if(u)return void u.extractCellContent(r).forEach((e,t)=>{c[t][s]=e});const l=(0,n.wrapCell)(t,o.columns[s].width,o.columns[s].wrapWord);(0,e.padCellVertically)(l,a,o.columns[s].verticalAlignment).forEach((e,t)=>{c[t][s]=e})}),c});return(0,t.flatten)(a)}}(Q_)),Q_}var eE,tE={};function nE(){return eE||(eE=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.padTableData=e.padString=void 0;e.padString=(e,t,n)=>" ".repeat(t)+e+" ".repeat(n);e.padTableData=(t,n)=>t.map((t,r)=>t.map((t,s)=>{var o;if(null===(o=n.spanningCellManager)||void 0===o?void 0:o.getContainingRange({col:s,row:r},{mapped:!0}))return t;const{paddingLeft:i,paddingRight:a}=n.columns[s];return(0,e.padString)(t,i,a)}))}(tE)),tE}var rE,sE={};function oE(){if(rE)return sE;rE=1,Object.defineProperty(sE,"__esModule",{value:!0}),sE.stringifyTableData=void 0;const e=l_();return sE.stringifyTableData=t=>t.map(t=>t.map(t=>(0,e.normalizeString)(String(t)))),sE}var iE,aE,cE,uE={},lE={exports:{}};function fE(){return iE||(iE=1,function(e,t){var n,r=1/0,s=NaN,o=/^\s+|\s+$/g,i=/\w*$/,a=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l="\\ud800-\\udfff",f="\\u0300-\\u036f\\ufe20-\\ufe23",p="\\u20d0-\\u20f0",d="\\ufe0e\\ufe0f",h="["+l+"]",m="["+f+p+"]",g="\\ud83c[\\udffb-\\udfff]",y="[^"+l+"]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",v="[\\ud800-\\udbff][\\udc00-\\udfff]",D="\\u200d",w="(?:"+m+"|"+g+")"+"?",_="["+d+"]?",E=_+w+("(?:"+D+"(?:"+[y,b,v].join("|")+")"+_+w+")*"),k="(?:"+[y+m+"?",m,b,v,h].join("|")+")",S=RegExp(g+"(?="+g+")|"+k+E,"g"),A=RegExp("["+D+l+f+p+d+"]"),C=parseInt,P="object"==typeof kg&&kg&&kg.Object===Object&&kg,O="object"==typeof self&&self&&self.Object===Object&&self,T=P||O||Function("return this")(),x=t&&!t.nodeType&&t,N=x&&e&&!e.nodeType&&e,$=N&&N.exports===x&&P.process,L=function(){try{return $&&$.binding("util")}catch(e){}}(),R=L&&L.isRegExp,F=(n="length",function(e){return null==e?void 0:e[n]});function I(e){return A.test(e)}function M(e){return I(e)?function(e){var t=S.lastIndex=0;for(;S.test(e);)t++;return t}(e):F(e)}function j(e){return I(e)?function(e){return e.match(S)||[]}(e):function(e){return e.split("")}(e)}var B=Object.prototype.toString,z=T.Symbol,H=z?z.prototype:void 0,K=H?H.toString:void 0;function U(e){if("string"==typeof e)return e;if(J(e))return K?K.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function q(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(s);++r<s;)o[r]=e[r+t];return o}(e,t,n)}function Z(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var G,W=R?(G=R,function(e){return G(e)}):function(e){return Z(e)&&"[object RegExp]"==B.call(e)};function J(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==B.call(e)}function V(e){return e?(e=function(e){if("number"==typeof e)return e;if(J(e))return s;if(Z(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Z(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=c.test(e);return n||u.test(e)?C(e.slice(2),n?2:8):a.test(e)?s:+e}(e))===r||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function Y(e){return null==e?"":U(e)}e.exports=function(e,t){var n=30,r="...";if(Z(t)){var s="separator"in t?t.separator:s;n="length"in t?function(e){var t=V(e),n=t%1;return t==t?n?t-n:t:0}(t.length):n,r="omission"in t?U(t.omission):r}var o=(e=Y(e)).length;if(I(e)){var a=j(e);o=a.length}if(n>=o)return e;var c=n-M(r);if(c<1)return r;var u=a?q(a,0,c).join(""):e.slice(0,c);if(void 0===s)return u+r;if(a&&(c+=u.length-c),W(s)){if(e.slice(c).search(s)){var l,f=u;for(s.global||(s=RegExp(s.source,Y(i.exec(s))+"g")),s.lastIndex=0;l=s.exec(f);)var p=l.index;u=u.slice(0,void 0===p?c:p)}}else if(e.indexOf(U(s),c)!=c){var d=u.lastIndexOf(s);d>-1&&(u=u.slice(0,d))}return u+r}}(lE,lE.exports)),lE.exports}function pE(){return aE||(aE=1,function(e){var t=uE&&uE.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.truncateTableData=e.truncateString=void 0;const n=t(fE());e.truncateString=(e,t)=>(0,n.default)(e,{length:t,omission:"…"});e.truncateTableData=(t,n)=>t.map(t=>t.map((t,r)=>(0,e.truncateString)(t,n[r])))}(uE)),uE}function dE(){if(cE)return kw;cE=1,Object.defineProperty(kw,"__esModule",{value:!0}),kw.createStream=void 0;const e=p_(),t=C_(),n=$_(),r=F_(),s=V_(),o=X_(),i=nE(),a=oE(),c=pE(),u=l_(),l=(n,r)=>{let s=(0,a.stringifyTableData)(n);s=(0,c.truncateTableData)(s,(0,u.extractTruncates)(r));const l=(0,t.calculateRowHeights)(s,r);return s=(0,o.mapDataUsingRowHeights)(s,l,r),s=(0,e.alignTableData)(s,r),s=(0,i.padTableData)(s,r),s};return kw.createStream=e=>{const t=(0,s.makeStreamConfig)(e),o=Object.values(t.columns).map(e=>e.width+e.paddingLeft+e.paddingRight);let i=!0;return{write:e=>{if(e.length!==t.columnCount)throw new Error("Row cell count does not match the config.columnCount.");i?(i=!1,((e,t,s)=>{const o=l([e],s).map(e=>(0,r.drawRow)(e,s)).join("");let i;i="",i+=(0,n.drawBorderTop)(t,s),i+=o,i+=(0,n.drawBorderBottom)(t,s),i=i.trimEnd(),process.stdout.write(i)})(e,o,t)):((e,t,s)=>{const o=l([e],s).map(e=>(0,r.drawRow)(e,s)).join("");let i="";const a=(0,n.drawBorderBottom)(t,s);"\n"!==a&&(i="\r[K"),i+=(0,n.drawBorderJoin)(t,s),i+=o,i+=a,i=i.trimEnd(),process.stdout.write(i)})(e,o,t)}}},kw}var hE,mE={},gE={};function yE(){if(hE)return gE;hE=1,Object.defineProperty(gE,"__esModule",{value:!0}),gE.calculateOutputColumnWidths=void 0;return gE.calculateOutputColumnWidths=e=>e.columns.map(e=>e.paddingLeft+e.width+e.paddingRight),gE}var bE,vE={};function DE(){if(bE)return vE;bE=1,Object.defineProperty(vE,"__esModule",{value:!0}),vE.drawTable=void 0;const e=$_(),t=N_(),n=F_(),r=l_();return vE.drawTable=(s,o,i,a)=>{const{drawHorizontalLine:c,singleLine:u}=a,l=(0,r.groupBySizes)(s,i).map((e,t)=>e.map(e=>(0,n.drawRow)(e,{...a,rowIndex:t})).join(""));return(0,t.drawContent)({contents:l,drawSeparator:(e,t)=>(0===e||e===t||!u)&&c(e,t),elementType:"row",rowIndex:-1,separatorGetter:(0,e.createTableBorderGetter)(o,{...a,rowCount:l.length}),spanningCellManager:a.spanningCellManager})},vE}var wE,_E={};function EE(){if(wE)return _E;wE=1,Object.defineProperty(_E,"__esModule",{value:!0}),_E.injectHeaderConfig=void 0;return _E.injectHeaderConfig=(e,t)=>{var n;let r=null!==(n=t.spanningCells)&&void 0!==n?n:[];const s=t.header,o=[...e];if(s){r=r.map(({row:e,...t})=>({...t,row:e+1}));const{content:t,...n}=s;r.unshift({alignment:"center",col:0,colSpan:e[0].length,paddingLeft:1,paddingRight:1,row:0,wrapWord:!1,...n}),o.unshift([t,...Array.from({length:e[0].length-1}).fill("")])}return[o,r]},_E}var kE,SE={},AE={};function CE(){return kE||(kE=1,function(e){var t=AE&&AE.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.calculateMaximumColumnWidths=e.calculateMaximumCellWidth=void 0;const n=t(Iw()),r=l_();e.calculateMaximumCellWidth=e=>Math.max(...e.split("\n").map(n.default));e.calculateMaximumColumnWidths=(t,n=[])=>{const s=new Array(t[0].length).fill(0),o=n.map(r.calculateRangeCoordinate);return t.forEach((t,n)=>{t.forEach((t,i)=>{((e,t)=>o.some(n=>(0,r.isCellInRange)({col:t,row:e},n)))(n,i)||(s[i]=Math.max(s[i],(0,e.calculateMaximumCellWidth)(t)))})}),s}}(AE)),AE}var PE,OE={},TE={};function xE(){if(PE)return TE;PE=1;var e=TE&&TE.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(TE,"__esModule",{value:!0}),TE.alignVerticalRangeContent=TE.wrapRangeContent=void 0;const t=e(Iw()),n=f_(),r=X_(),s=nE(),o=pE(),i=l_(),a=S_();TE.wrapRangeContent=(e,t,r)=>{const{topLeft:i,paddingRight:c,paddingLeft:u,truncate:l,wrapWord:f,alignment:p}=e,d=r.rows[i.row][i.col],h=t-u-c;return(0,a.wrapCell)((0,o.truncateString)(d,l),h,f).map(e=>{const t=(0,n.alignString)(e,h,p);return(0,s.padString)(t,u,c)})};return TE.alignVerticalRangeContent=(e,n,s)=>{const{rows:o,drawHorizontalLine:a,rowHeights:c}=s,{topLeft:u,bottomRight:l,verticalAlignment:f}=e;if(0===c.length)return[];const p=(0,i.sumArray)(c.slice(u.row,l.row+1))+(l.row-u.row)-(0,i.sequence)(u.row+1,l.row).filter(e=>!a(e,o.length)).length;return(0,r.padCellVertically)(n,p,f).map(e=>0===e.length?" ".repeat((0,t.default)(n[0])):e)},TE}var NE,$E={};function LE(){if(NE)return $E;NE=1,Object.defineProperty($E,"__esModule",{value:!0}),$E.calculateSpanningCellWidth=void 0;const e=l_();return $E.calculateSpanningCellWidth=(t,n)=>{const{columnsConfig:r,drawVerticalLine:s}=n,{topLeft:o,bottomRight:i}=t;return(0,e.sumArray)(r.slice(o.col,i.col+1).map(({width:e})=>e))+(o.col===i.col?r[o.col].paddingRight+r[i.col].paddingLeft:(0,e.sumArray)(r.slice(o.col,i.col+1).map(({paddingLeft:e,paddingRight:t})=>e+t)))+(i.col-o.col)-(0,e.sequence)(o.col+1,i.col).filter(e=>!s(e,r.length)).length},$E}var RE,FE,IE={};function ME(){if(RE)return IE;RE=1,Object.defineProperty(IE,"__esModule",{value:!0}),IE.makeRangeConfig=void 0;const e=l_();return IE.makeRangeConfig=(t,n)=>{var r;const{topLeft:s,bottomRight:o}=(0,e.calculateRangeCoordinate)(t);return{...{...n[s.col],...t,paddingRight:null!==(r=t.paddingRight)&&void 0!==r?r:n[o.col].paddingRight},bottomRight:o,topLeft:s}},IE}function jE(){if(FE)return OE;FE=1,Object.defineProperty(OE,"__esModule",{value:!0}),OE.createSpanningCellManager=void 0;const e=xE(),t=LE(),n=ME(),r=l_(),s=(e,t)=>t.find(t=>(0,r.isCellInRange)(e,t)),o=(n,s)=>{const o=(0,t.calculateSpanningCellWidth)(n,s),i=(0,e.wrapRangeContent)(n,o,s),a=(0,e.alignVerticalRangeContent)(n,i,s);return{...n,extractBorderContent:e=>{const{topLeft:t}=n,o=(0,r.sumArray)(s.rowHeights.slice(t.row,e))+(e-t.row-1);return a[o]},extractCellContent:e=>{const{topLeft:t}=n,{drawHorizontalLine:o,rowHeights:i}=s,c=e-t.row,u=(0,r.sequence)(t.row+1,e).filter(e=>!(null==o?void 0:o(e,i.length))).length,l=(0,r.sumArray)(i.slice(t.row,e))+c-u;return a.slice(l,l+i[e])},height:i.length,width:o}};return OE.createSpanningCellManager=e=>{const{spanningCellConfigs:t,columnsConfig:i}=e,a=t.map(e=>(0,n.makeRangeConfig)(e,i)),c={};let u=[],l=[];return{getContainingRange:(t,n)=>{var r;const i=(null==n?void 0:n.mapped)?l[t.row]:t.row,f=s({...t,row:i},a);if(!f)return;if(0===u.length)return o(f,{...e,rowHeights:u});const p=(e=>{const{row:t,col:n}=e.topLeft;return`${t}/${n}`})(f);return null!==(r=c[p])&&void 0!==r||(c[p]=o(f,{...e,rowHeights:u})),c[p]},inSameRange:(e,t)=>((e,t,n)=>{const o=s(e,n),i=s(t,n);return!(!o||!i)&&(0,r.areCellEqual)(o.topLeft,i.topLeft)})(e,t,a),rowHeights:u,rowIndexMapping:l,setRowHeights:e=>{u=e},setRowIndexMapping:e=>{l=(0,r.flatten)(e.map((e,t)=>Array.from({length:e},()=>t)))}}},OE}var BE,zE,HE={};function KE(){if(BE)return HE;BE=1,Object.defineProperty(HE,"__esModule",{value:!0}),HE.validateSpanningCellConfig=void 0;const e=l_(),t=(e,t,n)=>e<=n&&n<=t;return HE.validateSpanningCellConfig=(n,r)=>{const[s,o]=[n.length,n[0].length];r.forEach((e,t)=>{const{colSpan:n,rowSpan:r}=e;if(void 0===n&&void 0===r)throw new Error(`Expect at least colSpan or rowSpan is provided in config.spanningCells[${t}]`);if(void 0!==n&&n<1)throw new Error(`Expect colSpan is not equal zero, instead got: ${n} in config.spanningCells[${t}]`);if(void 0!==r&&r<1)throw new Error(`Expect rowSpan is not equal zero, instead got: ${r} in config.spanningCells[${t}]`)});const i=r.map(e.calculateRangeCoordinate);i.forEach(({topLeft:e,bottomRight:n},r)=>{if(!(t(0,o-1,e.col)&&t(0,s-1,e.row)&&t(0,o-1,n.col)&&t(0,s-1,n.row)))throw new Error(`Some cells in config.spanningCells[${r}] are out of the table`)});const a=Array.from({length:s},()=>Array.from({length:o}));i.forEach(({topLeft:t,bottomRight:n},r)=>{(0,e.sequence)(t.row,n.row).forEach(s=>{(0,e.sequence)(t.col,n.col).forEach(e=>{if(void 0!==a[s][e])throw new Error(`Spanning cells in config.spanningCells[${a[s][e]}] and config.spanningCells[${r}] are overlap each other`);a[s][e]=r})})})},HE}function UE(){if(zE)return SE;zE=1,Object.defineProperty(SE,"__esModule",{value:!0}),SE.makeTableConfig=void 0;const e=CE(),t=jE(),n=l_(),r=J_(),s=KE();return SE.makeTableConfig=(o,i={},a)=>{var c,u,l,f,p;(0,r.validateConfig)("config.json",i),(0,s.validateSpanningCellConfig)(o,null!==(c=i.spanningCells)&&void 0!==c?c:[]);const d=null!==(u=null!=a?a:i.spanningCells)&&void 0!==u?u:[],h=((t,n,r,s)=>{const o=(0,e.calculateMaximumColumnWidths)(t,s);return t[0].map((e,t)=>({alignment:"left",paddingLeft:1,paddingRight:1,truncate:Number.POSITIVE_INFINITY,verticalAlignment:"top",width:o[t],wrapWord:!1,...r,...null==n?void 0:n[t]}))})(o,i.columns,i.columnDefault,d),m=null!==(l=i.drawVerticalLine)&&void 0!==l?l:()=>!0,g=null!==(f=i.drawHorizontalLine)&&void 0!==f?f:()=>!0;return{...i,border:(0,n.makeBorderConfig)(i.border),columns:h,drawHorizontalLine:g,drawVerticalLine:m,singleLine:null!==(p=i.singleLine)&&void 0!==p&&p,spanningCellManager:(0,t.createSpanningCellManager)({columnsConfig:h,drawHorizontalLine:g,drawVerticalLine:m,rows:o,spanningCellConfigs:d})}},SE}var qE,ZE,GE={};function WE(){if(qE)return GE;qE=1,Object.defineProperty(GE,"__esModule",{value:!0}),GE.validateTableData=void 0;const e=l_();return GE.validateTableData=t=>{if(!Array.isArray(t))throw new TypeError("Table data must be an array.");if(0===t.length)throw new Error("Table must define at least one row.");if(0===t[0].length)throw new Error("Table must define at least one column.");const n=t[0].length;for(const r of t){if(!Array.isArray(r))throw new TypeError("Table row data must be an array.");if(r.length!==n)throw new Error("Table must have a consistent number of cells.");for(const t of r)if(/[\u0001-\u0006\u0008\u0009\u000B-\u001A]/.test((0,e.normalizeString)(String(t))))throw new Error("Table data must not contain control characters.")}},GE}function JE(){if(ZE)return mE;ZE=1,Object.defineProperty(mE,"__esModule",{value:!0}),mE.table=void 0;const e=p_(),t=yE(),n=C_(),r=DE(),s=EE(),o=UE(),i=X_(),a=nE(),c=oE(),u=pE(),l=l_(),f=WE();return mE.table=(p,d={})=>{(0,f.validateTableData)(p);let h=(0,c.stringifyTableData)(p);const[m,g]=(0,s.injectHeaderConfig)(h,d),y=(0,o.makeTableConfig)(m,d,g);h=(0,u.truncateTableData)(m,(0,l.extractTruncates)(y));const b=(0,n.calculateRowHeights)(h,y);y.spanningCellManager.setRowHeights(b),y.spanningCellManager.setRowIndexMapping(b),h=(0,i.mapDataUsingRowHeights)(h,b,y),h=(0,e.alignTableData)(h,y),h=(0,a.padTableData)(h,y);const v=(0,t.calculateOutputColumnWidths)(y);return(0,r.drawTable)(h,v,b,y)},mE}var VE,YE,QE={};function XE(){return VE||(VE=1,Object.defineProperty(QE,"__esModule",{value:!0})),QE}function ek(){return YE||(YE=1,function(e){var t=Ew&&Ew.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=Ew&&Ew.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.getBorderCharacters=e.createStream=e.table=void 0;const r=dE();Object.defineProperty(e,"createStream",{enumerable:!0,get:function(){return r.createStream}});const s=u_();Object.defineProperty(e,"getBorderCharacters",{enumerable:!0,get:function(){return s.getBorderCharacters}});const o=JE();Object.defineProperty(e,"table",{enumerable:!0,get:function(){return o.table}}),n(XE(),e)}(Ew)),Ew}var tk=ek();const nk=e=>e.toString().padStart(2,"0"),rk=e=>{e<0&&(e=0);const t=Math.floor(e/1e3),n=Math.floor(t/60),r=t%60;return`${nk(n)}:${nk(r)}`},sk=e=>{if(cw()){if("warn"===e)return"[WARN]";switch(e){case"waiting":return"[WAIT]";case"run":return"[RUN]";case"ok":return"[OK]";case"error":return"[FAIL]";case"cancelled":return"[CANCELLED]";case"timeout":return"[TIMEOUT]";case"quiet":return"[QUIET]";case"stalled":return"[STALLED]";case"killed":return"[KILLED]";default:return""}}switch(e){case"warn":return mw("⚠︎ warn");case"waiting":return hw("⏸︎ waiting");case"run":return fw("▶︎ run");case"ok":return uw("✔︎ ok");case"error":return pw("✖︎ fail");case"cancelled":return dw("◼︎ cancelled");case"timeout":return pw("⏱︎ timeout");case"quiet":return lw("⏱︎ quiet");case"stalled":return mw("⏱︎ stalled");case"killed":return pw("◼︎ killed");default:return""}},ok=e=>e.replace(/\\/g,"/"),ik=(e,t)=>{if(!t)return"";const n=t;return d.isAbsolute(n)?ok(d.relative(e,n)):ok(n)},ak=e=>{const{state:t,cwd:n,now:r}=e,s=(e=>{switch(e.kind){case"warn":return"warn";case"waiting":default:return"waiting";case"running":return"run";case"quiet":return"quiet";case"stalled":return"stalled";case"done":return"ok";case"error":return"error";case"timedout":return"timeout";case"cancelled":return"cancelled";case"killed":return"killed"}})(t);let o="";if("running"===t.kind||"quiet"===t.kind||"stalled"===t.kind){const e="number"==typeof t.startedAt?t.startedAt:(r??Date.now)();o=rk(Math.max(0,(r??Date.now)()-e))}else"number"==typeof t.durationMs&&(o=rk(Math.max(0,t.durationMs)));const i="done"===t.kind||"warn"===t.kind||"error"===t.kind||"timedout"===t.kind||"cancelled"===t.kind||"killed"===t.kind?ik(n,t.outputPath):"";return{label:sk(s),time:o,output:i}},ck=e=>e.startsWith("script:")?{type:"script",item:e.slice(7)||"(unnamed)"}:e.startsWith("archive:")?{type:"archive",item:e.slice(8)||"(unnamed)"}:void 0,uk=e=>{const t={warn:0,waiting:0,running:0,quiet:0,stalled:0,ok:0,cancelled:0,fail:0,timeout:0};for(const{state:n}of e)"warn"===n.kind?t.warn+=1:"waiting"===n.kind?t.waiting+=1:"running"===n.kind?t.running+=1:"quiet"===n.kind?t.quiet+=1:"stalled"===n.kind?t.stalled+=1:"done"===n.kind?t.ok+=1:"timedout"===n.kind?t.timeout+=1:"cancelled"===n.kind?t.cancelled+=1:["error","killed"].includes(n.kind)&&(t.fail+=1);return t},lk=e=>{const{rows:t,startedAt:n,boring:r,uiId:s,includeHint:o}=e,i=["Type","Item","Status","Time","Output"].map(e=>gw(e)),a=[];if(a.push(i),0===t.length){const e=rk(Date.now()-n);a.push(["—","—",r?"[IDLE]":"idle",e,""])}else for(const e of t){const t=e.state,n=ak({state:t,cwd:process.cwd(),now:()=>Date.now()});a.push([e.type,e.item,n.label,n.time,n.output])}const c=(e=>tk.table(e,{columnDefault:{paddingLeft:0,paddingRight:2},border:{topBody:"",topJoin:"",topLeft:"",topRight:"",bottomBody:"",bottomJoin:"",bottomLeft:"",bottomRight:"",bodyLeft:"",bodyRight:"",bodyJoin:"",joinBody:"",joinLeft:"",joinRight:"",joinJoin:""},drawHorizontalLine:()=>!1,columns:{0:{alignment:"left"},1:{alignment:"left"},2:{alignment:"left"},3:{alignment:"left"},4:{alignment:"left"}}}))(a),u=((e,t,n)=>n?[e,`waiting ${t.waiting.toString()}`,`running ${t.running.toString()}`,`quiet ${t.quiet.toString()}`,`stalled ${t.stalled.toString()}`,`timeout ${t.timeout.toString()}`,`ok ${t.ok.toString()}`,`warn ${t.warn.toString()}`,`fail ${t.fail.toString()}`,`cancelled ${t.cancelled.toString()}`].join(" • "):[e,hw(`⏸︎ ${t.waiting.toString()}`),fw(`▶︎ ${t.running.toString()}`),lw(`⏱︎ ${t.quiet.toString()}`),mw(`⏱︎ ${t.stalled.toString()}`),pw(`⏱︎ ${t.timeout.toString()}`),uw(`✔︎ ${t.ok.toString()}`),mw(`⚠︎ ${t.warn.toString()}`),pw(`✖︎ ${t.fail.toString()}`),dw(`◼︎ ${t.cancelled.toString()}`)].join(" • "))(rk(Date.now()-n),uk(t.map(e=>({state:e.state}))),r),l=o?`\n${(e=>{const t="1"===process.env.STAN_TEST_UI_TAG?` UI#${e.toString()}`:"";return`${yw("Press")} ${gw("q")} ${yw("to cancel,")} ${gw("r")} ${yw("to restart")}${t}`})(s)}`:"",f=`\n${`${c.trimEnd()}\n\n${u}${l}`}\n`;if("1"===process.env.STAN_LIVE_DEBUG)try{const e=/(?:^|\n)Type\s+Item\s+Status\s+Time\s+Output(?:\n|$)/g,t=((e=>{try{return e.replace(/\x1B\[[0-?]*[ -/]*[@-~]/g,"")}catch{return e}})(f).match(e)??[]).length;console.error("[stan:live:frame]",{headerMatches:t,includeHint:o})}catch{}return f},fk="[",pk=`${fk}?25l`,dk=`${fk}?25h`,hk=`${fk}K`,mk=e=>e>0?`${fk}${String(e)}F`:"",gk=`${fk}1E`,yk=()=>{const e=process.stdout;let t=0;return{start(){try{e.write(pk)}catch{}},write(n){try{const r=n.endsWith("\n")?n:`${n}\n`;(n=>{let r="";t>0&&(r+=mk(t));for(let e=0;e<n.length;e+=1){const s=n[e]??"";r+=0===t&&0===e&&""===s?"\n":`\r${hk}${s}\n`}const s=t-n.length;for(let e=0;e<s;e+=1)r+=`\r${hk}`,e<s-1&&(r+=gk);e.write(r),t=n.length})(r.split("\n"))}catch{}},clear(){try{let n="";t>0&&(n+=mk(t));for(let e=0;e<t;e+=1)n+=`\r${hk}\n`;e.write(n),t=0}catch{}},done(){try{e.write(dk)}catch{}}}},bk=(()=>{try{return"1"===process.env.STAN_LIVE_DEBUG}catch{return!1}})(),vk=(e,t,n)=>{if(bk)try{n&&Object.keys(n).length>0?console.error(`[stan:live:${e}] ${t}`,n):console.error(`[stan:live:${e}] ${t}`)}catch{}},Dk={get enabled(){return bk},renderer:{start(e){vk("renderer","start()",e)},update(e){vk("renderer","update()",e)},render(e){vk("renderer","render()",e)},headerOnly(e){vk("renderer","render(header-only)",e)},flush(){vk("renderer","flush()")},clear(){vk("renderer","clear()")},stop(){vk("renderer","stop()")},done(){vk("renderer","stop():done()")}},ui:{start(){vk("UI","start()")},installCancellation(){vk("UI","installCancellation(): control.attach()")},onCancelled(e){vk("UI","onCancelled()",{mode:e})},stop(){vk("UI","stop() -> sink.stop()")}},session:{info(e,t){vk("session",e,t)},exitHook(){vk("session","exit hook fired: ui.stop + supervisor cancel + pause stdin")}}};let wk=1;const _k=()=>Date.now();class Ek{rows=new Map;opts;frameNo=0;timer;startedAt=_k();writer=null;uiId;constructor(e){this.opts={boring:Boolean(e?.boring),refreshMs:e?.refreshMs??1e3},this.uiId=wk++}resetElapsed(){this.startedAt=_k(),this.frameNo=0}finalize(){this.timer&&clearInterval(this.timer),this.timer=void 0,this.renderFinalNoHint(),Dk.renderer.stop(),Dk.renderer.done(),this.writer?.done()}flush(){Dk.renderer.flush(),this.render()}resetRows(){this.rows.clear()}start(){Dk.renderer.start({refreshMs:this.opts.refreshMs}),this.timer||(this.writer||(this.writer=yk()),this.writer.start(),this.timer=setInterval(()=>{this.render()},this.opts.refreshMs))}clear(){Dk.renderer.clear(),this.writer?.clear()}stop(){Dk.renderer.stop(),this.timer&&clearInterval(this.timer),this.timer=void 0,Dk.renderer.done(),this.writer?.done()}update(e,t,n){const r=this.rows.get(e),s=n??ck(e)??(r?.type?{type:r.type,item:r.item}:void 0);if(!s){const n={type:"script",item:e};return void this.rows.set(e,{...n,state:{...r?.state??{},...t}})}this.rows.set(e,{...s,state:{...r?.state??{},...t}}),Dk.renderer.update({key:e,kind:t.kind,rowsSize:this.rows.size})}cancelPending(){const e=_k();for(const[t,n]of this.rows.entries()){const r=n.state;switch(r.kind){case"waiting":this.update(t,{kind:"cancelled"});break;case"running":case"quiet":case"stalled":{const n="number"==typeof r.startedAt?r.startedAt:void 0,s="number"==typeof n?Math.max(0,e-n):0;this.update(t,{kind:"cancelled",durationMs:s});break}}}}renderFinalNoHint(){let e=lk({rows:Array.from(this.rows.values()),startedAt:this.startedAt,boring:this.opts.boring,uiId:this.uiId,includeHint:!1});e.endsWith("\n")||(e+="\n"),e+="\n",this.writer?.write(e)}render(){const e=lk({rows:Array.from(this.rows.values()),startedAt:this.startedAt,boring:this.opts.boring,uiId:this.uiId,includeHint:!0});if(this.frameNo+=1,Dk.enabled)try{const e=uk(this.rows.values()),t=Array.from(this.rows.keys()).slice(0,5);Dk.renderer.render({frameNo:this.frameNo,rowsSize:this.rows.size,keys:t,headerCount:1,hasHint:!0,counts:e})}catch{}this.writer?.write(e)}}var kk,Sk;var Ak=function(){if(Sk)return kk;Sk=1;var e=$,t=e.spawn,n=e.exec;function r(e,t,n){var r={};try{Object.keys(e).forEach(function(n){e[n].forEach(function(e){r[e]||(s(e,t),r[e]=1)}),r[n]||(s(n,t),r[n]=1)})}catch(e){if(n)return n(e);throw e}if(n)return n()}function s(e,t){try{process.kill(parseInt(e,10),t)}catch(e){if("ESRCH"!==e.code)throw e}}function o(e,t,n,r,s){var i=r(e),a="";i.stdout.on("data",function(e){e=e.toString("ascii");a+=e});i.on("close",function(i){delete n[e],0==i?a.match(/\d+/g).forEach(function(i){i=parseInt(i,10),t[e].push(i),t[i]=[],n[i]=1,o(i,t,n,r,s)}):0==Object.keys(n).length&&s()})}return kk=function(e,s,i){if("function"==typeof s&&void 0===i&&(i=s,s=void 0),e=parseInt(e),Number.isNaN(e)){if(i)return i(new Error("pid must be a number"));throw new Error("pid must be a number")}var a={},c={};switch(a[e]=[],c[e]=1,process.platform){case"win32":n("taskkill /pid "+e+" /T /F",i);break;case"darwin":o(e,a,c,function(e){return t("pgrep",["-P",e])},function(){r(a,s,i)});break;default:o(e,a,c,function(e){return t("ps",["-o","pid","--no-headers","--ppid",e])},function(){r(a,s,i)})}}}(),Ck=Sg(Ak);class Pk{behavior;constructor(e){this.behavior=e}pids=new Map;lastCancelled=[];track(e,t){this.pids.set(e,t)}cancelAll(e){const t="number"==typeof this.behavior.hangKillGrace?this.behavior.hangKillGrace:10,n=e?.immediate?0:Math.max(0,1e3*t),r=Array.from(this.pids.entries()),s=Array.from(this.pids.values());this.lastCancelled=s;for(const[,e]of r)try{Number.isFinite(e)&&process.kill(e,"SIGTERM")}catch{}const o=()=>{for(const[,e]of r)try{Number.isFinite(e)&&Ck(e,"SIGKILL")}catch{}};n<=0?setTimeout(o,0):setTimeout(o,n),this.pids.clear()}async waitAll(e=2e3){const t=this.lastCancelled.length>0?[...this.lastCancelled]:Array.from(this.pids.values());if(0===t.length)return;const n=Date.now()+Math.max(0,e),r=e=>{try{return process.kill(e,0)}catch{return!1}};for(;Date.now()<n;){if(0===t.filter(e=>r(e)).length)break;await new Promise(e=>setTimeout(e,50))}this.lastCancelled=[]}}class Ok{ui;supervisor;cancelled=!1;restartRequested=!1;cancelledKeys=new Set;wake=null;waitP;constructor(e,t){this.ui=e,this.supervisor=t,this.waitP=new Promise(e=>this.wake=e)}markQueued(e){for(const t of e)this.cancelledKeys.add(`script:${t}`)}async wait(){await this.waitP}isCancelled(){return this.cancelled}isRestart(){return this.restartRequested}wasKeyCancelled(e){return this.cancelled&&this.cancelledKeys.has(`script:${e}`)}triggerCancel(){if(!this.cancelled){this.cancelled=!0;try{this.ui.onCancelled("cancel")}catch{}try{this.supervisor.cancelAll({immediate:!0})}catch{}try{process.exitCode=1,"test"!==process.env.NODE_ENV&&process.exit(1)}catch{}try{this.wake?.()}catch{}}}triggerRestart(){if(!this.restartRequested){this.restartRequested=!0,this.cancelled=!0;try{this.ui.onCancelled("restart")}catch{}try{this.supervisor.cancelAll({immediate:!0})}catch{}try{this.wake?.()}catch{}}}detachUiKeys(){try{Dk.session.info("restart: detach keys")}catch{}}}let Tk=null;function xk(e){return Tk===e}const Nk=(e,n)=>{const r=n.PATH??n.Path??"",s=(e=>{const n=[];let r=e;for(;;){const e=g(r,"node_modules",".bin");try{t(e)&&n.push(e)}catch{}const s=m(r);if(s===r)break;r=s}return n})(e);return{...n,PATH:[...s,r].filter(Boolean).join(y)}},$k=async(e,t,n,r,o,i,c,u,l)=>{const p=h(t,`${r}.txt`),d=Date.now();c?.onStart?.(r);const m=s(p,{encoding:"utf8"}),g=k(o,{cwd:e,shell:!0,windowsHide:!0,env:Nk(e,process.env)}),y="1"===process.env.STAN_DEBUG;let b="";const v="number"==typeof u?.hangWarn&&u.hangWarn>0?u.hangWarn:0,D="number"==typeof u?.hangKill&&u.hangKill>0?u.hangKill:0,w="number"==typeof u?.hangKillGrace&&u.hangKillGrace>0?u.hangKillGrace:10;let _,E,S=Date.now(),A=!1,C=!1;try{"number"==typeof g.pid&&l&&l.track(`script:${r}`,g.pid)}catch{}g.stdout.on("data",e=>{m.write(e),b+=e.toString("utf8"),y&&process.stdout.write(e),S=Date.now()}),g.stderr.on("data",e=>{m.write(e),b+=e.toString("utf8"),y&&process.stderr.write(e),S=Date.now()}),(v>0||D>0)&&(_=setInterval(()=>{const e=Date.now()-S;if(!A&&v>0&&e>=1e3*v&&(A=!0,c?.onHangWarn?.(r,v)),!C&&D>0&&e>=1e3*D){C=!0;try{"number"==typeof g.pid&&process.kill(g.pid,"SIGTERM")}catch{}c?.onHangTimeout?.(r,D);const e=Math.max(0,1e3*w);E=setTimeout(()=>{try{"number"==typeof g.pid&&Ck(g.pid,"SIGKILL")}catch{}c?.onHangKilled?.(r,w)},e)}},1e3));const P=await new Promise((e,t)=>{g.on("error",e=>{t(e instanceof Error?e:new Error(String(e)))}),g.on("close",t=>{e(t??0)})});_&&clearInterval(_),E&&clearTimeout(E),m.end(),await(e=>new Promise((t,n)=>{e.on("close",()=>{t()}),e.on("error",e=>{n(e instanceof Error?e:new Error(String(e)))})}))(m);let O="ok";if("number"==typeof P&&0!==P)O="error";else if(u?.warnPatterns&&u.warnPatterns.length>0){const e=(e,t)=>e.some(e=>{try{return e.lastIndex=0,e.test(t)}catch{return!1}});let t=!1;if(b.length>0&&e(u.warnPatterns,b))t=!0;else try{const n=await a(p,"utf8");e(u.warnPatterns,n)&&(t=!0)}catch{}t&&(O="warn")}return c?.onEnd?.(r,p,d,Date.now(),P,O),i&&await f(i,r.slice(0,1).toUpperCase(),"utf8"),p},Lk=()=>{let e=0;return(()=>{try{const e=process.env.CI,t=("string"==typeof e?e:"").trim().toLowerCase();return""!==t&&"0"!==t&&"false"!==t}catch{return!1}})()&&(e+=25),"win32"!==process.platform&&(e+=10),25+e},Rk=async(e,t,n,r,s,o,i,a,c,u,l)=>{const f=[],p=async n=>{try{if("function"==typeof u&&!u())return}catch{}const s=r.scripts[n],o="string"==typeof s?s:"object"==typeof s&&s&&"script"in s?s.script:"",p=s&&"object"==typeof s&&"warnPattern"in s?((e,t)=>{if("string"!=typeof e||!e.trim())return[];const n=e.trim(),r=[],s=(e,t)=>{try{r.push(new RegExp(e,t))}catch{}};if("string"==typeof t&&t.length>0){s(n,t);const e=n.replace(/\\\\/g,"\\");e!==n&&s(e,t)}else{s(n);const e=n.replace(/\\\\/g,"\\");e!==n&&s(e),s(n,"i")}return r})(s.warnPattern,s.warnPatternFlags):[],d=await $k(e,t,0,n,o,i,a,{silent:a.silent,hangWarn:c?.hangWarn,hangKill:c?.hangKill,hangKillGrace:c?.hangKillGrace,warnPatterns:p},l);f.push(d)};if("sequential"===o)for(const e of s){const t=e=>new Promise(t=>setTimeout(t,e));if("function"==typeof u){if(!u())break;if(await $D(),!u())break;if(await t(Lk()),!u())break;if(await $D(),!u())break}if(await p(e),"function"==typeof u){if(await $D(),!u())break;if(await t(Math.max(5,Lk()/2)),!u())break;if(await $D(),!u())break}}else{const e="function"==typeof u?s.filter(()=>u()):s;await Promise.all(e.map(e=>p(e).then(()=>{})))}return f},Fk=async e=>{const{cwd:t,outAbs:n,outRel:r,config:s,toRun:o,mode:i,orderFile:a,ui:c,epoch:u,isActive:l,shouldContinue:f,supervisor:p,liveEnabled:d,hangWarn:h,hangKill:m,hangKillGrace:g}=e,y=[],b=Rk(t,n,0,s,o,i,a,{onStart:e=>{l(u)&&c.onScriptStart(e)},onEnd:(e,n,r,s,o,i)=>{if(l(u)&&(c.onScriptEnd(e,n,t,r,s,o,i),"error"===i||"number"==typeof o&&0!==o))try{process.exitCode=1}catch{}},silent:!0,onHangWarn:(e,t)=>{l(u)&&(d||((e,t)=>{try{console.log(`stan: ⏱ stalled "${e}" after ${t.toString()}s of inactivity`)}catch{}})(e,t))},onHangTimeout:(e,t)=>{l(u)&&(d||((e,t)=>{try{console.log(`stan: ⏱ timeout "${e}" after ${t.toString()}s; sending SIGTERM`)}catch{}})(e,t))},onHangKilled:(e,t)=>{l(u)&&(d||((e,t)=>{try{console.log(`stan: ◼ killed "${e}" after ${t.toString()}s grace`)}catch{}})(e,t))}},{hangWarn:h,hangKill:m,hangKillGrace:g},f,p).then(e=>{y.push(...e)});return await b.catch(()=>{}),y},Ik=[];Ik.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Ik.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Ik.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Mk=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,jk=Symbol.for("signal-exit emitter"),Bk=globalThis,zk=Object.defineProperty.bind(Object);class Hk{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Bk[jk])return Bk[jk];zk(Bk,jk,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const n=this.listeners[e],r=n.indexOf(t);-1!==r&&(0===r&&1===n.length?n.length=0:n.splice(r,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(const s of this.listeners[e])r=!0===s(t,n)||r;return"exit"===e&&(r=this.emit("afterExit",t,n)||r),r}}class Kk{}const Uk=globalThis.process,{onExit:qk}=(Zk=Mk(Uk)?new class extends Kk{#e="win32"===Uk.platform?"SIGINT":"SIGHUP";#t=new Hk;#n;#r;#s;#o={};#i=!1;constructor(e){super(),this.#n=e,this.#o={};for(const t of Ik)this.#o[t]=()=>{const n=this.#n.listeners(t);let{count:r}=this.#t;const s=e;if("object"==typeof s.__signal_exit_emitter__&&"number"==typeof s.__signal_exit_emitter__.count&&(r+=s.__signal_exit_emitter__.count),n.length===r){this.unload();const n=this.#t.emit("exit",null,t),r="SIGHUP"===t?this.#e:t;n||e.kill(e.pid,r)}};this.#s=e.reallyExit,this.#r=e.emit}onExit(e,t){if(!Mk(this.#n))return()=>{};!1===this.#i&&this.load();const n=t?.alwaysLast?"afterExit":"exit";return this.#t.on(n,e),()=>{this.#t.removeListener(n,e),0===this.#t.listeners.exit.length&&0===this.#t.listeners.afterExit.length&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#t.count+=1;for(const e of Ik)try{const t=this.#o[e];t&&this.#n.on(e,t)}catch(e){}this.#n.emit=(e,...t)=>this.#a(e,...t),this.#n.reallyExit=e=>this.#c(e)}}unload(){this.#i&&(this.#i=!1,Ik.forEach(e=>{const t=this.#o[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#n.removeListener(e,t)}catch(e){}}),this.#n.emit=this.#r,this.#n.reallyExit=this.#s,this.#t.count-=1)}#c(e){return Mk(this.#n)?(this.#n.exitCode=e||0,this.#t.emit("exit",this.#n.exitCode,null),this.#s.call(this.#n,this.#n.exitCode)):0}#a(e,...t){const n=this.#r;if("exit"===e&&Mk(this.#n)){"number"==typeof t[0]&&(this.#n.exitCode=t[0]);const r=n.call(this.#n,e,...t);return this.#t.emit("exit",this.#n.exitCode,null),r}return n.call(this.#n,e,...t)}}(Uk):new class extends Kk{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>Zk.onExit(e,t),load:()=>Zk.load(),unload:()=>Zk.unload()});var Zk;const Gk=(e,t)=>{try{Dk.session.info("install SIGINT handler"),process.on("SIGINT",e)}catch{}const n=(r=t,qk(()=>{try{const e=r();e&&"function"==typeof e.then&&e.catch(()=>{})}catch{}}));var r;return()=>{try{Dk.session.info("detach SIGINT handler"),process.off("SIGINT",e)}catch{}try{Dk.session.info("uninstall exit hook"),n()}catch{}}},Wk=(e,t)=>d.join(e,t,"system",".docs.meta.json"),Jk=async e=>E("sha256").update(await a(e)).digest("hex"),Vk=async(e,t,n)=>{const r=d.join(e,t,"imports");try{const e=await i(r,{withFileTypes:!0});await Promise.all(e.map(e=>u(h(r,e.name),{recursive:!0,force:!0})))}catch{}if(n&&"object"==typeof n)try{await(async e=>{const{cwd:t,stanPath:n,map:r,onStage:s}=e;if(!r||"object"!=typeof r)return;const i=ac(t,n),a=d.join(i.rootAbs,"imports");await b(a);const c=Object.keys(r).sort();for(const e of c){const n=r[e]??[];if(!Array.isArray(n)||0===n.length)continue;const i=Cf(e);if(!i)continue;const c=d.join(a,i);await u(c,{recursive:!0,force:!0}).catch(()=>{}),await b(c).catch(()=>{});const l=[];for(const e of n){const n=e.trim();if(!n)continue;const r=Sf(n.replace(/\\/g,"/"));try{const e=await Ef(n,{cwd:t,absolute:!0,dot:!0,onlyFiles:!1,followSymbolicLinks:!1});for(const n of e){if(!await Pf(n))continue;const e=d.relative(d.isAbsolute(r)?r:d.resolve(t,r),n).replace(/\\/g,"/");if(!e||e.includes(".."))continue;const s=d.join(c,e);await b(d.dirname(s)).catch(()=>{});try{await o(n,s),l.push(s)}catch{}}}catch{}}try{"function"==typeof s&&s(i,l.map(e=>d.relative(t,e).replace(/\\/g,"/")))}catch{}}})({cwd:e,stanPath:t,map:n})}catch{}},Yk=async e=>{try{const t=await i(e,{withFileTypes:!0}),n=new Set(["archive.tar","archive.diff.tar"]);await Promise.all(t.map(async t=>{n.has(t.name)||await u(h(e,t.name),{recursive:!0,force:!0})}))}catch{}},Qk=async(e,t)=>{const n=d.join(e,t,"patch");try{const e=await i(n,{withFileTypes:!0});await Promise.all(e.map(e=>u(h(n,e.name),{recursive:!0,force:!0})))}catch{}},Xk=e=>"diff"===e?"archive (diff)":"archive";var eS=Object.freeze({__proto__:null,archivePhase:async(e,n)=>{const{cwd:r,config:s,includeOutputs:i}=e,a=Boolean(n?.silent),c=n?.which??"both",l=!1!==n?.stage,f=!1!==n?.cleanup,p=((e,t)=>{const n=d.join(e,t),r=d.join(n,"system");return{base:n,system:r,output:d.join(n,"output"),diff:d.join(n,"diff"),patch:d.join(n,"patch"),systemFile:d.join(r,"stan.system.md")}})(r,s.stanPath),m="function"==typeof n?.shouldContinue?n.shouldContinue:void 0,g=((e,t)=>{const n=Array.isArray(t)?t.filter(e=>"string"==typeof e&&e.length>0):[],r=(e=>{const t=(e=>{const t="string"==typeof e?e.trim():"",n=(r=t,r.replace(/\\+/g,"/")).replace(/\/+$/,"");var r;return n.length>0?n:t.startsWith("/")?"":".stan"})(e);return`${t}/imports/**`})(e);return n.includes(r)?n:[...n,r]})(s.stanPath,s.includes??[]);let y,b;a||"both"!==c&&"full"!==c||console.log(`stan: start "${lw("archive")}"`);try{if(l){if(m&&!m())return{archivePath:y,diffPath:b};await Vk(r,s.stanPath,s.imports)}if("both"===c||"full"===c){if(m&&!m())return{archivePath:y,diffPath:b};n?.progress?.start?.("full");const e=Date.now();if(y=await async function(e,n,r={}){const{includeOutputDir:s=!1,fileName:i,includes:a=[],excludes:c=[],anchors:u=[]}=r;let l=i??"archive.tar";l.endsWith(".tar")||(l+=".tar");const{outDir:f,diffDir:p}=await be(e,n),d=await de(e),m=await ge(d,{cwd:e,stanPath:n,includeOutputDir:s,includes:a,excludes:c,anchors:u}),g=h(f,l),y=h(p,I);if(t(g))try{await o(g,y)}catch{}const b=await(async()=>{try{const e=await import("./classifier-Bqzr65UC-DJLYQY2b.js"),t=e.classifyForArchive,n=e.default?.classifyForArchive,r="function"==typeof t?t:n;if("function"==typeof r)return r}catch{}throw new Error("classifyForArchive export not found in ./classifier")})(),{textFiles:v,warningsBody:D}=await b(e,m),w=v;U(D,r.onArchiveWarnings);const _=await import("./index-ucZa1KMb-DZqceYU7.js");if(s?await _.create({file:g,cwd:e,filter:H(n)},K(w,n)):await _.create({file:g,cwd:e,filter:H(n)},w),!t(y))try{await o(g,y)}catch{}return g}(r,s.stanPath,{includeOutputDir:i,includes:g,excludes:s.excludes??[],anchors:s.anchors??[]}),n?.progress?.done?.("full",y,e,Date.now()),m&&!m()){try{await u(y,{force:!0})}catch{}return{archivePath:void 0,diffPath:b}}a||console.log(`stan: ${uw("done")} "${lw("archive")}" -> ${lw(y.replace(/\\/g,"/"))}`)}if(a||"both"!==c&&"diff"!==c||console.log(`stan: start "${lw("archive (diff)")}"`),"both"===c||"diff"===c){if(m&&!m())return{archivePath:y,diffPath:b};n?.progress?.start?.("diff");const e=Date.now();if(b=(await lc({cwd:r,stanPath:s.stanPath,baseName:"archive",includes:g,excludes:s.excludes??[],anchors:s.anchors??[],updateSnapshot:"createIfMissing",includeOutputDirInDiff:i})).diffPath,n?.progress?.done?.("diff",b,e,Date.now()),m&&!m()){try{await u(b,{force:!0})}catch{}return{archivePath:y,diffPath:void 0}}a||console.log(`stan: ${uw("done")} "${lw("archive (diff)")}" -> ${lw(b.replace(/\\/g,"/"))}`)}}finally{}return f&&(i&&await Yk(p.output),await Qk(r,s.stanPath)),{archivePath:y,diffPath:b}},archivePrintable:Xk,cleanupOutputsAfterCombine:Yk,cleanupPatchDirAfterArchive:Qk,stageImports:Vk});const tS=async e=>{const{cwd:t,stanPath:n,promptAbs:r}=e;let s,o=!1;try{r&&(s=await Jk(r))}catch{s=void 0}try{const e=await(async(e,t)=>{try{const n=await a(Wk(e,t),"utf8"),r=JSON.parse(n);if(r&&"object"==typeof r)return r}catch{}return null})(t,n),r=e?.prompt&&"object"==typeof e.prompt?e.prompt.hash:void 0;r&&s?o=r!==s:r&&s||(o=!1)}catch{o=!1}return o},nS=e=>e instanceof URL?D(e):e;function rS({cwd:t}={}){const n=function(t,{cwd:n=v.cwd(),type:r="file",stopAt:s}={}){let o=d.resolve(nS(n)??"");const{root:i}=d.parse(o);s=d.resolve(o,nS(s)??i);const a=d.isAbsolute(t);for(;o;){const n=a?t:d.join(o,t);try{const t=e.statSync(n,{throwIfNoEntry:!1});if("file"===r&&t?.isFile()||"directory"===r&&t?.isDirectory())return n}catch{}if(o===s||o===i)break;o=d.dirname(o)}}("package.json",{cwd:t});return n&&d.dirname(n)}const sS=()=>{try{const e=(()=>{const e=(()=>{try{const e=D(import.meta.url);return we({cwd:d.dirname(e)})??null}catch{return null}})();if(!e)return null;const n=d.join(e,"dist","stan.system.md");return t(n)?n:null})();if(e&&t(e))return e}catch{}try{const e=L(import.meta.url).resolve("@karmaniverous/stan-core"),n=rS({cwd:d.dirname(e)})??null;if(n){const e=d.join(n,"dist","stan.system.md");if(t(e))return e}}catch{}try{const e=L(import.meta.url).resolve("@karmaniverous/stan-core/dist/stan.system.md");if(e&&t(e))return e}catch{}return null},oS=e=>d.join(e,"system","stan.system.md"),iS=async e=>{const t=await a(e);return Buffer.from(t)},aS=(e,n,r)=>{const s=d.join(e,oS(n)),o=sS();if("local"===r){if(!t(s))throw new Error(`system prompt not found at ${d.join(n,"system","stan.system.md").replace(/\\/g,"/")}`);return{abs:s,display:d.join(n,"system","stan.system.md").replace(/\\/g,"/"),kind:"local"}}if("core"===r){if(!o||!t(o))throw new Error("packaged system prompt not found in @karmaniverous/stan-core");return{abs:o,display:`@karmaniverous/stan-core@${Of}`,kind:"core"}}if("auto"===r){if(t(s))return{abs:s,display:d.join(n,"system","stan.system.md").replace(/\\/g,"/"),kind:"local"};if(o&&t(o))return{abs:o,display:`@karmaniverous/stan-core@${Of}`,kind:"core"};try{const e=(()=>{try{const e=D(import.meta.url),n=rS({cwd:d.dirname(e)})??null;if(n){const e=d.join(n,"dist","stan.system.md");if(t(e))return e}}catch{}return null})();if(e&&t(e))return{abs:e,display:e.replace(/\\/g,"/"),kind:"path"}}catch{}throw new Error("unable to resolve system prompt (auto: local and core unavailable)")}const i=d.isAbsolute(r)?r:d.join(e,r);if(!t(i))throw new Error(`system prompt not found at ${i.replace(/\\/g,"/")}`);return{abs:i,display:i.replace(/\\/g,"/"),kind:"path"}},cS=async e=>{const{cwd:n,stanPath:r,promptAbs:s,promptDisplay:o}=e;try{const{restore:e}=await(async(e,n,r)=>{const s=d.join(e,oS(n)),o=d.dirname(s),i=t(s);let a=null;if(i)try{a=await iS(s)}catch{a=null}const l=await iS(r.abs),f=i&&null!==a&&a.length===l.length&&a.equals(l);return f||(await p(o,{recursive:!0}),await c(s,l)),{changed:!f,restore:async()=>{if(!f)try{i&&null!==a?await c(s,a):await u(s,{force:!0})}catch{}}}})(n,r,{abs:s,display:o,kind:"path"});return e}catch(e){throw new Error(e instanceof Error?e.message:String(e))}},uS=async e=>{const{cwd:t,stanPath:n,behavior:r,promptAbs:s,promptDisplay:o,baseFull:i,baseDiff:a,archivePhase:c,stageImports:u,preparePrompt:l,prepareIfNeeded:f,shouldContinue:p,progress:d,ephemeral:h,includeOnChange:m,importsMap:g}=e,y=[],b=Boolean(r.combine);if(h&&"function"==typeof u){if("function"==typeof p&&!p())return y;await u(t,n,(e=>{if(!e)return e;const t={};for(const[n,r]of Object.entries(e))Array.isArray(r)&&(t[n]=r);return Object.keys(t).length?t:null})(g))}const v=async()=>{if("function"==typeof p&&!p())return;const e=!1===m?{...a,excludes:[...a.excludes??[],(r=`${n}/system/stan.system.md`,r.replace(/\\+/g,"/"))]}:a;var r;const s=await c({cwd:t,config:e,includeOutputs:b},{silent:!0,which:"diff",progress:d,shouldContinue:p});s.diffPath&&y.push(s.diffPath)},D=async()=>{if("function"==typeof p&&!p())return;const e=await c({cwd:t,config:i,includeOutputs:b},{silent:!0,which:"full",progress:d,shouldContinue:p});e.archivePath&&y.push(e.archivePath)};if(h){if(!s||"function"!=typeof l)return y;if(m){const e=await l({cwd:t,stanPath:n,promptAbs:s,promptDisplay:o});try{await v(),await D()}finally{await e().catch(()=>{})}return y}await v();const e=await l({cwd:t,stanPath:n,promptAbs:s,promptDisplay:o});try{await D()}finally{await e().catch(()=>{})}return y}const w="function"==typeof f?await f({cwd:t,stanPath:n,promptAbs:s,promptDisplay:o}):null;try{await v(),await D()}finally{await(w?.().catch(()=>{}))}return y};var lS=Object.freeze({__proto__:null,runArchiveStage:async e=>{const{cwd:t,config:n,behavior:r,ui:s,promptAbs:o,promptDisplay:i,promptSource:u}=e,l="function"==typeof e.shouldContinue?e.shouldContinue:()=>!0,f=[];if(!l())return{created:f,cancelled:!0};const p=(()=>{const e=eS,t=e.archivePhase;if("function"==typeof t)return t;const n=e.default;if("function"==typeof n)return n;if(n&&"object"==typeof n){const e=n.archivePhase;if("function"==typeof e)return e;for(const e of Object.values(n))if("function"==typeof e)return e}if("function"==typeof eS)return eS;throw new Error("archivePhase not found")})(),h=(()=>{const e=eS,t=e.stageImports;if("function"==typeof t)return t;const n=e.default;if("function"==typeof n)return n;if(n&&"object"==typeof n){const e=n.stageImports;if("function"==typeof e)return e;for(const e of Object.values(n))if("function"==typeof e)return e}if("function"==typeof eS)return eS;throw new Error("stageImports not found")})(),m=d.join(t,n.stanPath,"system","stan.system.md"),{full:g,diff:y}=(e=>({full:{stanPath:e.stanPath,includes:e.includes??[],excludes:e.excludes??[],imports:e.imports,anchors:e.anchors??[]},diff:{stanPath:e.stanPath,includes:e.includes??[],excludes:e.excludes??[],imports:e.imports,anchors:e.anchors??[]}}))(n),v=((e,t)=>({start:t=>{e.onArchiveStart(t)},done:(n,r,s,o)=>{e.onArchiveEnd(n,r,t,s,o)}}))(s,t),D=async()=>{try{if(!o||!u)return;const e=await Jk(o);await(async(e,t,n)=>{const r=Wk(e,t);let s={};try{const e=await a(r,"utf8"),t=JSON.parse(e);t&&"object"==typeof t&&(s=t)}catch{s={}}const o={...s,prompt:{...s.prompt??{},...n}};await b(d.dirname(r)),await c(r,JSON.stringify(o,null,2),"utf8")})(t,n.stanPath,{source:u,hash:e,path:o})}catch{}},w=((e,t)=>{if(!t)return!1;try{return d.resolve(t)!==d.resolve(e)}catch{return!0}})(m,o);if(w){if(!l())return{created:f,cancelled:!0};let e=!0;try{e=await tS({cwd:t,stanPath:n.stanPath,promptAbs:o})}catch{e=!0}try{const s=await uS({cwd:t,stanPath:n.stanPath,behavior:r,promptAbs:o,promptDisplay:i,baseFull:g,baseDiff:y,archivePhase:p,stageImports:async(e,t,n)=>{try{await h(e,t,n)}catch{}},preparePrompt:({cwd:e,stanPath:t,promptAbs:n,promptDisplay:r})=>cS({cwd:e,stanPath:t,promptAbs:n,promptDisplay:r}),shouldContinue:l,progress:v,ephemeral:!0,includeOnChange:e,importsMap:n.imports});return f.push(...s),await D(),{created:f,cancelled:!1}}catch(e){const t=e instanceof Error?e.message:"string"==typeof e?e:String(e);console.error(`stan: error: failed to prepare system prompt (${t})`),console.log("");try{s.stop()}catch{}return{created:f,cancelled:!0}}}try{if(!l())return{created:f,cancelled:!0};const e=await uS({cwd:t,stanPath:n.stanPath,behavior:r,promptAbs:o,promptDisplay:i,baseFull:g,baseDiff:y,archivePhase:p,prepareIfNeeded:async({cwd:e,stanPath:t,promptAbs:n,promptDisplay:r})=>n?cS({cwd:e,stanPath:t,promptAbs:n,promptDisplay:r}):null,shouldContinue:l,progress:v,ephemeral:!1});return f.push(...e),await D(),{created:f,cancelled:!1}}catch(e){const t=e instanceof Error?e.message:"string"==typeof e?e:String(e);console.error(`stan: error: failed to prepare system prompt (${t})`),console.log("");try{s.stop()}catch{}return{created:f,cancelled:!0}}}});const fS=async e=>{const t=h(e,"archive.tar"),n=h(e,"archive.diff.tar");await Promise.allSettled([u(t,{force:!0}),u(n,{force:!0})])},pS=async e=>new Promise(t=>setTimeout(t,Math.max(0,e))),dS=()=>"win32"===process.platform,hS=async e=>{const{created:n,ui:r,supervisor:s,detachSignals:o,liveEnabled:i,outAbs:a}=e,c=h(a,"archive.tar"),u=h(a,"archive.diff.tar"),l=()=>!t(c)&&!t(u),f=async()=>{await fS(a).catch(()=>{})};if(await f(),!l()){const e=dS()?10:6;for(let t=0;t<e&&(await pS(dS()?200:40),await f(),!l());t+=1);try{await pS(dS()?120:25)}catch{}}try{r.stop()}catch{}if(i)try{console.log("")}catch{}try{await s.waitAll(3e3)}catch{}(()=>{try{process.stdin.pause?.()}catch{}})();try{await pS(dS()?160:40)}catch{}try{o()}catch{}return{created:n,cancelled:!0,restartRequested:!1}};async function mS(e,t){return e.isCancelled()&&!e.isRestart()?await hS(t):e.isRestart()?(e=>{try{e.detachSignals()}catch{}return{created:e.created,cancelled:!0,restartRequested:!0}})({created:t.created,detachSignals:t.detachSignals}):null}async function gS(e){const{cancelCtl:t,deps:n,cwd:r,config:s,behavior:o,ui:i,promptAbs:a,promptDisplay:c,supervisor:l}=e,f=await async function(e,t){try{await $D()}catch{}const n=await mS(e,t);if(n)return n;try{await pS(dS()?300:30)}catch{}return mS(e,t)}(t,{created:n.created,ui:n.ui,supervisor:l,detachSignals:n.detachSignals,liveEnabled:!0,outAbs:n.outAbs});if(f)return{short:f};const p=(()=>{const e=lS,t=e.runArchiveStage,n=e.default?.runArchiveStage,r="function"==typeof t?t:"function"==typeof n?n:void 0;if(!r)throw new Error("runArchiveStage not found");return r})(),d=await p({cwd:r,config:s,behavior:o,ui:i,promptAbs:a,promptDisplay:c,shouldContinue:()=>!t.isCancelled()});if(d.cancelled)return{short:{created:n.created,cancelled:!0,restartRequested:!0}};if(t.isCancelled()&&!t.isRestart()){await Promise.all(d.created.map(e=>u(e,{force:!0}))).catch(()=>{}),await fS(n.outAbs).catch(()=>{});try{n.detachSignals()}catch{}return{short:{created:n.created,cancelled:!0,restartRequested:!1}}}return{added:d.created}}async function yS(e,t){const n=await mS(e,t);if(n)return n;const r=await async function(e,t){try{await $D()}catch{}return mS(e,t)}(e,t);if(r)return r;const s=await async function(e,t){try{await pS(dS()?25:process.env.CI?20:10),await $D()}catch{}return mS(e,t)}(e,t);return s}function bS(e){const{cwd:t,config:n,selection:r,mode:s,behavior:o,ui:i,planBody:a,printPlan:c,promptChoice:u}=e;let l="",f=null,p=null;try{const e=((e,t,n)=>{const r=(n??"auto").trim(),s=aS(e,t,r);return{display:"auto"===r?`auto → ${s.display}`:s.display,abs:s.abs,kind:s.kind}})(t,n.stanPath,u);l=e.display,f=e.abs,p=e.kind;try{if("1"===process.env.STAN_DEBUG){const t=e.kind||"path",n=(f||"").replace(/\\/g,"/");console.error(`stan: debug: prompt: ${t} ${n}`)}}catch{}}catch(e){const t=e instanceof Error?e.message:"string"==typeof e?e:String(e);console.error(`stan: warn: proceeding without resolved system prompt (${t})`),console.log(""),l="auto (unresolved)",f=null,p=null}if(c&&a)try{((e,t)=>{const{selection:n,config:r,mode:s,behavior:o,planBody:i,ui:a,promptDisplay:c}=t;try{const e=bw(0,{selection:n,config:r,mode:s,behavior:{...o,prompt:c}});a.onPlan(e)}catch{"string"==typeof i&&i.length&&a.onPlan(i)}console.log("")})(0,{selection:r,config:n,mode:s,behavior:o,planBody:a,ui:i,promptDisplay:l})}catch{}return{display:l,abs:f,source:p}}function vS(e){const{ui:t,selection:n,config:r,includeArchives:s,cancelCtl:o}=e,i=((e,t,n,r)=>{const s=(t??[]).filter(e=>Object.prototype.hasOwnProperty.call(n.scripts,e));for(const t of s)try{e.onScriptQueued(t)}catch{}if(r){try{e.onArchiveQueued("full")}catch{}try{e.onArchiveQueued("diff")}catch{}}return s})(t,n,r,s);o.markQueued(i);try{const e=t.flushNow;"function"==typeof e&&e()}catch{}return i}const DS="test"===process.env.NODE_ENV||"1"===process.env.STAN_WRITE_ORDER,wS=async e=>{const{cwd:t,config:n,selection:r,mode:s,behavior:o,liveEnabled:i,planBody:a,printPlan:u,ui:l,promptChoice:f}=e,p=function(){const e=Symbol("session-epoch");return Tk=e,e}(),d=h(t,n.stanPath,"output"),m=h(n.stanPath,"output").replace(/\\/g,"/"),g=await(async(e,t,n)=>{if(!e)return;const r=h(t,"order.txt");return n||await c(r,"","utf8"),r})(DS,d,Boolean(o.keep)),{display:y,abs:b}=bS({cwd:t,config:n,selection:r,mode:s,behavior:o,ui:l,planBody:a,printPlan:u,promptChoice:f});!function(e){e.start();try{const t=e.flushNow;"function"==typeof t&&t()}catch{}}(l);const v=new Pk({hangWarn:o.hangWarn,hangKill:o.hangKill,hangKillGrace:o.hangKillGrace}),D=new Ok(l,v);try{l.installCancellation(()=>{D.triggerCancel()},i?()=>{D.triggerRestart()}:void 0)}catch{}const w=Gk(()=>{D.triggerCancel()},async()=>{Dk.session.exitHook();try{l.stop()}catch{}try{v.cancelAll({immediate:!0})}catch{}try{await v.waitAll(3e3)}catch{}try{const e=process.stdin.pause;"function"==typeof e&&e()}catch{}});!function(e){try{const t=e.prepareForNewSession;"function"==typeof t&&t()}catch{}}(l);const _=vS({ui:l,selection:r,config:n,includeArchives:Boolean(o.archive),cancelCtl:D}),E=[];if(_.length>0){const e=await Fk({cwd:t,outAbs:d,outRel:m,config:n,toRun:_,mode:s,orderFile:g,ui:l,epoch:p,isActive:xk,shouldContinue:()=>!D.isCancelled(),supervisor:v,liveEnabled:i,hangWarn:o.hangWarn,hangKill:o.hangKill,hangKillGrace:o.hangKillGrace});E.push(...e)}const k={created:E,ui:l,supervisor:v,detachSignals:w,liveEnabled:i,outAbs:d},S=await yS(D,k);if(S)return S;if(o.archive){const{short:e,added:r}=await gS({cancelCtl:D,deps:k,cwd:t,config:n,behavior:o,ui:l,promptAbs:b,promptDisplay:y,supervisor:v});if(e)return e;r?.length&&E.push(...r)}await(async()=>{try{const e="win32"===process.platform?140:process.env.CI?25:15;await new Promise(t=>setTimeout(t,e)),await $D()}catch{}})(),await(async e=>{try{await $D()}catch{}try{const t=e.flushNow;"function"==typeof t&&t()}catch{}})(l),Dk.session.info("normal path: detach signals, returning to caller");try{w()}catch{}return{created:E,cancelled:!1,restartRequested:!1}};class _S{onCancel;onRestart;attached=!1;keyHandler;dataHandler;constructor(e){this.onCancel=e.onCancel,this.onRestart=e.onRestart}attach(){if(this.attached)return;this.attached=!0;const e=process.stdin,t=Boolean(process.stdout.isTTY),n=Boolean(e.isTTY),r=t&&n;if(r)try{R(e);const t=e.setRawMode;"function"==typeof t&&t(!0);const n=e.resume;"function"==typeof n&&n()}catch{}if(this.keyHandler=(e,t)=>{const n=((t??{}).name??"").toLowerCase();"q"!==n?"r"===n&&this.onRestart?.():this.onCancel()},this.dataHandler=e=>{try{if("string"==typeof e){const t=e.toLowerCase();return void(""===t||"q"===t?this.onCancel():"r"===t&&this.onRestart?.())}if(Buffer.isBuffer(e)){if(e.includes(3))return void this.onCancel();const t=e.toString("utf8").toLowerCase();"q"===t?this.onCancel():"r"===t&&this.onRestart?.()}}catch{}},r){const t=e.on;"function"==typeof t&&t("keypress",this.keyHandler)}const s=e.on;"function"==typeof s&&s("data",this.dataHandler)}detach(){if(!this.attached)return;this.attached=!1;const e=process.stdin,t=e.off,n=e.removeListener,r="function"==typeof t?t.bind(e):"function"==typeof n?n.bind(e):null;try{r&&"function"==typeof this.keyHandler&&r("keypress",this.keyHandler),r&&"function"==typeof this.dataHandler&&r("data",this.dataHandler)}catch{}try{const t=e.setRawMode;"function"==typeof t&&t(!1);const n=e.pause;"function"==typeof n&&n()}catch{}}}class ES{rows=new Map;listeners=new Set;subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}clearAll(){this.rows.clear()}update(e,t,n){const r=this.rows.get(e),s=n??r?.meta;if(!s){const n=ck(e)??(e.startsWith("archive:")?{type:"archive",item:e.slice(8)||"(unnamed)"}:{type:"script",item:e.replace(/^script:/,"")||"(unnamed)"});return this.rows.set(e,{meta:n,state:t}),void this.emit(e,n,t)}this.rows.set(e,{meta:s,state:t}),this.emit(e,s,t)}emit(e,t,n){for(const r of this.listeners)try{r({key:e,meta:t,state:n})}catch{}}counts(){return uk(Array.from(this.rows.values()).map(e=>({state:e.state})))}}class kS{model;constructor(e){this.model=e}unsub;subscribeModel(){this.unsub||(this.unsub=this.model.subscribe(e=>{try{this.onUpdate(e.key,e.meta,e.state)}catch{}}))}unsubscribeModel(){try{this.unsub?.()}catch{}this.unsub=void 0}}class SS extends kS{opts;dbg(...e){try{"1"===process.env.STAN_LIVE_DEBUG&&console.error("[stan:live:sink]",...e)}catch{}}renderer=null;stopped=!1;constructor(e,t){super(e),this.opts=t}start(){this.stopped=!1,this.renderer?this.dbg("start() renderer=existing"):(this.dbg("start() renderer=create"),this.renderer=new Ek({boring:Boolean(this.opts?.boring)}),this.renderer.start(),this.subscribeModel())}stop(){if(this.stopped)this.dbg("stop():already-stopped");else{this.stopped=!0;try{const e=this.renderer;e&&"function"==typeof e.finalize&&(this.dbg("stop() finalize(full)"),e.finalize())}catch{}this.unsubscribeModel()}}flushNow(){try{this.renderer&&this.renderer.flush()}catch{}}resetForRestart(){try{this.dbg("resetForRestart()");const e=this.renderer;e&&"function"==typeof e.resetRows&&e.resetRows()}catch{}}resetElapsed(){try{const e=this.renderer;e&&"function"==typeof e.resetElapsed&&e.resetElapsed()}catch{}}cancelPending(){this.dbg("cancelPending()");try{const e=this.renderer;e&&"function"==typeof e.cancelPending&&e.cancelPending()}catch{}}onUpdate(e,t,n){this.dbg("update",{key:e,type:t.type,item:t.item,kind:n.kind}),this.renderer&&this.renderer.update(`${t.type}:${t.item}`,n,t)}}class AS extends kS{cwd;constructor(e,t){super(e),this.cwd=t}start(){this.subscribeModel()}stop(){this.unsubscribeModel()}onUpdate(e,t,n){const r=t.item,s="archive"===t.type?Xk("diff"===r?"diff":"full"):r,o=ak({state:n,cwd:this.cwd});if("waiting"!==n.kind)if("running"!==n.kind)if("warn"!==n.kind){if("done"===n.kind||"error"===n.kind){const e="done"===n.kind,t=o.label,r=e?"":" (exit 1)",i=o.output||"";return void console.log(`stan: ${t} "${s}" -> ${i}${r}`)}}else console.log(`stan: ${o.label} "${s}" -> ${o.output}`);else console.log(`stan: ${o.label} "${s}"`);else console.log(`stan: ${o.label} "${s}"`)}}const CS=(e,t)=>{e.update(`script:${t}`,{kind:"waiting"},{type:"script",item:t})},PS=(e,t)=>{e.update(`script:${t}`,{kind:"running",startedAt:Date.now()},{type:"script",item:t})},OS=(e,t)=>{const n="diff"===t?"diff":"full";e.update(`archive:${n}`,{kind:"running",startedAt:Date.now()},{type:"archive",item:n})},TS=(e,t)=>{const n=Boolean(t?.useDurations);return{onScriptEnd:(t,r,s,o,i,a,c)=>{const u=ik(s,r);((e,t,n,r,s,o,i)=>{const a="number"==typeof r&&"number"==typeof s?Math.max(0,s-r):0,c="error"===i||"number"==typeof o&&0!==o?{kind:"error",durationMs:a,outputPath:n}:"warn"===i?{kind:"warn",durationMs:a,outputPath:n}:{kind:"done",durationMs:a,outputPath:n};e.update(`script:${t}`,c,{type:"script",item:t})})(e,t,u,n?o:void 0,n?i:void 0,n?a:void 0,c)},onArchiveEnd:(t,r,s,o,i)=>{const a=ik(s,r);((e,t,n,r,s)=>{const o="diff"===t?"diff":"full",i="number"==typeof r&&"number"==typeof s?Math.max(0,s-r):0;e.update(`archive:${o}`,{kind:"done",durationMs:i,outputPath:n},{type:"archive",item:o})})(e,t,a,n?o:void 0,n?i:void 0)}}};var xS=Object.freeze({__proto__:null,LiveUI:class{opts;renderer=null;control=null;model=new ES;sink;forwards=TS(this.model,{useDurations:!0});stopped=!1;constructor(e){this.opts=e,this.sink=new SS(this.model,{boring:Boolean(e?.boring)})}start(){Dk.ui.start(),this.stopped=!1,this.renderer||(this.sink.start(),this.renderer=this.sink.renderer??null)}onPlan(e){console.log(e)}onScriptQueued(e){CS(this.model,e)}onScriptStart(e){PS(this.model,e)}onScriptEnd(e,t,n,r,s,o,i){this.forwards.onScriptEnd(e,t,n,r,s,o,i)}onArchiveQueued(e){((e,t)=>{const n="diff"===t?"diff":"full";e.update(`archive:${n}`,{kind:"waiting"},{type:"archive",item:n})})(this.model,e)}onArchiveStart(e){OS(this.model,e)}onArchiveEnd(e,t,n,r,s){this.forwards.onArchiveEnd(e,t,n,r,s)}onCancelled(e="cancel"){Dk.ui.onCancelled(e);try{this.sink.cancelPending()}catch{}try{this.sink.resetElapsed()}catch{}try{if("restart"===e){Dk.session.info("restart: paint CANCELLED immediately; detach keys; table remains for overwrite");try{this.sink.flushNow()}catch{}try{const e=this.control;e&&e.detach()}catch{}finally{this.control=null}}else Dk.ui.stop(),this.sink.stop()}catch{}try{const e=this.control;e&&e.detach()}catch{}finally{this.control=null}}prepareForNewSession(){try{this.model.clearAll()}catch{}try{this.sink.resetElapsed()}catch{}try{this.sink.resetForRestart()}catch{}}flushNow(){try{this.sink.flushNow()}catch{}}installCancellation(e,t){try{this.control=new _S({onCancel:e,onRestart:t}),Dk.ui.installCancellation(),this.control.attach()}catch{this.control=null}}stop(){if(!this.stopped){this.stopped=!0,Dk.ui.stop();try{this.sink.stop()}catch{}try{const e=this.control;e&&e.detach()}catch{}this.control=null}}},LoggerUI:class{model=new ES;sink;forwards=null;constructor(){const e=process.cwd();let t=null;const n=AS;if("function"==typeof n)try{t=new n(this.model,e)}catch{try{t=n(this.model,e)}catch{t=null}}if(!t)throw new Error("LoggerSink not available");this.sink=t,this.forwards=TS(this.model,{useDurations:!1})}start(){this.sink.start()}onPlan(e){console.log(e)}onScriptQueued(e){CS(this.model,e)}onScriptStart(e){PS(this.model,e)}onScriptEnd(e,t,n,r,s,o,i){this.forwards?.onScriptEnd(e,t,n,void 0,void 0,void 0,i)}onArchiveQueued(){}onArchiveStart(e){OS(this.model,e)}onArchiveEnd(e,t,n){this.forwards?.onArchiveEnd(e,t,n,void 0,void 0)}onCancelled(){}installCancellation(){}stop(){this.sink.stop()}}});const NS=async(e,r,s=null,a="concurrent",c,l)=>{const f=c??{};await(async(e,r,s=!1)=>{const a=ac(e,r);if(await ye(e,r),!s){const e=h(a.outputAbs,F);if(t(e))try{await o(e,h(a.diffAbs,I))}catch{}const r=await i(a.outputAbs,{withFileTypes:!0});for(const e of r)n(h(a.outputAbs,e.name),{recursive:!0,force:!0})}return a.rootAbs})(e,r.stanPath,Boolean(f.keep));const p=bw(0,{selection:s,config:r,mode:a,behavior:f}),m=process.stdout,g=Boolean(m.isTTY),y=(f.live??!0)&&g,b=null==s?Object.keys(r.scripts):s,{LiveUICtor:v,LoggerUICtor:D}=(()=>{const e=xS;return{LiveUICtor:"function"==typeof e.LiveUI?e.LiveUI:"function"==typeof e.default?.LiveUI?e.default.LiveUI:void 0,LoggerUICtor:"function"==typeof e.LoggerUI?e.LoggerUI:"function"==typeof e.default?.LoggerUI?e.default.LoggerUI:void 0}})(),w=y&&"function"==typeof v?new v({boring:"1"===process.env.STAN_BORING}):"function"==typeof D?new D:{start(){},onPlan(){},onScriptQueued(){},onScriptStart(){},onScriptEnd(){},onArchiveQueued(){},onArchiveStart(){},onArchiveEnd(){},onCancelled(){},installCancellation(){},stop(){}};let _=!1;for(;;){const{created:n,cancelled:s,restartRequested:o}=await wS({cwd:e,config:r,selection:b,mode:a,behavior:f,liveEnabled:y,planBody:p,printPlan:!_&&!1!==f.plan,ui:w,promptChoice:l});if(_=!0,!o){if(s){const s=d.join(e,r.stanPath,"output"),o=d.join(s,"archive.tar"),i=d.join(s,"archive.diff.tar"),a=async e=>new Promise(t=>setTimeout(t,e)),c=()=>!t(o)&&!t(i),l=async()=>{await Promise.allSettled([u(o,{force:!0}),u(i,{force:!0})])},f=8;for(let e=0;e<f;e+=1){try{await l()}catch{}if(c())break;const e="win32"===process.platform;await a(e?200:40)}try{await new Promise(e=>setTimeout(e,"win32"===process.platform?100:25))}catch{}try{const e="win32"===process.platform?30:process.env.CI?20:15;await new Promise(t=>setTimeout(t,e))}catch{}return n}try{try{await $D()}catch{}const e=w.flushNow;if("function"==typeof e)try{e()}catch{}w.stop()}catch{}try{const e="win32"===process.platform?30:process.env.CI?20:15;await new Promise(t=>setTimeout(t,e))}catch{}return n}}};export{ND as renderAvailableScriptsHelp,NS as runSelected};
|
|
1
|
+
import e,{existsSync as t,rmSync as n,readFileSync as r,createWriteStream as s}from"node:fs";import{copyFile as o,readdir as i,readFile as a,writeFile as c,rm as u,stat as l,appendFile as f,mkdir as p}from"node:fs/promises";import d,{resolve as h,dirname as m,join as g,delimiter as y}from"node:path";import{ensureDir as b}from"fs-extra";import v from"node:process";import{fileURLToPath as D}from"node:url";import w from"process";import _ from"buffer";import{createHash as S}from"node:crypto";import{spawn as E}from"node:child_process";import k from"os";import A from"path";import C from"util";import O from"stream";import P from"events";import T from"fs";import x from"node:os";import N from"node:tty";import $ from"child_process";import{createRequire as L}from"node:module";import{emitKeypressEvents as R}from"node:readline";const F="archive.tar",I="archive.prev.tar",j=e=>e.replace(/\\/g,"/"),M=(e,t)=>{const n=j(e).replace(/\/+$/,""),r=j(t);return r===n||r.startsWith(`${n}/`)},B=(e,t)=>{const n=j(e);return M(`${n}/diff`,t)||M(`${n}/patch`,t)},z=M,H=e=>{const t=e.replace(/\\/g,"/");return e=>!(B(t,e)||((e,t)=>{const n=j(e);return j(t)===`${n}/output/${F}`||j(t)===`${n}/output/archive.diff.tar`||j(t)===`${n}/output/archive.warnings.txt`})(t,e))},K=(e,t)=>{const n=`${t.replace(/\\/g,"/")}/output`;return Array.from(new Set([...e,n]))},U=(e,t)=>{const n=(e??"").trim();n&&"No archive warnings."!==n&&t?.(n)};var q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function J(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Z,G,W,V,Y,Q,X,ee,te,ne,re,se,oe={exports:{}},ie=(Z||(Z=1,function(e){function t(e){return Array.isArray(e)?e:[e]}const n=/^\s+$/,r=/(?:[^\\]|^)\\$/,s=/^\\!/,o=/^\\#/,i=/\r?\n/g,a=/^\.{0,2}\/|^\.{1,2}$/,c=/\/$/,u="/";let l="node-ignore";"undefined"!=typeof Symbol&&(l=Symbol.for("node-ignore"));const f=l,p=(e,t,n)=>(Object.defineProperty(e,t,{value:n}),n),d=/([0-z])-([0-z])/g,h=()=>!1,m=[[/^\uFEFF/,()=>""],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,n)=>t+(0===n.indexOf("\\")?" ":"")],[/(\\+?)\s/g,(e,t)=>{const{length:n}=t;return t.slice(0,n-n%2)+" "}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6<n.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,n)=>t+n.replace(/\\\*/g,"[^\\/]*")],[/\\\\\\(?=[$.|*+(){^])/g,()=>"\\"],[/\\\\/g,()=>"\\"],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,r,s)=>"\\"===t?`\\[${n}${(e=>{const{length:t}=e;return e.slice(0,t-t%2)})(r)}${s}`:"]"===s&&r.length%2==0?`[${(e=>e.replace(d,(e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:""))(n)}${r}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`]],g=/(^|\\\/)?\\\*$/,y="regex",b="checkRegex",v={[y]:(e,t)=>(t?`${t}[^/]+`:"[^/]*")+"(?=$|\\/$)",[b]:(e,t)=>(t?`${t}[^/]*`:"[^/]*")+"(?=$|\\/$)"},D=e=>"string"==typeof e;class w{constructor(e,t,n,r,s,o){this.pattern=e,this.mark=t,this.negative=s,p(this,"body",n),p(this,"ignoreCase",r),p(this,"regexPrefix",o)}get regex(){const e="_"+y;return this[e]?this[e]:this._make(y,e)}get checkRegex(){const e="_"+b;return this[e]?this[e]:this._make(b,e)}_make(e,t){const n=this.regexPrefix.replace(g,v[e]),r=this.ignoreCase?new RegExp(n,"i"):new RegExp(n);return p(this,t,r)}}class _{constructor(e){this._ignoreCase=e,this._rules=[]}_add(e){if(e&&e[f])return this._rules=this._rules.concat(e._rules._rules),void(this._added=!0);if(D(e)&&(e={pattern:e}),(e=>e&&D(e)&&!n.test(e)&&!r.test(e)&&0!==e.indexOf("#"))(e.pattern)){const t=(({pattern:e,mark:t},n)=>{let r=!1,i=e;0===i.indexOf("!")&&(r=!0,i=i.substr(1)),i=i.replace(s,"!").replace(o,"#");const a=(e=>m.reduce((t,[n,r])=>t.replace(n,r.bind(e)),e))(i);return new w(e,t,i,n,r,a)})(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,t(D(e)?(e=>e.split(i).filter(Boolean))(e):e).forEach(this._add,this),this._added}test(e,t,n){let r,s=!1,o=!1;this._rules.forEach(i=>{const{negative:a}=i;o===a&&s!==o||a&&!s&&!o&&!t||i[n].test(e)&&(s=!a,o=a,r=a?void 0:i)});const i={ignored:s,unignored:o};return r&&(i.rule=r),i}}const S=(e,t)=>{throw new t(e)},E=(e,t,n)=>D(e)?e?!E.isNotRelative(e)||n(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):n("path must not be empty",TypeError):n(`path must be a string, but got \`${t}\``,TypeError),k=e=>a.test(e);E.isNotRelative=k,E.convert=e=>e;class A{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){p(this,f,!0),this._rules=new _(t),this._strictPathCheck=!n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add(e){return this._rules.add(e)&&this._initCache(),this}addPattern(e){return this.add(e)}_test(e,t,n,r){const s=e&&E.convert(e);return E(s,e,this._strictPathCheck?S:h),this._t(s,t,n,r)}checkIgnore(e){if(!c.test(e))return this.test(e);const t=e.split(u).filter(Boolean);if(t.pop(),t.length){const e=this._t(t.join(u)+u,this._testCache,!0,t);if(e.ignored)return e}return this._rules.test(e,!1,b)}_t(e,t,n,r){if(e in t)return t[e];if(r||(r=e.split(u).filter(Boolean)),r.pop(),!r.length)return t[e]=this._rules.test(e,n,y);const s=this._t(r.join(u)+u,t,n,r);return t[e]=s.ignored?s:this._rules.test(e,n,y)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return t(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}}const C=e=>new A(e),O=()=>{E.convert=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,"/");const e=/^[a-z]:\//i;E.isNotRelative=t=>e.test(t)||k(t)};"undefined"!=typeof process&&"win32"===process.platform&&O(),e.exports=C,C.default=C,e.exports.isPathValid=e=>E(e&&E.convert(e),e,h),p(e.exports,Symbol.for("setupWindows"),O)}(oe)),oe.exports),ae=J(ie),ce={};function ue(){if(W)return G;W=1;const e="\\\\/",t=`[^${e}]`,n="\\.",r="\\/",s="[^/]",o=`(?:${r}|$)`,i=`(?:^|${r})`,a=`${n}{1,2}${o}`,c={DOT_LITERAL:n,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:r,ONE_CHAR:"(?=.)",QMARK:s,END_ANCHOR:o,DOTS_SLASH:a,NO_DOT:`(?!${n})`,NO_DOTS:`(?!${i}${a})`,NO_DOT_SLASH:`(?!${n}{0,1}${o})`,NO_DOTS_SLASH:`(?!${a})`,QMARK_NO_DOT:`[^.${r}]`,STAR:`${s}*?`,START_ANCHOR:i,SEP:"/"},u={...c,SLASH_LITERAL:`[${e}]`,QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${n}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${e}])${n}{1,2}(?:[${e}]|$))`,NO_DOT_SLASH:`(?!${n}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`,SEP:"\\"};return G={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?u:c}}function le(){return V||(V=1,function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:s}=ue();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(s,"\\$1"),e.toPosixSlashes=e=>e.replace(t,"/"),e.isWindows=()=>{if("undefined"!=typeof navigator&&navigator.platform){const e=navigator.platform.toLowerCase();return"win32"===e||"windows"===e}return!("undefined"==typeof process||!process.platform)&&"win32"===process.platform},e.removeBackslashes=e=>e.replace(n,e=>"\\"===e?"":e),e.escapeLast=(t,n,r)=>{const s=t.lastIndexOf(n,r);return-1===s?t:"\\"===t[s-1]?e.escapeLast(t,n,s-1):`${t.slice(0,s)}\\${t.slice(s)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(r=`(?:^(?!${r}).*$)`),r},e.basename=(e,{windows:t}={})=>{const n=e.split(t?/[\\/]/:"/"),r=n[n.length-1];return""===r?n[n.length-2]:r}}(ce)),ce}function fe(){if(ne)return te;ne=1;const e=function(){if(Q)return Y;Q=1;const e=le(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:s,CHAR_DOT:o,CHAR_EXCLAMATION_MARK:i,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:u,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:f,CHAR_QUESTION_MARK:p,CHAR_RIGHT_CURLY_BRACE:d,CHAR_RIGHT_PARENTHESES:h,CHAR_RIGHT_SQUARE_BRACKET:m}=ue(),g=e=>e===a||e===r,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return Y=(b,v)=>{const D=v||{},w=b.length-1,_=!0===D.parts||!0===D.scanToEnd,S=[],E=[],k=[];let A,C,O=b,P=-1,T=0,x=0,N=!1,$=!1,L=!1,R=!1,F=!1,I=!1,j=!1,M=!1,B=!1,z=!1,H=0,K={value:"",depth:0,isGlob:!1};const U=()=>P>=w,q=()=>O.charCodeAt(P+1),J=()=>(A=C,O.charCodeAt(++P));for(;P<w;){let e;if(C=J(),C!==r){if(!0===I||C===c){for(H++;!0!==U()&&(C=J());)if(C!==r)if(C!==c){if(!0!==I&&C===o&&(C=J())===o){if(N=K.isBrace=!0,L=K.isGlob=!0,z=!0,!0===_)continue;break}if(!0!==I&&C===s){if(N=K.isBrace=!0,L=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===d&&(H--,0===H)){I=!1,N=K.isBrace=!0,z=!0;break}}else H++;else j=K.backslashes=!0,J();if(!0===_)continue;break}if(C!==a){if(!0!==D.noext&&1==(C===f||C===n||C===t||C===p||C===i)&&q()===u){if(L=K.isGlob=!0,R=K.isExtglob=!0,z=!0,C===i&&P===T&&(B=!0),!0===_){for(;!0!==U()&&(C=J());)if(C!==r){if(C===h){L=K.isGlob=!0,z=!0;break}}else j=K.backslashes=!0,C=J();continue}break}if(C===t){if(A===t&&(F=K.isGlobstar=!0),L=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===p){if(L=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===l){for(;!0!==U()&&(e=J());)if(e!==r){if(e===m){$=K.isBracket=!0,L=K.isGlob=!0,z=!0;break}}else j=K.backslashes=!0,J();if(!0===_)continue;break}if(!0===D.nonegate||C!==i||P!==T){if(!0!==D.noparen&&C===u){if(L=K.isGlob=!0,!0===_){for(;!0!==U()&&(C=J());)if(C!==u){if(C===h){z=!0;break}}else j=K.backslashes=!0,C=J();continue}break}if(!0===L){if(z=!0,!0===_)continue;break}}else M=K.negated=!0,T++}else{if(S.push(P),E.push(K),K={value:"",depth:0,isGlob:!1},!0===z)continue;if(A===o&&P===T+1){T+=2;continue}x=P+1}}else j=K.backslashes=!0,C=J(),C===c&&(I=!0)}!0===D.noext&&(R=!1,L=!1);let Z=O,G="",W="";T>0&&(G=O.slice(0,T),O=O.slice(T),x-=T),Z&&!0===L&&x>0?(Z=O.slice(0,x),W=O.slice(x)):!0===L?(Z="",W=O):Z=O,Z&&""!==Z&&"/"!==Z&&Z!==O&&g(Z.charCodeAt(Z.length-1))&&(Z=Z.slice(0,-1)),!0===D.unescape&&(W&&(W=e.removeBackslashes(W)),Z&&!0===j&&(Z=e.removeBackslashes(Z)));const V={prefix:G,input:b,start:T,base:Z,glob:W,isBrace:N,isBracket:$,isGlob:L,isExtglob:R,isGlobstar:F,negated:M,negatedExtglob:B};if(!0===D.tokens&&(V.maxDepth=0,g(C)||E.push(K),V.tokens=E),!0===D.parts||!0===D.tokens){let e;for(let t=0;t<S.length;t++){const n=e?e+1:T,r=S[t],s=b.slice(n,r);D.tokens&&(0===t&&0!==T?(E[t].isPrefix=!0,E[t].value=G):E[t].value=s,y(E[t]),V.maxDepth+=E[t].depth),0===t&&""===s||k.push(s),e=r}if(e&&e+1<b.length){const t=b.slice(e+1);k.push(t),D.tokens&&(E[E.length-1].value=t,y(E[E.length-1]),V.maxDepth+=E[E.length-1].depth)}V.slashes=S,V.parts=k}return V},Y}(),t=function(){if(ee)return X;ee=1;const e=ue(),t=le(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_BACKREF:o,REPLACEMENTS:i}=e,a=(e,n)=>{if("function"==typeof n.expandRange)return n.expandRange(...e,n);e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(n){return e.map(e=>t.escapeRegex(e)).join("..")}return r},c=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,u=(l,f)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=i[l]||l;const p={...f},d="number"==typeof p.maxLength?Math.min(n,p.maxLength):n;let h=l.length;if(h>d)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${d}`);const m={type:"bos",value:"",output:p.prepend||""},g=[m],y=p.capture?"":"?:",b=e.globChars(p.windows),v=e.extglobChars(b),{DOT_LITERAL:D,PLUS_LITERAL:w,SLASH_LITERAL:_,ONE_CHAR:S,DOTS_SLASH:E,NO_DOT:k,NO_DOT_SLASH:A,NO_DOTS_SLASH:C,QMARK:O,QMARK_NO_DOT:P,STAR:T,START_ANCHOR:x}=b,N=e=>`(${y}(?:(?!${x}${e.dot?E:D}).)*?)`,$=p.dot?"":k,L=p.dot?O:P;let R=!0===p.bash?N(p):T;p.capture&&(R=`(${R})`),"boolean"==typeof p.noext&&(p.noextglob=p.noext);const F={input:l,index:-1,start:0,dot:!0===p.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};l=t.removePrefix(l,F),h=l.length;const I=[],j=[],M=[];let B,z=m;const H=()=>F.index===h-1,K=F.peek=(e=1)=>l[F.index+e],U=F.advance=()=>l[++F.index]||"",q=()=>l.slice(F.index+1),J=(e="",t=0)=>{F.consumed+=e,F.index+=t},Z=e=>{F.output+=null!=e.output?e.output:e.value,J(e.value)},G=()=>{let e=1;for(;"!"===K()&&("("!==K(2)||"?"===K(3));)U(),F.start++,e++;return e%2!=0&&(F.negated=!0,F.start++,!0)},W=e=>{F[e]++,M.push(e)},V=e=>{F[e]--,M.pop()},Y=e=>{if("globstar"===z.type){const t=F.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||I.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(F.output=F.output.slice(0,-z.output.length),z.type="star",z.value="*",z.output=R,F.output+=z.output)}if(I.length&&"paren"!==e.type&&(I[I.length-1].inner+=e.value),(e.value||e.output)&&Z(e),z&&"text"===z.type&&"text"===e.type)return z.output=(z.output||z.value)+e.value,void(z.value+=e.value);e.prev=z,g.push(e),z=e},Q=(e,t)=>{const n={...v[t],conditions:1,inner:""};n.prev=z,n.parens=F.parens,n.output=F.output;const r=(p.capture?"(":"")+n.open;W("parens"),Y({type:e,value:t,output:F.output?"":S}),Y({type:"paren",extglob:!0,value:U(),output:r}),I.push(n)},X=e=>{let t,n=e.close+(p.capture?")":"");if("negate"===e.type){let r=R;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(r=N(p)),(r!==R||H()||/^\)+$/.test(q()))&&(n=e.close=`)$))${r}`),e.inner.includes("*")&&(t=q())&&/^\.[^\\/.]+$/.test(t)){const s=u(t,{...f,fastpaths:!1}).output;n=e.close=`)${s})${r})`}"bos"===e.prev.type&&(F.negatedExtglob=!0)}Y({type:"paren",extglob:!0,value:B,output:n}),V("parens")};if(!1!==p.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let e=!1,n=l.replace(o,(t,n,r,s,o,i)=>"\\"===s?(e=!0,t):"?"===s?n?n+s+(o?O.repeat(o.length):""):0===i?L+(o?O.repeat(o.length):""):O.repeat(r.length):"."===s?D.repeat(r.length):"*"===s?n?n+s+(o?R:""):R:n?t:`\\${t}`);return!0===e&&(n=!0===p.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===l&&!0===p.contains?(F.output=l,F):(F.output=t.wrapOutput(n,F,f),F)}for(;!H();){if(B=U(),"\0"===B)continue;if("\\"===B){const e=K();if("/"===e&&!0!==p.bash)continue;if("."===e||";"===e)continue;if(!e){B+="\\",Y({type:"text",value:B});continue}const t=/^\\+/.exec(q());let n=0;if(t&&t[0].length>2&&(n=t[0].length,F.index+=n,n%2!=0&&(B+="\\")),!0===p.unescape?B=U():B+=U(),0===F.brackets){Y({type:"text",value:B});continue}}if(F.brackets>0&&("]"!==B||"["===z.value||"[^"===z.value)){if(!1!==p.posix&&":"===B){const e=z.value.slice(1);if(e.includes("[")&&(z.posix=!0,e.includes(":"))){const e=z.value.lastIndexOf("["),t=z.value.slice(0,e),n=z.value.slice(e+2),s=r[n];if(s){z.value=t+s,F.backtrack=!0,U(),m.output||1!==g.indexOf(z)||(m.output=S);continue}}}("["===B&&":"!==K()||"-"===B&&"]"===K())&&(B=`\\${B}`),"]"!==B||"["!==z.value&&"[^"!==z.value||(B=`\\${B}`),!0===p.posix&&"!"===B&&"["===z.value&&(B="^"),z.value+=B,Z({value:B});continue}if(1===F.quotes&&'"'!==B){B=t.escapeRegex(B),z.value+=B,Z({value:B});continue}if('"'===B){F.quotes=1===F.quotes?0:1,!0===p.keepQuotes&&Y({type:"text",value:B});continue}if("("===B){W("parens"),Y({type:"paren",value:B});continue}if(")"===B){if(0===F.parens&&!0===p.strictBrackets)throw new SyntaxError(c("opening","("));const e=I[I.length-1];if(e&&F.parens===e.parens+1){X(I.pop());continue}Y({type:"paren",value:B,output:F.parens?")":"\\)"}),V("parens");continue}if("["===B){if(!0!==p.nobracket&&q().includes("]"))W("brackets");else{if(!0!==p.nobracket&&!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));B=`\\${B}`}Y({type:"bracket",value:B});continue}if("]"===B){if(!0===p.nobracket||z&&"bracket"===z.type&&1===z.value.length){Y({type:"text",value:B,output:`\\${B}`});continue}if(0===F.brackets){if(!0===p.strictBrackets)throw new SyntaxError(c("opening","["));Y({type:"text",value:B,output:`\\${B}`});continue}V("brackets");const e=z.value.slice(1);if(!0===z.posix||"^"!==e[0]||e.includes("/")||(B=`/${B}`),z.value+=B,Z({value:B}),!1===p.literalBrackets||t.hasRegexChars(e))continue;const n=t.escapeRegex(z.value);if(F.output=F.output.slice(0,-z.value.length),!0===p.literalBrackets){F.output+=n,z.value=n;continue}z.value=`(${y}${n}|${z.value})`,F.output+=z.value;continue}if("{"===B&&!0!==p.nobrace){W("braces");const e={type:"brace",value:B,output:"(",outputIndex:F.output.length,tokensIndex:F.tokens.length};j.push(e),Y(e);continue}if("}"===B){const e=j[j.length-1];if(!0===p.nobrace||!e){Y({type:"text",value:B,output:B});continue}let t=")";if(!0===e.dots){const e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=a(n,p),F.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=F.output.slice(0,e.outputIndex),r=F.tokens.slice(e.tokensIndex);e.value=e.output="\\{",B=t="\\}",F.output=n;for(const e of r)F.output+=e.output||e.value}Y({type:"brace",value:B,output:t}),V("braces"),j.pop();continue}if("|"===B){I.length>0&&I[I.length-1].conditions++,Y({type:"text",value:B});continue}if(","===B){let e=B;const t=j[j.length-1];t&&"braces"===M[M.length-1]&&(t.comma=!0,e="|"),Y({type:"comma",value:B,output:e});continue}if("/"===B){if("dot"===z.type&&F.index===F.start+1){F.start=F.index+1,F.consumed="",F.output="",g.pop(),z=m;continue}Y({type:"slash",value:B,output:_});continue}if("."===B){if(F.braces>0&&"dot"===z.type){"."===z.value&&(z.output=D);const e=j[j.length-1];z.type="dots",z.output+=B,z.value+=B,e.dots=!0;continue}if(F.braces+F.parens===0&&"bos"!==z.type&&"slash"!==z.type){Y({type:"text",value:B,output:D});continue}Y({type:"dot",value:B,output:D});continue}if("?"===B){if((!z||"("!==z.value)&&!0!==p.noextglob&&"("===K()&&"?"!==K(2)){Q("qmark",B);continue}if(z&&"paren"===z.type){const e=K();let t=B;("("===z.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(q()))&&(t=`\\${B}`),Y({type:"text",value:B,output:t});continue}if(!0!==p.dot&&("slash"===z.type||"bos"===z.type)){Y({type:"qmark",value:B,output:P});continue}Y({type:"qmark",value:B,output:O});continue}if("!"===B){if(!0!==p.noextglob&&"("===K()&&("?"!==K(2)||!/[!=<:]/.test(K(3)))){Q("negate",B);continue}if(!0!==p.nonegate&&0===F.index){G();continue}}if("+"===B){if(!0!==p.noextglob&&"("===K()&&"?"!==K(2)){Q("plus",B);continue}if(z&&"("===z.value||!1===p.regex){Y({type:"plus",value:B,output:w});continue}if(z&&("bracket"===z.type||"paren"===z.type||"brace"===z.type)||F.parens>0){Y({type:"plus",value:B});continue}Y({type:"plus",value:w});continue}if("@"===B){if(!0!==p.noextglob&&"("===K()&&"?"!==K(2)){Y({type:"at",extglob:!0,value:B,output:""});continue}Y({type:"text",value:B});continue}if("*"!==B){"$"!==B&&"^"!==B||(B=`\\${B}`);const e=s.exec(q());e&&(B+=e[0],F.index+=e[0].length),Y({type:"text",value:B});continue}if(z&&("globstar"===z.type||!0===z.star)){z.type="star",z.star=!0,z.value+=B,z.output=R,F.backtrack=!0,F.globstar=!0,J(B);continue}let e=q();if(!0!==p.noextglob&&/^\([^?]/.test(e)){Q("star",B);continue}if("star"===z.type){if(!0===p.noglobstar){J(B);continue}const t=z.prev,n=t.prev,r="slash"===t.type||"bos"===t.type,s=n&&("star"===n.type||"globstar"===n.type);if(!0===p.bash&&(!r||e[0]&&"/"!==e[0])){Y({type:"star",value:B,output:""});continue}const o=F.braces>0&&("comma"===t.type||"brace"===t.type),i=I.length&&("pipe"===t.type||"paren"===t.type);if(!r&&"paren"!==t.type&&!o&&!i){Y({type:"star",value:B,output:""});continue}for(;"/**"===e.slice(0,3);){const t=l[F.index+4];if(t&&"/"!==t)break;e=e.slice(3),J("/**",3)}if("bos"===t.type&&H()){z.type="globstar",z.value+=B,z.output=N(p),F.output=z.output,F.globstar=!0,J(B);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!s&&H()){F.output=F.output.slice(0,-(t.output+z.output).length),t.output=`(?:${t.output}`,z.type="globstar",z.output=N(p)+(p.strictSlashes?")":"|$)"),z.value+=B,F.globstar=!0,F.output+=t.output+z.output,J(B);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const n=void 0!==e[1]?"|$":"";F.output=F.output.slice(0,-(t.output+z.output).length),t.output=`(?:${t.output}`,z.type="globstar",z.output=`${N(p)}${_}|${_}${n})`,z.value+=B,F.output+=t.output+z.output,F.globstar=!0,J(B+U()),Y({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){z.type="globstar",z.value+=B,z.output=`(?:^|${_}|${N(p)}${_})`,F.output=z.output,F.globstar=!0,J(B+U()),Y({type:"slash",value:"/",output:""});continue}F.output=F.output.slice(0,-z.output.length),z.type="globstar",z.output=N(p),z.value+=B,F.output+=z.output,F.globstar=!0,J(B);continue}const n={type:"star",value:B,output:R};!0!==p.bash?!z||"bracket"!==z.type&&"paren"!==z.type||!0!==p.regex?(F.index!==F.start&&"slash"!==z.type&&"dot"!==z.type||("dot"===z.type?(F.output+=A,z.output+=A):!0===p.dot?(F.output+=C,z.output+=C):(F.output+=$,z.output+=$),"*"!==K()&&(F.output+=S,z.output+=S)),Y(n)):(n.output=B,Y(n)):(n.output=".*?","bos"!==z.type&&"slash"!==z.type||(n.output=$+n.output),Y(n))}for(;F.brackets>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));F.output=t.escapeLast(F.output,"["),V("brackets")}for(;F.parens>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing",")"));F.output=t.escapeLast(F.output,"("),V("parens")}for(;F.braces>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","}"));F.output=t.escapeLast(F.output,"{"),V("braces")}if(!0===p.strictSlashes||"star"!==z.type&&"bracket"!==z.type||Y({type:"maybe_slash",value:"",output:`${_}?`}),!0===F.backtrack){F.output="";for(const e of F.tokens)F.output+=null!=e.output?e.output:e.value,e.suffix&&(F.output+=e.suffix)}return F};return u.fastpaths=(r,s)=>{const o={...s},a="number"==typeof o.maxLength?Math.min(n,o.maxLength):n,c=r.length;if(c>a)throw new SyntaxError(`Input length: ${c}, exceeds maximum allowed length: ${a}`);r=i[r]||r;const{DOT_LITERAL:u,SLASH_LITERAL:l,ONE_CHAR:f,DOTS_SLASH:p,NO_DOT:d,NO_DOTS:h,NO_DOTS_SLASH:m,STAR:g,START_ANCHOR:y}=e.globChars(o.windows),b=o.dot?h:d,v=o.dot?m:d,D=o.capture?"":"?:";let w=!0===o.bash?".*?":g;o.capture&&(w=`(${w})`);const _=e=>!0===e.noglobstar?w:`(${D}(?:(?!${y}${e.dot?p:u}).)*?)`,S=e=>{switch(e){case"*":return`${b}${f}${w}`;case".*":return`${u}${f}${w}`;case"*.*":return`${b}${w}${u}${f}${w}`;case"*/*":return`${b}${w}${l}${f}${v}${w}`;case"**":return b+_(o);case"**/*":return`(?:${b}${_(o)}${l})?${v}${f}${w}`;case"**/*.*":return`(?:${b}${_(o)}${l})?${v}${w}${u}${f}${w}`;case"**/.*":return`(?:${b}${_(o)}${l})?${u}${f}${w}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=S(t[1]);if(!n)return;return n+u+t[2]}}},E=t.removePrefix(r,{negated:!1,prefix:""});let k=S(E);return k&&!0!==o.strictSlashes&&(k+=`${l}?`),k},X=u}(),n=le(),r=ue(),s=(e,t,n=!1)=>{if(Array.isArray(e)){const r=e.map(e=>s(e,t,n)),o=e=>{for(const t of r){const n=t(e);if(n)return n}return!1};return o}const r=(o=e)&&"object"==typeof o&&!Array.isArray(o)&&e.tokens&&e.input;var o;if(""===e||"string"!=typeof e&&!r)throw new TypeError("Expected pattern to be a non-empty string");const i=t||{},a=i.windows,c=r?s.compileRe(e,t):s.makeRe(e,t,!1,!0),u=c.state;delete c.state;let l=()=>!1;if(i.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};l=s(i.ignore,e,n)}const f=(n,r=!1)=>{const{isMatch:o,match:f,output:p}=s.test(n,c,t,{glob:e,posix:a}),d={glob:e,state:u,regex:c,posix:a,input:n,output:p,match:f,isMatch:o};return"function"==typeof i.onResult&&i.onResult(d),!1===o?(d.isMatch=!1,!!r&&d):l(n)?("function"==typeof i.onIgnore&&i.onIgnore(d),d.isMatch=!1,!!r&&d):("function"==typeof i.onMatch&&i.onMatch(d),!r||d)};return n&&(f.state=u),f};return s.test=(e,t,r,{glob:o,posix:i}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=r||{},c=a.format||(i?n.toPosixSlashes:null);let u=e===o,l=u&&c?c(e):e;return!1===u&&(l=c?c(e):e,u=l===o),!1!==u&&!0!==a.capture||(u=!0===a.matchBase||!0===a.basename?s.matchBase(e,t,r,i):t.exec(l)),{isMatch:Boolean(u),match:u,output:l}},s.matchBase=(e,t,r)=>(t instanceof RegExp?t:s.makeRe(t,r)).test(n.basename(e)),s.isMatch=(e,t,n)=>s(t,n)(e),s.parse=(e,n)=>Array.isArray(e)?e.map(e=>s.parse(e,n)):t(e,{...n,fastpaths:!1}),s.scan=(t,n)=>e(t,n),s.compileRe=(e,t,n=!1,r=!1)=>{if(!0===n)return e.output;const o=t||{},i=o.contains?"":"^",a=o.contains?"":"$";let c=`${i}(?:${e.output})${a}`;e&&!0===e.negated&&(c=`^(?!${c}).*$`);const u=s.toRegex(c,t);return!0===r&&(u.state=e),u},s.makeRe=(e,n={},r=!1,o=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return!1===n.fastpaths||"."!==e[0]&&"*"!==e[0]||(i.output=t.fastpaths(e,n)),i.output||(i=t(e,n)),s.compileRe(i,n,r,o)},s.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},s.constants=r,te=s}var pe=J(function(){if(se)return re;se=1;const e=fe(),t=le();function n(n,r,s=!1){return!r||null!==r.windows&&void 0!==r.windows||(r={...r,windows:t.isWindows()}),e(n,r,s)}return Object.assign(n,e),re=n}());async function de(e){const t=[],n=["."];for(;n.length;){const r=n.pop(),s=h(e,r),o=await i(s,{withFileTypes:!0});for(const e of o){const s="."===r?e.name:g(r,e.name);e.isDirectory()?n.push(s):t.push(s.replace(/\\/g,"/"))}}return t}const he=(e,t)=>{const n=t.replace(/\\/g,"/").replace(/\/+$/,"");return e===n||e.startsWith(n+"/")},me=e=>{const t=e.replace(/\\/g,"/").replace(/^\.\/+/,"").replace(/\/+$/,"");if(!/[*?[\]{}()!]/.test(n=t)&&!n.includes("**"))return t?e=>he(e,t):()=>!1;var n;const r=pe(t,{dot:!0});return e=>r(e)};async function ge(e,{cwd:n,stanPath:r,includeOutputDir:s,includes:o=[],excludes:i=[],anchors:c=[]}){const u=r.replace(/\\/g,"/"),l=((e,t)=>{const n=new Set;for(const r of e){if("package.json"===r)continue;if(!r.endsWith("/package.json"))continue;const e=r.slice(0,-13);e.startsWith("node_modules/")||e.startsWith(".git/")||e===t||e.startsWith(`${t}/`)||e.length>0&&n.add(e)}return Array.from(n)})(e,u),f=await(async e=>{const n=h(e,".gitignore");if(!t(n))return null;try{const e=await a(n,"utf8"),t=ae();return t.add(e),t}catch{return null}})(n),p=[e=>he(e,"node_modules"),e=>he(e,".git"),...f?[e=>f.ignores(e)]:[],...i.map(me),...l.map(e=>t=>he(t,e)),e=>B(u,e)];s||p.push(e=>z(`${u}/output`,e));const d=e.filter(e=>!p.some(t=>t(e)));if(o.length>0){const t=o.map(me),n=[e=>B(u,e),...s?[]:[e=>z(`${u}/output`,e)]],r=new Set(d);for(const n of e)t.some(e=>e(n))&&r.add(n);const a=i.map(me),l=new Set(e.filter(e=>r.has(e)&&!n.some(t=>t(e))&&!a.some(t=>t(e))));if(c.length>0){const t=c.map(me);for(const n of e)!(B(u,n)||!s&&z(`${u}/output`,n))&&t.some(e=>e(n))&&l.add(n)}return e.filter(e=>l.has(e))}if(c.length>0){const t=c.map(me),n=new Set(d);for(const r of e)!(B(u,r)||!s&&z(`${u}/output`,r))&&t.some(e=>e(r))&&n.add(r);return e.filter(e=>n.has(e))}return d}async function ye(e,t){const n=(await(async()=>{try{const e=await Promise.resolve().then(function(){return Dc}),t=e.makeStanDirs,n=e.default?.makeStanDirs,r="function"==typeof t?t:n;if("function"==typeof r)return r}catch{}throw new Error("makeStanDirs export not found in ./paths")})())(e,t);return await b(n.rootAbs),await b(n.outputAbs),await b(n.diffAbs),await b(n.patchAbs),{rootAbs:n.rootAbs,outputAbs:n.outputAbs,diffAbs:n.diffAbs,patchAbs:n.patchAbs}}async function be(e,t){const n=await ye(e,t);return{outDir:n.outputAbs,diffDir:n.diffAbs}}const ve="code -g {file}",De=e=>e instanceof URL?D(e):e;function we({cwd:t}={}){const n=function(t,{cwd:n=v.cwd(),type:r="file",stopAt:s}={}){let o=d.resolve(De(n)??"");const{root:i}=d.parse(o);s=d.resolve(o,De(s)??i);const a=d.isAbsolute(t);for(;o;){const n=a?t:d.join(o,t);try{const t=e.statSync(n,{throwIfNoEntry:!1});if("file"===r&&t?.isFile()||"directory"===r&&t?.isDirectory())return n}catch{}if(o===s||o===i)break;o=d.dirname(o)}}("package.json",{cwd:t});return n&&d.dirname(n)}const _e=["stan.config.yml","stan.config.yaml","stan.config.json"],Se=e=>{for(const n of _e){const r=h(e,n);if(t(r))return r}return null},Ee=e=>{const t=Se(e);if(t)return t;const n=new Set;let r=e;for(;r;){const e=we({cwd:r});if(!e||n.has(e))break;n.add(e);const t=Se(e);if(t)return t;const s=m(e);if(s===e||n.has(s))break;r=s}return null};var ke,Ae={},Ce={},Oe={},Pe={};function Te(){if(ke)return Pe;ke=1;const e=Symbol.for("yaml.alias"),t=Symbol.for("yaml.document"),n=Symbol.for("yaml.map"),r=Symbol.for("yaml.pair"),s=Symbol.for("yaml.scalar"),o=Symbol.for("yaml.seq"),i=Symbol.for("yaml.node.type"),a=e=>!!e&&"object"==typeof e&&e[i]===s;function c(e){if(e&&"object"==typeof e)switch(e[i]){case n:case o:return!0}return!1}return Pe.ALIAS=e,Pe.DOC=t,Pe.MAP=n,Pe.NODE_TYPE=i,Pe.PAIR=r,Pe.SCALAR=s,Pe.SEQ=o,Pe.hasAnchor=e=>(a(e)||c(e))&&!!e.anchor,Pe.isAlias=t=>!!t&&"object"==typeof t&&t[i]===e,Pe.isCollection=c,Pe.isDocument=e=>!!e&&"object"==typeof e&&e[i]===t,Pe.isMap=e=>!!e&&"object"==typeof e&&e[i]===n,Pe.isNode=function(t){if(t&&"object"==typeof t)switch(t[i]){case e:case n:case s:case o:return!0}return!1},Pe.isPair=e=>!!e&&"object"==typeof e&&e[i]===r,Pe.isScalar=a,Pe.isSeq=e=>!!e&&"object"==typeof e&&e[i]===o,Pe}var xe,Ne,$e={};function Le(){if(xe)return $e;xe=1;var e=Te();const t=Symbol("break visit"),n=Symbol("skip children"),r=Symbol("remove node");function s(t,n){const s=c(n);e.isDocument(t)?o(null,t.contents,s,Object.freeze([t]))===r&&(t.contents=null):o(null,t,s,Object.freeze([]))}function o(n,s,i,a){const c=u(n,s,i,a);if(e.isNode(c)||e.isPair(c))return l(n,a,c),o(n,c,i,a);if("symbol"!=typeof c)if(e.isCollection(s)){a=Object.freeze(a.concat(s));for(let e=0;e<s.items.length;++e){const n=o(e,s.items[e],i,a);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===r&&(s.items.splice(e,1),e-=1)}}}else if(e.isPair(s)){a=Object.freeze(a.concat(s));const e=o("key",s.key,i,a);if(e===t)return t;e===r&&(s.key=null);const n=o("value",s.value,i,a);if(n===t)return t;n===r&&(s.value=null)}return c}async function i(t,n){const s=c(n);e.isDocument(t)?await a(null,t.contents,s,Object.freeze([t]))===r&&(t.contents=null):await a(null,t,s,Object.freeze([]))}async function a(n,s,o,i){const c=await u(n,s,o,i);if(e.isNode(c)||e.isPair(c))return l(n,i,c),a(n,c,o,i);if("symbol"!=typeof c)if(e.isCollection(s)){i=Object.freeze(i.concat(s));for(let e=0;e<s.items.length;++e){const n=await a(e,s.items[e],o,i);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===r&&(s.items.splice(e,1),e-=1)}}}else if(e.isPair(s)){i=Object.freeze(i.concat(s));const e=await a("key",s.key,o,i);if(e===t)return t;e===r&&(s.key=null);const n=await a("value",s.value,o,i);if(n===t)return t;n===r&&(s.value=null)}return c}function c(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 u(t,n,r,s){return"function"==typeof r?r(t,n,s):e.isMap(n)?r.Map?.(t,n,s):e.isSeq(n)?r.Seq?.(t,n,s):e.isPair(n)?r.Pair?.(t,n,s):e.isScalar(n)?r.Scalar?.(t,n,s):e.isAlias(n)?r.Alias?.(t,n,s):void 0}function l(t,n,r){const s=n[n.length-1];if(e.isCollection(s))s.items[t]=r;else if(e.isPair(s))"key"===t?s.key=r:s.value=r;else{if(!e.isDocument(s)){const t=e.isAlias(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${t} parent`)}s.contents=r}}return s.BREAK=t,s.SKIP=n,s.REMOVE=r,i.BREAK=t,i.SKIP=n,i.REMOVE=r,$e.visit=s,$e.visitAsync=i,$e}function Re(){if(Ne)return Oe;Ne=1;var e=Te(),t=Le();const n={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},r=e=>e.replace(/[!,[\]{}]/g,e=>n[e]);class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){const e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),r=n.shift();switch(r){case"%TAG":{if(2!==n.length&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[e,r]=n;return this.tags[e]=r,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==n.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=n;return"1.1"===e||"1.2"===e?(this.yaml.version=e,!0):(t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1)}default:return t(0,`Unknown directive ${r}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const n=e.slice(2,-1);return"!"===n||"!!"===n?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),n)}const[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);const s=this.tags[n];if(s)try{return s+decodeURIComponent(r)}catch(e){return t(String(e)),null}return"!"===n?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+r(e.substring(n.length));return"!"===e[0]?e:`!<${e}>`}toString(n){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let o;if(n&&s.length>0&&e.isNode(n.contents)){const r={};t.visit(n.contents,(t,n)=>{e.isNode(n)&&n.tag&&(r[n.tag]=!0)}),o=Object.keys(r)}else o=[];for(const[e,t]of s)"!!"===e&&"tag:yaml.org,2002:"===t||n&&!o.some(e=>e.startsWith(t))||r.push(`%TAG ${e} ${t}`);return r.join("\n")}}return s.defaultYaml={explicit:!1,version:"1.2"},s.defaultTags={"!!":"tag:yaml.org,2002:"},Oe.Directives=s,Oe}var Fe,Ie={},je={},Me={};function Be(){if(Fe)return Me;Fe=1;var e=Te(),t=Le();function n(e){const n=new Set;return t.visit(e,{Value(e,t){t.anchor&&n.add(t.anchor)}}),n}function r(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}return Me.anchorIsValid=function(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0},Me.anchorNames=n,Me.createNodeAnchors=function(t,s){const o=[],i=new Map;let a=null;return{onAnchor:e=>{o.push(e),a??(a=n(t));const i=r(s,a);return a.add(i),i},setAnchors:()=>{for(const t of o){const n=i.get(t);if("object"!=typeof n||!n.anchor||!e.isScalar(n.node)&&!e.isCollection(n.node)){const e=new Error("Failed to resolve repeated object (this should not happen)");throw e.source=t,e}n.node.anchor=n.anchor}},sourceObjects:i}},Me.findNewAnchor=r,Me}var ze,He={},Ke={};function Ue(){return ze||(ze=1,Ke.applyReviver=function e(t,n,r,s){if(s&&"object"==typeof s)if(Array.isArray(s))for(let n=0,r=s.length;n<r;++n){const r=s[n],o=e(t,s,String(n),r);void 0===o?delete s[n]:o!==r&&(s[n]=o)}else if(s instanceof Map)for(const n of Array.from(s.keys())){const r=s.get(n),o=e(t,s,n,r);void 0===o?s.delete(n):o!==r&&s.set(n,o)}else if(s instanceof Set)for(const n of Array.from(s)){const r=e(t,s,n,n);void 0===r?s.delete(n):r!==n&&(s.delete(n),s.add(r))}else for(const[n,r]of Object.entries(s)){const o=e(t,s,n,r);void 0===o?delete s[n]:o!==r&&(s[n]=o)}return t.call(n,r,s)}),Ke}var qe,Je,Ze,Ge={};function We(){if(qe)return Ge;qe=1;var e=Te();return Ge.toJS=function t(n,r,s){if(Array.isArray(n))return n.map((e,n)=>t(e,String(n),s));if(n&&"function"==typeof n.toJSON){if(!s||!e.hasAnchor(n))return n.toJSON(r,s);const t={aliasCount:0,count:1,res:void 0};s.anchors.set(n,t),s.onCreate=e=>{t.res=e,delete s.onCreate};const o=n.toJSON(r,s);return s.onCreate&&s.onCreate(o),o}return"bigint"!=typeof n||s?.keep?n:Number(n)},Ge}function Ve(){if(Je)return He;Je=1;var e=Ue(),t=Te(),n=We();return He.NodeBase=class{constructor(e){Object.defineProperty(this,t.NODE_TYPE,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(r,{mapAsMap:s,maxAliasCount:o,onAnchor:i,reviver:a}={}){if(!t.isDocument(r))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:r,keep:!0,mapAsMap:!0===s,mapKeyWarned:!1,maxAliasCount:"number"==typeof o?o:100},u=n.toJS(this,"",c);if("function"==typeof i)for(const{count:e,res:t}of c.anchors.values())i(t,e);return"function"==typeof a?e.applyReviver(a,{"":u},"",u):u}},He}function Ye(){if(Ze)return je;Ze=1;var e=Be(),t=Le(),n=Te(),r=Ve(),s=We();let o=class extends r.NodeBase{constructor(e){super(n.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){let s,o;r?.aliasResolveCache?s=r.aliasResolveCache:(s=[],t.visit(e,{Node:(e,t)=>{(n.isAlias(t)||n.hasAnchor(t))&&s.push(t)}}),r&&(r.aliasResolveCache=s));for(const e of s){if(e===this)break;e.anchor===this.source&&(o=e)}return o}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:r,maxAliasCount:o}=t,a=this.resolve(r,t);if(!a){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let c=n.get(a);if(c||(s.toJS(a,null,t),c=n.get(a)),void 0===c?.res)throw new ReferenceError("This should not happen: Alias anchor was not resolved?");if(o>=0&&(c.count+=1,0===c.aliasCount&&(c.aliasCount=i(r,a,n)),c.count*c.aliasCount>o))throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack");return c.res}toString(t,n,r){const s=`*${this.source}`;if(t){if(e.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(t.implicitKey)return`${s} `}return s}};function i(e,t,r){if(n.isAlias(t)){const n=t.resolve(e),s=r&&n&&r.get(n);return s?s.count*s.aliasCount:0}if(n.isCollection(t)){let n=0;for(const s of t.items){const t=i(e,s,r);t>n&&(n=t)}return n}if(n.isPair(t)){const n=i(e,t.key,r),s=i(e,t.value,r);return Math.max(n,s)}return 1}return je.Alias=o,je}var Qe,Xe,et,tt={},nt={},rt={};function st(){if(Qe)return rt;Qe=1;var e=Te(),t=Ve(),n=We();let r=class extends t.NodeBase{constructor(t){super(e.SCALAR),this.value=t}toJSON(e,t){return t?.keep?this.value:n.toJS(this.value,e,t)}toString(){return String(this.value)}};return r.BLOCK_FOLDED="BLOCK_FOLDED",r.BLOCK_LITERAL="BLOCK_LITERAL",r.PLAIN="PLAIN",r.QUOTE_DOUBLE="QUOTE_DOUBLE",r.QUOTE_SINGLE="QUOTE_SINGLE",rt.Scalar=r,rt.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e,rt}function ot(){if(Xe)return nt;Xe=1;var e=Ye(),t=Te(),n=st();return nt.createNode=function(r,s,o){if(t.isDocument(r)&&(r=r.contents),t.isNode(r))return r;if(t.isPair(r)){const e=o.schema[t.MAP].createNode?.(o.schema,null,o);return e.items.push(r),e}(r instanceof String||r instanceof Number||r instanceof Boolean||"undefined"!=typeof BigInt&&r instanceof BigInt)&&(r=r.valueOf());const{aliasDuplicateObjects:i,onAnchor:a,onTagObj:c,schema:u,sourceObjects:l}=o;let f;if(i&&r&&"object"==typeof r){if(f=l.get(r),f)return f.anchor??(f.anchor=a(r)),new e.Alias(f.anchor);f={anchor:null,node:null},l.set(r,f)}s?.startsWith("!!")&&(s="tag:yaml.org,2002:"+s.slice(2));let p=function(e,t,n){if(t){const e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}(r,s,u.tags);if(!p){if(r&&"function"==typeof r.toJSON&&(r=r.toJSON()),!r||"object"!=typeof r){const e=new n.Scalar(r);return f&&(f.node=e),e}p=r instanceof Map?u[t.MAP]:Symbol.iterator in Object(r)?u[t.SEQ]:u[t.MAP]}c&&(c(p),delete o.onTagObj);const d=p?.createNode?p.createNode(o.schema,r,o):"function"==typeof p?.nodeClass?.from?p.nodeClass.from(o.schema,r,o):new n.Scalar(r);return s?d.tag=s:p.default||(d.tag=p.tag),f&&(f.node=d),d},nt}function it(){if(et)return tt;et=1;var e=ot(),t=Te(),n=Ve();function r(t,n,r){let s=r;for(let e=n.length-1;e>=0;--e){const t=n[e];if("number"==typeof t&&Number.isInteger(t)&&t>=0){const e=[];e[t]=s,s=e}else s=new Map([[t,s]])}return e.createNode(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const s=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;let o=class extends n.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(n=>t.isNode(n)||t.isPair(n)?n.clone(e):n),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(s(e))this.add(n);else{const[s,...o]=e,i=this.get(s,!0);if(t.isCollection(i))i.addIn(o,n);else{if(void 0!==i||!this.schema)throw new Error(`Expected YAML collection at ${s}. Remaining path: ${o}`);this.set(s,r(this.schema,o,n))}}}deleteIn(e){const[n,...r]=e;if(0===r.length)return this.delete(n);const s=this.get(n,!0);if(t.isCollection(s))return s.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...s]=e,o=this.get(r,!0);return 0===s.length?!n&&t.isScalar(o)?o.value:o:t.isCollection(o)?o.getIn(s,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!t.isPair(n))return!1;const r=n.value;return null==r||e&&t.isScalar(r)&&null==r.value&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(0===r.length)return this.has(n);const s=this.get(n,!0);return!!t.isCollection(s)&&s.hasIn(r)}setIn(e,n){const[s,...o]=e;if(0===o.length)this.set(s,n);else{const e=this.get(s,!0);if(t.isCollection(e))e.setIn(o,n);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${s}. Remaining path: ${o}`);this.set(s,r(this.schema,o,n))}}}};return tt.Collection=o,tt.collectionFromPath=r,tt.isEmptyPath=s,tt}var at,ct={},ut={},lt={},ft={};function pt(){if(at)return ft;function e(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}return at=1,ft.indentComment=e,ft.lineComment=(t,n,r)=>t.endsWith("\n")?e(r,n):r.includes("\n")?"\n"+e(r,n):(t.endsWith(" ")?"":" ")+r,ft.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#"),ft}var dt,ht,mt,gt,yt={},bt={};function vt(){if(ht)return yt;ht=1;var e=st(),t=function(){if(dt)return bt;dt=1;const e="block",t="quoted";function n(e,t,n){let r=t,s=t+1,o=e[s];for(;" "===o||"\t"===o;)if(t<s+n)o=e[++t];else{do{o=e[++t]}while(o&&"\n"!==o);r=t,s=t+1,o=e[s]}return r}return bt.FOLD_BLOCK=e,bt.FOLD_FLOW="flow",bt.FOLD_QUOTED=t,bt.foldFlowLines=function(r,s,o="flow",{indentAtStart:i,lineWidth:a=80,minContentWidth:c=20,onFold:u,onOverflow:l}={}){if(!a||a<0)return r;a<c&&(c=0);const f=Math.max(1+c,1+a-s.length);if(r.length<=f)return r;const p=[],d={};let h,m,g=a-s.length;"number"==typeof i&&(i>a-Math.max(2,c)?p.push(0):g=a-i);let y=!1,b=-1,v=-1,D=-1;o===e&&(b=n(r,b,s.length),-1!==b&&(g=b+f));for(let i;i=r[b+=1];){if(o===t&&"\\"===i){switch(v=b,r[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}D=b}if("\n"===i)o===e&&(b=n(r,b,s.length)),g=b+s.length+f,h=void 0;else{if(" "===i&&m&&" "!==m&&"\n"!==m&&"\t"!==m){const e=r[b+1];e&&" "!==e&&"\n"!==e&&"\t"!==e&&(h=b)}if(b>=g)if(h)p.push(h),g=h+f,h=void 0;else if(o===t){for(;" "===m||"\t"===m;)m=i,i=r[b+=1],y=!0;const e=b>D+1?b-2:v-1;if(d[e])return r;p.push(e),d[e]=!0,g=e+f,h=void 0}else y=!0}m=i}if(y&&l&&l(),0===p.length)return r;u&&u();let w=r.slice(0,p[0]);for(let e=0;e<p.length;++e){const n=p[e],i=p[e+1]||r.length;0===n?w=`\n${s}${r.slice(0,i)}`:(o===t&&d[n]&&(w+=`${r[n]}\\`),w+=`\n${s}${r.slice(n+1,i)}`)}return w},bt}();const n=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),r=e=>/^(%|---|\.\.\.)/m.test(e);function s(e,s){const o=JSON.stringify(e);if(s.options.doubleQuotedAsJSON)return o;const{implicitKey:i}=s,a=s.options.doubleQuotedMinMultiLineLength,c=s.indent||(r(e)?" ":"");let u="",l=0;for(let e=0,t=o[e];t;t=o[++e])if(" "===t&&"\\"===o[e+1]&&"n"===o[e+2]&&(u+=o.slice(l,e)+"\\ ",e+=1,l=e,t="\\"),"\\"===t)switch(o[e+1]){case"u":{u+=o.slice(l,e);const t=o.substr(e+2,4);switch(t){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:"00"===t.substr(0,2)?u+="\\x"+t.substr(2):u+=o.substr(e,6)}e+=5,l=e+1}break;case"n":if(i||'"'===o[e+2]||o.length<a)e+=1;else{for(u+=o.slice(l,e)+"\n\n";"\\"===o[e+2]&&"n"===o[e+3]&&'"'!==o[e+4];)u+="\n",e+=2;u+=c," "===o[e+2]&&(u+="\\"),e+=1,l=e+1}break;default:e+=1}return u=l?u+o.slice(l):o,i?u:t.foldFlowLines(u,c,t.FOLD_QUOTED,n(s,!1))}function o(e,o){if(!1===o.options.singleQuote||o.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return s(e,o);const i=o.indent||(r(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${i}`)+"'";return o.implicitKey?a:t.foldFlowLines(a,i,t.FOLD_FLOW,n(o,!1))}function i(e,t){const{singleQuote:n}=t.options;let r;if(!1===n)r=s;else{const t=e.includes('"'),i=e.includes("'");r=t&&!i?o:i&&!t?s:n?o:s}return r(e,t)}let a;try{a=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{a=/\n+(?!\n|$)/g}function c({comment:s,type:o,value:c},u,l,f){const{blockQuote:p,commentString:d,lineWidth:h}=u.options;if(!p||/\n[\t ]+$/.test(c))return i(c,u);const m=u.indent||(u.forceBlockIndent||r(c)?" ":""),g="literal"===p||"folded"!==p&&o!==e.Scalar.BLOCK_FOLDED&&(o===e.Scalar.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;const r=t-n,s=e.length;if(s<=r)return!1;for(let t=0,n=0;t<s;++t)if("\n"===e[t]){if(t-n>r)return!0;if(n=t+1,s-n<=r)return!1}return!0}(c,h,m.length));if(!c)return g?"|\n":">\n";let y,b;for(b=c.length;b>0;--b){const e=c[b-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let v=c.substring(b);const D=v.indexOf("\n");-1===D?y="-":c===v||D!==v.length-1?(y="+",f&&f()):y="",v&&(c=c.slice(0,-v.length),"\n"===v[v.length-1]&&(v=v.slice(0,-1)),v=v.replace(a,`$&${m}`));let w,_=!1,S=-1;for(w=0;w<c.length;++w){const e=c[w];if(" "===e)_=!0;else{if("\n"!==e)break;S=w}}let E=c.substring(0,S<w?S+1:w);E&&(c=c.substring(E.length),E=E.replace(/\n+/g,`$&${m}`));let k=(_?m?"2":"1":"")+y;if(s&&(k+=" "+d(s.replace(/ ?[\r\n]+/g," ")),l&&l()),!g){const r=c.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${m}`);let s=!1;const i=n(u,!0);"folded"!==p&&o!==e.Scalar.BLOCK_FOLDED&&(i.onOverflow=()=>{s=!0});const a=t.foldFlowLines(`${E}${r}${v}`,m,t.FOLD_BLOCK,i);if(!s)return`>${k}\n${m}${a}`}return`|${k}\n${m}${E}${c=c.replace(/\n+/g,`$&${m}`)}${v}`}return yt.stringifyString=function(a,u,l,f){const{implicitKey:p,inFlow:d}=u,h="string"==typeof a.value?a:Object.assign({},a,{value:String(a.value)});let{type:m}=a;m!==e.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(h.value)&&(m=e.Scalar.QUOTE_DOUBLE);const g=a=>{switch(a){case e.Scalar.BLOCK_FOLDED:case e.Scalar.BLOCK_LITERAL:return p||d?i(h.value,u):c(h,u,l,f);case e.Scalar.QUOTE_DOUBLE:return s(h.value,u);case e.Scalar.QUOTE_SINGLE:return o(h.value,u);case e.Scalar.PLAIN:return function(s,o,a,u){const{type:l,value:f}=s,{actualString:p,implicitKey:d,indent:h,indentStep:m,inFlow:g}=o;if(d&&f.includes("\n")||g&&/[[\]{},]/.test(f))return i(f,o);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(f))return d||g||!f.includes("\n")?i(f,o):c(s,o,a,u);if(!d&&!g&&l!==e.Scalar.PLAIN&&f.includes("\n"))return c(s,o,a,u);if(r(f)){if(""===h)return o.forceBlockIndent=!0,c(s,o,a,u);if(d&&h===m)return i(f,o)}const y=f.replace(/\n+/g,`$&\n${h}`);if(p){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(y),{compat:t,tags:n}=o.doc.schema;if(n.some(e)||t?.some(e))return i(f,o)}return d?y:t.foldFlowLines(y,h,t.FOLD_FLOW,n(o,!1))}(h,u,l,f);default:return null}};let y=g(m);if(null===y){const{defaultKeyType:e,defaultStringType:t}=u.options,n=p&&e||t;if(y=g(n),null===y)throw new Error(`Unsupported default string type ${n}`)}return y},yt}function Dt(){if(mt)return lt;mt=1;var e=Be(),t=Te(),n=pt(),r=vt();return lt.createStringifyContext=function(e,t){const r=Object.assign({blockQuote:!0,commentString:n.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let s;switch(r.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:s,options:r}},lt.stringify=function(n,s,o,i){if(t.isPair(n))return n.toString(s,o,i);if(t.isAlias(n)){if(s.doc.directives)return n.toString(s);if(s.resolvedAliases?.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");s.resolvedAliases?s.resolvedAliases.add(n):s.resolvedAliases=new Set([n]),n=n.resolve(s.doc)}let a;const c=t.isNode(n)?n:s.doc.createNode(n,{onTagObj:e=>a=e});a??(a=function(e,n){if(n.tag){const t=e.filter(e=>e.tag===n.tag);if(t.length>0)return t.find(e=>e.format===n.format)??t[0]}let r,s;if(t.isScalar(n)){s=n.value;let t=e.filter(e=>e.identify?.(s));if(t.length>1){const e=t.filter(e=>e.test);e.length>0&&(t=e)}r=t.find(e=>e.format===n.format)??t.find(e=>!e.format)}else s=n,r=e.find(e=>e.nodeClass&&s instanceof e.nodeClass);if(!r)throw new Error(`Tag not resolved for ${s?.constructor?.name??(null===s?"null":typeof s)} value`);return r}(s.doc.schema.tags,c));const u=function(n,r,{anchors:s,doc:o}){if(!o.directives)return"";const i=[],a=(t.isScalar(n)||t.isCollection(n))&&n.anchor;a&&e.anchorIsValid(a)&&(s.add(a),i.push(`&${a}`));const c=n.tag??(r.default?null:r.tag);return c&&i.push(o.directives.tagString(c)),i.join(" ")}(c,a,s);u.length>0&&(s.indentAtStart=(s.indentAtStart??0)+u.length+1);const l="function"==typeof a.stringify?a.stringify(c,s,o,i):t.isScalar(c)?r.stringifyString(c,s,o,i):c.toString(s,o,i);return u?t.isScalar(c)||"{"===l[0]||"["===l[0]?`${u} ${l}`:`${u}\n${s.indent}${l}`:l},lt}var wt,_t={},St={};function Et(){if(wt)return St;wt=1;var e=w;return St.debug=function(e,...t){"debug"===e&&console.log(...t)},St.warn=function(t,n){"debug"!==t&&"warn"!==t||("function"==typeof e.emitWarning?e.emitWarning(n):console.warn(n))},St}var kt,At,Ct,Ot={};function Pt(){if(kt)return Ot;kt=1;var e=Te(),t=st();const n="<<",r={identify:e=>e===n||"symbol"==typeof e&&e.description===n,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new t.Scalar(Symbol(n)),{addToJSMap:s}),stringify:()=>n};function s(t,n,r){if(r=t&&e.isAlias(r)?r.resolve(t.doc):r,e.isSeq(r))for(const e of r.items)o(t,n,e);else if(Array.isArray(r))for(const e of r)o(t,n,e);else o(t,n,r)}function o(t,n,r){const s=t&&e.isAlias(r)?r.resolve(t.doc):r;if(!e.isMap(s))throw new Error("Merge sources must be maps or map aliases");const o=s.toJSON(null,t,Map);for(const[e,t]of o)n instanceof Map?n.has(e)||n.set(e,t):n instanceof Set?n.add(e):Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(n,e,{value:t,writable:!0,enumerable:!0,configurable:!0});return n}return Ot.addMergeToJSMap=s,Ot.isMergeKey=(n,s)=>(r.identify(s)||e.isScalar(s)&&(!s.type||s.type===t.Scalar.PLAIN)&&r.identify(s.value))&&n?.doc.schema.tags.some(e=>e.tag===r.tag&&e.default),Ot.merge=r,Ot}function Tt(){if(At)return _t;At=1;var e=Et(),t=Pt(),n=Dt(),r=Te(),s=We();return _t.addPairToJSMap=function(o,i,{key:a,value:c}){if(r.isNode(a)&&a.addToJSMap)a.addToJSMap(o,i,c);else if(t.isMergeKey(o,a))t.addMergeToJSMap(o,i,c);else{const t=s.toJS(a,"",o);if(i instanceof Map)i.set(t,s.toJS(c,t,o));else if(i instanceof Set)i.add(t);else{const u=function(t,s,o){if(null===s)return"";if("object"!=typeof s)return String(s);if(r.isNode(t)&&o?.doc){const r=n.createStringifyContext(o.doc,{});r.anchors=new Set;for(const e of o.anchors.keys())r.anchors.add(e.anchor);r.inFlow=!0,r.inStringifyKey=!0;const s=t.toString(r);if(!o.mapKeyWarned){let t=JSON.stringify(s);t.length>40&&(t=t.substring(0,36)+'..."'),e.warn(o.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${t}. Set mapAsMap: true to use object keys.`),o.mapKeyWarned=!0}return s}return JSON.stringify(s)}(a,t,o),l=s.toJS(c,u,o);u in i?Object.defineProperty(i,u,{value:l,writable:!0,enumerable:!0,configurable:!0}):i[u]=l}}return i},_t}function xt(){if(Ct)return ct;Ct=1;var e=ot(),t=function(){if(gt)return ut;gt=1;var e=Te(),t=st(),n=Dt(),r=pt();return ut.stringifyPair=function({key:s,value:o},i,a,c){const{allNullValues:u,doc:l,indent:f,indentStep:p,options:{commentString:d,indentSeq:h,simpleKeys:m}}=i;let g=e.isNode(s)&&s.comment||null;if(m){if(g)throw new Error("With simple keys, key nodes cannot have comments");if(e.isCollection(s)||!e.isNode(s)&&"object"==typeof s)throw new Error("With simple keys, collection cannot be used as a key value")}let y=!m&&(!s||g&&null==o&&!i.inFlow||e.isCollection(s)||(e.isScalar(s)?s.type===t.Scalar.BLOCK_FOLDED||s.type===t.Scalar.BLOCK_LITERAL:"object"==typeof s));i=Object.assign({},i,{allNullValues:!1,implicitKey:!y&&(m||!u),indent:f+p});let b,v,D,w=!1,_=!1,S=n.stringify(s,i,()=>w=!0,()=>_=!0);if(!y&&!i.inFlow&&S.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");y=!0}if(i.inFlow){if(u||null==o)return w&&a&&a(),""===S?"?":y?`? ${S}`:S}else if(u&&!m||null==o&&y)return S=`? ${S}`,g&&!w?S+=r.lineComment(S,i.indent,d(g)):_&&c&&c(),S;w&&(g=null),y?(g&&(S+=r.lineComment(S,i.indent,d(g))),S=`? ${S}\n${f}:`):(S=`${S}:`,g&&(S+=r.lineComment(S,i.indent,d(g)))),e.isNode(o)?(b=!!o.spaceBefore,v=o.commentBefore,D=o.comment):(b=!1,v=null,D=null,o&&"object"==typeof o&&(o=l.createNode(o))),i.implicitKey=!1,y||g||!e.isScalar(o)||(i.indentAtStart=S.length+1),_=!1,h||!(p.length>=2)||i.inFlow||y||!e.isSeq(o)||o.flow||o.tag||o.anchor||(i.indent=i.indent.substring(2));let E=!1;const k=n.stringify(o,i,()=>E=!0,()=>_=!0);let A=" ";if(g||b||v){if(A=b?"\n":"",v){const e=d(v);A+=`\n${r.indentComment(e,i.indent)}`}""!==k||i.inFlow?A+=`\n${i.indent}`:"\n"===A&&D&&(A="\n\n")}else if(!y&&e.isCollection(o)){const e=k[0],t=k.indexOf("\n"),n=-1!==t,r=i.inFlow??o.flow??0===o.items.length;if(n||!r){let r=!1;if(n&&("&"===e||"!"===e)){let n=k.indexOf(" ");"&"===e&&-1!==n&&n<t&&"!"===k[n+1]&&(n=k.indexOf(" ",n+1)),(-1===n||t<n)&&(r=!0)}r||(A=`\n${i.indent}`)}}else""!==k&&"\n"!==k[0]||(A="");return S+=A+k,i.inFlow?E&&a&&a():D&&!E?S+=r.lineComment(S,i.indent,d(D)):_&&c&&c(),S},ut}(),n=Tt(),r=Te();let s=class e{constructor(e,t=null){Object.defineProperty(this,r.NODE_TYPE,{value:r.PAIR}),this.key=e,this.value=t}clone(t){let{key:n,value:s}=this;return r.isNode(n)&&(n=n.clone(t)),r.isNode(s)&&(s=s.clone(t)),new e(n,s)}toJSON(e,t){const r=t?.mapAsMap?new Map:{};return n.addPairToJSMap(t,r,this)}toString(e,n,r){return e?.doc?t.stringifyPair(this,e,n,r):JSON.stringify(this)}};return ct.Pair=s,ct.createPair=function(t,n,r){const o=e.createNode(t,void 0,r),i=e.createNode(n,void 0,r);return new s(o,i)},ct}var Nt,$t,Lt,Rt={},Ft={},It={},jt={};function Mt(){if(Nt)return jt;Nt=1;var e=Te(),t=Dt(),n=pt();function r({comment:r,items:s},i,{blockItemPrefix:a,flowChars:c,itemIndent:u,onChompKeep:l,onComment:f}){const{indent:p,options:{commentString:d}}=i,h=Object.assign({},i,{indent:u,type:null});let m=!1;const g=[];for(let r=0;r<s.length;++r){const c=s[r];let l=null;if(e.isNode(c))!m&&c.spaceBefore&&g.push(""),o(i,g,c.commentBefore,m),c.comment&&(l=c.comment);else if(e.isPair(c)){const t=e.isNode(c.key)?c.key:null;t&&(!m&&t.spaceBefore&&g.push(""),o(i,g,t.commentBefore,m))}m=!1;let f=t.stringify(c,h,()=>l=null,()=>m=!0);l&&(f+=n.lineComment(f,u,d(l))),m&&l&&(m=!1),g.push(a+f)}let y;if(0===g.length)y=c.start+c.end;else{y=g[0];for(let e=1;e<g.length;++e){const t=g[e];y+=t?`\n${p}${t}`:"\n"}}return r?(y+="\n"+n.indentComment(d(r),p),f&&f()):m&&l&&l(),y}function s({items:r},s,{flowChars:i,itemIndent:a}){const{indent:c,indentStep:u,flowCollectionPadding:l,options:{commentString:f}}=s;a+=u;const p=Object.assign({},s,{indent:a,inFlow:!0,type:null});let d=!1,h=0;const m=[];for(let i=0;i<r.length;++i){const c=r[i];let u=null;if(e.isNode(c))c.spaceBefore&&m.push(""),o(s,m,c.commentBefore,!1),c.comment&&(u=c.comment);else if(e.isPair(c)){const t=e.isNode(c.key)?c.key:null;t&&(t.spaceBefore&&m.push(""),o(s,m,t.commentBefore,!1),t.comment&&(d=!0));const n=e.isNode(c.value)?c.value:null;n?(n.comment&&(u=n.comment),n.commentBefore&&(d=!0)):null==c.value&&t?.comment&&(u=t.comment)}u&&(d=!0);let l=t.stringify(c,p,()=>u=null);i<r.length-1&&(l+=","),u&&(l+=n.lineComment(l,a,f(u))),!d&&(m.length>h||l.includes("\n"))&&(d=!0),m.push(l),h=m.length}const{start:g,end:y}=i;if(0===m.length)return g+y;if(!d){const e=m.reduce((e,t)=>e+t.length+2,2);d=s.options.lineWidth>0&&e>s.options.lineWidth}if(d){let e=g;for(const t of m)e+=t?`\n${u}${c}${t}`:"\n";return`${e}\n${c}${y}`}return`${g}${l}${m.join(" ")}${l}${y}`}function o({indent:e,options:{commentString:t}},r,s,o){if(s&&o&&(s=s.replace(/^\n+/,"")),s){const o=n.indentComment(t(s),e);r.push(o.trimStart())}}return jt.stringifyCollection=function(e,t,n){return(t.inFlow??e.flow?s:r)(e,t,n)},jt}function Bt(){if($t)return It;$t=1;var e=Mt(),t=Tt(),n=it(),r=Te(),s=xt(),o=st();function i(e,t){const n=r.isScalar(t)?t.value:t;for(const s of e)if(r.isPair(s)){if(s.key===t||s.key===n)return s;if(r.isScalar(s.key)&&s.key.value===n)return s}}let a=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(r.MAP,e),this.items=[]}static from(e,t,n){const{keepUndefined:r,replacer:o}=n,i=new this(e),a=(e,a)=>{if("function"==typeof o)a=o.call(t,e,a);else if(Array.isArray(o)&&!o.includes(e))return;(void 0!==a||r)&&i.items.push(s.createPair(e,a,n))};if(t instanceof Map)for(const[e,n]of t)a(e,n);else if(t&&"object"==typeof t)for(const e of Object.keys(t))a(e,t[e]);return"function"==typeof e.sortMapEntries&&i.items.sort(e.sortMapEntries),i}add(e,t){let n;n=r.isPair(e)?e:e&&"object"==typeof e&&"key"in e?new s.Pair(e.key,e.value):new s.Pair(e,e?.value);const a=i(this.items,n.key),c=this.schema?.sortMapEntries;if(a){if(!t)throw new Error(`Key ${n.key} already set`);r.isScalar(a.value)&&o.isScalarValue(n.value)?a.value.value=n.value:a.value=n.value}else if(c){const e=this.items.findIndex(e=>c(n,e)<0);-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){const t=i(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=i(this.items,e),s=n?.value;return(!t&&r.isScalar(s)?s.value:s)??void 0}has(e){return!!i(this.items,e)}set(e,t){this.add(new s.Pair(e,t),!0)}toJSON(e,n,r){const s=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(s);for(const e of this.items)t.addPairToJSMap(n,s,e);return s}toString(t,n,s){if(!t)return JSON.stringify(this);for(const e of this.items)if(!r.isPair(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),e.stringifyCollection(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:s,onComment:n})}};return It.YAMLMap=a,It.findPair=i,It}function zt(){if(Lt)return Ft;Lt=1;var e=Te(),t=Bt();const n={collection:"map",default:!0,nodeClass:t.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:(t,n)=>(e.isMap(t)||n("Expected a mapping for this tag"),t),createNode:(e,n,r)=>t.YAMLMap.from(e,n,r)};return Ft.map=n,Ft}var Ht,Kt,Ut={},qt={};function Jt(){if(Ht)return qt;Ht=1;var e=ot(),t=Mt(),n=it(),r=Te(),s=st(),o=We();let i=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(r.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=a(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){const n=a(e);if("number"!=typeof n)return;const s=this.items[n];return!t&&r.isScalar(s)?s.value:s}has(e){const t=a(e);return"number"==typeof t&&t<this.items.length}set(e,t){const n=a(e);if("number"!=typeof n)throw new Error(`Expected a valid index, not ${e}.`);const o=this.items[n];r.isScalar(o)&&s.isScalarValue(t)?o.value=t:this.items[n]=t}toJSON(e,t){const n=[];t?.onCreate&&t.onCreate(n);let r=0;for(const e of this.items)n.push(o.toJS(e,String(r++),t));return n}toString(e,n,r){return e?t.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){const{replacer:s}=r,o=new this(t);if(n&&Symbol.iterator in Object(n)){let t=0;for(let i of n){if("function"==typeof s){const e=n instanceof Set?i:String(t++);i=s.call(n,e,i)}o.items.push(e.createNode(i,void 0,r))}}return o}};function a(e){let t=r.isScalar(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}return qt.YAMLSeq=i,qt}function Zt(){if(Kt)return Ut;Kt=1;var e=Te(),t=Jt();const n={collection:"seq",default:!0,nodeClass:t.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:(t,n)=>(e.isSeq(t)||n("Expected a sequence for this tag"),t),createNode:(e,n,r)=>t.YAMLSeq.from(e,n,r)};return Ut.seq=n,Ut}var Gt,Wt={};function Vt(){if(Gt)return Wt;Gt=1;var e=vt();const t={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(t,n,r,s)=>(n=Object.assign({actualString:!0},n),e.stringifyString(t,n,r,s))};return Wt.string=t,Wt}var Yt,Qt={},Xt={};function en(){if(Yt)return Xt;Yt=1;var e=st();const t={identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new e.Scalar(null),stringify:({source:e},n)=>"string"==typeof e&&t.test.test(e)?e:n.options.nullStr};return Xt.nullTag=t,Xt}var tn,nn={};function rn(){if(tn)return nn;tn=1;var e=st();const t={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new e.Scalar("t"===t[0]||"T"===t[0]),stringify:({source:e,value:n},r)=>e&&t.test.test(e)&&n===("t"===e[0]||"T"===e[0])?e:n?r.options.trueStr:r.options.falseStr};return nn.boolTag=t,nn}var sn,on,an={},cn={};function un(){return sn||(sn=1,cn.stringifyNumber=function({format:e,minFractionDigits:t,tag:n,value:r}){if("bigint"==typeof r)return String(r);const s="number"==typeof r?r:Number(r);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let o=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(o)){let e=o.indexOf(".");e<0&&(e=o.length,o+=".");let n=t-(o.length-e-1);for(;n-- >0;)o+="0"}return o}),cn}function ln(){if(on)return an;on=1;var e=st(),t=un();const n={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]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:t.stringifyNumber},r={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){const n=Number(e.value);return isFinite(n)?n.toExponential():t.stringifyNumber(e)}},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const n=new e.Scalar(parseFloat(t)),r=t.indexOf(".");return-1!==r&&"0"===t[t.length-1]&&(n.minFractionDigits=t.length-r-1),n},stringify:t.stringifyNumber};return an.float=s,an.floatExp=r,an.floatNaN=n,an}var fn,pn={};function dn(){if(fn)return pn;fn=1;var e=un();const t=e=>"bigint"==typeof e||Number.isInteger(e),n=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function r(n,r,s){const{value:o}=n;return t(o)&&o>=0?s+o.toString(r):e.stringifyNumber(n)}const s={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>n(e,2,8,r),stringify:e=>r(e,8,"0o")},o={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>n(e,0,10,r),stringify:e.stringifyNumber},i={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>n(e,2,16,r),stringify:e=>r(e,16,"0x")};return pn.int=o,pn.intHex=i,pn.intOct=s,pn}var hn,mn={};var gn,yn={};var bn,vn={};function Dn(){if(bn)return vn;bn=1;var e=_,t=st(),n=vt();const r={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,n){if("function"==typeof e.Buffer)return e.Buffer.from(t,"base64");if("function"==typeof atob){const e=atob(t.replace(/[\n\r]/g,"")),n=new Uint8Array(e.length);for(let t=0;t<e.length;++t)n[t]=e.charCodeAt(t);return n}return n("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:r,type:s,value:o},i,a,c){if(!o)return"";const u=o;let l;if("function"==typeof e.Buffer)l=u instanceof e.Buffer?u.toString("base64"):e.Buffer.from(u.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<u.length;++t)e+=String.fromCharCode(u[t]);l=btoa(e)}}if(s??(s=t.Scalar.BLOCK_LITERAL),s!==t.Scalar.QUOTE_DOUBLE){const e=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),n=Math.ceil(l.length/e),r=new Array(n);for(let t=0,s=0;t<n;++t,s+=e)r[t]=l.substr(s,e);l=r.join(s===t.Scalar.BLOCK_LITERAL?"\n":" ")}return n.stringifyString({comment:r,type:s,value:l},i,a,c)}};return vn.binary=r,vn}var wn,_n,Sn={},En={};function kn(){if(wn)return En;wn=1;var e=Te(),t=xt(),n=st(),r=Jt();function s(r,s){if(e.isSeq(r))for(let o=0;o<r.items.length;++o){let i=r.items[o];if(!e.isPair(i)){if(e.isMap(i)){i.items.length>1&&s("Each pair must have its own sequence indicator");const e=i.items[0]||new t.Pair(new n.Scalar(null));if(i.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${i.commentBefore}\n${e.key.commentBefore}`:i.commentBefore),i.comment){const t=e.value??e.key;t.comment=t.comment?`${i.comment}\n${t.comment}`:i.comment}i=e}r.items[o]=e.isPair(i)?i:new t.Pair(i)}}else s("Expected a sequence for this tag");return r}function o(e,n,s){const{replacer:o}=s,i=new r.YAMLSeq(e);i.tag="tag:yaml.org,2002:pairs";let a=0;if(n&&Symbol.iterator in Object(n))for(let e of n){let r,c;if("function"==typeof o&&(e=o.call(n,String(a++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);r=e[0],c=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);r=t[0],c=e[r]}else r=e;i.items.push(t.createPair(r,c,s))}return i}const i={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:s,createNode:o};return En.createPairs=o,En.pairs=i,En.resolvePairs=s,En}function An(){if(_n)return Sn;_n=1;var e=Te(),t=We(),n=Bt(),r=Jt(),s=kn();class o extends r.YAMLSeq{constructor(){super(),this.add=n.YAMLMap.prototype.add.bind(this),this.delete=n.YAMLMap.prototype.delete.bind(this),this.get=n.YAMLMap.prototype.get.bind(this),this.has=n.YAMLMap.prototype.has.bind(this),this.set=n.YAMLMap.prototype.set.bind(this),this.tag=o.tag}toJSON(n,r){if(!r)return super.toJSON(n);const s=new Map;r?.onCreate&&r.onCreate(s);for(const n of this.items){let o,i;if(e.isPair(n)?(o=t.toJS(n.key,"",r),i=t.toJS(n.value,o,r)):o=t.toJS(n,"",r),s.has(o))throw new Error("Ordered maps must not include duplicate keys");s.set(o,i)}return s}static from(e,t,n){const r=s.createPairs(e,t,n),o=new this;return o.items=r.items,o}}o.tag="tag:yaml.org,2002:omap";const i={collection:"seq",identify:e=>e instanceof Map,nodeClass:o,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,n){const r=s.resolvePairs(t,n),i=[];for(const{key:t}of r.items)e.isScalar(t)&&(i.includes(t.value)?n(`Ordered maps must not include duplicate keys: ${t.value}`):i.push(t.value));return Object.assign(new o,r)},createNode:(e,t,n)=>o.from(e,t,n)};return Sn.YAMLOMap=o,Sn.omap=i,Sn}var Cn,On={},Pn={};var Tn,xn={};var Nn,$n={};var Ln,Rn={};function Fn(){if(Ln)return Rn;Ln=1;var e=Te(),t=xt(),n=Bt();class r extends n.YAMLMap{constructor(e){super(e),this.tag=r.tag}add(r){let s;s=e.isPair(r)?r:r&&"object"==typeof r&&"key"in r&&"value"in r&&null===r.value?new t.Pair(r.key,null):new t.Pair(r,null),n.findPair(this.items,s.key)||this.items.push(s)}get(t,r){const s=n.findPair(this.items,t);return!r&&e.isPair(s)?e.isScalar(s.key)?s.key.value:s.key:s}set(e,r){if("boolean"!=typeof r)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof r);const s=n.findPair(this.items,e);s&&!r?this.items.splice(this.items.indexOf(s),1):!s&&r&&this.items.push(new t.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,n,r){const{replacer:s}=r,o=new this(e);if(n&&Symbol.iterator in Object(n))for(let e of n)"function"==typeof s&&(e=s.call(n,e,e)),o.items.push(t.createPair(e,null,r));return o}}r.tag="tag:yaml.org,2002:set";const s={collection:"map",identify:e=>e instanceof Set,nodeClass:r,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>r.from(e,t,n),resolve(t,n){if(e.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new r,t);n("Set items must all have null values")}else n("Expected a mapping for this tag");return t}};return Rn.YAMLSet=r,Rn.set=s,Rn}var In,jn,Mn,Bn,zn={};function Hn(){if(In)return zn;In=1;var e=un();function t(e,t){const n=e[0],r="-"===n||"+"===n?e.substring(1):e,s=e=>t?BigInt(e):Number(e),o=r.replace(/_/g,"").split(":").reduce((e,t)=>e*s(60)+s(t),s(0));return"-"===n?s(-1)*o:o}function n(t){let{value:n}=t,r=e=>e;if("bigint"==typeof n)r=e=>BigInt(e);else if(isNaN(n)||!isFinite(n))return e.stringifyNumber(t);let s="";n<0&&(s="-",n*=r(-1));const o=r(60),i=[n%o];return n<60?i.unshift(0):(n=(n-i[0])/o,i.unshift(n%o),n>=60&&(n=(n-i[0])/o,i.unshift(n))),s+i.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const r={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,n,{intAsBigInt:r})=>t(e,r),stringify:n},s={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=>t(e,!1),stringify:n},o={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){const n=e.match(o.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,s,i,a,c,u]=n.map(Number),l=n[7]?Number((n[7]+"00").substr(1,3)):0;let f=Date.UTC(r,s-1,i,a||0,c||0,u||0,l);const p=n[8];if(p&&"Z"!==p){let e=t(p,!1);Math.abs(e)<30&&(e*=60),f-=6e4*e}return new Date(f)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};return zn.floatTime=s,zn.intTime=r,zn.timestamp=o,zn}function Kn(){if(jn)return On;jn=1;var e=zt(),t=en(),n=Zt(),r=Vt(),s=Dn(),o=function(){if(Cn)return Pn;Cn=1;var e=st();function t({value:e,source:t},s){return t&&(e?n:r).test.test(t)?t:e?s.options.trueStr:s.options.falseStr}const n={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:()=>new e.Scalar(!0),stringify:t},r={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 e.Scalar(!1),stringify:t};return Pn.falseTag=r,Pn.trueTag=n,Pn}(),i=function(){if(Tn)return xn;Tn=1;var e=st(),t=un();const n={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]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:t.stringifyNumber},r={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){const n=Number(e.value);return isFinite(n)?n.toExponential():t.stringifyNumber(e)}},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const n=new e.Scalar(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(-1!==r){const e=t.substring(r+1).replace(/_/g,"");"0"===e[e.length-1]&&(n.minFractionDigits=e.length)}return n},stringify:t.stringifyNumber};return xn.float=s,xn.floatExp=r,xn.floatNaN=n,xn}(),a=function(){if(Nn)return $n;Nn=1;var e=un();const t=e=>"bigint"==typeof e||Number.isInteger(e);function n(e,t,n,{intAsBigInt:r}){const s=e[0];if("-"!==s&&"+"!==s||(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===s?BigInt(-1)*t:t}const o=parseInt(e,n);return"-"===s?-1*o:o}function r(n,r,s){const{value:o}=n;if(t(o)){const e=o.toString(r);return o<0?"-"+s+e.substr(1):s+e}return e.stringifyNumber(n)}const s={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>n(e,2,2,r),stringify:e=>r(e,2,"0b")},o={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>n(e,1,8,r),stringify:e=>r(e,8,"0")},i={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>n(e,0,10,r),stringify:e.stringifyNumber},a={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>n(e,2,16,r),stringify:e=>r(e,16,"0x")};return $n.int=i,$n.intBin=s,$n.intHex=a,$n.intOct=o,$n}(),c=Pt(),u=An(),l=kn(),f=Fn(),p=Hn();const d=[e.map,n.seq,r.string,t.nullTag,o.trueTag,o.falseTag,a.intBin,a.intOct,a.int,a.intHex,i.floatNaN,i.floatExp,i.float,s.binary,c.merge,u.omap,l.pairs,f.set,p.intTime,p.floatTime,p.timestamp];return On.schema=d,On}function Un(){if(Mn)return Qt;Mn=1;var e=zt(),t=en(),n=Zt(),r=Vt(),s=rn(),o=ln(),i=dn(),a=function(){if(hn)return mn;hn=1;var e=zt(),t=en(),n=Zt(),r=Vt(),s=rn(),o=ln(),i=dn();const a=[e.map,n.seq,r.string,t.nullTag,s.boolTag,i.intOct,i.int,i.intHex,o.floatNaN,o.floatExp,o.float];return mn.schema=a,mn}(),c=function(){if(gn)return yn;gn=1;var e=st(),t=zt(),n=Zt();function r(e){return"bigint"==typeof e||Number.isInteger(e)}const s=({value:e})=>JSON.stringify(e),o=[{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:s},{identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:s},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:s},{identify:r,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})=>r(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:s}],i={default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)},a=[t.map,n.seq].concat(o,i);return yn.schema=a,yn}(),u=Dn(),l=Pt(),f=An(),p=kn(),d=Kn(),h=Fn(),m=Hn();const g=new Map([["core",a.schema],["failsafe",[e.map,n.seq,r.string]],["json",c.schema],["yaml11",d.schema],["yaml-1.1",d.schema]]),y={binary:u.binary,bool:s.boolTag,float:o.float,floatExp:o.floatExp,floatNaN:o.floatNaN,floatTime:m.floatTime,int:i.int,intHex:i.intHex,intOct:i.intOct,intTime:m.intTime,map:e.map,merge:l.merge,null:t.nullTag,omap:f.omap,pairs:p.pairs,seq:n.seq,set:h.set,timestamp:m.timestamp},b={"tag:yaml.org,2002:binary":u.binary,"tag:yaml.org,2002:merge":l.merge,"tag:yaml.org,2002:omap":f.omap,"tag:yaml.org,2002:pairs":p.pairs,"tag:yaml.org,2002:set":h.set,"tag:yaml.org,2002:timestamp":m.timestamp};return Qt.coreKnownTags=b,Qt.getTags=function(e,t,n){const r=g.get(t);if(r&&!e)return n&&!r.includes(l.merge)?r.concat(l.merge):r.slice();let s=r;if(!s){if(!Array.isArray(e)){const e=Array.from(g.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}s=[]}if(Array.isArray(e))for(const t of e)s=s.concat(t);else"function"==typeof e&&(s=e(s.slice()));return n&&(s=s.concat(l.merge)),s.reduce((e,t)=>{const n="string"==typeof t?y[t]:t;if(!n){const e=JSON.stringify(t),n=Object.keys(y).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])},Qt}function qn(){if(Bn)return Rt;Bn=1;var e=Te(),t=zt(),n=Zt(),r=Vt(),s=Un();const o=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;return Rt.Schema=class i{constructor({compat:i,customTags:a,merge:c,resolveKnownTags:u,schema:l,sortMapEntries:f,toStringDefaults:p}){this.compat=Array.isArray(i)?s.getTags(i,"compat"):i?s.getTags(null,i):null,this.name="string"==typeof l&&l||"core",this.knownTags=u?s.coreKnownTags:{},this.tags=s.getTags(a,this.name,c),this.toStringOptions=p??null,Object.defineProperty(this,e.MAP,{value:t.map}),Object.defineProperty(this,e.SCALAR,{value:r.string}),Object.defineProperty(this,e.SEQ,{value:n.seq}),this.sortMapEntries="function"==typeof f?f:!0===f?o:null}clone(){const e=Object.create(i.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}},Rt}var Jn,Zn,Gn={};function Wn(){if(Zn)return Ie;Zn=1;var e=Ye(),t=it(),n=Te(),r=xt(),s=We(),o=qn(),i=function(){if(Jn)return Gn;Jn=1;var e=Te(),t=Dt(),n=pt();return Gn.stringifyDocument=function(r,s){const o=[];let i=!0===s.directives;if(!1!==s.directives&&r.directives){const e=r.directives.toString(r);e?(o.push(e),i=!0):r.directives.docStart&&(i=!0)}i&&o.push("---");const a=t.createStringifyContext(r,s),{commentString:c}=a.options;if(r.commentBefore){1!==o.length&&o.unshift("");const e=c(r.commentBefore);o.unshift(n.indentComment(e,""))}let u=!1,l=null;if(r.contents){if(e.isNode(r.contents)){if(r.contents.spaceBefore&&i&&o.push(""),r.contents.commentBefore){const e=c(r.contents.commentBefore);o.push(n.indentComment(e,""))}a.forceBlockIndent=!!r.comment,l=r.contents.comment}const s=l?void 0:()=>u=!0;let f=t.stringify(r.contents,a,()=>l=null,s);l&&(f+=n.lineComment(f,"",c(l))),"|"!==f[0]&&">"!==f[0]||"---"!==o[o.length-1]?o.push(f):o[o.length-1]=`--- ${f}`}else o.push(t.stringify(r.contents,a));if(r.directives?.docEnd)if(r.comment){const e=c(r.comment);e.includes("\n")?(o.push("..."),o.push(n.indentComment(e,""))):o.push(`... ${e}`)}else o.push("...");else{let e=r.comment;e&&u&&(e=e.replace(/^\n+/,"")),e&&(u&&!l||""===o[o.length-1]||o.push(""),o.push(n.indentComment(c(e),"")))}return o.join("\n")+"\n"},Gn}(),a=Be(),c=Ue(),u=ot(),l=Re();function f(e){if(n.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}return Ie.Document=class p{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,n.NODE_TYPE,{value:n.DOC});let s=null;"function"==typeof t||Array.isArray(t)?s=t:void 0===r&&t&&(r=t,t=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=o;let{version:i}=o;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(i=this.directives.yaml.version)):this.directives=new l.Directives({version:i}),this.setSchema(i,r),this.contents=void 0===e?null:this.createNode(e,s,r)}clone(){const e=Object.create(p.prototype,{[n.NODE_TYPE]:{value:n.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=n.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){f(this.contents)&&this.contents.add(e)}addIn(e,t){f(this.contents)&&this.contents.addIn(e,t)}createAlias(t,n){if(!t.anchor){const e=a.anchorNames(this);t.anchor=!n||e.has(n)?a.findNewAnchor(n||"a",e):n}return new e.Alias(t.anchor)}createNode(e,t,r){let s;if("function"==typeof t)e=t.call({"":e},"",e),s=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,n=t.filter(e).map(String);n.length>0&&(t=t.concat(n)),s=t}else void 0===r&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:o,anchorPrefix:i,flow:c,keepUndefined:l,onTagObj:f,tag:p}=r??{},{onAnchor:d,setAnchors:h,sourceObjects:m}=a.createNodeAnchors(this,i||"a"),g={aliasDuplicateObjects:o??!0,keepUndefined:l??!1,onAnchor:d,onTagObj:f,replacer:s,schema:this.schema,sourceObjects:m},y=u.createNode(e,p,g);return c&&n.isCollection(y)&&(y.flow=!0),h(),y}createPair(e,t,n={}){const s=this.createNode(e,null,n),o=this.createNode(t,null,n);return new r.Pair(s,o)}delete(e){return!!f(this.contents)&&this.contents.delete(e)}deleteIn(e){return t.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):!!f(this.contents)&&this.contents.deleteIn(e)}get(e,t){return n.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,r){return t.isEmptyPath(e)?!r&&n.isScalar(this.contents)?this.contents.value:this.contents:n.isCollection(this.contents)?this.contents.getIn(e,r):void 0}has(e){return!!n.isCollection(this.contents)&&this.contents.has(e)}hasIn(e){return t.isEmptyPath(e)?void 0!==this.contents:!!n.isCollection(this.contents)&&this.contents.hasIn(e)}set(e,n){null==this.contents?this.contents=t.collectionFromPath(this.schema,[e],n):f(this.contents)&&this.contents.set(e,n)}setIn(e,n){t.isEmptyPath(e)?this.contents=n:null==this.contents?this.contents=t.collectionFromPath(this.schema,Array.from(e),n):f(this.contents)&&this.contents.setIn(e,n)}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.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new l.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const t=JSON.stringify(e);throw new 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)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new o.Schema(Object.assign(n,t))}}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:o,reviver:i}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},u=s.toJS(this.contents,t??"",a);if("function"==typeof o)for(const{count:e,res:t}of a.anchors.values())o(t,e);return"function"==typeof i?c.applyReviver(i,{"":u},"",u):u}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return i.stringifyDocument(this,e)}},Ie}var Vn,Yn={};function Qn(){if(Vn)return Yn;Vn=1;class e extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}}return Yn.YAMLError=e,Yn.YAMLParseError=class extends e{constructor(e,t,n){super("YAMLParseError",e,t,n)}},Yn.YAMLWarning=class extends e{constructor(e,t,n){super("YAMLWarning",e,t,n)}},Yn.prettifyError=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map(e=>t.linePos(e));const{line:r,col:s}=n.linePos[0];n.message+=` at line ${r}, column ${s}`;let o=s-1,i=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(o>=60&&i.length>80){const e=Math.min(o-39,i.length-79);i="…"+i.substring(e),o-=e-1}if(i.length>80&&(i=i.substring(0,79)+"…"),r>1&&/^ *$/.test(i.substring(0,o))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+"…\n"),i=n+i}if(/[^ ]/.test(i)){let e=1;const t=n.linePos[1];t?.line===r&&t.col>s&&(e=Math.max(1,Math.min(t.col-s,80-o)));const a=" ".repeat(o)+"^".repeat(e);n.message+=`:\n\n${i}\n${a}\n`}},Yn}var Xn,er={},tr={},nr={},rr={},sr={};function or(){return Xn||(Xn=1,sr.resolveProps=function(e,{flow:t,indicator:n,next:r,offset:s,onError:o,parentIndent:i,startOnNewline:a}){let c=!1,u=a,l=a,f="",p="",d=!1,h=!1,m=null,g=null,y=null,b=null,v=null,D=null,w=null;for(const s of e)switch(h&&("space"!==s.type&&"newline"!==s.type&&"comma"!==s.type&&o(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),m&&(u&&"comment"!==s.type&&"newline"!==s.type&&o(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),s.type){case"space":t||"doc-start"===n&&"flow-collection"===r?.type||!s.source.includes("\t")||(m=s),l=!0;break;case"comment":{l||o(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=s.source.substring(1)||" ";f?f+=p+e:f=e,p="",u=!1;break}case"newline":u?f?f+=s.source:D&&"seq-item-ind"===n||(c=!0):p+=s.source,u=!0,d=!0,(g||y)&&(b=s),l=!0;break;case"anchor":g&&o(s,"MULTIPLE_ANCHORS","A node can have at most one anchor"),s.source.endsWith(":")&&o(s.offset+s.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=s,w??(w=s.offset),u=!1,l=!1,h=!0;break;case"tag":y&&o(s,"MULTIPLE_TAGS","A node can have at most one tag"),y=s,w??(w=s.offset),u=!1,l=!1,h=!0;break;case n:(g||y)&&o(s,"BAD_PROP_ORDER",`Anchors and tags must be after the ${s.source} indicator`),D&&o(s,"UNEXPECTED_TOKEN",`Unexpected ${s.source} in ${t??"collection"}`),D=s,u="seq-item-ind"===n||"explicit-key-ind"===n,l=!1;break;case"comma":if(t){v&&o(s,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),v=s,u=!1,l=!1;break}default:o(s,"UNEXPECTED_TOKEN",`Unexpected ${s.type} token`),u=!1,l=!1}const _=e[e.length-1],S=_?_.offset+_.source.length:s;return h&&r&&"space"!==r.type&&"newline"!==r.type&&"comma"!==r.type&&("scalar"!==r.type||""!==r.source)&&o(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(u&&m.indent<=i||"block-map"===r?.type||"block-seq"===r?.type)&&o(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:D,spaceBefore:c,comment:f,hasNewline:d,anchor:g,tag:y,newlineAfterProp:b,end:S,start:w??S}}),sr}var ir,ar={};function cr(){return ir||(ir=1,ar.containsNewline=function e(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes("\n"))return!0;if(t.end)for(const e of t.end)if("newline"===e.type)return!0;return!1;case"flow-collection":for(const n of t.items){for(const e of n.start)if("newline"===e.type)return!0;if(n.sep)for(const e of n.sep)if("newline"===e.type)return!0;if(e(n.key)||e(n.value))return!0}return!1;default:return!0}}),ar}var ur,lr={};function fr(){if(ur)return lr;ur=1;var e=cr();return lr.flowIndentCheck=function(t,n,r){if("flow-collection"===n?.type){const s=n.end[0];s.indent!==t||"]"!==s.source&&"}"!==s.source||!e.containsNewline(n)||r(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}},lr}var pr,dr,hr={};function mr(){if(pr)return hr;pr=1;var e=Te();return hr.mapIncludes=function(t,n,r){const{uniqueKeys:s}=t.options;if(!1===s)return!1;const o="function"==typeof s?s:(t,n)=>t===n||e.isScalar(t)&&e.isScalar(n)&&t.value===n.value;return n.some(e=>o(e.key,r))},hr}var gr,yr={};var br,vr,Dr,wr={},_r={};function Sr(){return br||(br=1,_r.resolveEnd=function(e,t,n,r){let s="";if(e){let o=!1,i="";for(const a of e){const{source:e,type:c}=a;switch(c){case"space":o=!0;break;case"comment":{n&&!o&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";s?s+=i+t:s=t,i="";break}case"newline":s&&(i+=e),o=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=e.length}}return{comment:s,offset:t}}),_r}function Er(){if(Dr)return nr;Dr=1;var e=Te(),t=st(),n=Bt(),r=Jt(),s=function(){if(dr)return rr;dr=1;var e=xt(),t=Bt(),n=or(),r=cr(),s=fr(),o=mr();const i="All mapping items must start at the same column";return rr.resolveBlockMap=function({composeNode:a,composeEmptyNode:c},u,l,f,p){const d=new(p?.nodeClass??t.YAMLMap)(u.schema);u.atRoot&&(u.atRoot=!1);let h=l.offset,m=null;for(const t of l.items){const{start:p,key:g,sep:y,value:b}=t,v=n.resolveProps(p,{indicator:"explicit-key-ind",next:g??y?.[0],offset:h,onError:f,parentIndent:l.indent,startOnNewline:!0}),D=!v.found;if(D){if(g&&("block-seq"===g.type?f(h,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in g&&g.indent!==l.indent&&f(h,"BAD_INDENT",i)),!v.anchor&&!v.tag&&!y){m=v.end,v.comment&&(d.comment?d.comment+="\n"+v.comment:d.comment=v.comment);continue}(v.newlineAfterProp||r.containsNewline(g))&&f(g??p[p.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else v.found?.indent!==l.indent&&f(h,"BAD_INDENT",i);u.atKey=!0;const w=v.end,_=g?a(u,g,v,f):c(u,w,p,null,v,f);u.schema.compat&&s.flowIndentCheck(l.indent,g,f),u.atKey=!1,o.mapIncludes(u,d.items,_)&&f(w,"DUPLICATE_KEY","Map keys must be unique");const S=n.resolveProps(y??[],{indicator:"map-value-ind",next:b,offset:_.range[2],onError:f,parentIndent:l.indent,startOnNewline:!g||"block-scalar"===g.type});if(h=S.end,S.found){D&&("block-map"!==b?.type||S.hasNewline||f(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),u.options.strict&&v.start<S.found.offset-1024&&f(_.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const n=b?a(u,b,S,f):c(u,h,y,null,S,f);u.schema.compat&&s.flowIndentCheck(l.indent,b,f),h=n.range[2];const r=new e.Pair(_,n);u.options.keepSourceTokens&&(r.srcToken=t),d.items.push(r)}else{D&&f(_.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),S.comment&&(_.comment?_.comment+="\n"+S.comment:_.comment=S.comment);const n=new e.Pair(_);u.options.keepSourceTokens&&(n.srcToken=t),d.items.push(n)}}return m&&m<h&&f(m,"IMPOSSIBLE","Map comment with trailing content"),d.range=[l.offset,h,m??h],d},rr}(),o=function(){if(gr)return yr;gr=1;var e=Jt(),t=or(),n=fr();return yr.resolveBlockSeq=function({composeNode:r,composeEmptyNode:s},o,i,a,c){const u=new(c?.nodeClass??e.YAMLSeq)(o.schema);o.atRoot&&(o.atRoot=!1),o.atKey&&(o.atKey=!1);let l=i.offset,f=null;for(const{start:e,value:c}of i.items){const p=t.resolveProps(e,{indicator:"seq-item-ind",next:c,offset:l,onError:a,parentIndent:i.indent,startOnNewline:!0});if(!p.found){if(!(p.anchor||p.tag||c)){f=p.end,p.comment&&(u.comment=p.comment);continue}"block-seq"===c?.type?a(p.end,"BAD_INDENT","All sequence items must start at the same column"):a(l,"MISSING_CHAR","Sequence item without - indicator")}const d=c?r(o,c,p,a):s(o,p.end,e,null,p,a);o.schema.compat&&n.flowIndentCheck(i.indent,c,a),l=d.range[2],u.items.push(d)}return u.range=[i.offset,l,f??l],u},yr}(),i=function(){if(vr)return wr;vr=1;var e=Te(),t=xt(),n=Bt(),r=Jt(),s=Sr(),o=or(),i=cr(),a=mr();const c="Block collections are not allowed within flow collections",u=e=>e&&("block-map"===e.type||"block-seq"===e.type);return wr.resolveFlowCollection=function({composeNode:l,composeEmptyNode:f},p,d,h,m){const g="{"===d.start.source,y=g?"flow map":"flow sequence",b=new(m?.nodeClass??(g?n.YAMLMap:r.YAMLSeq))(p.schema);b.flow=!0;const v=p.atRoot;v&&(p.atRoot=!1),p.atKey&&(p.atKey=!1);let D=d.offset+d.start.source.length;for(let r=0;r<d.items.length;++r){const s=d.items[r],{start:m,key:v,sep:w,value:_}=s,S=o.resolveProps(m,{flow:y,indicator:"explicit-key-ind",next:v??w?.[0],offset:D,onError:h,parentIndent:d.indent,startOnNewline:!1});if(!S.found){if(!(S.anchor||S.tag||w||_)){0===r&&S.comma?h(S.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`):r<d.items.length-1&&h(S.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${y}`),S.comment&&(b.comment?b.comment+="\n"+S.comment:b.comment=S.comment),D=S.end;continue}!g&&p.options.strict&&i.containsNewline(v)&&h(v,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===r)S.comma&&h(S.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`);else if(S.comma||h(S.start,"MISSING_CHAR",`Missing , between ${y} items`),S.comment){let t="";e:for(const e of m)switch(e.type){case"comma":case"space":break;case"comment":t=e.source.substring(1);break e;default:break e}if(t){let n=b.items[b.items.length-1];e.isPair(n)&&(n=n.value??n.key),n.comment?n.comment+="\n"+t:n.comment=t,S.comment=S.comment.substring(t.length+1)}}if(g||w||S.found){p.atKey=!0;const e=S.end,r=v?l(p,v,S,h):f(p,e,m,null,S,h);u(v)&&h(r.range,"BLOCK_IN_FLOW",c),p.atKey=!1;const i=o.resolveProps(w??[],{flow:y,indicator:"map-value-ind",next:_,offset:r.range[2],onError:h,parentIndent:d.indent,startOnNewline:!1});if(i.found){if(!g&&!S.found&&p.options.strict){if(w)for(const e of w){if(e===i.found)break;if("newline"===e.type){h(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}S.start<i.found.offset-1024&&h(i.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else _&&("source"in _&&":"===_.source?.[0]?h(_,"MISSING_CHAR",`Missing space after : in ${y}`):h(i.start,"MISSING_CHAR",`Missing , or : between ${y} items`));const E=_?l(p,_,i,h):i.found?f(p,i.end,w,null,i,h):null;E?u(_)&&h(E.range,"BLOCK_IN_FLOW",c):i.comment&&(r.comment?r.comment+="\n"+i.comment:r.comment=i.comment);const k=new t.Pair(r,E);if(p.options.keepSourceTokens&&(k.srcToken=s),g){const t=b;a.mapIncludes(p,t.items,r)&&h(e,"DUPLICATE_KEY","Map keys must be unique"),t.items.push(k)}else{const e=new n.YAMLMap(p.schema);e.flow=!0,e.items.push(k);const t=(E??r).range;e.range=[r.range[0],t[1],t[2]],b.items.push(e)}D=E?E.range[2]:i.end}else{const e=_?l(p,_,S,h):f(p,S.end,w,null,S,h);b.items.push(e),D=e.range[2],u(_)&&h(e.range,"BLOCK_IN_FLOW",c)}}const w=g?"}":"]",[_,...S]=d.end;let E=D;if(_?.source===w)E=_.offset+_.source.length;else{const e=y[0].toUpperCase()+y.substring(1);h(D,v?"MISSING_CHAR":"BAD_INDENT",v?`${e} must end with a ${w}`:`${e} in block collection must be sufficiently indented and end with a ${w}`),_&&1!==_.source.length&&S.unshift(_)}if(S.length>0){const e=s.resolveEnd(S,E,p.options.strict,h);e.comment&&(b.comment?b.comment+="\n"+e.comment:b.comment=e.comment),b.range=[d.offset,E,e.offset]}else b.range=[d.offset,E,E];return b},wr}();function a(e,t,n,r,a,c){const u="block-map"===n.type?s.resolveBlockMap(e,t,n,r,c):"block-seq"===n.type?o.resolveBlockSeq(e,t,n,r,c):i.resolveFlowCollection(e,t,n,r,c),l=u.constructor;return"!"===a||a===l.tagName?(u.tag=l.tagName,u):(a&&(u.tag=a),u)}return nr.composeCollection=function(s,o,i,c,u){const l=c.tag,f=l?o.directives.tagName(l.source,e=>u(l,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===i.type){const{anchor:e,newlineAfterProp:t}=c,n=e&&l?e.offset>l.offset?e:l:e??l;n&&(!t||t.offset<n.offset)&&u(n,"MISSING_CHAR","Missing newline after block sequence props")}const p="block-map"===i.type?"map":"block-seq"===i.type?"seq":"{"===i.start.source?"map":"seq";if(!l||!f||"!"===f||f===n.YAMLMap.tagName&&"map"===p||f===r.YAMLSeq.tagName&&"seq"===p)return a(s,o,i,u,f);let d=o.schema.tags.find(e=>e.tag===f&&e.collection===p);if(!d){const e=o.schema.knownTags[f];if(e?.collection!==p)return e?u(l,"BAD_COLLECTION_TYPE",`${e.tag} used for ${p} collection, but expects ${e.collection??"scalar"}`,!0):u(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${f}`,!0),a(s,o,i,u,f);o.schema.tags.push(Object.assign({},e,{default:!1})),d=e}const h=a(s,o,i,u,f,d),m=d.resolve?.(h,e=>u(l,"TAG_RESOLVE_FAILED",e),o.options)??h,g=e.isNode(m)?m:new t.Scalar(m);return g.range=h.range,g.tag=f,d?.format&&(g.format=d.format),g},nr}var kr,Ar={},Cr={};function Or(){if(kr)return Cr;kr=1;var e=st();return Cr.resolveBlockScalar=function(t,n,r){const s=n.offset,o=function({offset:e,props:t},n,r){if("block-scalar-header"!==t[0].type)return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=t[0],o=s[0];let i=0,a="",c=-1;for(let t=1;t<s.length;++t){const n=s[t];if(a||"-"!==n&&"+"!==n){const r=Number(n);!i&&r?i=r:-1===c&&(c=e+t)}else a=n}-1!==c&&r(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let u=!1,l="",f=s.length;for(let e=1;e<t.length;++e){const s=t[e];switch(s.type){case"space":u=!0;case"newline":f+=s.source.length;break;case"comment":n&&!u&&r(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=s.source.length,l=s.source.substring(1);break;case"error":r(s,"UNEXPECTED_TOKEN",s.message),f+=s.source.length;break;default:{r(s,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${s.type}`);const e=s.source;e&&"string"==typeof e&&(f+=e.length)}}}return{mode:o,indent:i,chomp:a,comment:l,length:f}}(n,t.options.strict,r);if(!o)return{value:"",type:null,comment:"",range:[s,s,s]};const i=">"===o.mode?e.Scalar.BLOCK_FOLDED:e.Scalar.BLOCK_LITERAL,a=n.source?function(e){const t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),s=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let e=1;e<t.length;e+=2)s.push([t[e],t[e+1]]);return s}(n.source):[];let c=a.length;for(let e=a.length-1;e>=0;--e){const t=a[e][1];if(""!==t&&"\r"!==t)break;c=e}if(0===c){const e="+"===o.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let t=s+o.length;return n.source&&(t+=n.source.length),{value:e,type:i,comment:o.comment,range:[s,t,t]}}let u=n.indent+o.indent,l=n.offset+o.length,f=0;for(let e=0;e<c;++e){const[n,s]=a[e];if(""!==s&&"\r"!==s){if(n.length<u){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";r(l+n.length,"MISSING_CHAR",e)}0===o.indent&&(u=n.length),f=e,0!==u||t.atRoot||r(l,"BAD_INDENT","Block scalar values in collections must be indented");break}0===o.indent&&n.length>u&&(u=n.length),l+=n.length+s.length+1}for(let e=a.length-1;e>=c;--e)a[e][0].length>u&&(c=e+1);let p="",d="",h=!1;for(let e=0;e<f;++e)p+=a[e][0].slice(u)+"\n";for(let t=f;t<c;++t){let[n,s]=a[t];l+=n.length+s.length+1;const c="\r"===s[s.length-1];if(c&&(s=s.slice(0,-1)),s&&n.length<u){const e="Block scalar lines must not be less indented than their "+(o.indent?"explicit indentation indicator":"first line");r(l-s.length-(c?2:1),"BAD_INDENT",e),n=""}i===e.Scalar.BLOCK_LITERAL?(p+=d+n.slice(u)+s,d="\n"):n.length>u||"\t"===s[0]?(" "===d?d="\n":h||"\n"!==d||(d="\n\n"),p+=d+n.slice(u)+s,d="\n",h=!0):""===s?"\n"===d?p+="\n":d="\n":(p+=d+s,d=" ",h=!1)}switch(o.chomp){case"-":break;case"+":for(let e=c;e<a.length;++e)p+="\n"+a[e][0].slice(u);"\n"!==p[p.length-1]&&(p+="\n");break;default:p+="\n"}const m=s+o.length+n.source.length;return{value:p,type:i,comment:o.comment,range:[s,m,m]}},Cr}var Pr,Tr,xr={};function Nr(){if(Pr)return xr;Pr=1;var e=st(),t=Sr();function n(e){let t,n;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy"),n=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let s=r[1],o=" ",i=t.lastIndex;for(n.lastIndex=i;r=n.exec(e);)""===r[1]?"\n"===o?s+=o:o="\n":(s+=o+r[1],o=" "),i=n.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=i,r=a.exec(e),s+o+(r?.[1]??"")}function r(e,t){let n="",r=e[t+1];for(;!(" "!==r&&"\t"!==r&&"\n"!==r&&"\r"!==r||"\r"===r&&"\n"!==e[t+2]);)"\n"===r&&(n+="\n"),r=e[(t+=1)+1];return n||(n=" "),{fold:n,offset:t}}const s={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function o(e,t,n,r){const s=e.substr(t,n),o=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;if(isNaN(o)){const s=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}return String.fromCodePoint(o)}return xr.resolveFlowScalar=function(i,a,c){const{offset:u,type:l,source:f,end:p}=i;let d,h;const m=(e,t,n)=>c(u+e,t,n);switch(l){case"scalar":d=e.Scalar.PLAIN,h=function(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),n(e)}(f,m);break;case"single-quoted-scalar":d=e.Scalar.QUOTE_SINGLE,h=function(e,t){return"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote"),n(e.slice(1,-1)).replace(/''/g,"'")}(f,m);break;case"double-quoted-scalar":d=e.Scalar.QUOTE_DOUBLE,h=function(e,t){let n="";for(let i=1;i<e.length-1;++i){const a=e[i];if("\r"!==a||"\n"!==e[i+1])if("\n"===a){const{fold:t,offset:s}=r(e,i);n+=t,i=s}else if("\\"===a){let r=e[++i];const a=s[r];if(a)n+=a;else if("\n"===r)for(r=e[i+1];" "===r||"\t"===r;)r=e[1+ ++i];else if("\r"===r&&"\n"===e[i+1])for(r=e[1+ ++i];" "===r||"\t"===r;)r=e[1+ ++i];else if("x"===r||"u"===r||"U"===r){const s={x:2,u:4,U:8}[r];n+=o(e,i+1,s,t),i+=s}else{const r=e.substr(i-1,2);t(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${r}`),n+=r}}else if(" "===a||"\t"===a){const t=i;let r=e[i+1];for(;" "===r||"\t"===r;)r=e[1+ ++i];"\n"===r||"\r"===r&&"\n"===e[i+2]||(n+=i>t?e.slice(t,i+1):a)}else n+=a}return'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}(f,m);break;default:return c(i,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[u,u+f.length,u+f.length]}}const g=u+f.length,y=t.resolveEnd(p,g,a,c);return{value:h,type:d,comment:y.comment,range:[u,g,y.offset]}},xr}var $r,Lr,Rr,Fr,Ir={};function jr(){if(Lr)return tr;Lr=1;var e=Ye(),t=Te(),n=Er(),r=function(){if(Tr)return Ar;Tr=1;var e=Te(),t=st(),n=Or(),r=Nr();return Ar.composeScalar=function(s,o,i,a){const{value:c,type:u,comment:l,range:f}="block-scalar"===o.type?n.resolveBlockScalar(s,o,a):r.resolveFlowScalar(o,s.options.strict,a),p=i?s.directives.tagName(i.source,e=>a(i,"TAG_RESOLVE_FAILED",e)):null;let d,h;d=s.options.stringKeys&&s.atKey?s.schema[e.SCALAR]:p?function(t,n,r,s,o){if("!"===r)return t[e.SCALAR];const i=[];for(const e of t.tags)if(!e.collection&&e.tag===r){if(!e.default||!e.test)return e;i.push(e)}for(const e of i)if(e.test?.test(n))return e;const a=t.knownTags[r];return a&&!a.collection?(t.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(o(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,"tag:yaml.org,2002:str"!==r),t[e.SCALAR])}(s.schema,c,p,i,a):"scalar"===o.type?function({atKey:t,directives:n,schema:r},s,o,i){const a=r.tags.find(e=>(!0===e.default||t&&"key"===e.default)&&e.test?.test(s))||r[e.SCALAR];if(r.compat){const t=r.compat.find(e=>e.default&&e.test?.test(s))??r[e.SCALAR];a.tag!==t.tag&&i(o,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${n.tagString(a.tag)} or ${n.tagString(t.tag)}`,!0)}return a}(s,c,o,a):s.schema[e.SCALAR];try{const n=d.resolve(c,e=>a(i??o,"TAG_RESOLVE_FAILED",e),s.options);h=e.isScalar(n)?n:new t.Scalar(n)}catch(e){const n=e instanceof Error?e.message:String(e);a(i??o,"TAG_RESOLVE_FAILED",n),h=new t.Scalar(c)}return h.range=f,h.source=c,u&&(h.type=u),p&&(h.tag=p),d.format&&(h.format=d.format),l&&(h.comment=l),h},Ar}(),s=Sr(),o=($r||($r=1,Ir.emptyScalarPosition=function(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++r];"space"===n?.type;)e+=n.source.length,n=t[++r];break}}return e}),Ir);const i={composeNode:a,composeEmptyNode:c};function a(o,a,u,l){const f=o.atKey,{spaceBefore:p,comment:d,anchor:h,tag:m}=u;let g,y=!0;switch(a.type){case"alias":g=function({options:t},{offset:n,source:r,end:o},i){const a=new e.Alias(r.substring(1));""===a.source&&i(n,"BAD_ALIAS","Alias cannot be an empty string"),a.source.endsWith(":")&&i(n+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=n+r.length,u=s.resolveEnd(o,c,t.strict,i);return a.range=[n,c,u.offset],u.comment&&(a.comment=u.comment),a}(o,a,l),(h||m)&&l(a,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":g=r.composeScalar(o,a,m,l),h&&(g.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":g=n.composeCollection(i,o,a,u,l),h&&(g.anchor=h.source.substring(1));break;default:l(a,"UNEXPECTED_TOKEN","error"===a.type?a.message:`Unsupported token (type: ${a.type})`),g=c(o,a.offset,void 0,null,u,l),y=!1}return h&&""===g.anchor&&l(h,"BAD_ALIAS","Anchor cannot be an empty string"),f&&o.options.stringKeys&&(!t.isScalar(g)||"string"!=typeof g.value||g.tag&&"tag:yaml.org,2002:str"!==g.tag)&&l(m??a,"NON_STRING_KEY","With stringKeys, all keys must be strings"),p&&(g.spaceBefore=!0),d&&("scalar"===a.type&&""===a.source?g.comment=d:g.commentBefore=d),o.options.keepSourceTokens&&y&&(g.srcToken=a),g}function c(e,t,n,s,{spaceBefore:i,comment:a,anchor:c,tag:u,end:l},f){const p={type:"scalar",offset:o.emptyScalarPosition(t,n,s),indent:-1,source:""},d=r.composeScalar(e,p,u,f);return c&&(d.anchor=c.source.substring(1),""===d.anchor&&f(c,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(d.spaceBefore=!0),a&&(d.comment=a,d.range[2]=l),d}return tr.composeEmptyNode=c,tr.composeNode=a,tr}function Mr(){if(Fr)return Ce;Fr=1;var e=w,t=Re(),n=Wn(),r=Qn(),s=Te(),o=function(){if(Rr)return er;Rr=1;var e=Wn(),t=jr(),n=Sr(),r=or();return er.composeDoc=function(s,o,{offset:i,start:a,value:c,end:u},l){const f=Object.assign({_directives:o},s),p=new e.Document(void 0,f),d={atKey:!1,atRoot:!0,directives:p.directives,options:p.options,schema:p.schema},h=r.resolveProps(a,{indicator:"doc-start",next:c??u?.[0],offset:i,onError:l,parentIndent:0,startOnNewline:!0});h.found&&(p.directives.docStart=!0,!c||"block-map"!==c.type&&"block-seq"!==c.type||h.hasNewline||l(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),p.contents=c?t.composeNode(d,c,h,l):t.composeEmptyNode(d,h.end,a,null,h,l);const m=p.contents.range[2],g=n.resolveEnd(u,m,!1,l);return g.comment&&(p.comment=g.comment),p.range=[i,m,g.offset],p},er}(),i=Sr();function a(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+("string"==typeof n?n.length:1)]}function c(e){let t="",n=!1,r=!1;for(let s=0;s<e.length;++s){const o=e[s];switch(o[0]){case"#":t+=(""===t?"":r?"\n\n":"\n")+(o.substring(1)||" "),n=!0,r=!1;break;case"%":"#"!==e[s+1]?.[0]&&(s+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}return Ce.Composer=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,s)=>{const o=a(e);s?this.warnings.push(new r.YAMLWarning(o,t,n)):this.errors.push(new r.YAMLParseError(o,t,n))},this.directives=new t.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:r}=c(this.prelude);if(n){const o=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!o)e.commentBefore=n;else if(s.isCollection(o)&&!o.flow&&o.items.length>0){let e=o.items[0];s.isPair(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{const e=o.commentBefore;o.commentBefore=e?`${n}\n${e}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:c(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(const t of e)yield*this.next(t);yield*this.end(t,n)}*next(t){switch(e.env.LOG_STREAM&&console.dir(t,{depth:null}),t.type){case"directive":this.directives.add(t.source,(e,n,r)=>{const s=a(t);s[0]+=e,this.onError(s,"BAD_DIRECTIVE",n,r)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const e=o.composeDoc(this.options,this.directives,t,this.onError);this.atDirectives&&!e.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(e,!1),this.doc&&(yield this.doc),this.doc=e,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const e=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,n=new r.YAMLParseError(a(t),"UNEXPECTED_TOKEN",e);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const e="Unexpected doc-end without preceding document";this.errors.push(new r.YAMLParseError(a(t),"UNEXPECTED_TOKEN",e));break}this.doc.directives.docEnd=!0;const e=i.resolveEnd(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),e.comment){const t=this.doc.comment;this.doc.comment=t?`${t}\n${e.comment}`:e.comment}this.doc.range[2]=e.offset;break}default:this.errors.push(new r.YAMLParseError(a(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),r=new n.Document(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}},Ce}var Br,zr={},Hr={};var Kr,Ur={};var qr,Jr,Zr={};function Gr(){if(Jr)return zr;Jr=1;var e=function(){if(Br)return Hr;Br=1;var e=Or(),t=Nr(),n=Qn(),r=vt();function s(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function o(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const r=e.props.slice(1);let s=t.length;"block-scalar-header"===e.props[0].type&&(s-=e.props[0].source.length);for(const e of r)e.offset+=s;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{const r={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:n,source:t,end:[r]});break}default:{const r="indent"in e?e.indent:-1,s="end"in e&&Array.isArray(e.end)?e.end.filter(e=>"space"===e.type||"comment"===e.type||"newline"===e.type):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:n,indent:r,source:t,end:s})}}}return Hr.createScalarToken=function(e,t){const{implicitKey:n=!1,indent:o,inFlow:i=!1,offset:a=-1,type:c="PLAIN"}=t,u=r.stringifyString({type:c,value:e},{implicitKey:n,indent:o>0?" ".repeat(o):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:o,source:"\n"}];switch(u[0]){case"|":case">":{const e=u.indexOf("\n"),t=u.substring(0,e),n=u.substring(e+1)+"\n",r=[{type:"block-scalar-header",offset:a,indent:o,source:t}];return s(r,l)||r.push({type:"newline",offset:-1,indent:o,source:"\n"}),{type:"block-scalar",offset:a,indent:o,props:r,source:n}}case'"':return{type:"double-quoted-scalar",offset:a,indent:o,source:u,end:l};case"'":return{type:"single-quoted-scalar",offset:a,indent:o,source:u,end:l};default:return{type:"scalar",offset:a,indent:o,source:u,end:l}}},Hr.resolveAsScalar=function(r,s=!0,o){if(r){const i=(e,t,r)=>{const s="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!o)throw new n.YAMLParseError([s,s+1],t,r);o(s,t,r)};switch(r.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return t.resolveFlowScalar(r,s,i);case"block-scalar":return e.resolveBlockScalar({options:{strict:s}},r,i)}}return null},Hr.setScalarValue=function(e,t,n={}){let{afterKey:i=!1,implicitKey:a=!1,inFlow:c=!1,type:u}=n,l="indent"in e?e.indent:null;if(i&&"number"==typeof l&&(l+=2),!u)switch(e.type){case"single-quoted-scalar":u="QUOTE_SINGLE";break;case"double-quoted-scalar":u="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");u=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:u="PLAIN"}const f=r.stringifyString({type:u,value:t},{implicitKey:a||null===l,indent:null!==l&&l>0?" ".repeat(l):"",inFlow:c,options:{blockQuote:!0,lineWidth:-1}});switch(f[0]){case"|":case">":!function(e,t){const n=t.indexOf("\n"),r=t.substring(0,n),o=t.substring(n+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=r,e.source=o}else{const{offset:t}=e,n="indent"in e?e.indent:-1,i=[{type:"block-scalar-header",offset:t,indent:n,source:r}];s(i,"end"in e?e.end:void 0)||i.push({type:"newline",offset:-1,indent:n,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:n,props:i,source:o})}}(e,f);break;case'"':o(e,f,"double-quoted-scalar");break;case"'":o(e,f,"single-quoted-scalar");break;default:o(e,f,"scalar")}},Hr}(),t=function(){if(Kr)return Ur;function e(n){switch(n.type){case"block-scalar":{let t="";for(const r of n.props)t+=e(r);return t+n.source}case"block-map":case"block-seq":{let e="";for(const r of n.items)e+=t(r);return e}case"flow-collection":{let e=n.start.source;for(const r of n.items)e+=t(r);for(const t of n.end)e+=t.source;return e}case"document":{let e=t(n);if(n.end)for(const t of n.end)e+=t.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(const t of n.end)e+=t.source;return e}}}function t({start:t,key:n,sep:r,value:s}){let o="";for(const e of t)o+=e.source;if(n&&(o+=e(n)),r)for(const e of r)o+=e.source;return s&&(o+=e(s)),o}return Kr=1,Ur.stringify=n=>"type"in n?e(n):t(n),Ur}(),n=function(){if(qr)return Zr;qr=1;const e=Symbol("break visit"),t=Symbol("skip children"),n=Symbol("remove item");function r(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),s(Object.freeze([]),e,t)}function s(t,r,o){let i=o(r,t);if("symbol"==typeof i)return i;for(const a of["key","value"]){const c=r[a];if(c&&"items"in c){for(let r=0;r<c.items.length;++r){const i=s(Object.freeze(t.concat([[a,r]])),c.items[r],o);if("number"==typeof i)r=i-1;else{if(i===e)return e;i===n&&(c.items.splice(r,1),r-=1)}}"function"==typeof i&&"key"===a&&(i=i(r,t))}}return"function"==typeof i?i(r,t):i}return r.BREAK=e,r.SKIP=t,r.REMOVE=n,r.itemAtPath=(e,t)=>{let n=e;for(const[e,r]of t){const t=n?.[e];if(!t||!("items"in t))return;n=t.items[r]}return n},r.parentCollection=(e,t)=>{const n=r.itemAtPath(e,t.slice(0,-1)),s=t[t.length-1][0],o=n?.[s];if(o&&"items"in o)return o;throw new Error("Parent collection not found")},Zr.visit=r,Zr}();return zr.createScalarToken=e.createScalarToken,zr.resolveAsScalar=e.resolveAsScalar,zr.setScalarValue=e.setScalarValue,zr.stringify=t.stringify,zr.visit=n.visit,zr.BOM="\ufeff",zr.DOCUMENT="",zr.FLOW_END="",zr.SCALAR="",zr.isCollection=e=>!!e&&"items"in e,zr.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),zr.prettyToken=function(e){switch(e){case"\ufeff":return"<BOM>";case"":return"<DOC>";case"":return"<FLOW_END>";case"":return"<SCALAR>";default:return JSON.stringify(e)}},zr.tokenType=function(e){switch(e){case"\ufeff":return"byte-order-mark";case"":return"doc-mode";case"":return"flow-error-end";case"":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"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null},zr}var Wr,Vr={};function Yr(){if(Wr)return Vr;Wr=1;var e=Gr();function t(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const n=new Set("0123456789ABCDEFabcdef"),r=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),s=new Set(",[]{}"),o=new Set(" ,[]{}\n\r\t"),i=e=>!e||o.has(e);return Vr.Lexer=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("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;)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 n=this.buffer[e];if(this.indentNext>0){let t=0;for(;" "===n;)n=this.buffer[++t+e];if("\r"===n){const n=this.buffer[t+e+1];if("\n"===n||!n&&!this.atEnd)return e+t+1}return"\n"===n||t>=this.indentNext||!n&&!this.atEnd?e+t:-1}if("-"===n||"."===n){const n=this.buffer.substr(e,3);if(("---"===n||"..."===n)&&t(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 t=this.getLine();if(null===t)return this.setNext("stream");if(t[0]===e.BOM&&(yield*this.pushCount(1),t=t.substring(1)),"%"===t[0]){let e=t.length,n=t.indexOf("#");for(;-1!==n;){const r=t[n-1];if(" "===r||"\t"===r){e=n-1;break}n=t.indexOf("#",n+1)}for(;;){const n=t[e-1];if(" "!==n&&"\t"!==n)break;e-=1}const r=(yield*this.pushCount(e))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){const e=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-e),yield*this.pushNewline(),"stream"}return yield e.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){const 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");const e=this.peek(3);if(("---"===e||"..."===e)&&t(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&&!t(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&t(n)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const 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(i),"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 n,r,s=-1;do{n=yield*this.pushNewline(),n>0?(r=yield*this.pushSpaces(!1),this.indentValue=s=r):r=0,r+=(yield*this.pushSpaces(!0))}while(n+r>0);const o=this.getLine();if(null===o)return this.setNext("flow");if((-1!==s&&s<this.indentNext&&"#"!==o[0]||0===s&&(o.startsWith("---")||o.startsWith("..."))&&t(o[3]))&&(s!==this.indentNext-1||1!==this.flowLevel||"]"!==o[0]&&"}"!==o[0]))return this.flowLevel=0,yield e.FLOW_END,yield*this.parseLineStart();let a=0;for(;","===o[a];)a+=(yield*this.pushCount(1)),a+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(a+=(yield*this.pushIndicators()),o[a]){case void 0:return"flow";case"#":return yield*this.pushCount(o.length-a),"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(i),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||t(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let 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)}const n=this.buffer.substring(0,t);let r=n.indexOf("\n",this.pos);if(-1!==r){for(;-1!==r;){const e=this.continueScalar(r+1);if(-1===e)break;r=n.indexOf("\n",e)}-1!==r&&(t=r-("\r"===n[r-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(;;){const 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=>t(e)||"#"===e)}*parseBlockScalar(){let t,n=this.pos-1,r=0;e:for(let e=this.pos;t=this.buffer[e];++e)switch(t){case" ":r+=1;break;case"\n":n=e,r=0;break;case"\r":{const t=this.buffer[e+1];if(!t&&!this.atEnd)return this.setNext("block-scalar");if("\n"===t)break}default:break e}if(!t&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=r:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(n+1);if(-1===e)break;n=this.buffer.indexOf("\n",e)}while(-1!==n);if(-1===n){if(!this.atEnd)return this.setNext("block-scalar");n=this.buffer.length}}let s=n+1;for(t=this.buffer[s];" "===t;)t=this.buffer[++s];if("\t"===t){for(;"\t"===t||" "===t||"\r"===t||"\n"===t;)t=this.buffer[++s];n=s-1}else if(!this.blockScalarKeep)for(;;){let e=n-1,t=this.buffer[e];"\r"===t&&(t=this.buffer[--e]);const s=e;for(;" "===t;)t=this.buffer[--e];if(!("\n"===t&&e>=this.pos&&e+1+r>s))break;n=e}return yield e.SCALAR,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let r,o=this.pos-1,i=this.pos-1;for(;r=this.buffer[++i];)if(":"===r){const e=this.buffer[i+1];if(t(e)||n&&s.has(e))break;o=i}else if(t(r)){let e=this.buffer[i+1];if("\r"===r&&("\n"===e?(i+=1,r="\n",e=this.buffer[i+1]):o=i),"#"===e||n&&s.has(e))break;if("\n"===r){const e=this.continueScalar(i+1);if(-1===e)break;i=Math.max(i,e-2)}}else{if(n&&s.has(r))break;o=i}return r||this.atEnd?(yield e.SCALAR,yield*this.pushToIndex(o+1,!0),n?"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){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(i))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(t(n)||e&&s.has(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,n=this.buffer[e];for(;!t(n)&&">"!==n;)n=this.buffer[++e];return yield*this.pushToIndex(">"===n?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(r.has(t))t=this.buffer[++e];else{if("%"!==t||!n.has(this.buffer[e+1])||!n.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const 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"===t);const r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},Vr}var Qr,Xr={};function es(){return Qr||(Qr=1,Xr.LineCounter=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){const r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}return this.lineStarts[t]===e?{line:t+1,col:1}:0===t?{line:0,col:e}:{line:t,col:e-this.lineStarts[t-1]+1}}}}),Xr}var ts,ns={};function rs(){if(ts)return ns;ts=1;var e=w,t=Gr(),n=Yr();function r(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function s(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 o(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 i(e){switch(e.type){case"document":return e.start;case"block-map":{const 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 a(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(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function c(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||r(t.start,"explicit-key-ind")||r(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,o(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}return ns.Parser=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new n.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(n){if(this.source=n,e.env.LOG_TOKENS&&console.log("|",t.prettyToken(n)),this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=n.length);const r=t.tokenType(n);if(r)if("scalar"===r)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+n.length);break;case"space":this.atNewLine&&" "===n[0]&&(this.indent+=n.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=n.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=n.length}else{const e=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:e,source:n}),this.offset+=n.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(){const e=this.peek(1);if("doc-end"!==this.type||"doc-end"===e?.type){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()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const 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&&c(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const n=e.items[e.items.length-1];if(n.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!n.sep)return Object.assign(n,{key:t,sep:[]}),void(this.onKeyLine=!n.explicitKey);n.value=t;break}case"block-seq":{const n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{const n=e.items[e.items.length-1];return void(!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]}))}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)){const n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&-1===s(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{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}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":return void(-1!==s(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){const t=a(i(this.peek(2)));let n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];const r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);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){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.type?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)){const n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const n=!this.onKeyLine&&this.indent===e.indent,s=n&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let i=[];if(s&&t.sep&&!t.value){const n=[];for(let r=0;r<t.sep.length;++r){const s=t.sep[r];switch(s.type){case"newline":n.push(r);break;case"space":break;case"comment":s.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":return void(s||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?s||t.value?(i.push(this.sourceToken),e.items.push({start:i,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),void(this.onKeyLine=!0);case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(r(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(o(t.key)&&!r(t.sep,"newline")){const e=a(t.start),n=t.key,r=t.sep;r.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:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else if(r(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=a(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||s?e.items.push({start:i,key:null,sep:[this.sourceToken]}):r(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]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(s||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0))}default:{const s=this.startBlockValue(e);if(s){if("block-seq"===s.type){if(!t.explicitKey&&t.sep&&!r(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:i});return void this.stack.push(s)}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.type?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)){const n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||r(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while("flow-collection"===e?.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const 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))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const n=a(i(t));c(e);const r=e.end.splice(1,e.end.length);r.push(this.sourceToken);const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}}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;const t=a(i(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;const t=a(i(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())}}},ns}var ss,os,is={};var as=function(){if(os)return Ae;os=1;var e=Mr(),t=Wn(),n=qn(),r=Qn(),s=Ye(),o=Te(),i=xt(),a=st(),c=Bt(),u=Jt(),l=Gr(),f=Yr(),p=es(),d=rs(),h=function(){if(ss)return is;ss=1;var e=Mr(),t=Wn(),n=Qn(),r=Et(),s=Te(),o=es(),i=rs();function a(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new o.LineCounter||null,prettyErrors:t}}function c(t,r={}){const{lineCounter:s,prettyErrors:o}=a(r),c=new i.Parser(s?.addNewLine),u=new e.Composer(r);let l=null;for(const e of u.compose(c.parse(t),!0,t.length))if(l){if("silent"!==l.options.logLevel){l.errors.push(new n.YAMLParseError(e.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else l=e;return o&&s&&(l.errors.forEach(n.prettifyError(t,s)),l.warnings.forEach(n.prettifyError(t,s))),l}return is.parse=function(e,t,n){let s;"function"==typeof t?s=t:void 0===n&&t&&"object"==typeof t&&(n=t);const o=c(e,n);if(!o)return null;if(o.warnings.forEach(e=>r.warn(o.options.logLevel,e)),o.errors.length>0){if("silent"!==o.options.logLevel)throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:s},n))},is.parseAllDocuments=function(t,r={}){const{lineCounter:s,prettyErrors:o}=a(r),c=new i.Parser(s?.addNewLine),u=new e.Composer(r),l=Array.from(u.compose(c.parse(t)));if(o&&s)for(const e of l)e.errors.forEach(n.prettifyError(t,s)),e.warnings.forEach(n.prettifyError(t,s));return l.length>0?l:Object.assign([],{empty:!0},u.streamInfo())},is.parseDocument=c,is.stringify=function(e,n,r){let o=null;if("function"==typeof n||Array.isArray(n)?o=n:void 0===r&&n&&(r=n),"string"==typeof r&&(r=r.length),"number"==typeof r){const e=Math.round(r);r=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=r??n??{};if(!e)return}return s.isDocument(e)&&!o?e.toString(r):new t.Document(e,o,r).toString(r)},is}(),m=Le();return Ae.Composer=e.Composer,Ae.Document=t.Document,Ae.Schema=n.Schema,Ae.YAMLError=r.YAMLError,Ae.YAMLParseError=r.YAMLParseError,Ae.YAMLWarning=r.YAMLWarning,Ae.Alias=s.Alias,Ae.isAlias=o.isAlias,Ae.isCollection=o.isCollection,Ae.isDocument=o.isDocument,Ae.isMap=o.isMap,Ae.isNode=o.isNode,Ae.isPair=o.isPair,Ae.isScalar=o.isScalar,Ae.isSeq=o.isSeq,Ae.Pair=i.Pair,Ae.Scalar=a.Scalar,Ae.YAMLMap=c.YAMLMap,Ae.YAMLSeq=u.YAMLSeq,Ae.CST=l,Ae.Lexer=f.Lexer,Ae.LineCounter=p.LineCounter,Ae.Parser=d.Parser,Ae.parse=h.parse,Ae.parseAllDocuments=h.parseAllDocuments,Ae.parseDocument=h.parseDocument,Ae.stringify=h.stringify,Ae.visit=m.visit,Ae.visitAsync=m.visitAsync,Ae}();function cs(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:i,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);const s=i.prototype,o=Object.keys(s);for(let e=0;e<o.length;e++){const t=o[e];t in n||(n[t]=s[t].bind(n))}}const s=n?.Parent??Object;class o extends s{}function i(e){var t;const s=n?.Parent?new o:this;r(s,e),(t=s._zod).deferred??(t.deferred=[]);for(const e of s._zod.deferred)e();return s}return Object.defineProperty(o,"name",{value:e}),Object.defineProperty(i,"init",{value:r}),Object.defineProperty(i,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}J(as);class us extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ls extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const fs={};function ps(e){return fs}function ds(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function hs(e,t){return"bigint"==typeof t?t.toString():t}function ms(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function gs(e){return null==e}function ys(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const bs=Symbol("evaluating");function vs(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==bs)return void 0===r&&(r=bs,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Ds(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ws(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function _s(e){return JSON.stringify(e)}const Ss="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Es(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const ks=ms(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function As(e){if(!1===Es(e))return!1;const t=e.constructor;if(void 0===t)return!0;if("function"!=typeof t)return!0;const n=t.prototype;return!1!==Es(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function Cs(e){return As(e)?{...e}:Array.isArray(e)?[...e]:e}const Os=new Set(["string","number","symbol"]);function Ps(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ts(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function xs(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}function Ns(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function $s(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ls(e){return"string"==typeof e?e:e?.message}function Rs(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const s=Ls(e.inst?._zod.def?.error?.(e))??Ls(t?.error?.(e))??Ls(n.customError?.(e))??Ls(n.localeError?.(e))??"Invalid input";r.message=s}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Fs(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function Is(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const js=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,hs,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ms=cs("$ZodError",js),Bs=cs("$ZodError",js,{Parent:Error}),zs=e=>(t,n,r,s)=>{const o=r?Object.assign(r,{async:!1}):{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new us;if(i.issues.length){const t=new(s?.Err??e)(i.issues.map(e=>Rs(e,o,ps())));throw Ss(t,s?.callee),t}return i.value},Hs=e=>async(t,n,r,s)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise&&(i=await i),i.issues.length){const t=new(s?.Err??e)(i.issues.map(e=>Rs(e,o,ps())));throw Ss(t,s?.callee),t}return i.value},Ks=e=>(t,n,r)=>{const s=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},s);if(o instanceof Promise)throw new us;return o.issues.length?{success:!1,error:new(e??Ms)(o.issues.map(e=>Rs(e,s,ps())))}:{success:!0,data:o.value}},Us=Ks(Bs),qs=e=>async(t,n,r)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},s);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(e=>Rs(e,s,ps())))}:{success:!0,data:o.value}},Js=qs(Bs),Zs=/^[cC][^\s-]{8,}$/,Gs=/^[0-9a-z]+$/,Ws=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Vs=/^[0-9a-vA-V]{20}$/,Ys=/^[A-Za-z0-9]{27}$/,Qs=/^[a-zA-Z0-9_-]{21}$/,Xs=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,eo=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,to=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,no=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ro=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,so=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,oo=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,io=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ao=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,co=/^[A-Za-z0-9_-]*$/,uo=/^\+[1-9]\d{6,14}$/,lo="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",fo=new RegExp(`^${lo}$`);function po(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}const ho=/^-?\d+(?:\.\d+)?$/,mo=/^[^A-Z]*$/,go=/^[^a-z]*$/,yo=cs("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),bo=cs("$ZodCheckMaxLength",(e,t)=>{var n;yo.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!gs(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const s=Fs(r);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),vo=cs("$ZodCheckMinLength",(e,t)=>{var n;yo.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!gs(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const s=Fs(r);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Do=cs("$ZodCheckLengthEquals",(e,t)=>{var n;yo.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!gs(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const r=n.value,s=r.length;if(s===t.length)return;const o=Fs(r),i=s>t.length;n.issues.push({origin:o,...i?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),wo=cs("$ZodCheckStringFormat",(e,t)=>{var n,r;yo.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),_o=cs("$ZodCheckRegex",(e,t)=>{wo.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),So=cs("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=mo),wo.init(e,t)}),Eo=cs("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=go),wo.init(e,t)}),ko=cs("$ZodCheckIncludes",(e,t)=>{yo.init(e,t);const n=Ps(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Ao=cs("$ZodCheckStartsWith",(e,t)=>{yo.init(e,t);const n=new RegExp(`^${Ps(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Co=cs("$ZodCheckEndsWith",(e,t)=>{yo.init(e,t);const n=new RegExp(`.*${Ps(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Oo=cs("$ZodCheckOverwrite",(e,t)=>{yo.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class Po{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of r)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}const To={major:4,minor:3,patch:5},xo=cs("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=To;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const t of r)for(const n of t._zod.onattach)n(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let r,s=Ns(e);for(const o of t){if(o._zod.def.when){if(!o._zod.def.when(e))continue}else if(s)continue;const t=e.issues.length,i=o._zod.check(e);if(i instanceof Promise&&!1===n?.async)throw new us;if(r||i instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await i,e.issues.length!==t&&(s||(s=Ns(e,t)))});else{if(e.issues.length===t)continue;s||(s=Ns(e,t))}}return r?r.then(()=>e):e},n=(n,s,o)=>{if(Ns(n))return n.aborted=!0,n;const i=t(s,r,o);if(i instanceof Promise){if(!1===o.async)throw new us;return i.then(t=>e._zod.parse(t,o))}return e._zod.parse(i,o)};e._zod.run=(s,o)=>{if(o.skipChecks)return e._zod.parse(s,o);if("backward"===o.direction){const t=e._zod.parse({value:s.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,s,o)):n(t,s,o)}const i=e._zod.parse(s,o);if(i instanceof Promise){if(!1===o.async)throw new us;return i.then(e=>t(e,r,o))}return t(i,r,o)}}vs(e,"~standard",()=>({validate:t=>{try{const n=Us(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return Js(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),No=cs("$ZodString",(e,t)=>{var n;xo.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=e._zod.bag,new RegExp(`^${n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*"}$`)),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),$o=cs("$ZodStringFormat",(e,t)=>{wo.init(e,t),No.init(e,t)}),Lo=cs("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=eo),$o.init(e,t)}),Ro=cs("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=to(e))}else t.pattern??(t.pattern=to());$o.init(e,t)}),Fo=cs("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=no),$o.init(e,t)}),Io=cs("$ZodURL",(e,t)=>{$o.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),s=new URL(r);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=s.href:n.value=r)}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),jo=cs("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),$o.init(e,t)}),Mo=cs("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Qs),$o.init(e,t)}),Bo=cs("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Zs),$o.init(e,t)}),zo=cs("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Gs),$o.init(e,t)}),Ho=cs("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ws),$o.init(e,t)}),Ko=cs("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Vs),$o.init(e,t)}),Uo=cs("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ys),$o.init(e,t)}),qo=cs("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=po({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${lo}T(?:${r})$`)}(t)),$o.init(e,t)}),Jo=cs("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=fo),$o.init(e,t)}),Zo=cs("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${po(t)}$`)),$o.init(e,t)}),Go=cs("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Xs),$o.init(e,t)}),Wo=cs("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=ro),$o.init(e,t),e._zod.bag.format="ipv4"}),Vo=cs("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=so),$o.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Yo=cs("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=oo),$o.init(e,t)}),Qo=cs("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=io),$o.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(2!==r.length)throw new Error;const[e,t]=r;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Xo(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const ei=cs("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=ao),$o.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Xo(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),ti=cs("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=co),$o.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{(function(e){if(!co.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Xo(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),ni=cs("$ZodE164",(e,t)=>{t.pattern??(t.pattern=uo),$o.init(e,t)}),ri=cs("$ZodJWT",(e,t)=>{$o.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[r]=n;if(!r)return!1;const s=JSON.parse(atob(r));return!("typ"in s&&"JWT"!==s?.typ||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),si=cs("$ZodUnknown",(e,t)=>{xo.init(e,t),e._zod.parse=e=>e}),oi=cs("$ZodNever",(e,t)=>{xo.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function ii(e,t,n){e.issues.length&&t.issues.push(...$s(n,e.issues)),t.value[n]=e.value}const ai=cs("$ZodArray",(e,t)=>{xo.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const o=[];for(let e=0;e<s.length;e++){const i=s[e],a=t.element._zod.run({value:i,issues:[]},r);a instanceof Promise?o.push(a.then(t=>ii(t,n,e))):ii(a,n,e)}return o.length?Promise.all(o).then(()=>n):n}});function ci(e,t,n,r,s){if(e.issues.length){if(s&&!(n in r))return;t.issues.push(...$s(n,e.issues))}void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function ui(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=(r=e.shape,Object.keys(r).filter(e=>"optional"===r[e]._zod.optin&&"optional"===r[e]._zod.optout));var r;return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function li(e,t,n,r,s,o){const i=[],a=s.keySet,c=s.catchall._zod,u=c.def.type,l="optional"===c.optout;for(const s in t){if(a.has(s))continue;if("never"===u){i.push(s);continue}const o=c.run({value:t[s],issues:[]},r);o instanceof Promise?e.push(o.then(e=>ci(e,n,s,t,l))):ci(o,n,s,t,l)}return i.length&&n.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const fi=cs("$ZodObject",(e,t)=>{xo.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const r=ms(()=>ui(t));vs(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(const e of r.values)n[t].add(e)}}return n});const s=Es,o=t.catchall;let i;e._zod.parse=(t,n)=>{i??(i=r.value);const a=t.value;if(!s(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};const c=[],u=i.shape;for(const e of i.keys){const r=u[e],s="optional"===r._zod.optout,o=r._zod.run({value:a[e],issues:[]},n);o instanceof Promise?c.push(o.then(n=>ci(n,t,e,a,s))):ci(o,t,e,a,s)}return o?li(c,a,t,n,r.value,e):c.length?Promise.all(c).then(()=>t):t}}),pi=cs("$ZodObjectJIT",(e,t)=>{fi.init(e,t);const n=e._zod.parse,r=ms(()=>ui(t));let s;const o=Es,i=!fs.jitless,a=i&&ks.value,c=t.catchall;let u;e._zod.parse=(l,f)=>{u??(u=r.value);const p=l.value;return o(p)?i&&a&&!1===f?.async&&!0!==f.jitless?(s||(s=(e=>{const t=new Po(["shape","payload","ctx"]),n=r.value,s=e=>{const t=_s(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const o=Object.create(null);let i=0;for(const e of n.keys)o[e]="key_"+i++;t.write("const newResult = {};");for(const r of n.keys){const n=o[r],i=_s(r),a=e[r],c="optional"===a?._zod?.optout;t.write(`const ${n} = ${s(r)};`),c?t.write(`\n if (${n}.issues.length) {\n if (${i} in input) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${i}, ...iss.path] : [${i}]\n })));\n }\n }\n \n if (${n}.value === undefined) {\n if (${i} in input) {\n newResult[${i}] = undefined;\n }\n } else {\n newResult[${i}] = ${n}.value;\n }\n \n `):t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${i}, ...iss.path] : [${i}]\n })));\n }\n \n if (${n}.value === undefined) {\n if (${i} in input) {\n newResult[${i}] = undefined;\n }\n } else {\n newResult[${i}] = ${n}.value;\n }\n \n `)}t.write("payload.value = newResult;"),t.write("return payload;");const a=t.compile();return(t,n)=>a(e,t,n)})(t.shape)),l=s(l,f),c?li([],p,l,f,u,e):l):n(l,f):(l.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),l)}});function di(e,t,n,r){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const s=e.filter(e=>!Ns(e));return 1===s.length?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Rs(e,r,ps())))}),t)}const hi=cs("$ZodUnion",(e,t)=>{xo.init(e,t),vs(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),vs(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),vs(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),vs(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>ys(e.source)).join("|")})$`)}});const n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=(s,o)=>{if(n)return r(s,o);let i=!1;const a=[];for(const e of t.options){const t=e._zod.run({value:s.value,issues:[]},o);if(t instanceof Promise)a.push(t),i=!0;else{if(0===t.issues.length)return t;a.push(t)}}return i?Promise.all(a).then(t=>di(t,s,e,o)):di(a,s,e,o)}}),mi=cs("$ZodIntersection",(e,t)=>{xo.init(e,t),e._zod.parse=(e,n)=>{const r=e.value,s=t.left._zod.run({value:r,issues:[]},n),o=t.right._zod.run({value:r,issues:[]},n);return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([t,n])=>yi(e,t,n)):yi(e,s,o)}});function gi(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(As(e)&&As(t)){const n=Object.keys(t),r=Object.keys(e).filter(e=>-1!==n.indexOf(e)),s={...e,...t};for(const n of r){const r=gi(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};s[n]=r.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const s=gi(e[r],t[r]);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function yi(e,t,n){const r=new Map;let s;for(const n of t.issues)if("unrecognized_keys"===n.code){s??(s=n);for(const e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(const t of n.issues)if("unrecognized_keys"===t.code)for(const e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);const o=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(o.length&&s&&e.issues.push({...s,keys:o}),Ns(e))return e;const i=gi(t.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const bi=cs("$ZodRecord",(e,t)=>{xo.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!As(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const o=[],i=t.keyType._zod.values;if(i){n.value={};const a=new Set;for(const e of i)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){a.add("number"==typeof e?e.toString():e);const i=t.valueType._zod.run({value:s[e],issues:[]},r);i instanceof Promise?o.push(i.then(t=>{t.issues.length&&n.issues.push(...$s(e,t.issues)),n.value[e]=t.value})):(i.issues.length&&n.issues.push(...$s(e,i.issues)),n.value[e]=i.value)}let c;for(const e in s)a.has(e)||(c=c??[],c.push(e));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:c})}else{n.value={};for(const i of Reflect.ownKeys(s)){if("__proto__"===i)continue;let a=t.keyType._zod.run({value:i,issues:[]},r);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if("string"==typeof i&&ho.test(i)&&a.issues.length&&a.issues.some(e=>"invalid_type"===e.code&&"number"===e.expected)){const e=t.keyType._zod.run({value:Number(i),issues:[]},r);if(e instanceof Promise)throw new Error("Async schemas not supported in object keys currently");0===e.issues.length&&(a=e)}if(a.issues.length){"loose"===t.mode?n.value[i]=s[i]:n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(e=>Rs(e,r,ps())),input:i,path:[i],inst:e});continue}const c=t.valueType._zod.run({value:s[i],issues:[]},r);c instanceof Promise?o.push(c.then(e=>{e.issues.length&&n.issues.push(...$s(i,e.issues)),n.value[a.value]=e.value})):(c.issues.length&&n.issues.push(...$s(i,c.issues)),n.value[a.value]=c.value)}}return o.length?Promise.all(o).then(()=>n):n}}),vi=cs("$ZodEnum",(e,t)=>{xo.init(e,t);const n=ds(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(e=>Os.has(typeof e)).map(e=>"string"==typeof e?Ps(e):e.toString()).join("|")})$`),e._zod.parse=(t,s)=>{const o=t.value;return r.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),Di=cs("$ZodTransform",(e,t)=>{xo.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new ls(e.constructor.name);const s=t.transform(n.value,n);if(r.async)return(s instanceof Promise?s:Promise.resolve(s)).then(e=>(n.value=e,n));if(s instanceof Promise)throw new us;return n.value=s,n}});function wi(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const _i=cs("$ZodOptional",(e,t)=>{xo.init(e,t),e._zod.optin="optional",e._zod.optout="optional",vs(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),vs(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${ys(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>wi(t,e.value)):wi(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),Si=cs("$ZodExactOptional",(e,t)=>{_i.init(e,t),vs(e._zod,"values",()=>t.innerType._zod.values),vs(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Ei=cs("$ZodNullable",(e,t)=>{xo.init(e,t),vs(e._zod,"optin",()=>t.innerType._zod.optin),vs(e._zod,"optout",()=>t.innerType._zod.optout),vs(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${ys(e.source)}|null)$`):void 0}),vs(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),ki=cs("$ZodDefault",(e,t)=>{xo.init(e,t),e._zod.optin="optional",vs(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Ai(e,t)):Ai(r,t)}});function Ai(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Ci=cs("$ZodPrefault",(e,t)=>{xo.init(e,t),e._zod.optin="optional",vs(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Oi=cs("$ZodNonOptional",(e,t)=>{xo.init(e,t),vs(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(t=>Pi(t,e)):Pi(s,e)}});function Pi(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Ti=cs("$ZodCatch",(e,t)=>{xo.init(e,t),vs(e._zod,"optin",()=>t.innerType._zod.optin),vs(e._zod,"optout",()=>t.innerType._zod.optout),vs(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Rs(e,n,ps()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Rs(e,n,ps()))},input:e.value}),e.issues=[]),e)}}),xi=cs("$ZodPipe",(e,t)=>{xo.init(e,t),vs(e._zod,"values",()=>t.in._zod.values),vs(e._zod,"optin",()=>t.in._zod.optin),vs(e._zod,"optout",()=>t.out._zod.optout),vs(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Ni(e,t.in,n)):Ni(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Ni(e,t.out,n)):Ni(r,t.out,n)}});function Ni(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const $i=cs("$ZodReadonly",(e,t)=>{xo.init(e,t),vs(e._zod,"propValues",()=>t.innerType._zod.propValues),vs(e._zod,"values",()=>t.innerType._zod.values),vs(e._zod,"optin",()=>t.innerType?._zod?.optin),vs(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Li):Li(r)}});function Li(e){return e.value=Object.freeze(e.value),e}const Ri=cs("$ZodCustom",(e,t)=>{yo.init(e,t),xo.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const r=n.value,s=t.fn(r);if(s instanceof Promise)return s.then(t=>Fi(t,n,r,e));Fi(s,n,r,e)}});function Fi(e,t,n,r){if(!e){const e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Is(e))}}var Ii;(Ii=globalThis).__zod_globalRegistry??(Ii.__zod_globalRegistry=new class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}});const ji=globalThis.__zod_globalRegistry;function Mi(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...xs(t)})}function Bi(e,t){return new bo({check:"max_length",...xs(t),maximum:e})}function zi(e,t){return new vo({check:"min_length",...xs(t),minimum:e})}function Hi(e,t){return new Do({check:"length_equals",...xs(t),length:e})}function Ki(e){return new Oo({check:"overwrite",tx:e})}function Ui(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ji,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function qi(e,t,n={path:[],schemaPath:[]}){var r;const s=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;const i={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,i);const a=e._zod.toJSONSchema?.();if(a)i.schema=a;else{const r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,r);else{const n=i.schema,o=t.processors[s.type];if(!o)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);o(e,t,n,r)}const o=e._zod.parent;o&&(i.ref||(i.ref=o),qi(o,t,r),t.seen.get(o).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(i.schema,c),"input"===t.io&&Gi(e)&&(delete i.schema.examples,delete i.schema.default),"input"===t.io&&i.schema._prefault&&((r=i.schema).default??(r.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function Ji(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const t of e.seen.entries()){const n=e.metadataRegistry.get(t[0])?.id;if(n){const e=r.get(n);if(e&&e!==t[0])throw new Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}const s=t=>{if(t[1].schema.$ref)return;const r=t[1],{ref:s,defId:o}=(t=>{const r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){const n=e.external.registry.get(t[0])?.id,s=e.external.uri??(e=>e);if(n)return{ref:s(n)};const o=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=o,{defId:o,ref:`${s("__shared")}#/${r}/${o}`}}if(t[1]===n)return{ref:"#"};const s=`#/${r}/`,o=t[1].schema.id??"__schema"+e.counter++;return{defId:o,ref:s+o}})(t);r.def={...r.schema},o&&(r.defId=o);const i=r.schema;for(const e in i)delete i[e];i.$ref=s};if("throw"===e.cycles)for(const t of e.seen.entries()){const e=t[1];if(e.cycle)throw new Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const n of e.seen.entries()){const r=n[1];if(t===n[0]){s(n);continue}if(e.external){const r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){s(n);continue}}const o=e.metadataRegistry.get(n[0])?.id;(o||r.cycle||r.count>1&&"ref"===e.reused)&&s(n)}}function Zi(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=t=>{const n=e.seen.get(t);if(null===n.ref)return;const s=n.def??n.schema,o={...s},i=n.ref;if(n.ref=null,i){r(i);const n=e.seen.get(i),a=n.schema;if(!a.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?Object.assign(s,a):(s.allOf=s.allOf??[],s.allOf.push(a)),Object.assign(s,o),t._zod.parent===i)for(const e in s)"$ref"!==e&&"allOf"!==e&&(e in o||delete s[e]);if(a.$ref)for(const e in s)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(s[e])===JSON.stringify(n.def[e])&&delete s[e]}const a=t._zod.parent;if(a&&a!==i){r(a);const t=e.seen.get(a);if(t?.schema.$ref&&(s.$ref=t.schema.$ref,t.def))for(const e in s)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(s[e])===JSON.stringify(t.def[e])&&delete s[e]}e.override({zodSchema:t,jsonSchema:s,path:n.path??[]})};for(const t of[...e.seen.entries()].reverse())r(t[0]);const s={};if("draft-2020-12"===e.target?s.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?s.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const n=e.external.registry.get(t)?.id;if(!n)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(n)}Object.assign(s,n.def??n.schema);const o=e.external?.defs??{};for(const t of e.seen.entries()){const e=t[1];e.def&&e.defId&&(o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&("draft-2020-12"===e.target?s.$defs=o:s.definitions=o);try{const n=JSON.parse(JSON.stringify(s));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:Wi(t,"input",e.processors),output:Wi(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw new Error("Error converting schema to JSON.")}}function Gi(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if("transform"===r.type)return!0;if("array"===r.type)return Gi(r.element,n);if("set"===r.type)return Gi(r.valueType,n);if("lazy"===r.type)return Gi(r.getter(),n);if("promise"===r.type||"optional"===r.type||"nonoptional"===r.type||"nullable"===r.type||"readonly"===r.type||"default"===r.type||"prefault"===r.type)return Gi(r.innerType,n);if("intersection"===r.type)return Gi(r.left,n)||Gi(r.right,n);if("record"===r.type||"map"===r.type)return Gi(r.keyType,n)||Gi(r.valueType,n);if("pipe"===r.type)return Gi(r.in,n)||Gi(r.out,n);if("object"===r.type){for(const e in r.shape)if(Gi(r.shape[e],n))return!0;return!1}if("union"===r.type){for(const e of r.options)if(Gi(e,n))return!0;return!1}if("tuple"===r.type){for(const e of r.items)if(Gi(e,n))return!0;return!(!r.rest||!Gi(r.rest,n))}return!1}const Wi=(e,t,n={})=>r=>{const{libraryOptions:s,target:o}=r??{},i=Ui({...s??{},target:o,io:t,processors:n});return qi(e,i),Ji(i,e),Zi(i,e)},Vi={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Yi=(e,t,n,r)=>{const s=e._zod.def;qi(s.innerType,t,r),t.seen.get(e).ref=s.innerType},Qi=cs("ZodISODateTime",(e,t)=>{qo.init(e,t),wa.init(e,t)});const Xi=cs("ZodISODate",(e,t)=>{Jo.init(e,t),wa.init(e,t)});const ea=cs("ZodISOTime",(e,t)=>{Zo.init(e,t),wa.init(e,t)});const ta=cs("ZodISODuration",(e,t)=>{Go.init(e,t),wa.init(e,t)});const na=(e,t)=>{Ms.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t=e=>e.message){const n={_errors:[]},r=e=>{for(const s of e.issues)if("invalid_union"===s.code&&s.errors.length)s.errors.map(e=>r({issues:e}));else if("invalid_key"===s.code)r({issues:s.issues});else if("invalid_element"===s.code)r({issues:s.issues});else if(0===s.path.length)n._errors.push(t(s));else{let e=n,r=0;for(;r<s.path.length;){const n=s.path[r];r===s.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(s))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){const n={},r=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,hs,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,hs,2)}},isEmpty:{get:()=>0===e.issues.length}})};cs("ZodError",na);const ra=cs("ZodError",na,{Parent:Error}),sa=zs(ra),oa=Hs(ra),ia=Ks(ra),aa=qs(ra),ca=(va=ra,(e,t,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return zs(va)(e,t,r)}),ua=(e=>(t,n,r)=>zs(e)(t,n,r))(ra),la=(e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Hs(e)(t,n,s)})(ra),fa=(e=>async(t,n,r)=>Hs(e)(t,n,r))(ra),pa=(e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ks(e)(t,n,s)})(ra),da=(e=>(t,n,r)=>Ks(e)(t,n,r))(ra),ha=(e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return qs(e)(t,n,s)})(ra),ma=(e=>async(t,n,r)=>qs(e)(t,n,r))(ra),ga=cs("ZodType",(e,t)=>(xo.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Wi(e,"input"),output:Wi(e,"output")}}),e.toJSONSchema=((e,t={})=>n=>{const r=Ui({...n,processors:t});return qi(e,r),Ji(r,e),Zi(r,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(ws(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>Ts(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>sa(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>ia(e,t,n),e.parseAsync=async(t,n)=>oa(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>aa(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>ca(e,t,n),e.decode=(t,n)=>ua(e,t,n),e.encodeAsync=async(t,n)=>la(e,t,n),e.decodeAsync=async(t,n)=>fa(e,t,n),e.safeEncode=(t,n)=>pa(e,t,n),e.safeDecode=(t,n)=>da(e,t,n),e.safeEncodeAsync=async(t,n)=>ha(e,t,n),e.safeDecodeAsync=async(t,n)=>ma(e,t,n),e.refine=(t,n)=>e.check(function(e,t={}){return function(e,t,n){return new pc({type:"custom",check:"custom",fn:t,...xs(n)})}(0,e,t)}(t,n)),e.superRefine=t=>e.check(function(e){const t=function(e){const t=new yo({check:"custom",...xs(void 0)});return t._zod.check=e,t}(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(Is(e,n.value,t._zod.def));else{const r=e;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(Is(r))}},e(n.value,n)));return t}(t)),e.overwrite=t=>e.check(Ki(t)),e.optional=()=>tc(e),e.exactOptional=()=>new nc({type:"optional",innerType:e}),e.nullable=()=>sc(e),e.nullish=()=>tc(sc(e)),e.nonoptional=t=>function(e,t){return new ac({type:"nonoptional",innerType:e,...xs(t)})}(e,t),e.array=()=>Ja(e),e.or=t=>Wa([e,t]),e.and=t=>new Va({type:"intersection",left:e,right:t}),e.transform=t=>lc(e,new Xa({type:"transform",transform:t})),e.default=t=>{return n=t,new oc({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():Cs(n)}});var n},e.prefault=t=>{return n=t,new ic({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():Cs(n)}});var n},e.catch=t=>{return new cc({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>lc(e,t),e.readonly=()=>new fc({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return ji.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>ji.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return ji.get(e);const n=e.clone();return ji.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),ya=cs("_ZodString",(e,t)=>{No.init(e,t),ga.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=n;r.type="string";const{minimum:s,maximum:o,format:i,patterns:a,contentEncoding:c}=e._zod.bag;if("number"==typeof s&&(r.minLength=s),"number"==typeof o&&(r.maxLength=o),i&&(r.format=Vi[i]??i,""===r.format&&delete r.format,"time"===i&&delete r.format),c&&(r.contentEncoding=c),a&&a.size>0){const e=[...a];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,n);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(function(e,t){return new _o({check:"string_format",format:"regex",...xs(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new ko({check:"string_format",format:"includes",...xs(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new Ao({check:"string_format",format:"starts_with",...xs(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new Co({check:"string_format",format:"ends_with",...xs(t),suffix:e})}(...t)),e.min=(...t)=>e.check(zi(...t)),e.max=(...t)=>e.check(Bi(...t)),e.length=(...t)=>e.check(Hi(...t)),e.nonempty=(...t)=>e.check(zi(1,...t)),e.lowercase=t=>e.check(function(e){return new So({check:"string_format",format:"lowercase",...xs(e)})}(t)),e.uppercase=t=>e.check(function(e){return new Eo({check:"string_format",format:"uppercase",...xs(e)})}(t)),e.trim=()=>e.check(Ki(e=>e.trim())),e.normalize=(...t)=>e.check(function(e){return Ki(t=>t.normalize(e))}(...t)),e.toLowerCase=()=>e.check(Ki(e=>e.toLowerCase())),e.toUpperCase=()=>e.check(Ki(e=>e.toUpperCase())),e.slugify=()=>e.check(Ki(e=>function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}(e)))}),ba=cs("ZodString",(e,t)=>{No.init(e,t),ya.init(e,t),e.email=t=>e.check(function(e,t){return new _a({type:"string",format:"email",check:"string_format",abort:!1,...xs(t)})}(0,t)),e.url=t=>e.check(function(e,t){return new ka({type:"string",format:"url",check:"string_format",abort:!1,...xs(t)})}(0,t)),e.jwt=t=>e.check(function(e,t){return new Ba({type:"string",format:"jwt",check:"string_format",abort:!1,...xs(t)})}(0,t)),e.emoji=t=>e.check(function(e,t){return new Aa({type:"string",format:"emoji",check:"string_format",abort:!1,...xs(t)})}(0,t)),e.guid=t=>e.check(Mi(Sa,t)),e.uuid=t=>e.check(function(e,t){return new Ea({type:"string",format:"uuid",check:"string_format",abort:!1,...xs(t)})}(0,t)),e.uuidv4=t=>e.check(function(e,t){return new Ea({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...xs(t)})}(0,t)),e.uuidv6=t=>e.check(function(e,t){return new Ea({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...xs(t)})}(0,t)),e.uuidv7=t=>e.check(function(e,t){return new Ea({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...xs(t)})}(0,t)),e.nanoid=t=>e.check(function(e,t){return new Ca({type:"string",format:"nanoid",check:"string_format",abort:!1,...xs(t)})}(0,t)),e.guid=t=>e.check(Mi(Sa,t)),e.cuid=t=>e.check(function(e,t){return new Oa({type:"string",format:"cuid",check:"string_format",abort:!1,...xs(t)})}(0,t)),e.cuid2=t=>e.check(function(e,t){return new Pa({type:"string",format:"cuid2",check:"string_format",abort:!1,...xs(t)})}(0,t)),e.ulid=t=>e.check(function(e,t){return new Ta({type:"string",format:"ulid",check:"string_format",abort:!1,...xs(t)})}(0,t)),e.base64=t=>e.check(function(e,t){return new Ia({type:"string",format:"base64",check:"string_format",abort:!1,...xs(t)})}(0,t)),e.base64url=t=>e.check(function(e,t){return new ja({type:"string",format:"base64url",check:"string_format",abort:!1,...xs(t)})}(0,t)),e.xid=t=>e.check(function(e,t){return new xa({type:"string",format:"xid",check:"string_format",abort:!1,...xs(t)})}(0,t)),e.ksuid=t=>e.check(function(e,t){return new Na({type:"string",format:"ksuid",check:"string_format",abort:!1,...xs(t)})}(0,t)),e.ipv4=t=>e.check(function(e,t){return new $a({type:"string",format:"ipv4",check:"string_format",abort:!1,...xs(t)})}(0,t)),e.ipv6=t=>e.check(function(e,t){return new La({type:"string",format:"ipv6",check:"string_format",abort:!1,...xs(t)})}(0,t)),e.cidrv4=t=>e.check(function(e,t){return new Ra({type:"string",format:"cidrv4",check:"string_format",abort:!1,...xs(t)})}(0,t)),e.cidrv6=t=>e.check(function(e,t){return new Fa({type:"string",format:"cidrv6",check:"string_format",abort:!1,...xs(t)})}(0,t)),e.e164=t=>e.check(function(e,t){return new Ma({type:"string",format:"e164",check:"string_format",abort:!1,...xs(t)})}(0,t)),e.datetime=t=>e.check(function(e){return new Qi({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...xs(e)})}(t)),e.date=t=>e.check(function(e){return new Xi({type:"string",format:"date",check:"string_format",...xs(e)})}(t)),e.time=t=>e.check(function(e){return new ea({type:"string",format:"time",check:"string_format",precision:null,...xs(e)})}(t)),e.duration=t=>e.check(function(e){return new ta({type:"string",format:"duration",check:"string_format",...xs(e)})}(t))});var va;function Da(e){return new ba({type:"string",...xs(e)})}const wa=cs("ZodStringFormat",(e,t)=>{$o.init(e,t),ya.init(e,t)}),_a=cs("ZodEmail",(e,t)=>{Fo.init(e,t),wa.init(e,t)}),Sa=cs("ZodGUID",(e,t)=>{Lo.init(e,t),wa.init(e,t)}),Ea=cs("ZodUUID",(e,t)=>{Ro.init(e,t),wa.init(e,t)}),ka=cs("ZodURL",(e,t)=>{Io.init(e,t),wa.init(e,t)}),Aa=cs("ZodEmoji",(e,t)=>{jo.init(e,t),wa.init(e,t)}),Ca=cs("ZodNanoID",(e,t)=>{Mo.init(e,t),wa.init(e,t)}),Oa=cs("ZodCUID",(e,t)=>{Bo.init(e,t),wa.init(e,t)}),Pa=cs("ZodCUID2",(e,t)=>{zo.init(e,t),wa.init(e,t)}),Ta=cs("ZodULID",(e,t)=>{Ho.init(e,t),wa.init(e,t)}),xa=cs("ZodXID",(e,t)=>{Ko.init(e,t),wa.init(e,t)}),Na=cs("ZodKSUID",(e,t)=>{Uo.init(e,t),wa.init(e,t)}),$a=cs("ZodIPv4",(e,t)=>{Wo.init(e,t),wa.init(e,t)}),La=cs("ZodIPv6",(e,t)=>{Vo.init(e,t),wa.init(e,t)}),Ra=cs("ZodCIDRv4",(e,t)=>{Yo.init(e,t),wa.init(e,t)}),Fa=cs("ZodCIDRv6",(e,t)=>{Qo.init(e,t),wa.init(e,t)}),Ia=cs("ZodBase64",(e,t)=>{ei.init(e,t),wa.init(e,t)}),ja=cs("ZodBase64URL",(e,t)=>{ti.init(e,t),wa.init(e,t)}),Ma=cs("ZodE164",(e,t)=>{ni.init(e,t),wa.init(e,t)}),Ba=cs("ZodJWT",(e,t)=>{ri.init(e,t),wa.init(e,t)}),za=cs("ZodUnknown",(e,t)=>{si.init(e,t),ga.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Ha(){return new za({type:"unknown"})}const Ka=cs("ZodNever",(e,t)=>{oi.init(e,t),ga.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.not={}})(0,0,t)});function Ua(e){return new Ka({type:"never",...xs(e)})}const qa=cs("ZodArray",(e,t)=>{ai.init(e,t),ga.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=n,o=e._zod.def,{minimum:i,maximum:a}=e._zod.bag;"number"==typeof i&&(s.minItems=i),"number"==typeof a&&(s.maxItems=a),s.type="array",s.items=qi(o.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(zi(t,n)),e.nonempty=t=>e.check(zi(1,t)),e.max=(t,n)=>e.check(Bi(t,n)),e.length=(t,n)=>e.check(Hi(t,n)),e.unwrap=()=>e.element});function Ja(e,t){return function(e,t,n){return new qa({type:"array",element:t,...xs(n)})}(0,e,t)}const Za=cs("ZodObject",(e,t)=>{pi.init(e,t),ga.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=n,o=e._zod.def;s.type="object",s.properties={};const i=o.shape;for(const e in i)s.properties[e]=qi(i[e],t,{...r,path:[...r.path,"properties",e]});const a=new Set(Object.keys(i)),c=new Set([...a].filter(e=>{const n=o.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));c.size>0&&(s.required=Array.from(c)),"never"===o.catchall?._zod.def.type?s.additionalProperties=!1:o.catchall?o.catchall&&(s.additionalProperties=qi(o.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(s.additionalProperties=!1)})(e,t,n,r),vs(e,"shape",()=>t.shape),e.keyof=()=>function(e){const t=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Qa({type:"enum",entries:t,...xs(void 0)})}(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ha()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ha()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ua()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!As(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const n=e._zod.def.shape;for(const e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const r=ws(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Ds(this,"shape",n),n}});return Ts(e,r)}(e,t),e.safeExtend=t=>function(e,t){if(!As(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=ws(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Ds(this,"shape",n),n}});return Ts(e,n)}(e,t),e.merge=t=>function(e,t){const n=ws(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return Ds(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Ts(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return Ts(e,ws(e._zod.def,{get shape(){const e={};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Ds(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=ws(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Ds(this,"shape",r),r},checks:[]});return Ts(e,s)}(e,t),e.partial=(...t)=>function(e,t,n){const r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const s=ws(t._zod.def,{get shape(){const r=t._zod.def.shape,s={...r};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(s[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(const t in r)s[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return Ds(this,"shape",s),s},checks:[]});return Ts(t,s)}(ec,e,t[0]),e.required=(...t)=>function(e,t,n){const r=ws(t._zod.def,{get shape(){const r=t._zod.def.shape,s={...r};if(n)for(const t in n){if(!(t in s))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(s[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(const t in r)s[t]=new e({type:"nonoptional",innerType:r[t]});return Ds(this,"shape",s),s}});return Ts(t,r)}(ac,e,t[0])}),Ga=cs("ZodUnion",(e,t)=>{hi.init(e,t),ga.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def,o=!1===s.inclusive,i=s.options.map((e,n)=>qi(e,t,{...r,path:[...r.path,o?"oneOf":"anyOf",n]}));o?n.oneOf=i:n.anyOf=i})(e,t,n,r),e.options=t.options});function Wa(e,t){return new Ga({type:"union",options:e,...xs(t)})}const Va=cs("ZodIntersection",(e,t)=>{mi.init(e,t),ga.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def,o=qi(s.left,t,{...r,path:[...r.path,"allOf",0]}),i=qi(s.right,t,{...r,path:[...r.path,"allOf",1]}),a=e=>"allOf"in e&&1===Object.keys(e).length,c=[...a(o)?o.allOf:[o],...a(i)?i.allOf:[i]];n.allOf=c})(e,t,n,r)}),Ya=cs("ZodRecord",(e,t)=>{bi.init(e,t),ga.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=n,o=e._zod.def;s.type="object";const i=o.keyType,a=i._zod.bag,c=a?.patterns;if("loose"===o.mode&&c&&c.size>0){const e=qi(o.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});s.patternProperties={};for(const t of c)s.patternProperties[t.source]=e}else"draft-07"!==t.target&&"draft-2020-12"!==t.target||(s.propertyNames=qi(o.keyType,t,{...r,path:[...r.path,"propertyNames"]})),s.additionalProperties=qi(o.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const u=i._zod.values;if(u){const e=[...u].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(s.required=e)}})(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),Qa=cs("ZodEnum",(e,t)=>{vi.init(e,t),ga.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=ds(e._zod.def.entries);r.every(e=>"number"==typeof e)&&(n.type="number"),r.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=r})(e,0,n),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const s={};for(const r of e){if(!n.has(r))throw new Error(`Key ${r} not found in enum`);s[r]=t.entries[r]}return new Qa({...t,checks:[],...xs(r),entries:s})},e.exclude=(e,r)=>{const s={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete s[t]}return new Qa({...t,checks:[],...xs(r),entries:s})}}),Xa=cs("ZodTransform",(e,t)=>{Di.init(e,t),ga.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema")})(0,e),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new ls(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(Is(r,n.value,t));else{const t=r;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(Is(t))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(e=>(n.value=e,n)):(n.value=s,n)}}),ec=cs("ZodOptional",(e,t)=>{_i.init(e,t),ga.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yi(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});function tc(e){return new ec({type:"optional",innerType:e})}const nc=cs("ZodExactOptional",(e,t)=>{Si.init(e,t),ga.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yi(e,t,0,r),e.unwrap=()=>e._zod.def.innerType}),rc=cs("ZodNullable",(e,t)=>{Ei.init(e,t),ga.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def,o=qi(s.innerType,t,r),i=t.seen.get(e);"openapi-3.0"===t.target?(i.ref=s.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function sc(e){return new rc({type:"nullable",innerType:e})}const oc=cs("ZodDefault",(e,t)=>{ki.init(e,t),ga.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def;qi(s.innerType,t,r),t.seen.get(e).ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),ic=cs("ZodPrefault",(e,t)=>{Ci.init(e,t),ga.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def;qi(s.innerType,t,r),t.seen.get(e).ref=s.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),ac=cs("ZodNonOptional",(e,t)=>{Oi.init(e,t),ga.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def;qi(s.innerType,t,r),t.seen.get(e).ref=s.innerType})(e,t,0,r),e.unwrap=()=>e._zod.def.innerType}),cc=cs("ZodCatch",(e,t)=>{Ti.init(e,t),ga.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def;let o;qi(s.innerType,t,r),t.seen.get(e).ref=s.innerType;try{o=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=o})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),uc=cs("ZodPipe",(e,t)=>{xi.init(e,t),ga.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def,o="input"===t.io?"transform"===s.in._zod.def.type?s.out:s.in:s.out;qi(o,t,r),t.seen.get(e).ref=o})(e,t,0,r),e.in=t.in,e.out=t.out});function lc(e,t){return new uc({type:"pipe",in:e,out:t})}const fc=cs("ZodReadonly",(e,t)=>{$i.init(e,t),ga.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def;qi(s.innerType,t,r),t.seen.get(e).ref=s.innerType,n.readOnly=!0})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),pc=cs("ZodCustom",(e,t)=>{Ri.init(e,t),ga.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")})(0,e)}),dc=Ja(Da()).default([]).optional(),hc=Wa([Da(),Ja(Da())]),mc=(gc=Da(),yc=hc,new Ya({type:"record",keyType:gc,valueType:yc,...xs(undefined)})).optional();var gc,yc;function bc(e,t){const n=t.replace(/\\/g,"/").replace(/^\.\/+/,""),r=`${n}/system`,s=`${n}/output`,o=`${n}/diff`,i=`${n}/dist`,a=`${n}/patch`,c=`${n}/imports`;return{rootRel:n,systemRel:r,outputRel:s,diffRel:o,distRel:i,patchRel:a,importsRel:c,rootAbs:h(e,n),systemAbs:h(e,r),outputAbs:h(e,s),diffAbs:h(e,o),distAbs:h(e,i),patchAbs:h(e,a),importsAbs:h(e,c)}}(function(){const e={type:"object",shape:{stanPath:Da().min(1,{message:"stanPath must be a non-empty string"}),includes:dc,excludes:dc,imports:mc}??{},...xs(void 0)};return new Za(e)})().strict();var vc={makeStanDirs:bc},Dc=Object.freeze({__proto__:null,default:vc,makeStanDirs:bc});async function wc({cwd:e,stanPath:n,baseName:r,includes:s,excludes:o,updateSnapshot:i="createIfMissing",includeOutputDirInDiff:u=!1,anchors:l,onArchiveWarnings:f}){const{outDir:p,diffDir:d}=await be(e,n),m=await de(e),y=await ge(m,{cwd:e,stanPath:n,includeOutputDir:!1,includes:s??[],excludes:o??[],anchors:l??[]}),b=await(async(e,t)=>{const n={};for(const r of t){const t=h(e,r),s=await a(t),o=S("sha256").update(s).digest("hex");n[r]=o}return n})(e,y),v=(e=>g(e,".archive.snapshot.json"))(d),D=t(v),w=D?JSON.parse(await a(v,"utf8")):{},_=D?y.filter(e=>!w[e]||w[e]!==b[e]):[...y],E=await(async()=>{try{const e=await import("./classifier-Bqzr65UC-DJLYQY2b.js"),t=e.classifyForArchive,n=e.default?.classifyForArchive,r="function"==typeof t?t:n;if("function"==typeof r)return r}catch{}throw new Error("classifyForArchive export not found in ./classifier")})(),{textFiles:k,warningsBody:A}=await E(e,_),C=k;U(A,f);const O=g(p,`${r}.diff.tar`),P=await import("./index-CQYvnMvw-r3et3BtD.js");if(u)await P.create({file:O,cwd:e,filter:H(n)},K(C,n));else if(0===C.length){const t=(e=>g(e,".stan_no_changes"))(d);await c(t,"no changes","utf8");const r=[`${n.replace(/\\/g,"/")}/diff/.stan_no_changes`];await P.create({file:O,cwd:e},r)}else{const t=Array.from(new Set([...C]));await P.create({file:O,cwd:e},t)}return"replace"===i?await c(v,JSON.stringify(b,null,2),"utf8"):"createIfMissing"!==i||D||await c(v,JSON.stringify(b,null,2),"utf8"),{diffPath:O}}var _c,Sc={},Ec={},kc={};var Ac,Cc={};var Oc,Pc,Tc={},xc={};var Nc,$c,Lc,Rc,Fc,Ic,jc={};function Mc(){if(Rc)return Lc;Rc=1;var e=$c?Nc:($c=1,Nc=function(e){if("string"!=typeof e||""===e)return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1}),t={"{":"}","(":")","[":"]"},n=function(e){if("!"===e[0])return!0;for(var n=0,r=-2,s=-2,o=-2,i=-2,a=-2;n<e.length;){if("*"===e[n])return!0;if("?"===e[n+1]&&/[\].+)]/.test(e[n]))return!0;if(-1!==s&&"["===e[n]&&"]"!==e[n+1]&&(s<n&&(s=e.indexOf("]",n)),s>n)){if(-1===a||a>s)return!0;if(-1===(a=e.indexOf("\\",n))||a>s)return!0}if(-1!==o&&"{"===e[n]&&"}"!==e[n+1]&&(o=e.indexOf("}",n))>n&&(-1===(a=e.indexOf("\\",n))||a>o))return!0;if(-1!==i&&"("===e[n]&&"?"===e[n+1]&&/[:!=]/.test(e[n+2])&&")"!==e[n+3]&&(i=e.indexOf(")",n))>n&&(-1===(a=e.indexOf("\\",n))||a>i))return!0;if(-1!==r&&"("===e[n]&&"|"!==e[n+1]&&(r<n&&(r=e.indexOf("|",n)),-1!==r&&")"!==e[r+1]&&(i=e.indexOf(")",r))>r&&(-1===(a=e.indexOf("\\",r))||a>i)))return!0;if("\\"===e[n]){var c=e[n+1];n+=2;var u=t[c];if(u){var l=e.indexOf(u,n);-1!==l&&(n=l+1)}if("!"===e[n])return!0}else n++}return!1},r=function(e){if("!"===e[0])return!0;for(var n=0;n<e.length;){if(/[*?{}()[\]]/.test(e[n]))return!0;if("\\"===e[n]){var r=e[n+1];n+=2;var s=t[r];if(s){var o=e.indexOf(s,n);-1!==o&&(n=o+1)}if("!"===e[n])return!0}else n++}return!1};return Lc=function(t,s){if("string"!=typeof t||""===t)return!1;if(e(t))return!0;var o=n;return s&&!1===s.strict&&(o=r),o(t)}}var Bc,zc,Hc,Kc,Uc,qc,Jc,Zc,Gc,Wc,Vc,Yc,Qc,Xc,eu,tu,nu,ru,su,ou={};function iu(){return Bc||(Bc=1,(e=ou).isInteger=e=>"number"==typeof e?Number.isInteger(e):"string"==typeof e&&""!==e.trim()&&Number.isInteger(Number(e)),e.find=(e,t)=>e.nodes.find(e=>e.type===t),e.exceedsLimit=(t,n,r=1,s)=>!1!==s&&!(!e.isInteger(t)||!e.isInteger(n))&&(Number(n)-Number(t))/Number(r)>=s,e.escapeNode=(e,t=0,n)=>{const r=e.nodes[t];r&&(n&&r.type===n||"open"===r.type||"close"===r.type)&&!0!==r.escaped&&(r.value="\\"+r.value,r.escaped=!0)},e.encloseBrace=e=>!("brace"!==e.type||e.commas>>0+e.ranges|0||(e.invalid=!0,0)),e.isInvalidBrace=e=>!("brace"!==e.type||!0!==e.invalid&&!e.dollar&&(e.commas>>0+e.ranges|0&&!0===e.open&&!0===e.close||(e.invalid=!0,0))),e.isOpenOrClose=e=>"open"===e.type||"close"===e.type||!0===e.open||!0===e.close,e.reduce=e=>e.reduce((e,t)=>("text"===t.type&&e.push(t.value),"range"===t.type&&(t.type="text"),e),[]),e.flatten=(...e)=>{const t=[],n=e=>{for(let r=0;r<e.length;r++){const s=e[r];Array.isArray(s)?n(s):void 0!==s&&t.push(s)}return t};return n(e),t}),ou;var e}function au(){if(Hc)return zc;Hc=1;const e=iu();return zc=(t,n={})=>{const r=(t,s={})=>{const o=n.escapeInvalid&&e.isInvalidBrace(s),i=!0===t.invalid&&!0===n.escapeInvalid;let a="";if(t.value)return(o||i)&&e.isOpenOrClose(t)?"\\"+t.value:t.value;if(t.value)return t.value;if(t.nodes)for(const e of t.nodes)a+=r(e);return a};return r(t)}}function cu(){if(Jc)return qc;Jc=1;const e=Uc?Kc:(Uc=1,Kc=function(e){return"number"==typeof e?e-e===0:"string"==typeof e&&""!==e.trim()&&(Number.isFinite?Number.isFinite(+e):isFinite(+e))}),t=(n,o,i)=>{if(!1===e(n))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===o||n===o)return String(n);if(!1===e(o))throw new TypeError("toRegexRange: expected the second argument to be a number.");let a={relaxZeros:!0,...i};"boolean"==typeof a.strictZeros&&(a.relaxZeros=!1===a.strictZeros);let c=n+":"+o+"="+String(a.relaxZeros)+String(a.shorthand)+String(a.capture)+String(a.wrap);if(t.cache.hasOwnProperty(c))return t.cache[c].result;let u=Math.min(n,o),l=Math.max(n,o);if(1===Math.abs(u-l)){let e=n+"|"+o;return a.capture?`(${e})`:!1===a.wrap?e:`(?:${e})`}let p=f(n)||f(o),d={min:n,max:o,a:u,b:l},h=[],m=[];return p&&(d.isPadded=p,d.maxLen=String(d.max).length),u<0&&(m=r(l<0?Math.abs(l):1,Math.abs(u),d,a),u=d.a=0),l>=0&&(h=r(u,l,d,a)),d.negatives=m,d.positives=h,d.result=function(e,t){let n=s(e,t,"-",!1)||[],r=s(t,e,"",!1)||[],o=s(e,t,"-?",!0)||[];return n.concat(o).concat(r).join("|")}(m,h),!0===a.capture?d.result=`(${d.result})`:!1!==a.wrap&&h.length+m.length>1&&(d.result=`(?:${d.result})`),t.cache[c]=d,d.result};function n(e,t,n){if(e===t)return{pattern:e,count:[],digits:0};let r=function(e,t){let n=[];for(let r=0;r<e.length;r++)n.push([e[r],t[r]]);return n}(e,t),s=r.length,o="",i=0;for(let e=0;e<s;e++){let[t,n]=r[e];t===n?o+=t:"0"!==t||"9"!==n?o+=l(t,n):i++}return i&&(o+=!0===n.shorthand?"\\d":"[0-9]"),{pattern:o,count:[i],digits:s}}function r(e,t,r,s){let i,l=function(e,t){let n=1,r=1,s=a(e,n),i=new Set([t]);for(;e<=s&&s<=t;)i.add(s),n+=1,s=a(e,n);for(s=c(t+1,r)-1;e<s&&s<=t;)i.add(s),r+=1,s=c(t+1,r)-1;return i=[...i],i.sort(o),i}(e,t),f=[],d=e;for(let e=0;e<l.length;e++){let t=l[e],o=n(String(d),String(t),s),a="";r.isPadded||!i||i.pattern!==o.pattern?(r.isPadded&&(a=p(t,r,s)),o.string=a+o.pattern+u(o.count),f.push(o),d=t+1,i=o):(i.count.length>1&&i.count.pop(),i.count.push(o.count[0]),i.string=i.pattern+u(i.count),d=t+1)}return f}function s(e,t,n,r,s){let o=[];for(let s of e){let{string:e}=s;r||i(t,"string",e)||o.push(n+e),r&&i(t,"string",e)&&o.push(n+e)}return o}function o(e,t){return e>t?1:t>e?-1:0}function i(e,t,n){return e.some(e=>e[t]===n)}function a(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function c(e,t){return e-e%Math.pow(10,t)}function u(e){let[t=0,n=""]=e;return n||t>1?`{${t+(n?","+n:"")}}`:""}function l(e,t,n){return`[${e}${t-e===1?"":"-"}${t}]`}function f(e){return/^-?(0+)\d/.test(e)}function p(e,t,n){if(!t.isPadded)return e;let r=Math.abs(t.maxLen-String(e).length),s=!1!==n.relaxZeros;switch(r){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:return s?`0{0,${r}}`:`0{${r}}`}}return t.cache={},t.clearCache=()=>t.cache={},qc=t}function uu(){if(Gc)return Zc;Gc=1;const e=C,t=cu(),n=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),r=e=>"number"==typeof e||"string"==typeof e&&""!==e,s=e=>Number.isInteger(+e),o=e=>{let t=`${e}`,n=-1;if("-"===t[0]&&(t=t.slice(1)),"0"===t)return!1;for(;"0"===t[++n];);return n>0},i=(e,t,n)=>{if(t>0){let n="-"===e[0]?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return!1===n?String(e):e},a=(e,t)=>{let n="-"===e[0]?"-":"";for(n&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return n?"-"+e:e},c=(e,n,r,s)=>{if(r)return t(e,n,{wrap:!1,...s});let o=String.fromCharCode(e);return e===n?o:`[${o}-${String.fromCharCode(n)}]`},u=(e,n,r)=>{if(Array.isArray(e)){let t=!0===r.wrap,n=r.capture?"":"?:";return t?`(${n}${e.join("|")})`:e.join("|")}return t(e,n,r)},l=(...t)=>new RangeError("Invalid range arguments: "+e.inspect(...t)),f=(e,t,n)=>{if(!0===n.strictRanges)throw l([e,t]);return[]},p=(e,t,n=1,r={})=>{let s=Number(e),f=Number(t);if(!Number.isInteger(s)||!Number.isInteger(f)){if(!0===r.strictRanges)throw l([e,t]);return[]}0===s&&(s=0),0===f&&(f=0);let p=s>f,d=String(e),h=String(t),m=String(n);n=Math.max(Math.abs(n),1);let g=o(d)||o(h)||o(m),y=g?Math.max(d.length,h.length,m.length):0,b=!1===g&&!1===((e,t,n)=>"string"==typeof e||"string"==typeof t||!0===n.stringify)(e,t,r),v=r.transform||(e=>t=>!0===e?Number(t):String(t))(b);if(r.toRegex&&1===n)return c(a(e,y),a(t,y),!0,r);let D={negatives:[],positives:[]},w=e=>D[e<0?"negatives":"positives"].push(Math.abs(e)),_=[],S=0;for(;p?s>=f:s<=f;)!0===r.toRegex&&n>1?w(s):_.push(i(v(s,S),y,b)),s=p?s-n:s+n,S++;return!0===r.toRegex?n>1?((e,t,n)=>{e.negatives.sort((e,t)=>e<t?-1:e>t?1:0),e.positives.sort((e,t)=>e<t?-1:e>t?1:0);let r,s=t.capture?"":"?:",o="",i="";return e.positives.length&&(o=e.positives.map(e=>a(String(e),n)).join("|")),e.negatives.length&&(i=`-(${s}${e.negatives.map(e=>a(String(e),n)).join("|")})`),r=o&&i?`${o}|${i}`:o||i,t.wrap?`(${s}${r})`:r})(D,r,y):u(_,null,{wrap:!1,...r}):_},d=(e,t,o,i={})=>{if(null==t&&r(e))return[e];if(!r(e)||!r(t))return f(e,t,i);if("function"==typeof o)return d(e,t,1,{transform:o});if(n(o))return d(e,t,0,o);let a={...i};return!0===a.capture&&(a.wrap=!0),o=o||a.step||1,s(o)?s(e)&&s(t)?p(e,t,o,a):((e,t,n=1,r={})=>{if(!s(e)&&e.length>1||!s(t)&&t.length>1)return f(e,t,r);let o=r.transform||(e=>String.fromCharCode(e)),i=`${e}`.charCodeAt(0),a=`${t}`.charCodeAt(0),l=i>a,p=Math.min(i,a),d=Math.max(i,a);if(r.toRegex&&1===n)return c(p,d,!1,r);let h=[],m=0;for(;l?i>=a:i<=a;)h.push(o(i,m)),i=l?i-n:i+n,m++;return!0===r.toRegex?u(h,null,{wrap:!1,options:r}):h})(e,t,Math.max(Math.abs(o),1),a):null==o||n(o)?d(e,t,1,o):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(o,a)};return Zc=d}function lu(){if(su)return ru;su=1;const e=au(),t=function(){if(Vc)return Wc;Vc=1;const e=uu(),t=iu();return Wc=(n,r={})=>{const s=(n,o={})=>{const i=t.isInvalidBrace(o),a=!0===n.invalid&&!0===r.escapeInvalid,c=!0===i||!0===a,u=!0===r.escapeInvalid?"\\":"";let l="";if(!0===n.isOpen)return u+n.value;if(!0===n.isClose)return console.log("node.isClose",u,n.value),u+n.value;if("open"===n.type)return c?u+n.value:"(";if("close"===n.type)return c?u+n.value:")";if("comma"===n.type)return"comma"===n.prev.type?"":c?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){const s=t.reduce(n.nodes),o=e(...s,{...r,wrap:!1,toRegex:!0,strictZeros:!0});if(0!==o.length)return s.length>1&&o.length>1?`(${o})`:o}if(n.nodes)for(const e of n.nodes)l+=s(e,n);return l};return s(n)}}(),n=function(){if(Qc)return Yc;Qc=1;const e=uu(),t=au(),n=iu(),r=(e="",t="",s=!1)=>{const o=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return s?n.flatten(t).map(e=>`{${e}}`):t;for(const n of e)if(Array.isArray(n))for(const e of n)o.push(r(e,t,s));else for(let e of t)!0===s&&"string"==typeof e&&(e=`{${e}}`),o.push(Array.isArray(e)?r(n,e,s):n+e);return n.flatten(o)};return Yc=(s,o={})=>{const i=void 0===o.rangeLimit?1e3:o.rangeLimit,a=(s,c={})=>{s.queue=[];let u=c,l=c.queue;for(;"brace"!==u.type&&"root"!==u.type&&u.parent;)u=u.parent,l=u.queue;if(s.invalid||s.dollar)return void l.push(r(l.pop(),t(s,o)));if("brace"===s.type&&!0!==s.invalid&&2===s.nodes.length)return void l.push(r(l.pop(),["{}"]));if(s.nodes&&s.ranges>0){const a=n.reduce(s.nodes);if(n.exceedsLimit(...a,o.step,i))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let c=e(...a,o);return 0===c.length&&(c=t(s,o)),l.push(r(l.pop(),c)),void(s.nodes=[])}const f=n.encloseBrace(s);let p=s.queue,d=s;for(;"brace"!==d.type&&"root"!==d.type&&d.parent;)d=d.parent,p=d.queue;for(let e=0;e<s.nodes.length;e++){const t=s.nodes[e];"comma"!==t.type||"brace"!==s.type?"close"!==t.type?t.value&&"open"!==t.type?p.push(r(p.pop(),t.value)):t.nodes&&a(t,s):l.push(r(l.pop(),p,f)):(1===e&&p.push(""),p.push(""))}return p};return n.flatten(a(s))},Yc}(),r=function(){if(nu)return tu;nu=1;const e=au(),{MAX_LENGTH:t,CHAR_BACKSLASH:n,CHAR_BACKTICK:r,CHAR_COMMA:s,CHAR_DOT:o,CHAR_LEFT_PARENTHESES:i,CHAR_RIGHT_PARENTHESES:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_RIGHT_CURLY_BRACE:u,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_RIGHT_SQUARE_BRACKET:f,CHAR_DOUBLE_QUOTE:p,CHAR_SINGLE_QUOTE:d,CHAR_NO_BREAK_SPACE:h,CHAR_ZERO_WIDTH_NOBREAK_SPACE:m}=eu?Xc:(eu=1,Xc={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"});return tu=(g,y={})=>{if("string"!=typeof g)throw new TypeError("Expected a string");const b=y||{},v="number"==typeof b.maxLength?Math.min(t,b.maxLength):t;if(g.length>v)throw new SyntaxError(`Input length (${g.length}), exceeds max characters (${v})`);const D={type:"root",input:g,nodes:[]},w=[D];let _=D,S=D,E=0;const k=g.length;let A,C=0,O=0;const P=()=>g[C++],T=e=>{if("text"===e.type&&"dot"===S.type&&(S.type="text"),!S||"text"!==S.type||"text"!==e.type)return _.nodes.push(e),e.parent=_,e.prev=S,S=e,e;S.value+=e.value};for(T({type:"bos"});C<k;)if(_=w[w.length-1],A=P(),A!==m&&A!==h)if(A!==n)if(A!==f){if(A===l){let e;for(E++;C<k&&(e=P());)if(A+=e,e!==l)if(e!==n){if(e===f&&(E--,0===E))break}else A+=P();else E++;T({type:"text",value:A});continue}if(A!==i)if(A!==a){if(A===p||A===d||A===r){const e=A;let t;for(!0!==y.keepQuotes&&(A="");C<k&&(t=P());)if(t!==n){if(t===e){!0===y.keepQuotes&&(A+=t);break}A+=t}else A+=t+P();T({type:"text",value:A});continue}if(A===c){O++;const e=S.value&&"$"===S.value.slice(-1)||!0===_.dollar;_=T({type:"brace",open:!0,close:!1,dollar:e,depth:O,commas:0,ranges:0,nodes:[]}),w.push(_),T({type:"open",value:A});continue}if(A===u){if("brace"!==_.type){T({type:"text",value:A});continue}const e="close";_=w.pop(),_.close=!0,T({type:e,value:A}),O--,_=w[w.length-1];continue}if(A===s&&O>0){if(_.ranges>0){_.ranges=0;const t=_.nodes.shift();_.nodes=[t,{type:"text",value:e(_)}]}T({type:"comma",value:A}),_.commas++}else{if(A===o&&O>0&&0===_.commas){const e=_.nodes;if(0===O||0===e.length){T({type:"text",value:A});continue}if("dot"===S.type){if(_.range=[],S.value+=A,S.type="range",3!==_.nodes.length&&5!==_.nodes.length){_.invalid=!0,_.ranges=0,S.type="text";continue}_.ranges++,_.args=[];continue}if("range"===S.type){e.pop();const t=e[e.length-1];t.value+=S.value+A,S=t,_.ranges--;continue}T({type:"dot",value:A});continue}T({type:"text",value:A})}}else{if("paren"!==_.type){T({type:"text",value:A});continue}_=w.pop(),T({type:"text",value:A}),_=w[w.length-1]}else _=T({type:"paren",nodes:[]}),w.push(_),T({type:"text",value:A})}else T({type:"text",value:"\\"+A});else T({type:"text",value:(y.keepEscaping?A:"")+P()});do{if(_=w.pop(),"root"!==_.type){_.nodes.forEach(e=>{e.nodes||("open"===e.type&&(e.isOpen=!0),"close"===e.type&&(e.isClose=!0),e.nodes||(e.type="text"),e.invalid=!0)});const e=w[w.length-1],t=e.nodes.indexOf(_);e.nodes.splice(t,1,..._.nodes)}}while(w.length>0);return T({type:"eos"}),D}}(),s=(e,t={})=>{let n=[];if(Array.isArray(e))for(const r of e){const e=s.create(r,t);Array.isArray(e)?n.push(...e):n.push(e)}else n=[].concat(s.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(n=[...new Set(n)]),n};return s.parse=(e,t={})=>r(e,t),s.stringify=(t,n={})=>e("string"==typeof t?s.parse(t,n):t,n),s.compile=(e,n={})=>("string"==typeof e&&(e=s.parse(e,n)),t(e,n)),s.expand=(e,t={})=>{"string"==typeof e&&(e=s.parse(e,t));let r=n(e,t);return!0===t.noempty&&(r=r.filter(Boolean)),!0===t.nodupes&&(r=[...new Set(r)]),r},s.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?s.compile(e,t):s.expand(e,t),ru=s}var fu,pu,du,hu,mu,gu,yu,bu,vu,Du,wu,_u,Su,Eu,ku={};function Au(){if(pu)return fu;pu=1;const e=A,t="\\\\/",n=`[^${t}]`,r="\\.",s="\\/",o="[^/]",i=`(?:${s}|$)`,a=`(?:^|${s})`,c=`${r}{1,2}${i}`,u={DOT_LITERAL:r,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:s,ONE_CHAR:"(?=.)",QMARK:o,END_ANCHOR:i,DOTS_SLASH:c,NO_DOT:`(?!${r})`,NO_DOTS:`(?!${a}${c})`,NO_DOT_SLASH:`(?!${r}{0,1}${i})`,NO_DOTS_SLASH:`(?!${c})`,QMARK_NO_DOT:`[^.${s}]`,STAR:`${o}*?`,START_ANCHOR:a},l={...u,SLASH_LITERAL:`[${t}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${r}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${r})`,NO_DOTS:`(?!(?:^|[${t}])${r}{1,2}(?:[${t}]|$))`,NO_DOT_SLASH:`(?!${r}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${r}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`};return fu={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:e.sep,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?l:u}}function Cu(){return du||(du=1,function(e){const t=A,n="win32"===process.platform,{REGEX_BACKSLASH:r,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_GLOBAL:i}=Au();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>o.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,"\\$1"),e.toPosixSlashes=e=>e.replace(r,"/"),e.removeBackslashes=e=>e.replace(s,e=>"\\"===e?"":e),e.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},e.isWindows=e=>e&&"boolean"==typeof e.windows?e.windows:!0===n||"\\"===t.sep,e.escapeLast=(t,n,r)=>{const s=t.lastIndexOf(n,r);return-1===s?t:"\\"===t[s-1]?e.escapeLast(t,n,s-1):`${t.slice(0,s)}\\${t.slice(s)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(r=`(?:^(?!${r}).*$)`),r}}(ku)),ku}function Ou(){return wu?Du:(wu=1,Du=function(){if(vu)return bu;vu=1;const e=A,t=function(){if(mu)return hu;mu=1;const e=Cu(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:s,CHAR_DOT:o,CHAR_EXCLAMATION_MARK:i,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:u,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:f,CHAR_QUESTION_MARK:p,CHAR_RIGHT_CURLY_BRACE:d,CHAR_RIGHT_PARENTHESES:h,CHAR_RIGHT_SQUARE_BRACKET:m}=Au(),g=e=>e===a||e===r,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return hu=(b,v)=>{const D=v||{},w=b.length-1,_=!0===D.parts||!0===D.scanToEnd,S=[],E=[],k=[];let A,C,O=b,P=-1,T=0,x=0,N=!1,$=!1,L=!1,R=!1,F=!1,I=!1,j=!1,M=!1,B=!1,z=!1,H=0,K={value:"",depth:0,isGlob:!1};const U=()=>P>=w,q=()=>O.charCodeAt(P+1),J=()=>(A=C,O.charCodeAt(++P));for(;P<w;){let e;if(C=J(),C!==r){if(!0===I||C===c){for(H++;!0!==U()&&(C=J());)if(C!==r)if(C!==c){if(!0!==I&&C===o&&(C=J())===o){if(N=K.isBrace=!0,L=K.isGlob=!0,z=!0,!0===_)continue;break}if(!0!==I&&C===s){if(N=K.isBrace=!0,L=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===d&&(H--,0===H)){I=!1,N=K.isBrace=!0,z=!0;break}}else H++;else j=K.backslashes=!0,J();if(!0===_)continue;break}if(C!==a){if(!0!==D.noext&&1==(C===f||C===n||C===t||C===p||C===i)&&q()===u){if(L=K.isGlob=!0,R=K.isExtglob=!0,z=!0,C===i&&P===T&&(B=!0),!0===_){for(;!0!==U()&&(C=J());)if(C!==r){if(C===h){L=K.isGlob=!0,z=!0;break}}else j=K.backslashes=!0,C=J();continue}break}if(C===t){if(A===t&&(F=K.isGlobstar=!0),L=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===p){if(L=K.isGlob=!0,z=!0,!0===_)continue;break}if(C===l){for(;!0!==U()&&(e=J());)if(e!==r){if(e===m){$=K.isBracket=!0,L=K.isGlob=!0,z=!0;break}}else j=K.backslashes=!0,J();if(!0===_)continue;break}if(!0===D.nonegate||C!==i||P!==T){if(!0!==D.noparen&&C===u){if(L=K.isGlob=!0,!0===_){for(;!0!==U()&&(C=J());)if(C!==u){if(C===h){z=!0;break}}else j=K.backslashes=!0,C=J();continue}break}if(!0===L){if(z=!0,!0===_)continue;break}}else M=K.negated=!0,T++}else{if(S.push(P),E.push(K),K={value:"",depth:0,isGlob:!1},!0===z)continue;if(A===o&&P===T+1){T+=2;continue}x=P+1}}else j=K.backslashes=!0,C=J(),C===c&&(I=!0)}!0===D.noext&&(R=!1,L=!1);let Z=O,G="",W="";T>0&&(G=O.slice(0,T),O=O.slice(T),x-=T),Z&&!0===L&&x>0?(Z=O.slice(0,x),W=O.slice(x)):!0===L?(Z="",W=O):Z=O,Z&&""!==Z&&"/"!==Z&&Z!==O&&g(Z.charCodeAt(Z.length-1))&&(Z=Z.slice(0,-1)),!0===D.unescape&&(W&&(W=e.removeBackslashes(W)),Z&&!0===j&&(Z=e.removeBackslashes(Z)));const V={prefix:G,input:b,start:T,base:Z,glob:W,isBrace:N,isBracket:$,isGlob:L,isExtglob:R,isGlobstar:F,negated:M,negatedExtglob:B};if(!0===D.tokens&&(V.maxDepth=0,g(C)||E.push(K),V.tokens=E),!0===D.parts||!0===D.tokens){let e;for(let t=0;t<S.length;t++){const n=e?e+1:T,r=S[t],s=b.slice(n,r);D.tokens&&(0===t&&0!==T?(E[t].isPrefix=!0,E[t].value=G):E[t].value=s,y(E[t]),V.maxDepth+=E[t].depth),0===t&&""===s||k.push(s),e=r}if(e&&e+1<b.length){const t=b.slice(e+1);k.push(t),D.tokens&&(E[E.length-1].value=t,y(E[E.length-1]),V.maxDepth+=E[E.length-1].depth)}V.slashes=S,V.parts=k}return V},hu}(),n=function(){if(yu)return gu;yu=1;const e=Au(),t=Cu(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_BACKREF:o,REPLACEMENTS:i}=e,a=(e,n)=>{if("function"==typeof n.expandRange)return n.expandRange(...e,n);e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(n){return e.map(e=>t.escapeRegex(e)).join("..")}return r},c=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,u=(l,f)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=i[l]||l;const p={...f},d="number"==typeof p.maxLength?Math.min(n,p.maxLength):n;let h=l.length;if(h>d)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${d}`);const m={type:"bos",value:"",output:p.prepend||""},g=[m],y=p.capture?"":"?:",b=t.isWindows(f),v=e.globChars(b),D=e.extglobChars(v),{DOT_LITERAL:w,PLUS_LITERAL:_,SLASH_LITERAL:S,ONE_CHAR:E,DOTS_SLASH:k,NO_DOT:A,NO_DOT_SLASH:C,NO_DOTS_SLASH:O,QMARK:P,QMARK_NO_DOT:T,STAR:x,START_ANCHOR:N}=v,$=e=>`(${y}(?:(?!${N}${e.dot?k:w}).)*?)`,L=p.dot?"":A,R=p.dot?P:T;let F=!0===p.bash?$(p):x;p.capture&&(F=`(${F})`),"boolean"==typeof p.noext&&(p.noextglob=p.noext);const I={input:l,index:-1,start:0,dot:!0===p.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};l=t.removePrefix(l,I),h=l.length;const j=[],M=[],B=[];let z,H=m;const K=()=>I.index===h-1,U=I.peek=(e=1)=>l[I.index+e],q=I.advance=()=>l[++I.index]||"",J=()=>l.slice(I.index+1),Z=(e="",t=0)=>{I.consumed+=e,I.index+=t},G=e=>{I.output+=null!=e.output?e.output:e.value,Z(e.value)},W=()=>{let e=1;for(;"!"===U()&&("("!==U(2)||"?"===U(3));)q(),I.start++,e++;return e%2!=0&&(I.negated=!0,I.start++,!0)},V=e=>{I[e]++,B.push(e)},Y=e=>{I[e]--,B.pop()},Q=e=>{if("globstar"===H.type){const t=I.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||j.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(I.output=I.output.slice(0,-H.output.length),H.type="star",H.value="*",H.output=F,I.output+=H.output)}if(j.length&&"paren"!==e.type&&(j[j.length-1].inner+=e.value),(e.value||e.output)&&G(e),H&&"text"===H.type&&"text"===e.type)return H.value+=e.value,void(H.output=(H.output||"")+e.value);e.prev=H,g.push(e),H=e},X=(e,t)=>{const n={...D[t],conditions:1,inner:""};n.prev=H,n.parens=I.parens,n.output=I.output;const r=(p.capture?"(":"")+n.open;V("parens"),Q({type:e,value:t,output:I.output?"":E}),Q({type:"paren",extglob:!0,value:q(),output:r}),j.push(n)},ee=e=>{let t,n=e.close+(p.capture?")":"");if("negate"===e.type){let r=F;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(r=$(p)),(r!==F||K()||/^\)+$/.test(J()))&&(n=e.close=`)$))${r}`),e.inner.includes("*")&&(t=J())&&/^\.[^\\/.]+$/.test(t)){const s=u(t,{...f,fastpaths:!1}).output;n=e.close=`)${s})${r})`}"bos"===e.prev.type&&(I.negatedExtglob=!0)}Q({type:"paren",extglob:!0,value:z,output:n}),Y("parens")};if(!1!==p.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let e=!1,n=l.replace(o,(t,n,r,s,o,i)=>"\\"===s?(e=!0,t):"?"===s?n?n+s+(o?P.repeat(o.length):""):0===i?R+(o?P.repeat(o.length):""):P.repeat(r.length):"."===s?w.repeat(r.length):"*"===s?n?n+s+(o?F:""):F:n?t:`\\${t}`);return!0===e&&(n=!0===p.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===l&&!0===p.contains?(I.output=l,I):(I.output=t.wrapOutput(n,I,f),I)}for(;!K();){if(z=q(),"\0"===z)continue;if("\\"===z){const e=U();if("/"===e&&!0!==p.bash)continue;if("."===e||";"===e)continue;if(!e){z+="\\",Q({type:"text",value:z});continue}const t=/^\\+/.exec(J());let n=0;if(t&&t[0].length>2&&(n=t[0].length,I.index+=n,n%2!=0&&(z+="\\")),!0===p.unescape?z=q():z+=q(),0===I.brackets){Q({type:"text",value:z});continue}}if(I.brackets>0&&("]"!==z||"["===H.value||"[^"===H.value)){if(!1!==p.posix&&":"===z){const e=H.value.slice(1);if(e.includes("[")&&(H.posix=!0,e.includes(":"))){const e=H.value.lastIndexOf("["),t=H.value.slice(0,e),n=H.value.slice(e+2),s=r[n];if(s){H.value=t+s,I.backtrack=!0,q(),m.output||1!==g.indexOf(H)||(m.output=E);continue}}}("["===z&&":"!==U()||"-"===z&&"]"===U())&&(z=`\\${z}`),"]"!==z||"["!==H.value&&"[^"!==H.value||(z=`\\${z}`),!0===p.posix&&"!"===z&&"["===H.value&&(z="^"),H.value+=z,G({value:z});continue}if(1===I.quotes&&'"'!==z){z=t.escapeRegex(z),H.value+=z,G({value:z});continue}if('"'===z){I.quotes=1===I.quotes?0:1,!0===p.keepQuotes&&Q({type:"text",value:z});continue}if("("===z){V("parens"),Q({type:"paren",value:z});continue}if(")"===z){if(0===I.parens&&!0===p.strictBrackets)throw new SyntaxError(c("opening","("));const e=j[j.length-1];if(e&&I.parens===e.parens+1){ee(j.pop());continue}Q({type:"paren",value:z,output:I.parens?")":"\\)"}),Y("parens");continue}if("["===z){if(!0!==p.nobracket&&J().includes("]"))V("brackets");else{if(!0!==p.nobracket&&!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));z=`\\${z}`}Q({type:"bracket",value:z});continue}if("]"===z){if(!0===p.nobracket||H&&"bracket"===H.type&&1===H.value.length){Q({type:"text",value:z,output:`\\${z}`});continue}if(0===I.brackets){if(!0===p.strictBrackets)throw new SyntaxError(c("opening","["));Q({type:"text",value:z,output:`\\${z}`});continue}Y("brackets");const e=H.value.slice(1);if(!0===H.posix||"^"!==e[0]||e.includes("/")||(z=`/${z}`),H.value+=z,G({value:z}),!1===p.literalBrackets||t.hasRegexChars(e))continue;const n=t.escapeRegex(H.value);if(I.output=I.output.slice(0,-H.value.length),!0===p.literalBrackets){I.output+=n,H.value=n;continue}H.value=`(${y}${n}|${H.value})`,I.output+=H.value;continue}if("{"===z&&!0!==p.nobrace){V("braces");const e={type:"brace",value:z,output:"(",outputIndex:I.output.length,tokensIndex:I.tokens.length};M.push(e),Q(e);continue}if("}"===z){const e=M[M.length-1];if(!0===p.nobrace||!e){Q({type:"text",value:z,output:z});continue}let t=")";if(!0===e.dots){const e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=a(n,p),I.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=I.output.slice(0,e.outputIndex),r=I.tokens.slice(e.tokensIndex);e.value=e.output="\\{",z=t="\\}",I.output=n;for(const e of r)I.output+=e.output||e.value}Q({type:"brace",value:z,output:t}),Y("braces"),M.pop();continue}if("|"===z){j.length>0&&j[j.length-1].conditions++,Q({type:"text",value:z});continue}if(","===z){let e=z;const t=M[M.length-1];t&&"braces"===B[B.length-1]&&(t.comma=!0,e="|"),Q({type:"comma",value:z,output:e});continue}if("/"===z){if("dot"===H.type&&I.index===I.start+1){I.start=I.index+1,I.consumed="",I.output="",g.pop(),H=m;continue}Q({type:"slash",value:z,output:S});continue}if("."===z){if(I.braces>0&&"dot"===H.type){"."===H.value&&(H.output=w);const e=M[M.length-1];H.type="dots",H.output+=z,H.value+=z,e.dots=!0;continue}if(I.braces+I.parens===0&&"bos"!==H.type&&"slash"!==H.type){Q({type:"text",value:z,output:w});continue}Q({type:"dot",value:z,output:w});continue}if("?"===z){if((!H||"("!==H.value)&&!0!==p.noextglob&&"("===U()&&"?"!==U(2)){X("qmark",z);continue}if(H&&"paren"===H.type){const e=U();let n=z;if("<"===e&&!t.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===H.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(J()))&&(n=`\\${z}`),Q({type:"text",value:z,output:n});continue}if(!0!==p.dot&&("slash"===H.type||"bos"===H.type)){Q({type:"qmark",value:z,output:T});continue}Q({type:"qmark",value:z,output:P});continue}if("!"===z){if(!0!==p.noextglob&&"("===U()&&("?"!==U(2)||!/[!=<:]/.test(U(3)))){X("negate",z);continue}if(!0!==p.nonegate&&0===I.index){W();continue}}if("+"===z){if(!0!==p.noextglob&&"("===U()&&"?"!==U(2)){X("plus",z);continue}if(H&&"("===H.value||!1===p.regex){Q({type:"plus",value:z,output:_});continue}if(H&&("bracket"===H.type||"paren"===H.type||"brace"===H.type)||I.parens>0){Q({type:"plus",value:z});continue}Q({type:"plus",value:_});continue}if("@"===z){if(!0!==p.noextglob&&"("===U()&&"?"!==U(2)){Q({type:"at",extglob:!0,value:z,output:""});continue}Q({type:"text",value:z});continue}if("*"!==z){"$"!==z&&"^"!==z||(z=`\\${z}`);const e=s.exec(J());e&&(z+=e[0],I.index+=e[0].length),Q({type:"text",value:z});continue}if(H&&("globstar"===H.type||!0===H.star)){H.type="star",H.star=!0,H.value+=z,H.output=F,I.backtrack=!0,I.globstar=!0,Z(z);continue}let e=J();if(!0!==p.noextglob&&/^\([^?]/.test(e)){X("star",z);continue}if("star"===H.type){if(!0===p.noglobstar){Z(z);continue}const t=H.prev,n=t.prev,r="slash"===t.type||"bos"===t.type,s=n&&("star"===n.type||"globstar"===n.type);if(!0===p.bash&&(!r||e[0]&&"/"!==e[0])){Q({type:"star",value:z,output:""});continue}const o=I.braces>0&&("comma"===t.type||"brace"===t.type),i=j.length&&("pipe"===t.type||"paren"===t.type);if(!r&&"paren"!==t.type&&!o&&!i){Q({type:"star",value:z,output:""});continue}for(;"/**"===e.slice(0,3);){const t=l[I.index+4];if(t&&"/"!==t)break;e=e.slice(3),Z("/**",3)}if("bos"===t.type&&K()){H.type="globstar",H.value+=z,H.output=$(p),I.output=H.output,I.globstar=!0,Z(z);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!s&&K()){I.output=I.output.slice(0,-(t.output+H.output).length),t.output=`(?:${t.output}`,H.type="globstar",H.output=$(p)+(p.strictSlashes?")":"|$)"),H.value+=z,I.globstar=!0,I.output+=t.output+H.output,Z(z);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const n=void 0!==e[1]?"|$":"";I.output=I.output.slice(0,-(t.output+H.output).length),t.output=`(?:${t.output}`,H.type="globstar",H.output=`${$(p)}${S}|${S}${n})`,H.value+=z,I.output+=t.output+H.output,I.globstar=!0,Z(z+q()),Q({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){H.type="globstar",H.value+=z,H.output=`(?:^|${S}|${$(p)}${S})`,I.output=H.output,I.globstar=!0,Z(z+q()),Q({type:"slash",value:"/",output:""});continue}I.output=I.output.slice(0,-H.output.length),H.type="globstar",H.output=$(p),H.value+=z,I.output+=H.output,I.globstar=!0,Z(z);continue}const n={type:"star",value:z,output:F};!0!==p.bash?!H||"bracket"!==H.type&&"paren"!==H.type||!0!==p.regex?(I.index!==I.start&&"slash"!==H.type&&"dot"!==H.type||("dot"===H.type?(I.output+=C,H.output+=C):!0===p.dot?(I.output+=O,H.output+=O):(I.output+=L,H.output+=L),"*"!==U()&&(I.output+=E,H.output+=E)),Q(n)):(n.output=z,Q(n)):(n.output=".*?","bos"!==H.type&&"slash"!==H.type||(n.output=L+n.output),Q(n))}for(;I.brackets>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));I.output=t.escapeLast(I.output,"["),Y("brackets")}for(;I.parens>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing",")"));I.output=t.escapeLast(I.output,"("),Y("parens")}for(;I.braces>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","}"));I.output=t.escapeLast(I.output,"{"),Y("braces")}if(!0===p.strictSlashes||"star"!==H.type&&"bracket"!==H.type||Q({type:"maybe_slash",value:"",output:`${S}?`}),!0===I.backtrack){I.output="";for(const e of I.tokens)I.output+=null!=e.output?e.output:e.value,e.suffix&&(I.output+=e.suffix)}return I};return u.fastpaths=(r,s)=>{const o={...s},a="number"==typeof o.maxLength?Math.min(n,o.maxLength):n,c=r.length;if(c>a)throw new SyntaxError(`Input length: ${c}, exceeds maximum allowed length: ${a}`);r=i[r]||r;const u=t.isWindows(s),{DOT_LITERAL:l,SLASH_LITERAL:f,ONE_CHAR:p,DOTS_SLASH:d,NO_DOT:h,NO_DOTS:m,NO_DOTS_SLASH:g,STAR:y,START_ANCHOR:b}=e.globChars(u),v=o.dot?m:h,D=o.dot?g:h,w=o.capture?"":"?:";let _=!0===o.bash?".*?":y;o.capture&&(_=`(${_})`);const S=e=>!0===e.noglobstar?_:`(${w}(?:(?!${b}${e.dot?d:l}).)*?)`,E=e=>{switch(e){case"*":return`${v}${p}${_}`;case".*":return`${l}${p}${_}`;case"*.*":return`${v}${_}${l}${p}${_}`;case"*/*":return`${v}${_}${f}${p}${D}${_}`;case"**":return v+S(o);case"**/*":return`(?:${v}${S(o)}${f})?${D}${p}${_}`;case"**/*.*":return`(?:${v}${S(o)}${f})?${D}${_}${l}${p}${_}`;case"**/.*":return`(?:${v}${S(o)}${f})?${l}${p}${_}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=E(t[1]);if(!n)return;return n+l+t[2]}}},k=t.removePrefix(r,{negated:!1,prefix:""});let A=E(k);return A&&!0!==o.strictSlashes&&(A+=`${f}?`),A},gu=u}(),r=Cu(),s=Au(),o=(e,t,n=!1)=>{if(Array.isArray(e)){const r=e.map(e=>o(e,t,n)),s=e=>{for(const t of r){const n=t(e);if(n)return n}return!1};return s}const s=(i=e)&&"object"==typeof i&&!Array.isArray(i)&&e.tokens&&e.input;var i;if(""===e||"string"!=typeof e&&!s)throw new TypeError("Expected pattern to be a non-empty string");const a=t||{},c=r.isWindows(t),u=s?o.compileRe(e,t):o.makeRe(e,t,!1,!0),l=u.state;delete u.state;let f=()=>!1;if(a.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};f=o(a.ignore,e,n)}const p=(n,r=!1)=>{const{isMatch:s,match:i,output:p}=o.test(n,u,t,{glob:e,posix:c}),d={glob:e,state:l,regex:u,posix:c,input:n,output:p,match:i,isMatch:s};return"function"==typeof a.onResult&&a.onResult(d),!1===s?(d.isMatch=!1,!!r&&d):f(n)?("function"==typeof a.onIgnore&&a.onIgnore(d),d.isMatch=!1,!!r&&d):("function"==typeof a.onMatch&&a.onMatch(d),!r||d)};return n&&(p.state=l),p};return o.test=(e,t,n,{glob:s,posix:i}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=n||{},c=a.format||(i?r.toPosixSlashes:null);let u=e===s,l=u&&c?c(e):e;return!1===u&&(l=c?c(e):e,u=l===s),!1!==u&&!0!==a.capture||(u=!0===a.matchBase||!0===a.basename?o.matchBase(e,t,n,i):t.exec(l)),{isMatch:Boolean(u),match:u,output:l}},o.matchBase=(t,n,s,i=r.isWindows(s))=>(n instanceof RegExp?n:o.makeRe(n,s)).test(e.basename(t)),o.isMatch=(e,t,n)=>o(t,n)(e),o.parse=(e,t)=>Array.isArray(e)?e.map(e=>o.parse(e,t)):n(e,{...t,fastpaths:!1}),o.scan=(e,n)=>t(e,n),o.compileRe=(e,t,n=!1,r=!1)=>{if(!0===n)return e.output;const s=t||{},i=s.contains?"":"^",a=s.contains?"":"$";let c=`${i}(?:${e.output})${a}`;e&&!0===e.negated&&(c=`^(?!${c}).*$`);const u=o.toRegex(c,t);return!0===r&&(u.state=e),u},o.makeRe=(e,t={},r=!1,s=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(i.output=n.fastpaths(e,t)),i.output||(i=n(e,t)),o.compileRe(i,t,r,s)},o.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},o.constants=s,bu=o}())}var Pu,Tu,xu,Nu={};function $u(){if(Tu)return Pu;Tu=1;const e=O.PassThrough,t=Array.prototype.slice;function n(t,r){if(Array.isArray(t))for(let e=0,s=t.length;e<s;e++)t[e]=n(t[e],r);else{if(!t._readableState&&t.pipe&&(t=t.pipe(e(r))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}return Pu=function(){const r=[],s=t.call(arguments);let o=!1,i=s[s.length-1];i&&!Array.isArray(i)&&null==i.pipe?s.pop():i={};const a=!1!==i.end,c=!0===i.pipeError;null==i.objectMode&&(i.objectMode=!0),null==i.highWaterMark&&(i.highWaterMark=65536);const u=e(i);function l(){for(let e=0,t=arguments.length;e<t;e++)r.push(n(arguments[e],i));return f(),this}function f(){if(o)return;o=!0;let e=r.shift();if(!e)return void process.nextTick(p);Array.isArray(e)||(e=[e]);let t=e.length+1;function n(){--t>0||(o=!1,f())}function s(e){function t(){e.removeListener("merge2UnpipeEnd",t),e.removeListener("end",t),c&&e.removeListener("error",r),n()}function r(e){u.emit("error",e)}if(e._readableState.endEmitted)return n();e.on("merge2UnpipeEnd",t),e.on("end",t),c&&e.on("error",r),e.pipe(u,{end:!1}),e.resume()}for(let t=0;t<e.length;t++)s(e[t]);n()}function p(){o=!1,u.emit("queueDrain"),a&&u.end()}return u.setMaxListeners(0),u.add=l,u.on("unpipe",function(e){e.emit("merge2UnpipeEnd")}),s.length&&l.apply(null,s),u},Pu}var Lu,Ru,Fu,Iu={};function ju(){if(Ru)return Ec;Ru=1,Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.string=Ec.stream=Ec.pattern=Ec.path=Ec.fs=Ec.errno=Ec.array=void 0;const e=(_c||(_c=1,Object.defineProperty(kc,"__esModule",{value:!0}),kc.splitWhen=kc.flatten=void 0,kc.flatten=function(e){return e.reduce((e,t)=>[].concat(e,t),[])},kc.splitWhen=function(e,t){const n=[[]];let r=0;for(const s of e)t(s)?(r++,n[r]=[]):n[r].push(s);return n}),kc);Ec.array=e;const t=(Ac||(Ac=1,Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.isEnoentCodeError=void 0,Cc.isEnoentCodeError=function(e){return"ENOENT"===e.code}),Cc);Ec.errno=t;const n=function(){if(Oc)return Tc;Oc=1,Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return Tc.createDirentFromStats=function(t,n){return new e(t,n)},Tc}();Ec.fs=n;const r=function(){if(Pc)return xc;Pc=1,Object.defineProperty(xc,"__esModule",{value:!0}),xc.convertPosixPathToPattern=xc.convertWindowsPathToPattern=xc.convertPathToPattern=xc.escapePosixPath=xc.escapeWindowsPath=xc.escape=xc.removeLeadingDotSegment=xc.makeAbsolute=xc.unixify=void 0;const e=A,t="win32"===k.platform(),n=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,r=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,s=/^\\\\([.?])/,o=/\\(?![!()+@[\]{}])/g;function i(e){return e.replace(r,"\\$2")}function a(e){return e.replace(n,"\\$2")}function c(e){return i(e).replace(s,"//$1").replace(o,"/")}function u(e){return a(e)}return xc.unixify=function(e){return e.replace(/\\/g,"/")},xc.makeAbsolute=function(t,n){return e.resolve(t,n)},xc.removeLeadingDotSegment=function(e){if("."===e.charAt(0)){const t=e.charAt(1);if("/"===t||"\\"===t)return e.slice(2)}return e},xc.escape=t?i:a,xc.escapeWindowsPath=i,xc.escapePosixPath=a,xc.convertPathToPattern=t?c:u,xc.convertWindowsPathToPattern=c,xc.convertPosixPathToPattern=u,xc}();Ec.path=r;const s=function(){if(Eu)return jc;Eu=1,Object.defineProperty(jc,"__esModule",{value:!0}),jc.isAbsolute=jc.partitionAbsoluteAndRelative=jc.removeDuplicateSlashes=jc.matchAny=jc.convertPatternsToRe=jc.makeRe=jc.getPatternParts=jc.expandBraceExpansion=jc.expandPatternsWithBraceExpansion=jc.isAffectDepthOfReadingPattern=jc.endsWithSlashGlobStar=jc.hasGlobStar=jc.getBaseDirectory=jc.isPatternRelatedToParentDirectory=jc.getPatternsOutsideCurrentDirectory=jc.getPatternsInsideCurrentDirectory=jc.getPositivePatterns=jc.getNegativePatterns=jc.isPositivePattern=jc.isNegativePattern=jc.convertToNegativePattern=jc.convertToPositivePattern=jc.isDynamicPattern=jc.isStaticPattern=void 0;const e=A,t=function(){if(Ic)return Fc;Ic=1;var e=Mc(),t=A.posix.dirname,n="win32"===k.platform(),r=/\\/g,s=/[\{\[].*[\}\]]$/,o=/(^|[^\\])([\{\[]|\([^\)]+$)/,i=/\\([\!\*\?\|\[\]\(\)\{\}])/g;return Fc=function(a,c){Object.assign({flipBackslashes:!0},c).flipBackslashes&&n&&a.indexOf("/")<0&&(a=a.replace(r,"/")),s.test(a)&&(a+="/"),a+="a";do{a=t(a)}while(e(a)||o.test(a));return a.replace(i,"$1")}}(),n=function(){if(Su)return _u;Su=1;const e=C,t=lu(),n=Ou(),r=Cu(),s=e=>""===e||"./"===e,o=e=>{const t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},i=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let s=new Set,o=new Set,i=new Set,a=0,c=e=>{i.add(e.output),r&&r.onResult&&r.onResult(e)};for(let i=0;i<t.length;i++){let u=n(String(t[i]),{...r,onResult:c},!0),l=u.state.negated||u.state.negatedExtglob;l&&a++;for(let t of e){let e=u(t,!0);(l?!e.isMatch:e.isMatch)&&(l?s.add(e.output):(s.delete(e.output),o.add(e.output)))}}let u=(a===t.length?[...i]:[...o]).filter(e=>!s.has(e));if(r&&0===u.length){if(!0===r.failglob)throw new Error(`No matches found for "${t.join(", ")}"`);if(!0===r.nonull||!0===r.nullglob)return r.unescape?t.map(e=>e.replace(/\\/g,"")):t}return u};return i.match=i,i.matcher=(e,t)=>n(e,t),i.any=i.isMatch=(e,t,r)=>n(t,r)(e),i.not=(e,t,n={})=>{t=[].concat(t).map(String);let r=new Set,s=[],o=new Set(i(e,t,{...n,onResult:e=>{n.onResult&&n.onResult(e),s.push(e.output)}}));for(let e of s)o.has(e)||r.add(e);return[...r]},i.contains=(t,n,r)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);if(Array.isArray(n))return n.some(e=>i.contains(t,e,r));if("string"==typeof n){if(s(t)||s(n))return!1;if(t.includes(n)||t.startsWith("./")&&t.slice(2).includes(n))return!0}return i.isMatch(t,n,{...r,contains:!0})},i.matchKeys=(e,t,n)=>{if(!r.isObject(e))throw new TypeError("Expected the first argument to be an object");let s=i(Object.keys(e),t,n),o={};for(let t of s)o[t]=e[t];return o},i.some=(e,t,r)=>{let s=[].concat(e);for(let e of[].concat(t)){let t=n(String(e),r);if(s.some(e=>t(e)))return!0}return!1},i.every=(e,t,r)=>{let s=[].concat(e);for(let e of[].concat(t)){let t=n(String(e),r);if(!s.every(e=>t(e)))return!1}return!0},i.all=(t,r,s)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);return[].concat(r).every(e=>n(e,s)(t))},i.capture=(e,t,s)=>{let o=r.isWindows(s),i=n.makeRe(String(e),{...s,capture:!0}).exec(o?r.toPosixSlashes(t):t);if(i)return i.slice(1).map(e=>void 0===e?"":e)},i.makeRe=(...e)=>n.makeRe(...e),i.scan=(...e)=>n.scan(...e),i.parse=(e,r)=>{let s=[];for(let o of[].concat(e||[]))for(let e of t(String(o),r))s.push(n.parse(e,r));return s},i.braces=(e,n)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return n&&!0===n.nobrace||!o(e)?[e]:t(e,n)},i.braceExpand=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return i.braces(e,{...t,expand:!0})},i.hasBraces=o,_u=i}(),r=/[*?]|^!/,s=/\[[^[]*]/,o=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,i=/[!*+?@]\([^(]*\)/,a=/,|\.\./,c=/(?!^)\/{2,}/g;function u(e,t={}){return!l(e,t)}function l(e,t={}){return!(""===e||!(!1===t.caseSensitiveMatch||e.includes("\\")||r.test(e)||s.test(e)||o.test(e)||!1!==t.extglob&&i.test(e)||!1!==t.braceExpansion&&function(e){const t=e.indexOf("{");if(-1===t)return!1;const n=e.indexOf("}",t+1);if(-1===n)return!1;const r=e.slice(t,n);return a.test(r)}(e)))}function f(e){return e.startsWith("!")&&"("!==e[1]}function p(e){return!f(e)}function d(e){return e.startsWith("..")||e.startsWith("./..")}function h(e){return e.endsWith("/**")}function m(e){const t=n.braces(e,{expand:!0,nodupes:!0,keepEscaping:!0});return t.sort((e,t)=>e.length-t.length),t.filter(e=>""!==e)}function g(e,t){return n.makeRe(e,t)}function y(t){return e.isAbsolute(t)}return jc.isStaticPattern=u,jc.isDynamicPattern=l,jc.convertToPositivePattern=function(e){return f(e)?e.slice(1):e},jc.convertToNegativePattern=function(e){return"!"+e},jc.isNegativePattern=f,jc.isPositivePattern=p,jc.getNegativePatterns=function(e){return e.filter(f)},jc.getPositivePatterns=function(e){return e.filter(p)},jc.getPatternsInsideCurrentDirectory=function(e){return e.filter(e=>!d(e))},jc.getPatternsOutsideCurrentDirectory=function(e){return e.filter(d)},jc.isPatternRelatedToParentDirectory=d,jc.getBaseDirectory=function(e){return t(e,{flipBackslashes:!1})},jc.hasGlobStar=function(e){return e.includes("**")},jc.endsWithSlashGlobStar=h,jc.isAffectDepthOfReadingPattern=function(t){const n=e.basename(t);return h(t)||u(n)},jc.expandPatternsWithBraceExpansion=function(e){return e.reduce((e,t)=>e.concat(m(t)),[])},jc.expandBraceExpansion=m,jc.getPatternParts=function(e,t){let{parts:r}=n.scan(e,Object.assign(Object.assign({},t),{parts:!0}));return 0===r.length&&(r=[e]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r},jc.makeRe=g,jc.convertPatternsToRe=function(e,t){return e.map(e=>g(e,t))},jc.matchAny=function(e,t){return t.some(t=>t.test(e))},jc.removeDuplicateSlashes=function(e){return e.replace(c,"/")},jc.partitionAbsoluteAndRelative=function(e){const t=[],n=[];for(const r of e)y(r)?t.push(r):n.push(r);return[t,n]},jc.isAbsolute=y,jc}();Ec.pattern=s;const o=function(){if(xu)return Nu;xu=1,Object.defineProperty(Nu,"__esModule",{value:!0}),Nu.merge=void 0;const e=$u();function t(e){e.forEach(e=>e.emit("close"))}return Nu.merge=function(n){const r=e(n);return n.forEach(e=>{e.once("error",e=>r.emit("error",e))}),r.once("close",()=>t(n)),r.once("end",()=>t(n)),r},Nu}();Ec.stream=o;const i=(Lu||(Lu=1,Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.isEmpty=Iu.isString=void 0,Iu.isString=function(e){return"string"==typeof e},Iu.isEmpty=function(e){return""===e}),Iu);return Ec.string=i,Ec}var Mu,Bu={},zu={},Hu={},Ku={},Uu={},qu={},Ju={},Zu={},Gu={};var Wu,Vu,Yu,Qu,Xu,el,tl,nl,rl={},sl={},ol={};function il(){if(Qu)return Zu;Qu=1,Object.defineProperty(Zu,"__esModule",{value:!0}),Zu.statSync=Zu.stat=Zu.Settings=void 0;const e=function(){if(Mu)return Gu;function e(e,t){e(t)}function t(e,t){e(null,t)}return Mu=1,Object.defineProperty(Gu,"__esModule",{value:!0}),Gu.read=void 0,Gu.read=function(n,r,s){r.fs.lstat(n,(o,i)=>{null===o?i.isSymbolicLink()&&r.followSymbolicLink?r.fs.stat(n,(n,o)=>{if(null!==n)return r.throwErrorOnBrokenSymbolicLink?void e(s,n):void t(s,i);r.markSymbolicLink&&(o.isSymbolicLink=()=>!0),t(s,o)}):t(s,i):e(s,o)})},Gu}(),t=(Wu||(Wu=1,Object.defineProperty(rl,"__esModule",{value:!0}),rl.read=void 0,rl.read=function(e,t){const n=t.fs.lstatSync(e);if(!n.isSymbolicLink()||!t.followSymbolicLink)return n;try{const n=t.fs.statSync(e);return t.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(e){if(!t.throwErrorOnBrokenSymbolicLink)return n;throw e}}),rl),n=function(){if(Yu)return sl;Yu=1,Object.defineProperty(sl,"__esModule",{value:!0});const e=(Vu||(Vu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const t=T;e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(ol)),ol);return sl.default=class{constructor(t={}){this._options=t,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=e.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,t){return null!=e?e:t}},sl}();function r(e={}){return e instanceof n.default?e:new n.default(e)}return Zu.Settings=n.default,Zu.stat=function(t,n,s){"function"!=typeof n?e.read(t,r(n),s):e.read(t,r(),n)},Zu.statSync=function(e,n){const s=r(n);return t.read(e,s)},Zu}var al,cl={};function ul(){if(al)return cl;al=1,Object.defineProperty(cl,"__esModule",{value:!0}),cl.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),n=Number.parseInt(e[1],10),r=t>10,s=10===t&&n>=10;return cl.IS_SUPPORT_READDIR_WITH_FILE_TYPES=r||s,cl}var ll,fl,pl={},dl={};function hl(){if(fl)return pl;fl=1,Object.defineProperty(pl,"__esModule",{value:!0}),pl.fs=void 0;const e=function(){if(ll)return dl;ll=1,Object.defineProperty(dl,"__esModule",{value:!0}),dl.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return dl.createDirentFromStats=function(t,n){return new e(t,n)},dl}();return pl.fs=e,pl}var ml,gl,yl={};function bl(){return ml||(ml=1,Object.defineProperty(yl,"__esModule",{value:!0}),yl.joinPathSegments=void 0,yl.joinPathSegments=function(e,t,n){return e.endsWith(n)?e+t:e+n+t}),yl}function vl(){if(gl)return Ju;gl=1,Object.defineProperty(Ju,"__esModule",{value:!0}),Ju.readdir=Ju.readdirWithFileTypes=Ju.read=void 0;const e=il(),t=function(){if(nl)return tl;nl=1,tl=function(t,n){let r,s,o,i=!0;function a(t){function s(){n&&n(t,r),n=null}i?e(s):s()}function c(e,t,n){r[e]=n,(0===--s||t)&&a(t)}Array.isArray(t)?(r=[],s=t.length):(o=Object.keys(t),r={},s=o.length),s?o?o.forEach(function(e){t[e](function(t,n){c(e,t,n)})}):t.forEach(function(e,t){e(function(e,n){c(t,e,n)})}):a(null),i=!1};const e=function(){if(el)return Xu;let e;return el=1,Xu="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:q):t=>(e||(e=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))}();return tl}(),n=ul(),r=hl(),s=bl();function o(e,n,o){n.fs.readdir(e,{withFileTypes:!0},(i,u)=>{if(null!==i)return void a(o,i);const l=u.map(t=>({dirent:t,name:t.name,path:s.joinPathSegments(e,t.name,n.pathSegmentSeparator)}));if(!n.followSymbolicLinks)return void c(o,l);const f=l.map(e=>function(e,t){return n=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(s,o)=>{if(null!==s)return t.throwErrorOnBrokenSymbolicLink?void n(s):void n(null,e);e.dirent=r.fs.createDirentFromStats(e.name,o),n(null,e)}):n(null,e)}}(e,n));t(f,(e,t)=>{null===e?c(o,t):a(o,e)})})}function i(n,o,i){o.fs.readdir(n,(u,l)=>{if(null!==u)return void a(i,u);const f=l.map(t=>{const i=s.joinPathSegments(n,t,o.pathSegmentSeparator);return n=>{e.stat(i,o.fsStatSettings,(e,s)=>{if(null!==e)return void n(e);const a={name:t,path:i,dirent:r.fs.createDirentFromStats(t,s)};o.stats&&(a.stats=s),n(null,a)})}});t(f,(e,t)=>{null===e?c(i,t):a(i,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Ju.read=function(e,t,r){t.stats||!n.IS_SUPPORT_READDIR_WITH_FILE_TYPES?i(e,t,r):o(e,t,r)},Ju.readdirWithFileTypes=o,Ju.readdir=i,Ju}var Dl,wl,_l,Sl,El={},kl={},Al={};function Cl(){if(Sl)return qu;Sl=1,Object.defineProperty(qu,"__esModule",{value:!0}),qu.Settings=qu.scandirSync=qu.scandir=void 0;const e=vl(),t=function(){if(Dl)return El;Dl=1,Object.defineProperty(El,"__esModule",{value:!0}),El.readdir=El.readdirWithFileTypes=El.read=void 0;const e=il(),t=ul(),n=hl(),r=bl();function s(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(s=>{const o={dirent:s,name:s.name,path:r.joinPathSegments(e,s.name,t.pathSegmentSeparator)};if(o.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(o.path);o.dirent=n.fs.createDirentFromStats(o.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return o})}function o(t,s){return s.fs.readdirSync(t).map(o=>{const i=r.joinPathSegments(t,o,s.pathSegmentSeparator),a=e.statSync(i,s.fsStatSettings),c={name:o,path:i,dirent:n.fs.createDirentFromStats(o,a)};return s.stats&&(c.stats=a),c})}return El.read=function(e,n){return!n.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,n):o(e,n)},El.readdirWithFileTypes=s,El.readdir=o,El}(),n=function(){if(_l)return kl;_l=1,Object.defineProperty(kl,"__esModule",{value:!0});const e=A,t=il(),n=(wl||(wl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const t=T;e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Al)),Al);return kl.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},kl}();function r(e={}){return e instanceof n.default?e:new n.default(e)}return qu.Settings=n.default,qu.scandir=function(t,n,s){"function"!=typeof n?e.read(t,r(n),s):e.read(t,r(),n)},qu.scandirSync=function(e,n){const s=r(n);return t.read(e,s)},qu}var Ol,Pl,Tl,xl={exports:{}};var Nl,$l={};function Ll(){return Nl||(Nl=1,Object.defineProperty($l,"__esModule",{value:!0}),$l.joinPathSegments=$l.replacePathSegmentSeparator=$l.isAppliedFilter=$l.isFatalError=void 0,$l.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},$l.isAppliedFilter=function(e,t){return null===e||e(t)},$l.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},$l.joinPathSegments=function(e,t,n){return""===e?t:e.endsWith(n)?e+t:e+n+t}),$l}var Rl,Fl,Il,jl={};function Ml(){if(Rl)return jl;Rl=1,Object.defineProperty(jl,"__esModule",{value:!0});const e=Ll();return jl.default=class{constructor(t,n){this._root=t,this._settings=n,this._root=e.replacePathSegmentSeparator(t,n.pathSegmentSeparator)}},jl}function Bl(){if(Fl)return Uu;Fl=1,Object.defineProperty(Uu,"__esModule",{value:!0});const e=P,t=Cl(),n=function(){if(Tl)return xl.exports;Tl=1;var e=Pl?Ol:(Pl=1,Ol=function(e){var t=new e,n=t;return{get:function(){var r=t;return r.next?t=r.next:(t=new e,n=t),r.next=null,r},release:function(e){n.next=e,n=e}}});function t(t,s,o){if("function"==typeof t&&(o=s,s=t,t=null),!(o>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var i=e(r),a=null,c=null,u=0,l=null,f={push:function(e,r){var d=i.get();d.context=t,d.release=p,d.value=e,d.callback=r||n,d.errorHandler=l,u>=o||f.paused?c?(c.next=d,c=d):(a=d,c=d,f.saturated()):(u++,s.call(t,d.value,d.worked))},drain:n,saturated:n,pause:function(){f.paused=!0},paused:!1,get concurrency(){return o},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(o=e,!f.paused)for(;a&&u<o;)u++,p()},running:function(){return u},resume:function(){if(f.paused){if(f.paused=!1,null===a)return u++,void p();for(;a&&u<o;)u++,p()}},idle:function(){return 0===u&&0===f.length()},length:function(){for(var e=a,t=0;e;)e=e.next,t++;return t},getQueue:function(){for(var e=a,t=[];e;)t.push(e.value),e=e.next;return t},unshift:function(e,r){var d=i.get();d.context=t,d.release=p,d.value=e,d.callback=r||n,d.errorHandler=l,u>=o||f.paused?a?(d.next=a,a=d):(a=d,c=d,f.saturated()):(u++,s.call(t,d.value,d.worked))},empty:n,kill:function(){a=null,c=null,f.drain=n},killAndDrain:function(){a=null,c=null,f.drain(),f.drain=n},error:function(e){l=e}};return f;function p(e){e&&i.release(e);var n=a;n&&u<=o?f.paused?u--:(c===a&&(c=null),a=n.next,n.next=null,s.call(t,n.value,n.worked),null===c&&f.empty()):0===--u&&f.drain()}}function n(){}function r(){this.value=null,this.callback=n,this.next=null,this.release=n,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,r){var s=e.callback,o=e.errorHandler,i=e.value;e.value=null,e.callback=n,e.errorHandler&&o(t,i),s.call(e.context,t,r),e.release(e)}}return xl.exports=t,xl.exports.promise=function(e,r,s){"function"==typeof e&&(s=r,r=e,e=null);var o=t(e,function(e,t){r.call(this,e).then(function(e){t(null,e)},t)},s),i=o.push,a=o.unshift;return o.push=function(e){var t=new Promise(function(t,n){i(e,function(e,r){e?n(e):t(r)})});return t.catch(n),t},o.unshift=function(e){var t=new Promise(function(t,n){a(e,function(e,r){e?n(e):t(r)})});return t.catch(n),t},o.drained=function(){var e=new Promise(function(e){process.nextTick(function(){if(o.idle())e();else{var t=o.drain;o.drain=function(){"function"==typeof t&&t(),e(),o.drain=t}}})});return e},o},xl.exports}(),r=Ll(),s=Ml();class o extends s.default{constructor(r,s){super(r,s),this._settings=s,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=n(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const n={directory:e,base:t};this._queue.push(n,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(n,r)=>{if(null===n){for(const t of r)this._handleEntry(t,e.base);t(null,void 0)}else t(n,void 0)})}_handleError(e){!this._isDestroyed&&r.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const n=e.path;void 0!==t&&(e.path=r.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),r.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&r.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Uu.default=o,Uu}var zl,Hl,Kl,Ul={},ql={},Jl={};var Zl,Gl,Wl={};function Vl(){if(Gl)return Hu;Gl=1,Object.defineProperty(Hu,"__esModule",{value:!0}),Hu.Settings=Hu.walkStream=Hu.walkSync=Hu.walk=void 0;const e=function(){if(Il)return Ku;Il=1,Object.defineProperty(Ku,"__esModule",{value:!0});const e=Bl();return Ku.default=class{constructor(t,n){this._root=t,this._settings=n,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ku}(),t=function(){if(zl)return Ul;zl=1,Object.defineProperty(Ul,"__esModule",{value:!0});const e=O,t=Bl();return Ul.default=class{constructor(n,r){this._root=n,this._settings=r,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Ul}(),n=function(){if(Kl)return ql;Kl=1,Object.defineProperty(ql,"__esModule",{value:!0});const e=function(){if(Hl)return Jl;Hl=1,Object.defineProperty(Jl,"__esModule",{value:!0});const e=Cl(),t=Ll(),n=Ml();class r extends n.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const n=this._scandir(e,this._settings.fsScandirSettings);for(const e of n)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,n){const r=e.path;void 0!==n&&(e.path=t.joinPathSegments(n,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===n?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return Jl.default=r,Jl}();return ql.default=class{constructor(t,n){this._root=t,this._settings=n,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},ql}(),r=function(){if(Zl)return Wl;Zl=1,Object.defineProperty(Wl,"__esModule",{value:!0});const e=A,t=Cl();return Wl.default=class{constructor(n={}){this._options=n,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Wl}();function s(e={}){return e instanceof r.default?e:new r.default(e)}return Hu.Settings=r.default,Hu.walk=function(t,n,r){"function"!=typeof n?new e.default(t,s(n)).read(r):new e.default(t,s()).read(n)},Hu.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Hu.walkStream=function(e,n){const r=s(n);return new t.default(e,r).read()},Hu}var Yl,Ql={};function Xl(){if(Yl)return Ql;Yl=1,Object.defineProperty(Ql,"__esModule",{value:!0});const e=A,t=il(),n=ju();return Ql.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},Ql}var ef,tf,nf={};function rf(){if(ef)return nf;ef=1,Object.defineProperty(nf,"__esModule",{value:!0});const e=O,t=il(),n=Vl(),r=Xl();class s extends r.default{constructor(){super(...arguments),this._walkStream=n.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,n){const r=t.map(this._getFullEntryPath,this),s=new e.PassThrough({objectMode:!0});s._write=(e,o,i)=>this._getEntry(r[e],t[e],n).then(t=>{null!==t&&n.entryFilter(t)&&s.push(t),e===r.length-1&&s.end(),i()}).catch(i);for(let e=0;e<r.length;e++)s.write(e);return s}_getEntry(e,t,n){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(n.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,n)=>{this._stat(e,this._fsStatSettings,(e,r)=>null===e?t(r):n(e))})}}return nf.default=s,nf}var sf,of,af,cf={},uf={},lf={},ff={};var pf,df,hf,mf,gf,yf={},bf={},vf={};function Df(){if(mf)return cf;mf=1,Object.defineProperty(cf,"__esModule",{value:!0});const e=A,t=function(){if(af)return uf;af=1,Object.defineProperty(uf,"__esModule",{value:!0});const e=ju(),t=function(){if(of)return lf;of=1,Object.defineProperty(lf,"__esModule",{value:!0});const e=function(){if(sf)return ff;sf=1,Object.defineProperty(ff,"__esModule",{value:!0});const e=ju();return ff.default=class{constructor(e,t,n){this._patterns=e,this._settings=t,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),n=this._splitSegmentsIntoSections(t);this._storage.push({complete:n.length<=1,pattern:e,segments:t,sections:n})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},ff}();class t extends e.default{match(e){const t=e.split("/"),n=t.length,r=this._storage.filter(e=>!e.complete||e.segments.length>n);for(const e of r){const r=e.sections[0];if(!e.complete&&n>r.length)return!0;if(t.every((t,n)=>{const r=e.segments[n];return!(!r.dynamic||!r.patternRe.test(t))||!r.dynamic&&r.pattern===t}))return!0}return!1}}return lf.default=t,lf}();return uf.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,n){const r=this._getMatcher(t),s=this._getNegativePatternsRe(n);return t=>this._filter(e,t,r,s)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const n=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(n,this._micromatchOptions)}_filter(t,n,r,s){if(this._isSkippedByDeep(t,n.path))return!1;if(this._isSkippedSymbolicLink(n))return!1;const o=e.path.removeLeadingDotSegment(n.path);return!this._isSkippedByPositivePatterns(o,r)&&this._isSkippedByNegativePatterns(o,s)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const n=t.split("/").length;return""===e?n:n-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,n){return!e.pattern.matchAny(t,n)}},uf}(),n=function(){if(pf)return yf;pf=1,Object.defineProperty(yf,"__esModule",{value:!0});const e=ju();return yf.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,n){const[r,s]=e.pattern.partitionAbsoluteAndRelative(n),o={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(s,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,o)}_filter(t,n){const r=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(r))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const s=this._isMatchToPatternsSet(r,n,t.dirent.isDirectory());return this._settings.unique&&s&&this._createIndexRecord(r),s}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,n){return!!this._isMatchToPatterns(e,t.positive.all,n)&&!this._isMatchToPatterns(e,t.negative.relative,n)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,n)}_isMatchToAbsoluteNegative(t,n,r){if(0===n.length)return!1;const s=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(s,n,r)}_isMatchToPatterns(t,n,r){if(0===n.length)return!1;const s=e.pattern.matchAny(t,n);return!s&&r?e.pattern.matchAny(t+"/",n):s}},yf}(),r=function(){if(df)return bf;df=1,Object.defineProperty(bf,"__esModule",{value:!0});const e=ju();return bf.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},bf}(),s=function(){if(hf)return vf;hf=1,Object.defineProperty(vf,"__esModule",{value:!0});const e=ju();return vf.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let n=t.path;return this._settings.absolute&&(n=e.path.makeAbsolute(this._settings.cwd,n),n=e.path.unixify(n)),this._settings.markDirectories&&t.dirent.isDirectory()&&(n+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:n}):n}},vf}();return cf.default=class{constructor(e){this._settings=e,this.errorFilter=new r.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new s.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},cf}var wf,_f,Sf,Ef={},kf={},Af={};var Cf,Of,Pf,Tf,xf,Nf={},$f=function(){if(Pf)return Of;Pf=1;const e=function(){if(Fu)return Sc;Fu=1,Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.convertPatternGroupToTask=Sc.convertPatternGroupsToTasks=Sc.groupPatternsByBaseDirectory=Sc.getNegativePatternsAsPositive=Sc.getPositivePatterns=Sc.convertPatternsToTasks=Sc.generate=void 0;const e=ju();function t(t,n){let r=t;return n.braceExpansion&&(r=e.pattern.expandPatternsWithBraceExpansion(r)),n.baseNameMatch&&(r=r.map(e=>e.includes("/")?e:`**/${e}`)),r.map(t=>e.pattern.removeDuplicateSlashes(t))}function n(t,n,r){const s=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),u=e.pattern.getPatternsInsideCurrentDirectory(t),l=o(c),f=o(u);return s.push(...i(l,n,r)),"."in f?s.push(a(".",u,n,r)):s.push(...i(f,n,r)),s}function r(t){return e.pattern.getPositivePatterns(t)}function s(t,n){return e.pattern.getNegativePatterns(t).concat(n).map(e.pattern.convertToPositivePattern)}function o(t){return t.reduce((t,n)=>{const r=e.pattern.getBaseDirectory(n);return r in t?t[r].push(n):t[r]=[n],t},{})}function i(e,t,n){return Object.keys(e).map(r=>a(r,e[r],t,n))}function a(t,n,r,s){return{dynamic:s,positive:n,negative:r,base:t,patterns:[].concat(n,r.map(e.pattern.convertToNegativePattern))}}return Sc.generate=function(o,i){const a=t(o,i),c=t(i.ignore,i),u=r(a),l=s(a,c),f=u.filter(t=>e.pattern.isStaticPattern(t,i)),p=u.filter(t=>e.pattern.isDynamicPattern(t,i)),d=n(f,l,!1),h=n(p,l,!0);return d.concat(h)},Sc.convertPatternsToTasks=n,Sc.getPositivePatterns=r,Sc.getNegativePatternsAsPositive=s,Sc.groupPatternsByBaseDirectory=o,Sc.convertPatternGroupsToTasks=i,Sc.convertPatternGroupToTask=a,Sc}(),t=function(){if(gf)return Bu;gf=1,Object.defineProperty(Bu,"__esModule",{value:!0});const e=function(){if(tf)return zu;tf=1,Object.defineProperty(zu,"__esModule",{value:!0});const e=Vl(),t=Xl(),n=rf();class r extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new n.default(this._settings)}dynamic(e,t){return new Promise((n,r)=>{this._walkAsync(e,t,(e,t)=>{null===e?n(t):r(e)})})}async static(e,t){const n=[],r=this._readerStream.static(e,t);return new Promise((e,t)=>{r.once("error",t),r.on("data",e=>n.push(e)),r.once("end",()=>e(n))})}}return zu.default=r,zu}(),t=Df();class n extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),n=this._getReaderOptions(e);return(await this.api(t,e,n)).map(e=>n.transform(e))}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}return Bu.default=n,Bu}(),n=function(){if(wf)return Ef;wf=1,Object.defineProperty(Ef,"__esModule",{value:!0});const e=O,t=rf(),n=Df();class r extends n.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const n=this._getRootDirectory(t),r=this._getReaderOptions(t),s=this.api(n,t,r),o=new e.Readable({objectMode:!0,read:()=>{}});return s.once("error",e=>o.emit("error",e)).on("data",e=>o.emit("data",r.transform(e))).once("end",()=>o.emit("end")),o.once("close",()=>s.destroy()),o}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}return Ef.default=r,Ef}(),r=function(){if(Sf)return kf;Sf=1,Object.defineProperty(kf,"__esModule",{value:!0});const e=function(){if(_f)return Af;_f=1,Object.defineProperty(Af,"__esModule",{value:!0});const e=il(),t=Vl(),n=Xl();class r extends n.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const n=[];for(const r of e){const e=this._getFullEntryPath(r),s=this._getEntry(e,r,t);null!==s&&t.entryFilter(s)&&n.push(s)}return n}_getEntry(e,t,n){try{const n=this._getStat(e);return this._makeEntry(n,t)}catch(e){if(n.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Af.default=r,Af}(),t=Df();class n extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(t,e,n).map(n.transform)}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}return kf.default=n,kf}(),s=(Cf||(Cf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const t=T,n=k,r=Math.max(n.cpus().length,1);e.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:t.lstat,lstatSync:t.lstatSync,stat:t.stat,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync},e.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,r),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},e.DEFAULT_FILE_SYSTEM_ADAPTER),t)}}}(Nf)),Nf),o=ju();async function i(e,n){c(e);const r=a(e,t.default,n),s=await Promise.all(r);return o.array.flatten(s)}function a(t,n,r){const o=[].concat(t),i=new s.default(r),a=e.generate(o,i),c=new n(i);return a.map(c.read,c)}function c(e){if(![].concat(e).every(e=>o.string.isString(e)&&!o.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(t){function i(e,t){c(e);const n=a(e,r.default,t);return o.array.flatten(n)}function u(e,t){c(e);const r=a(e,n.default,t);return o.stream.merge(r)}var l,f;t.glob=t,t.globSync=i,t.globStream=u,t.async=t,t.sync=i,t.stream=u,t.generateTasks=function(t,n){c(t);const r=[].concat(t),o=new s.default(n);return e.generate(r,o)},t.isDynamicPattern=function(e,t){c(e);const n=new s.default(t);return o.pattern.isDynamicPattern(e,n)},t.escapePath=function(e){return c(e),o.path.escape(e)},t.convertPathToPattern=function(e){return c(e),o.path.convertPathToPattern(e)},(l=t.posix||(t.posix={})).escapePath=function(e){return c(e),o.path.escapePosixPath(e)},l.convertPathToPattern=function(e){return c(e),o.path.convertPosixPathToPattern(e)},(f=t.win32||(t.win32={})).escapePath=function(e){return c(e),o.path.escapeWindowsPath(e)},f.convertPathToPattern=function(e){return c(e),o.path.convertWindowsPathToPattern(e)}}(i||(i={})),Of=i}(),Lf=J($f),Rf=function(){if(xf)return Tf;xf=1;var e=Mc(),t=A.posix.dirname,n="win32"===k.platform(),r="/",s=/\\/g,o=/\\([!*?|[\](){}])/g;function i(t){return!!/\([^()]+$/.test(t)||"{"===t[0]||"["===t[0]||!!/[^\\][{[]/.test(t)||e(t)}return Tf=function(e,a){Object.assign({flipBackslashes:!0},a).flipBackslashes&&n&&e.indexOf(r)<0&&(e=e.replace(s,r)),function(e){var t;switch(e.slice(-1)){case"}":t="{";break;case"]":t="[";break;default:return!1}var n=e.indexOf(t);return!(n<0)&&e.slice(n+1,-1).includes(r)}(e)&&(e+=r),e+="a";do{e=t(e)}while(i(e));return e.replace(o,"$1")}}(),Ff=J(Rf);const If=e=>""!==e&&".."!==e,jf=e=>{if("string"!=typeof e||!e.trim())return null;const t=e.trim().replace(/[^A-Za-z0-9@/_-]/g,"_").replace(/\/{2,}/g,"/").trim().split("/").filter(e=>e.length>0);if(0===t.length)return null;for(const e of t)if(!If(e))return null;return t.join("/")},Mf=async e=>{try{return(await l(e)).isFile()}catch{return!1}},Bf="0.5.0";function zf(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:i,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);const s=i.prototype,o=Object.keys(s);for(let e=0;e<o.length;e++){const t=o[e];t in n||(n[t]=s[t].bind(n))}}const s=n?.Parent??Object;class o extends s{}function i(e){var t;const s=n?.Parent?new o:this;r(s,e),(t=s._zod).deferred??(t.deferred=[]);for(const e of s._zod.deferred)e();return s}return Object.defineProperty(o,"name",{value:e}),Object.defineProperty(i,"init",{value:r}),Object.defineProperty(i,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class Hf extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Kf extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const Uf={};function qf(e){return Uf}function Jf(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function Zf(e,t){return"bigint"==typeof t?t.toString():t}function Gf(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Wf(e){return null==e}function Vf(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const Yf=Symbol("evaluating");function Qf(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Yf)return void 0===r&&(r=Yf,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Xf(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ep(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function tp(e){return JSON.stringify(e)}const np="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function rp(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const sp=Gf(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function op(e){if(!1===rp(e))return!1;const t=e.constructor;if(void 0===t)return!0;if("function"!=typeof t)return!0;const n=t.prototype;return!1!==rp(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function ip(e){return op(e)?{...e}:Array.isArray(e)?[...e]:e}const ap=new Set(["string","number","symbol"]);function cp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function up(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function lp(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}const fp={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function pp(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function dp(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function hp(e){return"string"==typeof e?e:e?.message}function mp(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const s=hp(e.inst?._zod.def?.error?.(e))??hp(t?.error?.(e))??hp(n.customError?.(e))??hp(n.localeError?.(e))??"Invalid input";r.message=s}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function gp(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function yp(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const bp=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Zf,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},vp=zf("$ZodError",bp),Dp=zf("$ZodError",bp,{Parent:Error});const wp=e=>(t,n,r,s)=>{const o=r?Object.assign(r,{async:!1}):{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new Hf;if(i.issues.length){const t=new(s?.Err??e)(i.issues.map(e=>mp(e,o,qf())));throw np(t,s?.callee),t}return i.value},_p=e=>async(t,n,r,s)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise&&(i=await i),i.issues.length){const t=new(s?.Err??e)(i.issues.map(e=>mp(e,o,qf())));throw np(t,s?.callee),t}return i.value},Sp=e=>(t,n,r)=>{const s=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},s);if(o instanceof Promise)throw new Hf;return o.issues.length?{success:!1,error:new(e??vp)(o.issues.map(e=>mp(e,s,qf())))}:{success:!0,data:o.value}},Ep=Sp(Dp),kp=e=>async(t,n,r)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},s);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(e=>mp(e,s,qf())))}:{success:!0,data:o.value}},Ap=kp(Dp),Cp=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return wp(e)(t,n,s)},Op=e=>(t,n,r)=>wp(e)(t,n,r),Pp=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return _p(e)(t,n,s)},Tp=e=>async(t,n,r)=>_p(e)(t,n,r),xp=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Sp(e)(t,n,s)},Np=e=>(t,n,r)=>Sp(e)(t,n,r),$p=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return kp(e)(t,n,s)},Lp=e=>async(t,n,r)=>kp(e)(t,n,r),Rp=/^[cC][^\s-]{8,}$/,Fp=/^[0-9a-z]+$/,Ip=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,jp=/^[0-9a-vA-V]{20}$/,Mp=/^[A-Za-z0-9]{27}$/,Bp=/^[a-zA-Z0-9_-]{21}$/,zp=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Hp=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Kp=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Up=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;const qp=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Jp=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Zp=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Gp=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Wp=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Vp=/^[A-Za-z0-9_-]*$/,Yp=/^\+[1-9]\d{6,14}$/,Qp="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Xp=new RegExp(`^${Qp}$`);function ed(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}const td=/^-?\d+$/,nd=/^-?\d+(?:\.\d+)?$/,rd=/^(?:true|false)$/i,sd=/^[^A-Z]*$/,od=/^[^a-z]*$/,id=zf("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ad={number:"number",bigint:"bigint",object:"date"},cd=zf("$ZodCheckLessThan",(e,t)=>{id.init(e,t);const n=ad[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ud=zf("$ZodCheckGreaterThan",(e,t)=>{id.init(e,t);const n=ad[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ld=zf("$ZodCheckMultipleOf",(e,t)=>{id.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let s=(r.split(".")[1]||"").length;if(0===s&&/\d?e-\d?/.test(r)){const e=r.match(/\d?e-(\d?)/);e?.[1]&&(s=Number.parseInt(e[1]))}const o=n>s?n:s;return Number.parseInt(e.toFixed(o).replace(".",""))%Number.parseInt(t.toFixed(o).replace(".",""))/10**o}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),fd=zf("$ZodCheckNumberFormat",(e,t)=>{id.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[s,o]=fp[t.format];e._zod.onattach.push(e=>{const r=e._zod.bag;r.format=t.format,r.minimum=s,r.maximum=o,n&&(r.pattern=td)}),e._zod.check=i=>{const a=i.value;if(n){if(!Number.isInteger(a))return void i.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?i.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):i.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}))}a<s&&i.issues.push({origin:"number",input:a,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),a>o&&i.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),pd=zf("$ZodCheckMaxLength",(e,t)=>{var n;id.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Wf(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const s=gp(r);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),dd=zf("$ZodCheckMinLength",(e,t)=>{var n;id.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Wf(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const s=gp(r);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),hd=zf("$ZodCheckLengthEquals",(e,t)=>{var n;id.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Wf(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const r=n.value,s=r.length;if(s===t.length)return;const o=gp(r),i=s>t.length;n.issues.push({origin:o,...i?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),md=zf("$ZodCheckStringFormat",(e,t)=>{var n,r;id.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),gd=zf("$ZodCheckRegex",(e,t)=>{md.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),yd=zf("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=sd),md.init(e,t)}),bd=zf("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=od),md.init(e,t)}),vd=zf("$ZodCheckIncludes",(e,t)=>{id.init(e,t);const n=cp(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Dd=zf("$ZodCheckStartsWith",(e,t)=>{id.init(e,t);const n=new RegExp(`^${cp(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),wd=zf("$ZodCheckEndsWith",(e,t)=>{id.init(e,t);const n=new RegExp(`.*${cp(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),_d=zf("$ZodCheckOverwrite",(e,t)=>{id.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class Sd{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of r)this.content.push(e)}compile(){const e=Function,t=this?.args,n=[...(this?.content??[""]).map(e=>` ${e}`)];return new e(...t,n.join("\n"))}}const Ed={major:4,minor:3,patch:5},kd=zf("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ed;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const t of r)for(const n of t._zod.onattach)n(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let r,s=pp(e);for(const o of t){if(o._zod.def.when){if(!o._zod.def.when(e))continue}else if(s)continue;const t=e.issues.length,i=o._zod.check(e);if(i instanceof Promise&&!1===n?.async)throw new Hf;if(r||i instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await i;e.issues.length!==t&&(s||(s=pp(e,t)))});else{if(e.issues.length===t)continue;s||(s=pp(e,t))}}return r?r.then(()=>e):e},n=(n,s,o)=>{if(pp(n))return n.aborted=!0,n;const i=t(s,r,o);if(i instanceof Promise){if(!1===o.async)throw new Hf;return i.then(t=>e._zod.parse(t,o))}return e._zod.parse(i,o)};e._zod.run=(s,o)=>{if(o.skipChecks)return e._zod.parse(s,o);if("backward"===o.direction){const t=e._zod.parse({value:s.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,s,o)):n(t,s,o)}const i=e._zod.parse(s,o);if(i instanceof Promise){if(!1===o.async)throw new Hf;return i.then(e=>t(e,r,o))}return t(i,r,o)}}Qf(e,"~standard",()=>({validate:t=>{try{const n=Ep(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return Ap(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),Ad=zf("$ZodString",(e,t)=>{var n;kd.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=e._zod.bag,new RegExp(`^${n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*"}$`)),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Cd=zf("$ZodStringFormat",(e,t)=>{md.init(e,t),Ad.init(e,t)}),Od=zf("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Hp),Cd.init(e,t)}),Pd=zf("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Kp(e))}else t.pattern??(t.pattern=Kp());Cd.init(e,t)}),Td=zf("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Up),Cd.init(e,t)}),xd=zf("$ZodURL",(e,t)=>{Cd.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),s=new URL(r);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=s.href:n.value=r)}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Nd=zf("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Cd.init(e,t)}),$d=zf("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Bp),Cd.init(e,t)}),Ld=zf("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Rp),Cd.init(e,t)}),Rd=zf("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Fp),Cd.init(e,t)}),Fd=zf("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ip),Cd.init(e,t)}),Id=zf("$ZodXID",(e,t)=>{t.pattern??(t.pattern=jp),Cd.init(e,t)}),jd=zf("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Mp),Cd.init(e,t)}),Md=zf("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=ed({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${Qp}T(?:${r})$`)}(t)),Cd.init(e,t)}),Bd=zf("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Xp),Cd.init(e,t)}),zd=zf("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${ed(t)}$`)),Cd.init(e,t)}),Hd=zf("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=zp),Cd.init(e,t)}),Kd=zf("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=qp),Cd.init(e,t),e._zod.bag.format="ipv4"}),Ud=zf("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Jp),Cd.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),qd=zf("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Zp),Cd.init(e,t)}),Jd=zf("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Gp),Cd.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(2!==r.length)throw new Error;const[e,t]=r;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Zd(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Gd=zf("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Wp),Cd.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Zd(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});const Wd=zf("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Vp),Cd.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{(function(e){if(!Vp.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Zd(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Vd=zf("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Yp),Cd.init(e,t)});const Yd=zf("$ZodJWT",(e,t)=>{Cd.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[r]=n;if(!r)return!1;const s=JSON.parse(atob(r));return!("typ"in s&&"JWT"!==s?.typ||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Qd=zf("$ZodNumber",(e,t)=>{kd.init(e,t),e._zod.pattern=e._zod.bag.pattern??nd,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const s=n.value;if("number"==typeof s&&!Number.isNaN(s)&&Number.isFinite(s))return n;const o="number"==typeof s?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...o?{received:o}:{}}),n}}),Xd=zf("$ZodNumberFormat",(e,t)=>{fd.init(e,t),Qd.init(e,t)}),eh=zf("$ZodBoolean",(e,t)=>{kd.init(e,t),e._zod.pattern=rd,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const s=n.value;return"boolean"==typeof s||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),th=zf("$ZodUnknown",(e,t)=>{kd.init(e,t),e._zod.parse=e=>e}),nh=zf("$ZodNever",(e,t)=>{kd.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function rh(e,t,n){e.issues.length&&t.issues.push(...dp(n,e.issues)),t.value[n]=e.value}const sh=zf("$ZodArray",(e,t)=>{kd.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const o=[];for(let e=0;e<s.length;e++){const i=s[e],a=t.element._zod.run({value:i,issues:[]},r);a instanceof Promise?o.push(a.then(t=>rh(t,n,e))):rh(a,n,e)}return o.length?Promise.all(o).then(()=>n):n}});function oh(e,t,n,r,s){if(e.issues.length){if(s&&!(n in r))return;t.issues.push(...dp(n,e.issues))}void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function ih(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=(r=e.shape,Object.keys(r).filter(e=>"optional"===r[e]._zod.optin&&"optional"===r[e]._zod.optout));var r;return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function ah(e,t,n,r,s,o){const i=[],a=s.keySet,c=s.catchall._zod,u=c.def.type,l="optional"===c.optout;for(const s in t){if(a.has(s))continue;if("never"===u){i.push(s);continue}const o=c.run({value:t[s],issues:[]},r);o instanceof Promise?e.push(o.then(e=>oh(e,n,s,t,l))):oh(o,n,s,t,l)}return i.length&&n.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const ch=zf("$ZodObject",(e,t)=>{kd.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const r=Gf(()=>ih(t));Qf(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(const e of r.values)n[t].add(e)}}return n});const s=rp,o=t.catchall;let i;e._zod.parse=(t,n)=>{i??(i=r.value);const a=t.value;if(!s(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};const c=[],u=i.shape;for(const e of i.keys){const r=u[e],s="optional"===r._zod.optout,o=r._zod.run({value:a[e],issues:[]},n);o instanceof Promise?c.push(o.then(n=>oh(n,t,e,a,s))):oh(o,t,e,a,s)}return o?ah(c,a,t,n,r.value,e):c.length?Promise.all(c).then(()=>t):t}}),uh=zf("$ZodObjectJIT",(e,t)=>{ch.init(e,t);const n=e._zod.parse,r=Gf(()=>ih(t));let s;const o=rp,i=!Uf.jitless,a=i&&sp.value,c=t.catchall;let u;e._zod.parse=(l,f)=>{u??(u=r.value);const p=l.value;return o(p)?i&&a&&!1===f?.async&&!0!==f.jitless?(s||(s=(e=>{const t=new Sd(["shape","payload","ctx"]),n=r.value,s=e=>{const t=tp(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const o=Object.create(null);let i=0;for(const e of n.keys)o[e]="key_"+i++;t.write("const newResult = {};");for(const r of n.keys){const n=o[r],i=tp(r),a=e[r],c="optional"===a?._zod?.optout;t.write(`const ${n} = ${s(r)};`),c?t.write(`\n if (${n}.issues.length) {\n if (${i} in input) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${i}, ...iss.path] : [${i}]\n })));\n }\n }\n \n if (${n}.value === undefined) {\n if (${i} in input) {\n newResult[${i}] = undefined;\n }\n } else {\n newResult[${i}] = ${n}.value;\n }\n \n `):t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${i}, ...iss.path] : [${i}]\n })));\n }\n \n if (${n}.value === undefined) {\n if (${i} in input) {\n newResult[${i}] = undefined;\n }\n } else {\n newResult[${i}] = ${n}.value;\n }\n \n `)}t.write("payload.value = newResult;"),t.write("return payload;");const a=t.compile();return(t,n)=>a(e,t,n)})(t.shape)),l=s(l,f),c?ah([],p,l,f,u,e):l):n(l,f):(l.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),l)}});function lh(e,t,n,r){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const s=e.filter(e=>!pp(e));return 1===s.length?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>mp(e,r,qf())))}),t)}const fh=zf("$ZodUnion",(e,t)=>{kd.init(e,t),Qf(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),Qf(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),Qf(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),Qf(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>Vf(e.source)).join("|")})$`)}});const n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=(s,o)=>{if(n)return r(s,o);let i=!1;const a=[];for(const e of t.options){const t=e._zod.run({value:s.value,issues:[]},o);if(t instanceof Promise)a.push(t),i=!0;else{if(0===t.issues.length)return t;a.push(t)}}return i?Promise.all(a).then(t=>lh(t,s,e,o)):lh(a,s,e,o)}}),ph=zf("$ZodIntersection",(e,t)=>{kd.init(e,t),e._zod.parse=(e,n)=>{const r=e.value,s=t.left._zod.run({value:r,issues:[]},n),o=t.right._zod.run({value:r,issues:[]},n);return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([t,n])=>hh(e,t,n)):hh(e,s,o)}});function dh(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(op(e)&&op(t)){const n=Object.keys(t),r=Object.keys(e).filter(e=>-1!==n.indexOf(e)),s={...e,...t};for(const n of r){const r=dh(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};s[n]=r.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const s=dh(e[r],t[r]);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function hh(e,t,n){const r=new Map;let s;for(const n of t.issues)if("unrecognized_keys"===n.code){s??(s=n);for(const e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(const t of n.issues)if("unrecognized_keys"===t.code)for(const e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);const o=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(o.length&&s&&e.issues.push({...s,keys:o}),pp(e))return e;const i=dh(t.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const mh=zf("$ZodRecord",(e,t)=>{kd.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!op(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const o=[],i=t.keyType._zod.values;if(i){n.value={};const a=new Set;for(const e of i)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){a.add("number"==typeof e?e.toString():e);const i=t.valueType._zod.run({value:s[e],issues:[]},r);i instanceof Promise?o.push(i.then(t=>{t.issues.length&&n.issues.push(...dp(e,t.issues)),n.value[e]=t.value})):(i.issues.length&&n.issues.push(...dp(e,i.issues)),n.value[e]=i.value)}let c;for(const e in s)a.has(e)||(c=c??[],c.push(e));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:c})}else{n.value={};for(const i of Reflect.ownKeys(s)){if("__proto__"===i)continue;let a=t.keyType._zod.run({value:i,issues:[]},r);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if("string"==typeof i&&nd.test(i)&&a.issues.length&&a.issues.some(e=>"invalid_type"===e.code&&"number"===e.expected)){const e=t.keyType._zod.run({value:Number(i),issues:[]},r);if(e instanceof Promise)throw new Error("Async schemas not supported in object keys currently");0===e.issues.length&&(a=e)}if(a.issues.length){"loose"===t.mode?n.value[i]=s[i]:n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(e=>mp(e,r,qf())),input:i,path:[i],inst:e});continue}const c=t.valueType._zod.run({value:s[i],issues:[]},r);c instanceof Promise?o.push(c.then(e=>{e.issues.length&&n.issues.push(...dp(i,e.issues)),n.value[a.value]=e.value})):(c.issues.length&&n.issues.push(...dp(i,c.issues)),n.value[a.value]=c.value)}}return o.length?Promise.all(o).then(()=>n):n}}),gh=zf("$ZodEnum",(e,t)=>{kd.init(e,t);const n=Jf(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(e=>ap.has(typeof e)).map(e=>"string"==typeof e?cp(e):e.toString()).join("|")})$`),e._zod.parse=(t,s)=>{const o=t.value;return r.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),yh=zf("$ZodTransform",(e,t)=>{kd.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new Kf(e.constructor.name);const s=t.transform(n.value,n);if(r.async){return(s instanceof Promise?s:Promise.resolve(s)).then(e=>(n.value=e,n))}if(s instanceof Promise)throw new Hf;return n.value=s,n}});function bh(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const vh=zf("$ZodOptional",(e,t)=>{kd.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Qf(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Qf(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${Vf(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>bh(t,e.value)):bh(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),Dh=zf("$ZodExactOptional",(e,t)=>{vh.init(e,t),Qf(e._zod,"values",()=>t.innerType._zod.values),Qf(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),wh=zf("$ZodNullable",(e,t)=>{kd.init(e,t),Qf(e._zod,"optin",()=>t.innerType._zod.optin),Qf(e._zod,"optout",()=>t.innerType._zod.optout),Qf(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${Vf(e.source)}|null)$`):void 0}),Qf(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),_h=zf("$ZodDefault",(e,t)=>{kd.init(e,t),e._zod.optin="optional",Qf(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Sh(e,t)):Sh(r,t)}});function Sh(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Eh=zf("$ZodPrefault",(e,t)=>{kd.init(e,t),e._zod.optin="optional",Qf(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),kh=zf("$ZodNonOptional",(e,t)=>{kd.init(e,t),Qf(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(t=>Ah(t,e)):Ah(s,e)}});function Ah(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Ch=zf("$ZodCatch",(e,t)=>{kd.init(e,t),Qf(e._zod,"optin",()=>t.innerType._zod.optin),Qf(e._zod,"optout",()=>t.innerType._zod.optout),Qf(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>mp(e,n,qf()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>mp(e,n,qf()))},input:e.value}),e.issues=[]),e)}}),Oh=zf("$ZodPipe",(e,t)=>{kd.init(e,t),Qf(e._zod,"values",()=>t.in._zod.values),Qf(e._zod,"optin",()=>t.in._zod.optin),Qf(e._zod,"optout",()=>t.out._zod.optout),Qf(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Ph(e,t.in,n)):Ph(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Ph(e,t.out,n)):Ph(r,t.out,n)}});function Ph(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Th=zf("$ZodReadonly",(e,t)=>{kd.init(e,t),Qf(e._zod,"propValues",()=>t.innerType._zod.propValues),Qf(e._zod,"values",()=>t.innerType._zod.values),Qf(e._zod,"optin",()=>t.innerType?._zod?.optin),Qf(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(xh):xh(r)}});function xh(e){return e.value=Object.freeze(e.value),e}const Nh=zf("$ZodCustom",(e,t)=>{id.init(e,t),kd.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const r=n.value,s=t.fn(r);if(s instanceof Promise)return s.then(t=>$h(t,n,r,e));$h(s,n,r,e)}});function $h(e,t,n,r){if(!e){const e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(yp(e))}}var Lh;class Rh{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}(Lh=globalThis).__zod_globalRegistry??(Lh.__zod_globalRegistry=new Rh);const Fh=globalThis.__zod_globalRegistry;function Ih(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...lp(t)})}function jh(e,t){return new cd({check:"less_than",...lp(t),value:e,inclusive:!1})}function Mh(e,t){return new cd({check:"less_than",...lp(t),value:e,inclusive:!0})}function Bh(e,t){return new ud({check:"greater_than",...lp(t),value:e,inclusive:!1})}function zh(e,t){return new ud({check:"greater_than",...lp(t),value:e,inclusive:!0})}function Hh(e,t){return new ld({check:"multiple_of",...lp(t),value:e})}function Kh(e,t){return new pd({check:"max_length",...lp(t),maximum:e})}function Uh(e,t){return new dd({check:"min_length",...lp(t),minimum:e})}function qh(e,t){return new hd({check:"length_equals",...lp(t),length:e})}function Jh(e){return new _d({check:"overwrite",tx:e})}function Zh(e){const t=function(e,t){const n=new id({check:"custom",...lp(t)});return n._zod.check=e,n}(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(yp(e,n.value,t._zod.def));else{const r=e;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(yp(r))}},e(n.value,n)));return t}function Gh(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Fh,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Wh(e,t,n={path:[],schemaPath:[]}){var r;const s=e._zod.def,o=t.seen.get(e);if(o){o.count++;return n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema}const i={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,i);const a=e._zod.toJSONSchema?.();if(a)i.schema=a;else{const r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,r);else{const n=i.schema,o=t.processors[s.type];if(!o)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);o(e,t,n,r)}const o=e._zod.parent;o&&(i.ref||(i.ref=o),Wh(o,t,r),t.seen.get(o).isParent=!0)}const c=t.metadataRegistry.get(e);c&&Object.assign(i.schema,c),"input"===t.io&&Qh(e)&&(delete i.schema.examples,delete i.schema.default),"input"===t.io&&i.schema._prefault&&((r=i.schema).default??(r.default=i.schema._prefault)),delete i.schema._prefault;return t.seen.get(e).schema}function Vh(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const t of e.seen.entries()){const n=e.metadataRegistry.get(t[0])?.id;if(n){const e=r.get(n);if(e&&e!==t[0])throw new Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}const s=t=>{if(t[1].schema.$ref)return;const r=t[1],{ref:s,defId:o}=(t=>{const r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){const n=e.external.registry.get(t[0])?.id,s=e.external.uri??(e=>e);if(n)return{ref:s(n)};const o=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=o,{defId:o,ref:`${s("__shared")}#/${r}/${o}`}}if(t[1]===n)return{ref:"#"};const s=`#/${r}/`,o=t[1].schema.id??"__schema"+e.counter++;return{defId:o,ref:s+o}})(t);r.def={...r.schema},o&&(r.defId=o);const i=r.schema;for(const e in i)delete i[e];i.$ref=s};if("throw"===e.cycles)for(const t of e.seen.entries()){const e=t[1];if(e.cycle)throw new Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const n of e.seen.entries()){const r=n[1];if(t===n[0]){s(n);continue}if(e.external){const r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){s(n);continue}}const o=e.metadataRegistry.get(n[0])?.id;o?s(n):(r.cycle||r.count>1&&"ref"===e.reused)&&s(n)}}function Yh(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=t=>{const n=e.seen.get(t);if(null===n.ref)return;const s=n.def??n.schema,o={...s},i=n.ref;if(n.ref=null,i){r(i);const n=e.seen.get(i),a=n.schema;!a.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?Object.assign(s,a):(s.allOf=s.allOf??[],s.allOf.push(a)),Object.assign(s,o);if(t._zod.parent===i)for(const e in s)"$ref"!==e&&"allOf"!==e&&(e in o||delete s[e]);if(a.$ref)for(const e in s)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(s[e])===JSON.stringify(n.def[e])&&delete s[e]}const a=t._zod.parent;if(a&&a!==i){r(a);const t=e.seen.get(a);if(t?.schema.$ref&&(s.$ref=t.schema.$ref,t.def))for(const e in s)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(s[e])===JSON.stringify(t.def[e])&&delete s[e]}e.override({zodSchema:t,jsonSchema:s,path:n.path??[]})};for(const t of[...e.seen.entries()].reverse())r(t[0]);const s={};if("draft-2020-12"===e.target?s.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?s.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const n=e.external.registry.get(t)?.id;if(!n)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(n)}Object.assign(s,n.def??n.schema);const o=e.external?.defs??{};for(const t of e.seen.entries()){const e=t[1];e.def&&e.defId&&(o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&("draft-2020-12"===e.target?s.$defs=o:s.definitions=o);try{const n=JSON.parse(JSON.stringify(s));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:Xh(t,"input",e.processors),output:Xh(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw new Error("Error converting schema to JSON.")}}function Qh(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if("transform"===r.type)return!0;if("array"===r.type)return Qh(r.element,n);if("set"===r.type)return Qh(r.valueType,n);if("lazy"===r.type)return Qh(r.getter(),n);if("promise"===r.type||"optional"===r.type||"nonoptional"===r.type||"nullable"===r.type||"readonly"===r.type||"default"===r.type||"prefault"===r.type)return Qh(r.innerType,n);if("intersection"===r.type)return Qh(r.left,n)||Qh(r.right,n);if("record"===r.type||"map"===r.type)return Qh(r.keyType,n)||Qh(r.valueType,n);if("pipe"===r.type)return Qh(r.in,n)||Qh(r.out,n);if("object"===r.type){for(const e in r.shape)if(Qh(r.shape[e],n))return!0;return!1}if("union"===r.type){for(const e of r.options)if(Qh(e,n))return!0;return!1}if("tuple"===r.type){for(const e of r.items)if(Qh(e,n))return!0;return!(!r.rest||!Qh(r.rest,n))}return!1}const Xh=(e,t,n={})=>r=>{const{libraryOptions:s,target:o}=r??{},i=Gh({...s??{},target:o,io:t,processors:n});return Wh(e,i),Vh(i,e),Yh(i,e)},em={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},tm=(e,t,n,r)=>{const s=e._zod.def;Wh(s.innerType,t,r);t.seen.get(e).ref=s.innerType},nm=zf("ZodISODateTime",(e,t)=>{Md.init(e,t),Pm.init(e,t)});function rm(e){return function(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...lp(t)})}(nm,e)}const sm=zf("ZodISODate",(e,t)=>{Bd.init(e,t),Pm.init(e,t)});function om(e){return function(e,t){return new e({type:"string",format:"date",check:"string_format",...lp(t)})}(sm,e)}const im=zf("ZodISOTime",(e,t)=>{zd.init(e,t),Pm.init(e,t)});function am(e){return function(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...lp(t)})}(im,e)}const cm=zf("ZodISODuration",(e,t)=>{Hd.init(e,t),Pm.init(e,t)});function um(e){return function(e,t){return new e({type:"string",format:"duration",check:"string_format",...lp(t)})}(cm,e)}const lm=(e,t)=>{vp.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t=e=>e.message){const n={_errors:[]},r=e=>{for(const s of e.issues)if("invalid_union"===s.code&&s.errors.length)s.errors.map(e=>r({issues:e}));else if("invalid_key"===s.code)r({issues:s.issues});else if("invalid_element"===s.code)r({issues:s.issues});else if(0===s.path.length)n._errors.push(t(s));else{let e=n,r=0;for(;r<s.path.length;){const n=s.path[r];r===s.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(s))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){const n={},r=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Zf,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Zf,2)}},isEmpty:{get:()=>0===e.issues.length}})},fm=zf("ZodError",lm),pm=zf("ZodError",lm,{Parent:Error}),dm=wp(pm),hm=_p(pm),mm=Sp(pm),gm=kp(pm),ym=Cp(pm),bm=Op(pm),vm=Pp(pm),Dm=Tp(pm),wm=xp(pm),_m=Np(pm),Sm=$p(pm),Em=Lp(pm),km=zf("ZodType",(e,t)=>(kd.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Xh(e,"input"),output:Xh(e,"output")}}),e.toJSONSchema=((e,t={})=>n=>{const r=Gh({...n,processors:t});return Wh(e,r),Vh(r,e),Yh(r,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(ep(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>up(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>dm(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>mm(e,t,n),e.parseAsync=async(t,n)=>hm(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>gm(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>ym(e,t,n),e.decode=(t,n)=>bm(e,t,n),e.encodeAsync=async(t,n)=>vm(e,t,n),e.decodeAsync=async(t,n)=>Dm(e,t,n),e.safeEncode=(t,n)=>wm(e,t,n),e.safeDecode=(t,n)=>_m(e,t,n),e.safeEncodeAsync=async(t,n)=>Sm(e,t,n),e.safeDecodeAsync=async(t,n)=>Em(e,t,n),e.refine=(t,n)=>e.check(function(e,t={}){return function(e,t,n){return new e({type:"custom",check:"custom",fn:t,...lp(n)})}(Ag,e,t)}(t,n)),e.superRefine=t=>e.check(function(e){return Zh(e)}(t)),e.overwrite=t=>e.check(Jh(t)),e.optional=()=>mg(e),e.exactOptional=()=>new gg({type:"optional",innerType:e}),e.nullable=()=>bg(e),e.nullish=()=>mg(bg(e)),e.nonoptional=t=>function(e,t){return new wg({type:"nonoptional",innerType:e,...lp(t)})}(e,t),e.array=()=>og(e),e.or=t=>ug([e,t]),e.and=t=>new lg({type:"intersection",left:e,right:t}),e.transform=t=>Eg(e,function(e){return new dg({type:"transform",transform:e})}(t)),e.default=t=>{return n=t,new vg({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():ip(n)}});var n},e.prefault=t=>{return n=t,new Dg({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():ip(n)}});var n},e.catch=t=>{return new _g({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>Eg(e,t),e.readonly=()=>new kg({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return Fh.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>Fh.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return Fh.get(e);const n=e.clone();return Fh.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),Am=zf("_ZodString",(e,t)=>{Ad.init(e,t),km.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=n;r.type="string";const{minimum:s,maximum:o,format:i,patterns:a,contentEncoding:c}=e._zod.bag;if("number"==typeof s&&(r.minLength=s),"number"==typeof o&&(r.maxLength=o),i&&(r.format=em[i]??i,""===r.format&&delete r.format,"time"===i&&delete r.format),c&&(r.contentEncoding=c),a&&a.size>0){const e=[...a];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,n);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(function(e,t){return new gd({check:"string_format",format:"regex",...lp(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new vd({check:"string_format",format:"includes",...lp(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new Dd({check:"string_format",format:"starts_with",...lp(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new wd({check:"string_format",format:"ends_with",...lp(t),suffix:e})}(...t)),e.min=(...t)=>e.check(Uh(...t)),e.max=(...t)=>e.check(Kh(...t)),e.length=(...t)=>e.check(qh(...t)),e.nonempty=(...t)=>e.check(Uh(1,...t)),e.lowercase=t=>e.check(function(e){return new yd({check:"string_format",format:"lowercase",...lp(e)})}(t)),e.uppercase=t=>e.check(function(e){return new bd({check:"string_format",format:"uppercase",...lp(e)})}(t)),e.trim=()=>e.check(Jh(e=>e.trim())),e.normalize=(...t)=>e.check(function(e){return Jh(t=>t.normalize(e))}(...t)),e.toLowerCase=()=>e.check(Jh(e=>e.toLowerCase())),e.toUpperCase=()=>e.check(Jh(e=>e.toUpperCase())),e.slugify=()=>e.check(Jh(e=>function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}(e)))}),Cm=zf("ZodString",(e,t)=>{Ad.init(e,t),Am.init(e,t),e.email=t=>e.check(function(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...lp(t)})}(Tm,t)),e.url=t=>e.check(function(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...lp(t)})}($m,t)),e.jwt=t=>e.check(function(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...lp(t)})}(Gm,t)),e.emoji=t=>e.check(function(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...lp(t)})}(Lm,t)),e.guid=t=>e.check(Ih(xm,t)),e.uuid=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...lp(t)})}(Nm,t)),e.uuidv4=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...lp(t)})}(Nm,t)),e.uuidv6=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...lp(t)})}(Nm,t)),e.uuidv7=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...lp(t)})}(Nm,t)),e.nanoid=t=>e.check(function(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...lp(t)})}(Rm,t)),e.guid=t=>e.check(Ih(xm,t)),e.cuid=t=>e.check(function(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...lp(t)})}(Fm,t)),e.cuid2=t=>e.check(function(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...lp(t)})}(Im,t)),e.ulid=t=>e.check(function(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...lp(t)})}(jm,t)),e.base64=t=>e.check(function(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...lp(t)})}(qm,t)),e.base64url=t=>e.check(function(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...lp(t)})}(Jm,t)),e.xid=t=>e.check(function(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...lp(t)})}(Mm,t)),e.ksuid=t=>e.check(function(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...lp(t)})}(Bm,t)),e.ipv4=t=>e.check(function(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...lp(t)})}(zm,t)),e.ipv6=t=>e.check(function(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...lp(t)})}(Hm,t)),e.cidrv4=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...lp(t)})}(Km,t)),e.cidrv6=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...lp(t)})}(Um,t)),e.e164=t=>e.check(function(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...lp(t)})}(Zm,t)),e.datetime=t=>e.check(rm(t)),e.date=t=>e.check(om(t)),e.time=t=>e.check(am(t)),e.duration=t=>e.check(um(t))});function Om(e){return function(e,t){return new e({type:"string",...lp(t)})}(Cm,e)}const Pm=zf("ZodStringFormat",(e,t)=>{Cd.init(e,t),Am.init(e,t)}),Tm=zf("ZodEmail",(e,t)=>{Td.init(e,t),Pm.init(e,t)}),xm=zf("ZodGUID",(e,t)=>{Od.init(e,t),Pm.init(e,t)}),Nm=zf("ZodUUID",(e,t)=>{Pd.init(e,t),Pm.init(e,t)}),$m=zf("ZodURL",(e,t)=>{xd.init(e,t),Pm.init(e,t)}),Lm=zf("ZodEmoji",(e,t)=>{Nd.init(e,t),Pm.init(e,t)}),Rm=zf("ZodNanoID",(e,t)=>{$d.init(e,t),Pm.init(e,t)}),Fm=zf("ZodCUID",(e,t)=>{Ld.init(e,t),Pm.init(e,t)}),Im=zf("ZodCUID2",(e,t)=>{Rd.init(e,t),Pm.init(e,t)}),jm=zf("ZodULID",(e,t)=>{Fd.init(e,t),Pm.init(e,t)}),Mm=zf("ZodXID",(e,t)=>{Id.init(e,t),Pm.init(e,t)}),Bm=zf("ZodKSUID",(e,t)=>{jd.init(e,t),Pm.init(e,t)}),zm=zf("ZodIPv4",(e,t)=>{Kd.init(e,t),Pm.init(e,t)}),Hm=zf("ZodIPv6",(e,t)=>{Ud.init(e,t),Pm.init(e,t)}),Km=zf("ZodCIDRv4",(e,t)=>{qd.init(e,t),Pm.init(e,t)}),Um=zf("ZodCIDRv6",(e,t)=>{Jd.init(e,t),Pm.init(e,t)}),qm=zf("ZodBase64",(e,t)=>{Gd.init(e,t),Pm.init(e,t)}),Jm=zf("ZodBase64URL",(e,t)=>{Wd.init(e,t),Pm.init(e,t)}),Zm=zf("ZodE164",(e,t)=>{Vd.init(e,t),Pm.init(e,t)}),Gm=zf("ZodJWT",(e,t)=>{Yd.init(e,t),Pm.init(e,t)}),Wm=zf("ZodNumber",(e,t)=>{Qd.init(e,t),km.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=n,{minimum:s,maximum:o,format:i,multipleOf:a,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;"string"==typeof i&&i.includes("int")?r.type="integer":r.type="number","number"==typeof u&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.minimum=u,r.exclusiveMinimum=!0):r.exclusiveMinimum=u),"number"==typeof s&&(r.minimum=s,"number"==typeof u&&"draft-04"!==t.target&&(u>=s?delete r.minimum:delete r.exclusiveMinimum)),"number"==typeof c&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.maximum=c,r.exclusiveMaximum=!0):r.exclusiveMaximum=c),"number"==typeof o&&(r.maximum=o,"number"==typeof c&&"draft-04"!==t.target&&(c<=o?delete r.maximum:delete r.exclusiveMaximum)),"number"==typeof a&&(r.multipleOf=a)})(e,t,n),e.gt=(t,n)=>e.check(Bh(t,n)),e.gte=(t,n)=>e.check(zh(t,n)),e.min=(t,n)=>e.check(zh(t,n)),e.lt=(t,n)=>e.check(jh(t,n)),e.lte=(t,n)=>e.check(Mh(t,n)),e.max=(t,n)=>e.check(Mh(t,n)),e.int=t=>e.check(Ym(t)),e.safe=t=>e.check(Ym(t)),e.positive=t=>e.check(Bh(0,t)),e.nonnegative=t=>e.check(zh(0,t)),e.negative=t=>e.check(jh(0,t)),e.nonpositive=t=>e.check(Mh(0,t)),e.multipleOf=(t,n)=>e.check(Hh(t,n)),e.step=(t,n)=>e.check(Hh(t,n)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});const Vm=zf("ZodNumberFormat",(e,t)=>{Xd.init(e,t),Wm.init(e,t)});function Ym(e){return function(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...lp(t)})}(Vm,e)}const Qm=zf("ZodBoolean",(e,t)=>{eh.init(e,t),km.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.type="boolean"})(0,0,t)});function Xm(e){return function(e,t){return new e({type:"boolean",...lp(t)})}(Qm,e)}const eg=zf("ZodUnknown",(e,t)=>{th.init(e,t),km.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function tg(){return new eg({type:"unknown"})}const ng=zf("ZodNever",(e,t)=>{nh.init(e,t),km.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.not={}})(0,0,t)});function rg(e){return function(e,t){return new e({type:"never",...lp(t)})}(ng,e)}const sg=zf("ZodArray",(e,t)=>{sh.init(e,t),km.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=n,o=e._zod.def,{minimum:i,maximum:a}=e._zod.bag;"number"==typeof i&&(s.minItems=i),"number"==typeof a&&(s.maxItems=a),s.type="array",s.items=Wh(o.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(Uh(t,n)),e.nonempty=t=>e.check(Uh(1,t)),e.max=(t,n)=>e.check(Kh(t,n)),e.length=(t,n)=>e.check(qh(t,n)),e.unwrap=()=>e.element});function og(e,t){return function(e,t,n){return new e({type:"array",element:t,...lp(n)})}(sg,e,t)}const ig=zf("ZodObject",(e,t)=>{uh.init(e,t),km.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=n,o=e._zod.def;s.type="object",s.properties={};const i=o.shape;for(const e in i)s.properties[e]=Wh(i[e],t,{...r,path:[...r.path,"properties",e]});const a=new Set(Object.keys(i)),c=new Set([...a].filter(e=>{const n=o.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));c.size>0&&(s.required=Array.from(c)),"never"===o.catchall?._zod.def.type?s.additionalProperties=!1:o.catchall?o.catchall&&(s.additionalProperties=Wh(o.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(s.additionalProperties=!1)})(e,t,n,r),Qf(e,"shape",()=>t.shape),e.keyof=()=>function(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new pg({type:"enum",entries:n,...lp(t)})}(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:tg()}),e.loose=()=>e.clone({...e._zod.def,catchall:tg()}),e.strict=()=>e.clone({...e._zod.def,catchall:rg()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!op(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const n=e._zod.def.shape;for(const e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const r=ep(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Xf(this,"shape",n),n}});return up(e,r)}(e,t),e.safeExtend=t=>function(e,t){if(!op(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=ep(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Xf(this,"shape",n),n}});return up(e,n)}(e,t),e.merge=t=>function(e,t){const n=ep(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return Xf(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return up(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return up(e,ep(e._zod.def,{get shape(){const e={};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Xf(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=ep(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Xf(this,"shape",r),r},checks:[]});return up(e,s)}(e,t),e.partial=(...t)=>function(e,t,n){const r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const s=ep(t._zod.def,{get shape(){const r=t._zod.def.shape,s={...r};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(s[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(const t in r)s[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return Xf(this,"shape",s),s},checks:[]});return up(t,s)}(hg,e,t[0]),e.required=(...t)=>function(e,t,n){const r=ep(t._zod.def,{get shape(){const r=t._zod.def.shape,s={...r};if(n)for(const t in n){if(!(t in s))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(s[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(const t in r)s[t]=new e({type:"nonoptional",innerType:r[t]});return Xf(this,"shape",s),s}});return up(t,r)}(wg,e,t[0])});function ag(e,t){const n={type:"object",shape:e??{},...lp(t)};return new ig(n)}const cg=zf("ZodUnion",(e,t)=>{fh.init(e,t),km.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def,o=!1===s.inclusive,i=s.options.map((e,n)=>Wh(e,t,{...r,path:[...r.path,o?"oneOf":"anyOf",n]}));o?n.oneOf=i:n.anyOf=i})(e,t,n,r),e.options=t.options});function ug(e,t){return new cg({type:"union",options:e,...lp(t)})}const lg=zf("ZodIntersection",(e,t)=>{ph.init(e,t),km.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def,o=Wh(s.left,t,{...r,path:[...r.path,"allOf",0]}),i=Wh(s.right,t,{...r,path:[...r.path,"allOf",1]}),a=e=>"allOf"in e&&1===Object.keys(e).length,c=[...a(o)?o.allOf:[o],...a(i)?i.allOf:[i]];n.allOf=c})(e,t,n,r)});const fg=zf("ZodRecord",(e,t)=>{mh.init(e,t),km.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=n,o=e._zod.def;s.type="object";const i=o.keyType,a=i._zod.bag,c=a?.patterns;if("loose"===o.mode&&c&&c.size>0){const e=Wh(o.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});s.patternProperties={};for(const t of c)s.patternProperties[t.source]=e}else"draft-07"!==t.target&&"draft-2020-12"!==t.target||(s.propertyNames=Wh(o.keyType,t,{...r,path:[...r.path,"propertyNames"]})),s.additionalProperties=Wh(o.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const u=i._zod.values;if(u){const e=[...u].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(s.required=e)}})(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});const pg=zf("ZodEnum",(e,t)=>{gh.init(e,t),km.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=Jf(e._zod.def.entries);r.every(e=>"number"==typeof e)&&(n.type="number"),r.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=r})(e,0,n),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const s={};for(const r of e){if(!n.has(r))throw new Error(`Key ${r} not found in enum`);s[r]=t.entries[r]}return new pg({...t,checks:[],...lp(r),entries:s})},e.exclude=(e,r)=>{const s={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete s[t]}return new pg({...t,checks:[],...lp(r),entries:s})}});const dg=zf("ZodTransform",(e,t)=>{yh.init(e,t),km.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema")})(0,e),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new Kf(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(yp(r,n.value,t));else{const t=r;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(yp(t))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(e=>(n.value=e,n)):(n.value=s,n)}});const hg=zf("ZodOptional",(e,t)=>{vh.init(e,t),km.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tm(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});function mg(e){return new hg({type:"optional",innerType:e})}const gg=zf("ZodExactOptional",(e,t)=>{Dh.init(e,t),km.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tm(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});const yg=zf("ZodNullable",(e,t)=>{wh.init(e,t),km.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def,o=Wh(s.innerType,t,r),i=t.seen.get(e);"openapi-3.0"===t.target?(i.ref=s.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function bg(e){return new yg({type:"nullable",innerType:e})}const vg=zf("ZodDefault",(e,t)=>{_h.init(e,t),km.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def;Wh(s.innerType,t,r),t.seen.get(e).ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});const Dg=zf("ZodPrefault",(e,t)=>{Eh.init(e,t),km.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def;Wh(s.innerType,t,r),t.seen.get(e).ref=s.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});const wg=zf("ZodNonOptional",(e,t)=>{kh.init(e,t),km.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def;Wh(s.innerType,t,r),t.seen.get(e).ref=s.innerType})(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});const _g=zf("ZodCatch",(e,t)=>{Ch.init(e,t),km.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def;let o;Wh(s.innerType,t,r),t.seen.get(e).ref=s.innerType;try{o=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=o})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});const Sg=zf("ZodPipe",(e,t)=>{Oh.init(e,t),km.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def,o="input"===t.io?"transform"===s.in._zod.def.type?s.out:s.in:s.out;Wh(o,t,r),t.seen.get(e).ref=o})(e,t,0,r),e.in=t.in,e.out=t.out});function Eg(e,t){return new Sg({type:"pipe",in:e,out:t})}const kg=zf("ZodReadonly",(e,t)=>{Th.init(e,t),km.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const s=e._zod.def;Wh(s.innerType,t,r),t.seen.get(e).ref=s.innerType,n.readOnly=!0})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});const Ag=zf("ZodCustom",(e,t)=>{Nh.init(e,t),km.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")})(0,e)});function Cg(e){return function(e,t){return new e({type:"number",coerce:!0,checks:[],...lp(t)})}(Wm,e)}const Og=ug([Xm(),Om(),function(e,t){return new e({type:"number",checks:[],...lp(t)})}(Wm,Pg)]).transform(e=>{if("boolean"==typeof e)return e;if("number"==typeof e)return 1===e;const t=e.trim().toLowerCase();return"1"===t||"true"===t||"0"!==t&&"false"!==t&&void 0}).optional();var Pg;const Tg=ag({script:Om().min(1,{message:"script must be a non-empty string"}),warnPattern:Om().min(1,{message:"warnPattern must be a non-empty string"}).optional().refine(e=>"string"!=typeof e||(e=>{try{return new RegExp(e),!0}catch{return!1}})(e),{message:"warnPattern: invalid regular expression"}),warnPatternFlags:Om().optional().refine(e=>"string"!=typeof e||(e=>{try{return new RegExp("",e),!0}catch{return!1}})(e),{message:"warnPatternFlags: invalid regex flags"})}).strict(),xg=function(e,t,n){return new fg({type:"record",keyType:e,valueType:t,...lp(n)})}(Om(),ug([Om().min(1),Tg])).default({}),Ng=ag({archive:Og,combine:Og,keep:Og,sequential:Og,live:Og,plan:Og,facets:Og,hangWarn:Cg().int().positive().optional(),hangKill:Cg().int().positive().optional(),hangKillGrace:Cg().int().positive().optional(),scripts:ug([Xm(),og(Om())]).optional(),prompt:Om().optional()}).strict().optional(),$g=ag({file:Om().optional()}).strict().optional(),Lg=ag({stash:Og}).strict().optional(),Rg=ag({debug:Og,boring:Og,patch:$g,run:Ng,snap:Lg}).strict().optional(),Fg=ag({scripts:xg,cliDefaults:Rg,patchOpenCommand:Om().optional(),maxUndos:Cg().int().positive().optional(),devMode:Og}).strict(),Ig=e=>{if(["archive","init"].filter(t=>Object.prototype.hasOwnProperty.call(e,t)).length>0)throw new Error('scripts: keys "archive" and "init" not allowed')};var jg="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Mg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bg,zg={},Hg={},Kg={},Ug={};function qg(){if(Bg)return Ug;Bg=1;const e=Symbol.for("yaml.alias"),t=Symbol.for("yaml.document"),n=Symbol.for("yaml.map"),r=Symbol.for("yaml.pair"),s=Symbol.for("yaml.scalar"),o=Symbol.for("yaml.seq"),i=Symbol.for("yaml.node.type"),a=e=>!!e&&"object"==typeof e&&e[i]===s;function c(e){if(e&&"object"==typeof e)switch(e[i]){case n:case o:return!0}return!1}return Ug.ALIAS=e,Ug.DOC=t,Ug.MAP=n,Ug.NODE_TYPE=i,Ug.PAIR=r,Ug.SCALAR=s,Ug.SEQ=o,Ug.hasAnchor=e=>(a(e)||c(e))&&!!e.anchor,Ug.isAlias=t=>!!t&&"object"==typeof t&&t[i]===e,Ug.isCollection=c,Ug.isDocument=e=>!!e&&"object"==typeof e&&e[i]===t,Ug.isMap=e=>!!e&&"object"==typeof e&&e[i]===n,Ug.isNode=function(t){if(t&&"object"==typeof t)switch(t[i]){case e:case n:case s:case o:return!0}return!1},Ug.isPair=e=>!!e&&"object"==typeof e&&e[i]===r,Ug.isScalar=a,Ug.isSeq=e=>!!e&&"object"==typeof e&&e[i]===o,Ug}var Jg,Zg,Gg={};function Wg(){if(Jg)return Gg;Jg=1;var e=qg();const t=Symbol("break visit"),n=Symbol("skip children"),r=Symbol("remove node");function s(t,n){const s=c(n);if(e.isDocument(t)){o(null,t.contents,s,Object.freeze([t]))===r&&(t.contents=null)}else o(null,t,s,Object.freeze([]))}function o(n,s,i,a){const c=u(n,s,i,a);if(e.isNode(c)||e.isPair(c))return l(n,a,c),o(n,c,i,a);if("symbol"!=typeof c)if(e.isCollection(s)){a=Object.freeze(a.concat(s));for(let e=0;e<s.items.length;++e){const n=o(e,s.items[e],i,a);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===r&&(s.items.splice(e,1),e-=1)}}}else if(e.isPair(s)){a=Object.freeze(a.concat(s));const e=o("key",s.key,i,a);if(e===t)return t;e===r&&(s.key=null);const n=o("value",s.value,i,a);if(n===t)return t;n===r&&(s.value=null)}return c}async function i(t,n){const s=c(n);if(e.isDocument(t)){await a(null,t.contents,s,Object.freeze([t]))===r&&(t.contents=null)}else await a(null,t,s,Object.freeze([]))}async function a(n,s,o,i){const c=await u(n,s,o,i);if(e.isNode(c)||e.isPair(c))return l(n,i,c),a(n,c,o,i);if("symbol"!=typeof c)if(e.isCollection(s)){i=Object.freeze(i.concat(s));for(let e=0;e<s.items.length;++e){const n=await a(e,s.items[e],o,i);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===r&&(s.items.splice(e,1),e-=1)}}}else if(e.isPair(s)){i=Object.freeze(i.concat(s));const e=await a("key",s.key,o,i);if(e===t)return t;e===r&&(s.key=null);const n=await a("value",s.value,o,i);if(n===t)return t;n===r&&(s.value=null)}return c}function c(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 u(t,n,r,s){return"function"==typeof r?r(t,n,s):e.isMap(n)?r.Map?.(t,n,s):e.isSeq(n)?r.Seq?.(t,n,s):e.isPair(n)?r.Pair?.(t,n,s):e.isScalar(n)?r.Scalar?.(t,n,s):e.isAlias(n)?r.Alias?.(t,n,s):void 0}function l(t,n,r){const s=n[n.length-1];if(e.isCollection(s))s.items[t]=r;else if(e.isPair(s))"key"===t?s.key=r:s.value=r;else{if(!e.isDocument(s)){const t=e.isAlias(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${t} parent`)}s.contents=r}}return s.BREAK=t,s.SKIP=n,s.REMOVE=r,i.BREAK=t,i.SKIP=n,i.REMOVE=r,Gg.visit=s,Gg.visitAsync=i,Gg}function Vg(){if(Zg)return Kg;Zg=1;var e=qg(),t=Wg();const n={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},r=e=>e.replace(/[!,[\]{}]/g,e=>n[e]);class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){const e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),r=n.shift();switch(r){case"%TAG":{if(2!==n.length&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[e,r]=n;return this.tags[e]=r,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==n.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=n;if("1.1"===e||"1.2"===e)return this.yaml.version=e,!0;return t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1}default:return t(0,`Unknown directive ${r}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const n=e.slice(2,-1);return"!"===n||"!!"===n?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),n)}const[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);const s=this.tags[n];if(s)try{return s+decodeURIComponent(r)}catch(e){return t(String(e)),null}return"!"===n?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+r(e.substring(n.length));return"!"===e[0]?e:`!<${e}>`}toString(n){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let o;if(n&&s.length>0&&e.isNode(n.contents)){const r={};t.visit(n.contents,(t,n)=>{e.isNode(n)&&n.tag&&(r[n.tag]=!0)}),o=Object.keys(r)}else o=[];for(const[e,t]of s)"!!"===e&&"tag:yaml.org,2002:"===t||n&&!o.some(e=>e.startsWith(t))||r.push(`%TAG ${e} ${t}`);return r.join("\n")}}return s.defaultYaml={explicit:!1,version:"1.2"},s.defaultTags={"!!":"tag:yaml.org,2002:"},Kg.Directives=s,Kg}var Yg,Qg={},Xg={},ey={};function ty(){if(Yg)return ey;Yg=1;var e=qg(),t=Wg();function n(e){const n=new Set;return t.visit(e,{Value(e,t){t.anchor&&n.add(t.anchor)}}),n}function r(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}return ey.anchorIsValid=function(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0},ey.anchorNames=n,ey.createNodeAnchors=function(t,s){const o=[],i=new Map;let a=null;return{onAnchor:e=>{o.push(e),a??(a=n(t));const i=r(s,a);return a.add(i),i},setAnchors:()=>{for(const t of o){const n=i.get(t);if("object"!=typeof n||!n.anchor||!e.isScalar(n.node)&&!e.isCollection(n.node)){const e=new Error("Failed to resolve repeated object (this should not happen)");throw e.source=t,e}n.node.anchor=n.anchor}},sourceObjects:i}},ey.findNewAnchor=r,ey}var ny,ry={},sy={};function oy(){if(ny)return sy;return ny=1,sy.applyReviver=function e(t,n,r,s){if(s&&"object"==typeof s)if(Array.isArray(s))for(let n=0,r=s.length;n<r;++n){const r=s[n],o=e(t,s,String(n),r);void 0===o?delete s[n]:o!==r&&(s[n]=o)}else if(s instanceof Map)for(const n of Array.from(s.keys())){const r=s.get(n),o=e(t,s,n,r);void 0===o?s.delete(n):o!==r&&s.set(n,o)}else if(s instanceof Set)for(const n of Array.from(s)){const r=e(t,s,n,n);void 0===r?s.delete(n):r!==n&&(s.delete(n),s.add(r))}else for(const[n,r]of Object.entries(s)){const o=e(t,s,n,r);void 0===o?delete s[n]:o!==r&&(s[n]=o)}return t.call(n,r,s)},sy}var iy,ay,cy,uy={};function ly(){if(iy)return uy;iy=1;var e=qg();return uy.toJS=function t(n,r,s){if(Array.isArray(n))return n.map((e,n)=>t(e,String(n),s));if(n&&"function"==typeof n.toJSON){if(!s||!e.hasAnchor(n))return n.toJSON(r,s);const t={aliasCount:0,count:1,res:void 0};s.anchors.set(n,t),s.onCreate=e=>{t.res=e,delete s.onCreate};const o=n.toJSON(r,s);return s.onCreate&&s.onCreate(o),o}return"bigint"!=typeof n||s?.keep?n:Number(n)},uy}function fy(){if(ay)return ry;ay=1;var e=oy(),t=qg(),n=ly();return ry.NodeBase=class{constructor(e){Object.defineProperty(this,t.NODE_TYPE,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(r,{mapAsMap:s,maxAliasCount:o,onAnchor:i,reviver:a}={}){if(!t.isDocument(r))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:r,keep:!0,mapAsMap:!0===s,mapKeyWarned:!1,maxAliasCount:"number"==typeof o?o:100},u=n.toJS(this,"",c);if("function"==typeof i)for(const{count:e,res:t}of c.anchors.values())i(t,e);return"function"==typeof a?e.applyReviver(a,{"":u},"",u):u}},ry}function py(){if(cy)return Xg;cy=1;var e=ty(),t=Wg(),n=qg(),r=fy(),s=ly();let o=class extends r.NodeBase{constructor(e){super(n.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){let s,o;r?.aliasResolveCache?s=r.aliasResolveCache:(s=[],t.visit(e,{Node:(e,t)=>{(n.isAlias(t)||n.hasAnchor(t))&&s.push(t)}}),r&&(r.aliasResolveCache=s));for(const e of s){if(e===this)break;e.anchor===this.source&&(o=e)}return o}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:r,maxAliasCount:o}=t,a=this.resolve(r,t);if(!a){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let c=n.get(a);if(c||(s.toJS(a,null,t),c=n.get(a)),void 0===c?.res){throw new ReferenceError("This should not happen: Alias anchor was not resolved?")}if(o>=0&&(c.count+=1,0===c.aliasCount&&(c.aliasCount=i(r,a,n)),c.count*c.aliasCount>o)){throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return c.res}toString(t,n,r){const s=`*${this.source}`;if(t){if(e.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(t.implicitKey)return`${s} `}return s}};function i(e,t,r){if(n.isAlias(t)){const n=t.resolve(e),s=r&&n&&r.get(n);return s?s.count*s.aliasCount:0}if(n.isCollection(t)){let n=0;for(const s of t.items){const t=i(e,s,r);t>n&&(n=t)}return n}if(n.isPair(t)){const n=i(e,t.key,r),s=i(e,t.value,r);return Math.max(n,s)}return 1}return Xg.Alias=o,Xg}var dy,hy,my,gy={},yy={},by={};function vy(){if(dy)return by;dy=1;var e=qg(),t=fy(),n=ly();let r=class extends t.NodeBase{constructor(t){super(e.SCALAR),this.value=t}toJSON(e,t){return t?.keep?this.value:n.toJS(this.value,e,t)}toString(){return String(this.value)}};return r.BLOCK_FOLDED="BLOCK_FOLDED",r.BLOCK_LITERAL="BLOCK_LITERAL",r.PLAIN="PLAIN",r.QUOTE_DOUBLE="QUOTE_DOUBLE",r.QUOTE_SINGLE="QUOTE_SINGLE",by.Scalar=r,by.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e,by}function Dy(){if(hy)return yy;hy=1;var e=py(),t=qg(),n=vy();return yy.createNode=function(r,s,o){if(t.isDocument(r)&&(r=r.contents),t.isNode(r))return r;if(t.isPair(r)){const e=o.schema[t.MAP].createNode?.(o.schema,null,o);return e.items.push(r),e}(r instanceof String||r instanceof Number||r instanceof Boolean||"undefined"!=typeof BigInt&&r instanceof BigInt)&&(r=r.valueOf());const{aliasDuplicateObjects:i,onAnchor:a,onTagObj:c,schema:u,sourceObjects:l}=o;let f;if(i&&r&&"object"==typeof r){if(f=l.get(r),f)return f.anchor??(f.anchor=a(r)),new e.Alias(f.anchor);f={anchor:null,node:null},l.set(r,f)}s?.startsWith("!!")&&(s="tag:yaml.org,2002:"+s.slice(2));let p=function(e,t,n){if(t){const e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}(r,s,u.tags);if(!p){if(r&&"function"==typeof r.toJSON&&(r=r.toJSON()),!r||"object"!=typeof r){const e=new n.Scalar(r);return f&&(f.node=e),e}p=r instanceof Map?u[t.MAP]:Symbol.iterator in Object(r)?u[t.SEQ]:u[t.MAP]}c&&(c(p),delete o.onTagObj);const d=p?.createNode?p.createNode(o.schema,r,o):"function"==typeof p?.nodeClass?.from?p.nodeClass.from(o.schema,r,o):new n.Scalar(r);return s?d.tag=s:p.default||(d.tag=p.tag),f&&(f.node=d),d},yy}function wy(){if(my)return gy;my=1;var e=Dy(),t=qg(),n=fy();function r(t,n,r){let s=r;for(let e=n.length-1;e>=0;--e){const t=n[e];if("number"==typeof t&&Number.isInteger(t)&&t>=0){const e=[];e[t]=s,s=e}else s=new Map([[t,s]])}return e.createNode(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const s=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;let o=class extends n.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(n=>t.isNode(n)||t.isPair(n)?n.clone(e):n),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(s(e))this.add(n);else{const[s,...o]=e,i=this.get(s,!0);if(t.isCollection(i))i.addIn(o,n);else{if(void 0!==i||!this.schema)throw new Error(`Expected YAML collection at ${s}. Remaining path: ${o}`);this.set(s,r(this.schema,o,n))}}}deleteIn(e){const[n,...r]=e;if(0===r.length)return this.delete(n);const s=this.get(n,!0);if(t.isCollection(s))return s.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...s]=e,o=this.get(r,!0);return 0===s.length?!n&&t.isScalar(o)?o.value:o:t.isCollection(o)?o.getIn(s,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!t.isPair(n))return!1;const r=n.value;return null==r||e&&t.isScalar(r)&&null==r.value&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(0===r.length)return this.has(n);const s=this.get(n,!0);return!!t.isCollection(s)&&s.hasIn(r)}setIn(e,n){const[s,...o]=e;if(0===o.length)this.set(s,n);else{const e=this.get(s,!0);if(t.isCollection(e))e.setIn(o,n);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${s}. Remaining path: ${o}`);this.set(s,r(this.schema,o,n))}}}};return gy.Collection=o,gy.collectionFromPath=r,gy.isEmptyPath=s,gy}var _y,Sy={},Ey={},ky={},Ay={};function Cy(){if(_y)return Ay;_y=1;function e(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}return Ay.indentComment=e,Ay.lineComment=(t,n,r)=>t.endsWith("\n")?e(r,n):r.includes("\n")?"\n"+e(r,n):(t.endsWith(" ")?"":" ")+r,Ay.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#"),Ay}var Oy,Py,Ty,xy,Ny={},$y={};function Ly(){if(Oy)return $y;Oy=1;const e="block",t="quoted";function n(e,t,n){let r=t,s=t+1,o=e[s];for(;" "===o||"\t"===o;)if(t<s+n)o=e[++t];else{do{o=e[++t]}while(o&&"\n"!==o);r=t,s=t+1,o=e[s]}return r}return $y.FOLD_BLOCK=e,$y.FOLD_FLOW="flow",$y.FOLD_QUOTED=t,$y.foldFlowLines=function(r,s,o="flow",{indentAtStart:i,lineWidth:a=80,minContentWidth:c=20,onFold:u,onOverflow:l}={}){if(!a||a<0)return r;a<c&&(c=0);const f=Math.max(1+c,1+a-s.length);if(r.length<=f)return r;const p=[],d={};let h,m,g=a-s.length;"number"==typeof i&&(i>a-Math.max(2,c)?p.push(0):g=a-i);let y=!1,b=-1,v=-1,D=-1;o===e&&(b=n(r,b,s.length),-1!==b&&(g=b+f));for(let i;i=r[b+=1];){if(o===t&&"\\"===i){switch(v=b,r[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}D=b}if("\n"===i)o===e&&(b=n(r,b,s.length)),g=b+s.length+f,h=void 0;else{if(" "===i&&m&&" "!==m&&"\n"!==m&&"\t"!==m){const e=r[b+1];e&&" "!==e&&"\n"!==e&&"\t"!==e&&(h=b)}if(b>=g)if(h)p.push(h),g=h+f,h=void 0;else if(o===t){for(;" "===m||"\t"===m;)m=i,i=r[b+=1],y=!0;const e=b>D+1?b-2:v-1;if(d[e])return r;p.push(e),d[e]=!0,g=e+f,h=void 0}else y=!0}m=i}if(y&&l&&l(),0===p.length)return r;u&&u();let w=r.slice(0,p[0]);for(let e=0;e<p.length;++e){const n=p[e],i=p[e+1]||r.length;0===n?w=`\n${s}${r.slice(0,i)}`:(o===t&&d[n]&&(w+=`${r[n]}\\`),w+=`\n${s}${r.slice(n+1,i)}`)}return w},$y}function Ry(){if(Py)return Ny;Py=1;var e=vy(),t=Ly();const n=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),r=e=>/^(%|---|\.\.\.)/m.test(e);function s(e,s){const o=JSON.stringify(e);if(s.options.doubleQuotedAsJSON)return o;const{implicitKey:i}=s,a=s.options.doubleQuotedMinMultiLineLength,c=s.indent||(r(e)?" ":"");let u="",l=0;for(let e=0,t=o[e];t;t=o[++e])if(" "===t&&"\\"===o[e+1]&&"n"===o[e+2]&&(u+=o.slice(l,e)+"\\ ",e+=1,l=e,t="\\"),"\\"===t)switch(o[e+1]){case"u":{u+=o.slice(l,e);const t=o.substr(e+2,4);switch(t){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:"00"===t.substr(0,2)?u+="\\x"+t.substr(2):u+=o.substr(e,6)}e+=5,l=e+1}break;case"n":if(i||'"'===o[e+2]||o.length<a)e+=1;else{for(u+=o.slice(l,e)+"\n\n";"\\"===o[e+2]&&"n"===o[e+3]&&'"'!==o[e+4];)u+="\n",e+=2;u+=c," "===o[e+2]&&(u+="\\"),e+=1,l=e+1}break;default:e+=1}return u=l?u+o.slice(l):o,i?u:t.foldFlowLines(u,c,t.FOLD_QUOTED,n(s,!1))}function o(e,o){if(!1===o.options.singleQuote||o.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return s(e,o);const i=o.indent||(r(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${i}`)+"'";return o.implicitKey?a:t.foldFlowLines(a,i,t.FOLD_FLOW,n(o,!1))}function i(e,t){const{singleQuote:n}=t.options;let r;if(!1===n)r=s;else{const t=e.includes('"'),i=e.includes("'");r=t&&!i?o:i&&!t?s:n?o:s}return r(e,t)}let a;try{a=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{a=/\n+(?!\n|$)/g}function c({comment:s,type:o,value:c},u,l,f){const{blockQuote:p,commentString:d,lineWidth:h}=u.options;if(!p||/\n[\t ]+$/.test(c))return i(c,u);const m=u.indent||(u.forceBlockIndent||r(c)?" ":""),g="literal"===p||"folded"!==p&&o!==e.Scalar.BLOCK_FOLDED&&(o===e.Scalar.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;const r=t-n,s=e.length;if(s<=r)return!1;for(let t=0,n=0;t<s;++t)if("\n"===e[t]){if(t-n>r)return!0;if(n=t+1,s-n<=r)return!1}return!0}(c,h,m.length));if(!c)return g?"|\n":">\n";let y,b;for(b=c.length;b>0;--b){const e=c[b-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let v=c.substring(b);const D=v.indexOf("\n");-1===D?y="-":c===v||D!==v.length-1?(y="+",f&&f()):y="",v&&(c=c.slice(0,-v.length),"\n"===v[v.length-1]&&(v=v.slice(0,-1)),v=v.replace(a,`$&${m}`));let w,_=!1,S=-1;for(w=0;w<c.length;++w){const e=c[w];if(" "===e)_=!0;else{if("\n"!==e)break;S=w}}let E=c.substring(0,S<w?S+1:w);E&&(c=c.substring(E.length),E=E.replace(/\n+/g,`$&${m}`));let k=(_?m?"2":"1":"")+y;if(s&&(k+=" "+d(s.replace(/ ?[\r\n]+/g," ")),l&&l()),!g){const r=c.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${m}`);let s=!1;const i=n(u,!0);"folded"!==p&&o!==e.Scalar.BLOCK_FOLDED&&(i.onOverflow=()=>{s=!0});const a=t.foldFlowLines(`${E}${r}${v}`,m,t.FOLD_BLOCK,i);if(!s)return`>${k}\n${m}${a}`}return`|${k}\n${m}${E}${c=c.replace(/\n+/g,`$&${m}`)}${v}`}return Ny.stringifyString=function(a,u,l,f){const{implicitKey:p,inFlow:d}=u,h="string"==typeof a.value?a:Object.assign({},a,{value:String(a.value)});let{type:m}=a;m!==e.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(h.value)&&(m=e.Scalar.QUOTE_DOUBLE);const g=a=>{switch(a){case e.Scalar.BLOCK_FOLDED:case e.Scalar.BLOCK_LITERAL:return p||d?i(h.value,u):c(h,u,l,f);case e.Scalar.QUOTE_DOUBLE:return s(h.value,u);case e.Scalar.QUOTE_SINGLE:return o(h.value,u);case e.Scalar.PLAIN:return function(s,o,a,u){const{type:l,value:f}=s,{actualString:p,implicitKey:d,indent:h,indentStep:m,inFlow:g}=o;if(d&&f.includes("\n")||g&&/[[\]{},]/.test(f))return i(f,o);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(f))return d||g||!f.includes("\n")?i(f,o):c(s,o,a,u);if(!d&&!g&&l!==e.Scalar.PLAIN&&f.includes("\n"))return c(s,o,a,u);if(r(f)){if(""===h)return o.forceBlockIndent=!0,c(s,o,a,u);if(d&&h===m)return i(f,o)}const y=f.replace(/\n+/g,`$&\n${h}`);if(p){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(y),{compat:t,tags:n}=o.doc.schema;if(n.some(e)||t?.some(e))return i(f,o)}return d?y:t.foldFlowLines(y,h,t.FOLD_FLOW,n(o,!1))}(h,u,l,f);default:return null}};let y=g(m);if(null===y){const{defaultKeyType:e,defaultStringType:t}=u.options,n=p&&e||t;if(y=g(n),null===y)throw new Error(`Unsupported default string type ${n}`)}return y},Ny}function Fy(){if(Ty)return ky;Ty=1;var e=ty(),t=qg(),n=Cy(),r=Ry();return ky.createStringifyContext=function(e,t){const r=Object.assign({blockQuote:!0,commentString:n.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let s;switch(r.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:s,options:r}},ky.stringify=function(n,s,o,i){if(t.isPair(n))return n.toString(s,o,i);if(t.isAlias(n)){if(s.doc.directives)return n.toString(s);if(s.resolvedAliases?.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");s.resolvedAliases?s.resolvedAliases.add(n):s.resolvedAliases=new Set([n]),n=n.resolve(s.doc)}let a;const c=t.isNode(n)?n:s.doc.createNode(n,{onTagObj:e=>a=e});a??(a=function(e,n){if(n.tag){const t=e.filter(e=>e.tag===n.tag);if(t.length>0)return t.find(e=>e.format===n.format)??t[0]}let r,s;if(t.isScalar(n)){s=n.value;let t=e.filter(e=>e.identify?.(s));if(t.length>1){const e=t.filter(e=>e.test);e.length>0&&(t=e)}r=t.find(e=>e.format===n.format)??t.find(e=>!e.format)}else s=n,r=e.find(e=>e.nodeClass&&s instanceof e.nodeClass);if(!r)throw new Error(`Tag not resolved for ${s?.constructor?.name??(null===s?"null":typeof s)} value`);return r}(s.doc.schema.tags,c));const u=function(n,r,{anchors:s,doc:o}){if(!o.directives)return"";const i=[],a=(t.isScalar(n)||t.isCollection(n))&&n.anchor;a&&e.anchorIsValid(a)&&(s.add(a),i.push(`&${a}`));const c=n.tag??(r.default?null:r.tag);return c&&i.push(o.directives.tagString(c)),i.join(" ")}(c,a,s);u.length>0&&(s.indentAtStart=(s.indentAtStart??0)+u.length+1);const l="function"==typeof a.stringify?a.stringify(c,s,o,i):t.isScalar(c)?r.stringifyString(c,s,o,i):c.toString(s,o,i);return u?t.isScalar(c)||"{"===l[0]||"["===l[0]?`${u} ${l}`:`${u}\n${s.indent}${l}`:l},ky}function Iy(){if(xy)return Ey;xy=1;var e=qg(),t=vy(),n=Fy(),r=Cy();return Ey.stringifyPair=function({key:s,value:o},i,a,c){const{allNullValues:u,doc:l,indent:f,indentStep:p,options:{commentString:d,indentSeq:h,simpleKeys:m}}=i;let g=e.isNode(s)&&s.comment||null;if(m){if(g)throw new Error("With simple keys, key nodes cannot have comments");if(e.isCollection(s)||!e.isNode(s)&&"object"==typeof s){throw new Error("With simple keys, collection cannot be used as a key value")}}let y=!m&&(!s||g&&null==o&&!i.inFlow||e.isCollection(s)||(e.isScalar(s)?s.type===t.Scalar.BLOCK_FOLDED||s.type===t.Scalar.BLOCK_LITERAL:"object"==typeof s));i=Object.assign({},i,{allNullValues:!1,implicitKey:!y&&(m||!u),indent:f+p});let b,v,D,w=!1,_=!1,S=n.stringify(s,i,()=>w=!0,()=>_=!0);if(!y&&!i.inFlow&&S.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");y=!0}if(i.inFlow){if(u||null==o)return w&&a&&a(),""===S?"?":y?`? ${S}`:S}else if(u&&!m||null==o&&y)return S=`? ${S}`,g&&!w?S+=r.lineComment(S,i.indent,d(g)):_&&c&&c(),S;w&&(g=null),y?(g&&(S+=r.lineComment(S,i.indent,d(g))),S=`? ${S}\n${f}:`):(S=`${S}:`,g&&(S+=r.lineComment(S,i.indent,d(g)))),e.isNode(o)?(b=!!o.spaceBefore,v=o.commentBefore,D=o.comment):(b=!1,v=null,D=null,o&&"object"==typeof o&&(o=l.createNode(o))),i.implicitKey=!1,y||g||!e.isScalar(o)||(i.indentAtStart=S.length+1),_=!1,h||!(p.length>=2)||i.inFlow||y||!e.isSeq(o)||o.flow||o.tag||o.anchor||(i.indent=i.indent.substring(2));let E=!1;const k=n.stringify(o,i,()=>E=!0,()=>_=!0);let A=" ";if(g||b||v){if(A=b?"\n":"",v){const e=d(v);A+=`\n${r.indentComment(e,i.indent)}`}""!==k||i.inFlow?A+=`\n${i.indent}`:"\n"===A&&D&&(A="\n\n")}else if(!y&&e.isCollection(o)){const e=k[0],t=k.indexOf("\n"),n=-1!==t,r=i.inFlow??o.flow??0===o.items.length;if(n||!r){let r=!1;if(n&&("&"===e||"!"===e)){let n=k.indexOf(" ");"&"===e&&-1!==n&&n<t&&"!"===k[n+1]&&(n=k.indexOf(" ",n+1)),(-1===n||t<n)&&(r=!0)}r||(A=`\n${i.indent}`)}}else""!==k&&"\n"!==k[0]||(A="");return S+=A+k,i.inFlow?E&&a&&a():D&&!E?S+=r.lineComment(S,i.indent,d(D)):_&&c&&c(),S},Ey}var jy,My={},By={};function zy(){if(jy)return By;jy=1;var e=w;return By.debug=function(e,...t){"debug"===e&&console.log(...t)},By.warn=function(t,n){"debug"!==t&&"warn"!==t||("function"==typeof e.emitWarning?e.emitWarning(n):console.warn(n))},By}var Hy,Ky,Uy,qy={};function Jy(){if(Hy)return qy;Hy=1;var e=qg(),t=vy();const n="<<",r={identify:e=>e===n||"symbol"==typeof e&&e.description===n,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new t.Scalar(Symbol(n)),{addToJSMap:s}),stringify:()=>n};function s(t,n,r){if(r=t&&e.isAlias(r)?r.resolve(t.doc):r,e.isSeq(r))for(const e of r.items)o(t,n,e);else if(Array.isArray(r))for(const e of r)o(t,n,e);else o(t,n,r)}function o(t,n,r){const s=t&&e.isAlias(r)?r.resolve(t.doc):r;if(!e.isMap(s))throw new Error("Merge sources must be maps or map aliases");const o=s.toJSON(null,t,Map);for(const[e,t]of o)n instanceof Map?n.has(e)||n.set(e,t):n instanceof Set?n.add(e):Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(n,e,{value:t,writable:!0,enumerable:!0,configurable:!0});return n}return qy.addMergeToJSMap=s,qy.isMergeKey=(n,s)=>(r.identify(s)||e.isScalar(s)&&(!s.type||s.type===t.Scalar.PLAIN)&&r.identify(s.value))&&n?.doc.schema.tags.some(e=>e.tag===r.tag&&e.default),qy.merge=r,qy}function Zy(){if(Ky)return My;Ky=1;var e=zy(),t=Jy(),n=Fy(),r=qg(),s=ly();return My.addPairToJSMap=function(o,i,{key:a,value:c}){if(r.isNode(a)&&a.addToJSMap)a.addToJSMap(o,i,c);else if(t.isMergeKey(o,a))t.addMergeToJSMap(o,i,c);else{const t=s.toJS(a,"",o);if(i instanceof Map)i.set(t,s.toJS(c,t,o));else if(i instanceof Set)i.add(t);else{const u=function(t,s,o){if(null===s)return"";if("object"!=typeof s)return String(s);if(r.isNode(t)&&o?.doc){const r=n.createStringifyContext(o.doc,{});r.anchors=new Set;for(const e of o.anchors.keys())r.anchors.add(e.anchor);r.inFlow=!0,r.inStringifyKey=!0;const s=t.toString(r);if(!o.mapKeyWarned){let t=JSON.stringify(s);t.length>40&&(t=t.substring(0,36)+'..."'),e.warn(o.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${t}. Set mapAsMap: true to use object keys.`),o.mapKeyWarned=!0}return s}return JSON.stringify(s)}(a,t,o),l=s.toJS(c,u,o);u in i?Object.defineProperty(i,u,{value:l,writable:!0,enumerable:!0,configurable:!0}):i[u]=l}}return i},My}function Gy(){if(Uy)return Sy;Uy=1;var e=Dy(),t=Iy(),n=Zy(),r=qg();let s=class e{constructor(e,t=null){Object.defineProperty(this,r.NODE_TYPE,{value:r.PAIR}),this.key=e,this.value=t}clone(t){let{key:n,value:s}=this;return r.isNode(n)&&(n=n.clone(t)),r.isNode(s)&&(s=s.clone(t)),new e(n,s)}toJSON(e,t){const r=t?.mapAsMap?new Map:{};return n.addPairToJSMap(t,r,this)}toString(e,n,r){return e?.doc?t.stringifyPair(this,e,n,r):JSON.stringify(this)}};return Sy.Pair=s,Sy.createPair=function(t,n,r){const o=e.createNode(t,void 0,r),i=e.createNode(n,void 0,r);return new s(o,i)},Sy}var Wy,Vy,Yy,Qy={},Xy={},eb={},tb={};function nb(){if(Wy)return tb;Wy=1;var e=qg(),t=Fy(),n=Cy();function r({comment:r,items:s},i,{blockItemPrefix:a,flowChars:c,itemIndent:u,onChompKeep:l,onComment:f}){const{indent:p,options:{commentString:d}}=i,h=Object.assign({},i,{indent:u,type:null});let m=!1;const g=[];for(let r=0;r<s.length;++r){const c=s[r];let l=null;if(e.isNode(c))!m&&c.spaceBefore&&g.push(""),o(i,g,c.commentBefore,m),c.comment&&(l=c.comment);else if(e.isPair(c)){const t=e.isNode(c.key)?c.key:null;t&&(!m&&t.spaceBefore&&g.push(""),o(i,g,t.commentBefore,m))}m=!1;let f=t.stringify(c,h,()=>l=null,()=>m=!0);l&&(f+=n.lineComment(f,u,d(l))),m&&l&&(m=!1),g.push(a+f)}let y;if(0===g.length)y=c.start+c.end;else{y=g[0];for(let e=1;e<g.length;++e){const t=g[e];y+=t?`\n${p}${t}`:"\n"}}return r?(y+="\n"+n.indentComment(d(r),p),f&&f()):m&&l&&l(),y}function s({items:r},s,{flowChars:i,itemIndent:a}){const{indent:c,indentStep:u,flowCollectionPadding:l,options:{commentString:f}}=s;a+=u;const p=Object.assign({},s,{indent:a,inFlow:!0,type:null});let d=!1,h=0;const m=[];for(let i=0;i<r.length;++i){const c=r[i];let u=null;if(e.isNode(c))c.spaceBefore&&m.push(""),o(s,m,c.commentBefore,!1),c.comment&&(u=c.comment);else if(e.isPair(c)){const t=e.isNode(c.key)?c.key:null;t&&(t.spaceBefore&&m.push(""),o(s,m,t.commentBefore,!1),t.comment&&(d=!0));const n=e.isNode(c.value)?c.value:null;n?(n.comment&&(u=n.comment),n.commentBefore&&(d=!0)):null==c.value&&t?.comment&&(u=t.comment)}u&&(d=!0);let l=t.stringify(c,p,()=>u=null);i<r.length-1&&(l+=","),u&&(l+=n.lineComment(l,a,f(u))),!d&&(m.length>h||l.includes("\n"))&&(d=!0),m.push(l),h=m.length}const{start:g,end:y}=i;if(0===m.length)return g+y;if(!d){const e=m.reduce((e,t)=>e+t.length+2,2);d=s.options.lineWidth>0&&e>s.options.lineWidth}if(d){let e=g;for(const t of m)e+=t?`\n${u}${c}${t}`:"\n";return`${e}\n${c}${y}`}return`${g}${l}${m.join(" ")}${l}${y}`}function o({indent:e,options:{commentString:t}},r,s,o){if(s&&o&&(s=s.replace(/^\n+/,"")),s){const o=n.indentComment(t(s),e);r.push(o.trimStart())}}return tb.stringifyCollection=function(e,t,n){return(t.inFlow??e.flow?s:r)(e,t,n)},tb}function rb(){if(Vy)return eb;Vy=1;var e=nb(),t=Zy(),n=wy(),r=qg(),s=Gy(),o=vy();function i(e,t){const n=r.isScalar(t)?t.value:t;for(const s of e)if(r.isPair(s)){if(s.key===t||s.key===n)return s;if(r.isScalar(s.key)&&s.key.value===n)return s}}let a=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(r.MAP,e),this.items=[]}static from(e,t,n){const{keepUndefined:r,replacer:o}=n,i=new this(e),a=(e,a)=>{if("function"==typeof o)a=o.call(t,e,a);else if(Array.isArray(o)&&!o.includes(e))return;(void 0!==a||r)&&i.items.push(s.createPair(e,a,n))};if(t instanceof Map)for(const[e,n]of t)a(e,n);else if(t&&"object"==typeof t)for(const e of Object.keys(t))a(e,t[e]);return"function"==typeof e.sortMapEntries&&i.items.sort(e.sortMapEntries),i}add(e,t){let n;n=r.isPair(e)?e:e&&"object"==typeof e&&"key"in e?new s.Pair(e.key,e.value):new s.Pair(e,e?.value);const a=i(this.items,n.key),c=this.schema?.sortMapEntries;if(a){if(!t)throw new Error(`Key ${n.key} already set`);r.isScalar(a.value)&&o.isScalarValue(n.value)?a.value.value=n.value:a.value=n.value}else if(c){const e=this.items.findIndex(e=>c(n,e)<0);-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){const t=i(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=i(this.items,e),s=n?.value;return(!t&&r.isScalar(s)?s.value:s)??void 0}has(e){return!!i(this.items,e)}set(e,t){this.add(new s.Pair(e,t),!0)}toJSON(e,n,r){const s=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(s);for(const e of this.items)t.addPairToJSMap(n,s,e);return s}toString(t,n,s){if(!t)return JSON.stringify(this);for(const e of this.items)if(!r.isPair(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),e.stringifyCollection(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:s,onComment:n})}};return eb.YAMLMap=a,eb.findPair=i,eb}function sb(){if(Yy)return Xy;Yy=1;var e=qg(),t=rb();const n={collection:"map",default:!0,nodeClass:t.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:(t,n)=>(e.isMap(t)||n("Expected a mapping for this tag"),t),createNode:(e,n,r)=>t.YAMLMap.from(e,n,r)};return Xy.map=n,Xy}var ob,ib,ab={},cb={};function ub(){if(ob)return cb;ob=1;var e=Dy(),t=nb(),n=wy(),r=qg(),s=vy(),o=ly();let i=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(r.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=a(e);if("number"!=typeof t)return!1;return this.items.splice(t,1).length>0}get(e,t){const n=a(e);if("number"!=typeof n)return;const s=this.items[n];return!t&&r.isScalar(s)?s.value:s}has(e){const t=a(e);return"number"==typeof t&&t<this.items.length}set(e,t){const n=a(e);if("number"!=typeof n)throw new Error(`Expected a valid index, not ${e}.`);const o=this.items[n];r.isScalar(o)&&s.isScalarValue(t)?o.value=t:this.items[n]=t}toJSON(e,t){const n=[];t?.onCreate&&t.onCreate(n);let r=0;for(const e of this.items)n.push(o.toJS(e,String(r++),t));return n}toString(e,n,r){return e?t.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){const{replacer:s}=r,o=new this(t);if(n&&Symbol.iterator in Object(n)){let t=0;for(let i of n){if("function"==typeof s){const e=n instanceof Set?i:String(t++);i=s.call(n,e,i)}o.items.push(e.createNode(i,void 0,r))}}return o}};function a(e){let t=r.isScalar(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}return cb.YAMLSeq=i,cb}function lb(){if(ib)return ab;ib=1;var e=qg(),t=ub();const n={collection:"seq",default:!0,nodeClass:t.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:(t,n)=>(e.isSeq(t)||n("Expected a sequence for this tag"),t),createNode:(e,n,r)=>t.YAMLSeq.from(e,n,r)};return ab.seq=n,ab}var fb,pb={};function db(){if(fb)return pb;fb=1;var e=Ry();const t={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(t,n,r,s)=>(n=Object.assign({actualString:!0},n),e.stringifyString(t,n,r,s))};return pb.string=t,pb}var hb,mb={},gb={};function yb(){if(hb)return gb;hb=1;var e=vy();const t={identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new e.Scalar(null),stringify:({source:e},n)=>"string"==typeof e&&t.test.test(e)?e:n.options.nullStr};return gb.nullTag=t,gb}var bb,vb={};function Db(){if(bb)return vb;bb=1;var e=vy();const t={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new e.Scalar("t"===t[0]||"T"===t[0]),stringify({source:e,value:n},r){if(e&&t.test.test(e)){if(n===("t"===e[0]||"T"===e[0]))return e}return n?r.options.trueStr:r.options.falseStr}};return vb.boolTag=t,vb}var wb,_b,Sb={},Eb={};function kb(){if(wb)return Eb;return wb=1,Eb.stringifyNumber=function({format:e,minFractionDigits:t,tag:n,value:r}){if("bigint"==typeof r)return String(r);const s="number"==typeof r?r:Number(r);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let o=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(o)){let e=o.indexOf(".");e<0&&(e=o.length,o+=".");let n=t-(o.length-e-1);for(;n-- >0;)o+="0"}return o},Eb}function Ab(){if(_b)return Sb;_b=1;var e=vy(),t=kb();const n={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]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:t.stringifyNumber},r={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){const n=Number(e.value);return isFinite(n)?n.toExponential():t.stringifyNumber(e)}},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const n=new e.Scalar(parseFloat(t)),r=t.indexOf(".");return-1!==r&&"0"===t[t.length-1]&&(n.minFractionDigits=t.length-r-1),n},stringify:t.stringifyNumber};return Sb.float=s,Sb.floatExp=r,Sb.floatNaN=n,Sb}var Cb,Ob={};function Pb(){if(Cb)return Ob;Cb=1;var e=kb();const t=e=>"bigint"==typeof e||Number.isInteger(e),n=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function r(n,r,s){const{value:o}=n;return t(o)&&o>=0?s+o.toString(r):e.stringifyNumber(n)}const s={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>n(e,2,8,r),stringify:e=>r(e,8,"0o")},o={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>n(e,0,10,r),stringify:e.stringifyNumber},i={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>n(e,2,16,r),stringify:e=>r(e,16,"0x")};return Ob.int=o,Ob.intHex=i,Ob.intOct=s,Ob}var Tb,xb={};function Nb(){if(Tb)return xb;Tb=1;var e=sb(),t=yb(),n=lb(),r=db(),s=Db(),o=Ab(),i=Pb();const a=[e.map,n.seq,r.string,t.nullTag,s.boolTag,i.intOct,i.int,i.intHex,o.floatNaN,o.floatExp,o.float];return xb.schema=a,xb}var $b,Lb={};function Rb(){if($b)return Lb;$b=1;var e=vy(),t=sb(),n=lb();function r(e){return"bigint"==typeof e||Number.isInteger(e)}const s=({value:e})=>JSON.stringify(e),o=[{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:s},{identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:s},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:s},{identify:r,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})=>r(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:s}],i={default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)},a=[t.map,n.seq].concat(o,i);return Lb.schema=a,Lb}var Fb,Ib={};function jb(){if(Fb)return Ib;Fb=1;var e=_,t=vy(),n=Ry();const r={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,n){if("function"==typeof e.Buffer)return e.Buffer.from(t,"base64");if("function"==typeof atob){const e=atob(t.replace(/[\n\r]/g,"")),n=new Uint8Array(e.length);for(let t=0;t<e.length;++t)n[t]=e.charCodeAt(t);return n}return n("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:r,type:s,value:o},i,a,c){if(!o)return"";const u=o;let l;if("function"==typeof e.Buffer)l=u instanceof e.Buffer?u.toString("base64"):e.Buffer.from(u.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<u.length;++t)e+=String.fromCharCode(u[t]);l=btoa(e)}}if(s??(s=t.Scalar.BLOCK_LITERAL),s!==t.Scalar.QUOTE_DOUBLE){const e=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),n=Math.ceil(l.length/e),r=new Array(n);for(let t=0,s=0;t<n;++t,s+=e)r[t]=l.substr(s,e);l=r.join(s===t.Scalar.BLOCK_LITERAL?"\n":" ")}return n.stringifyString({comment:r,type:s,value:l},i,a,c)}};return Ib.binary=r,Ib}var Mb,Bb,zb={},Hb={};function Kb(){if(Mb)return Hb;Mb=1;var e=qg(),t=Gy(),n=vy(),r=ub();function s(r,s){if(e.isSeq(r))for(let o=0;o<r.items.length;++o){let i=r.items[o];if(!e.isPair(i)){if(e.isMap(i)){i.items.length>1&&s("Each pair must have its own sequence indicator");const e=i.items[0]||new t.Pair(new n.Scalar(null));if(i.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${i.commentBefore}\n${e.key.commentBefore}`:i.commentBefore),i.comment){const t=e.value??e.key;t.comment=t.comment?`${i.comment}\n${t.comment}`:i.comment}i=e}r.items[o]=e.isPair(i)?i:new t.Pair(i)}}else s("Expected a sequence for this tag");return r}function o(e,n,s){const{replacer:o}=s,i=new r.YAMLSeq(e);i.tag="tag:yaml.org,2002:pairs";let a=0;if(n&&Symbol.iterator in Object(n))for(let e of n){let r,c;if("function"==typeof o&&(e=o.call(n,String(a++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);r=e[0],c=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);r=t[0],c=e[r]}else r=e;i.items.push(t.createPair(r,c,s))}return i}const i={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:s,createNode:o};return Hb.createPairs=o,Hb.pairs=i,Hb.resolvePairs=s,Hb}function Ub(){if(Bb)return zb;Bb=1;var e=qg(),t=ly(),n=rb(),r=ub(),s=Kb();class o extends r.YAMLSeq{constructor(){super(),this.add=n.YAMLMap.prototype.add.bind(this),this.delete=n.YAMLMap.prototype.delete.bind(this),this.get=n.YAMLMap.prototype.get.bind(this),this.has=n.YAMLMap.prototype.has.bind(this),this.set=n.YAMLMap.prototype.set.bind(this),this.tag=o.tag}toJSON(n,r){if(!r)return super.toJSON(n);const s=new Map;r?.onCreate&&r.onCreate(s);for(const n of this.items){let o,i;if(e.isPair(n)?(o=t.toJS(n.key,"",r),i=t.toJS(n.value,o,r)):o=t.toJS(n,"",r),s.has(o))throw new Error("Ordered maps must not include duplicate keys");s.set(o,i)}return s}static from(e,t,n){const r=s.createPairs(e,t,n),o=new this;return o.items=r.items,o}}o.tag="tag:yaml.org,2002:omap";const i={collection:"seq",identify:e=>e instanceof Map,nodeClass:o,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,n){const r=s.resolvePairs(t,n),i=[];for(const{key:t}of r.items)e.isScalar(t)&&(i.includes(t.value)?n(`Ordered maps must not include duplicate keys: ${t.value}`):i.push(t.value));return Object.assign(new o,r)},createNode:(e,t,n)=>o.from(e,t,n)};return zb.YAMLOMap=o,zb.omap=i,zb}var qb,Jb={},Zb={};function Gb(){if(qb)return Zb;qb=1;var e=vy();function t({value:e,source:t},s){return t&&(e?n:r).test.test(t)?t:e?s.options.trueStr:s.options.falseStr}const n={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:()=>new e.Scalar(!0),stringify:t},r={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 e.Scalar(!1),stringify:t};return Zb.falseTag=r,Zb.trueTag=n,Zb}var Wb,Vb={};function Yb(){if(Wb)return Vb;Wb=1;var e=vy(),t=kb();const n={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]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:t.stringifyNumber},r={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){const n=Number(e.value);return isFinite(n)?n.toExponential():t.stringifyNumber(e)}},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const n=new e.Scalar(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(-1!==r){const e=t.substring(r+1).replace(/_/g,"");"0"===e[e.length-1]&&(n.minFractionDigits=e.length)}return n},stringify:t.stringifyNumber};return Vb.float=s,Vb.floatExp=r,Vb.floatNaN=n,Vb}var Qb,Xb={};function ev(){if(Qb)return Xb;Qb=1;var e=kb();const t=e=>"bigint"==typeof e||Number.isInteger(e);function n(e,t,n,{intAsBigInt:r}){const s=e[0];if("-"!==s&&"+"!==s||(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===s?BigInt(-1)*t:t}const o=parseInt(e,n);return"-"===s?-1*o:o}function r(n,r,s){const{value:o}=n;if(t(o)){const e=o.toString(r);return o<0?"-"+s+e.substr(1):s+e}return e.stringifyNumber(n)}const s={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>n(e,2,2,r),stringify:e=>r(e,2,"0b")},o={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>n(e,1,8,r),stringify:e=>r(e,8,"0")},i={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>n(e,0,10,r),stringify:e.stringifyNumber},a={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>n(e,2,16,r),stringify:e=>r(e,16,"0x")};return Xb.int=i,Xb.intBin=s,Xb.intHex=a,Xb.intOct=o,Xb}var tv,nv={};function rv(){if(tv)return nv;tv=1;var e=qg(),t=Gy(),n=rb();class r extends n.YAMLMap{constructor(e){super(e),this.tag=r.tag}add(r){let s;s=e.isPair(r)?r:r&&"object"==typeof r&&"key"in r&&"value"in r&&null===r.value?new t.Pair(r.key,null):new t.Pair(r,null);n.findPair(this.items,s.key)||this.items.push(s)}get(t,r){const s=n.findPair(this.items,t);return!r&&e.isPair(s)?e.isScalar(s.key)?s.key.value:s.key:s}set(e,r){if("boolean"!=typeof r)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof r);const s=n.findPair(this.items,e);s&&!r?this.items.splice(this.items.indexOf(s),1):!s&&r&&this.items.push(new t.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,n,r){const{replacer:s}=r,o=new this(e);if(n&&Symbol.iterator in Object(n))for(let e of n)"function"==typeof s&&(e=s.call(n,e,e)),o.items.push(t.createPair(e,null,r));return o}}r.tag="tag:yaml.org,2002:set";const s={collection:"map",identify:e=>e instanceof Set,nodeClass:r,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>r.from(e,t,n),resolve(t,n){if(e.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new r,t);n("Set items must all have null values")}else n("Expected a mapping for this tag");return t}};return nv.YAMLSet=r,nv.set=s,nv}var sv,ov,iv,av,cv={};function uv(){if(sv)return cv;sv=1;var e=kb();function t(e,t){const n=e[0],r="-"===n||"+"===n?e.substring(1):e,s=e=>t?BigInt(e):Number(e),o=r.replace(/_/g,"").split(":").reduce((e,t)=>e*s(60)+s(t),s(0));return"-"===n?s(-1)*o:o}function n(t){let{value:n}=t,r=e=>e;if("bigint"==typeof n)r=e=>BigInt(e);else if(isNaN(n)||!isFinite(n))return e.stringifyNumber(t);let s="";n<0&&(s="-",n*=r(-1));const o=r(60),i=[n%o];return n<60?i.unshift(0):(n=(n-i[0])/o,i.unshift(n%o),n>=60&&(n=(n-i[0])/o,i.unshift(n))),s+i.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const r={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,n,{intAsBigInt:r})=>t(e,r),stringify:n},s={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=>t(e,!1),stringify:n},o={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){const n=e.match(o.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,s,i,a,c,u]=n.map(Number),l=n[7]?Number((n[7]+"00").substr(1,3)):0;let f=Date.UTC(r,s-1,i,a||0,c||0,u||0,l);const p=n[8];if(p&&"Z"!==p){let e=t(p,!1);Math.abs(e)<30&&(e*=60),f-=6e4*e}return new Date(f)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};return cv.floatTime=s,cv.intTime=r,cv.timestamp=o,cv}function lv(){if(ov)return Jb;ov=1;var e=sb(),t=yb(),n=lb(),r=db(),s=jb(),o=Gb(),i=Yb(),a=ev(),c=Jy(),u=Ub(),l=Kb(),f=rv(),p=uv();const d=[e.map,n.seq,r.string,t.nullTag,o.trueTag,o.falseTag,a.intBin,a.intOct,a.int,a.intHex,i.floatNaN,i.floatExp,i.float,s.binary,c.merge,u.omap,l.pairs,f.set,p.intTime,p.floatTime,p.timestamp];return Jb.schema=d,Jb}function fv(){if(iv)return mb;iv=1;var e=sb(),t=yb(),n=lb(),r=db(),s=Db(),o=Ab(),i=Pb(),a=Nb(),c=Rb(),u=jb(),l=Jy(),f=Ub(),p=Kb(),d=lv(),h=rv(),m=uv();const g=new Map([["core",a.schema],["failsafe",[e.map,n.seq,r.string]],["json",c.schema],["yaml11",d.schema],["yaml-1.1",d.schema]]),y={binary:u.binary,bool:s.boolTag,float:o.float,floatExp:o.floatExp,floatNaN:o.floatNaN,floatTime:m.floatTime,int:i.int,intHex:i.intHex,intOct:i.intOct,intTime:m.intTime,map:e.map,merge:l.merge,null:t.nullTag,omap:f.omap,pairs:p.pairs,seq:n.seq,set:h.set,timestamp:m.timestamp},b={"tag:yaml.org,2002:binary":u.binary,"tag:yaml.org,2002:merge":l.merge,"tag:yaml.org,2002:omap":f.omap,"tag:yaml.org,2002:pairs":p.pairs,"tag:yaml.org,2002:set":h.set,"tag:yaml.org,2002:timestamp":m.timestamp};return mb.coreKnownTags=b,mb.getTags=function(e,t,n){const r=g.get(t);if(r&&!e)return n&&!r.includes(l.merge)?r.concat(l.merge):r.slice();let s=r;if(!s){if(!Array.isArray(e)){const e=Array.from(g.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}s=[]}if(Array.isArray(e))for(const t of e)s=s.concat(t);else"function"==typeof e&&(s=e(s.slice()));return n&&(s=s.concat(l.merge)),s.reduce((e,t)=>{const n="string"==typeof t?y[t]:t;if(!n){const e=JSON.stringify(t),n=Object.keys(y).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])},mb}function pv(){if(av)return Qy;av=1;var e=qg(),t=sb(),n=lb(),r=db(),s=fv();const o=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;return Qy.Schema=class i{constructor({compat:i,customTags:a,merge:c,resolveKnownTags:u,schema:l,sortMapEntries:f,toStringDefaults:p}){this.compat=Array.isArray(i)?s.getTags(i,"compat"):i?s.getTags(null,i):null,this.name="string"==typeof l&&l||"core",this.knownTags=u?s.coreKnownTags:{},this.tags=s.getTags(a,this.name,c),this.toStringOptions=p??null,Object.defineProperty(this,e.MAP,{value:t.map}),Object.defineProperty(this,e.SCALAR,{value:r.string}),Object.defineProperty(this,e.SEQ,{value:n.seq}),this.sortMapEntries="function"==typeof f?f:!0===f?o:null}clone(){const e=Object.create(i.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}},Qy}var dv,hv,mv={};function gv(){if(dv)return mv;dv=1;var e=qg(),t=Fy(),n=Cy();return mv.stringifyDocument=function(r,s){const o=[];let i=!0===s.directives;if(!1!==s.directives&&r.directives){const e=r.directives.toString(r);e?(o.push(e),i=!0):r.directives.docStart&&(i=!0)}i&&o.push("---");const a=t.createStringifyContext(r,s),{commentString:c}=a.options;if(r.commentBefore){1!==o.length&&o.unshift("");const e=c(r.commentBefore);o.unshift(n.indentComment(e,""))}let u=!1,l=null;if(r.contents){if(e.isNode(r.contents)){if(r.contents.spaceBefore&&i&&o.push(""),r.contents.commentBefore){const e=c(r.contents.commentBefore);o.push(n.indentComment(e,""))}a.forceBlockIndent=!!r.comment,l=r.contents.comment}const s=l?void 0:()=>u=!0;let f=t.stringify(r.contents,a,()=>l=null,s);l&&(f+=n.lineComment(f,"",c(l))),"|"!==f[0]&&">"!==f[0]||"---"!==o[o.length-1]?o.push(f):o[o.length-1]=`--- ${f}`}else o.push(t.stringify(r.contents,a));if(r.directives?.docEnd)if(r.comment){const e=c(r.comment);e.includes("\n")?(o.push("..."),o.push(n.indentComment(e,""))):o.push(`... ${e}`)}else o.push("...");else{let e=r.comment;e&&u&&(e=e.replace(/^\n+/,"")),e&&(u&&!l||""===o[o.length-1]||o.push(""),o.push(n.indentComment(c(e),"")))}return o.join("\n")+"\n"},mv}function yv(){if(hv)return Qg;hv=1;var e=py(),t=wy(),n=qg(),r=Gy(),s=ly(),o=pv(),i=gv(),a=ty(),c=oy(),u=Dy(),l=Vg();function f(e){if(n.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}return Qg.Document=class p{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,n.NODE_TYPE,{value:n.DOC});let s=null;"function"==typeof t||Array.isArray(t)?s=t:void 0===r&&t&&(r=t,t=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=o;let{version:i}=o;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(i=this.directives.yaml.version)):this.directives=new l.Directives({version:i}),this.setSchema(i,r),this.contents=void 0===e?null:this.createNode(e,s,r)}clone(){const e=Object.create(p.prototype,{[n.NODE_TYPE]:{value:n.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=n.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){f(this.contents)&&this.contents.add(e)}addIn(e,t){f(this.contents)&&this.contents.addIn(e,t)}createAlias(t,n){if(!t.anchor){const e=a.anchorNames(this);t.anchor=!n||e.has(n)?a.findNewAnchor(n||"a",e):n}return new e.Alias(t.anchor)}createNode(e,t,r){let s;if("function"==typeof t)e=t.call({"":e},"",e),s=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,n=t.filter(e).map(String);n.length>0&&(t=t.concat(n)),s=t}else void 0===r&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:o,anchorPrefix:i,flow:c,keepUndefined:l,onTagObj:f,tag:p}=r??{},{onAnchor:d,setAnchors:h,sourceObjects:m}=a.createNodeAnchors(this,i||"a"),g={aliasDuplicateObjects:o??!0,keepUndefined:l??!1,onAnchor:d,onTagObj:f,replacer:s,schema:this.schema,sourceObjects:m},y=u.createNode(e,p,g);return c&&n.isCollection(y)&&(y.flow=!0),h(),y}createPair(e,t,n={}){const s=this.createNode(e,null,n),o=this.createNode(t,null,n);return new r.Pair(s,o)}delete(e){return!!f(this.contents)&&this.contents.delete(e)}deleteIn(e){return t.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):!!f(this.contents)&&this.contents.deleteIn(e)}get(e,t){return n.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,r){return t.isEmptyPath(e)?!r&&n.isScalar(this.contents)?this.contents.value:this.contents:n.isCollection(this.contents)?this.contents.getIn(e,r):void 0}has(e){return!!n.isCollection(this.contents)&&this.contents.has(e)}hasIn(e){return t.isEmptyPath(e)?void 0!==this.contents:!!n.isCollection(this.contents)&&this.contents.hasIn(e)}set(e,n){null==this.contents?this.contents=t.collectionFromPath(this.schema,[e],n):f(this.contents)&&this.contents.set(e,n)}setIn(e,n){t.isEmptyPath(e)?this.contents=n:null==this.contents?this.contents=t.collectionFromPath(this.schema,Array.from(e),n):f(this.contents)&&this.contents.setIn(e,n)}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.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new l.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const t=JSON.stringify(e);throw new 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)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new o.Schema(Object.assign(n,t))}}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:o,reviver:i}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},u=s.toJS(this.contents,t??"",a);if("function"==typeof o)for(const{count:e,res:t}of a.anchors.values())o(t,e);return"function"==typeof i?c.applyReviver(i,{"":u},"",u):u}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return i.stringifyDocument(this,e)}},Qg}var bv,vv={};function Dv(){if(bv)return vv;bv=1;class e extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}}return vv.YAMLError=e,vv.YAMLParseError=class extends e{constructor(e,t,n){super("YAMLParseError",e,t,n)}},vv.YAMLWarning=class extends e{constructor(e,t,n){super("YAMLWarning",e,t,n)}},vv.prettifyError=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map(e=>t.linePos(e));const{line:r,col:s}=n.linePos[0];n.message+=` at line ${r}, column ${s}`;let o=s-1,i=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(o>=60&&i.length>80){const e=Math.min(o-39,i.length-79);i="…"+i.substring(e),o-=e-1}if(i.length>80&&(i=i.substring(0,79)+"…"),r>1&&/^ *$/.test(i.substring(0,o))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+"…\n"),i=n+i}if(/[^ ]/.test(i)){let e=1;const t=n.linePos[1];t?.line===r&&t.col>s&&(e=Math.max(1,Math.min(t.col-s,80-o)));const a=" ".repeat(o)+"^".repeat(e);n.message+=`:\n\n${i}\n${a}\n`}},vv}var wv,_v={},Sv={},Ev={},kv={},Av={};function Cv(){if(wv)return Av;return wv=1,Av.resolveProps=function(e,{flow:t,indicator:n,next:r,offset:s,onError:o,parentIndent:i,startOnNewline:a}){let c=!1,u=a,l=a,f="",p="",d=!1,h=!1,m=null,g=null,y=null,b=null,v=null,D=null,w=null;for(const s of e)switch(h&&("space"!==s.type&&"newline"!==s.type&&"comma"!==s.type&&o(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),m&&(u&&"comment"!==s.type&&"newline"!==s.type&&o(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),s.type){case"space":t||"doc-start"===n&&"flow-collection"===r?.type||!s.source.includes("\t")||(m=s),l=!0;break;case"comment":{l||o(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=s.source.substring(1)||" ";f?f+=p+e:f=e,p="",u=!1;break}case"newline":u?f?f+=s.source:D&&"seq-item-ind"===n||(c=!0):p+=s.source,u=!0,d=!0,(g||y)&&(b=s),l=!0;break;case"anchor":g&&o(s,"MULTIPLE_ANCHORS","A node can have at most one anchor"),s.source.endsWith(":")&&o(s.offset+s.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=s,w??(w=s.offset),u=!1,l=!1,h=!0;break;case"tag":y&&o(s,"MULTIPLE_TAGS","A node can have at most one tag"),y=s,w??(w=s.offset),u=!1,l=!1,h=!0;break;case n:(g||y)&&o(s,"BAD_PROP_ORDER",`Anchors and tags must be after the ${s.source} indicator`),D&&o(s,"UNEXPECTED_TOKEN",`Unexpected ${s.source} in ${t??"collection"}`),D=s,u="seq-item-ind"===n||"explicit-key-ind"===n,l=!1;break;case"comma":if(t){v&&o(s,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),v=s,u=!1,l=!1;break}default:o(s,"UNEXPECTED_TOKEN",`Unexpected ${s.type} token`),u=!1,l=!1}const _=e[e.length-1],S=_?_.offset+_.source.length:s;return h&&r&&"space"!==r.type&&"newline"!==r.type&&"comma"!==r.type&&("scalar"!==r.type||""!==r.source)&&o(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(u&&m.indent<=i||"block-map"===r?.type||"block-seq"===r?.type)&&o(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:D,spaceBefore:c,comment:f,hasNewline:d,anchor:g,tag:y,newlineAfterProp:b,end:S,start:w??S}},Av}var Ov,Pv={};function Tv(){if(Ov)return Pv;return Ov=1,Pv.containsNewline=function e(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes("\n"))return!0;if(t.end)for(const e of t.end)if("newline"===e.type)return!0;return!1;case"flow-collection":for(const n of t.items){for(const e of n.start)if("newline"===e.type)return!0;if(n.sep)for(const e of n.sep)if("newline"===e.type)return!0;if(e(n.key)||e(n.value))return!0}return!1;default:return!0}},Pv}var xv,Nv={};function $v(){if(xv)return Nv;xv=1;var e=Tv();return Nv.flowIndentCheck=function(t,n,r){if("flow-collection"===n?.type){const s=n.end[0];if(s.indent===t&&("]"===s.source||"}"===s.source)&&e.containsNewline(n)){r(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}},Nv}var Lv,Rv,Fv={};function Iv(){if(Lv)return Fv;Lv=1;var e=qg();return Fv.mapIncludes=function(t,n,r){const{uniqueKeys:s}=t.options;if(!1===s)return!1;const o="function"==typeof s?s:(t,n)=>t===n||e.isScalar(t)&&e.isScalar(n)&&t.value===n.value;return n.some(e=>o(e.key,r))},Fv}function jv(){if(Rv)return kv;Rv=1;var e=Gy(),t=rb(),n=Cv(),r=Tv(),s=$v(),o=Iv();const i="All mapping items must start at the same column";return kv.resolveBlockMap=function({composeNode:a,composeEmptyNode:c},u,l,f,p){const d=new(p?.nodeClass??t.YAMLMap)(u.schema);u.atRoot&&(u.atRoot=!1);let h=l.offset,m=null;for(const t of l.items){const{start:p,key:g,sep:y,value:b}=t,v=n.resolveProps(p,{indicator:"explicit-key-ind",next:g??y?.[0],offset:h,onError:f,parentIndent:l.indent,startOnNewline:!0}),D=!v.found;if(D){if(g&&("block-seq"===g.type?f(h,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in g&&g.indent!==l.indent&&f(h,"BAD_INDENT",i)),!v.anchor&&!v.tag&&!y){m=v.end,v.comment&&(d.comment?d.comment+="\n"+v.comment:d.comment=v.comment);continue}(v.newlineAfterProp||r.containsNewline(g))&&f(g??p[p.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else v.found?.indent!==l.indent&&f(h,"BAD_INDENT",i);u.atKey=!0;const w=v.end,_=g?a(u,g,v,f):c(u,w,p,null,v,f);u.schema.compat&&s.flowIndentCheck(l.indent,g,f),u.atKey=!1,o.mapIncludes(u,d.items,_)&&f(w,"DUPLICATE_KEY","Map keys must be unique");const S=n.resolveProps(y??[],{indicator:"map-value-ind",next:b,offset:_.range[2],onError:f,parentIndent:l.indent,startOnNewline:!g||"block-scalar"===g.type});if(h=S.end,S.found){D&&("block-map"!==b?.type||S.hasNewline||f(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),u.options.strict&&v.start<S.found.offset-1024&&f(_.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const n=b?a(u,b,S,f):c(u,h,y,null,S,f);u.schema.compat&&s.flowIndentCheck(l.indent,b,f),h=n.range[2];const r=new e.Pair(_,n);u.options.keepSourceTokens&&(r.srcToken=t),d.items.push(r)}else{D&&f(_.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),S.comment&&(_.comment?_.comment+="\n"+S.comment:_.comment=S.comment);const n=new e.Pair(_);u.options.keepSourceTokens&&(n.srcToken=t),d.items.push(n)}}return m&&m<h&&f(m,"IMPOSSIBLE","Map comment with trailing content"),d.range=[l.offset,h,m??h],d},kv}var Mv,Bv={};function zv(){if(Mv)return Bv;Mv=1;var e=ub(),t=Cv(),n=$v();return Bv.resolveBlockSeq=function({composeNode:r,composeEmptyNode:s},o,i,a,c){const u=new(c?.nodeClass??e.YAMLSeq)(o.schema);o.atRoot&&(o.atRoot=!1),o.atKey&&(o.atKey=!1);let l=i.offset,f=null;for(const{start:e,value:c}of i.items){const p=t.resolveProps(e,{indicator:"seq-item-ind",next:c,offset:l,onError:a,parentIndent:i.indent,startOnNewline:!0});if(!p.found){if(!(p.anchor||p.tag||c)){f=p.end,p.comment&&(u.comment=p.comment);continue}"block-seq"===c?.type?a(p.end,"BAD_INDENT","All sequence items must start at the same column"):a(l,"MISSING_CHAR","Sequence item without - indicator")}const d=c?r(o,c,p,a):s(o,p.end,e,null,p,a);o.schema.compat&&n.flowIndentCheck(i.indent,c,a),l=d.range[2],u.items.push(d)}return u.range=[i.offset,l,f??l],u},Bv}var Hv,Kv,Uv,qv={},Jv={};function Zv(){if(Hv)return Jv;return Hv=1,Jv.resolveEnd=function(e,t,n,r){let s="";if(e){let o=!1,i="";for(const a of e){const{source:e,type:c}=a;switch(c){case"space":o=!0;break;case"comment":{n&&!o&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";s?s+=i+t:s=t,i="";break}case"newline":s&&(i+=e),o=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=e.length}}return{comment:s,offset:t}},Jv}function Gv(){if(Kv)return qv;Kv=1;var e=qg(),t=Gy(),n=rb(),r=ub(),s=Zv(),o=Cv(),i=Tv(),a=Iv();const c="Block collections are not allowed within flow collections",u=e=>e&&("block-map"===e.type||"block-seq"===e.type);return qv.resolveFlowCollection=function({composeNode:l,composeEmptyNode:f},p,d,h,m){const g="{"===d.start.source,y=g?"flow map":"flow sequence",b=new(m?.nodeClass??(g?n.YAMLMap:r.YAMLSeq))(p.schema);b.flow=!0;const v=p.atRoot;v&&(p.atRoot=!1),p.atKey&&(p.atKey=!1);let D=d.offset+d.start.source.length;for(let r=0;r<d.items.length;++r){const s=d.items[r],{start:m,key:v,sep:w,value:_}=s,S=o.resolveProps(m,{flow:y,indicator:"explicit-key-ind",next:v??w?.[0],offset:D,onError:h,parentIndent:d.indent,startOnNewline:!1});if(!S.found){if(!(S.anchor||S.tag||w||_)){0===r&&S.comma?h(S.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`):r<d.items.length-1&&h(S.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${y}`),S.comment&&(b.comment?b.comment+="\n"+S.comment:b.comment=S.comment),D=S.end;continue}!g&&p.options.strict&&i.containsNewline(v)&&h(v,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===r)S.comma&&h(S.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`);else if(S.comma||h(S.start,"MISSING_CHAR",`Missing , between ${y} items`),S.comment){let t="";e:for(const e of m)switch(e.type){case"comma":case"space":break;case"comment":t=e.source.substring(1);break e;default:break e}if(t){let n=b.items[b.items.length-1];e.isPair(n)&&(n=n.value??n.key),n.comment?n.comment+="\n"+t:n.comment=t,S.comment=S.comment.substring(t.length+1)}}if(g||w||S.found){p.atKey=!0;const e=S.end,r=v?l(p,v,S,h):f(p,e,m,null,S,h);u(v)&&h(r.range,"BLOCK_IN_FLOW",c),p.atKey=!1;const i=o.resolveProps(w??[],{flow:y,indicator:"map-value-ind",next:_,offset:r.range[2],onError:h,parentIndent:d.indent,startOnNewline:!1});if(i.found){if(!g&&!S.found&&p.options.strict){if(w)for(const e of w){if(e===i.found)break;if("newline"===e.type){h(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}S.start<i.found.offset-1024&&h(i.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else _&&("source"in _&&":"===_.source?.[0]?h(_,"MISSING_CHAR",`Missing space after : in ${y}`):h(i.start,"MISSING_CHAR",`Missing , or : between ${y} items`));const E=_?l(p,_,i,h):i.found?f(p,i.end,w,null,i,h):null;E?u(_)&&h(E.range,"BLOCK_IN_FLOW",c):i.comment&&(r.comment?r.comment+="\n"+i.comment:r.comment=i.comment);const k=new t.Pair(r,E);if(p.options.keepSourceTokens&&(k.srcToken=s),g){const t=b;a.mapIncludes(p,t.items,r)&&h(e,"DUPLICATE_KEY","Map keys must be unique"),t.items.push(k)}else{const e=new n.YAMLMap(p.schema);e.flow=!0,e.items.push(k);const t=(E??r).range;e.range=[r.range[0],t[1],t[2]],b.items.push(e)}D=E?E.range[2]:i.end}else{const e=_?l(p,_,S,h):f(p,S.end,w,null,S,h);b.items.push(e),D=e.range[2],u(_)&&h(e.range,"BLOCK_IN_FLOW",c)}}const w=g?"}":"]",[_,...S]=d.end;let E=D;if(_?.source===w)E=_.offset+_.source.length;else{const e=y[0].toUpperCase()+y.substring(1);h(D,v?"MISSING_CHAR":"BAD_INDENT",v?`${e} must end with a ${w}`:`${e} in block collection must be sufficiently indented and end with a ${w}`),_&&1!==_.source.length&&S.unshift(_)}if(S.length>0){const e=s.resolveEnd(S,E,p.options.strict,h);e.comment&&(b.comment?b.comment+="\n"+e.comment:b.comment=e.comment),b.range=[d.offset,E,e.offset]}else b.range=[d.offset,E,E];return b},qv}function Wv(){if(Uv)return Ev;Uv=1;var e=qg(),t=vy(),n=rb(),r=ub(),s=jv(),o=zv(),i=Gv();function a(e,t,n,r,a,c){const u="block-map"===n.type?s.resolveBlockMap(e,t,n,r,c):"block-seq"===n.type?o.resolveBlockSeq(e,t,n,r,c):i.resolveFlowCollection(e,t,n,r,c),l=u.constructor;return"!"===a||a===l.tagName?(u.tag=l.tagName,u):(a&&(u.tag=a),u)}return Ev.composeCollection=function(s,o,i,c,u){const l=c.tag,f=l?o.directives.tagName(l.source,e=>u(l,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===i.type){const{anchor:e,newlineAfterProp:t}=c,n=e&&l?e.offset>l.offset?e:l:e??l;if(n&&(!t||t.offset<n.offset)){u(n,"MISSING_CHAR","Missing newline after block sequence props")}}const p="block-map"===i.type?"map":"block-seq"===i.type?"seq":"{"===i.start.source?"map":"seq";if(!l||!f||"!"===f||f===n.YAMLMap.tagName&&"map"===p||f===r.YAMLSeq.tagName&&"seq"===p)return a(s,o,i,u,f);let d=o.schema.tags.find(e=>e.tag===f&&e.collection===p);if(!d){const e=o.schema.knownTags[f];if(e?.collection!==p)return e?u(l,"BAD_COLLECTION_TYPE",`${e.tag} used for ${p} collection, but expects ${e.collection??"scalar"}`,!0):u(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${f}`,!0),a(s,o,i,u,f);o.schema.tags.push(Object.assign({},e,{default:!1})),d=e}const h=a(s,o,i,u,f,d),m=d.resolve?.(h,e=>u(l,"TAG_RESOLVE_FAILED",e),o.options)??h,g=e.isNode(m)?m:new t.Scalar(m);return g.range=h.range,g.tag=f,d?.format&&(g.format=d.format),g},Ev}var Vv,Yv={},Qv={};function Xv(){if(Vv)return Qv;Vv=1;var e=vy();return Qv.resolveBlockScalar=function(t,n,r){const s=n.offset,o=function({offset:e,props:t},n,r){if("block-scalar-header"!==t[0].type)return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=t[0],o=s[0];let i=0,a="",c=-1;for(let t=1;t<s.length;++t){const n=s[t];if(a||"-"!==n&&"+"!==n){const r=Number(n);!i&&r?i=r:-1===c&&(c=e+t)}else a=n}-1!==c&&r(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let u=!1,l="",f=s.length;for(let e=1;e<t.length;++e){const s=t[e];switch(s.type){case"space":u=!0;case"newline":f+=s.source.length;break;case"comment":if(n&&!u){r(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters")}f+=s.source.length,l=s.source.substring(1);break;case"error":r(s,"UNEXPECTED_TOKEN",s.message),f+=s.source.length;break;default:{r(s,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${s.type}`);const e=s.source;e&&"string"==typeof e&&(f+=e.length)}}}return{mode:o,indent:i,chomp:a,comment:l,length:f}}(n,t.options.strict,r);if(!o)return{value:"",type:null,comment:"",range:[s,s,s]};const i=">"===o.mode?e.Scalar.BLOCK_FOLDED:e.Scalar.BLOCK_LITERAL,a=n.source?function(e){const t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),s=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let e=1;e<t.length;e+=2)s.push([t[e],t[e+1]]);return s}(n.source):[];let c=a.length;for(let e=a.length-1;e>=0;--e){const t=a[e][1];if(""!==t&&"\r"!==t)break;c=e}if(0===c){const e="+"===o.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let t=s+o.length;return n.source&&(t+=n.source.length),{value:e,type:i,comment:o.comment,range:[s,t,t]}}let u=n.indent+o.indent,l=n.offset+o.length,f=0;for(let e=0;e<c;++e){const[n,s]=a[e];if(""!==s&&"\r"!==s){if(n.length<u){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";r(l+n.length,"MISSING_CHAR",e)}if(0===o.indent&&(u=n.length),f=e,0===u&&!t.atRoot){r(l,"BAD_INDENT","Block scalar values in collections must be indented")}break}0===o.indent&&n.length>u&&(u=n.length),l+=n.length+s.length+1}for(let e=a.length-1;e>=c;--e)a[e][0].length>u&&(c=e+1);let p="",d="",h=!1;for(let e=0;e<f;++e)p+=a[e][0].slice(u)+"\n";for(let t=f;t<c;++t){let[n,s]=a[t];l+=n.length+s.length+1;const c="\r"===s[s.length-1];if(c&&(s=s.slice(0,-1)),s&&n.length<u){const e=`Block scalar lines must not be less indented than their ${o.indent?"explicit indentation indicator":"first line"}`;r(l-s.length-(c?2:1),"BAD_INDENT",e),n=""}i===e.Scalar.BLOCK_LITERAL?(p+=d+n.slice(u)+s,d="\n"):n.length>u||"\t"===s[0]?(" "===d?d="\n":h||"\n"!==d||(d="\n\n"),p+=d+n.slice(u)+s,d="\n",h=!0):""===s?"\n"===d?p+="\n":d="\n":(p+=d+s,d=" ",h=!1)}switch(o.chomp){case"-":break;case"+":for(let e=c;e<a.length;++e)p+="\n"+a[e][0].slice(u);"\n"!==p[p.length-1]&&(p+="\n");break;default:p+="\n"}const m=s+o.length+n.source.length;return{value:p,type:i,comment:o.comment,range:[s,m,m]}},Qv}var eD,tD,nD={};function rD(){if(eD)return nD;eD=1;var e=vy(),t=Zv();function n(e){let t,n;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy"),n=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let s=r[1],o=" ",i=t.lastIndex;for(n.lastIndex=i;r=n.exec(e);)""===r[1]?"\n"===o?s+=o:o="\n":(s+=o+r[1],o=" "),i=n.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=i,r=a.exec(e),s+o+(r?.[1]??"")}function r(e,t){let n="",r=e[t+1];for(;!(" "!==r&&"\t"!==r&&"\n"!==r&&"\r"!==r||"\r"===r&&"\n"!==e[t+2]);)"\n"===r&&(n+="\n"),r=e[(t+=1)+1];return n||(n=" "),{fold:n,offset:t}}const s={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function o(e,t,n,r){const s=e.substr(t,n),o=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;if(isNaN(o)){const s=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}return String.fromCodePoint(o)}return nD.resolveFlowScalar=function(i,a,c){const{offset:u,type:l,source:f,end:p}=i;let d,h;const m=(e,t,n)=>c(u+e,t,n);switch(l){case"scalar":d=e.Scalar.PLAIN,h=function(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`);return n(e)}(f,m);break;case"single-quoted-scalar":d=e.Scalar.QUOTE_SINGLE,h=function(e,t){"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote");return n(e.slice(1,-1)).replace(/''/g,"'")}(f,m);break;case"double-quoted-scalar":d=e.Scalar.QUOTE_DOUBLE,h=function(e,t){let n="";for(let i=1;i<e.length-1;++i){const a=e[i];if("\r"!==a||"\n"!==e[i+1])if("\n"===a){const{fold:t,offset:s}=r(e,i);n+=t,i=s}else if("\\"===a){let r=e[++i];const a=s[r];if(a)n+=a;else if("\n"===r)for(r=e[i+1];" "===r||"\t"===r;)r=e[1+ ++i];else if("\r"===r&&"\n"===e[i+1])for(r=e[1+ ++i];" "===r||"\t"===r;)r=e[1+ ++i];else if("x"===r||"u"===r||"U"===r){const s={x:2,u:4,U:8}[r];n+=o(e,i+1,s,t),i+=s}else{const r=e.substr(i-1,2);t(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${r}`),n+=r}}else if(" "===a||"\t"===a){const t=i;let r=e[i+1];for(;" "===r||"\t"===r;)r=e[1+ ++i];"\n"===r||"\r"===r&&"\n"===e[i+2]||(n+=i>t?e.slice(t,i+1):a)}else n+=a}'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote');return n}(f,m);break;default:return c(i,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[u,u+f.length,u+f.length]}}const g=u+f.length,y=t.resolveEnd(p,g,a,c);return{value:h,type:d,comment:y.comment,range:[u,g,y.offset]}},nD}function sD(){if(tD)return Yv;tD=1;var e=qg(),t=vy(),n=Xv(),r=rD();return Yv.composeScalar=function(s,o,i,a){const{value:c,type:u,comment:l,range:f}="block-scalar"===o.type?n.resolveBlockScalar(s,o,a):r.resolveFlowScalar(o,s.options.strict,a),p=i?s.directives.tagName(i.source,e=>a(i,"TAG_RESOLVE_FAILED",e)):null;let d,h;d=s.options.stringKeys&&s.atKey?s.schema[e.SCALAR]:p?function(t,n,r,s,o){if("!"===r)return t[e.SCALAR];const i=[];for(const e of t.tags)if(!e.collection&&e.tag===r){if(!e.default||!e.test)return e;i.push(e)}for(const e of i)if(e.test?.test(n))return e;const a=t.knownTags[r];if(a&&!a.collection)return t.tags.push(Object.assign({},a,{default:!1,test:void 0})),a;return o(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,"tag:yaml.org,2002:str"!==r),t[e.SCALAR]}(s.schema,c,p,i,a):"scalar"===o.type?function({atKey:t,directives:n,schema:r},s,o,i){const a=r.tags.find(e=>(!0===e.default||t&&"key"===e.default)&&e.test?.test(s))||r[e.SCALAR];if(r.compat){const t=r.compat.find(e=>e.default&&e.test?.test(s))??r[e.SCALAR];if(a.tag!==t.tag){i(o,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${n.tagString(a.tag)} or ${n.tagString(t.tag)}`,!0)}}return a}(s,c,o,a):s.schema[e.SCALAR];try{const n=d.resolve(c,e=>a(i??o,"TAG_RESOLVE_FAILED",e),s.options);h=e.isScalar(n)?n:new t.Scalar(n)}catch(e){const n=e instanceof Error?e.message:String(e);a(i??o,"TAG_RESOLVE_FAILED",n),h=new t.Scalar(c)}return h.range=f,h.source=c,u&&(h.type=u),p&&(h.tag=p),d.format&&(h.format=d.format),l&&(h.comment=l),h},Yv}var oD,iD,aD,cD,uD={};function lD(){if(oD)return uD;return oD=1,uD.emptyScalarPosition=function(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++r];"space"===n?.type;)e+=n.source.length,n=t[++r];break}}return e},uD}function fD(){if(iD)return Sv;iD=1;var e=py(),t=qg(),n=Wv(),r=sD(),s=Zv(),o=lD();const i={composeNode:a,composeEmptyNode:c};function a(o,a,u,l){const f=o.atKey,{spaceBefore:p,comment:d,anchor:h,tag:m}=u;let g,y=!0;switch(a.type){case"alias":g=function({options:t},{offset:n,source:r,end:o},i){const a=new e.Alias(r.substring(1));""===a.source&&i(n,"BAD_ALIAS","Alias cannot be an empty string");a.source.endsWith(":")&&i(n+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=n+r.length,u=s.resolveEnd(o,c,t.strict,i);a.range=[n,c,u.offset],u.comment&&(a.comment=u.comment);return a}(o,a,l),(h||m)&&l(a,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":g=r.composeScalar(o,a,m,l),h&&(g.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":g=n.composeCollection(i,o,a,u,l),h&&(g.anchor=h.source.substring(1));break;default:l(a,"UNEXPECTED_TOKEN","error"===a.type?a.message:`Unsupported token (type: ${a.type})`),g=c(o,a.offset,void 0,null,u,l),y=!1}if(h&&""===g.anchor&&l(h,"BAD_ALIAS","Anchor cannot be an empty string"),f&&o.options.stringKeys&&(!t.isScalar(g)||"string"!=typeof g.value||g.tag&&"tag:yaml.org,2002:str"!==g.tag)){l(m??a,"NON_STRING_KEY","With stringKeys, all keys must be strings")}return p&&(g.spaceBefore=!0),d&&("scalar"===a.type&&""===a.source?g.comment=d:g.commentBefore=d),o.options.keepSourceTokens&&y&&(g.srcToken=a),g}function c(e,t,n,s,{spaceBefore:i,comment:a,anchor:c,tag:u,end:l},f){const p={type:"scalar",offset:o.emptyScalarPosition(t,n,s),indent:-1,source:""},d=r.composeScalar(e,p,u,f);return c&&(d.anchor=c.source.substring(1),""===d.anchor&&f(c,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(d.spaceBefore=!0),a&&(d.comment=a,d.range[2]=l),d}return Sv.composeEmptyNode=c,Sv.composeNode=a,Sv}function pD(){if(aD)return _v;aD=1;var e=yv(),t=fD(),n=Zv(),r=Cv();return _v.composeDoc=function(s,o,{offset:i,start:a,value:c,end:u},l){const f=Object.assign({_directives:o},s),p=new e.Document(void 0,f),d={atKey:!1,atRoot:!0,directives:p.directives,options:p.options,schema:p.schema},h=r.resolveProps(a,{indicator:"doc-start",next:c??u?.[0],offset:i,onError:l,parentIndent:0,startOnNewline:!0});h.found&&(p.directives.docStart=!0,!c||"block-map"!==c.type&&"block-seq"!==c.type||h.hasNewline||l(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),p.contents=c?t.composeNode(d,c,h,l):t.composeEmptyNode(d,h.end,a,null,h,l);const m=p.contents.range[2],g=n.resolveEnd(u,m,!1,l);return g.comment&&(p.comment=g.comment),p.range=[i,m,g.offset],p},_v}function dD(){if(cD)return Hg;cD=1;var e=w,t=Vg(),n=yv(),r=Dv(),s=qg(),o=pD(),i=Zv();function a(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+("string"==typeof n?n.length:1)]}function c(e){let t="",n=!1,r=!1;for(let s=0;s<e.length;++s){const o=e[s];switch(o[0]){case"#":t+=(""===t?"":r?"\n\n":"\n")+(o.substring(1)||" "),n=!0,r=!1;break;case"%":"#"!==e[s+1]?.[0]&&(s+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}return Hg.Composer=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,s)=>{const o=a(e);s?this.warnings.push(new r.YAMLWarning(o,t,n)):this.errors.push(new r.YAMLParseError(o,t,n))},this.directives=new t.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:r}=c(this.prelude);if(n){const o=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!o)e.commentBefore=n;else if(s.isCollection(o)&&!o.flow&&o.items.length>0){let e=o.items[0];s.isPair(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{const e=o.commentBefore;o.commentBefore=e?`${n}\n${e}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:c(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(const t of e)yield*this.next(t);yield*this.end(t,n)}*next(t){switch(e.env.LOG_STREAM&&console.dir(t,{depth:null}),t.type){case"directive":this.directives.add(t.source,(e,n,r)=>{const s=a(t);s[0]+=e,this.onError(s,"BAD_DIRECTIVE",n,r)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const e=o.composeDoc(this.options,this.directives,t,this.onError);this.atDirectives&&!e.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(e,!1),this.doc&&(yield this.doc),this.doc=e,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const e=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,n=new r.YAMLParseError(a(t),"UNEXPECTED_TOKEN",e);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const e="Unexpected doc-end without preceding document";this.errors.push(new r.YAMLParseError(a(t),"UNEXPECTED_TOKEN",e));break}this.doc.directives.docEnd=!0;const e=i.resolveEnd(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),e.comment){const t=this.doc.comment;this.doc.comment=t?`${t}\n${e.comment}`:e.comment}this.doc.range[2]=e.offset;break}default:this.errors.push(new r.YAMLParseError(a(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),r=new n.Document(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}},Hg}var hD,mD={},gD={};function yD(){if(hD)return gD;hD=1;var e=Xv(),t=rD(),n=Dv(),r=Ry();function s(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function o(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const r=e.props.slice(1);let s=t.length;"block-scalar-header"===e.props[0].type&&(s-=e.props[0].source.length);for(const e of r)e.offset+=s;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{const r={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:n,source:t,end:[r]});break}default:{const r="indent"in e?e.indent:-1,s="end"in e&&Array.isArray(e.end)?e.end.filter(e=>"space"===e.type||"comment"===e.type||"newline"===e.type):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:n,indent:r,source:t,end:s})}}}return gD.createScalarToken=function(e,t){const{implicitKey:n=!1,indent:o,inFlow:i=!1,offset:a=-1,type:c="PLAIN"}=t,u=r.stringifyString({type:c,value:e},{implicitKey:n,indent:o>0?" ".repeat(o):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:o,source:"\n"}];switch(u[0]){case"|":case">":{const e=u.indexOf("\n"),t=u.substring(0,e),n=u.substring(e+1)+"\n",r=[{type:"block-scalar-header",offset:a,indent:o,source:t}];return s(r,l)||r.push({type:"newline",offset:-1,indent:o,source:"\n"}),{type:"block-scalar",offset:a,indent:o,props:r,source:n}}case'"':return{type:"double-quoted-scalar",offset:a,indent:o,source:u,end:l};case"'":return{type:"single-quoted-scalar",offset:a,indent:o,source:u,end:l};default:return{type:"scalar",offset:a,indent:o,source:u,end:l}}},gD.resolveAsScalar=function(r,s=!0,o){if(r){const i=(e,t,r)=>{const s="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!o)throw new n.YAMLParseError([s,s+1],t,r);o(s,t,r)};switch(r.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return t.resolveFlowScalar(r,s,i);case"block-scalar":return e.resolveBlockScalar({options:{strict:s}},r,i)}}return null},gD.setScalarValue=function(e,t,n={}){let{afterKey:i=!1,implicitKey:a=!1,inFlow:c=!1,type:u}=n,l="indent"in e?e.indent:null;if(i&&"number"==typeof l&&(l+=2),!u)switch(e.type){case"single-quoted-scalar":u="QUOTE_SINGLE";break;case"double-quoted-scalar":u="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");u=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:u="PLAIN"}const f=r.stringifyString({type:u,value:t},{implicitKey:a||null===l,indent:null!==l&&l>0?" ".repeat(l):"",inFlow:c,options:{blockQuote:!0,lineWidth:-1}});switch(f[0]){case"|":case">":!function(e,t){const n=t.indexOf("\n"),r=t.substring(0,n),o=t.substring(n+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=r,e.source=o}else{const{offset:t}=e,n="indent"in e?e.indent:-1,i=[{type:"block-scalar-header",offset:t,indent:n,source:r}];s(i,"end"in e?e.end:void 0)||i.push({type:"newline",offset:-1,indent:n,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:n,props:i,source:o})}}(e,f);break;case'"':o(e,f,"double-quoted-scalar");break;case"'":o(e,f,"single-quoted-scalar");break;default:o(e,f,"scalar")}},gD}var bD,vD={};function DD(){if(bD)return vD;bD=1;function e(n){switch(n.type){case"block-scalar":{let t="";for(const r of n.props)t+=e(r);return t+n.source}case"block-map":case"block-seq":{let e="";for(const r of n.items)e+=t(r);return e}case"flow-collection":{let e=n.start.source;for(const r of n.items)e+=t(r);for(const t of n.end)e+=t.source;return e}case"document":{let e=t(n);if(n.end)for(const t of n.end)e+=t.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(const t of n.end)e+=t.source;return e}}}function t({start:t,key:n,sep:r,value:s}){let o="";for(const e of t)o+=e.source;if(n&&(o+=e(n)),r)for(const e of r)o+=e.source;return s&&(o+=e(s)),o}return vD.stringify=n=>"type"in n?e(n):t(n),vD}var wD,_D,SD={};function ED(){if(wD)return SD;wD=1;const e=Symbol("break visit"),t=Symbol("skip children"),n=Symbol("remove item");function r(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),s(Object.freeze([]),e,t)}function s(t,r,o){let i=o(r,t);if("symbol"==typeof i)return i;for(const a of["key","value"]){const c=r[a];if(c&&"items"in c){for(let r=0;r<c.items.length;++r){const i=s(Object.freeze(t.concat([[a,r]])),c.items[r],o);if("number"==typeof i)r=i-1;else{if(i===e)return e;i===n&&(c.items.splice(r,1),r-=1)}}"function"==typeof i&&"key"===a&&(i=i(r,t))}}return"function"==typeof i?i(r,t):i}return r.BREAK=e,r.SKIP=t,r.REMOVE=n,r.itemAtPath=(e,t)=>{let n=e;for(const[e,r]of t){const t=n?.[e];if(!t||!("items"in t))return;n=t.items[r]}return n},r.parentCollection=(e,t)=>{const n=r.itemAtPath(e,t.slice(0,-1)),s=t[t.length-1][0],o=n?.[s];if(o&&"items"in o)return o;throw new Error("Parent collection not found")},SD.visit=r,SD}function kD(){if(_D)return mD;_D=1;var e=yD(),t=DD(),n=ED();return mD.createScalarToken=e.createScalarToken,mD.resolveAsScalar=e.resolveAsScalar,mD.setScalarValue=e.setScalarValue,mD.stringify=t.stringify,mD.visit=n.visit,mD.BOM="\ufeff",mD.DOCUMENT="",mD.FLOW_END="",mD.SCALAR="",mD.isCollection=e=>!!e&&"items"in e,mD.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),mD.prettyToken=function(e){switch(e){case"\ufeff":return"<BOM>";case"":return"<DOC>";case"":return"<FLOW_END>";case"":return"<SCALAR>";default:return JSON.stringify(e)}},mD.tokenType=function(e){switch(e){case"\ufeff":return"byte-order-mark";case"":return"doc-mode";case"":return"flow-error-end";case"":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"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null},mD}var AD,CD={};function OD(){if(AD)return CD;AD=1;var e=kD();function t(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const n=new Set("0123456789ABCDEFabcdef"),r=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),s=new Set(",[]{}"),o=new Set(" ,[]{}\n\r\t"),i=e=>!e||o.has(e);return CD.Lexer=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("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;)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 n=this.buffer[e];if(this.indentNext>0){let t=0;for(;" "===n;)n=this.buffer[++t+e];if("\r"===n){const n=this.buffer[t+e+1];if("\n"===n||!n&&!this.atEnd)return e+t+1}return"\n"===n||t>=this.indentNext||!n&&!this.atEnd?e+t:-1}if("-"===n||"."===n){const n=this.buffer.substr(e,3);if(("---"===n||"..."===n)&&t(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 t=this.getLine();if(null===t)return this.setNext("stream");if(t[0]===e.BOM&&(yield*this.pushCount(1),t=t.substring(1)),"%"===t[0]){let e=t.length,n=t.indexOf("#");for(;-1!==n;){const r=t[n-1];if(" "===r||"\t"===r){e=n-1;break}n=t.indexOf("#",n+1)}for(;;){const n=t[e-1];if(" "!==n&&"\t"!==n)break;e-=1}const r=(yield*this.pushCount(e))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){const e=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-e),yield*this.pushNewline(),"stream"}return yield e.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){const 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");const e=this.peek(3);if(("---"===e||"..."===e)&&t(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&&!t(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&t(n)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const 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(i),"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 n,r,s=-1;do{n=yield*this.pushNewline(),n>0?(r=yield*this.pushSpaces(!1),this.indentValue=s=r):r=0,r+=(yield*this.pushSpaces(!0))}while(n+r>0);const o=this.getLine();if(null===o)return this.setNext("flow");if(-1!==s&&s<this.indentNext&&"#"!==o[0]||0===s&&(o.startsWith("---")||o.startsWith("..."))&&t(o[3])){if(!(s===this.indentNext-1&&1===this.flowLevel&&("]"===o[0]||"}"===o[0])))return this.flowLevel=0,yield e.FLOW_END,yield*this.parseLineStart()}let a=0;for(;","===o[a];)a+=(yield*this.pushCount(1)),a+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(a+=(yield*this.pushIndicators()),o[a]){case void 0:return"flow";case"#":return yield*this.pushCount(o.length-a),"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(i),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||t(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let 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)}const n=this.buffer.substring(0,t);let r=n.indexOf("\n",this.pos);if(-1!==r){for(;-1!==r;){const e=this.continueScalar(r+1);if(-1===e)break;r=n.indexOf("\n",e)}-1!==r&&(t=r-("\r"===n[r-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(;;){const 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=>t(e)||"#"===e)}*parseBlockScalar(){let t,n=this.pos-1,r=0;e:for(let e=this.pos;t=this.buffer[e];++e)switch(t){case" ":r+=1;break;case"\n":n=e,r=0;break;case"\r":{const t=this.buffer[e+1];if(!t&&!this.atEnd)return this.setNext("block-scalar");if("\n"===t)break}default:break e}if(!t&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=r:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(n+1);if(-1===e)break;n=this.buffer.indexOf("\n",e)}while(-1!==n);if(-1===n){if(!this.atEnd)return this.setNext("block-scalar");n=this.buffer.length}}let s=n+1;for(t=this.buffer[s];" "===t;)t=this.buffer[++s];if("\t"===t){for(;"\t"===t||" "===t||"\r"===t||"\n"===t;)t=this.buffer[++s];n=s-1}else if(!this.blockScalarKeep)for(;;){let e=n-1,t=this.buffer[e];"\r"===t&&(t=this.buffer[--e]);const s=e;for(;" "===t;)t=this.buffer[--e];if(!("\n"===t&&e>=this.pos&&e+1+r>s))break;n=e}return yield e.SCALAR,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let r,o=this.pos-1,i=this.pos-1;for(;r=this.buffer[++i];)if(":"===r){const e=this.buffer[i+1];if(t(e)||n&&s.has(e))break;o=i}else if(t(r)){let e=this.buffer[i+1];if("\r"===r&&("\n"===e?(i+=1,r="\n",e=this.buffer[i+1]):o=i),"#"===e||n&&s.has(e))break;if("\n"===r){const e=this.continueScalar(i+1);if(-1===e)break;i=Math.max(i,e-2)}}else{if(n&&s.has(r))break;o=i}return r||this.atEnd?(yield e.SCALAR,yield*this.pushToIndex(o+1,!0),n?"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){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(i))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(t(n)||e&&s.has(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,n=this.buffer[e];for(;!t(n)&&">"!==n;)n=this.buffer[++e];return yield*this.pushToIndex(">"===n?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(r.has(t))t=this.buffer[++e];else{if("%"!==t||!n.has(this.buffer[e+1])||!n.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const 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"===t);const r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},CD}var PD,TD={};function xD(){if(PD)return TD;PD=1;return TD.LineCounter=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){const r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(0===t)return{line:0,col:e};return{line:t,col:e-this.lineStarts[t-1]+1}}}},TD}var ND,$D={};function LD(){if(ND)return $D;ND=1;var e=w,t=kD(),n=OD();function r(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function s(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 o(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 i(e){switch(e.type){case"document":return e.start;case"block-map":{const 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 a(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(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function c(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||r(t.start,"explicit-key-ind")||r(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,o(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}return $D.Parser=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new n.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(n){if(this.source=n,e.env.LOG_TOKENS&&console.log("|",t.prettyToken(n)),this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=n.length);const r=t.tokenType(n);if(r)if("scalar"===r)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+n.length);break;case"space":this.atNewLine&&" "===n[0]&&(this.indent+=n.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=n.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=n.length}else{const e=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:e,source:n}),this.offset+=n.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(){const e=this.peek(1);if("doc-end"!==this.type||"doc-end"===e?.type){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()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const 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&&c(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const n=e.items[e.items.length-1];if(n.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!n.sep)return Object.assign(n,{key:t,sep:[]}),void(this.onKeyLine=!n.explicitKey);n.value=t;break}case"block-seq":{const n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{const n=e.items[e.items.length-1];return void(!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]}))}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)){const n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&-1===s(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{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}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":return void(-1!==s(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){const t=a(i(this.peek(2)));let n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];const r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);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){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.type?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)){const n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const n=!this.onKeyLine&&this.indent===e.indent,s=n&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let i=[];if(s&&t.sep&&!t.value){const n=[];for(let r=0;r<t.sep.length;++r){const s=t.sep[r];switch(s.type){case"newline":n.push(r);break;case"space":break;case"comment":s.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":return void(s||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?s||t.value?(i.push(this.sourceToken),e.items.push({start:i,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),void(this.onKeyLine=!0);case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(r(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(o(t.key)&&!r(t.sep,"newline")){const e=a(t.start),n=t.key,r=t.sep;r.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:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else if(r(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=a(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||s?e.items.push({start:i,key:null,sep:[this.sourceToken]}):r(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]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(s||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0))}default:{const s=this.startBlockValue(e);if(s){if("block-seq"===s.type){if(!t.explicitKey&&t.sep&&!r(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:i});return void this.stack.push(s)}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.type?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)){const n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||r(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while("flow-collection"===e?.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const 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))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const n=a(i(t));c(e);const r=e.end.splice(1,e.end.length);r.push(this.sourceToken);const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}}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;const t=a(i(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;const t=a(i(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())}}},$D}var RD,FD,ID={};function jD(){if(RD)return ID;RD=1;var e=dD(),t=yv(),n=Dv(),r=zy(),s=qg(),o=xD(),i=LD();function a(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new o.LineCounter||null,prettyErrors:t}}function c(t,r={}){const{lineCounter:s,prettyErrors:o}=a(r),c=new i.Parser(s?.addNewLine),u=new e.Composer(r);let l=null;for(const e of u.compose(c.parse(t),!0,t.length))if(l){if("silent"!==l.options.logLevel){l.errors.push(new n.YAMLParseError(e.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else l=e;return o&&s&&(l.errors.forEach(n.prettifyError(t,s)),l.warnings.forEach(n.prettifyError(t,s))),l}return ID.parse=function(e,t,n){let s;"function"==typeof t?s=t:void 0===n&&t&&"object"==typeof t&&(n=t);const o=c(e,n);if(!o)return null;if(o.warnings.forEach(e=>r.warn(o.options.logLevel,e)),o.errors.length>0){if("silent"!==o.options.logLevel)throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:s},n))},ID.parseAllDocuments=function(t,r={}){const{lineCounter:s,prettyErrors:o}=a(r),c=new i.Parser(s?.addNewLine),u=new e.Composer(r),l=Array.from(u.compose(c.parse(t)));if(o&&s)for(const e of l)e.errors.forEach(n.prettifyError(t,s)),e.warnings.forEach(n.prettifyError(t,s));return l.length>0?l:Object.assign([],{empty:!0},u.streamInfo())},ID.parseDocument=c,ID.stringify=function(e,n,r){let o=null;if("function"==typeof n||Array.isArray(n)?o=n:void 0===r&&n&&(r=n),"string"==typeof r&&(r=r.length),"number"==typeof r){const e=Math.round(r);r=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=r??n??{};if(!e)return}return s.isDocument(e)&&!o?e.toString(r):new t.Document(e,o,r).toString(r)},ID}var MD=function(){if(FD)return zg;FD=1;var e=dD(),t=yv(),n=pv(),r=Dv(),s=py(),o=qg(),i=Gy(),a=vy(),c=rb(),u=ub(),l=kD(),f=OD(),p=xD(),d=LD(),h=jD(),m=Wg();return zg.Composer=e.Composer,zg.Document=t.Document,zg.Schema=n.Schema,zg.YAMLError=r.YAMLError,zg.YAMLParseError=r.YAMLParseError,zg.YAMLWarning=r.YAMLWarning,zg.Alias=s.Alias,zg.isAlias=o.isAlias,zg.isCollection=o.isCollection,zg.isDocument=o.isDocument,zg.isMap=o.isMap,zg.isNode=o.isNode,zg.isPair=o.isPair,zg.isScalar=o.isScalar,zg.isSeq=o.isSeq,zg.Pair=i.Pair,zg.Scalar=a.Scalar,zg.YAMLMap=c.YAMLMap,zg.YAMLSeq=u.YAMLSeq,zg.CST=l,zg.Lexer=f.Lexer,zg.LineCounter=p.LineCounter,zg.Parser=d.Parser,zg.parse=h.parse,zg.parseAllDocuments=h.parseAllDocuments,zg.parseDocument=h.parseDocument,zg.stringify=h.stringify,zg.visit=m.visit,zg.visitAsync=m.visitAsync,zg}(),BD=Mg(MD);const zD=(e,t)=>e.endsWith(".json")?JSON.parse(t):BD.parse(t),HD=(e,t)=>{if((()=>{try{return"1"===process.env.STAN_DEBUG}catch{return!1}})())try{console.error(`stan: debug: fallback: ${e}: ${t}`)}catch{}},KD=e=>{try{"function"==typeof Ig&&Ig(e)}catch{}},UD=(e,t)=>{const n=e&&"object"==typeof e?e:{};let r;try{if(!("function"==typeof Fg.parse)){const e=n.scripts,t=e&&"object"==typeof e?e:{};KD(t);const r=n.patchOpenCommand,s="string"==typeof r&&r.length>0?r:ve;return{scripts:t,cliDefaults:n.cliDefaults,patchOpenCommand:s,maxUndos:n.maxUndos,devMode:n.devMode}}r=Fg.parse(n)}catch(e){const n=t.replace(/\\/g,"/");throw new Error(`stan-cli: invalid config in ${n}\n${(e=>e instanceof fm?e.issues.map(e=>`${e.path.join(".")||"(root)"}: ${e.message}`).join("\n"):String(e))(e)}`)}return KD(r.scripts),{scripts:r.scripts,cliDefaults:r.cliDefaults,patchOpenCommand:"string"==typeof r.patchOpenCommand&&r.patchOpenCommand.length>0?r.patchOpenCommand:ve,maxUndos:r.maxUndos,devMode:r.devMode}},qD=e=>{const t=Ee(e);if(!t)return{scripts:{},patchOpenCommand:ve};const n=r(t,"utf8"),s=zD(t,n),o=s&&"object"==typeof s?s:{};if(o["stan-cli"]&&"object"==typeof o["stan-cli"])return UD(o["stan-cli"],t);const i=(e=>{const t=["scripts","cliDefaults","patchOpenCommand","maxUndos","devMode"],n={};for(const r of t)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n})(o);if(Object.keys(i).length>0){if(!(()=>{try{const e=process.env.STAN_ACCEPT_LEGACY,t=("string"==typeof e?e:"").trim().toLowerCase();return"1"===t||"true"===t}catch{return!1}})()){const e=t.replace(/\\/g,"/");throw new Error([`stan-cli: legacy configuration detected in ${e} (missing top-level "stan-cli").`,'Run "stan init" to migrate your config (a .bak is written next to the file),',"or set STAN_ACCEPT_LEGACY=1 to temporarily accept legacy keys during the transition."].join(" "))}return HD("cli.config:loadSync",`using legacy top-level CLI keys from ${t.replace(/\\/g,"/")}; run "stan init" to migrate`),Object.prototype.hasOwnProperty.call(o,"stan-core")||HD("run.action:engine-legacy",`detected legacy root keys (no "stan-core") in ${t.replace(/\\/g,"/")}`),UD(i,t)}return{scripts:{},patchOpenCommand:ve}},JD=e=>{try{const t=qD(e);let n=Object.keys(t.scripts);if(!n.length)try{const t=(e=>{try{const t=Ee(e??process.cwd());if(!t)return{};const n=r(t,"utf8"),s=zD(t,n);return s&&"object"==typeof s?s:{}}catch{return{}}})(e),s=(e=>{const t=e["stan-cli"];return t&&"object"==typeof t?t:null})(t),o=(s&&"object"==typeof s.scripts?s.scripts:t.scripts)??{};n=Object.keys((e=>{const t={};if(!e||"object"!=typeof e)return t;for(const[n,r]of Object.entries(e))"string"==typeof r&&r.trim().length?t[n]=r:r&&"object"==typeof r&&"string"==typeof r.script&&(t[n]=String(r.script));return t})(o))}catch{}if(!n.length)return"";const s=n[0]||"lint";return["","Default: runs all scripts and writes archives.","","Available script keys:",` ${n.join(", ")}`,"","Examples:"," stan run # all scripts, with archives",` stan run -s ${s}`,` stan run -q -x ${s}`," stan run -A # no archives"," stan run -S -A -p # plan only, no scripts, no archives",` stan run -c -s ${s}`,""].join("\n")}catch(e){return"1"===process.env.STAN_DEBUG&&console.error("stan: unable to load config for help footer",e),""}},ZD=()=>new Promise(e=>setImmediate(e)),GD=(e=0)=>t=>`[${t+e}m`,WD=(e=0)=>t=>`[${38+e};5;${t}m`,VD=(e=0)=>(t,n,r)=>`[${38+e};2;${t};${n};${r}m`,YD={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(YD.modifier);Object.keys(YD.color),Object.keys(YD.bgColor);const QD=function(){const e=new Map;for(const[t,n]of Object.entries(YD)){for(const[t,r]of Object.entries(n))YD[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=YD[t],e.set(r[0],r[1]);Object.defineProperty(YD,t,{value:n,enumerable:!1})}return Object.defineProperty(YD,"codes",{value:e,enumerable:!1}),YD.color.close="[39m",YD.bgColor.close="[49m",YD.color.ansi=GD(),YD.color.ansi256=WD(),YD.color.ansi16m=VD(),YD.bgColor.ansi=GD(10),YD.bgColor.ansi256=WD(10),YD.bgColor.ansi16m=VD(10),Object.defineProperties(YD,{rgbToAnsi256:{value:(e,t,n)=>e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value(e){const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;3===n.length&&(n=[...n].map(e=>e+e).join(""));const r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},enumerable:!1},hexToAnsi256:{value:e=>YD.rgbToAnsi256(...YD.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return e-8+90;let t,n,r;if(e>=232)t=(10*(e-232)+8)/255,n=t,r=t;else{const s=(e-=16)%36;t=Math.floor(e/36)/5,n=Math.floor(s/6)/5,r=s%6/5}const s=2*Math.max(t,n,r);if(0===s)return 30;let o=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return 2===s&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>YD.ansi256ToAnsi(YD.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>YD.ansi256ToAnsi(YD.hexToAnsi256(e)),enumerable:!1}}),YD}();function XD(e,t=(globalThis.Deno?globalThis.Deno.args:v.argv)){const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),s=t.indexOf("--");return-1!==r&&(-1===s||r<s)}const{env:ew}=v;let tw;function nw(e,{streamIsTTY:t,sniffFlags:n=!0}={}){const r=function(){if("FORCE_COLOR"in ew)return"true"===ew.FORCE_COLOR?1:"false"===ew.FORCE_COLOR?0:0===ew.FORCE_COLOR.length?1:Math.min(Number.parseInt(ew.FORCE_COLOR,10),3)}();void 0!==r&&(tw=r);const s=n?tw:r;if(0===s)return 0;if(n){if(XD("color=16m")||XD("color=full")||XD("color=truecolor"))return 3;if(XD("color=256"))return 2}if("TF_BUILD"in ew&&"AGENT_NAME"in ew)return 1;if(e&&!t&&void 0===s)return 0;const o=s||0;if("dumb"===ew.TERM)return o;if("win32"===v.platform){const e=x.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in ew)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(e=>e in ew)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(e=>e in ew)||"codeship"===ew.CI_NAME?1:o;if("TEAMCITY_VERSION"in ew)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ew.TEAMCITY_VERSION)?1:0;if("truecolor"===ew.COLORTERM)return 3;if("xterm-kitty"===ew.TERM)return 3;if("xterm-ghostty"===ew.TERM)return 3;if("wezterm"===ew.TERM)return 3;if("TERM_PROGRAM"in ew){const e=Number.parseInt((ew.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ew.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ew.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ew.TERM)||"COLORTERM"in ew?1:o}function rw(e,t={}){return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(nw(e,{streamIsTTY:e&&e.isTTY,...t}))}XD("no-color")||XD("no-colors")||XD("color=false")||XD("color=never")?tw=0:(XD("color")||XD("colors")||XD("color=true")||XD("color=always"))&&(tw=1);const sw={stdout:rw({isTTY:N.isatty(1)}),stderr:rw({isTTY:N.isatty(2)})};function ow(e,t,n){let r=e.indexOf(t);if(-1===r)return e;const s=t.length;let o=0,i="";do{i+=e.slice(o,r)+t+n,o=r+s,r=e.indexOf(t,o)}while(-1!==r);return i+=e.slice(o),i}const{stdout:iw,stderr:aw}=sw,cw=Symbol("GENERATOR"),uw=Symbol("STYLER"),lw=Symbol("IS_EMPTY"),fw=["ansi","ansi","ansi256","ansi16m"],pw=Object.create(null),dw=e=>{const t=(...e)=>e.join(" ");return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const n=iw?iw.level:0;e.level=void 0===t.level?n:t.level})(t,e),Object.setPrototypeOf(t,hw.prototype),t};function hw(e){return dw(e)}Object.setPrototypeOf(hw.prototype,Function.prototype);for(const[e,t]of Object.entries(QD))pw[e]={get(){const n=vw(this,bw(t.open,t.close,this[uw]),this[lw]);return Object.defineProperty(this,e,{value:n}),n}};pw.visible={get(){const e=vw(this,this[uw],!0);return Object.defineProperty(this,"visible",{value:e}),e}};const mw=(e,t,n,...r)=>"rgb"===e?"ansi16m"===t?QD[n].ansi16m(...r):"ansi256"===t?QD[n].ansi256(QD.rgbToAnsi256(...r)):QD[n].ansi(QD.rgbToAnsi(...r)):"hex"===e?mw("rgb",t,n,...QD.hexToRgb(...r)):QD[n][e](...r),gw=["rgb","hex","ansi256"];for(const e of gw){pw[e]={get(){const{level:t}=this;return function(...n){const r=bw(mw(e,fw[t],"color",...n),QD.color.close,this[uw]);return vw(this,r,this[lw])}}};pw["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...n){const r=bw(mw(e,fw[t],"bgColor",...n),QD.bgColor.close,this[uw]);return vw(this,r,this[lw])}}}}const yw=Object.defineProperties(()=>{},{...pw,level:{enumerable:!0,get(){return this[cw].level},set(e){this[cw].level=e}}}),bw=(e,t,n)=>{let r,s;return void 0===n?(r=e,s=t):(r=n.openAll+e,s=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:s,parent:n}},vw=(e,t,n)=>{const r=(...e)=>Dw(r,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(r,yw),r[cw]=e,r[uw]=t,r[lw]=n,r},Dw=(e,t)=>{if(e.level<=0||!t)return e[lw]?"":t;let n=e[uw];if(void 0===n)return t;const{openAll:r,closeAll:s}=n;if(t.includes(""))for(;void 0!==n;)t=ow(t,n.close,n.open),n=n.parent;const o=t.indexOf("\n");return-1!==o&&(t=function(e,t,n,r){let s=0,o="";do{const i="\r"===e[r-1];o+=e.slice(s,i?r-1:r)+t+(i?"\r\n":"\n")+n,s=r+1,r=e.indexOf("\n",s)}while(-1!==r);return o+=e.slice(s),o}(t,s,r,o)),r+t+s};Object.defineProperties(hw.prototype,pw);const ww=hw();function _w(){const e=Boolean(process.stdout.isTTY);return"1"===process.env.STAN_BORING||"1"===process.env.NO_COLOR||"0"===process.env.FORCE_COLOR||!e}function Sw(e){return _w()?e:ww.green(e)}function Ew(e){return _w()?e:ww.cyan(e)}function kw(e){return _w()?e:ww.blue(e)}function Aw(e){return _w()?e:ww.red(e)}function Cw(e){return _w()?e:ww.black(e)}function Ow(e){return _w()?e:ww.gray(e)}function Pw(e){return _w()?e:ww.hex("#FFA500")(e)}function Tw(e){return _w()?e:ww.bold(e)}function xw(e){return _w()?e:ww.dim(e)}hw({level:aw?aw.level:0});const Nw=(e,t)=>{const{selection:n,config:r,mode:s,behavior:o}=t,i=null==n?Object.keys(r.scripts):n,a=d.join(r.stanPath,"output").replace(/\\/g,"/");return`stan:\n ${[_w()?"STAN run plan":Tw("STAN run plan"),"mode: "+("sequential"===s?"sequential":"concurrent"),`output: ${a}/`,..."string"==typeof o.prompt&&o.prompt.trim().length?[`prompt: ${o.prompt}`]:[],`scripts: ${i.length?i.join(", "):"none"}`,"archive: "+(o.archive?"yes":"no"),"combine: "+(o.combine?"yes":"no"),"keep output dir: "+(o.keep?"yes":"no"),"live: "+(o.live?"yes":"no"),`hang warn: ${"number"==typeof o.hangWarn?o.hangWarn.toString():"n/a"}s`,`hang kill: ${"number"==typeof o.hangKill?o.hangKill.toString():"n/a"}s`,`hang kill grace: ${"number"==typeof o.hangKillGrace?o.hangKillGrace.toString():"n/a"}s`,...Array.isArray(r.overlayPlan)&&r.overlayPlan.length?["facet view:",...r.overlayPlan.map(e=>` ${e}`)]:[]].join("\n ")}`};var $w,Lw,Rw,Fw,Iw={},jw={},Mw={},Bw={},zw={exports:{}};function Hw(){return Lw?$w:(Lw=1,$w=({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")})}function Kw(){if(Fw)return Rw;Fw=1;const e=Hw();return Rw=t=>"string"==typeof t?t.replace(e(),""):t,Rw}var Uw,qw,Jw,Zw,Gw={exports:{}};function Ww(){if(Uw)return Gw.exports;Uw=1;const e=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));return Gw.exports=e,Gw.exports.default=e,Gw.exports}function Vw(){return Jw?qw:(Jw=1,qw=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g})}function Yw(){if(Zw)return zw.exports;Zw=1;const e=Kw(),t=Ww(),n=Vw(),r=r=>{if("string"!=typeof r||0===r.length)return 0;if(0===(r=e(r)).length)return 0;r=r.replace(n()," ");let s=0;for(let e=0;e<r.length;e++){const n=r.codePointAt(e);n<=31||n>=127&&n<=159||(n>=768&&n<=879||(n>65535&&e++,s+=t(n)?2:1))}return s};return zw.exports=r,zw.exports.default=r,zw.exports}var Qw,Xw,e_={};var t_,n_,r_,s_,o_,i_,a_,c_,u_,l_,f_,p_={exports:{}};function d_(){if(s_)return r_;s_=1;const e=n_?t_:(n_=1,t_={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),t={};for(const n of Object.keys(e))t[e[n]]=n;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};r_=n;for(const e of Object.keys(n)){if(!("channels"in n[e]))throw new Error("missing channels property: "+e);if(!("labels"in n[e]))throw new Error("missing channel labels property: "+e);if(n[e].labels.length!==n[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=n[e];delete n[e].channels,delete n[e].labels,Object.defineProperty(n[e],"channels",{value:t}),Object.defineProperty(n[e],"labels",{value:r})}function r(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}return n.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,s=Math.min(t,n,r),o=Math.max(t,n,r),i=o-s;let a,c;o===s?a=0:t===o?a=(n-r)/i:n===o?a=2+(r-t)/i:r===o&&(a=4+(t-n)/i),a=Math.min(60*a,360),a<0&&(a+=360);const u=(s+o)/2;return c=o===s?0:u<=.5?i/(o+s):i/(2-o-s),[a,100*c,100*u]},n.rgb.hsv=function(e){let t,n,r,s,o;const i=e[0]/255,a=e[1]/255,c=e[2]/255,u=Math.max(i,a,c),l=u-Math.min(i,a,c),f=function(e){return(u-e)/6/l+.5};return 0===l?(s=0,o=0):(o=l/u,t=f(i),n=f(a),r=f(c),i===u?s=r-n:a===u?s=1/3+t-r:c===u&&(s=2/3+n-t),s<0?s+=1:s>1&&(s-=1)),[360*s,100*o,100*u]},n.rgb.hwb=function(e){const t=e[0],r=e[1];let s=e[2];const o=n.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(r,s));return s=1-1/255*Math.max(t,Math.max(r,s)),[o,100*i,100*s]},n.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,s=Math.min(1-t,1-n,1-r);return[100*((1-t-s)/(1-s)||0),100*((1-n-s)/(1-s)||0),100*((1-r-s)/(1-s)||0),100*s]},n.rgb.keyword=function(n){const s=t[n];if(s)return s;let o,i=1/0;for(const t of Object.keys(e)){const s=r(n,e[t]);s<i&&(i=s,o=t)}return o},n.keyword.rgb=function(t){return e[t]},n.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let r=t[0],s=t[1],o=t[2];r/=95.047,s/=100,o/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;return[116*s-16,500*(r-s),200*(s-o)]},n.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let s,o,i;if(0===n)return i=255*r,[i,i,i];s=r<.5?r*(1+n):r+n-r*n;const a=2*r-s,c=[0,0,0];for(let e=0;e<3;e++)o=t+1/3*-(e-1),o<0&&o++,o>1&&o--,i=6*o<1?a+6*(s-a)*o:2*o<1?s:3*o<2?a+(s-a)*(2/3-o)*6:a,c[e]=255*i;return c},n.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,s=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,s*=o<=1?o:2-o;return[t,100*(0===r?2*s/(o+s):2*n/(r+n)),100*((r+n)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const s=Math.floor(t)%6,o=t-Math.floor(t),i=255*r*(1-n),a=255*r*(1-n*o),c=255*r*(1-n*(1-o));switch(r*=255,s){case 0:return[r,c,i];case 1:return[a,r,i];case 2:return[i,r,c];case 3:return[i,a,r];case 4:return[c,i,r];case 5:return[r,i,a]}},n.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,s=Math.max(r,.01);let o,i;i=(2-n)*r;const a=(2-n)*s;return o=n*s,o/=a<=1?a:2-a,o=o||0,i/=2,[t,100*o,100*i]},n.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const s=n+r;let o;s>1&&(n/=s,r/=s);const i=Math.floor(6*t),a=1-r;o=6*t-i,1&i&&(o=1-o);const c=n+o*(a-n);let u,l,f;switch(i){default:case 6:case 0:u=a,l=c,f=n;break;case 1:u=c,l=a,f=n;break;case 2:u=n,l=a,f=c;break;case 3:u=n,l=c,f=a;break;case 4:u=c,l=n,f=a;break;case 5:u=a,l=n,f=c}return[255*u,255*l,255*f]},n.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,s=e[3]/100;return[255*(1-Math.min(1,t*(1-s)+s)),255*(1-Math.min(1,n*(1-s)+s)),255*(1-Math.min(1,r*(1-s)+s))]},n.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let s,o,i;return s=3.2406*t+-1.5372*n+-.4986*r,o=-.9689*t+1.8758*n+.0415*r,i=.0557*t+-.204*n+1.057*r,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),[255*s,255*o,255*i]},n.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},n.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const s=n**3,o=t**3,i=r**3;return n=s>.008856?s:(n-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,r=i>.008856?i:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},n.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let s;s=360*Math.atan2(r,n)/2/Math.PI,s<0&&(s+=360);return[t,Math.sqrt(n*n+r*r),s]},n.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},n.rgb.ansi16=function(e,t=null){const[r,s,o]=e;let i=null===t?n.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),0===i)return 30;let a=30+(Math.round(o/255)<<2|Math.round(s/255)<<1|Math.round(r/255));return 2===i&&(a+=60),a},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t===n&&n===r)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map(e=>e+e).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},n.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,s=Math.max(Math.max(t,n),r),o=Math.min(Math.min(t,n),r),i=s-o;let a,c;return a=i<1?o/(1-i):0,c=i<=0?0:s===t?(n-r)/i%6:s===n?2+(r-t)/i:4+(t-n)/i,c/=6,c%=1,[360*c,100*i,100*a]},n.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let s=0;return r<1&&(s=(n-.5*r)/(1-r)),[e[0],100*r,100*s]},n.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let s=0;return r<1&&(s=(n-r)/(1-r)),[e[0],100*r,100*s]},n.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const s=[0,0,0],o=t%1*6,i=o%1,a=1-i;let c=0;switch(Math.floor(o)){case 0:s[0]=1,s[1]=i,s[2]=0;break;case 1:s[0]=a,s[1]=1,s[2]=0;break;case 2:s[0]=0,s[1]=1,s[2]=i;break;case 3:s[0]=0,s[1]=a,s[2]=1;break;case 4:s[0]=i,s[1]=0,s[2]=1;break;default:s[0]=1,s[1]=0,s[2]=a}return c=(1-n)*r,[255*(n*s[0]+c),255*(n*s[1]+c),255*(n*s[2]+c)]},n.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},n.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},n.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},n.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let s=0;return r<1&&(s=(n-r)/(1-r)),[e[0],100*r,100*s]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},r_}function h_(){if(i_)return o_;i_=1;const e=d_();function t(t){const n=function(){const t={},n=Object.keys(e);for(let e=n.length,r=0;r<e;r++)t[n[r]]={distance:-1,parent:null};return t}(),r=[t];for(n[t].distance=0;r.length;){const t=r.pop(),s=Object.keys(e[t]);for(let e=s.length,o=0;o<e;o++){const e=s[o],i=n[e];-1===i.distance&&(i.distance=n[t].distance+1,i.parent=t,r.unshift(e))}}return n}function n(e,t){return function(n){return t(e(n))}}function r(t,r){const s=[r[t].parent,t];let o=e[r[t].parent][t],i=r[t].parent;for(;r[i].parent;)s.unshift(r[i].parent),o=n(e[r[i].parent][i],o),i=r[i].parent;return o.conversion=s,o}return o_=function(e){const n=t(e),s={},o=Object.keys(n);for(let e=o.length,t=0;t<e;t++){const e=o[t];null!==n[e].parent&&(s[e]=r(e,n))}return s},o_}function m_(){if(c_)return a_;c_=1;const e=d_(),t=h_(),n={};return Object.keys(e).forEach(r=>{n[r]={},Object.defineProperty(n[r],"channels",{value:e[r].channels}),Object.defineProperty(n[r],"labels",{value:e[r].labels});const s=t(r);Object.keys(s).forEach(e=>{const t=s[e];n[r][e]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(t),n[r][e].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)})}),a_=n}function g_(){return u_||(u_=1,function(e){const t=(e,t)=>(...n)=>`[${e(...n)+t}m`,n=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};5;${r}m`},r=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};2;${r[0]};${r[1]};${r[2]}m`},s=e=>e,o=(e,t,n)=>[e,t,n],i=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{const r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})};let a;const c=(e,t,n,r)=>{void 0===a&&(a=m_());const s=r?10:0,o={};for(const[r,i]of Object.entries(a)){const a="ansi16"===r?"ansi":r;r===t?o[a]=e(n,s):"object"==typeof i&&(o[a]=e(i[t],s))}return o};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,a={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};a.color.gray=a.color.blackBright,a.bgColor.bgGray=a.bgColor.bgBlackBright,a.color.grey=a.color.blackBright,a.bgColor.bgGrey=a.bgColor.bgBlackBright;for(const[t,n]of Object.entries(a)){for(const[t,r]of Object.entries(n))a[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=a[t],e.set(r[0],r[1]);Object.defineProperty(a,t,{value:n,enumerable:!1})}return Object.defineProperty(a,"codes",{value:e,enumerable:!1}),a.color.close="[39m",a.bgColor.close="[49m",i(a.color,"ansi",()=>c(t,"ansi16",s,!1)),i(a.color,"ansi256",()=>c(n,"ansi256",s,!1)),i(a.color,"ansi16m",()=>c(r,"rgb",o,!1)),i(a.bgColor,"ansi",()=>c(t,"ansi16",s,!0)),i(a.bgColor,"ansi256",()=>c(n,"ansi256",s,!0)),i(a.bgColor,"ansi16m",()=>c(r,"rgb",o,!0)),a}})}(p_)),p_.exports}function y_(){if(f_)return l_;f_=1;const e=Ww(),t=function(){if(Xw)return Qw;Xw=1;const e="[\ud800-\udbff][\udc00-\udfff]";return Qw=t=>t&&t.exact?new RegExp(`^${e}$`):new RegExp(e,"g")}(),n=g_(),r=["",""],s=e=>`${r[0]}[${e}m`,o=(e,t,r)=>{let o=[];e=[...e];for(let r of e){const i=r;r.includes(";")&&(r=r.split(";")[0][0]+"0");const a=n.codes.get(Number.parseInt(r,10));if(a){const n=e.indexOf(a.toString());-1===n?o.push(s(t?a:i)):e.splice(n,1)}else{if(t){o.push(s(0));break}o.push(s(i))}}if(t&&(o=o.filter((e,t)=>o.indexOf(e)===t),void 0!==r)){const e=s(n.codes.get(Number.parseInt(r,10)));o=o.reduce((t,n)=>n===e?[n,...t]:[...t,n],[])}return o.join("")};return l_=(n,s,i)=>{const a=[...n],c=[];let u,l="number"==typeof i?i:a.length,f=!1,p=0,d="";for(const[h,m]of a.entries()){let a=!1;if(r.includes(m)){const e=/\d[^m]*/.exec(n.slice(h,h+18));u=e&&e.length>0?e[0]:void 0,p<l&&(f=!0,void 0!==u&&c.push(u))}else f&&"m"===m&&(f=!1,a=!0);if(f||a||p++,!t({exact:!0}).test(m)&&e(m.codePointAt())&&(p++,"number"!=typeof i&&l++),p>s&&p<=l)d+=m;else if(p!==s||f||void 0===u){if(p>=l){d+=o(c,!0,u);break}}else d=o(c)}return d},l_}var b_,v_,D_,w_,__={};function S_(){if(b_)return __;b_=1,Object.defineProperty(__,"__esModule",{value:!0}),__.getBorderCharacters=void 0;return __.getBorderCharacters=e=>{if("honeywell"===e)return{topBody:"═",topJoin:"╤",topLeft:"╔",topRight:"╗",bottomBody:"═",bottomJoin:"╧",bottomLeft:"╚",bottomRight:"╝",bodyLeft:"║",bodyRight:"║",bodyJoin:"│",headerJoin:"┬",joinBody:"─",joinLeft:"╟",joinRight:"╢",joinJoin:"┼",joinMiddleDown:"┬",joinMiddleUp:"┴",joinMiddleLeft:"┤",joinMiddleRight:"├"};if("norc"===e)return{topBody:"─",topJoin:"┬",topLeft:"┌",topRight:"┐",bottomBody:"─",bottomJoin:"┴",bottomLeft:"└",bottomRight:"┘",bodyLeft:"│",bodyRight:"│",bodyJoin:"│",headerJoin:"┬",joinBody:"─",joinLeft:"├",joinRight:"┤",joinJoin:"┼",joinMiddleDown:"┬",joinMiddleUp:"┴",joinMiddleLeft:"┤",joinMiddleRight:"├"};if("ramac"===e)return{topBody:"-",topJoin:"+",topLeft:"+",topRight:"+",bottomBody:"-",bottomJoin:"+",bottomLeft:"+",bottomRight:"+",bodyLeft:"|",bodyRight:"|",bodyJoin:"|",headerJoin:"+",joinBody:"-",joinLeft:"|",joinRight:"|",joinJoin:"|",joinMiddleDown:"+",joinMiddleUp:"+",joinMiddleLeft:"+",joinMiddleRight:"+"};if("void"===e)return{topBody:"",topJoin:"",topLeft:"",topRight:"",bottomBody:"",bottomJoin:"",bottomLeft:"",bottomRight:"",bodyLeft:"",bodyRight:"",bodyJoin:"",headerJoin:"",joinBody:"",joinLeft:"",joinRight:"",joinJoin:"",joinMiddleDown:"",joinMiddleUp:"",joinMiddleLeft:"",joinMiddleRight:""};throw new Error('Unknown border template "'+e+'".')},__}function E_(){if(v_)return e_;v_=1;var e=e_&&e_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e_,"__esModule",{value:!0}),e_.isCellInRange=e_.areCellEqual=e_.calculateRangeCoordinate=e_.flatten=e_.extractTruncates=e_.sumArray=e_.sequence=e_.distributeUnevenly=e_.countSpaceSequence=e_.groupBySizes=e_.makeBorderConfig=e_.splitAnsi=e_.normalizeString=void 0;const t=e(y_()),n=e(Yw()),r=e(Kw()),s=S_();e_.normalizeString=e=>e.replace(/\r\n/g,"\n");e_.splitAnsi=e=>{const s=(0,r.default)(e).split("\n").map(n.default),o=[];let i=0;return s.forEach(n=>{o.push(0===n?"":(0,t.default)(e,i,i+n)),i+=n+1}),o};e_.makeBorderConfig=e=>({...(0,s.getBorderCharacters)("honeywell"),...e});e_.groupBySizes=(e,t)=>{let n=0;return t.map(t=>{const r=e.slice(n,n+t);return n+=t,r})};e_.countSpaceSequence=e=>{var t,n;return null!==(n=null===(t=e.match(/\s+/g))||void 0===t?void 0:t.length)&&void 0!==n?n:0};e_.distributeUnevenly=(e,t)=>Array.from({length:t}).fill(Math.floor(e/t)).map((n,r)=>n+(r<e%t?1:0));e_.sequence=(e,t)=>Array.from({length:t-e+1},(t,n)=>n+e);e_.sumArray=e=>e.reduce((e,t)=>e+t,0);e_.extractTruncates=e=>e.columns.map(({truncate:e})=>e);e_.flatten=e=>[].concat(...e);e_.calculateRangeCoordinate=e=>{const{row:t,col:n,colSpan:r=1,rowSpan:s=1}=e;return{bottomRight:{col:n+r-1,row:t+s-1},topLeft:{col:n,row:t}}};e_.areCellEqual=(e,t)=>e.row===t.row&&e.col===t.col;return e_.isCellInRange=(e,{topLeft:t,bottomRight:n})=>t.row<=e.row&&e.row<=n.row&&t.col<=e.col&&e.col<=n.col,e_}function k_(){if(D_)return Bw;D_=1;var e=Bw&&Bw.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Bw,"__esModule",{value:!0}),Bw.alignString=void 0;const t=e(Yw()),n=E_(),r=(e,t)=>e+" ".repeat(t);return Bw.alignString=(e,s,o)=>{const i=(0,t.default)(e);if(i===s)return e;if(i>s)throw new Error("Subject parameter value width cannot be greater than the container width.");if(0===i)return" ".repeat(s);const a=s-i;return"left"===o?r(e,a):"right"===o?((e,t)=>" ".repeat(t)+e)(e,a):"justify"===o?((e,t)=>{const s=(0,n.countSpaceSequence)(e);if(0===s)return r(e,t);const o=(0,n.distributeUnevenly)(t,s);if(Math.max(...o)>3)return r(e,t);let i=0;return e.replace(/\s+/g,e=>e+" ".repeat(o[i++]))})(e,a):((e,t)=>" ".repeat(Math.floor(t/2))+e+" ".repeat(Math.ceil(t/2)))(e,a)},Bw}function A_(){if(w_)return Mw;w_=1,Object.defineProperty(Mw,"__esModule",{value:!0}),Mw.alignTableData=void 0;const e=k_();return Mw.alignTableData=(t,n)=>t.map((t,r)=>t.map((t,s)=>{var o;const{width:i,alignment:a}=n.columns[s];return(null===(o=n.spanningCellManager)||void 0===o?void 0:o.getContainingRange({col:s,row:r},{mapped:!0}))?t:(0,e.alignString)(t,i,a)})),Mw}var C_,O_={},P_={},T_={},x_={};function N_(){if(C_)return x_;C_=1;var e=x_&&x_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(x_,"__esModule",{value:!0}),x_.wrapString=void 0;const t=e(y_()),n=e(Yw());return x_.wrapString=(e,r)=>{let s=e;const o=[];do{o.push((0,t.default)(s,0,r)),s=(0,t.default)(s,r).trim()}while((0,n.default)(s));return o},x_}var $_,L_,R_,F_,I_={};function j_(){if($_)return I_;$_=1;var e=I_&&I_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(I_,"__esModule",{value:!0}),I_.wrapWord=void 0;const t=e(y_()),n=e(Kw());return I_.wrapWord=(e,r)=>{const s=[];let o=0;return((e,t)=>{let r=(0,n.default)(e);const s=[],o=new RegExp("(^.{1,"+String(Math.max(t,1))+"}(\\s+|$))|(^.{1,"+String(Math.max(t-1,1))+"}(\\\\|/|_|\\.|,|;|-))");do{let e;const n=o.exec(r);if(n){e=n[0],r=r.slice(e.length);const t=e.trim().length,o=e.length-t;s.push([t,o])}else e=r.slice(0,t),r=r.slice(t),s.push([e.length,0])}while(r.length);return s})(e,r).forEach(([n,r])=>{s.push((0,t.default)(e,o,o+n)),o+=n+r}),s},I_}function M_(){if(L_)return T_;L_=1,Object.defineProperty(T_,"__esModule",{value:!0}),T_.wrapCell=void 0;const e=E_(),t=N_(),n=j_();return T_.wrapCell=(r,s,o)=>{const i=(0,e.splitAnsi)(r);for(let e=0;e<i.length;){let r;r=o?(0,n.wrapWord)(i[e],s):(0,t.wrapString)(i[e],s),i.splice(e,1,...r),e+=r.length}return i},T_}function B_(){if(R_)return P_;R_=1,Object.defineProperty(P_,"__esModule",{value:!0}),P_.calculateCellHeight=void 0;const e=M_();return P_.calculateCellHeight=(t,n,r=!1)=>(0,e.wrapCell)(t,n,r).length,P_}function z_(){if(F_)return O_;F_=1,Object.defineProperty(O_,"__esModule",{value:!0}),O_.calculateRowHeights=void 0;const e=B_(),t=E_();return O_.calculateRowHeights=(n,r)=>{const s=[];for(const[o,i]of n.entries()){let a=1;i.forEach((i,c)=>{var u;const l=null===(u=r.spanningCellManager)||void 0===u?void 0:u.getContainingRange({col:c,row:o});if(!l){const t=(0,e.calculateCellHeight)(i,r.columns[c].width,r.columns[c].wrapWord);return void(a=Math.max(a,t))}const{topLeft:f,bottomRight:p,height:d}=l;if(o===p.row){const e=(0,t.sumArray)(s.slice(f.row)),o=p.row-f.row,i=(0,t.sequence)(f.row+1,p.row).filter(e=>{var t;return!(null===(t=r.drawHorizontalLine)||void 0===t?void 0:t.call(r,e,n.length))}).length,c=d-e-o+i;a=Math.max(a,c)}}),s.push(a)}return s},O_}var H_,K_,U_={},q_={};function J_(){if(H_)return q_;H_=1,Object.defineProperty(q_,"__esModule",{value:!0}),q_.drawContent=void 0;return q_.drawContent=e=>{const{contents:t,separatorGetter:n,drawSeparator:r,spanningCellManager:s,rowIndex:o,elementType:i}=e,a=t.length,c=[];return r(0,a)&&c.push(n(0,a)),t.forEach((e,t)=>{if(i&&"border"!==i&&"row"!==i||c.push(e),"cell"===i&&void 0===o&&c.push(e),"cell"===i&&void 0!==o){const n=null==s?void 0:s.getContainingRange({col:t,row:o});n&&t!==n.topLeft.col||c.push(e)}if(t+1<a&&r(t+1,a)){const e=n(t+1,a);if("cell"===i&&void 0!==o){const n={col:t+1,row:o},r=null==s?void 0:s.getContainingRange(n);r&&r.topLeft.col!==n.col||c.push(e)}else c.push(e)}}),r(a,a)&&c.push(n(a,a)),c.join("")},q_}function Z_(){return K_||(K_=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createTableBorderGetter=e.drawBorderBottom=e.drawBorderJoin=e.drawBorderTop=e.drawBorder=e.createSeparatorGetter=e.drawBorderSegments=void 0;const t=J_();e.drawBorderSegments=(e,t)=>{const{separator:n,horizontalBorderIndex:r,spanningCellManager:s}=t;return e.map((e,t)=>{const o=n.body.repeat(e);if(void 0===r)return o;const i=null==s?void 0:s.getContainingRange({col:t,row:r});if(!i)return o;const{topLeft:a}=i;return r===a.row?o:t!==a.col?"":i.extractBorderContent(r)})};e.createSeparatorGetter=e=>{const{separator:t,spanningCellManager:n,horizontalBorderIndex:r,rowCount:s}=e;return(e,o)=>{const i=null==n?void 0:n.inSameRange;if(void 0!==r&&i){const n={col:e,row:r-1},a={col:e-1,row:r},c={col:e-1,row:r-1},u={col:e,row:r},l=[[c,n],[n,u],[u,a],[a,c]];if(0===e)return i(u,n)&&t.bodyJoinOuter?t.bodyJoinOuter:t.left;if(e===o)return i(c,a)&&t.bodyJoinOuter?t.bodyJoinOuter:t.right;if(0===r)return i(u,a)?t.body:t.join;if(r===s)return i(n,c)?t.body:t.join;const f=l.map(e=>i(...e)).filter(Boolean).length;if(0===f)return t.join;if(4===f)return"";if(2===f)return i(...l[1])&&i(...l[3])&&t.bodyJoinInner?t.bodyJoinInner:t.body;if(1===f){if(!(t.joinRight&&t.joinLeft&&t.joinUp&&t.joinDown))throw new Error(`Can not get border separator for position [${r}, ${e}]`);return i(...l[0])?t.joinDown:i(...l[1])?t.joinLeft:i(...l[2])?t.joinUp:t.joinRight}throw new Error("Invalid case")}return 0===e?t.left:e===o?t.right:t.join}};e.drawBorder=(n,r)=>{const s=(0,e.drawBorderSegments)(n,r),{drawVerticalLine:o,horizontalBorderIndex:i,spanningCellManager:a}=r;return(0,t.drawContent)({contents:s,drawSeparator:o,elementType:"border",rowIndex:i,separatorGetter:(0,e.createSeparatorGetter)(r),spanningCellManager:a})+"\n"};e.drawBorderTop=(t,n)=>{const{border:r}=n,s=(0,e.drawBorder)(t,{...n,separator:{body:r.topBody,join:r.topJoin,left:r.topLeft,right:r.topRight}});return"\n"===s?"":s};e.drawBorderJoin=(t,n)=>{const{border:r}=n;return(0,e.drawBorder)(t,{...n,separator:{body:r.joinBody,bodyJoinInner:r.bodyJoin,bodyJoinOuter:r.bodyLeft,join:r.joinJoin,joinDown:r.joinMiddleDown,joinLeft:r.joinMiddleLeft,joinRight:r.joinMiddleRight,joinUp:r.joinMiddleUp,left:r.joinLeft,right:r.joinRight}})};e.drawBorderBottom=(t,n)=>{const{border:r}=n;return(0,e.drawBorder)(t,{...n,separator:{body:r.bottomBody,join:r.bottomJoin,left:r.bottomLeft,right:r.bottomRight}})};e.createTableBorderGetter=(t,n)=>(r,s)=>{const o={...n,horizontalBorderIndex:r};return 0===r?(0,e.drawBorderTop)(t,o):r===s?(0,e.drawBorderBottom)(t,o):(0,e.drawBorderJoin)(t,o)}}(U_)),U_}var G_,W_={};function V_(){if(G_)return W_;G_=1,Object.defineProperty(W_,"__esModule",{value:!0}),W_.drawRow=void 0;const e=J_();return W_.drawRow=(t,n)=>{const{border:r,drawVerticalLine:s,rowIndex:o,spanningCellManager:i}=n;return(0,e.drawContent)({contents:t,drawSeparator:s,elementType:"cell",rowIndex:o,separatorGetter:(e,t)=>0===e?r.bodyLeft:e===t?r.bodyRight:r.bodyJoin,spanningCellManager:i})+"\n"},W_}var Y_,Q_,X_,eS,tS,nS,rS={},sS={},oS={},iS={};function aS(){if(X_)return iS;X_=1,Object.defineProperty(iS,"__esModule",{value:!0});const e=(Q_||(Q_=1,Y_=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,s,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(s=r;0!==s--;)if(!e(t[s],n[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(s=r;0!==s--;)if(!Object.prototype.hasOwnProperty.call(n,o[s]))return!1;for(s=r;0!==s--;){var i=o[s];if(!e(t[i],n[i]))return!1}return!0}return t!=t&&n!=n}),Y_);return e.code='require("ajv/dist/runtime/equal").default',iS.default=e,iS}function cS(){return eS||(eS=1,function(e){e["config.json"]=function e(n,{instancePath:s="",parentData:i,parentDataProperty:c,rootData:u=n}={}){let l=null,f=0;if(n&&"object"==typeof n&&!Array.isArray(n)){for(const e in n)if("border"!==e&&"header"!==e&&"columns"!==e&&"columnDefault"!==e&&"drawVerticalLine"!==e&&"drawHorizontalLine"!==e&&"singleLine"!==e&&"spanningCells"!==e){const t={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===l?l=[t]:l.push(t),f++}if(void 0!==n.border&&(o(n.border,{instancePath:s+"/border",parentData:n,parentDataProperty:"border",rootData:u})||(l=null===l?o.errors:l.concat(o.errors),f=l.length)),void 0!==n.header){let e=n.header;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.content){const e={instancePath:s+"/header",schemaPath:"#/properties/header/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};null===l?l=[e]:l.push(e),f++}for(const t in e)if("content"!==t&&"alignment"!==t&&"wrapWord"!==t&&"truncate"!==t&&"paddingLeft"!==t&&"paddingRight"!==t){const e={instancePath:s+"/header",schemaPath:"#/properties/header/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:t},message:"must NOT have additional properties"};null===l?l=[e]:l.push(e),f++}if(void 0!==e.content&&"string"!=typeof e.content){const e={instancePath:s+"/header/content",schemaPath:"#/properties/header/properties/content/type",keyword:"type",params:{type:"string"},message:"must be string"};null===l?l=[e]:l.push(e),f++}if(void 0!==e.alignment&&(a(e.alignment,{instancePath:s+"/header/alignment",parentData:e,parentDataProperty:"alignment",rootData:u})||(l=null===l?a.errors:l.concat(a.errors),f=l.length)),void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:s+"/header/wrapWord",schemaPath:"#/properties/header/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===l?l=[e]:l.push(e),f++}if(void 0!==e.truncate){let t=e.truncate;if("number"!=typeof t||t%1||isNaN(t)||!isFinite(t)){const e={instancePath:s+"/header/truncate",schemaPath:"#/properties/header/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}if(void 0!==e.paddingLeft){let t=e.paddingLeft;if("number"!=typeof t||t%1||isNaN(t)||!isFinite(t)){const e={instancePath:s+"/header/paddingLeft",schemaPath:"#/properties/header/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}if(void 0!==e.paddingRight){let t=e.paddingRight;if("number"!=typeof t||t%1||isNaN(t)||!isFinite(t)){const e={instancePath:s+"/header/paddingRight",schemaPath:"#/properties/header/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}}else{const e={instancePath:s+"/header",schemaPath:"#/properties/header/type",keyword:"type",params:{type:"object"},message:"must be object"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.columns&&(d(n.columns,{instancePath:s+"/columns",parentData:n,parentDataProperty:"columns",rootData:u})||(l=null===l?d.errors:l.concat(d.errors),f=l.length)),void 0!==n.columnDefault&&(h(n.columnDefault,{instancePath:s+"/columnDefault",parentData:n,parentDataProperty:"columnDefault",rootData:u})||(l=null===l?h.errors:l.concat(h.errors),f=l.length)),void 0!==n.drawVerticalLine&&"function"!=typeof n.drawVerticalLine){const e={instancePath:s+"/drawVerticalLine",schemaPath:"#/properties/drawVerticalLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===l?l=[e]:l.push(e),f++}if(void 0!==n.drawHorizontalLine&&"function"!=typeof n.drawHorizontalLine){const e={instancePath:s+"/drawHorizontalLine",schemaPath:"#/properties/drawHorizontalLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===l?l=[e]:l.push(e),f++}if(void 0!==n.singleLine&&"boolean"!=typeof n.singleLine){const e={instancePath:s+"/singleLine",schemaPath:"#/properties/singleLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===l?l=[e]:l.push(e),f++}if(void 0!==n.spanningCells){let e=n.spanningCells;if(Array.isArray(e)){const n=e.length;for(let o=0;o<n;o++){let n=e[o];if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0===n.row){const e={instancePath:s+"/spanningCells/"+o,schemaPath:"#/properties/spanningCells/items/required",keyword:"required",params:{missingProperty:"row"},message:"must have required property 'row'"};null===l?l=[e]:l.push(e),f++}if(void 0===n.col){const e={instancePath:s+"/spanningCells/"+o,schemaPath:"#/properties/spanningCells/items/required",keyword:"required",params:{missingProperty:"col"},message:"must have required property 'col'"};null===l?l=[e]:l.push(e),f++}for(const e in n)if(!r.call(t.properties.spanningCells.items.properties,e)){const t={instancePath:s+"/spanningCells/"+o,schemaPath:"#/properties/spanningCells/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===l?l=[t]:l.push(t),f++}if(void 0!==n.col){let e=n.col;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+o+"/col",schemaPath:"#/properties/spanningCells/items/properties/col/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}if("number"==typeof e&&isFinite(e)&&(e<0||isNaN(e))){const e={instancePath:s+"/spanningCells/"+o+"/col",schemaPath:"#/properties/spanningCells/items/properties/col/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.row){let e=n.row;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+o+"/row",schemaPath:"#/properties/spanningCells/items/properties/row/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}if("number"==typeof e&&isFinite(e)&&(e<0||isNaN(e))){const e={instancePath:s+"/spanningCells/"+o+"/row",schemaPath:"#/properties/spanningCells/items/properties/row/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.colSpan){let e=n.colSpan;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+o+"/colSpan",schemaPath:"#/properties/spanningCells/items/properties/colSpan/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}if("number"==typeof e&&isFinite(e)&&(e<1||isNaN(e))){const e={instancePath:s+"/spanningCells/"+o+"/colSpan",schemaPath:"#/properties/spanningCells/items/properties/colSpan/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.rowSpan){let e=n.rowSpan;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+o+"/rowSpan",schemaPath:"#/properties/spanningCells/items/properties/rowSpan/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}if("number"==typeof e&&isFinite(e)&&(e<1||isNaN(e))){const e={instancePath:s+"/spanningCells/"+o+"/rowSpan",schemaPath:"#/properties/spanningCells/items/properties/rowSpan/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.alignment&&(a(n.alignment,{instancePath:s+"/spanningCells/"+o+"/alignment",parentData:n,parentDataProperty:"alignment",rootData:u})||(l=null===l?a.errors:l.concat(a.errors),f=l.length)),void 0!==n.verticalAlignment&&(m(n.verticalAlignment,{instancePath:s+"/spanningCells/"+o+"/verticalAlignment",parentData:n,parentDataProperty:"verticalAlignment",rootData:u})||(l=null===l?m.errors:l.concat(m.errors),f=l.length)),void 0!==n.wrapWord&&"boolean"!=typeof n.wrapWord){const e={instancePath:s+"/spanningCells/"+o+"/wrapWord",schemaPath:"#/properties/spanningCells/items/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===l?l=[e]:l.push(e),f++}if(void 0!==n.truncate){let e=n.truncate;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+o+"/truncate",schemaPath:"#/properties/spanningCells/items/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.paddingLeft){let e=n.paddingLeft;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+o+"/paddingLeft",schemaPath:"#/properties/spanningCells/items/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}if(void 0!==n.paddingRight){let e=n.paddingRight;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:s+"/spanningCells/"+o+"/paddingRight",schemaPath:"#/properties/spanningCells/items/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),f++}}}else{const e={instancePath:s+"/spanningCells/"+o,schemaPath:"#/properties/spanningCells/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===l?l=[e]:l.push(e),f++}}}else{const e={instancePath:s+"/spanningCells",schemaPath:"#/properties/spanningCells/type",keyword:"type",params:{type:"array"},message:"must be array"};null===l?l=[e]:l.push(e),f++}}}else{const e={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===l?l=[e]:l.push(e),f++}return e.errors=l,0===f};const t={properties:{spanningCells:{items:{properties:{col:{type:"integer",minimum:0},row:{type:"integer",minimum:0},colSpan:{type:"integer",minimum:1},rowSpan:{type:"integer",minimum:1},alignment:{$ref:"shared.json#/definitions/alignment"},verticalAlignment:{$ref:"shared.json#/definitions/verticalAlignment"},wrapWord:{type:"boolean"},truncate:{type:"integer"},paddingLeft:{type:"integer"},paddingRight:{type:"integer"}}}}}},n={properties:{topBody:{$ref:"#/definitions/border"},topJoin:{$ref:"#/definitions/border"},topLeft:{$ref:"#/definitions/border"},topRight:{$ref:"#/definitions/border"},bottomBody:{$ref:"#/definitions/border"},bottomJoin:{$ref:"#/definitions/border"},bottomLeft:{$ref:"#/definitions/border"},bottomRight:{$ref:"#/definitions/border"},bodyLeft:{$ref:"#/definitions/border"},bodyRight:{$ref:"#/definitions/border"},bodyJoin:{$ref:"#/definitions/border"},headerJoin:{$ref:"#/definitions/border"},joinBody:{$ref:"#/definitions/border"},joinLeft:{$ref:"#/definitions/border"},joinRight:{$ref:"#/definitions/border"},joinJoin:{$ref:"#/definitions/border"},joinMiddleUp:{$ref:"#/definitions/border"},joinMiddleDown:{$ref:"#/definitions/border"},joinMiddleLeft:{$ref:"#/definitions/border"},joinMiddleRight:{$ref:"#/definitions/border"}}},r=Object.prototype.hasOwnProperty;function s(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let i=null,a=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===i?i=[e]:i.push(e),a++}return s.errors=i,0===a}function o(e,{instancePath:t="",parentData:i,parentDataProperty:a,rootData:c=e}={}){let u=null,l=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if(!r.call(n.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===u?u=[e]:u.push(e),l++}void 0!==e.topBody&&(s(e.topBody,{instancePath:t+"/topBody",parentData:e,parentDataProperty:"topBody",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.topJoin&&(s(e.topJoin,{instancePath:t+"/topJoin",parentData:e,parentDataProperty:"topJoin",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.topLeft&&(s(e.topLeft,{instancePath:t+"/topLeft",parentData:e,parentDataProperty:"topLeft",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.topRight&&(s(e.topRight,{instancePath:t+"/topRight",parentData:e,parentDataProperty:"topRight",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bottomBody&&(s(e.bottomBody,{instancePath:t+"/bottomBody",parentData:e,parentDataProperty:"bottomBody",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bottomJoin&&(s(e.bottomJoin,{instancePath:t+"/bottomJoin",parentData:e,parentDataProperty:"bottomJoin",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bottomLeft&&(s(e.bottomLeft,{instancePath:t+"/bottomLeft",parentData:e,parentDataProperty:"bottomLeft",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bottomRight&&(s(e.bottomRight,{instancePath:t+"/bottomRight",parentData:e,parentDataProperty:"bottomRight",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bodyLeft&&(s(e.bodyLeft,{instancePath:t+"/bodyLeft",parentData:e,parentDataProperty:"bodyLeft",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bodyRight&&(s(e.bodyRight,{instancePath:t+"/bodyRight",parentData:e,parentDataProperty:"bodyRight",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.bodyJoin&&(s(e.bodyJoin,{instancePath:t+"/bodyJoin",parentData:e,parentDataProperty:"bodyJoin",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.headerJoin&&(s(e.headerJoin,{instancePath:t+"/headerJoin",parentData:e,parentDataProperty:"headerJoin",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinBody&&(s(e.joinBody,{instancePath:t+"/joinBody",parentData:e,parentDataProperty:"joinBody",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinLeft&&(s(e.joinLeft,{instancePath:t+"/joinLeft",parentData:e,parentDataProperty:"joinLeft",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinRight&&(s(e.joinRight,{instancePath:t+"/joinRight",parentData:e,parentDataProperty:"joinRight",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinJoin&&(s(e.joinJoin,{instancePath:t+"/joinJoin",parentData:e,parentDataProperty:"joinJoin",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinMiddleUp&&(s(e.joinMiddleUp,{instancePath:t+"/joinMiddleUp",parentData:e,parentDataProperty:"joinMiddleUp",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinMiddleDown&&(s(e.joinMiddleDown,{instancePath:t+"/joinMiddleDown",parentData:e,parentDataProperty:"joinMiddleDown",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinMiddleLeft&&(s(e.joinMiddleLeft,{instancePath:t+"/joinMiddleLeft",parentData:e,parentDataProperty:"joinMiddleLeft",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length)),void 0!==e.joinMiddleRight&&(s(e.joinMiddleRight,{instancePath:t+"/joinMiddleRight",parentData:e,parentDataProperty:"joinMiddleRight",rootData:c})||(u=null===u?s.errors:u.concat(s.errors),l=u.length))}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===u?u=[e]:u.push(e),l++}return o.errors=u,0===l}const i={enum:["left","right","center","justify"]};function a(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,c=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),c++}if("left"!==e&&"right"!==e&&"center"!==e&&"justify"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:i.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),c++}return a.errors=o,0===c}aS().default;const c=new RegExp("^[0-9]+$","u");function u(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),a++}if("left"!==e&&"right"!==e&&"center"!==e&&"justify"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:i.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),a++}return u.errors=o,0===a}const l={enum:["top","middle","bottom"]};function f(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,i=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),i++}if("top"!==e&&"middle"!==e&&"bottom"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:l.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),i++}return f.errors=o,0===i}function p(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,i=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if("alignment"!==n&&"verticalAlignment"!==n&&"width"!==n&&"wrapWord"!==n&&"truncate"!==n&&"paddingLeft"!==n&&"paddingRight"!==n){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===o?o=[e]:o.push(e),i++}if(void 0!==e.alignment&&(u(e.alignment,{instancePath:t+"/alignment",parentData:e,parentDataProperty:"alignment",rootData:s})||(o=null===o?u.errors:o.concat(u.errors),i=o.length)),void 0!==e.verticalAlignment&&(f(e.verticalAlignment,{instancePath:t+"/verticalAlignment",parentData:e,parentDataProperty:"verticalAlignment",rootData:s})||(o=null===o?f.errors:o.concat(f.errors),i=o.length)),void 0!==e.width){let n=e.width;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}if("number"==typeof n&&isFinite(n)&&(n<1||isNaN(n))){const e={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===o?o=[e]:o.push(e),i++}}if(void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:t+"/wrapWord",schemaPath:"#/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),i++}if(void 0!==e.truncate){let n=e.truncate;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/truncate",schemaPath:"#/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}}if(void 0!==e.paddingLeft){let n=e.paddingLeft;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingLeft",schemaPath:"#/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}}if(void 0!==e.paddingRight){let n=e.paddingRight;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingRight",schemaPath:"#/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),i++}return p.errors=o,0===i}function d(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,i=0;const a=i;let u=!1,l=null;const f=i;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if(!c.test(n)){const e={instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===o?o=[e]:o.push(e),i++}for(const n in e)c.test(n)&&(p(e[n],{instancePath:t+"/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:n,rootData:s})||(o=null===o?p.errors:o.concat(p.errors),i=o.length))}else{const e={instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),i++}(m=f===i)&&(u=!0,l=0);const h=i;if(Array.isArray(e)){const n=e.length;for(let r=0;r<n;r++)p(e[r],{instancePath:t+"/"+r,parentData:e,parentDataProperty:r,rootData:s})||(o=null===o?p.errors:o.concat(p.errors),i=o.length)}else{const e={instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),i++}var m;if((m=h===i)&&u?(u=!1,l=[l,1]):m&&(u=!0,l=1),u)i=a,null!==o&&(a?o.length=a:o=null);else{const e={instancePath:t,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),i++}return d.errors=o,0===i}function h(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,i=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if("alignment"!==n&&"verticalAlignment"!==n&&"width"!==n&&"wrapWord"!==n&&"truncate"!==n&&"paddingLeft"!==n&&"paddingRight"!==n){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===o?o=[e]:o.push(e),i++}if(void 0!==e.alignment&&(u(e.alignment,{instancePath:t+"/alignment",parentData:e,parentDataProperty:"alignment",rootData:s})||(o=null===o?u.errors:o.concat(u.errors),i=o.length)),void 0!==e.verticalAlignment&&(f(e.verticalAlignment,{instancePath:t+"/verticalAlignment",parentData:e,parentDataProperty:"verticalAlignment",rootData:s})||(o=null===o?f.errors:o.concat(f.errors),i=o.length)),void 0!==e.width){let n=e.width;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}if("number"==typeof n&&isFinite(n)&&(n<1||isNaN(n))){const e={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===o?o=[e]:o.push(e),i++}}if(void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:t+"/wrapWord",schemaPath:"#/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),i++}if(void 0!==e.truncate){let n=e.truncate;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/truncate",schemaPath:"#/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}}if(void 0!==e.paddingLeft){let n=e.paddingLeft;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingLeft",schemaPath:"#/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}}if(void 0!==e.paddingRight){let n=e.paddingRight;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingRight",schemaPath:"#/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),i++}return h.errors=o,0===i}function m(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,i=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===o?o=[e]:o.push(e),i++}if("top"!==e&&"middle"!==e&&"bottom"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:l.enum},message:"must be equal to one of the allowed values"};null===o?o=[e]:o.push(e),i++}return m.errors=o,0===i}function g(e,{instancePath:t="",parentData:o,parentDataProperty:i,rootData:a=e}={}){let c=null,u=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const s in e)if(!r.call(n.properties,s)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"};null===c?c=[e]:c.push(e),u++}void 0!==e.topBody&&(s(e.topBody,{instancePath:t+"/topBody",parentData:e,parentDataProperty:"topBody",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.topJoin&&(s(e.topJoin,{instancePath:t+"/topJoin",parentData:e,parentDataProperty:"topJoin",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.topLeft&&(s(e.topLeft,{instancePath:t+"/topLeft",parentData:e,parentDataProperty:"topLeft",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.topRight&&(s(e.topRight,{instancePath:t+"/topRight",parentData:e,parentDataProperty:"topRight",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bottomBody&&(s(e.bottomBody,{instancePath:t+"/bottomBody",parentData:e,parentDataProperty:"bottomBody",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bottomJoin&&(s(e.bottomJoin,{instancePath:t+"/bottomJoin",parentData:e,parentDataProperty:"bottomJoin",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bottomLeft&&(s(e.bottomLeft,{instancePath:t+"/bottomLeft",parentData:e,parentDataProperty:"bottomLeft",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bottomRight&&(s(e.bottomRight,{instancePath:t+"/bottomRight",parentData:e,parentDataProperty:"bottomRight",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bodyLeft&&(s(e.bodyLeft,{instancePath:t+"/bodyLeft",parentData:e,parentDataProperty:"bodyLeft",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bodyRight&&(s(e.bodyRight,{instancePath:t+"/bodyRight",parentData:e,parentDataProperty:"bodyRight",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.bodyJoin&&(s(e.bodyJoin,{instancePath:t+"/bodyJoin",parentData:e,parentDataProperty:"bodyJoin",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.headerJoin&&(s(e.headerJoin,{instancePath:t+"/headerJoin",parentData:e,parentDataProperty:"headerJoin",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinBody&&(s(e.joinBody,{instancePath:t+"/joinBody",parentData:e,parentDataProperty:"joinBody",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinLeft&&(s(e.joinLeft,{instancePath:t+"/joinLeft",parentData:e,parentDataProperty:"joinLeft",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinRight&&(s(e.joinRight,{instancePath:t+"/joinRight",parentData:e,parentDataProperty:"joinRight",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinJoin&&(s(e.joinJoin,{instancePath:t+"/joinJoin",parentData:e,parentDataProperty:"joinJoin",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinMiddleUp&&(s(e.joinMiddleUp,{instancePath:t+"/joinMiddleUp",parentData:e,parentDataProperty:"joinMiddleUp",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinMiddleDown&&(s(e.joinMiddleDown,{instancePath:t+"/joinMiddleDown",parentData:e,parentDataProperty:"joinMiddleDown",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinMiddleLeft&&(s(e.joinMiddleLeft,{instancePath:t+"/joinMiddleLeft",parentData:e,parentDataProperty:"joinMiddleLeft",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length)),void 0!==e.joinMiddleRight&&(s(e.joinMiddleRight,{instancePath:t+"/joinMiddleRight",parentData:e,parentDataProperty:"joinMiddleRight",rootData:a})||(c=null===c?s.errors:c.concat(s.errors),u=c.length))}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===c?c=[e]:c.push(e),u++}return g.errors=c,0===u}function y(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,i=0;const a=i;let u=!1,l=null;const f=i;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if(!c.test(n)){const e={instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===o?o=[e]:o.push(e),i++}for(const n in e)c.test(n)&&(p(e[n],{instancePath:t+"/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:n,rootData:s})||(o=null===o?p.errors:o.concat(p.errors),i=o.length))}else{const e={instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),i++}(h=f===i)&&(u=!0,l=0);const d=i;if(Array.isArray(e)){const n=e.length;for(let r=0;r<n;r++)p(e[r],{instancePath:t+"/"+r,parentData:e,parentDataProperty:r,rootData:s})||(o=null===o?p.errors:o.concat(p.errors),i=o.length)}else{const e={instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};null===o?o=[e]:o.push(e),i++}var h;if((h=d===i)&&u?(u=!1,l=[l,1]):h&&(u=!0,l=1),u)i=a,null!==o&&(a?o.length=a:o=null);else{const e={instancePath:t,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};null===o?o=[e]:o.push(e),i++}return y.errors=o,0===i}function b(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,i=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if("alignment"!==n&&"verticalAlignment"!==n&&"width"!==n&&"wrapWord"!==n&&"truncate"!==n&&"paddingLeft"!==n&&"paddingRight"!==n){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===o?o=[e]:o.push(e),i++}if(void 0!==e.alignment&&(u(e.alignment,{instancePath:t+"/alignment",parentData:e,parentDataProperty:"alignment",rootData:s})||(o=null===o?u.errors:o.concat(u.errors),i=o.length)),void 0!==e.verticalAlignment&&(f(e.verticalAlignment,{instancePath:t+"/verticalAlignment",parentData:e,parentDataProperty:"verticalAlignment",rootData:s})||(o=null===o?f.errors:o.concat(f.errors),i=o.length)),void 0!==e.width){let n=e.width;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}if("number"==typeof n&&isFinite(n)&&(n<1||isNaN(n))){const e={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===o?o=[e]:o.push(e),i++}}if(void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:t+"/wrapWord",schemaPath:"#/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===o?o=[e]:o.push(e),i++}if(void 0!==e.truncate){let n=e.truncate;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/truncate",schemaPath:"#/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}}if(void 0!==e.paddingLeft){let n=e.paddingLeft;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingLeft",schemaPath:"#/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}}if(void 0!==e.paddingRight){let n=e.paddingRight;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingRight",schemaPath:"#/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===o?o=[e]:o.push(e),i++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===o?o=[e]:o.push(e),i++}return b.errors=o,0===i}e["streamConfig.json"]=function e(t,{instancePath:n="",parentData:r,parentDataProperty:s,rootData:o=t}={}){let i=null,a=0;if(t&&"object"==typeof t&&!Array.isArray(t)){if(void 0===t.columnDefault){const e={instancePath:n,schemaPath:"#/required",keyword:"required",params:{missingProperty:"columnDefault"},message:"must have required property 'columnDefault'"};null===i?i=[e]:i.push(e),a++}if(void 0===t.columnCount){const e={instancePath:n,schemaPath:"#/required",keyword:"required",params:{missingProperty:"columnCount"},message:"must have required property 'columnCount'"};null===i?i=[e]:i.push(e),a++}for(const e in t)if("border"!==e&&"columns"!==e&&"columnDefault"!==e&&"columnCount"!==e&&"drawVerticalLine"!==e){const t={instancePath:n,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===i?i=[t]:i.push(t),a++}if(void 0!==t.border&&(g(t.border,{instancePath:n+"/border",parentData:t,parentDataProperty:"border",rootData:o})||(i=null===i?g.errors:i.concat(g.errors),a=i.length)),void 0!==t.columns&&(y(t.columns,{instancePath:n+"/columns",parentData:t,parentDataProperty:"columns",rootData:o})||(i=null===i?y.errors:i.concat(y.errors),a=i.length)),void 0!==t.columnDefault&&(b(t.columnDefault,{instancePath:n+"/columnDefault",parentData:t,parentDataProperty:"columnDefault",rootData:o})||(i=null===i?b.errors:i.concat(b.errors),a=i.length)),void 0!==t.columnCount){let e=t.columnCount;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:n+"/columnCount",schemaPath:"#/properties/columnCount/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),a++}if("number"==typeof e&&isFinite(e)&&(e<1||isNaN(e))){const e={instancePath:n+"/columnCount",schemaPath:"#/properties/columnCount/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===i?i=[e]:i.push(e),a++}}if(void 0!==t.drawVerticalLine&&"function"!=typeof t.drawVerticalLine){const e={instancePath:n+"/drawVerticalLine",schemaPath:"#/properties/drawVerticalLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===i?i=[e]:i.push(e),a++}}else{const e={instancePath:n,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),a++}return e.errors=i,0===a}}(oS)),oS}function uS(){if(tS)return sS;tS=1;var e=sS&&sS.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sS,"__esModule",{value:!0}),sS.validateConfig=void 0;const t=e(cS());return sS.validateConfig=(e,n)=>{const r=t.default[e];if(!r(n)&&r.errors){const e=r.errors.map(e=>({message:e.message,params:e.params,schemaPath:e.schemaPath}));throw console.log("config",n),console.log("errors",e),new Error("Invalid config.")}},sS}function lS(){if(nS)return rS;nS=1,Object.defineProperty(rS,"__esModule",{value:!0}),rS.makeStreamConfig=void 0;const e=E_(),t=uS(),n=(e,t={},n)=>Array.from({length:e}).map((e,r)=>({alignment:"left",paddingLeft:1,paddingRight:1,truncate:Number.POSITIVE_INFINITY,verticalAlignment:"top",wrapWord:!1,...n,...t[r]}));return rS.makeStreamConfig=r=>{if((0,t.validateConfig)("streamConfig.json",r),void 0===r.columnDefault.width)throw new Error("Must provide config.columnDefault.width when creating a stream.");return{drawVerticalLine:()=>!0,...r,border:(0,e.makeBorderConfig)(r.border),columns:n(r.columnCount,r.columns,r.columnDefault)}},rS}var fS,pS={};function dS(){return fS||(fS=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mapDataUsingRowHeights=e.padCellVertically=void 0;const t=E_(),n=M_(),r=e=>new Array(e).fill("");e.padCellVertically=(e,t,n)=>{const s=t-e.length;return"top"===n?[...e,...r(s)]:"bottom"===n?[...r(s),...e]:[...r(Math.floor(s/2)),...e,...r(Math.ceil(s/2))]};e.mapDataUsingRowHeights=(r,s,o)=>{const i=r[0].length,a=r.map((t,r)=>{const a=s[r],c=Array.from({length:a},()=>new Array(i).fill(""));return t.forEach((t,s)=>{var i;const u=null===(i=o.spanningCellManager)||void 0===i?void 0:i.getContainingRange({col:s,row:r});if(u)return void u.extractCellContent(r).forEach((e,t)=>{c[t][s]=e});const l=(0,n.wrapCell)(t,o.columns[s].width,o.columns[s].wrapWord);(0,e.padCellVertically)(l,a,o.columns[s].verticalAlignment).forEach((e,t)=>{c[t][s]=e})}),c});return(0,t.flatten)(a)}}(pS)),pS}var hS,mS={};function gS(){return hS||(hS=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.padTableData=e.padString=void 0;e.padString=(e,t,n)=>" ".repeat(t)+e+" ".repeat(n);e.padTableData=(t,n)=>t.map((t,r)=>t.map((t,s)=>{var o;if(null===(o=n.spanningCellManager)||void 0===o?void 0:o.getContainingRange({col:s,row:r},{mapped:!0}))return t;const{paddingLeft:i,paddingRight:a}=n.columns[s];return(0,e.padString)(t,i,a)}))}(mS)),mS}var yS,bS={};function vS(){if(yS)return bS;yS=1,Object.defineProperty(bS,"__esModule",{value:!0}),bS.stringifyTableData=void 0;const e=E_();return bS.stringifyTableData=t=>t.map(t=>t.map(t=>(0,e.normalizeString)(String(t)))),bS}var DS,wS,_S,SS={},ES={exports:{}};function kS(){return DS||(DS=1,function(e,t){var n,r=1/0,s=NaN,o=/^\s+|\s+$/g,i=/\w*$/,a=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l="\\ud800-\\udfff",f="\\u0300-\\u036f\\ufe20-\\ufe23",p="\\u20d0-\\u20f0",d="\\ufe0e\\ufe0f",h="["+l+"]",m="["+f+p+"]",g="\\ud83c[\\udffb-\\udfff]",y="[^"+l+"]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",v="[\\ud800-\\udbff][\\udc00-\\udfff]",D="\\u200d",w="(?:"+m+"|"+g+")"+"?",_="["+d+"]?",S=_+w+("(?:"+D+"(?:"+[y,b,v].join("|")+")"+_+w+")*"),E="(?:"+[y+m+"?",m,b,v,h].join("|")+")",k=RegExp(g+"(?="+g+")|"+E+S,"g"),A=RegExp("["+D+l+f+p+d+"]"),C=parseInt,O="object"==typeof jg&&jg&&jg.Object===Object&&jg,P="object"==typeof self&&self&&self.Object===Object&&self,T=O||P||Function("return this")(),x=t&&!t.nodeType&&t,N=x&&e&&!e.nodeType&&e,$=N&&N.exports===x&&O.process,L=function(){try{return $&&$.binding("util")}catch(e){}}(),R=L&&L.isRegExp,F=(n="length",function(e){return null==e?void 0:e[n]});function I(e){return A.test(e)}function j(e){return I(e)?function(e){var t=k.lastIndex=0;for(;k.test(e);)t++;return t}(e):F(e)}function M(e){return I(e)?function(e){return e.match(k)||[]}(e):function(e){return e.split("")}(e)}var B=Object.prototype.toString,z=T.Symbol,H=z?z.prototype:void 0,K=H?H.toString:void 0;function U(e){if("string"==typeof e)return e;if(W(e))return K?K.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function q(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(s);++r<s;)o[r]=e[r+t];return o}(e,t,n)}function J(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var Z,G=R?(Z=R,function(e){return Z(e)}):function(e){return J(e)&&"[object RegExp]"==B.call(e)};function W(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==B.call(e)}function V(e){return e?(e=function(e){if("number"==typeof e)return e;if(W(e))return s;if(J(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=J(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=c.test(e);return n||u.test(e)?C(e.slice(2),n?2:8):a.test(e)?s:+e}(e))===r||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function Y(e){return null==e?"":U(e)}e.exports=function(e,t){var n=30,r="...";if(J(t)){var s="separator"in t?t.separator:s;n="length"in t?function(e){var t=V(e),n=t%1;return t==t?n?t-n:t:0}(t.length):n,r="omission"in t?U(t.omission):r}var o=(e=Y(e)).length;if(I(e)){var a=M(e);o=a.length}if(n>=o)return e;var c=n-j(r);if(c<1)return r;var u=a?q(a,0,c).join(""):e.slice(0,c);if(void 0===s)return u+r;if(a&&(c+=u.length-c),G(s)){if(e.slice(c).search(s)){var l,f=u;for(s.global||(s=RegExp(s.source,Y(i.exec(s))+"g")),s.lastIndex=0;l=s.exec(f);)var p=l.index;u=u.slice(0,void 0===p?c:p)}}else if(e.indexOf(U(s),c)!=c){var d=u.lastIndexOf(s);d>-1&&(u=u.slice(0,d))}return u+r}}(ES,ES.exports)),ES.exports}function AS(){return wS||(wS=1,function(e){var t=SS&&SS.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.truncateTableData=e.truncateString=void 0;const n=t(kS());e.truncateString=(e,t)=>(0,n.default)(e,{length:t,omission:"…"});e.truncateTableData=(t,n)=>t.map(t=>t.map((t,r)=>(0,e.truncateString)(t,n[r])))}(SS)),SS}function CS(){if(_S)return jw;_S=1,Object.defineProperty(jw,"__esModule",{value:!0}),jw.createStream=void 0;const e=A_(),t=z_(),n=Z_(),r=V_(),s=lS(),o=dS(),i=gS(),a=vS(),c=AS(),u=E_(),l=(n,r)=>{let s=(0,a.stringifyTableData)(n);s=(0,c.truncateTableData)(s,(0,u.extractTruncates)(r));const l=(0,t.calculateRowHeights)(s,r);return s=(0,o.mapDataUsingRowHeights)(s,l,r),s=(0,e.alignTableData)(s,r),s=(0,i.padTableData)(s,r),s};return jw.createStream=e=>{const t=(0,s.makeStreamConfig)(e),o=Object.values(t.columns).map(e=>e.width+e.paddingLeft+e.paddingRight);let i=!0;return{write:e=>{if(e.length!==t.columnCount)throw new Error("Row cell count does not match the config.columnCount.");i?(i=!1,((e,t,s)=>{const o=l([e],s).map(e=>(0,r.drawRow)(e,s)).join("");let i;i="",i+=(0,n.drawBorderTop)(t,s),i+=o,i+=(0,n.drawBorderBottom)(t,s),i=i.trimEnd(),process.stdout.write(i)})(e,o,t)):((e,t,s)=>{const o=l([e],s).map(e=>(0,r.drawRow)(e,s)).join("");let i="";const a=(0,n.drawBorderBottom)(t,s);"\n"!==a&&(i="\r[K"),i+=(0,n.drawBorderJoin)(t,s),i+=o,i+=a,i=i.trimEnd(),process.stdout.write(i)})(e,o,t)}}},jw}var OS,PS={},TS={};function xS(){if(OS)return TS;OS=1,Object.defineProperty(TS,"__esModule",{value:!0}),TS.calculateOutputColumnWidths=void 0;return TS.calculateOutputColumnWidths=e=>e.columns.map(e=>e.paddingLeft+e.width+e.paddingRight),TS}var NS,$S={};function LS(){if(NS)return $S;NS=1,Object.defineProperty($S,"__esModule",{value:!0}),$S.drawTable=void 0;const e=Z_(),t=J_(),n=V_(),r=E_();return $S.drawTable=(s,o,i,a)=>{const{drawHorizontalLine:c,singleLine:u}=a,l=(0,r.groupBySizes)(s,i).map((e,t)=>e.map(e=>(0,n.drawRow)(e,{...a,rowIndex:t})).join(""));return(0,t.drawContent)({contents:l,drawSeparator:(e,t)=>(0===e||e===t||!u)&&c(e,t),elementType:"row",rowIndex:-1,separatorGetter:(0,e.createTableBorderGetter)(o,{...a,rowCount:l.length}),spanningCellManager:a.spanningCellManager})},$S}var RS,FS={};function IS(){if(RS)return FS;RS=1,Object.defineProperty(FS,"__esModule",{value:!0}),FS.injectHeaderConfig=void 0;return FS.injectHeaderConfig=(e,t)=>{var n;let r=null!==(n=t.spanningCells)&&void 0!==n?n:[];const s=t.header,o=[...e];if(s){r=r.map(({row:e,...t})=>({...t,row:e+1}));const{content:t,...n}=s;r.unshift({alignment:"center",col:0,colSpan:e[0].length,paddingLeft:1,paddingRight:1,row:0,wrapWord:!1,...n}),o.unshift([t,...Array.from({length:e[0].length-1}).fill("")])}return[o,r]},FS}var jS,MS={},BS={};function zS(){return jS||(jS=1,function(e){var t=BS&&BS.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.calculateMaximumColumnWidths=e.calculateMaximumCellWidth=void 0;const n=t(Yw()),r=E_();e.calculateMaximumCellWidth=e=>Math.max(...e.split("\n").map(n.default));e.calculateMaximumColumnWidths=(t,n=[])=>{const s=new Array(t[0].length).fill(0),o=n.map(r.calculateRangeCoordinate);return t.forEach((t,n)=>{t.forEach((t,i)=>{((e,t)=>o.some(n=>(0,r.isCellInRange)({col:t,row:e},n)))(n,i)||(s[i]=Math.max(s[i],(0,e.calculateMaximumCellWidth)(t)))})}),s}}(BS)),BS}var HS,KS={},US={};function qS(){if(HS)return US;HS=1;var e=US&&US.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(US,"__esModule",{value:!0}),US.alignVerticalRangeContent=US.wrapRangeContent=void 0;const t=e(Yw()),n=k_(),r=dS(),s=gS(),o=AS(),i=E_(),a=M_();US.wrapRangeContent=(e,t,r)=>{const{topLeft:i,paddingRight:c,paddingLeft:u,truncate:l,wrapWord:f,alignment:p}=e,d=r.rows[i.row][i.col],h=t-u-c;return(0,a.wrapCell)((0,o.truncateString)(d,l),h,f).map(e=>{const t=(0,n.alignString)(e,h,p);return(0,s.padString)(t,u,c)})};return US.alignVerticalRangeContent=(e,n,s)=>{const{rows:o,drawHorizontalLine:a,rowHeights:c}=s,{topLeft:u,bottomRight:l,verticalAlignment:f}=e;if(0===c.length)return[];const p=(0,i.sumArray)(c.slice(u.row,l.row+1))+(l.row-u.row)-(0,i.sequence)(u.row+1,l.row).filter(e=>!a(e,o.length)).length;return(0,r.padCellVertically)(n,p,f).map(e=>0===e.length?" ".repeat((0,t.default)(n[0])):e)},US}var JS,ZS={};function GS(){if(JS)return ZS;JS=1,Object.defineProperty(ZS,"__esModule",{value:!0}),ZS.calculateSpanningCellWidth=void 0;const e=E_();return ZS.calculateSpanningCellWidth=(t,n)=>{const{columnsConfig:r,drawVerticalLine:s}=n,{topLeft:o,bottomRight:i}=t;return(0,e.sumArray)(r.slice(o.col,i.col+1).map(({width:e})=>e))+(o.col===i.col?r[o.col].paddingRight+r[i.col].paddingLeft:(0,e.sumArray)(r.slice(o.col,i.col+1).map(({paddingLeft:e,paddingRight:t})=>e+t)))+(i.col-o.col)-(0,e.sequence)(o.col+1,i.col).filter(e=>!s(e,r.length)).length},ZS}var WS,VS,YS={};function QS(){if(WS)return YS;WS=1,Object.defineProperty(YS,"__esModule",{value:!0}),YS.makeRangeConfig=void 0;const e=E_();return YS.makeRangeConfig=(t,n)=>{var r;const{topLeft:s,bottomRight:o}=(0,e.calculateRangeCoordinate)(t);return{...{...n[s.col],...t,paddingRight:null!==(r=t.paddingRight)&&void 0!==r?r:n[o.col].paddingRight},bottomRight:o,topLeft:s}},YS}function XS(){if(VS)return KS;VS=1,Object.defineProperty(KS,"__esModule",{value:!0}),KS.createSpanningCellManager=void 0;const e=qS(),t=GS(),n=QS(),r=E_(),s=(e,t)=>t.find(t=>(0,r.isCellInRange)(e,t)),o=(n,s)=>{const o=(0,t.calculateSpanningCellWidth)(n,s),i=(0,e.wrapRangeContent)(n,o,s),a=(0,e.alignVerticalRangeContent)(n,i,s);return{...n,extractBorderContent:e=>{const{topLeft:t}=n,o=(0,r.sumArray)(s.rowHeights.slice(t.row,e))+(e-t.row-1);return a[o]},extractCellContent:e=>{const{topLeft:t}=n,{drawHorizontalLine:o,rowHeights:i}=s,c=e-t.row,u=(0,r.sequence)(t.row+1,e).filter(e=>!(null==o?void 0:o(e,i.length))).length,l=(0,r.sumArray)(i.slice(t.row,e))+c-u;return a.slice(l,l+i[e])},height:i.length,width:o}};return KS.createSpanningCellManager=e=>{const{spanningCellConfigs:t,columnsConfig:i}=e,a=t.map(e=>(0,n.makeRangeConfig)(e,i)),c={};let u=[],l=[];return{getContainingRange:(t,n)=>{var r;const i=(null==n?void 0:n.mapped)?l[t.row]:t.row,f=s({...t,row:i},a);if(!f)return;if(0===u.length)return o(f,{...e,rowHeights:u});const p=(e=>{const{row:t,col:n}=e.topLeft;return`${t}/${n}`})(f);return null!==(r=c[p])&&void 0!==r||(c[p]=o(f,{...e,rowHeights:u})),c[p]},inSameRange:(e,t)=>((e,t,n)=>{const o=s(e,n),i=s(t,n);return!(!o||!i)&&(0,r.areCellEqual)(o.topLeft,i.topLeft)})(e,t,a),rowHeights:u,rowIndexMapping:l,setRowHeights:e=>{u=e},setRowIndexMapping:e=>{l=(0,r.flatten)(e.map((e,t)=>Array.from({length:e},()=>t)))}}},KS}var eE,tE,nE={};function rE(){if(eE)return nE;eE=1,Object.defineProperty(nE,"__esModule",{value:!0}),nE.validateSpanningCellConfig=void 0;const e=E_(),t=(e,t,n)=>e<=n&&n<=t;return nE.validateSpanningCellConfig=(n,r)=>{const[s,o]=[n.length,n[0].length];r.forEach((e,t)=>{const{colSpan:n,rowSpan:r}=e;if(void 0===n&&void 0===r)throw new Error(`Expect at least colSpan or rowSpan is provided in config.spanningCells[${t}]`);if(void 0!==n&&n<1)throw new Error(`Expect colSpan is not equal zero, instead got: ${n} in config.spanningCells[${t}]`);if(void 0!==r&&r<1)throw new Error(`Expect rowSpan is not equal zero, instead got: ${r} in config.spanningCells[${t}]`)});const i=r.map(e.calculateRangeCoordinate);i.forEach(({topLeft:e,bottomRight:n},r)=>{if(!(t(0,o-1,e.col)&&t(0,s-1,e.row)&&t(0,o-1,n.col)&&t(0,s-1,n.row)))throw new Error(`Some cells in config.spanningCells[${r}] are out of the table`)});const a=Array.from({length:s},()=>Array.from({length:o}));i.forEach(({topLeft:t,bottomRight:n},r)=>{(0,e.sequence)(t.row,n.row).forEach(s=>{(0,e.sequence)(t.col,n.col).forEach(e=>{if(void 0!==a[s][e])throw new Error(`Spanning cells in config.spanningCells[${a[s][e]}] and config.spanningCells[${r}] are overlap each other`);a[s][e]=r})})})},nE}function sE(){if(tE)return MS;tE=1,Object.defineProperty(MS,"__esModule",{value:!0}),MS.makeTableConfig=void 0;const e=zS(),t=XS(),n=E_(),r=uS(),s=rE();return MS.makeTableConfig=(o,i={},a)=>{var c,u,l,f,p;(0,r.validateConfig)("config.json",i),(0,s.validateSpanningCellConfig)(o,null!==(c=i.spanningCells)&&void 0!==c?c:[]);const d=null!==(u=null!=a?a:i.spanningCells)&&void 0!==u?u:[],h=((t,n,r,s)=>{const o=(0,e.calculateMaximumColumnWidths)(t,s);return t[0].map((e,t)=>({alignment:"left",paddingLeft:1,paddingRight:1,truncate:Number.POSITIVE_INFINITY,verticalAlignment:"top",width:o[t],wrapWord:!1,...r,...null==n?void 0:n[t]}))})(o,i.columns,i.columnDefault,d),m=null!==(l=i.drawVerticalLine)&&void 0!==l?l:()=>!0,g=null!==(f=i.drawHorizontalLine)&&void 0!==f?f:()=>!0;return{...i,border:(0,n.makeBorderConfig)(i.border),columns:h,drawHorizontalLine:g,drawVerticalLine:m,singleLine:null!==(p=i.singleLine)&&void 0!==p&&p,spanningCellManager:(0,t.createSpanningCellManager)({columnsConfig:h,drawHorizontalLine:g,drawVerticalLine:m,rows:o,spanningCellConfigs:d})}},MS}var oE,iE,aE={};function cE(){if(oE)return aE;oE=1,Object.defineProperty(aE,"__esModule",{value:!0}),aE.validateTableData=void 0;const e=E_();return aE.validateTableData=t=>{if(!Array.isArray(t))throw new TypeError("Table data must be an array.");if(0===t.length)throw new Error("Table must define at least one row.");if(0===t[0].length)throw new Error("Table must define at least one column.");const n=t[0].length;for(const r of t){if(!Array.isArray(r))throw new TypeError("Table row data must be an array.");if(r.length!==n)throw new Error("Table must have a consistent number of cells.");for(const t of r)if(/[\u0001-\u0006\u0008\u0009\u000B-\u001A]/.test((0,e.normalizeString)(String(t))))throw new Error("Table data must not contain control characters.")}},aE}function uE(){if(iE)return PS;iE=1,Object.defineProperty(PS,"__esModule",{value:!0}),PS.table=void 0;const e=A_(),t=xS(),n=z_(),r=LS(),s=IS(),o=sE(),i=dS(),a=gS(),c=vS(),u=AS(),l=E_(),f=cE();return PS.table=(p,d={})=>{(0,f.validateTableData)(p);let h=(0,c.stringifyTableData)(p);const[m,g]=(0,s.injectHeaderConfig)(h,d),y=(0,o.makeTableConfig)(m,d,g);h=(0,u.truncateTableData)(m,(0,l.extractTruncates)(y));const b=(0,n.calculateRowHeights)(h,y);y.spanningCellManager.setRowHeights(b),y.spanningCellManager.setRowIndexMapping(b),h=(0,i.mapDataUsingRowHeights)(h,b,y),h=(0,e.alignTableData)(h,y),h=(0,a.padTableData)(h,y);const v=(0,t.calculateOutputColumnWidths)(y);return(0,r.drawTable)(h,v,b,y)},PS}var lE,fE,pE={};function dE(){return lE||(lE=1,Object.defineProperty(pE,"__esModule",{value:!0})),pE}function hE(){return fE||(fE=1,function(e){var t=Iw&&Iw.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=Iw&&Iw.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.getBorderCharacters=e.createStream=e.table=void 0;const r=CS();Object.defineProperty(e,"createStream",{enumerable:!0,get:function(){return r.createStream}});const s=S_();Object.defineProperty(e,"getBorderCharacters",{enumerable:!0,get:function(){return s.getBorderCharacters}});const o=uE();Object.defineProperty(e,"table",{enumerable:!0,get:function(){return o.table}}),n(dE(),e)}(Iw)),Iw}var mE=hE();const gE=e=>e.toString().padStart(2,"0"),yE=e=>{e<0&&(e=0);const t=Math.floor(e/1e3),n=Math.floor(t/60),r=t%60;return`${gE(n)}:${gE(r)}`},bE=e=>{if(_w()){if("warn"===e)return"[WARN]";switch(e){case"waiting":return"[WAIT]";case"run":return"[RUN]";case"ok":return"[OK]";case"error":return"[FAIL]";case"cancelled":return"[CANCELLED]";case"timeout":return"[TIMEOUT]";case"quiet":return"[QUIET]";case"stalled":return"[STALLED]";case"killed":return"[KILLED]";default:return""}}switch(e){case"warn":return Pw("⚠︎ warn");case"waiting":return Ow("⏸︎ waiting");case"run":return kw("▶︎ run");case"ok":return Sw("✔︎ ok");case"error":return Aw("✖︎ fail");case"cancelled":return Cw("◼︎ cancelled");case"timeout":return Aw("⏱︎ timeout");case"quiet":return Ew("⏱︎ quiet");case"stalled":return Pw("⏱︎ stalled");case"killed":return Aw("◼︎ killed");default:return""}},vE=e=>e.replace(/\\/g,"/"),DE=(e,t)=>{if(!t)return"";const n=t;return d.isAbsolute(n)?vE(d.relative(e,n)):vE(n)},wE=e=>{const{state:t,cwd:n,now:r}=e,s=(e=>{switch(e.kind){case"warn":return"warn";case"waiting":default:return"waiting";case"running":return"run";case"quiet":return"quiet";case"stalled":return"stalled";case"done":return"ok";case"error":return"error";case"timedout":return"timeout";case"cancelled":return"cancelled";case"killed":return"killed"}})(t);let o="";if("running"===t.kind||"quiet"===t.kind||"stalled"===t.kind){const e="number"==typeof t.startedAt?t.startedAt:(r??Date.now)();o=yE(Math.max(0,(r??Date.now)()-e))}else"number"==typeof t.durationMs&&(o=yE(Math.max(0,t.durationMs)));const i="done"===t.kind||"warn"===t.kind||"error"===t.kind||"timedout"===t.kind||"cancelled"===t.kind||"killed"===t.kind?DE(n,t.outputPath):"";return{label:bE(s),time:o,output:i}},_E=e=>e.startsWith("script:")?{type:"script",item:e.slice(7)||"(unnamed)"}:e.startsWith("archive:")?{type:"archive",item:e.slice(8)||"(unnamed)"}:void 0,SE=e=>{const t={warn:0,waiting:0,running:0,quiet:0,stalled:0,ok:0,cancelled:0,fail:0,timeout:0};for(const{state:n}of e)"warn"===n.kind?t.warn+=1:"waiting"===n.kind?t.waiting+=1:"running"===n.kind?t.running+=1:"quiet"===n.kind?t.quiet+=1:"stalled"===n.kind?t.stalled+=1:"done"===n.kind?t.ok+=1:"timedout"===n.kind?t.timeout+=1:"cancelled"===n.kind?t.cancelled+=1:["error","killed"].includes(n.kind)&&(t.fail+=1);return t},EE=e=>{const{rows:t,startedAt:n,boring:r,uiId:s,includeHint:o}=e,i=["Type","Item","Status","Time","Output"].map(e=>Tw(e)),a=[];if(a.push(i),0===t.length){const e=yE(Date.now()-n);a.push(["—","—",r?"[IDLE]":"idle",e,""])}else for(const e of t){const t=e.state,n=wE({state:t,cwd:process.cwd(),now:()=>Date.now()});a.push([e.type,e.item,n.label,n.time,n.output])}const c=(e=>mE.table(e,{columnDefault:{paddingLeft:0,paddingRight:2},border:{topBody:"",topJoin:"",topLeft:"",topRight:"",bottomBody:"",bottomJoin:"",bottomLeft:"",bottomRight:"",bodyLeft:"",bodyRight:"",bodyJoin:"",joinBody:"",joinLeft:"",joinRight:"",joinJoin:""},drawHorizontalLine:()=>!1,columns:{0:{alignment:"left"},1:{alignment:"left"},2:{alignment:"left"},3:{alignment:"left"},4:{alignment:"left"}}}))(a),u=((e,t,n)=>n?[e,`waiting ${t.waiting.toString()}`,`running ${t.running.toString()}`,`quiet ${t.quiet.toString()}`,`stalled ${t.stalled.toString()}`,`timeout ${t.timeout.toString()}`,`ok ${t.ok.toString()}`,`warn ${t.warn.toString()}`,`fail ${t.fail.toString()}`,`cancelled ${t.cancelled.toString()}`].join(" • "):[e,Ow(`⏸︎ ${t.waiting.toString()}`),kw(`▶︎ ${t.running.toString()}`),Ew(`⏱︎ ${t.quiet.toString()}`),Pw(`⏱︎ ${t.stalled.toString()}`),Aw(`⏱︎ ${t.timeout.toString()}`),Sw(`✔︎ ${t.ok.toString()}`),Pw(`⚠︎ ${t.warn.toString()}`),Aw(`✖︎ ${t.fail.toString()}`),Cw(`◼︎ ${t.cancelled.toString()}`)].join(" • "))(yE(Date.now()-n),SE(t.map(e=>({state:e.state}))),r),l=o?`\n${(e=>{const t="1"===process.env.STAN_TEST_UI_TAG?` UI#${e.toString()}`:"";return`${xw("Press")} ${Tw("q")} ${xw("to cancel,")} ${Tw("r")} ${xw("to restart")}${t}`})(s)}`:"",f=`\n${`${c.trimEnd()}\n\n${u}${l}`}\n`;if("1"===process.env.STAN_LIVE_DEBUG)try{const e=/(?:^|\n)Type\s+Item\s+Status\s+Time\s+Output(?:\n|$)/g,t=((e=>{try{return e.replace(/\x1B\[[0-?]*[ -/]*[@-~]/g,"")}catch{return e}})(f).match(e)??[]).length;console.error("[stan:live:frame]",{headerMatches:t,includeHint:o})}catch{}return f},kE="[",AE=`${kE}?25l`,CE=`${kE}?25h`,OE=`${kE}K`,PE=e=>e>0?`${kE}${String(e)}F`:"",TE=`${kE}1E`,xE=()=>{const e=process.stdout;let t=0;return{start(){try{e.write(AE)}catch{}},write(n){try{const r=n.endsWith("\n")?n:`${n}\n`;(n=>{let r="";t>0&&(r+=PE(t));for(let e=0;e<n.length;e+=1){const s=n[e]??"";r+=0===t&&0===e&&""===s?"\n":`\r${OE}${s}\n`}const s=t-n.length;for(let e=0;e<s;e+=1)r+=`\r${OE}`,e<s-1&&(r+=TE);e.write(r),t=n.length})(r.split("\n"))}catch{}},clear(){try{let n="";t>0&&(n+=PE(t));for(let e=0;e<t;e+=1)n+=`\r${OE}\n`;e.write(n),t=0}catch{}},done(){try{e.write(CE)}catch{}}}},NE=(()=>{try{return"1"===process.env.STAN_LIVE_DEBUG}catch{return!1}})(),$E=(e,t,n)=>{if(NE)try{n&&Object.keys(n).length>0?console.error(`[stan:live:${e}] ${t}`,n):console.error(`[stan:live:${e}] ${t}`)}catch{}},LE={get enabled(){return NE},renderer:{start(e){$E("renderer","start()",e)},update(e){$E("renderer","update()",e)},render(e){$E("renderer","render()",e)},headerOnly(e){$E("renderer","render(header-only)",e)},flush(){$E("renderer","flush()")},clear(){$E("renderer","clear()")},stop(){$E("renderer","stop()")},done(){$E("renderer","stop():done()")}},ui:{start(){$E("UI","start()")},installCancellation(){$E("UI","installCancellation(): control.attach()")},onCancelled(e){$E("UI","onCancelled()",{mode:e})},stop(){$E("UI","stop() -> sink.stop()")}},session:{info(e,t){$E("session",e,t)},exitHook(){$E("session","exit hook fired: ui.stop + supervisor cancel + pause stdin")}}};let RE=1;const FE=()=>Date.now();class IE{rows=new Map;opts;frameNo=0;timer;startedAt=FE();writer=null;uiId;constructor(e){this.opts={boring:Boolean(e?.boring),refreshMs:e?.refreshMs??1e3},this.uiId=RE++}resetElapsed(){this.startedAt=FE(),this.frameNo=0}finalize(){this.timer&&clearInterval(this.timer),this.timer=void 0,this.renderFinalNoHint(),LE.renderer.stop(),LE.renderer.done(),this.writer?.done()}flush(){LE.renderer.flush(),this.render()}resetRows(){this.rows.clear()}start(){LE.renderer.start({refreshMs:this.opts.refreshMs}),this.timer||(this.writer||(this.writer=xE()),this.writer.start(),this.timer=setInterval(()=>{this.render()},this.opts.refreshMs))}clear(){LE.renderer.clear(),this.writer?.clear()}stop(){LE.renderer.stop(),this.timer&&clearInterval(this.timer),this.timer=void 0,LE.renderer.done(),this.writer?.done()}update(e,t,n){const r=this.rows.get(e),s=n??_E(e)??(r?.type?{type:r.type,item:r.item}:void 0);if(!s){const n={type:"script",item:e};return void this.rows.set(e,{...n,state:{...r?.state??{},...t}})}this.rows.set(e,{...s,state:{...r?.state??{},...t}}),LE.renderer.update({key:e,kind:t.kind,rowsSize:this.rows.size})}cancelPending(){const e=FE();for(const[t,n]of this.rows.entries()){const r=n.state;switch(r.kind){case"waiting":this.update(t,{kind:"cancelled"});break;case"running":case"quiet":case"stalled":{const n="number"==typeof r.startedAt?r.startedAt:void 0,s="number"==typeof n?Math.max(0,e-n):0;this.update(t,{kind:"cancelled",durationMs:s});break}}}}renderFinalNoHint(){let e=EE({rows:Array.from(this.rows.values()),startedAt:this.startedAt,boring:this.opts.boring,uiId:this.uiId,includeHint:!1});e.endsWith("\n")||(e+="\n"),e+="\n",this.writer?.write(e)}render(){const e=EE({rows:Array.from(this.rows.values()),startedAt:this.startedAt,boring:this.opts.boring,uiId:this.uiId,includeHint:!0});if(this.frameNo+=1,LE.enabled)try{const e=SE(this.rows.values()),t=Array.from(this.rows.keys()).slice(0,5);LE.renderer.render({frameNo:this.frameNo,rowsSize:this.rows.size,keys:t,headerCount:1,hasHint:!0,counts:e})}catch{}this.writer?.write(e)}}var jE,ME;var BE=function(){if(ME)return jE;ME=1;var e=$,t=e.spawn,n=e.exec;function r(e,t,n){var r={};try{Object.keys(e).forEach(function(n){e[n].forEach(function(e){r[e]||(s(e,t),r[e]=1)}),r[n]||(s(n,t),r[n]=1)})}catch(e){if(n)return n(e);throw e}if(n)return n()}function s(e,t){try{process.kill(parseInt(e,10),t)}catch(e){if("ESRCH"!==e.code)throw e}}function o(e,t,n,r,s){var i=r(e),a="";i.stdout.on("data",function(e){e=e.toString("ascii");a+=e});i.on("close",function(i){delete n[e],0==i?a.match(/\d+/g).forEach(function(i){i=parseInt(i,10),t[e].push(i),t[i]=[],n[i]=1,o(i,t,n,r,s)}):0==Object.keys(n).length&&s()})}return jE=function(e,s,i){if("function"==typeof s&&void 0===i&&(i=s,s=void 0),e=parseInt(e),Number.isNaN(e)){if(i)return i(new Error("pid must be a number"));throw new Error("pid must be a number")}var a={},c={};switch(a[e]=[],c[e]=1,process.platform){case"win32":n("taskkill /pid "+e+" /T /F",i);break;case"darwin":o(e,a,c,function(e){return t("pgrep",["-P",e])},function(){r(a,s,i)});break;default:o(e,a,c,function(e){return t("ps",["-o","pid","--no-headers","--ppid",e])},function(){r(a,s,i)})}}}(),zE=Mg(BE);class HE{behavior;constructor(e){this.behavior=e}pids=new Map;lastCancelled=[];track(e,t){this.pids.set(e,t)}cancelAll(e){const t="number"==typeof this.behavior.hangKillGrace?this.behavior.hangKillGrace:10,n=e?.immediate?0:Math.max(0,1e3*t),r=Array.from(this.pids.entries()),s=Array.from(this.pids.values());this.lastCancelled=s;for(const[,e]of r)try{Number.isFinite(e)&&process.kill(e,"SIGTERM")}catch{}const o=()=>{for(const[,e]of r)try{Number.isFinite(e)&&zE(e,"SIGKILL")}catch{}};n<=0?setTimeout(o,0):setTimeout(o,n),this.pids.clear()}async waitAll(e=2e3){const t=this.lastCancelled.length>0?[...this.lastCancelled]:Array.from(this.pids.values());if(0===t.length)return;const n=Date.now()+Math.max(0,e),r=e=>{try{return process.kill(e,0)}catch{return!1}};for(;Date.now()<n;){if(0===t.filter(e=>r(e)).length)break;await new Promise(e=>setTimeout(e,50))}this.lastCancelled=[]}}class KE{ui;supervisor;cancelled=!1;restartRequested=!1;cancelledKeys=new Set;wake=null;waitP;constructor(e,t){this.ui=e,this.supervisor=t,this.waitP=new Promise(e=>this.wake=e)}markQueued(e){for(const t of e)this.cancelledKeys.add(`script:${t}`)}async wait(){await this.waitP}isCancelled(){return this.cancelled}isRestart(){return this.restartRequested}wasKeyCancelled(e){return this.cancelled&&this.cancelledKeys.has(`script:${e}`)}triggerCancel(){if(!this.cancelled){this.cancelled=!0;try{this.ui.onCancelled("cancel")}catch{}try{this.supervisor.cancelAll({immediate:!0})}catch{}try{process.exitCode=1,"test"!==process.env.NODE_ENV&&process.exit(1)}catch{}try{this.wake?.()}catch{}}}triggerRestart(){if(!this.restartRequested){this.restartRequested=!0,this.cancelled=!0;try{this.ui.onCancelled("restart")}catch{}try{this.supervisor.cancelAll({immediate:!0})}catch{}try{this.wake?.()}catch{}}}detachUiKeys(){try{LE.session.info("restart: detach keys")}catch{}}}let UE=null;function qE(e){return UE===e}const JE=(e,n)=>{const r=n.PATH??n.Path??"",s=(e=>{const n=[];let r=e;for(;;){const e=g(r,"node_modules",".bin");try{t(e)&&n.push(e)}catch{}const s=m(r);if(s===r)break;r=s}return n})(e);return{...n,PATH:[...s,r].filter(Boolean).join(y)}},ZE=async(e,t,n,r,o,i,c,u,l)=>{const p=h(t,`${r}.txt`),d=Date.now();c?.onStart?.(r);const m=s(p,{encoding:"utf8"}),g=E(o,{cwd:e,shell:!0,windowsHide:!0,env:JE(e,process.env)}),y="1"===process.env.STAN_DEBUG;let b="";const v="number"==typeof u?.hangWarn&&u.hangWarn>0?u.hangWarn:0,D="number"==typeof u?.hangKill&&u.hangKill>0?u.hangKill:0,w="number"==typeof u?.hangKillGrace&&u.hangKillGrace>0?u.hangKillGrace:10;let _,S,k=Date.now(),A=!1,C=!1;try{"number"==typeof g.pid&&l&&l.track(`script:${r}`,g.pid)}catch{}g.stdout.on("data",e=>{m.write(e),b+=e.toString("utf8"),y&&process.stdout.write(e),k=Date.now()}),g.stderr.on("data",e=>{m.write(e),b+=e.toString("utf8"),y&&process.stderr.write(e),k=Date.now()}),(v>0||D>0)&&(_=setInterval(()=>{const e=Date.now()-k;if(!A&&v>0&&e>=1e3*v&&(A=!0,c?.onHangWarn?.(r,v)),!C&&D>0&&e>=1e3*D){C=!0;try{"number"==typeof g.pid&&process.kill(g.pid,"SIGTERM")}catch{}c?.onHangTimeout?.(r,D);const e=Math.max(0,1e3*w);S=setTimeout(()=>{try{"number"==typeof g.pid&&zE(g.pid,"SIGKILL")}catch{}c?.onHangKilled?.(r,w)},e)}},1e3));const O=await new Promise((e,t)=>{g.on("error",e=>{t(e instanceof Error?e:new Error(String(e)))}),g.on("close",t=>{e(t??0)})});_&&clearInterval(_),S&&clearTimeout(S),m.end(),await(e=>new Promise((t,n)=>{e.on("close",()=>{t()}),e.on("error",e=>{n(e instanceof Error?e:new Error(String(e)))})}))(m);let P="ok";if("number"==typeof O&&0!==O)P="error";else if(u?.warnPatterns&&u.warnPatterns.length>0){const e=(e,t)=>e.some(e=>{try{return e.lastIndex=0,e.test(t)}catch{return!1}});let t=!1;if(b.length>0&&e(u.warnPatterns,b))t=!0;else try{const n=await a(p,"utf8");e(u.warnPatterns,n)&&(t=!0)}catch{}t&&(P="warn")}return c?.onEnd?.(r,p,d,Date.now(),O,P),i&&await f(i,r.slice(0,1).toUpperCase(),"utf8"),p},GE=()=>{let e=0;return(()=>{try{const e=process.env.CI,t=("string"==typeof e?e:"").trim().toLowerCase();return""!==t&&"0"!==t&&"false"!==t}catch{return!1}})()&&(e+=25),"win32"!==process.platform&&(e+=10),25+e},WE=async(e,t,n,r,s,o,i,a,c,u,l)=>{const f=[],p=async n=>{try{if("function"==typeof u&&!u())return}catch{}const s=r.scripts[n],o="string"==typeof s?s:"object"==typeof s&&s&&"script"in s?s.script:"",p=s&&"object"==typeof s&&"warnPattern"in s?((e,t)=>{if("string"!=typeof e||!e.trim())return[];const n=e.trim(),r=[],s=(e,t)=>{try{r.push(new RegExp(e,t))}catch{}};if("string"==typeof t&&t.length>0){s(n,t);const e=n.replace(/\\\\/g,"\\");e!==n&&s(e,t)}else{s(n);const e=n.replace(/\\\\/g,"\\");e!==n&&s(e),s(n,"i")}return r})(s.warnPattern,s.warnPatternFlags):[],d=await ZE(e,t,0,n,o,i,a,{silent:a.silent,hangWarn:c?.hangWarn,hangKill:c?.hangKill,hangKillGrace:c?.hangKillGrace,warnPatterns:p},l);f.push(d)};if("sequential"===o)for(const e of s){const t=e=>new Promise(t=>setTimeout(t,e));if("function"==typeof u){if(!u())break;if(await ZD(),!u())break;if(await t(GE()),!u())break;if(await ZD(),!u())break}if(await p(e),"function"==typeof u){if(await ZD(),!u())break;if(await t(Math.max(5,GE()/2)),!u())break;if(await ZD(),!u())break}}else{const e="function"==typeof u?s.filter(()=>u()):s;await Promise.all(e.map(e=>p(e).then(()=>{})))}return f},VE=async e=>{const{cwd:t,outAbs:n,outRel:r,config:s,toRun:o,mode:i,orderFile:a,ui:c,epoch:u,isActive:l,shouldContinue:f,supervisor:p,liveEnabled:d,hangWarn:h,hangKill:m,hangKillGrace:g}=e,y=[],b=WE(t,n,0,s,o,i,a,{onStart:e=>{l(u)&&c.onScriptStart(e)},onEnd:(e,n,r,s,o,i)=>{if(l(u)&&(c.onScriptEnd(e,n,t,r,s,o,i),"error"===i||"number"==typeof o&&0!==o))try{process.exitCode=1}catch{}},silent:!0,onHangWarn:(e,t)=>{l(u)&&(d||((e,t)=>{try{console.log(`stan: ⏱ stalled "${e}" after ${t.toString()}s of inactivity`)}catch{}})(e,t))},onHangTimeout:(e,t)=>{l(u)&&(d||((e,t)=>{try{console.log(`stan: ⏱ timeout "${e}" after ${t.toString()}s; sending SIGTERM`)}catch{}})(e,t))},onHangKilled:(e,t)=>{l(u)&&(d||((e,t)=>{try{console.log(`stan: ◼ killed "${e}" after ${t.toString()}s grace`)}catch{}})(e,t))}},{hangWarn:h,hangKill:m,hangKillGrace:g},f,p).then(e=>{y.push(...e)});return await b.catch(()=>{}),y},YE=[];YE.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&YE.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&YE.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const QE=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,XE=Symbol.for("signal-exit emitter"),ek=globalThis,tk=Object.defineProperty.bind(Object);class nk{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(ek[XE])return ek[XE];tk(ek,XE,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const n=this.listeners[e],r=n.indexOf(t);-1!==r&&(0===r&&1===n.length?n.length=0:n.splice(r,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(const s of this.listeners[e])r=!0===s(t,n)||r;return"exit"===e&&(r=this.emit("afterExit",t,n)||r),r}}class rk{}const sk=globalThis.process,{onExit:ok}=(ik=QE(sk)?new class extends rk{#e="win32"===sk.platform?"SIGINT":"SIGHUP";#t=new nk;#n;#r;#s;#o={};#i=!1;constructor(e){super(),this.#n=e,this.#o={};for(const t of YE)this.#o[t]=()=>{const n=this.#n.listeners(t);let{count:r}=this.#t;const s=e;if("object"==typeof s.__signal_exit_emitter__&&"number"==typeof s.__signal_exit_emitter__.count&&(r+=s.__signal_exit_emitter__.count),n.length===r){this.unload();const n=this.#t.emit("exit",null,t),r="SIGHUP"===t?this.#e:t;n||e.kill(e.pid,r)}};this.#s=e.reallyExit,this.#r=e.emit}onExit(e,t){if(!QE(this.#n))return()=>{};!1===this.#i&&this.load();const n=t?.alwaysLast?"afterExit":"exit";return this.#t.on(n,e),()=>{this.#t.removeListener(n,e),0===this.#t.listeners.exit.length&&0===this.#t.listeners.afterExit.length&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#t.count+=1;for(const e of YE)try{const t=this.#o[e];t&&this.#n.on(e,t)}catch(e){}this.#n.emit=(e,...t)=>this.#a(e,...t),this.#n.reallyExit=e=>this.#c(e)}}unload(){this.#i&&(this.#i=!1,YE.forEach(e=>{const t=this.#o[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#n.removeListener(e,t)}catch(e){}}),this.#n.emit=this.#r,this.#n.reallyExit=this.#s,this.#t.count-=1)}#c(e){return QE(this.#n)?(this.#n.exitCode=e||0,this.#t.emit("exit",this.#n.exitCode,null),this.#s.call(this.#n,this.#n.exitCode)):0}#a(e,...t){const n=this.#r;if("exit"===e&&QE(this.#n)){"number"==typeof t[0]&&(this.#n.exitCode=t[0]);const r=n.call(this.#n,e,...t);return this.#t.emit("exit",this.#n.exitCode,null),r}return n.call(this.#n,e,...t)}}(sk):new class extends rk{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>ik.onExit(e,t),load:()=>ik.load(),unload:()=>ik.unload()});var ik;const ak=(e,t)=>{try{LE.session.info("install SIGINT handler"),process.on("SIGINT",e)}catch{}const n=(r=t,ok(()=>{try{const e=r();e&&"function"==typeof e.then&&e.catch(()=>{})}catch{}}));var r;return()=>{try{LE.session.info("detach SIGINT handler"),process.off("SIGINT",e)}catch{}try{LE.session.info("uninstall exit hook"),n()}catch{}}},ck=(e,t)=>d.join(e,t,"system",".docs.meta.json"),uk=async e=>S("sha256").update(await a(e)).digest("hex"),lk=async(e,t,n)=>{const r=d.join(e,t,"imports");try{const e=await i(r,{withFileTypes:!0});await Promise.all(e.map(e=>u(h(r,e.name),{recursive:!0,force:!0})))}catch{}if(n&&"object"==typeof n)try{await(async e=>{const{cwd:t,stanPath:n,map:r,onStage:s}=e;if(!r||"object"!=typeof r)return;const i=bc(t,n),a=d.join(i.rootAbs,"imports");await b(a);const c=Object.keys(r).sort();for(const e of c){const n=r[e]??[];if(!Array.isArray(n)||0===n.length)continue;const i=jf(e);if(!i)continue;const c=d.join(a,i);await u(c,{recursive:!0,force:!0}).catch(()=>{}),await b(c).catch(()=>{});const l=[];for(const e of n){const n=e.trim();if(!n)continue;const r=Ff(n.replace(/\\/g,"/"));try{const e=await Lf(n,{cwd:t,absolute:!0,dot:!0,onlyFiles:!1,followSymbolicLinks:!1});for(const n of e){if(!await Mf(n))continue;const e=d.relative(d.isAbsolute(r)?r:d.resolve(t,r),n).replace(/\\/g,"/");if(!e||e.includes(".."))continue;const s=d.join(c,e);await b(d.dirname(s)).catch(()=>{});try{await o(n,s),l.push(s)}catch{}}}catch{}}try{"function"==typeof s&&s(i,l.map(e=>d.relative(t,e).replace(/\\/g,"/")))}catch{}}})({cwd:e,stanPath:t,map:n})}catch{}},fk=async e=>{try{const t=await i(e,{withFileTypes:!0}),n=new Set(["archive.tar","archive.diff.tar"]);await Promise.all(t.map(async t=>{n.has(t.name)||await u(h(e,t.name),{recursive:!0,force:!0})}))}catch{}},pk=async(e,t)=>{const n=d.join(e,t,"patch");try{const e=await i(n,{withFileTypes:!0});await Promise.all(e.map(e=>u(h(n,e.name),{recursive:!0,force:!0})))}catch{}},dk=e=>"diff"===e?"archive (diff)":"archive";var hk=Object.freeze({__proto__:null,archivePhase:async(e,n)=>{const{cwd:r,config:s,includeOutputs:i}=e,a=Boolean(n?.silent),c=n?.which??"both",l=!1!==n?.stage,f=!1!==n?.cleanup,p=((e,t)=>{const n=d.join(e,t),r=d.join(n,"system");return{base:n,system:r,output:d.join(n,"output"),diff:d.join(n,"diff"),patch:d.join(n,"patch"),systemFile:d.join(r,"stan.system.md")}})(r,s.stanPath),m="function"==typeof n?.shouldContinue?n.shouldContinue:void 0,g=((e,t)=>{const n=Array.isArray(t)?t.filter(e=>"string"==typeof e&&e.length>0):[],r=(e=>{const t=(e=>{const t="string"==typeof e?e.trim():"",n=(r=t,r.replace(/\\+/g,"/")).replace(/\/+$/,"");var r;return n.length>0?n:t.startsWith("/")?"":".stan"})(e);return`${t}/imports/**`})(e);return n.includes(r)?n:[...n,r]})(s.stanPath,s.includes??[]);let y,b;a||"both"!==c&&"full"!==c||console.log(`stan: start "${Ew("archive")}"`);try{if(l){if(m&&!m())return{archivePath:y,diffPath:b};await lk(r,s.stanPath,s.imports)}if("both"===c||"full"===c){if(m&&!m())return{archivePath:y,diffPath:b};n?.progress?.start?.("full");const e=Date.now();if(y=await async function(e,n,r={}){const{includeOutputDir:s=!1,fileName:i,includes:a=[],excludes:c=[],anchors:u=[]}=r;let l=i??"archive.tar";l.endsWith(".tar")||(l+=".tar");const{outDir:f,diffDir:p}=await be(e,n),d=await de(e),m=await ge(d,{cwd:e,stanPath:n,includeOutputDir:s,includes:a,excludes:c,anchors:u}),g=h(f,l),y=h(p,I);if(t(g))try{await o(g,y)}catch{}const b=await(async()=>{try{const e=await import("./classifier-Bqzr65UC-DJLYQY2b.js"),t=e.classifyForArchive,n=e.default?.classifyForArchive,r="function"==typeof t?t:n;if("function"==typeof r)return r}catch{}throw new Error("classifyForArchive export not found in ./classifier")})(),{textFiles:v,warningsBody:D}=await b(e,m),w=v;U(D,r.onArchiveWarnings);const _=await import("./index-CQYvnMvw-r3et3BtD.js");if(s?await _.create({file:g,cwd:e,filter:H(n)},K(w,n)):await _.create({file:g,cwd:e,filter:H(n)},w),!t(y))try{await o(g,y)}catch{}return g}(r,s.stanPath,{includeOutputDir:i,includes:g,excludes:s.excludes??[],anchors:s.anchors??[]}),n?.progress?.done?.("full",y,e,Date.now()),m&&!m()){try{await u(y,{force:!0})}catch{}return{archivePath:void 0,diffPath:b}}a||console.log(`stan: ${Sw("done")} "${Ew("archive")}" -> ${Ew(y.replace(/\\/g,"/"))}`)}if(a||"both"!==c&&"diff"!==c||console.log(`stan: start "${Ew("archive (diff)")}"`),"both"===c||"diff"===c){if(m&&!m())return{archivePath:y,diffPath:b};n?.progress?.start?.("diff");const e=Date.now();if(b=(await wc({cwd:r,stanPath:s.stanPath,baseName:"archive",includes:g,excludes:s.excludes??[],anchors:s.anchors??[],updateSnapshot:"createIfMissing",includeOutputDirInDiff:i})).diffPath,n?.progress?.done?.("diff",b,e,Date.now()),m&&!m()){try{await u(b,{force:!0})}catch{}return{archivePath:y,diffPath:void 0}}a||console.log(`stan: ${Sw("done")} "${Ew("archive (diff)")}" -> ${Ew(b.replace(/\\/g,"/"))}`)}}finally{}return f&&(i&&await fk(p.output),await pk(r,s.stanPath)),{archivePath:y,diffPath:b}},archivePrintable:dk,cleanupOutputsAfterCombine:fk,cleanupPatchDirAfterArchive:pk,stageImports:lk});const mk=async e=>{const{cwd:t,stanPath:n,promptAbs:r}=e;let s,o=!1;try{r&&(s=await uk(r))}catch{s=void 0}try{const e=await(async(e,t)=>{try{const n=await a(ck(e,t),"utf8"),r=JSON.parse(n);if(r&&"object"==typeof r)return r}catch{}return null})(t,n),r=e?.prompt&&"object"==typeof e.prompt?e.prompt.hash:void 0;r&&s?o=r!==s:r&&s||(o=!1)}catch{o=!1}return o},gk=e=>e instanceof URL?D(e):e;function yk({cwd:t}={}){const n=function(t,{cwd:n=v.cwd(),type:r="file",stopAt:s}={}){let o=d.resolve(gk(n)??"");const{root:i}=d.parse(o);s=d.resolve(o,gk(s)??i);const a=d.isAbsolute(t);for(;o;){const n=a?t:d.join(o,t);try{const t=e.statSync(n,{throwIfNoEntry:!1});if("file"===r&&t?.isFile()||"directory"===r&&t?.isDirectory())return n}catch{}if(o===s||o===i)break;o=d.dirname(o)}}("package.json",{cwd:t});return n&&d.dirname(n)}const bk=()=>{try{const e=(()=>{const e=(()=>{try{const e=D(import.meta.url);return we({cwd:d.dirname(e)})??null}catch{return null}})();if(!e)return null;const n=d.join(e,"dist","stan.system.md");return t(n)?n:null})();if(e&&t(e))return e}catch{}try{const e=L(import.meta.url).resolve("@karmaniverous/stan-core"),n=yk({cwd:d.dirname(e)})??null;if(n){const e=d.join(n,"dist","stan.system.md");if(t(e))return e}}catch{}try{const e=L(import.meta.url).resolve("@karmaniverous/stan-core/dist/stan.system.md");if(e&&t(e))return e}catch{}return null},vk=e=>d.join(e,"system","stan.system.md"),Dk=async e=>{const t=await a(e);return Buffer.from(t)},wk=(e,n,r)=>{const s=d.join(e,vk(n)),o=bk();if("local"===r){if(!t(s))throw new Error(`system prompt not found at ${d.join(n,"system","stan.system.md").replace(/\\/g,"/")}`);return{abs:s,display:d.join(n,"system","stan.system.md").replace(/\\/g,"/"),kind:"local"}}if("core"===r){if(!o||!t(o))throw new Error("packaged system prompt not found in @karmaniverous/stan-core");return{abs:o,display:`@karmaniverous/stan-core@${Bf}`,kind:"core"}}if("auto"===r){if(t(s))return{abs:s,display:d.join(n,"system","stan.system.md").replace(/\\/g,"/"),kind:"local"};if(o&&t(o))return{abs:o,display:`@karmaniverous/stan-core@${Bf}`,kind:"core"};try{const e=(()=>{try{const e=D(import.meta.url),n=yk({cwd:d.dirname(e)})??null;if(n){const e=d.join(n,"dist","stan.system.md");if(t(e))return e}}catch{}return null})();if(e&&t(e))return{abs:e,display:e.replace(/\\/g,"/"),kind:"path"}}catch{}throw new Error("unable to resolve system prompt (auto: local and core unavailable)")}const i=d.isAbsolute(r)?r:d.join(e,r);if(!t(i))throw new Error(`system prompt not found at ${i.replace(/\\/g,"/")}`);return{abs:i,display:i.replace(/\\/g,"/"),kind:"path"}},_k=async e=>{const{cwd:n,stanPath:r,promptAbs:s,promptDisplay:o}=e;try{const{restore:e}=await(async(e,n,r)=>{const s=d.join(e,vk(n)),o=d.dirname(s),i=t(s);let a=null;if(i)try{a=await Dk(s)}catch{a=null}const l=await Dk(r.abs),f=i&&null!==a&&a.length===l.length&&a.equals(l);return f||(await p(o,{recursive:!0}),await c(s,l)),{changed:!f,restore:async()=>{if(!f)try{i&&null!==a?await c(s,a):await u(s,{force:!0})}catch{}}}})(n,r,{abs:s,display:o,kind:"path"});return e}catch(e){throw new Error(e instanceof Error?e.message:String(e))}},Sk=async e=>{const{cwd:t,stanPath:n,behavior:r,promptAbs:s,promptDisplay:o,baseFull:i,baseDiff:a,archivePhase:c,stageImports:u,preparePrompt:l,prepareIfNeeded:f,shouldContinue:p,progress:d,ephemeral:h,includeOnChange:m,importsMap:g}=e,y=[],b=Boolean(r.combine);if(h&&"function"==typeof u){if("function"==typeof p&&!p())return y;await u(t,n,(e=>{if(!e)return e;const t={};for(const[n,r]of Object.entries(e))Array.isArray(r)&&(t[n]=r);return Object.keys(t).length?t:null})(g))}const v=async()=>{if("function"==typeof p&&!p())return;const e=!1===m?{...a,excludes:[...a.excludes??[],(r=`${n}/system/stan.system.md`,r.replace(/\\+/g,"/"))]}:a;var r;const s=await c({cwd:t,config:e,includeOutputs:b},{silent:!0,which:"diff",progress:d,shouldContinue:p});s.diffPath&&y.push(s.diffPath)},D=async()=>{if("function"==typeof p&&!p())return;const e=await c({cwd:t,config:i,includeOutputs:b},{silent:!0,which:"full",progress:d,shouldContinue:p});e.archivePath&&y.push(e.archivePath)};if(h){if(!s||"function"!=typeof l)return y;if(m){const e=await l({cwd:t,stanPath:n,promptAbs:s,promptDisplay:o});try{await v(),await D()}finally{await e().catch(()=>{})}return y}await v();const e=await l({cwd:t,stanPath:n,promptAbs:s,promptDisplay:o});try{await D()}finally{await e().catch(()=>{})}return y}const w="function"==typeof f?await f({cwd:t,stanPath:n,promptAbs:s,promptDisplay:o}):null;try{await v(),await D()}finally{await(w?.().catch(()=>{}))}return y};var Ek=Object.freeze({__proto__:null,runArchiveStage:async e=>{const{cwd:t,config:n,behavior:r,ui:s,promptAbs:o,promptDisplay:i,promptSource:u}=e,l="function"==typeof e.shouldContinue?e.shouldContinue:()=>!0,f=[];if(!l())return{created:f,cancelled:!0};const p=(()=>{const e=hk,t=e.archivePhase;if("function"==typeof t)return t;const n=e.default;if("function"==typeof n)return n;if(n&&"object"==typeof n){const e=n.archivePhase;if("function"==typeof e)return e;for(const e of Object.values(n))if("function"==typeof e)return e}if("function"==typeof hk)return hk;throw new Error("archivePhase not found")})(),h=(()=>{const e=hk,t=e.stageImports;if("function"==typeof t)return t;const n=e.default;if("function"==typeof n)return n;if(n&&"object"==typeof n){const e=n.stageImports;if("function"==typeof e)return e;for(const e of Object.values(n))if("function"==typeof e)return e}if("function"==typeof hk)return hk;throw new Error("stageImports not found")})(),m=d.join(t,n.stanPath,"system","stan.system.md"),{full:g,diff:y}=(e=>({full:{stanPath:e.stanPath,includes:e.includes??[],excludes:e.excludes??[],imports:e.imports,anchors:e.anchors??[]},diff:{stanPath:e.stanPath,includes:e.includes??[],excludes:e.excludes??[],imports:e.imports,anchors:e.anchors??[]}}))(n),v=((e,t)=>({start:t=>{e.onArchiveStart(t)},done:(n,r,s,o)=>{e.onArchiveEnd(n,r,t,s,o)}}))(s,t),D=async()=>{try{if(!o||!u)return;const e=await uk(o);await(async(e,t,n)=>{const r=ck(e,t);let s={};try{const e=await a(r,"utf8"),t=JSON.parse(e);t&&"object"==typeof t&&(s=t)}catch{s={}}const o={...s,prompt:{...s.prompt??{},...n}};await b(d.dirname(r)),await c(r,JSON.stringify(o,null,2),"utf8")})(t,n.stanPath,{source:u,hash:e,path:o})}catch{}},w=((e,t)=>{if(!t)return!1;try{return d.resolve(t)!==d.resolve(e)}catch{return!0}})(m,o);if(w){if(!l())return{created:f,cancelled:!0};let e=!0;try{e=await mk({cwd:t,stanPath:n.stanPath,promptAbs:o})}catch{e=!0}try{const s=await Sk({cwd:t,stanPath:n.stanPath,behavior:r,promptAbs:o,promptDisplay:i,baseFull:g,baseDiff:y,archivePhase:p,stageImports:async(e,t,n)=>{try{await h(e,t,n)}catch{}},preparePrompt:({cwd:e,stanPath:t,promptAbs:n,promptDisplay:r})=>_k({cwd:e,stanPath:t,promptAbs:n,promptDisplay:r}),shouldContinue:l,progress:v,ephemeral:!0,includeOnChange:e,importsMap:n.imports});return f.push(...s),await D(),{created:f,cancelled:!1}}catch(e){const t=e instanceof Error?e.message:"string"==typeof e?e:String(e);console.error(`stan: error: failed to prepare system prompt (${t})`),console.log("");try{s.stop()}catch{}return{created:f,cancelled:!0}}}try{if(!l())return{created:f,cancelled:!0};const e=await Sk({cwd:t,stanPath:n.stanPath,behavior:r,promptAbs:o,promptDisplay:i,baseFull:g,baseDiff:y,archivePhase:p,prepareIfNeeded:async({cwd:e,stanPath:t,promptAbs:n,promptDisplay:r})=>n?_k({cwd:e,stanPath:t,promptAbs:n,promptDisplay:r}):null,shouldContinue:l,progress:v,ephemeral:!1});return f.push(...e),await D(),{created:f,cancelled:!1}}catch(e){const t=e instanceof Error?e.message:"string"==typeof e?e:String(e);console.error(`stan: error: failed to prepare system prompt (${t})`),console.log("");try{s.stop()}catch{}return{created:f,cancelled:!0}}}});const kk=async e=>{const t=h(e,"archive.tar"),n=h(e,"archive.diff.tar");await Promise.allSettled([u(t,{force:!0}),u(n,{force:!0})])},Ak=async e=>new Promise(t=>setTimeout(t,Math.max(0,e))),Ck=()=>"win32"===process.platform,Ok=async e=>{const{created:n,ui:r,supervisor:s,detachSignals:o,liveEnabled:i,outAbs:a}=e,c=h(a,"archive.tar"),u=h(a,"archive.diff.tar"),l=()=>!t(c)&&!t(u),f=async()=>{await kk(a).catch(()=>{})};if(await f(),!l()){const e=Ck()?10:6;for(let t=0;t<e&&(await Ak(Ck()?200:40),await f(),!l());t+=1);try{await Ak(Ck()?120:25)}catch{}}try{r.stop()}catch{}if(i)try{console.log("")}catch{}try{await s.waitAll(3e3)}catch{}(()=>{try{process.stdin.pause?.()}catch{}})();try{await Ak(Ck()?160:40)}catch{}try{o()}catch{}return{created:n,cancelled:!0,restartRequested:!1}};async function Pk(e,t){return e.isCancelled()&&!e.isRestart()?await Ok(t):e.isRestart()?(e=>{try{e.detachSignals()}catch{}return{created:e.created,cancelled:!0,restartRequested:!0}})({created:t.created,detachSignals:t.detachSignals}):null}async function Tk(e){const{cancelCtl:t,deps:n,cwd:r,config:s,behavior:o,ui:i,promptAbs:a,promptDisplay:c,supervisor:l}=e,f=await async function(e,t){try{await ZD()}catch{}const n=await Pk(e,t);if(n)return n;try{await Ak(Ck()?300:30)}catch{}return Pk(e,t)}(t,{created:n.created,ui:n.ui,supervisor:l,detachSignals:n.detachSignals,liveEnabled:!0,outAbs:n.outAbs});if(f)return{short:f};const p=(()=>{const e=Ek,t=e.runArchiveStage,n=e.default?.runArchiveStage,r="function"==typeof t?t:"function"==typeof n?n:void 0;if(!r)throw new Error("runArchiveStage not found");return r})(),d=await p({cwd:r,config:s,behavior:o,ui:i,promptAbs:a,promptDisplay:c,shouldContinue:()=>!t.isCancelled()});if(d.cancelled)return{short:{created:n.created,cancelled:!0,restartRequested:!0}};if(t.isCancelled()&&!t.isRestart()){await Promise.all(d.created.map(e=>u(e,{force:!0}))).catch(()=>{}),await kk(n.outAbs).catch(()=>{});try{n.detachSignals()}catch{}return{short:{created:n.created,cancelled:!0,restartRequested:!1}}}return{added:d.created}}async function xk(e,t){const n=await Pk(e,t);if(n)return n;const r=await async function(e,t){try{await ZD()}catch{}return Pk(e,t)}(e,t);if(r)return r;const s=await async function(e,t){try{await Ak(Ck()?25:process.env.CI?20:10),await ZD()}catch{}return Pk(e,t)}(e,t);return s}function Nk(e){const{cwd:t,config:n,selection:r,mode:s,behavior:o,ui:i,planBody:a,printPlan:c,promptChoice:u}=e;let l="",f=null,p=null;try{const e=((e,t,n)=>{const r=(n??"auto").trim(),s=wk(e,t,r);return{display:"auto"===r?`auto → ${s.display}`:s.display,abs:s.abs,kind:s.kind}})(t,n.stanPath,u);l=e.display,f=e.abs,p=e.kind;try{if("1"===process.env.STAN_DEBUG){const t=e.kind||"path",n=(f||"").replace(/\\/g,"/");console.error(`stan: debug: prompt: ${t} ${n}`)}}catch{}}catch(e){const t=e instanceof Error?e.message:"string"==typeof e?e:String(e);console.error(`stan: warn: proceeding without resolved system prompt (${t})`),console.log(""),l="auto (unresolved)",f=null,p=null}if(c&&a)try{((e,t)=>{const{selection:n,config:r,mode:s,behavior:o,planBody:i,ui:a,promptDisplay:c}=t;try{const e=Nw(0,{selection:n,config:r,mode:s,behavior:{...o,prompt:c}});a.onPlan(e)}catch{"string"==typeof i&&i.length&&a.onPlan(i)}console.log("")})(0,{selection:r,config:n,mode:s,behavior:o,planBody:a,ui:i,promptDisplay:l})}catch{}return{display:l,abs:f,source:p}}function $k(e){const{ui:t,selection:n,config:r,includeArchives:s,cancelCtl:o}=e,i=((e,t,n,r)=>{const s=(t??[]).filter(e=>Object.prototype.hasOwnProperty.call(n.scripts,e));for(const t of s)try{e.onScriptQueued(t)}catch{}if(r){try{e.onArchiveQueued("full")}catch{}try{e.onArchiveQueued("diff")}catch{}}return s})(t,n,r,s);o.markQueued(i);try{const e=t.flushNow;"function"==typeof e&&e()}catch{}return i}const Lk="test"===process.env.NODE_ENV||"1"===process.env.STAN_WRITE_ORDER,Rk=async e=>{const{cwd:t,config:n,selection:r,mode:s,behavior:o,liveEnabled:i,planBody:a,printPlan:u,ui:l,promptChoice:f}=e,p=function(){const e=Symbol("session-epoch");return UE=e,e}(),d=h(t,n.stanPath,"output"),m=h(n.stanPath,"output").replace(/\\/g,"/"),g=await(async(e,t,n)=>{if(!e)return;const r=h(t,"order.txt");return n||await c(r,"","utf8"),r})(Lk,d,Boolean(o.keep)),{display:y,abs:b}=Nk({cwd:t,config:n,selection:r,mode:s,behavior:o,ui:l,planBody:a,printPlan:u,promptChoice:f});!function(e){e.start();try{const t=e.flushNow;"function"==typeof t&&t()}catch{}}(l);const v=new HE({hangWarn:o.hangWarn,hangKill:o.hangKill,hangKillGrace:o.hangKillGrace}),D=new KE(l,v);try{l.installCancellation(()=>{D.triggerCancel()},i?()=>{D.triggerRestart()}:void 0)}catch{}const w=ak(()=>{D.triggerCancel()},async()=>{LE.session.exitHook();try{l.stop()}catch{}try{v.cancelAll({immediate:!0})}catch{}try{await v.waitAll(3e3)}catch{}try{const e=process.stdin.pause;"function"==typeof e&&e()}catch{}});!function(e){try{const t=e.prepareForNewSession;"function"==typeof t&&t()}catch{}}(l);const _=$k({ui:l,selection:r,config:n,includeArchives:Boolean(o.archive),cancelCtl:D}),S=[];if(_.length>0){const e=await VE({cwd:t,outAbs:d,outRel:m,config:n,toRun:_,mode:s,orderFile:g,ui:l,epoch:p,isActive:qE,shouldContinue:()=>!D.isCancelled(),supervisor:v,liveEnabled:i,hangWarn:o.hangWarn,hangKill:o.hangKill,hangKillGrace:o.hangKillGrace});S.push(...e)}const E={created:S,ui:l,supervisor:v,detachSignals:w,liveEnabled:i,outAbs:d},k=await xk(D,E);if(k)return k;if(o.archive){const{short:e,added:r}=await Tk({cancelCtl:D,deps:E,cwd:t,config:n,behavior:o,ui:l,promptAbs:b,promptDisplay:y,supervisor:v});if(e)return e;r?.length&&S.push(...r)}await(async()=>{try{const e="win32"===process.platform?140:process.env.CI?25:15;await new Promise(t=>setTimeout(t,e)),await ZD()}catch{}})(),await(async e=>{try{await ZD()}catch{}try{const t=e.flushNow;"function"==typeof t&&t()}catch{}})(l),LE.session.info("normal path: detach signals, returning to caller");try{w()}catch{}return{created:S,cancelled:!1,restartRequested:!1}};class Fk{onCancel;onRestart;attached=!1;keyHandler;dataHandler;constructor(e){this.onCancel=e.onCancel,this.onRestart=e.onRestart}attach(){if(this.attached)return;this.attached=!0;const e=process.stdin,t=Boolean(process.stdout.isTTY),n=Boolean(e.isTTY),r=t&&n;if(r)try{R(e);const t=e.setRawMode;"function"==typeof t&&t(!0);const n=e.resume;"function"==typeof n&&n()}catch{}if(this.keyHandler=(e,t)=>{const n=((t??{}).name??"").toLowerCase();"q"!==n?"r"===n&&this.onRestart?.():this.onCancel()},this.dataHandler=e=>{try{if("string"==typeof e){const t=e.toLowerCase();return void(""===t||"q"===t?this.onCancel():"r"===t&&this.onRestart?.())}if(Buffer.isBuffer(e)){if(e.includes(3))return void this.onCancel();const t=e.toString("utf8").toLowerCase();"q"===t?this.onCancel():"r"===t&&this.onRestart?.()}}catch{}},r){const t=e.on;"function"==typeof t&&t("keypress",this.keyHandler)}const s=e.on;"function"==typeof s&&s("data",this.dataHandler)}detach(){if(!this.attached)return;this.attached=!1;const e=process.stdin,t=e.off,n=e.removeListener,r="function"==typeof t?t.bind(e):"function"==typeof n?n.bind(e):null;try{r&&"function"==typeof this.keyHandler&&r("keypress",this.keyHandler),r&&"function"==typeof this.dataHandler&&r("data",this.dataHandler)}catch{}try{const t=e.setRawMode;"function"==typeof t&&t(!1);const n=e.pause;"function"==typeof n&&n()}catch{}}}class Ik{rows=new Map;listeners=new Set;subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}clearAll(){this.rows.clear()}update(e,t,n){const r=this.rows.get(e),s=n??r?.meta;if(!s){const n=_E(e)??(e.startsWith("archive:")?{type:"archive",item:e.slice(8)||"(unnamed)"}:{type:"script",item:e.replace(/^script:/,"")||"(unnamed)"});return this.rows.set(e,{meta:n,state:t}),void this.emit(e,n,t)}this.rows.set(e,{meta:s,state:t}),this.emit(e,s,t)}emit(e,t,n){for(const r of this.listeners)try{r({key:e,meta:t,state:n})}catch{}}counts(){return SE(Array.from(this.rows.values()).map(e=>({state:e.state})))}}class jk{model;constructor(e){this.model=e}unsub;subscribeModel(){this.unsub||(this.unsub=this.model.subscribe(e=>{try{this.onUpdate(e.key,e.meta,e.state)}catch{}}))}unsubscribeModel(){try{this.unsub?.()}catch{}this.unsub=void 0}}class Mk extends jk{opts;dbg(...e){try{"1"===process.env.STAN_LIVE_DEBUG&&console.error("[stan:live:sink]",...e)}catch{}}renderer=null;stopped=!1;constructor(e,t){super(e),this.opts=t}start(){this.stopped=!1,this.renderer?this.dbg("start() renderer=existing"):(this.dbg("start() renderer=create"),this.renderer=new IE({boring:Boolean(this.opts?.boring)}),this.renderer.start(),this.subscribeModel())}stop(){if(this.stopped)this.dbg("stop():already-stopped");else{this.stopped=!0;try{const e=this.renderer;e&&"function"==typeof e.finalize&&(this.dbg("stop() finalize(full)"),e.finalize())}catch{}this.unsubscribeModel()}}flushNow(){try{this.renderer&&this.renderer.flush()}catch{}}resetForRestart(){try{this.dbg("resetForRestart()");const e=this.renderer;e&&"function"==typeof e.resetRows&&e.resetRows()}catch{}}resetElapsed(){try{const e=this.renderer;e&&"function"==typeof e.resetElapsed&&e.resetElapsed()}catch{}}cancelPending(){this.dbg("cancelPending()");try{const e=this.renderer;e&&"function"==typeof e.cancelPending&&e.cancelPending()}catch{}}onUpdate(e,t,n){this.dbg("update",{key:e,type:t.type,item:t.item,kind:n.kind}),this.renderer&&this.renderer.update(`${t.type}:${t.item}`,n,t)}}class Bk extends jk{cwd;constructor(e,t){super(e),this.cwd=t}start(){this.subscribeModel()}stop(){this.unsubscribeModel()}onUpdate(e,t,n){const r=t.item,s="archive"===t.type?dk("diff"===r?"diff":"full"):r,o=wE({state:n,cwd:this.cwd});if("waiting"!==n.kind)if("running"!==n.kind)if("warn"!==n.kind){if("done"===n.kind||"error"===n.kind){const e="done"===n.kind,t=o.label,r=e?"":" (exit 1)",i=o.output||"";return void console.log(`stan: ${t} "${s}" -> ${i}${r}`)}}else console.log(`stan: ${o.label} "${s}" -> ${o.output}`);else console.log(`stan: ${o.label} "${s}"`);else console.log(`stan: ${o.label} "${s}"`)}}const zk=(e,t)=>{e.update(`script:${t}`,{kind:"waiting"},{type:"script",item:t})},Hk=(e,t)=>{e.update(`script:${t}`,{kind:"running",startedAt:Date.now()},{type:"script",item:t})},Kk=(e,t)=>{const n="diff"===t?"diff":"full";e.update(`archive:${n}`,{kind:"running",startedAt:Date.now()},{type:"archive",item:n})},Uk=(e,t)=>{const n=Boolean(t?.useDurations);return{onScriptEnd:(t,r,s,o,i,a,c)=>{const u=DE(s,r);((e,t,n,r,s,o,i)=>{const a="number"==typeof r&&"number"==typeof s?Math.max(0,s-r):0,c="error"===i||"number"==typeof o&&0!==o?{kind:"error",durationMs:a,outputPath:n}:"warn"===i?{kind:"warn",durationMs:a,outputPath:n}:{kind:"done",durationMs:a,outputPath:n};e.update(`script:${t}`,c,{type:"script",item:t})})(e,t,u,n?o:void 0,n?i:void 0,n?a:void 0,c)},onArchiveEnd:(t,r,s,o,i)=>{const a=DE(s,r);((e,t,n,r,s)=>{const o="diff"===t?"diff":"full",i="number"==typeof r&&"number"==typeof s?Math.max(0,s-r):0;e.update(`archive:${o}`,{kind:"done",durationMs:i,outputPath:n},{type:"archive",item:o})})(e,t,a,n?o:void 0,n?i:void 0)}}};var qk=Object.freeze({__proto__:null,LiveUI:class{opts;renderer=null;control=null;model=new Ik;sink;forwards=Uk(this.model,{useDurations:!0});stopped=!1;constructor(e){this.opts=e,this.sink=new Mk(this.model,{boring:Boolean(e?.boring)})}start(){LE.ui.start(),this.stopped=!1,this.renderer||(this.sink.start(),this.renderer=this.sink.renderer??null)}onPlan(e){console.log(e)}onScriptQueued(e){zk(this.model,e)}onScriptStart(e){Hk(this.model,e)}onScriptEnd(e,t,n,r,s,o,i){this.forwards.onScriptEnd(e,t,n,r,s,o,i)}onArchiveQueued(e){((e,t)=>{const n="diff"===t?"diff":"full";e.update(`archive:${n}`,{kind:"waiting"},{type:"archive",item:n})})(this.model,e)}onArchiveStart(e){Kk(this.model,e)}onArchiveEnd(e,t,n,r,s){this.forwards.onArchiveEnd(e,t,n,r,s)}onCancelled(e="cancel"){LE.ui.onCancelled(e);try{this.sink.cancelPending()}catch{}try{this.sink.resetElapsed()}catch{}try{if("restart"===e){LE.session.info("restart: paint CANCELLED immediately; detach keys; table remains for overwrite");try{this.sink.flushNow()}catch{}try{const e=this.control;e&&e.detach()}catch{}finally{this.control=null}}else LE.ui.stop(),this.sink.stop()}catch{}try{const e=this.control;e&&e.detach()}catch{}finally{this.control=null}}prepareForNewSession(){try{this.model.clearAll()}catch{}try{this.sink.resetElapsed()}catch{}try{this.sink.resetForRestart()}catch{}}flushNow(){try{this.sink.flushNow()}catch{}}installCancellation(e,t){try{this.control=new Fk({onCancel:e,onRestart:t}),LE.ui.installCancellation(),this.control.attach()}catch{this.control=null}}stop(){if(!this.stopped){this.stopped=!0,LE.ui.stop();try{this.sink.stop()}catch{}try{const e=this.control;e&&e.detach()}catch{}this.control=null}}},LoggerUI:class{model=new Ik;sink;forwards=null;constructor(){const e=process.cwd();let t=null;const n=Bk;if("function"==typeof n)try{t=new n(this.model,e)}catch{try{t=n(this.model,e)}catch{t=null}}if(!t)throw new Error("LoggerSink not available");this.sink=t,this.forwards=Uk(this.model,{useDurations:!1})}start(){this.sink.start()}onPlan(e){console.log(e)}onScriptQueued(e){zk(this.model,e)}onScriptStart(e){Hk(this.model,e)}onScriptEnd(e,t,n,r,s,o,i){this.forwards?.onScriptEnd(e,t,n,void 0,void 0,void 0,i)}onArchiveQueued(){}onArchiveStart(e){Kk(this.model,e)}onArchiveEnd(e,t,n){this.forwards?.onArchiveEnd(e,t,n,void 0,void 0)}onCancelled(){}installCancellation(){}stop(){this.sink.stop()}}});const Jk=async(e,r,s=null,a="concurrent",c,l)=>{const f=c??{};await(async(e,r,s=!1)=>{const a=bc(e,r);if(await ye(e,r),!s){const e=h(a.outputAbs,F);if(t(e))try{await o(e,h(a.diffAbs,I))}catch{}const r=await i(a.outputAbs,{withFileTypes:!0});for(const e of r)n(h(a.outputAbs,e.name),{recursive:!0,force:!0})}return a.rootAbs})(e,r.stanPath,Boolean(f.keep));const p=Nw(0,{selection:s,config:r,mode:a,behavior:f}),m=process.stdout,g=Boolean(m.isTTY),y=(f.live??!0)&&g,b=null==s?Object.keys(r.scripts):s,{LiveUICtor:v,LoggerUICtor:D}=(()=>{const e=qk;return{LiveUICtor:"function"==typeof e.LiveUI?e.LiveUI:"function"==typeof e.default?.LiveUI?e.default.LiveUI:void 0,LoggerUICtor:"function"==typeof e.LoggerUI?e.LoggerUI:"function"==typeof e.default?.LoggerUI?e.default.LoggerUI:void 0}})(),w=y&&"function"==typeof v?new v({boring:"1"===process.env.STAN_BORING}):"function"==typeof D?new D:{start(){},onPlan(){},onScriptQueued(){},onScriptStart(){},onScriptEnd(){},onArchiveQueued(){},onArchiveStart(){},onArchiveEnd(){},onCancelled(){},installCancellation(){},stop(){}};let _=!1;for(;;){const{created:n,cancelled:s,restartRequested:o}=await Rk({cwd:e,config:r,selection:b,mode:a,behavior:f,liveEnabled:y,planBody:p,printPlan:!_&&!1!==f.plan,ui:w,promptChoice:l});if(_=!0,!o){if(s){const s=d.join(e,r.stanPath,"output"),o=d.join(s,"archive.tar"),i=d.join(s,"archive.diff.tar"),a=async e=>new Promise(t=>setTimeout(t,e)),c=()=>!t(o)&&!t(i),l=async()=>{await Promise.allSettled([u(o,{force:!0}),u(i,{force:!0})])},f=8;for(let e=0;e<f;e+=1){try{await l()}catch{}if(c())break;const e="win32"===process.platform;await a(e?200:40)}try{await new Promise(e=>setTimeout(e,"win32"===process.platform?100:25))}catch{}try{const e="win32"===process.platform?30:process.env.CI?20:15;await new Promise(t=>setTimeout(t,e))}catch{}return n}try{try{await ZD()}catch{}const e=w.flushNow;if("function"==typeof e)try{e()}catch{}w.stop()}catch{}try{const e="win32"===process.platform?30:process.env.CI?20:15;await new Promise(t=>setTimeout(t,e))}catch{}return n}}};export{JD as renderAvailableScriptsHelp,Jk as runSelected};
|