@dypnb/dev-tools 1.0.13 → 1.0.15
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +1,2 @@
|
|
1
1
|
#! /usr/bin/env node
|
2
|
-
"use strict";var e=require("path"),t=require("fs"),n=require("http"),r=require("os"),o=require("util"),s=require("tty"),i=require("child_process"),a=require("assert"),c=require("events"),u=require("buffer"),l=require("stream"),p=require("node:url"),f=require("node:path"),d="undefined"!=typeof document?document.currentScript:null,h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function g(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var m,y,b,v,E=function(e){if("string"!=typeof e||""===e)return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1},A={"{":"}","(":")","[":"]"},x=function(e){if("!"===e[0])return!0;for(var t=0,n=-2,r=-2,o=-2,s=-2,i=-2;t<e.length;){if("*"===e[t])return!0;if("?"===e[t+1]&&/[\].+)]/.test(e[t]))return!0;if(-1!==r&&"["===e[t]&&"]"!==e[t+1]&&(r<t&&(r=e.indexOf("]",t)),r>t)){if(-1===i||i>r)return!0;if(-1===(i=e.indexOf("\\",t))||i>r)return!0}if(-1!==o&&"{"===e[t]&&"}"!==e[t+1]&&(o=e.indexOf("}",t))>t&&(-1===(i=e.indexOf("\\",t))||i>o))return!0;if(-1!==s&&"("===e[t]&&"?"===e[t+1]&&/[:!=]/.test(e[t+2])&&")"!==e[t+3]&&(s=e.indexOf(")",t))>t&&(-1===(i=e.indexOf("\\",t))||i>s))return!0;if(-1!==n&&"("===e[t]&&"|"!==e[t+1]&&(n<t&&(n=e.indexOf("|",t)),-1!==n&&")"!==e[n+1]&&(s=e.indexOf(")",n))>n&&(-1===(i=e.indexOf("\\",n))||i>s)))return!0;if("\\"===e[t]){var a=e[t+1];t+=2;var c=A[a];if(c){var u=e.indexOf(c,t);-1!==u&&(t=u+1)}if("!"===e[t])return!0}else t++}return!1},R=function(e){if("!"===e[0])return!0;for(var t=0;t<e.length;){if(/[*?{}()[\]]/.test(e[t]))return!0;if("\\"===e[t]){var n=e[t+1];t+=2;var r=A[n];if(r){var o=e.indexOf(r,t);-1!==o&&(t=o+1)}if("!"===e[t])return!0}else t++}return!1},_={exports:{}};var C=r;void 0!==C.homedir?_.exports=C.homedir:_.exports=function(){if(v)return b;v=1;var e=t,n=function(){if(y)return m;function e(e,t){if(!e||!e.length||"#"===e.charAt(0))return null;var n=e.split(":");return{username:n[0],password:n[1],uid:n[2],gid:n[3],gecos:n[4],homedir:n[5],shell:n[6]}}return y=1,m=function(t){if("string"!=typeof t)throw new Error("expected a string");return t.split("\n").map(e).filter(Boolean)}}();return b=function(){if("win32"===process.platform)return process.env.USERPROFILE?process.env.USERPROFILE:process.env.HOMEDRIVE&&process.env.HOMEPATH?process.env.HOMEDRIVE+process.env.HOMEPATH:process.env.HOME?process.env.HOME:null;if(process.env.HOME)return process.env.HOME;var t=function(t){try{return e.readFileSync(t,"utf8")}catch(e){return""}}("/etc/passwd"),r=function(e,t){for(var n=e.length,r=0;r<n;r++)if(+e[r].uid===t)return e[r].homedir}(n(t),"function"==typeof process.geteuid?process.geteuid():process.getuid());if(r)return r;var o=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return o?"darwin"===process.platform?"/Users/"+o:"/home/"+o:null}}();var S=_.exports,w=S,O=e,T=function(e){var t=w();return 126===e.charCodeAt(0)?43===e.charCodeAt(1)?O.join(process.cwd(),e.slice(2)):t?O.join(t,e.slice(1)):e:e},$={exports:{}},I={exports:{}},H={};H.parse=H.decode=function(e){var t={},n=t,r=null,o=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;return e.split(/[\r\n]+/g).forEach((function(e,s,i){if(e&&!e.match(/^\s*[;#]/)){var a=e.match(o);if(a){if(void 0!==a[1])return"__proto__"===(r=N(a[1]))?void(n={}):void(n=t[r]=t[r]||{});var c=N(a[2]);if("__proto__"!==c){var u=!a[3]||N(a[4]);switch(u){case"true":case"false":case"null":u=JSON.parse(u)}if(c.length>2&&"[]"===c.slice(-2)){if("__proto__"===(c=c.substring(0,c.length-2)))return;n[c]?Array.isArray(n[c])||(n[c]=[n[c]]):n[c]=[]}Array.isArray(n[c])?n[c].push(u):n[c]=u}}}})),Object.keys(t).filter((function(e,n,r){if(!t[e]||"object"!=typeof t[e]||Array.isArray(t[e]))return!1;var o=L(e),s=t,i=o.pop(),a=i.replace(/\\\./g,".");return o.forEach((function(e,t,n){"__proto__"!==e&&(s[e]&&"object"==typeof s[e]||(s[e]={}),s=s[e])})),(s!==t||a!==i)&&(s[a]=t[e],!0)})).forEach((function(e,n,r){delete t[e]})),t},H.stringify=H.encode=function e(t,n){var r=[],o="";"string"==typeof n?n={section:n,whitespace:!1}:(n=n||{}).whitespace=!0===n.whitespace;var s=n.whitespace?" = ":"=";Object.keys(t).forEach((function(e,n,i){var a=t[e];a&&Array.isArray(a)?a.forEach((function(t){o+=P(e+"[]")+s+P(t)+"\n"})):a&&"object"==typeof a?r.push(e):o+=P(e)+s+P(a)+k})),n.section&&o.length&&(o="["+P(n.section)+"]"+k+o);return r.forEach((function(r,s,i){var a=L(r).join("\\."),c=(n.section?n.section+".":"")+a,u=e(t[r],{section:c,whitespace:n.whitespace});o.length&&u.length&&(o+=k),o+=u})),o},H.safe=P,H.unsafe=N;var k="undefined"!=typeof process&&"win32"===process.platform?"\r\n":"\n";function L(e){return e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map((function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")}))}function M(e){return'"'===e.charAt(0)&&'"'===e.slice(-1)||"'"===e.charAt(0)&&"'"===e.slice(-1)}function P(e){return"string"!=typeof e||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&M(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#")}function N(e,t){if(!M(e=(e||"").trim())){for(var n=!1,r="",o=0,s=e.length;o<s;o++){var i=e.charAt(o);if(n)-1!=="\\;#".indexOf(i)?r+=i:r+="\\"+i,n=!1;else{if(-1!==";#".indexOf(i))break;"\\"===i?n=!0:r+=i}}return n&&(r+="\\"),r.trim()}"'"===e.charAt(0)&&(e=e.substr(1,e.length-2));try{e=JSON.parse(e)}catch(e){}return e}var B,G,j={exports:{}};B=j,G=j.exports,function(e){G?B.exports=e():"undefined"!=typeof window?window.isWindows=e():void 0!==h?h.isWindows=e():"undefined"!=typeof self?self.isWindows=e():this.isWindows=e()}((function(){return function(){return process&&("win32"===process.platform||/^(msys|cygwin)$/.test(process.env.OSTYPE))}}));var U,D,F,K,q,W=j.exports;q="win32"===process.platform||h.TESTING_WINDOWS?function(){if(D)return U;D=1,U=r,r.sync=function(t,r){return n(e.statSync(t),t,r)};var e=t;function n(e,t,n){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var n=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!n)return!0;if(-1!==(n=n.split(";")).indexOf(""))return!0;for(var r=0;r<n.length;r++){var o=n[r].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,n)}function r(t,r,o){e.stat(t,(function(e,s){o(e,!e&&n(s,t,r))}))}return U}():function(){if(K)return F;K=1,F=n,n.sync=function(t,n){return r(e.statSync(t),n)};var e=t;function n(t,n,o){e.stat(t,(function(e,t){o(e,!e&&r(t,n))}))}function r(e,t){return e.isFile()&&function(e,t){var n=e.mode,r=e.uid,o=e.gid,s=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),i=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8);return n&parseInt("001",8)||n&c&&o===i||n&a&&r===s||n&(a|c)&&0===s}(e,t)}return F}();var X,Q,Y=Z;function Z(e,t,n){if("function"==typeof t&&(n=t,t={}),!n){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(n,r){Z(e,t||{},(function(e,t){e?r(e):n(t)}))}))}q(e,t||{},(function(e,r){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,r=!1),n(e,r)}))}Z.sync=function(e,t){try{return q.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}},function(n){var r,o=t,s=e,i=T,a=S,c=H;function u(){if(process.env.PREFIX)r=process.env.PREFIX;else{var t=a();if(t){var n=s.resolve(t,".npmrc");r=l(n)}if(!r){var c=function(){try{return o.realpathSync(function(){if(Q)return X;Q=1,X=a,a.sync=function(e,t){for(var r=i(e,t=t||{}),a=r.env,c=r.ext,u=r.extExe,l=[],p=0,f=a.length;p<f;p++){var d=a[p];'"'===d.charAt(0)&&'"'===d.slice(-1)&&(d=d.slice(1,-1));var h=n.join(d,e);!d&&/^\.[\\\/]/.test(e)&&(h=e.slice(0,2)+h);for(var g=0,m=c.length;g<m;g++){var y=h+c[g];try{if(o.sync(y,{pathExt:u})){if(!t.all)return y;l.push(y)}}catch(e){}}}if(t.all&&l.length)return l;if(t.nothrow)return null;throw s(e)};var t="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,n=e,r=t?";":":",o=Y;function s(e){var t=new Error("not found: "+e);return t.code="ENOENT",t}function i(e,n){var o=n.colon||r,s=n.path||process.env.PATH||"",i=[""];s=s.split(o);var a="";return t&&(s.unshift(process.cwd()),i=(a=n.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM").split(o),-1!==e.indexOf(".")&&""!==i[0]&&i.unshift("")),(e.match(/\//)||t&&e.match(/\\/))&&(s=[""]),{env:s,ext:i,extExe:a}}function a(e,t,r){"function"==typeof t&&(r=t,t={});var a=i(e,t),c=a.env,u=a.ext,l=a.extExe,p=[];!function i(a,f){if(a===f)return t.all&&p.length?r(null,p):r(s(e));var d=c[a];'"'===d.charAt(0)&&'"'===d.slice(-1)&&(d=d.slice(1,-1));var h=n.join(d,e);!d&&/^\.[\\\/]/.test(e)&&(h=e.slice(0,2)+h),function e(n,s){if(n===s)return i(a+1,f);var c=u[n];o(h+c,{pathExt:l},(function(o,i){if(!o&&i){if(!t.all)return r(null,h+c);p.push(h+c)}return e(n+1,s)}))}(0,u.length)}(0,c.length)}return X}().sync("npm"))}catch(e){}return null}();if(c){var u=s.resolve(c,"..","..","npmrc");if(r=l(u)){var p=s.resolve(r,"etc","npmrc");r=l(p)||r}}r||function(){var e=W;e()?r=process.env.APPDATA?s.join(process.env.APPDATA,"npm"):s.dirname(process.execPath):(r=s.dirname(s.dirname(process.execPath)),process.env.DESTDIR&&(r=s.join(process.env.DESTDIR,r)))}()}}if(r)return i(r)}function l(e){try{var t=o.readFileSync(e,"utf-8"),n=c.parse(t);if(n.prefix)return n.prefix}catch(e){}return null}Object.defineProperty(n,"exports",{enumerable:!0,get:function(){return r||(r=u())}})}(I);var V=I.exports;!function(t){var n,r=e,o=V,s=W;Object.defineProperty(t,"exports",{enumerable:!0,get:function(){return n||(n=s()?r.resolve(o,"node_modules"):r.resolve(o,"lib/node_modules"))}})}($);var z=e,J=T,ee=$.exports,te=t,ne=e;var re={};!function(e){e.isInteger=e=>"number"==typeof e?Number.isInteger(e):"string"==typeof e&&""!==e.trim()&&Number.isInteger(Number(e)),e.find=(e,t)=>e.nodes.find((e=>e.type===t)),e.exceedsLimit=(t,n,r=1,o)=>!1!==o&&(!(!e.isInteger(t)||!e.isInteger(n))&&(Number(n)-Number(t))/Number(r)>=o),e.escapeNode=(e,t=0,n)=>{let r=e.nodes[t];r&&(n&&r.type===n||"open"===r.type||"close"===r.type)&&!0!==r.escaped&&(r.value="\\"+r.value,r.escaped=!0)},e.encloseBrace=e=>"brace"===e.type&&(e.commas>>0+e.ranges>>0==0&&(e.invalid=!0,!0)),e.isInvalidBrace=e=>"brace"===e.type&&(!(!0!==e.invalid&&!e.dollar)||(e.commas>>0+e.ranges>>0==0||!0!==e.open||!0!==e.close)&&(e.invalid=!0,!0)),e.isOpenOrClose=e=>"open"===e.type||"close"===e.type||(!0===e.open||!0===e.close),e.reduce=e=>e.reduce(((e,t)=>("text"===t.type&&e.push(t.value),"range"===t.type&&(t.type="text"),e)),[]),e.flatten=(...e)=>{const t=[],n=e=>{for(let r=0;r<e.length;r++){let o=e[r];Array.isArray(o)?n(o):void 0!==o&&t.push(o)}return t};return n(e),t}}(re);const oe=re;var se=(e,t={})=>{let n=(e,r={})=>{let o=t.escapeInvalid&&oe.isInvalidBrace(r),s=!0===e.invalid&&!0===t.escapeInvalid,i="";if(e.value)return(o||s)&&oe.isOpenOrClose(e)?"\\"+e.value:e.value;if(e.value)return e.value;if(e.nodes)for(let t of e.nodes)i+=n(t);return i};return n(e)};const ie=function(e){return"number"==typeof e?e-e==0:"string"==typeof e&&""!==e.trim()&&(Number.isFinite?Number.isFinite(+e):isFinite(+e))},ae=(e,t,n)=>{if(!1===ie(e))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===t||e===t)return String(e);if(!1===ie(t))throw new TypeError("toRegexRange: expected the second argument to be a number.");let r={relaxZeros:!0,...n};"boolean"==typeof r.strictZeros&&(r.relaxZeros=!1===r.strictZeros);let o=e+":"+t+"="+String(r.relaxZeros)+String(r.shorthand)+String(r.capture)+String(r.wrap);if(ae.cache.hasOwnProperty(o))return ae.cache[o].result;let s=Math.min(e,t),i=Math.max(e,t);if(1===Math.abs(s-i)){let n=e+"|"+t;return r.capture?`(${n})`:!1===r.wrap?n:`(?:${n})`}let a=ye(e)||ye(t),c={min:e,max:t,a:s,b:i},u=[],l=[];if(a&&(c.isPadded=a,c.maxLen=String(c.max).length),s<0){l=ue(i<0?Math.abs(i):1,Math.abs(s),c,r),s=c.a=0}return i>=0&&(u=ue(s,i,c,r)),c.negatives=l,c.positives=u,c.result=function(e,t,n){let r=le(e,t,"-",!1)||[],o=le(t,e,"",!1)||[],s=le(e,t,"-?",!0)||[];return r.concat(s).concat(o).join("|")}(l,u),!0===r.capture?c.result=`(${c.result})`:!1!==r.wrap&&u.length+l.length>1&&(c.result=`(?:${c.result})`),ae.cache[o]=c,c.result};function ce(e,t,n){if(e===t)return{pattern:e,count:[],digits:0};let r=function(e,t){let n=[];for(let r=0;r<e.length;r++)n.push([e[r],t[r]]);return n}(e,t),o=r.length,s="",i=0;for(let e=0;e<o;e++){let[t,n]=r[e];t===n?s+=t:"0"!==t||"9"!==n?s+=me(t,n):i++}return i&&(s+=!0===n.shorthand?"\\d":"[0-9]"),{pattern:s,count:[i],digits:o}}function ue(e,t,n,r){let o,s=function(e,t){let n=1,r=1,o=de(e,n),s=new Set([t]);for(;e<=o&&o<=t;)s.add(o),n+=1,o=de(e,n);for(o=he(t+1,r)-1;e<o&&o<=t;)s.add(o),r+=1,o=he(t+1,r)-1;return s=[...s],s.sort(pe),s}(e,t),i=[],a=e;for(let e=0;e<s.length;e++){let t=s[e],c=ce(String(a),String(t),r),u="";n.isPadded||!o||o.pattern!==c.pattern?(n.isPadded&&(u=be(t,n,r)),c.string=u+c.pattern+ge(c.count),i.push(c),a=t+1,o=c):(o.count.length>1&&o.count.pop(),o.count.push(c.count[0]),o.string=o.pattern+ge(o.count),a=t+1)}return i}function le(e,t,n,r,o){let s=[];for(let o of e){let{string:e}=o;r||fe(t,"string",e)||s.push(n+e),r&&fe(t,"string",e)&&s.push(n+e)}return s}function pe(e,t){return e>t?1:t>e?-1:0}function fe(e,t,n){return e.some((e=>e[t]===n))}function de(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function he(e,t){return e-e%Math.pow(10,t)}function ge(e){let[t=0,n=""]=e;return n||t>1?`{${t+(n?","+n:"")}}`:""}function me(e,t,n){return`[${e}${t-e==1?"":"-"}${t}]`}function ye(e){return/^-?(0+)\d/.test(e)}function be(e,t,n){if(!t.isPadded)return e;let r=Math.abs(t.maxLen-String(e).length),o=!1!==n.relaxZeros;switch(r){case 0:return"";case 1:return o?"0?":"0";case 2:return o?"0{0,2}":"00";default:return o?`0{0,${r}}`:`0{${r}}`}}ae.cache={},ae.clearCache=()=>ae.cache={};const ve=o,Ee=ae,Ae=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),xe=e=>"number"==typeof e||"string"==typeof e&&""!==e,Re=e=>Number.isInteger(+e),_e=e=>{let t=`${e}`,n=-1;if("-"===t[0]&&(t=t.slice(1)),"0"===t)return!1;for(;"0"===t[++n];);return n>0},Ce=(e,t,n)=>{if(t>0){let n="-"===e[0]?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return!1===n?String(e):e},Se=(e,t)=>{let n="-"===e[0]?"-":"";for(n&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return n?"-"+e:e},we=(e,t,n,r)=>{if(n)return Ee(e,t,{wrap:!1,...r});let o=String.fromCharCode(e);return e===t?o:`[${o}-${String.fromCharCode(t)}]`},Oe=(e,t,n)=>{if(Array.isArray(e)){let t=!0===n.wrap,r=n.capture?"":"?:";return t?`(${r}${e.join("|")})`:e.join("|")}return Ee(e,t,n)},Te=(...e)=>new RangeError("Invalid range arguments: "+ve.inspect(...e)),$e=(e,t,n)=>{if(!0===n.strictRanges)throw Te([e,t]);return[]},Ie=(e,t,n=1,r={})=>{let o=Number(e),s=Number(t);if(!Number.isInteger(o)||!Number.isInteger(s)){if(!0===r.strictRanges)throw Te([e,t]);return[]}0===o&&(o=0),0===s&&(s=0);let i=o>s,a=String(e),c=String(t),u=String(n);n=Math.max(Math.abs(n),1);let l=_e(a)||_e(c)||_e(u),p=l?Math.max(a.length,c.length,u.length):0,f=!1===l&&!1===((e,t,n)=>"string"==typeof e||"string"==typeof t||!0===n.stringify)(e,t,r),d=r.transform||(e=>t=>!0===e?Number(t):String(t))(f);if(r.toRegex&&1===n)return we(Se(e,p),Se(t,p),!0,r);let h={negatives:[],positives:[]},g=[],m=0;for(;i?o>=s:o<=s;)!0===r.toRegex&&n>1?h[(y=o)<0?"negatives":"positives"].push(Math.abs(y)):g.push(Ce(d(o,m),p,f)),o=i?o-n:o+n,m++;var y;return!0===r.toRegex?n>1?((e,t)=>{e.negatives.sort(((e,t)=>e<t?-1:e>t?1:0)),e.positives.sort(((e,t)=>e<t?-1:e>t?1:0));let n,r=t.capture?"":"?:",o="",s="";return e.positives.length&&(o=e.positives.join("|")),e.negatives.length&&(s=`-(${r}${e.negatives.join("|")})`),n=o&&s?`${o}|${s}`:o||s,t.wrap?`(${r}${n})`:n})(h,r):Oe(g,null,{wrap:!1,...r}):g},He=(e,t,n,r={})=>{if(null==t&&xe(e))return[e];if(!xe(e)||!xe(t))return $e(e,t,r);if("function"==typeof n)return He(e,t,1,{transform:n});if(Ae(n))return He(e,t,0,n);let o={...r};return!0===o.capture&&(o.wrap=!0),n=n||o.step||1,Re(n)?Re(e)&&Re(t)?Ie(e,t,n,o):((e,t,n=1,r={})=>{if(!Re(e)&&e.length>1||!Re(t)&&t.length>1)return $e(e,t,r);let o=r.transform||(e=>String.fromCharCode(e)),s=`${e}`.charCodeAt(0),i=`${t}`.charCodeAt(0),a=s>i,c=Math.min(s,i),u=Math.max(s,i);if(r.toRegex&&1===n)return we(c,u,!1,r);let l=[],p=0;for(;a?s>=i:s<=i;)l.push(o(s,p)),s=a?s-n:s+n,p++;return!0===r.toRegex?Oe(l,null,{wrap:!1,options:r}):l})(e,t,Math.max(Math.abs(n),1),o):null==n||Ae(n)?He(e,t,1,n):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(n,o)};const ke=He,Le=re;var Me=(e,t={})=>{let n=(e,r={})=>{let o=Le.isInvalidBrace(r),s=!0===e.invalid&&!0===t.escapeInvalid,i=!0===o||!0===s,a=!0===t.escapeInvalid?"\\":"",c="";if(!0===e.isOpen)return a+e.value;if(!0===e.isClose)return a+e.value;if("open"===e.type)return i?a+e.value:"(";if("close"===e.type)return i?a+e.value:")";if("comma"===e.type)return"comma"===e.prev.type?"":i?e.value:"|";if(e.value)return e.value;if(e.nodes&&e.ranges>0){let n=Le.reduce(e.nodes),r=ke(...n,{...t,wrap:!1,toRegex:!0});if(0!==r.length)return n.length>1&&r.length>1?`(${r})`:r}if(e.nodes)for(let t of e.nodes)c+=n(t,e);return c};return n(e)};const Pe=He,Ne=se,Be=re,Ge=(e="",t="",n=!1)=>{let r=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return n?Be.flatten(t).map((e=>`{${e}}`)):t;for(let o of e)if(Array.isArray(o))for(let e of o)r.push(Ge(e,t,n));else for(let e of t)!0===n&&"string"==typeof e&&(e=`{${e}}`),r.push(Array.isArray(e)?Ge(o,e,n):o+e);return Be.flatten(r)};var je=(e,t={})=>{let n=void 0===t.rangeLimit?1e3:t.rangeLimit,r=(e,o={})=>{e.queue=[];let s=o,i=o.queue;for(;"brace"!==s.type&&"root"!==s.type&&s.parent;)s=s.parent,i=s.queue;if(e.invalid||e.dollar)return void i.push(Ge(i.pop(),Ne(e,t)));if("brace"===e.type&&!0!==e.invalid&&2===e.nodes.length)return void i.push(Ge(i.pop(),["{}"]));if(e.nodes&&e.ranges>0){let r=Be.reduce(e.nodes);if(Be.exceedsLimit(...r,t.step,n))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let o=Pe(...r,t);return 0===o.length&&(o=Ne(e,t)),i.push(Ge(i.pop(),o)),void(e.nodes=[])}let a=Be.encloseBrace(e),c=e.queue,u=e;for(;"brace"!==u.type&&"root"!==u.type&&u.parent;)u=u.parent,c=u.queue;for(let t=0;t<e.nodes.length;t++){let n=e.nodes[t];"comma"!==n.type||"brace"!==e.type?"close"!==n.type?n.value&&"open"!==n.type?c.push(Ge(c.pop(),n.value)):n.nodes&&r(n,e):i.push(Ge(i.pop(),c,a)):(1===t&&c.push(""),c.push(""))}return c};return Be.flatten(r(e))};const Ue=se,{MAX_LENGTH:De,CHAR_BACKSLASH:Fe,CHAR_BACKTICK:Ke,CHAR_COMMA:qe,CHAR_DOT:We,CHAR_LEFT_PARENTHESES:Xe,CHAR_RIGHT_PARENTHESES:Qe,CHAR_LEFT_CURLY_BRACE:Ye,CHAR_RIGHT_CURLY_BRACE:Ze,CHAR_LEFT_SQUARE_BRACKET:Ve,CHAR_RIGHT_SQUARE_BRACKET:ze,CHAR_DOUBLE_QUOTE:Je,CHAR_SINGLE_QUOTE:et,CHAR_NO_BREAK_SPACE:tt,CHAR_ZERO_WIDTH_NOBREAK_SPACE:nt}={MAX_LENGTH:65536,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"};var rt=(e,t={})=>{if("string"!=typeof e)throw new TypeError("Expected a string");let n=t||{},r="number"==typeof n.maxLength?Math.min(De,n.maxLength):De;if(e.length>r)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${r})`);let o,s={type:"root",input:e,nodes:[]},i=[s],a=s,c=s,u=0,l=e.length,p=0,f=0;const d=()=>e[p++],h=e=>{if("text"===e.type&&"dot"===c.type&&(c.type="text"),!c||"text"!==c.type||"text"!==e.type)return a.nodes.push(e),e.parent=a,e.prev=c,c=e,e;c.value+=e.value};for(h({type:"bos"});p<l;)if(a=i[i.length-1],o=d(),o!==nt&&o!==tt)if(o!==Fe)if(o!==ze)if(o!==Ve)if(o!==Xe)if(o!==Qe)if(o!==Je&&o!==et&&o!==Ke)if(o!==Ye)if(o!==Ze)if(o===qe&&f>0){if(a.ranges>0){a.ranges=0;let e=a.nodes.shift();a.nodes=[e,{type:"text",value:Ue(a)}]}h({type:"comma",value:o}),a.commas++}else if(o===We&&f>0&&0===a.commas){let e=a.nodes;if(0===f||0===e.length){h({type:"text",value:o});continue}if("dot"===c.type){if(a.range=[],c.value+=o,c.type="range",3!==a.nodes.length&&5!==a.nodes.length){a.invalid=!0,a.ranges=0,c.type="text";continue}a.ranges++,a.args=[];continue}if("range"===c.type){e.pop();let t=e[e.length-1];t.value+=c.value+o,c=t,a.ranges--;continue}h({type:"dot",value:o})}else h({type:"text",value:o});else{if("brace"!==a.type){h({type:"text",value:o});continue}let e="close";a=i.pop(),a.close=!0,h({type:e,value:o}),f--,a=i[i.length-1]}else{f++;let e=c.value&&"$"===c.value.slice(-1)||!0===a.dollar;a=h({type:"brace",open:!0,close:!1,dollar:e,depth:f,commas:0,ranges:0,nodes:[]}),i.push(a),h({type:"open",value:o})}else{let e,n=o;for(!0!==t.keepQuotes&&(o="");p<l&&(e=d());)if(e!==Fe){if(e===n){!0===t.keepQuotes&&(o+=e);break}o+=e}else o+=e+d();h({type:"text",value:o})}else{if("paren"!==a.type){h({type:"text",value:o});continue}a=i.pop(),h({type:"text",value:o}),a=i[i.length-1]}else a=h({type:"paren",nodes:[]}),i.push(a),h({type:"text",value:o});else{let e;for(u++;p<l&&(e=d());)if(o+=e,e!==Ve)if(e!==Fe){if(e===ze&&(u--,0===u))break}else o+=d();else u++;h({type:"text",value:o})}else h({type:"text",value:"\\"+o});else h({type:"text",value:(t.keepEscaping?o:"")+d()});do{if(a=i.pop(),"root"!==a.type){a.nodes.forEach((e=>{e.nodes||("open"===e.type&&(e.isOpen=!0),"close"===e.type&&(e.isClose=!0),e.nodes||(e.type="text"),e.invalid=!0)}));let e=i[i.length-1],t=e.nodes.indexOf(a);e.nodes.splice(t,1,...a.nodes)}}while(i.length>0);return h({type:"eos"}),s};const ot=se,st=Me,it=je,at=rt,ct=(e,t={})=>{let n=[];if(Array.isArray(e))for(let r of e){let e=ct.create(r,t);Array.isArray(e)?n.push(...e):n.push(e)}else n=[].concat(ct.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(n=[...new Set(n)]),n};ct.parse=(e,t={})=>at(e,t),ct.stringify=(e,t={})=>ot("string"==typeof e?ct.parse(e,t):e,t),ct.compile=(e,t={})=>("string"==typeof e&&(e=ct.parse(e,t)),st(e,t)),ct.expand=(e,t={})=>{"string"==typeof e&&(e=ct.parse(e,t));let n=it(e,t);return!0===t.noempty&&(n=n.filter(Boolean)),!0===t.nodupes&&(n=[...new Set(n)]),n},ct.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?ct.compile(e,t):ct.expand(e,t);var ut=ct,lt={};const pt=e,ft="\\\\/",dt=`[^${ft}]`,ht="\\.",gt="\\/",mt="[^/]",yt=`(?:${gt}|$)`,bt=`(?:^|${gt})`,vt=`${ht}{1,2}${yt}`,Et={DOT_LITERAL:ht,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:gt,ONE_CHAR:"(?=.)",QMARK:mt,END_ANCHOR:yt,DOTS_SLASH:vt,NO_DOT:`(?!${ht})`,NO_DOTS:`(?!${bt}${vt})`,NO_DOT_SLASH:`(?!${ht}{0,1}${yt})`,NO_DOTS_SLASH:`(?!${vt})`,QMARK_NO_DOT:`[^.${gt}]`,STAR:`${mt}*?`,START_ANCHOR:bt},At={...Et,SLASH_LITERAL:`[${ft}]`,QMARK:dt,STAR:`${dt}*?`,DOTS_SLASH:`${ht}{1,2}(?:[${ft}]|$)`,NO_DOT:`(?!${ht})`,NO_DOTS:`(?!(?:^|[${ft}])${ht}{1,2}(?:[${ft}]|$))`,NO_DOT_SLASH:`(?!${ht}{0,1}(?:[${ft}]|$))`,NO_DOTS_SLASH:`(?!${ht}{1,2}(?:[${ft}]|$))`,QMARK_NO_DOT:`[^.${ft}]`,START_ANCHOR:`(?:^|[${ft}])`,END_ANCHOR:`(?:[${ft}]|$)`};var xt={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:pt.sep,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?At:Et};!function(t){const n=e,r="win32"===process.platform,{REGEX_BACKSLASH:o,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:a}=xt;t.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),t.hasRegexChars=e=>i.test(e),t.isRegexChar=e=>1===e.length&&t.hasRegexChars(e),t.escapeRegex=e=>e.replace(a,"\\$1"),t.toPosixSlashes=e=>e.replace(o,"/"),t.removeBackslashes=e=>e.replace(s,(e=>"\\"===e?"":e)),t.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},t.isWindows=e=>e&&"boolean"==typeof e.windows?e.windows:!0===r||"\\"===n.sep,t.escapeLast=(e,n,r)=>{const o=e.lastIndexOf(n,r);return-1===o?e:"\\"===e[o-1]?t.escapeLast(e,n,o-1):`${e.slice(0,o)}\\${e.slice(o)}`},t.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},t.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(r=`(?:^(?!${r}).*$)`),r}}(lt);const Rt=lt,{CHAR_ASTERISK:_t,CHAR_AT:Ct,CHAR_BACKWARD_SLASH:St,CHAR_COMMA:wt,CHAR_DOT:Ot,CHAR_EXCLAMATION_MARK:Tt,CHAR_FORWARD_SLASH:$t,CHAR_LEFT_CURLY_BRACE:It,CHAR_LEFT_PARENTHESES:Ht,CHAR_LEFT_SQUARE_BRACKET:kt,CHAR_PLUS:Lt,CHAR_QUESTION_MARK:Mt,CHAR_RIGHT_CURLY_BRACE:Pt,CHAR_RIGHT_PARENTHESES:Nt,CHAR_RIGHT_SQUARE_BRACKET:Bt}=xt,Gt=e=>e===$t||e===St,jt=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};var Ut=(e,t)=>{const n=t||{},r=e.length-1,o=!0===n.parts||!0===n.scanToEnd,s=[],i=[],a=[];let c,u,l=e,p=-1,f=0,d=0,h=!1,g=!1,m=!1,y=!1,b=!1,v=!1,E=!1,A=!1,x=!1,R=!1,_=0,C={value:"",depth:0,isGlob:!1};const S=()=>p>=r,w=()=>(c=u,l.charCodeAt(++p));for(;p<r;){let e;if(u=w(),u!==St){if(!0===v||u===It){for(_++;!0!==S()&&(u=w());)if(u!==St)if(u!==It){if(!0!==v&&u===Ot&&(u=w())===Ot){if(h=C.isBrace=!0,m=C.isGlob=!0,R=!0,!0===o)continue;break}if(!0!==v&&u===wt){if(h=C.isBrace=!0,m=C.isGlob=!0,R=!0,!0===o)continue;break}if(u===Pt&&(_--,0===_)){v=!1,h=C.isBrace=!0,R=!0;break}}else _++;else E=C.backslashes=!0,w();if(!0===o)continue;break}if(u!==$t){if(!0!==n.noext){if(!0===(u===Lt||u===Ct||u===_t||u===Mt||u===Tt)&&l.charCodeAt(p+1)===Ht){if(m=C.isGlob=!0,y=C.isExtglob=!0,R=!0,u===Tt&&p===f&&(x=!0),!0===o){for(;!0!==S()&&(u=w());)if(u!==St){if(u===Nt){m=C.isGlob=!0,R=!0;break}}else E=C.backslashes=!0,u=w();continue}break}}if(u===_t){if(c===_t&&(b=C.isGlobstar=!0),m=C.isGlob=!0,R=!0,!0===o)continue;break}if(u===Mt){if(m=C.isGlob=!0,R=!0,!0===o)continue;break}if(u===kt){for(;!0!==S()&&(e=w());)if(e!==St){if(e===Bt){g=C.isBracket=!0,m=C.isGlob=!0,R=!0;break}}else E=C.backslashes=!0,w();if(!0===o)continue;break}if(!0===n.nonegate||u!==Tt||p!==f){if(!0!==n.noparen&&u===Ht){if(m=C.isGlob=!0,!0===o){for(;!0!==S()&&(u=w());)if(u!==Ht){if(u===Nt){R=!0;break}}else E=C.backslashes=!0,u=w();continue}break}if(!0===m){if(R=!0,!0===o)continue;break}}else A=C.negated=!0,f++}else{if(s.push(p),i.push(C),C={value:"",depth:0,isGlob:!1},!0===R)continue;if(c===Ot&&p===f+1){f+=2;continue}d=p+1}}else E=C.backslashes=!0,u=w(),u===It&&(v=!0)}!0===n.noext&&(y=!1,m=!1);let O=l,T="",$="";f>0&&(T=l.slice(0,f),l=l.slice(f),d-=f),O&&!0===m&&d>0?(O=l.slice(0,d),$=l.slice(d)):!0===m?(O="",$=l):O=l,O&&""!==O&&"/"!==O&&O!==l&&Gt(O.charCodeAt(O.length-1))&&(O=O.slice(0,-1)),!0===n.unescape&&($&&($=Rt.removeBackslashes($)),O&&!0===E&&(O=Rt.removeBackslashes(O)));const I={prefix:T,input:e,start:f,base:O,glob:$,isBrace:h,isBracket:g,isGlob:m,isExtglob:y,isGlobstar:b,negated:A,negatedExtglob:x};if(!0===n.tokens&&(I.maxDepth=0,Gt(u)||i.push(C),I.tokens=i),!0===n.parts||!0===n.tokens){let t;for(let r=0;r<s.length;r++){const o=t?t+1:f,c=s[r],u=e.slice(o,c);n.tokens&&(0===r&&0!==f?(i[r].isPrefix=!0,i[r].value=T):i[r].value=u,jt(i[r]),I.maxDepth+=i[r].depth),0===r&&""===u||a.push(u),t=c}if(t&&t+1<e.length){const r=e.slice(t+1);a.push(r),n.tokens&&(i[i.length-1].value=r,jt(i[i.length-1]),I.maxDepth+=i[i.length-1].depth)}I.slashes=s,I.parts=a}return I};const Dt=xt,Ft=lt,{MAX_LENGTH:Kt,POSIX_REGEX_SOURCE:qt,REGEX_NON_SPECIAL_CHARS:Wt,REGEX_SPECIAL_CHARS_BACKREF:Xt,REPLACEMENTS:Qt}=Dt,Yt=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();const n=`[${e.join("-")}]`;try{new RegExp(n)}catch(t){return e.map((e=>Ft.escapeRegex(e))).join("..")}return n},Zt=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,Vt=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");e=Qt[e]||e;const n={...t},r="number"==typeof n.maxLength?Math.min(Kt,n.maxLength):Kt;let o=e.length;if(o>r)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${r}`);const s={type:"bos",value:"",output:n.prepend||""},i=[s],a=n.capture?"":"?:",c=Ft.isWindows(t),u=Dt.globChars(c),l=Dt.extglobChars(u),{DOT_LITERAL:p,PLUS_LITERAL:f,SLASH_LITERAL:d,ONE_CHAR:h,DOTS_SLASH:g,NO_DOT:m,NO_DOT_SLASH:y,NO_DOTS_SLASH:b,QMARK:v,QMARK_NO_DOT:E,STAR:A,START_ANCHOR:x}=u,R=e=>`(${a}(?:(?!${x}${e.dot?g:p}).)*?)`,_=n.dot?"":m,C=n.dot?v:E;let S=!0===n.bash?R(n):A;n.capture&&(S=`(${S})`),"boolean"==typeof n.noext&&(n.noextglob=n.noext);const w={input:e,index:-1,start:0,dot:!0===n.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:i};e=Ft.removePrefix(e,w),o=e.length;const O=[],T=[],$=[];let I,H=s;const k=()=>w.index===o-1,L=w.peek=(t=1)=>e[w.index+t],M=w.advance=()=>e[++w.index]||"",P=()=>e.slice(w.index+1),N=(e="",t=0)=>{w.consumed+=e,w.index+=t},B=e=>{w.output+=null!=e.output?e.output:e.value,N(e.value)},G=()=>{let e=1;for(;"!"===L()&&("("!==L(2)||"?"===L(3));)M(),w.start++,e++;return e%2!=0&&(w.negated=!0,w.start++,!0)},j=e=>{w[e]++,$.push(e)},U=e=>{w[e]--,$.pop()},D=e=>{if("globstar"===H.type){const t=w.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||O.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(w.output=w.output.slice(0,-H.output.length),H.type="star",H.value="*",H.output=S,w.output+=H.output)}if(O.length&&"paren"!==e.type&&(O[O.length-1].inner+=e.value),(e.value||e.output)&&B(e),H&&"text"===H.type&&"text"===e.type)return H.value+=e.value,void(H.output=(H.output||"")+e.value);e.prev=H,i.push(e),H=e},F=(e,t)=>{const r={...l[t],conditions:1,inner:""};r.prev=H,r.parens=w.parens,r.output=w.output;const o=(n.capture?"(":"")+r.open;j("parens"),D({type:e,value:t,output:w.output?"":h}),D({type:"paren",extglob:!0,value:M(),output:o}),O.push(r)},K=e=>{let r,o=e.close+(n.capture?")":"");if("negate"===e.type){let s=S;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(s=R(n)),(s!==S||k()||/^\)+$/.test(P()))&&(o=e.close=`)$))${s}`),e.inner.includes("*")&&(r=P())&&/^\.[^\\/.]+$/.test(r)){const n=Vt(r,{...t,fastpaths:!1}).output;o=e.close=`)${n})${s})`}"bos"===e.prev.type&&(w.negatedExtglob=!0)}D({type:"paren",extglob:!0,value:I,output:o}),U("parens")};if(!1!==n.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(e)){let r=!1,o=e.replace(Xt,((e,t,n,o,s,i)=>"\\"===o?(r=!0,e):"?"===o?t?t+o+(s?v.repeat(s.length):""):0===i?C+(s?v.repeat(s.length):""):v.repeat(n.length):"."===o?p.repeat(n.length):"*"===o?t?t+o+(s?S:""):S:t?e:`\\${e}`));return!0===r&&(o=!0===n.unescape?o.replace(/\\/g,""):o.replace(/\\+/g,(e=>e.length%2==0?"\\\\":e?"\\":""))),o===e&&!0===n.contains?(w.output=e,w):(w.output=Ft.wrapOutput(o,w,t),w)}for(;!k();){if(I=M(),"\0"===I)continue;if("\\"===I){const e=L();if("/"===e&&!0!==n.bash)continue;if("."===e||";"===e)continue;if(!e){I+="\\",D({type:"text",value:I});continue}const t=/^\\+/.exec(P());let r=0;if(t&&t[0].length>2&&(r=t[0].length,w.index+=r,r%2!=0&&(I+="\\")),!0===n.unescape?I=M():I+=M(),0===w.brackets){D({type:"text",value:I});continue}}if(w.brackets>0&&("]"!==I||"["===H.value||"[^"===H.value)){if(!1!==n.posix&&":"===I){const e=H.value.slice(1);if(e.includes("[")&&(H.posix=!0,e.includes(":"))){const e=H.value.lastIndexOf("["),t=H.value.slice(0,e),n=H.value.slice(e+2),r=qt[n];if(r){H.value=t+r,w.backtrack=!0,M(),s.output||1!==i.indexOf(H)||(s.output=h);continue}}}("["===I&&":"!==L()||"-"===I&&"]"===L())&&(I=`\\${I}`),"]"!==I||"["!==H.value&&"[^"!==H.value||(I=`\\${I}`),!0===n.posix&&"!"===I&&"["===H.value&&(I="^"),H.value+=I,B({value:I});continue}if(1===w.quotes&&'"'!==I){I=Ft.escapeRegex(I),H.value+=I,B({value:I});continue}if('"'===I){w.quotes=1===w.quotes?0:1,!0===n.keepQuotes&&D({type:"text",value:I});continue}if("("===I){j("parens"),D({type:"paren",value:I});continue}if(")"===I){if(0===w.parens&&!0===n.strictBrackets)throw new SyntaxError(Zt("opening","("));const e=O[O.length-1];if(e&&w.parens===e.parens+1){K(O.pop());continue}D({type:"paren",value:I,output:w.parens?")":"\\)"}),U("parens");continue}if("["===I){if(!0!==n.nobracket&&P().includes("]"))j("brackets");else{if(!0!==n.nobracket&&!0===n.strictBrackets)throw new SyntaxError(Zt("closing","]"));I=`\\${I}`}D({type:"bracket",value:I});continue}if("]"===I){if(!0===n.nobracket||H&&"bracket"===H.type&&1===H.value.length){D({type:"text",value:I,output:`\\${I}`});continue}if(0===w.brackets){if(!0===n.strictBrackets)throw new SyntaxError(Zt("opening","["));D({type:"text",value:I,output:`\\${I}`});continue}U("brackets");const e=H.value.slice(1);if(!0===H.posix||"^"!==e[0]||e.includes("/")||(I=`/${I}`),H.value+=I,B({value:I}),!1===n.literalBrackets||Ft.hasRegexChars(e))continue;const t=Ft.escapeRegex(H.value);if(w.output=w.output.slice(0,-H.value.length),!0===n.literalBrackets){w.output+=t,H.value=t;continue}H.value=`(${a}${t}|${H.value})`,w.output+=H.value;continue}if("{"===I&&!0!==n.nobrace){j("braces");const e={type:"brace",value:I,output:"(",outputIndex:w.output.length,tokensIndex:w.tokens.length};T.push(e),D(e);continue}if("}"===I){const e=T[T.length-1];if(!0===n.nobrace||!e){D({type:"text",value:I,output:I});continue}let t=")";if(!0===e.dots){const e=i.slice(),r=[];for(let t=e.length-1;t>=0&&(i.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&r.unshift(e[t].value);t=Yt(r,n),w.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=w.output.slice(0,e.outputIndex),r=w.tokens.slice(e.tokensIndex);e.value=e.output="\\{",I=t="\\}",w.output=n;for(const e of r)w.output+=e.output||e.value}D({type:"brace",value:I,output:t}),U("braces"),T.pop();continue}if("|"===I){O.length>0&&O[O.length-1].conditions++,D({type:"text",value:I});continue}if(","===I){let e=I;const t=T[T.length-1];t&&"braces"===$[$.length-1]&&(t.comma=!0,e="|"),D({type:"comma",value:I,output:e});continue}if("/"===I){if("dot"===H.type&&w.index===w.start+1){w.start=w.index+1,w.consumed="",w.output="",i.pop(),H=s;continue}D({type:"slash",value:I,output:d});continue}if("."===I){if(w.braces>0&&"dot"===H.type){"."===H.value&&(H.output=p);const e=T[T.length-1];H.type="dots",H.output+=I,H.value+=I,e.dots=!0;continue}if(w.braces+w.parens===0&&"bos"!==H.type&&"slash"!==H.type){D({type:"text",value:I,output:p});continue}D({type:"dot",value:I,output:p});continue}if("?"===I){if(!(H&&"("===H.value)&&!0!==n.noextglob&&"("===L()&&"?"!==L(2)){F("qmark",I);continue}if(H&&"paren"===H.type){const e=L();let t=I;if("<"===e&&!Ft.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===H.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(P()))&&(t=`\\${I}`),D({type:"text",value:I,output:t});continue}if(!0!==n.dot&&("slash"===H.type||"bos"===H.type)){D({type:"qmark",value:I,output:E});continue}D({type:"qmark",value:I,output:v});continue}if("!"===I){if(!0!==n.noextglob&&"("===L()&&("?"!==L(2)||!/[!=<:]/.test(L(3)))){F("negate",I);continue}if(!0!==n.nonegate&&0===w.index){G();continue}}if("+"===I){if(!0!==n.noextglob&&"("===L()&&"?"!==L(2)){F("plus",I);continue}if(H&&"("===H.value||!1===n.regex){D({type:"plus",value:I,output:f});continue}if(H&&("bracket"===H.type||"paren"===H.type||"brace"===H.type)||w.parens>0){D({type:"plus",value:I});continue}D({type:"plus",value:f});continue}if("@"===I){if(!0!==n.noextglob&&"("===L()&&"?"!==L(2)){D({type:"at",extglob:!0,value:I,output:""});continue}D({type:"text",value:I});continue}if("*"!==I){"$"!==I&&"^"!==I||(I=`\\${I}`);const e=Wt.exec(P());e&&(I+=e[0],w.index+=e[0].length),D({type:"text",value:I});continue}if(H&&("globstar"===H.type||!0===H.star)){H.type="star",H.star=!0,H.value+=I,H.output=S,w.backtrack=!0,w.globstar=!0,N(I);continue}let t=P();if(!0!==n.noextglob&&/^\([^?]/.test(t)){F("star",I);continue}if("star"===H.type){if(!0===n.noglobstar){N(I);continue}const r=H.prev,o=r.prev,s="slash"===r.type||"bos"===r.type,i=o&&("star"===o.type||"globstar"===o.type);if(!0===n.bash&&(!s||t[0]&&"/"!==t[0])){D({type:"star",value:I,output:""});continue}const a=w.braces>0&&("comma"===r.type||"brace"===r.type),c=O.length&&("pipe"===r.type||"paren"===r.type);if(!s&&"paren"!==r.type&&!a&&!c){D({type:"star",value:I,output:""});continue}for(;"/**"===t.slice(0,3);){const n=e[w.index+4];if(n&&"/"!==n)break;t=t.slice(3),N("/**",3)}if("bos"===r.type&&k()){H.type="globstar",H.value+=I,H.output=R(n),w.output=H.output,w.globstar=!0,N(I);continue}if("slash"===r.type&&"bos"!==r.prev.type&&!i&&k()){w.output=w.output.slice(0,-(r.output+H.output).length),r.output=`(?:${r.output}`,H.type="globstar",H.output=R(n)+(n.strictSlashes?")":"|$)"),H.value+=I,w.globstar=!0,w.output+=r.output+H.output,N(I);continue}if("slash"===r.type&&"bos"!==r.prev.type&&"/"===t[0]){const e=void 0!==t[1]?"|$":"";w.output=w.output.slice(0,-(r.output+H.output).length),r.output=`(?:${r.output}`,H.type="globstar",H.output=`${R(n)}${d}|${d}${e})`,H.value+=I,w.output+=r.output+H.output,w.globstar=!0,N(I+M()),D({type:"slash",value:"/",output:""});continue}if("bos"===r.type&&"/"===t[0]){H.type="globstar",H.value+=I,H.output=`(?:^|${d}|${R(n)}${d})`,w.output=H.output,w.globstar=!0,N(I+M()),D({type:"slash",value:"/",output:""});continue}w.output=w.output.slice(0,-H.output.length),H.type="globstar",H.output=R(n),H.value+=I,w.output+=H.output,w.globstar=!0,N(I);continue}const r={type:"star",value:I,output:S};!0!==n.bash?!H||"bracket"!==H.type&&"paren"!==H.type||!0!==n.regex?(w.index!==w.start&&"slash"!==H.type&&"dot"!==H.type||("dot"===H.type?(w.output+=y,H.output+=y):!0===n.dot?(w.output+=b,H.output+=b):(w.output+=_,H.output+=_),"*"!==L()&&(w.output+=h,H.output+=h)),D(r)):(r.output=I,D(r)):(r.output=".*?","bos"!==H.type&&"slash"!==H.type||(r.output=_+r.output),D(r))}for(;w.brackets>0;){if(!0===n.strictBrackets)throw new SyntaxError(Zt("closing","]"));w.output=Ft.escapeLast(w.output,"["),U("brackets")}for(;w.parens>0;){if(!0===n.strictBrackets)throw new SyntaxError(Zt("closing",")"));w.output=Ft.escapeLast(w.output,"("),U("parens")}for(;w.braces>0;){if(!0===n.strictBrackets)throw new SyntaxError(Zt("closing","}"));w.output=Ft.escapeLast(w.output,"{"),U("braces")}if(!0===n.strictSlashes||"star"!==H.type&&"bracket"!==H.type||D({type:"maybe_slash",value:"",output:`${d}?`}),!0===w.backtrack){w.output="";for(const e of w.tokens)w.output+=null!=e.output?e.output:e.value,e.suffix&&(w.output+=e.suffix)}return w};Vt.fastpaths=(e,t)=>{const n={...t},r="number"==typeof n.maxLength?Math.min(Kt,n.maxLength):Kt,o=e.length;if(o>r)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${r}`);e=Qt[e]||e;const s=Ft.isWindows(t),{DOT_LITERAL:i,SLASH_LITERAL:a,ONE_CHAR:c,DOTS_SLASH:u,NO_DOT:l,NO_DOTS:p,NO_DOTS_SLASH:f,STAR:d,START_ANCHOR:h}=Dt.globChars(s),g=n.dot?p:l,m=n.dot?f:l,y=n.capture?"":"?:";let b=!0===n.bash?".*?":d;n.capture&&(b=`(${b})`);const v=e=>!0===e.noglobstar?b:`(${y}(?:(?!${h}${e.dot?u:i}).)*?)`,E=e=>{switch(e){case"*":return`${g}${c}${b}`;case".*":return`${i}${c}${b}`;case"*.*":return`${g}${b}${i}${c}${b}`;case"*/*":return`${g}${b}${a}${c}${m}${b}`;case"**":return g+v(n);case"**/*":return`(?:${g}${v(n)}${a})?${m}${c}${b}`;case"**/*.*":return`(?:${g}${v(n)}${a})?${m}${b}${i}${c}${b}`;case"**/.*":return`(?:${g}${v(n)}${a})?${i}${c}${b}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=E(t[1]);if(!n)return;return n+i+t[2]}}},A=Ft.removePrefix(e,{negated:!1,prefix:""});let x=E(A);return x&&!0!==n.strictSlashes&&(x+=`${a}?`),x};const zt=e,Jt=Ut,en=Vt,tn=lt,nn=xt,rn=(e,t,n=!1)=>{if(Array.isArray(e)){const r=e.map((e=>rn(e,t,n))),o=e=>{for(const t of r){const n=t(e);if(n)return n}return!1};return o}const r=(o=e)&&"object"==typeof o&&!Array.isArray(o)&&e.tokens&&e.input;var o;if(""===e||"string"!=typeof e&&!r)throw new TypeError("Expected pattern to be a non-empty string");const s=t||{},i=tn.isWindows(t),a=r?rn.compileRe(e,t):rn.makeRe(e,t,!1,!0),c=a.state;delete a.state;let u=()=>!1;if(s.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};u=rn(s.ignore,e,n)}const l=(n,r=!1)=>{const{isMatch:o,match:l,output:p}=rn.test(n,a,t,{glob:e,posix:i}),f={glob:e,state:c,regex:a,posix:i,input:n,output:p,match:l,isMatch:o};return"function"==typeof s.onResult&&s.onResult(f),!1===o?(f.isMatch=!1,!!r&&f):u(n)?("function"==typeof s.onIgnore&&s.onIgnore(f),f.isMatch=!1,!!r&&f):("function"==typeof s.onMatch&&s.onMatch(f),!r||f)};return n&&(l.state=c),l};rn.test=(e,t,n,{glob:r,posix:o}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const s=n||{},i=s.format||(o?tn.toPosixSlashes:null);let a=e===r,c=a&&i?i(e):e;return!1===a&&(c=i?i(e):e,a=c===r),!1!==a&&!0!==s.capture||(a=!0===s.matchBase||!0===s.basename?rn.matchBase(e,t,n,o):t.exec(c)),{isMatch:Boolean(a),match:a,output:c}},rn.matchBase=(e,t,n,r=tn.isWindows(n))=>(t instanceof RegExp?t:rn.makeRe(t,n)).test(zt.basename(e)),rn.isMatch=(e,t,n)=>rn(t,n)(e),rn.parse=(e,t)=>Array.isArray(e)?e.map((e=>rn.parse(e,t))):en(e,{...t,fastpaths:!1}),rn.scan=(e,t)=>Jt(e,t),rn.compileRe=(e,t,n=!1,r=!1)=>{if(!0===n)return e.output;const o=t||{},s=o.contains?"":"^",i=o.contains?"":"$";let a=`${s}(?:${e.output})${i}`;e&&!0===e.negated&&(a=`^(?!${a}).*$`);const c=rn.toRegex(a,t);return!0===r&&(c.state=e),c},rn.makeRe=(e,t={},n=!1,r=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(o.output=en.fastpaths(e,t)),o.output||(o=en(e,t)),rn.compileRe(o,t,n,r)},rn.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},rn.constants=nn;const on=o,sn=ut,an=rn,cn=lt,un=e=>""===e||"./"===e,ln=(e,t,n)=>{t=[].concat(t),e=[].concat(e);let r=new Set,o=new Set,s=new Set,i=0,a=e=>{s.add(e.output),n&&n.onResult&&n.onResult(e)};for(let s=0;s<t.length;s++){let c=an(String(t[s]),{...n,onResult:a},!0),u=c.state.negated||c.state.negatedExtglob;u&&i++;for(let t of e){let e=c(t,!0);(u?!e.isMatch:e.isMatch)&&(u?r.add(e.output):(r.delete(e.output),o.add(e.output)))}}let c=(i===t.length?[...s]:[...o]).filter((e=>!r.has(e)));if(n&&0===c.length){if(!0===n.failglob)throw new Error(`No matches found for "${t.join(", ")}"`);if(!0===n.nonull||!0===n.nullglob)return n.unescape?t.map((e=>e.replace(/\\/g,""))):t}return c};ln.match=ln,ln.matcher=(e,t)=>an(e,t),ln.any=ln.isMatch=(e,t,n)=>an(t,n)(e),ln.not=(e,t,n={})=>{t=[].concat(t).map(String);let r=new Set,o=[],s=new Set(ln(e,t,{...n,onResult:e=>{n.onResult&&n.onResult(e),o.push(e.output)}}));for(let e of o)s.has(e)||r.add(e);return[...r]},ln.contains=(e,t,n)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${on.inspect(e)}"`);if(Array.isArray(t))return t.some((t=>ln.contains(e,t,n)));if("string"==typeof t){if(un(e)||un(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return ln.isMatch(e,t,{...n,contains:!0})},ln.matchKeys=(e,t,n)=>{if(!cn.isObject(e))throw new TypeError("Expected the first argument to be an object");let r=ln(Object.keys(e),t,n),o={};for(let t of r)o[t]=e[t];return o},ln.some=(e,t,n)=>{let r=[].concat(e);for(let e of[].concat(t)){let t=an(String(e),n);if(r.some((e=>t(e))))return!0}return!1},ln.every=(e,t,n)=>{let r=[].concat(e);for(let e of[].concat(t)){let t=an(String(e),n);if(!r.every((e=>t(e))))return!1}return!0},ln.all=(e,t,n)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${on.inspect(e)}"`);return[].concat(t).every((t=>an(t,n)(e)))},ln.capture=(e,t,n)=>{let r=cn.isWindows(n),o=an.makeRe(String(e),{...n,capture:!0}).exec(r?cn.toPosixSlashes(t):t);if(o)return o.slice(1).map((e=>void 0===e?"":e))},ln.makeRe=(...e)=>an.makeRe(...e),ln.scan=(...e)=>an.scan(...e),ln.parse=(e,t)=>{let n=[];for(let r of[].concat(e||[]))for(let e of sn(String(r),t))n.push(an.parse(e,t));return n},ln.braces=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return t&&!0===t.nobrace||!/\{.*\}/.test(e)?[e]:sn(e,t)},ln.braceExpand=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return ln.braces(e,{...t,expand:!0})};var pn=t,fn=e,dn=function(e,t){if("string"!=typeof e||""===e)return!1;if(E(e))return!0;var n=x;return t&&!1===t.strict&&(n=R),n(e)},hn=function(e){return"~"===e.charAt(0)&&(e=J(e)),"@"===e.charAt(0)&&(e=z.join(ee,e.slice(1))),e},gn=function(e,t){return e&&"string"==typeof e?te.existsSync(e)?ne.resolve(e):!0===(t=t||{}).nocase?function(e){e=ne.resolve(e);var t=function(e){var t={path:e,files:[]};try{return t.files=te.readdirSync(e),t}catch(e){}try{return t.path=ne.dirname(e),t.files=te.readdirSync(t.path),t}catch(e){}return null}(e);if(null===t)return null;if(t.path===e)return t.path;var n=e.toUpperCase(),r=t.files.length,o=-1;for(;++o<r;){var s=ne.resolve(t.path,t.files[o]);if(e===s||n===s)return s;var i=s.toUpperCase();if(e===i||n===i)return s}return null}(e):null:null},mn=ln;function yn(e,t,n){for(var r,o=t.length,s=-1;++s<o;)if(r=dn(t[s])?bn(e,t[s],n):vn(e,t[s],n))return r;var i=fn.dirname(e);return i===e?null:yn(i,t,n)}function bn(e,t,n){for(var r=mn.matcher(t,n),o=function(e){try{return pn.readdirSync(e)}catch(e){}return[]}(e),s=o.length,i=-1;++i<s;){var a=o[i],c=fn.join(e,a);if(r(a)||r(c))return c}return null}function vn(e,t,n){var r=fn.resolve(e,t);return gn(r,n)}var En,An,xn,Rn,_n,Cn,Sn,wn,On=g((function(e,t){t=t||{};var n=fn.resolve(hn(t.cwd||""));if("string"==typeof e)return yn(n,[e],t);if(!Array.isArray(e))throw new TypeError("findup-sync expects a string or array as the first argument.");return yn(n,e,t)})),Tn={exports:{}};function $n(){if(Rn)return xn;Rn=1;const e=An?En:(An=1,En={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),t={};for(const n of Object.keys(e))t[e[n]]=n;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};xn=n;for(const e of Object.keys(n)){if(!("channels"in n[e]))throw new Error("missing channels property: "+e);if(!("labels"in n[e]))throw new Error("missing channel labels property: "+e);if(n[e].labels.length!==n[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=n[e];delete n[e].channels,delete n[e].labels,Object.defineProperty(n[e],"channels",{value:t}),Object.defineProperty(n[e],"labels",{value:r})}return n.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),s=Math.max(t,n,r),i=s-o;let a,c;s===o?a=0:t===s?a=(n-r)/i:n===s?a=2+(r-t)/i:r===s&&(a=4+(t-n)/i),a=Math.min(60*a,360),a<0&&(a+=360);const u=(o+s)/2;return c=s===o?0:u<=.5?i/(s+o):i/(2-s-o),[a,100*c,100*u]},n.rgb.hsv=function(e){let t,n,r,o,s;const i=e[0]/255,a=e[1]/255,c=e[2]/255,u=Math.max(i,a,c),l=u-Math.min(i,a,c),p=function(e){return(u-e)/6/l+.5};return 0===l?(o=0,s=0):(s=l/u,t=p(i),n=p(a),r=p(c),i===u?o=r-n:a===u?o=1/3+t-r:c===u&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*s,100*u]},n.rgb.hwb=function(e){const t=e[0],r=e[1];let o=e[2];const s=n.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(r,o));return o=1-1/255*Math.max(t,Math.max(r,o)),[s,100*i,100*o]},n.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r);return[100*((1-t-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*o]},n.rgb.keyword=function(n){const r=t[n];if(r)return r;let o,s=1/0;for(const t of Object.keys(e)){const r=e[t],c=(a=r,((i=n)[0]-a[0])**2+(i[1]-a[1])**2+(i[2]-a[2])**2);c<s&&(s=c,o=t)}var i,a;return o},n.keyword.rgb=function(t){return e[t]},n.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let r=t[0],o=t[1],s=t[2];r/=95.047,o/=100,s/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;return[116*o-16,500*(r-o),200*(o-s)]},n.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,s,i;if(0===n)return i=255*r,[i,i,i];o=r<.5?r*(1+n):r+n-r*n;const a=2*r-o,c=[0,0,0];for(let e=0;e<3;e++)s=t+1/3*-(e-1),s<0&&s++,s>1&&s--,i=6*s<1?a+6*(o-a)*s:2*s<1?o:3*s<2?a+(o-a)*(2/3-s)*6:a,c[e]=255*i;return c},n.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const s=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=s<=1?s:2-s;return[t,100*(0===r?2*o/(s+o):2*n/(r+n)),100*((r+n)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,s=t-Math.floor(t),i=255*r*(1-n),a=255*r*(1-n*s),c=255*r*(1-n*(1-s));switch(r*=255,o){case 0:return[r,c,i];case 1:return[a,r,i];case 2:return[i,r,c];case 3:return[i,a,r];case 4:return[c,i,r];case 5:return[r,i,a]}},n.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let s,i;i=(2-n)*r;const a=(2-n)*o;return s=n*o,s/=a<=1?a:2-a,s=s||0,i/=2,[t,100*s,100*i]},n.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let s;o>1&&(n/=o,r/=o);const i=Math.floor(6*t),a=1-r;s=6*t-i,0!=(1&i)&&(s=1-s);const c=n+s*(a-n);let u,l,p;switch(i){default:case 6:case 0:u=a,l=c,p=n;break;case 1:u=c,l=a,p=n;break;case 2:u=n,l=a,p=c;break;case 3:u=n,l=c,p=a;break;case 4:u=c,l=n,p=a;break;case 5:u=a,l=n,p=c}return[255*u,255*l,255*p]},n.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},n.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,s,i;return o=3.2406*t+-1.5372*n+-.4986*r,s=-.9689*t+1.8758*n+.0415*r,i=.0557*t+-.204*n+1.057*r,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),i=Math.min(Math.max(0,i),1),[255*o,255*s,255*i]},n.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},n.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const o=n**3,s=t**3,i=r**3;return n=o>.008856?o:(n-16/116)/7.787,t=s>.008856?s:(t-16/116)/7.787,r=i>.008856?i:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},n.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=360*Math.atan2(r,n)/2/Math.PI,o<0&&(o+=360);return[t,Math.sqrt(n*n+r*r),o]},n.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},n.rgb.ansi16=function(e,t=null){const[r,o,s]=e;let i=null===t?n.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),0===i)return 30;let a=30+(Math.round(s/255)<<2|Math.round(o/255)<<1|Math.round(r/255));return 2===i&&(a+=60),a},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t===n&&n===r)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map((e=>e+e)).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},n.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),s=Math.min(Math.min(t,n),r),i=o-s;let a,c;return a=i<1?s/(1-i):0,c=i<=0?0:o===t?(n-r)/i%6:o===n?2+(r-t)/i:4+(t-n)/i,c/=6,c%=1,[360*c,100*i,100*a]},n.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},n.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const o=[0,0,0],s=t%1*6,i=s%1,a=1-i;let c=0;switch(Math.floor(s)){case 0:o[0]=1,o[1]=i,o[2]=0;break;case 1:o[0]=a,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=i;break;case 3:o[0]=0,o[1]=a,o[2]=1;break;case 4:o[0]=i,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=a}return c=(1-n)*r,[255*(n*o[0]+c),255*(n*o[1]+c),255*(n*o[2]+c)]},n.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},n.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},n.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},n.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},xn}function In(){if(Cn)return _n;Cn=1;const e=$n();function t(t){const n=function(){const t={},n=Object.keys(e);for(let e=n.length,r=0;r<e;r++)t[n[r]]={distance:-1,parent:null};return t}(),r=[t];for(n[t].distance=0;r.length;){const t=r.pop(),o=Object.keys(e[t]);for(let e=o.length,s=0;s<e;s++){const e=o[s],i=n[e];-1===i.distance&&(i.distance=n[t].distance+1,i.parent=t,r.unshift(e))}}return n}function n(e,t){return function(n){return t(e(n))}}function r(t,r){const o=[r[t].parent,t];let s=e[r[t].parent][t],i=r[t].parent;for(;r[i].parent;)o.unshift(r[i].parent),s=n(e[r[i].parent][i],s),i=r[i].parent;return s.conversion=o,s}return _n=function(e){const n=t(e),o={},s=Object.keys(n);for(let e=s.length,t=0;t<e;t++){const e=s[t];null!==n[e].parent&&(o[e]=r(e,n))}return o}}function Hn(){if(wn)return Sn;wn=1;const e=$n(),t=In(),n={};return Object.keys(e).forEach((r=>{n[r]={},Object.defineProperty(n[r],"channels",{value:e[r].channels}),Object.defineProperty(n[r],"labels",{value:e[r].labels});const o=t(r);Object.keys(o).forEach((e=>{const t=o[e];n[r][e]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(t),n[r][e].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)}))})),Sn=n}!function(e){const t=(e,t)=>(...n)=>`[${e(...n)+t}m`,n=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};5;${r}m`},r=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};2;${r[0]};${r[1]};${r[2]}m`},o=e=>e,s=(e,t,n)=>[e,t,n],i=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{const r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})};let a;const c=(e,t,n,r)=>{void 0===a&&(a=Hn());const o=r?10:0,s={};for(const[r,i]of Object.entries(a)){const a="ansi16"===r?"ansi":r;r===t?s[a]=e(n,o):"object"==typeof i&&(s[a]=e(i[t],o))}return s};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,a={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};a.color.gray=a.color.blackBright,a.bgColor.bgGray=a.bgColor.bgBlackBright,a.color.grey=a.color.blackBright,a.bgColor.bgGrey=a.bgColor.bgBlackBright;for(const[t,n]of Object.entries(a)){for(const[t,r]of Object.entries(n))a[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=a[t],e.set(r[0],r[1]);Object.defineProperty(a,t,{value:n,enumerable:!1})}return Object.defineProperty(a,"codes",{value:e,enumerable:!1}),a.color.close="[39m",a.bgColor.close="[49m",i(a.color,"ansi",(()=>c(t,"ansi16",o,!1))),i(a.color,"ansi256",(()=>c(n,"ansi256",o,!1))),i(a.color,"ansi16m",(()=>c(r,"rgb",s,!1))),i(a.bgColor,"ansi",(()=>c(t,"ansi16",o,!0))),i(a.bgColor,"ansi256",(()=>c(n,"ansi256",o,!0))),i(a.bgColor,"ansi16m",(()=>c(r,"rgb",s,!0))),a}})}(Tn);var kn=Tn.exports;const Ln=r,Mn=s,Pn=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return-1!==r&&(-1===o||r<o)},{env:Nn}=process;let Bn;function Gn(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function jn(e,t){if(0===Bn)return 0;if(Pn("color=16m")||Pn("color=full")||Pn("color=truecolor"))return 3;if(Pn("color=256"))return 2;if(e&&!t&&void 0===Bn)return 0;const n=Bn||0;if("dumb"===Nn.TERM)return n;if("win32"===process.platform){const e=Ln.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in Nn)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in Nn))||"codeship"===Nn.CI_NAME?1:n;if("TEAMCITY_VERSION"in Nn)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Nn.TEAMCITY_VERSION)?1:0;if("truecolor"===Nn.COLORTERM)return 3;if("TERM_PROGRAM"in Nn){const e=parseInt((Nn.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Nn.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Nn.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Nn.TERM)||"COLORTERM"in Nn?1:n}Pn("no-color")||Pn("no-colors")||Pn("color=false")||Pn("color=never")?Bn=0:(Pn("color")||Pn("colors")||Pn("color=true")||Pn("color=always"))&&(Bn=1),"FORCE_COLOR"in Nn&&(Bn="true"===Nn.FORCE_COLOR?1:"false"===Nn.FORCE_COLOR?0:0===Nn.FORCE_COLOR.length?1:Math.min(parseInt(Nn.FORCE_COLOR,10),3));var Un={supportsColor:function(e){return Gn(jn(e,e&&e.isTTY))},stdout:Gn(jn(!0,Mn.isatty(1))),stderr:Gn(jn(!0,Mn.isatty(2)))};var Dn,Fn,Kn={stringReplaceAll:(e,t,n)=>{let r=e.indexOf(t);if(-1===r)return e;const o=t.length;let s=0,i="";do{i+=e.substr(s,r-s)+t+n,s=r+o,r=e.indexOf(t,s)}while(-1!==r);return i+=e.substr(s),i},stringEncaseCRLFWithFirstIndex:(e,t,n,r)=>{let o=0,s="";do{const i="\r"===e[r-1];s+=e.substr(o,(i?r-1:r)-o)+t+(i?"\r\n":"\n")+n,o=r+1,r=e.indexOf("\n",o)}while(-1!==r);return s+=e.substr(o),s}};const qn=kn,{stdout:Wn,stderr:Xn}=Un,{stringReplaceAll:Qn,stringEncaseCRLFWithFirstIndex:Yn}=Kn,{isArray:Zn}=Array,Vn=["ansi","ansi","ansi256","ansi16m"],zn=Object.create(null);class Jn{constructor(e){return er(e)}}const er=e=>{const t={};return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const n=Wn?Wn.level:0;e.level=void 0===t.level?n:t.level})(t,e),t.template=(...e)=>cr(t.template,...e),Object.setPrototypeOf(t,tr.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=Jn,t.template};function tr(e){return er(e)}for(const[e,t]of Object.entries(qn))zn[e]={get(){const n=sr(this,or(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:n}),n}};zn.visible={get(){const e=sr(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const nr=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of nr)zn[e]={get(){const{level:t}=this;return function(...n){const r=or(qn.color[Vn[t]][e](...n),qn.color.close,this._styler);return sr(this,r,this._isEmpty)}}};for(const e of nr){zn["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...n){const r=or(qn.bgColor[Vn[t]][e](...n),qn.bgColor.close,this._styler);return sr(this,r,this._isEmpty)}}}}const rr=Object.defineProperties((()=>{}),{...zn,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),or=(e,t,n)=>{let r,o;return void 0===n?(r=e,o=t):(r=n.openAll+e,o=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:o,parent:n}},sr=(e,t,n)=>{const r=(...e)=>Zn(e[0])&&Zn(e[0].raw)?ir(r,cr(r,...e)):ir(r,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(r,rr),r._generator=e,r._styler=t,r._isEmpty=n,r},ir=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let n=e._styler;if(void 0===n)return t;const{openAll:r,closeAll:o}=n;if(-1!==t.indexOf(""))for(;void 0!==n;)t=Qn(t,n.close,n.open),n=n.parent;const s=t.indexOf("\n");return-1!==s&&(t=Yn(t,o,r,s)),r+t+o};let ar;const cr=(e,...t)=>{const[n]=t;if(!Zn(n)||!Zn(n.raw))return t.join(" ");const r=t.slice(1),o=[n.raw[0]];for(let e=1;e<n.length;e++)o.push(String(r[e-1]).replace(/[{}\\]/g,"\\$&"),String(n.raw[e]));return void 0===ar&&(ar=function(){if(Fn)return Dn;Fn=1;const e=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,t=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,n=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,r=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,o=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function s(e){const t="u"===e[0],n="{"===e[1];return t&&!n&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):t&&n?String.fromCodePoint(parseInt(e.slice(2,-1),16)):o.get(e)||e}function i(e,t){const o=[],i=t.trim().split(/\s*,\s*/g);let a;for(const t of i){const i=Number(t);if(Number.isNaN(i)){if(!(a=t.match(n)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);o.push(a[2].replace(r,((e,t,n)=>t?s(t):n)))}else o.push(i)}return o}function a(e){t.lastIndex=0;const n=[];let r;for(;null!==(r=t.exec(e));){const e=r[1];if(r[2]){const t=i(e,r[2]);n.push([e].concat(t))}else n.push([e])}return n}function c(e,t){const n={};for(const e of t)for(const t of e.styles)n[t[0]]=e.inverse?null:t.slice(1);let r=e;for(const[e,t]of Object.entries(n))if(Array.isArray(t)){if(!(e in r))throw new Error(`Unknown Chalk style: ${e}`);r=t.length>0?r[e](...t):r[e]}return r}return Dn=(t,n)=>{const r=[],o=[];let i=[];if(n.replace(e,((e,n,u,l,p,f)=>{if(n)i.push(s(n));else if(l){const e=i.join("");i=[],o.push(0===r.length?e:c(t,r)(e)),r.push({inverse:u,styles:a(l)})}else if(p){if(0===r.length)throw new Error("Found extraneous } in Chalk template literal");o.push(c(t,r)(i.join(""))),i=[],r.pop()}else i.push(f)})),o.push(i.join("")),r.length>0){const e=`Chalk template literal is missing ${r.length} closing bracket${1===r.length?"":"s"} (\`}\`)`;throw new Error(e)}return o.join("")},Dn}()),ar(e,o.join(""))};Object.defineProperties(tr.prototype,zn);const ur=tr();ur.supportsColor=Wn,ur.stderr=tr({level:Xn?Xn.level:0}),ur.stderr.supportsColor=Xn;var lr=g(ur),pr={exports:{}},fr={exports:{}};const dr="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,hr=e,gr=dr?";":":",mr=Y,yr=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),br=(e,t)=>{const n=t.colon||gr,r=e.match(/\//)||dr&&e.match(/\\/)?[""]:[...dr?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],o=dr?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=dr?o.split(n):[""];return dr&&-1!==e.indexOf(".")&&""!==s[0]&&s.unshift(""),{pathEnv:r,pathExt:s,pathExtExe:o}},vr=(e,t,n)=>{"function"==typeof t&&(n=t,t={}),t||(t={});const{pathEnv:r,pathExt:o,pathExtExe:s}=br(e,t),i=[],a=n=>new Promise(((o,s)=>{if(n===r.length)return t.all&&i.length?o(i):s(yr(e));const a=r[n],u=/^".*"$/.test(a)?a.slice(1,-1):a,l=hr.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+l:l;o(c(p,n,0))})),c=(e,n,r)=>new Promise(((u,l)=>{if(r===o.length)return u(a(n+1));const p=o[r];mr(e+p,{pathExt:s},((o,s)=>{if(!o&&s){if(!t.all)return u(e+p);i.push(e+p)}return u(c(e,n,r+1))}))}));return n?a(0).then((e=>n(null,e)),n):a(0)};var Er=vr;vr.sync=(e,t)=>{t=t||{};const{pathEnv:n,pathExt:r,pathExtExe:o}=br(e,t),s=[];for(let i=0;i<n.length;i++){const a=n[i],c=/^".*"$/.test(a)?a.slice(1,-1):a,u=hr.join(c,e),l=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let e=0;e<r.length;e++){const n=l+r[e];try{if(mr.sync(n,{pathExt:o})){if(!t.all)return n;s.push(n)}}catch(e){}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw yr(e)};var Ar={exports:{}};const xr=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};Ar.exports=xr,Ar.exports.default=xr;var Rr=Ar.exports;const _r=e,Cr=Er,Sr=Rr;function wr(e,t){const n=e.options.env||process.env,r=process.cwd(),o=null!=e.options.cwd,s=o&&void 0!==process.chdir&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd)}catch(e){}let i;try{i=Cr.sync(e.command,{path:n[Sr({env:n})],pathExt:t?_r.delimiter:void 0})}catch(e){}finally{s&&process.chdir(r)}return i&&(i=_r.resolve(o?e.options.cwd:"",i)),i}var Or=function(e){return wr(e)||wr(e,!0)},Tr={};const $r=/([()\][%!^"`<>&|;, *?])/g;Tr.command=function(e){return e=e.replace($r,"^$1")},Tr.argument=function(e,t){return e=(e=`"${e=(e=(e=`${e}`).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace($r,"^$1"),t&&(e=e.replace($r,"^$1")),e};const Ir=/^#!(.*)/;const Hr=t,kr=(e="")=>{const t=e.match(Ir);if(!t)return null;const[n,r]=t[0].replace(/#! ?/,"").split(" "),o=n.split("/").pop();return"env"===o?r:r?`${o} ${r}`:o};var Lr=function(e){const t=Buffer.alloc(150);let n;try{n=Hr.openSync(e,"r"),Hr.readSync(n,t,0,150,0),Hr.closeSync(n)}catch(e){}return kr(t.toString())};const Mr=e,Pr=Or,Nr=Tr,Br=Lr,Gr="win32"===process.platform,jr=/\.(?:com|exe)$/i,Ur=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Dr(e){if(!Gr)return e;const t=function(e){e.file=Pr(e);const t=e.file&&Br(e.file);return t?(e.args.unshift(e.file),e.command=t,Pr(e)):e.file}(e),n=!jr.test(t);if(e.options.forceShell||n){const n=Ur.test(t);e.command=Mr.normalize(e.command),e.command=Nr.command(e.command),e.args=e.args.map((e=>Nr.argument(e,n)));const r=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${r}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}var Fr=function(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null);const r={command:e,args:t=t?t.slice(0):[],options:n=Object.assign({},n),file:void 0,original:{command:e,args:t}};return n.shell?r:Dr(r)};const Kr="win32"===process.platform;function qr(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function Wr(e,t){return Kr&&1===e&&!t.file?qr(t.original,"spawn"):null}var Xr={hookChildProcess:function(e,t){if(!Kr)return;const n=e.emit;e.emit=function(r,o){if("exit"===r){const r=Wr(o,t);if(r)return n.call(e,"error",r)}return n.apply(e,arguments)}},verifyENOENT:Wr,verifyENOENTSync:function(e,t){return Kr&&1===e&&!t.file?qr(t.original,"spawnSync"):null},notFoundError:qr};const Qr=i,Yr=Fr,Zr=Xr;function Vr(e,t,n){const r=Yr(e,t,n),o=Qr.spawn(r.command,r.args,r.options);return Zr.hookChildProcess(o,r),o}fr.exports=Vr,fr.exports.spawn=Vr,fr.exports.sync=function(e,t,n){const r=Yr(e,t,n),o=Qr.spawnSync(r.command,r.args,r.options);return o.error=o.error||Zr.verifyENOENTSync(o.status,r),o},fr.exports._parse=Yr,fr.exports._enoent=Zr;var zr=fr.exports,Jr={exports:{}};!function(t){const n=e,r=Rr,o=e=>{let t;e={cwd:process.cwd(),path:process.env[r()],execPath:process.execPath,...e};let o=n.resolve(e.cwd);const s=[];for(;t!==o;)s.push(n.join(o,"node_modules/.bin")),t=o,o=n.resolve(o,"..");const i=n.resolve(e.cwd,e.execPath,"..");return s.push(i),s.concat(e.path).join(n.delimiter)};t.exports=o,t.exports.default=o,t.exports.env=e=>{const n={...(e={env:process.env,...e}).env},o=r({env:n});return e.path=n[o],n[o]=t.exports(e),n}}(Jr);var eo=Jr.exports,to={exports:{}},no={exports:{}};const ro=(e,t)=>{for(const n of Reflect.ownKeys(t))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e};no.exports=ro,no.exports.default=ro;const oo=no.exports,so=new WeakMap,io=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let n,r=0;const o=e.displayName||e.name||"<anonymous>",s=function(...i){if(so.set(s,++r),1===r)n=e.apply(this,i),e=null;else if(!0===t.throw)throw new Error(`Function \`${o}\` can only be called once`);return n};return oo(s,e),so.set(s,r),s};to.exports=io,to.exports.default=io,to.exports.callCount=e=>{if(!so.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return so.get(e)};var ao=to.exports,co={},uo={},lo={};Object.defineProperty(lo,"__esModule",{value:!0}),lo.SIGNALS=void 0;lo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var po={};Object.defineProperty(po,"__esModule",{value:!0}),po.SIGRTMAX=po.getRealtimeSignals=void 0;po.getRealtimeSignals=function(){const e=go-ho+1;return Array.from({length:e},fo)};const fo=function(e,t){return{name:`SIGRT${t+1}`,number:ho+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},ho=34,go=64;po.SIGRTMAX=go,Object.defineProperty(uo,"__esModule",{value:!0}),uo.getSignals=void 0;var mo=r,yo=lo,bo=po;uo.getSignals=function(){const e=(0,bo.getRealtimeSignals)();return[...yo.SIGNALS,...e].map(vo)};const vo=function({name:e,number:t,description:n,action:r,forced:o=!1,standard:s}){const{signals:{[e]:i}}=mo.constants,a=void 0!==i;return{name:e,number:a?i:t,description:n,supported:a,action:r,forced:o,standard:s}};Object.defineProperty(co,"__esModule",{value:!0}),co.signalsByNumber=co.signalsByName=void 0;var Eo=r,Ao=uo,xo=po;const Ro=function(e,{name:t,number:n,description:r,supported:o,action:s,forced:i,standard:a}){return{...e,[t]:{name:t,number:n,description:r,supported:o,action:s,forced:i,standard:a}}},_o=(0,Ao.getSignals)().reduce(Ro,{});co.signalsByName=_o;const Co=function(e,t){const n=So(e,t);if(void 0===n)return{};const{name:r,description:o,supported:s,action:i,forced:a,standard:c}=n;return{[e]:{name:r,number:e,description:o,supported:s,action:i,forced:a,standard:c}}},So=function(e,t){const n=t.find((({name:t})=>Eo.constants.signals[t]===e));return void 0!==n?n:t.find((t=>t.number===e))},wo=function(){const e=(0,Ao.getSignals)(),t=xo.SIGRTMAX+1,n=Array.from({length:t},((t,n)=>Co(n,e)));return Object.assign({},...n)}();co.signalsByNumber=wo;const{signalsByName:Oo}=co;var To=({stdout:e,stderr:t,all:n,error:r,signal:o,exitCode:s,command:i,escapedCommand:a,timedOut:c,isCanceled:u,killed:l,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(o=null===o?void 0:o)?void 0:Oo[o].description,d=(({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:o,exitCode:s,isCanceled:i})=>e?`timed out after ${t} milliseconds`:i?"was canceled":void 0!==n?`failed with ${n}`:void 0!==r?`was killed with ${r} (${o})`:void 0!==s?`failed with exit code ${s}`:"failed")({timedOut:c,timeout:p,errorCode:r&&r.code,signal:o,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${d}: ${i}`,g="[object Error]"===Object.prototype.toString.call(r),m=g?`${h}\n${r.message}`:h,y=[m,t,e].filter(Boolean).join("\n");return g?(r.originalMessage=r.message,r.message=y):r=new Error(y),r.shortMessage=m,r.command=i,r.escapedCommand=a,r.exitCode=s,r.signal=o,r.signalDescription=f,r.stdout=e,r.stderr=t,void 0!==n&&(r.all=n),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=Boolean(c),r.isCanceled=u,r.killed=l&&!c,r},$o={exports:{}};const Io=["stdin","stdout","stderr"],Ho=e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return Io.map((t=>e[t]));if((e=>Io.some((t=>void 0!==e[t])))(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Io.map((e=>`\`${e}\``)).join(", ")}`);if("string"==typeof t)return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);const n=Math.max(t.length,Io.length);return Array.from({length:n},((e,n)=>t[n]))};$o.exports=Ho,$o.exports.node=e=>{const t=Ho(e);return"ipc"===t?"ipc":void 0===t||"string"==typeof t?[t,t,t,"ipc"]:t.includes("ipc")?t:[...t,"ipc"]};var ko,Lo=$o.exports,Mo={exports:{}},Po={exports:{}};var No=h.process;const Bo=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(Bo(No)){var Go,jo=a,Uo=(ko||(ko=1,function(e){e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}(Po)),Po.exports),Do=/^win/i.test(No.platform),Fo=c;"function"!=typeof Fo&&(Fo=Fo.EventEmitter),No.__signal_exit_emitter__?Go=No.__signal_exit_emitter__:((Go=No.__signal_exit_emitter__=new Fo).count=0,Go.emitted={}),Go.infinite||(Go.setMaxListeners(1/0),Go.infinite=!0),Mo.exports=function(e,t){if(!Bo(h.process))return function(){};jo.equal(typeof e,"function","a callback must be provided for exit handler"),!1===Xo&&Qo();var n="exit";t&&t.alwaysLast&&(n="afterexit");return Go.on(n,e),function(){Go.removeListener(n,e),0===Go.listeners("exit").length&&0===Go.listeners("afterexit").length&&Ko()}};var Ko=function(){Xo&&Bo(h.process)&&(Xo=!1,Uo.forEach((function(e){try{No.removeListener(e,Wo[e])}catch(e){}})),No.emit=Vo,No.reallyExit=Yo,Go.count-=1)};Mo.exports.unload=Ko;var qo=function(e,t,n){Go.emitted[e]||(Go.emitted[e]=!0,Go.emit(e,t,n))},Wo={};Uo.forEach((function(e){Wo[e]=function(){Bo(h.process)&&(No.listeners(e).length===Go.count&&(Ko(),qo("exit",null,e),qo("afterexit",null,e),Do&&"SIGHUP"===e&&(e="SIGINT"),No.kill(No.pid,e)))}})),Mo.exports.signals=function(){return Uo};var Xo=!1,Qo=function(){!Xo&&Bo(h.process)&&(Xo=!0,Go.count+=1,Uo=Uo.filter((function(e){try{return No.on(e,Wo[e]),!0}catch(e){return!1}})),No.emit=zo,No.reallyExit=Zo)};Mo.exports.load=Qo;var Yo=No.reallyExit,Zo=function(e){Bo(h.process)&&(No.exitCode=e||0,qo("exit",No.exitCode,null),qo("afterexit",No.exitCode,null),Yo.call(No,No.exitCode))},Vo=No.emit,zo=function(e,t){if("exit"===e&&Bo(h.process)){void 0!==t&&(No.exitCode=t);var n=Vo.apply(this,arguments);return qo("exit",No.exitCode,null),qo("afterexit",No.exitCode,null),n}return Vo.apply(this,arguments)}}else Mo.exports=function(){return function(){}};var Jo=Mo.exports;const es=r,ts=Jo,ns=(e,t,n,r)=>{if(!rs(t,n,r))return;const o=ss(n),s=setTimeout((()=>{e("SIGKILL")}),o);s.unref&&s.unref()},rs=(e,{forceKillAfterTimeout:t},n)=>os(e)&&!1!==t&&n,os=e=>e===es.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),ss=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};var is={spawnedKill:(e,t="SIGTERM",n={})=>{const r=e(t);return ns(e,t,n,r),r},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:n="SIGTERM"},r)=>{if(0===t||void 0===t)return r;let o;const s=new Promise(((r,s)=>{o=setTimeout((()=>{((e,t,n)=>{e.kill(t),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,n,s)}),t)})),i=r.finally((()=>{clearTimeout(o)}));return Promise.race([s,i])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},r)=>{if(!t||n)return r;const o=ts((()=>{e.kill()}));return r.finally((()=>{o()}))}};const as=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;as.writable=e=>as(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,as.readable=e=>as(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,as.duplex=e=>as.writable(e)&&as.readable(e),as.transform=e=>as.duplex(e)&&"function"==typeof e._transform;var cs=as,us={exports:{}};const{PassThrough:ls}=l;const{constants:ps}=u,fs=l,{promisify:ds}=o,hs=e=>{e={...e};const{array:t}=e;let{encoding:n}=e;const r="buffer"===n;let o=!1;t?o=!(n||r):n=n||"utf8",r&&(n=null);const s=new ls({objectMode:o});n&&s.setEncoding(n);let i=0;const a=[];return s.on("data",(e=>{a.push(e),o?i=a.length:i+=e.length})),s.getBufferedValue=()=>t?a:r?Buffer.concat(a,i):a.join(""),s.getBufferedLength=()=>i,s},gs=ds(fs.pipeline);class ms extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function ys(e,t){if(!e)throw new Error("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:n}=t,r=hs(t);return await new Promise(((t,o)=>{const s=e=>{e&&r.getBufferedLength()<=ps.MAX_LENGTH&&(e.bufferedData=r.getBufferedValue()),o(e)};(async()=>{try{await gs(e,r),t()}catch(e){s(e)}})(),r.on("data",(()=>{r.getBufferedLength()>n&&s(new ms)}))})),r.getBufferedValue()}us.exports=ys,us.exports.buffer=(e,t)=>ys(e,{...t,encoding:"buffer"}),us.exports.array=(e,t)=>ys(e,{...t,array:!0}),us.exports.MaxBufferError=ms;var bs=us.exports;const{PassThrough:vs}=l;const Es=cs,As=bs,xs=function(){var e=[],t=new vs({objectMode:!0});return t.setMaxListeners(0),t.add=n,t.isEmpty=function(){return 0==e.length},t.on("unpipe",r),Array.prototype.slice.call(arguments).forEach(n),t;function n(o){return Array.isArray(o)?(o.forEach(n),this):(e.push(o),o.once("end",r.bind(null,o)),o.once("error",t.emit.bind(t,"error")),o.pipe(t,{end:!1}),this)}function r(n){!(e=e.filter((function(e){return e!==n}))).length&&t.readable&&t.end()}},Rs=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},_s=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(e&&n)return t?As(e,{encoding:t,maxBuffer:r}):As.buffer(e,{maxBuffer:r})};var Cs={handleInput:(e,t)=>{void 0!==t&&void 0!==e.stdin&&(Es(t)?t.pipe(e.stdin):e.stdin.end(t))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=xs();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:n},{encoding:r,buffer:o,maxBuffer:s},i)=>{const a=_s(e,{encoding:r,buffer:o,maxBuffer:s}),c=_s(t,{encoding:r,buffer:o,maxBuffer:s}),u=_s(n,{encoding:r,buffer:o,maxBuffer:2*s});try{return await Promise.all([i,a,c,u])}catch(r){return Promise.all([{error:r,signal:r.signal,timedOut:r.timedOut},Rs(e,a),Rs(t,c),Rs(n,u)])}},validateInputSync:({input:e})=>{if(Es(e))throw new TypeError("The `input` option cannot be a stream in sync mode")}};const Ss=(async()=>{})().constructor.prototype,ws=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(Ss,e)]));var Os={mergePromise:(e,t)=>{for(const[n,r]of ws){const o="function"==typeof t?(...e)=>Reflect.apply(r.value,t(),e):r.value.bind(t);Reflect.defineProperty(e,n,{...r,value:o})}return e},getSpawnedPromise:e=>new Promise(((t,n)=>{e.on("exit",((e,n)=>{t({exitCode:e,signal:n})})),e.on("error",(e=>{n(e)})),e.stdin&&e.stdin.on("error",(e=>{n(e)}))}))};const Ts=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],$s=/^[\w.-]+$/,Is=/"/g,Hs=/ +/g;var ks={joinCommand:(e,t)=>Ts(e,t).join(" "),getEscapedCommand:(e,t)=>Ts(e,t).map((e=>(e=>"string"!=typeof e||$s.test(e)?e:`"${e.replace(Is,'\\"')}"`)(e))).join(" "),parseCommand:e=>{const t=[];for(const n of e.trim().split(Hs)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${n}`:t.push(n)}return t}};const Ls=e,Ms=i,Ps=zr,Ns=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),n="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===n&&(e=e.slice(0,e.length-1)),e},Bs=eo,Gs=ao,js=To,Us=Lo,{spawnedKill:Ds,spawnedCancel:Fs,setupTimeout:Ks,validateTimeout:qs,setExitHandler:Ws}=is,{handleInput:Xs,getSpawnedResult:Qs,makeAllStream:Ys,validateInputSync:Zs}=Cs,{mergePromise:Vs,getSpawnedPromise:zs}=Os,{joinCommand:Js,parseCommand:ei,getEscapedCommand:ti}=ks,ni=(e,t,n={})=>{const r=Ps._parse(e,t,n);return e=r.command,t=r.args,(n={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(n=r.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n}).env=(({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:o})=>{const s=t?{...process.env,...e}:e;return n?Bs.env({env:s,cwd:r,execPath:o}):s})(n),n.stdio=Us(n),"win32"===process.platform&&"cmd"===Ls.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:n,parsed:r}},ri=(e,t,n)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?Ns(t):t:void 0===n?void 0:"",oi=(e,t,n)=>{const r=ni(e,t,n),o=Js(e,t),s=ti(e,t);let i;qs(r.options);try{i=Ms.spawn(r.file,r.args,r.options)}catch(e){const t=new Ms.ChildProcess,n=Promise.reject(js({error:e,stdout:"",stderr:"",all:"",command:o,escapedCommand:s,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return Vs(t,n)}const a=zs(i),c=Ks(i,r.options,a),u=Ws(i,r.options,c),l={isCanceled:!1};i.kill=Ds.bind(null,i.kill.bind(i)),i.cancel=Fs.bind(null,i,l);const p=Gs((async()=>{const[{error:e,exitCode:t,signal:n,timedOut:a},c,p,f]=await Qs(i,r.options,u),d=ri(r.options,c),h=ri(r.options,p),g=ri(r.options,f);if(e||0!==t||null!==n){const c=js({error:e,exitCode:t,signal:n,stdout:d,stderr:h,all:g,command:o,escapedCommand:s,parsed:r,timedOut:a,isCanceled:l.isCanceled,killed:i.killed});if(!r.options.reject)return c;throw c}return{command:o,escapedCommand:s,exitCode:0,stdout:d,stderr:h,all:g,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return Xs(i,r.options.input),i.all=Ys(i,r.options),Vs(i,p)};function si(e,t){return ci("blue",e,t)}function ii(e,t=""){return ci("green",e,t)}function ai(e,t=""){return ci("red",e,t)}function ci(e,t,n=""){return n?console.log(lr[e](`${t}`),n):console.log(lr[e](`${t}`))}pr.exports=oi,pr.exports.sync=(e,t,n)=>{const r=ni(e,t,n),o=Js(e,t),s=ti(e,t);let i;Zs(r.options);try{i=Ms.spawnSync(r.file,r.args,r.options)}catch(e){throw js({error:e,stdout:"",stderr:"",all:"",command:o,escapedCommand:s,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})}const a=ri(r.options,i.stdout,i.error),c=ri(r.options,i.stderr,i.error);if(i.error||0!==i.status||null!==i.signal){const e=js({stdout:a,stderr:c,error:i.error,signal:i.signal,exitCode:i.status,command:o,escapedCommand:s,parsed:r,timedOut:i.error&&"ETIMEDOUT"===i.error.code,isCanceled:!1,killed:null!==i.signal});if(!r.options.reject)return e;throw e}return{command:o,escapedCommand:s,exitCode:0,stdout:a,stderr:c,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},pr.exports.command=(e,t)=>{const[n,...r]=ei(e);return oi(n,r,t)},pr.exports.commandSync=(e,t)=>{const[n,...r]=ei(e);return oi.sync(n,r,t)},pr.exports.node=(e,t,n={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(n=t,t=[]);const r=Us.node(n),o=process.execArgv.filter((e=>!e.startsWith("--inspect"))),{nodePath:s=process.execPath,nodeOptions:i=o}=n;return oi(s,[...i,e,...Array.isArray(t)?t:[]],{...n,stdin:void 0,stdout:void 0,stderr:void 0,stdio:r,shell:!1})};const ui=f.dirname(p.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:d&&d.src||new URL("index.cjs",document.baseURI).href));function li(n){return!!t.existsSync(n)||(li(e.dirname(n))?(t.mkdirSync(n),!0):void 0)}function pi(t){return e.resolve(ui,t)}function fi(e){return"import request from '@/utils/request'\n"}function di(e){return e.replace(/\/(\w)/g,(function(e,t){return t.toUpperCase()}))}function hi(e){return e.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}))}function gi(e,t,n="post"){const r=-1!==e.indexOf("{");let o=hi(di(n+e)),s="",i="";r&&(s=e.split("{")[0],i=(e.match(/\{(.+?)\}/g)[0]||"").replace(/\{|}/g,""),o=hi(di(n+s+i)));return`\n// ${t||""}\nexport function ${o}(${`${r?i:r||"post"!==n&&"put"!==n?"query":"data"}`}) {\n return request({\n url: ${""+(r?`'${s}' + ${i}`:`'${e}'`)},\n method: '${n}', ${""+(r?"":r||"post"!==n&&"put"!==n?"\n params: query":"\n data: data")}\n })\n}\n`}(async function(){return await async function(e){const t=On("dyp.config.js",{cwd:process.env.PWD}),n=await import(t);return e?n.default[e]:n.default}("swaggerConfig")})().then((e=>{const r=e;r||ai("swaggerConfig 未配置");!async function(e,r){si("获取远程json文件中...");const{paths:o}=await function(e){return new Promise(((t,r)=>{n.get(e,(e=>{const{statusCode:n}=e,o=e.headers["content-type"];let s;if(200!==n?s=new Error(`请求失败。\n状态码: ${n}`):/^application\/json/.test(o)||(s=new Error(`无效的 content-type.\n期望 application/json 但获取的是 ${o}`)),s)return ai(s.message),void e.resume();e.setEncoding("utf8");let i="";e.on("data",(e=>{i+=e})),e.on("end",(()=>{try{const e=JSON.parse(i);t(e)}catch(e){r(`错误: ${e.message}`)}}))})).on("error",(e=>{r(`错误: ${e.message}`)}))}))}(r);ii("获取成功正在生成api文件");const s={};for(const e in o){const t=o[e]||{},n=Object.keys(t)||[];for(let r=0,o=n.length;r<o;r++){const o=n[r],i=t[o].tags[0];if(!i)continue;si(i);const a=e.slice(1).split("/")[1],c={summary:t[o].summary,tag:i,name:e,type:o,folder:a};s[t[o].tags[0]]?s[t[o].tags[0]].push(c):s[t[o].tags[0]]=[c]}}for(const n in s){let r="";const o=[];let i="";for(const e of s[n]){0===o.filter((t=>t===e.type)).length&&o.push(e.type),r+=gi(e.name,e.summary,e.type),i=e.folder}r=fi()+r,li(pi(`${e}/${i}`)),t.writeFileSync(pi(`${e}/${i}/${n}.js`),r)}ii("生成完毕")}(`${process.env.PWD}${r.outputDir}`,`${r.path}${r.staticPath}`)}));
|
2
|
+
"use strict";var e=require("path"),t=require("fs"),n=require("http"),r=require("os"),o=require("util"),s=require("tty"),i=require("child_process"),a=require("assert"),c=require("events"),u=require("buffer"),l=require("stream"),p=require("node:url"),f=require("node:path"),d="undefined"!=typeof document?document.currentScript:null,h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function g(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var m,y,b,v,E=function(e){if("string"!=typeof e||""===e)return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1},A={"{":"}","(":")","[":"]"},x=function(e){if("!"===e[0])return!0;for(var t=0,n=-2,r=-2,o=-2,s=-2,i=-2;t<e.length;){if("*"===e[t])return!0;if("?"===e[t+1]&&/[\].+)]/.test(e[t]))return!0;if(-1!==r&&"["===e[t]&&"]"!==e[t+1]&&(r<t&&(r=e.indexOf("]",t)),r>t)){if(-1===i||i>r)return!0;if(-1===(i=e.indexOf("\\",t))||i>r)return!0}if(-1!==o&&"{"===e[t]&&"}"!==e[t+1]&&(o=e.indexOf("}",t))>t&&(-1===(i=e.indexOf("\\",t))||i>o))return!0;if(-1!==s&&"("===e[t]&&"?"===e[t+1]&&/[:!=]/.test(e[t+2])&&")"!==e[t+3]&&(s=e.indexOf(")",t))>t&&(-1===(i=e.indexOf("\\",t))||i>s))return!0;if(-1!==n&&"("===e[t]&&"|"!==e[t+1]&&(n<t&&(n=e.indexOf("|",t)),-1!==n&&")"!==e[n+1]&&(s=e.indexOf(")",n))>n&&(-1===(i=e.indexOf("\\",n))||i>s)))return!0;if("\\"===e[t]){var a=e[t+1];t+=2;var c=A[a];if(c){var u=e.indexOf(c,t);-1!==u&&(t=u+1)}if("!"===e[t])return!0}else t++}return!1},R=function(e){if("!"===e[0])return!0;for(var t=0;t<e.length;){if(/[*?{}()[\]]/.test(e[t]))return!0;if("\\"===e[t]){var n=e[t+1];t+=2;var r=A[n];if(r){var o=e.indexOf(r,t);-1!==o&&(t=o+1)}if("!"===e[t])return!0}else t++}return!1},C={exports:{}};var _=r;void 0!==_.homedir?C.exports=_.homedir:C.exports=function(){if(v)return b;v=1;var e=t,n=function(){if(y)return m;function e(e,t){if(!e||!e.length||"#"===e.charAt(0))return null;var n=e.split(":");return{username:n[0],password:n[1],uid:n[2],gid:n[3],gecos:n[4],homedir:n[5],shell:n[6]}}return y=1,m=function(t){if("string"!=typeof t)throw new Error("expected a string");return t.split("\n").map(e).filter(Boolean)}}();return b=function(){if("win32"===process.platform)return process.env.USERPROFILE?process.env.USERPROFILE:process.env.HOMEDRIVE&&process.env.HOMEPATH?process.env.HOMEDRIVE+process.env.HOMEPATH:process.env.HOME?process.env.HOME:null;if(process.env.HOME)return process.env.HOME;var t=function(t){try{return e.readFileSync(t,"utf8")}catch(e){return""}}("/etc/passwd"),r=function(e,t){for(var n=e.length,r=0;r<n;r++)if(+e[r].uid===t)return e[r].homedir}(n(t),"function"==typeof process.geteuid?process.geteuid():process.getuid());if(r)return r;var o=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return o?"darwin"===process.platform?"/Users/"+o:"/home/"+o:null}}();var S=C.exports,w=S,O=e,T=function(e){var t=w();return 126===e.charCodeAt(0)?43===e.charCodeAt(1)?O.join(process.cwd(),e.slice(2)):t?O.join(t,e.slice(1)):e:e},$={exports:{}},I={exports:{}},H={};H.parse=H.decode=function(e){var t={},n=t,r=null,o=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;return e.split(/[\r\n]+/g).forEach((function(e,s,i){if(e&&!e.match(/^\s*[;#]/)){var a=e.match(o);if(a){if(void 0!==a[1])return"__proto__"===(r=N(a[1]))?void(n={}):void(n=t[r]=t[r]||{});var c=N(a[2]);if("__proto__"!==c){var u=!a[3]||N(a[4]);switch(u){case"true":case"false":case"null":u=JSON.parse(u)}if(c.length>2&&"[]"===c.slice(-2)){if("__proto__"===(c=c.substring(0,c.length-2)))return;n[c]?Array.isArray(n[c])||(n[c]=[n[c]]):n[c]=[]}Array.isArray(n[c])?n[c].push(u):n[c]=u}}}})),Object.keys(t).filter((function(e,n,r){if(!t[e]||"object"!=typeof t[e]||Array.isArray(t[e]))return!1;var o=k(e),s=t,i=o.pop(),a=i.replace(/\\\./g,".");return o.forEach((function(e,t,n){"__proto__"!==e&&(s[e]&&"object"==typeof s[e]||(s[e]={}),s=s[e])})),(s!==t||a!==i)&&(s[a]=t[e],!0)})).forEach((function(e,n,r){delete t[e]})),t},H.stringify=H.encode=function e(t,n){var r=[],o="";"string"==typeof n?n={section:n,whitespace:!1}:(n=n||{}).whitespace=!0===n.whitespace;var s=n.whitespace?" = ":"=";Object.keys(t).forEach((function(e,n,i){var a=t[e];a&&Array.isArray(a)?a.forEach((function(t){o+=P(e+"[]")+s+P(t)+"\n"})):a&&"object"==typeof a?r.push(e):o+=P(e)+s+P(a)+L})),n.section&&o.length&&(o="["+P(n.section)+"]"+L+o);return r.forEach((function(r,s,i){var a=k(r).join("\\."),c=(n.section?n.section+".":"")+a,u=e(t[r],{section:c,whitespace:n.whitespace});o.length&&u.length&&(o+=L),o+=u})),o},H.safe=P,H.unsafe=N;var L="undefined"!=typeof process&&"win32"===process.platform?"\r\n":"\n";function k(e){return e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map((function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")}))}function M(e){return'"'===e.charAt(0)&&'"'===e.slice(-1)||"'"===e.charAt(0)&&"'"===e.slice(-1)}function P(e){return"string"!=typeof e||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&M(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#")}function N(e,t){if(!M(e=(e||"").trim())){for(var n=!1,r="",o=0,s=e.length;o<s;o++){var i=e.charAt(o);if(n)-1!=="\\;#".indexOf(i)?r+=i:r+="\\"+i,n=!1;else{if(-1!==";#".indexOf(i))break;"\\"===i?n=!0:r+=i}}return n&&(r+="\\"),r.trim()}"'"===e.charAt(0)&&(e=e.substr(1,e.length-2));try{e=JSON.parse(e)}catch(e){}return e}var B,G,j={exports:{}};B=j,G=j.exports,function(e){G?B.exports=e():"undefined"!=typeof window?window.isWindows=e():void 0!==h?h.isWindows=e():"undefined"!=typeof self?self.isWindows=e():this.isWindows=e()}((function(){return function(){return process&&("win32"===process.platform||/^(msys|cygwin)$/.test(process.env.OSTYPE))}}));var U,D,F,K,q,W=j.exports;q="win32"===process.platform||h.TESTING_WINDOWS?function(){if(D)return U;D=1,U=r,r.sync=function(t,r){return n(e.statSync(t),t,r)};var e=t;function n(e,t,n){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var n=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!n)return!0;if(-1!==(n=n.split(";")).indexOf(""))return!0;for(var r=0;r<n.length;r++){var o=n[r].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,n)}function r(t,r,o){e.stat(t,(function(e,s){o(e,!e&&n(s,t,r))}))}return U}():function(){if(K)return F;K=1,F=n,n.sync=function(t,n){return r(e.statSync(t),n)};var e=t;function n(t,n,o){e.stat(t,(function(e,t){o(e,!e&&r(t,n))}))}function r(e,t){return e.isFile()&&function(e,t){var n=e.mode,r=e.uid,o=e.gid,s=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),i=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8);return n&parseInt("001",8)||n&c&&o===i||n&a&&r===s||n&(a|c)&&0===s}(e,t)}return F}();var X,Q,Y=Z;function Z(e,t,n){if("function"==typeof t&&(n=t,t={}),!n){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(n,r){Z(e,t||{},(function(e,t){e?r(e):n(t)}))}))}q(e,t||{},(function(e,r){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,r=!1),n(e,r)}))}Z.sync=function(e,t){try{return q.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}},function(n){var r,o=t,s=e,i=T,a=S,c=H;function u(){if(process.env.PREFIX)r=process.env.PREFIX;else{var t=a();if(t){var n=s.resolve(t,".npmrc");r=l(n)}if(!r){var c=function(){try{return o.realpathSync(function(){if(Q)return X;Q=1,X=a,a.sync=function(e,t){for(var r=i(e,t=t||{}),a=r.env,c=r.ext,u=r.extExe,l=[],p=0,f=a.length;p<f;p++){var d=a[p];'"'===d.charAt(0)&&'"'===d.slice(-1)&&(d=d.slice(1,-1));var h=n.join(d,e);!d&&/^\.[\\\/]/.test(e)&&(h=e.slice(0,2)+h);for(var g=0,m=c.length;g<m;g++){var y=h+c[g];try{if(o.sync(y,{pathExt:u})){if(!t.all)return y;l.push(y)}}catch(e){}}}if(t.all&&l.length)return l;if(t.nothrow)return null;throw s(e)};var t="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,n=e,r=t?";":":",o=Y;function s(e){var t=new Error("not found: "+e);return t.code="ENOENT",t}function i(e,n){var o=n.colon||r,s=n.path||process.env.PATH||"",i=[""];s=s.split(o);var a="";return t&&(s.unshift(process.cwd()),i=(a=n.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM").split(o),-1!==e.indexOf(".")&&""!==i[0]&&i.unshift("")),(e.match(/\//)||t&&e.match(/\\/))&&(s=[""]),{env:s,ext:i,extExe:a}}function a(e,t,r){"function"==typeof t&&(r=t,t={});var a=i(e,t),c=a.env,u=a.ext,l=a.extExe,p=[];!function i(a,f){if(a===f)return t.all&&p.length?r(null,p):r(s(e));var d=c[a];'"'===d.charAt(0)&&'"'===d.slice(-1)&&(d=d.slice(1,-1));var h=n.join(d,e);!d&&/^\.[\\\/]/.test(e)&&(h=e.slice(0,2)+h),function e(n,s){if(n===s)return i(a+1,f);var c=u[n];o(h+c,{pathExt:l},(function(o,i){if(!o&&i){if(!t.all)return r(null,h+c);p.push(h+c)}return e(n+1,s)}))}(0,u.length)}(0,c.length)}return X}().sync("npm"))}catch(e){}return null}();if(c){var u=s.resolve(c,"..","..","npmrc");if(r=l(u)){var p=s.resolve(r,"etc","npmrc");r=l(p)||r}}r||function(){var e=W;e()?r=process.env.APPDATA?s.join(process.env.APPDATA,"npm"):s.dirname(process.execPath):(r=s.dirname(s.dirname(process.execPath)),process.env.DESTDIR&&(r=s.join(process.env.DESTDIR,r)))}()}}if(r)return i(r)}function l(e){try{var t=o.readFileSync(e,"utf-8"),n=c.parse(t);if(n.prefix)return n.prefix}catch(e){}return null}Object.defineProperty(n,"exports",{enumerable:!0,get:function(){return r||(r=u())}})}(I);var V=I.exports;!function(t){var n,r=e,o=V,s=W;Object.defineProperty(t,"exports",{enumerable:!0,get:function(){return n||(n=s()?r.resolve(o,"node_modules"):r.resolve(o,"lib/node_modules"))}})}($);var z=e,J=T,ee=$.exports,te=t,ne=e;var re={};!function(e){e.isInteger=e=>"number"==typeof e?Number.isInteger(e):"string"==typeof e&&""!==e.trim()&&Number.isInteger(Number(e)),e.find=(e,t)=>e.nodes.find((e=>e.type===t)),e.exceedsLimit=(t,n,r=1,o)=>!1!==o&&(!(!e.isInteger(t)||!e.isInteger(n))&&(Number(n)-Number(t))/Number(r)>=o),e.escapeNode=(e,t=0,n)=>{let r=e.nodes[t];r&&(n&&r.type===n||"open"===r.type||"close"===r.type)&&!0!==r.escaped&&(r.value="\\"+r.value,r.escaped=!0)},e.encloseBrace=e=>"brace"===e.type&&(e.commas>>0+e.ranges>>0==0&&(e.invalid=!0,!0)),e.isInvalidBrace=e=>"brace"===e.type&&(!(!0!==e.invalid&&!e.dollar)||(e.commas>>0+e.ranges>>0==0||!0!==e.open||!0!==e.close)&&(e.invalid=!0,!0)),e.isOpenOrClose=e=>"open"===e.type||"close"===e.type||(!0===e.open||!0===e.close),e.reduce=e=>e.reduce(((e,t)=>("text"===t.type&&e.push(t.value),"range"===t.type&&(t.type="text"),e)),[]),e.flatten=(...e)=>{const t=[],n=e=>{for(let r=0;r<e.length;r++){let o=e[r];Array.isArray(o)?n(o):void 0!==o&&t.push(o)}return t};return n(e),t}}(re);const oe=re;var se=(e,t={})=>{let n=(e,r={})=>{let o=t.escapeInvalid&&oe.isInvalidBrace(r),s=!0===e.invalid&&!0===t.escapeInvalid,i="";if(e.value)return(o||s)&&oe.isOpenOrClose(e)?"\\"+e.value:e.value;if(e.value)return e.value;if(e.nodes)for(let t of e.nodes)i+=n(t);return i};return n(e)};const ie=function(e){return"number"==typeof e?e-e==0:"string"==typeof e&&""!==e.trim()&&(Number.isFinite?Number.isFinite(+e):isFinite(+e))},ae=(e,t,n)=>{if(!1===ie(e))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===t||e===t)return String(e);if(!1===ie(t))throw new TypeError("toRegexRange: expected the second argument to be a number.");let r={relaxZeros:!0,...n};"boolean"==typeof r.strictZeros&&(r.relaxZeros=!1===r.strictZeros);let o=e+":"+t+"="+String(r.relaxZeros)+String(r.shorthand)+String(r.capture)+String(r.wrap);if(ae.cache.hasOwnProperty(o))return ae.cache[o].result;let s=Math.min(e,t),i=Math.max(e,t);if(1===Math.abs(s-i)){let n=e+"|"+t;return r.capture?`(${n})`:!1===r.wrap?n:`(?:${n})`}let a=ye(e)||ye(t),c={min:e,max:t,a:s,b:i},u=[],l=[];if(a&&(c.isPadded=a,c.maxLen=String(c.max).length),s<0){l=ue(i<0?Math.abs(i):1,Math.abs(s),c,r),s=c.a=0}return i>=0&&(u=ue(s,i,c,r)),c.negatives=l,c.positives=u,c.result=function(e,t,n){let r=le(e,t,"-",!1)||[],o=le(t,e,"",!1)||[],s=le(e,t,"-?",!0)||[];return r.concat(s).concat(o).join("|")}(l,u),!0===r.capture?c.result=`(${c.result})`:!1!==r.wrap&&u.length+l.length>1&&(c.result=`(?:${c.result})`),ae.cache[o]=c,c.result};function ce(e,t,n){if(e===t)return{pattern:e,count:[],digits:0};let r=function(e,t){let n=[];for(let r=0;r<e.length;r++)n.push([e[r],t[r]]);return n}(e,t),o=r.length,s="",i=0;for(let e=0;e<o;e++){let[t,n]=r[e];t===n?s+=t:"0"!==t||"9"!==n?s+=me(t,n):i++}return i&&(s+=!0===n.shorthand?"\\d":"[0-9]"),{pattern:s,count:[i],digits:o}}function ue(e,t,n,r){let o,s=function(e,t){let n=1,r=1,o=de(e,n),s=new Set([t]);for(;e<=o&&o<=t;)s.add(o),n+=1,o=de(e,n);for(o=he(t+1,r)-1;e<o&&o<=t;)s.add(o),r+=1,o=he(t+1,r)-1;return s=[...s],s.sort(pe),s}(e,t),i=[],a=e;for(let e=0;e<s.length;e++){let t=s[e],c=ce(String(a),String(t),r),u="";n.isPadded||!o||o.pattern!==c.pattern?(n.isPadded&&(u=be(t,n,r)),c.string=u+c.pattern+ge(c.count),i.push(c),a=t+1,o=c):(o.count.length>1&&o.count.pop(),o.count.push(c.count[0]),o.string=o.pattern+ge(o.count),a=t+1)}return i}function le(e,t,n,r,o){let s=[];for(let o of e){let{string:e}=o;r||fe(t,"string",e)||s.push(n+e),r&&fe(t,"string",e)&&s.push(n+e)}return s}function pe(e,t){return e>t?1:t>e?-1:0}function fe(e,t,n){return e.some((e=>e[t]===n))}function de(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function he(e,t){return e-e%Math.pow(10,t)}function ge(e){let[t=0,n=""]=e;return n||t>1?`{${t+(n?","+n:"")}}`:""}function me(e,t,n){return`[${e}${t-e==1?"":"-"}${t}]`}function ye(e){return/^-?(0+)\d/.test(e)}function be(e,t,n){if(!t.isPadded)return e;let r=Math.abs(t.maxLen-String(e).length),o=!1!==n.relaxZeros;switch(r){case 0:return"";case 1:return o?"0?":"0";case 2:return o?"0{0,2}":"00";default:return o?`0{0,${r}}`:`0{${r}}`}}ae.cache={},ae.clearCache=()=>ae.cache={};const ve=o,Ee=ae,Ae=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),xe=e=>"number"==typeof e||"string"==typeof e&&""!==e,Re=e=>Number.isInteger(+e),Ce=e=>{let t=`${e}`,n=-1;if("-"===t[0]&&(t=t.slice(1)),"0"===t)return!1;for(;"0"===t[++n];);return n>0},_e=(e,t,n)=>{if(t>0){let n="-"===e[0]?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return!1===n?String(e):e},Se=(e,t)=>{let n="-"===e[0]?"-":"";for(n&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return n?"-"+e:e},we=(e,t,n,r)=>{if(n)return Ee(e,t,{wrap:!1,...r});let o=String.fromCharCode(e);return e===t?o:`[${o}-${String.fromCharCode(t)}]`},Oe=(e,t,n)=>{if(Array.isArray(e)){let t=!0===n.wrap,r=n.capture?"":"?:";return t?`(${r}${e.join("|")})`:e.join("|")}return Ee(e,t,n)},Te=(...e)=>new RangeError("Invalid range arguments: "+ve.inspect(...e)),$e=(e,t,n)=>{if(!0===n.strictRanges)throw Te([e,t]);return[]},Ie=(e,t,n=1,r={})=>{let o=Number(e),s=Number(t);if(!Number.isInteger(o)||!Number.isInteger(s)){if(!0===r.strictRanges)throw Te([e,t]);return[]}0===o&&(o=0),0===s&&(s=0);let i=o>s,a=String(e),c=String(t),u=String(n);n=Math.max(Math.abs(n),1);let l=Ce(a)||Ce(c)||Ce(u),p=l?Math.max(a.length,c.length,u.length):0,f=!1===l&&!1===((e,t,n)=>"string"==typeof e||"string"==typeof t||!0===n.stringify)(e,t,r),d=r.transform||(e=>t=>!0===e?Number(t):String(t))(f);if(r.toRegex&&1===n)return we(Se(e,p),Se(t,p),!0,r);let h={negatives:[],positives:[]},g=[],m=0;for(;i?o>=s:o<=s;)!0===r.toRegex&&n>1?h[(y=o)<0?"negatives":"positives"].push(Math.abs(y)):g.push(_e(d(o,m),p,f)),o=i?o-n:o+n,m++;var y;return!0===r.toRegex?n>1?((e,t)=>{e.negatives.sort(((e,t)=>e<t?-1:e>t?1:0)),e.positives.sort(((e,t)=>e<t?-1:e>t?1:0));let n,r=t.capture?"":"?:",o="",s="";return e.positives.length&&(o=e.positives.join("|")),e.negatives.length&&(s=`-(${r}${e.negatives.join("|")})`),n=o&&s?`${o}|${s}`:o||s,t.wrap?`(${r}${n})`:n})(h,r):Oe(g,null,{wrap:!1,...r}):g},He=(e,t,n,r={})=>{if(null==t&&xe(e))return[e];if(!xe(e)||!xe(t))return $e(e,t,r);if("function"==typeof n)return He(e,t,1,{transform:n});if(Ae(n))return He(e,t,0,n);let o={...r};return!0===o.capture&&(o.wrap=!0),n=n||o.step||1,Re(n)?Re(e)&&Re(t)?Ie(e,t,n,o):((e,t,n=1,r={})=>{if(!Re(e)&&e.length>1||!Re(t)&&t.length>1)return $e(e,t,r);let o=r.transform||(e=>String.fromCharCode(e)),s=`${e}`.charCodeAt(0),i=`${t}`.charCodeAt(0),a=s>i,c=Math.min(s,i),u=Math.max(s,i);if(r.toRegex&&1===n)return we(c,u,!1,r);let l=[],p=0;for(;a?s>=i:s<=i;)l.push(o(s,p)),s=a?s-n:s+n,p++;return!0===r.toRegex?Oe(l,null,{wrap:!1,options:r}):l})(e,t,Math.max(Math.abs(n),1),o):null==n||Ae(n)?He(e,t,1,n):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(n,o)};const Le=He,ke=re;var Me=(e,t={})=>{let n=(e,r={})=>{let o=ke.isInvalidBrace(r),s=!0===e.invalid&&!0===t.escapeInvalid,i=!0===o||!0===s,a=!0===t.escapeInvalid?"\\":"",c="";if(!0===e.isOpen)return a+e.value;if(!0===e.isClose)return a+e.value;if("open"===e.type)return i?a+e.value:"(";if("close"===e.type)return i?a+e.value:")";if("comma"===e.type)return"comma"===e.prev.type?"":i?e.value:"|";if(e.value)return e.value;if(e.nodes&&e.ranges>0){let n=ke.reduce(e.nodes),r=Le(...n,{...t,wrap:!1,toRegex:!0});if(0!==r.length)return n.length>1&&r.length>1?`(${r})`:r}if(e.nodes)for(let t of e.nodes)c+=n(t,e);return c};return n(e)};const Pe=He,Ne=se,Be=re,Ge=(e="",t="",n=!1)=>{let r=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return n?Be.flatten(t).map((e=>`{${e}}`)):t;for(let o of e)if(Array.isArray(o))for(let e of o)r.push(Ge(e,t,n));else for(let e of t)!0===n&&"string"==typeof e&&(e=`{${e}}`),r.push(Array.isArray(e)?Ge(o,e,n):o+e);return Be.flatten(r)};var je=(e,t={})=>{let n=void 0===t.rangeLimit?1e3:t.rangeLimit,r=(e,o={})=>{e.queue=[];let s=o,i=o.queue;for(;"brace"!==s.type&&"root"!==s.type&&s.parent;)s=s.parent,i=s.queue;if(e.invalid||e.dollar)return void i.push(Ge(i.pop(),Ne(e,t)));if("brace"===e.type&&!0!==e.invalid&&2===e.nodes.length)return void i.push(Ge(i.pop(),["{}"]));if(e.nodes&&e.ranges>0){let r=Be.reduce(e.nodes);if(Be.exceedsLimit(...r,t.step,n))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let o=Pe(...r,t);return 0===o.length&&(o=Ne(e,t)),i.push(Ge(i.pop(),o)),void(e.nodes=[])}let a=Be.encloseBrace(e),c=e.queue,u=e;for(;"brace"!==u.type&&"root"!==u.type&&u.parent;)u=u.parent,c=u.queue;for(let t=0;t<e.nodes.length;t++){let n=e.nodes[t];"comma"!==n.type||"brace"!==e.type?"close"!==n.type?n.value&&"open"!==n.type?c.push(Ge(c.pop(),n.value)):n.nodes&&r(n,e):i.push(Ge(i.pop(),c,a)):(1===t&&c.push(""),c.push(""))}return c};return Be.flatten(r(e))};const Ue=se,{MAX_LENGTH:De,CHAR_BACKSLASH:Fe,CHAR_BACKTICK:Ke,CHAR_COMMA:qe,CHAR_DOT:We,CHAR_LEFT_PARENTHESES:Xe,CHAR_RIGHT_PARENTHESES:Qe,CHAR_LEFT_CURLY_BRACE:Ye,CHAR_RIGHT_CURLY_BRACE:Ze,CHAR_LEFT_SQUARE_BRACKET:Ve,CHAR_RIGHT_SQUARE_BRACKET:ze,CHAR_DOUBLE_QUOTE:Je,CHAR_SINGLE_QUOTE:et,CHAR_NO_BREAK_SPACE:tt,CHAR_ZERO_WIDTH_NOBREAK_SPACE:nt}={MAX_LENGTH:65536,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"};var rt=(e,t={})=>{if("string"!=typeof e)throw new TypeError("Expected a string");let n=t||{},r="number"==typeof n.maxLength?Math.min(De,n.maxLength):De;if(e.length>r)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${r})`);let o,s={type:"root",input:e,nodes:[]},i=[s],a=s,c=s,u=0,l=e.length,p=0,f=0;const d=()=>e[p++],h=e=>{if("text"===e.type&&"dot"===c.type&&(c.type="text"),!c||"text"!==c.type||"text"!==e.type)return a.nodes.push(e),e.parent=a,e.prev=c,c=e,e;c.value+=e.value};for(h({type:"bos"});p<l;)if(a=i[i.length-1],o=d(),o!==nt&&o!==tt)if(o!==Fe)if(o!==ze)if(o!==Ve)if(o!==Xe)if(o!==Qe)if(o!==Je&&o!==et&&o!==Ke)if(o!==Ye)if(o!==Ze)if(o===qe&&f>0){if(a.ranges>0){a.ranges=0;let e=a.nodes.shift();a.nodes=[e,{type:"text",value:Ue(a)}]}h({type:"comma",value:o}),a.commas++}else if(o===We&&f>0&&0===a.commas){let e=a.nodes;if(0===f||0===e.length){h({type:"text",value:o});continue}if("dot"===c.type){if(a.range=[],c.value+=o,c.type="range",3!==a.nodes.length&&5!==a.nodes.length){a.invalid=!0,a.ranges=0,c.type="text";continue}a.ranges++,a.args=[];continue}if("range"===c.type){e.pop();let t=e[e.length-1];t.value+=c.value+o,c=t,a.ranges--;continue}h({type:"dot",value:o})}else h({type:"text",value:o});else{if("brace"!==a.type){h({type:"text",value:o});continue}let e="close";a=i.pop(),a.close=!0,h({type:e,value:o}),f--,a=i[i.length-1]}else{f++;let e=c.value&&"$"===c.value.slice(-1)||!0===a.dollar;a=h({type:"brace",open:!0,close:!1,dollar:e,depth:f,commas:0,ranges:0,nodes:[]}),i.push(a),h({type:"open",value:o})}else{let e,n=o;for(!0!==t.keepQuotes&&(o="");p<l&&(e=d());)if(e!==Fe){if(e===n){!0===t.keepQuotes&&(o+=e);break}o+=e}else o+=e+d();h({type:"text",value:o})}else{if("paren"!==a.type){h({type:"text",value:o});continue}a=i.pop(),h({type:"text",value:o}),a=i[i.length-1]}else a=h({type:"paren",nodes:[]}),i.push(a),h({type:"text",value:o});else{let e;for(u++;p<l&&(e=d());)if(o+=e,e!==Ve)if(e!==Fe){if(e===ze&&(u--,0===u))break}else o+=d();else u++;h({type:"text",value:o})}else h({type:"text",value:"\\"+o});else h({type:"text",value:(t.keepEscaping?o:"")+d()});do{if(a=i.pop(),"root"!==a.type){a.nodes.forEach((e=>{e.nodes||("open"===e.type&&(e.isOpen=!0),"close"===e.type&&(e.isClose=!0),e.nodes||(e.type="text"),e.invalid=!0)}));let e=i[i.length-1],t=e.nodes.indexOf(a);e.nodes.splice(t,1,...a.nodes)}}while(i.length>0);return h({type:"eos"}),s};const ot=se,st=Me,it=je,at=rt,ct=(e,t={})=>{let n=[];if(Array.isArray(e))for(let r of e){let e=ct.create(r,t);Array.isArray(e)?n.push(...e):n.push(e)}else n=[].concat(ct.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(n=[...new Set(n)]),n};ct.parse=(e,t={})=>at(e,t),ct.stringify=(e,t={})=>ot("string"==typeof e?ct.parse(e,t):e,t),ct.compile=(e,t={})=>("string"==typeof e&&(e=ct.parse(e,t)),st(e,t)),ct.expand=(e,t={})=>{"string"==typeof e&&(e=ct.parse(e,t));let n=it(e,t);return!0===t.noempty&&(n=n.filter(Boolean)),!0===t.nodupes&&(n=[...new Set(n)]),n},ct.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?ct.compile(e,t):ct.expand(e,t);var ut=ct,lt={};const pt=e,ft="\\\\/",dt=`[^${ft}]`,ht="\\.",gt="\\/",mt="[^/]",yt=`(?:${gt}|$)`,bt=`(?:^|${gt})`,vt=`${ht}{1,2}${yt}`,Et={DOT_LITERAL:ht,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:gt,ONE_CHAR:"(?=.)",QMARK:mt,END_ANCHOR:yt,DOTS_SLASH:vt,NO_DOT:`(?!${ht})`,NO_DOTS:`(?!${bt}${vt})`,NO_DOT_SLASH:`(?!${ht}{0,1}${yt})`,NO_DOTS_SLASH:`(?!${vt})`,QMARK_NO_DOT:`[^.${gt}]`,STAR:`${mt}*?`,START_ANCHOR:bt},At={...Et,SLASH_LITERAL:`[${ft}]`,QMARK:dt,STAR:`${dt}*?`,DOTS_SLASH:`${ht}{1,2}(?:[${ft}]|$)`,NO_DOT:`(?!${ht})`,NO_DOTS:`(?!(?:^|[${ft}])${ht}{1,2}(?:[${ft}]|$))`,NO_DOT_SLASH:`(?!${ht}{0,1}(?:[${ft}]|$))`,NO_DOTS_SLASH:`(?!${ht}{1,2}(?:[${ft}]|$))`,QMARK_NO_DOT:`[^.${ft}]`,START_ANCHOR:`(?:^|[${ft}])`,END_ANCHOR:`(?:[${ft}]|$)`};var xt={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:pt.sep,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?At:Et};!function(t){const n=e,r="win32"===process.platform,{REGEX_BACKSLASH:o,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:a}=xt;t.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),t.hasRegexChars=e=>i.test(e),t.isRegexChar=e=>1===e.length&&t.hasRegexChars(e),t.escapeRegex=e=>e.replace(a,"\\$1"),t.toPosixSlashes=e=>e.replace(o,"/"),t.removeBackslashes=e=>e.replace(s,(e=>"\\"===e?"":e)),t.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},t.isWindows=e=>e&&"boolean"==typeof e.windows?e.windows:!0===r||"\\"===n.sep,t.escapeLast=(e,n,r)=>{const o=e.lastIndexOf(n,r);return-1===o?e:"\\"===e[o-1]?t.escapeLast(e,n,o-1):`${e.slice(0,o)}\\${e.slice(o)}`},t.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},t.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(r=`(?:^(?!${r}).*$)`),r}}(lt);const Rt=lt,{CHAR_ASTERISK:Ct,CHAR_AT:_t,CHAR_BACKWARD_SLASH:St,CHAR_COMMA:wt,CHAR_DOT:Ot,CHAR_EXCLAMATION_MARK:Tt,CHAR_FORWARD_SLASH:$t,CHAR_LEFT_CURLY_BRACE:It,CHAR_LEFT_PARENTHESES:Ht,CHAR_LEFT_SQUARE_BRACKET:Lt,CHAR_PLUS:kt,CHAR_QUESTION_MARK:Mt,CHAR_RIGHT_CURLY_BRACE:Pt,CHAR_RIGHT_PARENTHESES:Nt,CHAR_RIGHT_SQUARE_BRACKET:Bt}=xt,Gt=e=>e===$t||e===St,jt=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};var Ut=(e,t)=>{const n=t||{},r=e.length-1,o=!0===n.parts||!0===n.scanToEnd,s=[],i=[],a=[];let c,u,l=e,p=-1,f=0,d=0,h=!1,g=!1,m=!1,y=!1,b=!1,v=!1,E=!1,A=!1,x=!1,R=!1,C=0,_={value:"",depth:0,isGlob:!1};const S=()=>p>=r,w=()=>(c=u,l.charCodeAt(++p));for(;p<r;){let e;if(u=w(),u!==St){if(!0===v||u===It){for(C++;!0!==S()&&(u=w());)if(u!==St)if(u!==It){if(!0!==v&&u===Ot&&(u=w())===Ot){if(h=_.isBrace=!0,m=_.isGlob=!0,R=!0,!0===o)continue;break}if(!0!==v&&u===wt){if(h=_.isBrace=!0,m=_.isGlob=!0,R=!0,!0===o)continue;break}if(u===Pt&&(C--,0===C)){v=!1,h=_.isBrace=!0,R=!0;break}}else C++;else E=_.backslashes=!0,w();if(!0===o)continue;break}if(u!==$t){if(!0!==n.noext){if(!0===(u===kt||u===_t||u===Ct||u===Mt||u===Tt)&&l.charCodeAt(p+1)===Ht){if(m=_.isGlob=!0,y=_.isExtglob=!0,R=!0,u===Tt&&p===f&&(x=!0),!0===o){for(;!0!==S()&&(u=w());)if(u!==St){if(u===Nt){m=_.isGlob=!0,R=!0;break}}else E=_.backslashes=!0,u=w();continue}break}}if(u===Ct){if(c===Ct&&(b=_.isGlobstar=!0),m=_.isGlob=!0,R=!0,!0===o)continue;break}if(u===Mt){if(m=_.isGlob=!0,R=!0,!0===o)continue;break}if(u===Lt){for(;!0!==S()&&(e=w());)if(e!==St){if(e===Bt){g=_.isBracket=!0,m=_.isGlob=!0,R=!0;break}}else E=_.backslashes=!0,w();if(!0===o)continue;break}if(!0===n.nonegate||u!==Tt||p!==f){if(!0!==n.noparen&&u===Ht){if(m=_.isGlob=!0,!0===o){for(;!0!==S()&&(u=w());)if(u!==Ht){if(u===Nt){R=!0;break}}else E=_.backslashes=!0,u=w();continue}break}if(!0===m){if(R=!0,!0===o)continue;break}}else A=_.negated=!0,f++}else{if(s.push(p),i.push(_),_={value:"",depth:0,isGlob:!1},!0===R)continue;if(c===Ot&&p===f+1){f+=2;continue}d=p+1}}else E=_.backslashes=!0,u=w(),u===It&&(v=!0)}!0===n.noext&&(y=!1,m=!1);let O=l,T="",$="";f>0&&(T=l.slice(0,f),l=l.slice(f),d-=f),O&&!0===m&&d>0?(O=l.slice(0,d),$=l.slice(d)):!0===m?(O="",$=l):O=l,O&&""!==O&&"/"!==O&&O!==l&&Gt(O.charCodeAt(O.length-1))&&(O=O.slice(0,-1)),!0===n.unescape&&($&&($=Rt.removeBackslashes($)),O&&!0===E&&(O=Rt.removeBackslashes(O)));const I={prefix:T,input:e,start:f,base:O,glob:$,isBrace:h,isBracket:g,isGlob:m,isExtglob:y,isGlobstar:b,negated:A,negatedExtglob:x};if(!0===n.tokens&&(I.maxDepth=0,Gt(u)||i.push(_),I.tokens=i),!0===n.parts||!0===n.tokens){let t;for(let r=0;r<s.length;r++){const o=t?t+1:f,c=s[r],u=e.slice(o,c);n.tokens&&(0===r&&0!==f?(i[r].isPrefix=!0,i[r].value=T):i[r].value=u,jt(i[r]),I.maxDepth+=i[r].depth),0===r&&""===u||a.push(u),t=c}if(t&&t+1<e.length){const r=e.slice(t+1);a.push(r),n.tokens&&(i[i.length-1].value=r,jt(i[i.length-1]),I.maxDepth+=i[i.length-1].depth)}I.slashes=s,I.parts=a}return I};const Dt=xt,Ft=lt,{MAX_LENGTH:Kt,POSIX_REGEX_SOURCE:qt,REGEX_NON_SPECIAL_CHARS:Wt,REGEX_SPECIAL_CHARS_BACKREF:Xt,REPLACEMENTS:Qt}=Dt,Yt=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();const n=`[${e.join("-")}]`;try{new RegExp(n)}catch(t){return e.map((e=>Ft.escapeRegex(e))).join("..")}return n},Zt=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,Vt=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");e=Qt[e]||e;const n={...t},r="number"==typeof n.maxLength?Math.min(Kt,n.maxLength):Kt;let o=e.length;if(o>r)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${r}`);const s={type:"bos",value:"",output:n.prepend||""},i=[s],a=n.capture?"":"?:",c=Ft.isWindows(t),u=Dt.globChars(c),l=Dt.extglobChars(u),{DOT_LITERAL:p,PLUS_LITERAL:f,SLASH_LITERAL:d,ONE_CHAR:h,DOTS_SLASH:g,NO_DOT:m,NO_DOT_SLASH:y,NO_DOTS_SLASH:b,QMARK:v,QMARK_NO_DOT:E,STAR:A,START_ANCHOR:x}=u,R=e=>`(${a}(?:(?!${x}${e.dot?g:p}).)*?)`,C=n.dot?"":m,_=n.dot?v:E;let S=!0===n.bash?R(n):A;n.capture&&(S=`(${S})`),"boolean"==typeof n.noext&&(n.noextglob=n.noext);const w={input:e,index:-1,start:0,dot:!0===n.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:i};e=Ft.removePrefix(e,w),o=e.length;const O=[],T=[],$=[];let I,H=s;const L=()=>w.index===o-1,k=w.peek=(t=1)=>e[w.index+t],M=w.advance=()=>e[++w.index]||"",P=()=>e.slice(w.index+1),N=(e="",t=0)=>{w.consumed+=e,w.index+=t},B=e=>{w.output+=null!=e.output?e.output:e.value,N(e.value)},G=()=>{let e=1;for(;"!"===k()&&("("!==k(2)||"?"===k(3));)M(),w.start++,e++;return e%2!=0&&(w.negated=!0,w.start++,!0)},j=e=>{w[e]++,$.push(e)},U=e=>{w[e]--,$.pop()},D=e=>{if("globstar"===H.type){const t=w.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||O.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(w.output=w.output.slice(0,-H.output.length),H.type="star",H.value="*",H.output=S,w.output+=H.output)}if(O.length&&"paren"!==e.type&&(O[O.length-1].inner+=e.value),(e.value||e.output)&&B(e),H&&"text"===H.type&&"text"===e.type)return H.value+=e.value,void(H.output=(H.output||"")+e.value);e.prev=H,i.push(e),H=e},F=(e,t)=>{const r={...l[t],conditions:1,inner:""};r.prev=H,r.parens=w.parens,r.output=w.output;const o=(n.capture?"(":"")+r.open;j("parens"),D({type:e,value:t,output:w.output?"":h}),D({type:"paren",extglob:!0,value:M(),output:o}),O.push(r)},K=e=>{let r,o=e.close+(n.capture?")":"");if("negate"===e.type){let s=S;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(s=R(n)),(s!==S||L()||/^\)+$/.test(P()))&&(o=e.close=`)$))${s}`),e.inner.includes("*")&&(r=P())&&/^\.[^\\/.]+$/.test(r)){const n=Vt(r,{...t,fastpaths:!1}).output;o=e.close=`)${n})${s})`}"bos"===e.prev.type&&(w.negatedExtglob=!0)}D({type:"paren",extglob:!0,value:I,output:o}),U("parens")};if(!1!==n.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(e)){let r=!1,o=e.replace(Xt,((e,t,n,o,s,i)=>"\\"===o?(r=!0,e):"?"===o?t?t+o+(s?v.repeat(s.length):""):0===i?_+(s?v.repeat(s.length):""):v.repeat(n.length):"."===o?p.repeat(n.length):"*"===o?t?t+o+(s?S:""):S:t?e:`\\${e}`));return!0===r&&(o=!0===n.unescape?o.replace(/\\/g,""):o.replace(/\\+/g,(e=>e.length%2==0?"\\\\":e?"\\":""))),o===e&&!0===n.contains?(w.output=e,w):(w.output=Ft.wrapOutput(o,w,t),w)}for(;!L();){if(I=M(),"\0"===I)continue;if("\\"===I){const e=k();if("/"===e&&!0!==n.bash)continue;if("."===e||";"===e)continue;if(!e){I+="\\",D({type:"text",value:I});continue}const t=/^\\+/.exec(P());let r=0;if(t&&t[0].length>2&&(r=t[0].length,w.index+=r,r%2!=0&&(I+="\\")),!0===n.unescape?I=M():I+=M(),0===w.brackets){D({type:"text",value:I});continue}}if(w.brackets>0&&("]"!==I||"["===H.value||"[^"===H.value)){if(!1!==n.posix&&":"===I){const e=H.value.slice(1);if(e.includes("[")&&(H.posix=!0,e.includes(":"))){const e=H.value.lastIndexOf("["),t=H.value.slice(0,e),n=H.value.slice(e+2),r=qt[n];if(r){H.value=t+r,w.backtrack=!0,M(),s.output||1!==i.indexOf(H)||(s.output=h);continue}}}("["===I&&":"!==k()||"-"===I&&"]"===k())&&(I=`\\${I}`),"]"!==I||"["!==H.value&&"[^"!==H.value||(I=`\\${I}`),!0===n.posix&&"!"===I&&"["===H.value&&(I="^"),H.value+=I,B({value:I});continue}if(1===w.quotes&&'"'!==I){I=Ft.escapeRegex(I),H.value+=I,B({value:I});continue}if('"'===I){w.quotes=1===w.quotes?0:1,!0===n.keepQuotes&&D({type:"text",value:I});continue}if("("===I){j("parens"),D({type:"paren",value:I});continue}if(")"===I){if(0===w.parens&&!0===n.strictBrackets)throw new SyntaxError(Zt("opening","("));const e=O[O.length-1];if(e&&w.parens===e.parens+1){K(O.pop());continue}D({type:"paren",value:I,output:w.parens?")":"\\)"}),U("parens");continue}if("["===I){if(!0!==n.nobracket&&P().includes("]"))j("brackets");else{if(!0!==n.nobracket&&!0===n.strictBrackets)throw new SyntaxError(Zt("closing","]"));I=`\\${I}`}D({type:"bracket",value:I});continue}if("]"===I){if(!0===n.nobracket||H&&"bracket"===H.type&&1===H.value.length){D({type:"text",value:I,output:`\\${I}`});continue}if(0===w.brackets){if(!0===n.strictBrackets)throw new SyntaxError(Zt("opening","["));D({type:"text",value:I,output:`\\${I}`});continue}U("brackets");const e=H.value.slice(1);if(!0===H.posix||"^"!==e[0]||e.includes("/")||(I=`/${I}`),H.value+=I,B({value:I}),!1===n.literalBrackets||Ft.hasRegexChars(e))continue;const t=Ft.escapeRegex(H.value);if(w.output=w.output.slice(0,-H.value.length),!0===n.literalBrackets){w.output+=t,H.value=t;continue}H.value=`(${a}${t}|${H.value})`,w.output+=H.value;continue}if("{"===I&&!0!==n.nobrace){j("braces");const e={type:"brace",value:I,output:"(",outputIndex:w.output.length,tokensIndex:w.tokens.length};T.push(e),D(e);continue}if("}"===I){const e=T[T.length-1];if(!0===n.nobrace||!e){D({type:"text",value:I,output:I});continue}let t=")";if(!0===e.dots){const e=i.slice(),r=[];for(let t=e.length-1;t>=0&&(i.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&r.unshift(e[t].value);t=Yt(r,n),w.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=w.output.slice(0,e.outputIndex),r=w.tokens.slice(e.tokensIndex);e.value=e.output="\\{",I=t="\\}",w.output=n;for(const e of r)w.output+=e.output||e.value}D({type:"brace",value:I,output:t}),U("braces"),T.pop();continue}if("|"===I){O.length>0&&O[O.length-1].conditions++,D({type:"text",value:I});continue}if(","===I){let e=I;const t=T[T.length-1];t&&"braces"===$[$.length-1]&&(t.comma=!0,e="|"),D({type:"comma",value:I,output:e});continue}if("/"===I){if("dot"===H.type&&w.index===w.start+1){w.start=w.index+1,w.consumed="",w.output="",i.pop(),H=s;continue}D({type:"slash",value:I,output:d});continue}if("."===I){if(w.braces>0&&"dot"===H.type){"."===H.value&&(H.output=p);const e=T[T.length-1];H.type="dots",H.output+=I,H.value+=I,e.dots=!0;continue}if(w.braces+w.parens===0&&"bos"!==H.type&&"slash"!==H.type){D({type:"text",value:I,output:p});continue}D({type:"dot",value:I,output:p});continue}if("?"===I){if(!(H&&"("===H.value)&&!0!==n.noextglob&&"("===k()&&"?"!==k(2)){F("qmark",I);continue}if(H&&"paren"===H.type){const e=k();let t=I;if("<"===e&&!Ft.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===H.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(P()))&&(t=`\\${I}`),D({type:"text",value:I,output:t});continue}if(!0!==n.dot&&("slash"===H.type||"bos"===H.type)){D({type:"qmark",value:I,output:E});continue}D({type:"qmark",value:I,output:v});continue}if("!"===I){if(!0!==n.noextglob&&"("===k()&&("?"!==k(2)||!/[!=<:]/.test(k(3)))){F("negate",I);continue}if(!0!==n.nonegate&&0===w.index){G();continue}}if("+"===I){if(!0!==n.noextglob&&"("===k()&&"?"!==k(2)){F("plus",I);continue}if(H&&"("===H.value||!1===n.regex){D({type:"plus",value:I,output:f});continue}if(H&&("bracket"===H.type||"paren"===H.type||"brace"===H.type)||w.parens>0){D({type:"plus",value:I});continue}D({type:"plus",value:f});continue}if("@"===I){if(!0!==n.noextglob&&"("===k()&&"?"!==k(2)){D({type:"at",extglob:!0,value:I,output:""});continue}D({type:"text",value:I});continue}if("*"!==I){"$"!==I&&"^"!==I||(I=`\\${I}`);const e=Wt.exec(P());e&&(I+=e[0],w.index+=e[0].length),D({type:"text",value:I});continue}if(H&&("globstar"===H.type||!0===H.star)){H.type="star",H.star=!0,H.value+=I,H.output=S,w.backtrack=!0,w.globstar=!0,N(I);continue}let t=P();if(!0!==n.noextglob&&/^\([^?]/.test(t)){F("star",I);continue}if("star"===H.type){if(!0===n.noglobstar){N(I);continue}const r=H.prev,o=r.prev,s="slash"===r.type||"bos"===r.type,i=o&&("star"===o.type||"globstar"===o.type);if(!0===n.bash&&(!s||t[0]&&"/"!==t[0])){D({type:"star",value:I,output:""});continue}const a=w.braces>0&&("comma"===r.type||"brace"===r.type),c=O.length&&("pipe"===r.type||"paren"===r.type);if(!s&&"paren"!==r.type&&!a&&!c){D({type:"star",value:I,output:""});continue}for(;"/**"===t.slice(0,3);){const n=e[w.index+4];if(n&&"/"!==n)break;t=t.slice(3),N("/**",3)}if("bos"===r.type&&L()){H.type="globstar",H.value+=I,H.output=R(n),w.output=H.output,w.globstar=!0,N(I);continue}if("slash"===r.type&&"bos"!==r.prev.type&&!i&&L()){w.output=w.output.slice(0,-(r.output+H.output).length),r.output=`(?:${r.output}`,H.type="globstar",H.output=R(n)+(n.strictSlashes?")":"|$)"),H.value+=I,w.globstar=!0,w.output+=r.output+H.output,N(I);continue}if("slash"===r.type&&"bos"!==r.prev.type&&"/"===t[0]){const e=void 0!==t[1]?"|$":"";w.output=w.output.slice(0,-(r.output+H.output).length),r.output=`(?:${r.output}`,H.type="globstar",H.output=`${R(n)}${d}|${d}${e})`,H.value+=I,w.output+=r.output+H.output,w.globstar=!0,N(I+M()),D({type:"slash",value:"/",output:""});continue}if("bos"===r.type&&"/"===t[0]){H.type="globstar",H.value+=I,H.output=`(?:^|${d}|${R(n)}${d})`,w.output=H.output,w.globstar=!0,N(I+M()),D({type:"slash",value:"/",output:""});continue}w.output=w.output.slice(0,-H.output.length),H.type="globstar",H.output=R(n),H.value+=I,w.output+=H.output,w.globstar=!0,N(I);continue}const r={type:"star",value:I,output:S};!0!==n.bash?!H||"bracket"!==H.type&&"paren"!==H.type||!0!==n.regex?(w.index!==w.start&&"slash"!==H.type&&"dot"!==H.type||("dot"===H.type?(w.output+=y,H.output+=y):!0===n.dot?(w.output+=b,H.output+=b):(w.output+=C,H.output+=C),"*"!==k()&&(w.output+=h,H.output+=h)),D(r)):(r.output=I,D(r)):(r.output=".*?","bos"!==H.type&&"slash"!==H.type||(r.output=C+r.output),D(r))}for(;w.brackets>0;){if(!0===n.strictBrackets)throw new SyntaxError(Zt("closing","]"));w.output=Ft.escapeLast(w.output,"["),U("brackets")}for(;w.parens>0;){if(!0===n.strictBrackets)throw new SyntaxError(Zt("closing",")"));w.output=Ft.escapeLast(w.output,"("),U("parens")}for(;w.braces>0;){if(!0===n.strictBrackets)throw new SyntaxError(Zt("closing","}"));w.output=Ft.escapeLast(w.output,"{"),U("braces")}if(!0===n.strictSlashes||"star"!==H.type&&"bracket"!==H.type||D({type:"maybe_slash",value:"",output:`${d}?`}),!0===w.backtrack){w.output="";for(const e of w.tokens)w.output+=null!=e.output?e.output:e.value,e.suffix&&(w.output+=e.suffix)}return w};Vt.fastpaths=(e,t)=>{const n={...t},r="number"==typeof n.maxLength?Math.min(Kt,n.maxLength):Kt,o=e.length;if(o>r)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${r}`);e=Qt[e]||e;const s=Ft.isWindows(t),{DOT_LITERAL:i,SLASH_LITERAL:a,ONE_CHAR:c,DOTS_SLASH:u,NO_DOT:l,NO_DOTS:p,NO_DOTS_SLASH:f,STAR:d,START_ANCHOR:h}=Dt.globChars(s),g=n.dot?p:l,m=n.dot?f:l,y=n.capture?"":"?:";let b=!0===n.bash?".*?":d;n.capture&&(b=`(${b})`);const v=e=>!0===e.noglobstar?b:`(${y}(?:(?!${h}${e.dot?u:i}).)*?)`,E=e=>{switch(e){case"*":return`${g}${c}${b}`;case".*":return`${i}${c}${b}`;case"*.*":return`${g}${b}${i}${c}${b}`;case"*/*":return`${g}${b}${a}${c}${m}${b}`;case"**":return g+v(n);case"**/*":return`(?:${g}${v(n)}${a})?${m}${c}${b}`;case"**/*.*":return`(?:${g}${v(n)}${a})?${m}${b}${i}${c}${b}`;case"**/.*":return`(?:${g}${v(n)}${a})?${i}${c}${b}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=E(t[1]);if(!n)return;return n+i+t[2]}}},A=Ft.removePrefix(e,{negated:!1,prefix:""});let x=E(A);return x&&!0!==n.strictSlashes&&(x+=`${a}?`),x};const zt=e,Jt=Ut,en=Vt,tn=lt,nn=xt,rn=(e,t,n=!1)=>{if(Array.isArray(e)){const r=e.map((e=>rn(e,t,n))),o=e=>{for(const t of r){const n=t(e);if(n)return n}return!1};return o}const r=(o=e)&&"object"==typeof o&&!Array.isArray(o)&&e.tokens&&e.input;var o;if(""===e||"string"!=typeof e&&!r)throw new TypeError("Expected pattern to be a non-empty string");const s=t||{},i=tn.isWindows(t),a=r?rn.compileRe(e,t):rn.makeRe(e,t,!1,!0),c=a.state;delete a.state;let u=()=>!1;if(s.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};u=rn(s.ignore,e,n)}const l=(n,r=!1)=>{const{isMatch:o,match:l,output:p}=rn.test(n,a,t,{glob:e,posix:i}),f={glob:e,state:c,regex:a,posix:i,input:n,output:p,match:l,isMatch:o};return"function"==typeof s.onResult&&s.onResult(f),!1===o?(f.isMatch=!1,!!r&&f):u(n)?("function"==typeof s.onIgnore&&s.onIgnore(f),f.isMatch=!1,!!r&&f):("function"==typeof s.onMatch&&s.onMatch(f),!r||f)};return n&&(l.state=c),l};rn.test=(e,t,n,{glob:r,posix:o}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const s=n||{},i=s.format||(o?tn.toPosixSlashes:null);let a=e===r,c=a&&i?i(e):e;return!1===a&&(c=i?i(e):e,a=c===r),!1!==a&&!0!==s.capture||(a=!0===s.matchBase||!0===s.basename?rn.matchBase(e,t,n,o):t.exec(c)),{isMatch:Boolean(a),match:a,output:c}},rn.matchBase=(e,t,n,r=tn.isWindows(n))=>(t instanceof RegExp?t:rn.makeRe(t,n)).test(zt.basename(e)),rn.isMatch=(e,t,n)=>rn(t,n)(e),rn.parse=(e,t)=>Array.isArray(e)?e.map((e=>rn.parse(e,t))):en(e,{...t,fastpaths:!1}),rn.scan=(e,t)=>Jt(e,t),rn.compileRe=(e,t,n=!1,r=!1)=>{if(!0===n)return e.output;const o=t||{},s=o.contains?"":"^",i=o.contains?"":"$";let a=`${s}(?:${e.output})${i}`;e&&!0===e.negated&&(a=`^(?!${a}).*$`);const c=rn.toRegex(a,t);return!0===r&&(c.state=e),c},rn.makeRe=(e,t={},n=!1,r=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(o.output=en.fastpaths(e,t)),o.output||(o=en(e,t)),rn.compileRe(o,t,n,r)},rn.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},rn.constants=nn;const on=o,sn=ut,an=rn,cn=lt,un=e=>""===e||"./"===e,ln=(e,t,n)=>{t=[].concat(t),e=[].concat(e);let r=new Set,o=new Set,s=new Set,i=0,a=e=>{s.add(e.output),n&&n.onResult&&n.onResult(e)};for(let s=0;s<t.length;s++){let c=an(String(t[s]),{...n,onResult:a},!0),u=c.state.negated||c.state.negatedExtglob;u&&i++;for(let t of e){let e=c(t,!0);(u?!e.isMatch:e.isMatch)&&(u?r.add(e.output):(r.delete(e.output),o.add(e.output)))}}let c=(i===t.length?[...s]:[...o]).filter((e=>!r.has(e)));if(n&&0===c.length){if(!0===n.failglob)throw new Error(`No matches found for "${t.join(", ")}"`);if(!0===n.nonull||!0===n.nullglob)return n.unescape?t.map((e=>e.replace(/\\/g,""))):t}return c};ln.match=ln,ln.matcher=(e,t)=>an(e,t),ln.any=ln.isMatch=(e,t,n)=>an(t,n)(e),ln.not=(e,t,n={})=>{t=[].concat(t).map(String);let r=new Set,o=[],s=new Set(ln(e,t,{...n,onResult:e=>{n.onResult&&n.onResult(e),o.push(e.output)}}));for(let e of o)s.has(e)||r.add(e);return[...r]},ln.contains=(e,t,n)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${on.inspect(e)}"`);if(Array.isArray(t))return t.some((t=>ln.contains(e,t,n)));if("string"==typeof t){if(un(e)||un(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return ln.isMatch(e,t,{...n,contains:!0})},ln.matchKeys=(e,t,n)=>{if(!cn.isObject(e))throw new TypeError("Expected the first argument to be an object");let r=ln(Object.keys(e),t,n),o={};for(let t of r)o[t]=e[t];return o},ln.some=(e,t,n)=>{let r=[].concat(e);for(let e of[].concat(t)){let t=an(String(e),n);if(r.some((e=>t(e))))return!0}return!1},ln.every=(e,t,n)=>{let r=[].concat(e);for(let e of[].concat(t)){let t=an(String(e),n);if(!r.every((e=>t(e))))return!1}return!0},ln.all=(e,t,n)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${on.inspect(e)}"`);return[].concat(t).every((t=>an(t,n)(e)))},ln.capture=(e,t,n)=>{let r=cn.isWindows(n),o=an.makeRe(String(e),{...n,capture:!0}).exec(r?cn.toPosixSlashes(t):t);if(o)return o.slice(1).map((e=>void 0===e?"":e))},ln.makeRe=(...e)=>an.makeRe(...e),ln.scan=(...e)=>an.scan(...e),ln.parse=(e,t)=>{let n=[];for(let r of[].concat(e||[]))for(let e of sn(String(r),t))n.push(an.parse(e,t));return n},ln.braces=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return t&&!0===t.nobrace||!/\{.*\}/.test(e)?[e]:sn(e,t)},ln.braceExpand=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return ln.braces(e,{...t,expand:!0})};var pn=t,fn=e,dn=function(e,t){if("string"!=typeof e||""===e)return!1;if(E(e))return!0;var n=x;return t&&!1===t.strict&&(n=R),n(e)},hn=function(e){return"~"===e.charAt(0)&&(e=J(e)),"@"===e.charAt(0)&&(e=z.join(ee,e.slice(1))),e},gn=function(e,t){return e&&"string"==typeof e?te.existsSync(e)?ne.resolve(e):!0===(t=t||{}).nocase?function(e){e=ne.resolve(e);var t=function(e){var t={path:e,files:[]};try{return t.files=te.readdirSync(e),t}catch(e){}try{return t.path=ne.dirname(e),t.files=te.readdirSync(t.path),t}catch(e){}return null}(e);if(null===t)return null;if(t.path===e)return t.path;var n=e.toUpperCase(),r=t.files.length,o=-1;for(;++o<r;){var s=ne.resolve(t.path,t.files[o]);if(e===s||n===s)return s;var i=s.toUpperCase();if(e===i||n===i)return s}return null}(e):null:null},mn=ln;function yn(e,t,n){for(var r,o=t.length,s=-1;++s<o;)if(r=dn(t[s])?bn(e,t[s],n):vn(e,t[s],n))return r;var i=fn.dirname(e);return i===e?null:yn(i,t,n)}function bn(e,t,n){for(var r=mn.matcher(t,n),o=function(e){try{return pn.readdirSync(e)}catch(e){}return[]}(e),s=o.length,i=-1;++i<s;){var a=o[i],c=fn.join(e,a);if(r(a)||r(c))return c}return null}function vn(e,t,n){var r=fn.resolve(e,t);return gn(r,n)}var En,An,xn,Rn,Cn,_n,Sn,wn,On=g((function(e,t){t=t||{};var n=fn.resolve(hn(t.cwd||""));if("string"==typeof e)return yn(n,[e],t);if(!Array.isArray(e))throw new TypeError("findup-sync expects a string or array as the first argument.");return yn(n,e,t)})),Tn={exports:{}};function $n(){if(Rn)return xn;Rn=1;const e=An?En:(An=1,En={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),t={};for(const n of Object.keys(e))t[e[n]]=n;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};xn=n;for(const e of Object.keys(n)){if(!("channels"in n[e]))throw new Error("missing channels property: "+e);if(!("labels"in n[e]))throw new Error("missing channel labels property: "+e);if(n[e].labels.length!==n[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=n[e];delete n[e].channels,delete n[e].labels,Object.defineProperty(n[e],"channels",{value:t}),Object.defineProperty(n[e],"labels",{value:r})}return n.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),s=Math.max(t,n,r),i=s-o;let a,c;s===o?a=0:t===s?a=(n-r)/i:n===s?a=2+(r-t)/i:r===s&&(a=4+(t-n)/i),a=Math.min(60*a,360),a<0&&(a+=360);const u=(o+s)/2;return c=s===o?0:u<=.5?i/(s+o):i/(2-s-o),[a,100*c,100*u]},n.rgb.hsv=function(e){let t,n,r,o,s;const i=e[0]/255,a=e[1]/255,c=e[2]/255,u=Math.max(i,a,c),l=u-Math.min(i,a,c),p=function(e){return(u-e)/6/l+.5};return 0===l?(o=0,s=0):(s=l/u,t=p(i),n=p(a),r=p(c),i===u?o=r-n:a===u?o=1/3+t-r:c===u&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*s,100*u]},n.rgb.hwb=function(e){const t=e[0],r=e[1];let o=e[2];const s=n.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(r,o));return o=1-1/255*Math.max(t,Math.max(r,o)),[s,100*i,100*o]},n.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r);return[100*((1-t-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*o]},n.rgb.keyword=function(n){const r=t[n];if(r)return r;let o,s=1/0;for(const t of Object.keys(e)){const r=e[t],c=(a=r,((i=n)[0]-a[0])**2+(i[1]-a[1])**2+(i[2]-a[2])**2);c<s&&(s=c,o=t)}var i,a;return o},n.keyword.rgb=function(t){return e[t]},n.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let r=t[0],o=t[1],s=t[2];r/=95.047,o/=100,s/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;return[116*o-16,500*(r-o),200*(o-s)]},n.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,s,i;if(0===n)return i=255*r,[i,i,i];o=r<.5?r*(1+n):r+n-r*n;const a=2*r-o,c=[0,0,0];for(let e=0;e<3;e++)s=t+1/3*-(e-1),s<0&&s++,s>1&&s--,i=6*s<1?a+6*(o-a)*s:2*s<1?o:3*s<2?a+(o-a)*(2/3-s)*6:a,c[e]=255*i;return c},n.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const s=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=s<=1?s:2-s;return[t,100*(0===r?2*o/(s+o):2*n/(r+n)),100*((r+n)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,s=t-Math.floor(t),i=255*r*(1-n),a=255*r*(1-n*s),c=255*r*(1-n*(1-s));switch(r*=255,o){case 0:return[r,c,i];case 1:return[a,r,i];case 2:return[i,r,c];case 3:return[i,a,r];case 4:return[c,i,r];case 5:return[r,i,a]}},n.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let s,i;i=(2-n)*r;const a=(2-n)*o;return s=n*o,s/=a<=1?a:2-a,s=s||0,i/=2,[t,100*s,100*i]},n.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let s;o>1&&(n/=o,r/=o);const i=Math.floor(6*t),a=1-r;s=6*t-i,0!=(1&i)&&(s=1-s);const c=n+s*(a-n);let u,l,p;switch(i){default:case 6:case 0:u=a,l=c,p=n;break;case 1:u=c,l=a,p=n;break;case 2:u=n,l=a,p=c;break;case 3:u=n,l=c,p=a;break;case 4:u=c,l=n,p=a;break;case 5:u=a,l=n,p=c}return[255*u,255*l,255*p]},n.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},n.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,s,i;return o=3.2406*t+-1.5372*n+-.4986*r,s=-.9689*t+1.8758*n+.0415*r,i=.0557*t+-.204*n+1.057*r,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),i=Math.min(Math.max(0,i),1),[255*o,255*s,255*i]},n.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},n.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const o=n**3,s=t**3,i=r**3;return n=o>.008856?o:(n-16/116)/7.787,t=s>.008856?s:(t-16/116)/7.787,r=i>.008856?i:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},n.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=360*Math.atan2(r,n)/2/Math.PI,o<0&&(o+=360);return[t,Math.sqrt(n*n+r*r),o]},n.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},n.rgb.ansi16=function(e,t=null){const[r,o,s]=e;let i=null===t?n.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),0===i)return 30;let a=30+(Math.round(s/255)<<2|Math.round(o/255)<<1|Math.round(r/255));return 2===i&&(a+=60),a},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t===n&&n===r)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map((e=>e+e)).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},n.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),s=Math.min(Math.min(t,n),r),i=o-s;let a,c;return a=i<1?s/(1-i):0,c=i<=0?0:o===t?(n-r)/i%6:o===n?2+(r-t)/i:4+(t-n)/i,c/=6,c%=1,[360*c,100*i,100*a]},n.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},n.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const o=[0,0,0],s=t%1*6,i=s%1,a=1-i;let c=0;switch(Math.floor(s)){case 0:o[0]=1,o[1]=i,o[2]=0;break;case 1:o[0]=a,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=i;break;case 3:o[0]=0,o[1]=a,o[2]=1;break;case 4:o[0]=i,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=a}return c=(1-n)*r,[255*(n*o[0]+c),255*(n*o[1]+c),255*(n*o[2]+c)]},n.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},n.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},n.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},n.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},xn}function In(){if(_n)return Cn;_n=1;const e=$n();function t(t){const n=function(){const t={},n=Object.keys(e);for(let e=n.length,r=0;r<e;r++)t[n[r]]={distance:-1,parent:null};return t}(),r=[t];for(n[t].distance=0;r.length;){const t=r.pop(),o=Object.keys(e[t]);for(let e=o.length,s=0;s<e;s++){const e=o[s],i=n[e];-1===i.distance&&(i.distance=n[t].distance+1,i.parent=t,r.unshift(e))}}return n}function n(e,t){return function(n){return t(e(n))}}function r(t,r){const o=[r[t].parent,t];let s=e[r[t].parent][t],i=r[t].parent;for(;r[i].parent;)o.unshift(r[i].parent),s=n(e[r[i].parent][i],s),i=r[i].parent;return s.conversion=o,s}return Cn=function(e){const n=t(e),o={},s=Object.keys(n);for(let e=s.length,t=0;t<e;t++){const e=s[t];null!==n[e].parent&&(o[e]=r(e,n))}return o}}function Hn(){if(wn)return Sn;wn=1;const e=$n(),t=In(),n={};return Object.keys(e).forEach((r=>{n[r]={},Object.defineProperty(n[r],"channels",{value:e[r].channels}),Object.defineProperty(n[r],"labels",{value:e[r].labels});const o=t(r);Object.keys(o).forEach((e=>{const t=o[e];n[r][e]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(t),n[r][e].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)}))})),Sn=n}!function(e){const t=(e,t)=>(...n)=>`[${e(...n)+t}m`,n=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};5;${r}m`},r=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};2;${r[0]};${r[1]};${r[2]}m`},o=e=>e,s=(e,t,n)=>[e,t,n],i=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{const r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})};let a;const c=(e,t,n,r)=>{void 0===a&&(a=Hn());const o=r?10:0,s={};for(const[r,i]of Object.entries(a)){const a="ansi16"===r?"ansi":r;r===t?s[a]=e(n,o):"object"==typeof i&&(s[a]=e(i[t],o))}return s};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,a={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};a.color.gray=a.color.blackBright,a.bgColor.bgGray=a.bgColor.bgBlackBright,a.color.grey=a.color.blackBright,a.bgColor.bgGrey=a.bgColor.bgBlackBright;for(const[t,n]of Object.entries(a)){for(const[t,r]of Object.entries(n))a[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=a[t],e.set(r[0],r[1]);Object.defineProperty(a,t,{value:n,enumerable:!1})}return Object.defineProperty(a,"codes",{value:e,enumerable:!1}),a.color.close="[39m",a.bgColor.close="[49m",i(a.color,"ansi",(()=>c(t,"ansi16",o,!1))),i(a.color,"ansi256",(()=>c(n,"ansi256",o,!1))),i(a.color,"ansi16m",(()=>c(r,"rgb",s,!1))),i(a.bgColor,"ansi",(()=>c(t,"ansi16",o,!0))),i(a.bgColor,"ansi256",(()=>c(n,"ansi256",o,!0))),i(a.bgColor,"ansi16m",(()=>c(r,"rgb",s,!0))),a}})}(Tn);var Ln=Tn.exports;const kn=r,Mn=s,Pn=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return-1!==r&&(-1===o||r<o)},{env:Nn}=process;let Bn;function Gn(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function jn(e,t){if(0===Bn)return 0;if(Pn("color=16m")||Pn("color=full")||Pn("color=truecolor"))return 3;if(Pn("color=256"))return 2;if(e&&!t&&void 0===Bn)return 0;const n=Bn||0;if("dumb"===Nn.TERM)return n;if("win32"===process.platform){const e=kn.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in Nn)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in Nn))||"codeship"===Nn.CI_NAME?1:n;if("TEAMCITY_VERSION"in Nn)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Nn.TEAMCITY_VERSION)?1:0;if("truecolor"===Nn.COLORTERM)return 3;if("TERM_PROGRAM"in Nn){const e=parseInt((Nn.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Nn.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Nn.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Nn.TERM)||"COLORTERM"in Nn?1:n}Pn("no-color")||Pn("no-colors")||Pn("color=false")||Pn("color=never")?Bn=0:(Pn("color")||Pn("colors")||Pn("color=true")||Pn("color=always"))&&(Bn=1),"FORCE_COLOR"in Nn&&(Bn="true"===Nn.FORCE_COLOR?1:"false"===Nn.FORCE_COLOR?0:0===Nn.FORCE_COLOR.length?1:Math.min(parseInt(Nn.FORCE_COLOR,10),3));var Un={supportsColor:function(e){return Gn(jn(e,e&&e.isTTY))},stdout:Gn(jn(!0,Mn.isatty(1))),stderr:Gn(jn(!0,Mn.isatty(2)))};var Dn,Fn,Kn={stringReplaceAll:(e,t,n)=>{let r=e.indexOf(t);if(-1===r)return e;const o=t.length;let s=0,i="";do{i+=e.substr(s,r-s)+t+n,s=r+o,r=e.indexOf(t,s)}while(-1!==r);return i+=e.substr(s),i},stringEncaseCRLFWithFirstIndex:(e,t,n,r)=>{let o=0,s="";do{const i="\r"===e[r-1];s+=e.substr(o,(i?r-1:r)-o)+t+(i?"\r\n":"\n")+n,o=r+1,r=e.indexOf("\n",o)}while(-1!==r);return s+=e.substr(o),s}};const qn=Ln,{stdout:Wn,stderr:Xn}=Un,{stringReplaceAll:Qn,stringEncaseCRLFWithFirstIndex:Yn}=Kn,{isArray:Zn}=Array,Vn=["ansi","ansi","ansi256","ansi16m"],zn=Object.create(null);class Jn{constructor(e){return er(e)}}const er=e=>{const t={};return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const n=Wn?Wn.level:0;e.level=void 0===t.level?n:t.level})(t,e),t.template=(...e)=>cr(t.template,...e),Object.setPrototypeOf(t,tr.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=Jn,t.template};function tr(e){return er(e)}for(const[e,t]of Object.entries(qn))zn[e]={get(){const n=sr(this,or(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:n}),n}};zn.visible={get(){const e=sr(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const nr=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of nr)zn[e]={get(){const{level:t}=this;return function(...n){const r=or(qn.color[Vn[t]][e](...n),qn.color.close,this._styler);return sr(this,r,this._isEmpty)}}};for(const e of nr){zn["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...n){const r=or(qn.bgColor[Vn[t]][e](...n),qn.bgColor.close,this._styler);return sr(this,r,this._isEmpty)}}}}const rr=Object.defineProperties((()=>{}),{...zn,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),or=(e,t,n)=>{let r,o;return void 0===n?(r=e,o=t):(r=n.openAll+e,o=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:o,parent:n}},sr=(e,t,n)=>{const r=(...e)=>Zn(e[0])&&Zn(e[0].raw)?ir(r,cr(r,...e)):ir(r,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(r,rr),r._generator=e,r._styler=t,r._isEmpty=n,r},ir=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let n=e._styler;if(void 0===n)return t;const{openAll:r,closeAll:o}=n;if(-1!==t.indexOf(""))for(;void 0!==n;)t=Qn(t,n.close,n.open),n=n.parent;const s=t.indexOf("\n");return-1!==s&&(t=Yn(t,o,r,s)),r+t+o};let ar;const cr=(e,...t)=>{const[n]=t;if(!Zn(n)||!Zn(n.raw))return t.join(" ");const r=t.slice(1),o=[n.raw[0]];for(let e=1;e<n.length;e++)o.push(String(r[e-1]).replace(/[{}\\]/g,"\\$&"),String(n.raw[e]));return void 0===ar&&(ar=function(){if(Fn)return Dn;Fn=1;const e=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,t=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,n=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,r=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,o=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function s(e){const t="u"===e[0],n="{"===e[1];return t&&!n&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):t&&n?String.fromCodePoint(parseInt(e.slice(2,-1),16)):o.get(e)||e}function i(e,t){const o=[],i=t.trim().split(/\s*,\s*/g);let a;for(const t of i){const i=Number(t);if(Number.isNaN(i)){if(!(a=t.match(n)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);o.push(a[2].replace(r,((e,t,n)=>t?s(t):n)))}else o.push(i)}return o}function a(e){t.lastIndex=0;const n=[];let r;for(;null!==(r=t.exec(e));){const e=r[1];if(r[2]){const t=i(e,r[2]);n.push([e].concat(t))}else n.push([e])}return n}function c(e,t){const n={};for(const e of t)for(const t of e.styles)n[t[0]]=e.inverse?null:t.slice(1);let r=e;for(const[e,t]of Object.entries(n))if(Array.isArray(t)){if(!(e in r))throw new Error(`Unknown Chalk style: ${e}`);r=t.length>0?r[e](...t):r[e]}return r}return Dn=(t,n)=>{const r=[],o=[];let i=[];if(n.replace(e,((e,n,u,l,p,f)=>{if(n)i.push(s(n));else if(l){const e=i.join("");i=[],o.push(0===r.length?e:c(t,r)(e)),r.push({inverse:u,styles:a(l)})}else if(p){if(0===r.length)throw new Error("Found extraneous } in Chalk template literal");o.push(c(t,r)(i.join(""))),i=[],r.pop()}else i.push(f)})),o.push(i.join("")),r.length>0){const e=`Chalk template literal is missing ${r.length} closing bracket${1===r.length?"":"s"} (\`}\`)`;throw new Error(e)}return o.join("")},Dn}()),ar(e,o.join(""))};Object.defineProperties(tr.prototype,zn);const ur=tr();ur.supportsColor=Wn,ur.stderr=tr({level:Xn?Xn.level:0}),ur.stderr.supportsColor=Xn;var lr=g(ur),pr={exports:{}},fr={exports:{}};const dr="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,hr=e,gr=dr?";":":",mr=Y,yr=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),br=(e,t)=>{const n=t.colon||gr,r=e.match(/\//)||dr&&e.match(/\\/)?[""]:[...dr?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],o=dr?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=dr?o.split(n):[""];return dr&&-1!==e.indexOf(".")&&""!==s[0]&&s.unshift(""),{pathEnv:r,pathExt:s,pathExtExe:o}},vr=(e,t,n)=>{"function"==typeof t&&(n=t,t={}),t||(t={});const{pathEnv:r,pathExt:o,pathExtExe:s}=br(e,t),i=[],a=n=>new Promise(((o,s)=>{if(n===r.length)return t.all&&i.length?o(i):s(yr(e));const a=r[n],u=/^".*"$/.test(a)?a.slice(1,-1):a,l=hr.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+l:l;o(c(p,n,0))})),c=(e,n,r)=>new Promise(((u,l)=>{if(r===o.length)return u(a(n+1));const p=o[r];mr(e+p,{pathExt:s},((o,s)=>{if(!o&&s){if(!t.all)return u(e+p);i.push(e+p)}return u(c(e,n,r+1))}))}));return n?a(0).then((e=>n(null,e)),n):a(0)};var Er=vr;vr.sync=(e,t)=>{t=t||{};const{pathEnv:n,pathExt:r,pathExtExe:o}=br(e,t),s=[];for(let i=0;i<n.length;i++){const a=n[i],c=/^".*"$/.test(a)?a.slice(1,-1):a,u=hr.join(c,e),l=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let e=0;e<r.length;e++){const n=l+r[e];try{if(mr.sync(n,{pathExt:o})){if(!t.all)return n;s.push(n)}}catch(e){}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw yr(e)};var Ar={exports:{}};const xr=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};Ar.exports=xr,Ar.exports.default=xr;var Rr=Ar.exports;const Cr=e,_r=Er,Sr=Rr;function wr(e,t){const n=e.options.env||process.env,r=process.cwd(),o=null!=e.options.cwd,s=o&&void 0!==process.chdir&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd)}catch(e){}let i;try{i=_r.sync(e.command,{path:n[Sr({env:n})],pathExt:t?Cr.delimiter:void 0})}catch(e){}finally{s&&process.chdir(r)}return i&&(i=Cr.resolve(o?e.options.cwd:"",i)),i}var Or=function(e){return wr(e)||wr(e,!0)},Tr={};const $r=/([()\][%!^"`<>&|;, *?])/g;Tr.command=function(e){return e=e.replace($r,"^$1")},Tr.argument=function(e,t){return e=(e=`"${e=(e=(e=`${e}`).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace($r,"^$1"),t&&(e=e.replace($r,"^$1")),e};const Ir=/^#!(.*)/;const Hr=t,Lr=(e="")=>{const t=e.match(Ir);if(!t)return null;const[n,r]=t[0].replace(/#! ?/,"").split(" "),o=n.split("/").pop();return"env"===o?r:r?`${o} ${r}`:o};var kr=function(e){const t=Buffer.alloc(150);let n;try{n=Hr.openSync(e,"r"),Hr.readSync(n,t,0,150,0),Hr.closeSync(n)}catch(e){}return Lr(t.toString())};const Mr=e,Pr=Or,Nr=Tr,Br=kr,Gr="win32"===process.platform,jr=/\.(?:com|exe)$/i,Ur=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Dr(e){if(!Gr)return e;const t=function(e){e.file=Pr(e);const t=e.file&&Br(e.file);return t?(e.args.unshift(e.file),e.command=t,Pr(e)):e.file}(e),n=!jr.test(t);if(e.options.forceShell||n){const n=Ur.test(t);e.command=Mr.normalize(e.command),e.command=Nr.command(e.command),e.args=e.args.map((e=>Nr.argument(e,n)));const r=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${r}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}var Fr=function(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null);const r={command:e,args:t=t?t.slice(0):[],options:n=Object.assign({},n),file:void 0,original:{command:e,args:t}};return n.shell?r:Dr(r)};const Kr="win32"===process.platform;function qr(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function Wr(e,t){return Kr&&1===e&&!t.file?qr(t.original,"spawn"):null}var Xr={hookChildProcess:function(e,t){if(!Kr)return;const n=e.emit;e.emit=function(r,o){if("exit"===r){const r=Wr(o,t);if(r)return n.call(e,"error",r)}return n.apply(e,arguments)}},verifyENOENT:Wr,verifyENOENTSync:function(e,t){return Kr&&1===e&&!t.file?qr(t.original,"spawnSync"):null},notFoundError:qr};const Qr=i,Yr=Fr,Zr=Xr;function Vr(e,t,n){const r=Yr(e,t,n),o=Qr.spawn(r.command,r.args,r.options);return Zr.hookChildProcess(o,r),o}fr.exports=Vr,fr.exports.spawn=Vr,fr.exports.sync=function(e,t,n){const r=Yr(e,t,n),o=Qr.spawnSync(r.command,r.args,r.options);return o.error=o.error||Zr.verifyENOENTSync(o.status,r),o},fr.exports._parse=Yr,fr.exports._enoent=Zr;var zr=fr.exports,Jr={exports:{}};!function(t){const n=e,r=Rr,o=e=>{let t;e={cwd:process.cwd(),path:process.env[r()],execPath:process.execPath,...e};let o=n.resolve(e.cwd);const s=[];for(;t!==o;)s.push(n.join(o,"node_modules/.bin")),t=o,o=n.resolve(o,"..");const i=n.resolve(e.cwd,e.execPath,"..");return s.push(i),s.concat(e.path).join(n.delimiter)};t.exports=o,t.exports.default=o,t.exports.env=e=>{const n={...(e={env:process.env,...e}).env},o=r({env:n});return e.path=n[o],n[o]=t.exports(e),n}}(Jr);var eo=Jr.exports,to={exports:{}},no={exports:{}};const ro=(e,t)=>{for(const n of Reflect.ownKeys(t))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e};no.exports=ro,no.exports.default=ro;const oo=no.exports,so=new WeakMap,io=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let n,r=0;const o=e.displayName||e.name||"<anonymous>",s=function(...i){if(so.set(s,++r),1===r)n=e.apply(this,i),e=null;else if(!0===t.throw)throw new Error(`Function \`${o}\` can only be called once`);return n};return oo(s,e),so.set(s,r),s};to.exports=io,to.exports.default=io,to.exports.callCount=e=>{if(!so.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return so.get(e)};var ao=to.exports,co={},uo={},lo={};Object.defineProperty(lo,"__esModule",{value:!0}),lo.SIGNALS=void 0;lo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var po={};Object.defineProperty(po,"__esModule",{value:!0}),po.SIGRTMAX=po.getRealtimeSignals=void 0;po.getRealtimeSignals=function(){const e=go-ho+1;return Array.from({length:e},fo)};const fo=function(e,t){return{name:`SIGRT${t+1}`,number:ho+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},ho=34,go=64;po.SIGRTMAX=go,Object.defineProperty(uo,"__esModule",{value:!0}),uo.getSignals=void 0;var mo=r,yo=lo,bo=po;uo.getSignals=function(){const e=(0,bo.getRealtimeSignals)();return[...yo.SIGNALS,...e].map(vo)};const vo=function({name:e,number:t,description:n,action:r,forced:o=!1,standard:s}){const{signals:{[e]:i}}=mo.constants,a=void 0!==i;return{name:e,number:a?i:t,description:n,supported:a,action:r,forced:o,standard:s}};Object.defineProperty(co,"__esModule",{value:!0}),co.signalsByNumber=co.signalsByName=void 0;var Eo=r,Ao=uo,xo=po;const Ro=function(e,{name:t,number:n,description:r,supported:o,action:s,forced:i,standard:a}){return{...e,[t]:{name:t,number:n,description:r,supported:o,action:s,forced:i,standard:a}}},Co=(0,Ao.getSignals)().reduce(Ro,{});co.signalsByName=Co;const _o=function(e,t){const n=So(e,t);if(void 0===n)return{};const{name:r,description:o,supported:s,action:i,forced:a,standard:c}=n;return{[e]:{name:r,number:e,description:o,supported:s,action:i,forced:a,standard:c}}},So=function(e,t){const n=t.find((({name:t})=>Eo.constants.signals[t]===e));return void 0!==n?n:t.find((t=>t.number===e))},wo=function(){const e=(0,Ao.getSignals)(),t=xo.SIGRTMAX+1,n=Array.from({length:t},((t,n)=>_o(n,e)));return Object.assign({},...n)}();co.signalsByNumber=wo;const{signalsByName:Oo}=co;var To=({stdout:e,stderr:t,all:n,error:r,signal:o,exitCode:s,command:i,escapedCommand:a,timedOut:c,isCanceled:u,killed:l,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(o=null===o?void 0:o)?void 0:Oo[o].description,d=(({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:o,exitCode:s,isCanceled:i})=>e?`timed out after ${t} milliseconds`:i?"was canceled":void 0!==n?`failed with ${n}`:void 0!==r?`was killed with ${r} (${o})`:void 0!==s?`failed with exit code ${s}`:"failed")({timedOut:c,timeout:p,errorCode:r&&r.code,signal:o,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${d}: ${i}`,g="[object Error]"===Object.prototype.toString.call(r),m=g?`${h}\n${r.message}`:h,y=[m,t,e].filter(Boolean).join("\n");return g?(r.originalMessage=r.message,r.message=y):r=new Error(y),r.shortMessage=m,r.command=i,r.escapedCommand=a,r.exitCode=s,r.signal=o,r.signalDescription=f,r.stdout=e,r.stderr=t,void 0!==n&&(r.all=n),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=Boolean(c),r.isCanceled=u,r.killed=l&&!c,r},$o={exports:{}};const Io=["stdin","stdout","stderr"],Ho=e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return Io.map((t=>e[t]));if((e=>Io.some((t=>void 0!==e[t])))(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Io.map((e=>`\`${e}\``)).join(", ")}`);if("string"==typeof t)return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);const n=Math.max(t.length,Io.length);return Array.from({length:n},((e,n)=>t[n]))};$o.exports=Ho,$o.exports.node=e=>{const t=Ho(e);return"ipc"===t?"ipc":void 0===t||"string"==typeof t?[t,t,t,"ipc"]:t.includes("ipc")?t:[...t,"ipc"]};var Lo,ko=$o.exports,Mo={exports:{}},Po={exports:{}};var No=h.process;const Bo=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(Bo(No)){var Go,jo=a,Uo=(Lo||(Lo=1,function(e){e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}(Po)),Po.exports),Do=/^win/i.test(No.platform),Fo=c;"function"!=typeof Fo&&(Fo=Fo.EventEmitter),No.__signal_exit_emitter__?Go=No.__signal_exit_emitter__:((Go=No.__signal_exit_emitter__=new Fo).count=0,Go.emitted={}),Go.infinite||(Go.setMaxListeners(1/0),Go.infinite=!0),Mo.exports=function(e,t){if(!Bo(h.process))return function(){};jo.equal(typeof e,"function","a callback must be provided for exit handler"),!1===Xo&&Qo();var n="exit";t&&t.alwaysLast&&(n="afterexit");return Go.on(n,e),function(){Go.removeListener(n,e),0===Go.listeners("exit").length&&0===Go.listeners("afterexit").length&&Ko()}};var Ko=function(){Xo&&Bo(h.process)&&(Xo=!1,Uo.forEach((function(e){try{No.removeListener(e,Wo[e])}catch(e){}})),No.emit=Vo,No.reallyExit=Yo,Go.count-=1)};Mo.exports.unload=Ko;var qo=function(e,t,n){Go.emitted[e]||(Go.emitted[e]=!0,Go.emit(e,t,n))},Wo={};Uo.forEach((function(e){Wo[e]=function(){Bo(h.process)&&(No.listeners(e).length===Go.count&&(Ko(),qo("exit",null,e),qo("afterexit",null,e),Do&&"SIGHUP"===e&&(e="SIGINT"),No.kill(No.pid,e)))}})),Mo.exports.signals=function(){return Uo};var Xo=!1,Qo=function(){!Xo&&Bo(h.process)&&(Xo=!0,Go.count+=1,Uo=Uo.filter((function(e){try{return No.on(e,Wo[e]),!0}catch(e){return!1}})),No.emit=zo,No.reallyExit=Zo)};Mo.exports.load=Qo;var Yo=No.reallyExit,Zo=function(e){Bo(h.process)&&(No.exitCode=e||0,qo("exit",No.exitCode,null),qo("afterexit",No.exitCode,null),Yo.call(No,No.exitCode))},Vo=No.emit,zo=function(e,t){if("exit"===e&&Bo(h.process)){void 0!==t&&(No.exitCode=t);var n=Vo.apply(this,arguments);return qo("exit",No.exitCode,null),qo("afterexit",No.exitCode,null),n}return Vo.apply(this,arguments)}}else Mo.exports=function(){return function(){}};var Jo=Mo.exports;const es=r,ts=Jo,ns=(e,t,n,r)=>{if(!rs(t,n,r))return;const o=ss(n),s=setTimeout((()=>{e("SIGKILL")}),o);s.unref&&s.unref()},rs=(e,{forceKillAfterTimeout:t},n)=>os(e)&&!1!==t&&n,os=e=>e===es.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),ss=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};var is={spawnedKill:(e,t="SIGTERM",n={})=>{const r=e(t);return ns(e,t,n,r),r},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:n="SIGTERM"},r)=>{if(0===t||void 0===t)return r;let o;const s=new Promise(((r,s)=>{o=setTimeout((()=>{((e,t,n)=>{e.kill(t),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,n,s)}),t)})),i=r.finally((()=>{clearTimeout(o)}));return Promise.race([s,i])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},r)=>{if(!t||n)return r;const o=ts((()=>{e.kill()}));return r.finally((()=>{o()}))}};const as=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;as.writable=e=>as(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,as.readable=e=>as(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,as.duplex=e=>as.writable(e)&&as.readable(e),as.transform=e=>as.duplex(e)&&"function"==typeof e._transform;var cs=as,us={exports:{}};const{PassThrough:ls}=l;const{constants:ps}=u,fs=l,{promisify:ds}=o,hs=e=>{e={...e};const{array:t}=e;let{encoding:n}=e;const r="buffer"===n;let o=!1;t?o=!(n||r):n=n||"utf8",r&&(n=null);const s=new ls({objectMode:o});n&&s.setEncoding(n);let i=0;const a=[];return s.on("data",(e=>{a.push(e),o?i=a.length:i+=e.length})),s.getBufferedValue=()=>t?a:r?Buffer.concat(a,i):a.join(""),s.getBufferedLength=()=>i,s},gs=ds(fs.pipeline);class ms extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function ys(e,t){if(!e)throw new Error("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:n}=t,r=hs(t);return await new Promise(((t,o)=>{const s=e=>{e&&r.getBufferedLength()<=ps.MAX_LENGTH&&(e.bufferedData=r.getBufferedValue()),o(e)};(async()=>{try{await gs(e,r),t()}catch(e){s(e)}})(),r.on("data",(()=>{r.getBufferedLength()>n&&s(new ms)}))})),r.getBufferedValue()}us.exports=ys,us.exports.buffer=(e,t)=>ys(e,{...t,encoding:"buffer"}),us.exports.array=(e,t)=>ys(e,{...t,array:!0}),us.exports.MaxBufferError=ms;var bs=us.exports;const{PassThrough:vs}=l;const Es=cs,As=bs,xs=function(){var e=[],t=new vs({objectMode:!0});return t.setMaxListeners(0),t.add=n,t.isEmpty=function(){return 0==e.length},t.on("unpipe",r),Array.prototype.slice.call(arguments).forEach(n),t;function n(o){return Array.isArray(o)?(o.forEach(n),this):(e.push(o),o.once("end",r.bind(null,o)),o.once("error",t.emit.bind(t,"error")),o.pipe(t,{end:!1}),this)}function r(n){!(e=e.filter((function(e){return e!==n}))).length&&t.readable&&t.end()}},Rs=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},Cs=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(e&&n)return t?As(e,{encoding:t,maxBuffer:r}):As.buffer(e,{maxBuffer:r})};var _s={handleInput:(e,t)=>{void 0!==t&&void 0!==e.stdin&&(Es(t)?t.pipe(e.stdin):e.stdin.end(t))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=xs();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:n},{encoding:r,buffer:o,maxBuffer:s},i)=>{const a=Cs(e,{encoding:r,buffer:o,maxBuffer:s}),c=Cs(t,{encoding:r,buffer:o,maxBuffer:s}),u=Cs(n,{encoding:r,buffer:o,maxBuffer:2*s});try{return await Promise.all([i,a,c,u])}catch(r){return Promise.all([{error:r,signal:r.signal,timedOut:r.timedOut},Rs(e,a),Rs(t,c),Rs(n,u)])}},validateInputSync:({input:e})=>{if(Es(e))throw new TypeError("The `input` option cannot be a stream in sync mode")}};const Ss=(async()=>{})().constructor.prototype,ws=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(Ss,e)]));var Os={mergePromise:(e,t)=>{for(const[n,r]of ws){const o="function"==typeof t?(...e)=>Reflect.apply(r.value,t(),e):r.value.bind(t);Reflect.defineProperty(e,n,{...r,value:o})}return e},getSpawnedPromise:e=>new Promise(((t,n)=>{e.on("exit",((e,n)=>{t({exitCode:e,signal:n})})),e.on("error",(e=>{n(e)})),e.stdin&&e.stdin.on("error",(e=>{n(e)}))}))};const Ts=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],$s=/^[\w.-]+$/,Is=/"/g,Hs=/ +/g;var Ls={joinCommand:(e,t)=>Ts(e,t).join(" "),getEscapedCommand:(e,t)=>Ts(e,t).map((e=>(e=>"string"!=typeof e||$s.test(e)?e:`"${e.replace(Is,'\\"')}"`)(e))).join(" "),parseCommand:e=>{const t=[];for(const n of e.trim().split(Hs)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${n}`:t.push(n)}return t}};const ks=e,Ms=i,Ps=zr,Ns=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),n="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===n&&(e=e.slice(0,e.length-1)),e},Bs=eo,Gs=ao,js=To,Us=ko,{spawnedKill:Ds,spawnedCancel:Fs,setupTimeout:Ks,validateTimeout:qs,setExitHandler:Ws}=is,{handleInput:Xs,getSpawnedResult:Qs,makeAllStream:Ys,validateInputSync:Zs}=_s,{mergePromise:Vs,getSpawnedPromise:zs}=Os,{joinCommand:Js,parseCommand:ei,getEscapedCommand:ti}=Ls,ni=(e,t,n={})=>{const r=Ps._parse(e,t,n);return e=r.command,t=r.args,(n={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(n=r.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n}).env=(({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:o})=>{const s=t?{...process.env,...e}:e;return n?Bs.env({env:s,cwd:r,execPath:o}):s})(n),n.stdio=Us(n),"win32"===process.platform&&"cmd"===ks.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:n,parsed:r}},ri=(e,t,n)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?Ns(t):t:void 0===n?void 0:"",oi=(e,t,n)=>{const r=ni(e,t,n),o=Js(e,t),s=ti(e,t);let i;qs(r.options);try{i=Ms.spawn(r.file,r.args,r.options)}catch(e){const t=new Ms.ChildProcess,n=Promise.reject(js({error:e,stdout:"",stderr:"",all:"",command:o,escapedCommand:s,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return Vs(t,n)}const a=zs(i),c=Ks(i,r.options,a),u=Ws(i,r.options,c),l={isCanceled:!1};i.kill=Ds.bind(null,i.kill.bind(i)),i.cancel=Fs.bind(null,i,l);const p=Gs((async()=>{const[{error:e,exitCode:t,signal:n,timedOut:a},c,p,f]=await Qs(i,r.options,u),d=ri(r.options,c),h=ri(r.options,p),g=ri(r.options,f);if(e||0!==t||null!==n){const c=js({error:e,exitCode:t,signal:n,stdout:d,stderr:h,all:g,command:o,escapedCommand:s,parsed:r,timedOut:a,isCanceled:l.isCanceled,killed:i.killed});if(!r.options.reject)return c;throw c}return{command:o,escapedCommand:s,exitCode:0,stdout:d,stderr:h,all:g,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return Xs(i,r.options.input),i.all=Ys(i,r.options),Vs(i,p)};function si(e,t){return ci("blue",e,t)}function ii(e,t=""){return ci("green",e,t)}function ai(e,t=""){return ci("red",e,t)}function ci(e,t,n=""){return n?console.log(lr[e](`${t}`),n):console.log(lr[e](`${t}`))}pr.exports=oi,pr.exports.sync=(e,t,n)=>{const r=ni(e,t,n),o=Js(e,t),s=ti(e,t);let i;Zs(r.options);try{i=Ms.spawnSync(r.file,r.args,r.options)}catch(e){throw js({error:e,stdout:"",stderr:"",all:"",command:o,escapedCommand:s,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})}const a=ri(r.options,i.stdout,i.error),c=ri(r.options,i.stderr,i.error);if(i.error||0!==i.status||null!==i.signal){const e=js({stdout:a,stderr:c,error:i.error,signal:i.signal,exitCode:i.status,command:o,escapedCommand:s,parsed:r,timedOut:i.error&&"ETIMEDOUT"===i.error.code,isCanceled:!1,killed:null!==i.signal});if(!r.options.reject)return e;throw e}return{command:o,escapedCommand:s,exitCode:0,stdout:a,stderr:c,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},pr.exports.command=(e,t)=>{const[n,...r]=ei(e);return oi(n,r,t)},pr.exports.commandSync=(e,t)=>{const[n,...r]=ei(e);return oi.sync(n,r,t)},pr.exports.node=(e,t,n={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(n=t,t=[]);const r=Us.node(n),o=process.execArgv.filter((e=>!e.startsWith("--inspect"))),{nodePath:s=process.execPath,nodeOptions:i=o}=n;return oi(s,[...i,e,...Array.isArray(t)?t:[]],{...n,stdin:void 0,stdout:void 0,stderr:void 0,stdio:r,shell:!1})};const ui=f.dirname(p.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:d&&d.src||new URL("index.cjs",document.baseURI).href));function li(n){return!!t.existsSync(n)||(li(e.dirname(n))?(t.mkdirSync(n),!0):void 0)}function pi(t){return e.resolve(ui,t)}function fi(e){return`/**\n * ${e}\n */\nimport request from '@/utils/request'\n\n`}function di(e){return e.replace(/\/(\w)/g,(function(e,t){return t.toUpperCase()}))}function hi(e){return e.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}))}function gi(e){if(!e||0===e?.length)return"";let t;return e.forEach(((n,r)=>{if(t){const o=r+1!==e?.length?"\n":"";t+=`* @param ${n.name} ${n.description} ${o}`}else{const r=e?.length>1?"\n":"";t=`* @param ${n.name} ${n.description} ${r}`}})),t}function mi(e,t,n="post",r=[]){const o=-1!==e.indexOf("{");let s=hi(di(n+e)),i="",a="";o&&(i=e.split("{")[0],a=(e.match(/\{(.+?)\}/g)[0]||"").replace(/\{|}/g,""),s=hi(di(n+i+a)));const c=`${o?a:o||"post"!==n&&"put"!==n?"query":"data"}`,u=""+(o?`'${i}' + ${a}`:`'${e}'`),l=""+(o?"":o||"post"!==n&&"put"!==n?"\n params: query":"\n data: data");return gi(r)?`/**\n* ${t||""}\n${gi(r)}\n* @returns \n*/\nexport function ${s}(${c}) {\n return request({\n url: ${u},\n method: '${n}', ${l}\n })\n}\n\n`:`/**\n* ${t||""}\n* @returns \n*/\nexport function ${s}(${c}) {\n return request({\n url: ${u},\n method: '${n}', ${l}\n })\n}\n\n`}(async function(){return await async function(e){const t=On("dyp.config.js",{cwd:process.env.PWD}),n=await import(t);return e?n.default[e]:n.default}("swaggerConfig")})().then((e=>{const r=e;r||ai("swaggerConfig 未配置");const o=`${process.env.PWD}${r.outputDir}`,s=`${r.path}${r.staticPath}`;r.useBasePath,async function(e,r,o){si("获取远程json文件中...");const{paths:s,basePath:i,tags:a}=await function(e){return new Promise(((t,r)=>{n.get(e,(e=>{const{statusCode:n}=e,o=e.headers["content-type"];let s;if(200!==n?s=new Error(`请求失败。\n状态码: ${n}`):/^application\/json/.test(o)||(s=new Error(`无效的 content-type.\n期望 application/json 但获取的是 ${o}`)),s)return ai(s.message),void e.resume();e.setEncoding("utf8");let i="";e.on("data",(e=>{i+=e})),e.on("end",(()=>{try{const e=JSON.parse(i);t(e)}catch(e){r(`错误: ${e.message}`)}}))})).on("error",(e=>{r(`错误: ${e.message}`)}))}))}(r);ii("获取成功正在生成api文件: ");const c={},u=o&&i;a.forEach((e=>{c[e.name]=function(e){if(!e)return;return e.toLowerCase().split(" ").join("-")}(e.description)}));const l={};for(const e in s){const t=s[e]||{},n=Object.keys(t)||[];for(let r=0,o=n.length;r<o;r++){const o=n[r],s=t[o].tags[0];if(!s)continue;si(s);const a=e.slice(1).split("/"),c=u?a[0]:a[1],p={summary:t[o].summary,parameters:t[o].parameters,tag:s,name:u?`${i}${e}`:e,type:o,folder:c};l[t[o].tags[0]]?l[t[o].tags[0]].push(p):l[t[o].tags[0]]=[p]}}for(const n in l){let r="";const o=[];let s="";for(const e of l[n]){0===o.filter((t=>t===e.type)).length&&o.push(e.type),r+=mi(e.name,e.summary,e.type,e.parameters),s=e.folder}r=fi(n)+r,li(pi(`${e}/${s}`)),t.writeFileSync(pi(`${e}/${s}/${c[n]}.js`),r)}ii("生成完毕")}(o,s,r)}));
|