@nice-move/cli 0.11.7 → 0.11.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/754.mjs DELETED
@@ -1 +0,0 @@
1
- export const id=754;export const ids=[754];export const modules={730:(e,t,s)=>{const n=s(8979),r=s(5435),i=s(332),o=s(7805),a=(e,t={})=>{let s=[];if(Array.isArray(e))for(let n of e){let e=a.create(n,t);Array.isArray(e)?s.push(...e):s.push(e)}else s=[].concat(a.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(s=[...new Set(s)]),s};a.parse=(e,t={})=>o(e,t),a.stringify=(e,t={})=>n("string"==typeof e?a.parse(e,t):e,t),a.compile=(e,t={})=>("string"==typeof e&&(e=a.parse(e,t)),r(e,t)),a.expand=(e,t={})=>{"string"==typeof e&&(e=a.parse(e,t));let s=i(e,t);return!0===t.noempty&&(s=s.filter(Boolean)),!0===t.nodupes&&(s=[...new Set(s)]),s},a.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?a.compile(e,t):a.expand(e,t),e.exports=a},5435:(e,t,s)=>{const n=s(843),r=s(7231);e.exports=(e,t={})=>{let s=(e,i={})=>{let o=r.isInvalidBrace(i),a=!0===e.invalid&&!0===t.escapeInvalid,c=!0===o||!0===a,l=!0===t.escapeInvalid?"\\":"",u="";if(!0===e.isOpen)return l+e.value;if(!0===e.isClose)return l+e.value;if("open"===e.type)return c?l+e.value:"(";if("close"===e.type)return c?l+e.value:")";if("comma"===e.type)return"comma"===e.prev.type?"":c?e.value:"|";if(e.value)return e.value;if(e.nodes&&e.ranges>0){let s=r.reduce(e.nodes),i=n(...s,{...t,wrap:!1,toRegex:!0});if(0!==i.length)return s.length>1&&i.length>1?`(${i})`:i}if(e.nodes)for(let t of e.nodes)u+=s(t,e);return u};return s(e)}},6015:e=>{e.exports={MAX_LENGTH:65536,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:"\xa0",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"}},332:(e,t,s)=>{const n=s(843),r=s(8979),i=s(7231),o=(e="",t="",s=!1)=>{let n=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return s?i.flatten(t).map((e=>`{${e}}`)):t;for(let r of e)if(Array.isArray(r))for(let e of r)n.push(o(e,t,s));else for(let e of t)!0===s&&"string"==typeof e&&(e=`{${e}}`),n.push(Array.isArray(e)?o(r,e,s):r+e);return i.flatten(n)};e.exports=(e,t={})=>{let s=void 0===t.rangeLimit?1e3:t.rangeLimit,a=(e,c={})=>{e.queue=[];let l=c,u=c.queue;for(;"brace"!==l.type&&"root"!==l.type&&l.parent;)l=l.parent,u=l.queue;if(e.invalid||e.dollar)return void u.push(o(u.pop(),r(e,t)));if("brace"===e.type&&!0!==e.invalid&&2===e.nodes.length)return void u.push(o(u.pop(),["{}"]));if(e.nodes&&e.ranges>0){let a=i.reduce(e.nodes);if(i.exceedsLimit(...a,t.step,s))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let c=n(...a,t);return 0===c.length&&(c=r(e,t)),u.push(o(u.pop(),c)),void(e.nodes=[])}let h=i.encloseBrace(e),f=e.queue,p=e;for(;"brace"!==p.type&&"root"!==p.type&&p.parent;)p=p.parent,f=p.queue;for(let t=0;t<e.nodes.length;t++){let s=e.nodes[t];"comma"!==s.type||"brace"!==e.type?"close"!==s.type?s.value&&"open"!==s.type?f.push(o(f.pop(),s.value)):s.nodes&&a(s,e):u.push(o(u.pop(),f,h)):(1===t&&f.push(""),f.push(""))}return f};return i.flatten(a(e))}},7805:(e,t,s)=>{const n=s(8979),{MAX_LENGTH:r,CHAR_BACKSLASH:i,CHAR_BACKTICK:o,CHAR_COMMA:a,CHAR_DOT:c,CHAR_LEFT_PARENTHESES:l,CHAR_RIGHT_PARENTHESES:u,CHAR_LEFT_CURLY_BRACE:h,CHAR_RIGHT_CURLY_BRACE:f,CHAR_LEFT_SQUARE_BRACKET:p,CHAR_RIGHT_SQUARE_BRACKET:d,CHAR_DOUBLE_QUOTE:g,CHAR_SINGLE_QUOTE:m,CHAR_NO_BREAK_SPACE:y,CHAR_ZERO_WIDTH_NOBREAK_SPACE:b}=s(6015);e.exports=(e,t={})=>{if("string"!=typeof e)throw new TypeError("Expected a string");let s=t||{},w="number"==typeof s.maxLength?Math.min(r,s.maxLength):r;if(e.length>w)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${w})`);let E,v={type:"root",input:e,nodes:[]},S=[v],A=v,k=v,O=0,C=e.length,T=0,R=0;const L=()=>e[T++],_=e=>{if("text"===e.type&&"dot"===k.type&&(k.type="text"),!k||"text"!==k.type||"text"!==e.type)return A.nodes.push(e),e.parent=A,e.prev=k,k=e,e;k.value+=e.value};for(_({type:"bos"});T<C;)if(A=S[S.length-1],E=L(),E!==b&&E!==y)if(E!==i)if(E!==d)if(E!==p)if(E!==l)if(E!==u)if(E!==g&&E!==m&&E!==o)if(E!==h)if(E!==f)if(E===a&&R>0){if(A.ranges>0){A.ranges=0;let e=A.nodes.shift();A.nodes=[e,{type:"text",value:n(A)}]}_({type:"comma",value:E}),A.commas++}else if(E===c&&R>0&&0===A.commas){let e=A.nodes;if(0===R||0===e.length){_({type:"text",value:E});continue}if("dot"===k.type){if(A.range=[],k.value+=E,k.type="range",3!==A.nodes.length&&5!==A.nodes.length){A.invalid=!0,A.ranges=0,k.type="text";continue}A.ranges++,A.args=[];continue}if("range"===k.type){e.pop();let t=e[e.length-1];t.value+=k.value+E,k=t,A.ranges--;continue}_({type:"dot",value:E})}else _({type:"text",value:E});else{if("brace"!==A.type){_({type:"text",value:E});continue}let e="close";A=S.pop(),A.close=!0,_({type:e,value:E}),R--,A=S[S.length-1]}else{R++;let e=k.value&&"$"===k.value.slice(-1)||!0===A.dollar;A=_({type:"brace",open:!0,close:!1,dollar:e,depth:R,commas:0,ranges:0,nodes:[]}),S.push(A),_({type:"open",value:E})}else{let e,s=E;for(!0!==t.keepQuotes&&(E="");T<C&&(e=L());)if(e!==i){if(e===s){!0===t.keepQuotes&&(E+=e);break}E+=e}else E+=e+L();_({type:"text",value:E})}else{if("paren"!==A.type){_({type:"text",value:E});continue}A=S.pop(),_({type:"text",value:E}),A=S[S.length-1]}else A=_({type:"paren",nodes:[]}),S.push(A),_({type:"text",value:E});else{O++;let e;for(;T<C&&(e=L());)if(E+=e,e!==p)if(e!==i){if(e===d&&(O--,0===O))break}else E+=L();else O++;_({type:"text",value:E})}else _({type:"text",value:"\\"+E});else _({type:"text",value:(t.keepEscaping?E:"")+L()});do{if(A=S.pop(),"root"!==A.type){A.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)}));let e=S[S.length-1],t=e.nodes.indexOf(A);e.nodes.splice(t,1,...A.nodes)}}while(S.length>0);return _({type:"eos"}),v}},8979:(e,t,s)=>{const n=s(7231);e.exports=(e,t={})=>{let s=(e,r={})=>{let i=t.escapeInvalid&&n.isInvalidBrace(r),o=!0===e.invalid&&!0===t.escapeInvalid,a="";if(e.value)return(i||o)&&n.isOpenOrClose(e)?"\\"+e.value:e.value;if(e.value)return e.value;if(e.nodes)for(let t of e.nodes)a+=s(t);return a};return s(e)}},7231:(e,t)=>{t.isInteger=e=>"number"==typeof e?Number.isInteger(e):"string"==typeof e&&""!==e.trim()&&Number.isInteger(Number(e)),t.find=(e,t)=>e.nodes.find((e=>e.type===t)),t.exceedsLimit=(e,s,n=1,r)=>!1!==r&&(!(!t.isInteger(e)||!t.isInteger(s))&&(Number(s)-Number(e))/Number(n)>=r),t.escapeNode=(e,t=0,s)=>{let n=e.nodes[t];n&&(s&&n.type===s||"open"===n.type||"close"===n.type)&&!0!==n.escaped&&(n.value="\\"+n.value,n.escaped=!0)},t.encloseBrace=e=>"brace"===e.type&&(!(e.commas>>0+e.ranges)&&(e.invalid=!0,!0)),t.isInvalidBrace=e=>"brace"===e.type&&(!(!0!==e.invalid&&!e.dollar)||(e.commas>>0+e.ranges?(!0!==e.open||!0!==e.close)&&(e.invalid=!0,!0):(e.invalid=!0,!0))),t.isOpenOrClose=e=>"open"===e.type||"close"===e.type||(!0===e.open||!0===e.close),t.reduce=e=>e.reduce(((e,t)=>("text"===t.type&&e.push(t.value),"range"===t.type&&(t.type="text"),e)),[]),t.flatten=(...e)=>{const t=[],s=e=>{for(let n=0;n<e.length;n++){let r=e[n];Array.isArray(r)?s(r,t):void 0!==r&&t.push(r)}return t};return s(e),t}},8437:e=>{var t=1e3,s=60*t,n=60*s,r=24*n,i=7*r,o=365.25*r;function a(e,t,s,n){var r=t>=1.5*s;return Math.round(e/s)+" "+n+(r?"s":"")}e.exports=function(e,c){c=c||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*r;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*s;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===l&&isFinite(e))return c.long?function(e){var i=Math.abs(e);if(i>=r)return a(e,i,r,"day");if(i>=n)return a(e,i,n,"hour");if(i>=s)return a(e,i,s,"minute");if(i>=t)return a(e,i,t,"second");return e+" ms"}(e):function(e){var i=Math.abs(e);if(i>=r)return Math.round(e/r)+"d";if(i>=n)return Math.round(e/n)+"h";if(i>=s)return Math.round(e/s)+"m";if(i>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},124:(e,t,s)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const s="color: "+this.color;t.splice(1,0,s,"color: inherit");let n=0,r=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(r=n))})),t.splice(r,0,s)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=s(7891)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},7891:(e,t,s)=>{e.exports=function(e){function t(e){let s,r,i,o=null;function a(...e){if(!a.enabled)return;const n=a,r=Number(new Date),i=r-(s||r);n.diff=i,n.prev=s,n.curr=r,s=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((s,r)=>{if("%%"===s)return"%";o++;const i=t.formatters[r];if("function"==typeof i){const t=e[o];s=i.call(n,t),e.splice(o,1),o--}return s})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(r!==t.namespaces&&(r=t.namespaces,i=t.enabled(e)),i),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,s){const n=t(this.namespace+(void 0===s?":":s)+e);return n.log=this.log,n}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let s;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length;for(s=0;s<r;s++)n[s]&&("-"===(e=n[s].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let s,n;for(s=0,n=t.skips.length;s<n;s++)if(t.skips[s].test(e))return!1;for(s=0,n=t.names.length;s<n;s++)if(t.names[s].test(e))return!0;return!1},t.humanize=s(8437),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((s=>{t[s]=e[s]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let s=0;for(let t=0;t<e.length;t++)s=(s<<5)-s+e.charCodeAt(t),s|=0;return t.colors[Math.abs(s)%t.colors.length]},t.enable(t.load()),t}},3680:(e,t,s)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=s(124):e.exports=s(5038)},5038:(e,t,s)=>{const n=s(2018),r=s(9023);t.init=function(e){e.inspectOpts={};const s=Object.keys(t.inspectOpts);for(let n=0;n<s.length;n++)e.inspectOpts[s[n]]=t.inspectOpts[s[n]]},t.log=function(...e){return process.stderr.write(r.format(...e)+"\n")},t.formatArgs=function(s){const{namespace:n,useColors:r}=this;if(r){const t=this.color,r="\x1b[3"+(t<8?t:"8;5;"+t),i=` ${r};1m${n} \x1b[0m`;s[0]=i+s[0].split("\n").join("\n"+i),s.push(r+"m+"+e.exports.humanize(this.diff)+"\x1b[0m")}else s[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+n+" "+s[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=r.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=s(5600);e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const s=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[s]=n,e}),{}),e.exports=s(7891)(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts)}},8985:e=>{var t=Object.prototype.hasOwnProperty,s="~";function n(){}function r(e,t,s){this.fn=e,this.context=t,this.once=s||!1}function i(e,t,n,i,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new r(n,i||e,o),c=s?s+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(s=!1)),a.prototype.eventNames=function(){var e,n,r=[];if(0===this._eventsCount)return r;for(n in e=this._events)t.call(e,n)&&r.push(s?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},a.prototype.listeners=function(e){var t=s?s+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,o=new Array(i);r<i;r++)o[r]=n[r].fn;return o},a.prototype.listenerCount=function(e){var t=s?s+e:e,n=this._events[t];return n?n.fn?1:n.length:0},a.prototype.emit=function(e,t,n,r,i,o){var a=s?s+e:e;if(!this._events[a])return!1;var c,l,u=this._events[a],h=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),h){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,r),!0;case 5:return u.fn.call(u.context,t,n,r,i),!0;case 6:return u.fn.call(u.context,t,n,r,i,o),!0}for(l=1,c=new Array(h-1);l<h;l++)c[l-1]=arguments[l];u.fn.apply(u.context,c)}else{var f,p=u.length;for(l=0;l<p;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),h){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,t);break;case 3:u[l].fn.call(u[l].context,t,n);break;case 4:u[l].fn.call(u[l].context,t,n,r);break;default:if(!c)for(f=1,c=new Array(h-1);f<h;f++)c[f-1]=arguments[f];u[l].fn.apply(u[l].context,c)}}return!0},a.prototype.on=function(e,t,s){return i(this,e,t,s,!1)},a.prototype.once=function(e,t,s){return i(this,e,t,s,!0)},a.prototype.removeListener=function(e,t,n,r){var i=s?s+e:e;if(!this._events[i])return this;if(!t)return o(this,i),this;var a=this._events[i];if(a.fn)a.fn!==t||r&&!a.once||n&&a.context!==n||o(this,i);else{for(var c=0,l=[],u=a.length;c<u;c++)(a[c].fn!==t||r&&!a[c].once||n&&a[c].context!==n)&&l.push(a[c]);l.length?this._events[i]=1===l.length?l[0]:l:o(this,i)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=s?s+e:e,this._events[t]&&o(this,t)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=s,a.EventEmitter=a,e.exports=a},843:(e,t,s)=>{const n=s(9023),r=s(9093),i=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),o=e=>"number"==typeof e||"string"==typeof e&&""!==e,a=e=>Number.isInteger(+e),c=e=>{let t=`${e}`,s=-1;if("-"===t[0]&&(t=t.slice(1)),"0"===t)return!1;for(;"0"===t[++s];);return s>0},l=(e,t,s)=>{if(t>0){let s="-"===e[0]?"-":"";s&&(e=e.slice(1)),e=s+e.padStart(s?t-1:t,"0")}return!1===s?String(e):e},u=(e,t)=>{let s="-"===e[0]?"-":"";for(s&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return s?"-"+e:e},h=(e,t,s,n)=>{if(s)return r(e,t,{wrap:!1,...n});let i=String.fromCharCode(e);return e===t?i:`[${i}-${String.fromCharCode(t)}]`},f=(e,t,s)=>{if(Array.isArray(e)){let t=!0===s.wrap,n=s.capture?"":"?:";return t?`(${n}${e.join("|")})`:e.join("|")}return r(e,t,s)},p=(...e)=>new RangeError("Invalid range arguments: "+n.inspect(...e)),d=(e,t,s)=>{if(!0===s.strictRanges)throw p([e,t]);return[]},g=(e,t,s=1,n={})=>{let r=Number(e),i=Number(t);if(!Number.isInteger(r)||!Number.isInteger(i)){if(!0===n.strictRanges)throw p([e,t]);return[]}0===r&&(r=0),0===i&&(i=0);let o=r>i,a=String(e),d=String(t),g=String(s);s=Math.max(Math.abs(s),1);let m=c(a)||c(d)||c(g),y=m?Math.max(a.length,d.length,g.length):0,b=!1===m&&!1===((e,t,s)=>"string"==typeof e||"string"==typeof t||!0===s.stringify)(e,t,n),w=n.transform||(e=>t=>!0===e?Number(t):String(t))(b);if(n.toRegex&&1===s)return h(u(e,y),u(t,y),!0,n);let E={negatives:[],positives:[]},v=[],S=0;for(;o?r>=i:r<=i;)!0===n.toRegex&&s>1?E[(A=r)<0?"negatives":"positives"].push(Math.abs(A)):v.push(l(w(r,S),y,b)),r=o?r-s:r+s,S++;var A;return!0===n.toRegex?s>1?((e,t)=>{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 s,n=t.capture?"":"?:",r="",i="";return e.positives.length&&(r=e.positives.join("|")),e.negatives.length&&(i=`-(${n}${e.negatives.join("|")})`),s=r&&i?`${r}|${i}`:r||i,t.wrap?`(${n}${s})`:s})(E,n):f(v,null,{wrap:!1,...n}):v},m=(e,t,s,n={})=>{if(null==t&&o(e))return[e];if(!o(e)||!o(t))return d(e,t,n);if("function"==typeof s)return m(e,t,1,{transform:s});if(i(s))return m(e,t,0,s);let r={...n};return!0===r.capture&&(r.wrap=!0),s=s||r.step||1,a(s)?a(e)&&a(t)?g(e,t,s,r):((e,t,s=1,n={})=>{if(!a(e)&&e.length>1||!a(t)&&t.length>1)return d(e,t,n);let r=n.transform||(e=>String.fromCharCode(e)),i=`${e}`.charCodeAt(0),o=`${t}`.charCodeAt(0),c=i>o,l=Math.min(i,o),u=Math.max(i,o);if(n.toRegex&&1===s)return h(l,u,!1,n);let p=[],g=0;for(;c?i>=o:i<=o;)p.push(r(i,g)),i=c?i-s:i+s,g++;return!0===n.toRegex?f(p,null,{wrap:!1,options:n}):p})(e,t,Math.max(Math.abs(s),1),r):null==s||i(s)?m(e,t,1,s):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(s,r)};e.exports=m},8424:e=>{e.exports=function(e){return"number"==typeof e?e-e==0:"string"==typeof e&&""!==e.trim()&&(Number.isFinite?Number.isFinite(+e):isFinite(+e))}},447:(e,t,s)=>{const n=s(9023),r=s(730),i=s(76),o=s(8977),a=e=>""===e||"./"===e,c=(e,t,s)=>{t=[].concat(t),e=[].concat(e);let n=new Set,r=new Set,o=new Set,a=0,c=e=>{o.add(e.output),s&&s.onResult&&s.onResult(e)};for(let o=0;o<t.length;o++){let l=i(String(t[o]),{...s,onResult:c},!0),u=l.state.negated||l.state.negatedExtglob;u&&a++;for(let t of e){let e=l(t,!0);(u?!e.isMatch:e.isMatch)&&(u?n.add(e.output):(n.delete(e.output),r.add(e.output)))}}let l=(a===t.length?[...o]:[...r]).filter((e=>!n.has(e)));if(s&&0===l.length){if(!0===s.failglob)throw new Error(`No matches found for "${t.join(", ")}"`);if(!0===s.nonull||!0===s.nullglob)return s.unescape?t.map((e=>e.replace(/\\/g,""))):t}return l};c.match=c,c.matcher=(e,t)=>i(e,t),c.any=c.isMatch=(e,t,s)=>i(t,s)(e),c.not=(e,t,s={})=>{t=[].concat(t).map(String);let n=new Set,r=[],i=new Set(c(e,t,{...s,onResult:e=>{s.onResult&&s.onResult(e),r.push(e.output)}}));for(let e of r)i.has(e)||n.add(e);return[...n]},c.contains=(e,t,s)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${n.inspect(e)}"`);if(Array.isArray(t))return t.some((t=>c.contains(e,t,s)));if("string"==typeof t){if(a(e)||a(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return c.isMatch(e,t,{...s,contains:!0})},c.matchKeys=(e,t,s)=>{if(!o.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=c(Object.keys(e),t,s),r={};for(let t of n)r[t]=e[t];return r},c.some=(e,t,s)=>{let n=[].concat(e);for(let e of[].concat(t)){let t=i(String(e),s);if(n.some((e=>t(e))))return!0}return!1},c.every=(e,t,s)=>{let n=[].concat(e);for(let e of[].concat(t)){let t=i(String(e),s);if(!n.every((e=>t(e))))return!1}return!0},c.all=(e,t,s)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${n.inspect(e)}"`);return[].concat(t).every((t=>i(t,s)(e)))},c.capture=(e,t,s)=>{let n=o.isWindows(s),r=i.makeRe(String(e),{...s,capture:!0}).exec(n?o.toPosixSlashes(t):t);if(r)return r.slice(1).map((e=>void 0===e?"":e))},c.makeRe=(...e)=>i.makeRe(...e),c.scan=(...e)=>i.scan(...e),c.parse=(e,t)=>{let s=[];for(let n of[].concat(e||[]))for(let e of r(String(n),t))s.push(i.parse(e,t));return s},c.braces=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return t&&!0===t.nobrace||!/\{.*\}/.test(e)?[e]:r(e,t)},c.braceExpand=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return c.braces(e,{...t,expand:!0})},e.exports=c},76:(e,t,s)=>{e.exports=s(870)},557:(e,t,s)=>{const n=s(6928),r="\\\\/",i=`[^${r}]`,o="\\.",a="\\/",c="[^/]",l=`(?:${a}|$)`,u=`(?:^|${a})`,h=`${o}{1,2}${l}`,f={DOT_LITERAL:o,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:a,ONE_CHAR:"(?=.)",QMARK:c,END_ANCHOR:l,DOTS_SLASH:h,NO_DOT:`(?!${o})`,NO_DOTS:`(?!${u}${h})`,NO_DOT_SLASH:`(?!${o}{0,1}${l})`,NO_DOTS_SLASH:`(?!${h})`,QMARK_NO_DOT:`[^.${a}]`,STAR:`${c}*?`,START_ANCHOR:u},p={...f,SLASH_LITERAL:`[${r}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${o}{1,2}(?:[${r}]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[${r}])${o}{1,2}(?:[${r}]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[${r}]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[${r}]|$))`,QMARK_NO_DOT:`[^.${r}]`,START_ANCHOR:`(?:^|[${r}])`,END_ANCHOR:`(?:[${r}]|$)`};e.exports={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:n.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?p:f}},3579:(e,t,s)=>{const n=s(557),r=s(8977),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:o,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:c,REPLACEMENTS:l}=n,u=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();const s=`[${e.join("-")}]`;try{new RegExp(s)}catch(t){return e.map((e=>r.escapeRegex(e))).join("..")}return s},h=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,f=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");e=l[e]||e;const s={...t},p="number"==typeof s.maxLength?Math.min(i,s.maxLength):i;let d=e.length;if(d>p)throw new SyntaxError(`Input length: ${d}, exceeds maximum allowed length: ${p}`);const g={type:"bos",value:"",output:s.prepend||""},m=[g],y=s.capture?"":"?:",b=r.isWindows(t),w=n.globChars(b),E=n.extglobChars(w),{DOT_LITERAL:v,PLUS_LITERAL:S,SLASH_LITERAL:A,ONE_CHAR:k,DOTS_SLASH:O,NO_DOT:C,NO_DOT_SLASH:T,NO_DOTS_SLASH:R,QMARK:L,QMARK_NO_DOT:_,STAR:x,START_ANCHOR:N}=w,I=e=>`(${y}(?:(?!${N}${e.dot?O:v}).)*?)`,P=s.dot?"":C,$=s.dot?L:_;let M=!0===s.bash?I(s):x;s.capture&&(M=`(${M})`),"boolean"==typeof s.noext&&(s.noextglob=s.noext);const D={input:e,index:-1,start:0,dot:!0===s.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:m};e=r.removePrefix(e,D),d=e.length;const B=[],F=[],H=[];let j,U=g;const K=()=>D.index===d-1,G=D.peek=(t=1)=>e[D.index+t],q=D.advance=()=>e[++D.index]||"",Y=()=>e.slice(D.index+1),W=(e="",t=0)=>{D.consumed+=e,D.index+=t},V=e=>{D.output+=null!=e.output?e.output:e.value,W(e.value)},Q=()=>{let e=1;for(;"!"===G()&&("("!==G(2)||"?"===G(3));)q(),D.start++,e++;return e%2!=0&&(D.negated=!0,D.start++,!0)},J=e=>{D[e]++,H.push(e)},z=e=>{D[e]--,H.pop()},X=e=>{if("globstar"===U.type){const t=D.braces>0&&("comma"===e.type||"brace"===e.type),s=!0===e.extglob||B.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||s||(D.output=D.output.slice(0,-U.output.length),U.type="star",U.value="*",U.output=M,D.output+=U.output)}if(B.length&&"paren"!==e.type&&(B[B.length-1].inner+=e.value),(e.value||e.output)&&V(e),U&&"text"===U.type&&"text"===e.type)return U.value+=e.value,void(U.output=(U.output||"")+e.value);e.prev=U,m.push(e),U=e},Z=(e,t)=>{const n={...E[t],conditions:1,inner:""};n.prev=U,n.parens=D.parens,n.output=D.output;const r=(s.capture?"(":"")+n.open;J("parens"),X({type:e,value:t,output:D.output?"":k}),X({type:"paren",extglob:!0,value:q(),output:r}),B.push(n)},ee=e=>{let n,r=e.close+(s.capture?")":"");if("negate"===e.type){let i=M;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(i=I(s)),(i!==M||K()||/^\)+$/.test(Y()))&&(r=e.close=`)$))${i}`),e.inner.includes("*")&&(n=Y())&&/^\.[^\\/.]+$/.test(n)){const s=f(n,{...t,fastpaths:!1}).output;r=e.close=`)${s})${i})`}"bos"===e.prev.type&&(D.negatedExtglob=!0)}X({type:"paren",extglob:!0,value:j,output:r}),z("parens")};if(!1!==s.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,i=e.replace(c,((e,t,s,r,i,o)=>"\\"===r?(n=!0,e):"?"===r?t?t+r+(i?L.repeat(i.length):""):0===o?$+(i?L.repeat(i.length):""):L.repeat(s.length):"."===r?v.repeat(s.length):"*"===r?t?t+r+(i?M:""):M:t?e:`\\${e}`));return!0===n&&(i=!0===s.unescape?i.replace(/\\/g,""):i.replace(/\\+/g,(e=>e.length%2==0?"\\\\":e?"\\":""))),i===e&&!0===s.contains?(D.output=e,D):(D.output=r.wrapOutput(i,D,t),D)}for(;!K();){if(j=q(),"\0"===j)continue;if("\\"===j){const e=G();if("/"===e&&!0!==s.bash)continue;if("."===e||";"===e)continue;if(!e){j+="\\",X({type:"text",value:j});continue}const t=/^\\+/.exec(Y());let n=0;if(t&&t[0].length>2&&(n=t[0].length,D.index+=n,n%2!=0&&(j+="\\")),!0===s.unescape?j=q():j+=q(),0===D.brackets){X({type:"text",value:j});continue}}if(D.brackets>0&&("]"!==j||"["===U.value||"[^"===U.value)){if(!1!==s.posix&&":"===j){const e=U.value.slice(1);if(e.includes("[")&&(U.posix=!0,e.includes(":"))){const e=U.value.lastIndexOf("["),t=U.value.slice(0,e),s=U.value.slice(e+2),n=o[s];if(n){U.value=t+n,D.backtrack=!0,q(),g.output||1!==m.indexOf(U)||(g.output=k);continue}}}("["===j&&":"!==G()||"-"===j&&"]"===G())&&(j=`\\${j}`),"]"!==j||"["!==U.value&&"[^"!==U.value||(j=`\\${j}`),!0===s.posix&&"!"===j&&"["===U.value&&(j="^"),U.value+=j,V({value:j});continue}if(1===D.quotes&&'"'!==j){j=r.escapeRegex(j),U.value+=j,V({value:j});continue}if('"'===j){D.quotes=1===D.quotes?0:1,!0===s.keepQuotes&&X({type:"text",value:j});continue}if("("===j){J("parens"),X({type:"paren",value:j});continue}if(")"===j){if(0===D.parens&&!0===s.strictBrackets)throw new SyntaxError(h("opening","("));const e=B[B.length-1];if(e&&D.parens===e.parens+1){ee(B.pop());continue}X({type:"paren",value:j,output:D.parens?")":"\\)"}),z("parens");continue}if("["===j){if(!0!==s.nobracket&&Y().includes("]"))J("brackets");else{if(!0!==s.nobracket&&!0===s.strictBrackets)throw new SyntaxError(h("closing","]"));j=`\\${j}`}X({type:"bracket",value:j});continue}if("]"===j){if(!0===s.nobracket||U&&"bracket"===U.type&&1===U.value.length){X({type:"text",value:j,output:`\\${j}`});continue}if(0===D.brackets){if(!0===s.strictBrackets)throw new SyntaxError(h("opening","["));X({type:"text",value:j,output:`\\${j}`});continue}z("brackets");const e=U.value.slice(1);if(!0===U.posix||"^"!==e[0]||e.includes("/")||(j=`/${j}`),U.value+=j,V({value:j}),!1===s.literalBrackets||r.hasRegexChars(e))continue;const t=r.escapeRegex(U.value);if(D.output=D.output.slice(0,-U.value.length),!0===s.literalBrackets){D.output+=t,U.value=t;continue}U.value=`(${y}${t}|${U.value})`,D.output+=U.value;continue}if("{"===j&&!0!==s.nobrace){J("braces");const e={type:"brace",value:j,output:"(",outputIndex:D.output.length,tokensIndex:D.tokens.length};F.push(e),X(e);continue}if("}"===j){const e=F[F.length-1];if(!0===s.nobrace||!e){X({type:"text",value:j,output:j});continue}let t=")";if(!0===e.dots){const e=m.slice(),n=[];for(let t=e.length-1;t>=0&&(m.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=u(n,s),D.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const s=D.output.slice(0,e.outputIndex),n=D.tokens.slice(e.tokensIndex);e.value=e.output="\\{",j=t="\\}",D.output=s;for(const e of n)D.output+=e.output||e.value}X({type:"brace",value:j,output:t}),z("braces"),F.pop();continue}if("|"===j){B.length>0&&B[B.length-1].conditions++,X({type:"text",value:j});continue}if(","===j){let e=j;const t=F[F.length-1];t&&"braces"===H[H.length-1]&&(t.comma=!0,e="|"),X({type:"comma",value:j,output:e});continue}if("/"===j){if("dot"===U.type&&D.index===D.start+1){D.start=D.index+1,D.consumed="",D.output="",m.pop(),U=g;continue}X({type:"slash",value:j,output:A});continue}if("."===j){if(D.braces>0&&"dot"===U.type){"."===U.value&&(U.output=v);const e=F[F.length-1];U.type="dots",U.output+=j,U.value+=j,e.dots=!0;continue}if(D.braces+D.parens===0&&"bos"!==U.type&&"slash"!==U.type){X({type:"text",value:j,output:v});continue}X({type:"dot",value:j,output:v});continue}if("?"===j){if(!(U&&"("===U.value)&&!0!==s.noextglob&&"("===G()&&"?"!==G(2)){Z("qmark",j);continue}if(U&&"paren"===U.type){const e=G();let t=j;if("<"===e&&!r.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===U.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(Y()))&&(t=`\\${j}`),X({type:"text",value:j,output:t});continue}if(!0!==s.dot&&("slash"===U.type||"bos"===U.type)){X({type:"qmark",value:j,output:_});continue}X({type:"qmark",value:j,output:L});continue}if("!"===j){if(!0!==s.noextglob&&"("===G()&&("?"!==G(2)||!/[!=<:]/.test(G(3)))){Z("negate",j);continue}if(!0!==s.nonegate&&0===D.index){Q();continue}}if("+"===j){if(!0!==s.noextglob&&"("===G()&&"?"!==G(2)){Z("plus",j);continue}if(U&&"("===U.value||!1===s.regex){X({type:"plus",value:j,output:S});continue}if(U&&("bracket"===U.type||"paren"===U.type||"brace"===U.type)||D.parens>0){X({type:"plus",value:j});continue}X({type:"plus",value:S});continue}if("@"===j){if(!0!==s.noextglob&&"("===G()&&"?"!==G(2)){X({type:"at",extglob:!0,value:j,output:""});continue}X({type:"text",value:j});continue}if("*"!==j){"$"!==j&&"^"!==j||(j=`\\${j}`);const e=a.exec(Y());e&&(j+=e[0],D.index+=e[0].length),X({type:"text",value:j});continue}if(U&&("globstar"===U.type||!0===U.star)){U.type="star",U.star=!0,U.value+=j,U.output=M,D.backtrack=!0,D.globstar=!0,W(j);continue}let t=Y();if(!0!==s.noextglob&&/^\([^?]/.test(t)){Z("star",j);continue}if("star"===U.type){if(!0===s.noglobstar){W(j);continue}const n=U.prev,r=n.prev,i="slash"===n.type||"bos"===n.type,o=r&&("star"===r.type||"globstar"===r.type);if(!0===s.bash&&(!i||t[0]&&"/"!==t[0])){X({type:"star",value:j,output:""});continue}const a=D.braces>0&&("comma"===n.type||"brace"===n.type),c=B.length&&("pipe"===n.type||"paren"===n.type);if(!i&&"paren"!==n.type&&!a&&!c){X({type:"star",value:j,output:""});continue}for(;"/**"===t.slice(0,3);){const s=e[D.index+4];if(s&&"/"!==s)break;t=t.slice(3),W("/**",3)}if("bos"===n.type&&K()){U.type="globstar",U.value+=j,U.output=I(s),D.output=U.output,D.globstar=!0,W(j);continue}if("slash"===n.type&&"bos"!==n.prev.type&&!o&&K()){D.output=D.output.slice(0,-(n.output+U.output).length),n.output=`(?:${n.output}`,U.type="globstar",U.output=I(s)+(s.strictSlashes?")":"|$)"),U.value+=j,D.globstar=!0,D.output+=n.output+U.output,W(j);continue}if("slash"===n.type&&"bos"!==n.prev.type&&"/"===t[0]){const e=void 0!==t[1]?"|$":"";D.output=D.output.slice(0,-(n.output+U.output).length),n.output=`(?:${n.output}`,U.type="globstar",U.output=`${I(s)}${A}|${A}${e})`,U.value+=j,D.output+=n.output+U.output,D.globstar=!0,W(j+q()),X({type:"slash",value:"/",output:""});continue}if("bos"===n.type&&"/"===t[0]){U.type="globstar",U.value+=j,U.output=`(?:^|${A}|${I(s)}${A})`,D.output=U.output,D.globstar=!0,W(j+q()),X({type:"slash",value:"/",output:""});continue}D.output=D.output.slice(0,-U.output.length),U.type="globstar",U.output=I(s),U.value+=j,D.output+=U.output,D.globstar=!0,W(j);continue}const n={type:"star",value:j,output:M};!0!==s.bash?!U||"bracket"!==U.type&&"paren"!==U.type||!0!==s.regex?(D.index!==D.start&&"slash"!==U.type&&"dot"!==U.type||("dot"===U.type?(D.output+=T,U.output+=T):!0===s.dot?(D.output+=R,U.output+=R):(D.output+=P,U.output+=P),"*"!==G()&&(D.output+=k,U.output+=k)),X(n)):(n.output=j,X(n)):(n.output=".*?","bos"!==U.type&&"slash"!==U.type||(n.output=P+n.output),X(n))}for(;D.brackets>0;){if(!0===s.strictBrackets)throw new SyntaxError(h("closing","]"));D.output=r.escapeLast(D.output,"["),z("brackets")}for(;D.parens>0;){if(!0===s.strictBrackets)throw new SyntaxError(h("closing",")"));D.output=r.escapeLast(D.output,"("),z("parens")}for(;D.braces>0;){if(!0===s.strictBrackets)throw new SyntaxError(h("closing","}"));D.output=r.escapeLast(D.output,"{"),z("braces")}if(!0===s.strictSlashes||"star"!==U.type&&"bracket"!==U.type||X({type:"maybe_slash",value:"",output:`${A}?`}),!0===D.backtrack){D.output="";for(const e of D.tokens)D.output+=null!=e.output?e.output:e.value,e.suffix&&(D.output+=e.suffix)}return D};f.fastpaths=(e,t)=>{const s={...t},o="number"==typeof s.maxLength?Math.min(i,s.maxLength):i,a=e.length;if(a>o)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`);e=l[e]||e;const c=r.isWindows(t),{DOT_LITERAL:u,SLASH_LITERAL:h,ONE_CHAR:f,DOTS_SLASH:p,NO_DOT:d,NO_DOTS:g,NO_DOTS_SLASH:m,STAR:y,START_ANCHOR:b}=n.globChars(c),w=s.dot?g:d,E=s.dot?m:d,v=s.capture?"":"?:";let S=!0===s.bash?".*?":y;s.capture&&(S=`(${S})`);const A=e=>!0===e.noglobstar?S:`(${v}(?:(?!${b}${e.dot?p:u}).)*?)`,k=e=>{switch(e){case"*":return`${w}${f}${S}`;case".*":return`${u}${f}${S}`;case"*.*":return`${w}${S}${u}${f}${S}`;case"*/*":return`${w}${S}${h}${f}${E}${S}`;case"**":return w+A(s);case"**/*":return`(?:${w}${A(s)}${h})?${E}${f}${S}`;case"**/*.*":return`(?:${w}${A(s)}${h})?${E}${S}${u}${f}${S}`;case"**/.*":return`(?:${w}${A(s)}${h})?${u}${f}${S}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const s=k(t[1]);if(!s)return;return s+u+t[2]}}},O=r.removePrefix(e,{negated:!1,prefix:""});let C=k(O);return C&&!0!==s.strictSlashes&&(C+=`${h}?`),C},e.exports=f},870:(e,t,s)=>{const n=s(6928),r=s(519),i=s(3579),o=s(8977),a=s(557),c=(e,t,s=!1)=>{if(Array.isArray(e)){const n=e.map((e=>c(e,t,s))),r=e=>{for(const t of n){const s=t(e);if(s)return s}return!1};return r}const n=(r=e)&&"object"==typeof r&&!Array.isArray(r)&&e.tokens&&e.input;var r;if(""===e||"string"!=typeof e&&!n)throw new TypeError("Expected pattern to be a non-empty string");const i=t||{},a=o.isWindows(t),l=n?c.compileRe(e,t):c.makeRe(e,t,!1,!0),u=l.state;delete l.state;let h=()=>!1;if(i.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};h=c(i.ignore,e,s)}const f=(s,n=!1)=>{const{isMatch:r,match:o,output:f}=c.test(s,l,t,{glob:e,posix:a}),p={glob:e,state:u,regex:l,posix:a,input:s,output:f,match:o,isMatch:r};return"function"==typeof i.onResult&&i.onResult(p),!1===r?(p.isMatch=!1,!!n&&p):h(s)?("function"==typeof i.onIgnore&&i.onIgnore(p),p.isMatch=!1,!!n&&p):("function"==typeof i.onMatch&&i.onMatch(p),!n||p)};return s&&(f.state=u),f};c.test=(e,t,s,{glob:n,posix:r}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const i=s||{},a=i.format||(r?o.toPosixSlashes:null);let l=e===n,u=l&&a?a(e):e;return!1===l&&(u=a?a(e):e,l=u===n),!1!==l&&!0!==i.capture||(l=!0===i.matchBase||!0===i.basename?c.matchBase(e,t,s,r):t.exec(u)),{isMatch:Boolean(l),match:l,output:u}},c.matchBase=(e,t,s,r=o.isWindows(s))=>(t instanceof RegExp?t:c.makeRe(t,s)).test(n.basename(e)),c.isMatch=(e,t,s)=>c(t,s)(e),c.parse=(e,t)=>Array.isArray(e)?e.map((e=>c.parse(e,t))):i(e,{...t,fastpaths:!1}),c.scan=(e,t)=>r(e,t),c.compileRe=(e,t,s=!1,n=!1)=>{if(!0===s)return e.output;const r=t||{},i=r.contains?"":"^",o=r.contains?"":"$";let a=`${i}(?:${e.output})${o}`;e&&!0===e.negated&&(a=`^(?!${a}).*$`);const l=c.toRegex(a,t);return!0===n&&(l.state=e),l},c.makeRe=(e,t={},s=!1,n=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let r={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(r.output=i.fastpaths(e,t)),r.output||(r=i(e,t)),c.compileRe(r,t,s,n)},c.toRegex=(e,t)=>{try{const s=t||{};return new RegExp(e,s.flags||(s.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},c.constants=a,e.exports=c},519:(e,t,s)=>{const n=s(8977),{CHAR_ASTERISK:r,CHAR_AT:i,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:a,CHAR_DOT:c,CHAR_EXCLAMATION_MARK:l,CHAR_FORWARD_SLASH:u,CHAR_LEFT_CURLY_BRACE:h,CHAR_LEFT_PARENTHESES:f,CHAR_LEFT_SQUARE_BRACKET:p,CHAR_PLUS:d,CHAR_QUESTION_MARK:g,CHAR_RIGHT_CURLY_BRACE:m,CHAR_RIGHT_PARENTHESES:y,CHAR_RIGHT_SQUARE_BRACKET:b}=s(557),w=e=>e===u||e===o,E=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};e.exports=(e,t)=>{const s=t||{},v=e.length-1,S=!0===s.parts||!0===s.scanToEnd,A=[],k=[],O=[];let C,T,R=e,L=-1,_=0,x=0,N=!1,I=!1,P=!1,$=!1,M=!1,D=!1,B=!1,F=!1,H=!1,j=!1,U=0,K={value:"",depth:0,isGlob:!1};const G=()=>L>=v,q=()=>(C=T,R.charCodeAt(++L));for(;L<v;){let e;if(T=q(),T!==o){if(!0===D||T===h){for(U++;!0!==G()&&(T=q());)if(T!==o)if(T!==h){if(!0!==D&&T===c&&(T=q())===c){if(N=K.isBrace=!0,P=K.isGlob=!0,j=!0,!0===S)continue;break}if(!0!==D&&T===a){if(N=K.isBrace=!0,P=K.isGlob=!0,j=!0,!0===S)continue;break}if(T===m&&(U--,0===U)){D=!1,N=K.isBrace=!0,j=!0;break}}else U++;else B=K.backslashes=!0,q();if(!0===S)continue;break}if(T!==u){if(!0!==s.noext){if(!0===(T===d||T===i||T===r||T===g||T===l)&&R.charCodeAt(L+1)===f){if(P=K.isGlob=!0,$=K.isExtglob=!0,j=!0,T===l&&L===_&&(H=!0),!0===S){for(;!0!==G()&&(T=q());)if(T!==o){if(T===y){P=K.isGlob=!0,j=!0;break}}else B=K.backslashes=!0,T=q();continue}break}}if(T===r){if(C===r&&(M=K.isGlobstar=!0),P=K.isGlob=!0,j=!0,!0===S)continue;break}if(T===g){if(P=K.isGlob=!0,j=!0,!0===S)continue;break}if(T===p){for(;!0!==G()&&(e=q());)if(e!==o){if(e===b){I=K.isBracket=!0,P=K.isGlob=!0,j=!0;break}}else B=K.backslashes=!0,q();if(!0===S)continue;break}if(!0===s.nonegate||T!==l||L!==_){if(!0!==s.noparen&&T===f){if(P=K.isGlob=!0,!0===S){for(;!0!==G()&&(T=q());)if(T!==f){if(T===y){j=!0;break}}else B=K.backslashes=!0,T=q();continue}break}if(!0===P){if(j=!0,!0===S)continue;break}}else F=K.negated=!0,_++}else{if(A.push(L),k.push(K),K={value:"",depth:0,isGlob:!1},!0===j)continue;if(C===c&&L===_+1){_+=2;continue}x=L+1}}else B=K.backslashes=!0,T=q(),T===h&&(D=!0)}!0===s.noext&&($=!1,P=!1);let Y=R,W="",V="";_>0&&(W=R.slice(0,_),R=R.slice(_),x-=_),Y&&!0===P&&x>0?(Y=R.slice(0,x),V=R.slice(x)):!0===P?(Y="",V=R):Y=R,Y&&""!==Y&&"/"!==Y&&Y!==R&&w(Y.charCodeAt(Y.length-1))&&(Y=Y.slice(0,-1)),!0===s.unescape&&(V&&(V=n.removeBackslashes(V)),Y&&!0===B&&(Y=n.removeBackslashes(Y)));const Q={prefix:W,input:e,start:_,base:Y,glob:V,isBrace:N,isBracket:I,isGlob:P,isExtglob:$,isGlobstar:M,negated:F,negatedExtglob:H};if(!0===s.tokens&&(Q.maxDepth=0,w(T)||k.push(K),Q.tokens=k),!0===s.parts||!0===s.tokens){let t;for(let n=0;n<A.length;n++){const r=t?t+1:_,i=A[n],o=e.slice(r,i);s.tokens&&(0===n&&0!==_?(k[n].isPrefix=!0,k[n].value=W):k[n].value=o,E(k[n]),Q.maxDepth+=k[n].depth),0===n&&""===o||O.push(o),t=i}if(t&&t+1<e.length){const n=e.slice(t+1);O.push(n),s.tokens&&(k[k.length-1].value=n,E(k[k.length-1]),Q.maxDepth+=k[k.length-1].depth)}Q.slashes=A,Q.parts=O}return Q}},8977:(e,t,s)=>{const n=s(6928),r="win32"===process.platform,{REGEX_BACKSLASH:i,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:c}=s(557);t.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),t.hasRegexChars=e=>a.test(e),t.isRegexChar=e=>1===e.length&&t.hasRegexChars(e),t.escapeRegex=e=>e.replace(c,"\\$1"),t.toPosixSlashes=e=>e.replace(i,"/"),t.removeBackslashes=e=>e.replace(o,(e=>"\\"===e?"":e)),t.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},t.isWindows=e=>e&&"boolean"==typeof e.windows?e.windows:!0===r||"\\"===n.sep,t.escapeLast=(e,s,n)=>{const r=e.lastIndexOf(s,n);return-1===r?e:"\\"===e[r-1]?t.escapeLast(e,s,r-1):`${e.slice(0,r)}\\${e.slice(r)}`},t.removePrefix=(e,t={})=>{let s=e;return s.startsWith("./")&&(s=s.slice(2),t.prefix="./"),s},t.wrapOutput=(e,t={},s={})=>{let n=`${s.contains?"":"^"}(?:${e})${s.contains?"":"$"}`;return!0===t.negated&&(n=`(?:^(?!${n}).*$)`),n}},9575:(e,t,s)=>{String.prototype.startsWith||(String.prototype.startsWith=function(e){return this.substring(0,e.length)===e});var n=s(6930);e.exports=function(e,t,s){var r,i,o;if("function"==typeof t&&(s=t,t=void 0),"function"!=typeof s)return r=n,i=e,o=t,new Promise((function(e,t){r(i,o,(function(s,n){if(s)return t(s);e(n)}))}));n(e,t,s)}},9078:(e,t,s)=>{var n=s(5317).spawn;e.exports=function(e,t,s,r){"function"==typeof s&&(r=s,s=void 0);var i=!1,o=n(e,t,s),a="",c="";o.stdout.on("data",(function(e){a+=e.toString()})),o.stderr.on("data",(function(e){c+=e.toString()})),o.on("error",(function(e){i||(i=!0,r(new Error(e)))})),o.on("close",(function(e){if(!i){if(i=!0,c=function(e){if(e)return(e=(e=e.trim()).replace(/your \d+x\d+ screen size is bogus\. expect trouble/gi,"")).trim()}(c))return r(new Error(c));r(null,a,e)}}))}},8503:(e,t,s)=>{var n=s(857),r={ps:()=>s(1686),wmic:()=>s(771)},i=n.platform();i.startsWith("win")&&(i="win");var o={darwin:"ps",sunos:"ps",freebsd:"ps",netbsd:"ps",win:"wmic",linux:"ps",aix:"ps"}[i];e.exports=function(e){void 0===o&&e(new Error(n.platform()+" is not supported yet, please open an issue (https://github.com/simonepri/pidtree)")),r[o]()(e)}},6930:(e,t,s)=>{var n=s(8503);e.exports=function(e,t,s){"function"==typeof t&&(s=t,t={}),"object"!=typeof t&&(t={}),e=parseInt(e,10),isNaN(e)||e<-1?s(new TypeError("The pid provided is invalid")):n((function(n,r){if(n)s(n);else if(-1!==e){for(var i,o=0;o<r.length;o++){if(r[o][1]===e){i=t.advanced?{ppid:r[o][0],pid:e}:e;break}r[o][0]===e&&(i=t.advanced?{pid:e}:e)}if(i){for(var a={};r.length>0;){var c=r.pop();a[c[0]]?a[c[0]].push(c[1]):a[c[0]]=[c[1]]}for(var l=0,u=[i];l<u.length;){var h=t.advanced?u[l++].pid:u[l++];if(a[h]){for(var f=a[h].length,p=0;p<f;p++)u.push(t.advanced?{ppid:h,pid:a[h][p]}:a[h][p]);delete a[h]}}t.root||u.shift(),s(null,u)}else s(new Error("No matching pid found"))}else{for(var d=0;d<r.length;d++)r[d]=t.advanced?{ppid:r[d][0],pid:r[d][1]}:r[d]=r[d][1];s(null,r)}}))}},1686:(e,t,s)=>{var n=s(857),r=s(9078);e.exports=function(e){r("ps",["-A","-o","ppid,pid"],(function(t,s,r){if(t)return e(t);if(0!==r)return e(new Error("pidtree ps command exited with code "+r));try{s=s.split(n.EOL);for(var i=[],o=1;o<s.length;o++)s[o]=s[o].trim(),s[o]&&(s[o]=s[o].split(/\s+/),s[o][0]=parseInt(s[o][0],10),s[o][1]=parseInt(s[o][1],10),i.push(s[o]));e(null,i)}catch(t){e(t)}}))}},771:(e,t,s)=>{var n=s(857),r=s(9078);e.exports=function(e){r("wmic",["PROCESS","get","ParentProcessId,ProcessId"],{windowsHide:!0,windowsVerbatimArguments:!0},(function(t,s,r){if(t)e(t);else if(0===r)try{s=s.split(n.EOL);for(var i=[],o=1;o<s.length;o++)s[o]=s[o].trim(),s[o]&&(s[o]=s[o].split(/\s+/),s[o][0]=parseInt(s[o][0],10),s[o][1]=parseInt(s[o][1],10),i.push(s[o]));e(null,i)}catch(t){e(t)}else e(new Error("pidtree wmic command exited with code "+r))}))}},4971:e=>{function t(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}e.exports=function(e){return(e=e||{}).circles?function(e){var s=[],n=[];return e.proto?function e(i){if("object"!=typeof i||null===i)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return r(i,e);if(i instanceof Map)return new Map(r(Array.from(i),e));if(i instanceof Set)return new Set(r(Array.from(i),e));var o={};for(var a in s.push(i),n.push(o),i){var c=i[a];if("object"!=typeof c||null===c)o[a]=c;else if(c instanceof Date)o[a]=new Date(c);else if(c instanceof Map)o[a]=new Map(r(Array.from(c),e));else if(c instanceof Set)o[a]=new Set(r(Array.from(c),e));else if(ArrayBuffer.isView(c))o[a]=t(c);else{var l=s.indexOf(c);o[a]=-1!==l?n[l]:e(c)}}return s.pop(),n.pop(),o}:function e(i){if("object"!=typeof i||null===i)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return r(i,e);if(i instanceof Map)return new Map(r(Array.from(i),e));if(i instanceof Set)return new Set(r(Array.from(i),e));var o={};for(var a in s.push(i),n.push(o),i)if(!1!==Object.hasOwnProperty.call(i,a)){var c=i[a];if("object"!=typeof c||null===c)o[a]=c;else if(c instanceof Date)o[a]=new Date(c);else if(c instanceof Map)o[a]=new Map(r(Array.from(c),e));else if(c instanceof Set)o[a]=new Set(r(Array.from(c),e));else if(ArrayBuffer.isView(c))o[a]=t(c);else{var l=s.indexOf(c);o[a]=-1!==l?n[l]:e(c)}}return s.pop(),n.pop(),o};function r(e,r){for(var i=Object.keys(e),o=new Array(i.length),a=0;a<i.length;a++){var c=i[a],l=e[c];if("object"!=typeof l||null===l)o[c]=l;else if(l instanceof Date)o[c]=new Date(l);else if(ArrayBuffer.isView(l))o[c]=t(l);else{var u=s.indexOf(l);o[c]=-1!==u?n[u]:r(l)}}return o}}(e):e.proto?function e(n){if("object"!=typeof n||null===n)return n;if(n instanceof Date)return new Date(n);if(Array.isArray(n))return s(n,e);if(n instanceof Map)return new Map(s(Array.from(n),e));if(n instanceof Set)return new Set(s(Array.from(n),e));var r={};for(var i in n){var o=n[i];"object"!=typeof o||null===o?r[i]=o:o instanceof Date?r[i]=new Date(o):o instanceof Map?r[i]=new Map(s(Array.from(o),e)):o instanceof Set?r[i]=new Set(s(Array.from(o),e)):ArrayBuffer.isView(o)?r[i]=t(o):r[i]=e(o)}return r}:function e(n){if("object"!=typeof n||null===n)return n;if(n instanceof Date)return new Date(n);if(Array.isArray(n))return s(n,e);if(n instanceof Map)return new Map(s(Array.from(n),e));if(n instanceof Set)return new Set(s(Array.from(n),e));var r={};for(var i in n)if(!1!==Object.hasOwnProperty.call(n,i)){var o=n[i];"object"!=typeof o||null===o?r[i]=o:o instanceof Date?r[i]=new Date(o):o instanceof Map?r[i]=new Map(s(Array.from(o),e)):o instanceof Set?r[i]=new Set(s(Array.from(o),e)):ArrayBuffer.isView(o)?r[i]=t(o):r[i]=e(o)}return r};function s(e,s){for(var n=Object.keys(e),r=new Array(n.length),i=0;i<n.length;i++){var o=n[i],a=e[o];"object"!=typeof a||null===a?r[o]=a:a instanceof Date?r[o]=new Date(a):ArrayBuffer.isView(a)?r[o]=t(a):r[o]=s(a)}return r}}},5600:(e,t,s)=>{const n=s(857),r=s(6925),i=process.env;let o;function a(e){const t=function(e){if(!1===o)return 0;if(r("color=16m")||r("color=full")||r("color=truecolor"))return 3;if(r("color=256"))return 2;if(e&&!e.isTTY&&!0!==o)return 0;const t=o?1:0;if("win32"===process.platform){const e=n.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in i)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in i))||"codeship"===i.CI_NAME?1:t;if("TEAMCITY_VERSION"in i)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0;if("truecolor"===i.COLORTERM)return 3;if("TERM_PROGRAM"in i){const e=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(i.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)||"COLORTERM"in i?1:(i.TERM,t)}(e);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(t)}r("no-color")||r("no-colors")||r("color=false")?o=!1:(r("color")||r("colors")||r("color=true")||r("color=always"))&&(o=!0),"FORCE_COLOR"in i&&(o=0===i.FORCE_COLOR.length||0!==parseInt(i.FORCE_COLOR,10)),e.exports={supportsColor:a,stdout:a(process.stdout),stderr:a(process.stderr)}},6925:e=>{e.exports=(e,t)=>{t=t||process.argv;const s=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(s+e),r=t.indexOf("--");return-1!==n&&(-1===r||n<r)}},9093:(e,t,s)=>{const n=s(8424),r=(e,t,s)=>{if(!1===n(e))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===t||e===t)return String(e);if(!1===n(t))throw new TypeError("toRegexRange: expected the second argument to be a number.");let i={relaxZeros:!0,...s};"boolean"==typeof i.strictZeros&&(i.relaxZeros=!1===i.strictZeros);let c=e+":"+t+"="+String(i.relaxZeros)+String(i.shorthand)+String(i.capture)+String(i.wrap);if(r.cache.hasOwnProperty(c))return r.cache[c].result;let l=Math.min(e,t),u=Math.max(e,t);if(1===Math.abs(l-u)){let s=e+"|"+t;return i.capture?`(${s})`:!1===i.wrap?s:`(?:${s})`}let h=d(e)||d(t),f={min:e,max:t,a:l,b:u},p=[],g=[];if(h&&(f.isPadded=h,f.maxLen=String(f.max).length),l<0){g=o(u<0?Math.abs(u):1,Math.abs(l),f,i),l=f.a=0}return u>=0&&(p=o(l,u,f,i)),f.negatives=g,f.positives=p,f.result=function(e,t,s){let n=a(e,t,"-",!1,s)||[],r=a(t,e,"",!1,s)||[],i=a(e,t,"-?",!0,s)||[];return n.concat(i).concat(r).join("|")}(g,p,i),!0===i.capture?f.result=`(${f.result})`:!1!==i.wrap&&p.length+g.length>1&&(f.result=`(?:${f.result})`),r.cache[c]=f,f.result};function i(e,t,s){if(e===t)return{pattern:e,count:[],digits:0};let n=function(e,t){let s=[];for(let n=0;n<e.length;n++)s.push([e[n],t[n]]);return s}(e,t),r=n.length,i="",o=0;for(let e=0;e<r;e++){let[t,r]=n[e];t===r?i+=t:"0"!==t||"9"!==r?i+=p(t,r,s):o++}return o&&(i+=!0===s.shorthand?"\\d":"[0-9]"),{pattern:i,count:[o],digits:r}}function o(e,t,s,n){let r,o=function(e,t){let s=1,n=1,r=u(e,s),i=new Set([t]);for(;e<=r&&r<=t;)i.add(r),s+=1,r=u(e,s);for(r=h(t+1,n)-1;e<r&&r<=t;)i.add(r),n+=1,r=h(t+1,n)-1;return i=[...i],i.sort(c),i}(e,t),a=[],l=e;for(let e=0;e<o.length;e++){let t=o[e],c=i(String(l),String(t),n),u="";s.isPadded||!r||r.pattern!==c.pattern?(s.isPadded&&(u=g(t,s,n)),c.string=u+c.pattern+f(c.count),a.push(c),l=t+1,r=c):(r.count.length>1&&r.count.pop(),r.count.push(c.count[0]),r.string=r.pattern+f(r.count),l=t+1)}return a}function a(e,t,s,n,r){let i=[];for(let r of e){let{string:e}=r;n||l(t,"string",e)||i.push(s+e),n&&l(t,"string",e)&&i.push(s+e)}return i}function c(e,t){return e>t?1:t>e?-1:0}function l(e,t,s){return e.some((e=>e[t]===s))}function u(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function h(e,t){return e-e%Math.pow(10,t)}function f(e){let[t=0,s=""]=e;return s||t>1?`{${t+(s?","+s:"")}}`:""}function p(e,t,s){return`[${e}${t-e==1?"":"-"}${t}]`}function d(e){return/^-?(0+)\d/.test(e)}function g(e,t,s){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),r=!1!==s.relaxZeros;switch(n){case 0:return"";case 1:return r?"0?":"0";case 2:return r?"0{0,2}":"00";default:return r?`0{0,${n}}`:`0{${n}}`}}r.cache={},r.clearCache=()=>r.cache={},e.exports=r},3285:(e,t,s)=>{var n=s(9399),r=s(3205),i=s(2262),o=s(847),a=s(9164),c=s(8302),l=s(2918);function u(e,t,s,n,r,i){const o="block-map"===s.type?a.resolveBlockMap(e,t,s,n,i):"block-seq"===s.type?c.resolveBlockSeq(e,t,s,n,i):l.resolveFlowCollection(e,t,s,n,i),u=o.constructor;return"!"===r||r===u.tagName?(o.tag=u.tagName,o):(r&&(o.tag=r),o)}t.composeCollection=function(e,t,s,a,c){const l=a?t.directives.tagName(a.source,(e=>c(a,"TAG_RESOLVE_FAILED",e))):null,h="block-map"===s.type?"map":"block-seq"===s.type?"seq":"{"===s.start.source?"map":"seq";if(!a||!l||"!"===l||l===i.YAMLMap.tagName&&"map"===h||l===o.YAMLSeq.tagName&&"seq"===h||!h)return u(e,t,s,c,l);let f=t.schema.tags.find((e=>e.tag===l&&e.collection===h));if(!f){const n=t.schema.knownTags[l];if(!n||n.collection!==h)return n?.collection?c(a,"BAD_COLLECTION_TYPE",`${n.tag} used for ${h} collection, but expects ${n.collection}`,!0):c(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${l}`,!0),u(e,t,s,c,l);t.schema.tags.push(Object.assign({},n,{default:!1})),f=n}const p=u(e,t,s,c,l,f),d=f.resolve?.(p,(e=>c(a,"TAG_RESOLVE_FAILED",e)),t.options)??p,g=n.isNode(d)?d:new r.Scalar(d);return g.range=p.range,g.tag=l,f?.format&&(g.format=f.format),g}},1683:(e,t,s)=>{var n=s(2333),r=s(5729),i=s(3484),o=s(423);t.composeDoc=function(e,t,{offset:s,start:a,value:c,end:l},u){const h=Object.assign({_directives:t},e),f=new n.Document(void 0,h),p={atRoot:!0,directives:f.directives,options:f.options,schema:f.schema},d=o.resolveProps(a,{indicator:"doc-start",next:c??l?.[0],offset:s,onError:u,startOnNewline:!0});d.found&&(f.directives.docStart=!0,!c||"block-map"!==c.type&&"block-seq"!==c.type||d.hasNewline||u(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),f.contents=c?r.composeNode(p,c,d,u):r.composeEmptyNode(p,d.end,a,null,d,u);const g=f.contents.range[2],m=i.resolveEnd(l,g,!1,u);return m.comment&&(f.comment=m.comment),f.range=[s,g,m.offset],f}},5729:(e,t,s)=>{var n=s(9281),r=s(3285),i=s(8917),o=s(3484),a=s(9943);const c={composeNode:l,composeEmptyNode:u};function l(e,t,s,a){const{spaceBefore:l,comment:h,anchor:f,tag:p}=s;let d,g=!0;switch(t.type){case"alias":d=function({options:e},{offset:t,source:s,end:r},i){const a=new n.Alias(s.substring(1));""===a.source&&i(t,"BAD_ALIAS","Alias cannot be an empty string");a.source.endsWith(":")&&i(t+s.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=t+s.length,l=o.resolveEnd(r,c,e.strict,i);a.range=[t,c,l.offset],l.comment&&(a.comment=l.comment);return a}(e,t,a),(f||p)&&a(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":d=i.composeScalar(e,t,p,a),f&&(d.anchor=f.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":d=r.composeCollection(c,e,t,p,a),f&&(d.anchor=f.source.substring(1));break;default:a(t,"UNEXPECTED_TOKEN","error"===t.type?t.message:`Unsupported token (type: ${t.type})`),d=u(e,t.offset,void 0,null,s,a),g=!1}return f&&""===d.anchor&&a(f,"BAD_ALIAS","Anchor cannot be an empty string"),l&&(d.spaceBefore=!0),h&&("scalar"===t.type&&""===t.source?d.comment=h:d.commentBefore=h),e.options.keepSourceTokens&&g&&(d.srcToken=t),d}function u(e,t,s,n,{spaceBefore:r,comment:o,anchor:c,tag:l,end:u},h){const f={type:"scalar",offset:a.emptyScalarPosition(t,s,n),indent:-1,source:""},p=i.composeScalar(e,f,l,h);return c&&(p.anchor=c.source.substring(1),""===p.anchor&&h(c,"BAD_ALIAS","Anchor cannot be an empty string")),r&&(p.spaceBefore=!0),o&&(p.comment=o,p.range[2]=u),p}t.composeEmptyNode=u,t.composeNode=l},8917:(e,t,s)=>{var n=s(9399),r=s(3205),i=s(6945),o=s(2362);t.composeScalar=function(e,t,s,a){const{value:c,type:l,comment:u,range:h}="block-scalar"===t.type?i.resolveBlockScalar(t,e.options.strict,a):o.resolveFlowScalar(t,e.options.strict,a),f=s?e.directives.tagName(s.source,(e=>a(s,"TAG_RESOLVE_FAILED",e))):null,p=s&&f?function(e,t,s,r,i){if("!"===s)return e[n.SCALAR];const o=[];for(const t of e.tags)if(!t.collection&&t.tag===s){if(!t.default||!t.test)return t;o.push(t)}for(const e of o)if(e.test?.test(t))return e;const a=e.knownTags[s];if(a&&!a.collection)return e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a;return i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,"tag:yaml.org,2002:str"!==s),e[n.SCALAR]}(e.schema,c,f,s,a):"scalar"===t.type?function({directives:e,schema:t},s,r,i){const o=t.tags.find((e=>e.default&&e.test?.test(s)))||t[n.SCALAR];if(t.compat){const a=t.compat.find((e=>e.default&&e.test?.test(s)))??t[n.SCALAR];if(o.tag!==a.tag){i(r,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${e.tagString(o.tag)} or ${e.tagString(a.tag)}`,!0)}}return o}(e,c,t,a):e.schema[n.SCALAR];let d;try{const i=p.resolve(c,(e=>a(s??t,"TAG_RESOLVE_FAILED",e)),e.options);d=n.isScalar(i)?i:new r.Scalar(i)}catch(e){const n=e instanceof Error?e.message:String(e);a(s??t,"TAG_RESOLVE_FAILED",n),d=new r.Scalar(c)}return d.range=h,d.source=c,l&&(d.type=l),f&&(d.tag=f),p.format&&(d.format=p.format),u&&(d.comment=u),d}},8480:(e,t,s)=>{var n=s(4670),r=s(2333),i=s(1656),o=s(9399),a=s(1683),c=s(3484);function l(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:s}=e;return[t,t+("string"==typeof s?s.length:1)]}function u(e){let t="",s=!1,n=!1;for(let r=0;r<e.length;++r){const i=e[r];switch(i[0]){case"#":t+=(""===t?"":n?"\n\n":"\n")+(i.substring(1)||" "),s=!0,n=!1;break;case"%":"#"!==e[r+1]?.[0]&&(r+=1),s=!1;break;default:s||(n=!0),s=!1}}return{comment:t,afterEmptyLine:n}}t.Composer=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,s,n)=>{const r=l(e);n?this.warnings.push(new i.YAMLWarning(r,t,s)):this.errors.push(new i.YAMLParseError(r,t,s))},this.directives=new n.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:s,afterEmptyLine:n}=u(this.prelude);if(s){const r=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${s}`:s;else if(n||e.directives.docStart||!r)e.commentBefore=s;else if(o.isCollection(r)&&!r.flow&&r.items.length>0){let e=r.items[0];o.isPair(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${s}\n${t}`:s}else{const e=r.commentBefore;r.commentBefore=e?`${s}\n${e}`:s}}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:u(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,s=-1){for(const t of e)yield*this.next(t);yield*this.end(t,s)}*next(e){switch(process.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,((t,s,n)=>{const r=l(e);r[0]+=t,this.onError(r,"BAD_DIRECTIVE",s,n)})),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=a.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new i.YAMLParseError(l(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){const t="Unexpected doc-end without preceding document";this.errors.push(new i.YAMLParseError(l(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=!0;const t=c.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new i.YAMLParseError(l(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),s=new r.Document(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,t,t],this.decorate(s,!1),yield s}}}},9164:(e,t,s)=>{var n=s(4237),r=s(2262),i=s(423),o=s(2187),a=s(4851),c=s(5203);const l="All mapping items must start at the same column";t.resolveBlockMap=function({composeNode:e,composeEmptyNode:t},s,u,h,f){const p=new(f?.nodeClass??r.YAMLMap)(s.schema);s.atRoot&&(s.atRoot=!1);let d=u.offset,g=null;for(const r of u.items){const{start:f,key:m,sep:y,value:b}=r,w=i.resolveProps(f,{indicator:"explicit-key-ind",next:m??y?.[0],offset:d,onError:h,startOnNewline:!0}),E=!w.found;if(E){if(m&&("block-seq"===m.type?h(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in m&&m.indent!==u.indent&&h(d,"BAD_INDENT",l)),!w.anchor&&!w.tag&&!y){g=w.end,w.comment&&(p.comment?p.comment+="\n"+w.comment:p.comment=w.comment);continue}(w.hasNewlineAfterProp||o.containsNewline(m))&&h(m??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else w.found?.indent!==u.indent&&h(d,"BAD_INDENT",l);const v=w.end,S=m?e(s,m,w,h):t(s,v,f,null,w,h);s.schema.compat&&a.flowIndentCheck(u.indent,m,h),c.mapIncludes(s,p.items,S)&&h(v,"DUPLICATE_KEY","Map keys must be unique");const A=i.resolveProps(y??[],{indicator:"map-value-ind",next:b,offset:S.range[2],onError:h,startOnNewline:!m||"block-scalar"===m.type});if(d=A.end,A.found){E&&("block-map"!==b?.type||A.hasNewline||h(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),s.options.strict&&w.start<A.found.offset-1024&&h(S.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const i=b?e(s,b,A,h):t(s,d,y,null,A,h);s.schema.compat&&a.flowIndentCheck(u.indent,b,h),d=i.range[2];const o=new n.Pair(S,i);s.options.keepSourceTokens&&(o.srcToken=r),p.items.push(o)}else{E&&h(S.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),A.comment&&(S.comment?S.comment+="\n"+A.comment:S.comment=A.comment);const e=new n.Pair(S);s.options.keepSourceTokens&&(e.srcToken=r),p.items.push(e)}}return g&&g<d&&h(g,"IMPOSSIBLE","Map comment with trailing content"),p.range=[u.offset,d,g??d],p}},6945:(e,t,s)=>{var n=s(3205);t.resolveBlockScalar=function(e,t,s){const r=e.offset,i=function({offset:e,props:t},s,n){if("block-scalar-header"!==t[0].type)return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:r}=t[0],i=r[0];let o=0,a="",c=-1;for(let t=1;t<r.length;++t){const s=r[t];if(a||"-"!==s&&"+"!==s){const n=Number(s);!o&&n?o=n:-1===c&&(c=e+t)}else a=s}-1!==c&&n(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${r}`);let l=!1,u="",h=r.length;for(let e=1;e<t.length;++e){const r=t[e];switch(r.type){case"space":l=!0;case"newline":h+=r.source.length;break;case"comment":if(s&&!l){n(r,"MISSING_CHAR","Comments must be separated from other tokens by white space characters")}h+=r.source.length,u=r.source.substring(1);break;case"error":n(r,"UNEXPECTED_TOKEN",r.message),h+=r.source.length;break;default:{n(r,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${r.type}`);const e=r.source;e&&"string"==typeof e&&(h+=e.length)}}}return{mode:i,indent:o,chomp:a,comment:u,length:h}}(e,t,s);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};const o=">"===i.mode?n.Scalar.BLOCK_FOLDED:n.Scalar.BLOCK_LITERAL,a=e.source?function(e){const t=e.split(/\n( *)/),s=t[0],n=s.match(/^( *)/),r=[n?.[1]?[n[1],s.slice(n[1].length)]:["",s]];for(let e=1;e<t.length;e+=2)r.push([t[e],t[e+1]]);return r}(e.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 t="+"===i.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let s=r+i.length;return e.source&&(s+=e.source.length),{value:t,type:o,comment:i.comment,range:[r,s,s]}}let l=e.indent+i.indent,u=e.offset+i.length,h=0;for(let e=0;e<c;++e){const[t,n]=a[e];if(""!==n&&"\r"!==n){if(t.length<l){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";s(u+t.length,"MISSING_CHAR",e)}0===i.indent&&(l=t.length),h=e;break}0===i.indent&&t.length>l&&(l=t.length),u+=t.length+n.length+1}for(let e=a.length-1;e>=c;--e)a[e][0].length>l&&(c=e+1);let f="",p="",d=!1;for(let e=0;e<h;++e)f+=a[e][0].slice(l)+"\n";for(let e=h;e<c;++e){let[t,r]=a[e];u+=t.length+r.length+1;const c="\r"===r[r.length-1];if(c&&(r=r.slice(0,-1)),r&&t.length<l){const e=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;s(u-r.length-(c?2:1),"BAD_INDENT",e),t=""}o===n.Scalar.BLOCK_LITERAL?(f+=p+t.slice(l)+r,p="\n"):t.length>l||"\t"===r[0]?(" "===p?p="\n":d||"\n"!==p||(p="\n\n"),f+=p+t.slice(l)+r,p="\n",d=!0):""===r?"\n"===p?f+="\n":p="\n":(f+=p+r,p=" ",d=!1)}switch(i.chomp){case"-":break;case"+":for(let e=c;e<a.length;++e)f+="\n"+a[e][0].slice(l);"\n"!==f[f.length-1]&&(f+="\n");break;default:f+="\n"}const g=r+i.length+e.source.length;return{value:f,type:o,comment:i.comment,range:[r,g,g]}}},8302:(e,t,s)=>{var n=s(847),r=s(423),i=s(4851);t.resolveBlockSeq=function({composeNode:e,composeEmptyNode:t},s,o,a,c){const l=new(c?.nodeClass??n.YAMLSeq)(s.schema);s.atRoot&&(s.atRoot=!1);let u=o.offset,h=null;for(const{start:n,value:c}of o.items){const f=r.resolveProps(n,{indicator:"seq-item-ind",next:c,offset:u,onError:a,startOnNewline:!0});if(!f.found){if(!(f.anchor||f.tag||c)){h=f.end,f.comment&&(l.comment=f.comment);continue}c&&"block-seq"===c.type?a(f.end,"BAD_INDENT","All sequence items must start at the same column"):a(u,"MISSING_CHAR","Sequence item without - indicator")}const p=c?e(s,c,f,a):t(s,f.end,n,null,f,a);s.schema.compat&&i.flowIndentCheck(o.indent,c,a),u=p.range[2],l.items.push(p)}return l.range=[o.offset,u,h??u],l}},3484:(e,t)=>{t.resolveEnd=function(e,t,s,n){let r="";if(e){let i=!1,o="";for(const a of e){const{source:e,type:c}=a;switch(c){case"space":i=!0;break;case"comment":{s&&!i&&n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";r?r+=o+t:r=t,o="";break}case"newline":r&&(o+=e),i=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=e.length}}return{comment:r,offset:t}}},2918:(e,t,s)=>{var n=s(9399),r=s(4237),i=s(2262),o=s(847),a=s(3484),c=s(423),l=s(2187),u=s(5203);const h="Block collections are not allowed within flow collections",f=e=>e&&("block-map"===e.type||"block-seq"===e.type);t.resolveFlowCollection=function({composeNode:e,composeEmptyNode:t},s,p,d,g){const m="{"===p.start.source,y=m?"flow map":"flow sequence",b=new(g?.nodeClass??(m?i.YAMLMap:o.YAMLSeq))(s.schema);b.flow=!0;const w=s.atRoot;w&&(s.atRoot=!1);let E=p.offset+p.start.source.length;for(let o=0;o<p.items.length;++o){const a=p.items[o],{start:g,key:w,sep:v,value:S}=a,A=c.resolveProps(g,{flow:y,indicator:"explicit-key-ind",next:w??v?.[0],offset:E,onError:d,startOnNewline:!1});if(!A.found){if(!(A.anchor||A.tag||v||S)){0===o&&A.comma?d(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`):o<p.items.length-1&&d(A.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${y}`),A.comment&&(b.comment?b.comment+="\n"+A.comment:b.comment=A.comment),E=A.end;continue}!m&&s.options.strict&&l.containsNewline(w)&&d(w,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===o)A.comma&&d(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`);else if(A.comma||d(A.start,"MISSING_CHAR",`Missing , between ${y} items`),A.comment){let e="";e:for(const t of g)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}if(e){let t=b.items[b.items.length-1];n.isPair(t)&&(t=t.value??t.key),t.comment?t.comment+="\n"+e:t.comment=e,A.comment=A.comment.substring(e.length+1)}}if(m||v||A.found){const n=A.end,o=w?e(s,w,A,d):t(s,n,g,null,A,d);f(w)&&d(o.range,"BLOCK_IN_FLOW",h);const l=c.resolveProps(v??[],{flow:y,indicator:"map-value-ind",next:S,offset:o.range[2],onError:d,startOnNewline:!1});if(l.found){if(!m&&!A.found&&s.options.strict){if(v)for(const e of v){if(e===l.found)break;if("newline"===e.type){d(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}A.start<l.found.offset-1024&&d(l.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else S&&("source"in S&&S.source&&":"===S.source[0]?d(S,"MISSING_CHAR",`Missing space after : in ${y}`):d(l.start,"MISSING_CHAR",`Missing , or : between ${y} items`));const p=S?e(s,S,l,d):l.found?t(s,l.end,v,null,l,d):null;p?f(S)&&d(p.range,"BLOCK_IN_FLOW",h):l.comment&&(o.comment?o.comment+="\n"+l.comment:o.comment=l.comment);const k=new r.Pair(o,p);if(s.options.keepSourceTokens&&(k.srcToken=a),m){const e=b;u.mapIncludes(s,e.items,o)&&d(n,"DUPLICATE_KEY","Map keys must be unique"),e.items.push(k)}else{const e=new i.YAMLMap(s.schema);e.flow=!0,e.items.push(k),b.items.push(e)}E=p?p.range[2]:l.end}else{const n=S?e(s,S,A,d):t(s,A.end,v,null,A,d);b.items.push(n),E=n.range[2],f(S)&&d(n.range,"BLOCK_IN_FLOW",h)}}const v=m?"}":"]",[S,...A]=p.end;let k=E;if(S&&S.source===v)k=S.offset+S.source.length;else{const e=y[0].toUpperCase()+y.substring(1);d(E,w?"MISSING_CHAR":"BAD_INDENT",w?`${e} must end with a ${v}`:`${e} in block collection must be sufficiently indented and end with a ${v}`),S&&1!==S.source.length&&A.unshift(S)}if(A.length>0){const e=a.resolveEnd(A,k,s.options.strict,d);e.comment&&(b.comment?b.comment+="\n"+e.comment:b.comment=e.comment),b.range=[p.offset,k,e.offset]}else b.range=[p.offset,k,k];return b}},2362:(e,t,s)=>{var n=s(3205),r=s(3484);function i(e){let t,s;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy"),s=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch(e){t=/(.*?)[ \t]*\r?\n/sy,s=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=t.exec(e);if(!n)return e;let r=n[1],i=" ",o=t.lastIndex;for(s.lastIndex=o;n=s.exec(e);)""===n[1]?"\n"===i?r+=i:i="\n":(r+=i+n[1],i=" "),o=s.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=o,n=a.exec(e),r+i+(n?.[1]??"")}function o(e,t){let s="",n=e[t+1];for(;!(" "!==n&&"\t"!==n&&"\n"!==n&&"\r"!==n||"\r"===n&&"\n"!==e[t+2]);)"\n"===n&&(s+="\n"),n=e[(t+=1)+1];return s||(s=" "),{fold:s,offset:t}}const a={0:"\0",a:"\x07",b:"\b",e:"\x1b",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"\x85",_:"\xa0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function c(e,t,s,n){const r=e.substr(t,s),i=r.length===s&&/^[0-9a-fA-F]+$/.test(r)?parseInt(r,16):NaN;if(isNaN(i)){const r=e.substr(t-2,s+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${r}`),r}return String.fromCodePoint(i)}t.resolveFlowScalar=function(e,t,s){const{offset:l,type:u,source:h,end:f}=e;let p,d;const g=(e,t,n)=>s(l+e,t,n);switch(u){case"scalar":p=n.Scalar.PLAIN,d=function(e,t){let s="";switch(e[0]){case"\t":s="a tab character";break;case",":s="flow indicator character ,";break;case"%":s="directive indicator character %";break;case"|":case">":s=`block scalar indicator ${e[0]}`;break;case"@":case"`":s=`reserved character ${e[0]}`}s&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${s}`);return i(e)}(h,g);break;case"single-quoted-scalar":p=n.Scalar.QUOTE_SINGLE,d=function(e,t){"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote");return i(e.slice(1,-1)).replace(/''/g,"'")}(h,g);break;case"double-quoted-scalar":p=n.Scalar.QUOTE_DOUBLE,d=function(e,t){let s="";for(let n=1;n<e.length-1;++n){const r=e[n];if("\r"!==r||"\n"!==e[n+1])if("\n"===r){const{fold:t,offset:r}=o(e,n);s+=t,n=r}else if("\\"===r){let r=e[++n];const i=a[r];if(i)s+=i;else if("\n"===r)for(r=e[n+1];" "===r||"\t"===r;)r=e[1+ ++n];else if("\r"===r&&"\n"===e[n+1])for(r=e[1+ ++n];" "===r||"\t"===r;)r=e[1+ ++n];else if("x"===r||"u"===r||"U"===r){const i={x:2,u:4,U:8}[r];s+=c(e,n+1,i,t),n+=i}else{const r=e.substr(n-1,2);t(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${r}`),s+=r}}else if(" "===r||"\t"===r){const t=n;let i=e[n+1];for(;" "===i||"\t"===i;)i=e[1+ ++n];"\n"===i||"\r"===i&&"\n"===e[n+2]||(s+=n>t?e.slice(t,n+1):r)}else s+=r}'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote');return s}(h,g);break;default:return s(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${u}`),{value:"",type:null,comment:"",range:[l,l+h.length,l+h.length]}}const m=l+h.length,y=r.resolveEnd(f,m,t,s);return{value:d,type:p,comment:y.comment,range:[l,m,y.offset]}}},423:(e,t)=>{t.resolveProps=function(e,{flow:t,indicator:s,next:n,offset:r,onError:i,startOnNewline:o}){let a=!1,c=o,l=o,u="",h="",f=!1,p=!1,d=!1,g=null,m=null,y=null,b=null,w=null;for(const n of e)switch(d&&("space"!==n.type&&"newline"!==n.type&&"comma"!==n.type&&i(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),d=!1),n.type){case"space":!t&&c&&"doc-start"!==s&&"\t"===n.source[0]&&i(n,"TAB_AS_INDENT","Tabs are not allowed as indentation"),l=!0;break;case"comment":{l||i(n,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=n.source.substring(1)||" ";u?u+=h+e:u=e,h="",c=!1;break}case"newline":c?u?u+=n.source:a=!0:h+=n.source,c=!0,f=!0,(g||m)&&(p=!0),l=!0;break;case"anchor":g&&i(n,"MULTIPLE_ANCHORS","A node can have at most one anchor"),n.source.endsWith(":")&&i(n.offset+n.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=n,null===w&&(w=n.offset),c=!1,l=!1,d=!0;break;case"tag":m&&i(n,"MULTIPLE_TAGS","A node can have at most one tag"),m=n,null===w&&(w=n.offset),c=!1,l=!1,d=!0;break;case s:(g||m)&&i(n,"BAD_PROP_ORDER",`Anchors and tags must be after the ${n.source} indicator`),b&&i(n,"UNEXPECTED_TOKEN",`Unexpected ${n.source} in ${t??"collection"}`),b=n,c=!1,l=!1;break;case"comma":if(t){y&&i(n,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),y=n,c=!1,l=!1;break}default:i(n,"UNEXPECTED_TOKEN",`Unexpected ${n.type} token`),c=!1,l=!1}const E=e[e.length-1],v=E?E.offset+E.source.length:r;return d&&n&&"space"!==n.type&&"newline"!==n.type&&"comma"!==n.type&&("scalar"!==n.type||""!==n.source)&&i(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),{comma:y,found:b,spaceBefore:a,comment:u,hasNewline:f,hasNewlineAfterProp:p,anchor:g,tag:m,end:v,start:w??v}}},2187:(e,t)=>{t.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 s of t.items){for(const e of s.start)if("newline"===e.type)return!0;if(s.sep)for(const e of s.sep)if("newline"===e.type)return!0;if(e(s.key)||e(s.value))return!0}return!1;default:return!0}}},9943:(e,t)=>{t.emptyScalarPosition=function(e,t,s){if(t){null===s&&(s=t.length);for(let n=s-1;n>=0;--n){let s=t[n];switch(s.type){case"space":case"comment":case"newline":e-=s.source.length;continue}for(s=t[++n];"space"===s?.type;)e+=s.source.length,s=t[++n];break}}return e}},4851:(e,t,s)=>{var n=s(2187);t.flowIndentCheck=function(e,t,s){if("flow-collection"===t?.type){const r=t.end[0];if(r.indent===e&&("]"===r.source||"}"===r.source)&&n.containsNewline(t)){s(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}}},5203:(e,t,s)=>{var n=s(9399);t.mapIncludes=function(e,t,s){const{uniqueKeys:r}=e.options;if(!1===r)return!1;const i="function"==typeof r?r:(t,s)=>t===s||n.isScalar(t)&&n.isScalar(s)&&t.value===s.value&&!("<<"===t.value&&e.schema.merge);return t.some((e=>i(e.key,s)))}},2333:(e,t,s)=>{var n=s(9281),r=s(2997),i=s(9399),o=s(4237),a=s(3947),c=s(7840),l=s(1677),u=s(8028),h=s(7197),f=s(4532),p=s(4670);class d{constructor(e,t,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,i.NODE_TYPE,{value:i.DOC});let n=null;"function"==typeof t||Array.isArray(t)?n=t:void 0===s&&t&&(s=t,t=void 0);const r=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"},s);this.options=r;let{version:o}=r;s?._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new p.Directives({version:o}),this.setSchema(o,s),this.contents=void 0===e?null:this.createNode(e,n,s)}clone(){const e=Object.create(d.prototype,{[i.NODE_TYPE]:{value:i.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=i.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){g(this.contents)&&this.contents.add(e)}addIn(e,t){g(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const s=u.anchorNames(this);e.anchor=!t||s.has(t)?u.findNewAnchor(t||"a",s):t}return new n.Alias(e.anchor)}createNode(e,t,s){let n;if("function"==typeof t)e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,s=t.filter(e).map(String);s.length>0&&(t=t.concat(s)),n=t}else void 0===s&&t&&(s=t,t=void 0);const{aliasDuplicateObjects:r,anchorPrefix:o,flow:a,keepUndefined:c,onTagObj:l,tag:h}=s??{},{onAnchor:p,setAnchors:d,sourceObjects:g}=u.createNodeAnchors(this,o||"a"),m={aliasDuplicateObjects:r??!0,keepUndefined:c??!1,onAnchor:p,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:g},y=f.createNode(e,h,m);return a&&i.isCollection(y)&&(y.flow=!0),d(),y}createPair(e,t,s={}){const n=this.createNode(e,null,s),r=this.createNode(t,null,s);return new o.Pair(n,r)}delete(e){return!!g(this.contents)&&this.contents.delete(e)}deleteIn(e){return r.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):!!g(this.contents)&&this.contents.deleteIn(e)}get(e,t){return i.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return r.isEmptyPath(e)?!t&&i.isScalar(this.contents)?this.contents.value:this.contents:i.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!i.isCollection(this.contents)&&this.contents.has(e)}hasIn(e){return r.isEmptyPath(e)?void 0!==this.contents:!!i.isCollection(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=r.collectionFromPath(this.schema,[e],t):g(this.contents)&&this.contents.set(e,t)}setIn(e,t){r.isEmptyPath(e)?this.contents=t:null==this.contents?this.contents=r.collectionFromPath(this.schema,Array.from(e),t):g(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let s;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new p.Directives({version:"1.1"}),s={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new p.Directives({version:e}),s={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=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(!s)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new c.Schema(Object.assign(s,t))}}toJS({json:e,jsonArg:t,mapAsMap:s,maxAliasCount:n,onAnchor:r,reviver:i}={}){const o={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===s,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100},c=a.toJS(this.contents,t??"",o);if("function"==typeof r)for(const{count:e,res:t}of o.anchors.values())r(t,e);return"function"==typeof i?h.applyReviver(i,{"":c},"",c):c}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 l.stringifyDocument(this,e)}}function g(e){if(i.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}t.Document=d},8028:(e,t,s)=>{var n=s(9399),r=s(4364);function i(e){const t=new Set;return r.visit(e,{Value(e,s){s.anchor&&t.add(s.anchor)}}),t}function o(e,t){for(let s=1;;++s){const n=`${e}${s}`;if(!t.has(n))return n}}t.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},t.anchorNames=i,t.createNodeAnchors=function(e,t){const s=[],r=new Map;let a=null;return{onAnchor:n=>{s.push(n),a||(a=i(e));const r=o(t,a);return a.add(r),r},setAnchors:()=>{for(const e of s){const t=r.get(e);if("object"!=typeof t||!t.anchor||!n.isScalar(t.node)&&!n.isCollection(t.node)){const t=new Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}t.node.anchor=t.anchor}},sourceObjects:r}},t.findNewAnchor=o},7197:(e,t)=>{t.applyReviver=function e(t,s,n,r){if(r&&"object"==typeof r)if(Array.isArray(r))for(let s=0,n=r.length;s<n;++s){const n=r[s],i=e(t,r,String(s),n);void 0===i?delete r[s]:i!==n&&(r[s]=i)}else if(r instanceof Map)for(const s of Array.from(r.keys())){const n=r.get(s),i=e(t,r,s,n);void 0===i?r.delete(s):i!==n&&r.set(s,i)}else if(r instanceof Set)for(const s of Array.from(r)){const n=e(t,r,s,s);void 0===n?r.delete(s):n!==s&&(r.delete(s),r.add(n))}else for(const[s,n]of Object.entries(r)){const i=e(t,r,s,n);void 0===i?delete r[s]:i!==n&&(r[s]=i)}return t.call(s,n,r)}},4532:(e,t,s)=>{var n=s(9281),r=s(9399),i=s(3205);t.createNode=function(e,t,s){if(r.isDocument(e)&&(e=e.contents),r.isNode(e))return e;if(r.isPair(e)){const t=s.schema[r.MAP].createNode?.(s.schema,null,s);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"undefined"!=typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:o,onAnchor:a,onTagObj:c,schema:l,sourceObjects:u}=s;let h;if(o&&e&&"object"==typeof e){if(h=u.get(e),h)return h.anchor||(h.anchor=a(e)),new n.Alias(h.anchor);h={anchor:null,node:null},u.set(e,h)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let f=function(e,t,s){if(t){const e=s.filter((e=>e.tag===t)),n=e.find((e=>!e.format))??e[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return s.find((t=>t.identify?.(e)&&!t.format))}(e,t,l.tags);if(!f){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){const t=new i.Scalar(e);return h&&(h.node=t),t}f=e instanceof Map?l[r.MAP]:Symbol.iterator in Object(e)?l[r.SEQ]:l[r.MAP]}c&&(c(f),delete s.onTagObj);const p=f?.createNode?f.createNode(s.schema,e,s):"function"==typeof f?.nodeClass?.from?f.nodeClass.from(s.schema,e,s):new i.Scalar(e);return t?p.tag=t:f.default||(p.tag=f.tag),h&&(h.node=p),p}},4670:(e,t,s)=>{var n=s(9399),r=s(4364);const i={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};class o{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},o.defaultYaml,e),this.tags=Object.assign({},o.defaultTags,t)}clone(){const e=new o(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new o(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:o.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},o.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:o.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},o.defaultTags),this.atNextDocument=!1);const s=e.trim().split(/[ \t]+/),n=s.shift();switch(n){case"%TAG":{if(2!==s.length&&(t(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;const[e,n]=s;return this.tags[e]=n,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==s.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=s;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 ${n}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const s=e.slice(2,-1);return"!"===s||"!!"===s?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),s)}const[,s,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);const r=this.tags[s];if(r)try{return r+decodeURIComponent(n)}catch(e){return t(String(e)),null}return"!"===s?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,s]of Object.entries(this.tags))if(e.startsWith(s))return t+e.substring(s.length).replace(/[!,[\]{}]/g,(e=>i[e]));return"!"===e[0]?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let i;if(e&&s.length>0&&n.isNode(e.contents)){const t={};r.visit(e.contents,((e,s)=>{n.isNode(s)&&s.tag&&(t[s.tag]=!0)})),i=Object.keys(t)}else i=[];for(const[n,r]of s)"!!"===n&&"tag:yaml.org,2002:"===r||e&&!i.some((e=>e.startsWith(r)))||t.push(`%TAG ${n} ${r}`);return t.join("\n")}}o.defaultYaml={explicit:!1,version:"1.2"},o.defaultTags={"!!":"tag:yaml.org,2002:"},t.Directives=o},1656:(e,t)=>{class s extends Error{constructor(e,t,s,n){super(),this.name=e,this.code=s,this.message=n,this.pos=t}}t.YAMLError=s,t.YAMLParseError=class extends s{constructor(e,t,s){super("YAMLParseError",e,t,s)}},t.YAMLWarning=class extends s{constructor(e,t,s){super("YAMLWarning",e,t,s)}},t.prettifyError=(e,t)=>s=>{if(-1===s.pos[0])return;s.linePos=s.pos.map((e=>t.linePos(e)));const{line:n,col:r}=s.linePos[0];s.message+=` at line ${n}, column ${r}`;let i=r-1,o=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){const e=Math.min(i-39,o.length-79);o="\u2026"+o.substring(e),i-=e-1}if(o.length>80&&(o=o.substring(0,79)+"\u2026"),n>1&&/^ *$/.test(o.substring(0,i))){let s=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);s.length>80&&(s=s.substring(0,79)+"\u2026\n"),o=s+o}if(/[^ ]/.test(o)){let e=1;const t=s.linePos[1];t&&t.line===n&&t.col>r&&(e=Math.max(1,Math.min(t.col-r,80-i)));const a=" ".repeat(i)+"^".repeat(e);s.message+=`:\n\n${o}\n${a}\n`}}},3519:(e,t,s)=>{var n=s(8480),r=s(2333),i=s(7840),o=s(1656),a=s(9281),c=s(9399),l=s(4237),u=s(3205),h=s(2262),f=s(847),p=s(2645),d=s(2505),g=s(2324),m=s(5456),y=s(463),b=s(4364);t.Composer=n.Composer,t.Document=r.Document,t.Schema=i.Schema,t.YAMLError=o.YAMLError,t.YAMLParseError=o.YAMLParseError,t.YAMLWarning=o.YAMLWarning,t.Alias=a.Alias,t.isAlias=c.isAlias,t.isCollection=c.isCollection,t.isDocument=c.isDocument,t.isMap=c.isMap,t.isNode=c.isNode,t.isPair=c.isPair,t.isScalar=c.isScalar,t.isSeq=c.isSeq,t.Pair=l.Pair,t.Scalar=u.Scalar,t.YAMLMap=h.YAMLMap,t.YAMLSeq=f.YAMLSeq,t.CST=p,t.Lexer=d.Lexer,t.LineCounter=g.LineCounter,t.Parser=m.Parser,t.parse=y.parse,t.parseAllDocuments=y.parseAllDocuments,t.parseDocument=y.parseDocument,t.stringify=y.stringify,t.visit=b.visit,t.visitAsync=b.visitAsync},7953:(e,t)=>{t.debug=function(e,...t){"debug"===e&&console.log(...t)},t.warn=function(e,t){"debug"!==e&&"warn"!==e||("undefined"!=typeof process&&process.emitWarning?process.emitWarning(t):console.warn(t))}},9281:(e,t,s)=>{var n=s(8028),r=s(4364),i=s(9399),o=s(6849),a=s(3947);class c extends o.NodeBase{constructor(e){super(i.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return r.visit(e,{Node:(e,s)=>{if(s===this)return r.visit.BREAK;s.anchor===this.source&&(t=s)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:s,doc:n,maxAliasCount:r}=t,i=this.resolve(n);if(!i){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let o=s.get(i);if(o||(a.toJS(i,null,t),o=s.get(i)),!o||void 0===o.res){throw new ReferenceError("This should not happen: Alias anchor was not resolved?")}if(r>=0&&(o.count+=1,0===o.aliasCount&&(o.aliasCount=l(n,i,s)),o.count*o.aliasCount>r)){throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return o.res}toString(e,t,s){const r=`*${this.source}`;if(e){if(n.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${r} `}return r}}function l(e,t,s){if(i.isAlias(t)){const n=t.resolve(e),r=s&&n&&s.get(n);return r?r.count*r.aliasCount:0}if(i.isCollection(t)){let n=0;for(const r of t.items){const t=l(e,r,s);t>n&&(n=t)}return n}if(i.isPair(t)){const n=l(e,t.key,s),r=l(e,t.value,s);return Math.max(n,r)}return 1}t.Alias=c},2997:(e,t,s)=>{var n=s(4532),r=s(9399),i=s(6849);function o(e,t,s){let r=s;for(let e=t.length-1;e>=0;--e){const s=t[e];if("number"==typeof s&&Number.isInteger(s)&&s>=0){const e=[];e[s]=r,r=e}else r=new Map([[s,r]])}return n.createNode(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const a=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class c extends i.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map((t=>r.isNode(t)||r.isPair(t)?t.clone(e):t)),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(a(e))this.add(t);else{const[s,...n]=e,i=this.get(s,!0);if(r.isCollection(i))i.addIn(n,t);else{if(void 0!==i||!this.schema)throw new Error(`Expected YAML collection at ${s}. Remaining path: ${n}`);this.set(s,o(this.schema,n,t))}}}deleteIn(e){const[t,...s]=e;if(0===s.length)return this.delete(t);const n=this.get(t,!0);if(r.isCollection(n))return n.deleteIn(s);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${s}`)}getIn(e,t){const[s,...n]=e,i=this.get(s,!0);return 0===n.length?!t&&r.isScalar(i)?i.value:i:r.isCollection(i)?i.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every((t=>{if(!r.isPair(t))return!1;const s=t.value;return null==s||e&&r.isScalar(s)&&null==s.value&&!s.commentBefore&&!s.comment&&!s.tag}))}hasIn(e){const[t,...s]=e;if(0===s.length)return this.has(t);const n=this.get(t,!0);return!!r.isCollection(n)&&n.hasIn(s)}setIn(e,t){const[s,...n]=e;if(0===n.length)this.set(s,t);else{const e=this.get(s,!0);if(r.isCollection(e))e.setIn(n,t);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${s}. Remaining path: ${n}`);this.set(s,o(this.schema,n,t))}}}}c.maxFlowStringSingleLineLength=60,t.Collection=c,t.collectionFromPath=o,t.isEmptyPath=a},6849:(e,t,s)=>{var n=s(7197),r=s(9399),i=s(3947);t.NodeBase=class{constructor(e){Object.defineProperty(this,r.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(e,{mapAsMap:t,maxAliasCount:s,onAnchor:o,reviver:a}={}){if(!r.isDocument(e))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof s?s:100},l=i.toJS(this,"",c);if("function"==typeof o)for(const{count:e,res:t}of c.anchors.values())o(t,e);return"function"==typeof a?n.applyReviver(a,{"":l},"",l):l}}},4237:(e,t,s)=>{var n=s(4532),r=s(9348),i=s(8016),o=s(9399);class a{constructor(e,t=null){Object.defineProperty(this,o.NODE_TYPE,{value:o.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:s}=this;return o.isNode(t)&&(t=t.clone(e)),o.isNode(s)&&(s=s.clone(e)),new a(t,s)}toJSON(e,t){const s=t?.mapAsMap?new Map:{};return i.addPairToJSMap(t,s,this)}toString(e,t,s){return e?.doc?r.stringifyPair(this,e,t,s):JSON.stringify(this)}}t.Pair=a,t.createPair=function(e,t,s){const r=n.createNode(e,void 0,s),i=n.createNode(t,void 0,s);return new a(r,i)}},3205:(e,t,s)=>{var n=s(9399),r=s(6849),i=s(3947);class o extends r.NodeBase{constructor(e){super(n.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:i.toJS(this.value,e,t)}toString(){return String(this.value)}}o.BLOCK_FOLDED="BLOCK_FOLDED",o.BLOCK_LITERAL="BLOCK_LITERAL",o.PLAIN="PLAIN",o.QUOTE_DOUBLE="QUOTE_DOUBLE",o.QUOTE_SINGLE="QUOTE_SINGLE",t.Scalar=o,t.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e},2262:(e,t,s)=>{var n=s(5756),r=s(8016),i=s(2997),o=s(9399),a=s(4237),c=s(3205);function l(e,t){const s=o.isScalar(t)?t.value:t;for(const n of e)if(o.isPair(n)){if(n.key===t||n.key===s)return n;if(o.isScalar(n.key)&&n.key.value===s)return n}}class u extends i.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(o.MAP,e),this.items=[]}static from(e,t,s){const{keepUndefined:n,replacer:r}=s,i=new this(e),o=(e,o)=>{if("function"==typeof r)o=r.call(t,e,o);else if(Array.isArray(r)&&!r.includes(e))return;(void 0!==o||n)&&i.items.push(a.createPair(e,o,s))};if(t instanceof Map)for(const[e,s]of t)o(e,s);else if(t&&"object"==typeof t)for(const e of Object.keys(t))o(e,t[e]);return"function"==typeof e.sortMapEntries&&i.items.sort(e.sortMapEntries),i}add(e,t){let s;s=o.isPair(e)?e:e&&"object"==typeof e&&"key"in e?new a.Pair(e.key,e.value):new a.Pair(e,e?.value);const n=l(this.items,s.key),r=this.schema?.sortMapEntries;if(n){if(!t)throw new Error(`Key ${s.key} already set`);o.isScalar(n.value)&&c.isScalarValue(s.value)?n.value.value=s.value:n.value=s.value}else if(r){const e=this.items.findIndex((e=>r(s,e)<0));-1===e?this.items.push(s):this.items.splice(e,0,s)}else this.items.push(s)}delete(e){const t=l(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const s=l(this.items,e),n=s?.value;return(!t&&o.isScalar(n)?n.value:n)??void 0}has(e){return!!l(this.items,e)}set(e,t){this.add(new a.Pair(e,t),!0)}toJSON(e,t,s){const n=s?new s:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(n);for(const e of this.items)r.addPairToJSMap(t,n,e);return n}toString(e,t,s){if(!e)return JSON.stringify(this);for(const e of this.items)if(!o.isPair(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),n.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:t})}}t.YAMLMap=u,t.findPair=l},847:(e,t,s)=>{var n=s(4532),r=s(5756),i=s(2997),o=s(9399),a=s(3205),c=s(3947);class l extends i.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(o.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=u(e);if("number"!=typeof t)return!1;return this.items.splice(t,1).length>0}get(e,t){const s=u(e);if("number"!=typeof s)return;const n=this.items[s];return!t&&o.isScalar(n)?n.value:n}has(e){const t=u(e);return"number"==typeof t&&t<this.items.length}set(e,t){const s=u(e);if("number"!=typeof s)throw new Error(`Expected a valid index, not ${e}.`);const n=this.items[s];o.isScalar(n)&&a.isScalarValue(t)?n.value=t:this.items[s]=t}toJSON(e,t){const s=[];t?.onCreate&&t.onCreate(s);let n=0;for(const e of this.items)s.push(c.toJS(e,String(n++),t));return s}toString(e,t,s){return e?r.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:t}):JSON.stringify(this)}static from(e,t,s){const{replacer:r}=s,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let o of t){if("function"==typeof r){const s=t instanceof Set?o:String(e++);o=r.call(t,s,o)}i.items.push(n.createNode(o,void 0,s))}}return i}}function u(e){let t=o.isScalar(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}t.YAMLSeq=l},8016:(e,t,s)=>{var n=s(7953),r=s(5636),i=s(9399),o=s(3205),a=s(3947);const c=e=>"<<"===e||i.isScalar(e)&&"<<"===e.value&&(!e.type||e.type===o.Scalar.PLAIN);function l(e,t,s){const n=e&&i.isAlias(s)?s.resolve(e.doc):s;if(!i.isMap(n))throw new Error("Merge sources must be maps or map aliases");const r=n.toJSON(null,e,Map);for(const[e,s]of r)t instanceof Map?t.has(e)||t.set(e,s):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:s,writable:!0,enumerable:!0,configurable:!0});return t}t.addPairToJSMap=function(e,t,{key:s,value:o}){if(e?.doc.schema.merge&&c(s))if(o=i.isAlias(o)?o.resolve(e.doc):o,i.isSeq(o))for(const s of o.items)l(e,t,s);else if(Array.isArray(o))for(const s of o)l(e,t,s);else l(e,t,o);else{const c=a.toJS(s,"",e);if(t instanceof Map)t.set(c,a.toJS(o,c,e));else if(t instanceof Set)t.add(c);else{const l=function(e,t,s){if(null===t)return"";if("object"!=typeof t)return String(t);if(i.isNode(e)&&s?.doc){const t=r.createStringifyContext(s.doc,{});t.anchors=new Set;for(const e of s.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;const i=e.toString(t);if(!s.mapKeyWarned){let e=JSON.stringify(i);e.length>40&&(e=e.substring(0,36)+'..."'),n.warn(s.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),s.mapKeyWarned=!0}return i}return JSON.stringify(t)}(s,c,e),u=a.toJS(o,l,e);l in t?Object.defineProperty(t,l,{value:u,writable:!0,enumerable:!0,configurable:!0}):t[l]=u}}return t}},9399:(e,t)=>{const s=Symbol.for("yaml.alias"),n=Symbol.for("yaml.document"),r=Symbol.for("yaml.map"),i=Symbol.for("yaml.pair"),o=Symbol.for("yaml.scalar"),a=Symbol.for("yaml.seq"),c=Symbol.for("yaml.node.type"),l=e=>!!e&&"object"==typeof e&&e[c]===o;function u(e){if(e&&"object"==typeof e)switch(e[c]){case r:case a:return!0}return!1}t.ALIAS=s,t.DOC=n,t.MAP=r,t.NODE_TYPE=c,t.PAIR=i,t.SCALAR=o,t.SEQ=a,t.hasAnchor=e=>(l(e)||u(e))&&!!e.anchor,t.isAlias=e=>!!e&&"object"==typeof e&&e[c]===s,t.isCollection=u,t.isDocument=e=>!!e&&"object"==typeof e&&e[c]===n,t.isMap=e=>!!e&&"object"==typeof e&&e[c]===r,t.isNode=function(e){if(e&&"object"==typeof e)switch(e[c]){case s:case r:case o:case a:return!0}return!1},t.isPair=e=>!!e&&"object"==typeof e&&e[c]===i,t.isScalar=l,t.isSeq=e=>!!e&&"object"==typeof e&&e[c]===a},3947:(e,t,s)=>{var n=s(9399);t.toJS=function e(t,s,r){if(Array.isArray(t))return t.map(((t,s)=>e(t,String(s),r)));if(t&&"function"==typeof t.toJSON){if(!r||!n.hasAnchor(t))return t.toJSON(s,r);const e={aliasCount:0,count:1,res:void 0};r.anchors.set(t,e),r.onCreate=t=>{e.res=t,delete r.onCreate};const i=t.toJSON(s,r);return r.onCreate&&r.onCreate(i),i}return"bigint"!=typeof t||r?.keep?t:Number(t)}},2174:(e,t,s)=>{var n=s(6945),r=s(2362),i=s(1656),o=s(8653);function a(e,t){if(t)for(const s of t)switch(s.type){case"space":case"comment":e.push(s);break;case"newline":return e.push(s),!0}return!1}function c(e,t,s){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=s,e.source=t;break;case"block-scalar":{const n=e.props.slice(1);let r=t.length;"block-scalar-header"===e.props[0].type&&(r-=e.props[0].source.length);for(const e of n)e.offset+=r;delete e.props,Object.assign(e,{type:s,source:t,end:n});break}case"block-map":case"block-seq":{const n={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:s,source:t,end:[n]});break}default:{const n="indent"in e?e.indent:-1,r="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:s,indent:n,source:t,end:r})}}}t.createScalarToken=function(e,t){const{implicitKey:s=!1,indent:n,inFlow:r=!1,offset:i=-1,type:c="PLAIN"}=t,l=o.stringifyString({type:c,value:e},{implicitKey:s,indent:n>0?" ".repeat(n):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}}),u=t.end??[{type:"newline",offset:-1,indent:n,source:"\n"}];switch(l[0]){case"|":case">":{const e=l.indexOf("\n"),t=l.substring(0,e),s=l.substring(e+1)+"\n",r=[{type:"block-scalar-header",offset:i,indent:n,source:t}];return a(r,u)||r.push({type:"newline",offset:-1,indent:n,source:"\n"}),{type:"block-scalar",offset:i,indent:n,props:r,source:s}}case'"':return{type:"double-quoted-scalar",offset:i,indent:n,source:l,end:u};case"'":return{type:"single-quoted-scalar",offset:i,indent:n,source:l,end:u};default:return{type:"scalar",offset:i,indent:n,source:l,end:u}}},t.resolveAsScalar=function(e,t=!0,s){if(e){const o=(e,t,n)=>{const r="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!s)throw new i.YAMLParseError([r,r+1],t,n);s(r,t,n)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return r.resolveFlowScalar(e,t,o);case"block-scalar":return n.resolveBlockScalar(e,t,o)}}return null},t.setScalarValue=function(e,t,s={}){let{afterKey:n=!1,implicitKey:r=!1,inFlow:i=!1,type:l}=s,u="indent"in e?e.indent:null;if(n&&"number"==typeof u&&(u+=2),!l)switch(e.type){case"single-quoted-scalar":l="QUOTE_SINGLE";break;case"double-quoted-scalar":l="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");l=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:l="PLAIN"}const h=o.stringifyString({type:l,value:t},{implicitKey:r||null===u,indent:null!==u&&u>0?" ".repeat(u):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}});switch(h[0]){case"|":case">":!function(e,t){const s=t.indexOf("\n"),n=t.substring(0,s),r=t.substring(s+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=n,e.source=r}else{const{offset:t}=e,s="indent"in e?e.indent:-1,i=[{type:"block-scalar-header",offset:t,indent:s,source:n}];a(i,"end"in e?e.end:void 0)||i.push({type:"newline",offset:-1,indent:s,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:s,props:i,source:r})}}(e,h);break;case'"':c(e,h,"double-quoted-scalar");break;case"'":c(e,h,"single-quoted-scalar");break;default:c(e,h,"scalar")}}},373:(e,t)=>{function s(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=s(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const s of e.items)t+=n(s);return t}case"flow-collection":{let t=e.start.source;for(const s of e.items)t+=n(s);for(const s of e.end)t+=s.source;return t}case"document":{let t=n(e);if(e.end)for(const s of e.end)t+=s.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const s of e.end)t+=s.source;return t}}}function n({start:e,key:t,sep:n,value:r}){let i="";for(const t of e)i+=t.source;if(t&&(i+=s(t)),n)for(const e of n)i+=e.source;return r&&(i+=s(r)),i}t.stringify=e=>"type"in e?s(e):n(e)},4243:(e,t)=>{const s=Symbol("break visit"),n=Symbol("skip children"),r=Symbol("remove item");function i(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),o(Object.freeze([]),e,t)}function o(e,t,n){let i=n(t,e);if("symbol"==typeof i)return i;for(const a of["key","value"]){const c=t[a];if(c&&"items"in c){for(let t=0;t<c.items.length;++t){const i=o(Object.freeze(e.concat([[a,t]])),c.items[t],n);if("number"==typeof i)t=i-1;else{if(i===s)return s;i===r&&(c.items.splice(t,1),t-=1)}}"function"==typeof i&&"key"===a&&(i=i(t,e))}}return"function"==typeof i?i(t,e):i}i.BREAK=s,i.SKIP=n,i.REMOVE=r,i.itemAtPath=(e,t)=>{let s=e;for(const[e,n]of t){const t=s?.[e];if(!t||!("items"in t))return;s=t.items[n]}return s},i.parentCollection=(e,t)=>{const s=i.itemAtPath(e,t.slice(0,-1)),n=t[t.length-1][0],r=s?.[n];if(r&&"items"in r)return r;throw new Error("Parent collection not found")},t.visit=i},2645:(e,t,s)=>{var n=s(2174),r=s(373),i=s(4243);t.createScalarToken=n.createScalarToken,t.resolveAsScalar=n.resolveAsScalar,t.setScalarValue=n.setScalarValue,t.stringify=r.stringify,t.visit=i.visit,t.BOM="\ufeff",t.DOCUMENT="\x02",t.FLOW_END="\x18",t.SCALAR="\x1f",t.isCollection=e=>!!e&&"items"in e,t.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),t.prettyToken=function(e){switch(e){case"\ufeff":return"<BOM>";case"\x02":return"<DOC>";case"\x18":return"<FLOW_END>";case"\x1f":return"<SCALAR>";default:return JSON.stringify(e)}},t.tokenType=function(e){switch(e){case"\ufeff":return"byte-order-mark";case"\x02":return"doc-mode";case"\x18":return"flow-error-end";case"\x1f":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\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}},2505:(e,t,s)=>{var n=s(2645);function r(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const i="0123456789ABCDEFabcdef".split(""),o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split(""),a=",[]{}".split(""),c=" ,[]{}\n\r\t".split(""),l=e=>!e||c.includes(e);t.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){e&&(this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null),this.atEnd=!t;let s=this.next??"stream";for(;s&&(t||this.hasChars(1));)s=yield*this.parseNext(s)}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 t=this.buffer[e];if(this.indentNext>0){let s=0;for(;" "===t;)t=this.buffer[++s+e];if("\r"===t){const t=this.buffer[s+e+1];if("\n"===t||!t&&!this.atEnd)return e+s+1}return"\n"===t||s>=this.indentNext||!t&&!this.atEnd?e+s:-1}if("-"===t||"."===t){const t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&r(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(null===e)return this.setNext("stream");if(e[0]===n.BOM&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length;const s=e.indexOf("#");if(-1!==s){const n=e[s-1];" "!==n&&"\t"!==n||(t=s-1)}for(;;){const s=e[t-1];if(" "!==s&&"\t"!==s)break;t-=1}const n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield n.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&&r(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"doc";if("..."===e&&r(this.charAt(3)))return yield*this.pushCount(3),"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!r(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&r(t)){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(l),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=(yield*this.parseBlockScalarHeader()),t+=(yield*this.pushSpaces(!0)),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,s=-1;do{e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=s=t):t=0,t+=(yield*this.pushSpaces(!0))}while(e+t>0);const i=this.getLine();if(null===i)return this.setNext("flow");if(-1!==s&&s<this.indentNext&&"#"!==i[0]||0===s&&(i.startsWith("---")||i.startsWith("..."))&&r(i[3])){if(!(s===this.indentNext-1&&1===this.flowLevel&&("]"===i[0]||"}"===i[0])))return this.flowLevel=0,yield n.FLOW_END,yield*this.parseLineStart()}let o=0;for(;","===i[o];)o+=(yield*this.pushCount(1)),o+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(o+=(yield*this.pushIndicators()),i[o]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-o),"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(l),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||r(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 s=this.buffer.substring(0,t);let n=s.indexOf("\n",this.pos);if(-1!==n){for(;-1!==n;){const e=this.continueScalar(n+1);if(-1===e)break;n=s.indexOf("\n",e)}-1!==n&&(t=n-("\r"===s[n-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=>r(e)||"#"===e))}*parseBlockScalar(){let e,t=this.pos-1,s=0;e:for(let n=this.pos;e=this.buffer[n];++n)switch(e){case" ":s+=1;break;case"\n":t=n,s=0;break;case"\r":{const e=this.buffer[n+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(s>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=s:this.indentNext+=this.blockScalarIndent;do{const e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t);if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}if(!this.blockScalarKeep)for(;;){let e=t-1,n=this.buffer[e];"\r"===n&&(n=this.buffer[--e]);const r=e;for(;" "===n||"\t"===n;)n=this.buffer[--e];if(!("\n"===n&&e>=this.pos&&e+1+s>r))break;t=e}return yield n.SCALAR,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t,s=this.pos-1,i=this.pos-1;for(;t=this.buffer[++i];)if(":"===t){const t=this.buffer[i+1];if(r(t)||e&&","===t)break;s=i}else if(r(t)){let n=this.buffer[i+1];if("\r"===t&&("\n"===n?(i+=1,t="\n",n=this.buffer[i+1]):s=i),"#"===n||e&&a.includes(n))break;if("\n"===t){const e=this.continueScalar(i+1);if(-1===e)break;i=Math.max(i,e-2)}}else{if(e&&a.includes(t))break;s=i}return t||this.atEnd?(yield n.SCALAR,yield*this.pushToIndex(s+1,!0),e?"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 s=this.buffer.slice(this.pos,e);return s?(yield s,this.pos+=s.length,s.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(l))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(r(t)||e&&a.includes(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!r(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(o.includes(t))t=this.buffer[++e];else{if("%"!==t||!i.includes(this.buffer[e+1])||!i.includes(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,s=this.pos-1;do{t=this.buffer[++s]}while(" "===t||e&&"\t"===t);const n=s-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=s),n}*pushUntil(e){let t=this.pos,s=this.buffer[t];for(;!e(s);)s=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}},2324:(e,t)=>{t.LineCounter=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,s=this.lineStarts.length;for(;t<s;){const n=t+s>>1;this.lineStarts[n]<e?t=n+1:s=n}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}}}}},5456:(e,t,s)=>{var n=s(2645),r=s(2505);function i(e,t){for(let s=0;s<e.length;++s)if(e[s].type===t)return!0;return!1}function o(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 a(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 c(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 l(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 u(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||i(t.start,"explicit-key-ind")||i(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,a(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)}t.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 r.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const s of this.lexer.lex(e,t))yield*this.next(s);t||(yield*this.end())}*next(e){if(this.source=e,process.env.LOG_TOKENS&&console.log("|",n.prettyToken(e)),this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=e.length);const t=n.tokenType(e);if(t)if("scalar"===t)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&" "===e[0]&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){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&&u(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const s=e.items[e.items.length-1];if(s.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!s.sep)return Object.assign(s,{key:t,sep:[]}),void(this.onKeyLine=!i(s.start,"explicit-key-ind"));s.value=t;break}case"block-seq":{const s=e.items[e.items.length-1];s.value?e.items.push({start:[],value:t}):s.value=t;break}case"flow-collection":{const s=e.items[e.items.length-1];return void(!s||s.value?e.items.push({start:[],key:t,sep:[]}):s.sep?s.value=t:Object.assign(s,{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 s=t.items[t.items.length-1];s&&!s.sep&&!s.value&&s.start.length>0&&-1===o(s.start)&&(0===t.indent||s.start.every((e=>"comment"!==e.type||e.indent<t.indent)))&&("document"===e.type?e.end=s.start:e.items.push({start:s.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!==o(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=l(c(this.peek(2)));let s;e.end?(s=e.end,s.push(this.sourceToken),delete e.end):s=[this.sourceToken];const n={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=n}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 s="end"in t.value?t.value.end:void 0,n=Array.isArray(s)?s[s.length-1]:void 0;"comment"===n?.type?s?.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 s=e.items[e.items.length-2],n=s?.value?.end;if(Array.isArray(n))return Array.prototype.push.apply(n,t.start),n.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const s=!this.onKeyLine&&this.indent===e.indent&&t.sep;let n=[];if(s&&t.sep&&!t.value){const s=[];for(let n=0;n<t.sep.length;++n){const r=t.sep[n];switch(r.type){case"newline":s.push(n);break;case"space":break;case"comment":r.indent>e.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(n=t.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":return void(s||t.value?(n.push(this.sourceToken),e.items.push({start:n}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||i(t.start,"explicit-key-ind")?s||t.value?(n.push(this.sourceToken),e.items.push({start:n})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]}):t.start.push(this.sourceToken),void(this.onKeyLine=!0);case"map-value-ind":if(i(t.start,"explicit-key-ind"))if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(i(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]});else if(a(t.key)&&!i(t.sep,"newline")){const e=l(t.start),s=t.key,n=t.sep;n.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:s,sep:n}]})}else n.length>0?t.sep=t.sep.concat(n,this.sourceToken):t.sep.push(this.sourceToken);else if(i(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=l(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:n,key:null,sep:[this.sourceToken]}):i(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 r=this.flowScalar(this.type);return void(s||t.value?(e.items.push({start:n,key:r,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(r):(Object.assign(t,{key:r,sep:[]}),this.onKeyLine=!0))}default:{const r=this.startBlockValue(e);if(r)return s&&"block-seq"!==r.type&&i(t.start,"explicit-key-ind")&&e.items.push({start:n}),void this.stack.push(r)}}}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 s="end"in t.value?t.value.end:void 0,n=Array.isArray(s)?s[s.length-1]:void 0;"comment"===n?.type?s?.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 s=e.items[e.items.length-2],n=s?.value?.end;if(Array.isArray(n))return Array.prototype.push.apply(n,t.start),n.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||i(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 s=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:s,sep:[]}):t.sep?this.stack.push(s):Object.assign(t,{key:s,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const s=this.startBlockValue(e);s?this.stack.push(s):(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 s=l(c(t));u(e);const n=e.end.splice(1,e.end.length);n.push(this.sourceToken);const r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}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=l(c(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t}]}}case"map-value-ind":{this.onKeyLine=!0;const t=l(c(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())}}}},463:(e,t,s)=>{var n=s(8480),r=s(2333),i=s(1656),o=s(7953),a=s(2324),c=s(5456);function l(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new a.LineCounter||null,prettyErrors:t}}function u(e,t={}){const{lineCounter:s,prettyErrors:r}=l(t),o=new c.Parser(s?.addNewLine),a=new n.Composer(t);let u=null;for(const t of a.compose(o.parse(e),!0,e.length))if(u){if("silent"!==u.options.logLevel){u.errors.push(new i.YAMLParseError(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else u=t;return r&&s&&(u.errors.forEach(i.prettifyError(e,s)),u.warnings.forEach(i.prettifyError(e,s))),u}t.parse=function(e,t,s){let n;"function"==typeof t?n=t:void 0===s&&t&&"object"==typeof t&&(s=t);const r=u(e,s);if(!r)return null;if(r.warnings.forEach((e=>o.warn(r.options.logLevel,e))),r.errors.length>0){if("silent"!==r.options.logLevel)throw r.errors[0];r.errors=[]}return r.toJS(Object.assign({reviver:n},s))},t.parseAllDocuments=function(e,t={}){const{lineCounter:s,prettyErrors:r}=l(t),o=new c.Parser(s?.addNewLine),a=new n.Composer(t),u=Array.from(a.compose(o.parse(e)));if(r&&s)for(const t of u)t.errors.forEach(i.prettifyError(e,s)),t.warnings.forEach(i.prettifyError(e,s));return u.length>0?u:Object.assign([],{empty:!0},a.streamInfo())},t.parseDocument=u,t.stringify=function(e,t,s){let n=null;if("function"==typeof t||Array.isArray(t)?n=t:void 0===s&&t&&(s=t),"string"==typeof s&&(s=s.length),"number"==typeof s){const e=Math.round(s);s=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=s??t??{};if(!e)return}return new r.Document(e,n,s).toString(s)}},7840:(e,t,s)=>{var n=s(9399),r=s(459),i=s(1418),o=s(4352),a=s(4146);const c=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class l{constructor({compat:e,customTags:t,merge:s,resolveKnownTags:l,schema:u,sortMapEntries:h,toStringDefaults:f}){this.compat=Array.isArray(e)?a.getTags(e,"compat"):e?a.getTags(null,e):null,this.merge=!!s,this.name="string"==typeof u&&u||"core",this.knownTags=l?a.coreKnownTags:{},this.tags=a.getTags(t,this.name),this.toStringOptions=f??null,Object.defineProperty(this,n.MAP,{value:r.map}),Object.defineProperty(this,n.SCALAR,{value:o.string}),Object.defineProperty(this,n.SEQ,{value:i.seq}),this.sortMapEntries="function"==typeof h?h:!0===h?c:null}clone(){const e=Object.create(l.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}t.Schema=l},459:(e,t,s)=>{var n=s(9399),r=s(2262);const i={collection:"map",default:!0,nodeClass:r.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(n.isMap(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,s)=>r.YAMLMap.from(e,t,s)};t.map=i},1504:(e,t,s)=>{var n=s(3205);const r={identify:e=>null==e,createNode:()=>new n.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new n.Scalar(null),stringify:({source:e},t)=>"string"==typeof e&&r.test.test(e)?e:t.options.nullStr};t.nullTag=r},1418:(e,t,s)=>{var n=s(9399),r=s(847);const i={collection:"seq",default:!0,nodeClass:r.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(n.isSeq(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,s)=>r.YAMLSeq.from(e,t,s)};t.seq=i},4352:(e,t,s)=>{var n=s(8653);const r={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,s,r)=>(t=Object.assign({actualString:!0},t),n.stringifyString(e,t,s,r))};t.string=r},1399:(e,t,s)=>{var n=s(3205);const r={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new n.Scalar("t"===e[0]||"T"===e[0]),stringify({source:e,value:t},s){if(e&&r.test.test(e)){if(t===("t"===e[0]||"T"===e[0]))return e}return t?s.options.trueStr:s.options.falseStr}};t.boolTag=r},6853:(e,t,s)=>{var n=s(3205),r=s(1105);const i={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:r.stringifyNumber},o={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 t=Number(e.value);return isFinite(t)?t.toExponential():r.stringifyNumber(e)}},a={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new n.Scalar(parseFloat(e)),s=e.indexOf(".");return-1!==s&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-s-1),t},stringify:r.stringifyNumber};t.float=a,t.floatExp=o,t.floatNaN=i},6802:(e,t,s)=>{var n=s(1105);const r=e=>"bigint"==typeof e||Number.isInteger(e),i=(e,t,s,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),s);function o(e,t,s){const{value:i}=e;return r(i)&&i>=0?s+i.toString(t):n.stringifyNumber(e)}const a={identify:e=>r(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,s)=>i(e,2,8,s),stringify:e=>o(e,8,"0o")},c={identify:r,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,s)=>i(e,0,10,s),stringify:n.stringifyNumber},l={identify:e=>r(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,s)=>i(e,2,16,s),stringify:e=>o(e,16,"0x")};t.int=c,t.intHex=l,t.intOct=a},8368:(e,t,s)=>{var n=s(459),r=s(1504),i=s(1418),o=s(4352),a=s(1399),c=s(6853),l=s(6802);const u=[n.map,i.seq,o.string,r.nullTag,a.boolTag,l.intOct,l.int,l.intHex,c.floatNaN,c.floatExp,c.float];t.schema=u},887:(e,t,s)=>{var n=s(3205),r=s(459),i=s(1418);function o(e){return"bigint"==typeof e||Number.isInteger(e)}const a=({value:e})=>JSON.stringify(e),c=[{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:a},{identify:e=>null==e,createNode:()=>new n.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:a},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:a},{identify:o,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:s})=>s?BigInt(e):parseInt(e,10),stringify:({value:e})=>o(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:a}],l={default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)},u=[r.map,i.seq].concat(c,l);t.schema=u},4146:(e,t,s)=>{var n=s(459),r=s(1504),i=s(1418),o=s(4352),a=s(1399),c=s(6853),l=s(6802),u=s(8368),h=s(887),f=s(2659),p=s(879),d=s(225),g=s(8025),m=s(4344),y=s(9024);const b=new Map([["core",u.schema],["failsafe",[n.map,i.seq,o.string]],["json",h.schema],["yaml11",g.schema],["yaml-1.1",g.schema]]),w={binary:f.binary,bool:a.boolTag,float:c.float,floatExp:c.floatExp,floatNaN:c.floatNaN,floatTime:y.floatTime,int:l.int,intHex:l.intHex,intOct:l.intOct,intTime:y.intTime,map:n.map,null:r.nullTag,omap:p.omap,pairs:d.pairs,seq:i.seq,set:m.set,timestamp:y.timestamp},E={"tag:yaml.org,2002:binary":f.binary,"tag:yaml.org,2002:omap":p.omap,"tag:yaml.org,2002:pairs":d.pairs,"tag:yaml.org,2002:set":m.set,"tag:yaml.org,2002:timestamp":y.timestamp};t.coreKnownTags=E,t.getTags=function(e,t){let s=b.get(t);if(!s){if(!Array.isArray(e)){const e=Array.from(b.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 s.map((e=>{if("string"!=typeof e)return e;const t=w[e];if(t)return t;const s=Object.keys(w).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag "${e}"; use one of ${s}`)}))}},2659:(e,t,s)=>{var n=s(3205),r=s(8653);const i={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof Buffer)return Buffer.from(e,"base64");if("function"==typeof atob){const t=atob(e.replace(/[\n\r]/g,"")),s=new Uint8Array(t.length);for(let e=0;e<t.length;++e)s[e]=t.charCodeAt(e);return s}return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:s},i,o,a){const c=s;let l;if("function"==typeof Buffer)l=c instanceof Buffer?c.toString("base64"):Buffer.from(c.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<c.length;++t)e+=String.fromCharCode(c[t]);l=btoa(e)}}if(t||(t=n.Scalar.BLOCK_LITERAL),t!==n.Scalar.QUOTE_DOUBLE){const e=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),s=Math.ceil(l.length/e),r=new Array(s);for(let t=0,n=0;t<s;++t,n+=e)r[t]=l.substr(n,e);l=r.join(t===n.Scalar.BLOCK_LITERAL?"\n":" ")}return r.stringifyString({comment:e,type:t,value:l},i,o,a)}};t.binary=i},3662:(e,t,s)=>{var n=s(3205);function r({value:e,source:t},s){return t&&(e?i:o).test.test(t)?t:e?s.options.trueStr:s.options.falseStr}const i={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 n.Scalar(!0),stringify:r},o={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>new n.Scalar(!1),stringify:r};t.falseTag=o,t.trueTag=i},9782:(e,t,s)=>{var n=s(3205),r=s(1105);const i={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:r.stringifyNumber},o={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 t=Number(e.value);return isFinite(t)?t.toExponential():r.stringifyNumber(e)}},a={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new n.Scalar(parseFloat(e.replace(/_/g,""))),s=e.indexOf(".");if(-1!==s){const n=e.substring(s+1).replace(/_/g,"");"0"===n[n.length-1]&&(t.minFractionDigits=n.length)}return t},stringify:r.stringifyNumber};t.float=a,t.floatExp=o,t.floatNaN=i},2073:(e,t,s)=>{var n=s(1105);const r=e=>"bigint"==typeof e||Number.isInteger(e);function i(e,t,s,{intAsBigInt:n}){const r=e[0];if("-"!==r&&"+"!==r||(t+=1),e=e.substring(t).replace(/_/g,""),n){switch(s){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===r?BigInt(-1)*t:t}const i=parseInt(e,s);return"-"===r?-1*i:i}function o(e,t,s){const{value:i}=e;if(r(i)){const e=i.toString(t);return i<0?"-"+s+e.substr(1):s+e}return n.stringifyNumber(e)}const a={identify:r,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,s)=>i(e,2,2,s),stringify:e=>o(e,2,"0b")},c={identify:r,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,s)=>i(e,1,8,s),stringify:e=>o(e,8,"0")},l={identify:r,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,s)=>i(e,0,10,s),stringify:n.stringifyNumber},u={identify:r,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,s)=>i(e,2,16,s),stringify:e=>o(e,16,"0x")};t.int=l,t.intBin=a,t.intHex=u,t.intOct=c},879:(e,t,s)=>{var n=s(9399),r=s(3947),i=s(2262),o=s(847),a=s(225);class c extends o.YAMLSeq{constructor(){super(),this.add=i.YAMLMap.prototype.add.bind(this),this.delete=i.YAMLMap.prototype.delete.bind(this),this.get=i.YAMLMap.prototype.get.bind(this),this.has=i.YAMLMap.prototype.has.bind(this),this.set=i.YAMLMap.prototype.set.bind(this),this.tag=c.tag}toJSON(e,t){if(!t)return super.toJSON(e);const s=new Map;t?.onCreate&&t.onCreate(s);for(const e of this.items){let i,o;if(n.isPair(e)?(i=r.toJS(e.key,"",t),o=r.toJS(e.value,i,t)):i=r.toJS(e,"",t),s.has(i))throw new Error("Ordered maps must not include duplicate keys");s.set(i,o)}return s}static from(e,t,s){const n=a.createPairs(e,t,s),r=new this;return r.items=n.items,r}}c.tag="tag:yaml.org,2002:omap";const l={collection:"seq",identify:e=>e instanceof Map,nodeClass:c,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const s=a.resolvePairs(e,t),r=[];for(const{key:e}of s.items)n.isScalar(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new c,s)},createNode:(e,t,s)=>c.from(e,t,s)};t.YAMLOMap=c,t.omap=l},225:(e,t,s)=>{var n=s(9399),r=s(4237),i=s(3205),o=s(847);function a(e,t){if(n.isSeq(e))for(let s=0;s<e.items.length;++s){let o=e.items[s];if(!n.isPair(o)){if(n.isMap(o)){o.items.length>1&&t("Each pair must have its own sequence indicator");const e=o.items[0]||new r.Pair(new i.Scalar(null));if(o.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${o.commentBefore}\n${e.key.commentBefore}`:o.commentBefore),o.comment){const t=e.value??e.key;t.comment=t.comment?`${o.comment}\n${t.comment}`:o.comment}o=e}e.items[s]=n.isPair(o)?o:new r.Pair(o)}}else t("Expected a sequence for this tag");return e}function c(e,t,s){const{replacer:n}=s,i=new o.YAMLSeq(e);i.tag="tag:yaml.org,2002:pairs";let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let o,c;if("function"==typeof n&&(e=n.call(t,String(a++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);o=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`);o=t[0],c=e[o]}else o=e;i.items.push(r.createPair(o,c,s))}return i}const l={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:a,createNode:c};t.createPairs=c,t.pairs=l,t.resolvePairs=a},8025:(e,t,s)=>{var n=s(459),r=s(1504),i=s(1418),o=s(4352),a=s(2659),c=s(3662),l=s(9782),u=s(2073),h=s(879),f=s(225),p=s(4344),d=s(9024);const g=[n.map,i.seq,o.string,r.nullTag,c.trueTag,c.falseTag,u.intBin,u.intOct,u.int,u.intHex,l.floatNaN,l.floatExp,l.float,a.binary,h.omap,f.pairs,p.set,d.intTime,d.floatTime,d.timestamp];t.schema=g},4344:(e,t,s)=>{var n=s(9399),r=s(4237),i=s(2262);class o extends i.YAMLMap{constructor(e){super(e),this.tag=o.tag}add(e){let t;t=n.isPair(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new r.Pair(e.key,null):new r.Pair(e,null);i.findPair(this.items,t.key)||this.items.push(t)}get(e,t){const s=i.findPair(this.items,e);return!t&&n.isPair(s)?n.isScalar(s.key)?s.key.value:s.key:s}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const s=i.findPair(this.items,e);s&&!t?this.items.splice(this.items.indexOf(s),1):!s&&t&&this.items.push(new r.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,s);throw new Error("Set items must all have null values")}static from(e,t,s){const{replacer:n}=s,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof n&&(e=n.call(t,e,e)),i.items.push(r.createPair(e,null,s));return i}}o.tag="tag:yaml.org,2002:set";const a={collection:"map",identify:e=>e instanceof Set,nodeClass:o,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,s)=>o.from(e,t,s),resolve(e,t){if(n.isMap(e)){if(e.hasAllNullValues(!0))return Object.assign(new o,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};t.YAMLSet=o,t.set=a},9024:(e,t,s)=>{var n=s(1105);function r(e,t){const s=e[0],n="-"===s||"+"===s?e.substring(1):e,r=e=>t?BigInt(e):Number(e),i=n.replace(/_/g,"").split(":").reduce(((e,t)=>e*r(60)+r(t)),r(0));return"-"===s?r(-1)*i:i}function i(e){let{value:t}=e,s=e=>e;if("bigint"==typeof t)s=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return n.stringifyNumber(e);let r="";t<0&&(r="-",t*=s(-1));const i=s(60),o=[t%i];return t<60?o.unshift(0):(t=(t-o[0])/i,o.unshift(t%i),t>=60&&(t=(t-o[0])/i,o.unshift(t))),r+o.map((e=>String(e).padStart(2,"0"))).join(":").replace(/000000\d*$/,"")}const o={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:s})=>r(e,s),stringify:i},a={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=>r(e,!1),stringify:i},c={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 t=e.match(c.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,s,n,i,o,a,l]=t.map(Number),u=t[7]?Number((t[7]+"00").substr(1,3)):0;let h=Date.UTC(s,n-1,i,o||0,a||0,l||0,u);const f=t[8];if(f&&"Z"!==f){let e=r(f,!1);Math.abs(e)<30&&(e*=60),h-=6e4*e}return new Date(h)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};t.floatTime=a,t.intTime=o,t.timestamp=c},347:(e,t)=>{const s="block",n="quoted";function r(e,t){let s=e[t+1];for(;" "===s||"\t"===s;){do{s=e[t+=1]}while(s&&"\n"!==s);s=e[t+1]}return t}t.FOLD_BLOCK=s,t.FOLD_FLOW="flow",t.FOLD_QUOTED=n,t.foldFlowLines=function(e,t,i="flow",{indentAtStart:o,lineWidth:a=80,minContentWidth:c=20,onFold:l,onOverflow:u}={}){if(!a||a<0)return e;const h=Math.max(1+c,1+a-t.length);if(e.length<=h)return e;const f=[],p={};let d,g,m=a-t.length;"number"==typeof o&&(o>a-Math.max(2,c)?f.push(0):m=a-o);let y=!1,b=-1,w=-1,E=-1;i===s&&(b=r(e,b),-1!==b&&(m=b+h));for(let t;t=e[b+=1];){if(i===n&&"\\"===t){switch(w=b,e[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}E=b}if("\n"===t)i===s&&(b=r(e,b)),m=b+h,d=void 0;else{if(" "===t&&g&&" "!==g&&"\n"!==g&&"\t"!==g){const t=e[b+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(d=b)}if(b>=m)if(d)f.push(d),m=d+h,d=void 0;else if(i===n){for(;" "===g||"\t"===g;)g=t,t=e[b+=1],y=!0;const s=b>E+1?b-2:w-1;if(p[s])return e;f.push(s),p[s]=!0,m=s+h,d=void 0}else y=!0}g=t}if(y&&u&&u(),0===f.length)return e;l&&l();let v=e.slice(0,f[0]);for(let s=0;s<f.length;++s){const r=f[s],o=f[s+1]||e.length;0===r?v=`\n${t}${e.slice(0,o)}`:(i===n&&p[r]&&(v+=`${e[r]}\\`),v+=`\n${t}${e.slice(r+1,o)}`)}return v}},5636:(e,t,s)=>{var n=s(8028),r=s(9399),i=s(5719),o=s(8653);t.createStringifyContext=function(e,t){const s=Object.assign({blockQuote:!0,commentString:i.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 n;switch(s.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:s.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof s.indent?" ".repeat(s.indent):" ",inFlow:n,options:s}},t.stringify=function(e,t,s,i){if(r.isPair(e))return e.toString(t,s,i);if(r.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let a;const c=r.isNode(e)?e:t.doc.createNode(e,{onTagObj:e=>a=e});a||(a=function(e,t){if(t.tag){const s=e.filter((e=>e.tag===t.tag));if(s.length>0)return s.find((e=>e.format===t.format))??s[0]}let s,n;if(r.isScalar(t)){n=t.value;const r=e.filter((e=>e.identify?.(n)));s=r.find((e=>e.format===t.format))??r.find((e=>!e.format))}else n=t,s=e.find((e=>e.nodeClass&&n instanceof e.nodeClass));if(!s)throw new Error(`Tag not resolved for ${n?.constructor?.name??typeof n} value`);return s}(t.doc.schema.tags,c));const l=function(e,t,{anchors:s,doc:i}){if(!i.directives)return"";const o=[],a=(r.isScalar(e)||r.isCollection(e))&&e.anchor;a&&n.anchorIsValid(a)&&(s.add(a),o.push(`&${a}`));const c=e.tag?e.tag:t.default?null:t.tag;return c&&o.push(i.directives.tagString(c)),o.join(" ")}(c,a,t);l.length>0&&(t.indentAtStart=(t.indentAtStart??0)+l.length+1);const u="function"==typeof a.stringify?a.stringify(c,t,s,i):r.isScalar(c)?o.stringifyString(c,t,s,i):c.toString(t,s,i);return l?r.isScalar(c)||"{"===u[0]||"["===u[0]?`${l} ${u}`:`${l}\n${t.indent}${u}`:u}},5756:(e,t,s)=>{var n=s(2997),r=s(9399),i=s(5636),o=s(5719);function a({comment:e,items:t},s,{blockItemPrefix:n,flowChars:a,itemIndent:c,onChompKeep:u,onComment:h}){const{indent:f,options:{commentString:p}}=s,d=Object.assign({},s,{indent:c,type:null});let g=!1;const m=[];for(let e=0;e<t.length;++e){const a=t[e];let u=null;if(r.isNode(a))!g&&a.spaceBefore&&m.push(""),l(s,m,a.commentBefore,g),a.comment&&(u=a.comment);else if(r.isPair(a)){const e=r.isNode(a.key)?a.key:null;e&&(!g&&e.spaceBefore&&m.push(""),l(s,m,e.commentBefore,g))}g=!1;let h=i.stringify(a,d,(()=>u=null),(()=>g=!0));u&&(h+=o.lineComment(h,c,p(u))),g&&u&&(g=!1),m.push(n+h)}let y;if(0===m.length)y=a.start+a.end;else{y=m[0];for(let e=1;e<m.length;++e){const t=m[e];y+=t?`\n${f}${t}`:"\n"}}return e?(y+="\n"+o.indentComment(p(e),f),h&&h()):g&&u&&u(),y}function c({comment:e,items:t},s,{flowChars:a,itemIndent:c,onComment:u}){const{indent:h,indentStep:f,flowCollectionPadding:p,options:{commentString:d}}=s;c+=f;const g=Object.assign({},s,{indent:c,inFlow:!0,type:null});let m=!1,y=0;const b=[];for(let e=0;e<t.length;++e){const n=t[e];let a=null;if(r.isNode(n))n.spaceBefore&&b.push(""),l(s,b,n.commentBefore,!1),n.comment&&(a=n.comment);else if(r.isPair(n)){const e=r.isNode(n.key)?n.key:null;e&&(e.spaceBefore&&b.push(""),l(s,b,e.commentBefore,!1),e.comment&&(m=!0));const t=r.isNode(n.value)?n.value:null;t?(t.comment&&(a=t.comment),t.commentBefore&&(m=!0)):null==n.value&&e?.comment&&(a=e.comment)}a&&(m=!0);let u=i.stringify(n,g,(()=>a=null));e<t.length-1&&(u+=","),a&&(u+=o.lineComment(u,c,d(a))),!m&&(b.length>y||u.includes("\n"))&&(m=!0),b.push(u),y=b.length}let w;const{start:E,end:v}=a;if(0===b.length)w=E+v;else{if(!m){m=b.reduce(((e,t)=>e+t.length+2),2)>n.Collection.maxFlowStringSingleLineLength}if(m){w=E;for(const e of b)w+=e?`\n${f}${h}${e}`:"\n";w+=`\n${h}${v}`}else w=`${E}${p}${b.join(" ")}${p}${v}`}return e&&(w+=o.lineComment(w,h,d(e)),u&&u()),w}function l({indent:e,options:{commentString:t}},s,n,r){if(n&&r&&(n=n.replace(/^\n+/,"")),n){const r=o.indentComment(t(n),e);s.push(r.trimStart())}}t.stringifyCollection=function(e,t,s){return(t.inFlow??e.flow?c:a)(e,t,s)}},5719:(e,t)=>{function s(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}t.indentComment=s,t.lineComment=(e,t,n)=>e.endsWith("\n")?s(n,t):n.includes("\n")?"\n"+s(n,t):(e.endsWith(" ")?"":" ")+n,t.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#")},1677:(e,t,s)=>{var n=s(9399),r=s(5636),i=s(5719);t.stringifyDocument=function(e,t){const s=[];let o=!0===t.directives;if(!1!==t.directives&&e.directives){const t=e.directives.toString(e);t?(s.push(t),o=!0):e.directives.docStart&&(o=!0)}o&&s.push("---");const a=r.createStringifyContext(e,t),{commentString:c}=a.options;if(e.commentBefore){1!==s.length&&s.unshift("");const t=c(e.commentBefore);s.unshift(i.indentComment(t,""))}let l=!1,u=null;if(e.contents){if(n.isNode(e.contents)){if(e.contents.spaceBefore&&o&&s.push(""),e.contents.commentBefore){const t=c(e.contents.commentBefore);s.push(i.indentComment(t,""))}a.forceBlockIndent=!!e.comment,u=e.contents.comment}const t=u?void 0:()=>l=!0;let h=r.stringify(e.contents,a,(()=>u=null),t);u&&(h+=i.lineComment(h,"",c(u))),"|"!==h[0]&&">"!==h[0]||"---"!==s[s.length-1]?s.push(h):s[s.length-1]=`--- ${h}`}else s.push(r.stringify(e.contents,a));if(e.directives?.docEnd)if(e.comment){const t=c(e.comment);t.includes("\n")?(s.push("..."),s.push(i.indentComment(t,""))):s.push(`... ${t}`)}else s.push("...");else{let t=e.comment;t&&l&&(t=t.replace(/^\n+/,"")),t&&(l&&!u||""===s[s.length-1]||s.push(""),s.push(i.indentComment(c(t),"")))}return s.join("\n")+"\n"}},1105:(e,t)=>{t.stringifyNumber=function({format:e,minFractionDigits:t,tag:s,value:n}){if("bigint"==typeof n)return String(n);const r="number"==typeof n?n:Number(n);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let i=JSON.stringify(n);if(!e&&t&&(!s||"tag:yaml.org,2002:float"===s)&&/^\d/.test(i)){let e=i.indexOf(".");e<0&&(e=i.length,i+=".");let s=t-(i.length-e-1);for(;s-- >0;)i+="0"}return i}},9348:(e,t,s)=>{var n=s(9399),r=s(3205),i=s(5636),o=s(5719);t.stringifyPair=function({key:e,value:t},s,a,c){const{allNullValues:l,doc:u,indent:h,indentStep:f,options:{commentString:p,indentSeq:d,simpleKeys:g}}=s;let m=n.isNode(e)&&e.comment||null;if(g){if(m)throw new Error("With simple keys, key nodes cannot have comments");if(n.isCollection(e)){throw new Error("With simple keys, collection cannot be used as a key value")}}let y=!g&&(!e||m&&null==t&&!s.inFlow||n.isCollection(e)||(n.isScalar(e)?e.type===r.Scalar.BLOCK_FOLDED||e.type===r.Scalar.BLOCK_LITERAL:"object"==typeof e));s=Object.assign({},s,{allNullValues:!1,implicitKey:!y&&(g||!l),indent:h+f});let b,w,E,v=!1,S=!1,A=i.stringify(e,s,(()=>v=!0),(()=>S=!0));if(!y&&!s.inFlow&&A.length>1024){if(g)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");y=!0}if(s.inFlow){if(l||null==t)return v&&a&&a(),""===A?"?":y?`? ${A}`:A}else if(l&&!g||null==t&&y)return A=`? ${A}`,m&&!v?A+=o.lineComment(A,s.indent,p(m)):S&&c&&c(),A;v&&(m=null),y?(m&&(A+=o.lineComment(A,s.indent,p(m))),A=`? ${A}\n${h}:`):(A=`${A}:`,m&&(A+=o.lineComment(A,s.indent,p(m)))),n.isNode(t)?(b=!!t.spaceBefore,w=t.commentBefore,E=t.comment):(b=!1,w=null,E=null,t&&"object"==typeof t&&(t=u.createNode(t))),s.implicitKey=!1,y||m||!n.isScalar(t)||(s.indentAtStart=A.length+1),S=!1,d||!(f.length>=2)||s.inFlow||y||!n.isSeq(t)||t.flow||t.tag||t.anchor||(s.indent=s.indent.substring(2));let k=!1;const O=i.stringify(t,s,(()=>k=!0),(()=>S=!0));let C=" ";if(m||b||w){if(C=b?"\n":"",w){const e=p(w);C+=`\n${o.indentComment(e,s.indent)}`}""!==O||s.inFlow?C+=`\n${s.indent}`:"\n"===C&&(C="\n\n")}else if(!y&&n.isCollection(t)){const e=O[0],n=O.indexOf("\n"),r=-1!==n,i=s.inFlow??t.flow??0===t.items.length;if(r||!i){let t=!1;if(r&&("&"===e||"!"===e)){let s=O.indexOf(" ");"&"===e&&-1!==s&&s<n&&"!"===O[s+1]&&(s=O.indexOf(" ",s+1)),(-1===s||n<s)&&(t=!0)}t||(C=`\n${s.indent}`)}}else""!==O&&"\n"!==O[0]||(C="");return A+=C+O,s.inFlow?k&&a&&a():E&&!k?A+=o.lineComment(A,s.indent,p(E)):S&&c&&c(),A}},8653:(e,t,s)=>{var n=s(3205),r=s(347);const i=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),o=e=>/^(%|---|\.\.\.)/m.test(e);function a(e,t){const s=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return s;const{implicitKey:n}=t,a=t.options.doubleQuotedMinMultiLineLength,c=t.indent||(o(e)?" ":"");let l="",u=0;for(let e=0,t=s[e];t;t=s[++e])if(" "===t&&"\\"===s[e+1]&&"n"===s[e+2]&&(l+=s.slice(u,e)+"\\ ",e+=1,u=e,t="\\"),"\\"===t)switch(s[e+1]){case"u":{l+=s.slice(u,e);const t=s.substr(e+2,4);switch(t){case"0000":l+="\\0";break;case"0007":l+="\\a";break;case"000b":l+="\\v";break;case"001b":l+="\\e";break;case"0085":l+="\\N";break;case"00a0":l+="\\_";break;case"2028":l+="\\L";break;case"2029":l+="\\P";break;default:"00"===t.substr(0,2)?l+="\\x"+t.substr(2):l+=s.substr(e,6)}e+=5,u=e+1}break;case"n":if(n||'"'===s[e+2]||s.length<a)e+=1;else{for(l+=s.slice(u,e)+"\n\n";"\\"===s[e+2]&&"n"===s[e+3]&&'"'!==s[e+4];)l+="\n",e+=2;l+=c," "===s[e+2]&&(l+="\\"),e+=1,u=e+1}break;default:e+=1}return l=u?l+s.slice(u):s,n?l:r.foldFlowLines(l,c,r.FOLD_QUOTED,i(t,!1))}function c(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return a(e,t);const s=t.indent||(o(e)?" ":""),n="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${s}`)+"'";return t.implicitKey?n:r.foldFlowLines(n,s,r.FOLD_FLOW,i(t,!1))}function l(e,t){const{singleQuote:s}=t.options;let n;if(!1===s)n=a;else{const t=e.includes('"'),r=e.includes("'");n=t&&!r?c:r&&!t?a:s?c:a}return n(e,t)}let u;try{u=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{u=/\n+(?!\n|$)/g}function h({comment:e,type:t,value:s},a,c,h){const{blockQuote:f,commentString:p,lineWidth:d}=a.options;if(!f||/\n[\t ]+$/.test(s)||/^\s*$/.test(s))return l(s,a);const g=a.indent||(a.forceBlockIndent||o(s)?" ":""),m="literal"===f||"folded"!==f&&t!==n.Scalar.BLOCK_FOLDED&&(t===n.Scalar.BLOCK_LITERAL||!function(e,t,s){if(!t||t<0)return!1;const n=t-s,r=e.length;if(r<=n)return!1;for(let t=0,s=0;t<r;++t)if("\n"===e[t]){if(t-s>n)return!0;if(s=t+1,r-s<=n)return!1}return!0}(s,d,g.length));if(!s)return m?"|\n":">\n";let y,b;for(b=s.length;b>0;--b){const e=s[b-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let w=s.substring(b);const E=w.indexOf("\n");-1===E?y="-":s===w||E!==w.length-1?(y="+",h&&h()):y="",w&&(s=s.slice(0,-w.length),"\n"===w[w.length-1]&&(w=w.slice(0,-1)),w=w.replace(u,`$&${g}`));let v,S=!1,A=-1;for(v=0;v<s.length;++v){const e=s[v];if(" "===e)S=!0;else{if("\n"!==e)break;A=v}}let k=s.substring(0,A<v?A+1:v);k&&(s=s.substring(k.length),k=k.replace(/\n+/g,`$&${g}`));let O=(m?"|":">")+(S?g?"2":"1":"")+y;if(e&&(O+=" "+p(e.replace(/ ?[\r\n]+/g," ")),c&&c()),m)return`${O}\n${g}${k}${s=s.replace(/\n+/g,`$&${g}`)}${w}`;s=s.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${g}`);return`${O}\n${g}${r.foldFlowLines(`${k}${s}${w}`,g,r.FOLD_BLOCK,i(a,!0))}`}t.stringifyString=function(e,t,s,u){const{implicitKey:f,inFlow:p}=t,d="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)});let{type:g}=e;g!==n.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(d.value)&&(g=n.Scalar.QUOTE_DOUBLE);const m=e=>{switch(e){case n.Scalar.BLOCK_FOLDED:case n.Scalar.BLOCK_LITERAL:return f||p?l(d.value,t):h(d,t,s,u);case n.Scalar.QUOTE_DOUBLE:return a(d.value,t);case n.Scalar.QUOTE_SINGLE:return c(d.value,t);case n.Scalar.PLAIN:return function(e,t,s,a){const{type:c,value:u}=e,{actualString:f,implicitKey:p,indent:d,indentStep:g,inFlow:m}=t;if(p&&u.includes("\n")||m&&/[[\]{},]/.test(u))return l(u,t);if(!u||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(u))return p||m||!u.includes("\n")?l(u,t):h(e,t,s,a);if(!p&&!m&&c!==n.Scalar.PLAIN&&u.includes("\n"))return h(e,t,s,a);if(o(u)){if(""===d)return t.forceBlockIndent=!0,h(e,t,s,a);if(p&&d===g)return l(u,t)}const y=u.replace(/\n+/g,`$&\n${d}`);if(f){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(y),{compat:s,tags:n}=t.doc.schema;if(n.some(e)||s?.some(e))return l(u,t)}return p?y:r.foldFlowLines(y,d,r.FOLD_FLOW,i(t,!1))}(d,t,s,u);default:return null}};let y=m(g);if(null===y){const{defaultKeyType:e,defaultStringType:s}=t.options,n=f&&e||s;if(y=m(n),null===y)throw new Error(`Unsupported default string type ${n}`)}return y}},4364:(e,t,s)=>{var n=s(9399);const r=Symbol("break visit"),i=Symbol("skip children"),o=Symbol("remove node");function a(e,t){const s=h(t);if(n.isDocument(e)){c(null,e.contents,s,Object.freeze([e]))===o&&(e.contents=null)}else c(null,e,s,Object.freeze([]))}function c(e,t,s,i){const a=f(e,t,s,i);if(n.isNode(a)||n.isPair(a))return p(e,i,a),c(e,a,s,i);if("symbol"!=typeof a)if(n.isCollection(t)){i=Object.freeze(i.concat(t));for(let e=0;e<t.items.length;++e){const n=c(e,t.items[e],s,i);if("number"==typeof n)e=n-1;else{if(n===r)return r;n===o&&(t.items.splice(e,1),e-=1)}}}else if(n.isPair(t)){i=Object.freeze(i.concat(t));const e=c("key",t.key,s,i);if(e===r)return r;e===o&&(t.key=null);const n=c("value",t.value,s,i);if(n===r)return r;n===o&&(t.value=null)}return a}async function l(e,t){const s=h(t);if(n.isDocument(e)){await u(null,e.contents,s,Object.freeze([e]))===o&&(e.contents=null)}else await u(null,e,s,Object.freeze([]))}async function u(e,t,s,i){const a=await f(e,t,s,i);if(n.isNode(a)||n.isPair(a))return p(e,i,a),u(e,a,s,i);if("symbol"!=typeof a)if(n.isCollection(t)){i=Object.freeze(i.concat(t));for(let e=0;e<t.items.length;++e){const n=await u(e,t.items[e],s,i);if("number"==typeof n)e=n-1;else{if(n===r)return r;n===o&&(t.items.splice(e,1),e-=1)}}}else if(n.isPair(t)){i=Object.freeze(i.concat(t));const e=await u("key",t.key,s,i);if(e===r)return r;e===o&&(t.key=null);const n=await u("value",t.value,s,i);if(n===r)return r;n===o&&(t.value=null)}return a}function h(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 f(e,t,s,r){return"function"==typeof s?s(e,t,r):n.isMap(t)?s.Map?.(e,t,r):n.isSeq(t)?s.Seq?.(e,t,r):n.isPair(t)?s.Pair?.(e,t,r):n.isScalar(t)?s.Scalar?.(e,t,r):n.isAlias(t)?s.Alias?.(e,t,r):void 0}function p(e,t,s){const r=t[t.length-1];if(n.isCollection(r))r.items[e]=s;else if(n.isPair(r))"key"===e?r.key=s:r.value=s;else{if(!n.isDocument(r)){const e=n.isAlias(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${e} parent`)}r.contents=s}}a.BREAK=r,a.SKIP=i,a.REMOVE=o,l.BREAK=r,l.SKIP=i,l.REMOVE=o,t.visit=a,t.visitAsync=l},8568:(e,t,s)=>{s.d(t,{Ay:()=>P});const n=(e=0)=>t=>`\x1b[${t+e}m`,r=(e=0)=>t=>`\x1b[${38+e};5;${t}m`,i=(e=0)=>(t,s,n)=>`\x1b[${38+e};2;${t};${s};${n}m`,o={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(o.modifier),Object.keys(o.color),Object.keys(o.bgColor);const a=function(){const e=new Map;for(const[t,s]of Object.entries(o)){for(const[t,n]of Object.entries(s))o[t]={open:`\x1b[${n[0]}m`,close:`\x1b[${n[1]}m`},s[t]=o[t],e.set(n[0],n[1]);Object.defineProperty(o,t,{value:s,enumerable:!1})}return Object.defineProperty(o,"codes",{value:e,enumerable:!1}),o.color.close="\x1b[39m",o.bgColor.close="\x1b[49m",o.color.ansi=n(),o.color.ansi256=r(),o.color.ansi16m=i(),o.bgColor.ansi=n(10),o.bgColor.ansi256=r(10),o.bgColor.ansi16m=i(10),Object.defineProperties(o,{rgbToAnsi256:{value:(e,t,s)=>e===t&&t===s?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(s/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[s]=t;3===s.length&&(s=[...s].map((e=>e+e)).join(""));const n=Number.parseInt(s,16);return[n>>16&255,n>>8&255,255&n]},enumerable:!1},hexToAnsi256:{value:e=>o.rgbToAnsi256(...o.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return e-8+90;let t,s,n;if(e>=232)t=(10*(e-232)+8)/255,s=t,n=t;else{const r=(e-=16)%36;t=Math.floor(e/36)/5,s=Math.floor(r/6)/5,n=r%6/5}const r=2*Math.max(t,s,n);if(0===r)return 30;let i=30+(Math.round(n)<<2|Math.round(s)<<1|Math.round(t));return 2===r&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(e,t,s)=>o.ansi256ToAnsi(o.rgbToAnsi256(e,t,s)),enumerable:!1},hexToAnsi:{value:e=>o.ansi256ToAnsi(o.hexToAnsi256(e)),enumerable:!1}}),o}();var c=s(1708),l=s(8161),u=s(7066);function h(e,t=(globalThis.Deno?globalThis.Deno.args:c.argv)){const s=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(s+e),r=t.indexOf("--");return-1!==n&&(-1===r||n<r)}const{env:f}=c;let p;function d(e,{streamIsTTY:t,sniffFlags:s=!0}={}){const n=function(){if("FORCE_COLOR"in f)return"true"===f.FORCE_COLOR?1:"false"===f.FORCE_COLOR?0:0===f.FORCE_COLOR.length?1:Math.min(Number.parseInt(f.FORCE_COLOR,10),3)}();void 0!==n&&(p=n);const r=s?p:n;if(0===r)return 0;if(s){if(h("color=16m")||h("color=full")||h("color=truecolor"))return 3;if(h("color=256"))return 2}if("TF_BUILD"in f&&"AGENT_NAME"in f)return 1;if(e&&!t&&void 0===r)return 0;const i=r||0;if("dumb"===f.TERM)return i;if("win32"===c.platform){const e=l.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in f)return"GITHUB_ACTIONS"in f||"GITEA_ACTIONS"in f?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((e=>e in f))||"codeship"===f.CI_NAME?1:i;if("TEAMCITY_VERSION"in f)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(f.TEAMCITY_VERSION)?1:0;if("truecolor"===f.COLORTERM)return 3;if("xterm-kitty"===f.TERM)return 3;if("TERM_PROGRAM"in f){const e=Number.parseInt((f.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(f.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(f.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(f.TERM)||"COLORTERM"in f?1:i}function g(e,t={}){return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(d(e,{streamIsTTY:e&&e.isTTY,...t}))}h("no-color")||h("no-colors")||h("color=false")||h("color=never")?p=0:(h("color")||h("colors")||h("color=true")||h("color=always"))&&(p=1);const m={stdout:g({isTTY:u.isatty(1)}),stderr:g({isTTY:u.isatty(2)})};function y(e,t,s){let n=e.indexOf(t);if(-1===n)return e;const r=t.length;let i=0,o="";do{o+=e.slice(i,n)+t+s,i=n+r,n=e.indexOf(t,i)}while(-1!==n);return o+=e.slice(i),o}const{stdout:b,stderr:w}=m,E=Symbol("GENERATOR"),v=Symbol("STYLER"),S=Symbol("IS_EMPTY"),A=["ansi","ansi","ansi256","ansi16m"],k=Object.create(null);const O=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 s=b?b.level:0;e.level=void 0===t.level?s:t.level})(t,e),Object.setPrototypeOf(t,C.prototype),t};function C(e){return O(e)}Object.setPrototypeOf(C.prototype,Function.prototype);for(const[e,t]of Object.entries(a))k[e]={get(){const s=x(this,_(t.open,t.close,this[v]),this[S]);return Object.defineProperty(this,e,{value:s}),s}};k.visible={get(){const e=x(this,this[v],!0);return Object.defineProperty(this,"visible",{value:e}),e}};const T=(e,t,s,...n)=>"rgb"===e?"ansi16m"===t?a[s].ansi16m(...n):"ansi256"===t?a[s].ansi256(a.rgbToAnsi256(...n)):a[s].ansi(a.rgbToAnsi(...n)):"hex"===e?T("rgb",t,s,...a.hexToRgb(...n)):a[s][e](...n),R=["rgb","hex","ansi256"];for(const e of R){k[e]={get(){const{level:t}=this;return function(...s){const n=_(T(e,A[t],"color",...s),a.color.close,this[v]);return x(this,n,this[S])}}};k["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...s){const n=_(T(e,A[t],"bgColor",...s),a.bgColor.close,this[v]);return x(this,n,this[S])}}}}const L=Object.defineProperties((()=>{}),{...k,level:{enumerable:!0,get(){return this[E].level},set(e){this[E].level=e}}}),_=(e,t,s)=>{let n,r;return void 0===s?(n=e,r=t):(n=s.openAll+e,r=t+s.closeAll),{open:e,close:t,openAll:n,closeAll:r,parent:s}},x=(e,t,s)=>{const n=(...e)=>N(n,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(n,L),n[E]=e,n[v]=t,n[S]=s,n},N=(e,t)=>{if(e.level<=0||!t)return e[S]?"":t;let s=e[v];if(void 0===s)return t;const{openAll:n,closeAll:r}=s;if(t.includes("\x1b"))for(;void 0!==s;)t=y(t,s.close,s.open),s=s.parent;const i=t.indexOf("\n");return-1!==i&&(t=function(e,t,s,n){let r=0,i="";do{const o="\r"===e[n-1];i+=e.slice(r,o?n-1:n)+t+(o?"\r\n":"\n")+s,r=n+1,n=e.indexOf("\n",r)}while(-1!==n);return i+=e.slice(r),i}(t,r,n,i)),n+t+r};Object.defineProperties(C.prototype,k);const I=C(),P=(C({level:w?w.level:0}),I)},754:(e,t,s)=>{s.d(t,{default:()=>kn});var n=s(3680),r=s(7975),i=s(8568);const o=s(8985);var a=s(2018),c=s.t(a,2);const{env:l={},argv:u=[],platform:h=""}="undefined"==typeof process?{}:process,f="NO_COLOR"in l||u.includes("--no-color"),p="FORCE_COLOR"in l||u.includes("--color"),d="win32"===h,g="dumb"===l.TERM,m=c&&a.isatty&&a.isatty(1)&&l.TERM&&!g,y=!f&&(p||d&&!g||m||"CI"in l&&("GITHUB_ACTIONS"in l||"GITLAB_CI"in l||"CIRCLECI"in l)),b=(e,t,s,n,r=t.substring(0,e)+n,i=t.substring(e+s.length),o=i.indexOf(s))=>r+(o<0?i:b(o,i,s,n)),w=(e,t,s=e,n=e.length+1)=>r=>r||""!==r&&void 0!==r?((e,t,s,n,r)=>e<0?s+t+n:s+b(e,t,n,r)+n)((""+r).indexOf(t,n),r,e,t,s):"",E=(e,t,s)=>w(`\x1b[${e}m`,`\x1b[${t}m`,s),v={reset:E(0,0),bold:E(1,22,"\x1b[22m\x1b[1m"),dim:E(2,22,"\x1b[22m\x1b[2m"),italic:E(3,23),underline:E(4,24),inverse:E(7,27),hidden:E(8,28),strikethrough:E(9,29),black:E(30,39),red:E(31,39),green:E(32,39),yellow:E(33,39),blue:E(34,39),magenta:E(35,39),cyan:E(36,39),white:E(37,39),gray:E(90,39),bgBlack:E(40,49),bgRed:E(41,49),bgGreen:E(42,49),bgYellow:E(43,49),bgBlue:E(44,49),bgMagenta:E(45,49),bgCyan:E(46,49),bgWhite:E(47,49),blackBright:E(90,39),redBright:E(91,39),greenBright:E(92,39),yellowBright:E(93,39),blueBright:E(94,39),magentaBright:E(95,39),cyanBright:E(96,39),whiteBright:E(97,39),bgBlackBright:E(100,49),bgRedBright:E(101,49),bgGreenBright:E(102,49),bgYellowBright:E(103,49),bgBlueBright:E(104,49),bgMagentaBright:E(105,49),bgCyanBright:E(106,49),bgWhiteBright:E(107,49)},S=({useColor:e=y}={})=>e?v:Object.keys(v).reduce(((e,t)=>({...e,[t]:String})),{}),{reset:A,bold:k,dim:O,italic:C,underline:T,inverse:R,hidden:L,strikethrough:_,black:x,red:N,green:I,yellow:P,blue:$,magenta:M,cyan:D,white:B,gray:F,bgBlack:H,bgRed:j,bgGreen:U,bgYellow:K,bgBlue:G,bgMagenta:q,bgCyan:Y,bgWhite:W,blackBright:V,redBright:Q,greenBright:J,yellowBright:z,blueBright:X,magentaBright:Z,cyanBright:ee,whiteBright:te,bgBlackBright:se,bgRedBright:ne,bgGreenBright:re,bgYellowBright:ie,bgBlueBright:oe,bgMagentaBright:ae,bgCyanBright:ce,bgWhiteBright:le}=S();var ue=s(9023),he=s(857),fe=s(3193),pe=s(2203),de=s(4971),ge=s(6982),me=Object.defineProperty,ye=(e,t)=>me(e,"name",{value:t,configurable:!0}),be={CURSOR_HIDE:"\x1b[?25l",CURSOR_SHOW:"\x1b[?25h"},we=(e=>(e.WAITING="WAITING",e.STARTED="STARTED",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e.SKIPPED="SKIPPED",e.ROLLING_BACK="ROLLING_BACK",e.ROLLED_BACK="ROLLED_BACK",e.RETRY="RETRY",e.PAUSED="PAUSED",e.PROMPT="PROMPT",e.PROMPT_COMPLETED="PROMPT_COMPLETED",e.PROMPT_FAILED="PROMPT_FAILED",e))(we||{}),Ee=class{static{ye(this,"EventManager")}emitter=new o;emit(e,t){this.emitter.emit(e,t)}on(e,t){this.emitter.addListener(e,t)}once(e,t){this.emitter.once(e,t)}off(e,t){this.emitter.off(e,t)}complete(){this.emitter.removeAllListeners()}};(class{static{ye(this,"BaseEventMap")}});function ve(e){return!!e&&"function"==typeof e.lift&&"function"==typeof e.subscribe}function Se(){return!!process.env.LISTR_FORCE_UNICODE||"win32"!==process.platform||!!process.env.CI||!!process.env.WT_SESSION||"vscode"===process.env.TERM_PROGRAM||"xterm-256color"===process.env.TERM||"alacritty"===process.env.TERM}ye(ve,"isObservable"),ye(Se,"isUnicodeSupported");var Ae=/\u0007/;function ke(e){return String(e).replace(new RegExp("(?:\\u001b|\\u009b)\\[[\\=><~/#&.:=?%@~_-]*[0-9]*[\\a-ln-tqyz=><~/#&.:=?%@~_-]+","gmi"),"").replace(new RegExp(Ae,"gmi"),"").trim()}ye(ke,"cleanseAnsi");var Oe=S();function Ce(e,t){return e.replace(/^(?!\s*$)/gm," ".repeat(t))}ye(Ce,"indent");var Te={warning:"\u26a0",cross:"\u2716",arrowDown:"\u2193",tick:"\u2714",arrowRight:"\u2192",pointer:"\u276f",checkboxOn:"\u2612",arrowLeft:"\u2190",squareSmallFilled:"\u25fc",pointerSmall:"\u203a"},Re={...Te,warning:"\u203c",cross:"\xd7",tick:"\u221a",pointer:">",checkboxOn:"[\xd7]",squareSmallFilled:"\u25a0"},Le=Se()?Te:Re;function _e(e,...t){return(0,ue.format)(String(e),...t)}ye(_e,"splat");var xe={STARTED:Le.pointer,FAILED:Le.cross,SKIPPED:Le.arrowDown,COMPLETED:Le.tick,OUTPUT:Le.pointerSmall,TITLE:Le.arrowRight,RETRY:Le.warning,ROLLBACK:Le.arrowLeft,PAUSED:Le.squareSmallFilled},Ne={STARTED:Oe.yellow,FAILED:Oe.red,SKIPPED:Oe.yellow,COMPLETED:Oe.green,RETRY:Oe.yellowBright,ROLLBACK:Oe.redBright,PAUSED:Oe.yellowBright},Ie=["RETRY","ROLLBACK","FAILED"],Pe=class{constructor(e){this.options=e,this.options={useIcons:!0,toStderr:[],...e??{}},this.options.fields??={},this.options.fields.prefix??=[],this.options.fields.suffix??=[],this.process=this.options.processOutput??new De}static{ye(this,"ListrLogger")}process;log(e,t,s){const n=this.format(e,t,s);this.options.toStderr.includes(e)?this.process.toStderr(n):this.process.toStdout(n)}toStdout(e,t,s=!0){this.process.toStdout(this.format(null,e,t),s)}toStderr(e,t,s=!0){this.process.toStderr(this.format(null,e,t),s)}wrap(e,t){return e?this.applyFormat(`[${e}]`,t):e}splat(...e){const t=e.shift()??"";return 0===e.length?t:_e(t,e)}suffix(e,...t){return t.filter(Boolean).forEach((t=>{if(e+=this.spacing(e),"string"==typeof t)e+=this.wrap(t);else if("object"==typeof t){if(t.args??=[],"function"==typeof t.condition?!t.condition(...t.args):!(t.condition??1))return e;e+=this.wrap("function"==typeof t.field?t.field(...t.args):t.field,{format:t?.format(...t.args)})}})),e}prefix(e,...t){return t.filter(Boolean).forEach((t=>{if(e=this.spacing(e)+e,"string"==typeof t)e=this.wrap(t)+e;else if("object"==typeof t){if(t.args??=[],"function"==typeof t.condition?!t.condition(...t.args):!(t.condition??1))return e;e=this.wrap("function"==typeof t.field?t.field(...t.args):t.field,{format:t?.format()})+e}})),e}fields(e,t){return this.options?.fields?.prefix&&(e=this.prefix(e,...this.options.fields.prefix)),t?.prefix&&(e=this.prefix(e,...t.prefix)),t?.suffix&&(e=this.suffix(e,...t.suffix)),this.options?.fields?.suffix&&(e=this.suffix(e,...this.options.fields.suffix)),e}icon(e,t){if(!e)return null;t||=this.options.icon?.[e];const s=this.options.color?.[e];return t&&s&&(t=s(t)),t}format(e,t,s){return Array.isArray(t)||(t=[t]),t=this.splat(t.shift(),...t).toString().split(he.EOL).filter((e=>!e||""!==e.trim())).map((t=>this.style(e,this.fields(t,{prefix:Array.isArray(s?.prefix)?s.prefix:[s?.prefix],suffix:Array.isArray(s?.suffix)?s.suffix:[s?.suffix]})))).join(he.EOL)}style(e,t){if(!e||!t)return t;const s=this.icon(e,!this.options.useIcons&&this.wrap(e));return s&&(t=s+" "+t),t}applyFormat(e,t){return t?.format?t.format(e):e}spacing(e){return void 0===e||""===e.trim()?"":" "}},$e=class{constructor(e){this.options=e}static{ye(this,"ProcessOutputBuffer")}buffer=[];decoder=new fe.StringDecoder;get all(){return this.buffer}get last(){return this.buffer.at(-1)}get length(){return this.buffer.length}write(e,...t){const s=t[t.length-1];return this.buffer.push({time:Date.now(),stream:this.options?.stream,entry:this.decoder.write("string"==typeof e?Buffer.from(e,"string"==typeof t[0]?t[0]:void 0):Buffer.from(e))}),this.options?.limit&&(this.buffer=this.buffer.slice(-this.options.limit)),"function"==typeof s&&s(),!0}reset(){this.buffer=[]}},Me=class{constructor(e){this.stream=e,this.method=e.write,this.buffer=new $e({stream:e})}static{ye(this,"ProcessOutputStream")}method;buffer;get out(){return Object.assign({},this.stream,{write:this.write.bind(this)})}hijack(){this.stream.write=this.buffer.write.bind(this.buffer)}release(){this.stream.write=this.method;const e=[...this.buffer.all];return this.buffer.reset(),e}write(...e){return this.method.apply(this.stream,e)}},De=class{constructor(e,t,s){this.options=s,this.stream={stdout:new Me(e??process.stdout),stderr:new Me(t??process.stderr)},this.options={dump:["stdout","stderr"],leaveEmptyLine:!0,...s}}static{ye(this,"ProcessOutput")}stream;active;get stdout(){return this.stream.stdout.out}get stderr(){return this.stream.stderr.out}hijack(){if(this.active)throw new Error("ProcessOutput has been already hijacked!");this.stream.stdout.write(be.CURSOR_HIDE),Object.values(this.stream).forEach((e=>e.hijack())),this.active=!0}release(){const e=Object.entries(this.stream).map((([e,t])=>({name:e,buffer:t.release()}))).filter((e=>this.options.dump.includes(e.name))).flatMap((e=>e.buffer)).sort(((e,t)=>e.time-t.time)).map((e=>({...e,entry:ke(e.entry)}))).filter((e=>e.entry));e.length>0&&(this.options.leaveEmptyLine&&this.stdout.write(he.EOL),e.forEach((e=>{(e.stream??this.stdout).write(e.entry+he.EOL)}))),this.stream.stdout.write(be.CURSOR_SHOW),this.active=!1}toStdout(e,t=!0){return t&&(e+=he.EOL),this.stream.stdout.write(e)}toStderr(e,t=!0){return t&&(e+=he.EOL),this.stream.stderr.write(e)}};function Be(e){const t=new pe.Writable;return t.write=t=>(e(t.toString()),!0),t}ye(Be,"createWritable");(class{constructor(e,t){this.task=e,this.wrapper=t}static{ye(this,"ListrPromptAdapter")}state;reportStarted(){if(this.state=this.task.state,this.task.prompt)throw new at("There is already an active prompt attached to this task which may not be cleaned up properly.");this.task.prompt=this,this.task.state$="PROMPT"}reportFailed(){this.task.state$="PROMPT_FAILED",this.restoreState()}reportCompleted(){this.task.state$="PROMPT_COMPLETED",this.restoreState()}restoreState(){this.task.prompt=void 0,this.state&&(this.task.state=this.state)}});var Fe=class{static{ye(this,"Spinner")}spinner=Se()?["\u280b","\u2819","\u2839","\u2838","\u283c","\u2834","\u2826","\u2827","\u2807","\u280f"]:["-","\\","|","/"];id;spinnerPosition=0;spin(){this.spinnerPosition=++this.spinnerPosition%this.spinner.length}fetch(){return this.spinner[this.spinnerPosition]}isRunning(){return!!this.id}start(e,t=100){this.id=setInterval((()=>{this.spin(),e&&e()}),t)}stop(){clearInterval(this.id)}},He={SKIPPED_WITH_COLLAPSE:Le.arrowDown,SKIPPED_WITHOUT_COLLAPSE:Le.warning,OUTPUT:Le.pointerSmall,OUTPUT_WITH_BOTTOMBAR:Le.pointerSmall,PENDING:Le.pointer,COMPLETED:Le.tick,COMPLETED_WITH_FAILED_SUBTASKS:Le.warning,COMPLETED_WITH_SISTER_TASKS_FAILED:Le.squareSmallFilled,RETRY:Le.warning,ROLLING_BACK:Le.warning,ROLLED_BACK:Le.arrowLeft,FAILED:Le.cross,FAILED_WITH_SUBTASKS:Le.pointer,WAITING:Le.squareSmallFilled,PAUSED:Le.squareSmallFilled},je={SKIPPED_WITH_COLLAPSE:Oe.yellow,SKIPPED_WITHOUT_COLLAPSE:Oe.yellow,PENDING:Oe.yellow,COMPLETED:Oe.green,COMPLETED_WITH_FAILED_SUBTASKS:Oe.yellow,COMPLETED_WITH_SISTER_TASKS_FAILED:Oe.red,RETRY:Oe.yellowBright,ROLLING_BACK:Oe.redBright,ROLLED_BACK:Oe.redBright,FAILED:Oe.red,FAILED_WITH_SUBTASKS:Oe.red,WAITING:Oe.dim,PAUSED:Oe.yellowBright};function Ue(e){const t=Math.floor(e/1e3),s=Math.floor(t/60);let n;return 0===t&&0===s&&(n=`0.${Math.floor(e/100)}s`),t>0&&(n=t%60+"s"),s>0&&(n=`${s}m${n}`),n}ye(Ue,"parseTimer");var Ke={condition:!0,field:Ue,format:()=>Oe.dim};function Ge(){const e=new Date;return String(e.getHours()).padStart(2,"0")+":"+String(e.getMinutes()).padStart(2,"0")+":"+String(e.getSeconds()).padStart(2,"0")}ye(Ge,"parseTimestamp");var qe=class e{constructor(t,s,n){this.tasks=t,this.options=s,this.events=n,this.options={...e.rendererOptions,...this.options,icon:{...He,...s?.icon??{}},color:{...je,...s?.color??{}}},this.spinner=this.options.spinner??new Fe,this.logger=this.options.logger??new Pe({useIcons:!0,toStderr:[]}),this.logger.options.icon=this.options.icon,this.logger.options.color=this.options.color}static{ye(this,"DefaultRenderer")}static nonTTY=!1;static rendererOptions={indentation:2,clearOutput:!1,showSubtasks:!0,collapseSubtasks:!0,collapseSkips:!0,showSkipMessage:!0,suffixSkips:!1,collapseErrors:!0,showErrorMessage:!0,suffixRetries:!0,lazy:!1,removeEmptyLines:!0,formatOutput:"wrap",pausedTimer:{...Ke,format:()=>Oe.yellowBright}};static rendererTaskOptions={outputBar:!0};prompt;activePrompt;spinner;logger;updater;truncate;wrap;buffer={output:new Map,bottom:new Map};cache={render:new Map,rendererOptions:new Map,rendererTaskOptions:new Map};async render(){const{createLogUpdate:e}=await s.e(538).then(s.bind(s,9538)),{default:t}=await s.e(373).then(s.bind(s,2754)),{default:n}=await s.e(402).then(s.bind(s,6402));this.updater=e(this.logger.process.stdout),this.truncate=t,this.wrap=n,this.logger.process.hijack(),this.options?.lazy||this.spinner.start((()=>{this.update()})),this.events.on("SHOUD_REFRESH_RENDER",(()=>{this.update()}))}update(){this.updater(this.create())}end(){this.spinner.stop(),this.updater.clear(),this.updater.done(),this.options.clearOutput||this.logger.process.toStdout(this.create({prompt:!1})),this.logger.process.release()}create(e){e={tasks:!0,bottomBar:!0,prompt:!0,...e};const t=[],s=this.renderer(this.tasks),n=this.renderBottomBar(),r=this.renderPrompt();return e.tasks&&s.length>0&&t.push(...s),e.bottomBar&&n.length>0&&(t.length>0&&t.push(""),t.push(...n)),e.prompt&&r.length>0&&(t.length>0&&t.push(""),t.push(...r)),t.join(he.EOL)}style(e,t=!1){const s=this.cache.rendererOptions.get(e.id);if(e.isSkipped()){if(t||s.collapseSkips)return this.logger.icon("SKIPPED_WITH_COLLAPSE");if(!1===s.collapseSkips)return this.logger.icon("SKIPPED_WITHOUT_COLLAPSE")}if(t)return this.shouldOutputToBottomBar(e)?this.logger.icon("OUTPUT_WITH_BOTTOMBAR"):this.logger.icon("OUTPUT");if(e.hasSubtasks()){if(e.isStarted()||e.isPrompt()&&!1!==s.showSubtasks&&!e.subtasks.every((e=>!e.hasTitle())))return this.logger.icon("PENDING");if(e.isCompleted()&&e.subtasks.some((e=>e.hasFailed())))return this.logger.icon("COMPLETED_WITH_FAILED_SUBTASKS");if(e.hasFailed())return this.logger.icon("FAILED_WITH_SUBTASKS")}return e.isStarted()||e.isPrompt()?this.logger.icon("PENDING",!this.options?.lazy&&this.spinner.fetch()):e.isCompleted()?this.logger.icon("COMPLETED"):e.isRetrying()?this.logger.icon("RETRY",!this.options?.lazy&&this.spinner.fetch()):e.isRollingBack()?this.logger.icon("ROLLING_BACK",!this.options?.lazy&&this.spinner.fetch()):e.hasRolledBack()?this.logger.icon("ROLLED_BACK"):e.hasFailed()?this.logger.icon("FAILED"):e.isPaused()?this.logger.icon("PAUSED"):this.logger.icon("WAITING")}format(e,t,s){if(""===e.trim())return[];let n;t&&(e=t+" "+e);const r=(process.stdout.columns??80)-s*this.options.indentation-2;switch(this.options.formatOutput){case"truncate":n=e.split(he.EOL).map(((e,t)=>this.truncate(this.indent(e,t),r)));break;case"wrap":n=this.wrap(e,r,{hard:!0}).split(he.EOL).map(((e,t)=>this.indent(e,t)));break;default:throw new ot("Format option for the renderer is wrong.")}return this.options.removeEmptyLines&&(n=n.filter(Boolean)),n.map((e=>Ce(e,s*this.options.indentation)))}shouldOutputToOutputBar(e){const t=this.cache.rendererTaskOptions.get(e.id).outputBar;return"number"==typeof t&&0!==t||"boolean"==typeof t&&!1!==t}shouldOutputToBottomBar(e){const t=this.cache.rendererTaskOptions.get(e.id).bottomBar;return"number"==typeof t&&0!==t||"boolean"==typeof t&&!1!==t||!e.hasTitle()}renderer(e,t=0){return e.flatMap((s=>{if(!s.isEnabled())return[];if(this.cache.render.has(s.id))return this.cache.render.get(s.id);this.calculate(s),this.setupBuffer(s);const n=this.cache.rendererOptions.get(s.id),r=this.cache.rendererTaskOptions.get(s.id),i=[];if(s.isPrompt()){if(this.activePrompt&&this.activePrompt!==s.id)throw new ot("Only one prompt can be active at the given time, please re-evaluate your task design.");this.activePrompt||(s.on("PROMPT",(e=>{const t=ke(e);t&&(this.prompt=t)})),s.on("STATE",(e=>{("PROMPT_COMPLETED"===e||s.hasFinalized()||s.hasReset())&&(this.prompt=null,this.activePrompt=null,s.off("PROMPT"))})),this.activePrompt=s.id)}if(s.hasTitle()&&(!e.some((e=>e.hasFailed()))||s.hasFailed()||!1===s.options.exitOnError||s.isCompleted()||s.isSkipped()?s.hasFailed()&&n.collapseErrors?i.push(...this.format(!s.hasSubtasks()&&s.message.error&&n.showErrorMessage?s.message.error:s.title,this.style(s),t)):s.isSkipped()&&n.collapseSkips?i.push(...this.format(this.logger.suffix(s.message.skip&&n.showSkipMessage?s.message.skip:s.title,{field:"SKIPPED",condition:n.suffixSkips,format:()=>Oe.dim}),this.style(s),t)):s.isRetrying()?i.push(...this.format(this.logger.suffix(s.title,{field:`RETRY:${s.message.retry.count}`,format:()=>Oe.yellow,condition:n.suffixRetries}),this.style(s),t)):s.isCompleted()&&s.hasTitle()&&et(r.timer?.condition,s.message.duration)?i.push(...this.format(this.logger.suffix(s?.title,{...r.timer,args:[s.message.duration]}),this.style(s),t)):s.isPaused()?i.push(...this.format(this.logger.suffix(s.title,{...n.pausedTimer,args:[s.message.paused-Date.now()]}),this.style(s),t)):i.push(...this.format(s.title,this.style(s),t)):i.push(...this.format(s.title,this.logger.icon("COMPLETED_WITH_SISTER_TASKS_FAILED"),t))),s.hasSubtasks()&&n.showSubtasks||(!s.hasFailed()||!1!==n.collapseErrors||!n.showErrorMessage&&n.showSubtasks?!s.isSkipped()||!1!==n.collapseSkips||!n.showSkipMessage&&n.showSubtasks||i.push(...this.dump(s,t,"SKIPPED")):i.push(...this.dump(s,t,"FAILED"))),(s.isPending()||r.persistentOutput)&&i.push(...this.renderOutputBar(s,t)),!1!==n.showSubtasks&&s.hasSubtasks()&&(s.isPending()||s.hasFinalized()&&!s.hasTitle()||s.isCompleted()&&!1===n.collapseSubtasks&&!s.subtasks.some((e=>!0===this.cache.rendererOptions.get(e.id)?.collapseSubtasks))||s.subtasks.some((e=>!1===this.cache.rendererOptions.get(e.id)?.collapseSubtasks))||s.subtasks.some((e=>e.hasFailed()))||s.subtasks.some((e=>e.hasRolledBack())))){const e=s.hasTitle()?t+1:t,n=this.renderer(s.subtasks,e);i.push(...n)}return s.hasFinalized()&&(r.persistentOutput||(this.buffer.bottom.delete(s.id),this.buffer.output.delete(s.id))),s.isClosed()&&(this.cache.render.set(s.id,i),this.reset(s)),i}))}renderOutputBar(e,t){const s=this.buffer.output.get(e.id);return s?s.all.flatMap((s=>this.dump(e,t,"OUTPUT",s.entry))):[]}renderBottomBar(){return 0===this.buffer.bottom.size?[]:Array.from(this.buffer.bottom.values()).flatMap((e=>e.all)).sort(((e,t)=>e.time-t.time)).map((e=>e.entry))}renderPrompt(){return this.prompt?[this.prompt]:[]}calculate(t){if(this.cache.rendererOptions.has(t.id)&&this.cache.rendererTaskOptions.has(t.id))return;const s={...this.options,...t.rendererOptions};this.cache.rendererOptions.set(t.id,s),this.cache.rendererTaskOptions.set(t.id,{...e.rendererTaskOptions,timer:s.timer,...t.rendererTaskOptions})}setupBuffer(e){if(this.buffer.bottom.has(e.id)||this.buffer.output.has(e.id))return;const t=this.cache.rendererTaskOptions.get(e.id);this.shouldOutputToBottomBar(e)&&!this.buffer.bottom.has(e.id)?(this.buffer.bottom.set(e.id,new $e({limit:"number"==typeof t.bottomBar?t.bottomBar:1})),e.on("OUTPUT",(t=>{const s=this.dump(e,-1,"OUTPUT",t);this.buffer.bottom.get(e.id).write(s.join(he.EOL))})),e.on("STATE",(t=>{if("RETRY"===t)this.buffer.bottom.delete(e.id)}))):this.shouldOutputToOutputBar(e)&&!this.buffer.output.has(e.id)&&(this.buffer.output.set(e.id,new $e({limit:"number"==typeof t.outputBar?t.outputBar:1})),e.on("OUTPUT",(t=>{this.buffer.output.get(e.id).write(t)})),e.on("STATE",(t=>{if("RETRY"===t)this.buffer.output.delete(e.id)})))}reset(e){this.cache.rendererOptions.delete(e.id),this.cache.rendererTaskOptions.delete(e.id),this.buffer.output.delete(e.id)}dump(e,t,s="OUTPUT",n){if(!n)switch(s){case"OUTPUT":n=e.output;break;case"SKIPPED":n=e.message.skip;break;case"FAILED":n=e.message.error}return e.hasTitle()&&"FAILED"===s&&n===e.title||"string"!=typeof n?[]:("OUTPUT"===s&&(n=ke(n)),this.format(n,this.style(e,!0),t+1))}indent(e,t){return t>0?Ce(e.trim(),this.options.indentation):e.trim()}},Ye=class{constructor(e,t){this.tasks=e,this.options=t}static{ye(this,"SilentRenderer")}static nonTTY=!0;static rendererOptions;static rendererTaskOptions;render(){}end(){}},We=class e{constructor(t,s){this.tasks=t,this.options=s,this.options={...e.rendererOptions,...s,icon:{...xe,...s?.icon??{}},color:{...Ne,...s?.color??{}}},this.logger=this.options.logger??new Pe({useIcons:!0,toStderr:Ie}),this.logger.options.icon=this.options.icon,this.logger.options.color=this.options.color,this.options.timestamp&&this.logger.options.fields.prefix.unshift(this.options.timestamp)}static{ye(this,"SimpleRenderer")}static nonTTY=!0;static rendererOptions={pausedTimer:{...Ke,field:e=>`PAUSED:${e}`,format:()=>Oe.yellowBright}};static rendererTaskOptions={};logger;cache={rendererOptions:new Map,rendererTaskOptions:new Map};end(){}render(){this.renderer(this.tasks)}renderer(e){e.forEach((e=>{this.calculate(e),e.once("CLOSED",(()=>{this.reset(e)}));const t=this.cache.rendererOptions.get(e.id),s=this.cache.rendererTaskOptions.get(e.id);e.on("SUBTASK",(e=>{this.renderer(e)})),e.on("STATE",(t=>{if(e.hasTitle())if("STARTED"===t)this.logger.log("STARTED",e.title);else if("COMPLETED"===t){const t=s?.timer;this.logger.log("COMPLETED",e.title,t&&{suffix:{...t,condition:!!e.message?.duration&&t.condition,args:[e.message.duration]}})}else"PROMPT"===t?(this.logger.process.hijack(),e.on("PROMPT",(e=>{this.logger.process.toStderr(e,!1)}))):"PROMPT_COMPLETED"===t&&(e.off("PROMPT"),this.logger.process.release())})),e.on("OUTPUT",(e=>{this.logger.log("OUTPUT",e)})),e.on("MESSAGE",(s=>{if(s.error)this.logger.log("FAILED",e.title,{suffix:{field:`FAILED: ${s.error}`,format:()=>Oe.red}});else if(s.skip)this.logger.log("SKIPPED",e.title,{suffix:{field:`SKIPPED: ${s.skip}`,format:()=>Oe.yellow}});else if(s.rollback)this.logger.log("ROLLBACK",e.title,{suffix:{field:`ROLLBACK: ${s.rollback}`,format:()=>Oe.red}});else if(s.retry)this.logger.log("RETRY",e.title,{suffix:{field:`RETRY:${s.retry.count}`,format:()=>Oe.red}});else if(s.paused){const n=t?.pausedTimer;this.logger.log("PAUSED",e.title,n&&{suffix:{...n,condition:!!s?.paused&&n.condition,args:[s.paused-Date.now()]}})}}))}))}calculate(t){if(this.cache.rendererOptions.has(t.id)&&this.cache.rendererTaskOptions.has(t.id))return;const s={...this.options,...t.rendererOptions};this.cache.rendererOptions.set(t.id,s),this.cache.rendererTaskOptions.set(t.id,{...e.rendererTaskOptions,timer:s.timer,...t.rendererTaskOptions})}reset(e){this.cache.rendererOptions.delete(e.id),this.cache.rendererTaskOptions.delete(e.id)}},Ve=class{constructor(e){this.options=e}static{ye(this,"TestRendererSerializer")}serialize(e,t,s){return JSON.stringify(this.generate(e,t,s))}generate(e,t,s){const n={event:e,data:t};if("boolean"!=typeof this.options?.task){const e=Object.fromEntries(this.options.task.map((e=>{const t=s[e];return"function"==typeof t?[e,t.call(s)]:[e,t]})));Object.keys(s).length>0&&(n.task=e)}return n}},Qe=class e{constructor(t,s){this.tasks=t,this.options=s,this.options={...e.rendererOptions,...this.options},this.logger=this.options.logger??new Pe({useIcons:!1}),this.serializer=new Ve(this.options)}static{ye(this,"TestRenderer")}static nonTTY=!0;static rendererOptions={subtasks:!0,state:Object.values(we),output:!0,prompt:!0,title:!0,messages:["skip","error","retry","rollback","paused"],messagesToStderr:["error","rollback","retry"],task:["hasRolledBack","isRollingBack","isCompleted","isSkipped","hasFinalized","hasSubtasks","title","hasReset","hasTitle","isPrompt","isPaused","isPending","isSkipped","isStarted","hasFailed","isEnabled","isRetrying","path"]};static rendererTaskOptions;logger;serializer;render(){this.renderer(this.tasks)}end(){}renderer(e){e.forEach((e=>{this.options.subtasks&&e.on("SUBTASK",(e=>{this.renderer(e)})),this.options.state&&e.on("STATE",(t=>{this.logger.toStdout(this.serializer.serialize("STATE",t,e))})),this.options.output&&e.on("OUTPUT",(t=>{this.logger.toStdout(this.serializer.serialize("OUTPUT",t,e))})),this.options.prompt&&e.on("PROMPT",(t=>{this.logger.toStdout(this.serializer.serialize("PROMPT",t,e))})),this.options.title&&e.on("TITLE",(t=>{this.logger.toStdout(this.serializer.serialize("TITLE",t,e))})),e.on("MESSAGE",(t=>{const s=Object.fromEntries(Object.entries(t).map((([e,t])=>{if(this.options.messages.includes(e))return[e,t]})).filter(Boolean));if(Object.keys(s).length>0){const t=this.serializer.serialize("MESSAGE",s,e);this.options.messagesToStderr.some((e=>Object.keys(s).includes(e)))?this.logger.toStderr(t):this.logger.toStdout(t)}}))}))}},Je={default:qe,simple:We,verbose:class e{constructor(t,s){this.tasks=t,this.options=s,this.options={...e.rendererOptions,...this.options,icon:{...xe,...s?.icon??{}},color:{...Ne,...s?.color??{}}},this.logger=this.options.logger??new Pe({useIcons:!1,toStderr:Ie}),this.logger.options.icon=this.options.icon,this.logger.options.color=this.options.color,this.options.timestamp&&this.logger.options.fields.prefix.unshift(this.options.timestamp)}static{ye(this,"VerboseRenderer")}static nonTTY=!0;static rendererOptions={logTitleChange:!1,pausedTimer:{...Ke,format:()=>Oe.yellowBright}};static rendererTaskOptions;logger;cache={rendererOptions:new Map,rendererTaskOptions:new Map};render(){this.renderer(this.tasks)}end(){}renderer(e){e.forEach((e=>{this.calculate(e),e.once("CLOSED",(()=>{this.reset(e)}));const t=this.cache.rendererOptions.get(e.id),s=this.cache.rendererTaskOptions.get(e.id);e.on("SUBTASK",(e=>{this.renderer(e)})),e.on("STATE",(t=>{if(e.hasTitle())if("STARTED"===t)this.logger.log("STARTED",e.title);else if("COMPLETED"===t){const t=s.timer;this.logger.log("COMPLETED",e.title,t&&{suffix:{...t,condition:!!e.message?.duration&&t.condition,args:[e.message.duration]}})}})),e.on("OUTPUT",(e=>{this.logger.log("OUTPUT",e)})),e.on("PROMPT",(e=>{const t=ke(e);t&&this.logger.log("PROMPT",t)})),!1!==this.options?.logTitleChange&&e.on("TITLE",(e=>{this.logger.log("TITLE",e)})),e.on("MESSAGE",(s=>{if(s?.error)this.logger.log("FAILED",s.error);else if(s?.skip)this.logger.log("SKIPPED",s.skip);else if(s?.rollback)this.logger.log("ROLLBACK",s.rollback);else if(s?.retry)this.logger.log("RETRY",e.title,{suffix:s.retry.count.toString()});else if(s?.paused){const n=t?.pausedTimer;this.logger.log("PAUSED",e.title,n&&{suffix:{...n,condition:!!s?.paused&&n.condition,args:[s.paused-Date.now()]}})}}))}))}calculate(t){if(this.cache.rendererOptions.has(t.id)&&this.cache.rendererTaskOptions.has(t.id))return;const s={...this.options,...t.rendererOptions};this.cache.rendererOptions.set(t.id,s),this.cache.rendererTaskOptions.set(t.id,{...e.rendererTaskOptions,timer:s.timer,...t.rendererTaskOptions})}reset(e){this.cache.rendererOptions.delete(e.id),this.cache.rendererTaskOptions.delete(e.id)}},test:Qe,silent:Ye};function ze(e){return!0===process.stdout.isTTY||!0===e.nonTTY}function Xe(e){return"string"==typeof e?Je[e]??Je.default:"function"==typeof e?e:Je.default}function Ze(e){if(et(e?.silentRendererCondition))return{renderer:Xe("silent"),selection:"SILENT"};const t={renderer:Xe(e.renderer),options:e.rendererOptions,selection:"PRIMARY"};return!ze(t.renderer)||et(e?.fallbackRendererCondition)?{renderer:Xe(e.fallbackRenderer),options:e.fallbackRendererOptions,selection:"SECONDARY"}:t}function et(e,...t){return"function"==typeof e?e(...t):e}ye(ze,"isRendererSupported"),ye(Xe,"getRendererClass"),ye(Ze,"getRenderer"),ye(et,"assertFunctionOrSelf");var tt=de({circles:!0});function st(e){return tt(e)}ye(st,"cloneObject");var nt=class{static{ye(this,"Concurrency")}concurrency;count;queue;constructor(e){this.concurrency=e.concurrency,this.count=0,this.queue=new Set}add(e){return this.count<this.concurrency?this.run(e):new Promise((t=>{const s=ye((()=>t(this.run(e))),"callback");this.queue.add(s)}))}flush(){for(const e of this.queue){if(this.count>=this.concurrency)break;this.queue.delete(e),e()}}run(e){this.count++;const t=e(),s=ye((()=>{this.count--,this.flush()}),"cleanup");return t.then(s,(()=>{this.queue.clear()})),t}};function rt(e){return new Promise((t=>{setTimeout(t,e)}))}ye(rt,"delay");var it=class extends Error{constructor(e,t,s){super(e.message),this.error=e,this.type=t,this.task=s,this.name="ListrError",this.path=s.path,"full"===s?.options.collectErrors&&(this.task=st(s),this.ctx=st(s.listr.ctx)),this.stack=e?.stack}static{ye(this,"ListrError")}path;ctx},ot=class extends Error{static{ye(this,"ListrRendererError")}},at=class extends Error{static{ye(this,"PromptError")}},ct=class{constructor(e){this.task=e}static{ye(this,"TaskWrapper")}get title(){return this.task.title}set title(e){e=Array.isArray(e)?e:[e],this.task.title$=_e(e.shift(),...e)}get output(){return this.task.output}set output(e){e=Array.isArray(e)?e:[e],this.task.output$=_e(e.shift(),...e)}set promptOutput(e){this.task.promptOutput$=e}newListr(e,t){let s;return s="function"==typeof e?e(this):e,new ft(s,t,this.task)}report(e,t){!1!==this.task.options.collectErrors&&this.task.listr.errors.push(new it(e,t,this.task)),this.task.message$={error:e.message??this.task?.title}}skip(e,...t){this.task.state$="SKIPPED",e&&(this.task.message$={skip:e?_e(e,...t):this.task?.title})}isRetrying(){return this.task.isRetrying()?this.task.retry:{count:0}}prompt(e){return this.task.prompt?this.task.prompt:new e(this.task,this)}stdout(e){return Be((t=>{if("PROMPT"===e)this.promptOutput=t;else this.output=t}))}run(e){return this.task.run(e,this)}},lt=class extends Ee{static{ye(this,"ListrTaskEventManager")}},ut=class extends lt{constructor(e,t,s,n,r){if(super(),this.listr=e,this.task=t,this.options=s,this.rendererOptions=n,this.rendererTaskOptions=r,t.title){const e=Array.isArray(t?.title)?t.title:[t.title];this.title=_e(e.shift(),...e),this.initialTitle=this.title}this.taskFn=t.task,this.parent=e.parentTask}static{ye(this,"Task")}id=(0,ge.randomUUID)();state="WAITING";subtasks;title;initialTitle;output;retry;message={};prompt;parent;enabled;taskFn;closed;set state$(e){if(this.state=e,this.emit("STATE",e),this.hasSubtasks()&&this.hasFailed())for(const e of this.subtasks)"STARTED"===e.state&&(e.state$="FAILED");this.listr.events.emit("SHOUD_REFRESH_RENDER")}set output$(e){this.output=e,this.emit("OUTPUT",e),this.listr.events.emit("SHOUD_REFRESH_RENDER")}set promptOutput$(e){this.emit("PROMPT",e),ke(e)&&this.listr.events.emit("SHOUD_REFRESH_RENDER")}set message$(e){this.message={...this.message,...e},this.emit("MESSAGE",e),this.listr.events.emit("SHOUD_REFRESH_RENDER")}set title$(e){this.title=e,this.emit("TITLE",e),this.listr.events.emit("SHOUD_REFRESH_RENDER")}get path(){return[...this.listr.path,this.initialTitle]}async check(e){return"WAITING"===this.state&&(this.enabled=await et(this.task?.enabled??!0,e),this.emit("ENABLED",this.enabled),this.listr.events.emit("SHOUD_REFRESH_RENDER")),this.enabled}hasSubtasks(){return this.subtasks?.length>0}hasFinalized(){return this.isCompleted()||this.hasFailed()||this.isSkipped()||this.hasRolledBack()}isPending(){return this.isStarted()||this.isPrompt()||this.hasReset()}isStarted(){return"STARTED"===this.state}isSkipped(){return"SKIPPED"===this.state}isCompleted(){return"COMPLETED"===this.state}hasFailed(){return"FAILED"===this.state}isRollingBack(){return"ROLLING_BACK"===this.state}hasRolledBack(){return"ROLLED_BACK"===this.state}isRetrying(){return"RETRY"===this.state}hasReset(){return"RETRY"===this.state||"ROLLING_BACK"===this.state}isEnabled(){return this.enabled}hasTitle(){return"string"==typeof this?.title}isPrompt(){return"PROMPT"===this.state||"PROMPT_COMPLETED"===this.state}isPaused(){return"PAUSED"===this.state}isClosed(){return this.closed}async pause(e){const t=this.state;this.state$="PAUSED",this.message$={paused:Date.now()+e},await rt(e),this.state$=t,this.message$={paused:null}}async run(e,t){const s=ye((t=>(t instanceof ft?(t.options={...this.options,...t.options},t.rendererClass=Xe("silent"),this.subtasks=t.tasks,t.errors=this.listr.errors,this.emit("SUBTASK",this.subtasks),t=t.run(e)):t instanceof Promise?t=t.then(s):t instanceof pe.Readable?t=new Promise(((e,s)=>{t.on("data",(e=>{this.output$=e.toString()})),t.on("error",(e=>s(e))),t.on("end",(()=>e(null)))})):ve(t)&&(t=new Promise(((e,s)=>{t.subscribe({next:e=>{this.output$=e},error:s,complete:e})}))),t)),"handleResult"),n=Date.now();this.state$="STARTED";const r=await et(this.task?.skip??!1,e);if(r)return"string"==typeof r?this.message$={skip:r}:this.hasTitle()?this.message$={skip:this.title}:this.message$={skip:"Skipped task without a title."},void(this.state$="SKIPPED");try{const r="number"==typeof this.task?.retry&&this.task.retry>0?this.task.retry+1:"object"==typeof this.task?.retry&&this.task.retry.tries>0?this.task.retry.tries+1:1,i="object"==typeof this.task.retry&&this.task.retry.delay;for(let n=1;n<=r;n++)try{await s(this.taskFn(e,t));break}catch(e){if(n===r)throw e;this.retry={count:n,error:e},this.message$={retry:this.retry},this.title$=this.initialTitle,this.output=void 0,t.report(e,"WILL_RETRY"),this.state$="RETRY",i&&await this.pause(i)}(this.isStarted()||this.isRetrying())&&(this.message$={duration:Date.now()-n},this.state$="COMPLETED")}catch(s){if(this.prompt instanceof at&&(s=this.prompt),this.task?.rollback){t.report(s,"WILL_ROLLBACK");try{this.state$="ROLLING_BACK",await this.task.rollback(e,t),this.message$={rollback:this.title},this.state$="ROLLED_BACK"}catch(e){throw this.state$="FAILED",t.report(e,"HAS_FAILED_TO_ROLLBACK"),this.close(),e}if(!1!==this.listr.options?.exitAfterRollback)throw this.close(),s}else{if(this.state$="FAILED",!1!==this.listr.options.exitOnError&&!1!==await et(this.task?.exitOnError,e))throw t.report(s,"HAS_FAILED"),this.close(),s;this.hasSubtasks()||t.report(s,"HAS_FAILED_WITHOUT_ERROR")}}finally{this.close()}}close(){this.emit("CLOSED"),this.listr.events.emit("SHOUD_REFRESH_RENDER"),this.complete()}},ht=class extends Ee{static{ye(this,"ListrEventManager")}},ft=class{constructor(e,t,s){this.task=e,this.options=t,this.parentTask=s,this.options={concurrent:!1,renderer:"default",fallbackRenderer:"simple",exitOnError:!0,exitAfterRollback:!0,collectErrors:!1,registerSignalListeners:!0,...this.parentTask?.options??{},...t},!0===this.options.concurrent?this.options.concurrent=1/0:"number"!=typeof this.options.concurrent&&(this.options.concurrent=1),this.concurrency=new nt({concurrency:this.options.concurrent}),s&&(this.path=[...s.listr.path,s.title],this.errors=s.listr.errors),this.parentTask?.listr.events instanceof ht?this.events=this.parentTask.listr.events:this.events=new ht;const n=Ze({renderer:this.options.renderer,rendererOptions:this.options.rendererOptions,fallbackRenderer:this.options.fallbackRenderer,fallbackRendererOptions:this.options.fallbackRendererOptions,fallbackRendererCondition:this.options?.fallbackRendererCondition,silentRendererCondition:this.options?.silentRendererCondition});this.rendererClass=n.renderer,this.rendererClassOptions=n.options,this.rendererSelection=n.selection,this.add(e??[]),this.options.registerSignalListeners&&process.once("SIGINT",(()=>{this.tasks.forEach((async e=>{e.isPending()&&(e.state$="FAILED")})),this.renderer.end(new Error("Interrupted.")),process.exit(127)})).setMaxListeners(0),(this.options?.forceTTY||process.env.LISTR_FORCE_TTY)&&(process.stdout.isTTY=!0,process.stderr.isTTY=!0),this.options?.forceUnicode&&(process.env.LISTR_FORCE_UNICODE="1")}static{ye(this,"Listr")}tasks=[];errors=[];ctx;events;path=[];rendererClass;rendererClassOptions;rendererSelection;concurrency;renderer;add(e){this.tasks.push(...this.generate(e))}async run(e){this.renderer||(this.renderer=new this.rendererClass(this.tasks,this.rendererClassOptions,this.events)),await this.renderer.render(),this.ctx=this.options?.ctx??e??{},await Promise.all(this.tasks.map((e=>e.check(this.ctx))));try{await Promise.all(this.tasks.map((e=>this.concurrency.add((()=>this.runTask(e)))))),this.renderer.end()}catch(e){if(!1!==this.options.exitOnError)throw this.renderer.end(e),e}return this.ctx}generate(e){return(e=Array.isArray(e)?e:[e]).map((e=>{let t;return"PRIMARY"===this.rendererSelection?t=e.rendererOptions:"SECONDARY"===this.rendererSelection&&(t=e.fallbackRendererOptions),new ut(this,e,this.options,this.rendererClassOptions,t)}))}async runTask(e){if(await e.check(this.ctx))return new ct(e).run(this.ctx)}};const pt=i.Ay.blue(Le.arrowRight),dt=i.Ay.redBright(Le.cross),gt=i.Ay.yellow(Le.warning),mt=(e,t,s)=>`${i.Ay.redBright(`${dt} Validation Error:`)}\n\n Invalid value for '${i.Ay.bold(e)}': ${i.Ay.bold((0,r.inspect)(s))}\n\n ${t}`,yt=i.Ay.redBright(`${dt} Current directory is not a git directory!`),bt=i.Ay.redBright(`${dt} Failed to get staged files!`),wt=`${dt} No valid configuration found.`,Et=`${pt} No staged files found.`,vt=`${pt} No staged files match any configured task.`,St=i.Ay.yellow(`${gt} Some of your tasks use \`git add\` command. Please remove it from the config since all modifications made by tasks will be automatically added to the git commit index.\n`),At="Skipped because of errors from tasks.",kt=`\n ${i.Ay.redBright(`${dt} lint-staged failed due to a git error.`)}`,Ot=(e,t,s)=>`${i.Ay.redBright(`${dt} Validation Error:`)}\n\n Invalid value for option '${i.Ay.bold(e)}': ${i.Ay.bold(t)}\n\n ${s}\n\nSee https://github.com/okonet/lint-staged#command-line-flags`,Ct=`\n ${i.Ay.yellow(`${gt} lint-staged prevented an empty git commit.\n Use the --allow-empty option to continue, or check your task configuration`)}\n`,Tt=(i.Ay.redBright(`${dt} Failed to read config from stdin.`),(e={},t)=>{if(!Array.isArray(e.output))return;const s=e.errors?.size>0?t.error:t.log;for(const t of e.output)s(t)});var Rt=s(6760);const Lt=e=>{if(e===Rt.posix.sep||e===Rt.win32.sep)return Rt.posix.sep;let t=e.split(/[/\\]+/).join(Rt.posix.sep);return(e.startsWith("\\\\?\\")||e.startsWith("\\\\.\\"))&&(t=t.replace(/^\/(\.|\?)/,"//$1")),t.endsWith(Rt.posix.sep)&&(t=t.slice(0,-1)),t},_t=n("lint-staged:chunkFiles"),xt=({files:e,baseDir:t,maxArgLength:s=null,relative:n=!1})=>{const r=e.map((e=>Lt(n||!t?e:Rt.resolve(t,e))));if(!s)return _t("Skip chunking files because of undefined maxArgLength"),[r];const i=r.join(" ").length;_t(`Resolved an argument string length of ${i} characters from ${r.length} files`);const o=Math.min(Math.ceil(i/s),r.length);return _t(`Creating ${o} chunks for maxArgLength of ${s}`),((e,t)=>{if(1===t)return[e];const s=[];let n=0;for(let r=0;r<t;r++){const i=Math.ceil((e.length-n)/(t-r));s.push([]),s[r]=e.slice(n,i+n),n+=i}return s})(r,o)};var Nt=s(8378);const It=n("lint-staged:execGit"),Pt=["-c","submodule.recurse=false"],$t=async(e,t={})=>{It("Running git command",e);try{const{stdout:s}=await(0,Nt.Ho)("git",Pt.concat(e),{...t,all:!0,cwd:t.cwd||process.cwd(),stdin:"ignore"});return s}catch({all:e}){throw new Error(e)}};var Mt=s(447);const Dt=n("lint-staged:generateTasks"),Bt=({config:e,cwd:t=process.cwd(),files:s,relative:n=!1})=>{Dt("Generating linter tasks");const r=s.map((e=>Lt(Rt.relative(t,e))));return Object.entries(e).map((([e,s])=>{const i=e.startsWith("../"),o=r.filter((e=>!!i||!e.startsWith("..")&&!Rt.isAbsolute(e))),a=Mt(o,e,{cwd:t,dot:!0,matchBase:!e.includes("/"),posixSlashes:!0,strictBrackets:!0}),c={pattern:e,commands:s,fileList:a.map((e=>Lt(n?e:Rt.resolve(t,e))))};return Dt("Generated task: \n%O",c),c}))};var Ft=s(8161),Ht=s(7075);const jt=new RegExp(Ft.EOL+"$"),Ut=e=>new Ht.Writable({write:function(t,s,n){e(t.toString().replace(jt,"")),n()}}),Kt=({renderer:e},{FORCE_COLOR:t})=>"silent"===e||"test"===e||Number(t)>0?e:"verbose",Gt=(e,t,s=process.env)=>{const n=(({debug:e,quiet:t},s,n)=>t?{renderer:"silent"}:"test"===n.NODE_ENV?{renderer:"test",rendererOptions:{logger:new Pe({processOutput:new De(Ut(s.log),Ut(s.error))})}}:e||"dumb"===n.TERM?{renderer:"verbose"}:{renderer:"update",rendererOptions:{formatOutput:"truncate"}})(e,t,s);return{...n,fallbackRenderer:Kt(n,s)}};function qt(e,t){return["diff","--name-only","-z",`--diff-filter=${void 0!==t?t.trim():"ACMR"}`,...void 0!==e?e.trim().split(" "):["--staged"]]}const Yt=e=>e?e.replace(/\u0000$/,"").split("\0"):[];var Wt=s(1455);const Vt=n("lint-staged:file"),Qt=async(e,t=!0)=>{Vt("Reading file `%s`",e);try{return await Wt.readFile(e)}catch(s){if(t&&"ENOENT"===s.code)return Vt("File `%s` doesn't exist, ignoring...",e),null;throw s}},Jt=async(e,t=!0)=>{Vt("Removing file `%s`",e);try{await Wt.unlink(e)}catch(s){if(!t||"ENOENT"!==s.code)throw s;Vt("File `%s` doesn't exist, ignoring...",e)}},zt=async(e,t)=>{Vt("Writing file `%s`",e),await Wt.writeFile(e,t)},Xt=Symbol("ApplyEmptyCommitError"),Zt=new Error("Configuration could not be found"),es=new Error("Configuration should be an object or a function"),ts=new Error("Configuration should not be empty"),ss=Symbol("GetBackupStashError"),ns=Symbol("GetStagedFilesError"),rs=Symbol("GitError"),is=Symbol("GitRepoError"),os=Symbol("HideUnstagedChangesError"),as=new Error("Invalid Options"),cs=Symbol("RestoreMergeStatusError"),ls=Symbol("RestoreOriginalStateError"),us=Symbol("RestoreUnstagedChangesError"),hs=Symbol("TaskError"),fs=n("lint-staged:GitWorkflow"),ps=/\x00/,ds=(e,t=!0)=>e.reduce(((e,s)=>{if(ps.test(s)){const[n,r]=s.split(ps);t&&e.push(r),e.push(n)}else e.push(s);return e}),[]),gs="lint-staged automatic backup",ms="lint-staged_unstaged.patch",ys=["--binary","--unified=0","--no-color","--no-ext-diff","--src-prefix=a/","--dst-prefix=b/","--patch","--submodule=short"],bs=["-v","--whitespace=nowarn","--recount","--unidiff-zero"],ws=(e,t,s)=>{throw t.errors.add(rs),s&&t.errors.add(s),e};class Es{constructor({allowEmpty:e,gitConfigDir:t,gitDir:s,matchedFileChunks:n,diff:r,diffFilter:i}){this.execGit=(e,t={})=>$t(e,{...t,cwd:s}),this.deletedFiles=[],this.gitConfigDir=t,this.gitDir=s,this.diff=r,this.diffFilter=i,this.allowEmpty=e,this.matchedFileChunks=n,this.mergeHeadFilename=Rt.resolve(t,"MERGE_HEAD"),this.mergeModeFilename=Rt.resolve(t,"MERGE_MODE"),this.mergeMsgFilename=Rt.resolve(t,"MERGE_MSG")}getHiddenFilepath(e){return Rt.resolve(this.gitConfigDir,`./${e}`)}async getBackupStash(e){const t=(await this.execGit(["stash","list"])).split("\n").findIndex((e=>e.includes(gs)));if(-1===t)throw e.errors.add(ss),new Error("lint-staged automatic backup is missing!");return String(t)}async getDeletedFiles(){fs("Getting deleted files...");const e=(await this.execGit(["ls-files","--deleted"])).split("\n").filter(Boolean).map((e=>Rt.resolve(this.gitDir,e)));return fs("Found deleted files:",e),e}async backupMergeStatus(){fs("Backing up merge state..."),await Promise.all([Qt(this.mergeHeadFilename).then((e=>this.mergeHeadBuffer=e)),Qt(this.mergeModeFilename).then((e=>this.mergeModeBuffer=e)),Qt(this.mergeMsgFilename).then((e=>this.mergeMsgBuffer=e))]),fs("Done backing up merge state!")}async restoreMergeStatus(e){fs("Restoring merge state...");try{await Promise.all([this.mergeHeadBuffer&&zt(this.mergeHeadFilename,this.mergeHeadBuffer),this.mergeModeBuffer&&zt(this.mergeModeFilename,this.mergeModeBuffer),this.mergeMsgBuffer&&zt(this.mergeMsgFilename,this.mergeMsgBuffer)]),fs("Done restoring merge state!")}catch(t){fs("Failed restoring merge state with error:"),fs(t),ws(new Error("Merge state could not be restored due to an error!"),e,cs)}}async getPartiallyStagedFiles(){fs("Getting partially staged files...");const e=(await this.execGit(["status","-z"])).split(/\x00(?=[ AMDRCU?!]{2} |$)/).filter((e=>{const[t,s]=e;return" "!==t&&" "!==s&&"?"!==t&&"?"!==s})).map((e=>e.substr(3))).filter(Boolean);return fs("Found partially staged files:",e),e.length?e:null}async prepare(e){try{if(fs("Backing up original state..."),this.partiallyStagedFiles=await this.getPartiallyStagedFiles(),this.partiallyStagedFiles){e.hasPartiallyStagedFiles=!0;const t=this.getHiddenFilepath(ms),s=ds(this.partiallyStagedFiles);await this.execGit(["diff",...ys,"--output",t,"--",...s])}else e.hasPartiallyStagedFiles=!1;if(!e.shouldBackup)return;await this.backupMergeStatus(),this.deletedFiles=await this.getDeletedFiles();const t=await this.execGit(["stash","create"]);await this.execGit(["stash","store","--quiet","--message",gs,t]),fs("Done backing up original state!")}catch(t){ws(t,e)}}async hideUnstagedChanges(e){try{const e=ds(this.partiallyStagedFiles,!1);await this.execGit(["checkout","--force","--",...e])}catch(t){ws(t,e,os)}}async applyModifications(e){fs("Adding task modifications to index...");for(const e of this.matchedFileChunks)await this.execGit(["add","--",...e]);fs("Done adding task modifications to index!");await this.execGit(qt(this.diff,this.diffFilter))||this.allowEmpty||ws(new Error("Prevented an empty git commit!"),e,Xt)}async restoreUnstagedChanges(e){fs("Restoring unstaged changes...");const t=this.getHiddenFilepath(ms);try{await this.execGit(["apply",...bs,t])}catch(s){fs("Error while restoring changes:"),fs(s),fs("Retrying with 3-way merge");try{await this.execGit(["apply",...bs,"--3way",t])}catch(t){fs("Error while restoring unstaged changes using 3-way merge:"),fs(t),ws(new Error("Unstaged changes could not be restored due to a merge conflict!"),e,us)}}}async restoreOriginalState(e){try{fs("Restoring original state..."),await this.execGit(["reset","--hard","HEAD"]),await this.execGit(["stash","apply","--quiet","--index",await this.getBackupStash(e)]),await this.restoreMergeStatus(e),await Promise.all(this.deletedFiles.map((e=>Jt(e)))),await Jt(this.getHiddenFilepath(ms)),fs("Done restoring original state!")}catch(t){ws(t,e,ls)}}async cleanup(e){try{fs("Dropping backup stash..."),await this.execGit(["stash","drop","--quiet",await this.getBackupStash(e)]),fs("Done dropping backup stash!")}catch(t){ws(t,e)}}}const vs=n("lint-staged:groupFilesByConfig");function Ss(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var s=0;s<e.length;s++){var n=e[s];if("string"==typeof n)return n}}var As=s(9575),ks=s(4434);const Os=({quiet:e=!1}={})=>({hasPartiallyStagedFiles:null,shouldBackup:null,shouldHidePartiallyStaged:!0,errors:new Set([]),events:new ks,output:[],quiet:e}),Cs=e=>e.hasPartiallyStagedFiles&&e.shouldHidePartiallyStaged,Ts=e=>!!e.shouldBackup&&(e.errors.has(rs)?kt:e.errors.has(hs)?At:void 0),Rs=e=>e.errors.has(rs)?kt:e.errors.has(hs)?At:void 0,Ls=e=>e.shouldBackup&&(e.errors.has(hs)||e.errors.has(Xt)||e.errors.has(us)),_s=e=>{if(e.errors.has(rs)&&!e.errors.has(Xt)&&!e.errors.has(us))return kt},xs=e=>e.shouldBackup,Ns=e=>!e.errors.has(rs)||e.errors.has(Xt)||e.errors.has(us)?e.errors.has(ls)?kt:void 0:kt,Is="lint-staged:taskError",Ps=n("lint-staged:resolveTaskFn"),$s=({code:e,killed:t,signal:s})=>(t?"KILLED":s)||e||"FAILED",Ms=(e,t,s,n=!1)=>{const{stderr:r,stdout:o}=t;if(!!r||!!o){const t=n?i.Ay.redBright(`${dt} ${e}:`):`${pt} ${e}:`,a=[].concat(s.quiet?[]:["",t]).concat(r||[]).concat(o||[]);s.output.push(a.join("\n"))}else if(n){const n=$s(t),r=i.Ay.redBright(`\n${dt} ${e} failed without output (${n}).`);s.quiet||s.output.push(r)}},Ds=(e,t)=>{let s;const n=async()=>{s=(async e=>{try{const t=await As(e.pid);for(const e of t)try{process.kill(e)}catch(t){Ps('Failed to kill process with pid "%d": %o',e,t)}}catch(t){Ps('Failed to kill process with pid "%d": %o',e.pid,t)}e.kill()})(t),await s};return e.events.on(Is,n,{once:!0}),async()=>{e.events.off(Is,n),await s}},Bs=({command:e,cwd:t=process.cwd(),files:s,gitDir:n,isFn:r,shell:o=!1,verbose:a=!1})=>{const[c,...l]=function(e,t,s){var n,r=/([^\s'"]([^\s'"]*(['"])([^\3]*?)\3)+[^\s'"]*)|[^\s'"]+|(['"])([^\5]*?)\5/gi,i=e,o=[];t&&o.push(t),s&&o.push(s);do{null!==(n=r.exec(i))&&o.push(Ss(n[1],n[6],n[0]))}while(null!==n);return o}(e);Ps("cmd:",c),Ps("args:",l);const u={cwd:/^git(\.exe)?/i.test(c)?n:t,preferLocal:!0,reject:!1,shell:o,stdin:"ignore"};return Ps("execaOptions:",u),async(t=Os())=>{const n=o?(0,Nt.MP)(r?e:`${e} ${s.join(" ")}`,u):(0,Nt.Ho)(c,r?l:l.concat(s),u),h=Ds(t,n),f=await n;if(await h(),f.failed||f.killed||null!=f.signal)throw((e,t,s)=>{s.errors.add(hs),s.events.emit(Is,hs),Ms(e,t,s,!0);const n=$s(t);return new Error(`${i.Ay.redBright(e)} ${i.Ay.dim(`[${n}]`)}`)})(e,f,t);a&&Ms(e,f,t)}},Fs=n("lint-staged:makeCmdTasks"),Hs=async({commands:e,cwd:t,files:s,gitDir:n,shell:r,verbose:i})=>{Fs("Creating listr tasks for commands %o",e);const o=Array.isArray(e)?e:[e],a=[];for(const e of o){const o="function"==typeof e,c=o?await e([...s]):e,l=Array.isArray(c)?c:[c];for(const e of l){if(o&&"string"!=typeof e)throw new Error(mt("[Function]","Function task should return a string or an array of strings",c));const l=Bs({command:e,cwd:t,files:s,gitDir:n,isFn:o,shell:r,verbose:i});a.push({title:e,command:e,task:l})}}return a},js=n("lint-staged:resolveGitRepo"),Us=async(e=process.cwd())=>{try{js("Resolving git repo from `%s`",e),js("Unset GIT_DIR (was `%s`)",process.env.GIT_DIR),delete process.env.GIT_DIR,js("Unset GIT_WORK_TREE (was `%s`)",process.env.GIT_WORK_TREE),delete process.env.GIT_WORK_TREE;const t=Lt(await $t(["rev-parse","--show-prefix"],{cwd:e})),s=Lt(((e,t)=>(t&&t.endsWith(Rt.sep)&&(t=t.slice(0,-1)),t?e.substring(0,e.lastIndexOf(t)):e))(Lt(e),t)),n=Lt(await(async e=>{const t=Rt.join(e,".git"),s=await Wt.lstat(t);if(s.isDirectory())return t;if(s.isSymbolicLink())return await Wt.realpath(e);const n=(await Qt(t)).toString();return Rt.resolve(e,n.replace(/^gitdir: /,"")).trim()})(s));return js("Resolved git directory to be `%s`",s),js("Resolved git config directory to be `%s`",n),{gitDir:s,gitConfigDir:n}}catch(e){return js("Failed to resolve git repo with error:",e),{error:e,gitDir:null,gitConfigDir:null}}};var Ks=s(3519),Gs=s(3136);const qs=e=>s(6258)((0,Gs.pathToFileURL)(e)).then((e=>e.default));const Ys=(0,s(8995).createRequire)(import.meta.url);const Ws="lint-staged",Vs="package.json",Qs=["package.yaml","package.yml"],Js=[Vs,...Qs,".lintstagedrc",".lintstagedrc.json",".lintstagedrc.yaml",".lintstagedrc.yml",".lintstagedrc.mjs",".lintstagedrc.js",".lintstagedrc.cjs","lint-staged.config.mjs","lint-staged.config.js","lint-staged.config.cjs"],zs=n("lint-staged:loadConfig"),Xs=(e,t)=>{const s=Qs.includes(Rt.basename(e));try{const e=Ks.parse(t);return s?e[Ws]:e}catch(n){if(s)return void zs("Ignoring invalid package file `%s` with content:\n%s",e,t);throw n}},Zs="noExt",en={".js":qs,".json":(e,t)=>{const s=Vs.includes(Rt.basename(e));try{const e=JSON.parse(t);return s?e[Ws]:e}catch(s){if(Rt.basename(e)===Vs)return void zs("Ignoring invalid package file `%s` with content:\n%s",e,t);throw s}},".mjs":qs,".cjs":qs,".yaml":Xs,".yml":Xs,[Zs]:Xs},tn=async e=>{e=Rt.resolve(e);const t=Rt.extname(e)||Zs,s=en[t],n=s.length>1?await(async e=>{const t=Rt.resolve(e),s=await Wt.readFile(t);return await s.toString()})(e):void 0;return{config:await s(e,n),filepath:e}},sn=async({configPath:e,cwd:t},n)=>{try{let n;if(e)zs("Loading configuration from `%s`...",e),n=await tn(function(e){try{return Ys.resolve(e)}catch{return e}}(e));else{zs("Searching for configuration from `%s`...",t);const{lilconfig:e}=await Promise.resolve().then(s.t.bind(s,294,19)),r=e(Ws,{searchPlaces:Js,loaders:en});n=await r.search(t)}if(!n)return{};const r=await n.config??null,i=n.filepath;return zs("Successfully loaded config from `%s`:\n%O",i,r),{config:r,filepath:i}}catch(e){return zs("Failed to load configuration!"),n.error(e),{}}},nn=/(?<![\\$])({)(?:(?!(?<!\\),|\.\.|\{|\}).)*?(?<!\\)(})/g,rn=/{{[^}{]*}}/,on=(e,t)=>{const s=(e=>{let t=`${e}`;const s=rn.exec(e)?.[0];if(s){const e=s.replace("{{","{").replace("}}","}");t=t.replace(s,e)}return t})((e=>{let t=`${e}`,s=null;for(;s=nn.exec(e);){const e=s[0],n=e.replace(/{/,"").replace(/}/,"");t=t.replace(e,n)}return t})(e));var n,r;return s!==e&&t.warn((n=e,r=s,i.Ay.yellow(`${gt} Detected incorrect braces with only single value: \`${n}\`. Reformatted as: \`${r}\`\n`))),s},an=n("lint-staged:validateConfig"),cn=e=>e&&"object"==typeof e&&!Array.isArray(e),ln=new Map([["concurrent",e=>"boolean"==typeof e],["chunkSize",e=>"number"==typeof e],["globOptions",cn],["linters",cn],["ignore",e=>Array.isArray(e)],["subTaskConcurrency",e=>"number"==typeof e],["renderer",e=>"string"==typeof e],["relative",e=>"boolean"==typeof e]]),un=(e,t,s)=>{if(an("Validating config from `%s`...",t),!e||"object"!=typeof e&&"function"!=typeof e)throw es;if("function"==typeof e)return{"*":e};if(0===Object.entries(e).length)throw ts;const n=[],i=Object.entries(e).reduce(((e,[t,r])=>{if(ln.has(t)){return ln.get(t)(r)&&n.push(mt(t,"Advanced configuration has been deprecated.",r)),e}Array.isArray(r)&&!r.some((e=>"string"!=typeof e&&"function"!=typeof e))||"string"==typeof r||"function"==typeof r||n.push(mt(t,"Should be a string, a function, or an array of strings and functions.",r));const i=on(t,s);return{...e,[i]:r}}),{});if(n.length){const e=n.join("\n\n");throw s.error(`Could not parse lint-staged config.\n\n${e}\n\nSee https://github.com/okonet/lint-staged#configuration.`),new Error(e)}return an("Validated config from `%s`:",t),an((0,r.inspect)(e,{compact:!1})),i},hn=n("lint-staged:searchConfigs"),fn=["ls-files","-z","--full-name","-t"],pn=e=>Js.includes(Rt.basename(e)),dn=e=>e.split("/").length,gn=(e,t)=>dn(e)>dn(t)?-1:1,mn=async({configObject:e,configPath:t,cwd:s=process.cwd(),gitDir:n=s},r)=>{if(hn("Searching for configuration files..."),e)return hn("Using single direct configuration object..."),{"":un(e,"config object",r)};if(t){hn("Using single configuration path...");const{config:e,filepath:s}=await sn({configPath:t},r);return e?{[t]:un(e,s,r)}:{}}const[i,o]=await Promise.all([$t(fn,{cwd:n}).then(Yt),$t([...fn,"--others","--exclude-standard"],{cwd:n}).then(Yt)]),a=[...i,...o].flatMap((e=>e.startsWith("S ")?[]:[e.replace(/^[HSMRCK?U] /,"")])).filter(pn).map((e=>Lt(Rt.join(n,e)))).filter((c=s,e=>e.startsWith(Lt(c)))).sort(gn);var c;hn("Found possible config files:",a);const l=a.reduce(((e,t)=>Object.assign(e,{[t]:null})),{});await Promise.all(Object.keys(l).map((e=>sn({configPath:e},r).then((({config:t,filepath:s})=>{t&&(e!==s&&hn('Config file "%s" resolved to "%s"',e,s),l[e]=un(t,s,r))})))));const u=Object.entries(l).filter((([,e])=>!!e)).reduce(((e,[t,s])=>({...e,[t]:s})),{});if(!Object.keys(u).length){hn('Could not find config files inside "%s"',s);const{config:e,filepath:t}=await sn({cwd:s},r);e?(hn('Found parent configuration file from "%s"',t),u[t]=un(e,t,r)):hn('Could not find parent configuration files from "%s"',s)}return hn("Found %d config files",Object.keys(u).length),u},yn=n("lint-staged:runAll"),bn=e=>Object.assign(new Error("lint-staged failed"),{ctx:e}),wn=async({allowEmpty:e=!1,concurrent:t=!0,configObject:s,configPath:n,cwd:r,debug:o=!1,diff:a,diffFilter:c,maxArgLength:l,quiet:u=!1,relative:h=!1,shell:f=!1,stash:p=void 0===a,hidePartiallyStaged:d=p,verbose:g=!1},m=console)=>{yn("Running all linter scripts...");const y=!!r;r=y?Rt.resolve(r):process.cwd(),yn("Using working directory `%s`",r);const b=Os({quiet:u}),{gitDir:w,gitConfigDir:E}=await Us(r);if(!w)throw u||b.output.push(yt),b.errors.add(is),bn(b);const v=await $t(["log","-1"],{cwd:w}).then((()=>!0)).catch((()=>!1));b.shouldBackup=v&&p,b.shouldBackup||u||m.warn(((e,t)=>{const s=void 0!==t?"`--diff` was used":e?"`--no-stash` was used":"there\u2019s no initial commit yet";return i.Ay.yellow(`${gt} Skipping backup because ${s}.\n`)})(v,a)),b.shouldHidePartiallyStaged=d,b.shouldHidePartiallyStaged||u||m.warn(((e,t)=>{const s=void 0!==t?"`--diff` was used":e?"`--no-hide-partially-staged` was used":"`--no-stash` was used";return i.Ay.yellow(`${gt} Skipping hiding unstaged changes from partially staged files because ${s}.\n`)})(v&&p,a));const S=await(async({cwd:e=process.cwd(),diff:t,diffFilter:s}={})=>{try{const n=await $t(qt(t,s),{cwd:e});return n?Yt(n).map((t=>Lt(Rt.resolve(e,t)))):[]}catch{return null}})({cwd:w,diff:a,diffFilter:c});if(!S)throw u||b.output.push(bt),b.errors.add(ns),bn(b);if(yn("Loaded list of staged files in git:\n%O",S),0===S.length)return u||b.output.push(Et),b;const A=await mn({configObject:s,configPath:n,cwd:r,gitDir:w},m),k=Object.keys(A).length;if(0===k)throw b.errors.add(Zt),bn(b);const O=await(async({configs:e,files:t,singleConfigMode:s})=>{vs("Grouping %d files by %d configurations",t.length,Object.keys(e).length);const n=new Set(t),r={};for(const[i,o]of Object.entries(e)){if(s){r[i]={config:o,files:t};break}const e=Rt.normalize(Rt.dirname(i)),a=t=>{const s=Rt.relative(e,t);return s&&!s.startsWith("..")&&!Rt.isAbsolute(s)},c=Object.keys(o).some((e=>e.startsWith(".."))),l=new Set(c?n:void 0);c||n.forEach((e=>{a(e)&&l.add(e)})),l.forEach((e=>{n.delete(e)})),r[i]={config:o,files:Array.from(l)}}return r})({configs:A,files:S,singleConfigMode:s||void 0!==n}),C=k>1;let T=!1;const R={ctx:b,exitOnError:!1,registerSignalListeners:!1,...Gt({debug:o,quiet:u},m)},L=[],_=new Set;for(const[e,{config:s,files:n}]of Object.entries(O)){const o=e?Lt(Rt.relative(r,e)):"Config object",a=xt({baseDir:w,files:n,maxArgLength:l,relative:h}),c=C&&!y?Rt.dirname(e):r,u=a.length;u>1&&yn("Chunked staged files from `%s` into %d part",e,u);for(const[e,n]of a.entries()){const r=await Promise.all(Bt({config:s,cwd:c,files:n,relative:h}).map((e=>Hs({commands:e.commands,cwd:c,files:e.fileList,gitDir:w,shell:f,verbose:g}).then((t=>{e.fileList.forEach((e=>{const t=Rt.isAbsolute(e)?e:Lt(Rt.join(c,e));_.add(t)})),T=T||t.some((e=>"git add"===e.command));const s=e.fileList.length;return{title:`${e.pattern}${i.Ay.dim(` \u2014 ${s} ${1===s?"file":"files"}`)}`,task:async(e,s)=>s.newListr(t,{concurrent:!1,exitOnError:!0}),skip:()=>0===s&&`${e.pattern}${i.Ay.dim(" \u2014 no files")}`}})))));L.push({title:`${o}${i.Ay.dim(` \u2014 ${n.length} ${n.length>1?"files":"file"}`)}`+(u>1?i.Ay.dim(` (chunk ${e+1}/${u})...`):""),task:(e,s)=>s.newListr(r,{concurrent:t,exitOnError:!0}),skip:()=>b.errors.has(rs)?"Skipped because of previous git error.":!!r.every((e=>e.skip()))&&`${o}${i.Ay.dim(" \u2014 no tasks to run")}`})}}if(T&&!u&&m.warn(St),L.every((e=>e.skip())))return u||b.output.push(vt),b;const x=xt({baseDir:r,files:Array.from(_),maxArgLength:l,relative:!1}),N=new Es({allowEmpty:e,gitConfigDir:E,gitDir:w,matchedFileChunks:x,diff:a,diffFilter:c}),I=new ft([{title:"Preparing lint-staged...",task:e=>N.prepare(e)},{title:"Hiding unstaged changes to partially staged files...",task:e=>N.hideUnstagedChanges(e),enabled:Cs},{title:`Running tasks for ${a?"changed":"staged"} files...`,task:(e,s)=>s.newListr(L,{concurrent:t}),skip:()=>L.every((e=>e.skip()))},{title:"Applying modifications from tasks...",task:e=>N.applyModifications(e),skip:Ts},{title:"Restoring unstaged changes to partially staged files...",task:e=>N.restoreUnstagedChanges(e),enabled:Cs,skip:Rs},{title:"Reverting to original state because of errors...",task:e=>N.restoreOriginalState(e),enabled:Ls,skip:_s},{title:"Cleaning up temporary files...",task:e=>N.cleanup(e),enabled:xs,skip:Ns}],R);if(await I.run(),b.errors.size>0)throw bn(b);return b};var En=s(3024);const vn=n("lint-staged:validateOptions"),Sn=n("lint-staged"),An=()=>{switch(process.platform){case"darwin":return 262144;case"win32":return 8191;default:return 131072}},kn=async({allowEmpty:e=!1,concurrent:t=!0,config:s,configPath:n,cwd:r,debug:i=!1,diff:o,diffFilter:a,maxArgLength:c=An()/2,quiet:l=!1,relative:u=!1,shell:h=!1,stash:f=void 0===o,hidePartiallyStaged:p=f,verbose:d=!1}={},g=console)=>{await(async(e={},t)=>{if(vn("Validating options..."),"string"==typeof e.cwd)try{const t=Rt.resolve(e.cwd);await Wt.access(t,En.constants.F_OK)}catch(s){throw t.error(Ot("cwd",e.cwd,s.message)),as}if("string"==typeof e.shell)try{await Wt.access(e.shell,En.constants.X_OK)}catch(s){throw t.error(Ot("shell",e.shell,s.message)),as}vn("Validated options!")})({cwd:r,shell:h},g),Sn("Unset GIT_LITERAL_PATHSPECS (was `%s`)",process.env.GIT_LITERAL_PATHSPECS),delete process.env.GIT_LITERAL_PATHSPECS;const m={allowEmpty:e,concurrent:t,configObject:s,configPath:n,cwd:r,debug:i,diff:o,diffFilter:a,maxArgLength:c,quiet:l,relative:u,shell:h,stash:f,hidePartiallyStaged:p,verbose:d};try{const e=await wn(m,g);return Sn("Tasks were executed successfully!"),Tt(e,g),!0}catch(e){if(e?.ctx?.errors){const{ctx:t}=e;return t.errors.has(Zt)?g.error(wt):t.errors.has(Xt)?g.warn(Ct):t.errors.has(rs)&&!t.errors.has(ss)&&(g.error(kt),t.shouldBackup&&g.error(" Any lost modifications can be restored from a git stash:\n\n > git stash list\n stash@{0}: automatic lint-staged backup\n > git stash apply --index stash@{0}\n")),Tt(t,g),!1}throw e}}}};