create-expo-nightly 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +1 -1
- package/package.json +5 -4
package/build/index.js
CHANGED
|
@@ -50,4 +50,4 @@ e.exports=runParallel;const r=n(9795);function runParallel(e,t){let n,s,i;let o=
|
|
|
50
50
|
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
51
51
|
* Released under the MIT License.
|
|
52
52
|
*/
|
|
53
|
-
const r=n(5680);const toRegexRange=(e,t,n)=>{if(r(e)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(t===void 0||e===t){return String(e)}if(r(t)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let s={relaxZeros:true,...n};if(typeof s.strictZeros==="boolean"){s.relaxZeros=s.strictZeros===false}let i=String(s.relaxZeros);let o=String(s.shorthand);let a=String(s.capture);let u=String(s.wrap);let c=e+":"+t+"="+i+o+a+u;if(toRegexRange.cache.hasOwnProperty(c)){return toRegexRange.cache[c].result}let l=Math.min(e,t);let f=Math.max(e,t);if(Math.abs(l-f)===1){let n=e+"|"+t;if(s.capture){return`(${n})`}if(s.wrap===false){return n}return`(?:${n})`}let h=hasPadding(e)||hasPadding(t);let p={min:e,max:t,a:l,b:f};let d=[];let g=[];if(h){p.isPadded=h;p.maxLen=String(p.max).length}if(l<0){let e=f<0?Math.abs(f):1;g=splitToPatterns(e,Math.abs(l),p,s);l=p.a=0}if(f>=0){d=splitToPatterns(l,f,p,s)}p.negatives=g;p.positives=d;p.result=collatePatterns(g,d,s);if(s.capture===true){p.result=`(${p.result})`}else if(s.wrap!==false&&d.length+g.length>1){p.result=`(?:${p.result})`}toRegexRange.cache[c]=p;return p.result};function collatePatterns(e,t,n){let r=filterPatterns(e,t,"-",false,n)||[];let s=filterPatterns(t,e,"",false,n)||[];let i=filterPatterns(e,t,"-?",true,n)||[];let o=r.concat(i).concat(s);return o.join("|")}function splitToRanges(e,t){let n=1;let r=1;let s=countNines(e,n);let i=new Set([t]);while(e<=s&&s<=t){i.add(s);n+=1;s=countNines(e,n)}s=countZeros(t+1,r)-1;while(e<s&&s<=t){i.add(s);r+=1;s=countZeros(t+1,r)-1}i=[...i];i.sort(compare);return i}function rangeToPattern(e,t,n){if(e===t){return{pattern:e,count:[],digits:0}}let r=zip(e,t);let s=r.length;let i="";let o=0;for(let e=0;e<s;e++){let[t,s]=r[e];if(t===s){i+=t}else if(t!=="0"||s!=="9"){i+=toCharacterClass(t,s,n)}else{o++}}if(o){i+=n.shorthand===true?"\\d":"[0-9]"}return{pattern:i,count:[o],digits:s}}function splitToPatterns(e,t,n,r){let s=splitToRanges(e,t);let i=[];let o=e;let a;for(let e=0;e<s.length;e++){let t=s[e];let u=rangeToPattern(String(o),String(t),r);let c="";if(!n.isPadded&&a&&a.pattern===u.pattern){if(a.count.length>1){a.count.pop()}a.count.push(u.count[0]);a.string=a.pattern+toQuantifier(a.count);o=t+1;continue}if(n.isPadded){c=padZeros(t,n,r)}u.string=c+u.pattern+toQuantifier(u.count);i.push(u);o=t+1;a=u}return i}function filterPatterns(e,t,n,r,s){let i=[];for(let s of e){let{string:e}=s;if(!r&&!contains(t,"string",e)){i.push(n+e)}if(r&&contains(t,"string",e)){i.push(n+e)}}return i}function zip(e,t){let n=[];for(let r=0;r<e.length;r++)n.push([e[r],t[r]]);return n}function compare(e,t){return e>t?1:t>e?-1:0}function contains(e,t,n){return e.some((e=>e[t]===n))}function countNines(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function countZeros(e,t){return e-e%Math.pow(10,t)}function toQuantifier(e){let[t=0,n=""]=e;if(n||t>1){return`{${t+(n?","+n:"")}}`}return""}function toCharacterClass(e,t,n){return`[${e}${t-e===1?"":"-"}${t}]`}function hasPadding(e){return/^-?(0+)\d/.test(e)}function padZeros(e,t,n){if(!t.isPadded){return e}let r=Math.abs(t.maxLen-String(e).length);let s=n.relaxZeros!==false;switch(r){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:{return s?`0{0,${r}}`:`0{${r}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};e.exports=toRegexRange},9046:(e,t)=>{t.fromCallback=function(e){return Object.defineProperty((function(...t){if(typeof t[t.length-1]==="function")e.apply(this,t);else{return new Promise(((n,r)=>{t.push(((e,t)=>e!=null?r(e):n(t)));e.apply(this,t)}))}}),"name",{value:e.name})};t.fromPromise=function(e){return Object.defineProperty((function(...t){const n=t[t.length-1];if(typeof n!=="function")return e.apply(this,t);else{t.pop();e.apply(this,t).then((e=>n(null,e)),n)}}),"name",{value:e.name})}},6143:(e,t,n)=>{const r=n(7126);const{join:s,delimiter:i,sep:o,posix:a}=n(1017);const u=process.platform==="win32";const c=new RegExp(`[${a.sep}${o===a.sep?"":o}]`.replace(/(\\)/g,"\\$1"));const l=new RegExp(`^\\.${c.source}`);const getNotFoundError=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"});const getPathInfo=(e,{path:t=process.env.PATH,pathExt:n=process.env.PATHEXT,delimiter:r=i})=>{const s=e.match(c)?[""]:[...u?[process.cwd()]:[],...(t||"").split(r)];if(u){const t=n||[".EXE",".CMD",".BAT",".COM"].join(r);const i=t.split(r).reduce(((e,t)=>{e.push(t);e.push(t.toLowerCase());return e}),[]);if(e.includes(".")&&i[0]!==""){i.unshift("")}return{pathEnv:s,pathExt:i,pathExtExe:t}}return{pathEnv:s,pathExt:[""]}};const getPathPart=(e,t)=>{const n=/^".*"$/.test(e)?e.slice(1,-1):e;const r=!n&&l.test(t)?t.slice(0,2):"";return r+s(n,t)};const which=async(e,t={})=>{const{pathEnv:n,pathExt:s,pathExtExe:i}=getPathInfo(e,t);const o=[];for(const a of n){const n=getPathPart(a,e);for(const e of s){const s=n+e;const a=await r(s,{pathExt:i,ignoreErrors:true});if(a){if(!t.all){return s}o.push(s)}}}if(t.all&&o.length){return o}if(t.nothrow){return null}throw getNotFoundError(e)};const whichSync=(e,t={})=>{const{pathEnv:n,pathExt:s,pathExtExe:i}=getPathInfo(e,t);const o=[];for(const a of n){const n=getPathPart(a,e);for(const e of s){const s=n+e;const a=r.sync(s,{pathExt:i,ignoreErrors:true});if(a){if(!t.all){return s}o.push(s)}}}if(t.all&&o.length){return o}if(t.nothrow){return null}throw getNotFoundError(e)};e.exports=which;which.sync=whichSync},2221:(e,t,n)=>{e.exports=writeFile;e.exports.sync=writeFileSync;e.exports._getTmpname=getTmpname;e.exports._cleanupOnExit=cleanupOnExit;var r=n(7758);var s=n(2527);var i=n(7392);var o=n(1017);var a={};var u=function getId(){try{var e=n(1267);return e.threadId}catch(e){return 0}}();var c=0;function getTmpname(e){return e+"."+s(__filename).hash(String(process.pid)).hash(String(u)).hash(String(++c)).result()}function cleanupOnExit(e){return function(){try{r.unlinkSync(typeof e==="function"?e():e)}catch(e){}}}function writeFile(e,t,n,s){if(n){if(n instanceof Function){s=n;n={}}else if(typeof n==="string"){n={encoding:n}}}else{n={}}var u=n.Promise||global.Promise;var c;var l;var f;var h=i(cleanupOnExit((()=>f)));var p=o.resolve(e);new u((function serializeSameFile(e){if(!a[p])a[p]=[];a[p].push(e);if(a[p].length===1)e()})).then((function getRealPath(){return new u((function(t){r.realpath(e,(function(n,r){c=r||e;f=getTmpname(c);t()}))}))})).then((function stat(){return new u((function stat(e){if(n.mode&&n.chown)e();else{r.stat(c,(function(t,r){if(t||!r)e();else{n=Object.assign({},n);if(n.mode==null){n.mode=r.mode}if(n.chown==null&&process.getuid){n.chown={uid:r.uid,gid:r.gid}}e()}}))}}))})).then((function thenWriteFile(){return new u((function(e,t){r.open(f,"w",n.mode,(function(n,r){l=r;if(n)t(n);else e()}))}))})).then((function write(){return new u((function(e,s){if(Buffer.isBuffer(t)){r.write(l,t,0,t.length,0,(function(t){if(t)s(t);else e()}))}else if(t!=null){r.write(l,String(t),0,String(n.encoding||"utf8"),(function(t){if(t)s(t);else e()}))}else e()}))})).then((function syncAndClose(){return new u((function(e,t){if(n.fsync!==false){r.fsync(l,(function(n){if(n)r.close(l,(()=>t(n)));else r.close(l,e)}))}else{r.close(l,e)}}))})).then((function chown(){l=null;if(n.chown){return new u((function(e,t){r.chown(f,n.chown.uid,n.chown.gid,(function(n){if(n)t(n);else e()}))}))}})).then((function chmod(){if(n.mode){return new u((function(e,t){r.chmod(f,n.mode,(function(n){if(n)t(n);else e()}))}))}})).then((function rename(){return new u((function(e,t){r.rename(f,c,(function(n){if(n)t(n);else e()}))}))})).then((function success(){h();s()}),(function fail(e){return new u((e=>l?r.close(l,e):e())).then((()=>{h();r.unlink(f,(function(){s(e)}))}))})).then((function checkQueue(){a[p].shift();if(a[p].length>0){a[p][0]()}else delete a[p]}))}function writeFileSync(e,t,n){if(typeof n==="string")n={encoding:n};else if(!n)n={};try{e=r.realpathSync(e)}catch(e){}var s=getTmpname(e);if(!n.mode||!n.chown){try{var o=r.statSync(e);n=Object.assign({},n);if(!n.mode){n.mode=o.mode}if(!n.chown&&process.getuid){n.chown={uid:o.uid,gid:o.gid}}}catch(e){}}var a;var u=cleanupOnExit(s);var c=i(u);try{a=r.openSync(s,"w",n.mode);if(Buffer.isBuffer(t)){r.writeSync(a,t,0,t.length,0)}else if(t!=null){r.writeSync(a,String(t),0,String(n.encoding||"utf8"))}if(n.fsync!==false){r.fsyncSync(a)}r.closeSync(a);if(n.chown)r.chownSync(s,n.chown.uid,n.chown.gid);if(n.mode)r.chmodSync(s,n.mode);r.renameSync(s,e);c()}catch(e){if(a){try{r.closeSync(a)}catch(e){}}c();u();throw e}}},7392:(e,t,n)=>{var r=global.process;const processOk=function(e){return e&&typeof e==="object"&&typeof e.removeListener==="function"&&typeof e.emit==="function"&&typeof e.reallyExit==="function"&&typeof e.listeners==="function"&&typeof e.kill==="function"&&typeof e.pid==="number"&&typeof e.on==="function"};if(!processOk(r)){e.exports=function(){return function(){}}}else{var s=n(9491);var i=n(5904);var o=/^win/i.test(r.platform);var a=n(2361);if(typeof a!=="function"){a=a.EventEmitter}var u;if(r.__signal_exit_emitter__){u=r.__signal_exit_emitter__}else{u=r.__signal_exit_emitter__=new a;u.count=0;u.emitted={}}if(!u.infinite){u.setMaxListeners(Infinity);u.infinite=true}e.exports=function(e,t){if(!processOk(global.process)){return function(){}}s.equal(typeof e,"function","a callback must be provided for exit handler");if(h===false){p()}var n="exit";if(t&&t.alwaysLast){n="afterexit"}var remove=function(){u.removeListener(n,e);if(u.listeners("exit").length===0&&u.listeners("afterexit").length===0){c()}};u.on(n,e);return remove};var c=function unload(){if(!h||!processOk(global.process)){return}h=false;i.forEach((function(e){try{r.removeListener(e,f[e])}catch(e){}}));r.emit=y;r.reallyExit=d;u.count-=1};e.exports.unload=c;var l=function emit(e,t,n){if(u.emitted[e]){return}u.emitted[e]=true;u.emit(e,t,n)};var f={};i.forEach((function(e){f[e]=function listener(){if(!processOk(global.process)){return}var t=r.listeners(e);if(t.length===u.count){c();l("exit",null,e);l("afterexit",null,e);if(o&&e==="SIGHUP"){e="SIGINT"}r.kill(r.pid,e)}}}));e.exports.signals=function(){return i};var h=false;var p=function load(){if(h||!processOk(global.process)){return}h=true;u.count+=1;i=i.filter((function(e){try{r.on(e,f[e]);return true}catch(e){return false}}));r.emit=b;r.reallyExit=g};e.exports.load=p;var d=r.reallyExit;var g=function processReallyExit(e){if(!processOk(global.process)){return}r.exitCode=e||0;l("exit",r.exitCode,null);l("afterexit",r.exitCode,null);d.call(r,r.exitCode)};var y=r.emit;var b=function processEmit(e,t){if(e==="exit"&&processOk(global.process)){if(t!==undefined){r.exitCode=t}var n=y.apply(this,arguments);l("exit",r.exitCode,null);l("afterexit",r.exitCode,null);return n}else{return y.apply(this,arguments)}}}},5904:e=>{e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32"){e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(process.platform==="linux"){e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}},9491:t=>{t.exports=e(import.meta.url)("assert")},4300:t=>{t.exports=e(import.meta.url)("buffer")},2081:t=>{t.exports=e(import.meta.url)("child_process")},2057:t=>{t.exports=e(import.meta.url)("constants")},2361:t=>{t.exports=e(import.meta.url)("events")},7147:t=>{t.exports=e(import.meta.url)("fs")},2037:t=>{t.exports=e(import.meta.url)("os")},1017:t=>{t.exports=e(import.meta.url)("path")},7282:t=>{t.exports=e(import.meta.url)("process")},2781:t=>{t.exports=e(import.meta.url)("stream")},1576:t=>{t.exports=e(import.meta.url)("string_decoder")},3837:t=>{t.exports=e(import.meta.url)("util")},1267:t=>{t.exports=e(import.meta.url)("worker_threads")},8875:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.isIdentifierChar=isIdentifierChar;t.isIdentifierName=isIdentifierName;t.isIdentifierStart=isIdentifierStart;let n="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";let r="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";const s=new RegExp("["+n+"]");const i=new RegExp("["+n+r+"]");n=r=null;const o=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191];const a=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function isInAstralSet(e,t){let n=65536;for(let r=0,s=t.length;r<s;r+=2){n+=t[r];if(n>e)return false;n+=t[r+1];if(n>=e)return true}return false}function isIdentifierStart(e){if(e<65)return e===36;if(e<=90)return true;if(e<97)return e===95;if(e<=122)return true;if(e<=65535){return e>=170&&s.test(String.fromCharCode(e))}return isInAstralSet(e,o)}function isIdentifierChar(e){if(e<48)return e===36;if(e<58)return true;if(e<65)return false;if(e<=90)return true;if(e<97)return e===95;if(e<=122)return true;if(e<=65535){return e>=170&&i.test(String.fromCharCode(e))}return isInAstralSet(e,o)||isInAstralSet(e,a)}function isIdentifierName(e){let t=true;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if((r&64512)===55296&&n+1<e.length){const t=e.charCodeAt(++n);if((t&64512)===56320){r=65536+((r&1023)<<10)+(t&1023)}}if(t){t=false;if(!isIdentifierStart(r)){return false}}else if(!isIdentifierChar(r)){return false}}return!t}},2738:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"isIdentifierChar",{enumerable:true,get:function(){return r.isIdentifierChar}});Object.defineProperty(t,"isIdentifierName",{enumerable:true,get:function(){return r.isIdentifierName}});Object.defineProperty(t,"isIdentifierStart",{enumerable:true,get:function(){return r.isIdentifierStart}});Object.defineProperty(t,"isKeyword",{enumerable:true,get:function(){return s.isKeyword}});Object.defineProperty(t,"isReservedWord",{enumerable:true,get:function(){return s.isReservedWord}});Object.defineProperty(t,"isStrictBindOnlyReservedWord",{enumerable:true,get:function(){return s.isStrictBindOnlyReservedWord}});Object.defineProperty(t,"isStrictBindReservedWord",{enumerable:true,get:function(){return s.isStrictBindReservedWord}});Object.defineProperty(t,"isStrictReservedWord",{enumerable:true,get:function(){return s.isStrictReservedWord}});var r=n(8875);var s=n(17)},17:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.isKeyword=isKeyword;t.isReservedWord=isReservedWord;t.isStrictBindOnlyReservedWord=isStrictBindOnlyReservedWord;t.isStrictBindReservedWord=isStrictBindReservedWord;t.isStrictReservedWord=isStrictReservedWord;const n={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]};const r=new Set(n.keyword);const s=new Set(n.strict);const i=new Set(n.strictBind);function isReservedWord(e,t){return t&&e==="await"||e==="enum"}function isStrictReservedWord(e,t){return isReservedWord(e,t)||s.has(e)}function isStrictBindOnlyReservedWord(e){return i.has(e)}function isStrictBindReservedWord(e,t){return isStrictReservedWord(e,t)||isStrictBindOnlyReservedWord(e)}function isKeyword(e){return r.has(e)}},7654:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=highlight;t.shouldHighlight=shouldHighlight;var r=n(1531);var s=n(2738);var i=_interopRequireWildcard(n(7658),true);function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(_getRequireWildcardCache=function(e){return e?n:t})(e)}function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=_getRequireWildcardCache(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}const o=new Set(["as","async","from","get","of","set"]);function getDefs(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.grey,invalid:e.white.bgRed.bold}}const a=/\r\n|[\n\r\u2028\u2029]/;const u=/^[()[\]{}]$/;let c;{const e=/^[a-z][\w-]*$/i;const getTokenType=function(t,n,r){if(t.type==="name"){if((0,s.isKeyword)(t.value)||(0,s.isStrictReservedWord)(t.value,true)||o.has(t.value)){return"keyword"}if(e.test(t.value)&&(r[n-1]==="<"||r.slice(n-2,n)=="</")){return"jsxIdentifier"}if(t.value[0]!==t.value[0].toLowerCase()){return"capitalized"}}if(t.type==="punctuator"&&u.test(t.value)){return"bracket"}if(t.type==="invalid"&&(t.value==="@"||t.value==="#")){return"punctuator"}return t.type};c=function*(e){let t;while(t=r.default.exec(e)){const n=r.matchToToken(t);yield{type:getTokenType(n,t.index,e),value:n.value}}}}function highlightTokens(e,t){let n="";for(const{type:r,value:s}of c(t)){const t=e[r];if(t){n+=s.split(a).map((e=>t(e))).join("\n")}else{n+=s}}return n}function shouldHighlight(e){return i.default.level>0||e.forceColor}let l=undefined;function getChalk(e){if(e){var t;(t=l)!=null?t:l=new i.default.constructor({enabled:true,level:1});return l}return i.default}{t.getChalk=e=>getChalk(e.forceColor)}function highlight(e,t={}){if(e!==""&&shouldHighlight(t)){const n=getDefs(getChalk(t.forceColor));return highlightTokens(n,e)}else{return e}}},4379:(e,t,n)=>{const{Argument:r}=n(9414);const{Command:s}=n(552);const{CommanderError:i,InvalidArgumentError:o}=n(2625);const{Help:a}=n(5153);const{Option:u}=n(6558);t=e.exports=new s;t.program=t;t.Command=s;t.Option=u;t.Argument=r;t.Help=a;t.CommanderError=i;t.InvalidArgumentError=o;t.InvalidOptionArgumentError=o},9414:(e,t,n)=>{const{InvalidArgumentError:r}=n(2625);class Argument{constructor(e,t){this.description=t||"";this.variadic=false;this.parseArg=undefined;this.defaultValue=undefined;this.defaultValueDescription=undefined;this.argChoices=undefined;switch(e[0]){case"<":this.required=true;this._name=e.slice(1,-1);break;case"[":this.required=false;this._name=e.slice(1,-1);break;default:this.required=true;this._name=e;break}if(this._name.length>3&&this._name.slice(-3)==="..."){this.variadic=true;this._name=this._name.slice(0,-3)}}name(){return this._name}_concatValue(e,t){if(t===this.defaultValue||!Array.isArray(t)){return[e]}return t.concat(e)}default(e,t){this.defaultValue=e;this.defaultValueDescription=t;return this}argParser(e){this.parseArg=e;return this}choices(e){this.argChoices=e.slice();this.parseArg=(e,t)=>{if(!this.argChoices.includes(e)){throw new r(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._concatValue(e,t)}return e};return this}argRequired(){this.required=true;return this}argOptional(){this.required=false;return this}}function humanReadableArgName(e){const t=e.name()+(e.variadic===true?"...":"");return e.required?"<"+t+">":"["+t+"]"}t.Argument=Argument;t.humanReadableArgName=humanReadableArgName},552:(e,t,n)=>{const r=n(2361).EventEmitter;const s=n(2081);const i=n(1017);const o=n(7147);const a=n(7282);const{Argument:u,humanReadableArgName:c}=n(9414);const{CommanderError:l}=n(2625);const{Help:f}=n(5153);const{Option:h,splitOptionFlags:p,DualOptions:d}=n(6558);const{suggestSimilar:g}=n(7592);class Command extends r{constructor(e){super();this.commands=[];this.options=[];this.parent=null;this._allowUnknownOption=false;this._allowExcessArguments=true;this.registeredArguments=[];this._args=this.registeredArguments;this.args=[];this.rawArgs=[];this.processedArgs=[];this._scriptPath=null;this._name=e||"";this._optionValues={};this._optionValueSources={};this._storeOptionsAsProperties=false;this._actionHandler=null;this._executableHandler=false;this._executableFile=null;this._executableDir=null;this._defaultCommandName=null;this._exitCallback=null;this._aliases=[];this._combineFlagAndOptionalValue=true;this._description="";this._summary="";this._argsDescription=undefined;this._enablePositionalOptions=false;this._passThroughOptions=false;this._lifeCycleHooks={};this._showHelpAfterError=false;this._showSuggestionAfterError=true;this._outputConfiguration={writeOut:e=>a.stdout.write(e),writeErr:e=>a.stderr.write(e),getOutHelpWidth:()=>a.stdout.isTTY?a.stdout.columns:undefined,getErrHelpWidth:()=>a.stderr.isTTY?a.stderr.columns:undefined,outputError:(e,t)=>t(e)};this._hidden=false;this._hasHelpOption=true;this._helpFlags="-h, --help";this._helpDescription="display help for command";this._helpShortFlag="-h";this._helpLongFlag="--help";this._addImplicitHelpCommand=undefined;this._helpCommandName="help";this._helpCommandnameAndArgs="help [command]";this._helpCommandDescription="display help for command";this._helpConfiguration={}}copyInheritedSettings(e){this._outputConfiguration=e._outputConfiguration;this._hasHelpOption=e._hasHelpOption;this._helpFlags=e._helpFlags;this._helpDescription=e._helpDescription;this._helpShortFlag=e._helpShortFlag;this._helpLongFlag=e._helpLongFlag;this._helpCommandName=e._helpCommandName;this._helpCommandnameAndArgs=e._helpCommandnameAndArgs;this._helpCommandDescription=e._helpCommandDescription;this._helpConfiguration=e._helpConfiguration;this._exitCallback=e._exitCallback;this._storeOptionsAsProperties=e._storeOptionsAsProperties;this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue;this._allowExcessArguments=e._allowExcessArguments;this._enablePositionalOptions=e._enablePositionalOptions;this._showHelpAfterError=e._showHelpAfterError;this._showSuggestionAfterError=e._showSuggestionAfterError;return this}_getCommandAndAncestors(){const e=[];for(let t=this;t;t=t.parent){e.push(t)}return e}command(e,t,n){let r=t;let s=n;if(typeof r==="object"&&r!==null){s=r;r=null}s=s||{};const[,i,o]=e.match(/([^ ]+) *(.*)/);const a=this.createCommand(i);if(r){a.description(r);a._executableHandler=true}if(s.isDefault)this._defaultCommandName=a._name;a._hidden=!!(s.noHelp||s.hidden);a._executableFile=s.executableFile||null;if(o)a.arguments(o);this.commands.push(a);a.parent=this;a.copyInheritedSettings(this);if(r)return this;return a}createCommand(e){return new Command(e)}createHelp(){return Object.assign(new f,this.configureHelp())}configureHelp(e){if(e===undefined)return this._helpConfiguration;this._helpConfiguration=e;return this}configureOutput(e){if(e===undefined)return this._outputConfiguration;Object.assign(this._outputConfiguration,e);return this}showHelpAfterError(e=true){if(typeof e!=="string")e=!!e;this._showHelpAfterError=e;return this}showSuggestionAfterError(e=true){this._showSuggestionAfterError=!!e;return this}addCommand(e,t){if(!e._name){throw new Error(`Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()`)}t=t||{};if(t.isDefault)this._defaultCommandName=e._name;if(t.noHelp||t.hidden)e._hidden=true;this.commands.push(e);e.parent=this;return this}createArgument(e,t){return new u(e,t)}argument(e,t,n,r){const s=this.createArgument(e,t);if(typeof n==="function"){s.default(r).argParser(n)}else{s.default(n)}this.addArgument(s);return this}arguments(e){e.trim().split(/ +/).forEach((e=>{this.argument(e)}));return this}addArgument(e){const t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic){throw new Error(`only the last argument can be variadic '${t.name()}'`)}if(e.required&&e.defaultValue!==undefined&&e.parseArg===undefined){throw new Error(`a default value for a required argument is never used: '${e.name()}'`)}this.registeredArguments.push(e);return this}addHelpCommand(e,t){if(e===false){this._addImplicitHelpCommand=false}else{this._addImplicitHelpCommand=true;if(typeof e==="string"){this._helpCommandName=e.split(" ")[0];this._helpCommandnameAndArgs=e}this._helpCommandDescription=t||this._helpCommandDescription}return this}_hasImplicitHelpCommand(){if(this._addImplicitHelpCommand===undefined){return this.commands.length&&!this._actionHandler&&!this._findCommand("help")}return this._addImplicitHelpCommand}hook(e,t){const n=["preSubcommand","preAction","postAction"];if(!n.includes(e)){throw new Error(`Unexpected value for event passed to hook : '${e}'.\nExpecting one of '${n.join("', '")}'`)}if(this._lifeCycleHooks[e]){this._lifeCycleHooks[e].push(t)}else{this._lifeCycleHooks[e]=[t]}return this}exitOverride(e){if(e){this._exitCallback=e}else{this._exitCallback=e=>{if(e.code!=="commander.executeSubCommandAsync"){throw e}else{}}}return this}_exit(e,t,n){if(this._exitCallback){this._exitCallback(new l(e,t,n))}a.exit(e)}action(e){const listener=t=>{const n=this.registeredArguments.length;const r=t.slice(0,n);if(this._storeOptionsAsProperties){r[n]=this}else{r[n]=this.opts()}r.push(this);return e.apply(this,r)};this._actionHandler=listener;return this}createOption(e,t){return new h(e,t)}_callParseArg(e,t,n,r){try{return e.parseArg(t,n)}catch(e){if(e.code==="commander.invalidArgument"){const t=`${r} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}}addOption(e){const t=e.name();const n=e.attributeName();if(e.negate){const t=e.long.replace(/^--no-/,"--");if(!this._findOption(t)){this.setOptionValueWithSource(n,e.defaultValue===undefined?true:e.defaultValue,"default")}}else if(e.defaultValue!==undefined){this.setOptionValueWithSource(n,e.defaultValue,"default")}this.options.push(e);const handleOptionValue=(t,r,s)=>{if(t==null&&e.presetArg!==undefined){t=e.presetArg}const i=this.getOptionValue(n);if(t!==null&&e.parseArg){t=this._callParseArg(e,t,i,r)}else if(t!==null&&e.variadic){t=e._concatValue(t,i)}if(t==null){if(e.negate){t=false}else if(e.isBoolean()||e.optional){t=true}else{t=""}}this.setOptionValueWithSource(n,t,s)};this.on("option:"+t,(t=>{const n=`error: option '${e.flags}' argument '${t}' is invalid.`;handleOptionValue(t,n,"cli")}));if(e.envVar){this.on("optionEnv:"+t,(t=>{const n=`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`;handleOptionValue(t,n,"env")}))}return this}_optionEx(e,t,n,r,s){if(typeof t==="object"&&t instanceof h){throw new Error("To add an Option object use addOption() instead of option() or requiredOption()")}const i=this.createOption(t,n);i.makeOptionMandatory(!!e.mandatory);if(typeof r==="function"){i.default(s).argParser(r)}else if(r instanceof RegExp){const e=r;r=(t,n)=>{const r=e.exec(t);return r?r[0]:n};i.default(s).argParser(r)}else{i.default(r)}return this.addOption(i)}option(e,t,n,r){return this._optionEx({},e,t,n,r)}requiredOption(e,t,n,r){return this._optionEx({mandatory:true},e,t,n,r)}combineFlagAndOptionalValue(e=true){this._combineFlagAndOptionalValue=!!e;return this}allowUnknownOption(e=true){this._allowUnknownOption=!!e;return this}allowExcessArguments(e=true){this._allowExcessArguments=!!e;return this}enablePositionalOptions(e=true){this._enablePositionalOptions=!!e;return this}passThroughOptions(e=true){this._passThroughOptions=!!e;if(!!this.parent&&e&&!this.parent._enablePositionalOptions){throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)")}return this}storeOptionsAsProperties(e=true){if(this.options.length){throw new Error("call .storeOptionsAsProperties() before adding options")}this._storeOptionsAsProperties=!!e;return this}getOptionValue(e){if(this._storeOptionsAsProperties){return this[e]}return this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,undefined)}setOptionValueWithSource(e,t,n){if(this._storeOptionsAsProperties){this[e]=t}else{this._optionValues[e]=t}this._optionValueSources[e]=n;return this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;this._getCommandAndAncestors().forEach((n=>{if(n.getOptionValueSource(e)!==undefined){t=n.getOptionValueSource(e)}}));return t}_prepareUserArgs(e,t){if(e!==undefined&&!Array.isArray(e)){throw new Error("first parameter to parse must be array or undefined")}t=t||{};if(e===undefined){e=a.argv;if(a.versions&&a.versions.electron){t.from="electron"}}this.rawArgs=e.slice();let n;switch(t.from){case undefined:case"node":this._scriptPath=e[1];n=e.slice(2);break;case"electron":if(a.defaultApp){this._scriptPath=e[1];n=e.slice(2)}else{n=e.slice(1)}break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);this._name=this._name||"program";return n}parse(e,t){const n=this._prepareUserArgs(e,t);this._parseCommand([],n);return this}async parseAsync(e,t){const n=this._prepareUserArgs(e,t);await this._parseCommand([],n);return this}_executeSubCommand(e,t){t=t.slice();let n=false;const r=[".js",".ts",".tsx",".mjs",".cjs"];function findFile(e,t){const n=i.resolve(e,t);if(o.existsSync(n))return n;if(r.includes(i.extname(t)))return undefined;const s=r.find((e=>o.existsSync(`${n}${e}`)));if(s)return`${n}${s}`;return undefined}this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();let u=e._executableFile||`${this._name}-${e._name}`;let c=this._executableDir||"";if(this._scriptPath){let e;try{e=o.realpathSync(this._scriptPath)}catch(t){e=this._scriptPath}c=i.resolve(i.dirname(e),c)}if(c){let t=findFile(c,u);if(!t&&!e._executableFile&&this._scriptPath){const n=i.basename(this._scriptPath,i.extname(this._scriptPath));if(n!==this._name){t=findFile(c,`${n}-${e._name}`)}}u=t||u}n=r.includes(i.extname(u));let f;if(a.platform!=="win32"){if(n){t.unshift(u);t=incrementNodeInspectorPort(a.execArgv).concat(t);f=s.spawn(a.argv[0],t,{stdio:"inherit"})}else{f=s.spawn(u,t,{stdio:"inherit"})}}else{t.unshift(u);t=incrementNodeInspectorPort(a.execArgv).concat(t);f=s.spawn(a.execPath,t,{stdio:"inherit"})}if(!f.killed){const e=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];e.forEach((e=>{a.on(e,(()=>{if(f.killed===false&&f.exitCode===null){f.kill(e)}}))}))}const h=this._exitCallback;if(!h){f.on("close",a.exit.bind(a))}else{f.on("close",(()=>{h(new l(a.exitCode||0,"commander.executeSubCommandAsync","(close)"))}))}f.on("error",(t=>{if(t.code==="ENOENT"){const t=c?`searched for local subcommand relative to directory '${c}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory";const n=`'${u}' does not exist\n - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${t}`;throw new Error(n)}else if(t.code==="EACCES"){throw new Error(`'${u}' not executable`)}if(!h){a.exit(1)}else{const e=new l(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t;h(e)}}));this.runningCommand=f}_dispatchSubcommand(e,t,n){const r=this._findCommand(e);if(!r)this.help({error:true});let s;s=this._chainOrCallSubCommandHook(s,r,"preSubcommand");s=this._chainOrCall(s,(()=>{if(r._executableHandler){this._executeSubCommand(r,t.concat(n))}else{return r._parseCommand(t,n)}}));return s}_dispatchHelpCommand(e){if(!e){this.help()}const t=this._findCommand(e);if(t&&!t._executableHandler){t.help()}return this._dispatchSubcommand(e,[],[this._helpLongFlag||this._helpShortFlag])}_checkNumberOfArguments(){this.registeredArguments.forEach(((e,t)=>{if(e.required&&this.args[t]==null){this.missingArgument(e.name())}}));if(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic){return}if(this.args.length>this.registeredArguments.length){this._excessArguments(this.args)}}_processArguments(){const myParseArg=(e,t,n)=>{let r=t;if(t!==null&&e.parseArg){const s=`error: command-argument value '${t}' is invalid for argument '${e.name()}'.`;r=this._callParseArg(e,t,n,s)}return r};this._checkNumberOfArguments();const e=[];this.registeredArguments.forEach(((t,n)=>{let r=t.defaultValue;if(t.variadic){if(n<this.args.length){r=this.args.slice(n);if(t.parseArg){r=r.reduce(((e,n)=>myParseArg(t,n,e)),t.defaultValue)}}else if(r===undefined){r=[]}}else if(n<this.args.length){r=this.args[n];if(t.parseArg){r=myParseArg(t,r,t.defaultValue)}}e[n]=r}));this.processedArgs=e}_chainOrCall(e,t){if(e&&e.then&&typeof e.then==="function"){return e.then((()=>t()))}return t()}_chainOrCallHooks(e,t){let n=e;const r=[];this._getCommandAndAncestors().reverse().filter((e=>e._lifeCycleHooks[t]!==undefined)).forEach((e=>{e._lifeCycleHooks[t].forEach((t=>{r.push({hookedCommand:e,callback:t})}))}));if(t==="postAction"){r.reverse()}r.forEach((e=>{n=this._chainOrCall(n,(()=>e.callback(e.hookedCommand,this)))}));return n}_chainOrCallSubCommandHook(e,t,n){let r=e;if(this._lifeCycleHooks[n]!==undefined){this._lifeCycleHooks[n].forEach((e=>{r=this._chainOrCall(r,(()=>e(this,t)))}))}return r}_parseCommand(e,t){const n=this.parseOptions(t);this._parseOptionsEnv();this._parseOptionsImplied();e=e.concat(n.operands);t=n.unknown;this.args=e.concat(t);if(e&&this._findCommand(e[0])){return this._dispatchSubcommand(e[0],e.slice(1),t)}if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName){return this._dispatchHelpCommand(e[1])}if(this._defaultCommandName){outputHelpIfRequested(this,t);return this._dispatchSubcommand(this._defaultCommandName,e,t)}if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName){this.help({error:true})}outputHelpIfRequested(this,n.unknown);this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();const checkForUnknownOptions=()=>{if(n.unknown.length>0){this.unknownOption(n.unknown[0])}};const r=`command:${this.name()}`;if(this._actionHandler){checkForUnknownOptions();this._processArguments();let n;n=this._chainOrCallHooks(n,"preAction");n=this._chainOrCall(n,(()=>this._actionHandler(this.processedArgs)));if(this.parent){n=this._chainOrCall(n,(()=>{this.parent.emit(r,e,t)}))}n=this._chainOrCallHooks(n,"postAction");return n}if(this.parent&&this.parent.listenerCount(r)){checkForUnknownOptions();this._processArguments();this.parent.emit(r,e,t)}else if(e.length){if(this._findCommand("*")){return this._dispatchSubcommand("*",e,t)}if(this.listenerCount("command:*")){this.emit("command:*",e,t)}else if(this.commands.length){this.unknownCommand()}else{checkForUnknownOptions();this._processArguments()}}else if(this.commands.length){checkForUnknownOptions();this.help({error:true})}else{checkForUnknownOptions();this._processArguments()}}_findCommand(e){if(!e)return undefined;return this.commands.find((t=>t._name===e||t._aliases.includes(e)))}_findOption(e){return this.options.find((t=>t.is(e)))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((e=>{e.options.forEach((t=>{if(t.mandatory&&e.getOptionValue(t.attributeName())===undefined){e.missingMandatoryOptionValue(t)}}))}))}_checkForConflictingLocalOptions(){const e=this.options.filter((e=>{const t=e.attributeName();if(this.getOptionValue(t)===undefined){return false}return this.getOptionValueSource(t)!=="default"}));const t=e.filter((e=>e.conflictsWith.length>0));t.forEach((t=>{const n=e.find((e=>t.conflictsWith.includes(e.attributeName())));if(n){this._conflictingOption(t,n)}}))}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((e=>{e._checkForConflictingLocalOptions()}))}parseOptions(e){const t=[];const n=[];let r=t;const s=e.slice();function maybeOption(e){return e.length>1&&e[0]==="-"}let i=null;while(s.length){const e=s.shift();if(e==="--"){if(r===n)r.push(e);r.push(...s);break}if(i&&!maybeOption(e)){this.emit(`option:${i.name()}`,e);continue}i=null;if(maybeOption(e)){const t=this._findOption(e);if(t){if(t.required){const e=s.shift();if(e===undefined)this.optionMissingArgument(t);this.emit(`option:${t.name()}`,e)}else if(t.optional){let e=null;if(s.length>0&&!maybeOption(s[0])){e=s.shift()}this.emit(`option:${t.name()}`,e)}else{this.emit(`option:${t.name()}`)}i=t.variadic?t:null;continue}}if(e.length>2&&e[0]==="-"&&e[1]!=="-"){const t=this._findOption(`-${e[1]}`);if(t){if(t.required||t.optional&&this._combineFlagAndOptionalValue){this.emit(`option:${t.name()}`,e.slice(2))}else{this.emit(`option:${t.name()}`);s.unshift(`-${e.slice(2)}`)}continue}}if(/^--[^=]+=/.test(e)){const t=e.indexOf("=");const n=this._findOption(e.slice(0,t));if(n&&(n.required||n.optional)){this.emit(`option:${n.name()}`,e.slice(t+1));continue}}if(maybeOption(e)){r=n}if((this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(e)){t.push(e);if(s.length>0)n.push(...s);break}else if(e===this._helpCommandName&&this._hasImplicitHelpCommand()){t.push(e);if(s.length>0)t.push(...s);break}else if(this._defaultCommandName){n.push(e);if(s.length>0)n.push(...s);break}}if(this._passThroughOptions){r.push(e);if(s.length>0)r.push(...s);break}r.push(e)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){const e={};const t=this.options.length;for(let n=0;n<t;n++){const t=this.options[n].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce(((e,t)=>Object.assign(e,t.opts())),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr);if(typeof this._showHelpAfterError==="string"){this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`)}else if(this._showHelpAfterError){this._outputConfiguration.writeErr("\n");this.outputHelp({error:true})}const n=t||{};const r=n.exitCode||1;const s=n.code||"commander.error";this._exit(r,s,e)}_parseOptionsEnv(){this.options.forEach((e=>{if(e.envVar&&e.envVar in a.env){const t=e.attributeName();if(this.getOptionValue(t)===undefined||["default","config","env"].includes(this.getOptionValueSource(t))){if(e.required||e.optional){this.emit(`optionEnv:${e.name()}`,a.env[e.envVar])}else{this.emit(`optionEnv:${e.name()}`)}}}}))}_parseOptionsImplied(){const e=new d(this.options);const hasCustomOptionValue=e=>this.getOptionValue(e)!==undefined&&!["default","implied"].includes(this.getOptionValueSource(e));this.options.filter((t=>t.implied!==undefined&&hasCustomOptionValue(t.attributeName())&&e.valueFromOption(this.getOptionValue(t.attributeName()),t))).forEach((e=>{Object.keys(e.implied).filter((e=>!hasCustomOptionValue(e))).forEach((t=>{this.setOptionValueWithSource(t,e.implied[t],"implied")}))}))}missingArgument(e){const t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){const t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){const t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){const findBestOptionFromValue=e=>{const t=e.attributeName();const n=this.getOptionValue(t);const r=this.options.find((e=>e.negate&&t===e.attributeName()));const s=this.options.find((e=>!e.negate&&t===e.attributeName()));if(r&&(r.presetArg===undefined&&n===false||r.presetArg!==undefined&&n===r.presetArg)){return r}return s||e};const getErrorMessage=e=>{const t=findBestOptionFromValue(e);const n=t.attributeName();const r=this.getOptionValueSource(n);if(r==="env"){return`environment variable '${t.envVar}'`}return`option '${t.flags}'`};const n=`error: ${getErrorMessage(e)} cannot be used with ${getErrorMessage(t)}`;this.error(n,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[];let r=this;do{const e=r.createHelp().visibleOptions(r).filter((e=>e.long)).map((e=>e.long));n=n.concat(e);r=r.parent}while(r&&!r._enablePositionalOptions);t=g(e,n)}const n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;const t=this.registeredArguments.length;const n=t===1?"":"s";const r=this.parent?` for '${this.name()}'`:"";const s=`error: too many arguments${r}. Expected ${t} argument${n} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){const e=this.args[0];let t="";if(this._showSuggestionAfterError){const n=[];this.createHelp().visibleCommands(this).forEach((e=>{n.push(e.name());if(e.alias())n.push(e.alias())}));t=g(e,n)}const n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(e===undefined)return this._version;this._version=e;t=t||"-V, --version";n=n||"output the version number";const r=this.createOption(t,n);this._versionOptionName=r.attributeName();this.options.push(r);this.on("option:"+r.name(),(()=>{this._outputConfiguration.writeOut(`${e}\n`);this._exit(0,"commander.version",e)}));return this}description(e,t){if(e===undefined&&t===undefined)return this._description;this._description=e;if(t){this._argsDescription=t}return this}summary(e){if(e===undefined)return this._summary;this._summary=e;return this}alias(e){if(e===undefined)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler){t=this.commands[this.commands.length-1]}if(e===t._name)throw new Error("Command alias can't be the same as its name");t._aliases.push(e);return this}aliases(e){if(e===undefined)return this._aliases;e.forEach((e=>this.alias(e)));return this}usage(e){if(e===undefined){if(this._usage)return this._usage;const e=this.registeredArguments.map((e=>c(e)));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?e:[]).join(" ")}this._usage=e;return this}name(e){if(e===undefined)return this._name;this._name=e;return this}nameFromFilename(e){this._name=i.basename(e,i.extname(e));return this}executableDir(e){if(e===undefined)return this._executableDir;this._executableDir=e;return this}helpInformation(e){const t=this.createHelp();if(t.helpWidth===undefined){t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()}return t.formatHelp(this,t)}_getHelpContext(e){e=e||{};const t={error:!!e.error};let n;if(t.error){n=e=>this._outputConfiguration.writeErr(e)}else{n=e=>this._outputConfiguration.writeOut(e)}t.write=e.write||n;t.command=this;return t}outputHelp(e){let t;if(typeof e==="function"){t=e;e=undefined}const n=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach((e=>e.emit("beforeAllHelp",n)));this.emit("beforeHelp",n);let r=this.helpInformation(n);if(t){r=t(r);if(typeof r!=="string"&&!Buffer.isBuffer(r)){throw new Error("outputHelp callback must return a string or a Buffer")}}n.write(r);if(this._helpLongFlag){this.emit(this._helpLongFlag)}this.emit("afterHelp",n);this._getCommandAndAncestors().forEach((e=>e.emit("afterAllHelp",n)))}helpOption(e,t){if(typeof e==="boolean"){this._hasHelpOption=e;return this}this._helpFlags=e||this._helpFlags;this._helpDescription=t||this._helpDescription;const n=p(this._helpFlags);this._helpShortFlag=n.shortFlag;this._helpLongFlag=n.longFlag;return this}help(e){this.outputHelp(e);let t=a.exitCode||0;if(t===0&&e&&typeof e!=="function"&&e.error){t=1}this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){const n=["beforeAll","before","after","afterAll"];if(!n.includes(e)){throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${n.join("', '")}'`)}const r=`${e}Help`;this.on(r,(e=>{let n;if(typeof t==="function"){n=t({error:e.error,command:e.command})}else{n=t}if(n){e.write(`${n}\n`)}}));return this}}function outputHelpIfRequested(e,t){const n=e._hasHelpOption&&t.find((t=>t===e._helpLongFlag||t===e._helpShortFlag));if(n){e.outputHelp();e._exit(0,"commander.helpDisplayed","(outputHelp)")}}function incrementNodeInspectorPort(e){return e.map((e=>{if(!e.startsWith("--inspect")){return e}let t;let n="127.0.0.1";let r="9229";let s;if((s=e.match(/^(--inspect(-brk)?)$/))!==null){t=s[1]}else if((s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null){t=s[1];if(/^\d+$/.test(s[3])){r=s[3]}else{n=s[3]}}else if((s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null){t=s[1];n=s[3];r=s[4]}if(t&&r!=="0"){return`${t}=${n}:${parseInt(r)+1}`}return e}))}t.Command=Command},2625:(e,t)=>{class CommanderError extends Error{constructor(e,t,n){super(n);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name;this.code=t;this.exitCode=e;this.nestedError=undefined}}class InvalidArgumentError extends CommanderError{constructor(e){super(1,"commander.invalidArgument",e);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name}}t.CommanderError=CommanderError;t.InvalidArgumentError=InvalidArgumentError},5153:(e,t,n)=>{const{humanReadableArgName:r}=n(9414);class Help{constructor(){this.helpWidth=undefined;this.sortSubcommands=false;this.sortOptions=false;this.showGlobalOptions=false}visibleCommands(e){const t=e.commands.filter((e=>!e._hidden));if(e._hasImplicitHelpCommand()){const[,n,r]=e._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/);const s=e.createCommand(n).helpOption(false);s.description(e._helpCommandDescription);if(r)s.arguments(r);t.push(s)}if(this.sortSubcommands){t.sort(((e,t)=>e.name().localeCompare(t.name())))}return t}compareOptions(e,t){const getSortKey=e=>e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"");return getSortKey(e).localeCompare(getSortKey(t))}visibleOptions(e){const t=e.options.filter((e=>!e.hidden));const n=e._hasHelpOption&&e._helpShortFlag&&!e._findOption(e._helpShortFlag);const r=e._hasHelpOption&&!e._findOption(e._helpLongFlag);if(n||r){let s;if(!n){s=e.createOption(e._helpLongFlag,e._helpDescription)}else if(!r){s=e.createOption(e._helpShortFlag,e._helpDescription)}else{s=e.createOption(e._helpFlags,e._helpDescription)}t.push(s)}if(this.sortOptions){t.sort(this.compareOptions)}return t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];const t=[];for(let n=e.parent;n;n=n.parent){const e=n.options.filter((e=>!e.hidden));t.push(...e)}if(this.sortOptions){t.sort(this.compareOptions)}return t}visibleArguments(e){if(e._argsDescription){e.registeredArguments.forEach((t=>{t.description=t.description||e._argsDescription[t.name()]||""}))}if(e.registeredArguments.find((e=>e.description))){return e.registeredArguments}return[]}subcommandTerm(e){const t=e.registeredArguments.map((e=>r(e))).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce(((e,n)=>Math.max(e,t.subcommandTerm(n).length)),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce(((e,n)=>Math.max(e,t.optionTerm(n).length)),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce(((e,n)=>Math.max(e,t.optionTerm(n).length)),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce(((e,n)=>Math.max(e,t.argumentTerm(n).length)),0)}commandUsage(e){let t=e._name;if(e._aliases[0]){t=t+"|"+e._aliases[0]}let n="";for(let t=e.parent;t;t=t.parent){n=t.name()+" "+n}return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){const t=[];if(e.argChoices){t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`)}if(e.defaultValue!==undefined){const n=e.required||e.optional||e.isBoolean()&&typeof e.defaultValue==="boolean";if(n){t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}}if(e.presetArg!==undefined&&e.optional){t.push(`preset: ${JSON.stringify(e.presetArg)}`)}if(e.envVar!==undefined){t.push(`env: ${e.envVar}`)}if(t.length>0){return`${e.description} (${t.join(", ")})`}return e.description}argumentDescription(e){const t=[];if(e.argChoices){t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`)}if(e.defaultValue!==undefined){t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}if(t.length>0){const n=`(${t.join(", ")})`;if(e.description){return`${e.description} ${n}`}return n}return e.description}formatHelp(e,t){const n=t.padWidth(e,t);const r=t.helpWidth||80;const s=2;const i=2;function formatItem(e,o){if(o){const a=`${e.padEnd(n+i)}${o}`;return t.wrap(a,r-s,n+i)}return e}function formatList(e){return e.join("\n").replace(/^/gm," ".repeat(s))}let o=[`Usage: ${t.commandUsage(e)}`,""];const a=t.commandDescription(e);if(a.length>0){o=o.concat([t.wrap(a,r,0),""])}const u=t.visibleArguments(e).map((e=>formatItem(t.argumentTerm(e),t.argumentDescription(e))));if(u.length>0){o=o.concat(["Arguments:",formatList(u),""])}const c=t.visibleOptions(e).map((e=>formatItem(t.optionTerm(e),t.optionDescription(e))));if(c.length>0){o=o.concat(["Options:",formatList(c),""])}if(this.showGlobalOptions){const n=t.visibleGlobalOptions(e).map((e=>formatItem(t.optionTerm(e),t.optionDescription(e))));if(n.length>0){o=o.concat(["Global Options:",formatList(n),""])}}const l=t.visibleCommands(e).map((e=>formatItem(t.subcommandTerm(e),t.subcommandDescription(e))));if(l.length>0){o=o.concat(["Commands:",formatList(l),""])}return o.join("\n")}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,n,r=40){const s=" \\f\\t\\v - \ufeff";const i=new RegExp(`[\\n][${s}]+`);if(e.match(i))return e;const o=t-n;if(o<r)return e;const a=e.slice(0,n);const u=e.slice(n).replace("\r\n","\n");const c=" ".repeat(n);const l="";const f=`\\s${l}`;const h=new RegExp(`\n|.{1,${o-1}}([${f}]|$)|[^${f}]+?([${f}]|$)`,"g");const p=u.match(h)||[];return a+p.map(((e,t)=>{if(e==="\n")return"";return(t>0?c:"")+e.trimEnd()})).join("\n")}}t.Help=Help},6558:(e,t,n)=>{const{InvalidArgumentError:r}=n(2625);class Option{constructor(e,t){this.flags=e;this.description=t||"";this.required=e.includes("<");this.optional=e.includes("[");this.variadic=/\w\.\.\.[>\]]$/.test(e);this.mandatory=false;const n=splitOptionFlags(e);this.short=n.shortFlag;this.long=n.longFlag;this.negate=false;if(this.long){this.negate=this.long.startsWith("--no-")}this.defaultValue=undefined;this.defaultValueDescription=undefined;this.presetArg=undefined;this.envVar=undefined;this.parseArg=undefined;this.hidden=false;this.argChoices=undefined;this.conflictsWith=[];this.implied=undefined}default(e,t){this.defaultValue=e;this.defaultValueDescription=t;return this}preset(e){this.presetArg=e;return this}conflicts(e){this.conflictsWith=this.conflictsWith.concat(e);return this}implies(e){let t=e;if(typeof e==="string"){t={[e]:true}}this.implied=Object.assign(this.implied||{},t);return this}env(e){this.envVar=e;return this}argParser(e){this.parseArg=e;return this}makeOptionMandatory(e=true){this.mandatory=!!e;return this}hideHelp(e=true){this.hidden=!!e;return this}_concatValue(e,t){if(t===this.defaultValue||!Array.isArray(t)){return[e]}return t.concat(e)}choices(e){this.argChoices=e.slice();this.parseArg=(e,t)=>{if(!this.argChoices.includes(e)){throw new r(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._concatValue(e,t)}return e};return this}name(){if(this.long){return this.long.replace(/^--/,"")}return this.short.replace(/^-/,"")}attributeName(){return camelcase(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class DualOptions{constructor(e){this.positiveOptions=new Map;this.negativeOptions=new Map;this.dualOptions=new Set;e.forEach((e=>{if(e.negate){this.negativeOptions.set(e.attributeName(),e)}else{this.positiveOptions.set(e.attributeName(),e)}}));this.negativeOptions.forEach(((e,t)=>{if(this.positiveOptions.has(t)){this.dualOptions.add(t)}}))}valueFromOption(e,t){const n=t.attributeName();if(!this.dualOptions.has(n))return true;const r=this.negativeOptions.get(n).presetArg;const s=r!==undefined?r:false;return t.negate===(s===e)}}function camelcase(e){return e.split("-").reduce(((e,t)=>e+t[0].toUpperCase()+t.slice(1)))}function splitOptionFlags(e){let t;let n;const r=e.split(/[ |,]+/);if(r.length>1&&!/^[[<]/.test(r[1]))t=r.shift();n=r.shift();if(!t&&/^-[^-]$/.test(n)){t=n;n=undefined}return{shortFlag:t,longFlag:n}}t.Option=Option;t.splitOptionFlags=splitOptionFlags;t.DualOptions=DualOptions},7592:(e,t)=>{const n=3;function editDistance(e,t){if(Math.abs(e.length-t.length)>n)return Math.max(e.length,t.length);const r=[];for(let t=0;t<=e.length;t++){r[t]=[t]}for(let e=0;e<=t.length;e++){r[0][e]=e}for(let n=1;n<=t.length;n++){for(let s=1;s<=e.length;s++){let i=1;if(e[s-1]===t[n-1]){i=0}else{i=1}r[s][n]=Math.min(r[s-1][n]+1,r[s][n-1]+1,r[s-1][n-1]+i);if(s>1&&n>1&&e[s-1]===t[n-2]&&e[s-2]===t[n-1]){r[s][n]=Math.min(r[s][n],r[s-2][n-2]+1)}}}return r[e.length][t.length]}function suggestSimilar(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));const r=e.startsWith("--");if(r){e=e.slice(2);t=t.map((e=>e.slice(2)))}let s=[];let i=n;const o=.4;t.forEach((t=>{if(t.length<=1)return;const n=editDistance(e,t);const r=Math.max(e.length,t.length);const a=(r-n)/r;if(a>o){if(n<i){i=n;s=[t]}else if(n===i){s.push(t)}}}));s.sort(((e,t)=>e.localeCompare(t)));if(r){s=s.map((e=>`--${e}`))}if(s.length>1){return`\n(Did you mean one of ${s.join(", ")}?)`}if(s.length===1){return`\n(Did you mean ${s[0]}?)`}return""}t.suggestSimilar=suggestSimilar},8109:(e,t,n)=>{var r=n(5589);var s=n(9338);var i=n(6011);var o=n(5161);var a=n(2986);var u=n(2289);var c=n(45);function resolveCollection(e,t,n,r,s,i){const o=n.type==="block-map"?a.resolveBlockMap(e,t,n,r,i):n.type==="block-seq"?u.resolveBlockSeq(e,t,n,r,i):c.resolveFlowCollection(e,t,n,r,i);const l=o.constructor;if(s==="!"||s===l.tagName){o.tag=l.tagName;return o}if(s)o.tag=s;return o}function composeCollection(e,t,n,a,u){const c=!a?null:t.directives.tagName(a.source,(e=>u(a,"TAG_RESOLVE_FAILED",e)));const l=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!a||!c||c==="!"||c===i.YAMLMap.tagName&&l==="map"||c===o.YAMLSeq.tagName&&l==="seq"||!l){return resolveCollection(e,t,n,u,c)}let f=t.schema.tags.find((e=>e.tag===c&&e.collection===l));if(!f){const r=t.schema.knownTags[c];if(r&&r.collection===l){t.schema.tags.push(Object.assign({},r,{default:false}));f=r}else{if(r?.collection){u(a,"BAD_COLLECTION_TYPE",`${r.tag} used for ${l} collection, but expects ${r.collection}`,true)}else{u(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,true)}return resolveCollection(e,t,n,u,c)}}const h=resolveCollection(e,t,n,u,c,f);const p=f.resolve?.(h,(e=>u(a,"TAG_RESOLVE_FAILED",e)),t.options)??h;const d=r.isNode(p)?p:new s.Scalar(p);d.range=h.range;d.tag=c;if(f?.format)d.format=f.format;return d}t.composeCollection=composeCollection},5050:(e,t,n)=>{var r=n(42);var s=n(8676);var i=n(1250);var o=n(6985);function composeDoc(e,t,{offset:n,start:a,value:u,end:c},l){const f=Object.assign({_directives:t},e);const h=new r.Document(undefined,f);const p={atRoot:true,directives:h.directives,options:h.options,schema:h.schema};const d=o.resolveProps(a,{indicator:"doc-start",next:u??c?.[0],offset:n,onError:l,startOnNewline:true});if(d.found){h.directives.docStart=true;if(u&&(u.type==="block-map"||u.type==="block-seq")&&!d.hasNewline)l(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}h.contents=u?s.composeNode(p,u,d,l):s.composeEmptyNode(p,d.end,a,null,d,l);const g=h.contents.range[2];const y=i.resolveEnd(c,g,false,l);if(y.comment)h.comment=y.comment;h.range=[n,g,y.offset];return h}t.composeDoc=composeDoc},8676:(e,t,n)=>{var r=n(5639);var s=n(8109);var i=n(4766);var o=n(1250);var a=n(8781);const u={composeNode:composeNode,composeEmptyNode:composeEmptyNode};function composeNode(e,t,n,r){const{spaceBefore:o,comment:a,anchor:c,tag:l}=n;let f;let h=true;switch(t.type){case"alias":f=composeAlias(e,t,r);if(c||l)r(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":f=i.composeScalar(e,t,l,r);if(c)f.anchor=c.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":f=s.composeCollection(u,e,t,l,r);if(c)f.anchor=c.source.substring(1);break;default:{const s=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;r(t,"UNEXPECTED_TOKEN",s);f=composeEmptyNode(e,t.offset,undefined,null,n,r);h=false}}if(c&&f.anchor==="")r(c,"BAD_ALIAS","Anchor cannot be an empty string");if(o)f.spaceBefore=true;if(a){if(t.type==="scalar"&&t.source==="")f.comment=a;else f.commentBefore=a}if(e.options.keepSourceTokens&&h)f.srcToken=t;return f}function composeEmptyNode(e,t,n,r,{spaceBefore:s,comment:o,anchor:u,tag:c,end:l},f){const h={type:"scalar",offset:a.emptyScalarPosition(t,n,r),indent:-1,source:""};const p=i.composeScalar(e,h,c,f);if(u){p.anchor=u.source.substring(1);if(p.anchor==="")f(u,"BAD_ALIAS","Anchor cannot be an empty string")}if(s)p.spaceBefore=true;if(o){p.comment=o;p.range[2]=l}return p}function composeAlias({options:e},{offset:t,source:n,end:s},i){const a=new r.Alias(n.substring(1));if(a.source==="")i(t,"BAD_ALIAS","Alias cannot be an empty string");if(a.source.endsWith(":"))i(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",true);const u=t+n.length;const c=o.resolveEnd(s,u,e.strict,i);a.range=[t,u,c.offset];if(c.comment)a.comment=c.comment;return a}t.composeEmptyNode=composeEmptyNode;t.composeNode=composeNode},4766:(e,t,n)=>{var r=n(5589);var s=n(9338);var i=n(9485);var o=n(7578);function composeScalar(e,t,n,a){const{value:u,type:c,comment:l,range:f}=t.type==="block-scalar"?i.resolveBlockScalar(t,e.options.strict,a):o.resolveFlowScalar(t,e.options.strict,a);const h=n?e.directives.tagName(n.source,(e=>a(n,"TAG_RESOLVE_FAILED",e))):null;const p=n&&h?findScalarTagByName(e.schema,u,h,n,a):t.type==="scalar"?findScalarTagByTest(e,u,t,a):e.schema[r.SCALAR];let d;try{const i=p.resolve(u,(e=>a(n??t,"TAG_RESOLVE_FAILED",e)),e.options);d=r.isScalar(i)?i:new s.Scalar(i)}catch(e){const r=e instanceof Error?e.message:String(e);a(n??t,"TAG_RESOLVE_FAILED",r);d=new s.Scalar(u)}d.range=f;d.source=u;if(c)d.type=c;if(h)d.tag=h;if(p.format)d.format=p.format;if(l)d.comment=l;return d}function findScalarTagByName(e,t,n,s,i){if(n==="!")return e[r.SCALAR];const o=[];for(const t of e.tags){if(!t.collection&&t.tag===n){if(t.default&&t.test)o.push(t);else return t}}for(const e of o)if(e.test?.test(t))return e;const a=e.knownTags[n];if(a&&!a.collection){e.tags.push(Object.assign({},a,{default:false,test:undefined}));return a}i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str");return e[r.SCALAR]}function findScalarTagByTest({directives:e,schema:t},n,s,i){const o=t.tags.find((e=>e.default&&e.test?.test(n)))||t[r.SCALAR];if(t.compat){const a=t.compat.find((e=>e.default&&e.test?.test(n)))??t[r.SCALAR];if(o.tag!==a.tag){const t=e.tagString(o.tag);const n=e.tagString(a.tag);const r=`Value may be parsed as either ${t} or ${n}`;i(s,"TAG_RESOLVE_FAILED",r,true)}}return o}t.composeScalar=composeScalar},9493:(e,t,n)=>{var r=n(5400);var s=n(42);var i=n(4236);var o=n(5589);var a=n(5050);var u=n(1250);function getErrorPos(e){if(typeof e==="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+(typeof n==="string"?n.length:1)]}function parsePrelude(e){let t="";let n=false;let r=false;for(let s=0;s<e.length;++s){const i=e[s];switch(i[0]){case"#":t+=(t===""?"":r?"\n\n":"\n")+(i.substring(1)||" ");n=true;r=false;break;case"%":if(e[s+1]?.[0]!=="#")s+=1;n=false;break;default:if(!n)r=true;n=false}}return{comment:t,afterEmptyLine:r}}class Composer{constructor(e={}){this.doc=null;this.atDirectives=false;this.prelude=[];this.errors=[];this.warnings=[];this.onError=(e,t,n,r)=>{const s=getErrorPos(e);if(r)this.warnings.push(new i.YAMLWarning(s,t,n));else this.errors.push(new i.YAMLParseError(s,t,n))};this.directives=new r.Directives({version:e.version||"1.2"});this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:r}=parsePrelude(this.prelude);if(n){const s=e.contents;if(t){e.comment=e.comment?`${e.comment}\n${n}`:n}else if(r||e.directives.docStart||!s){e.commentBefore=n}else if(o.isCollection(s)&&!s.flow&&s.items.length>0){let e=s.items[0];if(o.isPair(e))e=e.key;const t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{const e=s.commentBefore;s.commentBefore=e?`${n}\n${e}`:n}}if(t){Array.prototype.push.apply(e.errors,this.errors);Array.prototype.push.apply(e.warnings,this.warnings)}else{e.errors=this.errors;e.warnings=this.warnings}this.prelude=[];this.errors=[];this.warnings=[]}streamInfo(){return{comment:parsePrelude(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=false,n=-1){for(const t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){if(process.env.LOG_STREAM)console.dir(e,{depth:null});switch(e.type){case"directive":this.directives.add(e.source,((t,n,r)=>{const s=getErrorPos(e);s[0]+=t;this.onError(s,"BAD_DIRECTIVE",n,r)}));this.prelude.push(e.source);this.atDirectives=true;break;case"document":{const t=a.composeDoc(this.options,this.directives,e,this.onError);if(this.atDirectives&&!t.directives.docStart)this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line");this.decorate(t,false);if(this.doc)yield this.doc;this.doc=t;this.atDirectives=false;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;const n=new i.YAMLParseError(getErrorPos(e),"UNEXPECTED_TOKEN",t);if(this.atDirectives||!this.doc)this.errors.push(n);else this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const t="Unexpected doc-end without preceding document";this.errors.push(new i.YAMLParseError(getErrorPos(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=true;const t=u.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);this.decorate(this.doc,true);if(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(getErrorPos(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=false,t=-1){if(this.doc){this.decorate(this.doc,true);yield this.doc;this.doc=null}else if(e){const e=Object.assign({_directives:this.directives},this.options);const n=new s.Document(undefined,e);if(this.atDirectives)this.onError(t,"MISSING_CHAR","Missing directives-end indicator line");n.range=[0,t,t];this.decorate(n,false);yield n}}}t.Composer=Composer},2986:(e,t,n)=>{var r=n(246);var s=n(6011);var i=n(6985);var o=n(976);var a=n(3669);var u=n(6899);const c="All mapping items must start at the same column";function resolveBlockMap({composeNode:e,composeEmptyNode:t},n,l,f,h){const p=h?.nodeClass??s.YAMLMap;const d=new p(n.schema);if(n.atRoot)n.atRoot=false;let g=l.offset;let y=null;for(const s of l.items){const{start:h,key:p,sep:b,value:v}=s;const w=i.resolveProps(h,{indicator:"explicit-key-ind",next:p??b?.[0],offset:g,onError:f,startOnNewline:true});const S=!w.found;if(S){if(p){if(p.type==="block-seq")f(g,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in p&&p.indent!==l.indent)f(g,"BAD_INDENT",c)}if(!w.anchor&&!w.tag&&!b){y=w.end;if(w.comment){if(d.comment)d.comment+="\n"+w.comment;else d.comment=w.comment}continue}if(w.hasNewlineAfterProp||o.containsNewline(p)){f(p??h[h.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}}else if(w.found?.indent!==l.indent){f(g,"BAD_INDENT",c)}const A=w.end;const E=p?e(n,p,w,f):t(n,A,h,null,w,f);if(n.schema.compat)a.flowIndentCheck(l.indent,p,f);if(u.mapIncludes(n,d.items,E))f(A,"DUPLICATE_KEY","Map keys must be unique");const D=i.resolveProps(b??[],{indicator:"map-value-ind",next:v,offset:E.range[2],onError:f,startOnNewline:!p||p.type==="block-scalar"});g=D.end;if(D.found){if(S){if(v?.type==="block-map"&&!D.hasNewline)f(g,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(n.options.strict&&w.start<D.found.offset-1024)f(E.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}const i=v?e(n,v,D,f):t(n,g,b,null,D,f);if(n.schema.compat)a.flowIndentCheck(l.indent,v,f);g=i.range[2];const o=new r.Pair(E,i);if(n.options.keepSourceTokens)o.srcToken=s;d.items.push(o)}else{if(S)f(E.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(D.comment){if(E.comment)E.comment+="\n"+D.comment;else E.comment=D.comment}const e=new r.Pair(E);if(n.options.keepSourceTokens)e.srcToken=s;d.items.push(e)}}if(y&&y<g)f(y,"IMPOSSIBLE","Map comment with trailing content");d.range=[l.offset,g,y??g];return d}t.resolveBlockMap=resolveBlockMap},9485:(e,t,n)=>{var r=n(9338);function resolveBlockScalar(e,t,n){const s=e.offset;const i=parseBlockScalarHeader(e,t,n);if(!i)return{value:"",type:null,comment:"",range:[s,s,s]};const o=i.mode===">"?r.Scalar.BLOCK_FOLDED:r.Scalar.BLOCK_LITERAL;const a=e.source?splitLines(e.source):[];let u=a.length;for(let e=a.length-1;e>=0;--e){const t=a[e][1];if(t===""||t==="\r")u=e;else break}if(u===0){const t=i.chomp==="+"&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let n=s+i.length;if(e.source)n+=e.source.length;return{value:t,type:o,comment:i.comment,range:[s,n,n]}}let c=e.indent+i.indent;let l=e.offset+i.length;let f=0;for(let e=0;e<u;++e){const[t,r]=a[e];if(r===""||r==="\r"){if(i.indent===0&&t.length>c)c=t.length}else{if(t.length<c){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";n(l+t.length,"MISSING_CHAR",e)}if(i.indent===0)c=t.length;f=e;break}l+=t.length+r.length+1}for(let e=a.length-1;e>=u;--e){if(a[e][0].length>c)u=e+1}let h="";let p="";let d=false;for(let e=0;e<f;++e)h+=a[e][0].slice(c)+"\n";for(let e=f;e<u;++e){let[t,s]=a[e];l+=t.length+s.length+1;const u=s[s.length-1]==="\r";if(u)s=s.slice(0,-1);if(s&&t.length<c){const e=i.indent?"explicit indentation indicator":"first line";const r=`Block scalar lines must not be less indented than their ${e}`;n(l-s.length-(u?2:1),"BAD_INDENT",r);t=""}if(o===r.Scalar.BLOCK_LITERAL){h+=p+t.slice(c)+s;p="\n"}else if(t.length>c||s[0]==="\t"){if(p===" ")p="\n";else if(!d&&p==="\n")p="\n\n";h+=p+t.slice(c)+s;p="\n";d=true}else if(s===""){if(p==="\n")h+="\n";else p="\n"}else{h+=p+s;p=" ";d=false}}switch(i.chomp){case"-":break;case"+":for(let e=u;e<a.length;++e)h+="\n"+a[e][0].slice(c);if(h[h.length-1]!=="\n")h+="\n";break;default:h+="\n"}const g=s+i.length+e.source.length;return{value:h,type:o,comment:i.comment,range:[s,g,g]}}function parseBlockScalarHeader({offset:e,props:t},n,r){if(t[0].type!=="block-scalar-header"){r(t[0],"IMPOSSIBLE","Block scalar header not found");return null}const{source:s}=t[0];const i=s[0];let o=0;let a="";let u=-1;for(let t=1;t<s.length;++t){const n=s[t];if(!a&&(n==="-"||n==="+"))a=n;else{const r=Number(n);if(!o&&r)o=r;else if(u===-1)u=e+t}}if(u!==-1)r(u,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let c=false;let l="";let f=s.length;for(let e=1;e<t.length;++e){const s=t[e];switch(s.type){case"space":c=true;case"newline":f+=s.source.length;break;case"comment":if(n&&!c){const e="Comments must be separated from other tokens by white space characters";r(s,"MISSING_CHAR",e)}f+=s.source.length;l=s.source.substring(1);break;case"error":r(s,"UNEXPECTED_TOKEN",s.message);f+=s.source.length;break;default:{const e=`Unexpected token in block scalar header: ${s.type}`;r(s,"UNEXPECTED_TOKEN",e);const t=s.source;if(t&&typeof t==="string")f+=t.length}}}return{mode:i,indent:o,chomp:a,comment:l,length:f}}function splitLines(e){const t=e.split(/\n( *)/);const n=t[0];const r=n.match(/^( *)/);const s=r?.[1]?[r[1],n.slice(r[1].length)]:["",n];const i=[s];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}t.resolveBlockScalar=resolveBlockScalar},2289:(e,t,n)=>{var r=n(5161);var s=n(6985);var i=n(3669);function resolveBlockSeq({composeNode:e,composeEmptyNode:t},n,o,a,u){const c=u?.nodeClass??r.YAMLSeq;const l=new c(n.schema);if(n.atRoot)n.atRoot=false;let f=o.offset;let h=null;for(const{start:r,value:u}of o.items){const c=s.resolveProps(r,{indicator:"seq-item-ind",next:u,offset:f,onError:a,startOnNewline:true});if(!c.found){if(c.anchor||c.tag||u){if(u&&u.type==="block-seq")a(c.end,"BAD_INDENT","All sequence items must start at the same column");else a(f,"MISSING_CHAR","Sequence item without - indicator")}else{h=c.end;if(c.comment)l.comment=c.comment;continue}}const p=u?e(n,u,c,a):t(n,c.end,r,null,c,a);if(n.schema.compat)i.flowIndentCheck(o.indent,u,a);f=p.range[2];l.items.push(p)}l.range=[o.offset,f,h??f];return l}t.resolveBlockSeq=resolveBlockSeq},1250:(e,t)=>{function resolveEnd(e,t,n,r){let s="";if(e){let i=false;let o="";for(const a of e){const{source:e,type:u}=a;switch(u){case"space":i=true;break;case"comment":{if(n&&!i)r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";if(!s)s=t;else s+=o+t;o="";break}case"newline":if(s)o+=e;i=true;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}t+=e.length}}return{comment:s,offset:t}}t.resolveEnd=resolveEnd},45:(e,t,n)=>{var r=n(5589);var s=n(246);var i=n(6011);var o=n(5161);var a=n(1250);var u=n(6985);var c=n(976);var l=n(6899);const f="Block collections are not allowed within flow collections";const isBlock=e=>e&&(e.type==="block-map"||e.type==="block-seq");function resolveFlowCollection({composeNode:e,composeEmptyNode:t},n,h,p,d){const g=h.start.source==="{";const y=g?"flow map":"flow sequence";const b=d?.nodeClass??(g?i.YAMLMap:o.YAMLSeq);const v=new b(n.schema);v.flow=true;const w=n.atRoot;if(w)n.atRoot=false;let S=h.offset+h.start.source.length;for(let o=0;o<h.items.length;++o){const a=h.items[o];const{start:d,key:b,sep:w,value:A}=a;const E=u.resolveProps(d,{flow:y,indicator:"explicit-key-ind",next:b??w?.[0],offset:S,onError:p,startOnNewline:false});if(!E.found){if(!E.anchor&&!E.tag&&!w&&!A){if(o===0&&E.comma)p(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`);else if(o<h.items.length-1)p(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${y}`);if(E.comment){if(v.comment)v.comment+="\n"+E.comment;else v.comment=E.comment}S=E.end;continue}if(!g&&n.options.strict&&c.containsNewline(b))p(b,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(o===0){if(E.comma)p(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`)}else{if(!E.comma)p(E.start,"MISSING_CHAR",`Missing , between ${y} items`);if(E.comment){let e="";e:for(const t of d){switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}}if(e){let t=v.items[v.items.length-1];if(r.isPair(t))t=t.value??t.key;if(t.comment)t.comment+="\n"+e;else t.comment=e;E.comment=E.comment.substring(e.length+1)}}}if(!g&&!w&&!E.found){const r=A?e(n,A,E,p):t(n,E.end,w,null,E,p);v.items.push(r);S=r.range[2];if(isBlock(A))p(r.range,"BLOCK_IN_FLOW",f)}else{const r=E.end;const o=b?e(n,b,E,p):t(n,r,d,null,E,p);if(isBlock(b))p(o.range,"BLOCK_IN_FLOW",f);const c=u.resolveProps(w??[],{flow:y,indicator:"map-value-ind",next:A,offset:o.range[2],onError:p,startOnNewline:false});if(c.found){if(!g&&!E.found&&n.options.strict){if(w)for(const e of w){if(e===c.found)break;if(e.type==="newline"){p(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(E.start<c.found.offset-1024)p(c.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(A){if("source"in A&&A.source&&A.source[0]===":")p(A,"MISSING_CHAR",`Missing space after : in ${y}`);else p(c.start,"MISSING_CHAR",`Missing , or : between ${y} items`)}const h=A?e(n,A,c,p):c.found?t(n,c.end,w,null,c,p):null;if(h){if(isBlock(A))p(h.range,"BLOCK_IN_FLOW",f)}else if(c.comment){if(o.comment)o.comment+="\n"+c.comment;else o.comment=c.comment}const D=new s.Pair(o,h);if(n.options.keepSourceTokens)D.srcToken=a;if(g){const e=v;if(l.mapIncludes(n,e.items,o))p(r,"DUPLICATE_KEY","Map keys must be unique");e.items.push(D)}else{const e=new i.YAMLMap(n.schema);e.flow=true;e.items.push(D);v.items.push(e)}S=h?h.range[2]:c.end}}const A=g?"}":"]";const[E,...D]=h.end;let C=S;if(E&&E.source===A)C=E.offset+E.source.length;else{const e=y[0].toUpperCase()+y.substring(1);const t=w?`${e} must end with a ${A}`:`${e} in block collection must be sufficiently indented and end with a ${A}`;p(S,w?"MISSING_CHAR":"BAD_INDENT",t);if(E&&E.source.length!==1)D.unshift(E)}if(D.length>0){const e=a.resolveEnd(D,C,n.options.strict,p);if(e.comment){if(v.comment)v.comment+="\n"+e.comment;else v.comment=e.comment}v.range=[h.offset,C,e.offset]}else{v.range=[h.offset,C,C]}return v}t.resolveFlowCollection=resolveFlowCollection},7578:(e,t,n)=>{var r=n(9338);var s=n(1250);function resolveFlowScalar(e,t,n){const{offset:i,type:o,source:a,end:u}=e;let c;let l;const _onError=(e,t,r)=>n(i+e,t,r);switch(o){case"scalar":c=r.Scalar.PLAIN;l=plainValue(a,_onError);break;case"single-quoted-scalar":c=r.Scalar.QUOTE_SINGLE;l=singleQuotedValue(a,_onError);break;case"double-quoted-scalar":c=r.Scalar.QUOTE_DOUBLE;l=doubleQuotedValue(a,_onError);break;default:n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`);return{value:"",type:null,comment:"",range:[i,i+a.length,i+a.length]}}const f=i+a.length;const h=s.resolveEnd(u,f,t,n);return{value:l,type:c,comment:h.comment,range:[i,f,h.offset]}}function plainValue(e,t){let n="";switch(e[0]){case"\t":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}if(n)t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`);return foldLines(e)}function singleQuotedValue(e,t){if(e[e.length-1]!=="'"||e.length===1)t(e.length,"MISSING_CHAR","Missing closing 'quote");return foldLines(e.slice(1,-1)).replace(/''/g,"'")}function foldLines(e){let t,n;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy");n=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch(e){t=/(.*?)[ \t]*\r?\n/sy;n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let s=r[1];let i=" ";let o=t.lastIndex;n.lastIndex=o;while(r=n.exec(e)){if(r[1]===""){if(i==="\n")s+=i;else i="\n"}else{s+=i+r[1];i=" "}o=n.lastIndex}const a=/[ \t]*(.*)/sy;a.lastIndex=o;r=a.exec(e);return s+i+(r?.[1]??"")}function doubleQuotedValue(e,t){let n="";for(let r=1;r<e.length-1;++r){const s=e[r];if(s==="\r"&&e[r+1]==="\n")continue;if(s==="\n"){const{fold:t,offset:s}=foldNewline(e,r);n+=t;r=s}else if(s==="\\"){let s=e[++r];const o=i[s];if(o)n+=o;else if(s==="\n"){s=e[r+1];while(s===" "||s==="\t")s=e[++r+1]}else if(s==="\r"&&e[r+1]==="\n"){s=e[++r+1];while(s===" "||s==="\t")s=e[++r+1]}else if(s==="x"||s==="u"||s==="U"){const i={x:2,u:4,U:8}[s];n+=parseCharCode(e,r+1,i,t);r+=i}else{const s=e.substr(r-1,2);t(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`);n+=s}}else if(s===" "||s==="\t"){const t=r;let i=e[r+1];while(i===" "||i==="\t")i=e[++r+1];if(i!=="\n"&&!(i==="\r"&&e[r+2]==="\n"))n+=r>t?e.slice(t,r+1):s}else{n+=s}}if(e[e.length-1]!=='"'||e.length===1)t(e.length,"MISSING_CHAR",'Missing closing "quote');return n}function foldNewline(e,t){let n="";let r=e[t+1];while(r===" "||r==="\t"||r==="\n"||r==="\r"){if(r==="\r"&&e[t+2]!=="\n")break;if(r==="\n")n+="\n";t+=1;r=e[t+1]}if(!n)n=" ";return{fold:n,offset:t}}const i={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function parseCharCode(e,t,n,r){const s=e.substr(t,n);const i=s.length===n&&/^[0-9a-fA-F]+$/.test(s);const o=i?parseInt(s,16):NaN;if(isNaN(o)){const s=e.substr(t-2,n+2);r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`);return s}return String.fromCodePoint(o)}t.resolveFlowScalar=resolveFlowScalar},6985:(e,t)=>{function resolveProps(e,{flow:t,indicator:n,next:r,offset:s,onError:i,startOnNewline:o}){let a=false;let u=o;let c=o;let l="";let f="";let h=false;let p=false;let d=false;let g=null;let y=null;let b=null;let v=null;let w=null;for(const r of e){if(d){if(r.type!=="space"&&r.type!=="newline"&&r.type!=="comma")i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");d=false}switch(r.type){case"space":if(!t&&u&&n!=="doc-start"&&r.source[0]==="\t")i(r,"TAB_AS_INDENT","Tabs are not allowed as indentation");c=true;break;case"comment":{if(!c)i(r,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=r.source.substring(1)||" ";if(!l)l=e;else l+=f+e;f="";u=false;break}case"newline":if(u){if(l)l+=r.source;else a=true}else f+=r.source;u=true;h=true;if(g||y)p=true;c=true;break;case"anchor":if(g)i(r,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(r.source.endsWith(":"))i(r.offset+r.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",true);g=r;if(w===null)w=r.offset;u=false;c=false;d=true;break;case"tag":{if(y)i(r,"MULTIPLE_TAGS","A node can have at most one tag");y=r;if(w===null)w=r.offset;u=false;c=false;d=true;break}case n:if(g||y)i(r,"BAD_PROP_ORDER",`Anchors and tags must be after the ${r.source} indicator`);if(v)i(r,"UNEXPECTED_TOKEN",`Unexpected ${r.source} in ${t??"collection"}`);v=r;u=false;c=false;break;case"comma":if(t){if(b)i(r,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`);b=r;u=false;c=false;break}default:i(r,"UNEXPECTED_TOKEN",`Unexpected ${r.type} token`);u=false;c=false}}const S=e[e.length-1];const A=S?S.offset+S.source.length:s;if(d&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!==""))i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");return{comma:b,found:v,spaceBefore:a,comment:l,hasNewline:h,hasNewlineAfterProp:p,anchor:g,tag:y,end:A,start:w??A}}t.resolveProps=resolveProps},976:(e,t)=>{function containsNewline(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return true;if(e.end)for(const t of e.end)if(t.type==="newline")return true;return false;case"flow-collection":for(const t of e.items){for(const e of t.start)if(e.type==="newline")return true;if(t.sep)for(const e of t.sep)if(e.type==="newline")return true;if(containsNewline(t.key)||containsNewline(t.value))return true}return false;default:return true}}t.containsNewline=containsNewline},8781:(e,t)=>{function emptyScalarPosition(e,t,n){if(t){if(n===null)n=t.length;for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}n=t[++r];while(n?.type==="space"){e+=n.source.length;n=t[++r]}break}}return e}t.emptyScalarPosition=emptyScalarPosition},3669:(e,t,n)=>{var r=n(976);function flowIndentCheck(e,t,n){if(t?.type==="flow-collection"){const s=t.end[0];if(s.indent===e&&(s.source==="]"||s.source==="}")&&r.containsNewline(t)){const e="Flow end indicator should be more indented than parent";n(s,"BAD_INDENT",e,true)}}}t.flowIndentCheck=flowIndentCheck},6899:(e,t,n)=>{var r=n(5589);function mapIncludes(e,t,n){const{uniqueKeys:s}=e.options;if(s===false)return false;const i=typeof s==="function"?s:(t,n)=>t===n||r.isScalar(t)&&r.isScalar(n)&&t.value===n.value&&!(t.value==="<<"&&e.schema.merge);return t.some((e=>i(e.key,n)))}t.mapIncludes=mapIncludes},42:(e,t,n)=>{var r=n(5639);var s=n(3466);var i=n(5589);var o=n(246);var a=n(2463);var u=n(6831);var c=n(5225);var l=n(8459);var f=n(3412);var h=n(9652);var p=n(5400);class Document{constructor(e,t,n){this.commentBefore=null;this.comment=null;this.errors=[];this.warnings=[];Object.defineProperty(this,i.NODE_TYPE,{value:i.DOC});let r=null;if(typeof t==="function"||Array.isArray(t)){r=t}else if(n===undefined&&t){n=t;t=undefined}const s=Object.assign({intAsBigInt:false,keepSourceTokens:false,logLevel:"warn",prettyErrors:true,strict:true,uniqueKeys:true,version:"1.2"},n);this.options=s;let{version:o}=s;if(n?._directives){this.directives=n._directives.atDocument();if(this.directives.yaml.explicit)o=this.directives.yaml.version}else this.directives=new p.Directives({version:o});this.setSchema(o,n);this.contents=e===undefined?null:this.createNode(e,r,n)}clone(){const e=Object.create(Document.prototype,{[i.NODE_TYPE]:{value:i.DOC}});e.commentBefore=this.commentBefore;e.comment=this.comment;e.errors=this.errors.slice();e.warnings=this.warnings.slice();e.options=Object.assign({},this.options);if(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;if(this.range)e.range=this.range.slice();return e}add(e){if(assertCollection(this.contents))this.contents.add(e)}addIn(e,t){if(assertCollection(this.contents))this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const n=l.anchorNames(this);e.anchor=!t||n.has(t)?l.findNewAnchor(t||"a",n):t}return new r.Alias(e.anchor)}createNode(e,t,n){let r=undefined;if(typeof t==="function"){e=t.call({"":e},"",e);r=t}else if(Array.isArray(t)){const keyToStr=e=>typeof e==="number"||e instanceof String||e instanceof Number;const e=t.filter(keyToStr).map(String);if(e.length>0)t=t.concat(e);r=t}else if(n===undefined&&t){n=t;t=undefined}const{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:u,onTagObj:c,tag:f}=n??{};const{onAnchor:p,setAnchors:d,sourceObjects:g}=l.createNodeAnchors(this,o||"a");const y={aliasDuplicateObjects:s??true,keepUndefined:u??false,onAnchor:p,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:g};const b=h.createNode(e,f,y);if(a&&i.isCollection(b))b.flow=true;d();return b}createPair(e,t,n={}){const r=this.createNode(e,null,n);const s=this.createNode(t,null,n);return new o.Pair(r,s)}delete(e){return assertCollection(this.contents)?this.contents.delete(e):false}deleteIn(e){if(s.isEmptyPath(e)){if(this.contents==null)return false;this.contents=null;return true}return assertCollection(this.contents)?this.contents.deleteIn(e):false}get(e,t){return i.isCollection(this.contents)?this.contents.get(e,t):undefined}getIn(e,t){if(s.isEmptyPath(e))return!t&&i.isScalar(this.contents)?this.contents.value:this.contents;return i.isCollection(this.contents)?this.contents.getIn(e,t):undefined}has(e){return i.isCollection(this.contents)?this.contents.has(e):false}hasIn(e){if(s.isEmptyPath(e))return this.contents!==undefined;return i.isCollection(this.contents)?this.contents.hasIn(e):false}set(e,t){if(this.contents==null){this.contents=s.collectionFromPath(this.schema,[e],t)}else if(assertCollection(this.contents)){this.contents.set(e,t)}}setIn(e,t){if(s.isEmptyPath(e)){this.contents=t}else if(this.contents==null){this.contents=s.collectionFromPath(this.schema,Array.from(e),t)}else if(assertCollection(this.contents)){this.contents.setIn(e,t)}}setSchema(e,t={}){if(typeof e==="number")e=String(e);let n;switch(e){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new p.Directives({version:"1.1"});n={merge:true,resolveKnownTags:false,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=e;else this.directives=new p.Directives({version:e});n={merge:false,resolveKnownTags:true,schema:"core"};break;case null:if(this.directives)delete this.directives;n=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new u.Schema(Object.assign(n,t));else throw new Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:s,reviver:i}={}){const o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===true,mapKeyWarned:false,maxAliasCount:typeof r==="number"?r:100};const u=a.toJS(this.contents,t??"",o);if(typeof s==="function")for(const{count:e,res:t}of o.anchors.values())s(t,e);return typeof i==="function"?f.applyReviver(i,{"":u},"",u):u}toJSON(e,t){return this.toJS({json:true,jsonArg:e,mapAsMap:false,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 c.stringifyDocument(this,e)}}function assertCollection(e){if(i.isCollection(e))return true;throw new Error("Expected a YAML collection as document contents")}t.Document=Document},8459:(e,t,n)=>{var r=n(5589);var s=n(6796);function anchorIsValid(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);const n=`Anchor must not contain whitespace or control characters: ${t}`;throw new Error(n)}return true}function anchorNames(e){const t=new Set;s.visit(e,{Value(e,n){if(n.anchor)t.add(n.anchor)}});return t}function findNewAnchor(e,t){for(let n=1;true;++n){const r=`${e}${n}`;if(!t.has(r))return r}}function createNodeAnchors(e,t){const n=[];const s=new Map;let i=null;return{onAnchor:r=>{n.push(r);if(!i)i=anchorNames(e);const s=findNewAnchor(t,i);i.add(s);return s},setAnchors:()=>{for(const e of n){const t=s.get(e);if(typeof t==="object"&&t.anchor&&(r.isScalar(t.node)||r.isCollection(t.node))){t.node.anchor=t.anchor}else{const t=new Error("Failed to resolve repeated object (this should not happen)");t.source=e;throw t}}},sourceObjects:s}}t.anchorIsValid=anchorIsValid;t.anchorNames=anchorNames;t.createNodeAnchors=createNodeAnchors;t.findNewAnchor=findNewAnchor},3412:(e,t)=>{function applyReviver(e,t,n,r){if(r&&typeof r==="object"){if(Array.isArray(r)){for(let t=0,n=r.length;t<n;++t){const n=r[t];const s=applyReviver(e,r,String(t),n);if(s===undefined)delete r[t];else if(s!==n)r[t]=s}}else if(r instanceof Map){for(const t of Array.from(r.keys())){const n=r.get(t);const s=applyReviver(e,r,t,n);if(s===undefined)r.delete(t);else if(s!==n)r.set(t,s)}}else if(r instanceof Set){for(const t of Array.from(r)){const n=applyReviver(e,r,t,t);if(n===undefined)r.delete(t);else if(n!==t){r.delete(t);r.add(n)}}}else{for(const[t,n]of Object.entries(r)){const s=applyReviver(e,r,t,n);if(s===undefined)delete r[t];else if(s!==n)r[t]=s}}}return e.call(t,n,r)}t.applyReviver=applyReviver},9652:(e,t,n)=>{var r=n(5639);var s=n(5589);var i=n(9338);const o="tag:yaml.org,2002:";function findTagObject(e,t,n){if(t){const e=n.filter((e=>e.tag===t));const r=e.find((e=>!e.format))??e[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find((t=>t.identify?.(e)&&!t.format))}function createNode(e,t,n){if(s.isDocument(e))e=e.contents;if(s.isNode(e))return e;if(s.isPair(e)){const t=n.schema[s.MAP].createNode?.(n.schema,null,n);t.items.push(e);return t}if(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt!=="undefined"&&e instanceof BigInt){e=e.valueOf()}const{aliasDuplicateObjects:a,onAnchor:u,onTagObj:c,schema:l,sourceObjects:f}=n;let h=undefined;if(a&&e&&typeof e==="object"){h=f.get(e);if(h){if(!h.anchor)h.anchor=u(e);return new r.Alias(h.anchor)}else{h={anchor:null,node:null};f.set(e,h)}}if(t?.startsWith("!!"))t=o+t.slice(2);let p=findTagObject(e,t,l.tags);if(!p){if(e&&typeof e.toJSON==="function"){e=e.toJSON()}if(!e||typeof e!=="object"){const t=new i.Scalar(e);if(h)h.node=t;return t}p=e instanceof Map?l[s.MAP]:Symbol.iterator in Object(e)?l[s.SEQ]:l[s.MAP]}if(c){c(p);delete n.onTagObj}const d=p?.createNode?p.createNode(n.schema,e,n):typeof p?.nodeClass?.from==="function"?p.nodeClass.from(n.schema,e,n):new i.Scalar(e);if(t)d.tag=t;else if(!p.default)d.tag=p.tag;if(h)h.node=d;return d}t.createNode=createNode},5400:(e,t,n)=>{var r=n(5589);var s=n(6796);const i={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};const escapeTagName=e=>e.replace(/[!,[\]{}]/g,(e=>i[e]));class Directives{constructor(e,t){this.docStart=null;this.docEnd=false;this.yaml=Object.assign({},Directives.defaultYaml,e);this.tags=Object.assign({},Directives.defaultTags,t)}clone(){const e=new Directives(this.yaml,this.tags);e.docStart=this.docStart;return e}atDocument(){const e=new Directives(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=true;break;case"1.2":this.atNextDocument=false;this.yaml={explicit:Directives.defaultYaml.explicit,version:"1.2"};this.tags=Object.assign({},Directives.defaultTags);break}return e}add(e,t){if(this.atNextDocument){this.yaml={explicit:Directives.defaultYaml.explicit,version:"1.1"};this.tags=Object.assign({},Directives.defaultTags);this.atNextDocument=false}const n=e.trim().split(/[ \t]+/);const r=n.shift();switch(r){case"%TAG":{if(n.length!==2){t(0,"%TAG directive should contain exactly two parts");if(n.length<2)return false}const[e,r]=n;this.tags[e]=r;return true}case"%YAML":{this.yaml.explicit=true;if(n.length!==1){t(0,"%YAML directive should contain exactly one part");return false}const[e]=n;if(e==="1.1"||e==="1.2"){this.yaml.version=e;return true}else{const n=/^\d+\.\d+$/.test(e);t(6,`Unsupported YAML version ${e}`,n);return false}}default:t(0,`Unknown directive ${r}`,true);return false}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!"){t(`Not a valid tag: ${e}`);return null}if(e[1]==="<"){const n=e.slice(2,-1);if(n==="!"||n==="!!"){t(`Verbatim tags aren't resolved, so ${e} is invalid.`);return null}if(e[e.length-1]!==">")t("Verbatim tags must end with a >");return n}const[,n,r]=e.match(/^(.*!)([^!]*)$/s);if(!r)t(`The ${e} tag has no suffix`);const s=this.tags[n];if(s){try{return s+decodeURIComponent(r)}catch(e){t(String(e));return null}}if(n==="!")return e;t(`Could not resolve tag: ${e}`);return null}tagString(e){for(const[t,n]of Object.entries(this.tags)){if(e.startsWith(n))return t+escapeTagName(e.substring(n.length))}return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[];const n=Object.entries(this.tags);let i;if(e&&n.length>0&&r.isNode(e.contents)){const t={};s.visit(e.contents,((e,n)=>{if(r.isNode(n)&&n.tag)t[n.tag]=true}));i=Object.keys(t)}else i=[];for(const[r,s]of n){if(r==="!!"&&s==="tag:yaml.org,2002:")continue;if(!e||i.some((e=>e.startsWith(s))))t.push(`%TAG ${r} ${s}`)}return t.join("\n")}}Directives.defaultYaml={explicit:false,version:"1.2"};Directives.defaultTags={"!!":"tag:yaml.org,2002:"};t.Directives=Directives},4236:(e,t)=>{class YAMLError extends Error{constructor(e,t,n,r){super();this.name=e;this.code=n;this.message=r;this.pos=t}}class YAMLParseError extends YAMLError{constructor(e,t,n){super("YAMLParseError",e,t,n)}}class YAMLWarning extends YAMLError{constructor(e,t,n){super("YAMLWarning",e,t,n)}}const prettifyError=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map((e=>t.linePos(e)));const{line:r,col:s}=n.linePos[0];n.message+=` at line ${r}, column ${s}`;let i=s-1;let o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){const e=Math.min(i-39,o.length-79);o="…"+o.substring(e);i-=e-1}if(o.length>80)o=o.substring(0,79)+"…";if(r>1&&/^ *$/.test(o.substring(0,i))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);if(n.length>80)n=n.substring(0,79)+"…\n";o=n+o}if(/[^ ]/.test(o)){let e=1;const t=n.linePos[1];if(t&&t.line===r&&t.col>s){e=Math.max(1,Math.min(t.col-s,80-i))}const a=" ".repeat(i)+"^".repeat(e);n.message+=`:\n\n${o}\n${a}\n`}};t.YAMLError=YAMLError;t.YAMLParseError=YAMLParseError;t.YAMLWarning=YAMLWarning;t.prettifyError=prettifyError},4083:(e,t,n)=>{var r;var s=n(9493);var i=n(42);var o=n(6831);var a=n(4236);var u=n(5639);var c=n(5589);var l=n(246);var f=n(9338);var h=n(6011);var p=n(5161);var d=n(9169);var g=n(5976);var y=n(1929);var b=n(3328);var v=n(8649);var w=n(6796);r=s.Composer;r=i.Document;r=o.Schema;r=a.YAMLError;r=a.YAMLParseError;r=a.YAMLWarning;r=u.Alias;r=c.isAlias;r=c.isCollection;r=c.isDocument;r=c.isMap;r=c.isNode;r=c.isPair;r=c.isScalar;r=c.isSeq;r=l.Pair;r=f.Scalar;r=h.YAMLMap;r=p.YAMLSeq;r=d;r=g.Lexer;r=y.LineCounter;r=b.Parser;r=v.parse;r=v.parseAllDocuments;r=v.parseDocument;r=v.stringify;r=w.visit;r=w.visitAsync},6909:(e,t)=>{function debug(e,...t){if(e==="debug")console.log(...t)}function warn(e,t){if(e==="debug"||e==="warn"){if(typeof process!=="undefined"&&process.emitWarning)process.emitWarning(t);else console.warn(t)}}t.debug=debug;t.warn=warn},5639:(e,t,n)=>{var r=n(8459);var s=n(6796);var i=n(5589);var o=n(1399);var a=n(2463);class Alias 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=undefined;s.visit(e,{Node:(e,n)=>{if(n===this)return s.visit.BREAK;if(n.anchor===this.source)t=n}});return t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:r,maxAliasCount:s}=t;const i=this.resolve(r);if(!i){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let o=n.get(i);if(!o){a.toJS(i,null,t);o=n.get(i)}if(!o||o.res===undefined){const e="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(e)}if(s>=0){o.count+=1;if(o.aliasCount===0)o.aliasCount=getAliasCount(r,i,n);if(o.count*o.aliasCount>s){const e="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(e)}}return o.res}toString(e,t,n){const s=`*${this.source}`;if(e){r.anchorIsValid(this.source);if(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`${s} `}return s}}function getAliasCount(e,t,n){if(i.isAlias(t)){const r=t.resolve(e);const s=n&&r&&n.get(r);return s?s.count*s.aliasCount:0}else if(i.isCollection(t)){let r=0;for(const s of t.items){const t=getAliasCount(e,s,n);if(t>r)r=t}return r}else if(i.isPair(t)){const r=getAliasCount(e,t.key,n);const s=getAliasCount(e,t.value,n);return Math.max(r,s)}return 1}t.Alias=Alias},3466:(e,t,n)=>{var r=n(9652);var s=n(5589);var i=n(1399);function collectionFromPath(e,t,n){let s=n;for(let e=t.length-1;e>=0;--e){const n=t[e];if(typeof n==="number"&&Number.isInteger(n)&&n>=0){const e=[];e[n]=s;s=e}else{s=new Map([[n,s]])}}return r.createNode(s,undefined,{aliasDuplicateObjects:false,keepUndefined:false,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const isEmptyPath=e=>e==null||typeof e==="object"&&!!e[Symbol.iterator]().next().done;class Collection extends i.NodeBase{constructor(e,t){super(e);Object.defineProperty(this,"schema",{value:t,configurable:true,enumerable:false,writable:true})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(e)t.schema=e;t.items=t.items.map((t=>s.isNode(t)||s.isPair(t)?t.clone(e):t));if(this.range)t.range=this.range.slice();return t}addIn(e,t){if(isEmptyPath(e))this.add(t);else{const[n,...r]=e;const i=this.get(n,true);if(s.isCollection(i))i.addIn(r,t);else if(i===undefined&&this.schema)this.set(n,collectionFromPath(this.schema,r,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){const[t,...n]=e;if(n.length===0)return this.delete(t);const r=this.get(t,true);if(s.isCollection(r))return r.deleteIn(n);else throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){const[n,...r]=e;const i=this.get(n,true);if(r.length===0)return!t&&s.isScalar(i)?i.value:i;else return s.isCollection(i)?i.getIn(r,t):undefined}hasAllNullValues(e){return this.items.every((t=>{if(!s.isPair(t))return false;const n=t.value;return n==null||e&&s.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag}))}hasIn(e){const[t,...n]=e;if(n.length===0)return this.has(t);const r=this.get(t,true);return s.isCollection(r)?r.hasIn(n):false}setIn(e,t){const[n,...r]=e;if(r.length===0){this.set(n,t)}else{const e=this.get(n,true);if(s.isCollection(e))e.setIn(r,t);else if(e===undefined&&this.schema)this.set(n,collectionFromPath(this.schema,r,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}}Collection.maxFlowStringSingleLineLength=60;t.Collection=Collection;t.collectionFromPath=collectionFromPath;t.isEmptyPath=isEmptyPath},1399:(e,t,n)=>{var r=n(3412);var s=n(5589);var i=n(2463);class NodeBase{constructor(e){Object.defineProperty(this,s.NODE_TYPE,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)e.range=this.range.slice();return e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:o,reviver:a}={}){if(!s.isDocument(e))throw new TypeError("A document argument is required");const u={anchors:new Map,doc:e,keep:true,mapAsMap:t===true,mapKeyWarned:false,maxAliasCount:typeof n==="number"?n:100};const c=i.toJS(this,"",u);if(typeof o==="function")for(const{count:e,res:t}of u.anchors.values())o(t,e);return typeof a==="function"?r.applyReviver(a,{"":c},"",c):c}}t.NodeBase=NodeBase},246:(e,t,n)=>{var r=n(9652);var s=n(4875);var i=n(4676);var o=n(5589);function createPair(e,t,n){const s=r.createNode(e,undefined,n);const i=r.createNode(t,undefined,n);return new Pair(s,i)}class Pair{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:n}=this;if(o.isNode(t))t=t.clone(e);if(o.isNode(n))n=n.clone(e);return new Pair(t,n)}toJSON(e,t){const n=t?.mapAsMap?new Map:{};return i.addPairToJSMap(t,n,this)}toString(e,t,n){return e?.doc?s.stringifyPair(this,e,t,n):JSON.stringify(this)}}t.Pair=Pair;t.createPair=createPair},9338:(e,t,n)=>{var r=n(5589);var s=n(1399);var i=n(2463);const isScalarValue=e=>!e||typeof e!=="function"&&typeof e!=="object";class Scalar extends s.NodeBase{constructor(e){super(r.SCALAR);this.value=e}toJSON(e,t){return t?.keep?this.value:i.toJS(this.value,e,t)}toString(){return String(this.value)}}Scalar.BLOCK_FOLDED="BLOCK_FOLDED";Scalar.BLOCK_LITERAL="BLOCK_LITERAL";Scalar.PLAIN="PLAIN";Scalar.QUOTE_DOUBLE="QUOTE_DOUBLE";Scalar.QUOTE_SINGLE="QUOTE_SINGLE";t.Scalar=Scalar;t.isScalarValue=isScalarValue},6011:(e,t,n)=>{var r=n(2466);var s=n(4676);var i=n(3466);var o=n(5589);var a=n(246);var u=n(9338);function findPair(e,t){const n=o.isScalar(t)?t.value:t;for(const r of e){if(o.isPair(r)){if(r.key===t||r.key===n)return r;if(o.isScalar(r.key)&&r.key.value===n)return r}}return undefined}class YAMLMap extends i.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(o.MAP,e);this.items=[]}static from(e,t,n){const{keepUndefined:r,replacer:s}=n;const i=new this(e);const add=(e,o)=>{if(typeof s==="function")o=s.call(t,e,o);else if(Array.isArray(s)&&!s.includes(e))return;if(o!==undefined||r)i.items.push(a.createPair(e,o,n))};if(t instanceof Map){for(const[e,n]of t)add(e,n)}else if(t&&typeof t==="object"){for(const e of Object.keys(t))add(e,t[e])}if(typeof e.sortMapEntries==="function"){i.items.sort(e.sortMapEntries)}return i}add(e,t){let n;if(o.isPair(e))n=e;else if(!e||typeof e!=="object"||!("key"in e)){n=new a.Pair(e,e?.value)}else n=new a.Pair(e.key,e.value);const r=findPair(this.items,n.key);const s=this.schema?.sortMapEntries;if(r){if(!t)throw new Error(`Key ${n.key} already set`);if(o.isScalar(r.value)&&u.isScalarValue(n.value))r.value.value=n.value;else r.value=n.value}else if(s){const e=this.items.findIndex((e=>s(n,e)<0));if(e===-1)this.items.push(n);else this.items.splice(e,0,n)}else{this.items.push(n)}}delete(e){const t=findPair(this.items,e);if(!t)return false;const n=this.items.splice(this.items.indexOf(t),1);return n.length>0}get(e,t){const n=findPair(this.items,e);const r=n?.value;return(!t&&o.isScalar(r)?r.value:r)??undefined}has(e){return!!findPair(this.items,e)}set(e,t){this.add(new a.Pair(e,t),true)}toJSON(e,t,n){const r=n?new n:t?.mapAsMap?new Map:{};if(t?.onCreate)t.onCreate(r);for(const e of this.items)s.addPairToJSMap(t,r,e);return r}toString(e,t,n){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`)}if(!e.allNullValues&&this.hasAllNullValues(false))e=Object.assign({},e,{allNullValues:true});return r.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}t.YAMLMap=YAMLMap;t.findPair=findPair},5161:(e,t,n)=>{var r=n(9652);var s=n(2466);var i=n(3466);var o=n(5589);var a=n(9338);var u=n(2463);class YAMLSeq 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=asItemIndex(e);if(typeof t!=="number")return false;const n=this.items.splice(t,1);return n.length>0}get(e,t){const n=asItemIndex(e);if(typeof n!=="number")return undefined;const r=this.items[n];return!t&&o.isScalar(r)?r.value:r}has(e){const t=asItemIndex(e);return typeof t==="number"&&t<this.items.length}set(e,t){const n=asItemIndex(e);if(typeof n!=="number")throw new Error(`Expected a valid index, not ${e}.`);const r=this.items[n];if(o.isScalar(r)&&a.isScalarValue(t))r.value=t;else this.items[n]=t}toJSON(e,t){const n=[];if(t?.onCreate)t.onCreate(n);let r=0;for(const e of this.items)n.push(u.toJS(e,String(r++),t));return n}toString(e,t,n){if(!e)return JSON.stringify(this);return s.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t})}static from(e,t,n){const{replacer:s}=n;const i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let o of t){if(typeof s==="function"){const n=t instanceof Set?o:String(e++);o=s.call(t,n,o)}i.items.push(r.createNode(o,undefined,n))}}return i}}function asItemIndex(e){let t=o.isScalar(e)?e.value:e;if(t&&typeof t==="string")t=Number(t);return typeof t==="number"&&Number.isInteger(t)&&t>=0?t:null}t.YAMLSeq=YAMLSeq},4676:(e,t,n)=>{var r=n(6909);var s=n(8409);var i=n(5589);var o=n(9338);var a=n(2463);const u="<<";function addPairToJSMap(e,t,{key:n,value:r}){if(e?.doc.schema.merge&&isMergeKey(n)){r=i.isAlias(r)?r.resolve(e.doc):r;if(i.isSeq(r))for(const n of r.items)mergeToJSMap(e,t,n);else if(Array.isArray(r))for(const n of r)mergeToJSMap(e,t,n);else mergeToJSMap(e,t,r)}else{const s=a.toJS(n,"",e);if(t instanceof Map){t.set(s,a.toJS(r,s,e))}else if(t instanceof Set){t.add(s)}else{const i=stringifyKey(n,s,e);const o=a.toJS(r,i,e);if(i in t)Object.defineProperty(t,i,{value:o,writable:true,enumerable:true,configurable:true});else t[i]=o}}return t}const isMergeKey=e=>e===u||i.isScalar(e)&&e.value===u&&(!e.type||e.type===o.Scalar.PLAIN);function mergeToJSMap(e,t,n){const r=e&&i.isAlias(n)?n.resolve(e.doc):n;if(!i.isMap(r))throw new Error("Merge sources must be maps or map aliases");const s=r.toJSON(null,e,Map);for(const[e,n]of s){if(t instanceof Map){if(!t.has(e))t.set(e,n)}else if(t instanceof Set){t.add(e)}else if(!Object.prototype.hasOwnProperty.call(t,e)){Object.defineProperty(t,e,{value:n,writable:true,enumerable:true,configurable:true})}}return t}function stringifyKey(e,t,n){if(t===null)return"";if(typeof t!=="object")return String(t);if(i.isNode(e)&&n?.doc){const t=s.createStringifyContext(n.doc,{});t.anchors=new Set;for(const e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=true;t.inStringifyKey=true;const i=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(i);if(e.length>40)e=e.substring(0,36)+'..."';r.warn(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`);n.mapKeyWarned=true}return i}return JSON.stringify(t)}t.addPairToJSMap=addPairToJSMap},5589:(e,t)=>{const n=Symbol.for("yaml.alias");const r=Symbol.for("yaml.document");const s=Symbol.for("yaml.map");const i=Symbol.for("yaml.pair");const o=Symbol.for("yaml.scalar");const a=Symbol.for("yaml.seq");const u=Symbol.for("yaml.node.type");const isAlias=e=>!!e&&typeof e==="object"&&e[u]===n;const isDocument=e=>!!e&&typeof e==="object"&&e[u]===r;const isMap=e=>!!e&&typeof e==="object"&&e[u]===s;const isPair=e=>!!e&&typeof e==="object"&&e[u]===i;const isScalar=e=>!!e&&typeof e==="object"&&e[u]===o;const isSeq=e=>!!e&&typeof e==="object"&&e[u]===a;function isCollection(e){if(e&&typeof e==="object")switch(e[u]){case s:case a:return true}return false}function isNode(e){if(e&&typeof e==="object")switch(e[u]){case n:case s:case o:case a:return true}return false}const hasAnchor=e=>(isScalar(e)||isCollection(e))&&!!e.anchor;t.ALIAS=n;t.DOC=r;t.MAP=s;t.NODE_TYPE=u;t.PAIR=i;t.SCALAR=o;t.SEQ=a;t.hasAnchor=hasAnchor;t.isAlias=isAlias;t.isCollection=isCollection;t.isDocument=isDocument;t.isMap=isMap;t.isNode=isNode;t.isPair=isPair;t.isScalar=isScalar;t.isSeq=isSeq},2463:(e,t,n)=>{var r=n(5589);function toJS(e,t,n){if(Array.isArray(e))return e.map(((e,t)=>toJS(e,String(t),n)));if(e&&typeof e.toJSON==="function"){if(!n||!r.hasAnchor(e))return e.toJSON(t,n);const s={aliasCount:0,count:1,res:undefined};n.anchors.set(e,s);n.onCreate=e=>{s.res=e;delete n.onCreate};const i=e.toJSON(t,n);if(n.onCreate)n.onCreate(i);return i}if(typeof e==="bigint"&&!n?.keep)return Number(e);return e}t.toJS=toJS},9027:(e,t,n)=>{var r=n(9485);var s=n(7578);var i=n(4236);var o=n(6226);function resolveAsScalar(e,t=true,n){if(e){const _onError=(e,t,r)=>{const s=typeof e==="number"?e:Array.isArray(e)?e[0]:e.offset;if(n)n(s,t,r);else throw new i.YAMLParseError([s,s+1],t,r)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return s.resolveFlowScalar(e,t,_onError);case"block-scalar":return r.resolveBlockScalar(e,t,_onError)}}return null}function createScalarToken(e,t){const{implicitKey:n=false,indent:r,inFlow:s=false,offset:i=-1,type:a="PLAIN"}=t;const u=o.stringifyString({type:a,value:e},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:s,options:{blockQuote:true,lineWidth:-1}});const c=t.end??[{type:"newline",offset:-1,indent:r,source:"\n"}];switch(u[0]){case"|":case">":{const e=u.indexOf("\n");const t=u.substring(0,e);const n=u.substring(e+1)+"\n";const s=[{type:"block-scalar-header",offset:i,indent:r,source:t}];if(!addEndtoBlockProps(s,c))s.push({type:"newline",offset:-1,indent:r,source:"\n"});return{type:"block-scalar",offset:i,indent:r,props:s,source:n}}case'"':return{type:"double-quoted-scalar",offset:i,indent:r,source:u,end:c};case"'":return{type:"single-quoted-scalar",offset:i,indent:r,source:u,end:c};default:return{type:"scalar",offset:i,indent:r,source:u,end:c}}}function setScalarValue(e,t,n={}){let{afterKey:r=false,implicitKey:s=false,inFlow:i=false,type:a}=n;let u="indent"in e?e.indent:null;if(r&&typeof u==="number")u+=2;if(!a)switch(e.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if(t.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a=t.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}const c=o.stringifyString({type:a,value:t},{implicitKey:s||u===null,indent:u!==null&&u>0?" ".repeat(u):"",inFlow:i,options:{blockQuote:true,lineWidth:-1}});switch(c[0]){case"|":case">":setBlockScalarValue(e,c);break;case'"':setFlowScalarValue(e,c,"double-quoted-scalar");break;case"'":setFlowScalarValue(e,c,"single-quoted-scalar");break;default:setFlowScalarValue(e,c,"scalar")}}function setBlockScalarValue(e,t){const n=t.indexOf("\n");const r=t.substring(0,n);const s=t.substring(n+1)+"\n";if(e.type==="block-scalar"){const t=e.props[0];if(t.type!=="block-scalar-header")throw new Error("Invalid block scalar header");t.source=r;e.source=s}else{const{offset:t}=e;const n="indent"in e?e.indent:-1;const i=[{type:"block-scalar-header",offset:t,indent:n,source:r}];if(!addEndtoBlockProps(i,"end"in e?e.end:undefined))i.push({type:"newline",offset:-1,indent:n,source:"\n"});for(const t of Object.keys(e))if(t!=="type"&&t!=="offset")delete e[t];Object.assign(e,{type:"block-scalar",indent:n,props:i,source:s})}}function addEndtoBlockProps(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":e.push(n);return true}return false}function setFlowScalarValue(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n;e.source=t;break;case"block-scalar":{const r=e.props.slice(1);let s=t.length;if(e.props[0].type==="block-scalar-header")s-=e.props[0].source.length;for(const e of r)e.offset+=s;delete e.props;Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{const r=e.offset+t.length;const s={type:"newline",offset:r,indent:e.indent,source:"\n"};delete e.items;Object.assign(e,{type:n,source:t,end:[s]});break}default:{const r="indent"in e?e.indent:-1;const s="end"in e&&Array.isArray(e.end)?e.end.filter((e=>e.type==="space"||e.type==="comment"||e.type==="newline")):[];for(const t of Object.keys(e))if(t!=="type"&&t!=="offset")delete e[t];Object.assign(e,{type:n,indent:r,source:t,end:s})}}}t.createScalarToken=createScalarToken;t.resolveAsScalar=resolveAsScalar;t.setScalarValue=setScalarValue},6307:(e,t)=>{const stringify=e=>"type"in e?stringifyToken(e):stringifyItem(e);function stringifyToken(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=stringifyToken(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=stringifyItem(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=stringifyItem(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=stringifyItem(e);if(e.end)for(const n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const n of e.end)t+=n.source;return t}}}function stringifyItem({start:e,key:t,sep:n,value:r}){let s="";for(const t of e)s+=t.source;if(t)s+=stringifyToken(t);if(n)for(const e of n)s+=e.source;if(r)s+=stringifyToken(r);return s}t.stringify=stringify},8497:(e,t)=>{const n=Symbol("break visit");const r=Symbol("skip children");const s=Symbol("remove item");function visit(e,t){if("type"in e&&e.type==="document")e={start:e.start,value:e.value};_visit(Object.freeze([]),e,t)}visit.BREAK=n;visit.SKIP=r;visit.REMOVE=s;visit.itemAtPath=(e,t)=>{let n=e;for(const[e,r]of t){const t=n?.[e];if(t&&"items"in t){n=t.items[r]}else return undefined}return n};visit.parentCollection=(e,t)=>{const n=visit.itemAtPath(e,t.slice(0,-1));const r=t[t.length-1][0];const s=n?.[r];if(s&&"items"in s)return s;throw new Error("Parent collection not found")};function _visit(e,t,r){let i=r(t,e);if(typeof i==="symbol")return i;for(const o of["key","value"]){const a=t[o];if(a&&"items"in a){for(let t=0;t<a.items.length;++t){const i=_visit(Object.freeze(e.concat([[o,t]])),a.items[t],r);if(typeof i==="number")t=i-1;else if(i===n)return n;else if(i===s){a.items.splice(t,1);t-=1}}if(typeof i==="function"&&o==="key")i=i(t,e)}}return typeof i==="function"?i(t,e):i}t.visit=visit},9169:(e,t,n)=>{var r=n(9027);var s=n(6307);var i=n(8497);const o="\ufeff";const a="";const u="";const c="";const isCollection=e=>!!e&&"items"in e;const isScalar=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function prettyToken(e){switch(e){case o:return"<BOM>";case a:return"<DOC>";case u:return"<FLOW_END>";case c:return"<SCALAR>";default:return JSON.stringify(e)}}function tokenType(e){switch(e){case o:return"byte-order-mark";case a:return"doc-mode";case u:return"flow-error-end";case c: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}t.createScalarToken=r.createScalarToken;t.resolveAsScalar=r.resolveAsScalar;t.setScalarValue=r.setScalarValue;t.stringify=s.stringify;t.visit=i.visit;t.BOM=o;t.DOCUMENT=a;t.FLOW_END=u;t.SCALAR=c;t.isCollection=isCollection;t.isScalar=isScalar;t.prettyToken=prettyToken;t.tokenType=tokenType},5976:(e,t,n)=>{var r=n(9169);function isEmpty(e){switch(e){case undefined:case" ":case"\n":case"\r":case"\t":return true;default:return false}}const s="0123456789ABCDEFabcdef".split("");const i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split("");const o=",[]{}".split("");const a=" ,[]{}\n\r\t".split("");const isNotAnchorChar=e=>!e||a.includes(e);class Lexer{constructor(){this.atEnd=false;this.blockScalarIndent=-1;this.blockScalarKeep=false;this.buffer="";this.flowKey=false;this.flowLevel=0;this.indentNext=0;this.indentValue=0;this.lineEndPos=null;this.next=null;this.pos=0}*lex(e,t=false){if(e){this.buffer=this.buffer?this.buffer+e:e;this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";while(n&&(t||this.hasChars(1)))n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos;let t=this.buffer[e];while(t===" "||t==="\t")t=this.buffer[++e];if(!t||t==="#"||t==="\n")return true;if(t==="\r")return this.buffer[e+1]==="\n";return false}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;while(t===" ")t=this.buffer[++n+e];if(t==="\r"){const t=this.buffer[n+e+1];if(t==="\n"||!t&&!this.atEnd)return e+n+1}return t==="\n"||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t==="-"||t==="."){const t=this.buffer.substr(e,3);if((t==="---"||t==="...")&&isEmpty(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;if(typeof e!=="number"||e!==-1&&e<this.pos){e=this.buffer.indexOf("\n",this.pos);this.lineEndPos=e}if(e===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[e-1]==="\r")e-=1;return this.buffer.substring(this.pos,e)}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){this.buffer=this.buffer.substring(this.pos);this.pos=0;this.lineEndPos=null;this.next=e;return 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(e===null)return this.setNext("stream");if(e[0]===r.BOM){yield*this.pushCount(1);e=e.substring(1)}if(e[0]==="%"){let t=e.length;const n=e.indexOf("#");if(n!==-1){const r=e[n-1];if(r===" "||r==="\t")t=n-1}while(true){const n=e[t-1];if(n===" "||n==="\t")t-=1;else break}const r=(yield*this.pushCount(t))+(yield*this.pushSpaces(true));yield*this.pushCount(e.length-r);this.pushNewline();return"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(true);yield*this.pushCount(e.length-t);yield*this.pushNewline();return"stream"}yield r.DOCUMENT;return 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==="---"&&isEmpty(this.charAt(3))){yield*this.pushCount(3);this.indentValue=0;this.indentNext=0;return"doc"}else if(e==="..."&&isEmpty(this.charAt(3))){yield*this.pushCount(3);return"stream"}}this.indentValue=yield*this.pushSpaces(false);if(this.indentNext>this.indentValue&&!isEmpty(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&isEmpty(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(true));this.indentNext=this.indentValue+1;this.indentValue+=e;return yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(true);const e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case undefined:yield*this.pushNewline();return yield*this.parseLineStart();case"{":case"[":yield*this.pushCount(1);this.flowKey=false;this.flowLevel=1;return"flow";case"}":case"]":yield*this.pushCount(1);return"doc";case"*":yield*this.pushUntil(isNotAnchorChar);return"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":t+=(yield*this.parseBlockScalarHeader());t+=(yield*this.pushSpaces(true));yield*this.pushCount(e.length-t);yield*this.pushNewline();return yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t;let n=-1;do{e=yield*this.pushNewline();if(e>0){t=yield*this.pushSpaces(false);this.indentValue=n=t}else{t=0}t+=(yield*this.pushSpaces(true))}while(e+t>0);const s=this.getLine();if(s===null)return this.setNext("flow");if(n!==-1&&n<this.indentNext&&s[0]!=="#"||n===0&&(s.startsWith("---")||s.startsWith("..."))&&isEmpty(s[3])){const e=n===this.indentNext-1&&this.flowLevel===1&&(s[0]==="]"||s[0]==="}");if(!e){this.flowLevel=0;yield r.FLOW_END;return yield*this.parseLineStart()}}let i=0;while(s[i]===","){i+=(yield*this.pushCount(1));i+=(yield*this.pushSpaces(true));this.flowKey=false}i+=(yield*this.pushIndicators());switch(s[i]){case undefined:return"flow";case"#":yield*this.pushCount(s.length-i);return"flow";case"{":case"[":yield*this.pushCount(1);this.flowKey=false;this.flowLevel+=1;return"flow";case"}":case"]":yield*this.pushCount(1);this.flowKey=true;this.flowLevel-=1;return this.flowLevel?"flow":"doc";case"*":yield*this.pushUntil(isNotAnchorChar);return"flow";case'"':case"'":this.flowKey=true;return yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||isEmpty(e)||e===","){this.flowKey=false;yield*this.pushCount(1);yield*this.pushSpaces(true);return"flow"}}default:this.flowKey=false;return yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if(e==="'"){while(t!==-1&&this.buffer[t+1]==="'")t=this.buffer.indexOf("'",t+2)}else{while(t!==-1){let e=0;while(this.buffer[t-1-e]==="\\")e+=1;if(e%2===0)break;t=this.buffer.indexOf('"',t+1)}}const n=this.buffer.substring(0,t);let r=n.indexOf("\n",this.pos);if(r!==-1){while(r!==-1){const e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf("\n",e)}if(r!==-1){t=r-(n[r-1]==="\r"?2:1)}}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}yield*this.pushToIndex(t+1,false);return this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1;this.blockScalarKeep=false;let e=this.pos;while(true){const t=this.buffer[++e];if(t==="+")this.blockScalarKeep=true;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil((e=>isEmpty(e)||e==="#"))}*parseBlockScalar(){let e=this.pos-1;let t=0;let n;e:for(let r=this.pos;n=this.buffer[r];++r){switch(n){case" ":t+=1;break;case"\n":e=r;t=0;break;case"\r":{const e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if(e==="\n")break}default:break e}}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=t;else this.indentNext+=this.blockScalarIndent;do{const t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf("\n",t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}if(!this.blockScalarKeep){do{let n=e-1;let r=this.buffer[n];if(r==="\r")r=this.buffer[--n];const s=n;while(r===" "||r==="\t")r=this.buffer[--n];if(r==="\n"&&n>=this.pos&&n+1+t>s)e=n;else break}while(true)}yield r.SCALAR;yield*this.pushToIndex(e+1,true);return yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t=this.pos-1;let n=this.pos-1;let s;while(s=this.buffer[++n]){if(s===":"){const r=this.buffer[n+1];if(isEmpty(r)||e&&r===",")break;t=n}else if(isEmpty(s)){let r=this.buffer[n+1];if(s==="\r"){if(r==="\n"){n+=1;s="\n";r=this.buffer[n+1]}else t=n}if(r==="#"||e&&o.includes(r))break;if(s==="\n"){const e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&o.includes(s))break;t=n}}if(!s&&!this.atEnd)return this.setNext("plain-scalar");yield r.SCALAR;yield*this.pushToIndex(t+1,true);return e?"flow":"doc"}*pushCount(e){if(e>0){yield this.buffer.substr(this.pos,e);this.pos+=e;return e}return 0}*pushToIndex(e,t){const n=this.buffer.slice(this.pos,e);if(n){yield n;this.pos+=n.length;return n.length}else if(t)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(true))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(isNotAnchorChar))+(yield*this.pushSpaces(true))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0;const t=this.charAt(1);if(isEmpty(t)||e&&o.includes(t)){if(!e)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=false;return(yield*this.pushCount(1))+(yield*this.pushSpaces(true))+(yield*this.pushIndicators())}}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2;let t=this.buffer[e];while(!isEmpty(t)&&t!==">")t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,false)}else{let e=this.pos+1;let t=this.buffer[e];while(t){if(i.includes(t))t=this.buffer[++e];else if(t==="%"&&s.includes(this.buffer[e+1])&&s.includes(this.buffer[e+2])){t=this.buffer[e+=3]}else break}return yield*this.pushToIndex(e,false)}}*pushNewline(){const e=this.buffer[this.pos];if(e==="\n")return yield*this.pushCount(1);else if(e==="\r"&&this.charAt(1)==="\n")return yield*this.pushCount(2);else return 0}*pushSpaces(e){let t=this.pos-1;let n;do{n=this.buffer[++t]}while(n===" "||e&&n==="\t");const r=t-this.pos;if(r>0){yield this.buffer.substr(this.pos,r);this.pos=t}return r}*pushUntil(e){let t=this.pos;let n=this.buffer[t];while(!e(n))n=this.buffer[++t];return yield*this.pushToIndex(t,false)}}t.Lexer=Lexer},1929:(e,t)=>{class LineCounter{constructor(){this.lineStarts=[];this.addNewLine=e=>this.lineStarts.push(e);this.linePos=e=>{let t=0;let n=this.lineStarts.length;while(t<n){const r=t+n>>1;if(this.lineStarts[r]<e)t=r+1;else n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};const r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}}t.LineCounter=LineCounter},3328:(e,t,n)=>{var r=n(9169);var s=n(5976);function includesToken(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return true;return false}function findNonEmptyIndex(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 isFlowToken(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return true;default:return false}}function getPrevProps(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 getFirstKeyStartProps(e){if(e.length===0)return[];let t=e.length;e:while(--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}}while(e[++t]?.type==="space"){}return e.splice(t,e.length)}function fixFlowSeqItems(e){if(e.start.type==="flow-seq-start"){for(const t of e.items){if(t.sep&&!t.value&&!includesToken(t.start,"explicit-key-ind")&&!includesToken(t.sep,"map-value-ind")){if(t.key)t.value=t.key;delete t.key;if(isFlowToken(t.value)){if(t.value.end)Array.prototype.push.apply(t.value.end,t.sep);else t.value.end=t.sep}else Array.prototype.push.apply(t.start,t.sep);delete t.sep}}}}class Parser{constructor(e){this.atNewLine=true;this.atScalar=false;this.indent=0;this.offset=0;this.onKeyLine=false;this.stack=[];this.source="";this.type="";this.lexer=new s.Lexer;this.onNewLine=e}*parse(e,t=false){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(const n of this.lexer.lex(e,t))yield*this.next(n);if(!t)yield*this.end()}*next(e){this.source=e;if(process.env.LOG_TOKENS)console.log("|",r.prettyToken(e));if(this.atScalar){this.atScalar=false;yield*this.step();this.offset+=e.length;return}const t=r.tokenType(e);if(!t){const t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e});this.offset+=e.length}else if(t==="scalar"){this.atNewLine=false;this.atScalar=true;this.type="scalar"}else{this.type=t;yield*this.step();switch(t){case"newline":this.atNewLine=true;this.indent=0;if(this.onNewLine)this.onNewLine(this.offset+e.length);break;case"space":if(this.atNewLine&&e[0]===" ")this.indent+=e.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=e.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=false}this.offset+=e.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){const e={type:this.type,offset:this.offset,indent:this.indent,source:this.source};return e}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(!t){const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}else if(this.stack.length===0){yield t}else{const e=this.peek(1);if(t.type==="block-scalar"){t.indent="indent"in e?e.indent:0}else if(t.type==="flow-collection"&&e.type==="document"){t.indent=0}if(t.type==="flow-collection")fixFlowSeqItems(t);switch(e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]});this.onKeyLine=true;return}else if(n.sep){n.value=t}else{Object.assign(n,{key:t,sep:[]});this.onKeyLine=!includesToken(n.start,"explicit-key-ind");return}break}case"block-seq":{const n=e.items[e.items.length-1];if(n.value)e.items.push({start:[],value:t});else n.value=t;break}case"flow-collection":{const n=e.items[e.items.length-1];if(!n||n.value)e.items.push({start:[],key:t,sep:[]});else if(n.sep)n.value=t;else Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop();yield*this.pop(t)}if((e.type==="document"||e.type==="block-map"||e.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){const n=t.items[t.items.length-1];if(n&&!n.sep&&!n.value&&n.start.length>0&&findNonEmptyIndex(n.start)===-1&&(t.indent===0||n.start.every((e=>e.type!=="comment"||e.indent<t.indent)))){if(e.type==="document")e.end=n.start;else e.items.push({start:n.start});t.items.splice(-1,1)}}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")e.start.push(this.sourceToken);this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{if(findNonEmptyIndex(e.start)!==-1){yield*this.pop();yield*this.step()}else e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const t=this.startBlockValue(e);if(t)this.stack.push(t);else{yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}}*scalar(e){if(this.type==="map-value-ind"){const t=getPrevProps(this.peek(2));const n=getFirstKeyStartProps(t);let r;if(e.end){r=e.end;r.push(this.sourceToken);delete e.end}else r=[this.sourceToken];const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=true;this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":e.source=this.source;this.atNewLine=true;this.indent=0;if(this.onNewLine){let e=this.source.indexOf("\n")+1;while(e!==0){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":this.onKeyLine=false;if(t.value){const n="end"in t.value?t.value.end:undefined;const r=Array.isArray(n)?n[n.length-1]:undefined;if(r?.type==="comment")n?.push(this.sourceToken);else e.items.push({start:[this.sourceToken]})}else if(t.sep){t.sep.push(this.sourceToken)}else{t.start.push(this.sourceToken)}return;case"space":case"comment":if(t.value){e.items.push({start:[this.sourceToken]})}else if(t.sep){t.sep.push(this.sourceToken)}else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2];const r=n?.value?.end;if(Array.isArray(r)){Array.prototype.push.apply(r,t.start);r.push(this.sourceToken);e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const n=!this.onKeyLine&&this.indent===e.indent&&t.sep;let r=[];if(n&&t.sep&&!t.value){const n=[];for(let r=0;r<t.sep.length;++r){const s=t.sep[r];switch(s.type){case"newline":n.push(r);break;case"space":break;case"comment":if(s.indent>e.indent)n.length=0;break;default:n.length=0}}if(n.length>=2)r=t.sep.splice(n[1])}switch(this.type){case"anchor":case"tag":if(n||t.value){r.push(this.sourceToken);e.items.push({start:r});this.onKeyLine=true}else if(t.sep){t.sep.push(this.sourceToken)}else{t.start.push(this.sourceToken)}return;case"explicit-key-ind":if(!t.sep&&!includesToken(t.start,"explicit-key-ind")){t.start.push(this.sourceToken)}else if(n||t.value){r.push(this.sourceToken);e.items.push({start:r})}else{this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]})}this.onKeyLine=true;return;case"map-value-ind":if(includesToken(t.start,"explicit-key-ind")){if(!t.sep){if(includesToken(t.start,"newline")){Object.assign(t,{key:null,sep:[this.sourceToken]})}else{const e=getFirstKeyStartProps(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}}else if(t.value){e.items.push({start:[],key:null,sep:[this.sourceToken]})}else if(includesToken(t.sep,"map-value-ind")){this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]})}else if(isFlowToken(t.key)&&!includesToken(t.sep,"newline")){const e=getFirstKeyStartProps(t.start);const n=t.key;const r=t.sep;r.push(this.sourceToken);delete t.key,delete t.sep;this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else if(r.length>0){t.sep=t.sep.concat(r,this.sourceToken)}else{t.sep.push(this.sourceToken)}}else{if(!t.sep){Object.assign(t,{key:null,sep:[this.sourceToken]})}else if(t.value||n){e.items.push({start:r,key:null,sep:[this.sourceToken]})}else if(includesToken(t.sep,"map-value-ind")){this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]})}else{t.sep.push(this.sourceToken)}}this.onKeyLine=true;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);if(n||t.value){e.items.push({start:r,key:s,sep:[]});this.onKeyLine=true}else if(t.sep){this.stack.push(s)}else{Object.assign(t,{key:s,sep:[]});this.onKeyLine=true}return}default:{const s=this.startBlockValue(e);if(s){if(n&&s.type!=="block-seq"&&includesToken(t.start,"explicit-key-ind")){e.items.push({start:r})}this.stack.push(s);return}}}}yield*this.pop();yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const n="end"in t.value?t.value.end:undefined;const r=Array.isArray(n)?n[n.length-1]:undefined;if(r?.type==="comment")n?.push(this.sourceToken);else e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2];const r=n?.value?.end;if(Array.isArray(r)){Array.prototype.push.apply(r,t.start);r.push(this.sourceToken);e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;if(t.value||includesToken(t.start,"seq-item-ind"))e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop();yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let e;do{yield*this.pop();e=this.peek(1)}while(e&&e.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!t||t.sep)e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return;case"map-value-ind":if(!t||t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!t||t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);if(!t||t.value)e.items.push({start:[],key:n,sep:[]});else if(t.sep)this.stack.push(n);else Object.assign(t,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const n=this.startBlockValue(e);if(n)this.stack.push(n);else{yield*this.pop();yield*this.step()}}else{const t=this.peek(2);if(t.type==="block-map"&&(this.type==="map-value-ind"&&t.indent===e.indent||this.type==="newline"&&!t.items[t.items.length-1].sep)){yield*this.pop();yield*this.step()}else if(this.type==="map-value-ind"&&t.type!=="flow-collection"){const n=getPrevProps(t);const r=getFirstKeyStartProps(n);fixFlowSeqItems(e);const s=e.end.splice(1,e.end.length);s.push(this.sourceToken);const i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:s}]};this.onKeyLine=true;this.stack[this.stack.length-1]=i}else{yield*this.lineEnd(e)}}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;while(e!==0){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=true;const t=getPrevProps(e);const n=getFirstKeyStartProps(t);n.push(this.sourceToken);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n}]}}case"map-value-ind":{this.onKeyLine=true;const t=getPrevProps(e);const n=getFirstKeyStartProps(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){if(this.type!=="comment")return false;if(this.indent<=t)return false;return e.every((e=>e.type==="newline"||e.type==="space"))}*documentEnd(e){if(this.type!=="doc-mode"){if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop();yield*this.step();break;case"newline":this.onKeyLine=false;case"space":case"comment":default:if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}t.Parser=Parser},8649:(e,t,n)=>{var r=n(9493);var s=n(42);var i=n(4236);var o=n(6909);var a=n(1929);var u=n(3328);function parseOptions(e){const t=e.prettyErrors!==false;const n=e.lineCounter||t&&new a.LineCounter||null;return{lineCounter:n,prettyErrors:t}}function parseAllDocuments(e,t={}){const{lineCounter:n,prettyErrors:s}=parseOptions(t);const o=new u.Parser(n?.addNewLine);const a=new r.Composer(t);const c=Array.from(a.compose(o.parse(e)));if(s&&n)for(const t of c){t.errors.forEach(i.prettifyError(e,n));t.warnings.forEach(i.prettifyError(e,n))}if(c.length>0)return c;return Object.assign([],{empty:true},a.streamInfo())}function parseDocument(e,t={}){const{lineCounter:n,prettyErrors:s}=parseOptions(t);const o=new u.Parser(n?.addNewLine);const a=new r.Composer(t);let c=null;for(const t of a.compose(o.parse(e),true,e.length)){if(!c)c=t;else if(c.options.logLevel!=="silent"){c.errors.push(new i.YAMLParseError(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}if(s&&n){c.errors.forEach(i.prettifyError(e,n));c.warnings.forEach(i.prettifyError(e,n))}return c}function parse(e,t,n){let r=undefined;if(typeof t==="function"){r=t}else if(n===undefined&&t&&typeof t==="object"){n=t}const s=parseDocument(e,n);if(!s)return null;s.warnings.forEach((e=>o.warn(s.options.logLevel,e)));if(s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];else s.errors=[]}return s.toJS(Object.assign({reviver:r},n))}function stringify(e,t,n){let r=null;if(typeof t==="function"||Array.isArray(t)){r=t}else if(n===undefined&&t){n=t}if(typeof n==="string")n=n.length;if(typeof n==="number"){const e=Math.round(n);n=e<1?undefined:e>8?{indent:8}:{indent:e}}if(e===undefined){const{keepUndefined:e}=n??t??{};if(!e)return undefined}return new s.Document(e,r,n).toString(n)}t.parse=parse;t.parseAllDocuments=parseAllDocuments;t.parseDocument=parseDocument;t.stringify=stringify},6831:(e,t,n)=>{var r=n(5589);var s=n(83);var i=n(1693);var o=n(2201);var a=n(4138);const sortMapEntriesByKey=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class Schema{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:u,schema:c,sortMapEntries:l,toStringDefaults:f}){this.compat=Array.isArray(e)?a.getTags(e,"compat"):e?a.getTags(null,e):null;this.merge=!!n;this.name=typeof c==="string"&&c||"core";this.knownTags=u?a.coreKnownTags:{};this.tags=a.getTags(t,this.name);this.toStringOptions=f??null;Object.defineProperty(this,r.MAP,{value:s.map});Object.defineProperty(this,r.SCALAR,{value:o.string});Object.defineProperty(this,r.SEQ,{value:i.seq});this.sortMapEntries=typeof l==="function"?l:l===true?sortMapEntriesByKey:null}clone(){const e=Object.create(Schema.prototype,Object.getOwnPropertyDescriptors(this));e.tags=this.tags.slice();return e}}t.Schema=Schema},83:(e,t,n)=>{var r=n(5589);var s=n(6011);const i={collection:"map",default:true,nodeClass:s.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){if(!r.isMap(e))t("Expected a mapping for this tag");return e},createNode:(e,t,n)=>s.YAMLMap.from(e,t,n)};t.map=i},6703:(e,t,n)=>{var r=n(9338);const s={identify:e=>e==null,createNode:()=>new r.Scalar(null),default:true,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new r.Scalar(null),stringify:({source:e},t)=>typeof e==="string"&&s.test.test(e)?e:t.options.nullStr};t.nullTag=s},1693:(e,t,n)=>{var r=n(5589);var s=n(5161);const i={collection:"seq",default:true,nodeClass:s.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){if(!r.isSeq(e))t("Expected a sequence for this tag");return e},createNode:(e,t,n)=>s.YAMLSeq.from(e,t,n)};t.seq=i},2201:(e,t,n)=>{var r=n(6226);const s={identify:e=>typeof e==="string",default:true,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,s){t=Object.assign({actualString:true},t);return r.stringifyString(e,t,n,s)}};t.string=s},2045:(e,t,n)=>{var r=n(9338);const s={identify:e=>typeof e==="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new r.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&s.test.test(e)){const n=e[0]==="t"||e[0]==="T";if(t===n)return e}return t?n.options.trueStr:n.options.falseStr}};t.boolTag=s},6810:(e,t,n)=>{var r=n(9338);var s=n(4174);const i={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:s.stringifyNumber};const o={identify:e=>typeof e==="number",default:true,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():s.stringifyNumber(e)}};const a={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new r.Scalar(parseFloat(e));const n=e.indexOf(".");if(n!==-1&&e[e.length-1]==="0")t.minFractionDigits=e.length-n-1;return t},stringify:s.stringifyNumber};t.float=a;t.floatExp=o;t.floatNaN=i},3019:(e,t,n)=>{var r=n(4174);const intIdentify=e=>typeof e==="bigint"||Number.isInteger(e);const intResolve=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function intStringify(e,t,n){const{value:s}=e;if(intIdentify(s)&&s>=0)return n+s.toString(t);return r.stringifyNumber(e)}const s={identify:e=>intIdentify(e)&&e>=0,default:true,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>intResolve(e,2,8,n),stringify:e=>intStringify(e,8,"0o")};const i={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>intResolve(e,0,10,n),stringify:r.stringifyNumber};const o={identify:e=>intIdentify(e)&&e>=0,default:true,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>intResolve(e,2,16,n),stringify:e=>intStringify(e,16,"0x")};t.int=i;t.intHex=o;t.intOct=s},27:(e,t,n)=>{var r=n(83);var s=n(6703);var i=n(1693);var o=n(2201);var a=n(2045);var u=n(6810);var c=n(3019);const l=[r.map,i.seq,o.string,s.nullTag,a.boolTag,c.intOct,c.int,c.intHex,u.floatNaN,u.floatExp,u.float];t.schema=l},4545:(e,t,n)=>{var r=n(9338);var s=n(83);var i=n(1693);function intIdentify(e){return typeof e==="bigint"||Number.isInteger(e)}const stringifyJSON=({value:e})=>JSON.stringify(e);const o=[{identify:e=>typeof e==="string",default:true,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:stringifyJSON},{identify:e=>e==null,createNode:()=>new r.Scalar(null),default:true,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:stringifyJSON},{identify:e=>typeof e==="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>e==="true",stringify:stringifyJSON},{identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>intIdentify(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:stringifyJSON}];const a={default:true,tag:"",test:/^/,resolve(e,t){t(`Unresolved plain scalar ${JSON.stringify(e)}`);return e}};const u=[s.map,i.seq].concat(o,a);t.schema=u},4138:(e,t,n)=>{var r=n(83);var s=n(6703);var i=n(1693);var o=n(2201);var a=n(2045);var u=n(6810);var c=n(3019);var l=n(27);var f=n(4545);var h=n(5724);var p=n(8974);var d=n(9841);var g=n(5389);var y=n(7847);var b=n(1156);const v=new Map([["core",l.schema],["failsafe",[r.map,i.seq,o.string]],["json",f.schema],["yaml11",g.schema],["yaml-1.1",g.schema]]);const w={binary:h.binary,bool:a.boolTag,float:u.float,floatExp:u.floatExp,floatNaN:u.floatNaN,floatTime:b.floatTime,int:c.int,intHex:c.intHex,intOct:c.intOct,intTime:b.intTime,map:r.map,null:s.nullTag,omap:p.omap,pairs:d.pairs,seq:i.seq,set:y.set,timestamp:b.timestamp};const S={"tag:yaml.org,2002:binary":h.binary,"tag:yaml.org,2002:omap":p.omap,"tag:yaml.org,2002:pairs":d.pairs,"tag:yaml.org,2002:set":y.set,"tag:yaml.org,2002:timestamp":b.timestamp};function getTags(e,t){let n=v.get(t);if(!n){if(Array.isArray(e))n=[];else{const e=Array.from(v.keys()).filter((e=>e!=="yaml11")).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}}if(Array.isArray(e)){for(const t of e)n=n.concat(t)}else if(typeof e==="function"){n=e(n.slice())}return n.map((e=>{if(typeof e!=="string")return e;const t=w[e];if(t)return t;const n=Object.keys(w).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag "${e}"; use one of ${n}`)}))}t.coreKnownTags=S;t.getTags=getTags},5724:(e,t,n)=>{var r=n(9338);var s=n(6226);const i={identify:e=>e instanceof Uint8Array,default:false,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof Buffer==="function"){return Buffer.from(e,"base64")}else if(typeof atob==="function"){const t=atob(e.replace(/[\n\r]/g,""));const n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}else{t("This environment does not support reading binary tags; either Buffer or atob is required");return e}},stringify({comment:e,type:t,value:n},i,o,a){const u=n;let c;if(typeof Buffer==="function"){c=u instanceof Buffer?u.toString("base64"):Buffer.from(u.buffer).toString("base64")}else if(typeof btoa==="function"){let e="";for(let t=0;t<u.length;++t)e+=String.fromCharCode(u[t]);c=btoa(e)}else{throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required")}if(!t)t=r.Scalar.BLOCK_LITERAL;if(t!==r.Scalar.QUOTE_DOUBLE){const e=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth);const n=Math.ceil(c.length/e);const s=new Array(n);for(let t=0,r=0;t<n;++t,r+=e){s[t]=c.substr(r,e)}c=s.join(t===r.Scalar.BLOCK_LITERAL?"\n":" ")}return s.stringifyString({comment:e,type:t,value:c},i,o,a)}};t.binary=i},2631:(e,t,n)=>{var r=n(9338);function boolStringify({value:e,source:t},n){const r=e?s:i;if(t&&r.test.test(t))return t;return e?n.options.trueStr:n.options.falseStr}const s={identify:e=>e===true,default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new r.Scalar(true),stringify:boolStringify};const i={identify:e=>e===false,default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>new r.Scalar(false),stringify:boolStringify};t.falseTag=i;t.trueTag=s},8035:(e,t,n)=>{var r=n(9338);var s=n(4174);const i={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:s.stringifyNumber};const o={identify:e=>typeof e==="number",default:true,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():s.stringifyNumber(e)}};const a={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new r.Scalar(parseFloat(e.replace(/_/g,"")));const n=e.indexOf(".");if(n!==-1){const r=e.substring(n+1).replace(/_/g,"");if(r[r.length-1]==="0")t.minFractionDigits=r.length}return t},stringify:s.stringifyNumber};t.float=a;t.floatExp=o;t.floatNaN=i},9503:(e,t,n)=>{var r=n(4174);const intIdentify=e=>typeof e==="bigint"||Number.isInteger(e);function intResolve(e,t,n,{intAsBigInt:r}){const s=e[0];if(s==="-"||s==="+")t+=1;e=e.substring(t).replace(/_/g,"");if(r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const t=BigInt(e);return s==="-"?BigInt(-1)*t:t}const i=parseInt(e,n);return s==="-"?-1*i:i}function intStringify(e,t,n){const{value:s}=e;if(intIdentify(s)){const e=s.toString(t);return s<0?"-"+n+e.substr(1):n+e}return r.stringifyNumber(e)}const s={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>intResolve(e,2,2,n),stringify:e=>intStringify(e,2,"0b")};const i={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>intResolve(e,1,8,n),stringify:e=>intStringify(e,8,"0")};const o={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>intResolve(e,0,10,n),stringify:r.stringifyNumber};const a={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>intResolve(e,2,16,n),stringify:e=>intStringify(e,16,"0x")};t.int=o;t.intBin=s;t.intHex=a;t.intOct=i},8974:(e,t,n)=>{var r=n(5589);var s=n(2463);var i=n(6011);var o=n(5161);var a=n(9841);class YAMLOMap 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=YAMLOMap.tag}toJSON(e,t){if(!t)return super.toJSON(e);const n=new Map;if(t?.onCreate)t.onCreate(n);for(const e of this.items){let i,o;if(r.isPair(e)){i=s.toJS(e.key,"",t);o=s.toJS(e.value,i,t)}else{i=s.toJS(e,"",t)}if(n.has(i))throw new Error("Ordered maps must not include duplicate keys");n.set(i,o)}return n}static from(e,t,n){const r=a.createPairs(e,t,n);const s=new this;s.items=r.items;return s}}YAMLOMap.tag="tag:yaml.org,2002:omap";const u={collection:"seq",identify:e=>e instanceof Map,nodeClass:YAMLOMap,default:false,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=a.resolvePairs(e,t);const s=[];for(const{key:e}of n.items){if(r.isScalar(e)){if(s.includes(e.value)){t(`Ordered maps must not include duplicate keys: ${e.value}`)}else{s.push(e.value)}}}return Object.assign(new YAMLOMap,n)},createNode:(e,t,n)=>YAMLOMap.from(e,t,n)};t.YAMLOMap=YAMLOMap;t.omap=u},9841:(e,t,n)=>{var r=n(5589);var s=n(246);var i=n(9338);var o=n(5161);function resolvePairs(e,t){if(r.isSeq(e)){for(let n=0;n<e.items.length;++n){let o=e.items[n];if(r.isPair(o))continue;else if(r.isMap(o)){if(o.items.length>1)t("Each pair must have its own sequence indicator");const e=o.items[0]||new s.Pair(new i.Scalar(null));if(o.commentBefore)e.key.commentBefore=e.key.commentBefore?`${o.commentBefore}\n${e.key.commentBefore}`:o.commentBefore;if(o.comment){const t=e.value??e.key;t.comment=t.comment?`${o.comment}\n${t.comment}`:o.comment}o=e}e.items[n]=r.isPair(o)?o:new s.Pair(o)}}else t("Expected a sequence for this tag");return e}function createPairs(e,t,n){const{replacer:r}=n;const 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){if(typeof r==="function")e=r.call(t,String(a++),e);let o,u;if(Array.isArray(e)){if(e.length===2){o=e[0];u=e[1]}else throw new TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){const t=Object.keys(e);if(t.length===1){o=t[0];u=e[o]}else{throw new TypeError(`Expected tuple with one key, not ${t.length} keys`)}}else{o=e}i.items.push(s.createPair(o,u,n))}return i}const a={collection:"seq",default:false,tag:"tag:yaml.org,2002:pairs",resolve:resolvePairs,createNode:createPairs};t.createPairs=createPairs;t.pairs=a;t.resolvePairs=resolvePairs},5389:(e,t,n)=>{var r=n(83);var s=n(6703);var i=n(1693);var o=n(2201);var a=n(5724);var u=n(2631);var c=n(8035);var l=n(9503);var f=n(8974);var h=n(9841);var p=n(7847);var d=n(1156);const g=[r.map,i.seq,o.string,s.nullTag,u.trueTag,u.falseTag,l.intBin,l.intOct,l.int,l.intHex,c.floatNaN,c.floatExp,c.float,a.binary,f.omap,h.pairs,p.set,d.intTime,d.floatTime,d.timestamp];t.schema=g},7847:(e,t,n)=>{var r=n(5589);var s=n(246);var i=n(6011);class YAMLSet extends i.YAMLMap{constructor(e){super(e);this.tag=YAMLSet.tag}add(e){let t;if(r.isPair(e))t=e;else if(e&&typeof e==="object"&&"key"in e&&"value"in e&&e.value===null)t=new s.Pair(e.key,null);else t=new s.Pair(e,null);const n=i.findPair(this.items,t.key);if(!n)this.items.push(t)}get(e,t){const n=i.findPair(this.items,e);return!t&&r.isPair(n)?r.isScalar(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const n=i.findPair(this.items,e);if(n&&!t){this.items.splice(this.items.indexOf(n),1)}else if(!n&&t){this.items.push(new s.Pair(e))}}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(true))return super.toString(Object.assign({},e,{allNullValues:true}),t,n);else throw new Error("Set items must all have null values")}static from(e,t,n){const{replacer:r}=n;const i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t){if(typeof r==="function")e=r.call(t,e,e);i.items.push(s.createPair(e,null,n))}return i}}YAMLSet.tag="tag:yaml.org,2002:set";const o={collection:"map",identify:e=>e instanceof Set,nodeClass:YAMLSet,default:false,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>YAMLSet.from(e,t,n),resolve(e,t){if(r.isMap(e)){if(e.hasAllNullValues(true))return Object.assign(new YAMLSet,e);else t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};t.YAMLSet=YAMLSet;t.set=o},1156:(e,t,n)=>{var r=n(4174);function parseSexagesimal(e,t){const n=e[0];const r=n==="-"||n==="+"?e.substring(1):e;const num=e=>t?BigInt(e):Number(e);const s=r.replace(/_/g,"").split(":").reduce(((e,t)=>e*num(60)+num(t)),num(0));return n==="-"?num(-1)*s:s}function stringifySexagesimal(e){let{value:t}=e;let num=e=>e;if(typeof t==="bigint")num=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return r.stringifyNumber(e);let n="";if(t<0){n="-";t*=num(-1)}const s=num(60);const i=[t%s];if(t<60){i.unshift(0)}else{t=(t-i[0])/s;i.unshift(t%s);if(t>=60){t=(t-i[0])/s;i.unshift(t)}}return n+i.map((e=>String(e).padStart(2,"0"))).join(":").replace(/000000\d*$/,"")}const s={identify:e=>typeof e==="bigint"||Number.isInteger(e),default:true,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>parseSexagesimal(e,n),stringify:stringifySexagesimal};const i={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>parseSexagesimal(e,false),stringify:stringifySexagesimal};const o={identify:e=>e instanceof Date,default:true,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(o.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,s,i,a,u]=t.map(Number);const c=t[7]?Number((t[7]+"00").substr(1,3)):0;let l=Date.UTC(n,r-1,s,i||0,a||0,u||0,c);const f=t[8];if(f&&f!=="Z"){let e=parseSexagesimal(f,false);if(Math.abs(e)<30)e*=60;l-=6e4*e}return new Date(l)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};t.floatTime=i;t.intTime=s;t.timestamp=o},2889:(e,t)=>{const n="flow";const r="block";const s="quoted";function foldFlowLines(e,t,n="flow",{indentAtStart:i,lineWidth:o=80,minContentWidth:a=20,onFold:u,onOverflow:c}={}){if(!o||o<0)return e;const l=Math.max(1+a,1+o-t.length);if(e.length<=l)return e;const f=[];const h={};let p=o-t.length;if(typeof i==="number"){if(i>o-Math.max(2,a))f.push(0);else p=o-i}let d=undefined;let g=undefined;let y=false;let b=-1;let v=-1;let w=-1;if(n===r){b=consumeMoreIndentedLines(e,b);if(b!==-1)p=b+l}for(let t;t=e[b+=1];){if(n===s&&t==="\\"){v=b;switch(e[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}w=b}if(t==="\n"){if(n===r)b=consumeMoreIndentedLines(e,b);p=b+l;d=undefined}else{if(t===" "&&g&&g!==" "&&g!=="\n"&&g!=="\t"){const t=e[b+1];if(t&&t!==" "&&t!=="\n"&&t!=="\t")d=b}if(b>=p){if(d){f.push(d);p=d+l;d=undefined}else if(n===s){while(g===" "||g==="\t"){g=t;t=e[b+=1];y=true}const n=b>w+1?b-2:v-1;if(h[n])return e;f.push(n);h[n]=true;p=n+l;d=undefined}else{y=true}}}g=t}if(y&&c)c();if(f.length===0)return e;if(u)u();let S=e.slice(0,f[0]);for(let r=0;r<f.length;++r){const i=f[r];const o=f[r+1]||e.length;if(i===0)S=`\n${t}${e.slice(0,o)}`;else{if(n===s&&h[i])S+=`${e[i]}\\`;S+=`\n${t}${e.slice(i+1,o)}`}}return S}function consumeMoreIndentedLines(e,t){let n=e[t+1];while(n===" "||n==="\t"){do{n=e[t+=1]}while(n&&n!=="\n");n=e[t+1]}return t}t.FOLD_BLOCK=r;t.FOLD_FLOW=n;t.FOLD_QUOTED=s;t.foldFlowLines=foldFlowLines},8409:(e,t,n)=>{var r=n(8459);var s=n(5589);var i=n(5182);var o=n(6226);function createStringifyContext(e,t){const n=Object.assign({blockQuote:true,commentString:i.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:false,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:true,indentSeq:true,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:false,singleQuote:null,trueStr:"true",verifyAliasOrder:true},e.schema.toStringOptions,t);let r;switch(n.collectionStyle){case"block":r=false;break;case"flow":r=true;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent==="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function getTagObject(e,t){if(t.tag){const n=e.filter((e=>e.tag===t.tag));if(n.length>0)return n.find((e=>e.format===t.format))??n[0]}let n=undefined;let r;if(s.isScalar(t)){r=t.value;const s=e.filter((e=>e.identify?.(r)));n=s.find((e=>e.format===t.format))??s.find((e=>!e.format))}else{r=t;n=e.find((e=>e.nodeClass&&r instanceof e.nodeClass))}if(!n){const e=r?.constructor?.name??typeof r;throw new Error(`Tag not resolved for ${e} value`)}return n}function stringifyProps(e,t,{anchors:n,doc:i}){if(!i.directives)return"";const o=[];const a=(s.isScalar(e)||s.isCollection(e))&&e.anchor;if(a&&r.anchorIsValid(a)){n.add(a);o.push(`&${a}`)}const u=e.tag?e.tag:t.default?null:t.tag;if(u)o.push(i.directives.tagString(u));return o.join(" ")}function stringify(e,t,n,r){if(s.isPair(e))return e.toString(t,n,r);if(s.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`)}else{if(t.resolvedAliases)t.resolvedAliases.add(e);else t.resolvedAliases=new Set([e]);e=e.resolve(t.doc)}}let i=undefined;const a=s.isNode(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});if(!i)i=getTagObject(t.doc.schema.tags,a);const u=stringifyProps(a,i,t);if(u.length>0)t.indentAtStart=(t.indentAtStart??0)+u.length+1;const c=typeof i.stringify==="function"?i.stringify(a,t,n,r):s.isScalar(a)?o.stringifyString(a,t,n,r):a.toString(t,n,r);if(!u)return c;return s.isScalar(a)||c[0]==="{"||c[0]==="["?`${u} ${c}`:`${u}\n${t.indent}${c}`}t.createStringifyContext=createStringifyContext;t.stringify=stringify},2466:(e,t,n)=>{var r=n(3466);var s=n(5589);var i=n(8409);var o=n(5182);function stringifyCollection(e,t,n){const r=t.inFlow??e.flow;const s=r?stringifyFlowCollection:stringifyBlockCollection;return s(e,t,n)}function stringifyBlockCollection({comment:e,items:t},n,{blockItemPrefix:r,flowChars:a,itemIndent:u,onChompKeep:c,onComment:l}){const{indent:f,options:{commentString:h}}=n;const p=Object.assign({},n,{indent:u,type:null});let d=false;const g=[];for(let e=0;e<t.length;++e){const a=t[e];let c=null;if(s.isNode(a)){if(!d&&a.spaceBefore)g.push("");addCommentBefore(n,g,a.commentBefore,d);if(a.comment)c=a.comment}else if(s.isPair(a)){const e=s.isNode(a.key)?a.key:null;if(e){if(!d&&e.spaceBefore)g.push("");addCommentBefore(n,g,e.commentBefore,d)}}d=false;let l=i.stringify(a,p,(()=>c=null),(()=>d=true));if(c)l+=o.lineComment(l,u,h(c));if(d&&c)d=false;g.push(r+l)}let y;if(g.length===0){y=a.start+a.end}else{y=g[0];for(let e=1;e<g.length;++e){const t=g[e];y+=t?`\n${f}${t}`:"\n"}}if(e){y+="\n"+o.indentComment(h(e),f);if(l)l()}else if(d&&c)c();return y}function stringifyFlowCollection({comment:e,items:t},n,{flowChars:a,itemIndent:u,onComment:c}){const{indent:l,indentStep:f,flowCollectionPadding:h,options:{commentString:p}}=n;u+=f;const d=Object.assign({},n,{indent:u,inFlow:true,type:null});let g=false;let y=0;const b=[];for(let e=0;e<t.length;++e){const r=t[e];let a=null;if(s.isNode(r)){if(r.spaceBefore)b.push("");addCommentBefore(n,b,r.commentBefore,false);if(r.comment)a=r.comment}else if(s.isPair(r)){const e=s.isNode(r.key)?r.key:null;if(e){if(e.spaceBefore)b.push("");addCommentBefore(n,b,e.commentBefore,false);if(e.comment)g=true}const t=s.isNode(r.value)?r.value:null;if(t){if(t.comment)a=t.comment;if(t.commentBefore)g=true}else if(r.value==null&&e?.comment){a=e.comment}}if(a)g=true;let c=i.stringify(r,d,(()=>a=null));if(e<t.length-1)c+=",";if(a)c+=o.lineComment(c,u,p(a));if(!g&&(b.length>y||c.includes("\n")))g=true;b.push(c);y=b.length}let v;const{start:w,end:S}=a;if(b.length===0){v=w+S}else{if(!g){const e=b.reduce(((e,t)=>e+t.length+2),2);g=e>r.Collection.maxFlowStringSingleLineLength}if(g){v=w;for(const e of b)v+=e?`\n${f}${l}${e}`:"\n";v+=`\n${l}${S}`}else{v=`${w}${h}${b.join(" ")}${h}${S}`}}if(e){v+=o.lineComment(v,l,p(e));if(c)c()}return v}function addCommentBefore({indent:e,options:{commentString:t}},n,r,s){if(r&&s)r=r.replace(/^\n+/,"");if(r){const s=o.indentComment(t(r),e);n.push(s.trimStart())}}t.stringifyCollection=stringifyCollection},5182:(e,t)=>{const stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function indentComment(e,t){if(/^\n+$/.test(e))return e.substring(1);return t?e.replace(/^(?! *$)/gm,t):e}const lineComment=(e,t,n)=>e.endsWith("\n")?indentComment(n,t):n.includes("\n")?"\n"+indentComment(n,t):(e.endsWith(" ")?"":" ")+n;t.indentComment=indentComment;t.lineComment=lineComment;t.stringifyComment=stringifyComment},5225:(e,t,n)=>{var r=n(5589);var s=n(8409);var i=n(5182);function stringifyDocument(e,t){const n=[];let o=t.directives===true;if(t.directives!==false&&e.directives){const t=e.directives.toString(e);if(t){n.push(t);o=true}else if(e.directives.docStart)o=true}if(o)n.push("---");const a=s.createStringifyContext(e,t);const{commentString:u}=a.options;if(e.commentBefore){if(n.length!==1)n.unshift("");const t=u(e.commentBefore);n.unshift(i.indentComment(t,""))}let c=false;let l=null;if(e.contents){if(r.isNode(e.contents)){if(e.contents.spaceBefore&&o)n.push("");if(e.contents.commentBefore){const t=u(e.contents.commentBefore);n.push(i.indentComment(t,""))}a.forceBlockIndent=!!e.comment;l=e.contents.comment}const t=l?undefined:()=>c=true;let f=s.stringify(e.contents,a,(()=>l=null),t);if(l)f+=i.lineComment(f,"",u(l));if((f[0]==="|"||f[0]===">")&&n[n.length-1]==="---"){n[n.length-1]=`--- ${f}`}else n.push(f)}else{n.push(s.stringify(e.contents,a))}if(e.directives?.docEnd){if(e.comment){const t=u(e.comment);if(t.includes("\n")){n.push("...");n.push(i.indentComment(t,""))}else{n.push(`... ${t}`)}}else{n.push("...")}}else{let t=e.comment;if(t&&c)t=t.replace(/^\n+/,"");if(t){if((!c||l)&&n[n.length-1]!=="")n.push("");n.push(i.indentComment(u(t),""))}}return n.join("\n")+"\n"}t.stringifyDocument=stringifyDocument},4174:(e,t)=>{function stringifyNumber({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==="bigint")return String(r);const s=typeof r==="number"?r:Number(r);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let i=JSON.stringify(r);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(i)){let e=i.indexOf(".");if(e<0){e=i.length;i+="."}let n=t-(i.length-e-1);while(n-- >0)i+="0"}return i}t.stringifyNumber=stringifyNumber},4875:(e,t,n)=>{var r=n(5589);var s=n(9338);var i=n(8409);var o=n(5182);function stringifyPair({key:e,value:t},n,a,u){const{allNullValues:c,doc:l,indent:f,indentStep:h,options:{commentString:p,indentSeq:d,simpleKeys:g}}=n;let y=r.isNode(e)&&e.comment||null;if(g){if(y){throw new Error("With simple keys, key nodes cannot have comments")}if(r.isCollection(e)){const e="With simple keys, collection cannot be used as a key value";throw new Error(e)}}let b=!g&&(!e||y&&t==null&&!n.inFlow||r.isCollection(e)||(r.isScalar(e)?e.type===s.Scalar.BLOCK_FOLDED||e.type===s.Scalar.BLOCK_LITERAL:typeof e==="object"));n=Object.assign({},n,{allNullValues:false,implicitKey:!b&&(g||!c),indent:f+h});let v=false;let w=false;let S=i.stringify(e,n,(()=>v=true),(()=>w=true));if(!b&&!n.inFlow&&S.length>1024){if(g)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");b=true}if(n.inFlow){if(c||t==null){if(v&&a)a();return S===""?"?":b?`? ${S}`:S}}else if(c&&!g||t==null&&b){S=`? ${S}`;if(y&&!v){S+=o.lineComment(S,n.indent,p(y))}else if(w&&u)u();return S}if(v)y=null;if(b){if(y)S+=o.lineComment(S,n.indent,p(y));S=`? ${S}\n${f}:`}else{S=`${S}:`;if(y)S+=o.lineComment(S,n.indent,p(y))}let A,E,D;if(r.isNode(t)){A=!!t.spaceBefore;E=t.commentBefore;D=t.comment}else{A=false;E=null;D=null;if(t&&typeof t==="object")t=l.createNode(t)}n.implicitKey=false;if(!b&&!y&&r.isScalar(t))n.indentAtStart=S.length+1;w=false;if(!d&&h.length>=2&&!n.inFlow&&!b&&r.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor){n.indent=n.indent.substring(2)}let C=false;const _=i.stringify(t,n,(()=>C=true),(()=>w=true));let k=" ";if(y||A||E){k=A?"\n":"";if(E){const e=p(E);k+=`\n${o.indentComment(e,n.indent)}`}if(_===""&&!n.inFlow){if(k==="\n")k="\n\n"}else{k+=`\n${n.indent}`}}else if(!b&&r.isCollection(t)){const e=_[0];const r=_.indexOf("\n");const s=r!==-1;const i=n.inFlow??t.flow??t.items.length===0;if(s||!i){let t=false;if(s&&(e==="&"||e==="!")){let n=_.indexOf(" ");if(e==="&"&&n!==-1&&n<r&&_[n+1]==="!"){n=_.indexOf(" ",n+1)}if(n===-1||r<n)t=true}if(!t)k=`\n${n.indent}`}}else if(_===""||_[0]==="\n"){k=""}S+=k+_;if(n.inFlow){if(C&&a)a()}else if(D&&!C){S+=o.lineComment(S,n.indent,p(D))}else if(w&&u){u()}return S}t.stringifyPair=stringifyPair},6226:(e,t,n)=>{var r=n(9338);var s=n(2889);const getFoldOptions=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth});const containsDocumentMarker=e=>/^(%|---|\.\.\.)/m.test(e);function lineLengthOverLimit(e,t,n){if(!t||t<0)return false;const r=t-n;const s=e.length;if(s<=r)return false;for(let t=0,n=0;t<s;++t){if(e[t]==="\n"){if(t-n>r)return true;n=t+1;if(s-n<=r)return false}}return true}function doubleQuotedString(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=t;const i=t.options.doubleQuotedMinMultiLineLength;const o=t.indent||(containsDocumentMarker(e)?" ":"");let a="";let u=0;for(let e=0,t=n[e];t;t=n[++e]){if(t===" "&&n[e+1]==="\\"&&n[e+2]==="n"){a+=n.slice(u,e)+"\\ ";e+=1;u=e;t="\\"}if(t==="\\")switch(n[e+1]){case"u":{a+=n.slice(u,e);const t=n.substr(e+2,4);switch(t){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:if(t.substr(0,2)==="00")a+="\\x"+t.substr(2);else a+=n.substr(e,6)}e+=5;u=e+1}break;case"n":if(r||n[e+2]==='"'||n.length<i){e+=1}else{a+=n.slice(u,e)+"\n\n";while(n[e+2]==="\\"&&n[e+3]==="n"&&n[e+4]!=='"'){a+="\n";e+=2}a+=o;if(n[e+2]===" ")a+="\\";e+=1;u=e+1}break;default:e+=1}}a=u?a+n.slice(u):n;return r?a:s.foldFlowLines(a,o,s.FOLD_QUOTED,getFoldOptions(t,false))}function singleQuotedString(e,t){if(t.options.singleQuote===false||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return doubleQuotedString(e,t);const n=t.indent||(containsDocumentMarker(e)?" ":"");const r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${n}`)+"'";return t.implicitKey?r:s.foldFlowLines(r,n,s.FOLD_FLOW,getFoldOptions(t,false))}function quotedString(e,t){const{singleQuote:n}=t.options;let r;if(n===false)r=doubleQuotedString;else{const t=e.includes('"');const s=e.includes("'");if(t&&!s)r=singleQuotedString;else if(s&&!t)r=doubleQuotedString;else r=n?singleQuotedString:doubleQuotedString}return r(e,t)}let i;try{i=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{i=/\n+(?!\n|$)/g}function blockString({comment:e,type:t,value:n},o,a,u){const{blockQuote:c,commentString:l,lineWidth:f}=o.options;if(!c||/\n[\t ]+$/.test(n)||/^\s*$/.test(n)){return quotedString(n,o)}const h=o.indent||(o.forceBlockIndent||containsDocumentMarker(n)?" ":"");const p=c==="literal"?true:c==="folded"||t===r.Scalar.BLOCK_FOLDED?false:t===r.Scalar.BLOCK_LITERAL?true:!lineLengthOverLimit(n,f,h.length);if(!n)return p?"|\n":">\n";let d;let g;for(g=n.length;g>0;--g){const e=n[g-1];if(e!=="\n"&&e!=="\t"&&e!==" ")break}let y=n.substring(g);const b=y.indexOf("\n");if(b===-1){d="-"}else if(n===y||b!==y.length-1){d="+";if(u)u()}else{d=""}if(y){n=n.slice(0,-y.length);if(y[y.length-1]==="\n")y=y.slice(0,-1);y=y.replace(i,`$&${h}`)}let v=false;let w;let S=-1;for(w=0;w<n.length;++w){const e=n[w];if(e===" ")v=true;else if(e==="\n")S=w;else break}let A=n.substring(0,S<w?S+1:w);if(A){n=n.substring(A.length);A=A.replace(/\n+/g,`$&${h}`)}const E=h?"2":"1";let D=(p?"|":">")+(v?E:"")+d;if(e){D+=" "+l(e.replace(/ ?[\r\n]+/g," "));if(a)a()}if(p){n=n.replace(/\n+/g,`$&${h}`);return`${D}\n${h}${A}${n}${y}`}n=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${h}`);const C=s.foldFlowLines(`${A}${n}${y}`,h,s.FOLD_BLOCK,getFoldOptions(o,true));return`${D}\n${h}${C}`}function plainString(e,t,n,i){const{type:o,value:a}=e;const{actualString:u,implicitKey:c,indent:l,indentStep:f,inFlow:h}=t;if(c&&a.includes("\n")||h&&/[[\]{},]/.test(a)){return quotedString(a,t)}if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a)){return c||h||!a.includes("\n")?quotedString(a,t):blockString(e,t,n,i)}if(!c&&!h&&o!==r.Scalar.PLAIN&&a.includes("\n")){return blockString(e,t,n,i)}if(containsDocumentMarker(a)){if(l===""){t.forceBlockIndent=true;return blockString(e,t,n,i)}else if(c&&l===f){return quotedString(a,t)}}const p=a.replace(/\n+/g,`$&\n${l}`);if(u){const test=e=>e.default&&e.tag!=="tag:yaml.org,2002:str"&&e.test?.test(p);const{compat:e,tags:n}=t.doc.schema;if(n.some(test)||e?.some(test))return quotedString(a,t)}return c?p:s.foldFlowLines(p,l,s.FOLD_FLOW,getFoldOptions(t,false))}function stringifyString(e,t,n,s){const{implicitKey:i,inFlow:o}=t;const a=typeof e.value==="string"?e:Object.assign({},e,{value:String(e.value)});let{type:u}=e;if(u!==r.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value))u=r.Scalar.QUOTE_DOUBLE}const _stringify=e=>{switch(e){case r.Scalar.BLOCK_FOLDED:case r.Scalar.BLOCK_LITERAL:return i||o?quotedString(a.value,t):blockString(a,t,n,s);case r.Scalar.QUOTE_DOUBLE:return doubleQuotedString(a.value,t);case r.Scalar.QUOTE_SINGLE:return singleQuotedString(a.value,t);case r.Scalar.PLAIN:return plainString(a,t,n,s);default:return null}};let c=_stringify(u);if(c===null){const{defaultKeyType:e,defaultStringType:n}=t.options;const r=i&&e||n;c=_stringify(r);if(c===null)throw new Error(`Unsupported default string type ${r}`)}return c}t.stringifyString=stringifyString},6796:(e,t,n)=>{var r=n(5589);const s=Symbol("break visit");const i=Symbol("skip children");const o=Symbol("remove node");function visit(e,t){const n=initVisitor(t);if(r.isDocument(e)){const t=visit_(null,e.contents,n,Object.freeze([e]));if(t===o)e.contents=null}else visit_(null,e,n,Object.freeze([]))}visit.BREAK=s;visit.SKIP=i;visit.REMOVE=o;function visit_(e,t,n,i){const a=callVisitor(e,t,n,i);if(r.isNode(a)||r.isPair(a)){replaceNode(e,i,a);return visit_(e,a,n,i)}if(typeof a!=="symbol"){if(r.isCollection(t)){i=Object.freeze(i.concat(t));for(let e=0;e<t.items.length;++e){const r=visit_(e,t.items[e],n,i);if(typeof r==="number")e=r-1;else if(r===s)return s;else if(r===o){t.items.splice(e,1);e-=1}}}else if(r.isPair(t)){i=Object.freeze(i.concat(t));const e=visit_("key",t.key,n,i);if(e===s)return s;else if(e===o)t.key=null;const r=visit_("value",t.value,n,i);if(r===s)return s;else if(r===o)t.value=null}}return a}async function visitAsync(e,t){const n=initVisitor(t);if(r.isDocument(e)){const t=await visitAsync_(null,e.contents,n,Object.freeze([e]));if(t===o)e.contents=null}else await visitAsync_(null,e,n,Object.freeze([]))}visitAsync.BREAK=s;visitAsync.SKIP=i;visitAsync.REMOVE=o;async function visitAsync_(e,t,n,i){const a=await callVisitor(e,t,n,i);if(r.isNode(a)||r.isPair(a)){replaceNode(e,i,a);return visitAsync_(e,a,n,i)}if(typeof a!=="symbol"){if(r.isCollection(t)){i=Object.freeze(i.concat(t));for(let e=0;e<t.items.length;++e){const r=await visitAsync_(e,t.items[e],n,i);if(typeof r==="number")e=r-1;else if(r===s)return s;else if(r===o){t.items.splice(e,1);e-=1}}}else if(r.isPair(t)){i=Object.freeze(i.concat(t));const e=await visitAsync_("key",t.key,n,i);if(e===s)return s;else if(e===o)t.key=null;const r=await visitAsync_("value",t.value,n,i);if(r===s)return s;else if(r===o)t.value=null}}return a}function initVisitor(e){if(typeof e==="object"&&(e.Collection||e.Node||e.Value)){return 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)}return e}function callVisitor(e,t,n,s){if(typeof n==="function")return n(e,t,s);if(r.isMap(t))return n.Map?.(e,t,s);if(r.isSeq(t))return n.Seq?.(e,t,s);if(r.isPair(t))return n.Pair?.(e,t,s);if(r.isScalar(t))return n.Scalar?.(e,t,s);if(r.isAlias(t))return n.Alias?.(e,t,s);return undefined}function replaceNode(e,t,n){const s=t[t.length-1];if(r.isCollection(s)){s.items[e]=n}else if(r.isPair(s)){if(e==="key")s.key=n;else s.value=n}else if(r.isDocument(s)){s.contents=n}else{const e=r.isAlias(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${e} parent`)}}t.visit=visit;t.visitAsync=visitAsync},2598:e=>{e.exports=JSON.parse('{"name":"create-expo-nightly","version":"0.0.2","license":"MIT","description":"A tool to create an Expo app for react-native nightlies testing","keywords":["expo","nightlies","react-native","testing"],"bin":"build/index.js","main":"build/index.js","type":"module","files":["build"],"scripts":{"build":"ncc build ./src/index.ts -o build/","build:prod":"ncc build ./src/index.ts -o build/ --minify --no-cache --no-source-map-register","clean":"expo-module clean","lint":"expo-module lint","prepare":"expo-module clean && ncc build ./src/index.ts -o build/ --minify --no-cache --no-source-map-register","prepublishOnly":"expo-module prepublishOnly","test":"expo-module test","typecheck":"expo-module typecheck","watch":"ncc build ./src/index.ts -o build/ --watch"},"homepage":"https://github.com/expo/expo/tree/main/packages/create-expo-nightly#readme","bugs":{"url":"https://github.com/expo/expo/issues"},"repository":{"type":"git","url":"https://github.com/expo/expo.git","directory":"packages/create-expo-nightly"},"devDependencies":{"@expo/json-file":"^8.2.37","@tsconfig/node20":"^20.1.2","@vercel/ncc":"^0.38.0","chalk":"^5.3.0","commander":"^11.1.0","expo-module-scripts":"^3.4.0","fs-extra":"^11.2.0","glob":"^10.3.10","zx":"^7.2.3"}}')}};var n={};function __nccwpck_require__(e){var r=n[e];if(r!==undefined){return r.exports}var s=n[e]={id:e,loaded:false,exports:{}};var i=true;try{t[e].call(s.exports,s,s.exports,__nccwpck_require__);i=false}finally{if(i)delete n[e]}s.loaded=true;return s.exports}(()=>{__nccwpck_require__.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;__nccwpck_require__.d(t,{a:t});return t}})();(()=>{var e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;var t;__nccwpck_require__.t=function(n,r){if(r&1)n=this(n);if(r&8)return n;if(typeof n==="object"&&n){if(r&4&&n.__esModule)return n;if(r&16&&typeof n.then==="function")return n}var s=Object.create(null);__nccwpck_require__.r(s);var i={};t=t||[null,e({}),e([]),e(e)];for(var o=r&2&&n;typeof o=="object"&&!~t.indexOf(o);o=e(o)){Object.getOwnPropertyNames(o).forEach((e=>i[e]=()=>n[e]))}i["default"]=()=>n;__nccwpck_require__.d(s,i);return s}})();(()=>{__nccwpck_require__.d=(e,t)=>{for(var n in t){if(__nccwpck_require__.o(t,n)&&!__nccwpck_require__.o(e,n)){Object.defineProperty(e,n,{enumerable:true,get:t[n]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();(()=>{__nccwpck_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=new URL(".",import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/)?1:0,-1)+"/";var r={};(()=>{var t={};__nccwpck_require__.r(t);__nccwpck_require__.d(t,{generateGlobTasks:()=>En,generateGlobTasksSync:()=>Dn,globby:()=>vn,globbyStream:()=>Sn,globbySync:()=>wn,isDynamicPattern:()=>An,isGitIgnored:()=>isGitIgnored,isGitIgnoredSync:()=>isGitIgnoredSync});const n=e(import.meta.url)("node:url");globalThis.__filename=(0,n.fileURLToPath)(import.meta.url);const r=10;const wrapAnsi16=(e=0)=>t=>`[${t+e}m`;const wrapAnsi256=(e=0)=>t=>`[${38+e};5;${t}m`;const wrapAnsi16m=(e=0)=>(t,n,r)=>`[${38+e};2;${t};${n};${r}m`;const s={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]}};const i=Object.keys(s.modifier);const o=Object.keys(s.color);const a=Object.keys(s.bgColor);const u=[...o,...a];function assembleStyles(){const e=new Map;for(const[t,n]of Object.entries(s)){for(const[t,r]of Object.entries(n)){s[t]={open:`[${r[0]}m`,close:`[${r[1]}m`};n[t]=s[t];e.set(r[0],r[1])}Object.defineProperty(s,t,{value:n,enumerable:false})}Object.defineProperty(s,"codes",{value:e,enumerable:false});s.color.close="[39m";s.bgColor.close="[49m";s.color.ansi=wrapAnsi16();s.color.ansi256=wrapAnsi256();s.color.ansi16m=wrapAnsi16m();s.bgColor.ansi=wrapAnsi16(r);s.bgColor.ansi256=wrapAnsi256(r);s.bgColor.ansi16m=wrapAnsi16m(r);Object.defineProperties(s,{rgbToAnsi256:{value(e,t,n){if(e===t&&t===n){if(e<8){return 16}if(e>248){return 231}return Math.round((e-8)/247*24)+232}return 16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:false},hexToRgb:{value(e){const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t){return[0,0,0]}let[n]=t;if(n.length===3){n=[...n].map((e=>e+e)).join("")}const r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:false},hexToAnsi256:{value:e=>s.rgbToAnsi256(...s.hexToRgb(e)),enumerable:false},ansi256ToAnsi:{value(e){if(e<8){return 30+e}if(e<16){return 90+(e-8)}let t;let n;let r;if(e>=232){t=((e-232)*10+8)/255;n=t;r=t}else{e-=16;const s=e%36;t=Math.floor(e/36)/5;n=Math.floor(s/6)/5;r=s%6/5}const s=Math.max(t,n,r)*2;if(s===0){return 30}let i=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));if(s===2){i+=60}return i},enumerable:false},rgbToAnsi:{value:(e,t,n)=>s.ansi256ToAnsi(s.rgbToAnsi256(e,t,n)),enumerable:false},hexToAnsi:{value:e=>s.ansi256ToAnsi(s.hexToAnsi256(e)),enumerable:false}});return s}const c=assembleStyles();const l=c;const f=e(import.meta.url)("node:process");const h=e(import.meta.url)("node:os");const p=e(import.meta.url)("node:tty");function hasFlag(e,t=(globalThis.Deno?globalThis.Deno.args:f.argv)){const n=e.startsWith("-")?"":e.length===1?"-":"--";const r=t.indexOf(n+e);const s=t.indexOf("--");return r!==-1&&(s===-1||r<s)}const{env:d}=f;let g;if(hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")||hasFlag("color=never")){g=0}else if(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always")){g=1}function envForceColor(){if("FORCE_COLOR"in d){if(d.FORCE_COLOR==="true"){return 1}if(d.FORCE_COLOR==="false"){return 0}return d.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(d.FORCE_COLOR,10),3)}}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function _supportsColor(e,{streamIsTTY:t,sniffFlags:n=true}={}){const r=envForceColor();if(r!==undefined){g=r}const s=n?g:r;if(s===0){return 0}if(n){if(hasFlag("color=16m")||hasFlag("color=full")||hasFlag("color=truecolor")){return 3}if(hasFlag("color=256")){return 2}}if("TF_BUILD"in d&&"AGENT_NAME"in d){return 1}if(e&&!t&&s===undefined){return 0}const i=s||0;if(d.TERM==="dumb"){return i}if(f.platform==="win32"){const e=h.release().split(".");if(Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in d){if("GITHUB_ACTIONS"in d||"GITEA_ACTIONS"in d){return 3}if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((e=>e in d))||d.CI_NAME==="codeship"){return 1}return i}if("TEAMCITY_VERSION"in d){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(d.TEAMCITY_VERSION)?1:0}if(d.COLORTERM==="truecolor"){return 3}if(d.TERM==="xterm-kitty"){return 3}if("TERM_PROGRAM"in d){const e=Number.parseInt((d.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(d.TERM_PROGRAM){case"iTerm.app":{return e>=3?3:2}case"Apple_Terminal":{return 2}}}if(/-256(color)?$/i.test(d.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(d.TERM)){return 1}if("COLORTERM"in d){return 1}return i}function createSupportsColor(e,t={}){const n=_supportsColor(e,{streamIsTTY:e&&e.isTTY,...t});return translateLevel(n)}const y={stdout:createSupportsColor({isTTY:p.isatty(1)}),stderr:createSupportsColor({isTTY:p.isatty(2)})};const b=y;function stringReplaceAll(e,t,n){let r=e.indexOf(t);if(r===-1){return e}const s=t.length;let i=0;let o="";do{o+=e.slice(i,r)+t+n;i=r+s;r=e.indexOf(t,i)}while(r!==-1);o+=e.slice(i);return o}function stringEncaseCRLFWithFirstIndex(e,t,n,r){let s=0;let i="";do{const o=e[r-1]==="\r";i+=e.slice(s,o?r-1:r)+t+(o?"\r\n":"\n")+n;s=r+1;r=e.indexOf("\n",s)}while(r!==-1);i+=e.slice(s);return i}const{stdout:v,stderr:w}=b;const S=Symbol("GENERATOR");const A=Symbol("STYLER");const E=Symbol("IS_EMPTY");const D=["ansi","ansi","ansi256","ansi16m"];const C=Object.create(null);const applyOptions=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3)){throw new Error("The `level` option should be an integer from 0 to 3")}const n=v?v.level:0;e.level=t.level===undefined?n:t.level};class Chalk{constructor(e){return chalkFactory(e)}}const chalkFactory=e=>{const chalk=(...e)=>e.join(" ");applyOptions(chalk,e);Object.setPrototypeOf(chalk,createChalk.prototype);return chalk};function createChalk(e){return chalkFactory(e)}Object.setPrototypeOf(createChalk.prototype,Function.prototype);for(const[e,t]of Object.entries(l)){C[e]={get(){const n=createBuilder(this,createStyler(t.open,t.close,this[A]),this[E]);Object.defineProperty(this,e,{value:n});return n}}}C.visible={get(){const e=createBuilder(this,this[A],true);Object.defineProperty(this,"visible",{value:e});return e}};const getModelAnsi=(e,t,n,...r)=>{if(e==="rgb"){if(t==="ansi16m"){return l[n].ansi16m(...r)}if(t==="ansi256"){return l[n].ansi256(l.rgbToAnsi256(...r))}return l[n].ansi(l.rgbToAnsi(...r))}if(e==="hex"){return getModelAnsi("rgb",t,n,...l.hexToRgb(...r))}return l[n][e](...r)};const _=["rgb","hex","ansi256"];for(const e of _){C[e]={get(){const{level:t}=this;return function(...n){const r=createStyler(getModelAnsi(e,D[t],"color",...n),l.color.close,this[A]);return createBuilder(this,r,this[E])}}};const t="bg"+e[0].toUpperCase()+e.slice(1);C[t]={get(){const{level:t}=this;return function(...n){const r=createStyler(getModelAnsi(e,D[t],"bgColor",...n),l.bgColor.close,this[A]);return createBuilder(this,r,this[E])}}}}const k=Object.defineProperties((()=>{}),{...C,level:{enumerable:true,get(){return this[S].level},set(e){this[S].level=e}}});const createStyler=(e,t,n)=>{let r;let s;if(n===undefined){r=e;s=t}else{r=n.openAll+e;s=t+n.closeAll}return{open:e,close:t,openAll:r,closeAll:s,parent:n}};const createBuilder=(e,t,n)=>{const builder=(...e)=>applyStyle(builder,e.length===1?""+e[0]:e.join(" "));Object.setPrototypeOf(builder,k);builder[S]=e;builder[A]=t;builder[E]=n;return builder};const applyStyle=(e,t)=>{if(e.level<=0||!t){return e[E]?"":t}let n=e[A];if(n===undefined){return t}const{openAll:r,closeAll:s}=n;if(t.includes("")){while(n!==undefined){t=stringReplaceAll(t,n.close,n.open);n=n.parent}}const i=t.indexOf("\n");if(i!==-1){t=stringEncaseCRLFWithFirstIndex(t,s,r,i)}return r+t+s};Object.defineProperties(createChalk.prototype,C);const F=createChalk();const x=createChalk({level:w?w.level:0});const O=F;var P=__nccwpck_require__(4379);const{program:T,createCommand:B,createArgument:N,createOption:R,CommanderError:L,InvalidArgumentError:M,InvalidOptionArgumentError:I,Command:j,Argument:H,Option:W,Help:q}=P;const U=e(import.meta.url)("node:path");var G=__nccwpck_require__.n(U);var V=__nccwpck_require__(9090);var K=__nccwpck_require__.n(V);var z=__nccwpck_require__(5630);var Y=__nccwpck_require__.n(z);const J=e(import.meta.url)("fs/promises");var Q=__nccwpck_require__.n(J);var X=__nccwpck_require__(3717);const Z=1024*64;const assertValidPattern=e=>{if(typeof e!=="string"){throw new TypeError("invalid pattern")}if(e.length>Z){throw new TypeError("pattern is too long")}};const ee={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",true],"[:alpha:]":["\\p{L}\\p{Nl}",true],"[:ascii:]":["\\x"+"00-\\x"+"7f",false],"[:blank:]":["\\p{Zs}\\t",true],"[:cntrl:]":["\\p{Cc}",true],"[:digit:]":["\\p{Nd}",true],"[:graph:]":["\\p{Z}\\p{C}",true,true],"[:lower:]":["\\p{Ll}",true],"[:print:]":["\\p{C}",true],"[:punct:]":["\\p{P}",true],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",true],"[:upper:]":["\\p{Lu}",true],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",true],"[:xdigit:]":["A-Fa-f0-9",false]};const braceEscape=e=>e.replace(/[[\]\\-]/g,"\\$&");const regexpEscape=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const rangesToString=e=>e.join("");const parseClass=(e,t)=>{const n=t;if(e.charAt(n)!=="["){throw new Error("not in a brace expression")}const r=[];const s=[];let i=n+1;let o=false;let a=false;let u=false;let c=false;let l=n;let f="";e:while(i<e.length){const t=e.charAt(i);if((t==="!"||t==="^")&&i===n+1){c=true;i++;continue}if(t==="]"&&o&&!u){l=i+1;break}o=true;if(t==="\\"){if(!u){u=true;i++;continue}}if(t==="["&&!u){for(const[t,[o,u,c]]of Object.entries(ee)){if(e.startsWith(t,i)){if(f){return["$.",false,e.length-n,true]}i+=t.length;if(c)s.push(o);else r.push(o);a=a||u;continue e}}}u=false;if(f){if(t>f){r.push(braceEscape(f)+"-"+braceEscape(t))}else if(t===f){r.push(braceEscape(t))}f="";i++;continue}if(e.startsWith("-]",i+1)){r.push(braceEscape(t+"-"));i+=2;continue}if(e.startsWith("-",i+1)){f=t;i+=2;continue}r.push(braceEscape(t));i++}if(l<i){return["",false,0,false]}if(!r.length&&!s.length){return["$.",false,e.length-n,true]}if(s.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!c){const e=r[0].length===2?r[0].slice(-1):r[0];return[regexpEscape(e),false,l-n,false]}const h="["+(c?"^":"")+rangesToString(r)+"]";const p="["+(c?"":"^")+rangesToString(s)+"]";const d=r.length&&s.length?"("+h+"|"+p+")":r.length?h:p;return[d,a,l-n,true]};const unescape_unescape=(e,{windowsPathsNoEscape:t=false}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");const te=new Set(["!","?","+","*","@"]);const isExtglobType=e=>te.has(e);const ne="(?!(?:^|/)\\.\\.?(?:$|/))";const re="(?!\\.)";const se=new Set(["[","."]);const ie=new Set(["..","."]);const oe=new Set("().*{}+?[]^$\\!");const regExpEscape=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const ae="[^/]";const ue=ae+"*?";const ce=ae+"+?";class AST{type;#e;#t;#n=false;#r=[];#s;#i;#o;#a=false;#u;#c;#l=false;constructor(e,t,n={}){this.type=e;if(e)this.#t=true;this.#s=t;this.#e=this.#s?this.#s.#e:this;this.#u=this.#e===this?n:this.#e.#u;this.#o=this.#e===this?[]:this.#e.#o;if(e==="!"&&!this.#e.#a)this.#o.push(this);this.#i=this.#s?this.#s.#r.length:0}get hasMagic(){if(this.#t!==undefined)return this.#t;for(const e of this.#r){if(typeof e==="string")continue;if(e.type||e.hasMagic)return this.#t=true}return this.#t}toString(){if(this.#c!==undefined)return this.#c;if(!this.type){return this.#c=this.#r.map((e=>String(e))).join("")}else{return this.#c=this.type+"("+this.#r.map((e=>String(e))).join("|")+")"}}#f(){if(this!==this.#e)throw new Error("should only call on root");if(this.#a)return this;this.toString();this.#a=true;let e;while(e=this.#o.pop()){if(e.type!=="!")continue;let t=e;let n=t.#s;while(n){for(let r=t.#i+1;!n.type&&r<n.#r.length;r++){for(const t of e.#r){if(typeof t==="string"){throw new Error("string part in extglob AST??")}t.copyIn(n.#r[r])}}t=n;n=t.#s}}return this}push(...e){for(const t of e){if(t==="")continue;if(typeof t!=="string"&&!(t instanceof AST&&t.#s===this)){throw new Error("invalid part: "+t)}this.#r.push(t)}}toJSON(){const e=this.type===null?this.#r.slice().map((e=>typeof e==="string"?e:e.toJSON())):[this.type,...this.#r.map((e=>e.toJSON()))];if(this.isStart()&&!this.type)e.unshift([]);if(this.isEnd()&&(this===this.#e||this.#e.#a&&this.#s?.type==="!")){e.push({})}return e}isStart(){if(this.#e===this)return true;if(!this.#s?.isStart())return false;if(this.#i===0)return true;const e=this.#s;for(let t=0;t<this.#i;t++){const n=e.#r[t];if(!(n instanceof AST&&n.type==="!")){return false}}return true}isEnd(){if(this.#e===this)return true;if(this.#s?.type==="!")return true;if(!this.#s?.isEnd())return false;if(!this.type)return this.#s?.isEnd();const e=this.#s?this.#s.#r.length:0;return this.#i===e-1}copyIn(e){if(typeof e==="string")this.push(e);else this.push(e.clone(this))}clone(e){const t=new AST(this.type,e);for(const e of this.#r){t.copyIn(e)}return t}static#h(e,t,n,r){let s=false;let i=false;let o=-1;let a=false;if(t.type===null){let u=n;let c="";while(u<e.length){const n=e.charAt(u++);if(s||n==="\\"){s=!s;c+=n;continue}if(i){if(u===o+1){if(n==="^"||n==="!"){a=true}}else if(n==="]"&&!(u===o+2&&a)){i=false}c+=n;continue}else if(n==="["){i=true;o=u;a=false;c+=n;continue}if(!r.noext&&isExtglobType(n)&&e.charAt(u)==="("){t.push(c);c="";const s=new AST(n,t);u=AST.#h(e,s,u,r);t.push(s);continue}c+=n}t.push(c);return u}let u=n+1;let c=new AST(null,t);const l=[];let f="";while(u<e.length){const n=e.charAt(u++);if(s||n==="\\"){s=!s;f+=n;continue}if(i){if(u===o+1){if(n==="^"||n==="!"){a=true}}else if(n==="]"&&!(u===o+2&&a)){i=false}f+=n;continue}else if(n==="["){i=true;o=u;a=false;f+=n;continue}if(isExtglobType(n)&&e.charAt(u)==="("){c.push(f);f="";const t=new AST(n,c);c.push(t);u=AST.#h(e,t,u,r);continue}if(n==="|"){c.push(f);f="";l.push(c);c=new AST(null,t);continue}if(n===")"){if(f===""&&t.#r.length===0){t.#l=true}c.push(f);f="";t.push(...l,c);return u}f+=n}t.type=null;t.#t=undefined;t.#r=[e.substring(n-1)];return u}static fromGlob(e,t={}){const n=new AST(null,undefined,t);AST.#h(e,n,0,t);return n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();const e=this.toString();const[t,n,r,s]=this.toRegExpSource();const i=r||this.#t||this.#u.nocase&&!this.#u.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase();if(!i){return n}const o=(this.#u.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${t}$`,o),{_src:t,_glob:e})}toRegExpSource(e){const t=e??!!this.#u.dot;if(this.#e===this)this.#f();if(!this.type){const n=this.isStart()&&this.isEnd();const r=this.#r.map((t=>{const[r,s,i,o]=typeof t==="string"?AST.#p(t,this.#t,n):t.toRegExpSource(e);this.#t=this.#t||i;this.#n=this.#n||o;return r})).join("");let s="";if(this.isStart()){if(typeof this.#r[0]==="string"){const n=this.#r.length===1&&ie.has(this.#r[0]);if(!n){const n=se;const i=t&&n.has(r.charAt(0))||r.startsWith("\\.")&&n.has(r.charAt(2))||r.startsWith("\\.\\.")&&n.has(r.charAt(4));const o=!t&&!e&&n.has(r.charAt(0));s=i?ne:o?re:""}}}let i="";if(this.isEnd()&&this.#e.#a&&this.#s?.type==="!"){i="(?:$|\\/)"}const o=s+r+i;return[o,unescape_unescape(r),this.#t=!!this.#t,this.#n]}const n=this.type==="*"||this.type==="+";const r=this.type==="!"?"(?:(?!(?:":"(?:";let s=this.#d(t);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){const e=this.toString();this.#r=[e];this.type=null;this.#t=undefined;return[e,unescape_unescape(this.toString()),false,false]}let i=!n||e||t||!re?"":this.#d(true);if(i===s){i=""}if(i){s=`(?:${s})(?:${i})*?`}let o="";if(this.type==="!"&&this.#l){o=(this.isStart()&&!t?re:"")+ce}else{const n=this.type==="!"?"))"+(this.isStart()&&!t&&!e?re:"")+ue+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&i?")":this.type==="*"&&i?`)?`:`)${this.type}`;o=r+s+n}return[o,unescape_unescape(s),this.#t=!!this.#t,this.#n]}#d(e){return this.#r.map((t=>{if(typeof t==="string"){throw new Error("string type in extglob ast??")}const[n,r,s,i]=t.toRegExpSource(e);this.#n=this.#n||i;return n})).filter((e=>!(this.isStart()&&this.isEnd())||!!e)).join("|")}static#p(e,t,n=false){let r=false;let s="";let i=false;for(let o=0;o<e.length;o++){const a=e.charAt(o);if(r){r=false;s+=(oe.has(a)?"\\":"")+a;continue}if(a==="\\"){if(o===e.length-1){s+="\\\\"}else{r=true}continue}if(a==="["){const[n,r,a,u]=parseClass(e,o);if(a){s+=n;i=i||r;o+=a-1;t=t||u;continue}}if(a==="*"){if(n&&e==="*")s+=ce;else s+=ue;t=true;continue}if(a==="?"){s+=ae;t=true;continue}s+=regExpEscape(a)}return[s,unescape_unescape(e),!!t,i]}}const escape_escape=(e,{windowsPathsNoEscape:t=false}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");const minimatch=(e,t,n={})=>{assertValidPattern(t);if(!n.nocomment&&t.charAt(0)==="#"){return false}return new Minimatch(t,n).match(e)};const le=/^\*+([^+@!?\*\[\(]*)$/;const starDotExtTest=e=>t=>!t.startsWith(".")&&t.endsWith(e);const starDotExtTestDot=e=>t=>t.endsWith(e);const starDotExtTestNocase=e=>{e=e.toLowerCase();return t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)};const starDotExtTestNocaseDot=e=>{e=e.toLowerCase();return t=>t.toLowerCase().endsWith(e)};const fe=/^\*+\.\*+$/;const starDotStarTest=e=>!e.startsWith(".")&&e.includes(".");const starDotStarTestDot=e=>e!=="."&&e!==".."&&e.includes(".");const he=/^\.\*+$/;const dotStarTest=e=>e!=="."&&e!==".."&&e.startsWith(".");const pe=/^\*+$/;const starTest=e=>e.length!==0&&!e.startsWith(".");const starTestDot=e=>e.length!==0&&e!=="."&&e!=="..";const de=/^\?+([^+@!?\*\[\(]*)?$/;const qmarksTestNocase=([e,t=""])=>{const n=qmarksTestNoExt([e]);if(!t)return n;t=t.toLowerCase();return e=>n(e)&&e.toLowerCase().endsWith(t)};const qmarksTestNocaseDot=([e,t=""])=>{const n=qmarksTestNoExtDot([e]);if(!t)return n;t=t.toLowerCase();return e=>n(e)&&e.toLowerCase().endsWith(t)};const qmarksTestDot=([e,t=""])=>{const n=qmarksTestNoExtDot([e]);return!t?n:e=>n(e)&&e.endsWith(t)};const qmarksTest=([e,t=""])=>{const n=qmarksTestNoExt([e]);return!t?n:e=>n(e)&&e.endsWith(t)};const qmarksTestNoExt=([e])=>{const t=e.length;return e=>e.length===t&&!e.startsWith(".")};const qmarksTestNoExtDot=([e])=>{const t=e.length;return e=>e.length===t&&e!=="."&&e!==".."};const me=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";const ge={win32:{sep:"\\"},posix:{sep:"/"}};const ye=me==="win32"?ge.win32.sep:ge.posix.sep;minimatch.sep=ye;const be=Symbol("globstar **");minimatch.GLOBSTAR=be;const ve="[^/]";const we=ve+"*?";const Se="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";const Ae="(?:(?!(?:\\/|^)\\.).)*?";const filter=(e,t={})=>n=>minimatch(n,e,t);minimatch.filter=filter;const ext=(e,t={})=>Object.assign({},e,t);const defaults=e=>{if(!e||typeof e!=="object"||!Object.keys(e).length){return minimatch}const t=minimatch;const m=(n,r,s={})=>t(n,r,ext(e,s));return Object.assign(m,{Minimatch:class Minimatch extends t.Minimatch{constructor(t,n={}){super(t,ext(e,n))}static defaults(n){return t.defaults(ext(e,n)).Minimatch}},AST:class AST extends t.AST{constructor(t,n,r={}){super(t,n,ext(e,r))}static fromGlob(n,r={}){return t.AST.fromGlob(n,ext(e,r))}},unescape:(n,r={})=>t.unescape(n,ext(e,r)),escape:(n,r={})=>t.escape(n,ext(e,r)),filter:(n,r={})=>t.filter(n,ext(e,r)),defaults:n=>t.defaults(ext(e,n)),makeRe:(n,r={})=>t.makeRe(n,ext(e,r)),braceExpand:(n,r={})=>t.braceExpand(n,ext(e,r)),match:(n,r,s={})=>t.match(n,r,ext(e,s)),sep:t.sep,GLOBSTAR:be})};minimatch.defaults=defaults;const braceExpand=(e,t={})=>{assertValidPattern(e);if(t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)){return[e]}return X(e)};minimatch.braceExpand=braceExpand;const makeRe=(e,t={})=>new Minimatch(e,t).makeRe();minimatch.makeRe=makeRe;const match=(e,t,n={})=>{const r=new Minimatch(t,n);e=e.filter((e=>r.match(e)));if(r.options.nonull&&!e.length){e.push(t)}return e};minimatch.match=match;const Ee=/[?*]|[+@!]\(.*?\)|\[|\]/;const mjs_regExpEscape=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Minimatch{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){assertValidPattern(e);t=t||{};this.options=t;this.pattern=e;this.platform=t.platform||me;this.isWindows=this.platform==="win32";this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===false;if(this.windowsPathsNoEscape){this.pattern=this.pattern.replace(/\\/g,"/")}this.preserveMultipleSlashes=!!t.preserveMultipleSlashes;this.regexp=null;this.negate=false;this.nonegate=!!t.nonegate;this.comment=false;this.empty=false;this.partial=!!t.partial;this.nocase=!!this.options.nocase;this.windowsNoMagicRoot=t.windowsNoMagicRoot!==undefined?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase);this.globSet=[];this.globParts=[];this.set=[];this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1){return true}for(const e of this.set){for(const t of e){if(typeof t!=="string")return true}}return false}debug(...e){}make(){const e=this.pattern;const t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();this.globSet=[...new Set(this.braceExpand())];if(t.debug){this.debug=(...e)=>console.error(...e)}this.debug(this.pattern,this.globSet);const n=this.globSet.map((e=>this.slashSplit(e)));this.globParts=this.preprocess(n);this.debug(this.pattern,this.globParts);let r=this.globParts.map(((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){const t=e[0]===""&&e[1]===""&&(e[2]==="?"||!Ee.test(e[2]))&&!Ee.test(e[3]);const n=/^[a-z]:/i.test(e[0]);if(t){return[...e.slice(0,4),...e.slice(4).map((e=>this.parse(e)))]}else if(n){return[e[0],...e.slice(1).map((e=>this.parse(e)))]}}return e.map((e=>this.parse(e)))}));this.debug(this.pattern,r);this.set=r.filter((e=>e.indexOf(false)===-1));if(this.isWindows){for(let e=0;e<this.set.length;e++){const t=this.set[e];if(t[0]===""&&t[1]===""&&this.globParts[e][2]==="?"&&typeof t[3]==="string"&&/^[a-z]:$/i.test(t[3])){t[2]="?"}}}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar){for(let t=0;t<e.length;t++){for(let n=0;n<e[t].length;n++){if(e[t][n]==="**"){e[t][n]="*"}}}}const{optimizationLevel:t=1}=this.options;if(t>=2){e=this.firstPhasePreProcess(e);e=this.secondPhasePreProcess(e)}else if(t>=1){e=this.levelOneOptimize(e)}else{e=this.adjascentGlobstarOptimize(e)}return e}adjascentGlobstarOptimize(e){return e.map((e=>{let t=-1;while(-1!==(t=e.indexOf("**",t+1))){let n=t;while(e[n+1]==="**"){n++}if(n!==t){e.splice(t,n-t)}}return e}))}levelOneOptimize(e){return e.map((e=>{e=e.reduce(((e,t)=>{const n=e[e.length-1];if(t==="**"&&n==="**"){return e}if(t===".."){if(n&&n!==".."&&n!=="."&&n!=="**"){e.pop();return e}}e.push(t);return e}),[]);return e.length===0?[""]:e}))}levelTwoFileOptimize(e){if(!Array.isArray(e)){e=this.slashSplit(e)}let t=false;do{t=false;if(!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){const r=e[n];if(n===1&&r===""&&e[0]==="")continue;if(r==="."||r===""){t=true;e.splice(n,1);n--}}if(e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")){t=true;e.pop()}}let n=0;while(-1!==(n=e.indexOf("..",n+1))){const r=e[n-1];if(r&&r!=="."&&r!==".."&&r!=="**"){t=true;e.splice(n-1,2);n-=2}}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=false;do{t=false;for(let n of e){let r=-1;while(-1!==(r=n.indexOf("**",r+1))){let s=r;while(n[s+1]==="**"){s++}if(s>r){n.splice(r+1,s-r)}let i=n[r+1];const o=n[r+2];const a=n[r+3];if(i!=="..")continue;if(!o||o==="."||o===".."||!a||a==="."||a===".."){continue}t=true;n.splice(r,1);const u=n.slice(0);u[r]="**";e.push(u);r--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){const r=n[e];if(e===1&&r===""&&n[0]==="")continue;if(r==="."||r===""){t=true;n.splice(e,1);e--}}if(n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")){t=true;n.pop()}}let s=0;while(-1!==(s=n.indexOf("..",s+1))){const e=n[s-1];if(e&&e!=="."&&e!==".."&&e!=="**"){t=true;const e=s===1&&n[s+1]==="**";const r=e?["."]:[];n.splice(s-1,2,...r);if(n.length===0)n.push("");s-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++){for(let n=t+1;n<e.length;n++){const r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(!r)continue;e[t]=r;e[n]=[]}}return e.filter((e=>e.length))}partsMatch(e,t,n=false){let r=0;let s=0;let i=[];let o="";while(r<e.length&&s<t.length){if(e[r]===t[s]){i.push(o==="b"?t[s]:e[r]);r++;s++}else if(n&&e[r]==="**"&&t[s]===e[r+1]){i.push(e[r]);r++}else if(n&&t[s]==="**"&&e[r]===t[s+1]){i.push(t[s]);s++}else if(e[r]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(o==="b")return false;o="a";i.push(e[r]);r++;s++}else if(t[s]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(o==="a")return false;o="b";i.push(t[s]);r++;s++}else{return false}}return e.length===t.length&&i}parseNegate(){if(this.nonegate)return;const e=this.pattern;let t=false;let n=0;for(let r=0;r<e.length&&e.charAt(r)==="!";r++){t=!t;n++}if(n)this.pattern=e.slice(n);this.negate=t}matchOne(e,t,n=false){const r=this.options;if(this.isWindows){const n=typeof e[0]==="string"&&/^[a-z]:$/i.test(e[0]);const r=!n&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]);const s=typeof t[0]==="string"&&/^[a-z]:$/i.test(t[0]);const i=!s&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]==="string"&&/^[a-z]:$/i.test(t[3]);const o=r?3:n?0:undefined;const a=i?3:s?0:undefined;if(typeof o==="number"&&typeof a==="number"){const[n,r]=[e[o],t[a]];if(n.toLowerCase()===r.toLowerCase()){t[a]=n;if(a>o){t=t.slice(a)}else if(o>a){e=e.slice(o)}}}}const{optimizationLevel:s=1}=this.options;if(s>=2){e=this.levelTwoFileOptimize(e)}this.debug("matchOne",this,{file:e,pattern:t});this.debug("matchOne",e.length,t.length);for(var i=0,o=0,a=e.length,u=t.length;i<a&&o<u;i++,o++){this.debug("matchOne loop");var c=t[o];var l=e[i];this.debug(t,c,l);if(c===false){return false}if(c===be){this.debug("GLOBSTAR",[t,c,l]);var f=i;var h=o+1;if(h===u){this.debug("** at the end");for(;i<a;i++){if(e[i]==="."||e[i]===".."||!r.dot&&e[i].charAt(0)===".")return false}return true}while(f<a){var p=e[f];this.debug("\nglobstar while",e,f,t,h,p);if(this.matchOne(e.slice(f),t.slice(h),n)){this.debug("globstar found match!",f,a,p);return true}else{if(p==="."||p===".."||!r.dot&&p.charAt(0)==="."){this.debug("dot detected!",e,f,t,h);break}this.debug("globstar swallow a segment, and continue");f++}}if(n){this.debug("\n>>> no match, partial?",e,f,t,h);if(f===a){return true}}return false}let s;if(typeof c==="string"){s=l===c;this.debug("string match",c,l,s)}else{s=c.test(l);this.debug("pattern match",c,l,s)}if(!s)return false}if(i===a&&o===u){return true}else if(i===a){return n}else if(o===u){return i===a-1&&e[i]===""}else{throw new Error("wtf?")}}braceExpand(){return braceExpand(this.pattern,this.options)}parse(e){assertValidPattern(e);const t=this.options;if(e==="**")return be;if(e==="")return"";let n;let r=null;if(n=e.match(pe)){r=t.dot?starTestDot:starTest}else if(n=e.match(le)){r=(t.nocase?t.dot?starDotExtTestNocaseDot:starDotExtTestNocase:t.dot?starDotExtTestDot:starDotExtTest)(n[1])}else if(n=e.match(de)){r=(t.nocase?t.dot?qmarksTestNocaseDot:qmarksTestNocase:t.dot?qmarksTestDot:qmarksTest)(n)}else if(n=e.match(fe)){r=t.dot?starDotStarTestDot:starDotStarTest}else if(n=e.match(he)){r=dotStarTest}const s=AST.fromGlob(e,this.options).toMMPattern();return r?Object.assign(s,{test:r}):s}makeRe(){if(this.regexp||this.regexp===false)return this.regexp;const e=this.set;if(!e.length){this.regexp=false;return this.regexp}const t=this.options;const n=t.noglobstar?we:t.dot?Se:Ae;const r=new Set(t.nocase?["i"]:[]);let s=e.map((e=>{const t=e.map((e=>{if(e instanceof RegExp){for(const t of e.flags.split(""))r.add(t)}return typeof e==="string"?mjs_regExpEscape(e):e===be?be:e._src}));t.forEach(((e,r)=>{const s=t[r+1];const i=t[r-1];if(e!==be||i===be){return}if(i===undefined){if(s!==undefined&&s!==be){t[r+1]="(?:\\/|"+n+"\\/)?"+s}else{t[r]=n}}else if(s===undefined){t[r-1]=i+"(?:\\/|"+n+")?"}else if(s!==be){t[r-1]=i+"(?:\\/|\\/"+n+"\\/)"+s;t[r+1]=be}}));return t.filter((e=>e!==be)).join("/")})).join("|");const[i,o]=e.length>1?["(?:",")"]:["",""];s="^"+i+s+o+"$";if(this.negate)s="^(?!"+s+").+$";try{this.regexp=new RegExp(s,[...r].join(""))}catch(e){this.regexp=false}return this.regexp}slashSplit(e){if(this.preserveMultipleSlashes){return e.split("/")}else if(this.isWindows&&/^\/\/[^\/]+/.test(e)){return["",...e.split(/\/+/)]}else{return e.split(/\/+/)}}match(e,t=this.partial){this.debug("match",e,this.pattern);if(this.comment){return false}if(this.empty){return e===""}if(e==="/"&&t){return true}const n=this.options;if(this.isWindows){e=e.split("\\").join("/")}const r=this.slashSplit(e);this.debug(this.pattern,"split",r);const s=this.set;this.debug(this.pattern,"set",s);let i=r[r.length-1];if(!i){for(let e=r.length-2;!i&&e>=0;e--){i=r[e]}}for(let e=0;e<s.length;e++){const o=s[e];let a=r;if(n.matchBase&&o.length===1){a=[i]}const u=this.matchOne(a,o,t);if(u){if(n.flipNegate){return true}return!this.negate}}if(n.flipNegate){return false}return this.negate}static defaults(e){return minimatch.defaults(e).Minimatch}}minimatch.AST=AST;minimatch.Minimatch=Minimatch;minimatch.escape=escape_escape;minimatch.unescape=unescape_unescape;const De=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date;const Ce=new Set;const _e=typeof process==="object"&&!!process?process:{};const emitWarning=(e,t,n,r)=>{typeof _e.emitWarning==="function"?_e.emitWarning(e,t,n,r):console.error(`[${n}] ${t}: ${e}`)};let ke=globalThis.AbortController;let Fe=globalThis.AbortSignal;if(typeof ke==="undefined"){Fe=class AbortSignal{onabort;_onabort=[];reason;aborted=false;addEventListener(e,t){this._onabort.push(t)}};ke=class AbortController{constructor(){warnACPolyfill()}signal=new Fe;abort(e){if(this.signal.aborted)return;this.signal.reason=e;this.signal.aborted=true;for(const t of this.signal._onabort){t(e)}this.signal.onabort?.(e)}};let e=_e.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1";const warnACPolyfill=()=>{if(!e)return;e=false;emitWarning("AbortController is not defined. If using lru-cache in "+"node 14, load an AbortController polyfill from the "+"`node-abort-controller` package. A minimal polyfill is "+"provided for use by LRUCache.fetch(), but it should not be "+"relied upon in other contexts (eg, passing it to other APIs that "+"use AbortController/AbortSignal might have undesirable effects). "+"You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",warnACPolyfill)}}const shouldWarn=e=>!Ce.has(e);const xe=Symbol("type");const isPosInt=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e);const getUintArray=e=>!isPosInt(e)?null:e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?ZeroArray:null;class ZeroArray extends Array{constructor(e){super(e);this.fill(0)}}class Stack{heap;length;static#m=false;static create(e){const t=getUintArray(e);if(!t)return[];Stack.#m=true;const n=new Stack(e,t);Stack.#m=false;return n}constructor(e,t){if(!Stack.#m){throw new TypeError("instantiate Stack using Stack.create(n)")}this.heap=new t(e);this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class LRUCache{#g;#y;#b;#v;#w;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#S;#A;#E;#D;#C;#_;#k;#F;#x;#O;#P;#T;#B;#N;#R;#L;#M;static unsafeExposeInternals(e){return{starts:e.#B,ttls:e.#N,sizes:e.#T,keyMap:e.#E,keyList:e.#D,valList:e.#C,next:e.#_,prev:e.#k,get head(){return e.#F},get tail(){return e.#x},free:e.#O,isBackgroundFetch:t=>e.#I(t),backgroundFetch:(t,n,r,s)=>e.#$(t,n,r,s),moveToTail:t=>e.#j(t),indexes:t=>e.#H(t),rindexes:t=>e.#W(t),isStale:t=>e.#q(t)}}get max(){return this.#g}get maxSize(){return this.#y}get calculatedSize(){return this.#A}get size(){return this.#S}get fetchMethod(){return this.#w}get dispose(){return this.#b}get disposeAfter(){return this.#v}constructor(e){const{max:t=0,ttl:n,ttlResolution:r=1,ttlAutopurge:s,updateAgeOnGet:i,updateAgeOnHas:o,allowStale:a,dispose:u,disposeAfter:c,noDisposeOnSet:l,noUpdateTTL:f,maxSize:h=0,maxEntrySize:p=0,sizeCalculation:d,fetchMethod:g,noDeleteOnFetchRejection:y,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:v,allowStaleOnFetchAbort:w,ignoreFetchAbort:S}=e;if(t!==0&&!isPosInt(t)){throw new TypeError("max option must be a nonnegative integer")}const A=t?getUintArray(t):Array;if(!A){throw new Error("invalid max value: "+t)}this.#g=t;this.#y=h;this.maxEntrySize=p||this.#y;this.sizeCalculation=d;if(this.sizeCalculation){if(!this.#y&&!this.maxEntrySize){throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize")}if(typeof this.sizeCalculation!=="function"){throw new TypeError("sizeCalculation set to non-function")}}if(g!==undefined&&typeof g!=="function"){throw new TypeError("fetchMethod must be a function if specified")}this.#w=g;this.#L=!!g;this.#E=new Map;this.#D=new Array(t).fill(undefined);this.#C=new Array(t).fill(undefined);this.#_=new A(t);this.#k=new A(t);this.#F=0;this.#x=0;this.#O=Stack.create(t);this.#S=0;this.#A=0;if(typeof u==="function"){this.#b=u}if(typeof c==="function"){this.#v=c;this.#P=[]}else{this.#v=undefined;this.#P=undefined}this.#R=!!this.#b;this.#M=!!this.#v;this.noDisposeOnSet=!!l;this.noUpdateTTL=!!f;this.noDeleteOnFetchRejection=!!y;this.allowStaleOnFetchRejection=!!v;this.allowStaleOnFetchAbort=!!w;this.ignoreFetchAbort=!!S;if(this.maxEntrySize!==0){if(this.#y!==0){if(!isPosInt(this.#y)){throw new TypeError("maxSize must be a positive integer if specified")}}if(!isPosInt(this.maxEntrySize)){throw new TypeError("maxEntrySize must be a positive integer if specified")}this.#U()}this.allowStale=!!a;this.noDeleteOnStaleGet=!!b;this.updateAgeOnGet=!!i;this.updateAgeOnHas=!!o;this.ttlResolution=isPosInt(r)||r===0?r:1;this.ttlAutopurge=!!s;this.ttl=n||0;if(this.ttl){if(!isPosInt(this.ttl)){throw new TypeError("ttl must be a positive integer if specified")}this.#G()}if(this.#g===0&&this.ttl===0&&this.#y===0){throw new TypeError("At least one of max, maxSize, or ttl is required")}if(!this.ttlAutopurge&&!this.#g&&!this.#y){const e="LRU_CACHE_UNBOUNDED";if(shouldWarn(e)){Ce.add(e);const t="TTL caching without ttlAutopurge, max, or maxSize can "+"result in unbounded memory consumption.";emitWarning(t,"UnboundedCacheWarning",e,LRUCache)}}}getRemainingTTL(e){return this.#E.has(e)?Infinity:0}#G(){const e=new ZeroArray(this.#g);const t=new ZeroArray(this.#g);this.#N=e;this.#B=t;this.#V=(n,r,s=De.now())=>{t[n]=r!==0?s:0;e[n]=r;if(r!==0&&this.ttlAutopurge){const e=setTimeout((()=>{if(this.#q(n)){this.delete(this.#D[n])}}),r+1);if(e.unref){e.unref()}}};this.#K=n=>{t[n]=e[n]!==0?De.now():0};this.#z=(r,s)=>{if(e[s]){const i=e[s];const o=t[s];if(!i||!o)return;r.ttl=i;r.start=o;r.now=n||getNow();const a=r.now-o;r.remainingTTL=i-a}};let n=0;const getNow=()=>{const e=De.now();if(this.ttlResolution>0){n=e;const t=setTimeout((()=>n=0),this.ttlResolution);if(t.unref){t.unref()}}return e};this.getRemainingTTL=r=>{const s=this.#E.get(r);if(s===undefined){return 0}const i=e[s];const o=t[s];if(!i||!o){return Infinity}const a=(n||getNow())-o;return i-a};this.#q=r=>{const s=t[r];const i=e[r];return!!i&&!!s&&(n||getNow())-s>i}}#K=()=>{};#z=()=>{};#V=()=>{};#q=()=>false;#U(){const e=new ZeroArray(this.#g);this.#A=0;this.#T=e;this.#Y=t=>{this.#A-=e[t];e[t]=0};this.#J=(e,t,n,r)=>{if(this.#I(t)){return 0}if(!isPosInt(n)){if(r){if(typeof r!=="function"){throw new TypeError("sizeCalculation must be a function")}n=r(t,e);if(!isPosInt(n)){throw new TypeError("sizeCalculation return invalid (expect positive integer)")}}else{throw new TypeError("invalid size value (must be positive integer). "+"When maxSize or maxEntrySize is used, sizeCalculation "+"or size must be set.")}}return n};this.#Q=(t,n,r)=>{e[t]=n;if(this.#y){const n=this.#y-e[t];while(this.#A>n){this.#X(true)}}this.#A+=e[t];if(r){r.entrySize=n;r.totalCalculatedSize=this.#A}}}#Y=e=>{};#Q=(e,t,n)=>{};#J=(e,t,n,r)=>{if(n||r){throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}return 0};*#H({allowStale:e=this.allowStale}={}){if(this.#S){for(let t=this.#x;true;){if(!this.#Z(t)){break}if(e||!this.#q(t)){yield t}if(t===this.#F){break}else{t=this.#k[t]}}}}*#W({allowStale:e=this.allowStale}={}){if(this.#S){for(let t=this.#F;true;){if(!this.#Z(t)){break}if(e||!this.#q(t)){yield t}if(t===this.#x){break}else{t=this.#_[t]}}}}#Z(e){return e!==undefined&&this.#E.get(this.#D[e])===e}*entries(){for(const e of this.#H()){if(this.#C[e]!==undefined&&this.#D[e]!==undefined&&!this.#I(this.#C[e])){yield[this.#D[e],this.#C[e]]}}}*rentries(){for(const e of this.#W()){if(this.#C[e]!==undefined&&this.#D[e]!==undefined&&!this.#I(this.#C[e])){yield[this.#D[e],this.#C[e]]}}}*keys(){for(const e of this.#H()){const t=this.#D[e];if(t!==undefined&&!this.#I(this.#C[e])){yield t}}}*rkeys(){for(const e of this.#W()){const t=this.#D[e];if(t!==undefined&&!this.#I(this.#C[e])){yield t}}}*values(){for(const e of this.#H()){const t=this.#C[e];if(t!==undefined&&!this.#I(this.#C[e])){yield this.#C[e]}}}*rvalues(){for(const e of this.#W()){const t=this.#C[e];if(t!==undefined&&!this.#I(this.#C[e])){yield this.#C[e]}}}[Symbol.iterator](){return this.entries()}find(e,t={}){for(const n of this.#H()){const r=this.#C[n];const s=this.#I(r)?r.__staleWhileFetching:r;if(s===undefined)continue;if(e(s,this.#D[n],this)){return this.get(this.#D[n],t)}}}forEach(e,t=this){for(const n of this.#H()){const r=this.#C[n];const s=this.#I(r)?r.__staleWhileFetching:r;if(s===undefined)continue;e.call(t,s,this.#D[n],this)}}rforEach(e,t=this){for(const n of this.#W()){const r=this.#C[n];const s=this.#I(r)?r.__staleWhileFetching:r;if(s===undefined)continue;e.call(t,s,this.#D[n],this)}}purgeStale(){let e=false;for(const t of this.#W({allowStale:true})){if(this.#q(t)){this.delete(this.#D[t]);e=true}}return e}info(e){const t=this.#E.get(e);if(t===undefined)return undefined;const n=this.#C[t];const r=this.#I(n)?n.__staleWhileFetching:n;if(r===undefined)return undefined;const s={value:r};if(this.#N&&this.#B){const e=this.#N[t];const n=this.#B[t];if(e&&n){const t=e-(De.now()-n);s.ttl=t;s.start=Date.now()}}if(this.#T){s.size=this.#T[t]}return s}dump(){const e=[];for(const t of this.#H({allowStale:true})){const n=this.#D[t];const r=this.#C[t];const s=this.#I(r)?r.__staleWhileFetching:r;if(s===undefined||n===undefined)continue;const i={value:s};if(this.#N&&this.#B){i.ttl=this.#N[t];const e=De.now()-this.#B[t];i.start=Math.floor(Date.now()-e)}if(this.#T){i.size=this.#T[t]}e.unshift([n,i])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=De.now()-e}this.set(t,n.value,n)}}set(e,t,n={}){if(t===undefined){this.delete(e);return this}const{ttl:r=this.ttl,start:s,noDisposeOnSet:i=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:a}=n;let{noUpdateTTL:u=this.noUpdateTTL}=n;const c=this.#J(e,t,n.size||0,o);if(this.maxEntrySize&&c>this.maxEntrySize){if(a){a.set="miss";a.maxEntrySizeExceeded=true}this.delete(e);return this}let l=this.#S===0?undefined:this.#E.get(e);if(l===undefined){l=this.#S===0?this.#x:this.#O.length!==0?this.#O.pop():this.#S===this.#g?this.#X(false):this.#S;this.#D[l]=e;this.#C[l]=t;this.#E.set(e,l);this.#_[this.#x]=l;this.#k[l]=this.#x;this.#x=l;this.#S++;this.#Q(l,c,a);if(a)a.set="add";u=false}else{this.#j(l);const n=this.#C[l];if(t!==n){if(this.#L&&this.#I(n)){n.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:t}=n;if(t!==undefined&&!i){if(this.#R){this.#b?.(t,e,"set")}if(this.#M){this.#P?.push([t,e,"set"])}}}else if(!i){if(this.#R){this.#b?.(n,e,"set")}if(this.#M){this.#P?.push([n,e,"set"])}}this.#Y(l);this.#Q(l,c,a);this.#C[l]=t;if(a){a.set="replace";const e=n&&this.#I(n)?n.__staleWhileFetching:n;if(e!==undefined)a.oldValue=e}}else if(a){a.set="update"}}if(r!==0&&!this.#N){this.#G()}if(this.#N){if(!u){this.#V(l,r,s)}if(a)this.#z(a,l)}if(!i&&this.#M&&this.#P){const e=this.#P;let t;while(t=e?.shift()){this.#v?.(...t)}}return this}pop(){try{while(this.#S){const e=this.#C[this.#F];this.#X(true);if(this.#I(e)){if(e.__staleWhileFetching){return e.__staleWhileFetching}}else if(e!==undefined){return e}}}finally{if(this.#M&&this.#P){const e=this.#P;let t;while(t=e?.shift()){this.#v?.(...t)}}}}#X(e){const t=this.#F;const n=this.#D[t];const r=this.#C[t];if(this.#L&&this.#I(r)){r.__abortController.abort(new Error("evicted"))}else if(this.#R||this.#M){if(this.#R){this.#b?.(r,n,"evict")}if(this.#M){this.#P?.push([r,n,"evict"])}}this.#Y(t);if(e){this.#D[t]=undefined;this.#C[t]=undefined;this.#O.push(t)}if(this.#S===1){this.#F=this.#x=0;this.#O.length=0}else{this.#F=this.#_[t]}this.#E.delete(n);this.#S--;return t}has(e,t={}){const{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t;const s=this.#E.get(e);if(s!==undefined){const e=this.#C[s];if(this.#I(e)&&e.__staleWhileFetching===undefined){return false}if(!this.#q(s)){if(n){this.#K(s)}if(r){r.has="hit";this.#z(r,s)}return true}else if(r){r.has="stale";this.#z(r,s)}}else if(r){r.has="miss"}return false}peek(e,t={}){const{allowStale:n=this.allowStale}=t;const r=this.#E.get(e);if(r===undefined||!n&&this.#q(r)){return}const s=this.#C[r];return this.#I(s)?s.__staleWhileFetching:s}#$(e,t,n,r){const s=t===undefined?undefined:this.#C[t];if(this.#I(s)){return s}const i=new ke;const{signal:o}=n;o?.addEventListener("abort",(()=>i.abort(o.reason)),{signal:i.signal});const a={signal:i.signal,options:n,context:r};const cb=(r,s=false)=>{const{aborted:o}=i.signal;const c=n.ignoreFetchAbort&&r!==undefined;if(n.status){if(o&&!s){n.status.fetchAborted=true;n.status.fetchError=i.signal.reason;if(c)n.status.fetchAbortIgnored=true}else{n.status.fetchResolved=true}}if(o&&!c&&!s){return fetchFail(i.signal.reason)}const l=u;if(this.#C[t]===u){if(r===undefined){if(l.__staleWhileFetching){this.#C[t]=l.__staleWhileFetching}else{this.delete(e)}}else{if(n.status)n.status.fetchUpdated=true;this.set(e,r,a.options)}}return r};const eb=e=>{if(n.status){n.status.fetchRejected=true;n.status.fetchError=e}return fetchFail(e)};const fetchFail=r=>{const{aborted:s}=i.signal;const o=s&&n.allowStaleOnFetchAbort;const a=o||n.allowStaleOnFetchRejection;const c=a||n.noDeleteOnFetchRejection;const l=u;if(this.#C[t]===u){const n=!c||l.__staleWhileFetching===undefined;if(n){this.delete(e)}else if(!o){this.#C[t]=l.__staleWhileFetching}}if(a){if(n.status&&l.__staleWhileFetching!==undefined){n.status.returnedStale=true}return l.__staleWhileFetching}else if(l.__returned===l){throw r}};const pcall=(t,r)=>{const o=this.#w?.(e,s,a);if(o&&o instanceof Promise){o.then((e=>t(e===undefined?undefined:e)),r)}i.signal.addEventListener("abort",(()=>{if(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort){t(undefined);if(n.allowStaleOnFetchAbort){t=e=>cb(e,true)}}}))};if(n.status)n.status.fetchDispatched=true;const u=new Promise(pcall).then(cb,eb);const c=Object.assign(u,{__abortController:i,__staleWhileFetching:s,__returned:undefined});if(t===undefined){this.set(e,c,{...a.options,status:undefined});t=this.#E.get(e)}else{this.#C[t]=c}return c}#I(e){if(!this.#L)return false;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof ke}async fetch(e,t={}){const{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:i=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:h=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:d,forceRefresh:g=false,status:y,signal:b}=t;if(!this.#L){if(y)y.fetch="get";return this.get(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:s,status:y})}const v={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:s,ttl:i,noDisposeOnSet:o,size:a,sizeCalculation:u,noUpdateTTL:c,noDeleteOnFetchRejection:l,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:p,ignoreFetchAbort:h,status:y,signal:b};let w=this.#E.get(e);if(w===undefined){if(y)y.fetch="miss";const t=this.#$(e,w,v,d);return t.__returned=t}else{const t=this.#C[w];if(this.#I(t)){const e=n&&t.__staleWhileFetching!==undefined;if(y){y.fetch="inflight";if(e)y.returnedStale=true}return e?t.__staleWhileFetching:t.__returned=t}const s=this.#q(w);if(!g&&!s){if(y)y.fetch="hit";this.#j(w);if(r){this.#K(w)}if(y)this.#z(y,w);return t}const i=this.#$(e,w,v,d);const o=i.__staleWhileFetching!==undefined;const a=o&&n;if(y){y.fetch=s?"stale":"refresh";if(a&&s)y.returnedStale=true}return a?i.__staleWhileFetching:i.__returned=i}}get(e,t={}){const{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:i}=t;const o=this.#E.get(e);if(o!==undefined){const t=this.#C[o];const a=this.#I(t);if(i)this.#z(i,o);if(this.#q(o)){if(i)i.get="stale";if(!a){if(!s){this.delete(e)}if(i&&n)i.returnedStale=true;return n?t:undefined}else{if(i&&n&&t.__staleWhileFetching!==undefined){i.returnedStale=true}return n?t.__staleWhileFetching:undefined}}else{if(i)i.get="hit";if(a){return t.__staleWhileFetching}this.#j(o);if(r){this.#K(o)}return t}}else if(i){i.get="miss"}}#ee(e,t){this.#k[t]=e;this.#_[e]=t}#j(e){if(e!==this.#x){if(e===this.#F){this.#F=this.#_[e]}else{this.#ee(this.#k[e],this.#_[e])}this.#ee(this.#x,e);this.#x=e}}delete(e){let t=false;if(this.#S!==0){const n=this.#E.get(e);if(n!==undefined){t=true;if(this.#S===1){this.clear()}else{this.#Y(n);const t=this.#C[n];if(this.#I(t)){t.__abortController.abort(new Error("deleted"))}else if(this.#R||this.#M){if(this.#R){this.#b?.(t,e,"delete")}if(this.#M){this.#P?.push([t,e,"delete"])}}this.#E.delete(e);this.#D[n]=undefined;this.#C[n]=undefined;if(n===this.#x){this.#x=this.#k[n]}else if(n===this.#F){this.#F=this.#_[n]}else{const e=this.#k[n];this.#_[e]=this.#_[n];const t=this.#_[n];this.#k[t]=this.#k[n]}this.#S--;this.#O.push(n)}}}if(this.#M&&this.#P?.length){const e=this.#P;let t;while(t=e?.shift()){this.#v?.(...t)}}return t}clear(){for(const e of this.#W({allowStale:true})){const t=this.#C[e];if(this.#I(t)){t.__abortController.abort(new Error("deleted"))}else{const n=this.#D[e];if(this.#R){this.#b?.(t,n,"delete")}if(this.#M){this.#P?.push([t,n,"delete"])}}}this.#E.clear();this.#C.fill(undefined);this.#D.fill(undefined);if(this.#N&&this.#B){this.#N.fill(0);this.#B.fill(0)}if(this.#T){this.#T.fill(0)}this.#F=0;this.#x=0;this.#O.length=0;this.#A=0;this.#S=0;if(this.#M&&this.#P){const e=this.#P;let t;while(t=e?.shift()){this.#v?.(...t)}}}}var Oe=__nccwpck_require__(1017);const Pe=e(import.meta.url)("url");var Te=__nccwpck_require__(7147);var Be=__nccwpck_require__.t(Te,2);var Ne=__nccwpck_require__(2361);var Re=__nccwpck_require__(2781);var Le=__nccwpck_require__(1576);const Me=typeof process==="object"&&process?process:{stdout:null,stderr:null};const isStream=e=>!!e&&typeof e==="object"&&(e instanceof Minipass||e instanceof Re||isReadable(e)||isWritable(e));const isReadable=e=>!!e&&typeof e==="object"&&e instanceof Ne.EventEmitter&&typeof e.pipe==="function"&&e.pipe!==Re.Writable.prototype.pipe;const isWritable=e=>!!e&&typeof e==="object"&&e instanceof Ne.EventEmitter&&typeof e.write==="function"&&typeof e.end==="function";const Ie=Symbol("EOF");const $e=Symbol("maybeEmitEnd");const je=Symbol("emittedEnd");const He=Symbol("emittingEnd");const We=Symbol("emittedError");const qe=Symbol("closed");const Ue=Symbol("read");const Ge=Symbol("flush");const Ve=Symbol("flushChunk");const Ke=Symbol("encoding");const ze=Symbol("decoder");const Ye=Symbol("flowing");const Je=Symbol("paused");const Qe=Symbol("resume");const Xe=Symbol("buffer");const Ze=Symbol("pipes");const et=Symbol("bufferLength");const tt=Symbol("bufferPush");const nt=Symbol("bufferShift");const rt=Symbol("objectMode");const st=Symbol("destroyed");const it=Symbol("error");const ot=Symbol("emitData");const at=Symbol("emitEnd");const ut=Symbol("emitEnd2");const ct=Symbol("async");const lt=Symbol("abort");const ft=Symbol("aborted");const ht=Symbol("signal");const pt=Symbol("dataListeners");const dt=Symbol("discarded");const defer=e=>Promise.resolve().then(e);const nodefer=e=>e();const isEndish=e=>e==="end"||e==="finish"||e==="prefinish";const isArrayBufferLike=e=>e instanceof ArrayBuffer||!!e&&typeof e==="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0;const isArrayBufferView=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);class Pipe{src;dest;opts;ondrain;constructor(e,t,n){this.src=e;this.dest=t;this.opts=n;this.ondrain=()=>e[Qe]();this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe();if(this.opts.end)this.dest.end()}}class PipeProxyErrors extends Pipe{unpipe(){this.src.removeListener("error",this.proxyErrors);super.unpipe()}constructor(e,t,n){super(e,t,n);this.proxyErrors=e=>t.emit("error",e);e.on("error",this.proxyErrors)}}const isObjectModeOptions=e=>!!e.objectMode;const isEncodingOptions=e=>!e.objectMode&&!!e.encoding&&e.encoding!=="buffer";class Minipass extends Ne.EventEmitter{[Ye]=false;[Je]=false;[Ze]=[];[Xe]=[];[rt];[Ke];[ct];[ze];[Ie]=false;[je]=false;[He]=false;[qe]=false;[We]=null;[et]=0;[st]=false;[ht];[ft]=false;[pt]=0;[dt]=false;writable=true;readable=true;constructor(...e){const t=e[0]||{};super();if(t.objectMode&&typeof t.encoding==="string"){throw new TypeError("Encoding and objectMode may not be used together")}if(isObjectModeOptions(t)){this[rt]=true;this[Ke]=null}else if(isEncodingOptions(t)){this[Ke]=t.encoding;this[rt]=false}else{this[rt]=false;this[Ke]=null}this[ct]=!!t.async;this[ze]=this[Ke]?new Le.StringDecoder(this[Ke]):null;if(t&&t.debugExposeBuffer===true){Object.defineProperty(this,"buffer",{get:()=>this[Xe]})}if(t&&t.debugExposePipes===true){Object.defineProperty(this,"pipes",{get:()=>this[Ze]})}const{signal:n}=t;if(n){this[ht]=n;if(n.aborted){this[lt]()}else{n.addEventListener("abort",(()=>this[lt]()))}}}get bufferLength(){return this[et]}get encoding(){return this[Ke]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[rt]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get["async"](){return this[ct]}set["async"](e){this[ct]=this[ct]||!!e}[lt](){this[ft]=true;this.emit("abort",this[ht]?.reason);this.destroy(this[ht]?.reason)}get aborted(){return this[ft]}set aborted(e){}write(e,t,n){if(this[ft])return false;if(this[Ie])throw new Error("write after end");if(this[st]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof t==="function"){n=t;t="utf8"}if(!t)t="utf8";const r=this[ct]?defer:nodefer;if(!this[rt]&&!Buffer.isBuffer(e)){if(isArrayBufferView(e)){e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}else if(isArrayBufferLike(e)){e=Buffer.from(e)}else if(typeof e!=="string"){throw new Error("Non-contiguous data written to non-objectMode stream")}}if(this[rt]){if(this[Ye]&&this[et]!==0)this[Ge](true);if(this[Ye])this.emit("data",e);else this[tt](e);if(this[et]!==0)this.emit("readable");if(n)r(n);return this[Ye]}if(!e.length){if(this[et]!==0)this.emit("readable");if(n)r(n);return this[Ye]}if(typeof e==="string"&&!(t===this[Ke]&&!this[ze]?.lastNeed)){e=Buffer.from(e,t)}if(Buffer.isBuffer(e)&&this[Ke]){e=this[ze].write(e)}if(this[Ye]&&this[et]!==0)this[Ge](true);if(this[Ye])this.emit("data",e);else this[tt](e);if(this[et]!==0)this.emit("readable");if(n)r(n);return this[Ye]}read(e){if(this[st])return null;this[dt]=false;if(this[et]===0||e===0||e&&e>this[et]){this[$e]();return null}if(this[rt])e=null;if(this[Xe].length>1&&!this[rt]){this[Xe]=[this[Ke]?this[Xe].join(""):Buffer.concat(this[Xe],this[et])]}const t=this[Ue](e||null,this[Xe][0]);this[$e]();return t}[Ue](e,t){if(this[rt])this[nt]();else{const n=t;if(e===n.length||e===null)this[nt]();else if(typeof n==="string"){this[Xe][0]=n.slice(e);t=n.slice(0,e);this[et]-=e}else{this[Xe][0]=n.subarray(e);t=n.subarray(0,e);this[et]-=e}}this.emit("data",t);if(!this[Xe].length&&!this[Ie])this.emit("drain");return t}end(e,t,n){if(typeof e==="function"){n=e;e=undefined}if(typeof t==="function"){n=t;t="utf8"}if(e!==undefined)this.write(e,t);if(n)this.once("end",n);this[Ie]=true;this.writable=false;if(this[Ye]||!this[Je])this[$e]();return this}[Qe](){if(this[st])return;if(!this[pt]&&!this[Ze].length){this[dt]=true}this[Je]=false;this[Ye]=true;this.emit("resume");if(this[Xe].length)this[Ge]();else if(this[Ie])this[$e]();else this.emit("drain")}resume(){return this[Qe]()}pause(){this[Ye]=false;this[Je]=true;this[dt]=false}get destroyed(){return this[st]}get flowing(){return this[Ye]}get paused(){return this[Je]}[tt](e){if(this[rt])this[et]+=1;else this[et]+=e.length;this[Xe].push(e)}[nt](){if(this[rt])this[et]-=1;else this[et]-=this[Xe][0].length;return this[Xe].shift()}[Ge](e=false){do{}while(this[Ve](this[nt]())&&this[Xe].length);if(!e&&!this[Xe].length&&!this[Ie])this.emit("drain")}[Ve](e){this.emit("data",e);return this[Ye]}pipe(e,t){if(this[st])return e;this[dt]=false;const n=this[je];t=t||{};if(e===Me.stdout||e===Me.stderr)t.end=false;else t.end=t.end!==false;t.proxyErrors=!!t.proxyErrors;if(n){if(t.end)e.end()}else{this[Ze].push(!t.proxyErrors?new Pipe(this,e,t):new PipeProxyErrors(this,e,t));if(this[ct])defer((()=>this[Qe]()));else this[Qe]()}return e}unpipe(e){const t=this[Ze].find((t=>t.dest===e));if(t){if(this[Ze].length===1){if(this[Ye]&&this[pt]===0){this[Ye]=false}this[Ze]=[]}else this[Ze].splice(this[Ze].indexOf(t),1);t.unpipe()}}addListener(e,t){return this.on(e,t)}on(e,t){const n=super.on(e,t);if(e==="data"){this[dt]=false;this[pt]++;if(!this[Ze].length&&!this[Ye]){this[Qe]()}}else if(e==="readable"&&this[et]!==0){super.emit("readable")}else if(isEndish(e)&&this[je]){super.emit(e);this.removeAllListeners(e)}else if(e==="error"&&this[We]){const e=t;if(this[ct])defer((()=>e.call(this,this[We])));else e.call(this,this[We])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){const n=super.off(e,t);if(e==="data"){this[pt]=this.listeners("data").length;if(this[pt]===0&&!this[dt]&&!this[Ze].length){this[Ye]=false}}return n}removeAllListeners(e){const t=super.removeAllListeners(e);if(e==="data"||e===undefined){this[pt]=0;if(!this[dt]&&!this[Ze].length){this[Ye]=false}}return t}get emittedEnd(){return this[je]}[$e](){if(!this[He]&&!this[je]&&!this[st]&&this[Xe].length===0&&this[Ie]){this[He]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[qe])this.emit("close");this[He]=false}}emit(e,...t){const n=t[0];if(e!=="error"&&e!=="close"&&e!==st&&this[st]){return false}else if(e==="data"){return!this[rt]&&!n?false:this[ct]?(defer((()=>this[ot](n))),true):this[ot](n)}else if(e==="end"){return this[at]()}else if(e==="close"){this[qe]=true;if(!this[je]&&!this[st])return false;const e=super.emit("close");this.removeAllListeners("close");return e}else if(e==="error"){this[We]=n;super.emit(it,n);const e=!this[ht]||this.listeners("error").length?super.emit("error",n):false;this[$e]();return e}else if(e==="resume"){const e=super.emit("resume");this[$e]();return e}else if(e==="finish"||e==="prefinish"){const t=super.emit(e);this.removeAllListeners(e);return t}const r=super.emit(e,...t);this[$e]();return r}[ot](e){for(const t of this[Ze]){if(t.dest.write(e)===false)this.pause()}const t=this[dt]?false:super.emit("data",e);this[$e]();return t}[at](){if(this[je])return false;this[je]=true;this.readable=false;return this[ct]?(defer((()=>this[ut]())),true):this[ut]()}[ut](){if(this[ze]){const e=this[ze].end();if(e){for(const t of this[Ze]){t.dest.write(e)}if(!this[dt])super.emit("data",e)}}for(const e of this[Ze]){e.end()}const e=super.emit("end");this.removeAllListeners("end");return e}async collect(){const e=Object.assign([],{dataLength:0});if(!this[rt])e.dataLength=0;const t=this.promise();this.on("data",(t=>{e.push(t);if(!this[rt])e.dataLength+=t.length}));await t;return e}async concat(){if(this[rt]){throw new Error("cannot concat in objectMode")}const e=await this.collect();return this[Ke]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise(((e,t)=>{this.on(st,(()=>t(new Error("stream destroyed"))));this.on("error",(e=>t(e)));this.on("end",(()=>e()))}))}[Symbol.asyncIterator](){this[dt]=false;let e=false;const stop=async()=>{this.pause();e=true;return{value:undefined,done:true}};const next=()=>{if(e)return stop();const t=this.read();if(t!==null)return Promise.resolve({done:false,value:t});if(this[Ie])return stop();let n;let r;const onerr=e=>{this.off("data",ondata);this.off("end",onend);this.off(st,ondestroy);stop();r(e)};const ondata=e=>{this.off("error",onerr);this.off("end",onend);this.off(st,ondestroy);this.pause();n({value:e,done:!!this[Ie]})};const onend=()=>{this.off("error",onerr);this.off("data",ondata);this.off(st,ondestroy);stop();n({done:true,value:undefined})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((e,t)=>{r=t;n=e;this.once(st,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next,throw:stop,return:stop,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[dt]=false;let e=false;const stop=()=>{this.pause();this.off(it,stop);this.off(st,stop);this.off("end",stop);e=true;return{done:true,value:undefined}};const next=()=>{if(e)return stop();const t=this.read();return t===null?stop():{done:false,value:t}};this.once("end",stop);this.once(it,stop);this.once(st,stop);return{next:next,throw:stop,return:stop,[Symbol.iterator](){return this}}}destroy(e){if(this[st]){if(e)this.emit("error",e);else this.emit(st);return this}this[st]=true;this[dt]=true;this[Xe].length=0;this[et]=0;const t=this;if(typeof t.close==="function"&&!this[qe])t.close();if(e)this.emit("error",e);else this.emit(st);return this}static get isStream(){return isStream}}const mt=Te.realpathSync.native;const gt={lstatSync:Te.lstatSync,readdir:Te.readdir,readdirSync:Te.readdirSync,readlinkSync:Te.readlinkSync,realpathSync:mt,promises:{lstat:J.lstat,readdir:J.readdir,readlink:J.readlink,realpath:J.realpath}};const fsFromOption=e=>!e||e===gt||e===Be?gt:{...gt,...e,promises:{...gt.promises,...e.promises||{}}};const yt=/^\\\\\?\\([a-z]:)\\?$/i;const uncToDrive=e=>e.replace(/\//g,"\\").replace(yt,"$1\\");const bt=/[\\\/]/;const vt=0;const wt=1;const St=2;const At=4;const Et=6;const Dt=8;const Ct=10;const _t=12;const kt=15;const Ft=~kt;const xt=16;const Ot=32;const Pt=64;const Tt=128;const Bt=256;const Nt=512;const Rt=Pt|Tt|Nt;const Lt=1023;const entToType=e=>e.isFile()?Dt:e.isDirectory()?At:e.isSymbolicLink()?Ct:e.isCharacterDevice()?St:e.isBlockDevice()?Et:e.isSocket()?_t:e.isFIFO()?wt:vt;const Mt=new Map;const normalize=e=>{const t=Mt.get(e);if(t)return t;const n=e.normalize("NFKD");Mt.set(e,n);return n};const It=new Map;const normalizeNocase=e=>{const t=It.get(e);if(t)return t;const n=normalize(e.toLowerCase());It.set(e,n);return n};class ResolveCache extends LRUCache{constructor(){super({max:256})}}class ChildrenCache extends LRUCache{constructor(e=16*1024){super({maxSize:e,sizeCalculation:e=>e.length+1})}}const $t=Symbol("PathScurry setAsCwd");class PathBase{name;root;roots;parent;nocase;#te;#ne;get dev(){return this.#ne}#re;get mode(){return this.#re}#se;get nlink(){return this.#se}#ie;get uid(){return this.#ie}#oe;get gid(){return this.#oe}#ae;get rdev(){return this.#ae}#ue;get blksize(){return this.#ue}#ce;get ino(){return this.#ce}#S;get size(){return this.#S}#le;get blocks(){return this.#le}#fe;get atimeMs(){return this.#fe}#he;get mtimeMs(){return this.#he}#pe;get ctimeMs(){return this.#pe}#de;get birthtimeMs(){return this.#de}#me;get atime(){return this.#me}#ge;get mtime(){return this.#ge}#ye;get ctime(){return this.#ye}#be;get birthtime(){return this.#be}#ve;#we;#Se;#Ae;#Ee;#De;#Ce;#_e;#ke;#Fe;get path(){return(this.parent||this).fullpath()}constructor(e,t=vt,n,r,s,i,o){this.name=e;this.#ve=s?normalizeNocase(e):normalize(e);this.#Ce=t≪this.nocase=s;this.roots=r;this.root=n||this;this.#_e=i;this.#Se=o.fullpath;this.#Ee=o.relative;this.#De=o.relativePosix;this.parent=o.parent;if(this.parent){this.#te=this.parent.#te}else{this.#te=fsFromOption(o.fs)}}depth(){if(this.#we!==undefined)return this.#we;if(!this.parent)return this.#we=0;return this.#we=this.parent.depth()+1}childrenCache(){return this.#_e}resolve(e){if(!e){return this}const t=this.getRootString(e);const n=e.substring(t.length);const r=n.split(this.splitSep);const s=t?this.getRoot(t).#xe(r):this.#xe(r);return s}#xe(e){let t=this;for(const n of e){t=t.child(n)}return t}children(){const e=this.#_e.get(this);if(e){return e}const t=Object.assign([],{provisional:0});this.#_e.set(this,t);this.#Ce&=~xt;return t}child(e,t){if(e===""||e==="."){return this}if(e===".."){return this.parent||this}const n=this.children();const r=this.nocase?normalizeNocase(e):normalize(e);for(const e of n){if(e.#ve===r){return e}}const s=this.parent?this.sep:"";const i=this.#Se?this.#Se+s+e:undefined;const o=this.newChild(e,vt,{...t,parent:this,fullpath:i});if(!this.canReaddir()){o.#Ce|=Tt}n.push(o);return o}relative(){if(this.#Ee!==undefined){return this.#Ee}const e=this.name;const t=this.parent;if(!t){return this.#Ee=this.name}const n=t.relative();return n+(!n||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.#De!==undefined)return this.#De;const e=this.name;const t=this.parent;if(!t){return this.#De=this.fullpathPosix()}const n=t.relativePosix();return n+(!n||!t.parent?"":"/")+e}fullpath(){if(this.#Se!==undefined){return this.#Se}const e=this.name;const t=this.parent;if(!t){return this.#Se=this.name}const n=t.fullpath();const r=n+(!t.parent?"":this.sep)+e;return this.#Se=r}fullpathPosix(){if(this.#Ae!==undefined)return this.#Ae;if(this.sep==="/")return this.#Ae=this.fullpath();if(!this.parent){const e=this.fullpath().replace(/\\/g,"/");if(/^[a-z]:\//i.test(e)){return this.#Ae=`//?/${e}`}else{return this.#Ae=e}}const e=this.parent;const t=e.fullpathPosix();const n=t+(!t||!e.parent?"":"/")+this.name;return this.#Ae=n}isUnknown(){return(this.#Ce&kt)===vt}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#Ce&kt)===Dt}isDirectory(){return(this.#Ce&kt)===At}isCharacterDevice(){return(this.#Ce&kt)===St}isBlockDevice(){return(this.#Ce&kt)===Et}isFIFO(){return(this.#Ce&kt)===wt}isSocket(){return(this.#Ce&kt)===_t}isSymbolicLink(){return(this.#Ce&Ct)===Ct}lstatCached(){return this.#Ce&Ot?this:undefined}readlinkCached(){return this.#ke}realpathCached(){return this.#Fe}readdirCached(){const e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#ke)return true;if(!this.parent)return false;const e=this.#Ce&kt;return!(e!==vt&&e!==Ct||this.#Ce&Bt||this.#Ce&Tt)}calledReaddir(){return!!(this.#Ce&xt)}isENOENT(){return!!(this.#Ce&Tt)}isNamed(e){return!this.nocase?this.#ve===normalize(e):this.#ve===normalizeNocase(e)}async readlink(){const e=this.#ke;if(e){return e}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const e=await this.#te.promises.readlink(this.fullpath());const t=this.parent.resolve(e);if(t){return this.#ke=t}}catch(e){this.#Oe(e.code);return undefined}}readlinkSync(){const e=this.#ke;if(e){return e}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const e=this.#te.readlinkSync(this.fullpath());const t=this.parent.resolve(e);if(t){return this.#ke=t}}catch(e){this.#Oe(e.code);return undefined}}#Pe(e){this.#Ce|=xt;for(let t=e.provisional;t<e.length;t++){e[t].#Te()}}#Te(){if(this.#Ce&Tt)return;this.#Ce=(this.#Ce|Tt)&Ft;this.#Be()}#Be(){const e=this.children();e.provisional=0;for(const t of e){t.#Te()}}#Ne(){this.#Ce|=Nt;this.#Re()}#Re(){if(this.#Ce&Pt)return;let e=this.#Ce;if((e&kt)===At)e&=Ft;this.#Ce=e|Pt;this.#Be()}#Le(e=""){if(e==="ENOTDIR"||e==="EPERM"){this.#Re()}else if(e==="ENOENT"){this.#Te()}else{this.children().provisional=0}}#Me(e=""){if(e==="ENOTDIR"){const e=this.parent;e.#Re()}else if(e==="ENOENT"){this.#Te()}}#Oe(e=""){let t=this.#Ce;t|=Bt;if(e==="ENOENT")t|=Tt;if(e==="EINVAL"||e==="UNKNOWN"){t&=Ft}this.#Ce=t;if(e==="ENOTDIR"&&this.parent){this.parent.#Re()}}#Ie(e,t){return this.#$e(e,t)||this.#je(e,t)}#je(e,t){const n=entToType(e);const r=this.newChild(e.name,n,{parent:this});const s=r.#Ce&kt;if(s!==At&&s!==Ct&&s!==vt){r.#Ce|=Pt}t.unshift(r);t.provisional++;return r}#$e(e,t){for(let n=t.provisional;n<t.length;n++){const r=t[n];const s=this.nocase?normalizeNocase(e.name):normalize(e.name);if(s!==r.#ve){continue}return this.#He(e,r,n,t)}}#He(e,t,n,r){const s=t.name;t.#Ce=t.#Ce&Ft|entToType(e);if(s!==e.name)t.name=e.name;if(n!==r.provisional){if(n===r.length-1)r.pop();else r.splice(n,1);r.unshift(t)}r.provisional++;return t}async lstat(){if((this.#Ce&Tt)===0){try{this.#We(await this.#te.promises.lstat(this.fullpath()));return this}catch(e){this.#Me(e.code)}}}lstatSync(){if((this.#Ce&Tt)===0){try{this.#We(this.#te.lstatSync(this.fullpath()));return this}catch(e){this.#Me(e.code)}}}#We(e){const{atime:t,atimeMs:n,birthtime:r,birthtimeMs:s,blksize:i,blocks:o,ctime:a,ctimeMs:u,dev:c,gid:l,ino:f,mode:h,mtime:p,mtimeMs:d,nlink:g,rdev:y,size:b,uid:v}=e;this.#me=t;this.#fe=n;this.#be=r;this.#de=s;this.#ue=i;this.#le=o;this.#ye=a;this.#pe=u;this.#ne=c;this.#oe=l;this.#ce=f;this.#re=h;this.#ge=p;this.#he=d;this.#se=g;this.#ae=y;this.#S=b;this.#ie=v;const w=entToType(e);this.#Ce=this.#Ce&Ft|w|Ot;if(w!==vt&&w!==At&&w!==Ct){this.#Ce|=Pt}}#qe=[];#Ue=false;#Ge(e){this.#Ue=false;const t=this.#qe.slice();this.#qe.length=0;t.forEach((t=>t(null,e)))}readdirCB(e,t=false){if(!this.canReaddir()){if(t)e(null,[]);else queueMicrotask((()=>e(null,[])));return}const n=this.children();if(this.calledReaddir()){const r=n.slice(0,n.provisional);if(t)e(null,r);else queueMicrotask((()=>e(null,r)));return}this.#qe.push(e);if(this.#Ue){return}this.#Ue=true;const r=this.fullpath();this.#te.readdir(r,{withFileTypes:true},((e,t)=>{if(e){this.#Le(e.code);n.provisional=0}else{for(const e of t){this.#Ie(e,n)}this.#Pe(n)}this.#Ge(n.slice(0,n.provisional));return}))}#Ve;async readdir(){if(!this.canReaddir()){return[]}const e=this.children();if(this.calledReaddir()){return e.slice(0,e.provisional)}const t=this.fullpath();if(this.#Ve){await this.#Ve}else{let resolve=()=>{};this.#Ve=new Promise((e=>resolve=e));try{for(const n of await this.#te.promises.readdir(t,{withFileTypes:true})){this.#Ie(n,e)}this.#Pe(e)}catch(t){this.#Le(t.code);e.provisional=0}this.#Ve=undefined;resolve()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir()){return[]}const e=this.children();if(this.calledReaddir()){return e.slice(0,e.provisional)}const t=this.fullpath();try{for(const n of this.#te.readdirSync(t,{withFileTypes:true})){this.#Ie(n,e)}this.#Pe(e)}catch(t){this.#Le(t.code);e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#Ce&Rt)return false;const e=kt&this.#Ce;if(!(e===vt||e===At||e===Ct)){return false}return true}shouldWalk(e,t){return(this.#Ce&At)===At&&!(this.#Ce&Rt)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#Fe)return this.#Fe;if((Nt|Bt|Tt)&this.#Ce)return undefined;try{const e=await this.#te.promises.realpath(this.fullpath());return this.#Fe=this.resolve(e)}catch(e){this.#Ne()}}realpathSync(){if(this.#Fe)return this.#Fe;if((Nt|Bt|Tt)&this.#Ce)return undefined;try{const e=this.#te.realpathSync(this.fullpath());return this.#Fe=this.resolve(e)}catch(e){this.#Ne()}}[$t](e){if(e===this)return;const t=new Set([]);let n=[];let r=this;while(r&&r.parent){t.add(r);r.#Ee=n.join(this.sep);r.#De=n.join("/");r=r.parent;n.push("..")}r=e;while(r&&r.parent&&!t.has(r)){r.#Ee=undefined;r.#De=undefined;r=r.parent}}}class PathWin32 extends PathBase{sep="\\";splitSep=bt;constructor(e,t=vt,n,r,s,i,o){super(e,t,n,r,s,i,o)}newChild(e,t=vt,n={}){return new PathWin32(e,t,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(e){return Oe.win32.parse(e).root}getRoot(e){e=uncToDrive(e.toUpperCase());if(e===this.root.name){return this.root}for(const[t,n]of Object.entries(this.roots)){if(this.sameRoot(e,t)){return this.roots[e]=n}}return this.roots[e]=new PathScurryWin32(e,this).root}sameRoot(e,t=this.root.name){e=e.toUpperCase().replace(/\//g,"\\").replace(yt,"$1\\");return e===t}}class PathPosix extends PathBase{splitSep="/";sep="/";constructor(e,t=vt,n,r,s,i,o){super(e,t,n,r,s,i,o)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=vt,n={}){return new PathPosix(e,t,this.root,this.roots,this.nocase,this.childrenCache(),n)}}class PathScurryBase{root;rootPath;roots;cwd;#Ke;#ze;#_e;nocase;#te;constructor(e=process.cwd(),t,n,{nocase:r,childrenCacheSize:s=16*1024,fs:i=gt}={}){this.#te=fsFromOption(i);if(e instanceof URL||e.startsWith("file://")){e=(0,Pe.fileURLToPath)(e)}const o=t.resolve(e);this.roots=Object.create(null);this.rootPath=this.parseRootPath(o);this.#Ke=new ResolveCache;this.#ze=new ResolveCache;this.#_e=new ChildrenCache(s);const a=o.substring(this.rootPath.length).split(n);if(a.length===1&&!a[0]){a.pop()}if(r===undefined){throw new TypeError("must provide nocase setting to PathScurryBase ctor")}this.nocase=r;this.root=this.newRoot(this.#te);this.roots[this.rootPath]=this.root;let u=this.root;let c=a.length-1;const l=t.sep;let f=this.rootPath;let h=false;for(const e of a){const t=c--;u=u.child(e,{relative:new Array(t).fill("..").join(l),relativePosix:new Array(t).fill("..").join("/"),fullpath:f+=(h?"":l)+e});h=true}this.cwd=u}depth(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.depth()}childrenCache(){return this.#_e}resolve(...e){let t="";for(let n=e.length-1;n>=0;n--){const r=e[n];if(!r||r===".")continue;t=t?`${r}/${t}`:r;if(this.isAbsolute(r)){break}}const n=this.#Ke.get(t);if(n!==undefined){return n}const r=this.cwd.resolve(t).fullpath();this.#Ke.set(t,r);return r}resolvePosix(...e){let t="";for(let n=e.length-1;n>=0;n--){const r=e[n];if(!r||r===".")continue;t=t?`${r}/${t}`:r;if(this.isAbsolute(r)){break}}const n=this.#ze.get(t);if(n!==undefined){return n}const r=this.cwd.resolve(t).fullpathPosix();this.#ze.set(t,r);return r}relative(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.relative()}relativePosix(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.relativePosix()}basename(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.name}dirname(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:true}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:n}=t;if(!e.canReaddir()){return[]}else{const t=await e.readdir();return n?t:t.map((e=>e.name))}}readdirSync(e=this.cwd,t={withFileTypes:true}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:n=true}=t;if(!e.canReaddir()){return[]}else if(n){return e.readdirSync()}else{return e.readdirSync().map((e=>e.name))}}async lstat(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.lstat()}lstatSync(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const n=await e.readlink();return t?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const n=e.readlinkSync();return t?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const n=await e.realpath();return t?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const n=e.realpathSync();return t?n:n?.fullpath()}async walk(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:n=true,follow:r=false,filter:s,walkFilter:i}=t;const o=[];if(!s||s(e)){o.push(n?e:e.fullpath())}const a=new Set;const walk=(e,t)=>{a.add(e);e.readdirCB(((e,u)=>{if(e){return t(e)}let c=u.length;if(!c)return t();const next=()=>{if(--c===0){t()}};for(const e of u){if(!s||s(e)){o.push(n?e:e.fullpath())}if(r&&e.isSymbolicLink()){e.realpath().then((e=>e?.isUnknown()?e.lstat():e)).then((e=>e?.shouldWalk(a,i)?walk(e,next):next()))}else{if(e.shouldWalk(a,i)){walk(e,next)}else{next()}}}}),true)};const u=e;return new Promise(((e,t)=>{walk(u,(n=>{if(n)return t(n);e(o)}))}))}walkSync(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:n=true,follow:r=false,filter:s,walkFilter:i}=t;const o=[];if(!s||s(e)){o.push(n?e:e.fullpath())}const a=new Set([e]);for(const e of a){const t=e.readdirSync();for(const e of t){if(!s||s(e)){o.push(n?e:e.fullpath())}let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;if(t.isUnknown())t.lstatSync()}if(t.shouldWalk(a,i)){a.add(t)}}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}return this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:n=true,follow:r=false,filter:s,walkFilter:i}=t;if(!s||s(e)){yield n?e:e.fullpath()}const o=new Set([e]);for(const e of o){const t=e.readdirSync();for(const e of t){if(!s||s(e)){yield n?e:e.fullpath()}let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;if(t.isUnknown())t.lstatSync()}if(t.shouldWalk(o,i)){o.add(t)}}}}stream(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:n=true,follow:r=false,filter:s,walkFilter:i}=t;const o=new Minipass({objectMode:true});if(!s||s(e)){o.write(n?e:e.fullpath())}const a=new Set;const u=[e];let c=0;const process=()=>{let e=false;while(!e){const t=u.shift();if(!t){if(c===0)o.end();return}c++;a.add(t);const onReaddir=(t,f,h=false)=>{if(t)return o.emit("error",t);if(r&&!h){const e=[];for(const t of f){if(t.isSymbolicLink()){e.push(t.realpath().then((e=>e?.isUnknown()?e.lstat():e)))}}if(e.length){Promise.all(e).then((()=>onReaddir(null,f,true)));return}}for(const t of f){if(t&&(!s||s(t))){if(!o.write(n?t:t.fullpath())){e=true}}}c--;for(const e of f){const t=e.realpathCached()||e;if(t.shouldWalk(a,i)){u.push(t)}}if(e&&!o.flowing){o.once("drain",process)}else if(!l){process()}};let l=true;t.readdirCB(onReaddir,true);l=false}};process();return o}streamSync(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:n=true,follow:r=false,filter:s,walkFilter:i}=t;const o=new Minipass({objectMode:true});const a=new Set;if(!s||s(e)){o.write(n?e:e.fullpath())}const u=[e];let c=0;const process=()=>{let e=false;while(!e){const t=u.shift();if(!t){if(c===0)o.end();return}c++;a.add(t);const l=t.readdirSync();for(const t of l){if(!s||s(t)){if(!o.write(n?t:t.fullpath())){e=true}}}c--;for(const e of l){let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;if(t.isUnknown())t.lstatSync()}if(t.shouldWalk(a,i)){u.push(t)}}}if(e&&!o.flowing)o.once("drain",process)};process();return o}chdir(e=this.cwd){const t=this.cwd;this.cwd=typeof e==="string"?this.cwd.resolve(e):e;this.cwd[$t](t)}}class PathScurryWin32 extends PathScurryBase{sep="\\";constructor(e=process.cwd(),t={}){const{nocase:n=true}=t;super(e,Oe.win32,"\\",{...t,nocase:n});this.nocase=n;for(let e=this.cwd;e;e=e.parent){e.nocase=this.nocase}}parseRootPath(e){return Oe.win32.parse(e).root.toUpperCase()}newRoot(e){return new PathWin32(this.rootPath,At,undefined,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}}class PathScurryPosix extends PathScurryBase{sep="/";constructor(e=process.cwd(),t={}){const{nocase:n=false}=t;super(e,Oe.posix,"/",{...t,nocase:n});this.nocase=n}parseRootPath(e){return"/"}newRoot(e){return new PathPosix(this.rootPath,At,undefined,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}}class PathScurryDarwin extends PathScurryPosix{constructor(e=process.cwd(),t={}){const{nocase:n=true}=t;super(e,{...t,nocase:n})}}const jt=process.platform==="win32"?PathWin32:PathPosix;const Ht=process.platform==="win32"?PathScurryWin32:process.platform==="darwin"?PathScurryDarwin:PathScurryPosix;const isPatternList=e=>e.length>=1;const isGlobList=e=>e.length>=1;class Pattern{#Ye;#Je;#Qe;length;#Xe;#Ze;#et;#tt;#nt;#rt;#st=true;constructor(e,t,n,r){if(!isPatternList(e)){throw new TypeError("empty pattern list")}if(!isGlobList(t)){throw new TypeError("empty glob list")}if(t.length!==e.length){throw new TypeError("mismatched pattern list and glob list lengths")}this.length=e.length;if(n<0||n>=this.length){throw new TypeError("index out of range")}this.#Ye=e;this.#Je=t;this.#Qe=n;this.#Xe=r;if(this.#Qe===0){if(this.isUNC()){const[e,t,n,r,...s]=this.#Ye;const[i,o,a,u,...c]=this.#Je;if(s[0]===""){s.shift();c.shift()}const l=[e,t,n,r,""].join("/");const f=[i,o,a,u,""].join("/");this.#Ye=[l,...s];this.#Je=[f,...c];this.length=this.#Ye.length}else if(this.isDrive()||this.isAbsolute()){const[e,...t]=this.#Ye;const[n,...r]=this.#Je;if(t[0]===""){t.shift();r.shift()}const s=e+"/";const i=n+"/";this.#Ye=[s,...t];this.#Je=[i,...r];this.length=this.#Ye.length}}}pattern(){return this.#Ye[this.#Qe]}isString(){return typeof this.#Ye[this.#Qe]==="string"}isGlobstar(){return this.#Ye[this.#Qe]===be}isRegExp(){return this.#Ye[this.#Qe]instanceof RegExp}globString(){return this.#et=this.#et||(this.#Qe===0?this.isAbsolute()?this.#Je[0]+this.#Je.slice(1).join("/"):this.#Je.join("/"):this.#Je.slice(this.#Qe).join("/"))}hasMore(){return this.length>this.#Qe+1}rest(){if(this.#Ze!==undefined)return this.#Ze;if(!this.hasMore())return this.#Ze=null;this.#Ze=new Pattern(this.#Ye,this.#Je,this.#Qe+1,this.#Xe);this.#Ze.#rt=this.#rt;this.#Ze.#nt=this.#nt;this.#Ze.#tt=this.#tt;return this.#Ze}isUNC(){const e=this.#Ye;return this.#nt!==undefined?this.#nt:this.#nt=this.#Xe==="win32"&&this.#Qe===0&&e[0]===""&&e[1]===""&&typeof e[2]==="string"&&!!e[2]&&typeof e[3]==="string"&&!!e[3]}isDrive(){const e=this.#Ye;return this.#tt!==undefined?this.#tt:this.#tt=this.#Xe==="win32"&&this.#Qe===0&&this.length>1&&typeof e[0]==="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){const e=this.#Ye;return this.#rt!==undefined?this.#rt:this.#rt=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){const e=this.#Ye[0];return typeof e==="string"&&this.isAbsolute()&&this.#Qe===0?e:""}checkFollowGlobstar(){return!(this.#Qe===0||!this.isGlobstar()||!this.#st)}markFollowGlobstar(){if(this.#Qe===0||!this.isGlobstar()||!this.#st)return false;this.#st=false;return true}}const Wt=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Ignore{relative;relativeChildren;absolute;absoluteChildren;constructor(e,{nobrace:t,nocase:n,noext:r,noglobstar:s,platform:i=Wt}){this.relative=[];this.absolute=[];this.relativeChildren=[];this.absoluteChildren=[];const o={dot:true,nobrace:t,nocase:n,noext:r,noglobstar:s,optimizationLevel:2,platform:i,nocomment:true,nonegate:true};for(const t of e){const e=new Minimatch(t,o);for(let t=0;t<e.set.length;t++){const n=e.set[t];const r=e.globParts[t];if(!n||!r){throw new Error("invalid pattern object")}const s=new Pattern(n,r,0,i);const a=new Minimatch(s.globString(),o);const u=r[r.length-1]==="**";const c=s.isAbsolute();if(c)this.absolute.push(a);else this.relative.push(a);if(u){if(c)this.absoluteChildren.push(a);else this.relativeChildren.push(a)}}}}ignored(e){const t=e.fullpath();const n=`${t}/`;const r=e.relative()||".";const s=`${r}/`;for(const e of this.relative){if(e.match(r)||e.match(s))return true}for(const e of this.absolute){if(e.match(t)||e.match(n))return true}return false}childrenIgnored(e){const t=e.fullpath()+"/";const n=(e.relative()||".")+"/";for(const e of this.relativeChildren){if(e.match(n))return true}for(const e of this.absoluteChildren){if(e.match(t))return true}return false}}class HasWalkedCache{store;constructor(e=new Map){this.store=e}copy(){return new HasWalkedCache(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){const n=e.fullpath();const r=this.store.get(n);if(r)r.add(t.globString());else this.store.set(n,new Set([t.globString()]))}}class MatchRecord{store=new Map;add(e,t,n){const r=(t?2:0)|(n?1:0);const s=this.store.get(e);this.store.set(e,s===undefined?r:r&s)}entries(){return[...this.store.entries()].map((([e,t])=>[e,!!(t&2),!!(t&1)]))}}class SubWalks{store=new Map;add(e,t){if(!e.canReaddir()){return}const n=this.store.get(e);if(n){if(!n.find((e=>e.globString()===t.globString()))){n.push(t)}}else this.store.set(e,[t])}get(e){const t=this.store.get(e);if(!t){throw new Error("attempting to walk unknown path")}return t}entries(){return this.keys().map((e=>[e,this.store.get(e)]))}keys(){return[...this.store.keys()].filter((e=>e.canReaddir()))}}class Processor{hasWalkedCache;matches=new MatchRecord;subwalks=new SubWalks;patterns;follow;dot;opts;constructor(e,t){this.opts=e;this.follow=!!e.follow;this.dot=!!e.dot;this.hasWalkedCache=t?t.copy():new HasWalkedCache}processPatterns(e,t){this.patterns=t;const n=t.map((t=>[e,t]));for(let[e,t]of n){this.hasWalkedCache.storeWalked(e,t);const n=t.root();const r=t.isAbsolute()&&this.opts.absolute!==false;if(n){e=e.resolve(n==="/"&&this.opts.root!==undefined?this.opts.root:n);const r=t.rest();if(!r){this.matches.add(e,true,false);continue}else{t=r}}if(e.isENOENT())continue;let s;let i;let o=false;while(typeof(s=t.pattern())==="string"&&(i=t.rest())){const n=e.resolve(s);e=n;t=i;o=true}s=t.pattern();i=t.rest();if(o){if(this.hasWalkedCache.hasWalked(e,t))continue;this.hasWalkedCache.storeWalked(e,t)}if(typeof s==="string"){const t=s===".."||s===""||s===".";this.matches.add(e.resolve(s),r,t);continue}else if(s===be){if(!e.isSymbolicLink()||this.follow||t.checkFollowGlobstar()){this.subwalks.add(e,t)}const n=i?.pattern();const s=i?.rest();if(!i||(n===""||n===".")&&!s){this.matches.add(e,r,n===""||n===".")}else{if(n===".."){const t=e.parent||e;if(!s)this.matches.add(t,r,true);else if(!this.hasWalkedCache.hasWalked(t,s)){this.subwalks.add(t,s)}}}}else if(s instanceof RegExp){this.subwalks.add(e,t)}}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new Processor(this.opts,this.hasWalkedCache)}filterEntries(e,t){const n=this.subwalks.get(e);const r=this.child();for(const e of t){for(const t of n){const n=t.isAbsolute();const s=t.pattern();const i=t.rest();if(s===be){r.testGlobstar(e,t,i,n)}else if(s instanceof RegExp){r.testRegExp(e,s,i,n)}else{r.testString(e,s,i,n)}}}return r}testGlobstar(e,t,n,r){if(this.dot||!e.name.startsWith(".")){if(!t.hasMore()){this.matches.add(e,r,false)}if(e.canReaddir()){if(this.follow||!e.isSymbolicLink()){this.subwalks.add(e,t)}else if(e.isSymbolicLink()){if(n&&t.checkFollowGlobstar()){this.subwalks.add(e,n)}else if(t.markFollowGlobstar()){this.subwalks.add(e,t)}}}}if(n){const t=n.pattern();if(typeof t==="string"&&t!==".."&&t!==""&&t!=="."){this.testString(e,t,n.rest(),r)}else if(t===".."){const t=e.parent||e;this.subwalks.add(t,n)}else if(t instanceof RegExp){this.testRegExp(e,t,n.rest(),r)}}}testRegExp(e,t,n,r){if(!t.test(e.name))return;if(!n){this.matches.add(e,r,false)}else{this.subwalks.add(e,n)}}testString(e,t,n,r){if(!e.isNamed(t))return;if(!n){this.matches.add(e,r,false)}else{this.subwalks.add(e,n)}}}const makeIgnore=(e,t)=>typeof e==="string"?new Ignore([e],t):Array.isArray(e)?new Ignore(e,t):e;class GlobUtil{path;patterns;opts;seen=new Set;paused=false;aborted=false;#it=[];#ot;#at;signal;maxDepth;constructor(e,t,n){this.patterns=e;this.path=t;this.opts=n;this.#at=!n.posix&&n.platform==="win32"?"\\":"/";if(n.ignore){this.#ot=makeIgnore(n.ignore,n)}this.maxDepth=n.maxDepth||Infinity;if(n.signal){this.signal=n.signal;this.signal.addEventListener("abort",(()=>{this.#it.length=0}))}}#ut(e){return this.seen.has(e)||!!this.#ot?.ignored?.(e)}#ct(e){return!!this.#ot?.childrenIgnored?.(e)}pause(){this.paused=true}resume(){if(this.signal?.aborted)return;this.paused=false;let e=undefined;while(!this.paused&&(e=this.#it.shift())){e()}}onResume(e){if(this.signal?.aborted)return;if(!this.paused){e()}else{this.#it.push(e)}}async matchCheck(e,t){if(t&&this.opts.nodir)return undefined;let n;if(this.opts.realpath){n=e.realpathCached()||await e.realpath();if(!n)return undefined;e=n}const r=e.isUnknown()||this.opts.stat;return this.matchCheckTest(r?await e.lstat():e,t)}matchCheckTest(e,t){return e&&(this.maxDepth===Infinity||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&!this.#ut(e)?e:undefined}matchCheckSync(e,t){if(t&&this.opts.nodir)return undefined;let n;if(this.opts.realpath){n=e.realpathCached()||e.realpathSync();if(!n)return undefined;e=n}const r=e.isUnknown()||this.opts.stat;return this.matchCheckTest(r?e.lstatSync():e,t)}matchFinish(e,t){if(this.#ut(e))return;const n=this.opts.absolute===undefined?t:this.opts.absolute;this.seen.add(e);const r=this.opts.mark&&e.isDirectory()?this.#at:"";if(this.opts.withFileTypes){this.matchEmit(e)}else if(n){const t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+r)}else{const t=this.opts.posix?e.relativePosix():e.relative();const n=this.opts.dotRelative&&!t.startsWith(".."+this.#at)?"."+this.#at:"";this.matchEmit(!t?"."+r:n+t+r)}}async match(e,t,n){const r=await this.matchCheck(e,n);if(r)this.matchFinish(r,t)}matchSync(e,t,n){const r=this.matchCheckSync(e,n);if(r)this.matchFinish(r,t)}walkCB(e,t,n){if(this.signal?.aborted)n();this.walkCB2(e,t,new Processor(this.opts),n)}walkCB2(e,t,n,r){if(this.#ct(e))return r();if(this.signal?.aborted)r();if(this.paused){this.onResume((()=>this.walkCB2(e,t,n,r)));return}n.processPatterns(e,t);let s=1;const next=()=>{if(--s===0)r()};for(const[e,t,r]of n.matches.entries()){if(this.#ut(e))continue;s++;this.match(e,t,r).then((()=>next()))}for(const e of n.subwalkTargets()){if(this.maxDepth!==Infinity&&e.depth()>=this.maxDepth){continue}s++;const t=e.readdirCached();if(e.calledReaddir())this.walkCB3(e,t,n,next);else{e.readdirCB(((t,r)=>this.walkCB3(e,r,n,next)),true)}}next()}walkCB3(e,t,n,r){n=n.filterEntries(e,t);let s=1;const next=()=>{if(--s===0)r()};for(const[e,t,r]of n.matches.entries()){if(this.#ut(e))continue;s++;this.match(e,t,r).then((()=>next()))}for(const[e,t]of n.subwalks.entries()){s++;this.walkCB2(e,t,n.child(),next)}next()}walkCBSync(e,t,n){if(this.signal?.aborted)n();this.walkCB2Sync(e,t,new Processor(this.opts),n)}walkCB2Sync(e,t,n,r){if(this.#ct(e))return r();if(this.signal?.aborted)r();if(this.paused){this.onResume((()=>this.walkCB2Sync(e,t,n,r)));return}n.processPatterns(e,t);let s=1;const next=()=>{if(--s===0)r()};for(const[e,t,r]of n.matches.entries()){if(this.#ut(e))continue;this.matchSync(e,t,r)}for(const e of n.subwalkTargets()){if(this.maxDepth!==Infinity&&e.depth()>=this.maxDepth){continue}s++;const t=e.readdirSync();this.walkCB3Sync(e,t,n,next)}next()}walkCB3Sync(e,t,n,r){n=n.filterEntries(e,t);let s=1;const next=()=>{if(--s===0)r()};for(const[e,t,r]of n.matches.entries()){if(this.#ut(e))continue;this.matchSync(e,t,r)}for(const[e,t]of n.subwalks.entries()){s++;this.walkCB2Sync(e,t,n.child(),next)}next()}}class GlobWalker extends GlobUtil{matches;constructor(e,t,n){super(e,t,n);this.matches=new Set}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){await this.path.lstat()}await new Promise(((e,t)=>{this.walkCB(this.path,this.patterns,(()=>{if(this.signal?.aborted){t(this.signal.reason)}else{e(this.matches)}}))}));return this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){this.path.lstatSync()}this.walkCBSync(this.path,this.patterns,(()=>{if(this.signal?.aborted)throw this.signal.reason}));return this.matches}}class GlobStream extends GlobUtil{results;constructor(e,t,n){super(e,t,n);this.results=new Minipass({signal:this.signal,objectMode:true});this.results.on("drain",(()=>this.resume()));this.results.on("resume",(()=>this.resume()))}matchEmit(e){this.results.write(e);if(!this.results.flowing)this.pause()}stream(){const e=this.path;if(e.isUnknown()){e.lstat().then((()=>{this.walkCB(e,this.patterns,(()=>this.results.end()))}))}else{this.walkCB(e,this.patterns,(()=>this.results.end()))}return this.results}streamSync(){if(this.path.isUnknown()){this.path.lstatSync()}this.walkCBSync(this.path,this.patterns,(()=>this.results.end()));return this.results}}const qt=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Glob{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");this.withFileTypes=!!t.withFileTypes;this.signal=t.signal;this.follow=!!t.follow;this.dot=!!t.dot;this.dotRelative=!!t.dotRelative;this.nodir=!!t.nodir;this.mark=!!t.mark;if(!t.cwd){this.cwd=""}else if(t.cwd instanceof URL||t.cwd.startsWith("file://")){t.cwd=(0,Pe.fileURLToPath)(t.cwd)}this.cwd=t.cwd||"";this.root=t.root;this.magicalBraces=!!t.magicalBraces;this.nobrace=!!t.nobrace;this.noext=!!t.noext;this.realpath=!!t.realpath;this.absolute=t.absolute;this.noglobstar=!!t.noglobstar;this.matchBase=!!t.matchBase;this.maxDepth=typeof t.maxDepth==="number"?t.maxDepth:Infinity;this.stat=!!t.stat;this.ignore=t.ignore;if(this.withFileTypes&&this.absolute!==undefined){throw new Error("cannot set absolute and withFileTypes:true")}if(typeof e==="string"){e=[e]}this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===false;if(this.windowsPathsNoEscape){e=e.map((e=>e.replace(/\\/g,"/")))}if(this.matchBase){if(t.noglobstar){throw new TypeError("base matching requires globstar")}e=e.map((e=>e.includes("/")?e:`./**/${e}`))}this.pattern=e;this.platform=t.platform||qt;this.opts={...t,platform:this.platform};if(t.scurry){this.scurry=t.scurry;if(t.nocase!==undefined&&t.nocase!==t.scurry.nocase){throw new Error("nocase option contradicts provided scurry option")}}else{const e=t.platform==="win32"?PathScurryWin32:t.platform==="darwin"?PathScurryDarwin:t.platform?PathScurryPosix:Ht;this.scurry=new e(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;const n=this.platform==="darwin"||this.platform==="win32";const r={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:true,noext:this.noext,nonegate:true,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug};const s=this.pattern.map((e=>new Minimatch(e,r)));const[i,o]=s.reduce(((e,t)=>{e[0].push(...t.set);e[1].push(...t.globParts);return e}),[[],[]]);this.patterns=i.map(((e,t)=>{const n=o[t];if(!n)throw new Error("invalid pattern object");return new Pattern(e,n,0,this.platform)}))}async walk(){return[...await new GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase}).walk()]}walkSync(){return[...new GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase}).walkSync()]}stream(){return new GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase}).stream()}streamSync(){return new GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}const hasMagic=(e,t={})=>{if(!Array.isArray(e)){e=[e]}for(const n of e){if(new Minimatch(n,t).hasMagic())return true}return false};function globStreamSync(e,t={}){return new Glob(e,t).streamSync()}function globStream(e,t={}){return new Glob(e,t).stream()}function globSync(e,t={}){return new Glob(e,t).walkSync()}async function glob_(e,t={}){return new Glob(e,t).walk()}function globIterateSync(e,t={}){return new Glob(e,t).iterateSync()}function globIterate(e,t={}){return new Glob(e,t).iterate()}const Ut=globStreamSync;const Gt=Object.assign(globStream,{sync:globStreamSync});const Vt=globIterateSync;const Kt=Object.assign(globIterate,{sync:globIterateSync});const zt=Object.assign(globSync,{stream:globStreamSync,iterate:globIterateSync});const Yt=Object.assign(glob_,{glob:glob_,globSync:globSync,sync:zt,globStream:globStream,stream:Gt,globStreamSync:globStreamSync,streamSync:Ut,globIterate:globIterate,iterate:Kt,globIterateSync:globIterateSync,iterateSync:Vt,Glob:Glob,hasMagic:hasMagic,escape:escape_escape,unescape:unescape_unescape});Yt.glob=Yt;const Jt=e(import.meta.url)("node:assert");var Qt=__nccwpck_require__.n(Jt);const Xt=e(import.meta.url)("node:child_process");const Zt=e(import.meta.url)("node:async_hooks");const en=e(import.meta.url)("node:util");var tn=__nccwpck_require__(6143);var nn=__nccwpck_require__(2757);const rn=(0,en.promisify)(nn);function noop(){}function randomId(){return Math.random().toString(36).slice(2)}function util_isString(e){return typeof e==="string"}function quote(e){if(/^[a-z0-9/_.\-@:=]+$/i.test(e)||e===""){return e}return`$'`+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0")+`'`}function quotePowerShell(e){if(/^[a-z0-9/_.\-]+$/i.test(e)||e===""){return e}return`'`+e.replace(/'/g,"''")+`'`}function exitCodeInfo(e){return{2:"Misuse of shell builtins",126:"Invoked command cannot execute",127:"Command not found",128:"Invalid exit argument",129:"Hangup",130:"Interrupt",131:"Quit and dump core",132:"Illegal instruction",133:"Trace/breakpoint trap",134:"Process aborted",135:'Bus error: "access to undefined portion of memory object"',136:'Floating point exception: "erroneous arithmetic operation"',137:"Kill (terminate immediately)",138:"User-defined 1",139:"Segmentation violation",140:"User-defined 2",141:"Write to pipe with no one reading",142:"Signal raised by alarm",143:"Termination (request to terminate)",145:"Child process terminated, stopped (or continued*)",146:"Continue if stopped",147:"Stop executing temporarily",148:"Terminal stop signal",149:'Background process attempting to read from tty ("in")',150:'Background process attempting to write to tty ("out")',151:"Urgent data available on socket",152:"CPU time limit exceeded",153:"File size limit exceeded",154:'Signal raised by timer counting virtual time: "virtual timer expired"',155:"Profiling timer expired",157:"Pollable event",159:"Bad syscall"}[e||-1]}function errnoMessage(e){if(e===undefined){return"Unknown error"}return{0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"}[-e]||"Unknown error"}function util_parseDuration(e){if(typeof e=="number"){if(isNaN(e)||e<0)throw new Error(`Invalid duration: "${e}".`);return e}else if(/\d+s/.test(e)){return+e.slice(0,-1)*1e3}else if(/\d+ms/.test(e)){return+e.slice(0,-2)}throw new Error(`Unknown duration: "${e}".`)}function formatCmd(e){if(e==undefined)return O.grey("undefined");const t=[...e];let n="$ ";let r="";let s;let i=root;let o=0;while(i){s=t.shift()||"EOF";if(s=="\n"){n+=style(i,r)+"\n> ";r="";continue}const e=s=="EOF"?undefined:i();if(e!=i){n+=style(i,r);r=""}i=e==root?e():e;r+=s}function style(e,t){if(t=="")return"";if(sn.includes(t)){return O.cyanBright(t)}if(e==word&&o==0){o++;return O.greenBright(t)}if(e==syntax){o=0;return O.cyanBright(t)}if(e==dollar)return O.yellowBright(t);if(e?.name.startsWith("str"))return O.yellowBright(t);return t}function isSyntax(e){return"()[]{}<>;:+|&=".includes(e)}function root(){if(/\s/.test(s))return space;if(isSyntax(s))return syntax;if(/[$]/.test(s))return dollar;if(/["]/.test(s))return strDouble;if(/[']/.test(s))return strSingle;return word}function space(){if(/\s/.test(s))return space;return root}function word(){if(/[0-9a-z/_.]/i.test(s))return word;return root}function syntax(){if(isSyntax(s))return syntax;return root}function dollar(){if(/[']/.test(s))return str;return root}function str(){if(/[']/.test(s))return strEnd;if(/[\\]/.test(s))return strBackslash;return str}function strBackslash(){return strEscape}function strEscape(){return str}function strDouble(){if(/["]/.test(s))return strEnd;return strDouble}function strSingle(){if(/[']/.test(s))return strEnd;return strSingle}function strEnd(){return root}return n+"\n"}const sn=["if","then","else","elif","fi","case","esac","for","select","while","until","do","done","in"];const on=Symbol("processCwd");const an=new Zt.AsyncLocalStorage;const un=(0,Zt.createHook)({init:syncCwd,before:syncCwd,promiseResolve:syncCwd,after:syncCwd,destroy:syncCwd});un.enable();const cn={[on]:process.cwd(),verbose:true,env:process.env,shell:true,prefix:"",quote:()=>{throw new Error("No quote function is defined: https://ï.at/no-quote-func")},spawn:Xt.spawn,log:log};try{cn.shell=tn.sync("bash");cn.prefix="set -euo pipefail;";cn.quote=quote}catch(e){if(process.platform=="win32"){cn.shell=tn.sync("powershell.exe");cn.quote=quotePowerShell}}function getStore(){return an.getStore()||cn}const ln=new Proxy((function(e,...t){const n=(new Error).stack.split(/^\s*at\s/m)[2].trim();if(e.some((e=>e==undefined))){throw new Error(`Malformed command at ${n}`)}let r,s;const i=new ProcessPromise(((...e)=>[r,s]=e));let o=e[0],a=0;while(a<t.length){let n;if(Array.isArray(t[a])){n=t[a].map((e=>ln.quote(substitute(e)))).join(" ")}else{n=ln.quote(substitute(t[a]))}o+=n+e[++a]}i._bind(o,n,r,s,getStore());setImmediate((()=>i.isHalted||i.run()));return i}),{set(e,t,n){const r=t in Function.prototype?e:getStore();Reflect.set(r,t,n);return true},get(e,t){const n=t in Function.prototype?e:getStore();return Reflect.get(n,t)}});function substitute(e){if(e?.stdout){return e.stdout.replace(/\n$/,"")}return`${e}`}class ProcessPromise extends Promise{constructor(){super(...arguments);this._command="";this._from="";this._resolve=noop;this._reject=noop;this._snapshot=getStore();this._stdio=["inherit","pipe","pipe"];this._nothrow=false;this._quiet=false;this._resolved=false;this._halted=false;this._piped=false;this._prerun=noop;this._postrun=noop}_bind(e,t,n,r,s){this._command=e;this._from=t;this._resolve=n;this._reject=r;this._snapshot={...s}}run(){const e=this._snapshot;if(this.child)return this;this._prerun();e.log({kind:"cmd",cmd:this._command,verbose:e.verbose&&!this._quiet});this.child=e.spawn(e.prefix+this._command,{cwd:e.cwd??e[on],shell:typeof e.shell==="string"?e.shell:true,stdio:this._stdio,windowsHide:true,env:e.env});this.child.on("close",((e,s)=>{let i=`exit code: ${e}`;if(e!=0||s!=null){i=`${n||"\n"} at ${this._from}`;i+=`\n exit code: ${e}${exitCodeInfo(e)?" ("+exitCodeInfo(e)+")":""}`;if(s!=null){i+=`\n signal: ${s}`}}let o=new core_ProcessOutput(e,s,t,n,r,i);if(e===0||this._nothrow){this._resolve(o)}else{this._reject(o)}this._resolved=true}));this.child.on("error",(e=>{const s=`${e.message}\n`+` errno: ${e.errno} (${errnoMessage(e.errno)})\n`+` code: ${e.code}\n`+` at ${this._from}`;this._reject(new core_ProcessOutput(null,null,t,n,r,s));this._resolved=true}));let t="",n="",r="";let onStdout=n=>{e.log({kind:"stdout",data:n,verbose:e.verbose&&!this._quiet});t+=n;r+=n};let onStderr=t=>{e.log({kind:"stderr",data:t,verbose:e.verbose&&!this._quiet});n+=t;r+=t};if(!this._piped)this.child.stdout?.on("data",onStdout);this.child.stderr?.on("data",onStderr);this._postrun();if(this._timeout&&this._timeoutSignal){const e=setTimeout((()=>this.kill(this._timeoutSignal)),this._timeout);this.finally((()=>clearTimeout(e))).catch(noop)}return this}get stdin(){this.stdio("pipe");this.run();Jt(this.child);if(this.child.stdin==null)throw new Error("The stdin of subprocess is null.");return this.child.stdin}get stdout(){this.run();Jt(this.child);if(this.child.stdout==null)throw new Error("The stdout of subprocess is null.");return this.child.stdout}get stderr(){this.run();Jt(this.child);if(this.child.stderr==null)throw new Error("The stderr of subprocess is null.");return this.child.stderr}get exitCode(){return this.then((e=>e.exitCode),(e=>e.exitCode))}then(e,t){if(this.isHalted&&!this.child){throw new Error("The process is halted!")}return super.then(e,t)}catch(e){return super.catch(e)}pipe(e){if(typeof e=="string")throw new Error("The pipe() method does not take strings. Forgot $?");if(this._resolved){if(e instanceof ProcessPromise)e.stdin.end();throw new Error("The pipe() method shouldn't be called after promise is already resolved!")}this._piped=true;if(e instanceof ProcessPromise){e.stdio("pipe");e._prerun=this.run.bind(this);e._postrun=()=>{if(!e.child)throw new Error("Access to stdin of pipe destination without creation a subprocess.");this.stdout.pipe(e.stdin)};return e}else{this._postrun=()=>this.stdout.pipe(e);return this}}async kill(e="SIGTERM"){if(!this.child)throw new Error("Trying to kill a process without creating one.");if(!this.child.pid)throw new Error("The process pid is undefined.");let t=await rn(this.child.pid);for(const n of t){try{process.kill(+n.PID,e)}catch(e){}}try{process.kill(this.child.pid,e)}catch(e){}}stdio(e,t="pipe",n="pipe"){this._stdio=[e,t,n];return this}nothrow(){this._nothrow=true;return this}quiet(){this._quiet=true;return this}timeout(e,t="SIGTERM"){this._timeout=util_parseDuration(e);this._timeoutSignal=t;return this}halt(){this._halted=true;return this}get isHalted(){return this._halted}}class core_ProcessOutput extends Error{constructor(e,t,n,r,s,i){super(i);this._code=e;this._signal=t;this._stdout=n;this._stderr=r;this._combined=s}toString(){return this._combined}get stdout(){return this._stdout}get stderr(){return this._stderr}get exitCode(){return this._code}get signal(){return this._signal}[en.inspect.custom](){let stringify=(e,t)=>e.length===0?"''":t((0,en.inspect)(e));return`ProcessOutput {\n stdout: ${stringify(this.stdout,O.green)},\n stderr: ${stringify(this.stderr,O.red)},\n signal: ${(0,en.inspect)(this.signal)},\n exitCode: ${(this.exitCode===0?O.green:O.red)(this.exitCode)}${exitCodeInfo(this.exitCode)?O.grey(" ("+exitCodeInfo(this.exitCode)+")"):""}\n}`}}function core_within(e){return an.run({...getStore()},e)}function syncCwd(){if(ln[on]!=process.cwd())process.chdir(ln[on])}function cd(e){if(e instanceof core_ProcessOutput){e=e.toString().replace(/\n+$/,"")}ln.log({kind:"cd",dir:e});process.chdir(e);ln[on]=process.cwd()}function log(e){switch(e.kind){case"cmd":if(!e.verbose)return;process.stderr.write(formatCmd(e.cmd));break;case"stdout":case"stderr":if(!e.verbose)return;process.stderr.write(e.data);break;case"cd":if(!ln.verbose)return;process.stderr.write("$ "+O.greenBright("cd")+` ${e.dir}\n`);break;case"fetch":if(!ln.verbose)return;const t=e.init?" "+(0,en.inspect)(e.init):"";process.stderr.write("$ "+O.greenBright("fetch")+` ${e.url}${t}\n`);break;case"retry":if(!ln.verbose)return;process.stderr.write(e.error+"\n")}}const fn=e(import.meta.url)("node:fs");var hn=__nccwpck_require__(2578);var pn=__nccwpck_require__(3664);var dn=__nccwpck_require__(4780);var mn=__nccwpck_require__(4777);function slash(e){const t=/^\\\\\?\\/.test(e);const n=/[^\u0000-\u0080]+/.test(e);if(t||n){return e}return e.replace(/\\/g,"/")}const gn=e(import.meta.url)("node:stream");const toPath=e=>e instanceof URL?(0,n.fileURLToPath)(e):e;class FilterStream extends gn.Transform{constructor(e){super({objectMode:true,transform(t,n,r){r(undefined,e(t)?t:undefined)}})}}const isNegativePattern=e=>e[0]==="!";const yn={ignore:["**/node_modules","**/flow-typed","**/coverage","**/.git"],absolute:true,dot:true};const bn="**/.gitignore";const applyBaseToPattern=(e,t)=>isNegativePattern(e)?"!"+U.posix.join(t,e.slice(1)):U.posix.join(t,e);const parseIgnoreFile=(e,t)=>{const n=slash(U.relative(t,U.dirname(e.filePath)));return e.content.split(/\r?\n/).filter((e=>e&&!e.startsWith("#"))).map((e=>applyBaseToPattern(e,n)))};const toRelativePath=(e,t)=>{t=slash(t);if(U.isAbsolute(e)){if(slash(e).startsWith(t)){return U.relative(t,e)}throw new Error(`Path ${e} is not in cwd ${t}`)}return e};const getIsIgnoredPredicate=(e,t)=>{const n=e.flatMap((e=>parseIgnoreFile(e,t)));const r=mn().add(n);return e=>{e=toPath(e);e=toRelativePath(e,t);return e?r.ignores(slash(e)):false}};const normalizeOptions=(e={})=>({cwd:toPath(e.cwd)||f.cwd(),suppressErrors:Boolean(e.suppressErrors),deep:typeof e.deep==="number"?e.deep:Number.POSITIVE_INFINITY});const isIgnoredByIgnoreFiles=async(e,t)=>{const{cwd:n,suppressErrors:r,deep:s}=normalizeOptions(t);const i=await pn(e,{cwd:n,suppressErrors:r,deep:s,...yn});const o=await Promise.all(i.map((async e=>({filePath:e,content:await fn.promises.readFile(e,"utf8")}))));return getIsIgnoredPredicate(o,n)};const isIgnoredByIgnoreFilesSync=(e,t)=>{const{cwd:n,suppressErrors:r,deep:s}=normalizeOptions(t);const i=pn.sync(e,{cwd:n,suppressErrors:r,deep:s,...yn});const o=i.map((e=>({filePath:e,content:fn.readFileSync(e,"utf8")})));return getIsIgnoredPredicate(o,n)};const isGitIgnored=e=>isIgnoredByIgnoreFiles(bn,e);const isGitIgnoredSync=e=>isIgnoredByIgnoreFilesSync(bn,e);const assertPatternsInput=e=>{if(e.some((e=>typeof e!=="string"))){throw new TypeError("Patterns must be a string or an array of strings")}};const toPatternsArray=e=>{e=[...new Set([e].flat())];assertPatternsInput(e);return e};const checkCwdOption=e=>{if(!e.cwd){return}let t;try{t=fn.statSync(e.cwd)}catch{return}if(!t.isDirectory()){throw new Error("The `cwd` option must be a path to a directory")}};const globby_normalizeOptions=(e={})=>{e={...e,ignore:e.ignore||[],expandDirectories:e.expandDirectories===undefined?true:e.expandDirectories,cwd:toPath(e.cwd)};checkCwdOption(e);return e};const normalizeArguments=e=>async(t,n)=>e(toPatternsArray(t),globby_normalizeOptions(n));const normalizeArgumentsSync=e=>(t,n)=>e(toPatternsArray(t),globby_normalizeOptions(n));const getIgnoreFilesPatterns=e=>{const{ignoreFiles:t,gitignore:n}=e;const r=t?toPatternsArray(t):[];if(n){r.push(bn)}return r};const getFilter=async e=>{const t=getIgnoreFilesPatterns(e);return createFilterFunction(t.length>0&&await isIgnoredByIgnoreFiles(t,e))};const getFilterSync=e=>{const t=getIgnoreFilesPatterns(e);return createFilterFunction(t.length>0&&isIgnoredByIgnoreFilesSync(t,e))};const createFilterFunction=e=>{const t=new Set;return n=>{const r=n.path||n;const s=U.normalize(r);const i=t.has(s)||e&&e(r);t.add(s);return!i}};const unionFastGlobResults=(e,t)=>e.flat().filter((e=>t(e)));const unionFastGlobStreams=(e,t)=>hn(e).pipe(new FilterStream((e=>t(e))));const convertNegativePatterns=(e,t)=>{const n=[];while(e.length>0){const r=e.findIndex((e=>isNegativePattern(e)));if(r===-1){n.push({patterns:e,options:t});break}const s=e[r].slice(1);for(const e of n){e.options.ignore.push(s)}if(r!==0){n.push({patterns:e.slice(0,r),options:{...t,ignore:[...t.ignore,s]}})}e=e.slice(r+1)}return n};const getDirGlobOptions=(e,t)=>({...t?{cwd:t}:{},...Array.isArray(e)?{files:e}:e});const generateTasks=async(e,t)=>{const n=convertNegativePatterns(e,t);const{cwd:r,expandDirectories:s}=t;if(!s){return n}const i=getDirGlobOptions(s,r);const o=r?{cwd:r}:undefined;return Promise.all(n.map((async e=>{let{patterns:t,options:n}=e;[t,n.ignore]=await Promise.all([dn(t,i),dn(n.ignore,o)]);return{patterns:t,options:n}})))};const generateTasksSync=(e,t)=>{const n=convertNegativePatterns(e,t);const{cwd:r,expandDirectories:s}=t;if(!s){return n}const i=getDirGlobOptions(s,r);const o=r?{cwd:r}:undefined;return n.map((e=>{let{patterns:t,options:n}=e;t=dn.sync(t,i);n.ignore=dn.sync(n.ignore,o);return{patterns:t,options:n}}))};const vn=normalizeArguments((async(e,t)=>{const[n,r]=await Promise.all([generateTasks(e,t),getFilter(t)]);const s=await Promise.all(n.map((e=>pn(e.patterns,e.options))));return unionFastGlobResults(s,r)}));const wn=normalizeArgumentsSync(((e,t)=>{const n=generateTasksSync(e,t);const r=getFilterSync(t);const s=n.map((e=>pn.sync(e.patterns,e.options)));return unionFastGlobResults(s,r)}));const Sn=normalizeArgumentsSync(((e,t)=>{const n=generateTasksSync(e,t);const r=getFilterSync(t);const s=n.map((e=>pn.stream(e.patterns,e.options)));return unionFastGlobStreams(s,r)}));const An=normalizeArgumentsSync(((e,t)=>e.some((e=>pn.isDynamicPattern(e,t)))));const En=normalizeArguments(generateTasks);const Dn=normalizeArgumentsSync(generateTasksSync);var Cn=__nccwpck_require__(5871);const _n=e(import.meta.url)("node:readline");var kn=__nccwpck_require__(4083);function utils_isWritable(e){try{fs.accessSync(e,fs.constants.W_OK);return true}catch(e){return false}}function utils_controlPath(e){let t="ssh-"+e;if("CI"in process.env&&utils_isWritable("/dev/shm")){return`/dev/shm/${t}`}return`${os.homedir()}/.ssh/${t}`}function utils_escapeshellarg(e){if(/^[a-z0-9/_.\-@:=]+$/i.test(e)||e===""){return e}return`$'`+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0")+`'`}function ssh(e,t={}){const $=function(n,...r){const s=(new Error).stack.split(/^\s*at\s/m)[2].trim();if(n.some((e=>e==undefined))){throw new Error(`Malformed command at ${s}`)}let i=n[0],o=0;while(o<r.length){let e;if(Array.isArray(r[o])){e=r[o].map((e=>escapeshellarg(e))).join(" ")}else{e=escapeshellarg(r[o])}i+=e+n[++o]}let a,u;const c=new Promise(((...e)=>[a,u]=e));const l="id$"+Math.random().toString(36).slice(2);const f=[e,"-o","ControlMaster=auto","-o","ControlPath="+controlPath(e),"-o","ControlPersist=5m",...t.port?["-p",`${t.port}`]:[],...t.forwardAgent?["-A"]:[],...(t.options||[]).flatMap((e=>["-o",e])),`: ${l}; `+(t.shell||"bash -ls")];if(process.env.WEBPOD_DEBUG){console.log("ssh",f.join(" "))}const h=spawn("ssh",f,{stdio:["pipe","pipe","pipe"],windowsHide:true});let p="",d="",g="";const onStdout=e=>{p+=e;g+=e};const onStderr=e=>{d+=e;g+=e};h.stdout.on("data",onStdout);h.stderr.on("data",onStderr);h.on("close",(e=>{if(e===0){a(new Result(s,e,p,d,g))}else{u(new Result(s,e,p,d,g))}}));h.on("error",(e=>{u(new Result(s,null,p,d,g,e))}));h.stdin.write(i);h.stdin.end();return c};$.exit=()=>spawnSync("ssh",[e,"-O","exit","-o",`ControlPath=${controlPath(e)}`]);return $}class Result extends String{constructor(e,t,n,r,s,i){super(s);this.source=e;this.stdout=n;this.stderr=r;this.exitCode=t;this.error=i}}let Fn=Cn(process.argv.slice(2));function updateArgv(e){Fn=minimist(e);global.argv=Fn}const xn=Object.assign((function globby(e,t){return vn(e,t)}),t);const On=null&&xn;function sleep(e){return new Promise((t=>{setTimeout(t,parseDuration(e))}))}async function fetch(e,t){$.log({kind:"fetch",url:e,init:t});return nodeFetch(e,t)}function echo(e,...t){let n;const r=e.length-1;if(Array.isArray(e)&&e.every(isString)&&r===t.length){n=t.map(((t,n)=>e[n]+stringify(t))).join("")+e[r]}else{n=[e,...t].map(stringify).join(" ")}console.log(n)}function stringify(e){if(e instanceof ProcessOutput){return e.toString().replace(/\n$/,"")}return`${e}`}async function question(e,t){let n=undefined;if(t&&Array.isArray(t.choices)){n=function completer(e){const n=t.choices;const r=n.filter((t=>t.startsWith(e)));return[r.length?r:n,e]}}const r=createInterface({input:process.stdin,output:process.stdout,terminal:true,completer:n});return new Promise((t=>r.question(e??"",(e=>{r.close();t(e)}))))}async function stdin(){let e="";process.stdin.setEncoding("utf8");for await(const t of process.stdin){e+=t}return e}async function retry(e,t,n){const r=e;let s;let i=0;let o;if(typeof t=="function"){s=t}else{if(typeof t=="object"){o=t}else{i=parseDuration(t)}assert(n);s=n}let a;let u=0;while(e-- >0){u++;try{return await s()}catch(t){let n=0;if(i>0)n=i;if(o)n=o.next().value;$.log({kind:"retry",error:chalk.bgRed.white(" FAIL ")+` Attempt: ${u}${r==Infinity?"":`/${r}`}`+(n>0?`; next in ${n}ms`:"")});a=t;if(e==0)break;if(n)await sleep(n)}}throw a}function*expBackoff(e="60s",t="100ms"){const n=parseDuration(e);const r=parseDuration(t);let s=1;while(true){const e=Math.floor(Math.random()*r);yield Math.min(2**s++,n)+e}}async function spinner(e,t){if(typeof e=="function"){t=e;e=""}let n=0;const spin=()=>process.stderr.write(` ${"⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏"[n++%10]} ${e}\r`);return within((async()=>{$.verbose=false;const e=setInterval(spin,100);let n;try{n=await t()}finally{clearInterval(e);process.stderr.write(" ".repeat(process.stdout.columns-1)+"\r")}return n}))}function nothrow(e){return e.nothrow()}function quiet(e){return e.quiet()}let Pn=false;async function runAsync(e,t,n){ln.verbose=n?.verbose??Pn;if(n?.cwd){cd(n.cwd)}return await(ln`${e} ${t}`)}async function setDefaultVerbose(e){Pn=e}let Tn=null;const Bn=["@expo/fingerprint","create-expo","eslint-config-universe","expo-barcode-scanner","expo-dev-client-components","expo-doctor","expo-env-info","expo-face-detector","expo-module-scripts","expo-module-template","expo-module-template-local","expo-test-runner","install-expo-modules","pod-install","uri-scheme"];const Nn=["@react-native/assets-registry","@react-native/dev-middleware","@react-native/babel-preset","react-native"];async function registerPackageLinkingAsync(e,t){await runAsync("bun",["link"],{cwd:t.path})}async function addLinkablePackagesToAppAsync(e,t){const n=await K().readAsync(G().join(e,"package.json"));const r=n.dependencies??{};for(const e of t){r[e.name]=`link:${e.name}`}await K().mergeAsync(G().join(e,"package.json"),{dependencies:r})}async function reinstallPackagesAsync(e){await Promise.all([Q().rm(G().join(e,"node_modules"),{recursive:true,force:true}),Q().rm(G().join(e,"bun.lockb"),{force:true}),Q().rm(G().join(e,"yarn.lock"),{force:true})]);await runAsync("bun",["install"],{cwd:e})}async function getExpoPackagesAsync(e){if(Tn!=null){return Tn}const t=await Yt("**/package.json",{cwd:G().join(e,"packages"),ignore:["**/example/**","**/node_modules/**","**/__tests__/**","**/__mocks__/**","**/__fixtures__/**","**/e2e/**"]});const n=await Promise.all(t.filter((e=>{for(const t of Bn){if(e.startsWith(t)){return false}}return true})).flatMap((async t=>{const n=G().join(e,"packages",G().dirname(t));return await createPackageAsync(n)})));Tn=n.sort(((e,t)=>e.name.localeCompare(t.name)));return Tn}async function getReactNativeTransitivePackagesAsync(e){const t=await Promise.all(Nn.map((t=>{const n=G().join(e,"node_modules",t);return createPackageAsync(n)})));return t}async function createPackageAsync(e){const t=G().join(e,"package.json");const n=G().dirname(t);const r=await K().readAsync(t);const s=r.name;const i=r.version;return{name:s,path:n,version:i}}async function setupExpoRepoAsync(e,t){if(!await Y().pathExists(e)){console.log(`Cloning expo repository to ${e}`);console.time("Cloned expo repository");await runAsync("git",["clone","--depth=1","https://github.com/expo/expo.git",G().basename(e)],{cwd:G().dirname(e)});console.timeEnd("Cloned expo repository")}else{console.log(`Updating expo repository at ${e}`)}console.log(`Running \`yarn install\` in ${e}`);console.time("Installed dependencies in expo repository");await setupDependenciesAsync(e,t);await runAsync("yarn",["install"],{cwd:e});console.timeEnd("Installed dependencies in expo repository")}async function packExpoBareTemplateTarballAsync(e,t){const{stdout:n}=await runAsync("npm",["pack","--json","--pack-destination",t],{cwd:G().join(e,"templates","expo-template-bare-minimum")});const r=JSON.parse(n);const s=r[0].filename;return G().join(t,s)}async function setupDependenciesAsync(e,t){const n=G().join(e,"package.json");const r=await K().readAsync(n);const s=r.resolutions??{};for(const e of Nn){s[e]=`${t}`}await K().mergeAsync(n,{resolutions:s})}async function getNpmVersionAsync(e,t){const{stdout:n}=await runAsync("npm",["view",`${e}@${t}`,"version"]);return n.trim()}async function createExpoApp(e,t,n){const r=n.template??"blank-typescript";if(await Y().pathExists(e)){throw new Error(`Project already exists at ${e}`)}await runAsync("bunx",["create-expo-app",e,"--no-install",`--template`,r]);await Project_setupDependenciesAsync(e);await setupEntryAsync(e);await setupMetroConfigAsync(e,t);await setupAppJsonAsync(e,{appId:n.appId,newArchEnabled:n.newArchEnabled})}async function Project_setupDependenciesAsync(e){await K().mergeAsync(G().join(e,"package.json"),{dependencies:{}})}async function setupEntryAsync(e){await Y().writeFile(G().join(e,"index.js"),`import { registerRootComponent } from 'expo';\n\nimport App from './App';\n\n// registerRootComponent calls AppRegistry.registerComponent('main', () => App);\n// It also ensures that whether you load the app in Expo Go or in a native build,\n// the environment is set up appropriately\nregisterRootComponent(App);\n`);await K().deleteKeyAsync(G().join(e,"package.json"),"main")}async function setupMetroConfigAsync(e,t){await Y().writeFile(G().join(e,"metro.config.js"),`const { getDefaultConfig } = require('expo/metro-config');\n\n/** @type {import('expo/metro-config').MetroConfig} */\nconst config = getDefaultConfig(__dirname);\n\nconfig.watchFolders = [\n ...config.watchFolders ?? [],\n __dirname,\n '${t}',\n];\n\nconfig.resolver.nodeModulesPaths = [\n ...config.resolver.nodeModulesPaths ?? [],\n '${t}/node_modules',\n];\n\nmodule.exports = config;`)}async function prebuildAppAsync(e,t){await runAsync("npx",["expo","prebuild","--no-install","--template",t],{cwd:e});console.log(`Installing CocoaPods dependencies`);console.time("Installed CocoaPods dependencies");await runAsync("pod",["install"],{cwd:G().join(e,"ios")});console.timeEnd("Installed CocoaPods dependencies")}async function setupAppJsonAsync(e,{appId:t,newArchEnabled:n}){const r=G().join(e,"app.json");const s=await K().readAsync(r);const i=s.expo;Qt()(isJSONObject(i));const o=i.android??{};const a=i.ios??{};Qt()(isJSONObject(o));Qt()(isJSONObject(a));o.package=t;a.bundleIdentifier=t;const u=i.plugins??[];Qt()(isJSONArray(u));u.push(["expo-build-properties",{android:{minSdkVersion:23,newArchEnabled:n},ios:{newArchEnabled:n}}]);i.runtimeVersion={policy:"appVersion"};i.android=o;i.ios=a;i.plugins=u;await K().writeAsync(r,s)}function isJSONObject(e){return e!=null&&typeof e==="object"&&!Array.isArray(e)}function isJSONArray(e){return e!=null&&Array.isArray(e)}async function checkRequiredToolsAsync(e){const t=await Promise.all(e.map((e=>tn(e,{nothrow:true}))));for(const[n,r]of t.entries()){if(!r){throw new Error(`Missing required tool: ${e[n]}`)}}}const Rn=__nccwpck_require__(2598);const Ln=new j(Rn.name).version(Rn.version).description("Create an app for react-native nightlies testing.").argument("[path]","The output path for the app.",".").option("--name","The name of the app to create.","test-nightlies").option("--expo-repo <path>",'The path to the expo repository. (default: Cloning to the "expo" directory in the output app)').option("-v, --verbose","Verbose output.").option("--app-id <name>","The Android applicationId and iOS bundleIdentifier.","dev.expo.testnightlies").option("--prebuild","To run prebuild steps.").option("--enable-new-architecture","Enable the New Architecture mode.").parse(process.argv);async function src_runAsync(e){const t=Ln.opts();setDefaultVerbose(!!t.verbose);await checkRequiredToolsAsync(["bun","git","npm","pod","yarn"]);const n=t.name;const r=G().join(G().resolve(Ln.args[0]||"."),n);const s={appId:t.appId,newArchEnabled:!!t.enableNewArchitecture};const i=t.expoRepo??G().join(r,"expo");const o=await getNpmVersionAsync("react-native","nightly");console.log(O.cyan(`Setting up app at ${O.bold(r)} with ${O.bold("react-native@"+o)}`));await createExpoApp(r,i,s);await setupExpoRepoAsync(i,o);const a=[...await getExpoPackagesAsync(i),...await getReactNativeTransitivePackagesAsync(i)];console.log(O.cyan(`Registering bun links`));for(const e of a){console.log(` ${e.name}`);await registerPackageLinkingAsync(i,e)}await addLinkablePackagesToAppAsync(r,a);console.log(O.cyan(`Reinstalling packages`));await reinstallPackagesAsync(r);if(t.prebuild){console.log(O.cyan(`Running prebuild steps`));const e=await packExpoBareTemplateTarballAsync(i,r);await prebuildAppAsync(r,e)}}(async()=>{Ln.parse(process.argv);try{await src_runAsync(Rn.name)}catch(e){console.error("Uncaught Error",e);process.exit(1)}})()})();
|
|
53
|
+
const r=n(5680);const toRegexRange=(e,t,n)=>{if(r(e)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(t===void 0||e===t){return String(e)}if(r(t)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let s={relaxZeros:true,...n};if(typeof s.strictZeros==="boolean"){s.relaxZeros=s.strictZeros===false}let i=String(s.relaxZeros);let o=String(s.shorthand);let a=String(s.capture);let u=String(s.wrap);let c=e+":"+t+"="+i+o+a+u;if(toRegexRange.cache.hasOwnProperty(c)){return toRegexRange.cache[c].result}let l=Math.min(e,t);let f=Math.max(e,t);if(Math.abs(l-f)===1){let n=e+"|"+t;if(s.capture){return`(${n})`}if(s.wrap===false){return n}return`(?:${n})`}let h=hasPadding(e)||hasPadding(t);let p={min:e,max:t,a:l,b:f};let d=[];let g=[];if(h){p.isPadded=h;p.maxLen=String(p.max).length}if(l<0){let e=f<0?Math.abs(f):1;g=splitToPatterns(e,Math.abs(l),p,s);l=p.a=0}if(f>=0){d=splitToPatterns(l,f,p,s)}p.negatives=g;p.positives=d;p.result=collatePatterns(g,d,s);if(s.capture===true){p.result=`(${p.result})`}else if(s.wrap!==false&&d.length+g.length>1){p.result=`(?:${p.result})`}toRegexRange.cache[c]=p;return p.result};function collatePatterns(e,t,n){let r=filterPatterns(e,t,"-",false,n)||[];let s=filterPatterns(t,e,"",false,n)||[];let i=filterPatterns(e,t,"-?",true,n)||[];let o=r.concat(i).concat(s);return o.join("|")}function splitToRanges(e,t){let n=1;let r=1;let s=countNines(e,n);let i=new Set([t]);while(e<=s&&s<=t){i.add(s);n+=1;s=countNines(e,n)}s=countZeros(t+1,r)-1;while(e<s&&s<=t){i.add(s);r+=1;s=countZeros(t+1,r)-1}i=[...i];i.sort(compare);return i}function rangeToPattern(e,t,n){if(e===t){return{pattern:e,count:[],digits:0}}let r=zip(e,t);let s=r.length;let i="";let o=0;for(let e=0;e<s;e++){let[t,s]=r[e];if(t===s){i+=t}else if(t!=="0"||s!=="9"){i+=toCharacterClass(t,s,n)}else{o++}}if(o){i+=n.shorthand===true?"\\d":"[0-9]"}return{pattern:i,count:[o],digits:s}}function splitToPatterns(e,t,n,r){let s=splitToRanges(e,t);let i=[];let o=e;let a;for(let e=0;e<s.length;e++){let t=s[e];let u=rangeToPattern(String(o),String(t),r);let c="";if(!n.isPadded&&a&&a.pattern===u.pattern){if(a.count.length>1){a.count.pop()}a.count.push(u.count[0]);a.string=a.pattern+toQuantifier(a.count);o=t+1;continue}if(n.isPadded){c=padZeros(t,n,r)}u.string=c+u.pattern+toQuantifier(u.count);i.push(u);o=t+1;a=u}return i}function filterPatterns(e,t,n,r,s){let i=[];for(let s of e){let{string:e}=s;if(!r&&!contains(t,"string",e)){i.push(n+e)}if(r&&contains(t,"string",e)){i.push(n+e)}}return i}function zip(e,t){let n=[];for(let r=0;r<e.length;r++)n.push([e[r],t[r]]);return n}function compare(e,t){return e>t?1:t>e?-1:0}function contains(e,t,n){return e.some((e=>e[t]===n))}function countNines(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function countZeros(e,t){return e-e%Math.pow(10,t)}function toQuantifier(e){let[t=0,n=""]=e;if(n||t>1){return`{${t+(n?","+n:"")}}`}return""}function toCharacterClass(e,t,n){return`[${e}${t-e===1?"":"-"}${t}]`}function hasPadding(e){return/^-?(0+)\d/.test(e)}function padZeros(e,t,n){if(!t.isPadded){return e}let r=Math.abs(t.maxLen-String(e).length);let s=n.relaxZeros!==false;switch(r){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:{return s?`0{0,${r}}`:`0{${r}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};e.exports=toRegexRange},9046:(e,t)=>{t.fromCallback=function(e){return Object.defineProperty((function(...t){if(typeof t[t.length-1]==="function")e.apply(this,t);else{return new Promise(((n,r)=>{t.push(((e,t)=>e!=null?r(e):n(t)));e.apply(this,t)}))}}),"name",{value:e.name})};t.fromPromise=function(e){return Object.defineProperty((function(...t){const n=t[t.length-1];if(typeof n!=="function")return e.apply(this,t);else{t.pop();e.apply(this,t).then((e=>n(null,e)),n)}}),"name",{value:e.name})}},6143:(e,t,n)=>{const r=n(7126);const{join:s,delimiter:i,sep:o,posix:a}=n(1017);const u=process.platform==="win32";const c=new RegExp(`[${a.sep}${o===a.sep?"":o}]`.replace(/(\\)/g,"\\$1"));const l=new RegExp(`^\\.${c.source}`);const getNotFoundError=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"});const getPathInfo=(e,{path:t=process.env.PATH,pathExt:n=process.env.PATHEXT,delimiter:r=i})=>{const s=e.match(c)?[""]:[...u?[process.cwd()]:[],...(t||"").split(r)];if(u){const t=n||[".EXE",".CMD",".BAT",".COM"].join(r);const i=t.split(r).reduce(((e,t)=>{e.push(t);e.push(t.toLowerCase());return e}),[]);if(e.includes(".")&&i[0]!==""){i.unshift("")}return{pathEnv:s,pathExt:i,pathExtExe:t}}return{pathEnv:s,pathExt:[""]}};const getPathPart=(e,t)=>{const n=/^".*"$/.test(e)?e.slice(1,-1):e;const r=!n&&l.test(t)?t.slice(0,2):"";return r+s(n,t)};const which=async(e,t={})=>{const{pathEnv:n,pathExt:s,pathExtExe:i}=getPathInfo(e,t);const o=[];for(const a of n){const n=getPathPart(a,e);for(const e of s){const s=n+e;const a=await r(s,{pathExt:i,ignoreErrors:true});if(a){if(!t.all){return s}o.push(s)}}}if(t.all&&o.length){return o}if(t.nothrow){return null}throw getNotFoundError(e)};const whichSync=(e,t={})=>{const{pathEnv:n,pathExt:s,pathExtExe:i}=getPathInfo(e,t);const o=[];for(const a of n){const n=getPathPart(a,e);for(const e of s){const s=n+e;const a=r.sync(s,{pathExt:i,ignoreErrors:true});if(a){if(!t.all){return s}o.push(s)}}}if(t.all&&o.length){return o}if(t.nothrow){return null}throw getNotFoundError(e)};e.exports=which;which.sync=whichSync},2221:(e,t,n)=>{e.exports=writeFile;e.exports.sync=writeFileSync;e.exports._getTmpname=getTmpname;e.exports._cleanupOnExit=cleanupOnExit;var r=n(7758);var s=n(2527);var i=n(7392);var o=n(1017);var a={};var u=function getId(){try{var e=n(1267);return e.threadId}catch(e){return 0}}();var c=0;function getTmpname(e){return e+"."+s(__filename).hash(String(process.pid)).hash(String(u)).hash(String(++c)).result()}function cleanupOnExit(e){return function(){try{r.unlinkSync(typeof e==="function"?e():e)}catch(e){}}}function writeFile(e,t,n,s){if(n){if(n instanceof Function){s=n;n={}}else if(typeof n==="string"){n={encoding:n}}}else{n={}}var u=n.Promise||global.Promise;var c;var l;var f;var h=i(cleanupOnExit((()=>f)));var p=o.resolve(e);new u((function serializeSameFile(e){if(!a[p])a[p]=[];a[p].push(e);if(a[p].length===1)e()})).then((function getRealPath(){return new u((function(t){r.realpath(e,(function(n,r){c=r||e;f=getTmpname(c);t()}))}))})).then((function stat(){return new u((function stat(e){if(n.mode&&n.chown)e();else{r.stat(c,(function(t,r){if(t||!r)e();else{n=Object.assign({},n);if(n.mode==null){n.mode=r.mode}if(n.chown==null&&process.getuid){n.chown={uid:r.uid,gid:r.gid}}e()}}))}}))})).then((function thenWriteFile(){return new u((function(e,t){r.open(f,"w",n.mode,(function(n,r){l=r;if(n)t(n);else e()}))}))})).then((function write(){return new u((function(e,s){if(Buffer.isBuffer(t)){r.write(l,t,0,t.length,0,(function(t){if(t)s(t);else e()}))}else if(t!=null){r.write(l,String(t),0,String(n.encoding||"utf8"),(function(t){if(t)s(t);else e()}))}else e()}))})).then((function syncAndClose(){return new u((function(e,t){if(n.fsync!==false){r.fsync(l,(function(n){if(n)r.close(l,(()=>t(n)));else r.close(l,e)}))}else{r.close(l,e)}}))})).then((function chown(){l=null;if(n.chown){return new u((function(e,t){r.chown(f,n.chown.uid,n.chown.gid,(function(n){if(n)t(n);else e()}))}))}})).then((function chmod(){if(n.mode){return new u((function(e,t){r.chmod(f,n.mode,(function(n){if(n)t(n);else e()}))}))}})).then((function rename(){return new u((function(e,t){r.rename(f,c,(function(n){if(n)t(n);else e()}))}))})).then((function success(){h();s()}),(function fail(e){return new u((e=>l?r.close(l,e):e())).then((()=>{h();r.unlink(f,(function(){s(e)}))}))})).then((function checkQueue(){a[p].shift();if(a[p].length>0){a[p][0]()}else delete a[p]}))}function writeFileSync(e,t,n){if(typeof n==="string")n={encoding:n};else if(!n)n={};try{e=r.realpathSync(e)}catch(e){}var s=getTmpname(e);if(!n.mode||!n.chown){try{var o=r.statSync(e);n=Object.assign({},n);if(!n.mode){n.mode=o.mode}if(!n.chown&&process.getuid){n.chown={uid:o.uid,gid:o.gid}}}catch(e){}}var a;var u=cleanupOnExit(s);var c=i(u);try{a=r.openSync(s,"w",n.mode);if(Buffer.isBuffer(t)){r.writeSync(a,t,0,t.length,0)}else if(t!=null){r.writeSync(a,String(t),0,String(n.encoding||"utf8"))}if(n.fsync!==false){r.fsyncSync(a)}r.closeSync(a);if(n.chown)r.chownSync(s,n.chown.uid,n.chown.gid);if(n.mode)r.chmodSync(s,n.mode);r.renameSync(s,e);c()}catch(e){if(a){try{r.closeSync(a)}catch(e){}}c();u();throw e}}},7392:(e,t,n)=>{var r=global.process;const processOk=function(e){return e&&typeof e==="object"&&typeof e.removeListener==="function"&&typeof e.emit==="function"&&typeof e.reallyExit==="function"&&typeof e.listeners==="function"&&typeof e.kill==="function"&&typeof e.pid==="number"&&typeof e.on==="function"};if(!processOk(r)){e.exports=function(){return function(){}}}else{var s=n(9491);var i=n(5904);var o=/^win/i.test(r.platform);var a=n(2361);if(typeof a!=="function"){a=a.EventEmitter}var u;if(r.__signal_exit_emitter__){u=r.__signal_exit_emitter__}else{u=r.__signal_exit_emitter__=new a;u.count=0;u.emitted={}}if(!u.infinite){u.setMaxListeners(Infinity);u.infinite=true}e.exports=function(e,t){if(!processOk(global.process)){return function(){}}s.equal(typeof e,"function","a callback must be provided for exit handler");if(h===false){p()}var n="exit";if(t&&t.alwaysLast){n="afterexit"}var remove=function(){u.removeListener(n,e);if(u.listeners("exit").length===0&&u.listeners("afterexit").length===0){c()}};u.on(n,e);return remove};var c=function unload(){if(!h||!processOk(global.process)){return}h=false;i.forEach((function(e){try{r.removeListener(e,f[e])}catch(e){}}));r.emit=y;r.reallyExit=d;u.count-=1};e.exports.unload=c;var l=function emit(e,t,n){if(u.emitted[e]){return}u.emitted[e]=true;u.emit(e,t,n)};var f={};i.forEach((function(e){f[e]=function listener(){if(!processOk(global.process)){return}var t=r.listeners(e);if(t.length===u.count){c();l("exit",null,e);l("afterexit",null,e);if(o&&e==="SIGHUP"){e="SIGINT"}r.kill(r.pid,e)}}}));e.exports.signals=function(){return i};var h=false;var p=function load(){if(h||!processOk(global.process)){return}h=true;u.count+=1;i=i.filter((function(e){try{r.on(e,f[e]);return true}catch(e){return false}}));r.emit=b;r.reallyExit=g};e.exports.load=p;var d=r.reallyExit;var g=function processReallyExit(e){if(!processOk(global.process)){return}r.exitCode=e||0;l("exit",r.exitCode,null);l("afterexit",r.exitCode,null);d.call(r,r.exitCode)};var y=r.emit;var b=function processEmit(e,t){if(e==="exit"&&processOk(global.process)){if(t!==undefined){r.exitCode=t}var n=y.apply(this,arguments);l("exit",r.exitCode,null);l("afterexit",r.exitCode,null);return n}else{return y.apply(this,arguments)}}}},5904:e=>{e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32"){e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(process.platform==="linux"){e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}},9491:t=>{t.exports=e(import.meta.url)("assert")},4300:t=>{t.exports=e(import.meta.url)("buffer")},2081:t=>{t.exports=e(import.meta.url)("child_process")},2057:t=>{t.exports=e(import.meta.url)("constants")},2361:t=>{t.exports=e(import.meta.url)("events")},7147:t=>{t.exports=e(import.meta.url)("fs")},2037:t=>{t.exports=e(import.meta.url)("os")},1017:t=>{t.exports=e(import.meta.url)("path")},7282:t=>{t.exports=e(import.meta.url)("process")},2781:t=>{t.exports=e(import.meta.url)("stream")},1576:t=>{t.exports=e(import.meta.url)("string_decoder")},3837:t=>{t.exports=e(import.meta.url)("util")},1267:t=>{t.exports=e(import.meta.url)("worker_threads")},8875:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.isIdentifierChar=isIdentifierChar;t.isIdentifierName=isIdentifierName;t.isIdentifierStart=isIdentifierStart;let n="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";let r="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";const s=new RegExp("["+n+"]");const i=new RegExp("["+n+r+"]");n=r=null;const o=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191];const a=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function isInAstralSet(e,t){let n=65536;for(let r=0,s=t.length;r<s;r+=2){n+=t[r];if(n>e)return false;n+=t[r+1];if(n>=e)return true}return false}function isIdentifierStart(e){if(e<65)return e===36;if(e<=90)return true;if(e<97)return e===95;if(e<=122)return true;if(e<=65535){return e>=170&&s.test(String.fromCharCode(e))}return isInAstralSet(e,o)}function isIdentifierChar(e){if(e<48)return e===36;if(e<58)return true;if(e<65)return false;if(e<=90)return true;if(e<97)return e===95;if(e<=122)return true;if(e<=65535){return e>=170&&i.test(String.fromCharCode(e))}return isInAstralSet(e,o)||isInAstralSet(e,a)}function isIdentifierName(e){let t=true;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if((r&64512)===55296&&n+1<e.length){const t=e.charCodeAt(++n);if((t&64512)===56320){r=65536+((r&1023)<<10)+(t&1023)}}if(t){t=false;if(!isIdentifierStart(r)){return false}}else if(!isIdentifierChar(r)){return false}}return!t}},2738:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"isIdentifierChar",{enumerable:true,get:function(){return r.isIdentifierChar}});Object.defineProperty(t,"isIdentifierName",{enumerable:true,get:function(){return r.isIdentifierName}});Object.defineProperty(t,"isIdentifierStart",{enumerable:true,get:function(){return r.isIdentifierStart}});Object.defineProperty(t,"isKeyword",{enumerable:true,get:function(){return s.isKeyword}});Object.defineProperty(t,"isReservedWord",{enumerable:true,get:function(){return s.isReservedWord}});Object.defineProperty(t,"isStrictBindOnlyReservedWord",{enumerable:true,get:function(){return s.isStrictBindOnlyReservedWord}});Object.defineProperty(t,"isStrictBindReservedWord",{enumerable:true,get:function(){return s.isStrictBindReservedWord}});Object.defineProperty(t,"isStrictReservedWord",{enumerable:true,get:function(){return s.isStrictReservedWord}});var r=n(8875);var s=n(17)},17:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.isKeyword=isKeyword;t.isReservedWord=isReservedWord;t.isStrictBindOnlyReservedWord=isStrictBindOnlyReservedWord;t.isStrictBindReservedWord=isStrictBindReservedWord;t.isStrictReservedWord=isStrictReservedWord;const n={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]};const r=new Set(n.keyword);const s=new Set(n.strict);const i=new Set(n.strictBind);function isReservedWord(e,t){return t&&e==="await"||e==="enum"}function isStrictReservedWord(e,t){return isReservedWord(e,t)||s.has(e)}function isStrictBindOnlyReservedWord(e){return i.has(e)}function isStrictBindReservedWord(e,t){return isStrictReservedWord(e,t)||isStrictBindOnlyReservedWord(e)}function isKeyword(e){return r.has(e)}},7654:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=highlight;t.shouldHighlight=shouldHighlight;var r=n(1531);var s=n(2738);var i=_interopRequireWildcard(n(7658),true);function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(_getRequireWildcardCache=function(e){return e?n:t})(e)}function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=_getRequireWildcardCache(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}const o=new Set(["as","async","from","get","of","set"]);function getDefs(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.grey,invalid:e.white.bgRed.bold}}const a=/\r\n|[\n\r\u2028\u2029]/;const u=/^[()[\]{}]$/;let c;{const e=/^[a-z][\w-]*$/i;const getTokenType=function(t,n,r){if(t.type==="name"){if((0,s.isKeyword)(t.value)||(0,s.isStrictReservedWord)(t.value,true)||o.has(t.value)){return"keyword"}if(e.test(t.value)&&(r[n-1]==="<"||r.slice(n-2,n)=="</")){return"jsxIdentifier"}if(t.value[0]!==t.value[0].toLowerCase()){return"capitalized"}}if(t.type==="punctuator"&&u.test(t.value)){return"bracket"}if(t.type==="invalid"&&(t.value==="@"||t.value==="#")){return"punctuator"}return t.type};c=function*(e){let t;while(t=r.default.exec(e)){const n=r.matchToToken(t);yield{type:getTokenType(n,t.index,e),value:n.value}}}}function highlightTokens(e,t){let n="";for(const{type:r,value:s}of c(t)){const t=e[r];if(t){n+=s.split(a).map((e=>t(e))).join("\n")}else{n+=s}}return n}function shouldHighlight(e){return i.default.level>0||e.forceColor}let l=undefined;function getChalk(e){if(e){var t;(t=l)!=null?t:l=new i.default.constructor({enabled:true,level:1});return l}return i.default}{t.getChalk=e=>getChalk(e.forceColor)}function highlight(e,t={}){if(e!==""&&shouldHighlight(t)){const n=getDefs(getChalk(t.forceColor));return highlightTokens(n,e)}else{return e}}},4379:(e,t,n)=>{const{Argument:r}=n(9414);const{Command:s}=n(552);const{CommanderError:i,InvalidArgumentError:o}=n(2625);const{Help:a}=n(5153);const{Option:u}=n(6558);t=e.exports=new s;t.program=t;t.Command=s;t.Option=u;t.Argument=r;t.Help=a;t.CommanderError=i;t.InvalidArgumentError=o;t.InvalidOptionArgumentError=o},9414:(e,t,n)=>{const{InvalidArgumentError:r}=n(2625);class Argument{constructor(e,t){this.description=t||"";this.variadic=false;this.parseArg=undefined;this.defaultValue=undefined;this.defaultValueDescription=undefined;this.argChoices=undefined;switch(e[0]){case"<":this.required=true;this._name=e.slice(1,-1);break;case"[":this.required=false;this._name=e.slice(1,-1);break;default:this.required=true;this._name=e;break}if(this._name.length>3&&this._name.slice(-3)==="..."){this.variadic=true;this._name=this._name.slice(0,-3)}}name(){return this._name}_concatValue(e,t){if(t===this.defaultValue||!Array.isArray(t)){return[e]}return t.concat(e)}default(e,t){this.defaultValue=e;this.defaultValueDescription=t;return this}argParser(e){this.parseArg=e;return this}choices(e){this.argChoices=e.slice();this.parseArg=(e,t)=>{if(!this.argChoices.includes(e)){throw new r(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._concatValue(e,t)}return e};return this}argRequired(){this.required=true;return this}argOptional(){this.required=false;return this}}function humanReadableArgName(e){const t=e.name()+(e.variadic===true?"...":"");return e.required?"<"+t+">":"["+t+"]"}t.Argument=Argument;t.humanReadableArgName=humanReadableArgName},552:(e,t,n)=>{const r=n(2361).EventEmitter;const s=n(2081);const i=n(1017);const o=n(7147);const a=n(7282);const{Argument:u,humanReadableArgName:c}=n(9414);const{CommanderError:l}=n(2625);const{Help:f}=n(5153);const{Option:h,splitOptionFlags:p,DualOptions:d}=n(6558);const{suggestSimilar:g}=n(7592);class Command extends r{constructor(e){super();this.commands=[];this.options=[];this.parent=null;this._allowUnknownOption=false;this._allowExcessArguments=true;this.registeredArguments=[];this._args=this.registeredArguments;this.args=[];this.rawArgs=[];this.processedArgs=[];this._scriptPath=null;this._name=e||"";this._optionValues={};this._optionValueSources={};this._storeOptionsAsProperties=false;this._actionHandler=null;this._executableHandler=false;this._executableFile=null;this._executableDir=null;this._defaultCommandName=null;this._exitCallback=null;this._aliases=[];this._combineFlagAndOptionalValue=true;this._description="";this._summary="";this._argsDescription=undefined;this._enablePositionalOptions=false;this._passThroughOptions=false;this._lifeCycleHooks={};this._showHelpAfterError=false;this._showSuggestionAfterError=true;this._outputConfiguration={writeOut:e=>a.stdout.write(e),writeErr:e=>a.stderr.write(e),getOutHelpWidth:()=>a.stdout.isTTY?a.stdout.columns:undefined,getErrHelpWidth:()=>a.stderr.isTTY?a.stderr.columns:undefined,outputError:(e,t)=>t(e)};this._hidden=false;this._hasHelpOption=true;this._helpFlags="-h, --help";this._helpDescription="display help for command";this._helpShortFlag="-h";this._helpLongFlag="--help";this._addImplicitHelpCommand=undefined;this._helpCommandName="help";this._helpCommandnameAndArgs="help [command]";this._helpCommandDescription="display help for command";this._helpConfiguration={}}copyInheritedSettings(e){this._outputConfiguration=e._outputConfiguration;this._hasHelpOption=e._hasHelpOption;this._helpFlags=e._helpFlags;this._helpDescription=e._helpDescription;this._helpShortFlag=e._helpShortFlag;this._helpLongFlag=e._helpLongFlag;this._helpCommandName=e._helpCommandName;this._helpCommandnameAndArgs=e._helpCommandnameAndArgs;this._helpCommandDescription=e._helpCommandDescription;this._helpConfiguration=e._helpConfiguration;this._exitCallback=e._exitCallback;this._storeOptionsAsProperties=e._storeOptionsAsProperties;this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue;this._allowExcessArguments=e._allowExcessArguments;this._enablePositionalOptions=e._enablePositionalOptions;this._showHelpAfterError=e._showHelpAfterError;this._showSuggestionAfterError=e._showSuggestionAfterError;return this}_getCommandAndAncestors(){const e=[];for(let t=this;t;t=t.parent){e.push(t)}return e}command(e,t,n){let r=t;let s=n;if(typeof r==="object"&&r!==null){s=r;r=null}s=s||{};const[,i,o]=e.match(/([^ ]+) *(.*)/);const a=this.createCommand(i);if(r){a.description(r);a._executableHandler=true}if(s.isDefault)this._defaultCommandName=a._name;a._hidden=!!(s.noHelp||s.hidden);a._executableFile=s.executableFile||null;if(o)a.arguments(o);this.commands.push(a);a.parent=this;a.copyInheritedSettings(this);if(r)return this;return a}createCommand(e){return new Command(e)}createHelp(){return Object.assign(new f,this.configureHelp())}configureHelp(e){if(e===undefined)return this._helpConfiguration;this._helpConfiguration=e;return this}configureOutput(e){if(e===undefined)return this._outputConfiguration;Object.assign(this._outputConfiguration,e);return this}showHelpAfterError(e=true){if(typeof e!=="string")e=!!e;this._showHelpAfterError=e;return this}showSuggestionAfterError(e=true){this._showSuggestionAfterError=!!e;return this}addCommand(e,t){if(!e._name){throw new Error(`Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()`)}t=t||{};if(t.isDefault)this._defaultCommandName=e._name;if(t.noHelp||t.hidden)e._hidden=true;this.commands.push(e);e.parent=this;return this}createArgument(e,t){return new u(e,t)}argument(e,t,n,r){const s=this.createArgument(e,t);if(typeof n==="function"){s.default(r).argParser(n)}else{s.default(n)}this.addArgument(s);return this}arguments(e){e.trim().split(/ +/).forEach((e=>{this.argument(e)}));return this}addArgument(e){const t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic){throw new Error(`only the last argument can be variadic '${t.name()}'`)}if(e.required&&e.defaultValue!==undefined&&e.parseArg===undefined){throw new Error(`a default value for a required argument is never used: '${e.name()}'`)}this.registeredArguments.push(e);return this}addHelpCommand(e,t){if(e===false){this._addImplicitHelpCommand=false}else{this._addImplicitHelpCommand=true;if(typeof e==="string"){this._helpCommandName=e.split(" ")[0];this._helpCommandnameAndArgs=e}this._helpCommandDescription=t||this._helpCommandDescription}return this}_hasImplicitHelpCommand(){if(this._addImplicitHelpCommand===undefined){return this.commands.length&&!this._actionHandler&&!this._findCommand("help")}return this._addImplicitHelpCommand}hook(e,t){const n=["preSubcommand","preAction","postAction"];if(!n.includes(e)){throw new Error(`Unexpected value for event passed to hook : '${e}'.\nExpecting one of '${n.join("', '")}'`)}if(this._lifeCycleHooks[e]){this._lifeCycleHooks[e].push(t)}else{this._lifeCycleHooks[e]=[t]}return this}exitOverride(e){if(e){this._exitCallback=e}else{this._exitCallback=e=>{if(e.code!=="commander.executeSubCommandAsync"){throw e}else{}}}return this}_exit(e,t,n){if(this._exitCallback){this._exitCallback(new l(e,t,n))}a.exit(e)}action(e){const listener=t=>{const n=this.registeredArguments.length;const r=t.slice(0,n);if(this._storeOptionsAsProperties){r[n]=this}else{r[n]=this.opts()}r.push(this);return e.apply(this,r)};this._actionHandler=listener;return this}createOption(e,t){return new h(e,t)}_callParseArg(e,t,n,r){try{return e.parseArg(t,n)}catch(e){if(e.code==="commander.invalidArgument"){const t=`${r} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}}addOption(e){const t=e.name();const n=e.attributeName();if(e.negate){const t=e.long.replace(/^--no-/,"--");if(!this._findOption(t)){this.setOptionValueWithSource(n,e.defaultValue===undefined?true:e.defaultValue,"default")}}else if(e.defaultValue!==undefined){this.setOptionValueWithSource(n,e.defaultValue,"default")}this.options.push(e);const handleOptionValue=(t,r,s)=>{if(t==null&&e.presetArg!==undefined){t=e.presetArg}const i=this.getOptionValue(n);if(t!==null&&e.parseArg){t=this._callParseArg(e,t,i,r)}else if(t!==null&&e.variadic){t=e._concatValue(t,i)}if(t==null){if(e.negate){t=false}else if(e.isBoolean()||e.optional){t=true}else{t=""}}this.setOptionValueWithSource(n,t,s)};this.on("option:"+t,(t=>{const n=`error: option '${e.flags}' argument '${t}' is invalid.`;handleOptionValue(t,n,"cli")}));if(e.envVar){this.on("optionEnv:"+t,(t=>{const n=`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`;handleOptionValue(t,n,"env")}))}return this}_optionEx(e,t,n,r,s){if(typeof t==="object"&&t instanceof h){throw new Error("To add an Option object use addOption() instead of option() or requiredOption()")}const i=this.createOption(t,n);i.makeOptionMandatory(!!e.mandatory);if(typeof r==="function"){i.default(s).argParser(r)}else if(r instanceof RegExp){const e=r;r=(t,n)=>{const r=e.exec(t);return r?r[0]:n};i.default(s).argParser(r)}else{i.default(r)}return this.addOption(i)}option(e,t,n,r){return this._optionEx({},e,t,n,r)}requiredOption(e,t,n,r){return this._optionEx({mandatory:true},e,t,n,r)}combineFlagAndOptionalValue(e=true){this._combineFlagAndOptionalValue=!!e;return this}allowUnknownOption(e=true){this._allowUnknownOption=!!e;return this}allowExcessArguments(e=true){this._allowExcessArguments=!!e;return this}enablePositionalOptions(e=true){this._enablePositionalOptions=!!e;return this}passThroughOptions(e=true){this._passThroughOptions=!!e;if(!!this.parent&&e&&!this.parent._enablePositionalOptions){throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)")}return this}storeOptionsAsProperties(e=true){if(this.options.length){throw new Error("call .storeOptionsAsProperties() before adding options")}this._storeOptionsAsProperties=!!e;return this}getOptionValue(e){if(this._storeOptionsAsProperties){return this[e]}return this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,undefined)}setOptionValueWithSource(e,t,n){if(this._storeOptionsAsProperties){this[e]=t}else{this._optionValues[e]=t}this._optionValueSources[e]=n;return this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;this._getCommandAndAncestors().forEach((n=>{if(n.getOptionValueSource(e)!==undefined){t=n.getOptionValueSource(e)}}));return t}_prepareUserArgs(e,t){if(e!==undefined&&!Array.isArray(e)){throw new Error("first parameter to parse must be array or undefined")}t=t||{};if(e===undefined){e=a.argv;if(a.versions&&a.versions.electron){t.from="electron"}}this.rawArgs=e.slice();let n;switch(t.from){case undefined:case"node":this._scriptPath=e[1];n=e.slice(2);break;case"electron":if(a.defaultApp){this._scriptPath=e[1];n=e.slice(2)}else{n=e.slice(1)}break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);this._name=this._name||"program";return n}parse(e,t){const n=this._prepareUserArgs(e,t);this._parseCommand([],n);return this}async parseAsync(e,t){const n=this._prepareUserArgs(e,t);await this._parseCommand([],n);return this}_executeSubCommand(e,t){t=t.slice();let n=false;const r=[".js",".ts",".tsx",".mjs",".cjs"];function findFile(e,t){const n=i.resolve(e,t);if(o.existsSync(n))return n;if(r.includes(i.extname(t)))return undefined;const s=r.find((e=>o.existsSync(`${n}${e}`)));if(s)return`${n}${s}`;return undefined}this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();let u=e._executableFile||`${this._name}-${e._name}`;let c=this._executableDir||"";if(this._scriptPath){let e;try{e=o.realpathSync(this._scriptPath)}catch(t){e=this._scriptPath}c=i.resolve(i.dirname(e),c)}if(c){let t=findFile(c,u);if(!t&&!e._executableFile&&this._scriptPath){const n=i.basename(this._scriptPath,i.extname(this._scriptPath));if(n!==this._name){t=findFile(c,`${n}-${e._name}`)}}u=t||u}n=r.includes(i.extname(u));let f;if(a.platform!=="win32"){if(n){t.unshift(u);t=incrementNodeInspectorPort(a.execArgv).concat(t);f=s.spawn(a.argv[0],t,{stdio:"inherit"})}else{f=s.spawn(u,t,{stdio:"inherit"})}}else{t.unshift(u);t=incrementNodeInspectorPort(a.execArgv).concat(t);f=s.spawn(a.execPath,t,{stdio:"inherit"})}if(!f.killed){const e=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];e.forEach((e=>{a.on(e,(()=>{if(f.killed===false&&f.exitCode===null){f.kill(e)}}))}))}const h=this._exitCallback;if(!h){f.on("close",a.exit.bind(a))}else{f.on("close",(()=>{h(new l(a.exitCode||0,"commander.executeSubCommandAsync","(close)"))}))}f.on("error",(t=>{if(t.code==="ENOENT"){const t=c?`searched for local subcommand relative to directory '${c}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory";const n=`'${u}' does not exist\n - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${t}`;throw new Error(n)}else if(t.code==="EACCES"){throw new Error(`'${u}' not executable`)}if(!h){a.exit(1)}else{const e=new l(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t;h(e)}}));this.runningCommand=f}_dispatchSubcommand(e,t,n){const r=this._findCommand(e);if(!r)this.help({error:true});let s;s=this._chainOrCallSubCommandHook(s,r,"preSubcommand");s=this._chainOrCall(s,(()=>{if(r._executableHandler){this._executeSubCommand(r,t.concat(n))}else{return r._parseCommand(t,n)}}));return s}_dispatchHelpCommand(e){if(!e){this.help()}const t=this._findCommand(e);if(t&&!t._executableHandler){t.help()}return this._dispatchSubcommand(e,[],[this._helpLongFlag||this._helpShortFlag])}_checkNumberOfArguments(){this.registeredArguments.forEach(((e,t)=>{if(e.required&&this.args[t]==null){this.missingArgument(e.name())}}));if(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic){return}if(this.args.length>this.registeredArguments.length){this._excessArguments(this.args)}}_processArguments(){const myParseArg=(e,t,n)=>{let r=t;if(t!==null&&e.parseArg){const s=`error: command-argument value '${t}' is invalid for argument '${e.name()}'.`;r=this._callParseArg(e,t,n,s)}return r};this._checkNumberOfArguments();const e=[];this.registeredArguments.forEach(((t,n)=>{let r=t.defaultValue;if(t.variadic){if(n<this.args.length){r=this.args.slice(n);if(t.parseArg){r=r.reduce(((e,n)=>myParseArg(t,n,e)),t.defaultValue)}}else if(r===undefined){r=[]}}else if(n<this.args.length){r=this.args[n];if(t.parseArg){r=myParseArg(t,r,t.defaultValue)}}e[n]=r}));this.processedArgs=e}_chainOrCall(e,t){if(e&&e.then&&typeof e.then==="function"){return e.then((()=>t()))}return t()}_chainOrCallHooks(e,t){let n=e;const r=[];this._getCommandAndAncestors().reverse().filter((e=>e._lifeCycleHooks[t]!==undefined)).forEach((e=>{e._lifeCycleHooks[t].forEach((t=>{r.push({hookedCommand:e,callback:t})}))}));if(t==="postAction"){r.reverse()}r.forEach((e=>{n=this._chainOrCall(n,(()=>e.callback(e.hookedCommand,this)))}));return n}_chainOrCallSubCommandHook(e,t,n){let r=e;if(this._lifeCycleHooks[n]!==undefined){this._lifeCycleHooks[n].forEach((e=>{r=this._chainOrCall(r,(()=>e(this,t)))}))}return r}_parseCommand(e,t){const n=this.parseOptions(t);this._parseOptionsEnv();this._parseOptionsImplied();e=e.concat(n.operands);t=n.unknown;this.args=e.concat(t);if(e&&this._findCommand(e[0])){return this._dispatchSubcommand(e[0],e.slice(1),t)}if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName){return this._dispatchHelpCommand(e[1])}if(this._defaultCommandName){outputHelpIfRequested(this,t);return this._dispatchSubcommand(this._defaultCommandName,e,t)}if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName){this.help({error:true})}outputHelpIfRequested(this,n.unknown);this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();const checkForUnknownOptions=()=>{if(n.unknown.length>0){this.unknownOption(n.unknown[0])}};const r=`command:${this.name()}`;if(this._actionHandler){checkForUnknownOptions();this._processArguments();let n;n=this._chainOrCallHooks(n,"preAction");n=this._chainOrCall(n,(()=>this._actionHandler(this.processedArgs)));if(this.parent){n=this._chainOrCall(n,(()=>{this.parent.emit(r,e,t)}))}n=this._chainOrCallHooks(n,"postAction");return n}if(this.parent&&this.parent.listenerCount(r)){checkForUnknownOptions();this._processArguments();this.parent.emit(r,e,t)}else if(e.length){if(this._findCommand("*")){return this._dispatchSubcommand("*",e,t)}if(this.listenerCount("command:*")){this.emit("command:*",e,t)}else if(this.commands.length){this.unknownCommand()}else{checkForUnknownOptions();this._processArguments()}}else if(this.commands.length){checkForUnknownOptions();this.help({error:true})}else{checkForUnknownOptions();this._processArguments()}}_findCommand(e){if(!e)return undefined;return this.commands.find((t=>t._name===e||t._aliases.includes(e)))}_findOption(e){return this.options.find((t=>t.is(e)))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((e=>{e.options.forEach((t=>{if(t.mandatory&&e.getOptionValue(t.attributeName())===undefined){e.missingMandatoryOptionValue(t)}}))}))}_checkForConflictingLocalOptions(){const e=this.options.filter((e=>{const t=e.attributeName();if(this.getOptionValue(t)===undefined){return false}return this.getOptionValueSource(t)!=="default"}));const t=e.filter((e=>e.conflictsWith.length>0));t.forEach((t=>{const n=e.find((e=>t.conflictsWith.includes(e.attributeName())));if(n){this._conflictingOption(t,n)}}))}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((e=>{e._checkForConflictingLocalOptions()}))}parseOptions(e){const t=[];const n=[];let r=t;const s=e.slice();function maybeOption(e){return e.length>1&&e[0]==="-"}let i=null;while(s.length){const e=s.shift();if(e==="--"){if(r===n)r.push(e);r.push(...s);break}if(i&&!maybeOption(e)){this.emit(`option:${i.name()}`,e);continue}i=null;if(maybeOption(e)){const t=this._findOption(e);if(t){if(t.required){const e=s.shift();if(e===undefined)this.optionMissingArgument(t);this.emit(`option:${t.name()}`,e)}else if(t.optional){let e=null;if(s.length>0&&!maybeOption(s[0])){e=s.shift()}this.emit(`option:${t.name()}`,e)}else{this.emit(`option:${t.name()}`)}i=t.variadic?t:null;continue}}if(e.length>2&&e[0]==="-"&&e[1]!=="-"){const t=this._findOption(`-${e[1]}`);if(t){if(t.required||t.optional&&this._combineFlagAndOptionalValue){this.emit(`option:${t.name()}`,e.slice(2))}else{this.emit(`option:${t.name()}`);s.unshift(`-${e.slice(2)}`)}continue}}if(/^--[^=]+=/.test(e)){const t=e.indexOf("=");const n=this._findOption(e.slice(0,t));if(n&&(n.required||n.optional)){this.emit(`option:${n.name()}`,e.slice(t+1));continue}}if(maybeOption(e)){r=n}if((this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(e)){t.push(e);if(s.length>0)n.push(...s);break}else if(e===this._helpCommandName&&this._hasImplicitHelpCommand()){t.push(e);if(s.length>0)t.push(...s);break}else if(this._defaultCommandName){n.push(e);if(s.length>0)n.push(...s);break}}if(this._passThroughOptions){r.push(e);if(s.length>0)r.push(...s);break}r.push(e)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){const e={};const t=this.options.length;for(let n=0;n<t;n++){const t=this.options[n].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce(((e,t)=>Object.assign(e,t.opts())),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr);if(typeof this._showHelpAfterError==="string"){this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`)}else if(this._showHelpAfterError){this._outputConfiguration.writeErr("\n");this.outputHelp({error:true})}const n=t||{};const r=n.exitCode||1;const s=n.code||"commander.error";this._exit(r,s,e)}_parseOptionsEnv(){this.options.forEach((e=>{if(e.envVar&&e.envVar in a.env){const t=e.attributeName();if(this.getOptionValue(t)===undefined||["default","config","env"].includes(this.getOptionValueSource(t))){if(e.required||e.optional){this.emit(`optionEnv:${e.name()}`,a.env[e.envVar])}else{this.emit(`optionEnv:${e.name()}`)}}}}))}_parseOptionsImplied(){const e=new d(this.options);const hasCustomOptionValue=e=>this.getOptionValue(e)!==undefined&&!["default","implied"].includes(this.getOptionValueSource(e));this.options.filter((t=>t.implied!==undefined&&hasCustomOptionValue(t.attributeName())&&e.valueFromOption(this.getOptionValue(t.attributeName()),t))).forEach((e=>{Object.keys(e.implied).filter((e=>!hasCustomOptionValue(e))).forEach((t=>{this.setOptionValueWithSource(t,e.implied[t],"implied")}))}))}missingArgument(e){const t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){const t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){const t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){const findBestOptionFromValue=e=>{const t=e.attributeName();const n=this.getOptionValue(t);const r=this.options.find((e=>e.negate&&t===e.attributeName()));const s=this.options.find((e=>!e.negate&&t===e.attributeName()));if(r&&(r.presetArg===undefined&&n===false||r.presetArg!==undefined&&n===r.presetArg)){return r}return s||e};const getErrorMessage=e=>{const t=findBestOptionFromValue(e);const n=t.attributeName();const r=this.getOptionValueSource(n);if(r==="env"){return`environment variable '${t.envVar}'`}return`option '${t.flags}'`};const n=`error: ${getErrorMessage(e)} cannot be used with ${getErrorMessage(t)}`;this.error(n,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[];let r=this;do{const e=r.createHelp().visibleOptions(r).filter((e=>e.long)).map((e=>e.long));n=n.concat(e);r=r.parent}while(r&&!r._enablePositionalOptions);t=g(e,n)}const n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;const t=this.registeredArguments.length;const n=t===1?"":"s";const r=this.parent?` for '${this.name()}'`:"";const s=`error: too many arguments${r}. Expected ${t} argument${n} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){const e=this.args[0];let t="";if(this._showSuggestionAfterError){const n=[];this.createHelp().visibleCommands(this).forEach((e=>{n.push(e.name());if(e.alias())n.push(e.alias())}));t=g(e,n)}const n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(e===undefined)return this._version;this._version=e;t=t||"-V, --version";n=n||"output the version number";const r=this.createOption(t,n);this._versionOptionName=r.attributeName();this.options.push(r);this.on("option:"+r.name(),(()=>{this._outputConfiguration.writeOut(`${e}\n`);this._exit(0,"commander.version",e)}));return this}description(e,t){if(e===undefined&&t===undefined)return this._description;this._description=e;if(t){this._argsDescription=t}return this}summary(e){if(e===undefined)return this._summary;this._summary=e;return this}alias(e){if(e===undefined)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler){t=this.commands[this.commands.length-1]}if(e===t._name)throw new Error("Command alias can't be the same as its name");t._aliases.push(e);return this}aliases(e){if(e===undefined)return this._aliases;e.forEach((e=>this.alias(e)));return this}usage(e){if(e===undefined){if(this._usage)return this._usage;const e=this.registeredArguments.map((e=>c(e)));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?e:[]).join(" ")}this._usage=e;return this}name(e){if(e===undefined)return this._name;this._name=e;return this}nameFromFilename(e){this._name=i.basename(e,i.extname(e));return this}executableDir(e){if(e===undefined)return this._executableDir;this._executableDir=e;return this}helpInformation(e){const t=this.createHelp();if(t.helpWidth===undefined){t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()}return t.formatHelp(this,t)}_getHelpContext(e){e=e||{};const t={error:!!e.error};let n;if(t.error){n=e=>this._outputConfiguration.writeErr(e)}else{n=e=>this._outputConfiguration.writeOut(e)}t.write=e.write||n;t.command=this;return t}outputHelp(e){let t;if(typeof e==="function"){t=e;e=undefined}const n=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach((e=>e.emit("beforeAllHelp",n)));this.emit("beforeHelp",n);let r=this.helpInformation(n);if(t){r=t(r);if(typeof r!=="string"&&!Buffer.isBuffer(r)){throw new Error("outputHelp callback must return a string or a Buffer")}}n.write(r);if(this._helpLongFlag){this.emit(this._helpLongFlag)}this.emit("afterHelp",n);this._getCommandAndAncestors().forEach((e=>e.emit("afterAllHelp",n)))}helpOption(e,t){if(typeof e==="boolean"){this._hasHelpOption=e;return this}this._helpFlags=e||this._helpFlags;this._helpDescription=t||this._helpDescription;const n=p(this._helpFlags);this._helpShortFlag=n.shortFlag;this._helpLongFlag=n.longFlag;return this}help(e){this.outputHelp(e);let t=a.exitCode||0;if(t===0&&e&&typeof e!=="function"&&e.error){t=1}this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){const n=["beforeAll","before","after","afterAll"];if(!n.includes(e)){throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${n.join("', '")}'`)}const r=`${e}Help`;this.on(r,(e=>{let n;if(typeof t==="function"){n=t({error:e.error,command:e.command})}else{n=t}if(n){e.write(`${n}\n`)}}));return this}}function outputHelpIfRequested(e,t){const n=e._hasHelpOption&&t.find((t=>t===e._helpLongFlag||t===e._helpShortFlag));if(n){e.outputHelp();e._exit(0,"commander.helpDisplayed","(outputHelp)")}}function incrementNodeInspectorPort(e){return e.map((e=>{if(!e.startsWith("--inspect")){return e}let t;let n="127.0.0.1";let r="9229";let s;if((s=e.match(/^(--inspect(-brk)?)$/))!==null){t=s[1]}else if((s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null){t=s[1];if(/^\d+$/.test(s[3])){r=s[3]}else{n=s[3]}}else if((s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null){t=s[1];n=s[3];r=s[4]}if(t&&r!=="0"){return`${t}=${n}:${parseInt(r)+1}`}return e}))}t.Command=Command},2625:(e,t)=>{class CommanderError extends Error{constructor(e,t,n){super(n);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name;this.code=t;this.exitCode=e;this.nestedError=undefined}}class InvalidArgumentError extends CommanderError{constructor(e){super(1,"commander.invalidArgument",e);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name}}t.CommanderError=CommanderError;t.InvalidArgumentError=InvalidArgumentError},5153:(e,t,n)=>{const{humanReadableArgName:r}=n(9414);class Help{constructor(){this.helpWidth=undefined;this.sortSubcommands=false;this.sortOptions=false;this.showGlobalOptions=false}visibleCommands(e){const t=e.commands.filter((e=>!e._hidden));if(e._hasImplicitHelpCommand()){const[,n,r]=e._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/);const s=e.createCommand(n).helpOption(false);s.description(e._helpCommandDescription);if(r)s.arguments(r);t.push(s)}if(this.sortSubcommands){t.sort(((e,t)=>e.name().localeCompare(t.name())))}return t}compareOptions(e,t){const getSortKey=e=>e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"");return getSortKey(e).localeCompare(getSortKey(t))}visibleOptions(e){const t=e.options.filter((e=>!e.hidden));const n=e._hasHelpOption&&e._helpShortFlag&&!e._findOption(e._helpShortFlag);const r=e._hasHelpOption&&!e._findOption(e._helpLongFlag);if(n||r){let s;if(!n){s=e.createOption(e._helpLongFlag,e._helpDescription)}else if(!r){s=e.createOption(e._helpShortFlag,e._helpDescription)}else{s=e.createOption(e._helpFlags,e._helpDescription)}t.push(s)}if(this.sortOptions){t.sort(this.compareOptions)}return t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];const t=[];for(let n=e.parent;n;n=n.parent){const e=n.options.filter((e=>!e.hidden));t.push(...e)}if(this.sortOptions){t.sort(this.compareOptions)}return t}visibleArguments(e){if(e._argsDescription){e.registeredArguments.forEach((t=>{t.description=t.description||e._argsDescription[t.name()]||""}))}if(e.registeredArguments.find((e=>e.description))){return e.registeredArguments}return[]}subcommandTerm(e){const t=e.registeredArguments.map((e=>r(e))).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce(((e,n)=>Math.max(e,t.subcommandTerm(n).length)),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce(((e,n)=>Math.max(e,t.optionTerm(n).length)),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce(((e,n)=>Math.max(e,t.optionTerm(n).length)),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce(((e,n)=>Math.max(e,t.argumentTerm(n).length)),0)}commandUsage(e){let t=e._name;if(e._aliases[0]){t=t+"|"+e._aliases[0]}let n="";for(let t=e.parent;t;t=t.parent){n=t.name()+" "+n}return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){const t=[];if(e.argChoices){t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`)}if(e.defaultValue!==undefined){const n=e.required||e.optional||e.isBoolean()&&typeof e.defaultValue==="boolean";if(n){t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}}if(e.presetArg!==undefined&&e.optional){t.push(`preset: ${JSON.stringify(e.presetArg)}`)}if(e.envVar!==undefined){t.push(`env: ${e.envVar}`)}if(t.length>0){return`${e.description} (${t.join(", ")})`}return e.description}argumentDescription(e){const t=[];if(e.argChoices){t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`)}if(e.defaultValue!==undefined){t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}if(t.length>0){const n=`(${t.join(", ")})`;if(e.description){return`${e.description} ${n}`}return n}return e.description}formatHelp(e,t){const n=t.padWidth(e,t);const r=t.helpWidth||80;const s=2;const i=2;function formatItem(e,o){if(o){const a=`${e.padEnd(n+i)}${o}`;return t.wrap(a,r-s,n+i)}return e}function formatList(e){return e.join("\n").replace(/^/gm," ".repeat(s))}let o=[`Usage: ${t.commandUsage(e)}`,""];const a=t.commandDescription(e);if(a.length>0){o=o.concat([t.wrap(a,r,0),""])}const u=t.visibleArguments(e).map((e=>formatItem(t.argumentTerm(e),t.argumentDescription(e))));if(u.length>0){o=o.concat(["Arguments:",formatList(u),""])}const c=t.visibleOptions(e).map((e=>formatItem(t.optionTerm(e),t.optionDescription(e))));if(c.length>0){o=o.concat(["Options:",formatList(c),""])}if(this.showGlobalOptions){const n=t.visibleGlobalOptions(e).map((e=>formatItem(t.optionTerm(e),t.optionDescription(e))));if(n.length>0){o=o.concat(["Global Options:",formatList(n),""])}}const l=t.visibleCommands(e).map((e=>formatItem(t.subcommandTerm(e),t.subcommandDescription(e))));if(l.length>0){o=o.concat(["Commands:",formatList(l),""])}return o.join("\n")}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,n,r=40){const s=" \\f\\t\\v - \ufeff";const i=new RegExp(`[\\n][${s}]+`);if(e.match(i))return e;const o=t-n;if(o<r)return e;const a=e.slice(0,n);const u=e.slice(n).replace("\r\n","\n");const c=" ".repeat(n);const l="";const f=`\\s${l}`;const h=new RegExp(`\n|.{1,${o-1}}([${f}]|$)|[^${f}]+?([${f}]|$)`,"g");const p=u.match(h)||[];return a+p.map(((e,t)=>{if(e==="\n")return"";return(t>0?c:"")+e.trimEnd()})).join("\n")}}t.Help=Help},6558:(e,t,n)=>{const{InvalidArgumentError:r}=n(2625);class Option{constructor(e,t){this.flags=e;this.description=t||"";this.required=e.includes("<");this.optional=e.includes("[");this.variadic=/\w\.\.\.[>\]]$/.test(e);this.mandatory=false;const n=splitOptionFlags(e);this.short=n.shortFlag;this.long=n.longFlag;this.negate=false;if(this.long){this.negate=this.long.startsWith("--no-")}this.defaultValue=undefined;this.defaultValueDescription=undefined;this.presetArg=undefined;this.envVar=undefined;this.parseArg=undefined;this.hidden=false;this.argChoices=undefined;this.conflictsWith=[];this.implied=undefined}default(e,t){this.defaultValue=e;this.defaultValueDescription=t;return this}preset(e){this.presetArg=e;return this}conflicts(e){this.conflictsWith=this.conflictsWith.concat(e);return this}implies(e){let t=e;if(typeof e==="string"){t={[e]:true}}this.implied=Object.assign(this.implied||{},t);return this}env(e){this.envVar=e;return this}argParser(e){this.parseArg=e;return this}makeOptionMandatory(e=true){this.mandatory=!!e;return this}hideHelp(e=true){this.hidden=!!e;return this}_concatValue(e,t){if(t===this.defaultValue||!Array.isArray(t)){return[e]}return t.concat(e)}choices(e){this.argChoices=e.slice();this.parseArg=(e,t)=>{if(!this.argChoices.includes(e)){throw new r(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._concatValue(e,t)}return e};return this}name(){if(this.long){return this.long.replace(/^--/,"")}return this.short.replace(/^-/,"")}attributeName(){return camelcase(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class DualOptions{constructor(e){this.positiveOptions=new Map;this.negativeOptions=new Map;this.dualOptions=new Set;e.forEach((e=>{if(e.negate){this.negativeOptions.set(e.attributeName(),e)}else{this.positiveOptions.set(e.attributeName(),e)}}));this.negativeOptions.forEach(((e,t)=>{if(this.positiveOptions.has(t)){this.dualOptions.add(t)}}))}valueFromOption(e,t){const n=t.attributeName();if(!this.dualOptions.has(n))return true;const r=this.negativeOptions.get(n).presetArg;const s=r!==undefined?r:false;return t.negate===(s===e)}}function camelcase(e){return e.split("-").reduce(((e,t)=>e+t[0].toUpperCase()+t.slice(1)))}function splitOptionFlags(e){let t;let n;const r=e.split(/[ |,]+/);if(r.length>1&&!/^[[<]/.test(r[1]))t=r.shift();n=r.shift();if(!t&&/^-[^-]$/.test(n)){t=n;n=undefined}return{shortFlag:t,longFlag:n}}t.Option=Option;t.splitOptionFlags=splitOptionFlags;t.DualOptions=DualOptions},7592:(e,t)=>{const n=3;function editDistance(e,t){if(Math.abs(e.length-t.length)>n)return Math.max(e.length,t.length);const r=[];for(let t=0;t<=e.length;t++){r[t]=[t]}for(let e=0;e<=t.length;e++){r[0][e]=e}for(let n=1;n<=t.length;n++){for(let s=1;s<=e.length;s++){let i=1;if(e[s-1]===t[n-1]){i=0}else{i=1}r[s][n]=Math.min(r[s-1][n]+1,r[s][n-1]+1,r[s-1][n-1]+i);if(s>1&&n>1&&e[s-1]===t[n-2]&&e[s-2]===t[n-1]){r[s][n]=Math.min(r[s][n],r[s-2][n-2]+1)}}}return r[e.length][t.length]}function suggestSimilar(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));const r=e.startsWith("--");if(r){e=e.slice(2);t=t.map((e=>e.slice(2)))}let s=[];let i=n;const o=.4;t.forEach((t=>{if(t.length<=1)return;const n=editDistance(e,t);const r=Math.max(e.length,t.length);const a=(r-n)/r;if(a>o){if(n<i){i=n;s=[t]}else if(n===i){s.push(t)}}}));s.sort(((e,t)=>e.localeCompare(t)));if(r){s=s.map((e=>`--${e}`))}if(s.length>1){return`\n(Did you mean one of ${s.join(", ")}?)`}if(s.length===1){return`\n(Did you mean ${s[0]}?)`}return""}t.suggestSimilar=suggestSimilar},8109:(e,t,n)=>{var r=n(5589);var s=n(9338);var i=n(6011);var o=n(5161);var a=n(2986);var u=n(2289);var c=n(45);function resolveCollection(e,t,n,r,s,i){const o=n.type==="block-map"?a.resolveBlockMap(e,t,n,r,i):n.type==="block-seq"?u.resolveBlockSeq(e,t,n,r,i):c.resolveFlowCollection(e,t,n,r,i);const l=o.constructor;if(s==="!"||s===l.tagName){o.tag=l.tagName;return o}if(s)o.tag=s;return o}function composeCollection(e,t,n,a,u){const c=!a?null:t.directives.tagName(a.source,(e=>u(a,"TAG_RESOLVE_FAILED",e)));const l=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!a||!c||c==="!"||c===i.YAMLMap.tagName&&l==="map"||c===o.YAMLSeq.tagName&&l==="seq"||!l){return resolveCollection(e,t,n,u,c)}let f=t.schema.tags.find((e=>e.tag===c&&e.collection===l));if(!f){const r=t.schema.knownTags[c];if(r&&r.collection===l){t.schema.tags.push(Object.assign({},r,{default:false}));f=r}else{if(r?.collection){u(a,"BAD_COLLECTION_TYPE",`${r.tag} used for ${l} collection, but expects ${r.collection}`,true)}else{u(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,true)}return resolveCollection(e,t,n,u,c)}}const h=resolveCollection(e,t,n,u,c,f);const p=f.resolve?.(h,(e=>u(a,"TAG_RESOLVE_FAILED",e)),t.options)??h;const d=r.isNode(p)?p:new s.Scalar(p);d.range=h.range;d.tag=c;if(f?.format)d.format=f.format;return d}t.composeCollection=composeCollection},5050:(e,t,n)=>{var r=n(42);var s=n(8676);var i=n(1250);var o=n(6985);function composeDoc(e,t,{offset:n,start:a,value:u,end:c},l){const f=Object.assign({_directives:t},e);const h=new r.Document(undefined,f);const p={atRoot:true,directives:h.directives,options:h.options,schema:h.schema};const d=o.resolveProps(a,{indicator:"doc-start",next:u??c?.[0],offset:n,onError:l,startOnNewline:true});if(d.found){h.directives.docStart=true;if(u&&(u.type==="block-map"||u.type==="block-seq")&&!d.hasNewline)l(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}h.contents=u?s.composeNode(p,u,d,l):s.composeEmptyNode(p,d.end,a,null,d,l);const g=h.contents.range[2];const y=i.resolveEnd(c,g,false,l);if(y.comment)h.comment=y.comment;h.range=[n,g,y.offset];return h}t.composeDoc=composeDoc},8676:(e,t,n)=>{var r=n(5639);var s=n(8109);var i=n(4766);var o=n(1250);var a=n(8781);const u={composeNode:composeNode,composeEmptyNode:composeEmptyNode};function composeNode(e,t,n,r){const{spaceBefore:o,comment:a,anchor:c,tag:l}=n;let f;let h=true;switch(t.type){case"alias":f=composeAlias(e,t,r);if(c||l)r(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":f=i.composeScalar(e,t,l,r);if(c)f.anchor=c.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":f=s.composeCollection(u,e,t,l,r);if(c)f.anchor=c.source.substring(1);break;default:{const s=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;r(t,"UNEXPECTED_TOKEN",s);f=composeEmptyNode(e,t.offset,undefined,null,n,r);h=false}}if(c&&f.anchor==="")r(c,"BAD_ALIAS","Anchor cannot be an empty string");if(o)f.spaceBefore=true;if(a){if(t.type==="scalar"&&t.source==="")f.comment=a;else f.commentBefore=a}if(e.options.keepSourceTokens&&h)f.srcToken=t;return f}function composeEmptyNode(e,t,n,r,{spaceBefore:s,comment:o,anchor:u,tag:c,end:l},f){const h={type:"scalar",offset:a.emptyScalarPosition(t,n,r),indent:-1,source:""};const p=i.composeScalar(e,h,c,f);if(u){p.anchor=u.source.substring(1);if(p.anchor==="")f(u,"BAD_ALIAS","Anchor cannot be an empty string")}if(s)p.spaceBefore=true;if(o){p.comment=o;p.range[2]=l}return p}function composeAlias({options:e},{offset:t,source:n,end:s},i){const a=new r.Alias(n.substring(1));if(a.source==="")i(t,"BAD_ALIAS","Alias cannot be an empty string");if(a.source.endsWith(":"))i(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",true);const u=t+n.length;const c=o.resolveEnd(s,u,e.strict,i);a.range=[t,u,c.offset];if(c.comment)a.comment=c.comment;return a}t.composeEmptyNode=composeEmptyNode;t.composeNode=composeNode},4766:(e,t,n)=>{var r=n(5589);var s=n(9338);var i=n(9485);var o=n(7578);function composeScalar(e,t,n,a){const{value:u,type:c,comment:l,range:f}=t.type==="block-scalar"?i.resolveBlockScalar(t,e.options.strict,a):o.resolveFlowScalar(t,e.options.strict,a);const h=n?e.directives.tagName(n.source,(e=>a(n,"TAG_RESOLVE_FAILED",e))):null;const p=n&&h?findScalarTagByName(e.schema,u,h,n,a):t.type==="scalar"?findScalarTagByTest(e,u,t,a):e.schema[r.SCALAR];let d;try{const i=p.resolve(u,(e=>a(n??t,"TAG_RESOLVE_FAILED",e)),e.options);d=r.isScalar(i)?i:new s.Scalar(i)}catch(e){const r=e instanceof Error?e.message:String(e);a(n??t,"TAG_RESOLVE_FAILED",r);d=new s.Scalar(u)}d.range=f;d.source=u;if(c)d.type=c;if(h)d.tag=h;if(p.format)d.format=p.format;if(l)d.comment=l;return d}function findScalarTagByName(e,t,n,s,i){if(n==="!")return e[r.SCALAR];const o=[];for(const t of e.tags){if(!t.collection&&t.tag===n){if(t.default&&t.test)o.push(t);else return t}}for(const e of o)if(e.test?.test(t))return e;const a=e.knownTags[n];if(a&&!a.collection){e.tags.push(Object.assign({},a,{default:false,test:undefined}));return a}i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str");return e[r.SCALAR]}function findScalarTagByTest({directives:e,schema:t},n,s,i){const o=t.tags.find((e=>e.default&&e.test?.test(n)))||t[r.SCALAR];if(t.compat){const a=t.compat.find((e=>e.default&&e.test?.test(n)))??t[r.SCALAR];if(o.tag!==a.tag){const t=e.tagString(o.tag);const n=e.tagString(a.tag);const r=`Value may be parsed as either ${t} or ${n}`;i(s,"TAG_RESOLVE_FAILED",r,true)}}return o}t.composeScalar=composeScalar},9493:(e,t,n)=>{var r=n(5400);var s=n(42);var i=n(4236);var o=n(5589);var a=n(5050);var u=n(1250);function getErrorPos(e){if(typeof e==="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+(typeof n==="string"?n.length:1)]}function parsePrelude(e){let t="";let n=false;let r=false;for(let s=0;s<e.length;++s){const i=e[s];switch(i[0]){case"#":t+=(t===""?"":r?"\n\n":"\n")+(i.substring(1)||" ");n=true;r=false;break;case"%":if(e[s+1]?.[0]!=="#")s+=1;n=false;break;default:if(!n)r=true;n=false}}return{comment:t,afterEmptyLine:r}}class Composer{constructor(e={}){this.doc=null;this.atDirectives=false;this.prelude=[];this.errors=[];this.warnings=[];this.onError=(e,t,n,r)=>{const s=getErrorPos(e);if(r)this.warnings.push(new i.YAMLWarning(s,t,n));else this.errors.push(new i.YAMLParseError(s,t,n))};this.directives=new r.Directives({version:e.version||"1.2"});this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:r}=parsePrelude(this.prelude);if(n){const s=e.contents;if(t){e.comment=e.comment?`${e.comment}\n${n}`:n}else if(r||e.directives.docStart||!s){e.commentBefore=n}else if(o.isCollection(s)&&!s.flow&&s.items.length>0){let e=s.items[0];if(o.isPair(e))e=e.key;const t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{const e=s.commentBefore;s.commentBefore=e?`${n}\n${e}`:n}}if(t){Array.prototype.push.apply(e.errors,this.errors);Array.prototype.push.apply(e.warnings,this.warnings)}else{e.errors=this.errors;e.warnings=this.warnings}this.prelude=[];this.errors=[];this.warnings=[]}streamInfo(){return{comment:parsePrelude(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=false,n=-1){for(const t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){if(process.env.LOG_STREAM)console.dir(e,{depth:null});switch(e.type){case"directive":this.directives.add(e.source,((t,n,r)=>{const s=getErrorPos(e);s[0]+=t;this.onError(s,"BAD_DIRECTIVE",n,r)}));this.prelude.push(e.source);this.atDirectives=true;break;case"document":{const t=a.composeDoc(this.options,this.directives,e,this.onError);if(this.atDirectives&&!t.directives.docStart)this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line");this.decorate(t,false);if(this.doc)yield this.doc;this.doc=t;this.atDirectives=false;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;const n=new i.YAMLParseError(getErrorPos(e),"UNEXPECTED_TOKEN",t);if(this.atDirectives||!this.doc)this.errors.push(n);else this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const t="Unexpected doc-end without preceding document";this.errors.push(new i.YAMLParseError(getErrorPos(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=true;const t=u.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);this.decorate(this.doc,true);if(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(getErrorPos(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=false,t=-1){if(this.doc){this.decorate(this.doc,true);yield this.doc;this.doc=null}else if(e){const e=Object.assign({_directives:this.directives},this.options);const n=new s.Document(undefined,e);if(this.atDirectives)this.onError(t,"MISSING_CHAR","Missing directives-end indicator line");n.range=[0,t,t];this.decorate(n,false);yield n}}}t.Composer=Composer},2986:(e,t,n)=>{var r=n(246);var s=n(6011);var i=n(6985);var o=n(976);var a=n(3669);var u=n(6899);const c="All mapping items must start at the same column";function resolveBlockMap({composeNode:e,composeEmptyNode:t},n,l,f,h){const p=h?.nodeClass??s.YAMLMap;const d=new p(n.schema);if(n.atRoot)n.atRoot=false;let g=l.offset;let y=null;for(const s of l.items){const{start:h,key:p,sep:b,value:v}=s;const w=i.resolveProps(h,{indicator:"explicit-key-ind",next:p??b?.[0],offset:g,onError:f,startOnNewline:true});const S=!w.found;if(S){if(p){if(p.type==="block-seq")f(g,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in p&&p.indent!==l.indent)f(g,"BAD_INDENT",c)}if(!w.anchor&&!w.tag&&!b){y=w.end;if(w.comment){if(d.comment)d.comment+="\n"+w.comment;else d.comment=w.comment}continue}if(w.hasNewlineAfterProp||o.containsNewline(p)){f(p??h[h.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}}else if(w.found?.indent!==l.indent){f(g,"BAD_INDENT",c)}const A=w.end;const E=p?e(n,p,w,f):t(n,A,h,null,w,f);if(n.schema.compat)a.flowIndentCheck(l.indent,p,f);if(u.mapIncludes(n,d.items,E))f(A,"DUPLICATE_KEY","Map keys must be unique");const D=i.resolveProps(b??[],{indicator:"map-value-ind",next:v,offset:E.range[2],onError:f,startOnNewline:!p||p.type==="block-scalar"});g=D.end;if(D.found){if(S){if(v?.type==="block-map"&&!D.hasNewline)f(g,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(n.options.strict&&w.start<D.found.offset-1024)f(E.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}const i=v?e(n,v,D,f):t(n,g,b,null,D,f);if(n.schema.compat)a.flowIndentCheck(l.indent,v,f);g=i.range[2];const o=new r.Pair(E,i);if(n.options.keepSourceTokens)o.srcToken=s;d.items.push(o)}else{if(S)f(E.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(D.comment){if(E.comment)E.comment+="\n"+D.comment;else E.comment=D.comment}const e=new r.Pair(E);if(n.options.keepSourceTokens)e.srcToken=s;d.items.push(e)}}if(y&&y<g)f(y,"IMPOSSIBLE","Map comment with trailing content");d.range=[l.offset,g,y??g];return d}t.resolveBlockMap=resolveBlockMap},9485:(e,t,n)=>{var r=n(9338);function resolveBlockScalar(e,t,n){const s=e.offset;const i=parseBlockScalarHeader(e,t,n);if(!i)return{value:"",type:null,comment:"",range:[s,s,s]};const o=i.mode===">"?r.Scalar.BLOCK_FOLDED:r.Scalar.BLOCK_LITERAL;const a=e.source?splitLines(e.source):[];let u=a.length;for(let e=a.length-1;e>=0;--e){const t=a[e][1];if(t===""||t==="\r")u=e;else break}if(u===0){const t=i.chomp==="+"&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let n=s+i.length;if(e.source)n+=e.source.length;return{value:t,type:o,comment:i.comment,range:[s,n,n]}}let c=e.indent+i.indent;let l=e.offset+i.length;let f=0;for(let e=0;e<u;++e){const[t,r]=a[e];if(r===""||r==="\r"){if(i.indent===0&&t.length>c)c=t.length}else{if(t.length<c){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";n(l+t.length,"MISSING_CHAR",e)}if(i.indent===0)c=t.length;f=e;break}l+=t.length+r.length+1}for(let e=a.length-1;e>=u;--e){if(a[e][0].length>c)u=e+1}let h="";let p="";let d=false;for(let e=0;e<f;++e)h+=a[e][0].slice(c)+"\n";for(let e=f;e<u;++e){let[t,s]=a[e];l+=t.length+s.length+1;const u=s[s.length-1]==="\r";if(u)s=s.slice(0,-1);if(s&&t.length<c){const e=i.indent?"explicit indentation indicator":"first line";const r=`Block scalar lines must not be less indented than their ${e}`;n(l-s.length-(u?2:1),"BAD_INDENT",r);t=""}if(o===r.Scalar.BLOCK_LITERAL){h+=p+t.slice(c)+s;p="\n"}else if(t.length>c||s[0]==="\t"){if(p===" ")p="\n";else if(!d&&p==="\n")p="\n\n";h+=p+t.slice(c)+s;p="\n";d=true}else if(s===""){if(p==="\n")h+="\n";else p="\n"}else{h+=p+s;p=" ";d=false}}switch(i.chomp){case"-":break;case"+":for(let e=u;e<a.length;++e)h+="\n"+a[e][0].slice(c);if(h[h.length-1]!=="\n")h+="\n";break;default:h+="\n"}const g=s+i.length+e.source.length;return{value:h,type:o,comment:i.comment,range:[s,g,g]}}function parseBlockScalarHeader({offset:e,props:t},n,r){if(t[0].type!=="block-scalar-header"){r(t[0],"IMPOSSIBLE","Block scalar header not found");return null}const{source:s}=t[0];const i=s[0];let o=0;let a="";let u=-1;for(let t=1;t<s.length;++t){const n=s[t];if(!a&&(n==="-"||n==="+"))a=n;else{const r=Number(n);if(!o&&r)o=r;else if(u===-1)u=e+t}}if(u!==-1)r(u,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let c=false;let l="";let f=s.length;for(let e=1;e<t.length;++e){const s=t[e];switch(s.type){case"space":c=true;case"newline":f+=s.source.length;break;case"comment":if(n&&!c){const e="Comments must be separated from other tokens by white space characters";r(s,"MISSING_CHAR",e)}f+=s.source.length;l=s.source.substring(1);break;case"error":r(s,"UNEXPECTED_TOKEN",s.message);f+=s.source.length;break;default:{const e=`Unexpected token in block scalar header: ${s.type}`;r(s,"UNEXPECTED_TOKEN",e);const t=s.source;if(t&&typeof t==="string")f+=t.length}}}return{mode:i,indent:o,chomp:a,comment:l,length:f}}function splitLines(e){const t=e.split(/\n( *)/);const n=t[0];const r=n.match(/^( *)/);const s=r?.[1]?[r[1],n.slice(r[1].length)]:["",n];const i=[s];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}t.resolveBlockScalar=resolveBlockScalar},2289:(e,t,n)=>{var r=n(5161);var s=n(6985);var i=n(3669);function resolveBlockSeq({composeNode:e,composeEmptyNode:t},n,o,a,u){const c=u?.nodeClass??r.YAMLSeq;const l=new c(n.schema);if(n.atRoot)n.atRoot=false;let f=o.offset;let h=null;for(const{start:r,value:u}of o.items){const c=s.resolveProps(r,{indicator:"seq-item-ind",next:u,offset:f,onError:a,startOnNewline:true});if(!c.found){if(c.anchor||c.tag||u){if(u&&u.type==="block-seq")a(c.end,"BAD_INDENT","All sequence items must start at the same column");else a(f,"MISSING_CHAR","Sequence item without - indicator")}else{h=c.end;if(c.comment)l.comment=c.comment;continue}}const p=u?e(n,u,c,a):t(n,c.end,r,null,c,a);if(n.schema.compat)i.flowIndentCheck(o.indent,u,a);f=p.range[2];l.items.push(p)}l.range=[o.offset,f,h??f];return l}t.resolveBlockSeq=resolveBlockSeq},1250:(e,t)=>{function resolveEnd(e,t,n,r){let s="";if(e){let i=false;let o="";for(const a of e){const{source:e,type:u}=a;switch(u){case"space":i=true;break;case"comment":{if(n&&!i)r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";if(!s)s=t;else s+=o+t;o="";break}case"newline":if(s)o+=e;i=true;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}t+=e.length}}return{comment:s,offset:t}}t.resolveEnd=resolveEnd},45:(e,t,n)=>{var r=n(5589);var s=n(246);var i=n(6011);var o=n(5161);var a=n(1250);var u=n(6985);var c=n(976);var l=n(6899);const f="Block collections are not allowed within flow collections";const isBlock=e=>e&&(e.type==="block-map"||e.type==="block-seq");function resolveFlowCollection({composeNode:e,composeEmptyNode:t},n,h,p,d){const g=h.start.source==="{";const y=g?"flow map":"flow sequence";const b=d?.nodeClass??(g?i.YAMLMap:o.YAMLSeq);const v=new b(n.schema);v.flow=true;const w=n.atRoot;if(w)n.atRoot=false;let S=h.offset+h.start.source.length;for(let o=0;o<h.items.length;++o){const a=h.items[o];const{start:d,key:b,sep:w,value:A}=a;const E=u.resolveProps(d,{flow:y,indicator:"explicit-key-ind",next:b??w?.[0],offset:S,onError:p,startOnNewline:false});if(!E.found){if(!E.anchor&&!E.tag&&!w&&!A){if(o===0&&E.comma)p(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`);else if(o<h.items.length-1)p(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${y}`);if(E.comment){if(v.comment)v.comment+="\n"+E.comment;else v.comment=E.comment}S=E.end;continue}if(!g&&n.options.strict&&c.containsNewline(b))p(b,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(o===0){if(E.comma)p(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`)}else{if(!E.comma)p(E.start,"MISSING_CHAR",`Missing , between ${y} items`);if(E.comment){let e="";e:for(const t of d){switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}}if(e){let t=v.items[v.items.length-1];if(r.isPair(t))t=t.value??t.key;if(t.comment)t.comment+="\n"+e;else t.comment=e;E.comment=E.comment.substring(e.length+1)}}}if(!g&&!w&&!E.found){const r=A?e(n,A,E,p):t(n,E.end,w,null,E,p);v.items.push(r);S=r.range[2];if(isBlock(A))p(r.range,"BLOCK_IN_FLOW",f)}else{const r=E.end;const o=b?e(n,b,E,p):t(n,r,d,null,E,p);if(isBlock(b))p(o.range,"BLOCK_IN_FLOW",f);const c=u.resolveProps(w??[],{flow:y,indicator:"map-value-ind",next:A,offset:o.range[2],onError:p,startOnNewline:false});if(c.found){if(!g&&!E.found&&n.options.strict){if(w)for(const e of w){if(e===c.found)break;if(e.type==="newline"){p(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(E.start<c.found.offset-1024)p(c.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(A){if("source"in A&&A.source&&A.source[0]===":")p(A,"MISSING_CHAR",`Missing space after : in ${y}`);else p(c.start,"MISSING_CHAR",`Missing , or : between ${y} items`)}const h=A?e(n,A,c,p):c.found?t(n,c.end,w,null,c,p):null;if(h){if(isBlock(A))p(h.range,"BLOCK_IN_FLOW",f)}else if(c.comment){if(o.comment)o.comment+="\n"+c.comment;else o.comment=c.comment}const D=new s.Pair(o,h);if(n.options.keepSourceTokens)D.srcToken=a;if(g){const e=v;if(l.mapIncludes(n,e.items,o))p(r,"DUPLICATE_KEY","Map keys must be unique");e.items.push(D)}else{const e=new i.YAMLMap(n.schema);e.flow=true;e.items.push(D);v.items.push(e)}S=h?h.range[2]:c.end}}const A=g?"}":"]";const[E,...D]=h.end;let C=S;if(E&&E.source===A)C=E.offset+E.source.length;else{const e=y[0].toUpperCase()+y.substring(1);const t=w?`${e} must end with a ${A}`:`${e} in block collection must be sufficiently indented and end with a ${A}`;p(S,w?"MISSING_CHAR":"BAD_INDENT",t);if(E&&E.source.length!==1)D.unshift(E)}if(D.length>0){const e=a.resolveEnd(D,C,n.options.strict,p);if(e.comment){if(v.comment)v.comment+="\n"+e.comment;else v.comment=e.comment}v.range=[h.offset,C,e.offset]}else{v.range=[h.offset,C,C]}return v}t.resolveFlowCollection=resolveFlowCollection},7578:(e,t,n)=>{var r=n(9338);var s=n(1250);function resolveFlowScalar(e,t,n){const{offset:i,type:o,source:a,end:u}=e;let c;let l;const _onError=(e,t,r)=>n(i+e,t,r);switch(o){case"scalar":c=r.Scalar.PLAIN;l=plainValue(a,_onError);break;case"single-quoted-scalar":c=r.Scalar.QUOTE_SINGLE;l=singleQuotedValue(a,_onError);break;case"double-quoted-scalar":c=r.Scalar.QUOTE_DOUBLE;l=doubleQuotedValue(a,_onError);break;default:n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`);return{value:"",type:null,comment:"",range:[i,i+a.length,i+a.length]}}const f=i+a.length;const h=s.resolveEnd(u,f,t,n);return{value:l,type:c,comment:h.comment,range:[i,f,h.offset]}}function plainValue(e,t){let n="";switch(e[0]){case"\t":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}if(n)t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`);return foldLines(e)}function singleQuotedValue(e,t){if(e[e.length-1]!=="'"||e.length===1)t(e.length,"MISSING_CHAR","Missing closing 'quote");return foldLines(e.slice(1,-1)).replace(/''/g,"'")}function foldLines(e){let t,n;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy");n=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch(e){t=/(.*?)[ \t]*\r?\n/sy;n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let s=r[1];let i=" ";let o=t.lastIndex;n.lastIndex=o;while(r=n.exec(e)){if(r[1]===""){if(i==="\n")s+=i;else i="\n"}else{s+=i+r[1];i=" "}o=n.lastIndex}const a=/[ \t]*(.*)/sy;a.lastIndex=o;r=a.exec(e);return s+i+(r?.[1]??"")}function doubleQuotedValue(e,t){let n="";for(let r=1;r<e.length-1;++r){const s=e[r];if(s==="\r"&&e[r+1]==="\n")continue;if(s==="\n"){const{fold:t,offset:s}=foldNewline(e,r);n+=t;r=s}else if(s==="\\"){let s=e[++r];const o=i[s];if(o)n+=o;else if(s==="\n"){s=e[r+1];while(s===" "||s==="\t")s=e[++r+1]}else if(s==="\r"&&e[r+1]==="\n"){s=e[++r+1];while(s===" "||s==="\t")s=e[++r+1]}else if(s==="x"||s==="u"||s==="U"){const i={x:2,u:4,U:8}[s];n+=parseCharCode(e,r+1,i,t);r+=i}else{const s=e.substr(r-1,2);t(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`);n+=s}}else if(s===" "||s==="\t"){const t=r;let i=e[r+1];while(i===" "||i==="\t")i=e[++r+1];if(i!=="\n"&&!(i==="\r"&&e[r+2]==="\n"))n+=r>t?e.slice(t,r+1):s}else{n+=s}}if(e[e.length-1]!=='"'||e.length===1)t(e.length,"MISSING_CHAR",'Missing closing "quote');return n}function foldNewline(e,t){let n="";let r=e[t+1];while(r===" "||r==="\t"||r==="\n"||r==="\r"){if(r==="\r"&&e[t+2]!=="\n")break;if(r==="\n")n+="\n";t+=1;r=e[t+1]}if(!n)n=" ";return{fold:n,offset:t}}const i={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function parseCharCode(e,t,n,r){const s=e.substr(t,n);const i=s.length===n&&/^[0-9a-fA-F]+$/.test(s);const o=i?parseInt(s,16):NaN;if(isNaN(o)){const s=e.substr(t-2,n+2);r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`);return s}return String.fromCodePoint(o)}t.resolveFlowScalar=resolveFlowScalar},6985:(e,t)=>{function resolveProps(e,{flow:t,indicator:n,next:r,offset:s,onError:i,startOnNewline:o}){let a=false;let u=o;let c=o;let l="";let f="";let h=false;let p=false;let d=false;let g=null;let y=null;let b=null;let v=null;let w=null;for(const r of e){if(d){if(r.type!=="space"&&r.type!=="newline"&&r.type!=="comma")i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");d=false}switch(r.type){case"space":if(!t&&u&&n!=="doc-start"&&r.source[0]==="\t")i(r,"TAB_AS_INDENT","Tabs are not allowed as indentation");c=true;break;case"comment":{if(!c)i(r,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=r.source.substring(1)||" ";if(!l)l=e;else l+=f+e;f="";u=false;break}case"newline":if(u){if(l)l+=r.source;else a=true}else f+=r.source;u=true;h=true;if(g||y)p=true;c=true;break;case"anchor":if(g)i(r,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(r.source.endsWith(":"))i(r.offset+r.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",true);g=r;if(w===null)w=r.offset;u=false;c=false;d=true;break;case"tag":{if(y)i(r,"MULTIPLE_TAGS","A node can have at most one tag");y=r;if(w===null)w=r.offset;u=false;c=false;d=true;break}case n:if(g||y)i(r,"BAD_PROP_ORDER",`Anchors and tags must be after the ${r.source} indicator`);if(v)i(r,"UNEXPECTED_TOKEN",`Unexpected ${r.source} in ${t??"collection"}`);v=r;u=false;c=false;break;case"comma":if(t){if(b)i(r,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`);b=r;u=false;c=false;break}default:i(r,"UNEXPECTED_TOKEN",`Unexpected ${r.type} token`);u=false;c=false}}const S=e[e.length-1];const A=S?S.offset+S.source.length:s;if(d&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!==""))i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");return{comma:b,found:v,spaceBefore:a,comment:l,hasNewline:h,hasNewlineAfterProp:p,anchor:g,tag:y,end:A,start:w??A}}t.resolveProps=resolveProps},976:(e,t)=>{function containsNewline(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return true;if(e.end)for(const t of e.end)if(t.type==="newline")return true;return false;case"flow-collection":for(const t of e.items){for(const e of t.start)if(e.type==="newline")return true;if(t.sep)for(const e of t.sep)if(e.type==="newline")return true;if(containsNewline(t.key)||containsNewline(t.value))return true}return false;default:return true}}t.containsNewline=containsNewline},8781:(e,t)=>{function emptyScalarPosition(e,t,n){if(t){if(n===null)n=t.length;for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}n=t[++r];while(n?.type==="space"){e+=n.source.length;n=t[++r]}break}}return e}t.emptyScalarPosition=emptyScalarPosition},3669:(e,t,n)=>{var r=n(976);function flowIndentCheck(e,t,n){if(t?.type==="flow-collection"){const s=t.end[0];if(s.indent===e&&(s.source==="]"||s.source==="}")&&r.containsNewline(t)){const e="Flow end indicator should be more indented than parent";n(s,"BAD_INDENT",e,true)}}}t.flowIndentCheck=flowIndentCheck},6899:(e,t,n)=>{var r=n(5589);function mapIncludes(e,t,n){const{uniqueKeys:s}=e.options;if(s===false)return false;const i=typeof s==="function"?s:(t,n)=>t===n||r.isScalar(t)&&r.isScalar(n)&&t.value===n.value&&!(t.value==="<<"&&e.schema.merge);return t.some((e=>i(e.key,n)))}t.mapIncludes=mapIncludes},42:(e,t,n)=>{var r=n(5639);var s=n(3466);var i=n(5589);var o=n(246);var a=n(2463);var u=n(6831);var c=n(5225);var l=n(8459);var f=n(3412);var h=n(9652);var p=n(5400);class Document{constructor(e,t,n){this.commentBefore=null;this.comment=null;this.errors=[];this.warnings=[];Object.defineProperty(this,i.NODE_TYPE,{value:i.DOC});let r=null;if(typeof t==="function"||Array.isArray(t)){r=t}else if(n===undefined&&t){n=t;t=undefined}const s=Object.assign({intAsBigInt:false,keepSourceTokens:false,logLevel:"warn",prettyErrors:true,strict:true,uniqueKeys:true,version:"1.2"},n);this.options=s;let{version:o}=s;if(n?._directives){this.directives=n._directives.atDocument();if(this.directives.yaml.explicit)o=this.directives.yaml.version}else this.directives=new p.Directives({version:o});this.setSchema(o,n);this.contents=e===undefined?null:this.createNode(e,r,n)}clone(){const e=Object.create(Document.prototype,{[i.NODE_TYPE]:{value:i.DOC}});e.commentBefore=this.commentBefore;e.comment=this.comment;e.errors=this.errors.slice();e.warnings=this.warnings.slice();e.options=Object.assign({},this.options);if(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;if(this.range)e.range=this.range.slice();return e}add(e){if(assertCollection(this.contents))this.contents.add(e)}addIn(e,t){if(assertCollection(this.contents))this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const n=l.anchorNames(this);e.anchor=!t||n.has(t)?l.findNewAnchor(t||"a",n):t}return new r.Alias(e.anchor)}createNode(e,t,n){let r=undefined;if(typeof t==="function"){e=t.call({"":e},"",e);r=t}else if(Array.isArray(t)){const keyToStr=e=>typeof e==="number"||e instanceof String||e instanceof Number;const e=t.filter(keyToStr).map(String);if(e.length>0)t=t.concat(e);r=t}else if(n===undefined&&t){n=t;t=undefined}const{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:u,onTagObj:c,tag:f}=n??{};const{onAnchor:p,setAnchors:d,sourceObjects:g}=l.createNodeAnchors(this,o||"a");const y={aliasDuplicateObjects:s??true,keepUndefined:u??false,onAnchor:p,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:g};const b=h.createNode(e,f,y);if(a&&i.isCollection(b))b.flow=true;d();return b}createPair(e,t,n={}){const r=this.createNode(e,null,n);const s=this.createNode(t,null,n);return new o.Pair(r,s)}delete(e){return assertCollection(this.contents)?this.contents.delete(e):false}deleteIn(e){if(s.isEmptyPath(e)){if(this.contents==null)return false;this.contents=null;return true}return assertCollection(this.contents)?this.contents.deleteIn(e):false}get(e,t){return i.isCollection(this.contents)?this.contents.get(e,t):undefined}getIn(e,t){if(s.isEmptyPath(e))return!t&&i.isScalar(this.contents)?this.contents.value:this.contents;return i.isCollection(this.contents)?this.contents.getIn(e,t):undefined}has(e){return i.isCollection(this.contents)?this.contents.has(e):false}hasIn(e){if(s.isEmptyPath(e))return this.contents!==undefined;return i.isCollection(this.contents)?this.contents.hasIn(e):false}set(e,t){if(this.contents==null){this.contents=s.collectionFromPath(this.schema,[e],t)}else if(assertCollection(this.contents)){this.contents.set(e,t)}}setIn(e,t){if(s.isEmptyPath(e)){this.contents=t}else if(this.contents==null){this.contents=s.collectionFromPath(this.schema,Array.from(e),t)}else if(assertCollection(this.contents)){this.contents.setIn(e,t)}}setSchema(e,t={}){if(typeof e==="number")e=String(e);let n;switch(e){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new p.Directives({version:"1.1"});n={merge:true,resolveKnownTags:false,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=e;else this.directives=new p.Directives({version:e});n={merge:false,resolveKnownTags:true,schema:"core"};break;case null:if(this.directives)delete this.directives;n=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new u.Schema(Object.assign(n,t));else throw new Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:s,reviver:i}={}){const o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===true,mapKeyWarned:false,maxAliasCount:typeof r==="number"?r:100};const u=a.toJS(this.contents,t??"",o);if(typeof s==="function")for(const{count:e,res:t}of o.anchors.values())s(t,e);return typeof i==="function"?f.applyReviver(i,{"":u},"",u):u}toJSON(e,t){return this.toJS({json:true,jsonArg:e,mapAsMap:false,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 c.stringifyDocument(this,e)}}function assertCollection(e){if(i.isCollection(e))return true;throw new Error("Expected a YAML collection as document contents")}t.Document=Document},8459:(e,t,n)=>{var r=n(5589);var s=n(6796);function anchorIsValid(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);const n=`Anchor must not contain whitespace or control characters: ${t}`;throw new Error(n)}return true}function anchorNames(e){const t=new Set;s.visit(e,{Value(e,n){if(n.anchor)t.add(n.anchor)}});return t}function findNewAnchor(e,t){for(let n=1;true;++n){const r=`${e}${n}`;if(!t.has(r))return r}}function createNodeAnchors(e,t){const n=[];const s=new Map;let i=null;return{onAnchor:r=>{n.push(r);if(!i)i=anchorNames(e);const s=findNewAnchor(t,i);i.add(s);return s},setAnchors:()=>{for(const e of n){const t=s.get(e);if(typeof t==="object"&&t.anchor&&(r.isScalar(t.node)||r.isCollection(t.node))){t.node.anchor=t.anchor}else{const t=new Error("Failed to resolve repeated object (this should not happen)");t.source=e;throw t}}},sourceObjects:s}}t.anchorIsValid=anchorIsValid;t.anchorNames=anchorNames;t.createNodeAnchors=createNodeAnchors;t.findNewAnchor=findNewAnchor},3412:(e,t)=>{function applyReviver(e,t,n,r){if(r&&typeof r==="object"){if(Array.isArray(r)){for(let t=0,n=r.length;t<n;++t){const n=r[t];const s=applyReviver(e,r,String(t),n);if(s===undefined)delete r[t];else if(s!==n)r[t]=s}}else if(r instanceof Map){for(const t of Array.from(r.keys())){const n=r.get(t);const s=applyReviver(e,r,t,n);if(s===undefined)r.delete(t);else if(s!==n)r.set(t,s)}}else if(r instanceof Set){for(const t of Array.from(r)){const n=applyReviver(e,r,t,t);if(n===undefined)r.delete(t);else if(n!==t){r.delete(t);r.add(n)}}}else{for(const[t,n]of Object.entries(r)){const s=applyReviver(e,r,t,n);if(s===undefined)delete r[t];else if(s!==n)r[t]=s}}}return e.call(t,n,r)}t.applyReviver=applyReviver},9652:(e,t,n)=>{var r=n(5639);var s=n(5589);var i=n(9338);const o="tag:yaml.org,2002:";function findTagObject(e,t,n){if(t){const e=n.filter((e=>e.tag===t));const r=e.find((e=>!e.format))??e[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find((t=>t.identify?.(e)&&!t.format))}function createNode(e,t,n){if(s.isDocument(e))e=e.contents;if(s.isNode(e))return e;if(s.isPair(e)){const t=n.schema[s.MAP].createNode?.(n.schema,null,n);t.items.push(e);return t}if(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt!=="undefined"&&e instanceof BigInt){e=e.valueOf()}const{aliasDuplicateObjects:a,onAnchor:u,onTagObj:c,schema:l,sourceObjects:f}=n;let h=undefined;if(a&&e&&typeof e==="object"){h=f.get(e);if(h){if(!h.anchor)h.anchor=u(e);return new r.Alias(h.anchor)}else{h={anchor:null,node:null};f.set(e,h)}}if(t?.startsWith("!!"))t=o+t.slice(2);let p=findTagObject(e,t,l.tags);if(!p){if(e&&typeof e.toJSON==="function"){e=e.toJSON()}if(!e||typeof e!=="object"){const t=new i.Scalar(e);if(h)h.node=t;return t}p=e instanceof Map?l[s.MAP]:Symbol.iterator in Object(e)?l[s.SEQ]:l[s.MAP]}if(c){c(p);delete n.onTagObj}const d=p?.createNode?p.createNode(n.schema,e,n):typeof p?.nodeClass?.from==="function"?p.nodeClass.from(n.schema,e,n):new i.Scalar(e);if(t)d.tag=t;else if(!p.default)d.tag=p.tag;if(h)h.node=d;return d}t.createNode=createNode},5400:(e,t,n)=>{var r=n(5589);var s=n(6796);const i={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};const escapeTagName=e=>e.replace(/[!,[\]{}]/g,(e=>i[e]));class Directives{constructor(e,t){this.docStart=null;this.docEnd=false;this.yaml=Object.assign({},Directives.defaultYaml,e);this.tags=Object.assign({},Directives.defaultTags,t)}clone(){const e=new Directives(this.yaml,this.tags);e.docStart=this.docStart;return e}atDocument(){const e=new Directives(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=true;break;case"1.2":this.atNextDocument=false;this.yaml={explicit:Directives.defaultYaml.explicit,version:"1.2"};this.tags=Object.assign({},Directives.defaultTags);break}return e}add(e,t){if(this.atNextDocument){this.yaml={explicit:Directives.defaultYaml.explicit,version:"1.1"};this.tags=Object.assign({},Directives.defaultTags);this.atNextDocument=false}const n=e.trim().split(/[ \t]+/);const r=n.shift();switch(r){case"%TAG":{if(n.length!==2){t(0,"%TAG directive should contain exactly two parts");if(n.length<2)return false}const[e,r]=n;this.tags[e]=r;return true}case"%YAML":{this.yaml.explicit=true;if(n.length!==1){t(0,"%YAML directive should contain exactly one part");return false}const[e]=n;if(e==="1.1"||e==="1.2"){this.yaml.version=e;return true}else{const n=/^\d+\.\d+$/.test(e);t(6,`Unsupported YAML version ${e}`,n);return false}}default:t(0,`Unknown directive ${r}`,true);return false}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!"){t(`Not a valid tag: ${e}`);return null}if(e[1]==="<"){const n=e.slice(2,-1);if(n==="!"||n==="!!"){t(`Verbatim tags aren't resolved, so ${e} is invalid.`);return null}if(e[e.length-1]!==">")t("Verbatim tags must end with a >");return n}const[,n,r]=e.match(/^(.*!)([^!]*)$/s);if(!r)t(`The ${e} tag has no suffix`);const s=this.tags[n];if(s){try{return s+decodeURIComponent(r)}catch(e){t(String(e));return null}}if(n==="!")return e;t(`Could not resolve tag: ${e}`);return null}tagString(e){for(const[t,n]of Object.entries(this.tags)){if(e.startsWith(n))return t+escapeTagName(e.substring(n.length))}return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[];const n=Object.entries(this.tags);let i;if(e&&n.length>0&&r.isNode(e.contents)){const t={};s.visit(e.contents,((e,n)=>{if(r.isNode(n)&&n.tag)t[n.tag]=true}));i=Object.keys(t)}else i=[];for(const[r,s]of n){if(r==="!!"&&s==="tag:yaml.org,2002:")continue;if(!e||i.some((e=>e.startsWith(s))))t.push(`%TAG ${r} ${s}`)}return t.join("\n")}}Directives.defaultYaml={explicit:false,version:"1.2"};Directives.defaultTags={"!!":"tag:yaml.org,2002:"};t.Directives=Directives},4236:(e,t)=>{class YAMLError extends Error{constructor(e,t,n,r){super();this.name=e;this.code=n;this.message=r;this.pos=t}}class YAMLParseError extends YAMLError{constructor(e,t,n){super("YAMLParseError",e,t,n)}}class YAMLWarning extends YAMLError{constructor(e,t,n){super("YAMLWarning",e,t,n)}}const prettifyError=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map((e=>t.linePos(e)));const{line:r,col:s}=n.linePos[0];n.message+=` at line ${r}, column ${s}`;let i=s-1;let o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){const e=Math.min(i-39,o.length-79);o="…"+o.substring(e);i-=e-1}if(o.length>80)o=o.substring(0,79)+"…";if(r>1&&/^ *$/.test(o.substring(0,i))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);if(n.length>80)n=n.substring(0,79)+"…\n";o=n+o}if(/[^ ]/.test(o)){let e=1;const t=n.linePos[1];if(t&&t.line===r&&t.col>s){e=Math.max(1,Math.min(t.col-s,80-i))}const a=" ".repeat(i)+"^".repeat(e);n.message+=`:\n\n${o}\n${a}\n`}};t.YAMLError=YAMLError;t.YAMLParseError=YAMLParseError;t.YAMLWarning=YAMLWarning;t.prettifyError=prettifyError},4083:(e,t,n)=>{var r;var s=n(9493);var i=n(42);var o=n(6831);var a=n(4236);var u=n(5639);var c=n(5589);var l=n(246);var f=n(9338);var h=n(6011);var p=n(5161);var d=n(9169);var g=n(5976);var y=n(1929);var b=n(3328);var v=n(8649);var w=n(6796);r=s.Composer;r=i.Document;r=o.Schema;r=a.YAMLError;r=a.YAMLParseError;r=a.YAMLWarning;r=u.Alias;r=c.isAlias;r=c.isCollection;r=c.isDocument;r=c.isMap;r=c.isNode;r=c.isPair;r=c.isScalar;r=c.isSeq;r=l.Pair;r=f.Scalar;r=h.YAMLMap;r=p.YAMLSeq;r=d;r=g.Lexer;r=y.LineCounter;r=b.Parser;r=v.parse;r=v.parseAllDocuments;r=v.parseDocument;r=v.stringify;r=w.visit;r=w.visitAsync},6909:(e,t)=>{function debug(e,...t){if(e==="debug")console.log(...t)}function warn(e,t){if(e==="debug"||e==="warn"){if(typeof process!=="undefined"&&process.emitWarning)process.emitWarning(t);else console.warn(t)}}t.debug=debug;t.warn=warn},5639:(e,t,n)=>{var r=n(8459);var s=n(6796);var i=n(5589);var o=n(1399);var a=n(2463);class Alias 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=undefined;s.visit(e,{Node:(e,n)=>{if(n===this)return s.visit.BREAK;if(n.anchor===this.source)t=n}});return t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:r,maxAliasCount:s}=t;const i=this.resolve(r);if(!i){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let o=n.get(i);if(!o){a.toJS(i,null,t);o=n.get(i)}if(!o||o.res===undefined){const e="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(e)}if(s>=0){o.count+=1;if(o.aliasCount===0)o.aliasCount=getAliasCount(r,i,n);if(o.count*o.aliasCount>s){const e="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(e)}}return o.res}toString(e,t,n){const s=`*${this.source}`;if(e){r.anchorIsValid(this.source);if(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`${s} `}return s}}function getAliasCount(e,t,n){if(i.isAlias(t)){const r=t.resolve(e);const s=n&&r&&n.get(r);return s?s.count*s.aliasCount:0}else if(i.isCollection(t)){let r=0;for(const s of t.items){const t=getAliasCount(e,s,n);if(t>r)r=t}return r}else if(i.isPair(t)){const r=getAliasCount(e,t.key,n);const s=getAliasCount(e,t.value,n);return Math.max(r,s)}return 1}t.Alias=Alias},3466:(e,t,n)=>{var r=n(9652);var s=n(5589);var i=n(1399);function collectionFromPath(e,t,n){let s=n;for(let e=t.length-1;e>=0;--e){const n=t[e];if(typeof n==="number"&&Number.isInteger(n)&&n>=0){const e=[];e[n]=s;s=e}else{s=new Map([[n,s]])}}return r.createNode(s,undefined,{aliasDuplicateObjects:false,keepUndefined:false,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const isEmptyPath=e=>e==null||typeof e==="object"&&!!e[Symbol.iterator]().next().done;class Collection extends i.NodeBase{constructor(e,t){super(e);Object.defineProperty(this,"schema",{value:t,configurable:true,enumerable:false,writable:true})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(e)t.schema=e;t.items=t.items.map((t=>s.isNode(t)||s.isPair(t)?t.clone(e):t));if(this.range)t.range=this.range.slice();return t}addIn(e,t){if(isEmptyPath(e))this.add(t);else{const[n,...r]=e;const i=this.get(n,true);if(s.isCollection(i))i.addIn(r,t);else if(i===undefined&&this.schema)this.set(n,collectionFromPath(this.schema,r,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){const[t,...n]=e;if(n.length===0)return this.delete(t);const r=this.get(t,true);if(s.isCollection(r))return r.deleteIn(n);else throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){const[n,...r]=e;const i=this.get(n,true);if(r.length===0)return!t&&s.isScalar(i)?i.value:i;else return s.isCollection(i)?i.getIn(r,t):undefined}hasAllNullValues(e){return this.items.every((t=>{if(!s.isPair(t))return false;const n=t.value;return n==null||e&&s.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag}))}hasIn(e){const[t,...n]=e;if(n.length===0)return this.has(t);const r=this.get(t,true);return s.isCollection(r)?r.hasIn(n):false}setIn(e,t){const[n,...r]=e;if(r.length===0){this.set(n,t)}else{const e=this.get(n,true);if(s.isCollection(e))e.setIn(r,t);else if(e===undefined&&this.schema)this.set(n,collectionFromPath(this.schema,r,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}}Collection.maxFlowStringSingleLineLength=60;t.Collection=Collection;t.collectionFromPath=collectionFromPath;t.isEmptyPath=isEmptyPath},1399:(e,t,n)=>{var r=n(3412);var s=n(5589);var i=n(2463);class NodeBase{constructor(e){Object.defineProperty(this,s.NODE_TYPE,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)e.range=this.range.slice();return e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:o,reviver:a}={}){if(!s.isDocument(e))throw new TypeError("A document argument is required");const u={anchors:new Map,doc:e,keep:true,mapAsMap:t===true,mapKeyWarned:false,maxAliasCount:typeof n==="number"?n:100};const c=i.toJS(this,"",u);if(typeof o==="function")for(const{count:e,res:t}of u.anchors.values())o(t,e);return typeof a==="function"?r.applyReviver(a,{"":c},"",c):c}}t.NodeBase=NodeBase},246:(e,t,n)=>{var r=n(9652);var s=n(4875);var i=n(4676);var o=n(5589);function createPair(e,t,n){const s=r.createNode(e,undefined,n);const i=r.createNode(t,undefined,n);return new Pair(s,i)}class Pair{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:n}=this;if(o.isNode(t))t=t.clone(e);if(o.isNode(n))n=n.clone(e);return new Pair(t,n)}toJSON(e,t){const n=t?.mapAsMap?new Map:{};return i.addPairToJSMap(t,n,this)}toString(e,t,n){return e?.doc?s.stringifyPair(this,e,t,n):JSON.stringify(this)}}t.Pair=Pair;t.createPair=createPair},9338:(e,t,n)=>{var r=n(5589);var s=n(1399);var i=n(2463);const isScalarValue=e=>!e||typeof e!=="function"&&typeof e!=="object";class Scalar extends s.NodeBase{constructor(e){super(r.SCALAR);this.value=e}toJSON(e,t){return t?.keep?this.value:i.toJS(this.value,e,t)}toString(){return String(this.value)}}Scalar.BLOCK_FOLDED="BLOCK_FOLDED";Scalar.BLOCK_LITERAL="BLOCK_LITERAL";Scalar.PLAIN="PLAIN";Scalar.QUOTE_DOUBLE="QUOTE_DOUBLE";Scalar.QUOTE_SINGLE="QUOTE_SINGLE";t.Scalar=Scalar;t.isScalarValue=isScalarValue},6011:(e,t,n)=>{var r=n(2466);var s=n(4676);var i=n(3466);var o=n(5589);var a=n(246);var u=n(9338);function findPair(e,t){const n=o.isScalar(t)?t.value:t;for(const r of e){if(o.isPair(r)){if(r.key===t||r.key===n)return r;if(o.isScalar(r.key)&&r.key.value===n)return r}}return undefined}class YAMLMap extends i.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(o.MAP,e);this.items=[]}static from(e,t,n){const{keepUndefined:r,replacer:s}=n;const i=new this(e);const add=(e,o)=>{if(typeof s==="function")o=s.call(t,e,o);else if(Array.isArray(s)&&!s.includes(e))return;if(o!==undefined||r)i.items.push(a.createPair(e,o,n))};if(t instanceof Map){for(const[e,n]of t)add(e,n)}else if(t&&typeof t==="object"){for(const e of Object.keys(t))add(e,t[e])}if(typeof e.sortMapEntries==="function"){i.items.sort(e.sortMapEntries)}return i}add(e,t){let n;if(o.isPair(e))n=e;else if(!e||typeof e!=="object"||!("key"in e)){n=new a.Pair(e,e?.value)}else n=new a.Pair(e.key,e.value);const r=findPair(this.items,n.key);const s=this.schema?.sortMapEntries;if(r){if(!t)throw new Error(`Key ${n.key} already set`);if(o.isScalar(r.value)&&u.isScalarValue(n.value))r.value.value=n.value;else r.value=n.value}else if(s){const e=this.items.findIndex((e=>s(n,e)<0));if(e===-1)this.items.push(n);else this.items.splice(e,0,n)}else{this.items.push(n)}}delete(e){const t=findPair(this.items,e);if(!t)return false;const n=this.items.splice(this.items.indexOf(t),1);return n.length>0}get(e,t){const n=findPair(this.items,e);const r=n?.value;return(!t&&o.isScalar(r)?r.value:r)??undefined}has(e){return!!findPair(this.items,e)}set(e,t){this.add(new a.Pair(e,t),true)}toJSON(e,t,n){const r=n?new n:t?.mapAsMap?new Map:{};if(t?.onCreate)t.onCreate(r);for(const e of this.items)s.addPairToJSMap(t,r,e);return r}toString(e,t,n){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`)}if(!e.allNullValues&&this.hasAllNullValues(false))e=Object.assign({},e,{allNullValues:true});return r.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}t.YAMLMap=YAMLMap;t.findPair=findPair},5161:(e,t,n)=>{var r=n(9652);var s=n(2466);var i=n(3466);var o=n(5589);var a=n(9338);var u=n(2463);class YAMLSeq 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=asItemIndex(e);if(typeof t!=="number")return false;const n=this.items.splice(t,1);return n.length>0}get(e,t){const n=asItemIndex(e);if(typeof n!=="number")return undefined;const r=this.items[n];return!t&&o.isScalar(r)?r.value:r}has(e){const t=asItemIndex(e);return typeof t==="number"&&t<this.items.length}set(e,t){const n=asItemIndex(e);if(typeof n!=="number")throw new Error(`Expected a valid index, not ${e}.`);const r=this.items[n];if(o.isScalar(r)&&a.isScalarValue(t))r.value=t;else this.items[n]=t}toJSON(e,t){const n=[];if(t?.onCreate)t.onCreate(n);let r=0;for(const e of this.items)n.push(u.toJS(e,String(r++),t));return n}toString(e,t,n){if(!e)return JSON.stringify(this);return s.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t})}static from(e,t,n){const{replacer:s}=n;const i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let o of t){if(typeof s==="function"){const n=t instanceof Set?o:String(e++);o=s.call(t,n,o)}i.items.push(r.createNode(o,undefined,n))}}return i}}function asItemIndex(e){let t=o.isScalar(e)?e.value:e;if(t&&typeof t==="string")t=Number(t);return typeof t==="number"&&Number.isInteger(t)&&t>=0?t:null}t.YAMLSeq=YAMLSeq},4676:(e,t,n)=>{var r=n(6909);var s=n(8409);var i=n(5589);var o=n(9338);var a=n(2463);const u="<<";function addPairToJSMap(e,t,{key:n,value:r}){if(e?.doc.schema.merge&&isMergeKey(n)){r=i.isAlias(r)?r.resolve(e.doc):r;if(i.isSeq(r))for(const n of r.items)mergeToJSMap(e,t,n);else if(Array.isArray(r))for(const n of r)mergeToJSMap(e,t,n);else mergeToJSMap(e,t,r)}else{const s=a.toJS(n,"",e);if(t instanceof Map){t.set(s,a.toJS(r,s,e))}else if(t instanceof Set){t.add(s)}else{const i=stringifyKey(n,s,e);const o=a.toJS(r,i,e);if(i in t)Object.defineProperty(t,i,{value:o,writable:true,enumerable:true,configurable:true});else t[i]=o}}return t}const isMergeKey=e=>e===u||i.isScalar(e)&&e.value===u&&(!e.type||e.type===o.Scalar.PLAIN);function mergeToJSMap(e,t,n){const r=e&&i.isAlias(n)?n.resolve(e.doc):n;if(!i.isMap(r))throw new Error("Merge sources must be maps or map aliases");const s=r.toJSON(null,e,Map);for(const[e,n]of s){if(t instanceof Map){if(!t.has(e))t.set(e,n)}else if(t instanceof Set){t.add(e)}else if(!Object.prototype.hasOwnProperty.call(t,e)){Object.defineProperty(t,e,{value:n,writable:true,enumerable:true,configurable:true})}}return t}function stringifyKey(e,t,n){if(t===null)return"";if(typeof t!=="object")return String(t);if(i.isNode(e)&&n?.doc){const t=s.createStringifyContext(n.doc,{});t.anchors=new Set;for(const e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=true;t.inStringifyKey=true;const i=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(i);if(e.length>40)e=e.substring(0,36)+'..."';r.warn(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`);n.mapKeyWarned=true}return i}return JSON.stringify(t)}t.addPairToJSMap=addPairToJSMap},5589:(e,t)=>{const n=Symbol.for("yaml.alias");const r=Symbol.for("yaml.document");const s=Symbol.for("yaml.map");const i=Symbol.for("yaml.pair");const o=Symbol.for("yaml.scalar");const a=Symbol.for("yaml.seq");const u=Symbol.for("yaml.node.type");const isAlias=e=>!!e&&typeof e==="object"&&e[u]===n;const isDocument=e=>!!e&&typeof e==="object"&&e[u]===r;const isMap=e=>!!e&&typeof e==="object"&&e[u]===s;const isPair=e=>!!e&&typeof e==="object"&&e[u]===i;const isScalar=e=>!!e&&typeof e==="object"&&e[u]===o;const isSeq=e=>!!e&&typeof e==="object"&&e[u]===a;function isCollection(e){if(e&&typeof e==="object")switch(e[u]){case s:case a:return true}return false}function isNode(e){if(e&&typeof e==="object")switch(e[u]){case n:case s:case o:case a:return true}return false}const hasAnchor=e=>(isScalar(e)||isCollection(e))&&!!e.anchor;t.ALIAS=n;t.DOC=r;t.MAP=s;t.NODE_TYPE=u;t.PAIR=i;t.SCALAR=o;t.SEQ=a;t.hasAnchor=hasAnchor;t.isAlias=isAlias;t.isCollection=isCollection;t.isDocument=isDocument;t.isMap=isMap;t.isNode=isNode;t.isPair=isPair;t.isScalar=isScalar;t.isSeq=isSeq},2463:(e,t,n)=>{var r=n(5589);function toJS(e,t,n){if(Array.isArray(e))return e.map(((e,t)=>toJS(e,String(t),n)));if(e&&typeof e.toJSON==="function"){if(!n||!r.hasAnchor(e))return e.toJSON(t,n);const s={aliasCount:0,count:1,res:undefined};n.anchors.set(e,s);n.onCreate=e=>{s.res=e;delete n.onCreate};const i=e.toJSON(t,n);if(n.onCreate)n.onCreate(i);return i}if(typeof e==="bigint"&&!n?.keep)return Number(e);return e}t.toJS=toJS},9027:(e,t,n)=>{var r=n(9485);var s=n(7578);var i=n(4236);var o=n(6226);function resolveAsScalar(e,t=true,n){if(e){const _onError=(e,t,r)=>{const s=typeof e==="number"?e:Array.isArray(e)?e[0]:e.offset;if(n)n(s,t,r);else throw new i.YAMLParseError([s,s+1],t,r)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return s.resolveFlowScalar(e,t,_onError);case"block-scalar":return r.resolveBlockScalar(e,t,_onError)}}return null}function createScalarToken(e,t){const{implicitKey:n=false,indent:r,inFlow:s=false,offset:i=-1,type:a="PLAIN"}=t;const u=o.stringifyString({type:a,value:e},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:s,options:{blockQuote:true,lineWidth:-1}});const c=t.end??[{type:"newline",offset:-1,indent:r,source:"\n"}];switch(u[0]){case"|":case">":{const e=u.indexOf("\n");const t=u.substring(0,e);const n=u.substring(e+1)+"\n";const s=[{type:"block-scalar-header",offset:i,indent:r,source:t}];if(!addEndtoBlockProps(s,c))s.push({type:"newline",offset:-1,indent:r,source:"\n"});return{type:"block-scalar",offset:i,indent:r,props:s,source:n}}case'"':return{type:"double-quoted-scalar",offset:i,indent:r,source:u,end:c};case"'":return{type:"single-quoted-scalar",offset:i,indent:r,source:u,end:c};default:return{type:"scalar",offset:i,indent:r,source:u,end:c}}}function setScalarValue(e,t,n={}){let{afterKey:r=false,implicitKey:s=false,inFlow:i=false,type:a}=n;let u="indent"in e?e.indent:null;if(r&&typeof u==="number")u+=2;if(!a)switch(e.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if(t.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a=t.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}const c=o.stringifyString({type:a,value:t},{implicitKey:s||u===null,indent:u!==null&&u>0?" ".repeat(u):"",inFlow:i,options:{blockQuote:true,lineWidth:-1}});switch(c[0]){case"|":case">":setBlockScalarValue(e,c);break;case'"':setFlowScalarValue(e,c,"double-quoted-scalar");break;case"'":setFlowScalarValue(e,c,"single-quoted-scalar");break;default:setFlowScalarValue(e,c,"scalar")}}function setBlockScalarValue(e,t){const n=t.indexOf("\n");const r=t.substring(0,n);const s=t.substring(n+1)+"\n";if(e.type==="block-scalar"){const t=e.props[0];if(t.type!=="block-scalar-header")throw new Error("Invalid block scalar header");t.source=r;e.source=s}else{const{offset:t}=e;const n="indent"in e?e.indent:-1;const i=[{type:"block-scalar-header",offset:t,indent:n,source:r}];if(!addEndtoBlockProps(i,"end"in e?e.end:undefined))i.push({type:"newline",offset:-1,indent:n,source:"\n"});for(const t of Object.keys(e))if(t!=="type"&&t!=="offset")delete e[t];Object.assign(e,{type:"block-scalar",indent:n,props:i,source:s})}}function addEndtoBlockProps(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":e.push(n);return true}return false}function setFlowScalarValue(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n;e.source=t;break;case"block-scalar":{const r=e.props.slice(1);let s=t.length;if(e.props[0].type==="block-scalar-header")s-=e.props[0].source.length;for(const e of r)e.offset+=s;delete e.props;Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{const r=e.offset+t.length;const s={type:"newline",offset:r,indent:e.indent,source:"\n"};delete e.items;Object.assign(e,{type:n,source:t,end:[s]});break}default:{const r="indent"in e?e.indent:-1;const s="end"in e&&Array.isArray(e.end)?e.end.filter((e=>e.type==="space"||e.type==="comment"||e.type==="newline")):[];for(const t of Object.keys(e))if(t!=="type"&&t!=="offset")delete e[t];Object.assign(e,{type:n,indent:r,source:t,end:s})}}}t.createScalarToken=createScalarToken;t.resolveAsScalar=resolveAsScalar;t.setScalarValue=setScalarValue},6307:(e,t)=>{const stringify=e=>"type"in e?stringifyToken(e):stringifyItem(e);function stringifyToken(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=stringifyToken(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=stringifyItem(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=stringifyItem(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=stringifyItem(e);if(e.end)for(const n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const n of e.end)t+=n.source;return t}}}function stringifyItem({start:e,key:t,sep:n,value:r}){let s="";for(const t of e)s+=t.source;if(t)s+=stringifyToken(t);if(n)for(const e of n)s+=e.source;if(r)s+=stringifyToken(r);return s}t.stringify=stringify},8497:(e,t)=>{const n=Symbol("break visit");const r=Symbol("skip children");const s=Symbol("remove item");function visit(e,t){if("type"in e&&e.type==="document")e={start:e.start,value:e.value};_visit(Object.freeze([]),e,t)}visit.BREAK=n;visit.SKIP=r;visit.REMOVE=s;visit.itemAtPath=(e,t)=>{let n=e;for(const[e,r]of t){const t=n?.[e];if(t&&"items"in t){n=t.items[r]}else return undefined}return n};visit.parentCollection=(e,t)=>{const n=visit.itemAtPath(e,t.slice(0,-1));const r=t[t.length-1][0];const s=n?.[r];if(s&&"items"in s)return s;throw new Error("Parent collection not found")};function _visit(e,t,r){let i=r(t,e);if(typeof i==="symbol")return i;for(const o of["key","value"]){const a=t[o];if(a&&"items"in a){for(let t=0;t<a.items.length;++t){const i=_visit(Object.freeze(e.concat([[o,t]])),a.items[t],r);if(typeof i==="number")t=i-1;else if(i===n)return n;else if(i===s){a.items.splice(t,1);t-=1}}if(typeof i==="function"&&o==="key")i=i(t,e)}}return typeof i==="function"?i(t,e):i}t.visit=visit},9169:(e,t,n)=>{var r=n(9027);var s=n(6307);var i=n(8497);const o="\ufeff";const a="";const u="";const c="";const isCollection=e=>!!e&&"items"in e;const isScalar=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function prettyToken(e){switch(e){case o:return"<BOM>";case a:return"<DOC>";case u:return"<FLOW_END>";case c:return"<SCALAR>";default:return JSON.stringify(e)}}function tokenType(e){switch(e){case o:return"byte-order-mark";case a:return"doc-mode";case u:return"flow-error-end";case c: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}t.createScalarToken=r.createScalarToken;t.resolveAsScalar=r.resolveAsScalar;t.setScalarValue=r.setScalarValue;t.stringify=s.stringify;t.visit=i.visit;t.BOM=o;t.DOCUMENT=a;t.FLOW_END=u;t.SCALAR=c;t.isCollection=isCollection;t.isScalar=isScalar;t.prettyToken=prettyToken;t.tokenType=tokenType},5976:(e,t,n)=>{var r=n(9169);function isEmpty(e){switch(e){case undefined:case" ":case"\n":case"\r":case"\t":return true;default:return false}}const s="0123456789ABCDEFabcdef".split("");const i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split("");const o=",[]{}".split("");const a=" ,[]{}\n\r\t".split("");const isNotAnchorChar=e=>!e||a.includes(e);class Lexer{constructor(){this.atEnd=false;this.blockScalarIndent=-1;this.blockScalarKeep=false;this.buffer="";this.flowKey=false;this.flowLevel=0;this.indentNext=0;this.indentValue=0;this.lineEndPos=null;this.next=null;this.pos=0}*lex(e,t=false){if(e){this.buffer=this.buffer?this.buffer+e:e;this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";while(n&&(t||this.hasChars(1)))n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos;let t=this.buffer[e];while(t===" "||t==="\t")t=this.buffer[++e];if(!t||t==="#"||t==="\n")return true;if(t==="\r")return this.buffer[e+1]==="\n";return false}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;while(t===" ")t=this.buffer[++n+e];if(t==="\r"){const t=this.buffer[n+e+1];if(t==="\n"||!t&&!this.atEnd)return e+n+1}return t==="\n"||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t==="-"||t==="."){const t=this.buffer.substr(e,3);if((t==="---"||t==="...")&&isEmpty(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;if(typeof e!=="number"||e!==-1&&e<this.pos){e=this.buffer.indexOf("\n",this.pos);this.lineEndPos=e}if(e===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[e-1]==="\r")e-=1;return this.buffer.substring(this.pos,e)}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){this.buffer=this.buffer.substring(this.pos);this.pos=0;this.lineEndPos=null;this.next=e;return 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(e===null)return this.setNext("stream");if(e[0]===r.BOM){yield*this.pushCount(1);e=e.substring(1)}if(e[0]==="%"){let t=e.length;const n=e.indexOf("#");if(n!==-1){const r=e[n-1];if(r===" "||r==="\t")t=n-1}while(true){const n=e[t-1];if(n===" "||n==="\t")t-=1;else break}const r=(yield*this.pushCount(t))+(yield*this.pushSpaces(true));yield*this.pushCount(e.length-r);this.pushNewline();return"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(true);yield*this.pushCount(e.length-t);yield*this.pushNewline();return"stream"}yield r.DOCUMENT;return 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==="---"&&isEmpty(this.charAt(3))){yield*this.pushCount(3);this.indentValue=0;this.indentNext=0;return"doc"}else if(e==="..."&&isEmpty(this.charAt(3))){yield*this.pushCount(3);return"stream"}}this.indentValue=yield*this.pushSpaces(false);if(this.indentNext>this.indentValue&&!isEmpty(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&isEmpty(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(true));this.indentNext=this.indentValue+1;this.indentValue+=e;return yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(true);const e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case undefined:yield*this.pushNewline();return yield*this.parseLineStart();case"{":case"[":yield*this.pushCount(1);this.flowKey=false;this.flowLevel=1;return"flow";case"}":case"]":yield*this.pushCount(1);return"doc";case"*":yield*this.pushUntil(isNotAnchorChar);return"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":t+=(yield*this.parseBlockScalarHeader());t+=(yield*this.pushSpaces(true));yield*this.pushCount(e.length-t);yield*this.pushNewline();return yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t;let n=-1;do{e=yield*this.pushNewline();if(e>0){t=yield*this.pushSpaces(false);this.indentValue=n=t}else{t=0}t+=(yield*this.pushSpaces(true))}while(e+t>0);const s=this.getLine();if(s===null)return this.setNext("flow");if(n!==-1&&n<this.indentNext&&s[0]!=="#"||n===0&&(s.startsWith("---")||s.startsWith("..."))&&isEmpty(s[3])){const e=n===this.indentNext-1&&this.flowLevel===1&&(s[0]==="]"||s[0]==="}");if(!e){this.flowLevel=0;yield r.FLOW_END;return yield*this.parseLineStart()}}let i=0;while(s[i]===","){i+=(yield*this.pushCount(1));i+=(yield*this.pushSpaces(true));this.flowKey=false}i+=(yield*this.pushIndicators());switch(s[i]){case undefined:return"flow";case"#":yield*this.pushCount(s.length-i);return"flow";case"{":case"[":yield*this.pushCount(1);this.flowKey=false;this.flowLevel+=1;return"flow";case"}":case"]":yield*this.pushCount(1);this.flowKey=true;this.flowLevel-=1;return this.flowLevel?"flow":"doc";case"*":yield*this.pushUntil(isNotAnchorChar);return"flow";case'"':case"'":this.flowKey=true;return yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||isEmpty(e)||e===","){this.flowKey=false;yield*this.pushCount(1);yield*this.pushSpaces(true);return"flow"}}default:this.flowKey=false;return yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if(e==="'"){while(t!==-1&&this.buffer[t+1]==="'")t=this.buffer.indexOf("'",t+2)}else{while(t!==-1){let e=0;while(this.buffer[t-1-e]==="\\")e+=1;if(e%2===0)break;t=this.buffer.indexOf('"',t+1)}}const n=this.buffer.substring(0,t);let r=n.indexOf("\n",this.pos);if(r!==-1){while(r!==-1){const e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf("\n",e)}if(r!==-1){t=r-(n[r-1]==="\r"?2:1)}}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}yield*this.pushToIndex(t+1,false);return this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1;this.blockScalarKeep=false;let e=this.pos;while(true){const t=this.buffer[++e];if(t==="+")this.blockScalarKeep=true;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil((e=>isEmpty(e)||e==="#"))}*parseBlockScalar(){let e=this.pos-1;let t=0;let n;e:for(let r=this.pos;n=this.buffer[r];++r){switch(n){case" ":t+=1;break;case"\n":e=r;t=0;break;case"\r":{const e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if(e==="\n")break}default:break e}}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=t;else this.indentNext+=this.blockScalarIndent;do{const t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf("\n",t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}if(!this.blockScalarKeep){do{let n=e-1;let r=this.buffer[n];if(r==="\r")r=this.buffer[--n];const s=n;while(r===" "||r==="\t")r=this.buffer[--n];if(r==="\n"&&n>=this.pos&&n+1+t>s)e=n;else break}while(true)}yield r.SCALAR;yield*this.pushToIndex(e+1,true);return yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t=this.pos-1;let n=this.pos-1;let s;while(s=this.buffer[++n]){if(s===":"){const r=this.buffer[n+1];if(isEmpty(r)||e&&r===",")break;t=n}else if(isEmpty(s)){let r=this.buffer[n+1];if(s==="\r"){if(r==="\n"){n+=1;s="\n";r=this.buffer[n+1]}else t=n}if(r==="#"||e&&o.includes(r))break;if(s==="\n"){const e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&o.includes(s))break;t=n}}if(!s&&!this.atEnd)return this.setNext("plain-scalar");yield r.SCALAR;yield*this.pushToIndex(t+1,true);return e?"flow":"doc"}*pushCount(e){if(e>0){yield this.buffer.substr(this.pos,e);this.pos+=e;return e}return 0}*pushToIndex(e,t){const n=this.buffer.slice(this.pos,e);if(n){yield n;this.pos+=n.length;return n.length}else if(t)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(true))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(isNotAnchorChar))+(yield*this.pushSpaces(true))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0;const t=this.charAt(1);if(isEmpty(t)||e&&o.includes(t)){if(!e)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=false;return(yield*this.pushCount(1))+(yield*this.pushSpaces(true))+(yield*this.pushIndicators())}}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2;let t=this.buffer[e];while(!isEmpty(t)&&t!==">")t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,false)}else{let e=this.pos+1;let t=this.buffer[e];while(t){if(i.includes(t))t=this.buffer[++e];else if(t==="%"&&s.includes(this.buffer[e+1])&&s.includes(this.buffer[e+2])){t=this.buffer[e+=3]}else break}return yield*this.pushToIndex(e,false)}}*pushNewline(){const e=this.buffer[this.pos];if(e==="\n")return yield*this.pushCount(1);else if(e==="\r"&&this.charAt(1)==="\n")return yield*this.pushCount(2);else return 0}*pushSpaces(e){let t=this.pos-1;let n;do{n=this.buffer[++t]}while(n===" "||e&&n==="\t");const r=t-this.pos;if(r>0){yield this.buffer.substr(this.pos,r);this.pos=t}return r}*pushUntil(e){let t=this.pos;let n=this.buffer[t];while(!e(n))n=this.buffer[++t];return yield*this.pushToIndex(t,false)}}t.Lexer=Lexer},1929:(e,t)=>{class LineCounter{constructor(){this.lineStarts=[];this.addNewLine=e=>this.lineStarts.push(e);this.linePos=e=>{let t=0;let n=this.lineStarts.length;while(t<n){const r=t+n>>1;if(this.lineStarts[r]<e)t=r+1;else n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};const r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}}t.LineCounter=LineCounter},3328:(e,t,n)=>{var r=n(9169);var s=n(5976);function includesToken(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return true;return false}function findNonEmptyIndex(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 isFlowToken(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return true;default:return false}}function getPrevProps(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 getFirstKeyStartProps(e){if(e.length===0)return[];let t=e.length;e:while(--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}}while(e[++t]?.type==="space"){}return e.splice(t,e.length)}function fixFlowSeqItems(e){if(e.start.type==="flow-seq-start"){for(const t of e.items){if(t.sep&&!t.value&&!includesToken(t.start,"explicit-key-ind")&&!includesToken(t.sep,"map-value-ind")){if(t.key)t.value=t.key;delete t.key;if(isFlowToken(t.value)){if(t.value.end)Array.prototype.push.apply(t.value.end,t.sep);else t.value.end=t.sep}else Array.prototype.push.apply(t.start,t.sep);delete t.sep}}}}class Parser{constructor(e){this.atNewLine=true;this.atScalar=false;this.indent=0;this.offset=0;this.onKeyLine=false;this.stack=[];this.source="";this.type="";this.lexer=new s.Lexer;this.onNewLine=e}*parse(e,t=false){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(const n of this.lexer.lex(e,t))yield*this.next(n);if(!t)yield*this.end()}*next(e){this.source=e;if(process.env.LOG_TOKENS)console.log("|",r.prettyToken(e));if(this.atScalar){this.atScalar=false;yield*this.step();this.offset+=e.length;return}const t=r.tokenType(e);if(!t){const t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e});this.offset+=e.length}else if(t==="scalar"){this.atNewLine=false;this.atScalar=true;this.type="scalar"}else{this.type=t;yield*this.step();switch(t){case"newline":this.atNewLine=true;this.indent=0;if(this.onNewLine)this.onNewLine(this.offset+e.length);break;case"space":if(this.atNewLine&&e[0]===" ")this.indent+=e.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=e.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=false}this.offset+=e.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){const e={type:this.type,offset:this.offset,indent:this.indent,source:this.source};return e}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(!t){const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}else if(this.stack.length===0){yield t}else{const e=this.peek(1);if(t.type==="block-scalar"){t.indent="indent"in e?e.indent:0}else if(t.type==="flow-collection"&&e.type==="document"){t.indent=0}if(t.type==="flow-collection")fixFlowSeqItems(t);switch(e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]});this.onKeyLine=true;return}else if(n.sep){n.value=t}else{Object.assign(n,{key:t,sep:[]});this.onKeyLine=!includesToken(n.start,"explicit-key-ind");return}break}case"block-seq":{const n=e.items[e.items.length-1];if(n.value)e.items.push({start:[],value:t});else n.value=t;break}case"flow-collection":{const n=e.items[e.items.length-1];if(!n||n.value)e.items.push({start:[],key:t,sep:[]});else if(n.sep)n.value=t;else Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop();yield*this.pop(t)}if((e.type==="document"||e.type==="block-map"||e.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){const n=t.items[t.items.length-1];if(n&&!n.sep&&!n.value&&n.start.length>0&&findNonEmptyIndex(n.start)===-1&&(t.indent===0||n.start.every((e=>e.type!=="comment"||e.indent<t.indent)))){if(e.type==="document")e.end=n.start;else e.items.push({start:n.start});t.items.splice(-1,1)}}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")e.start.push(this.sourceToken);this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{if(findNonEmptyIndex(e.start)!==-1){yield*this.pop();yield*this.step()}else e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const t=this.startBlockValue(e);if(t)this.stack.push(t);else{yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}}*scalar(e){if(this.type==="map-value-ind"){const t=getPrevProps(this.peek(2));const n=getFirstKeyStartProps(t);let r;if(e.end){r=e.end;r.push(this.sourceToken);delete e.end}else r=[this.sourceToken];const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=true;this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":e.source=this.source;this.atNewLine=true;this.indent=0;if(this.onNewLine){let e=this.source.indexOf("\n")+1;while(e!==0){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":this.onKeyLine=false;if(t.value){const n="end"in t.value?t.value.end:undefined;const r=Array.isArray(n)?n[n.length-1]:undefined;if(r?.type==="comment")n?.push(this.sourceToken);else e.items.push({start:[this.sourceToken]})}else if(t.sep){t.sep.push(this.sourceToken)}else{t.start.push(this.sourceToken)}return;case"space":case"comment":if(t.value){e.items.push({start:[this.sourceToken]})}else if(t.sep){t.sep.push(this.sourceToken)}else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2];const r=n?.value?.end;if(Array.isArray(r)){Array.prototype.push.apply(r,t.start);r.push(this.sourceToken);e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const n=!this.onKeyLine&&this.indent===e.indent&&t.sep;let r=[];if(n&&t.sep&&!t.value){const n=[];for(let r=0;r<t.sep.length;++r){const s=t.sep[r];switch(s.type){case"newline":n.push(r);break;case"space":break;case"comment":if(s.indent>e.indent)n.length=0;break;default:n.length=0}}if(n.length>=2)r=t.sep.splice(n[1])}switch(this.type){case"anchor":case"tag":if(n||t.value){r.push(this.sourceToken);e.items.push({start:r});this.onKeyLine=true}else if(t.sep){t.sep.push(this.sourceToken)}else{t.start.push(this.sourceToken)}return;case"explicit-key-ind":if(!t.sep&&!includesToken(t.start,"explicit-key-ind")){t.start.push(this.sourceToken)}else if(n||t.value){r.push(this.sourceToken);e.items.push({start:r})}else{this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]})}this.onKeyLine=true;return;case"map-value-ind":if(includesToken(t.start,"explicit-key-ind")){if(!t.sep){if(includesToken(t.start,"newline")){Object.assign(t,{key:null,sep:[this.sourceToken]})}else{const e=getFirstKeyStartProps(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}}else if(t.value){e.items.push({start:[],key:null,sep:[this.sourceToken]})}else if(includesToken(t.sep,"map-value-ind")){this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]})}else if(isFlowToken(t.key)&&!includesToken(t.sep,"newline")){const e=getFirstKeyStartProps(t.start);const n=t.key;const r=t.sep;r.push(this.sourceToken);delete t.key,delete t.sep;this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else if(r.length>0){t.sep=t.sep.concat(r,this.sourceToken)}else{t.sep.push(this.sourceToken)}}else{if(!t.sep){Object.assign(t,{key:null,sep:[this.sourceToken]})}else if(t.value||n){e.items.push({start:r,key:null,sep:[this.sourceToken]})}else if(includesToken(t.sep,"map-value-ind")){this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]})}else{t.sep.push(this.sourceToken)}}this.onKeyLine=true;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);if(n||t.value){e.items.push({start:r,key:s,sep:[]});this.onKeyLine=true}else if(t.sep){this.stack.push(s)}else{Object.assign(t,{key:s,sep:[]});this.onKeyLine=true}return}default:{const s=this.startBlockValue(e);if(s){if(n&&s.type!=="block-seq"&&includesToken(t.start,"explicit-key-ind")){e.items.push({start:r})}this.stack.push(s);return}}}}yield*this.pop();yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const n="end"in t.value?t.value.end:undefined;const r=Array.isArray(n)?n[n.length-1]:undefined;if(r?.type==="comment")n?.push(this.sourceToken);else e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2];const r=n?.value?.end;if(Array.isArray(r)){Array.prototype.push.apply(r,t.start);r.push(this.sourceToken);e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;if(t.value||includesToken(t.start,"seq-item-ind"))e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop();yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let e;do{yield*this.pop();e=this.peek(1)}while(e&&e.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!t||t.sep)e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return;case"map-value-ind":if(!t||t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!t||t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);if(!t||t.value)e.items.push({start:[],key:n,sep:[]});else if(t.sep)this.stack.push(n);else Object.assign(t,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const n=this.startBlockValue(e);if(n)this.stack.push(n);else{yield*this.pop();yield*this.step()}}else{const t=this.peek(2);if(t.type==="block-map"&&(this.type==="map-value-ind"&&t.indent===e.indent||this.type==="newline"&&!t.items[t.items.length-1].sep)){yield*this.pop();yield*this.step()}else if(this.type==="map-value-ind"&&t.type!=="flow-collection"){const n=getPrevProps(t);const r=getFirstKeyStartProps(n);fixFlowSeqItems(e);const s=e.end.splice(1,e.end.length);s.push(this.sourceToken);const i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:s}]};this.onKeyLine=true;this.stack[this.stack.length-1]=i}else{yield*this.lineEnd(e)}}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;while(e!==0){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=true;const t=getPrevProps(e);const n=getFirstKeyStartProps(t);n.push(this.sourceToken);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n}]}}case"map-value-ind":{this.onKeyLine=true;const t=getPrevProps(e);const n=getFirstKeyStartProps(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){if(this.type!=="comment")return false;if(this.indent<=t)return false;return e.every((e=>e.type==="newline"||e.type==="space"))}*documentEnd(e){if(this.type!=="doc-mode"){if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop();yield*this.step();break;case"newline":this.onKeyLine=false;case"space":case"comment":default:if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}t.Parser=Parser},8649:(e,t,n)=>{var r=n(9493);var s=n(42);var i=n(4236);var o=n(6909);var a=n(1929);var u=n(3328);function parseOptions(e){const t=e.prettyErrors!==false;const n=e.lineCounter||t&&new a.LineCounter||null;return{lineCounter:n,prettyErrors:t}}function parseAllDocuments(e,t={}){const{lineCounter:n,prettyErrors:s}=parseOptions(t);const o=new u.Parser(n?.addNewLine);const a=new r.Composer(t);const c=Array.from(a.compose(o.parse(e)));if(s&&n)for(const t of c){t.errors.forEach(i.prettifyError(e,n));t.warnings.forEach(i.prettifyError(e,n))}if(c.length>0)return c;return Object.assign([],{empty:true},a.streamInfo())}function parseDocument(e,t={}){const{lineCounter:n,prettyErrors:s}=parseOptions(t);const o=new u.Parser(n?.addNewLine);const a=new r.Composer(t);let c=null;for(const t of a.compose(o.parse(e),true,e.length)){if(!c)c=t;else if(c.options.logLevel!=="silent"){c.errors.push(new i.YAMLParseError(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}if(s&&n){c.errors.forEach(i.prettifyError(e,n));c.warnings.forEach(i.prettifyError(e,n))}return c}function parse(e,t,n){let r=undefined;if(typeof t==="function"){r=t}else if(n===undefined&&t&&typeof t==="object"){n=t}const s=parseDocument(e,n);if(!s)return null;s.warnings.forEach((e=>o.warn(s.options.logLevel,e)));if(s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];else s.errors=[]}return s.toJS(Object.assign({reviver:r},n))}function stringify(e,t,n){let r=null;if(typeof t==="function"||Array.isArray(t)){r=t}else if(n===undefined&&t){n=t}if(typeof n==="string")n=n.length;if(typeof n==="number"){const e=Math.round(n);n=e<1?undefined:e>8?{indent:8}:{indent:e}}if(e===undefined){const{keepUndefined:e}=n??t??{};if(!e)return undefined}return new s.Document(e,r,n).toString(n)}t.parse=parse;t.parseAllDocuments=parseAllDocuments;t.parseDocument=parseDocument;t.stringify=stringify},6831:(e,t,n)=>{var r=n(5589);var s=n(83);var i=n(1693);var o=n(2201);var a=n(4138);const sortMapEntriesByKey=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class Schema{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:u,schema:c,sortMapEntries:l,toStringDefaults:f}){this.compat=Array.isArray(e)?a.getTags(e,"compat"):e?a.getTags(null,e):null;this.merge=!!n;this.name=typeof c==="string"&&c||"core";this.knownTags=u?a.coreKnownTags:{};this.tags=a.getTags(t,this.name);this.toStringOptions=f??null;Object.defineProperty(this,r.MAP,{value:s.map});Object.defineProperty(this,r.SCALAR,{value:o.string});Object.defineProperty(this,r.SEQ,{value:i.seq});this.sortMapEntries=typeof l==="function"?l:l===true?sortMapEntriesByKey:null}clone(){const e=Object.create(Schema.prototype,Object.getOwnPropertyDescriptors(this));e.tags=this.tags.slice();return e}}t.Schema=Schema},83:(e,t,n)=>{var r=n(5589);var s=n(6011);const i={collection:"map",default:true,nodeClass:s.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){if(!r.isMap(e))t("Expected a mapping for this tag");return e},createNode:(e,t,n)=>s.YAMLMap.from(e,t,n)};t.map=i},6703:(e,t,n)=>{var r=n(9338);const s={identify:e=>e==null,createNode:()=>new r.Scalar(null),default:true,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new r.Scalar(null),stringify:({source:e},t)=>typeof e==="string"&&s.test.test(e)?e:t.options.nullStr};t.nullTag=s},1693:(e,t,n)=>{var r=n(5589);var s=n(5161);const i={collection:"seq",default:true,nodeClass:s.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){if(!r.isSeq(e))t("Expected a sequence for this tag");return e},createNode:(e,t,n)=>s.YAMLSeq.from(e,t,n)};t.seq=i},2201:(e,t,n)=>{var r=n(6226);const s={identify:e=>typeof e==="string",default:true,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,s){t=Object.assign({actualString:true},t);return r.stringifyString(e,t,n,s)}};t.string=s},2045:(e,t,n)=>{var r=n(9338);const s={identify:e=>typeof e==="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new r.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&s.test.test(e)){const n=e[0]==="t"||e[0]==="T";if(t===n)return e}return t?n.options.trueStr:n.options.falseStr}};t.boolTag=s},6810:(e,t,n)=>{var r=n(9338);var s=n(4174);const i={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:s.stringifyNumber};const o={identify:e=>typeof e==="number",default:true,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():s.stringifyNumber(e)}};const a={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new r.Scalar(parseFloat(e));const n=e.indexOf(".");if(n!==-1&&e[e.length-1]==="0")t.minFractionDigits=e.length-n-1;return t},stringify:s.stringifyNumber};t.float=a;t.floatExp=o;t.floatNaN=i},3019:(e,t,n)=>{var r=n(4174);const intIdentify=e=>typeof e==="bigint"||Number.isInteger(e);const intResolve=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function intStringify(e,t,n){const{value:s}=e;if(intIdentify(s)&&s>=0)return n+s.toString(t);return r.stringifyNumber(e)}const s={identify:e=>intIdentify(e)&&e>=0,default:true,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>intResolve(e,2,8,n),stringify:e=>intStringify(e,8,"0o")};const i={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>intResolve(e,0,10,n),stringify:r.stringifyNumber};const o={identify:e=>intIdentify(e)&&e>=0,default:true,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>intResolve(e,2,16,n),stringify:e=>intStringify(e,16,"0x")};t.int=i;t.intHex=o;t.intOct=s},27:(e,t,n)=>{var r=n(83);var s=n(6703);var i=n(1693);var o=n(2201);var a=n(2045);var u=n(6810);var c=n(3019);const l=[r.map,i.seq,o.string,s.nullTag,a.boolTag,c.intOct,c.int,c.intHex,u.floatNaN,u.floatExp,u.float];t.schema=l},4545:(e,t,n)=>{var r=n(9338);var s=n(83);var i=n(1693);function intIdentify(e){return typeof e==="bigint"||Number.isInteger(e)}const stringifyJSON=({value:e})=>JSON.stringify(e);const o=[{identify:e=>typeof e==="string",default:true,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:stringifyJSON},{identify:e=>e==null,createNode:()=>new r.Scalar(null),default:true,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:stringifyJSON},{identify:e=>typeof e==="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>e==="true",stringify:stringifyJSON},{identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>intIdentify(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:stringifyJSON}];const a={default:true,tag:"",test:/^/,resolve(e,t){t(`Unresolved plain scalar ${JSON.stringify(e)}`);return e}};const u=[s.map,i.seq].concat(o,a);t.schema=u},4138:(e,t,n)=>{var r=n(83);var s=n(6703);var i=n(1693);var o=n(2201);var a=n(2045);var u=n(6810);var c=n(3019);var l=n(27);var f=n(4545);var h=n(5724);var p=n(8974);var d=n(9841);var g=n(5389);var y=n(7847);var b=n(1156);const v=new Map([["core",l.schema],["failsafe",[r.map,i.seq,o.string]],["json",f.schema],["yaml11",g.schema],["yaml-1.1",g.schema]]);const w={binary:h.binary,bool:a.boolTag,float:u.float,floatExp:u.floatExp,floatNaN:u.floatNaN,floatTime:b.floatTime,int:c.int,intHex:c.intHex,intOct:c.intOct,intTime:b.intTime,map:r.map,null:s.nullTag,omap:p.omap,pairs:d.pairs,seq:i.seq,set:y.set,timestamp:b.timestamp};const S={"tag:yaml.org,2002:binary":h.binary,"tag:yaml.org,2002:omap":p.omap,"tag:yaml.org,2002:pairs":d.pairs,"tag:yaml.org,2002:set":y.set,"tag:yaml.org,2002:timestamp":b.timestamp};function getTags(e,t){let n=v.get(t);if(!n){if(Array.isArray(e))n=[];else{const e=Array.from(v.keys()).filter((e=>e!=="yaml11")).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}}if(Array.isArray(e)){for(const t of e)n=n.concat(t)}else if(typeof e==="function"){n=e(n.slice())}return n.map((e=>{if(typeof e!=="string")return e;const t=w[e];if(t)return t;const n=Object.keys(w).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag "${e}"; use one of ${n}`)}))}t.coreKnownTags=S;t.getTags=getTags},5724:(e,t,n)=>{var r=n(9338);var s=n(6226);const i={identify:e=>e instanceof Uint8Array,default:false,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof Buffer==="function"){return Buffer.from(e,"base64")}else if(typeof atob==="function"){const t=atob(e.replace(/[\n\r]/g,""));const n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}else{t("This environment does not support reading binary tags; either Buffer or atob is required");return e}},stringify({comment:e,type:t,value:n},i,o,a){const u=n;let c;if(typeof Buffer==="function"){c=u instanceof Buffer?u.toString("base64"):Buffer.from(u.buffer).toString("base64")}else if(typeof btoa==="function"){let e="";for(let t=0;t<u.length;++t)e+=String.fromCharCode(u[t]);c=btoa(e)}else{throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required")}if(!t)t=r.Scalar.BLOCK_LITERAL;if(t!==r.Scalar.QUOTE_DOUBLE){const e=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth);const n=Math.ceil(c.length/e);const s=new Array(n);for(let t=0,r=0;t<n;++t,r+=e){s[t]=c.substr(r,e)}c=s.join(t===r.Scalar.BLOCK_LITERAL?"\n":" ")}return s.stringifyString({comment:e,type:t,value:c},i,o,a)}};t.binary=i},2631:(e,t,n)=>{var r=n(9338);function boolStringify({value:e,source:t},n){const r=e?s:i;if(t&&r.test.test(t))return t;return e?n.options.trueStr:n.options.falseStr}const s={identify:e=>e===true,default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new r.Scalar(true),stringify:boolStringify};const i={identify:e=>e===false,default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>new r.Scalar(false),stringify:boolStringify};t.falseTag=i;t.trueTag=s},8035:(e,t,n)=>{var r=n(9338);var s=n(4174);const i={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:s.stringifyNumber};const o={identify:e=>typeof e==="number",default:true,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():s.stringifyNumber(e)}};const a={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new r.Scalar(parseFloat(e.replace(/_/g,"")));const n=e.indexOf(".");if(n!==-1){const r=e.substring(n+1).replace(/_/g,"");if(r[r.length-1]==="0")t.minFractionDigits=r.length}return t},stringify:s.stringifyNumber};t.float=a;t.floatExp=o;t.floatNaN=i},9503:(e,t,n)=>{var r=n(4174);const intIdentify=e=>typeof e==="bigint"||Number.isInteger(e);function intResolve(e,t,n,{intAsBigInt:r}){const s=e[0];if(s==="-"||s==="+")t+=1;e=e.substring(t).replace(/_/g,"");if(r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const t=BigInt(e);return s==="-"?BigInt(-1)*t:t}const i=parseInt(e,n);return s==="-"?-1*i:i}function intStringify(e,t,n){const{value:s}=e;if(intIdentify(s)){const e=s.toString(t);return s<0?"-"+n+e.substr(1):n+e}return r.stringifyNumber(e)}const s={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>intResolve(e,2,2,n),stringify:e=>intStringify(e,2,"0b")};const i={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>intResolve(e,1,8,n),stringify:e=>intStringify(e,8,"0")};const o={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>intResolve(e,0,10,n),stringify:r.stringifyNumber};const a={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>intResolve(e,2,16,n),stringify:e=>intStringify(e,16,"0x")};t.int=o;t.intBin=s;t.intHex=a;t.intOct=i},8974:(e,t,n)=>{var r=n(5589);var s=n(2463);var i=n(6011);var o=n(5161);var a=n(9841);class YAMLOMap 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=YAMLOMap.tag}toJSON(e,t){if(!t)return super.toJSON(e);const n=new Map;if(t?.onCreate)t.onCreate(n);for(const e of this.items){let i,o;if(r.isPair(e)){i=s.toJS(e.key,"",t);o=s.toJS(e.value,i,t)}else{i=s.toJS(e,"",t)}if(n.has(i))throw new Error("Ordered maps must not include duplicate keys");n.set(i,o)}return n}static from(e,t,n){const r=a.createPairs(e,t,n);const s=new this;s.items=r.items;return s}}YAMLOMap.tag="tag:yaml.org,2002:omap";const u={collection:"seq",identify:e=>e instanceof Map,nodeClass:YAMLOMap,default:false,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=a.resolvePairs(e,t);const s=[];for(const{key:e}of n.items){if(r.isScalar(e)){if(s.includes(e.value)){t(`Ordered maps must not include duplicate keys: ${e.value}`)}else{s.push(e.value)}}}return Object.assign(new YAMLOMap,n)},createNode:(e,t,n)=>YAMLOMap.from(e,t,n)};t.YAMLOMap=YAMLOMap;t.omap=u},9841:(e,t,n)=>{var r=n(5589);var s=n(246);var i=n(9338);var o=n(5161);function resolvePairs(e,t){if(r.isSeq(e)){for(let n=0;n<e.items.length;++n){let o=e.items[n];if(r.isPair(o))continue;else if(r.isMap(o)){if(o.items.length>1)t("Each pair must have its own sequence indicator");const e=o.items[0]||new s.Pair(new i.Scalar(null));if(o.commentBefore)e.key.commentBefore=e.key.commentBefore?`${o.commentBefore}\n${e.key.commentBefore}`:o.commentBefore;if(o.comment){const t=e.value??e.key;t.comment=t.comment?`${o.comment}\n${t.comment}`:o.comment}o=e}e.items[n]=r.isPair(o)?o:new s.Pair(o)}}else t("Expected a sequence for this tag");return e}function createPairs(e,t,n){const{replacer:r}=n;const 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){if(typeof r==="function")e=r.call(t,String(a++),e);let o,u;if(Array.isArray(e)){if(e.length===2){o=e[0];u=e[1]}else throw new TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){const t=Object.keys(e);if(t.length===1){o=t[0];u=e[o]}else{throw new TypeError(`Expected tuple with one key, not ${t.length} keys`)}}else{o=e}i.items.push(s.createPair(o,u,n))}return i}const a={collection:"seq",default:false,tag:"tag:yaml.org,2002:pairs",resolve:resolvePairs,createNode:createPairs};t.createPairs=createPairs;t.pairs=a;t.resolvePairs=resolvePairs},5389:(e,t,n)=>{var r=n(83);var s=n(6703);var i=n(1693);var o=n(2201);var a=n(5724);var u=n(2631);var c=n(8035);var l=n(9503);var f=n(8974);var h=n(9841);var p=n(7847);var d=n(1156);const g=[r.map,i.seq,o.string,s.nullTag,u.trueTag,u.falseTag,l.intBin,l.intOct,l.int,l.intHex,c.floatNaN,c.floatExp,c.float,a.binary,f.omap,h.pairs,p.set,d.intTime,d.floatTime,d.timestamp];t.schema=g},7847:(e,t,n)=>{var r=n(5589);var s=n(246);var i=n(6011);class YAMLSet extends i.YAMLMap{constructor(e){super(e);this.tag=YAMLSet.tag}add(e){let t;if(r.isPair(e))t=e;else if(e&&typeof e==="object"&&"key"in e&&"value"in e&&e.value===null)t=new s.Pair(e.key,null);else t=new s.Pair(e,null);const n=i.findPair(this.items,t.key);if(!n)this.items.push(t)}get(e,t){const n=i.findPair(this.items,e);return!t&&r.isPair(n)?r.isScalar(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const n=i.findPair(this.items,e);if(n&&!t){this.items.splice(this.items.indexOf(n),1)}else if(!n&&t){this.items.push(new s.Pair(e))}}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(true))return super.toString(Object.assign({},e,{allNullValues:true}),t,n);else throw new Error("Set items must all have null values")}static from(e,t,n){const{replacer:r}=n;const i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t){if(typeof r==="function")e=r.call(t,e,e);i.items.push(s.createPair(e,null,n))}return i}}YAMLSet.tag="tag:yaml.org,2002:set";const o={collection:"map",identify:e=>e instanceof Set,nodeClass:YAMLSet,default:false,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>YAMLSet.from(e,t,n),resolve(e,t){if(r.isMap(e)){if(e.hasAllNullValues(true))return Object.assign(new YAMLSet,e);else t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};t.YAMLSet=YAMLSet;t.set=o},1156:(e,t,n)=>{var r=n(4174);function parseSexagesimal(e,t){const n=e[0];const r=n==="-"||n==="+"?e.substring(1):e;const num=e=>t?BigInt(e):Number(e);const s=r.replace(/_/g,"").split(":").reduce(((e,t)=>e*num(60)+num(t)),num(0));return n==="-"?num(-1)*s:s}function stringifySexagesimal(e){let{value:t}=e;let num=e=>e;if(typeof t==="bigint")num=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return r.stringifyNumber(e);let n="";if(t<0){n="-";t*=num(-1)}const s=num(60);const i=[t%s];if(t<60){i.unshift(0)}else{t=(t-i[0])/s;i.unshift(t%s);if(t>=60){t=(t-i[0])/s;i.unshift(t)}}return n+i.map((e=>String(e).padStart(2,"0"))).join(":").replace(/000000\d*$/,"")}const s={identify:e=>typeof e==="bigint"||Number.isInteger(e),default:true,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>parseSexagesimal(e,n),stringify:stringifySexagesimal};const i={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>parseSexagesimal(e,false),stringify:stringifySexagesimal};const o={identify:e=>e instanceof Date,default:true,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(o.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,s,i,a,u]=t.map(Number);const c=t[7]?Number((t[7]+"00").substr(1,3)):0;let l=Date.UTC(n,r-1,s,i||0,a||0,u||0,c);const f=t[8];if(f&&f!=="Z"){let e=parseSexagesimal(f,false);if(Math.abs(e)<30)e*=60;l-=6e4*e}return new Date(l)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};t.floatTime=i;t.intTime=s;t.timestamp=o},2889:(e,t)=>{const n="flow";const r="block";const s="quoted";function foldFlowLines(e,t,n="flow",{indentAtStart:i,lineWidth:o=80,minContentWidth:a=20,onFold:u,onOverflow:c}={}){if(!o||o<0)return e;const l=Math.max(1+a,1+o-t.length);if(e.length<=l)return e;const f=[];const h={};let p=o-t.length;if(typeof i==="number"){if(i>o-Math.max(2,a))f.push(0);else p=o-i}let d=undefined;let g=undefined;let y=false;let b=-1;let v=-1;let w=-1;if(n===r){b=consumeMoreIndentedLines(e,b);if(b!==-1)p=b+l}for(let t;t=e[b+=1];){if(n===s&&t==="\\"){v=b;switch(e[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}w=b}if(t==="\n"){if(n===r)b=consumeMoreIndentedLines(e,b);p=b+l;d=undefined}else{if(t===" "&&g&&g!==" "&&g!=="\n"&&g!=="\t"){const t=e[b+1];if(t&&t!==" "&&t!=="\n"&&t!=="\t")d=b}if(b>=p){if(d){f.push(d);p=d+l;d=undefined}else if(n===s){while(g===" "||g==="\t"){g=t;t=e[b+=1];y=true}const n=b>w+1?b-2:v-1;if(h[n])return e;f.push(n);h[n]=true;p=n+l;d=undefined}else{y=true}}}g=t}if(y&&c)c();if(f.length===0)return e;if(u)u();let S=e.slice(0,f[0]);for(let r=0;r<f.length;++r){const i=f[r];const o=f[r+1]||e.length;if(i===0)S=`\n${t}${e.slice(0,o)}`;else{if(n===s&&h[i])S+=`${e[i]}\\`;S+=`\n${t}${e.slice(i+1,o)}`}}return S}function consumeMoreIndentedLines(e,t){let n=e[t+1];while(n===" "||n==="\t"){do{n=e[t+=1]}while(n&&n!=="\n");n=e[t+1]}return t}t.FOLD_BLOCK=r;t.FOLD_FLOW=n;t.FOLD_QUOTED=s;t.foldFlowLines=foldFlowLines},8409:(e,t,n)=>{var r=n(8459);var s=n(5589);var i=n(5182);var o=n(6226);function createStringifyContext(e,t){const n=Object.assign({blockQuote:true,commentString:i.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:false,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:true,indentSeq:true,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:false,singleQuote:null,trueStr:"true",verifyAliasOrder:true},e.schema.toStringOptions,t);let r;switch(n.collectionStyle){case"block":r=false;break;case"flow":r=true;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent==="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function getTagObject(e,t){if(t.tag){const n=e.filter((e=>e.tag===t.tag));if(n.length>0)return n.find((e=>e.format===t.format))??n[0]}let n=undefined;let r;if(s.isScalar(t)){r=t.value;const s=e.filter((e=>e.identify?.(r)));n=s.find((e=>e.format===t.format))??s.find((e=>!e.format))}else{r=t;n=e.find((e=>e.nodeClass&&r instanceof e.nodeClass))}if(!n){const e=r?.constructor?.name??typeof r;throw new Error(`Tag not resolved for ${e} value`)}return n}function stringifyProps(e,t,{anchors:n,doc:i}){if(!i.directives)return"";const o=[];const a=(s.isScalar(e)||s.isCollection(e))&&e.anchor;if(a&&r.anchorIsValid(a)){n.add(a);o.push(`&${a}`)}const u=e.tag?e.tag:t.default?null:t.tag;if(u)o.push(i.directives.tagString(u));return o.join(" ")}function stringify(e,t,n,r){if(s.isPair(e))return e.toString(t,n,r);if(s.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`)}else{if(t.resolvedAliases)t.resolvedAliases.add(e);else t.resolvedAliases=new Set([e]);e=e.resolve(t.doc)}}let i=undefined;const a=s.isNode(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});if(!i)i=getTagObject(t.doc.schema.tags,a);const u=stringifyProps(a,i,t);if(u.length>0)t.indentAtStart=(t.indentAtStart??0)+u.length+1;const c=typeof i.stringify==="function"?i.stringify(a,t,n,r):s.isScalar(a)?o.stringifyString(a,t,n,r):a.toString(t,n,r);if(!u)return c;return s.isScalar(a)||c[0]==="{"||c[0]==="["?`${u} ${c}`:`${u}\n${t.indent}${c}`}t.createStringifyContext=createStringifyContext;t.stringify=stringify},2466:(e,t,n)=>{var r=n(3466);var s=n(5589);var i=n(8409);var o=n(5182);function stringifyCollection(e,t,n){const r=t.inFlow??e.flow;const s=r?stringifyFlowCollection:stringifyBlockCollection;return s(e,t,n)}function stringifyBlockCollection({comment:e,items:t},n,{blockItemPrefix:r,flowChars:a,itemIndent:u,onChompKeep:c,onComment:l}){const{indent:f,options:{commentString:h}}=n;const p=Object.assign({},n,{indent:u,type:null});let d=false;const g=[];for(let e=0;e<t.length;++e){const a=t[e];let c=null;if(s.isNode(a)){if(!d&&a.spaceBefore)g.push("");addCommentBefore(n,g,a.commentBefore,d);if(a.comment)c=a.comment}else if(s.isPair(a)){const e=s.isNode(a.key)?a.key:null;if(e){if(!d&&e.spaceBefore)g.push("");addCommentBefore(n,g,e.commentBefore,d)}}d=false;let l=i.stringify(a,p,(()=>c=null),(()=>d=true));if(c)l+=o.lineComment(l,u,h(c));if(d&&c)d=false;g.push(r+l)}let y;if(g.length===0){y=a.start+a.end}else{y=g[0];for(let e=1;e<g.length;++e){const t=g[e];y+=t?`\n${f}${t}`:"\n"}}if(e){y+="\n"+o.indentComment(h(e),f);if(l)l()}else if(d&&c)c();return y}function stringifyFlowCollection({comment:e,items:t},n,{flowChars:a,itemIndent:u,onComment:c}){const{indent:l,indentStep:f,flowCollectionPadding:h,options:{commentString:p}}=n;u+=f;const d=Object.assign({},n,{indent:u,inFlow:true,type:null});let g=false;let y=0;const b=[];for(let e=0;e<t.length;++e){const r=t[e];let a=null;if(s.isNode(r)){if(r.spaceBefore)b.push("");addCommentBefore(n,b,r.commentBefore,false);if(r.comment)a=r.comment}else if(s.isPair(r)){const e=s.isNode(r.key)?r.key:null;if(e){if(e.spaceBefore)b.push("");addCommentBefore(n,b,e.commentBefore,false);if(e.comment)g=true}const t=s.isNode(r.value)?r.value:null;if(t){if(t.comment)a=t.comment;if(t.commentBefore)g=true}else if(r.value==null&&e?.comment){a=e.comment}}if(a)g=true;let c=i.stringify(r,d,(()=>a=null));if(e<t.length-1)c+=",";if(a)c+=o.lineComment(c,u,p(a));if(!g&&(b.length>y||c.includes("\n")))g=true;b.push(c);y=b.length}let v;const{start:w,end:S}=a;if(b.length===0){v=w+S}else{if(!g){const e=b.reduce(((e,t)=>e+t.length+2),2);g=e>r.Collection.maxFlowStringSingleLineLength}if(g){v=w;for(const e of b)v+=e?`\n${f}${l}${e}`:"\n";v+=`\n${l}${S}`}else{v=`${w}${h}${b.join(" ")}${h}${S}`}}if(e){v+=o.lineComment(v,l,p(e));if(c)c()}return v}function addCommentBefore({indent:e,options:{commentString:t}},n,r,s){if(r&&s)r=r.replace(/^\n+/,"");if(r){const s=o.indentComment(t(r),e);n.push(s.trimStart())}}t.stringifyCollection=stringifyCollection},5182:(e,t)=>{const stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function indentComment(e,t){if(/^\n+$/.test(e))return e.substring(1);return t?e.replace(/^(?! *$)/gm,t):e}const lineComment=(e,t,n)=>e.endsWith("\n")?indentComment(n,t):n.includes("\n")?"\n"+indentComment(n,t):(e.endsWith(" ")?"":" ")+n;t.indentComment=indentComment;t.lineComment=lineComment;t.stringifyComment=stringifyComment},5225:(e,t,n)=>{var r=n(5589);var s=n(8409);var i=n(5182);function stringifyDocument(e,t){const n=[];let o=t.directives===true;if(t.directives!==false&&e.directives){const t=e.directives.toString(e);if(t){n.push(t);o=true}else if(e.directives.docStart)o=true}if(o)n.push("---");const a=s.createStringifyContext(e,t);const{commentString:u}=a.options;if(e.commentBefore){if(n.length!==1)n.unshift("");const t=u(e.commentBefore);n.unshift(i.indentComment(t,""))}let c=false;let l=null;if(e.contents){if(r.isNode(e.contents)){if(e.contents.spaceBefore&&o)n.push("");if(e.contents.commentBefore){const t=u(e.contents.commentBefore);n.push(i.indentComment(t,""))}a.forceBlockIndent=!!e.comment;l=e.contents.comment}const t=l?undefined:()=>c=true;let f=s.stringify(e.contents,a,(()=>l=null),t);if(l)f+=i.lineComment(f,"",u(l));if((f[0]==="|"||f[0]===">")&&n[n.length-1]==="---"){n[n.length-1]=`--- ${f}`}else n.push(f)}else{n.push(s.stringify(e.contents,a))}if(e.directives?.docEnd){if(e.comment){const t=u(e.comment);if(t.includes("\n")){n.push("...");n.push(i.indentComment(t,""))}else{n.push(`... ${t}`)}}else{n.push("...")}}else{let t=e.comment;if(t&&c)t=t.replace(/^\n+/,"");if(t){if((!c||l)&&n[n.length-1]!=="")n.push("");n.push(i.indentComment(u(t),""))}}return n.join("\n")+"\n"}t.stringifyDocument=stringifyDocument},4174:(e,t)=>{function stringifyNumber({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==="bigint")return String(r);const s=typeof r==="number"?r:Number(r);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let i=JSON.stringify(r);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(i)){let e=i.indexOf(".");if(e<0){e=i.length;i+="."}let n=t-(i.length-e-1);while(n-- >0)i+="0"}return i}t.stringifyNumber=stringifyNumber},4875:(e,t,n)=>{var r=n(5589);var s=n(9338);var i=n(8409);var o=n(5182);function stringifyPair({key:e,value:t},n,a,u){const{allNullValues:c,doc:l,indent:f,indentStep:h,options:{commentString:p,indentSeq:d,simpleKeys:g}}=n;let y=r.isNode(e)&&e.comment||null;if(g){if(y){throw new Error("With simple keys, key nodes cannot have comments")}if(r.isCollection(e)){const e="With simple keys, collection cannot be used as a key value";throw new Error(e)}}let b=!g&&(!e||y&&t==null&&!n.inFlow||r.isCollection(e)||(r.isScalar(e)?e.type===s.Scalar.BLOCK_FOLDED||e.type===s.Scalar.BLOCK_LITERAL:typeof e==="object"));n=Object.assign({},n,{allNullValues:false,implicitKey:!b&&(g||!c),indent:f+h});let v=false;let w=false;let S=i.stringify(e,n,(()=>v=true),(()=>w=true));if(!b&&!n.inFlow&&S.length>1024){if(g)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");b=true}if(n.inFlow){if(c||t==null){if(v&&a)a();return S===""?"?":b?`? ${S}`:S}}else if(c&&!g||t==null&&b){S=`? ${S}`;if(y&&!v){S+=o.lineComment(S,n.indent,p(y))}else if(w&&u)u();return S}if(v)y=null;if(b){if(y)S+=o.lineComment(S,n.indent,p(y));S=`? ${S}\n${f}:`}else{S=`${S}:`;if(y)S+=o.lineComment(S,n.indent,p(y))}let A,E,D;if(r.isNode(t)){A=!!t.spaceBefore;E=t.commentBefore;D=t.comment}else{A=false;E=null;D=null;if(t&&typeof t==="object")t=l.createNode(t)}n.implicitKey=false;if(!b&&!y&&r.isScalar(t))n.indentAtStart=S.length+1;w=false;if(!d&&h.length>=2&&!n.inFlow&&!b&&r.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor){n.indent=n.indent.substring(2)}let C=false;const _=i.stringify(t,n,(()=>C=true),(()=>w=true));let k=" ";if(y||A||E){k=A?"\n":"";if(E){const e=p(E);k+=`\n${o.indentComment(e,n.indent)}`}if(_===""&&!n.inFlow){if(k==="\n")k="\n\n"}else{k+=`\n${n.indent}`}}else if(!b&&r.isCollection(t)){const e=_[0];const r=_.indexOf("\n");const s=r!==-1;const i=n.inFlow??t.flow??t.items.length===0;if(s||!i){let t=false;if(s&&(e==="&"||e==="!")){let n=_.indexOf(" ");if(e==="&"&&n!==-1&&n<r&&_[n+1]==="!"){n=_.indexOf(" ",n+1)}if(n===-1||r<n)t=true}if(!t)k=`\n${n.indent}`}}else if(_===""||_[0]==="\n"){k=""}S+=k+_;if(n.inFlow){if(C&&a)a()}else if(D&&!C){S+=o.lineComment(S,n.indent,p(D))}else if(w&&u){u()}return S}t.stringifyPair=stringifyPair},6226:(e,t,n)=>{var r=n(9338);var s=n(2889);const getFoldOptions=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth});const containsDocumentMarker=e=>/^(%|---|\.\.\.)/m.test(e);function lineLengthOverLimit(e,t,n){if(!t||t<0)return false;const r=t-n;const s=e.length;if(s<=r)return false;for(let t=0,n=0;t<s;++t){if(e[t]==="\n"){if(t-n>r)return true;n=t+1;if(s-n<=r)return false}}return true}function doubleQuotedString(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=t;const i=t.options.doubleQuotedMinMultiLineLength;const o=t.indent||(containsDocumentMarker(e)?" ":"");let a="";let u=0;for(let e=0,t=n[e];t;t=n[++e]){if(t===" "&&n[e+1]==="\\"&&n[e+2]==="n"){a+=n.slice(u,e)+"\\ ";e+=1;u=e;t="\\"}if(t==="\\")switch(n[e+1]){case"u":{a+=n.slice(u,e);const t=n.substr(e+2,4);switch(t){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:if(t.substr(0,2)==="00")a+="\\x"+t.substr(2);else a+=n.substr(e,6)}e+=5;u=e+1}break;case"n":if(r||n[e+2]==='"'||n.length<i){e+=1}else{a+=n.slice(u,e)+"\n\n";while(n[e+2]==="\\"&&n[e+3]==="n"&&n[e+4]!=='"'){a+="\n";e+=2}a+=o;if(n[e+2]===" ")a+="\\";e+=1;u=e+1}break;default:e+=1}}a=u?a+n.slice(u):n;return r?a:s.foldFlowLines(a,o,s.FOLD_QUOTED,getFoldOptions(t,false))}function singleQuotedString(e,t){if(t.options.singleQuote===false||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return doubleQuotedString(e,t);const n=t.indent||(containsDocumentMarker(e)?" ":"");const r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${n}`)+"'";return t.implicitKey?r:s.foldFlowLines(r,n,s.FOLD_FLOW,getFoldOptions(t,false))}function quotedString(e,t){const{singleQuote:n}=t.options;let r;if(n===false)r=doubleQuotedString;else{const t=e.includes('"');const s=e.includes("'");if(t&&!s)r=singleQuotedString;else if(s&&!t)r=doubleQuotedString;else r=n?singleQuotedString:doubleQuotedString}return r(e,t)}let i;try{i=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{i=/\n+(?!\n|$)/g}function blockString({comment:e,type:t,value:n},o,a,u){const{blockQuote:c,commentString:l,lineWidth:f}=o.options;if(!c||/\n[\t ]+$/.test(n)||/^\s*$/.test(n)){return quotedString(n,o)}const h=o.indent||(o.forceBlockIndent||containsDocumentMarker(n)?" ":"");const p=c==="literal"?true:c==="folded"||t===r.Scalar.BLOCK_FOLDED?false:t===r.Scalar.BLOCK_LITERAL?true:!lineLengthOverLimit(n,f,h.length);if(!n)return p?"|\n":">\n";let d;let g;for(g=n.length;g>0;--g){const e=n[g-1];if(e!=="\n"&&e!=="\t"&&e!==" ")break}let y=n.substring(g);const b=y.indexOf("\n");if(b===-1){d="-"}else if(n===y||b!==y.length-1){d="+";if(u)u()}else{d=""}if(y){n=n.slice(0,-y.length);if(y[y.length-1]==="\n")y=y.slice(0,-1);y=y.replace(i,`$&${h}`)}let v=false;let w;let S=-1;for(w=0;w<n.length;++w){const e=n[w];if(e===" ")v=true;else if(e==="\n")S=w;else break}let A=n.substring(0,S<w?S+1:w);if(A){n=n.substring(A.length);A=A.replace(/\n+/g,`$&${h}`)}const E=h?"2":"1";let D=(p?"|":">")+(v?E:"")+d;if(e){D+=" "+l(e.replace(/ ?[\r\n]+/g," "));if(a)a()}if(p){n=n.replace(/\n+/g,`$&${h}`);return`${D}\n${h}${A}${n}${y}`}n=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${h}`);const C=s.foldFlowLines(`${A}${n}${y}`,h,s.FOLD_BLOCK,getFoldOptions(o,true));return`${D}\n${h}${C}`}function plainString(e,t,n,i){const{type:o,value:a}=e;const{actualString:u,implicitKey:c,indent:l,indentStep:f,inFlow:h}=t;if(c&&a.includes("\n")||h&&/[[\]{},]/.test(a)){return quotedString(a,t)}if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a)){return c||h||!a.includes("\n")?quotedString(a,t):blockString(e,t,n,i)}if(!c&&!h&&o!==r.Scalar.PLAIN&&a.includes("\n")){return blockString(e,t,n,i)}if(containsDocumentMarker(a)){if(l===""){t.forceBlockIndent=true;return blockString(e,t,n,i)}else if(c&&l===f){return quotedString(a,t)}}const p=a.replace(/\n+/g,`$&\n${l}`);if(u){const test=e=>e.default&&e.tag!=="tag:yaml.org,2002:str"&&e.test?.test(p);const{compat:e,tags:n}=t.doc.schema;if(n.some(test)||e?.some(test))return quotedString(a,t)}return c?p:s.foldFlowLines(p,l,s.FOLD_FLOW,getFoldOptions(t,false))}function stringifyString(e,t,n,s){const{implicitKey:i,inFlow:o}=t;const a=typeof e.value==="string"?e:Object.assign({},e,{value:String(e.value)});let{type:u}=e;if(u!==r.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value))u=r.Scalar.QUOTE_DOUBLE}const _stringify=e=>{switch(e){case r.Scalar.BLOCK_FOLDED:case r.Scalar.BLOCK_LITERAL:return i||o?quotedString(a.value,t):blockString(a,t,n,s);case r.Scalar.QUOTE_DOUBLE:return doubleQuotedString(a.value,t);case r.Scalar.QUOTE_SINGLE:return singleQuotedString(a.value,t);case r.Scalar.PLAIN:return plainString(a,t,n,s);default:return null}};let c=_stringify(u);if(c===null){const{defaultKeyType:e,defaultStringType:n}=t.options;const r=i&&e||n;c=_stringify(r);if(c===null)throw new Error(`Unsupported default string type ${r}`)}return c}t.stringifyString=stringifyString},6796:(e,t,n)=>{var r=n(5589);const s=Symbol("break visit");const i=Symbol("skip children");const o=Symbol("remove node");function visit(e,t){const n=initVisitor(t);if(r.isDocument(e)){const t=visit_(null,e.contents,n,Object.freeze([e]));if(t===o)e.contents=null}else visit_(null,e,n,Object.freeze([]))}visit.BREAK=s;visit.SKIP=i;visit.REMOVE=o;function visit_(e,t,n,i){const a=callVisitor(e,t,n,i);if(r.isNode(a)||r.isPair(a)){replaceNode(e,i,a);return visit_(e,a,n,i)}if(typeof a!=="symbol"){if(r.isCollection(t)){i=Object.freeze(i.concat(t));for(let e=0;e<t.items.length;++e){const r=visit_(e,t.items[e],n,i);if(typeof r==="number")e=r-1;else if(r===s)return s;else if(r===o){t.items.splice(e,1);e-=1}}}else if(r.isPair(t)){i=Object.freeze(i.concat(t));const e=visit_("key",t.key,n,i);if(e===s)return s;else if(e===o)t.key=null;const r=visit_("value",t.value,n,i);if(r===s)return s;else if(r===o)t.value=null}}return a}async function visitAsync(e,t){const n=initVisitor(t);if(r.isDocument(e)){const t=await visitAsync_(null,e.contents,n,Object.freeze([e]));if(t===o)e.contents=null}else await visitAsync_(null,e,n,Object.freeze([]))}visitAsync.BREAK=s;visitAsync.SKIP=i;visitAsync.REMOVE=o;async function visitAsync_(e,t,n,i){const a=await callVisitor(e,t,n,i);if(r.isNode(a)||r.isPair(a)){replaceNode(e,i,a);return visitAsync_(e,a,n,i)}if(typeof a!=="symbol"){if(r.isCollection(t)){i=Object.freeze(i.concat(t));for(let e=0;e<t.items.length;++e){const r=await visitAsync_(e,t.items[e],n,i);if(typeof r==="number")e=r-1;else if(r===s)return s;else if(r===o){t.items.splice(e,1);e-=1}}}else if(r.isPair(t)){i=Object.freeze(i.concat(t));const e=await visitAsync_("key",t.key,n,i);if(e===s)return s;else if(e===o)t.key=null;const r=await visitAsync_("value",t.value,n,i);if(r===s)return s;else if(r===o)t.value=null}}return a}function initVisitor(e){if(typeof e==="object"&&(e.Collection||e.Node||e.Value)){return 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)}return e}function callVisitor(e,t,n,s){if(typeof n==="function")return n(e,t,s);if(r.isMap(t))return n.Map?.(e,t,s);if(r.isSeq(t))return n.Seq?.(e,t,s);if(r.isPair(t))return n.Pair?.(e,t,s);if(r.isScalar(t))return n.Scalar?.(e,t,s);if(r.isAlias(t))return n.Alias?.(e,t,s);return undefined}function replaceNode(e,t,n){const s=t[t.length-1];if(r.isCollection(s)){s.items[e]=n}else if(r.isPair(s)){if(e==="key")s.key=n;else s.value=n}else if(r.isDocument(s)){s.contents=n}else{const e=r.isAlias(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${e} parent`)}}t.visit=visit;t.visitAsync=visitAsync},2598:e=>{e.exports=JSON.parse('{"name":"create-expo-nightly","version":"0.0.4","license":"MIT","description":"A tool to create an Expo app for react-native nightlies testing","keywords":["expo","nightlies","react-native","testing"],"bin":{"create-expo-nightly":"build/index.js"},"main":"build/index.js","type":"module","files":["build"],"scripts":{"build":"ncc build ./src/index.ts -o build/","build:prod":"ncc build ./src/index.ts -o build/ --minify --no-cache --no-source-map-register","clean":"expo-module clean","lint":"expo-module lint","prepare":"expo-module clean && ncc build ./src/index.ts -o build/ --minify --no-cache --no-source-map-register","prepublishOnly":"expo-module prepublishOnly","test":"expo-module test","typecheck":"expo-module typecheck","watch":"ncc build ./src/index.ts -o build/ --watch"},"homepage":"https://github.com/expo/expo/tree/main/packages/create-expo-nightly#readme","bugs":{"url":"https://github.com/expo/expo/issues"},"repository":{"url":"git+https://github.com/expo/expo.git","directory":"packages/create-expo-nightly"},"devDependencies":{"@expo/json-file":"^8.2.37","@tsconfig/node20":"^20.1.2","@vercel/ncc":"^0.38.0","chalk":"^5.3.0","commander":"^11.1.0","expo-module-scripts":"^3.4.0","fs-extra":"^11.2.0","glob":"^10.3.10","zx":"^7.2.3"}}')}};var n={};function __nccwpck_require__(e){var r=n[e];if(r!==undefined){return r.exports}var s=n[e]={id:e,loaded:false,exports:{}};var i=true;try{t[e].call(s.exports,s,s.exports,__nccwpck_require__);i=false}finally{if(i)delete n[e]}s.loaded=true;return s.exports}(()=>{__nccwpck_require__.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;__nccwpck_require__.d(t,{a:t});return t}})();(()=>{var e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;var t;__nccwpck_require__.t=function(n,r){if(r&1)n=this(n);if(r&8)return n;if(typeof n==="object"&&n){if(r&4&&n.__esModule)return n;if(r&16&&typeof n.then==="function")return n}var s=Object.create(null);__nccwpck_require__.r(s);var i={};t=t||[null,e({}),e([]),e(e)];for(var o=r&2&&n;typeof o=="object"&&!~t.indexOf(o);o=e(o)){Object.getOwnPropertyNames(o).forEach((e=>i[e]=()=>n[e]))}i["default"]=()=>n;__nccwpck_require__.d(s,i);return s}})();(()=>{__nccwpck_require__.d=(e,t)=>{for(var n in t){if(__nccwpck_require__.o(t,n)&&!__nccwpck_require__.o(e,n)){Object.defineProperty(e,n,{enumerable:true,get:t[n]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();(()=>{__nccwpck_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=new URL(".",import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/)?1:0,-1)+"/";var r={};(()=>{var t={};__nccwpck_require__.r(t);__nccwpck_require__.d(t,{generateGlobTasks:()=>En,generateGlobTasksSync:()=>Dn,globby:()=>vn,globbyStream:()=>Sn,globbySync:()=>wn,isDynamicPattern:()=>An,isGitIgnored:()=>isGitIgnored,isGitIgnoredSync:()=>isGitIgnoredSync});const n=e(import.meta.url)("node:url");globalThis.__filename=(0,n.fileURLToPath)(import.meta.url);const r=10;const wrapAnsi16=(e=0)=>t=>`[${t+e}m`;const wrapAnsi256=(e=0)=>t=>`[${38+e};5;${t}m`;const wrapAnsi16m=(e=0)=>(t,n,r)=>`[${38+e};2;${t};${n};${r}m`;const s={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]}};const i=Object.keys(s.modifier);const o=Object.keys(s.color);const a=Object.keys(s.bgColor);const u=[...o,...a];function assembleStyles(){const e=new Map;for(const[t,n]of Object.entries(s)){for(const[t,r]of Object.entries(n)){s[t]={open:`[${r[0]}m`,close:`[${r[1]}m`};n[t]=s[t];e.set(r[0],r[1])}Object.defineProperty(s,t,{value:n,enumerable:false})}Object.defineProperty(s,"codes",{value:e,enumerable:false});s.color.close="[39m";s.bgColor.close="[49m";s.color.ansi=wrapAnsi16();s.color.ansi256=wrapAnsi256();s.color.ansi16m=wrapAnsi16m();s.bgColor.ansi=wrapAnsi16(r);s.bgColor.ansi256=wrapAnsi256(r);s.bgColor.ansi16m=wrapAnsi16m(r);Object.defineProperties(s,{rgbToAnsi256:{value(e,t,n){if(e===t&&t===n){if(e<8){return 16}if(e>248){return 231}return Math.round((e-8)/247*24)+232}return 16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:false},hexToRgb:{value(e){const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t){return[0,0,0]}let[n]=t;if(n.length===3){n=[...n].map((e=>e+e)).join("")}const r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:false},hexToAnsi256:{value:e=>s.rgbToAnsi256(...s.hexToRgb(e)),enumerable:false},ansi256ToAnsi:{value(e){if(e<8){return 30+e}if(e<16){return 90+(e-8)}let t;let n;let r;if(e>=232){t=((e-232)*10+8)/255;n=t;r=t}else{e-=16;const s=e%36;t=Math.floor(e/36)/5;n=Math.floor(s/6)/5;r=s%6/5}const s=Math.max(t,n,r)*2;if(s===0){return 30}let i=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));if(s===2){i+=60}return i},enumerable:false},rgbToAnsi:{value:(e,t,n)=>s.ansi256ToAnsi(s.rgbToAnsi256(e,t,n)),enumerable:false},hexToAnsi:{value:e=>s.ansi256ToAnsi(s.hexToAnsi256(e)),enumerable:false}});return s}const c=assembleStyles();const l=c;const f=e(import.meta.url)("node:process");const h=e(import.meta.url)("node:os");const p=e(import.meta.url)("node:tty");function hasFlag(e,t=(globalThis.Deno?globalThis.Deno.args:f.argv)){const n=e.startsWith("-")?"":e.length===1?"-":"--";const r=t.indexOf(n+e);const s=t.indexOf("--");return r!==-1&&(s===-1||r<s)}const{env:d}=f;let g;if(hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")||hasFlag("color=never")){g=0}else if(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always")){g=1}function envForceColor(){if("FORCE_COLOR"in d){if(d.FORCE_COLOR==="true"){return 1}if(d.FORCE_COLOR==="false"){return 0}return d.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(d.FORCE_COLOR,10),3)}}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function _supportsColor(e,{streamIsTTY:t,sniffFlags:n=true}={}){const r=envForceColor();if(r!==undefined){g=r}const s=n?g:r;if(s===0){return 0}if(n){if(hasFlag("color=16m")||hasFlag("color=full")||hasFlag("color=truecolor")){return 3}if(hasFlag("color=256")){return 2}}if("TF_BUILD"in d&&"AGENT_NAME"in d){return 1}if(e&&!t&&s===undefined){return 0}const i=s||0;if(d.TERM==="dumb"){return i}if(f.platform==="win32"){const e=h.release().split(".");if(Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in d){if("GITHUB_ACTIONS"in d||"GITEA_ACTIONS"in d){return 3}if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((e=>e in d))||d.CI_NAME==="codeship"){return 1}return i}if("TEAMCITY_VERSION"in d){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(d.TEAMCITY_VERSION)?1:0}if(d.COLORTERM==="truecolor"){return 3}if(d.TERM==="xterm-kitty"){return 3}if("TERM_PROGRAM"in d){const e=Number.parseInt((d.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(d.TERM_PROGRAM){case"iTerm.app":{return e>=3?3:2}case"Apple_Terminal":{return 2}}}if(/-256(color)?$/i.test(d.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(d.TERM)){return 1}if("COLORTERM"in d){return 1}return i}function createSupportsColor(e,t={}){const n=_supportsColor(e,{streamIsTTY:e&&e.isTTY,...t});return translateLevel(n)}const y={stdout:createSupportsColor({isTTY:p.isatty(1)}),stderr:createSupportsColor({isTTY:p.isatty(2)})};const b=y;function stringReplaceAll(e,t,n){let r=e.indexOf(t);if(r===-1){return e}const s=t.length;let i=0;let o="";do{o+=e.slice(i,r)+t+n;i=r+s;r=e.indexOf(t,i)}while(r!==-1);o+=e.slice(i);return o}function stringEncaseCRLFWithFirstIndex(e,t,n,r){let s=0;let i="";do{const o=e[r-1]==="\r";i+=e.slice(s,o?r-1:r)+t+(o?"\r\n":"\n")+n;s=r+1;r=e.indexOf("\n",s)}while(r!==-1);i+=e.slice(s);return i}const{stdout:v,stderr:w}=b;const S=Symbol("GENERATOR");const A=Symbol("STYLER");const E=Symbol("IS_EMPTY");const D=["ansi","ansi","ansi256","ansi16m"];const C=Object.create(null);const applyOptions=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3)){throw new Error("The `level` option should be an integer from 0 to 3")}const n=v?v.level:0;e.level=t.level===undefined?n:t.level};class Chalk{constructor(e){return chalkFactory(e)}}const chalkFactory=e=>{const chalk=(...e)=>e.join(" ");applyOptions(chalk,e);Object.setPrototypeOf(chalk,createChalk.prototype);return chalk};function createChalk(e){return chalkFactory(e)}Object.setPrototypeOf(createChalk.prototype,Function.prototype);for(const[e,t]of Object.entries(l)){C[e]={get(){const n=createBuilder(this,createStyler(t.open,t.close,this[A]),this[E]);Object.defineProperty(this,e,{value:n});return n}}}C.visible={get(){const e=createBuilder(this,this[A],true);Object.defineProperty(this,"visible",{value:e});return e}};const getModelAnsi=(e,t,n,...r)=>{if(e==="rgb"){if(t==="ansi16m"){return l[n].ansi16m(...r)}if(t==="ansi256"){return l[n].ansi256(l.rgbToAnsi256(...r))}return l[n].ansi(l.rgbToAnsi(...r))}if(e==="hex"){return getModelAnsi("rgb",t,n,...l.hexToRgb(...r))}return l[n][e](...r)};const _=["rgb","hex","ansi256"];for(const e of _){C[e]={get(){const{level:t}=this;return function(...n){const r=createStyler(getModelAnsi(e,D[t],"color",...n),l.color.close,this[A]);return createBuilder(this,r,this[E])}}};const t="bg"+e[0].toUpperCase()+e.slice(1);C[t]={get(){const{level:t}=this;return function(...n){const r=createStyler(getModelAnsi(e,D[t],"bgColor",...n),l.bgColor.close,this[A]);return createBuilder(this,r,this[E])}}}}const k=Object.defineProperties((()=>{}),{...C,level:{enumerable:true,get(){return this[S].level},set(e){this[S].level=e}}});const createStyler=(e,t,n)=>{let r;let s;if(n===undefined){r=e;s=t}else{r=n.openAll+e;s=t+n.closeAll}return{open:e,close:t,openAll:r,closeAll:s,parent:n}};const createBuilder=(e,t,n)=>{const builder=(...e)=>applyStyle(builder,e.length===1?""+e[0]:e.join(" "));Object.setPrototypeOf(builder,k);builder[S]=e;builder[A]=t;builder[E]=n;return builder};const applyStyle=(e,t)=>{if(e.level<=0||!t){return e[E]?"":t}let n=e[A];if(n===undefined){return t}const{openAll:r,closeAll:s}=n;if(t.includes("")){while(n!==undefined){t=stringReplaceAll(t,n.close,n.open);n=n.parent}}const i=t.indexOf("\n");if(i!==-1){t=stringEncaseCRLFWithFirstIndex(t,s,r,i)}return r+t+s};Object.defineProperties(createChalk.prototype,C);const F=createChalk();const x=createChalk({level:w?w.level:0});const O=F;var P=__nccwpck_require__(4379);const{program:T,createCommand:B,createArgument:N,createOption:R,CommanderError:L,InvalidArgumentError:M,InvalidOptionArgumentError:I,Command:j,Argument:H,Option:W,Help:q}=P;const U=e(import.meta.url)("node:path");var G=__nccwpck_require__.n(U);var V=__nccwpck_require__(9090);var K=__nccwpck_require__.n(V);var z=__nccwpck_require__(5630);var Y=__nccwpck_require__.n(z);const J=e(import.meta.url)("fs/promises");var Q=__nccwpck_require__.n(J);var X=__nccwpck_require__(3717);const Z=1024*64;const assertValidPattern=e=>{if(typeof e!=="string"){throw new TypeError("invalid pattern")}if(e.length>Z){throw new TypeError("pattern is too long")}};const ee={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",true],"[:alpha:]":["\\p{L}\\p{Nl}",true],"[:ascii:]":["\\x"+"00-\\x"+"7f",false],"[:blank:]":["\\p{Zs}\\t",true],"[:cntrl:]":["\\p{Cc}",true],"[:digit:]":["\\p{Nd}",true],"[:graph:]":["\\p{Z}\\p{C}",true,true],"[:lower:]":["\\p{Ll}",true],"[:print:]":["\\p{C}",true],"[:punct:]":["\\p{P}",true],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",true],"[:upper:]":["\\p{Lu}",true],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",true],"[:xdigit:]":["A-Fa-f0-9",false]};const braceEscape=e=>e.replace(/[[\]\\-]/g,"\\$&");const regexpEscape=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const rangesToString=e=>e.join("");const parseClass=(e,t)=>{const n=t;if(e.charAt(n)!=="["){throw new Error("not in a brace expression")}const r=[];const s=[];let i=n+1;let o=false;let a=false;let u=false;let c=false;let l=n;let f="";e:while(i<e.length){const t=e.charAt(i);if((t==="!"||t==="^")&&i===n+1){c=true;i++;continue}if(t==="]"&&o&&!u){l=i+1;break}o=true;if(t==="\\"){if(!u){u=true;i++;continue}}if(t==="["&&!u){for(const[t,[o,u,c]]of Object.entries(ee)){if(e.startsWith(t,i)){if(f){return["$.",false,e.length-n,true]}i+=t.length;if(c)s.push(o);else r.push(o);a=a||u;continue e}}}u=false;if(f){if(t>f){r.push(braceEscape(f)+"-"+braceEscape(t))}else if(t===f){r.push(braceEscape(t))}f="";i++;continue}if(e.startsWith("-]",i+1)){r.push(braceEscape(t+"-"));i+=2;continue}if(e.startsWith("-",i+1)){f=t;i+=2;continue}r.push(braceEscape(t));i++}if(l<i){return["",false,0,false]}if(!r.length&&!s.length){return["$.",false,e.length-n,true]}if(s.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!c){const e=r[0].length===2?r[0].slice(-1):r[0];return[regexpEscape(e),false,l-n,false]}const h="["+(c?"^":"")+rangesToString(r)+"]";const p="["+(c?"":"^")+rangesToString(s)+"]";const d=r.length&&s.length?"("+h+"|"+p+")":r.length?h:p;return[d,a,l-n,true]};const unescape_unescape=(e,{windowsPathsNoEscape:t=false}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");const te=new Set(["!","?","+","*","@"]);const isExtglobType=e=>te.has(e);const ne="(?!(?:^|/)\\.\\.?(?:$|/))";const re="(?!\\.)";const se=new Set(["[","."]);const ie=new Set(["..","."]);const oe=new Set("().*{}+?[]^$\\!");const regExpEscape=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const ae="[^/]";const ue=ae+"*?";const ce=ae+"+?";class AST{type;#e;#t;#n=false;#r=[];#s;#i;#o;#a=false;#u;#c;#l=false;constructor(e,t,n={}){this.type=e;if(e)this.#t=true;this.#s=t;this.#e=this.#s?this.#s.#e:this;this.#u=this.#e===this?n:this.#e.#u;this.#o=this.#e===this?[]:this.#e.#o;if(e==="!"&&!this.#e.#a)this.#o.push(this);this.#i=this.#s?this.#s.#r.length:0}get hasMagic(){if(this.#t!==undefined)return this.#t;for(const e of this.#r){if(typeof e==="string")continue;if(e.type||e.hasMagic)return this.#t=true}return this.#t}toString(){if(this.#c!==undefined)return this.#c;if(!this.type){return this.#c=this.#r.map((e=>String(e))).join("")}else{return this.#c=this.type+"("+this.#r.map((e=>String(e))).join("|")+")"}}#f(){if(this!==this.#e)throw new Error("should only call on root");if(this.#a)return this;this.toString();this.#a=true;let e;while(e=this.#o.pop()){if(e.type!=="!")continue;let t=e;let n=t.#s;while(n){for(let r=t.#i+1;!n.type&&r<n.#r.length;r++){for(const t of e.#r){if(typeof t==="string"){throw new Error("string part in extglob AST??")}t.copyIn(n.#r[r])}}t=n;n=t.#s}}return this}push(...e){for(const t of e){if(t==="")continue;if(typeof t!=="string"&&!(t instanceof AST&&t.#s===this)){throw new Error("invalid part: "+t)}this.#r.push(t)}}toJSON(){const e=this.type===null?this.#r.slice().map((e=>typeof e==="string"?e:e.toJSON())):[this.type,...this.#r.map((e=>e.toJSON()))];if(this.isStart()&&!this.type)e.unshift([]);if(this.isEnd()&&(this===this.#e||this.#e.#a&&this.#s?.type==="!")){e.push({})}return e}isStart(){if(this.#e===this)return true;if(!this.#s?.isStart())return false;if(this.#i===0)return true;const e=this.#s;for(let t=0;t<this.#i;t++){const n=e.#r[t];if(!(n instanceof AST&&n.type==="!")){return false}}return true}isEnd(){if(this.#e===this)return true;if(this.#s?.type==="!")return true;if(!this.#s?.isEnd())return false;if(!this.type)return this.#s?.isEnd();const e=this.#s?this.#s.#r.length:0;return this.#i===e-1}copyIn(e){if(typeof e==="string")this.push(e);else this.push(e.clone(this))}clone(e){const t=new AST(this.type,e);for(const e of this.#r){t.copyIn(e)}return t}static#h(e,t,n,r){let s=false;let i=false;let o=-1;let a=false;if(t.type===null){let u=n;let c="";while(u<e.length){const n=e.charAt(u++);if(s||n==="\\"){s=!s;c+=n;continue}if(i){if(u===o+1){if(n==="^"||n==="!"){a=true}}else if(n==="]"&&!(u===o+2&&a)){i=false}c+=n;continue}else if(n==="["){i=true;o=u;a=false;c+=n;continue}if(!r.noext&&isExtglobType(n)&&e.charAt(u)==="("){t.push(c);c="";const s=new AST(n,t);u=AST.#h(e,s,u,r);t.push(s);continue}c+=n}t.push(c);return u}let u=n+1;let c=new AST(null,t);const l=[];let f="";while(u<e.length){const n=e.charAt(u++);if(s||n==="\\"){s=!s;f+=n;continue}if(i){if(u===o+1){if(n==="^"||n==="!"){a=true}}else if(n==="]"&&!(u===o+2&&a)){i=false}f+=n;continue}else if(n==="["){i=true;o=u;a=false;f+=n;continue}if(isExtglobType(n)&&e.charAt(u)==="("){c.push(f);f="";const t=new AST(n,c);c.push(t);u=AST.#h(e,t,u,r);continue}if(n==="|"){c.push(f);f="";l.push(c);c=new AST(null,t);continue}if(n===")"){if(f===""&&t.#r.length===0){t.#l=true}c.push(f);f="";t.push(...l,c);return u}f+=n}t.type=null;t.#t=undefined;t.#r=[e.substring(n-1)];return u}static fromGlob(e,t={}){const n=new AST(null,undefined,t);AST.#h(e,n,0,t);return n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();const e=this.toString();const[t,n,r,s]=this.toRegExpSource();const i=r||this.#t||this.#u.nocase&&!this.#u.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase();if(!i){return n}const o=(this.#u.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${t}$`,o),{_src:t,_glob:e})}toRegExpSource(e){const t=e??!!this.#u.dot;if(this.#e===this)this.#f();if(!this.type){const n=this.isStart()&&this.isEnd();const r=this.#r.map((t=>{const[r,s,i,o]=typeof t==="string"?AST.#p(t,this.#t,n):t.toRegExpSource(e);this.#t=this.#t||i;this.#n=this.#n||o;return r})).join("");let s="";if(this.isStart()){if(typeof this.#r[0]==="string"){const n=this.#r.length===1&&ie.has(this.#r[0]);if(!n){const n=se;const i=t&&n.has(r.charAt(0))||r.startsWith("\\.")&&n.has(r.charAt(2))||r.startsWith("\\.\\.")&&n.has(r.charAt(4));const o=!t&&!e&&n.has(r.charAt(0));s=i?ne:o?re:""}}}let i="";if(this.isEnd()&&this.#e.#a&&this.#s?.type==="!"){i="(?:$|\\/)"}const o=s+r+i;return[o,unescape_unescape(r),this.#t=!!this.#t,this.#n]}const n=this.type==="*"||this.type==="+";const r=this.type==="!"?"(?:(?!(?:":"(?:";let s=this.#d(t);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){const e=this.toString();this.#r=[e];this.type=null;this.#t=undefined;return[e,unescape_unescape(this.toString()),false,false]}let i=!n||e||t||!re?"":this.#d(true);if(i===s){i=""}if(i){s=`(?:${s})(?:${i})*?`}let o="";if(this.type==="!"&&this.#l){o=(this.isStart()&&!t?re:"")+ce}else{const n=this.type==="!"?"))"+(this.isStart()&&!t&&!e?re:"")+ue+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&i?")":this.type==="*"&&i?`)?`:`)${this.type}`;o=r+s+n}return[o,unescape_unescape(s),this.#t=!!this.#t,this.#n]}#d(e){return this.#r.map((t=>{if(typeof t==="string"){throw new Error("string type in extglob ast??")}const[n,r,s,i]=t.toRegExpSource(e);this.#n=this.#n||i;return n})).filter((e=>!(this.isStart()&&this.isEnd())||!!e)).join("|")}static#p(e,t,n=false){let r=false;let s="";let i=false;for(let o=0;o<e.length;o++){const a=e.charAt(o);if(r){r=false;s+=(oe.has(a)?"\\":"")+a;continue}if(a==="\\"){if(o===e.length-1){s+="\\\\"}else{r=true}continue}if(a==="["){const[n,r,a,u]=parseClass(e,o);if(a){s+=n;i=i||r;o+=a-1;t=t||u;continue}}if(a==="*"){if(n&&e==="*")s+=ce;else s+=ue;t=true;continue}if(a==="?"){s+=ae;t=true;continue}s+=regExpEscape(a)}return[s,unescape_unescape(e),!!t,i]}}const escape_escape=(e,{windowsPathsNoEscape:t=false}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");const minimatch=(e,t,n={})=>{assertValidPattern(t);if(!n.nocomment&&t.charAt(0)==="#"){return false}return new Minimatch(t,n).match(e)};const le=/^\*+([^+@!?\*\[\(]*)$/;const starDotExtTest=e=>t=>!t.startsWith(".")&&t.endsWith(e);const starDotExtTestDot=e=>t=>t.endsWith(e);const starDotExtTestNocase=e=>{e=e.toLowerCase();return t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)};const starDotExtTestNocaseDot=e=>{e=e.toLowerCase();return t=>t.toLowerCase().endsWith(e)};const fe=/^\*+\.\*+$/;const starDotStarTest=e=>!e.startsWith(".")&&e.includes(".");const starDotStarTestDot=e=>e!=="."&&e!==".."&&e.includes(".");const he=/^\.\*+$/;const dotStarTest=e=>e!=="."&&e!==".."&&e.startsWith(".");const pe=/^\*+$/;const starTest=e=>e.length!==0&&!e.startsWith(".");const starTestDot=e=>e.length!==0&&e!=="."&&e!=="..";const de=/^\?+([^+@!?\*\[\(]*)?$/;const qmarksTestNocase=([e,t=""])=>{const n=qmarksTestNoExt([e]);if(!t)return n;t=t.toLowerCase();return e=>n(e)&&e.toLowerCase().endsWith(t)};const qmarksTestNocaseDot=([e,t=""])=>{const n=qmarksTestNoExtDot([e]);if(!t)return n;t=t.toLowerCase();return e=>n(e)&&e.toLowerCase().endsWith(t)};const qmarksTestDot=([e,t=""])=>{const n=qmarksTestNoExtDot([e]);return!t?n:e=>n(e)&&e.endsWith(t)};const qmarksTest=([e,t=""])=>{const n=qmarksTestNoExt([e]);return!t?n:e=>n(e)&&e.endsWith(t)};const qmarksTestNoExt=([e])=>{const t=e.length;return e=>e.length===t&&!e.startsWith(".")};const qmarksTestNoExtDot=([e])=>{const t=e.length;return e=>e.length===t&&e!=="."&&e!==".."};const me=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";const ge={win32:{sep:"\\"},posix:{sep:"/"}};const ye=me==="win32"?ge.win32.sep:ge.posix.sep;minimatch.sep=ye;const be=Symbol("globstar **");minimatch.GLOBSTAR=be;const ve="[^/]";const we=ve+"*?";const Se="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";const Ae="(?:(?!(?:\\/|^)\\.).)*?";const filter=(e,t={})=>n=>minimatch(n,e,t);minimatch.filter=filter;const ext=(e,t={})=>Object.assign({},e,t);const defaults=e=>{if(!e||typeof e!=="object"||!Object.keys(e).length){return minimatch}const t=minimatch;const m=(n,r,s={})=>t(n,r,ext(e,s));return Object.assign(m,{Minimatch:class Minimatch extends t.Minimatch{constructor(t,n={}){super(t,ext(e,n))}static defaults(n){return t.defaults(ext(e,n)).Minimatch}},AST:class AST extends t.AST{constructor(t,n,r={}){super(t,n,ext(e,r))}static fromGlob(n,r={}){return t.AST.fromGlob(n,ext(e,r))}},unescape:(n,r={})=>t.unescape(n,ext(e,r)),escape:(n,r={})=>t.escape(n,ext(e,r)),filter:(n,r={})=>t.filter(n,ext(e,r)),defaults:n=>t.defaults(ext(e,n)),makeRe:(n,r={})=>t.makeRe(n,ext(e,r)),braceExpand:(n,r={})=>t.braceExpand(n,ext(e,r)),match:(n,r,s={})=>t.match(n,r,ext(e,s)),sep:t.sep,GLOBSTAR:be})};minimatch.defaults=defaults;const braceExpand=(e,t={})=>{assertValidPattern(e);if(t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)){return[e]}return X(e)};minimatch.braceExpand=braceExpand;const makeRe=(e,t={})=>new Minimatch(e,t).makeRe();minimatch.makeRe=makeRe;const match=(e,t,n={})=>{const r=new Minimatch(t,n);e=e.filter((e=>r.match(e)));if(r.options.nonull&&!e.length){e.push(t)}return e};minimatch.match=match;const Ee=/[?*]|[+@!]\(.*?\)|\[|\]/;const mjs_regExpEscape=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Minimatch{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){assertValidPattern(e);t=t||{};this.options=t;this.pattern=e;this.platform=t.platform||me;this.isWindows=this.platform==="win32";this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===false;if(this.windowsPathsNoEscape){this.pattern=this.pattern.replace(/\\/g,"/")}this.preserveMultipleSlashes=!!t.preserveMultipleSlashes;this.regexp=null;this.negate=false;this.nonegate=!!t.nonegate;this.comment=false;this.empty=false;this.partial=!!t.partial;this.nocase=!!this.options.nocase;this.windowsNoMagicRoot=t.windowsNoMagicRoot!==undefined?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase);this.globSet=[];this.globParts=[];this.set=[];this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1){return true}for(const e of this.set){for(const t of e){if(typeof t!=="string")return true}}return false}debug(...e){}make(){const e=this.pattern;const t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();this.globSet=[...new Set(this.braceExpand())];if(t.debug){this.debug=(...e)=>console.error(...e)}this.debug(this.pattern,this.globSet);const n=this.globSet.map((e=>this.slashSplit(e)));this.globParts=this.preprocess(n);this.debug(this.pattern,this.globParts);let r=this.globParts.map(((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){const t=e[0]===""&&e[1]===""&&(e[2]==="?"||!Ee.test(e[2]))&&!Ee.test(e[3]);const n=/^[a-z]:/i.test(e[0]);if(t){return[...e.slice(0,4),...e.slice(4).map((e=>this.parse(e)))]}else if(n){return[e[0],...e.slice(1).map((e=>this.parse(e)))]}}return e.map((e=>this.parse(e)))}));this.debug(this.pattern,r);this.set=r.filter((e=>e.indexOf(false)===-1));if(this.isWindows){for(let e=0;e<this.set.length;e++){const t=this.set[e];if(t[0]===""&&t[1]===""&&this.globParts[e][2]==="?"&&typeof t[3]==="string"&&/^[a-z]:$/i.test(t[3])){t[2]="?"}}}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar){for(let t=0;t<e.length;t++){for(let n=0;n<e[t].length;n++){if(e[t][n]==="**"){e[t][n]="*"}}}}const{optimizationLevel:t=1}=this.options;if(t>=2){e=this.firstPhasePreProcess(e);e=this.secondPhasePreProcess(e)}else if(t>=1){e=this.levelOneOptimize(e)}else{e=this.adjascentGlobstarOptimize(e)}return e}adjascentGlobstarOptimize(e){return e.map((e=>{let t=-1;while(-1!==(t=e.indexOf("**",t+1))){let n=t;while(e[n+1]==="**"){n++}if(n!==t){e.splice(t,n-t)}}return e}))}levelOneOptimize(e){return e.map((e=>{e=e.reduce(((e,t)=>{const n=e[e.length-1];if(t==="**"&&n==="**"){return e}if(t===".."){if(n&&n!==".."&&n!=="."&&n!=="**"){e.pop();return e}}e.push(t);return e}),[]);return e.length===0?[""]:e}))}levelTwoFileOptimize(e){if(!Array.isArray(e)){e=this.slashSplit(e)}let t=false;do{t=false;if(!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){const r=e[n];if(n===1&&r===""&&e[0]==="")continue;if(r==="."||r===""){t=true;e.splice(n,1);n--}}if(e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")){t=true;e.pop()}}let n=0;while(-1!==(n=e.indexOf("..",n+1))){const r=e[n-1];if(r&&r!=="."&&r!==".."&&r!=="**"){t=true;e.splice(n-1,2);n-=2}}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=false;do{t=false;for(let n of e){let r=-1;while(-1!==(r=n.indexOf("**",r+1))){let s=r;while(n[s+1]==="**"){s++}if(s>r){n.splice(r+1,s-r)}let i=n[r+1];const o=n[r+2];const a=n[r+3];if(i!=="..")continue;if(!o||o==="."||o===".."||!a||a==="."||a===".."){continue}t=true;n.splice(r,1);const u=n.slice(0);u[r]="**";e.push(u);r--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){const r=n[e];if(e===1&&r===""&&n[0]==="")continue;if(r==="."||r===""){t=true;n.splice(e,1);e--}}if(n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")){t=true;n.pop()}}let s=0;while(-1!==(s=n.indexOf("..",s+1))){const e=n[s-1];if(e&&e!=="."&&e!==".."&&e!=="**"){t=true;const e=s===1&&n[s+1]==="**";const r=e?["."]:[];n.splice(s-1,2,...r);if(n.length===0)n.push("");s-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++){for(let n=t+1;n<e.length;n++){const r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(!r)continue;e[t]=r;e[n]=[]}}return e.filter((e=>e.length))}partsMatch(e,t,n=false){let r=0;let s=0;let i=[];let o="";while(r<e.length&&s<t.length){if(e[r]===t[s]){i.push(o==="b"?t[s]:e[r]);r++;s++}else if(n&&e[r]==="**"&&t[s]===e[r+1]){i.push(e[r]);r++}else if(n&&t[s]==="**"&&e[r]===t[s+1]){i.push(t[s]);s++}else if(e[r]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(o==="b")return false;o="a";i.push(e[r]);r++;s++}else if(t[s]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(o==="a")return false;o="b";i.push(t[s]);r++;s++}else{return false}}return e.length===t.length&&i}parseNegate(){if(this.nonegate)return;const e=this.pattern;let t=false;let n=0;for(let r=0;r<e.length&&e.charAt(r)==="!";r++){t=!t;n++}if(n)this.pattern=e.slice(n);this.negate=t}matchOne(e,t,n=false){const r=this.options;if(this.isWindows){const n=typeof e[0]==="string"&&/^[a-z]:$/i.test(e[0]);const r=!n&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]);const s=typeof t[0]==="string"&&/^[a-z]:$/i.test(t[0]);const i=!s&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]==="string"&&/^[a-z]:$/i.test(t[3]);const o=r?3:n?0:undefined;const a=i?3:s?0:undefined;if(typeof o==="number"&&typeof a==="number"){const[n,r]=[e[o],t[a]];if(n.toLowerCase()===r.toLowerCase()){t[a]=n;if(a>o){t=t.slice(a)}else if(o>a){e=e.slice(o)}}}}const{optimizationLevel:s=1}=this.options;if(s>=2){e=this.levelTwoFileOptimize(e)}this.debug("matchOne",this,{file:e,pattern:t});this.debug("matchOne",e.length,t.length);for(var i=0,o=0,a=e.length,u=t.length;i<a&&o<u;i++,o++){this.debug("matchOne loop");var c=t[o];var l=e[i];this.debug(t,c,l);if(c===false){return false}if(c===be){this.debug("GLOBSTAR",[t,c,l]);var f=i;var h=o+1;if(h===u){this.debug("** at the end");for(;i<a;i++){if(e[i]==="."||e[i]===".."||!r.dot&&e[i].charAt(0)===".")return false}return true}while(f<a){var p=e[f];this.debug("\nglobstar while",e,f,t,h,p);if(this.matchOne(e.slice(f),t.slice(h),n)){this.debug("globstar found match!",f,a,p);return true}else{if(p==="."||p===".."||!r.dot&&p.charAt(0)==="."){this.debug("dot detected!",e,f,t,h);break}this.debug("globstar swallow a segment, and continue");f++}}if(n){this.debug("\n>>> no match, partial?",e,f,t,h);if(f===a){return true}}return false}let s;if(typeof c==="string"){s=l===c;this.debug("string match",c,l,s)}else{s=c.test(l);this.debug("pattern match",c,l,s)}if(!s)return false}if(i===a&&o===u){return true}else if(i===a){return n}else if(o===u){return i===a-1&&e[i]===""}else{throw new Error("wtf?")}}braceExpand(){return braceExpand(this.pattern,this.options)}parse(e){assertValidPattern(e);const t=this.options;if(e==="**")return be;if(e==="")return"";let n;let r=null;if(n=e.match(pe)){r=t.dot?starTestDot:starTest}else if(n=e.match(le)){r=(t.nocase?t.dot?starDotExtTestNocaseDot:starDotExtTestNocase:t.dot?starDotExtTestDot:starDotExtTest)(n[1])}else if(n=e.match(de)){r=(t.nocase?t.dot?qmarksTestNocaseDot:qmarksTestNocase:t.dot?qmarksTestDot:qmarksTest)(n)}else if(n=e.match(fe)){r=t.dot?starDotStarTestDot:starDotStarTest}else if(n=e.match(he)){r=dotStarTest}const s=AST.fromGlob(e,this.options).toMMPattern();return r?Object.assign(s,{test:r}):s}makeRe(){if(this.regexp||this.regexp===false)return this.regexp;const e=this.set;if(!e.length){this.regexp=false;return this.regexp}const t=this.options;const n=t.noglobstar?we:t.dot?Se:Ae;const r=new Set(t.nocase?["i"]:[]);let s=e.map((e=>{const t=e.map((e=>{if(e instanceof RegExp){for(const t of e.flags.split(""))r.add(t)}return typeof e==="string"?mjs_regExpEscape(e):e===be?be:e._src}));t.forEach(((e,r)=>{const s=t[r+1];const i=t[r-1];if(e!==be||i===be){return}if(i===undefined){if(s!==undefined&&s!==be){t[r+1]="(?:\\/|"+n+"\\/)?"+s}else{t[r]=n}}else if(s===undefined){t[r-1]=i+"(?:\\/|"+n+")?"}else if(s!==be){t[r-1]=i+"(?:\\/|\\/"+n+"\\/)"+s;t[r+1]=be}}));return t.filter((e=>e!==be)).join("/")})).join("|");const[i,o]=e.length>1?["(?:",")"]:["",""];s="^"+i+s+o+"$";if(this.negate)s="^(?!"+s+").+$";try{this.regexp=new RegExp(s,[...r].join(""))}catch(e){this.regexp=false}return this.regexp}slashSplit(e){if(this.preserveMultipleSlashes){return e.split("/")}else if(this.isWindows&&/^\/\/[^\/]+/.test(e)){return["",...e.split(/\/+/)]}else{return e.split(/\/+/)}}match(e,t=this.partial){this.debug("match",e,this.pattern);if(this.comment){return false}if(this.empty){return e===""}if(e==="/"&&t){return true}const n=this.options;if(this.isWindows){e=e.split("\\").join("/")}const r=this.slashSplit(e);this.debug(this.pattern,"split",r);const s=this.set;this.debug(this.pattern,"set",s);let i=r[r.length-1];if(!i){for(let e=r.length-2;!i&&e>=0;e--){i=r[e]}}for(let e=0;e<s.length;e++){const o=s[e];let a=r;if(n.matchBase&&o.length===1){a=[i]}const u=this.matchOne(a,o,t);if(u){if(n.flipNegate){return true}return!this.negate}}if(n.flipNegate){return false}return this.negate}static defaults(e){return minimatch.defaults(e).Minimatch}}minimatch.AST=AST;minimatch.Minimatch=Minimatch;minimatch.escape=escape_escape;minimatch.unescape=unescape_unescape;const De=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date;const Ce=new Set;const _e=typeof process==="object"&&!!process?process:{};const emitWarning=(e,t,n,r)=>{typeof _e.emitWarning==="function"?_e.emitWarning(e,t,n,r):console.error(`[${n}] ${t}: ${e}`)};let ke=globalThis.AbortController;let Fe=globalThis.AbortSignal;if(typeof ke==="undefined"){Fe=class AbortSignal{onabort;_onabort=[];reason;aborted=false;addEventListener(e,t){this._onabort.push(t)}};ke=class AbortController{constructor(){warnACPolyfill()}signal=new Fe;abort(e){if(this.signal.aborted)return;this.signal.reason=e;this.signal.aborted=true;for(const t of this.signal._onabort){t(e)}this.signal.onabort?.(e)}};let e=_e.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1";const warnACPolyfill=()=>{if(!e)return;e=false;emitWarning("AbortController is not defined. If using lru-cache in "+"node 14, load an AbortController polyfill from the "+"`node-abort-controller` package. A minimal polyfill is "+"provided for use by LRUCache.fetch(), but it should not be "+"relied upon in other contexts (eg, passing it to other APIs that "+"use AbortController/AbortSignal might have undesirable effects). "+"You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",warnACPolyfill)}}const shouldWarn=e=>!Ce.has(e);const xe=Symbol("type");const isPosInt=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e);const getUintArray=e=>!isPosInt(e)?null:e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?ZeroArray:null;class ZeroArray extends Array{constructor(e){super(e);this.fill(0)}}class Stack{heap;length;static#m=false;static create(e){const t=getUintArray(e);if(!t)return[];Stack.#m=true;const n=new Stack(e,t);Stack.#m=false;return n}constructor(e,t){if(!Stack.#m){throw new TypeError("instantiate Stack using Stack.create(n)")}this.heap=new t(e);this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class LRUCache{#g;#y;#b;#v;#w;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#S;#A;#E;#D;#C;#_;#k;#F;#x;#O;#P;#T;#B;#N;#R;#L;#M;static unsafeExposeInternals(e){return{starts:e.#B,ttls:e.#N,sizes:e.#T,keyMap:e.#E,keyList:e.#D,valList:e.#C,next:e.#_,prev:e.#k,get head(){return e.#F},get tail(){return e.#x},free:e.#O,isBackgroundFetch:t=>e.#I(t),backgroundFetch:(t,n,r,s)=>e.#$(t,n,r,s),moveToTail:t=>e.#j(t),indexes:t=>e.#H(t),rindexes:t=>e.#W(t),isStale:t=>e.#q(t)}}get max(){return this.#g}get maxSize(){return this.#y}get calculatedSize(){return this.#A}get size(){return this.#S}get fetchMethod(){return this.#w}get dispose(){return this.#b}get disposeAfter(){return this.#v}constructor(e){const{max:t=0,ttl:n,ttlResolution:r=1,ttlAutopurge:s,updateAgeOnGet:i,updateAgeOnHas:o,allowStale:a,dispose:u,disposeAfter:c,noDisposeOnSet:l,noUpdateTTL:f,maxSize:h=0,maxEntrySize:p=0,sizeCalculation:d,fetchMethod:g,noDeleteOnFetchRejection:y,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:v,allowStaleOnFetchAbort:w,ignoreFetchAbort:S}=e;if(t!==0&&!isPosInt(t)){throw new TypeError("max option must be a nonnegative integer")}const A=t?getUintArray(t):Array;if(!A){throw new Error("invalid max value: "+t)}this.#g=t;this.#y=h;this.maxEntrySize=p||this.#y;this.sizeCalculation=d;if(this.sizeCalculation){if(!this.#y&&!this.maxEntrySize){throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize")}if(typeof this.sizeCalculation!=="function"){throw new TypeError("sizeCalculation set to non-function")}}if(g!==undefined&&typeof g!=="function"){throw new TypeError("fetchMethod must be a function if specified")}this.#w=g;this.#L=!!g;this.#E=new Map;this.#D=new Array(t).fill(undefined);this.#C=new Array(t).fill(undefined);this.#_=new A(t);this.#k=new A(t);this.#F=0;this.#x=0;this.#O=Stack.create(t);this.#S=0;this.#A=0;if(typeof u==="function"){this.#b=u}if(typeof c==="function"){this.#v=c;this.#P=[]}else{this.#v=undefined;this.#P=undefined}this.#R=!!this.#b;this.#M=!!this.#v;this.noDisposeOnSet=!!l;this.noUpdateTTL=!!f;this.noDeleteOnFetchRejection=!!y;this.allowStaleOnFetchRejection=!!v;this.allowStaleOnFetchAbort=!!w;this.ignoreFetchAbort=!!S;if(this.maxEntrySize!==0){if(this.#y!==0){if(!isPosInt(this.#y)){throw new TypeError("maxSize must be a positive integer if specified")}}if(!isPosInt(this.maxEntrySize)){throw new TypeError("maxEntrySize must be a positive integer if specified")}this.#U()}this.allowStale=!!a;this.noDeleteOnStaleGet=!!b;this.updateAgeOnGet=!!i;this.updateAgeOnHas=!!o;this.ttlResolution=isPosInt(r)||r===0?r:1;this.ttlAutopurge=!!s;this.ttl=n||0;if(this.ttl){if(!isPosInt(this.ttl)){throw new TypeError("ttl must be a positive integer if specified")}this.#G()}if(this.#g===0&&this.ttl===0&&this.#y===0){throw new TypeError("At least one of max, maxSize, or ttl is required")}if(!this.ttlAutopurge&&!this.#g&&!this.#y){const e="LRU_CACHE_UNBOUNDED";if(shouldWarn(e)){Ce.add(e);const t="TTL caching without ttlAutopurge, max, or maxSize can "+"result in unbounded memory consumption.";emitWarning(t,"UnboundedCacheWarning",e,LRUCache)}}}getRemainingTTL(e){return this.#E.has(e)?Infinity:0}#G(){const e=new ZeroArray(this.#g);const t=new ZeroArray(this.#g);this.#N=e;this.#B=t;this.#V=(n,r,s=De.now())=>{t[n]=r!==0?s:0;e[n]=r;if(r!==0&&this.ttlAutopurge){const e=setTimeout((()=>{if(this.#q(n)){this.delete(this.#D[n])}}),r+1);if(e.unref){e.unref()}}};this.#K=n=>{t[n]=e[n]!==0?De.now():0};this.#z=(r,s)=>{if(e[s]){const i=e[s];const o=t[s];if(!i||!o)return;r.ttl=i;r.start=o;r.now=n||getNow();const a=r.now-o;r.remainingTTL=i-a}};let n=0;const getNow=()=>{const e=De.now();if(this.ttlResolution>0){n=e;const t=setTimeout((()=>n=0),this.ttlResolution);if(t.unref){t.unref()}}return e};this.getRemainingTTL=r=>{const s=this.#E.get(r);if(s===undefined){return 0}const i=e[s];const o=t[s];if(!i||!o){return Infinity}const a=(n||getNow())-o;return i-a};this.#q=r=>{const s=t[r];const i=e[r];return!!i&&!!s&&(n||getNow())-s>i}}#K=()=>{};#z=()=>{};#V=()=>{};#q=()=>false;#U(){const e=new ZeroArray(this.#g);this.#A=0;this.#T=e;this.#Y=t=>{this.#A-=e[t];e[t]=0};this.#J=(e,t,n,r)=>{if(this.#I(t)){return 0}if(!isPosInt(n)){if(r){if(typeof r!=="function"){throw new TypeError("sizeCalculation must be a function")}n=r(t,e);if(!isPosInt(n)){throw new TypeError("sizeCalculation return invalid (expect positive integer)")}}else{throw new TypeError("invalid size value (must be positive integer). "+"When maxSize or maxEntrySize is used, sizeCalculation "+"or size must be set.")}}return n};this.#Q=(t,n,r)=>{e[t]=n;if(this.#y){const n=this.#y-e[t];while(this.#A>n){this.#X(true)}}this.#A+=e[t];if(r){r.entrySize=n;r.totalCalculatedSize=this.#A}}}#Y=e=>{};#Q=(e,t,n)=>{};#J=(e,t,n,r)=>{if(n||r){throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}return 0};*#H({allowStale:e=this.allowStale}={}){if(this.#S){for(let t=this.#x;true;){if(!this.#Z(t)){break}if(e||!this.#q(t)){yield t}if(t===this.#F){break}else{t=this.#k[t]}}}}*#W({allowStale:e=this.allowStale}={}){if(this.#S){for(let t=this.#F;true;){if(!this.#Z(t)){break}if(e||!this.#q(t)){yield t}if(t===this.#x){break}else{t=this.#_[t]}}}}#Z(e){return e!==undefined&&this.#E.get(this.#D[e])===e}*entries(){for(const e of this.#H()){if(this.#C[e]!==undefined&&this.#D[e]!==undefined&&!this.#I(this.#C[e])){yield[this.#D[e],this.#C[e]]}}}*rentries(){for(const e of this.#W()){if(this.#C[e]!==undefined&&this.#D[e]!==undefined&&!this.#I(this.#C[e])){yield[this.#D[e],this.#C[e]]}}}*keys(){for(const e of this.#H()){const t=this.#D[e];if(t!==undefined&&!this.#I(this.#C[e])){yield t}}}*rkeys(){for(const e of this.#W()){const t=this.#D[e];if(t!==undefined&&!this.#I(this.#C[e])){yield t}}}*values(){for(const e of this.#H()){const t=this.#C[e];if(t!==undefined&&!this.#I(this.#C[e])){yield this.#C[e]}}}*rvalues(){for(const e of this.#W()){const t=this.#C[e];if(t!==undefined&&!this.#I(this.#C[e])){yield this.#C[e]}}}[Symbol.iterator](){return this.entries()}find(e,t={}){for(const n of this.#H()){const r=this.#C[n];const s=this.#I(r)?r.__staleWhileFetching:r;if(s===undefined)continue;if(e(s,this.#D[n],this)){return this.get(this.#D[n],t)}}}forEach(e,t=this){for(const n of this.#H()){const r=this.#C[n];const s=this.#I(r)?r.__staleWhileFetching:r;if(s===undefined)continue;e.call(t,s,this.#D[n],this)}}rforEach(e,t=this){for(const n of this.#W()){const r=this.#C[n];const s=this.#I(r)?r.__staleWhileFetching:r;if(s===undefined)continue;e.call(t,s,this.#D[n],this)}}purgeStale(){let e=false;for(const t of this.#W({allowStale:true})){if(this.#q(t)){this.delete(this.#D[t]);e=true}}return e}info(e){const t=this.#E.get(e);if(t===undefined)return undefined;const n=this.#C[t];const r=this.#I(n)?n.__staleWhileFetching:n;if(r===undefined)return undefined;const s={value:r};if(this.#N&&this.#B){const e=this.#N[t];const n=this.#B[t];if(e&&n){const t=e-(De.now()-n);s.ttl=t;s.start=Date.now()}}if(this.#T){s.size=this.#T[t]}return s}dump(){const e=[];for(const t of this.#H({allowStale:true})){const n=this.#D[t];const r=this.#C[t];const s=this.#I(r)?r.__staleWhileFetching:r;if(s===undefined||n===undefined)continue;const i={value:s};if(this.#N&&this.#B){i.ttl=this.#N[t];const e=De.now()-this.#B[t];i.start=Math.floor(Date.now()-e)}if(this.#T){i.size=this.#T[t]}e.unshift([n,i])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=De.now()-e}this.set(t,n.value,n)}}set(e,t,n={}){if(t===undefined){this.delete(e);return this}const{ttl:r=this.ttl,start:s,noDisposeOnSet:i=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:a}=n;let{noUpdateTTL:u=this.noUpdateTTL}=n;const c=this.#J(e,t,n.size||0,o);if(this.maxEntrySize&&c>this.maxEntrySize){if(a){a.set="miss";a.maxEntrySizeExceeded=true}this.delete(e);return this}let l=this.#S===0?undefined:this.#E.get(e);if(l===undefined){l=this.#S===0?this.#x:this.#O.length!==0?this.#O.pop():this.#S===this.#g?this.#X(false):this.#S;this.#D[l]=e;this.#C[l]=t;this.#E.set(e,l);this.#_[this.#x]=l;this.#k[l]=this.#x;this.#x=l;this.#S++;this.#Q(l,c,a);if(a)a.set="add";u=false}else{this.#j(l);const n=this.#C[l];if(t!==n){if(this.#L&&this.#I(n)){n.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:t}=n;if(t!==undefined&&!i){if(this.#R){this.#b?.(t,e,"set")}if(this.#M){this.#P?.push([t,e,"set"])}}}else if(!i){if(this.#R){this.#b?.(n,e,"set")}if(this.#M){this.#P?.push([n,e,"set"])}}this.#Y(l);this.#Q(l,c,a);this.#C[l]=t;if(a){a.set="replace";const e=n&&this.#I(n)?n.__staleWhileFetching:n;if(e!==undefined)a.oldValue=e}}else if(a){a.set="update"}}if(r!==0&&!this.#N){this.#G()}if(this.#N){if(!u){this.#V(l,r,s)}if(a)this.#z(a,l)}if(!i&&this.#M&&this.#P){const e=this.#P;let t;while(t=e?.shift()){this.#v?.(...t)}}return this}pop(){try{while(this.#S){const e=this.#C[this.#F];this.#X(true);if(this.#I(e)){if(e.__staleWhileFetching){return e.__staleWhileFetching}}else if(e!==undefined){return e}}}finally{if(this.#M&&this.#P){const e=this.#P;let t;while(t=e?.shift()){this.#v?.(...t)}}}}#X(e){const t=this.#F;const n=this.#D[t];const r=this.#C[t];if(this.#L&&this.#I(r)){r.__abortController.abort(new Error("evicted"))}else if(this.#R||this.#M){if(this.#R){this.#b?.(r,n,"evict")}if(this.#M){this.#P?.push([r,n,"evict"])}}this.#Y(t);if(e){this.#D[t]=undefined;this.#C[t]=undefined;this.#O.push(t)}if(this.#S===1){this.#F=this.#x=0;this.#O.length=0}else{this.#F=this.#_[t]}this.#E.delete(n);this.#S--;return t}has(e,t={}){const{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t;const s=this.#E.get(e);if(s!==undefined){const e=this.#C[s];if(this.#I(e)&&e.__staleWhileFetching===undefined){return false}if(!this.#q(s)){if(n){this.#K(s)}if(r){r.has="hit";this.#z(r,s)}return true}else if(r){r.has="stale";this.#z(r,s)}}else if(r){r.has="miss"}return false}peek(e,t={}){const{allowStale:n=this.allowStale}=t;const r=this.#E.get(e);if(r===undefined||!n&&this.#q(r)){return}const s=this.#C[r];return this.#I(s)?s.__staleWhileFetching:s}#$(e,t,n,r){const s=t===undefined?undefined:this.#C[t];if(this.#I(s)){return s}const i=new ke;const{signal:o}=n;o?.addEventListener("abort",(()=>i.abort(o.reason)),{signal:i.signal});const a={signal:i.signal,options:n,context:r};const cb=(r,s=false)=>{const{aborted:o}=i.signal;const c=n.ignoreFetchAbort&&r!==undefined;if(n.status){if(o&&!s){n.status.fetchAborted=true;n.status.fetchError=i.signal.reason;if(c)n.status.fetchAbortIgnored=true}else{n.status.fetchResolved=true}}if(o&&!c&&!s){return fetchFail(i.signal.reason)}const l=u;if(this.#C[t]===u){if(r===undefined){if(l.__staleWhileFetching){this.#C[t]=l.__staleWhileFetching}else{this.delete(e)}}else{if(n.status)n.status.fetchUpdated=true;this.set(e,r,a.options)}}return r};const eb=e=>{if(n.status){n.status.fetchRejected=true;n.status.fetchError=e}return fetchFail(e)};const fetchFail=r=>{const{aborted:s}=i.signal;const o=s&&n.allowStaleOnFetchAbort;const a=o||n.allowStaleOnFetchRejection;const c=a||n.noDeleteOnFetchRejection;const l=u;if(this.#C[t]===u){const n=!c||l.__staleWhileFetching===undefined;if(n){this.delete(e)}else if(!o){this.#C[t]=l.__staleWhileFetching}}if(a){if(n.status&&l.__staleWhileFetching!==undefined){n.status.returnedStale=true}return l.__staleWhileFetching}else if(l.__returned===l){throw r}};const pcall=(t,r)=>{const o=this.#w?.(e,s,a);if(o&&o instanceof Promise){o.then((e=>t(e===undefined?undefined:e)),r)}i.signal.addEventListener("abort",(()=>{if(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort){t(undefined);if(n.allowStaleOnFetchAbort){t=e=>cb(e,true)}}}))};if(n.status)n.status.fetchDispatched=true;const u=new Promise(pcall).then(cb,eb);const c=Object.assign(u,{__abortController:i,__staleWhileFetching:s,__returned:undefined});if(t===undefined){this.set(e,c,{...a.options,status:undefined});t=this.#E.get(e)}else{this.#C[t]=c}return c}#I(e){if(!this.#L)return false;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof ke}async fetch(e,t={}){const{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:i=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:h=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:d,forceRefresh:g=false,status:y,signal:b}=t;if(!this.#L){if(y)y.fetch="get";return this.get(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:s,status:y})}const v={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:s,ttl:i,noDisposeOnSet:o,size:a,sizeCalculation:u,noUpdateTTL:c,noDeleteOnFetchRejection:l,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:p,ignoreFetchAbort:h,status:y,signal:b};let w=this.#E.get(e);if(w===undefined){if(y)y.fetch="miss";const t=this.#$(e,w,v,d);return t.__returned=t}else{const t=this.#C[w];if(this.#I(t)){const e=n&&t.__staleWhileFetching!==undefined;if(y){y.fetch="inflight";if(e)y.returnedStale=true}return e?t.__staleWhileFetching:t.__returned=t}const s=this.#q(w);if(!g&&!s){if(y)y.fetch="hit";this.#j(w);if(r){this.#K(w)}if(y)this.#z(y,w);return t}const i=this.#$(e,w,v,d);const o=i.__staleWhileFetching!==undefined;const a=o&&n;if(y){y.fetch=s?"stale":"refresh";if(a&&s)y.returnedStale=true}return a?i.__staleWhileFetching:i.__returned=i}}get(e,t={}){const{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:i}=t;const o=this.#E.get(e);if(o!==undefined){const t=this.#C[o];const a=this.#I(t);if(i)this.#z(i,o);if(this.#q(o)){if(i)i.get="stale";if(!a){if(!s){this.delete(e)}if(i&&n)i.returnedStale=true;return n?t:undefined}else{if(i&&n&&t.__staleWhileFetching!==undefined){i.returnedStale=true}return n?t.__staleWhileFetching:undefined}}else{if(i)i.get="hit";if(a){return t.__staleWhileFetching}this.#j(o);if(r){this.#K(o)}return t}}else if(i){i.get="miss"}}#ee(e,t){this.#k[t]=e;this.#_[e]=t}#j(e){if(e!==this.#x){if(e===this.#F){this.#F=this.#_[e]}else{this.#ee(this.#k[e],this.#_[e])}this.#ee(this.#x,e);this.#x=e}}delete(e){let t=false;if(this.#S!==0){const n=this.#E.get(e);if(n!==undefined){t=true;if(this.#S===1){this.clear()}else{this.#Y(n);const t=this.#C[n];if(this.#I(t)){t.__abortController.abort(new Error("deleted"))}else if(this.#R||this.#M){if(this.#R){this.#b?.(t,e,"delete")}if(this.#M){this.#P?.push([t,e,"delete"])}}this.#E.delete(e);this.#D[n]=undefined;this.#C[n]=undefined;if(n===this.#x){this.#x=this.#k[n]}else if(n===this.#F){this.#F=this.#_[n]}else{const e=this.#k[n];this.#_[e]=this.#_[n];const t=this.#_[n];this.#k[t]=this.#k[n]}this.#S--;this.#O.push(n)}}}if(this.#M&&this.#P?.length){const e=this.#P;let t;while(t=e?.shift()){this.#v?.(...t)}}return t}clear(){for(const e of this.#W({allowStale:true})){const t=this.#C[e];if(this.#I(t)){t.__abortController.abort(new Error("deleted"))}else{const n=this.#D[e];if(this.#R){this.#b?.(t,n,"delete")}if(this.#M){this.#P?.push([t,n,"delete"])}}}this.#E.clear();this.#C.fill(undefined);this.#D.fill(undefined);if(this.#N&&this.#B){this.#N.fill(0);this.#B.fill(0)}if(this.#T){this.#T.fill(0)}this.#F=0;this.#x=0;this.#O.length=0;this.#A=0;this.#S=0;if(this.#M&&this.#P){const e=this.#P;let t;while(t=e?.shift()){this.#v?.(...t)}}}}var Oe=__nccwpck_require__(1017);const Pe=e(import.meta.url)("url");var Te=__nccwpck_require__(7147);var Be=__nccwpck_require__.t(Te,2);var Ne=__nccwpck_require__(2361);var Re=__nccwpck_require__(2781);var Le=__nccwpck_require__(1576);const Me=typeof process==="object"&&process?process:{stdout:null,stderr:null};const isStream=e=>!!e&&typeof e==="object"&&(e instanceof Minipass||e instanceof Re||isReadable(e)||isWritable(e));const isReadable=e=>!!e&&typeof e==="object"&&e instanceof Ne.EventEmitter&&typeof e.pipe==="function"&&e.pipe!==Re.Writable.prototype.pipe;const isWritable=e=>!!e&&typeof e==="object"&&e instanceof Ne.EventEmitter&&typeof e.write==="function"&&typeof e.end==="function";const Ie=Symbol("EOF");const $e=Symbol("maybeEmitEnd");const je=Symbol("emittedEnd");const He=Symbol("emittingEnd");const We=Symbol("emittedError");const qe=Symbol("closed");const Ue=Symbol("read");const Ge=Symbol("flush");const Ve=Symbol("flushChunk");const Ke=Symbol("encoding");const ze=Symbol("decoder");const Ye=Symbol("flowing");const Je=Symbol("paused");const Qe=Symbol("resume");const Xe=Symbol("buffer");const Ze=Symbol("pipes");const et=Symbol("bufferLength");const tt=Symbol("bufferPush");const nt=Symbol("bufferShift");const rt=Symbol("objectMode");const st=Symbol("destroyed");const it=Symbol("error");const ot=Symbol("emitData");const at=Symbol("emitEnd");const ut=Symbol("emitEnd2");const ct=Symbol("async");const lt=Symbol("abort");const ft=Symbol("aborted");const ht=Symbol("signal");const pt=Symbol("dataListeners");const dt=Symbol("discarded");const defer=e=>Promise.resolve().then(e);const nodefer=e=>e();const isEndish=e=>e==="end"||e==="finish"||e==="prefinish";const isArrayBufferLike=e=>e instanceof ArrayBuffer||!!e&&typeof e==="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0;const isArrayBufferView=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);class Pipe{src;dest;opts;ondrain;constructor(e,t,n){this.src=e;this.dest=t;this.opts=n;this.ondrain=()=>e[Qe]();this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe();if(this.opts.end)this.dest.end()}}class PipeProxyErrors extends Pipe{unpipe(){this.src.removeListener("error",this.proxyErrors);super.unpipe()}constructor(e,t,n){super(e,t,n);this.proxyErrors=e=>t.emit("error",e);e.on("error",this.proxyErrors)}}const isObjectModeOptions=e=>!!e.objectMode;const isEncodingOptions=e=>!e.objectMode&&!!e.encoding&&e.encoding!=="buffer";class Minipass extends Ne.EventEmitter{[Ye]=false;[Je]=false;[Ze]=[];[Xe]=[];[rt];[Ke];[ct];[ze];[Ie]=false;[je]=false;[He]=false;[qe]=false;[We]=null;[et]=0;[st]=false;[ht];[ft]=false;[pt]=0;[dt]=false;writable=true;readable=true;constructor(...e){const t=e[0]||{};super();if(t.objectMode&&typeof t.encoding==="string"){throw new TypeError("Encoding and objectMode may not be used together")}if(isObjectModeOptions(t)){this[rt]=true;this[Ke]=null}else if(isEncodingOptions(t)){this[Ke]=t.encoding;this[rt]=false}else{this[rt]=false;this[Ke]=null}this[ct]=!!t.async;this[ze]=this[Ke]?new Le.StringDecoder(this[Ke]):null;if(t&&t.debugExposeBuffer===true){Object.defineProperty(this,"buffer",{get:()=>this[Xe]})}if(t&&t.debugExposePipes===true){Object.defineProperty(this,"pipes",{get:()=>this[Ze]})}const{signal:n}=t;if(n){this[ht]=n;if(n.aborted){this[lt]()}else{n.addEventListener("abort",(()=>this[lt]()))}}}get bufferLength(){return this[et]}get encoding(){return this[Ke]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[rt]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get["async"](){return this[ct]}set["async"](e){this[ct]=this[ct]||!!e}[lt](){this[ft]=true;this.emit("abort",this[ht]?.reason);this.destroy(this[ht]?.reason)}get aborted(){return this[ft]}set aborted(e){}write(e,t,n){if(this[ft])return false;if(this[Ie])throw new Error("write after end");if(this[st]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof t==="function"){n=t;t="utf8"}if(!t)t="utf8";const r=this[ct]?defer:nodefer;if(!this[rt]&&!Buffer.isBuffer(e)){if(isArrayBufferView(e)){e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}else if(isArrayBufferLike(e)){e=Buffer.from(e)}else if(typeof e!=="string"){throw new Error("Non-contiguous data written to non-objectMode stream")}}if(this[rt]){if(this[Ye]&&this[et]!==0)this[Ge](true);if(this[Ye])this.emit("data",e);else this[tt](e);if(this[et]!==0)this.emit("readable");if(n)r(n);return this[Ye]}if(!e.length){if(this[et]!==0)this.emit("readable");if(n)r(n);return this[Ye]}if(typeof e==="string"&&!(t===this[Ke]&&!this[ze]?.lastNeed)){e=Buffer.from(e,t)}if(Buffer.isBuffer(e)&&this[Ke]){e=this[ze].write(e)}if(this[Ye]&&this[et]!==0)this[Ge](true);if(this[Ye])this.emit("data",e);else this[tt](e);if(this[et]!==0)this.emit("readable");if(n)r(n);return this[Ye]}read(e){if(this[st])return null;this[dt]=false;if(this[et]===0||e===0||e&&e>this[et]){this[$e]();return null}if(this[rt])e=null;if(this[Xe].length>1&&!this[rt]){this[Xe]=[this[Ke]?this[Xe].join(""):Buffer.concat(this[Xe],this[et])]}const t=this[Ue](e||null,this[Xe][0]);this[$e]();return t}[Ue](e,t){if(this[rt])this[nt]();else{const n=t;if(e===n.length||e===null)this[nt]();else if(typeof n==="string"){this[Xe][0]=n.slice(e);t=n.slice(0,e);this[et]-=e}else{this[Xe][0]=n.subarray(e);t=n.subarray(0,e);this[et]-=e}}this.emit("data",t);if(!this[Xe].length&&!this[Ie])this.emit("drain");return t}end(e,t,n){if(typeof e==="function"){n=e;e=undefined}if(typeof t==="function"){n=t;t="utf8"}if(e!==undefined)this.write(e,t);if(n)this.once("end",n);this[Ie]=true;this.writable=false;if(this[Ye]||!this[Je])this[$e]();return this}[Qe](){if(this[st])return;if(!this[pt]&&!this[Ze].length){this[dt]=true}this[Je]=false;this[Ye]=true;this.emit("resume");if(this[Xe].length)this[Ge]();else if(this[Ie])this[$e]();else this.emit("drain")}resume(){return this[Qe]()}pause(){this[Ye]=false;this[Je]=true;this[dt]=false}get destroyed(){return this[st]}get flowing(){return this[Ye]}get paused(){return this[Je]}[tt](e){if(this[rt])this[et]+=1;else this[et]+=e.length;this[Xe].push(e)}[nt](){if(this[rt])this[et]-=1;else this[et]-=this[Xe][0].length;return this[Xe].shift()}[Ge](e=false){do{}while(this[Ve](this[nt]())&&this[Xe].length);if(!e&&!this[Xe].length&&!this[Ie])this.emit("drain")}[Ve](e){this.emit("data",e);return this[Ye]}pipe(e,t){if(this[st])return e;this[dt]=false;const n=this[je];t=t||{};if(e===Me.stdout||e===Me.stderr)t.end=false;else t.end=t.end!==false;t.proxyErrors=!!t.proxyErrors;if(n){if(t.end)e.end()}else{this[Ze].push(!t.proxyErrors?new Pipe(this,e,t):new PipeProxyErrors(this,e,t));if(this[ct])defer((()=>this[Qe]()));else this[Qe]()}return e}unpipe(e){const t=this[Ze].find((t=>t.dest===e));if(t){if(this[Ze].length===1){if(this[Ye]&&this[pt]===0){this[Ye]=false}this[Ze]=[]}else this[Ze].splice(this[Ze].indexOf(t),1);t.unpipe()}}addListener(e,t){return this.on(e,t)}on(e,t){const n=super.on(e,t);if(e==="data"){this[dt]=false;this[pt]++;if(!this[Ze].length&&!this[Ye]){this[Qe]()}}else if(e==="readable"&&this[et]!==0){super.emit("readable")}else if(isEndish(e)&&this[je]){super.emit(e);this.removeAllListeners(e)}else if(e==="error"&&this[We]){const e=t;if(this[ct])defer((()=>e.call(this,this[We])));else e.call(this,this[We])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){const n=super.off(e,t);if(e==="data"){this[pt]=this.listeners("data").length;if(this[pt]===0&&!this[dt]&&!this[Ze].length){this[Ye]=false}}return n}removeAllListeners(e){const t=super.removeAllListeners(e);if(e==="data"||e===undefined){this[pt]=0;if(!this[dt]&&!this[Ze].length){this[Ye]=false}}return t}get emittedEnd(){return this[je]}[$e](){if(!this[He]&&!this[je]&&!this[st]&&this[Xe].length===0&&this[Ie]){this[He]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[qe])this.emit("close");this[He]=false}}emit(e,...t){const n=t[0];if(e!=="error"&&e!=="close"&&e!==st&&this[st]){return false}else if(e==="data"){return!this[rt]&&!n?false:this[ct]?(defer((()=>this[ot](n))),true):this[ot](n)}else if(e==="end"){return this[at]()}else if(e==="close"){this[qe]=true;if(!this[je]&&!this[st])return false;const e=super.emit("close");this.removeAllListeners("close");return e}else if(e==="error"){this[We]=n;super.emit(it,n);const e=!this[ht]||this.listeners("error").length?super.emit("error",n):false;this[$e]();return e}else if(e==="resume"){const e=super.emit("resume");this[$e]();return e}else if(e==="finish"||e==="prefinish"){const t=super.emit(e);this.removeAllListeners(e);return t}const r=super.emit(e,...t);this[$e]();return r}[ot](e){for(const t of this[Ze]){if(t.dest.write(e)===false)this.pause()}const t=this[dt]?false:super.emit("data",e);this[$e]();return t}[at](){if(this[je])return false;this[je]=true;this.readable=false;return this[ct]?(defer((()=>this[ut]())),true):this[ut]()}[ut](){if(this[ze]){const e=this[ze].end();if(e){for(const t of this[Ze]){t.dest.write(e)}if(!this[dt])super.emit("data",e)}}for(const e of this[Ze]){e.end()}const e=super.emit("end");this.removeAllListeners("end");return e}async collect(){const e=Object.assign([],{dataLength:0});if(!this[rt])e.dataLength=0;const t=this.promise();this.on("data",(t=>{e.push(t);if(!this[rt])e.dataLength+=t.length}));await t;return e}async concat(){if(this[rt]){throw new Error("cannot concat in objectMode")}const e=await this.collect();return this[Ke]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise(((e,t)=>{this.on(st,(()=>t(new Error("stream destroyed"))));this.on("error",(e=>t(e)));this.on("end",(()=>e()))}))}[Symbol.asyncIterator](){this[dt]=false;let e=false;const stop=async()=>{this.pause();e=true;return{value:undefined,done:true}};const next=()=>{if(e)return stop();const t=this.read();if(t!==null)return Promise.resolve({done:false,value:t});if(this[Ie])return stop();let n;let r;const onerr=e=>{this.off("data",ondata);this.off("end",onend);this.off(st,ondestroy);stop();r(e)};const ondata=e=>{this.off("error",onerr);this.off("end",onend);this.off(st,ondestroy);this.pause();n({value:e,done:!!this[Ie]})};const onend=()=>{this.off("error",onerr);this.off("data",ondata);this.off(st,ondestroy);stop();n({done:true,value:undefined})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((e,t)=>{r=t;n=e;this.once(st,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next,throw:stop,return:stop,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[dt]=false;let e=false;const stop=()=>{this.pause();this.off(it,stop);this.off(st,stop);this.off("end",stop);e=true;return{done:true,value:undefined}};const next=()=>{if(e)return stop();const t=this.read();return t===null?stop():{done:false,value:t}};this.once("end",stop);this.once(it,stop);this.once(st,stop);return{next:next,throw:stop,return:stop,[Symbol.iterator](){return this}}}destroy(e){if(this[st]){if(e)this.emit("error",e);else this.emit(st);return this}this[st]=true;this[dt]=true;this[Xe].length=0;this[et]=0;const t=this;if(typeof t.close==="function"&&!this[qe])t.close();if(e)this.emit("error",e);else this.emit(st);return this}static get isStream(){return isStream}}const mt=Te.realpathSync.native;const gt={lstatSync:Te.lstatSync,readdir:Te.readdir,readdirSync:Te.readdirSync,readlinkSync:Te.readlinkSync,realpathSync:mt,promises:{lstat:J.lstat,readdir:J.readdir,readlink:J.readlink,realpath:J.realpath}};const fsFromOption=e=>!e||e===gt||e===Be?gt:{...gt,...e,promises:{...gt.promises,...e.promises||{}}};const yt=/^\\\\\?\\([a-z]:)\\?$/i;const uncToDrive=e=>e.replace(/\//g,"\\").replace(yt,"$1\\");const bt=/[\\\/]/;const vt=0;const wt=1;const St=2;const At=4;const Et=6;const Dt=8;const Ct=10;const _t=12;const kt=15;const Ft=~kt;const xt=16;const Ot=32;const Pt=64;const Tt=128;const Bt=256;const Nt=512;const Rt=Pt|Tt|Nt;const Lt=1023;const entToType=e=>e.isFile()?Dt:e.isDirectory()?At:e.isSymbolicLink()?Ct:e.isCharacterDevice()?St:e.isBlockDevice()?Et:e.isSocket()?_t:e.isFIFO()?wt:vt;const Mt=new Map;const normalize=e=>{const t=Mt.get(e);if(t)return t;const n=e.normalize("NFKD");Mt.set(e,n);return n};const It=new Map;const normalizeNocase=e=>{const t=It.get(e);if(t)return t;const n=normalize(e.toLowerCase());It.set(e,n);return n};class ResolveCache extends LRUCache{constructor(){super({max:256})}}class ChildrenCache extends LRUCache{constructor(e=16*1024){super({maxSize:e,sizeCalculation:e=>e.length+1})}}const $t=Symbol("PathScurry setAsCwd");class PathBase{name;root;roots;parent;nocase;#te;#ne;get dev(){return this.#ne}#re;get mode(){return this.#re}#se;get nlink(){return this.#se}#ie;get uid(){return this.#ie}#oe;get gid(){return this.#oe}#ae;get rdev(){return this.#ae}#ue;get blksize(){return this.#ue}#ce;get ino(){return this.#ce}#S;get size(){return this.#S}#le;get blocks(){return this.#le}#fe;get atimeMs(){return this.#fe}#he;get mtimeMs(){return this.#he}#pe;get ctimeMs(){return this.#pe}#de;get birthtimeMs(){return this.#de}#me;get atime(){return this.#me}#ge;get mtime(){return this.#ge}#ye;get ctime(){return this.#ye}#be;get birthtime(){return this.#be}#ve;#we;#Se;#Ae;#Ee;#De;#Ce;#_e;#ke;#Fe;get path(){return(this.parent||this).fullpath()}constructor(e,t=vt,n,r,s,i,o){this.name=e;this.#ve=s?normalizeNocase(e):normalize(e);this.#Ce=t≪this.nocase=s;this.roots=r;this.root=n||this;this.#_e=i;this.#Se=o.fullpath;this.#Ee=o.relative;this.#De=o.relativePosix;this.parent=o.parent;if(this.parent){this.#te=this.parent.#te}else{this.#te=fsFromOption(o.fs)}}depth(){if(this.#we!==undefined)return this.#we;if(!this.parent)return this.#we=0;return this.#we=this.parent.depth()+1}childrenCache(){return this.#_e}resolve(e){if(!e){return this}const t=this.getRootString(e);const n=e.substring(t.length);const r=n.split(this.splitSep);const s=t?this.getRoot(t).#xe(r):this.#xe(r);return s}#xe(e){let t=this;for(const n of e){t=t.child(n)}return t}children(){const e=this.#_e.get(this);if(e){return e}const t=Object.assign([],{provisional:0});this.#_e.set(this,t);this.#Ce&=~xt;return t}child(e,t){if(e===""||e==="."){return this}if(e===".."){return this.parent||this}const n=this.children();const r=this.nocase?normalizeNocase(e):normalize(e);for(const e of n){if(e.#ve===r){return e}}const s=this.parent?this.sep:"";const i=this.#Se?this.#Se+s+e:undefined;const o=this.newChild(e,vt,{...t,parent:this,fullpath:i});if(!this.canReaddir()){o.#Ce|=Tt}n.push(o);return o}relative(){if(this.#Ee!==undefined){return this.#Ee}const e=this.name;const t=this.parent;if(!t){return this.#Ee=this.name}const n=t.relative();return n+(!n||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.#De!==undefined)return this.#De;const e=this.name;const t=this.parent;if(!t){return this.#De=this.fullpathPosix()}const n=t.relativePosix();return n+(!n||!t.parent?"":"/")+e}fullpath(){if(this.#Se!==undefined){return this.#Se}const e=this.name;const t=this.parent;if(!t){return this.#Se=this.name}const n=t.fullpath();const r=n+(!t.parent?"":this.sep)+e;return this.#Se=r}fullpathPosix(){if(this.#Ae!==undefined)return this.#Ae;if(this.sep==="/")return this.#Ae=this.fullpath();if(!this.parent){const e=this.fullpath().replace(/\\/g,"/");if(/^[a-z]:\//i.test(e)){return this.#Ae=`//?/${e}`}else{return this.#Ae=e}}const e=this.parent;const t=e.fullpathPosix();const n=t+(!t||!e.parent?"":"/")+this.name;return this.#Ae=n}isUnknown(){return(this.#Ce&kt)===vt}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#Ce&kt)===Dt}isDirectory(){return(this.#Ce&kt)===At}isCharacterDevice(){return(this.#Ce&kt)===St}isBlockDevice(){return(this.#Ce&kt)===Et}isFIFO(){return(this.#Ce&kt)===wt}isSocket(){return(this.#Ce&kt)===_t}isSymbolicLink(){return(this.#Ce&Ct)===Ct}lstatCached(){return this.#Ce&Ot?this:undefined}readlinkCached(){return this.#ke}realpathCached(){return this.#Fe}readdirCached(){const e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#ke)return true;if(!this.parent)return false;const e=this.#Ce&kt;return!(e!==vt&&e!==Ct||this.#Ce&Bt||this.#Ce&Tt)}calledReaddir(){return!!(this.#Ce&xt)}isENOENT(){return!!(this.#Ce&Tt)}isNamed(e){return!this.nocase?this.#ve===normalize(e):this.#ve===normalizeNocase(e)}async readlink(){const e=this.#ke;if(e){return e}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const e=await this.#te.promises.readlink(this.fullpath());const t=this.parent.resolve(e);if(t){return this.#ke=t}}catch(e){this.#Oe(e.code);return undefined}}readlinkSync(){const e=this.#ke;if(e){return e}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const e=this.#te.readlinkSync(this.fullpath());const t=this.parent.resolve(e);if(t){return this.#ke=t}}catch(e){this.#Oe(e.code);return undefined}}#Pe(e){this.#Ce|=xt;for(let t=e.provisional;t<e.length;t++){e[t].#Te()}}#Te(){if(this.#Ce&Tt)return;this.#Ce=(this.#Ce|Tt)&Ft;this.#Be()}#Be(){const e=this.children();e.provisional=0;for(const t of e){t.#Te()}}#Ne(){this.#Ce|=Nt;this.#Re()}#Re(){if(this.#Ce&Pt)return;let e=this.#Ce;if((e&kt)===At)e&=Ft;this.#Ce=e|Pt;this.#Be()}#Le(e=""){if(e==="ENOTDIR"||e==="EPERM"){this.#Re()}else if(e==="ENOENT"){this.#Te()}else{this.children().provisional=0}}#Me(e=""){if(e==="ENOTDIR"){const e=this.parent;e.#Re()}else if(e==="ENOENT"){this.#Te()}}#Oe(e=""){let t=this.#Ce;t|=Bt;if(e==="ENOENT")t|=Tt;if(e==="EINVAL"||e==="UNKNOWN"){t&=Ft}this.#Ce=t;if(e==="ENOTDIR"&&this.parent){this.parent.#Re()}}#Ie(e,t){return this.#$e(e,t)||this.#je(e,t)}#je(e,t){const n=entToType(e);const r=this.newChild(e.name,n,{parent:this});const s=r.#Ce&kt;if(s!==At&&s!==Ct&&s!==vt){r.#Ce|=Pt}t.unshift(r);t.provisional++;return r}#$e(e,t){for(let n=t.provisional;n<t.length;n++){const r=t[n];const s=this.nocase?normalizeNocase(e.name):normalize(e.name);if(s!==r.#ve){continue}return this.#He(e,r,n,t)}}#He(e,t,n,r){const s=t.name;t.#Ce=t.#Ce&Ft|entToType(e);if(s!==e.name)t.name=e.name;if(n!==r.provisional){if(n===r.length-1)r.pop();else r.splice(n,1);r.unshift(t)}r.provisional++;return t}async lstat(){if((this.#Ce&Tt)===0){try{this.#We(await this.#te.promises.lstat(this.fullpath()));return this}catch(e){this.#Me(e.code)}}}lstatSync(){if((this.#Ce&Tt)===0){try{this.#We(this.#te.lstatSync(this.fullpath()));return this}catch(e){this.#Me(e.code)}}}#We(e){const{atime:t,atimeMs:n,birthtime:r,birthtimeMs:s,blksize:i,blocks:o,ctime:a,ctimeMs:u,dev:c,gid:l,ino:f,mode:h,mtime:p,mtimeMs:d,nlink:g,rdev:y,size:b,uid:v}=e;this.#me=t;this.#fe=n;this.#be=r;this.#de=s;this.#ue=i;this.#le=o;this.#ye=a;this.#pe=u;this.#ne=c;this.#oe=l;this.#ce=f;this.#re=h;this.#ge=p;this.#he=d;this.#se=g;this.#ae=y;this.#S=b;this.#ie=v;const w=entToType(e);this.#Ce=this.#Ce&Ft|w|Ot;if(w!==vt&&w!==At&&w!==Ct){this.#Ce|=Pt}}#qe=[];#Ue=false;#Ge(e){this.#Ue=false;const t=this.#qe.slice();this.#qe.length=0;t.forEach((t=>t(null,e)))}readdirCB(e,t=false){if(!this.canReaddir()){if(t)e(null,[]);else queueMicrotask((()=>e(null,[])));return}const n=this.children();if(this.calledReaddir()){const r=n.slice(0,n.provisional);if(t)e(null,r);else queueMicrotask((()=>e(null,r)));return}this.#qe.push(e);if(this.#Ue){return}this.#Ue=true;const r=this.fullpath();this.#te.readdir(r,{withFileTypes:true},((e,t)=>{if(e){this.#Le(e.code);n.provisional=0}else{for(const e of t){this.#Ie(e,n)}this.#Pe(n)}this.#Ge(n.slice(0,n.provisional));return}))}#Ve;async readdir(){if(!this.canReaddir()){return[]}const e=this.children();if(this.calledReaddir()){return e.slice(0,e.provisional)}const t=this.fullpath();if(this.#Ve){await this.#Ve}else{let resolve=()=>{};this.#Ve=new Promise((e=>resolve=e));try{for(const n of await this.#te.promises.readdir(t,{withFileTypes:true})){this.#Ie(n,e)}this.#Pe(e)}catch(t){this.#Le(t.code);e.provisional=0}this.#Ve=undefined;resolve()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir()){return[]}const e=this.children();if(this.calledReaddir()){return e.slice(0,e.provisional)}const t=this.fullpath();try{for(const n of this.#te.readdirSync(t,{withFileTypes:true})){this.#Ie(n,e)}this.#Pe(e)}catch(t){this.#Le(t.code);e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#Ce&Rt)return false;const e=kt&this.#Ce;if(!(e===vt||e===At||e===Ct)){return false}return true}shouldWalk(e,t){return(this.#Ce&At)===At&&!(this.#Ce&Rt)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#Fe)return this.#Fe;if((Nt|Bt|Tt)&this.#Ce)return undefined;try{const e=await this.#te.promises.realpath(this.fullpath());return this.#Fe=this.resolve(e)}catch(e){this.#Ne()}}realpathSync(){if(this.#Fe)return this.#Fe;if((Nt|Bt|Tt)&this.#Ce)return undefined;try{const e=this.#te.realpathSync(this.fullpath());return this.#Fe=this.resolve(e)}catch(e){this.#Ne()}}[$t](e){if(e===this)return;const t=new Set([]);let n=[];let r=this;while(r&&r.parent){t.add(r);r.#Ee=n.join(this.sep);r.#De=n.join("/");r=r.parent;n.push("..")}r=e;while(r&&r.parent&&!t.has(r)){r.#Ee=undefined;r.#De=undefined;r=r.parent}}}class PathWin32 extends PathBase{sep="\\";splitSep=bt;constructor(e,t=vt,n,r,s,i,o){super(e,t,n,r,s,i,o)}newChild(e,t=vt,n={}){return new PathWin32(e,t,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(e){return Oe.win32.parse(e).root}getRoot(e){e=uncToDrive(e.toUpperCase());if(e===this.root.name){return this.root}for(const[t,n]of Object.entries(this.roots)){if(this.sameRoot(e,t)){return this.roots[e]=n}}return this.roots[e]=new PathScurryWin32(e,this).root}sameRoot(e,t=this.root.name){e=e.toUpperCase().replace(/\//g,"\\").replace(yt,"$1\\");return e===t}}class PathPosix extends PathBase{splitSep="/";sep="/";constructor(e,t=vt,n,r,s,i,o){super(e,t,n,r,s,i,o)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=vt,n={}){return new PathPosix(e,t,this.root,this.roots,this.nocase,this.childrenCache(),n)}}class PathScurryBase{root;rootPath;roots;cwd;#Ke;#ze;#_e;nocase;#te;constructor(e=process.cwd(),t,n,{nocase:r,childrenCacheSize:s=16*1024,fs:i=gt}={}){this.#te=fsFromOption(i);if(e instanceof URL||e.startsWith("file://")){e=(0,Pe.fileURLToPath)(e)}const o=t.resolve(e);this.roots=Object.create(null);this.rootPath=this.parseRootPath(o);this.#Ke=new ResolveCache;this.#ze=new ResolveCache;this.#_e=new ChildrenCache(s);const a=o.substring(this.rootPath.length).split(n);if(a.length===1&&!a[0]){a.pop()}if(r===undefined){throw new TypeError("must provide nocase setting to PathScurryBase ctor")}this.nocase=r;this.root=this.newRoot(this.#te);this.roots[this.rootPath]=this.root;let u=this.root;let c=a.length-1;const l=t.sep;let f=this.rootPath;let h=false;for(const e of a){const t=c--;u=u.child(e,{relative:new Array(t).fill("..").join(l),relativePosix:new Array(t).fill("..").join("/"),fullpath:f+=(h?"":l)+e});h=true}this.cwd=u}depth(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.depth()}childrenCache(){return this.#_e}resolve(...e){let t="";for(let n=e.length-1;n>=0;n--){const r=e[n];if(!r||r===".")continue;t=t?`${r}/${t}`:r;if(this.isAbsolute(r)){break}}const n=this.#Ke.get(t);if(n!==undefined){return n}const r=this.cwd.resolve(t).fullpath();this.#Ke.set(t,r);return r}resolvePosix(...e){let t="";for(let n=e.length-1;n>=0;n--){const r=e[n];if(!r||r===".")continue;t=t?`${r}/${t}`:r;if(this.isAbsolute(r)){break}}const n=this.#ze.get(t);if(n!==undefined){return n}const r=this.cwd.resolve(t).fullpathPosix();this.#ze.set(t,r);return r}relative(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.relative()}relativePosix(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.relativePosix()}basename(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.name}dirname(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:true}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:n}=t;if(!e.canReaddir()){return[]}else{const t=await e.readdir();return n?t:t.map((e=>e.name))}}readdirSync(e=this.cwd,t={withFileTypes:true}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:n=true}=t;if(!e.canReaddir()){return[]}else if(n){return e.readdirSync()}else{return e.readdirSync().map((e=>e.name))}}async lstat(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.lstat()}lstatSync(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const n=await e.readlink();return t?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const n=e.readlinkSync();return t?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const n=await e.realpath();return t?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const n=e.realpathSync();return t?n:n?.fullpath()}async walk(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:n=true,follow:r=false,filter:s,walkFilter:i}=t;const o=[];if(!s||s(e)){o.push(n?e:e.fullpath())}const a=new Set;const walk=(e,t)=>{a.add(e);e.readdirCB(((e,u)=>{if(e){return t(e)}let c=u.length;if(!c)return t();const next=()=>{if(--c===0){t()}};for(const e of u){if(!s||s(e)){o.push(n?e:e.fullpath())}if(r&&e.isSymbolicLink()){e.realpath().then((e=>e?.isUnknown()?e.lstat():e)).then((e=>e?.shouldWalk(a,i)?walk(e,next):next()))}else{if(e.shouldWalk(a,i)){walk(e,next)}else{next()}}}}),true)};const u=e;return new Promise(((e,t)=>{walk(u,(n=>{if(n)return t(n);e(o)}))}))}walkSync(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:n=true,follow:r=false,filter:s,walkFilter:i}=t;const o=[];if(!s||s(e)){o.push(n?e:e.fullpath())}const a=new Set([e]);for(const e of a){const t=e.readdirSync();for(const e of t){if(!s||s(e)){o.push(n?e:e.fullpath())}let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;if(t.isUnknown())t.lstatSync()}if(t.shouldWalk(a,i)){a.add(t)}}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}return this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:n=true,follow:r=false,filter:s,walkFilter:i}=t;if(!s||s(e)){yield n?e:e.fullpath()}const o=new Set([e]);for(const e of o){const t=e.readdirSync();for(const e of t){if(!s||s(e)){yield n?e:e.fullpath()}let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;if(t.isUnknown())t.lstatSync()}if(t.shouldWalk(o,i)){o.add(t)}}}}stream(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:n=true,follow:r=false,filter:s,walkFilter:i}=t;const o=new Minipass({objectMode:true});if(!s||s(e)){o.write(n?e:e.fullpath())}const a=new Set;const u=[e];let c=0;const process=()=>{let e=false;while(!e){const t=u.shift();if(!t){if(c===0)o.end();return}c++;a.add(t);const onReaddir=(t,f,h=false)=>{if(t)return o.emit("error",t);if(r&&!h){const e=[];for(const t of f){if(t.isSymbolicLink()){e.push(t.realpath().then((e=>e?.isUnknown()?e.lstat():e)))}}if(e.length){Promise.all(e).then((()=>onReaddir(null,f,true)));return}}for(const t of f){if(t&&(!s||s(t))){if(!o.write(n?t:t.fullpath())){e=true}}}c--;for(const e of f){const t=e.realpathCached()||e;if(t.shouldWalk(a,i)){u.push(t)}}if(e&&!o.flowing){o.once("drain",process)}else if(!l){process()}};let l=true;t.readdirCB(onReaddir,true);l=false}};process();return o}streamSync(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:n=true,follow:r=false,filter:s,walkFilter:i}=t;const o=new Minipass({objectMode:true});const a=new Set;if(!s||s(e)){o.write(n?e:e.fullpath())}const u=[e];let c=0;const process=()=>{let e=false;while(!e){const t=u.shift();if(!t){if(c===0)o.end();return}c++;a.add(t);const l=t.readdirSync();for(const t of l){if(!s||s(t)){if(!o.write(n?t:t.fullpath())){e=true}}}c--;for(const e of l){let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;if(t.isUnknown())t.lstatSync()}if(t.shouldWalk(a,i)){u.push(t)}}}if(e&&!o.flowing)o.once("drain",process)};process();return o}chdir(e=this.cwd){const t=this.cwd;this.cwd=typeof e==="string"?this.cwd.resolve(e):e;this.cwd[$t](t)}}class PathScurryWin32 extends PathScurryBase{sep="\\";constructor(e=process.cwd(),t={}){const{nocase:n=true}=t;super(e,Oe.win32,"\\",{...t,nocase:n});this.nocase=n;for(let e=this.cwd;e;e=e.parent){e.nocase=this.nocase}}parseRootPath(e){return Oe.win32.parse(e).root.toUpperCase()}newRoot(e){return new PathWin32(this.rootPath,At,undefined,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}}class PathScurryPosix extends PathScurryBase{sep="/";constructor(e=process.cwd(),t={}){const{nocase:n=false}=t;super(e,Oe.posix,"/",{...t,nocase:n});this.nocase=n}parseRootPath(e){return"/"}newRoot(e){return new PathPosix(this.rootPath,At,undefined,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}}class PathScurryDarwin extends PathScurryPosix{constructor(e=process.cwd(),t={}){const{nocase:n=true}=t;super(e,{...t,nocase:n})}}const jt=process.platform==="win32"?PathWin32:PathPosix;const Ht=process.platform==="win32"?PathScurryWin32:process.platform==="darwin"?PathScurryDarwin:PathScurryPosix;const isPatternList=e=>e.length>=1;const isGlobList=e=>e.length>=1;class Pattern{#Ye;#Je;#Qe;length;#Xe;#Ze;#et;#tt;#nt;#rt;#st=true;constructor(e,t,n,r){if(!isPatternList(e)){throw new TypeError("empty pattern list")}if(!isGlobList(t)){throw new TypeError("empty glob list")}if(t.length!==e.length){throw new TypeError("mismatched pattern list and glob list lengths")}this.length=e.length;if(n<0||n>=this.length){throw new TypeError("index out of range")}this.#Ye=e;this.#Je=t;this.#Qe=n;this.#Xe=r;if(this.#Qe===0){if(this.isUNC()){const[e,t,n,r,...s]=this.#Ye;const[i,o,a,u,...c]=this.#Je;if(s[0]===""){s.shift();c.shift()}const l=[e,t,n,r,""].join("/");const f=[i,o,a,u,""].join("/");this.#Ye=[l,...s];this.#Je=[f,...c];this.length=this.#Ye.length}else if(this.isDrive()||this.isAbsolute()){const[e,...t]=this.#Ye;const[n,...r]=this.#Je;if(t[0]===""){t.shift();r.shift()}const s=e+"/";const i=n+"/";this.#Ye=[s,...t];this.#Je=[i,...r];this.length=this.#Ye.length}}}pattern(){return this.#Ye[this.#Qe]}isString(){return typeof this.#Ye[this.#Qe]==="string"}isGlobstar(){return this.#Ye[this.#Qe]===be}isRegExp(){return this.#Ye[this.#Qe]instanceof RegExp}globString(){return this.#et=this.#et||(this.#Qe===0?this.isAbsolute()?this.#Je[0]+this.#Je.slice(1).join("/"):this.#Je.join("/"):this.#Je.slice(this.#Qe).join("/"))}hasMore(){return this.length>this.#Qe+1}rest(){if(this.#Ze!==undefined)return this.#Ze;if(!this.hasMore())return this.#Ze=null;this.#Ze=new Pattern(this.#Ye,this.#Je,this.#Qe+1,this.#Xe);this.#Ze.#rt=this.#rt;this.#Ze.#nt=this.#nt;this.#Ze.#tt=this.#tt;return this.#Ze}isUNC(){const e=this.#Ye;return this.#nt!==undefined?this.#nt:this.#nt=this.#Xe==="win32"&&this.#Qe===0&&e[0]===""&&e[1]===""&&typeof e[2]==="string"&&!!e[2]&&typeof e[3]==="string"&&!!e[3]}isDrive(){const e=this.#Ye;return this.#tt!==undefined?this.#tt:this.#tt=this.#Xe==="win32"&&this.#Qe===0&&this.length>1&&typeof e[0]==="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){const e=this.#Ye;return this.#rt!==undefined?this.#rt:this.#rt=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){const e=this.#Ye[0];return typeof e==="string"&&this.isAbsolute()&&this.#Qe===0?e:""}checkFollowGlobstar(){return!(this.#Qe===0||!this.isGlobstar()||!this.#st)}markFollowGlobstar(){if(this.#Qe===0||!this.isGlobstar()||!this.#st)return false;this.#st=false;return true}}const Wt=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Ignore{relative;relativeChildren;absolute;absoluteChildren;constructor(e,{nobrace:t,nocase:n,noext:r,noglobstar:s,platform:i=Wt}){this.relative=[];this.absolute=[];this.relativeChildren=[];this.absoluteChildren=[];const o={dot:true,nobrace:t,nocase:n,noext:r,noglobstar:s,optimizationLevel:2,platform:i,nocomment:true,nonegate:true};for(const t of e){const e=new Minimatch(t,o);for(let t=0;t<e.set.length;t++){const n=e.set[t];const r=e.globParts[t];if(!n||!r){throw new Error("invalid pattern object")}const s=new Pattern(n,r,0,i);const a=new Minimatch(s.globString(),o);const u=r[r.length-1]==="**";const c=s.isAbsolute();if(c)this.absolute.push(a);else this.relative.push(a);if(u){if(c)this.absoluteChildren.push(a);else this.relativeChildren.push(a)}}}}ignored(e){const t=e.fullpath();const n=`${t}/`;const r=e.relative()||".";const s=`${r}/`;for(const e of this.relative){if(e.match(r)||e.match(s))return true}for(const e of this.absolute){if(e.match(t)||e.match(n))return true}return false}childrenIgnored(e){const t=e.fullpath()+"/";const n=(e.relative()||".")+"/";for(const e of this.relativeChildren){if(e.match(n))return true}for(const e of this.absoluteChildren){if(e.match(t))return true}return false}}class HasWalkedCache{store;constructor(e=new Map){this.store=e}copy(){return new HasWalkedCache(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){const n=e.fullpath();const r=this.store.get(n);if(r)r.add(t.globString());else this.store.set(n,new Set([t.globString()]))}}class MatchRecord{store=new Map;add(e,t,n){const r=(t?2:0)|(n?1:0);const s=this.store.get(e);this.store.set(e,s===undefined?r:r&s)}entries(){return[...this.store.entries()].map((([e,t])=>[e,!!(t&2),!!(t&1)]))}}class SubWalks{store=new Map;add(e,t){if(!e.canReaddir()){return}const n=this.store.get(e);if(n){if(!n.find((e=>e.globString()===t.globString()))){n.push(t)}}else this.store.set(e,[t])}get(e){const t=this.store.get(e);if(!t){throw new Error("attempting to walk unknown path")}return t}entries(){return this.keys().map((e=>[e,this.store.get(e)]))}keys(){return[...this.store.keys()].filter((e=>e.canReaddir()))}}class Processor{hasWalkedCache;matches=new MatchRecord;subwalks=new SubWalks;patterns;follow;dot;opts;constructor(e,t){this.opts=e;this.follow=!!e.follow;this.dot=!!e.dot;this.hasWalkedCache=t?t.copy():new HasWalkedCache}processPatterns(e,t){this.patterns=t;const n=t.map((t=>[e,t]));for(let[e,t]of n){this.hasWalkedCache.storeWalked(e,t);const n=t.root();const r=t.isAbsolute()&&this.opts.absolute!==false;if(n){e=e.resolve(n==="/"&&this.opts.root!==undefined?this.opts.root:n);const r=t.rest();if(!r){this.matches.add(e,true,false);continue}else{t=r}}if(e.isENOENT())continue;let s;let i;let o=false;while(typeof(s=t.pattern())==="string"&&(i=t.rest())){const n=e.resolve(s);e=n;t=i;o=true}s=t.pattern();i=t.rest();if(o){if(this.hasWalkedCache.hasWalked(e,t))continue;this.hasWalkedCache.storeWalked(e,t)}if(typeof s==="string"){const t=s===".."||s===""||s===".";this.matches.add(e.resolve(s),r,t);continue}else if(s===be){if(!e.isSymbolicLink()||this.follow||t.checkFollowGlobstar()){this.subwalks.add(e,t)}const n=i?.pattern();const s=i?.rest();if(!i||(n===""||n===".")&&!s){this.matches.add(e,r,n===""||n===".")}else{if(n===".."){const t=e.parent||e;if(!s)this.matches.add(t,r,true);else if(!this.hasWalkedCache.hasWalked(t,s)){this.subwalks.add(t,s)}}}}else if(s instanceof RegExp){this.subwalks.add(e,t)}}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new Processor(this.opts,this.hasWalkedCache)}filterEntries(e,t){const n=this.subwalks.get(e);const r=this.child();for(const e of t){for(const t of n){const n=t.isAbsolute();const s=t.pattern();const i=t.rest();if(s===be){r.testGlobstar(e,t,i,n)}else if(s instanceof RegExp){r.testRegExp(e,s,i,n)}else{r.testString(e,s,i,n)}}}return r}testGlobstar(e,t,n,r){if(this.dot||!e.name.startsWith(".")){if(!t.hasMore()){this.matches.add(e,r,false)}if(e.canReaddir()){if(this.follow||!e.isSymbolicLink()){this.subwalks.add(e,t)}else if(e.isSymbolicLink()){if(n&&t.checkFollowGlobstar()){this.subwalks.add(e,n)}else if(t.markFollowGlobstar()){this.subwalks.add(e,t)}}}}if(n){const t=n.pattern();if(typeof t==="string"&&t!==".."&&t!==""&&t!=="."){this.testString(e,t,n.rest(),r)}else if(t===".."){const t=e.parent||e;this.subwalks.add(t,n)}else if(t instanceof RegExp){this.testRegExp(e,t,n.rest(),r)}}}testRegExp(e,t,n,r){if(!t.test(e.name))return;if(!n){this.matches.add(e,r,false)}else{this.subwalks.add(e,n)}}testString(e,t,n,r){if(!e.isNamed(t))return;if(!n){this.matches.add(e,r,false)}else{this.subwalks.add(e,n)}}}const makeIgnore=(e,t)=>typeof e==="string"?new Ignore([e],t):Array.isArray(e)?new Ignore(e,t):e;class GlobUtil{path;patterns;opts;seen=new Set;paused=false;aborted=false;#it=[];#ot;#at;signal;maxDepth;constructor(e,t,n){this.patterns=e;this.path=t;this.opts=n;this.#at=!n.posix&&n.platform==="win32"?"\\":"/";if(n.ignore){this.#ot=makeIgnore(n.ignore,n)}this.maxDepth=n.maxDepth||Infinity;if(n.signal){this.signal=n.signal;this.signal.addEventListener("abort",(()=>{this.#it.length=0}))}}#ut(e){return this.seen.has(e)||!!this.#ot?.ignored?.(e)}#ct(e){return!!this.#ot?.childrenIgnored?.(e)}pause(){this.paused=true}resume(){if(this.signal?.aborted)return;this.paused=false;let e=undefined;while(!this.paused&&(e=this.#it.shift())){e()}}onResume(e){if(this.signal?.aborted)return;if(!this.paused){e()}else{this.#it.push(e)}}async matchCheck(e,t){if(t&&this.opts.nodir)return undefined;let n;if(this.opts.realpath){n=e.realpathCached()||await e.realpath();if(!n)return undefined;e=n}const r=e.isUnknown()||this.opts.stat;return this.matchCheckTest(r?await e.lstat():e,t)}matchCheckTest(e,t){return e&&(this.maxDepth===Infinity||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&!this.#ut(e)?e:undefined}matchCheckSync(e,t){if(t&&this.opts.nodir)return undefined;let n;if(this.opts.realpath){n=e.realpathCached()||e.realpathSync();if(!n)return undefined;e=n}const r=e.isUnknown()||this.opts.stat;return this.matchCheckTest(r?e.lstatSync():e,t)}matchFinish(e,t){if(this.#ut(e))return;const n=this.opts.absolute===undefined?t:this.opts.absolute;this.seen.add(e);const r=this.opts.mark&&e.isDirectory()?this.#at:"";if(this.opts.withFileTypes){this.matchEmit(e)}else if(n){const t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+r)}else{const t=this.opts.posix?e.relativePosix():e.relative();const n=this.opts.dotRelative&&!t.startsWith(".."+this.#at)?"."+this.#at:"";this.matchEmit(!t?"."+r:n+t+r)}}async match(e,t,n){const r=await this.matchCheck(e,n);if(r)this.matchFinish(r,t)}matchSync(e,t,n){const r=this.matchCheckSync(e,n);if(r)this.matchFinish(r,t)}walkCB(e,t,n){if(this.signal?.aborted)n();this.walkCB2(e,t,new Processor(this.opts),n)}walkCB2(e,t,n,r){if(this.#ct(e))return r();if(this.signal?.aborted)r();if(this.paused){this.onResume((()=>this.walkCB2(e,t,n,r)));return}n.processPatterns(e,t);let s=1;const next=()=>{if(--s===0)r()};for(const[e,t,r]of n.matches.entries()){if(this.#ut(e))continue;s++;this.match(e,t,r).then((()=>next()))}for(const e of n.subwalkTargets()){if(this.maxDepth!==Infinity&&e.depth()>=this.maxDepth){continue}s++;const t=e.readdirCached();if(e.calledReaddir())this.walkCB3(e,t,n,next);else{e.readdirCB(((t,r)=>this.walkCB3(e,r,n,next)),true)}}next()}walkCB3(e,t,n,r){n=n.filterEntries(e,t);let s=1;const next=()=>{if(--s===0)r()};for(const[e,t,r]of n.matches.entries()){if(this.#ut(e))continue;s++;this.match(e,t,r).then((()=>next()))}for(const[e,t]of n.subwalks.entries()){s++;this.walkCB2(e,t,n.child(),next)}next()}walkCBSync(e,t,n){if(this.signal?.aborted)n();this.walkCB2Sync(e,t,new Processor(this.opts),n)}walkCB2Sync(e,t,n,r){if(this.#ct(e))return r();if(this.signal?.aborted)r();if(this.paused){this.onResume((()=>this.walkCB2Sync(e,t,n,r)));return}n.processPatterns(e,t);let s=1;const next=()=>{if(--s===0)r()};for(const[e,t,r]of n.matches.entries()){if(this.#ut(e))continue;this.matchSync(e,t,r)}for(const e of n.subwalkTargets()){if(this.maxDepth!==Infinity&&e.depth()>=this.maxDepth){continue}s++;const t=e.readdirSync();this.walkCB3Sync(e,t,n,next)}next()}walkCB3Sync(e,t,n,r){n=n.filterEntries(e,t);let s=1;const next=()=>{if(--s===0)r()};for(const[e,t,r]of n.matches.entries()){if(this.#ut(e))continue;this.matchSync(e,t,r)}for(const[e,t]of n.subwalks.entries()){s++;this.walkCB2Sync(e,t,n.child(),next)}next()}}class GlobWalker extends GlobUtil{matches;constructor(e,t,n){super(e,t,n);this.matches=new Set}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){await this.path.lstat()}await new Promise(((e,t)=>{this.walkCB(this.path,this.patterns,(()=>{if(this.signal?.aborted){t(this.signal.reason)}else{e(this.matches)}}))}));return this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){this.path.lstatSync()}this.walkCBSync(this.path,this.patterns,(()=>{if(this.signal?.aborted)throw this.signal.reason}));return this.matches}}class GlobStream extends GlobUtil{results;constructor(e,t,n){super(e,t,n);this.results=new Minipass({signal:this.signal,objectMode:true});this.results.on("drain",(()=>this.resume()));this.results.on("resume",(()=>this.resume()))}matchEmit(e){this.results.write(e);if(!this.results.flowing)this.pause()}stream(){const e=this.path;if(e.isUnknown()){e.lstat().then((()=>{this.walkCB(e,this.patterns,(()=>this.results.end()))}))}else{this.walkCB(e,this.patterns,(()=>this.results.end()))}return this.results}streamSync(){if(this.path.isUnknown()){this.path.lstatSync()}this.walkCBSync(this.path,this.patterns,(()=>this.results.end()));return this.results}}const qt=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Glob{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");this.withFileTypes=!!t.withFileTypes;this.signal=t.signal;this.follow=!!t.follow;this.dot=!!t.dot;this.dotRelative=!!t.dotRelative;this.nodir=!!t.nodir;this.mark=!!t.mark;if(!t.cwd){this.cwd=""}else if(t.cwd instanceof URL||t.cwd.startsWith("file://")){t.cwd=(0,Pe.fileURLToPath)(t.cwd)}this.cwd=t.cwd||"";this.root=t.root;this.magicalBraces=!!t.magicalBraces;this.nobrace=!!t.nobrace;this.noext=!!t.noext;this.realpath=!!t.realpath;this.absolute=t.absolute;this.noglobstar=!!t.noglobstar;this.matchBase=!!t.matchBase;this.maxDepth=typeof t.maxDepth==="number"?t.maxDepth:Infinity;this.stat=!!t.stat;this.ignore=t.ignore;if(this.withFileTypes&&this.absolute!==undefined){throw new Error("cannot set absolute and withFileTypes:true")}if(typeof e==="string"){e=[e]}this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===false;if(this.windowsPathsNoEscape){e=e.map((e=>e.replace(/\\/g,"/")))}if(this.matchBase){if(t.noglobstar){throw new TypeError("base matching requires globstar")}e=e.map((e=>e.includes("/")?e:`./**/${e}`))}this.pattern=e;this.platform=t.platform||qt;this.opts={...t,platform:this.platform};if(t.scurry){this.scurry=t.scurry;if(t.nocase!==undefined&&t.nocase!==t.scurry.nocase){throw new Error("nocase option contradicts provided scurry option")}}else{const e=t.platform==="win32"?PathScurryWin32:t.platform==="darwin"?PathScurryDarwin:t.platform?PathScurryPosix:Ht;this.scurry=new e(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;const n=this.platform==="darwin"||this.platform==="win32";const r={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:true,noext:this.noext,nonegate:true,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug};const s=this.pattern.map((e=>new Minimatch(e,r)));const[i,o]=s.reduce(((e,t)=>{e[0].push(...t.set);e[1].push(...t.globParts);return e}),[[],[]]);this.patterns=i.map(((e,t)=>{const n=o[t];if(!n)throw new Error("invalid pattern object");return new Pattern(e,n,0,this.platform)}))}async walk(){return[...await new GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase}).walk()]}walkSync(){return[...new GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase}).walkSync()]}stream(){return new GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase}).stream()}streamSync(){return new GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}const hasMagic=(e,t={})=>{if(!Array.isArray(e)){e=[e]}for(const n of e){if(new Minimatch(n,t).hasMagic())return true}return false};function globStreamSync(e,t={}){return new Glob(e,t).streamSync()}function globStream(e,t={}){return new Glob(e,t).stream()}function globSync(e,t={}){return new Glob(e,t).walkSync()}async function glob_(e,t={}){return new Glob(e,t).walk()}function globIterateSync(e,t={}){return new Glob(e,t).iterateSync()}function globIterate(e,t={}){return new Glob(e,t).iterate()}const Ut=globStreamSync;const Gt=Object.assign(globStream,{sync:globStreamSync});const Vt=globIterateSync;const Kt=Object.assign(globIterate,{sync:globIterateSync});const zt=Object.assign(globSync,{stream:globStreamSync,iterate:globIterateSync});const Yt=Object.assign(glob_,{glob:glob_,globSync:globSync,sync:zt,globStream:globStream,stream:Gt,globStreamSync:globStreamSync,streamSync:Ut,globIterate:globIterate,iterate:Kt,globIterateSync:globIterateSync,iterateSync:Vt,Glob:Glob,hasMagic:hasMagic,escape:escape_escape,unescape:unescape_unescape});Yt.glob=Yt;const Jt=e(import.meta.url)("node:assert");var Qt=__nccwpck_require__.n(Jt);const Xt=e(import.meta.url)("node:child_process");const Zt=e(import.meta.url)("node:async_hooks");const en=e(import.meta.url)("node:util");var tn=__nccwpck_require__(6143);var nn=__nccwpck_require__(2757);const rn=(0,en.promisify)(nn);function noop(){}function randomId(){return Math.random().toString(36).slice(2)}function util_isString(e){return typeof e==="string"}function quote(e){if(/^[a-z0-9/_.\-@:=]+$/i.test(e)||e===""){return e}return`$'`+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0")+`'`}function quotePowerShell(e){if(/^[a-z0-9/_.\-]+$/i.test(e)||e===""){return e}return`'`+e.replace(/'/g,"''")+`'`}function exitCodeInfo(e){return{2:"Misuse of shell builtins",126:"Invoked command cannot execute",127:"Command not found",128:"Invalid exit argument",129:"Hangup",130:"Interrupt",131:"Quit and dump core",132:"Illegal instruction",133:"Trace/breakpoint trap",134:"Process aborted",135:'Bus error: "access to undefined portion of memory object"',136:'Floating point exception: "erroneous arithmetic operation"',137:"Kill (terminate immediately)",138:"User-defined 1",139:"Segmentation violation",140:"User-defined 2",141:"Write to pipe with no one reading",142:"Signal raised by alarm",143:"Termination (request to terminate)",145:"Child process terminated, stopped (or continued*)",146:"Continue if stopped",147:"Stop executing temporarily",148:"Terminal stop signal",149:'Background process attempting to read from tty ("in")',150:'Background process attempting to write to tty ("out")',151:"Urgent data available on socket",152:"CPU time limit exceeded",153:"File size limit exceeded",154:'Signal raised by timer counting virtual time: "virtual timer expired"',155:"Profiling timer expired",157:"Pollable event",159:"Bad syscall"}[e||-1]}function errnoMessage(e){if(e===undefined){return"Unknown error"}return{0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"}[-e]||"Unknown error"}function util_parseDuration(e){if(typeof e=="number"){if(isNaN(e)||e<0)throw new Error(`Invalid duration: "${e}".`);return e}else if(/\d+s/.test(e)){return+e.slice(0,-1)*1e3}else if(/\d+ms/.test(e)){return+e.slice(0,-2)}throw new Error(`Unknown duration: "${e}".`)}function formatCmd(e){if(e==undefined)return O.grey("undefined");const t=[...e];let n="$ ";let r="";let s;let i=root;let o=0;while(i){s=t.shift()||"EOF";if(s=="\n"){n+=style(i,r)+"\n> ";r="";continue}const e=s=="EOF"?undefined:i();if(e!=i){n+=style(i,r);r=""}i=e==root?e():e;r+=s}function style(e,t){if(t=="")return"";if(sn.includes(t)){return O.cyanBright(t)}if(e==word&&o==0){o++;return O.greenBright(t)}if(e==syntax){o=0;return O.cyanBright(t)}if(e==dollar)return O.yellowBright(t);if(e?.name.startsWith("str"))return O.yellowBright(t);return t}function isSyntax(e){return"()[]{}<>;:+|&=".includes(e)}function root(){if(/\s/.test(s))return space;if(isSyntax(s))return syntax;if(/[$]/.test(s))return dollar;if(/["]/.test(s))return strDouble;if(/[']/.test(s))return strSingle;return word}function space(){if(/\s/.test(s))return space;return root}function word(){if(/[0-9a-z/_.]/i.test(s))return word;return root}function syntax(){if(isSyntax(s))return syntax;return root}function dollar(){if(/[']/.test(s))return str;return root}function str(){if(/[']/.test(s))return strEnd;if(/[\\]/.test(s))return strBackslash;return str}function strBackslash(){return strEscape}function strEscape(){return str}function strDouble(){if(/["]/.test(s))return strEnd;return strDouble}function strSingle(){if(/[']/.test(s))return strEnd;return strSingle}function strEnd(){return root}return n+"\n"}const sn=["if","then","else","elif","fi","case","esac","for","select","while","until","do","done","in"];const on=Symbol("processCwd");const an=new Zt.AsyncLocalStorage;const un=(0,Zt.createHook)({init:syncCwd,before:syncCwd,promiseResolve:syncCwd,after:syncCwd,destroy:syncCwd});un.enable();const cn={[on]:process.cwd(),verbose:true,env:process.env,shell:true,prefix:"",quote:()=>{throw new Error("No quote function is defined: https://ï.at/no-quote-func")},spawn:Xt.spawn,log:log};try{cn.shell=tn.sync("bash");cn.prefix="set -euo pipefail;";cn.quote=quote}catch(e){if(process.platform=="win32"){cn.shell=tn.sync("powershell.exe");cn.quote=quotePowerShell}}function getStore(){return an.getStore()||cn}const ln=new Proxy((function(e,...t){const n=(new Error).stack.split(/^\s*at\s/m)[2].trim();if(e.some((e=>e==undefined))){throw new Error(`Malformed command at ${n}`)}let r,s;const i=new ProcessPromise(((...e)=>[r,s]=e));let o=e[0],a=0;while(a<t.length){let n;if(Array.isArray(t[a])){n=t[a].map((e=>ln.quote(substitute(e)))).join(" ")}else{n=ln.quote(substitute(t[a]))}o+=n+e[++a]}i._bind(o,n,r,s,getStore());setImmediate((()=>i.isHalted||i.run()));return i}),{set(e,t,n){const r=t in Function.prototype?e:getStore();Reflect.set(r,t,n);return true},get(e,t){const n=t in Function.prototype?e:getStore();return Reflect.get(n,t)}});function substitute(e){if(e?.stdout){return e.stdout.replace(/\n$/,"")}return`${e}`}class ProcessPromise extends Promise{constructor(){super(...arguments);this._command="";this._from="";this._resolve=noop;this._reject=noop;this._snapshot=getStore();this._stdio=["inherit","pipe","pipe"];this._nothrow=false;this._quiet=false;this._resolved=false;this._halted=false;this._piped=false;this._prerun=noop;this._postrun=noop}_bind(e,t,n,r,s){this._command=e;this._from=t;this._resolve=n;this._reject=r;this._snapshot={...s}}run(){const e=this._snapshot;if(this.child)return this;this._prerun();e.log({kind:"cmd",cmd:this._command,verbose:e.verbose&&!this._quiet});this.child=e.spawn(e.prefix+this._command,{cwd:e.cwd??e[on],shell:typeof e.shell==="string"?e.shell:true,stdio:this._stdio,windowsHide:true,env:e.env});this.child.on("close",((e,s)=>{let i=`exit code: ${e}`;if(e!=0||s!=null){i=`${n||"\n"} at ${this._from}`;i+=`\n exit code: ${e}${exitCodeInfo(e)?" ("+exitCodeInfo(e)+")":""}`;if(s!=null){i+=`\n signal: ${s}`}}let o=new core_ProcessOutput(e,s,t,n,r,i);if(e===0||this._nothrow){this._resolve(o)}else{this._reject(o)}this._resolved=true}));this.child.on("error",(e=>{const s=`${e.message}\n`+` errno: ${e.errno} (${errnoMessage(e.errno)})\n`+` code: ${e.code}\n`+` at ${this._from}`;this._reject(new core_ProcessOutput(null,null,t,n,r,s));this._resolved=true}));let t="",n="",r="";let onStdout=n=>{e.log({kind:"stdout",data:n,verbose:e.verbose&&!this._quiet});t+=n;r+=n};let onStderr=t=>{e.log({kind:"stderr",data:t,verbose:e.verbose&&!this._quiet});n+=t;r+=t};if(!this._piped)this.child.stdout?.on("data",onStdout);this.child.stderr?.on("data",onStderr);this._postrun();if(this._timeout&&this._timeoutSignal){const e=setTimeout((()=>this.kill(this._timeoutSignal)),this._timeout);this.finally((()=>clearTimeout(e))).catch(noop)}return this}get stdin(){this.stdio("pipe");this.run();Jt(this.child);if(this.child.stdin==null)throw new Error("The stdin of subprocess is null.");return this.child.stdin}get stdout(){this.run();Jt(this.child);if(this.child.stdout==null)throw new Error("The stdout of subprocess is null.");return this.child.stdout}get stderr(){this.run();Jt(this.child);if(this.child.stderr==null)throw new Error("The stderr of subprocess is null.");return this.child.stderr}get exitCode(){return this.then((e=>e.exitCode),(e=>e.exitCode))}then(e,t){if(this.isHalted&&!this.child){throw new Error("The process is halted!")}return super.then(e,t)}catch(e){return super.catch(e)}pipe(e){if(typeof e=="string")throw new Error("The pipe() method does not take strings. Forgot $?");if(this._resolved){if(e instanceof ProcessPromise)e.stdin.end();throw new Error("The pipe() method shouldn't be called after promise is already resolved!")}this._piped=true;if(e instanceof ProcessPromise){e.stdio("pipe");e._prerun=this.run.bind(this);e._postrun=()=>{if(!e.child)throw new Error("Access to stdin of pipe destination without creation a subprocess.");this.stdout.pipe(e.stdin)};return e}else{this._postrun=()=>this.stdout.pipe(e);return this}}async kill(e="SIGTERM"){if(!this.child)throw new Error("Trying to kill a process without creating one.");if(!this.child.pid)throw new Error("The process pid is undefined.");let t=await rn(this.child.pid);for(const n of t){try{process.kill(+n.PID,e)}catch(e){}}try{process.kill(this.child.pid,e)}catch(e){}}stdio(e,t="pipe",n="pipe"){this._stdio=[e,t,n];return this}nothrow(){this._nothrow=true;return this}quiet(){this._quiet=true;return this}timeout(e,t="SIGTERM"){this._timeout=util_parseDuration(e);this._timeoutSignal=t;return this}halt(){this._halted=true;return this}get isHalted(){return this._halted}}class core_ProcessOutput extends Error{constructor(e,t,n,r,s,i){super(i);this._code=e;this._signal=t;this._stdout=n;this._stderr=r;this._combined=s}toString(){return this._combined}get stdout(){return this._stdout}get stderr(){return this._stderr}get exitCode(){return this._code}get signal(){return this._signal}[en.inspect.custom](){let stringify=(e,t)=>e.length===0?"''":t((0,en.inspect)(e));return`ProcessOutput {\n stdout: ${stringify(this.stdout,O.green)},\n stderr: ${stringify(this.stderr,O.red)},\n signal: ${(0,en.inspect)(this.signal)},\n exitCode: ${(this.exitCode===0?O.green:O.red)(this.exitCode)}${exitCodeInfo(this.exitCode)?O.grey(" ("+exitCodeInfo(this.exitCode)+")"):""}\n}`}}function core_within(e){return an.run({...getStore()},e)}function syncCwd(){if(ln[on]!=process.cwd())process.chdir(ln[on])}function cd(e){if(e instanceof core_ProcessOutput){e=e.toString().replace(/\n+$/,"")}ln.log({kind:"cd",dir:e});process.chdir(e);ln[on]=process.cwd()}function log(e){switch(e.kind){case"cmd":if(!e.verbose)return;process.stderr.write(formatCmd(e.cmd));break;case"stdout":case"stderr":if(!e.verbose)return;process.stderr.write(e.data);break;case"cd":if(!ln.verbose)return;process.stderr.write("$ "+O.greenBright("cd")+` ${e.dir}\n`);break;case"fetch":if(!ln.verbose)return;const t=e.init?" "+(0,en.inspect)(e.init):"";process.stderr.write("$ "+O.greenBright("fetch")+` ${e.url}${t}\n`);break;case"retry":if(!ln.verbose)return;process.stderr.write(e.error+"\n")}}const fn=e(import.meta.url)("node:fs");var hn=__nccwpck_require__(2578);var pn=__nccwpck_require__(3664);var dn=__nccwpck_require__(4780);var mn=__nccwpck_require__(4777);function slash(e){const t=/^\\\\\?\\/.test(e);const n=/[^\u0000-\u0080]+/.test(e);if(t||n){return e}return e.replace(/\\/g,"/")}const gn=e(import.meta.url)("node:stream");const toPath=e=>e instanceof URL?(0,n.fileURLToPath)(e):e;class FilterStream extends gn.Transform{constructor(e){super({objectMode:true,transform(t,n,r){r(undefined,e(t)?t:undefined)}})}}const isNegativePattern=e=>e[0]==="!";const yn={ignore:["**/node_modules","**/flow-typed","**/coverage","**/.git"],absolute:true,dot:true};const bn="**/.gitignore";const applyBaseToPattern=(e,t)=>isNegativePattern(e)?"!"+U.posix.join(t,e.slice(1)):U.posix.join(t,e);const parseIgnoreFile=(e,t)=>{const n=slash(U.relative(t,U.dirname(e.filePath)));return e.content.split(/\r?\n/).filter((e=>e&&!e.startsWith("#"))).map((e=>applyBaseToPattern(e,n)))};const toRelativePath=(e,t)=>{t=slash(t);if(U.isAbsolute(e)){if(slash(e).startsWith(t)){return U.relative(t,e)}throw new Error(`Path ${e} is not in cwd ${t}`)}return e};const getIsIgnoredPredicate=(e,t)=>{const n=e.flatMap((e=>parseIgnoreFile(e,t)));const r=mn().add(n);return e=>{e=toPath(e);e=toRelativePath(e,t);return e?r.ignores(slash(e)):false}};const normalizeOptions=(e={})=>({cwd:toPath(e.cwd)||f.cwd(),suppressErrors:Boolean(e.suppressErrors),deep:typeof e.deep==="number"?e.deep:Number.POSITIVE_INFINITY});const isIgnoredByIgnoreFiles=async(e,t)=>{const{cwd:n,suppressErrors:r,deep:s}=normalizeOptions(t);const i=await pn(e,{cwd:n,suppressErrors:r,deep:s,...yn});const o=await Promise.all(i.map((async e=>({filePath:e,content:await fn.promises.readFile(e,"utf8")}))));return getIsIgnoredPredicate(o,n)};const isIgnoredByIgnoreFilesSync=(e,t)=>{const{cwd:n,suppressErrors:r,deep:s}=normalizeOptions(t);const i=pn.sync(e,{cwd:n,suppressErrors:r,deep:s,...yn});const o=i.map((e=>({filePath:e,content:fn.readFileSync(e,"utf8")})));return getIsIgnoredPredicate(o,n)};const isGitIgnored=e=>isIgnoredByIgnoreFiles(bn,e);const isGitIgnoredSync=e=>isIgnoredByIgnoreFilesSync(bn,e);const assertPatternsInput=e=>{if(e.some((e=>typeof e!=="string"))){throw new TypeError("Patterns must be a string or an array of strings")}};const toPatternsArray=e=>{e=[...new Set([e].flat())];assertPatternsInput(e);return e};const checkCwdOption=e=>{if(!e.cwd){return}let t;try{t=fn.statSync(e.cwd)}catch{return}if(!t.isDirectory()){throw new Error("The `cwd` option must be a path to a directory")}};const globby_normalizeOptions=(e={})=>{e={...e,ignore:e.ignore||[],expandDirectories:e.expandDirectories===undefined?true:e.expandDirectories,cwd:toPath(e.cwd)};checkCwdOption(e);return e};const normalizeArguments=e=>async(t,n)=>e(toPatternsArray(t),globby_normalizeOptions(n));const normalizeArgumentsSync=e=>(t,n)=>e(toPatternsArray(t),globby_normalizeOptions(n));const getIgnoreFilesPatterns=e=>{const{ignoreFiles:t,gitignore:n}=e;const r=t?toPatternsArray(t):[];if(n){r.push(bn)}return r};const getFilter=async e=>{const t=getIgnoreFilesPatterns(e);return createFilterFunction(t.length>0&&await isIgnoredByIgnoreFiles(t,e))};const getFilterSync=e=>{const t=getIgnoreFilesPatterns(e);return createFilterFunction(t.length>0&&isIgnoredByIgnoreFilesSync(t,e))};const createFilterFunction=e=>{const t=new Set;return n=>{const r=n.path||n;const s=U.normalize(r);const i=t.has(s)||e&&e(r);t.add(s);return!i}};const unionFastGlobResults=(e,t)=>e.flat().filter((e=>t(e)));const unionFastGlobStreams=(e,t)=>hn(e).pipe(new FilterStream((e=>t(e))));const convertNegativePatterns=(e,t)=>{const n=[];while(e.length>0){const r=e.findIndex((e=>isNegativePattern(e)));if(r===-1){n.push({patterns:e,options:t});break}const s=e[r].slice(1);for(const e of n){e.options.ignore.push(s)}if(r!==0){n.push({patterns:e.slice(0,r),options:{...t,ignore:[...t.ignore,s]}})}e=e.slice(r+1)}return n};const getDirGlobOptions=(e,t)=>({...t?{cwd:t}:{},...Array.isArray(e)?{files:e}:e});const generateTasks=async(e,t)=>{const n=convertNegativePatterns(e,t);const{cwd:r,expandDirectories:s}=t;if(!s){return n}const i=getDirGlobOptions(s,r);const o=r?{cwd:r}:undefined;return Promise.all(n.map((async e=>{let{patterns:t,options:n}=e;[t,n.ignore]=await Promise.all([dn(t,i),dn(n.ignore,o)]);return{patterns:t,options:n}})))};const generateTasksSync=(e,t)=>{const n=convertNegativePatterns(e,t);const{cwd:r,expandDirectories:s}=t;if(!s){return n}const i=getDirGlobOptions(s,r);const o=r?{cwd:r}:undefined;return n.map((e=>{let{patterns:t,options:n}=e;t=dn.sync(t,i);n.ignore=dn.sync(n.ignore,o);return{patterns:t,options:n}}))};const vn=normalizeArguments((async(e,t)=>{const[n,r]=await Promise.all([generateTasks(e,t),getFilter(t)]);const s=await Promise.all(n.map((e=>pn(e.patterns,e.options))));return unionFastGlobResults(s,r)}));const wn=normalizeArgumentsSync(((e,t)=>{const n=generateTasksSync(e,t);const r=getFilterSync(t);const s=n.map((e=>pn.sync(e.patterns,e.options)));return unionFastGlobResults(s,r)}));const Sn=normalizeArgumentsSync(((e,t)=>{const n=generateTasksSync(e,t);const r=getFilterSync(t);const s=n.map((e=>pn.stream(e.patterns,e.options)));return unionFastGlobStreams(s,r)}));const An=normalizeArgumentsSync(((e,t)=>e.some((e=>pn.isDynamicPattern(e,t)))));const En=normalizeArguments(generateTasks);const Dn=normalizeArgumentsSync(generateTasksSync);var Cn=__nccwpck_require__(5871);const _n=e(import.meta.url)("node:readline");var kn=__nccwpck_require__(4083);function utils_isWritable(e){try{fs.accessSync(e,fs.constants.W_OK);return true}catch(e){return false}}function utils_controlPath(e){let t="ssh-"+e;if("CI"in process.env&&utils_isWritable("/dev/shm")){return`/dev/shm/${t}`}return`${os.homedir()}/.ssh/${t}`}function utils_escapeshellarg(e){if(/^[a-z0-9/_.\-@:=]+$/i.test(e)||e===""){return e}return`$'`+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0")+`'`}function ssh(e,t={}){const $=function(n,...r){const s=(new Error).stack.split(/^\s*at\s/m)[2].trim();if(n.some((e=>e==undefined))){throw new Error(`Malformed command at ${s}`)}let i=n[0],o=0;while(o<r.length){let e;if(Array.isArray(r[o])){e=r[o].map((e=>escapeshellarg(e))).join(" ")}else{e=escapeshellarg(r[o])}i+=e+n[++o]}let a,u;const c=new Promise(((...e)=>[a,u]=e));const l="id$"+Math.random().toString(36).slice(2);const f=[e,"-o","ControlMaster=auto","-o","ControlPath="+controlPath(e),"-o","ControlPersist=5m",...t.port?["-p",`${t.port}`]:[],...t.forwardAgent?["-A"]:[],...(t.options||[]).flatMap((e=>["-o",e])),`: ${l}; `+(t.shell||"bash -ls")];if(process.env.WEBPOD_DEBUG){console.log("ssh",f.join(" "))}const h=spawn("ssh",f,{stdio:["pipe","pipe","pipe"],windowsHide:true});let p="",d="",g="";const onStdout=e=>{p+=e;g+=e};const onStderr=e=>{d+=e;g+=e};h.stdout.on("data",onStdout);h.stderr.on("data",onStderr);h.on("close",(e=>{if(e===0){a(new Result(s,e,p,d,g))}else{u(new Result(s,e,p,d,g))}}));h.on("error",(e=>{u(new Result(s,null,p,d,g,e))}));h.stdin.write(i);h.stdin.end();return c};$.exit=()=>spawnSync("ssh",[e,"-O","exit","-o",`ControlPath=${controlPath(e)}`]);return $}class Result extends String{constructor(e,t,n,r,s,i){super(s);this.source=e;this.stdout=n;this.stderr=r;this.exitCode=t;this.error=i}}let Fn=Cn(process.argv.slice(2));function updateArgv(e){Fn=minimist(e);global.argv=Fn}const xn=Object.assign((function globby(e,t){return vn(e,t)}),t);const On=null&&xn;function sleep(e){return new Promise((t=>{setTimeout(t,parseDuration(e))}))}async function fetch(e,t){$.log({kind:"fetch",url:e,init:t});return nodeFetch(e,t)}function echo(e,...t){let n;const r=e.length-1;if(Array.isArray(e)&&e.every(isString)&&r===t.length){n=t.map(((t,n)=>e[n]+stringify(t))).join("")+e[r]}else{n=[e,...t].map(stringify).join(" ")}console.log(n)}function stringify(e){if(e instanceof ProcessOutput){return e.toString().replace(/\n$/,"")}return`${e}`}async function question(e,t){let n=undefined;if(t&&Array.isArray(t.choices)){n=function completer(e){const n=t.choices;const r=n.filter((t=>t.startsWith(e)));return[r.length?r:n,e]}}const r=createInterface({input:process.stdin,output:process.stdout,terminal:true,completer:n});return new Promise((t=>r.question(e??"",(e=>{r.close();t(e)}))))}async function stdin(){let e="";process.stdin.setEncoding("utf8");for await(const t of process.stdin){e+=t}return e}async function retry(e,t,n){const r=e;let s;let i=0;let o;if(typeof t=="function"){s=t}else{if(typeof t=="object"){o=t}else{i=parseDuration(t)}assert(n);s=n}let a;let u=0;while(e-- >0){u++;try{return await s()}catch(t){let n=0;if(i>0)n=i;if(o)n=o.next().value;$.log({kind:"retry",error:chalk.bgRed.white(" FAIL ")+` Attempt: ${u}${r==Infinity?"":`/${r}`}`+(n>0?`; next in ${n}ms`:"")});a=t;if(e==0)break;if(n)await sleep(n)}}throw a}function*expBackoff(e="60s",t="100ms"){const n=parseDuration(e);const r=parseDuration(t);let s=1;while(true){const e=Math.floor(Math.random()*r);yield Math.min(2**s++,n)+e}}async function spinner(e,t){if(typeof e=="function"){t=e;e=""}let n=0;const spin=()=>process.stderr.write(` ${"⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏"[n++%10]} ${e}\r`);return within((async()=>{$.verbose=false;const e=setInterval(spin,100);let n;try{n=await t()}finally{clearInterval(e);process.stderr.write(" ".repeat(process.stdout.columns-1)+"\r")}return n}))}function nothrow(e){return e.nothrow()}function quiet(e){return e.quiet()}let Pn=false;async function runAsync(e,t,n){ln.verbose=n?.verbose??Pn;if(n?.cwd){cd(n.cwd)}return await(ln`${e} ${t}`)}async function setDefaultVerbose(e){Pn=e}let Tn=null;const Bn=["@expo/fingerprint","create-expo","eslint-config-universe","expo-barcode-scanner","expo-dev-client-components","expo-doctor","expo-env-info","expo-face-detector","expo-module-scripts","expo-module-template","expo-module-template-local","expo-test-runner","install-expo-modules","pod-install","uri-scheme"];const Nn=["@react-native/assets-registry","@react-native/dev-middleware","@react-native/babel-preset","react-native"];async function registerPackageLinkingAsync(e,t){await runAsync("bun",["link"],{cwd:t.path})}async function addLinkablePackagesToAppAsync(e,t){const n=await K().readAsync(G().join(e,"package.json"));const r=n.dependencies??{};for(const e of t){r[e.name]=`link:${e.name}`}await K().mergeAsync(G().join(e,"package.json"),{dependencies:r})}async function reinstallPackagesAsync(e){await Promise.all([Q().rm(G().join(e,"node_modules"),{recursive:true,force:true}),Q().rm(G().join(e,"bun.lockb"),{force:true}),Q().rm(G().join(e,"yarn.lock"),{force:true})]);await runAsync("bun",["install"],{cwd:e})}async function getExpoPackagesAsync(e){if(Tn!=null){return Tn}const t=await Yt("**/package.json",{cwd:G().join(e,"packages"),ignore:["**/example/**","**/node_modules/**","**/__tests__/**","**/__mocks__/**","**/__fixtures__/**","**/e2e/**"]});const n=await Promise.all(t.filter((e=>{for(const t of Bn){if(e.startsWith(t)){return false}}return true})).flatMap((async t=>{const n=G().join(e,"packages",G().dirname(t));return await createPackageAsync(n)})));Tn=n.sort(((e,t)=>e.name.localeCompare(t.name)));return Tn}async function getReactNativeTransitivePackagesAsync(e){const t=await Promise.all(Nn.map((t=>{const n=G().join(e,"node_modules",t);return createPackageAsync(n)})));return t}async function createPackageAsync(e){const t=G().join(e,"package.json");const n=G().dirname(t);const r=await K().readAsync(t);const s=r.name;const i=r.version;return{name:s,path:n,version:i}}async function setupExpoRepoAsync(e,t){if(!await Y().pathExists(e)){console.log(`Cloning expo repository to ${e}`);console.time("Cloned expo repository");await runAsync("git",["clone","--depth=1","https://github.com/expo/expo.git",G().basename(e)],{cwd:G().dirname(e)});console.timeEnd("Cloned expo repository")}else{console.log(`Updating expo repository at ${e}`)}console.log(`Running \`yarn install\` in ${e}`);console.time("Installed dependencies in expo repository");await setupDependenciesAsync(e,t);await runAsync("yarn",["install"],{cwd:e});console.timeEnd("Installed dependencies in expo repository")}async function packExpoBareTemplateTarballAsync(e,t){const{stdout:n}=await runAsync("npm",["pack","--json","--pack-destination",t],{cwd:G().join(e,"templates","expo-template-bare-minimum")});const r=JSON.parse(n);const s=r[0].filename;return G().join(t,s)}async function setupDependenciesAsync(e,t){const n=G().join(e,"package.json");const r=await K().readAsync(n);const s=r.resolutions??{};for(const e of Nn){s[e]=`${t}`}await K().mergeAsync(n,{resolutions:s})}async function getNpmVersionAsync(e,t){const{stdout:n}=await runAsync("npm",["view",`${e}@${t}`,"version"]);return n.trim()}async function createExpoApp(e,t,n){const r=n.template??"blank-typescript";if(await Y().pathExists(e)){throw new Error(`Project already exists at ${e}`)}await runAsync("bunx",["create-expo-app",e,"--no-install",`--template`,r]);await Project_setupDependenciesAsync(e);await setupEntryAsync(e);await setupMetroConfigAsync(e,t);await setupAppJsonAsync(e,{appId:n.appId,newArchEnabled:n.newArchEnabled})}async function Project_setupDependenciesAsync(e){await K().mergeAsync(G().join(e,"package.json"),{dependencies:{}})}async function setupEntryAsync(e){await Y().writeFile(G().join(e,"index.js"),`import { registerRootComponent } from 'expo';\n\nimport App from './App';\n\n// registerRootComponent calls AppRegistry.registerComponent('main', () => App);\n// It also ensures that whether you load the app in Expo Go or in a native build,\n// the environment is set up appropriately\nregisterRootComponent(App);\n`);await K().deleteKeyAsync(G().join(e,"package.json"),"main")}async function setupMetroConfigAsync(e,t){await Y().writeFile(G().join(e,"metro.config.js"),`const { getDefaultConfig } = require('expo/metro-config');\n\n/** @type {import('expo/metro-config').MetroConfig} */\nconst config = getDefaultConfig(__dirname);\n\nconfig.watchFolders = [\n ...config.watchFolders ?? [],\n __dirname,\n '${t}',\n];\n\nconfig.resolver.nodeModulesPaths = [\n ...config.resolver.nodeModulesPaths ?? [],\n '${t}/node_modules',\n];\n\nmodule.exports = config;`)}async function prebuildAppAsync(e,t){await runAsync("npx",["expo","prebuild","--no-install","--template",t],{cwd:e});console.log(`Installing CocoaPods dependencies`);console.time("Installed CocoaPods dependencies");await runAsync("pod",["install"],{cwd:G().join(e,"ios")});console.timeEnd("Installed CocoaPods dependencies")}async function setupAppJsonAsync(e,{appId:t,newArchEnabled:n}){const r=G().join(e,"app.json");const s=await K().readAsync(r);const i=s.expo;Qt()(isJSONObject(i));const o=i.android??{};const a=i.ios??{};Qt()(isJSONObject(o));Qt()(isJSONObject(a));o.package=t;a.bundleIdentifier=t;const u=i.plugins??[];Qt()(isJSONArray(u));u.push(["expo-build-properties",{android:{minSdkVersion:23,newArchEnabled:n},ios:{newArchEnabled:n}}]);i.runtimeVersion={policy:"appVersion"};i.android=o;i.ios=a;i.plugins=u;await K().writeAsync(r,s)}function isJSONObject(e){return e!=null&&typeof e==="object"&&!Array.isArray(e)}function isJSONArray(e){return e!=null&&Array.isArray(e)}async function checkRequiredToolsAsync(e){const t=await Promise.all(e.map((e=>tn(e,{nothrow:true}))));for(const[n,r]of t.entries()){if(!r){throw new Error(`Missing required tool: ${e[n]}`)}}}const Rn=__nccwpck_require__(2598);const Ln=new j(Rn.name).version(Rn.version).description("Create an app for react-native nightlies testing.").argument("[path]","The output path for the app.",".").option("--name <name>","The name of the app to create.","test-nightlies").option("--expo-repo <path>",'The path to the expo repository. (default: Cloning to the "expo" directory in the output app)').option("-v, --verbose","Verbose output.").option("--app-id <name>","The Android applicationId and iOS bundleIdentifier.","dev.expo.testnightlies").option("--prebuild","To run prebuild steps.").option("--enable-new-architecture","Enable the New Architecture mode.").parse(process.argv);async function src_runAsync(e){const t=Ln.opts();setDefaultVerbose(!!t.verbose);await checkRequiredToolsAsync(["bun","git","npm","pod","yarn"]);const n=t.name;const r=G().join(G().resolve(Ln.args[0]||"."),n);const s={appId:t.appId,newArchEnabled:!!t.enableNewArchitecture};const i=t.expoRepo??G().join(r,"expo");const o=await getNpmVersionAsync("react-native","nightly");console.log(O.cyan(`Setting up app at ${O.bold(r)} with ${O.bold("react-native@"+o)}`));await createExpoApp(r,i,s);await setupExpoRepoAsync(i,o);const a=[...await getExpoPackagesAsync(i),...await getReactNativeTransitivePackagesAsync(i)];console.log(O.cyan(`Registering bun links`));for(const e of a){console.log(` ${e.name}`);await registerPackageLinkingAsync(i,e)}await addLinkablePackagesToAppAsync(r,a);console.log(O.cyan(`Reinstalling packages`));await reinstallPackagesAsync(r);if(t.prebuild){console.log(O.cyan(`Running prebuild steps`));const e=await packExpoBareTemplateTarballAsync(i,r);await prebuildAppAsync(r,e)}}(async()=>{Ln.parse(process.argv);try{await src_runAsync(Rn.name)}catch(e){console.error("Uncaught Error",e);process.exit(1)}})()})();
|