@onoxm/vite-plugin-auto-router 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vue.js CHANGED
@@ -1 +1 @@
1
- import t from"node:fs";import e from"node:path";import n from"os";import r from"path";import o from"util";import s from"stream";import i from"events";import a from"fs";const u=n=>t.existsSync(e.resolve(n,"tsconfig.json")),c={react:{ts:"src/router/autoRouter.tsx",js:"src/router/autoRouter.jsx"},vue:{ts:"src/router/autoRouter.ts",js:"src/router/autoRouter.js"}};var l,p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},h={},f={},d={};function g(){if(l)return d;return l=1,Object.defineProperty(d,"__esModule",{value:!0}),d.splitWhen=d.flatten=void 0,d.flatten=function(t){return t.reduce((t,e)=>[].concat(t,e),[])},d.splitWhen=function(t,e){const n=[[]];let r=0;for(const o of t)e(o)?(r++,n[r]=[]):n[r].push(o);return n},d}var _,y={};function m(){if(_)return y;return _=1,Object.defineProperty(y,"__esModule",{value:!0}),y.isEnoentCodeError=void 0,y.isEnoentCodeError=function(t){return"ENOENT"===t.code},y}var R,v={};var b,S={};function E(){if(b)return S;b=1,Object.defineProperty(S,"__esModule",{value:!0}),S.convertPosixPathToPattern=S.convertWindowsPathToPattern=S.convertPathToPattern=S.escapePosixPath=S.escapeWindowsPath=S.escape=S.removeLeadingDotSegment=S.makeAbsolute=S.unixify=void 0;const t=r,e="win32"===n.platform(),o=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,s=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,i=/^\\\\([.?])/,a=/\\(?![!()+@[\]{}])/g;function u(t){return t.replace(s,"\\$2")}function c(t){return t.replace(o,"\\$2")}function l(t){return u(t).replace(i,"//$1").replace(a,"/")}function p(t){return c(t)}return S.unixify=function(t){return t.replace(/\\/g,"/")},S.makeAbsolute=function(e,n){return t.resolve(e,n)},S.removeLeadingDotSegment=function(t){if("."===t.charAt(0)){const e=t.charAt(1);if("/"===e||"\\"===e)return t.slice(2)}return t},S.escape=e?u:c,S.escapeWindowsPath=u,S.escapePosixPath=c,S.convertPathToPattern=e?l:p,S.convertWindowsPathToPattern=l,S.convertPosixPathToPattern=p,S}var A,P,x,C,O,T,w={};function k(){return P?A:(P=1,A=function(t){if("string"!=typeof t||""===t)return!1;for(var e;e=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(e[2])return!0;t=t.slice(e.index+e[0].length)}return!1})}function L(){if(C)return x;C=1;var t=k(),e={"{":"}","(":")","[":"]"},n=function(t){if("!"===t[0])return!0;for(var n=0,r=-2,o=-2,s=-2,i=-2,a=-2;n<t.length;){if("*"===t[n])return!0;if("?"===t[n+1]&&/[\].+)]/.test(t[n]))return!0;if(-1!==o&&"["===t[n]&&"]"!==t[n+1]&&(o<n&&(o=t.indexOf("]",n)),o>n)){if(-1===a||a>o)return!0;if(-1===(a=t.indexOf("\\",n))||a>o)return!0}if(-1!==s&&"{"===t[n]&&"}"!==t[n+1]&&(s=t.indexOf("}",n))>n&&(-1===(a=t.indexOf("\\",n))||a>s))return!0;if(-1!==i&&"("===t[n]&&"?"===t[n+1]&&/[:!=]/.test(t[n+2])&&")"!==t[n+3]&&(i=t.indexOf(")",n))>n&&(-1===(a=t.indexOf("\\",n))||a>i))return!0;if(-1!==r&&"("===t[n]&&"|"!==t[n+1]&&(r<n&&(r=t.indexOf("|",n)),-1!==r&&")"!==t[r+1]&&(i=t.indexOf(")",r))>r&&(-1===(a=t.indexOf("\\",r))||a>i)))return!0;if("\\"===t[n]){var u=t[n+1];n+=2;var c=e[u];if(c){var l=t.indexOf(c,n);-1!==l&&(n=l+1)}if("!"===t[n])return!0}else n++}return!1},r=function(t){if("!"===t[0])return!0;for(var n=0;n<t.length;){if(/[*?{}()[\]]/.test(t[n]))return!0;if("\\"===t[n]){var r=t[n+1];n+=2;var o=e[r];if(o){var s=t.indexOf(o,n);-1!==s&&(n=s+1)}if("!"===t[n])return!0}else n++}return!1};return x=function(e,o){if("string"!=typeof e||""===e)return!1;if(t(e))return!0;var s=n;return o&&!1===o.strict&&(s=r),s(e)}}function $(){if(T)return O;T=1;var t=L(),e=r.posix.dirname,o="win32"===n.platform(),s=/\\/g,i=/[\{\[].*[\}\]]$/,a=/(^|[^\\])([\{\[]|\([^\)]+$)/,u=/\\([\!\*\?\|\[\]\(\)\{\}])/g;return O=function(n,r){Object.assign({flipBackslashes:!0},r).flipBackslashes&&o&&n.indexOf("/")<0&&(n=n.replace(s,"/")),i.test(n)&&(n+="/"),n+="a";do{n=e(n)}while(t(n)||a.test(n));return n.replace(u,"$1")}}var M,H,D,F,I,N,j,B,G,U,W,K,V,Q,q,Y,X,Z,z,J={};function tt(){return M||(M=1,(t=J).isInteger=t=>"number"==typeof t?Number.isInteger(t):"string"==typeof t&&""!==t.trim()&&Number.isInteger(Number(t)),t.find=(t,e)=>t.nodes.find(t=>t.type===e),t.exceedsLimit=(e,n,r=1,o)=>!1!==o&&!(!t.isInteger(e)||!t.isInteger(n))&&(Number(n)-Number(e))/Number(r)>=o,t.escapeNode=(t,e=0,n)=>{const r=t.nodes[e];r&&(n&&r.type===n||"open"===r.type||"close"===r.type)&&!0!==r.escaped&&(r.value="\\"+r.value,r.escaped=!0)},t.encloseBrace=t=>!("brace"!==t.type||t.commas>>0+t.ranges|0||(t.invalid=!0,0)),t.isInvalidBrace=t=>!("brace"!==t.type||!0!==t.invalid&&!t.dollar&&(t.commas>>0+t.ranges|0&&!0===t.open&&!0===t.close||(t.invalid=!0,0))),t.isOpenOrClose=t=>"open"===t.type||"close"===t.type||!0===t.open||!0===t.close,t.reduce=t=>t.reduce((t,e)=>("text"===e.type&&t.push(e.value),"range"===e.type&&(e.type="text"),t),[]),t.flatten=(...t)=>{const e=[],n=t=>{for(let r=0;r<t.length;r++){const o=t[r];Array.isArray(o)?n(o):void 0!==o&&e.push(o)}return e};return n(t),e}),J;var t}function et(){if(D)return H;D=1;const t=tt();return H=(e,n={})=>{const r=(e,o={})=>{const s=n.escapeInvalid&&t.isInvalidBrace(o),i=!0===e.invalid&&!0===n.escapeInvalid;let a="";if(e.value)return(s||i)&&t.isOpenOrClose(e)?"\\"+e.value:e.value;if(e.value)return e.value;if(e.nodes)for(const t of e.nodes)a+=r(t);return a};return r(e)}}function nt(){return I?F:(I=1,F=function(t){return"number"==typeof t?t-t===0:"string"==typeof t&&""!==t.trim()&&(Number.isFinite?Number.isFinite(+t):isFinite(+t))})}function rt(){if(j)return N;j=1;const t=nt(),e=(n,s,i)=>{if(!1===t(n))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===s||n===s)return String(n);if(!1===t(s))throw new TypeError("toRegexRange: expected the second argument to be a number.");let a={relaxZeros:!0,...i};"boolean"==typeof a.strictZeros&&(a.relaxZeros=!1===a.strictZeros);let u=n+":"+s+"="+String(a.relaxZeros)+String(a.shorthand)+String(a.capture)+String(a.wrap);if(e.cache.hasOwnProperty(u))return e.cache[u].result;let c=Math.min(n,s),l=Math.max(n,s);if(1===Math.abs(c-l)){let t=n+"|"+s;return a.capture?`(${t})`:!1===a.wrap?t:`(?:${t})`}let h=p(n)||p(s),f={min:n,max:s,a:c,b:l},d=[],g=[];if(h&&(f.isPadded=h,f.maxLen=String(f.max).length),c<0){g=r(l<0?Math.abs(l):1,Math.abs(c),f,a),c=f.a=0}return l>=0&&(d=r(c,l,f,a)),f.negatives=g,f.positives=d,f.result=function(t,e){let n=o(t,e,"-",!1)||[],r=o(e,t,"",!1)||[],s=o(t,e,"-?",!0)||[];return n.concat(s).concat(r).join("|")}(g,d),!0===a.capture?f.result=`(${f.result})`:!1!==a.wrap&&d.length+g.length>1&&(f.result=`(?:${f.result})`),e.cache[u]=f,f.result};function n(t,e,n){if(t===e)return{pattern:t,count:[],digits:0};let r=function(t,e){let n=[];for(let r=0;r<t.length;r++)n.push([t[r],e[r]]);return n}(t,e),o=r.length,s="",i=0;for(let t=0;t<o;t++){let[e,n]=r[t];e===n?s+=e:"0"!==e||"9"!==n?s+=l(e,n):i++}return i&&(s+=!0===n.shorthand?"\\d":"[0-9]"),{pattern:s,count:[i],digits:o}}function r(t,e,r,o){let i,l=function(t,e){let n=1,r=1,o=a(t,n),i=new Set([e]);for(;t<=o&&o<=e;)i.add(o),n+=1,o=a(t,n);for(o=u(e+1,r)-1;t<o&&o<=e;)i.add(o),r+=1,o=u(e+1,r)-1;return i=[...i],i.sort(s),i}(t,e),p=[],f=t;for(let t=0;t<l.length;t++){let e=l[t],s=n(String(f),String(e),o),a="";r.isPadded||!i||i.pattern!==s.pattern?(r.isPadded&&(a=h(e,r,o)),s.string=a+s.pattern+c(s.count),p.push(s),f=e+1,i=s):(i.count.length>1&&i.count.pop(),i.count.push(s.count[0]),i.string=i.pattern+c(i.count),f=e+1)}return p}function o(t,e,n,r,o){let s=[];for(let o of t){let{string:t}=o;r||i(e,"string",t)||s.push(n+t),r&&i(e,"string",t)&&s.push(n+t)}return s}function s(t,e){return t>e?1:e>t?-1:0}function i(t,e,n){return t.some(t=>t[e]===n)}function a(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function u(t,e){return t-t%Math.pow(10,e)}function c(t){let[e=0,n=""]=t;return n||e>1?`{${e+(n?","+n:"")}}`:""}function l(t,e,n){return`[${t}${e-t===1?"":"-"}${e}]`}function p(t){return/^-?(0+)\d/.test(t)}function h(t,e,n){if(!e.isPadded)return t;let r=Math.abs(e.maxLen-String(t).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}}`}}return e.cache={},e.clearCache=()=>e.cache={},N=e}function ot(){if(G)return B;G=1;const t=o,e=rt(),n=t=>null!==t&&"object"==typeof t&&!Array.isArray(t),r=t=>"number"==typeof t||"string"==typeof t&&""!==t,s=t=>Number.isInteger(+t),i=t=>{let e=`${t}`,n=-1;if("-"===e[0]&&(e=e.slice(1)),"0"===e)return!1;for(;"0"===e[++n];);return n>0},a=(t,e,n)=>{if(e>0){let n="-"===t[0]?"-":"";n&&(t=t.slice(1)),t=n+t.padStart(n?e-1:e,"0")}return!1===n?String(t):t},u=(t,e)=>{let n="-"===t[0]?"-":"";for(n&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return n?"-"+t:t},c=(t,n,r,o)=>{if(r)return e(t,n,{wrap:!1,...o});let s=String.fromCharCode(t);return t===n?s:`[${s}-${String.fromCharCode(n)}]`},l=(t,n,r)=>{if(Array.isArray(t)){let e=!0===r.wrap,n=r.capture?"":"?:";return e?`(${n}${t.join("|")})`:t.join("|")}return e(t,n,r)},p=(...e)=>new RangeError("Invalid range arguments: "+t.inspect(...e)),h=(t,e,n)=>{if(!0===n.strictRanges)throw p([t,e]);return[]},f=(t,e,n=1,r={})=>{let o=Number(t),s=Number(e);if(!Number.isInteger(o)||!Number.isInteger(s)){if(!0===r.strictRanges)throw p([t,e]);return[]}0===o&&(o=0),0===s&&(s=0);let h=o>s,f=String(t),d=String(e),g=String(n);n=Math.max(Math.abs(n),1);let _=i(f)||i(d)||i(g),y=_?Math.max(f.length,d.length,g.length):0,m=!1===_&&!1===((t,e,n)=>"string"==typeof t||"string"==typeof e||!0===n.stringify)(t,e,r),R=r.transform||(t=>e=>!0===t?Number(e):String(e))(m);if(r.toRegex&&1===n)return c(u(t,y),u(e,y),!0,r);let v={negatives:[],positives:[]},b=t=>v[t<0?"negatives":"positives"].push(Math.abs(t)),S=[],E=0;for(;h?o>=s:o<=s;)!0===r.toRegex&&n>1?b(o):S.push(a(R(o,E),y,m)),o=h?o-n:o+n,E++;return!0===r.toRegex?n>1?((t,e,n)=>{t.negatives.sort((t,e)=>t<e?-1:t>e?1:0),t.positives.sort((t,e)=>t<e?-1:t>e?1:0);let r,o=e.capture?"":"?:",s="",i="";return t.positives.length&&(s=t.positives.map(t=>u(String(t),n)).join("|")),t.negatives.length&&(i=`-(${o}${t.negatives.map(t=>u(String(t),n)).join("|")})`),r=s&&i?`${s}|${i}`:s||i,e.wrap?`(${o}${r})`:r})(v,r,y):l(S,null,{wrap:!1,...r}):S},d=(t,e,o,i={})=>{if(null==e&&r(t))return[t];if(!r(t)||!r(e))return h(t,e,i);if("function"==typeof o)return d(t,e,1,{transform:o});if(n(o))return d(t,e,0,o);let a={...i};return!0===a.capture&&(a.wrap=!0),o=o||a.step||1,s(o)?s(t)&&s(e)?f(t,e,o,a):((t,e,n=1,r={})=>{if(!s(t)&&t.length>1||!s(e)&&e.length>1)return h(t,e,r);let o=r.transform||(t=>String.fromCharCode(t)),i=`${t}`.charCodeAt(0),a=`${e}`.charCodeAt(0),u=i>a,p=Math.min(i,a),f=Math.max(i,a);if(r.toRegex&&1===n)return c(p,f,!1,r);let d=[],g=0;for(;u?i>=a:i<=a;)d.push(o(i,g)),i=u?i-n:i+n,g++;return!0===r.toRegex?l(d,null,{wrap:!1,options:r}):d})(t,e,Math.max(Math.abs(o),1),a):null==o||n(o)?d(t,e,1,o):((t,e)=>{if(!0===e.strictRanges)throw new TypeError(`Expected step "${t}" to be a number`);return[]})(o,a)};return B=d}function st(){if(X)return Y;X=1;const t=et(),{MAX_LENGTH:e,CHAR_BACKSLASH:n,CHAR_BACKTICK:r,CHAR_COMMA:o,CHAR_DOT:s,CHAR_LEFT_PARENTHESES:i,CHAR_RIGHT_PARENTHESES:a,CHAR_LEFT_CURLY_BRACE:u,CHAR_RIGHT_CURLY_BRACE:c,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_RIGHT_SQUARE_BRACKET:p,CHAR_DOUBLE_QUOTE:h,CHAR_SINGLE_QUOTE:f,CHAR_NO_BREAK_SPACE:d,CHAR_ZERO_WIDTH_NOBREAK_SPACE:g}=q?Q:(q=1,Q={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"});return Y=(_,y={})=>{if("string"!=typeof _)throw new TypeError("Expected a string");const m=y||{},R="number"==typeof m.maxLength?Math.min(e,m.maxLength):e;if(_.length>R)throw new SyntaxError(`Input length (${_.length}), exceeds max characters (${R})`);const v={type:"root",input:_,nodes:[]},b=[v];let S=v,E=v,A=0;const P=_.length;let x,C=0,O=0;const T=()=>_[C++],w=t=>{if("text"===t.type&&"dot"===E.type&&(E.type="text"),!E||"text"!==E.type||"text"!==t.type)return S.nodes.push(t),t.parent=S,t.prev=E,E=t,t;E.value+=t.value};for(w({type:"bos"});C<P;)if(S=b[b.length-1],x=T(),x!==g&&x!==d)if(x!==n)if(x!==p){if(x===l){let t;for(A++;C<P&&(t=T());)if(x+=t,t!==l)if(t!==n){if(t===p&&(A--,0===A))break}else x+=T();else A++;w({type:"text",value:x});continue}if(x!==i)if(x!==a){if(x===h||x===f||x===r){const t=x;let e;for(!0!==y.keepQuotes&&(x="");C<P&&(e=T());)if(e!==n){if(e===t){!0===y.keepQuotes&&(x+=e);break}x+=e}else x+=e+T();w({type:"text",value:x});continue}if(x===u){O++;const t=E.value&&"$"===E.value.slice(-1)||!0===S.dollar;S=w({type:"brace",open:!0,close:!1,dollar:t,depth:O,commas:0,ranges:0,nodes:[]}),b.push(S),w({type:"open",value:x});continue}if(x===c){if("brace"!==S.type){w({type:"text",value:x});continue}const t="close";S=b.pop(),S.close=!0,w({type:t,value:x}),O--,S=b[b.length-1];continue}if(x===o&&O>0){if(S.ranges>0){S.ranges=0;const e=S.nodes.shift();S.nodes=[e,{type:"text",value:t(S)}]}w({type:"comma",value:x}),S.commas++}else{if(x===s&&O>0&&0===S.commas){const t=S.nodes;if(0===O||0===t.length){w({type:"text",value:x});continue}if("dot"===E.type){if(S.range=[],E.value+=x,E.type="range",3!==S.nodes.length&&5!==S.nodes.length){S.invalid=!0,S.ranges=0,E.type="text";continue}S.ranges++,S.args=[];continue}if("range"===E.type){t.pop();const e=t[t.length-1];e.value+=E.value+x,E=e,S.ranges--;continue}w({type:"dot",value:x});continue}w({type:"text",value:x})}}else{if("paren"!==S.type){w({type:"text",value:x});continue}S=b.pop(),w({type:"text",value:x}),S=b[b.length-1]}else S=w({type:"paren",nodes:[]}),b.push(S),w({type:"text",value:x})}else w({type:"text",value:"\\"+x});else w({type:"text",value:(y.keepEscaping?x:"")+T()});do{if(S=b.pop(),"root"!==S.type){S.nodes.forEach(t=>{t.nodes||("open"===t.type&&(t.isOpen=!0),"close"===t.type&&(t.isClose=!0),t.nodes||(t.type="text"),t.invalid=!0)});const t=b[b.length-1],e=t.nodes.indexOf(S);t.nodes.splice(e,1,...S.nodes)}}while(b.length>0);return w({type:"eos"}),v}}function it(){if(z)return Z;z=1;const t=et(),e=function(){if(W)return U;W=1;const t=ot(),e=tt();return U=(n,r={})=>{const o=(n,s={})=>{const i=e.isInvalidBrace(s),a=!0===n.invalid&&!0===r.escapeInvalid,u=!0===i||!0===a,c=!0===r.escapeInvalid?"\\":"";let l="";if(!0===n.isOpen)return c+n.value;if(!0===n.isClose)return console.log("node.isClose",c,n.value),c+n.value;if("open"===n.type)return u?c+n.value:"(";if("close"===n.type)return u?c+n.value:")";if("comma"===n.type)return"comma"===n.prev.type?"":u?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){const o=e.reduce(n.nodes),s=t(...o,{...r,wrap:!1,toRegex:!0,strictZeros:!0});if(0!==s.length)return o.length>1&&s.length>1?`(${s})`:s}if(n.nodes)for(const t of n.nodes)l+=o(t,n);return l};return o(n)}}(),n=function(){if(V)return K;V=1;const t=ot(),e=et(),n=tt(),r=(t="",e="",o=!1)=>{const s=[];if(t=[].concat(t),!(e=[].concat(e)).length)return t;if(!t.length)return o?n.flatten(e).map(t=>`{${t}}`):e;for(const n of t)if(Array.isArray(n))for(const t of n)s.push(r(t,e,o));else for(let t of e)!0===o&&"string"==typeof t&&(t=`{${t}}`),s.push(Array.isArray(t)?r(n,t,o):n+t);return n.flatten(s)};return K=(o,s={})=>{const i=void 0===s.rangeLimit?1e3:s.rangeLimit,a=(o,u={})=>{o.queue=[];let c=u,l=u.queue;for(;"brace"!==c.type&&"root"!==c.type&&c.parent;)c=c.parent,l=c.queue;if(o.invalid||o.dollar)return void l.push(r(l.pop(),e(o,s)));if("brace"===o.type&&!0!==o.invalid&&2===o.nodes.length)return void l.push(r(l.pop(),["{}"]));if(o.nodes&&o.ranges>0){const a=n.reduce(o.nodes);if(n.exceedsLimit(...a,s.step,i))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let u=t(...a,s);return 0===u.length&&(u=e(o,s)),l.push(r(l.pop(),u)),void(o.nodes=[])}const p=n.encloseBrace(o);let h=o.queue,f=o;for(;"brace"!==f.type&&"root"!==f.type&&f.parent;)f=f.parent,h=f.queue;for(let t=0;t<o.nodes.length;t++){const e=o.nodes[t];"comma"!==e.type||"brace"!==o.type?"close"!==e.type?e.value&&"open"!==e.type?h.push(r(h.pop(),e.value)):e.nodes&&a(e,o):l.push(r(l.pop(),h,p)):(1===t&&h.push(""),h.push(""))}return h};return n.flatten(a(o))},K}(),r=st(),o=(t,e={})=>{let n=[];if(Array.isArray(t))for(const r of t){const t=o.create(r,e);Array.isArray(t)?n.push(...t):n.push(t)}else n=[].concat(o.create(t,e));return e&&!0===e.expand&&!0===e.nodupes&&(n=[...new Set(n)]),n};return o.parse=(t,e={})=>r(t,e),o.stringify=(e,n={})=>t("string"==typeof e?o.parse(e,n):e,n),o.compile=(t,n={})=>("string"==typeof t&&(t=o.parse(t,n)),e(t,n)),o.expand=(t,e={})=>{"string"==typeof t&&(t=o.parse(t,e));let r=n(t,e);return!0===e.noempty&&(r=r.filter(Boolean)),!0===e.nodupes&&(r=[...new Set(r)]),r},o.create=(t,e={})=>""===t||t.length<3?[t]:!0!==e.expand?o.compile(t,e):o.expand(t,e),Z=o}var at,ut,ct,lt,pt,ht,ft,dt,gt,_t,yt,mt,Rt,vt,bt={};function St(){if(ut)return at;ut=1;const t=r,e="\\\\/",n=`[^${e}]`,o="\\.",s="\\/",i="[^/]",a=`(?:${s}|$)`,u=`(?:^|${s})`,c=`${o}{1,2}${a}`,l={DOT_LITERAL:o,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:s,ONE_CHAR:"(?=.)",QMARK:i,END_ANCHOR:a,DOTS_SLASH:c,NO_DOT:`(?!${o})`,NO_DOTS:`(?!${u}${c})`,NO_DOT_SLASH:`(?!${o}{0,1}${a})`,NO_DOTS_SLASH:`(?!${c})`,QMARK_NO_DOT:`[^.${s}]`,STAR:`${i}*?`,START_ANCHOR:u},p={...l,SLASH_LITERAL:`[${e}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${o}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[${e}])${o}{1,2}(?:[${e}]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`};return at={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:t.sep,extglobChars:t=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:t=>!0===t?p:l}}function Et(){return ct||(ct=1,function(t){const e=r,n="win32"===process.platform,{REGEX_BACKSLASH:o,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:a}=St();t.isObject=t=>null!==t&&"object"==typeof t&&!Array.isArray(t),t.hasRegexChars=t=>i.test(t),t.isRegexChar=e=>1===e.length&&t.hasRegexChars(e),t.escapeRegex=t=>t.replace(a,"\\$1"),t.toPosixSlashes=t=>t.replace(o,"/"),t.removeBackslashes=t=>t.replace(s,t=>"\\"===t?"":t),t.supportsLookbehinds=()=>{const t=process.version.slice(1).split(".").map(Number);return 3===t.length&&t[0]>=9||8===t[0]&&t[1]>=10},t.isWindows=t=>t&&"boolean"==typeof t.windows?t.windows:!0===n||"\\"===e.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=(t,e={})=>{let n=t;return n.startsWith("./")&&(n=n.slice(2),e.prefix="./"),n},t.wrapOutput=(t,e={},n={})=>{let r=`${n.contains?"":"^"}(?:${t})${n.contains?"":"$"}`;return!0===e.negated&&(r=`(?:^(?!${r}).*$)`),r}}(bt)),bt}function At(){if(gt)return dt;gt=1;const t=r,e=function(){if(pt)return lt;pt=1;const t=Et(),{CHAR_ASTERISK:e,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:o,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:i,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:c,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:p,CHAR_QUESTION_MARK:h,CHAR_RIGHT_CURLY_BRACE:f,CHAR_RIGHT_PARENTHESES:d,CHAR_RIGHT_SQUARE_BRACKET:g}=St(),_=t=>t===a||t===r,y=t=>{!0!==t.isPrefix&&(t.depth=t.isGlobstar?1/0:1)};return lt=(m,R)=>{const v=R||{},b=m.length-1,S=!0===v.parts||!0===v.scanToEnd,E=[],A=[],P=[];let x,C,O=m,T=-1,w=0,k=0,L=!1,$=!1,M=!1,H=!1,D=!1,F=!1,I=!1,N=!1,j=!1,B=!1,G=0,U={value:"",depth:0,isGlob:!1};const W=()=>T>=b,K=()=>O.charCodeAt(T+1),V=()=>(x=C,O.charCodeAt(++T));for(;T<b;){let t;if(C=V(),C!==r){if(!0===F||C===u){for(G++;!0!==W()&&(C=V());)if(C!==r)if(C!==u){if(!0!==F&&C===s&&(C=V())===s){if(L=U.isBrace=!0,M=U.isGlob=!0,B=!0,!0===S)continue;break}if(!0!==F&&C===o){if(L=U.isBrace=!0,M=U.isGlob=!0,B=!0,!0===S)continue;break}if(C===f&&(G--,0===G)){F=!1,L=U.isBrace=!0,B=!0;break}}else G++;else I=U.backslashes=!0,V();if(!0===S)continue;break}if(C!==a){if(!0!==v.noext&&!0==(C===p||C===n||C===e||C===h||C===i)&&K()===c){if(M=U.isGlob=!0,H=U.isExtglob=!0,B=!0,C===i&&T===w&&(j=!0),!0===S){for(;!0!==W()&&(C=V());)if(C!==r){if(C===d){M=U.isGlob=!0,B=!0;break}}else I=U.backslashes=!0,C=V();continue}break}if(C===e){if(x===e&&(D=U.isGlobstar=!0),M=U.isGlob=!0,B=!0,!0===S)continue;break}if(C===h){if(M=U.isGlob=!0,B=!0,!0===S)continue;break}if(C===l){for(;!0!==W()&&(t=V());)if(t!==r){if(t===g){$=U.isBracket=!0,M=U.isGlob=!0,B=!0;break}}else I=U.backslashes=!0,V();if(!0===S)continue;break}if(!0===v.nonegate||C!==i||T!==w){if(!0!==v.noparen&&C===c){if(M=U.isGlob=!0,!0===S){for(;!0!==W()&&(C=V());)if(C!==c){if(C===d){B=!0;break}}else I=U.backslashes=!0,C=V();continue}break}if(!0===M){if(B=!0,!0===S)continue;break}}else N=U.negated=!0,w++}else{if(E.push(T),A.push(U),U={value:"",depth:0,isGlob:!1},!0===B)continue;if(x===s&&T===w+1){w+=2;continue}k=T+1}}else I=U.backslashes=!0,C=V(),C===u&&(F=!0)}!0===v.noext&&(H=!1,M=!1);let Q=O,q="",Y="";w>0&&(q=O.slice(0,w),O=O.slice(w),k-=w),Q&&!0===M&&k>0?(Q=O.slice(0,k),Y=O.slice(k)):!0===M?(Q="",Y=O):Q=O,Q&&""!==Q&&"/"!==Q&&Q!==O&&_(Q.charCodeAt(Q.length-1))&&(Q=Q.slice(0,-1)),!0===v.unescape&&(Y&&(Y=t.removeBackslashes(Y)),Q&&!0===I&&(Q=t.removeBackslashes(Q)));const X={prefix:q,input:m,start:w,base:Q,glob:Y,isBrace:L,isBracket:$,isGlob:M,isExtglob:H,isGlobstar:D,negated:N,negatedExtglob:j};if(!0===v.tokens&&(X.maxDepth=0,_(C)||A.push(U),X.tokens=A),!0===v.parts||!0===v.tokens){let t;for(let e=0;e<E.length;e++){const n=t?t+1:w,r=E[e],o=m.slice(n,r);v.tokens&&(0===e&&0!==w?(A[e].isPrefix=!0,A[e].value=q):A[e].value=o,y(A[e]),X.maxDepth+=A[e].depth),0===e&&""===o||P.push(o),t=r}if(t&&t+1<m.length){const e=m.slice(t+1);P.push(e),v.tokens&&(A[A.length-1].value=e,y(A[A.length-1]),X.maxDepth+=A[A.length-1].depth)}X.slashes=E,X.parts=P}return X},lt}(),n=function(){if(ft)return ht;ft=1;const t=St(),e=Et(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:i}=t,a=(t,n)=>{if("function"==typeof n.expandRange)return n.expandRange(...t,n);t.sort();const r=`[${t.join("-")}]`;try{new RegExp(r)}catch(n){return t.map(t=>e.escapeRegex(t)).join("..")}return r},u=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,c=(l,p)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=i[l]||l;const h={...p},f="number"==typeof h.maxLength?Math.min(n,h.maxLength):n;let d=l.length;if(d>f)throw new SyntaxError(`Input length: ${d}, exceeds maximum allowed length: ${f}`);const g={type:"bos",value:"",output:h.prepend||""},_=[g],y=h.capture?"":"?:",m=e.isWindows(p),R=t.globChars(m),v=t.extglobChars(R),{DOT_LITERAL:b,PLUS_LITERAL:S,SLASH_LITERAL:E,ONE_CHAR:A,DOTS_SLASH:P,NO_DOT:x,NO_DOT_SLASH:C,NO_DOTS_SLASH:O,QMARK:T,QMARK_NO_DOT:w,STAR:k,START_ANCHOR:L}=R,$=t=>`(${y}(?:(?!${L}${t.dot?P:b}).)*?)`,M=h.dot?"":x,H=h.dot?T:w;let D=!0===h.bash?$(h):k;h.capture&&(D=`(${D})`),"boolean"==typeof h.noext&&(h.noextglob=h.noext);const F={input:l,index:-1,start:0,dot:!0===h.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:_};l=e.removePrefix(l,F),d=l.length;const I=[],N=[],j=[];let B,G=g;const U=()=>F.index===d-1,W=F.peek=(t=1)=>l[F.index+t],K=F.advance=()=>l[++F.index]||"",V=()=>l.slice(F.index+1),Q=(t="",e=0)=>{F.consumed+=t,F.index+=e},q=t=>{F.output+=null!=t.output?t.output:t.value,Q(t.value)},Y=()=>{let t=1;for(;"!"===W()&&("("!==W(2)||"?"===W(3));)K(),F.start++,t++;return t%2!=0&&(F.negated=!0,F.start++,!0)},X=t=>{F[t]++,j.push(t)},Z=t=>{F[t]--,j.pop()},z=t=>{if("globstar"===G.type){const e=F.braces>0&&("comma"===t.type||"brace"===t.type),n=!0===t.extglob||I.length&&("pipe"===t.type||"paren"===t.type);"slash"===t.type||"paren"===t.type||e||n||(F.output=F.output.slice(0,-G.output.length),G.type="star",G.value="*",G.output=D,F.output+=G.output)}if(I.length&&"paren"!==t.type&&(I[I.length-1].inner+=t.value),(t.value||t.output)&&q(t),G&&"text"===G.type&&"text"===t.type)return G.value+=t.value,void(G.output=(G.output||"")+t.value);t.prev=G,_.push(t),G=t},J=(t,e)=>{const n={...v[e],conditions:1,inner:""};n.prev=G,n.parens=F.parens,n.output=F.output;const r=(h.capture?"(":"")+n.open;X("parens"),z({type:t,value:e,output:F.output?"":A}),z({type:"paren",extglob:!0,value:K(),output:r}),I.push(n)},tt=t=>{let e,n=t.close+(h.capture?")":"");if("negate"===t.type){let r=D;if(t.inner&&t.inner.length>1&&t.inner.includes("/")&&(r=$(h)),(r!==D||U()||/^\)+$/.test(V()))&&(n=t.close=`)$))${r}`),t.inner.includes("*")&&(e=V())&&/^\.[^\\/.]+$/.test(e)){const o=c(e,{...p,fastpaths:!1}).output;n=t.close=`)${o})${r})`}"bos"===t.prev.type&&(F.negatedExtglob=!0)}z({type:"paren",extglob:!0,value:B,output:n}),Z("parens")};if(!1!==h.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let t=!1,n=l.replace(s,(e,n,r,o,s,i)=>"\\"===o?(t=!0,e):"?"===o?n?n+o+(s?T.repeat(s.length):""):0===i?H+(s?T.repeat(s.length):""):T.repeat(r.length):"."===o?b.repeat(r.length):"*"===o?n?n+o+(s?D:""):D:n?e:`\\${e}`);return!0===t&&(n=!0===h.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,t=>t.length%2==0?"\\\\":t?"\\":"")),n===l&&!0===h.contains?(F.output=l,F):(F.output=e.wrapOutput(n,F,p),F)}for(;!U();){if(B=K(),"\0"===B)continue;if("\\"===B){const t=W();if("/"===t&&!0!==h.bash)continue;if("."===t||";"===t)continue;if(!t){B+="\\",z({type:"text",value:B});continue}const e=/^\\+/.exec(V());let n=0;if(e&&e[0].length>2&&(n=e[0].length,F.index+=n,n%2!=0&&(B+="\\")),!0===h.unescape?B=K():B+=K(),0===F.brackets){z({type:"text",value:B});continue}}if(F.brackets>0&&("]"!==B||"["===G.value||"[^"===G.value)){if(!1!==h.posix&&":"===B){const t=G.value.slice(1);if(t.includes("[")&&(G.posix=!0,t.includes(":"))){const t=G.value.lastIndexOf("["),e=G.value.slice(0,t),n=G.value.slice(t+2),o=r[n];if(o){G.value=e+o,F.backtrack=!0,K(),g.output||1!==_.indexOf(G)||(g.output=A);continue}}}("["===B&&":"!==W()||"-"===B&&"]"===W())&&(B=`\\${B}`),"]"!==B||"["!==G.value&&"[^"!==G.value||(B=`\\${B}`),!0===h.posix&&"!"===B&&"["===G.value&&(B="^"),G.value+=B,q({value:B});continue}if(1===F.quotes&&'"'!==B){B=e.escapeRegex(B),G.value+=B,q({value:B});continue}if('"'===B){F.quotes=1===F.quotes?0:1,!0===h.keepQuotes&&z({type:"text",value:B});continue}if("("===B){X("parens"),z({type:"paren",value:B});continue}if(")"===B){if(0===F.parens&&!0===h.strictBrackets)throw new SyntaxError(u("opening","("));const t=I[I.length-1];if(t&&F.parens===t.parens+1){tt(I.pop());continue}z({type:"paren",value:B,output:F.parens?")":"\\)"}),Z("parens");continue}if("["===B){if(!0!==h.nobracket&&V().includes("]"))X("brackets");else{if(!0!==h.nobracket&&!0===h.strictBrackets)throw new SyntaxError(u("closing","]"));B=`\\${B}`}z({type:"bracket",value:B});continue}if("]"===B){if(!0===h.nobracket||G&&"bracket"===G.type&&1===G.value.length){z({type:"text",value:B,output:`\\${B}`});continue}if(0===F.brackets){if(!0===h.strictBrackets)throw new SyntaxError(u("opening","["));z({type:"text",value:B,output:`\\${B}`});continue}Z("brackets");const t=G.value.slice(1);if(!0===G.posix||"^"!==t[0]||t.includes("/")||(B=`/${B}`),G.value+=B,q({value:B}),!1===h.literalBrackets||e.hasRegexChars(t))continue;const n=e.escapeRegex(G.value);if(F.output=F.output.slice(0,-G.value.length),!0===h.literalBrackets){F.output+=n,G.value=n;continue}G.value=`(${y}${n}|${G.value})`,F.output+=G.value;continue}if("{"===B&&!0!==h.nobrace){X("braces");const t={type:"brace",value:B,output:"(",outputIndex:F.output.length,tokensIndex:F.tokens.length};N.push(t),z(t);continue}if("}"===B){const t=N[N.length-1];if(!0===h.nobrace||!t){z({type:"text",value:B,output:B});continue}let e=")";if(!0===t.dots){const t=_.slice(),n=[];for(let e=t.length-1;e>=0&&(_.pop(),"brace"!==t[e].type);e--)"dots"!==t[e].type&&n.unshift(t[e].value);e=a(n,h),F.backtrack=!0}if(!0!==t.comma&&!0!==t.dots){const n=F.output.slice(0,t.outputIndex),r=F.tokens.slice(t.tokensIndex);t.value=t.output="\\{",B=e="\\}",F.output=n;for(const t of r)F.output+=t.output||t.value}z({type:"brace",value:B,output:e}),Z("braces"),N.pop();continue}if("|"===B){I.length>0&&I[I.length-1].conditions++,z({type:"text",value:B});continue}if(","===B){let t=B;const e=N[N.length-1];e&&"braces"===j[j.length-1]&&(e.comma=!0,t="|"),z({type:"comma",value:B,output:t});continue}if("/"===B){if("dot"===G.type&&F.index===F.start+1){F.start=F.index+1,F.consumed="",F.output="",_.pop(),G=g;continue}z({type:"slash",value:B,output:E});continue}if("."===B){if(F.braces>0&&"dot"===G.type){"."===G.value&&(G.output=b);const t=N[N.length-1];G.type="dots",G.output+=B,G.value+=B,t.dots=!0;continue}if(F.braces+F.parens===0&&"bos"!==G.type&&"slash"!==G.type){z({type:"text",value:B,output:b});continue}z({type:"dot",value:B,output:b});continue}if("?"===B){if((!G||"("!==G.value)&&!0!==h.noextglob&&"("===W()&&"?"!==W(2)){J("qmark",B);continue}if(G&&"paren"===G.type){const t=W();let n=B;if("<"===t&&!e.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===G.value&&!/[!=<:]/.test(t)||"<"===t&&!/<([!=]|\w+>)/.test(V()))&&(n=`\\${B}`),z({type:"text",value:B,output:n});continue}if(!0!==h.dot&&("slash"===G.type||"bos"===G.type)){z({type:"qmark",value:B,output:w});continue}z({type:"qmark",value:B,output:T});continue}if("!"===B){if(!0!==h.noextglob&&"("===W()&&("?"!==W(2)||!/[!=<:]/.test(W(3)))){J("negate",B);continue}if(!0!==h.nonegate&&0===F.index){Y();continue}}if("+"===B){if(!0!==h.noextglob&&"("===W()&&"?"!==W(2)){J("plus",B);continue}if(G&&"("===G.value||!1===h.regex){z({type:"plus",value:B,output:S});continue}if(G&&("bracket"===G.type||"paren"===G.type||"brace"===G.type)||F.parens>0){z({type:"plus",value:B});continue}z({type:"plus",value:S});continue}if("@"===B){if(!0!==h.noextglob&&"("===W()&&"?"!==W(2)){z({type:"at",extglob:!0,value:B,output:""});continue}z({type:"text",value:B});continue}if("*"!==B){"$"!==B&&"^"!==B||(B=`\\${B}`);const t=o.exec(V());t&&(B+=t[0],F.index+=t[0].length),z({type:"text",value:B});continue}if(G&&("globstar"===G.type||!0===G.star)){G.type="star",G.star=!0,G.value+=B,G.output=D,F.backtrack=!0,F.globstar=!0,Q(B);continue}let t=V();if(!0!==h.noextglob&&/^\([^?]/.test(t)){J("star",B);continue}if("star"===G.type){if(!0===h.noglobstar){Q(B);continue}const e=G.prev,n=e.prev,r="slash"===e.type||"bos"===e.type,o=n&&("star"===n.type||"globstar"===n.type);if(!0===h.bash&&(!r||t[0]&&"/"!==t[0])){z({type:"star",value:B,output:""});continue}const s=F.braces>0&&("comma"===e.type||"brace"===e.type),i=I.length&&("pipe"===e.type||"paren"===e.type);if(!r&&"paren"!==e.type&&!s&&!i){z({type:"star",value:B,output:""});continue}for(;"/**"===t.slice(0,3);){const e=l[F.index+4];if(e&&"/"!==e)break;t=t.slice(3),Q("/**",3)}if("bos"===e.type&&U()){G.type="globstar",G.value+=B,G.output=$(h),F.output=G.output,F.globstar=!0,Q(B);continue}if("slash"===e.type&&"bos"!==e.prev.type&&!o&&U()){F.output=F.output.slice(0,-(e.output+G.output).length),e.output=`(?:${e.output}`,G.type="globstar",G.output=$(h)+(h.strictSlashes?")":"|$)"),G.value+=B,F.globstar=!0,F.output+=e.output+G.output,Q(B);continue}if("slash"===e.type&&"bos"!==e.prev.type&&"/"===t[0]){const n=void 0!==t[1]?"|$":"";F.output=F.output.slice(0,-(e.output+G.output).length),e.output=`(?:${e.output}`,G.type="globstar",G.output=`${$(h)}${E}|${E}${n})`,G.value+=B,F.output+=e.output+G.output,F.globstar=!0,Q(B+K()),z({type:"slash",value:"/",output:""});continue}if("bos"===e.type&&"/"===t[0]){G.type="globstar",G.value+=B,G.output=`(?:^|${E}|${$(h)}${E})`,F.output=G.output,F.globstar=!0,Q(B+K()),z({type:"slash",value:"/",output:""});continue}F.output=F.output.slice(0,-G.output.length),G.type="globstar",G.output=$(h),G.value+=B,F.output+=G.output,F.globstar=!0,Q(B);continue}const n={type:"star",value:B,output:D};!0!==h.bash?!G||"bracket"!==G.type&&"paren"!==G.type||!0!==h.regex?(F.index!==F.start&&"slash"!==G.type&&"dot"!==G.type||("dot"===G.type?(F.output+=C,G.output+=C):!0===h.dot?(F.output+=O,G.output+=O):(F.output+=M,G.output+=M),"*"!==W()&&(F.output+=A,G.output+=A)),z(n)):(n.output=B,z(n)):(n.output=".*?","bos"!==G.type&&"slash"!==G.type||(n.output=M+n.output),z(n))}for(;F.brackets>0;){if(!0===h.strictBrackets)throw new SyntaxError(u("closing","]"));F.output=e.escapeLast(F.output,"["),Z("brackets")}for(;F.parens>0;){if(!0===h.strictBrackets)throw new SyntaxError(u("closing",")"));F.output=e.escapeLast(F.output,"("),Z("parens")}for(;F.braces>0;){if(!0===h.strictBrackets)throw new SyntaxError(u("closing","}"));F.output=e.escapeLast(F.output,"{"),Z("braces")}if(!0===h.strictSlashes||"star"!==G.type&&"bracket"!==G.type||z({type:"maybe_slash",value:"",output:`${E}?`}),!0===F.backtrack){F.output="";for(const t of F.tokens)F.output+=null!=t.output?t.output:t.value,t.suffix&&(F.output+=t.suffix)}return F};return c.fastpaths=(r,o)=>{const s={...o},a="number"==typeof s.maxLength?Math.min(n,s.maxLength):n,u=r.length;if(u>a)throw new SyntaxError(`Input length: ${u}, exceeds maximum allowed length: ${a}`);r=i[r]||r;const c=e.isWindows(o),{DOT_LITERAL:l,SLASH_LITERAL:p,ONE_CHAR:h,DOTS_SLASH:f,NO_DOT:d,NO_DOTS:g,NO_DOTS_SLASH:_,STAR:y,START_ANCHOR:m}=t.globChars(c),R=s.dot?g:d,v=s.dot?_:d,b=s.capture?"":"?:";let S=!0===s.bash?".*?":y;s.capture&&(S=`(${S})`);const E=t=>!0===t.noglobstar?S:`(${b}(?:(?!${m}${t.dot?f:l}).)*?)`,A=t=>{switch(t){case"*":return`${R}${h}${S}`;case".*":return`${l}${h}${S}`;case"*.*":return`${R}${S}${l}${h}${S}`;case"*/*":return`${R}${S}${p}${h}${v}${S}`;case"**":return R+E(s);case"**/*":return`(?:${R}${E(s)}${p})?${v}${h}${S}`;case"**/*.*":return`(?:${R}${E(s)}${p})?${v}${S}${l}${h}${S}`;case"**/.*":return`(?:${R}${E(s)}${p})?${l}${h}${S}`;default:{const e=/^(.*?)\.(\w+)$/.exec(t);if(!e)return;const n=A(e[1]);if(!n)return;return n+l+e[2]}}},P=e.removePrefix(r,{negated:!1,prefix:""});let x=A(P);return x&&!0!==s.strictSlashes&&(x+=`${p}?`),x},ht=c}(),o=Et(),s=St(),i=(t,e,n=!1)=>{if(Array.isArray(t)){const r=t.map(t=>i(t,e,n)),o=t=>{for(const e of r){const n=e(t);if(n)return n}return!1};return o}const r=(s=t)&&"object"==typeof s&&!Array.isArray(s)&&t.tokens&&t.input;var s;if(""===t||"string"!=typeof t&&!r)throw new TypeError("Expected pattern to be a non-empty string");const a=e||{},u=o.isWindows(e),c=r?i.compileRe(t,e):i.makeRe(t,e,!1,!0),l=c.state;delete c.state;let p=()=>!1;if(a.ignore){const t={...e,ignore:null,onMatch:null,onResult:null};p=i(a.ignore,t,n)}const h=(n,r=!1)=>{const{isMatch:o,match:s,output:h}=i.test(n,c,e,{glob:t,posix:u}),f={glob:t,state:l,regex:c,posix:u,input:n,output:h,match:s,isMatch:o};return"function"==typeof a.onResult&&a.onResult(f),!1===o?(f.isMatch=!1,!!r&&f):p(n)?("function"==typeof a.onIgnore&&a.onIgnore(f),f.isMatch=!1,!!r&&f):("function"==typeof a.onMatch&&a.onMatch(f),!r||f)};return n&&(h.state=l),h};return i.test=(t,e,n,{glob:r,posix:s}={})=>{if("string"!=typeof t)throw new TypeError("Expected input to be a string");if(""===t)return{isMatch:!1,output:""};const a=n||{},u=a.format||(s?o.toPosixSlashes:null);let c=t===r,l=c&&u?u(t):t;return!1===c&&(l=u?u(t):t,c=l===r),!1!==c&&!0!==a.capture||(c=!0===a.matchBase||!0===a.basename?i.matchBase(t,e,n,s):e.exec(l)),{isMatch:Boolean(c),match:c,output:l}},i.matchBase=(e,n,r,s=o.isWindows(r))=>(n instanceof RegExp?n:i.makeRe(n,r)).test(t.basename(e)),i.isMatch=(t,e,n)=>i(e,n)(t),i.parse=(t,e)=>Array.isArray(t)?t.map(t=>i.parse(t,e)):n(t,{...e,fastpaths:!1}),i.scan=(t,n)=>e(t,n),i.compileRe=(t,e,n=!1,r=!1)=>{if(!0===n)return t.output;const o=e||{},s=o.contains?"":"^",a=o.contains?"":"$";let u=`${s}(?:${t.output})${a}`;t&&!0===t.negated&&(u=`^(?!${u}).*$`);const c=i.toRegex(u,e);return!0===r&&(c.state=t),c},i.makeRe=(t,e={},r=!1,o=!1)=>{if(!t||"string"!=typeof t)throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return!1===e.fastpaths||"."!==t[0]&&"*"!==t[0]||(s.output=n.fastpaths(t,e)),s.output||(s=n(t,e)),i.compileRe(s,e,r,o)},i.toRegex=(t,e)=>{try{const n=e||{};return new RegExp(t,n.flags||(n.nocase?"i":""))}catch(t){if(e&&!0===e.debug)throw t;return/$^/}},i.constants=s,dt=i}function Pt(){return yt?_t:(yt=1,_t=At())}function xt(){if(vt)return w;vt=1,Object.defineProperty(w,"__esModule",{value:!0}),w.isAbsolute=w.partitionAbsoluteAndRelative=w.removeDuplicateSlashes=w.matchAny=w.convertPatternsToRe=w.makeRe=w.getPatternParts=w.expandBraceExpansion=w.expandPatternsWithBraceExpansion=w.isAffectDepthOfReadingPattern=w.endsWithSlashGlobStar=w.hasGlobStar=w.getBaseDirectory=w.isPatternRelatedToParentDirectory=w.getPatternsOutsideCurrentDirectory=w.getPatternsInsideCurrentDirectory=w.getPositivePatterns=w.getNegativePatterns=w.isPositivePattern=w.isNegativePattern=w.convertToNegativePattern=w.convertToPositivePattern=w.isDynamicPattern=w.isStaticPattern=void 0;const t=r,e=$(),n=function(){if(Rt)return mt;Rt=1;const t=o,e=it(),n=Pt(),r=Et(),s=t=>""===t||"./"===t,i=t=>{const e=t.indexOf("{");return e>-1&&t.indexOf("}",e)>-1},a=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let o=new Set,s=new Set,i=new Set,a=0,u=t=>{i.add(t.output),r&&r.onResult&&r.onResult(t)};for(let i=0;i<e.length;i++){let c=n(String(e[i]),{...r,onResult:u},!0),l=c.state.negated||c.state.negatedExtglob;l&&a++;for(let e of t){let t=c(e,!0);(l?!t.isMatch:t.isMatch)&&(l?o.add(t.output):(o.delete(t.output),s.add(t.output)))}}let c=(a===e.length?[...i]:[...s]).filter(t=>!o.has(t));if(r&&0===c.length){if(!0===r.failglob)throw new Error(`No matches found for "${e.join(", ")}"`);if(!0===r.nonull||!0===r.nullglob)return r.unescape?e.map(t=>t.replace(/\\/g,"")):e}return c};return a.match=a,a.matcher=(t,e)=>n(t,e),a.any=a.isMatch=(t,e,r)=>n(e,r)(t),a.not=(t,e,n={})=>{e=[].concat(e).map(String);let r=new Set,o=[],s=new Set(a(t,e,{...n,onResult:t=>{n.onResult&&n.onResult(t),o.push(t.output)}}));for(let t of o)s.has(t)||r.add(t);return[...r]},a.contains=(e,n,r)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${t.inspect(e)}"`);if(Array.isArray(n))return n.some(t=>a.contains(e,t,r));if("string"==typeof n){if(s(e)||s(n))return!1;if(e.includes(n)||e.startsWith("./")&&e.slice(2).includes(n))return!0}return a.isMatch(e,n,{...r,contains:!0})},a.matchKeys=(t,e,n)=>{if(!r.isObject(t))throw new TypeError("Expected the first argument to be an object");let o=a(Object.keys(t),e,n),s={};for(let e of o)s[e]=t[e];return s},a.some=(t,e,r)=>{let o=[].concat(t);for(let t of[].concat(e)){let e=n(String(t),r);if(o.some(t=>e(t)))return!0}return!1},a.every=(t,e,r)=>{let o=[].concat(t);for(let t of[].concat(e)){let e=n(String(t),r);if(!o.every(t=>e(t)))return!1}return!0},a.all=(e,r,o)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${t.inspect(e)}"`);return[].concat(r).every(t=>n(t,o)(e))},a.capture=(t,e,o)=>{let s=r.isWindows(o),i=n.makeRe(String(t),{...o,capture:!0}).exec(s?r.toPosixSlashes(e):e);if(i)return i.slice(1).map(t=>void 0===t?"":t)},a.makeRe=(...t)=>n.makeRe(...t),a.scan=(...t)=>n.scan(...t),a.parse=(t,r)=>{let o=[];for(let s of[].concat(t||[]))for(let t of e(String(s),r))o.push(n.parse(t,r));return o},a.braces=(t,n)=>{if("string"!=typeof t)throw new TypeError("Expected a string");return n&&!0===n.nobrace||!i(t)?[t]:e(t,n)},a.braceExpand=(t,e)=>{if("string"!=typeof t)throw new TypeError("Expected a string");return a.braces(t,{...e,expand:!0})},a.hasBraces=i,mt=a}(),s=/[*?]|^!/,i=/\[[^[]*]/,a=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,u=/[!*+?@]\([^(]*\)/,c=/,|\.\./,l=/(?!^)\/{2,}/g;function p(t,e={}){return!h(t,e)}function h(t,e={}){return""!==t&&(!(!1!==e.caseSensitiveMatch&&!t.includes("\\"))||(!!(s.test(t)||i.test(t)||a.test(t))||(!(!1===e.extglob||!u.test(t))||!(!1===e.braceExpansion||!function(t){const e=t.indexOf("{");if(-1===e)return!1;const n=t.indexOf("}",e+1);if(-1===n)return!1;const r=t.slice(e,n);return c.test(r)}(t)))))}function f(t){return t.startsWith("!")&&"("!==t[1]}function d(t){return!f(t)}function g(t){return t.startsWith("..")||t.startsWith("./..")}function _(t){return t.endsWith("/**")}function y(t){const e=n.braces(t,{expand:!0,nodupes:!0,keepEscaping:!0});return e.sort((t,e)=>t.length-e.length),e.filter(t=>""!==t)}function m(t,e){return n.makeRe(t,e)}function R(e){return t.isAbsolute(e)}return w.isStaticPattern=p,w.isDynamicPattern=h,w.convertToPositivePattern=function(t){return f(t)?t.slice(1):t},w.convertToNegativePattern=function(t){return"!"+t},w.isNegativePattern=f,w.isPositivePattern=d,w.getNegativePatterns=function(t){return t.filter(f)},w.getPositivePatterns=function(t){return t.filter(d)},w.getPatternsInsideCurrentDirectory=function(t){return t.filter(t=>!g(t))},w.getPatternsOutsideCurrentDirectory=function(t){return t.filter(g)},w.isPatternRelatedToParentDirectory=g,w.getBaseDirectory=function(t){return e(t,{flipBackslashes:!1})},w.hasGlobStar=function(t){return t.includes("**")},w.endsWithSlashGlobStar=_,w.isAffectDepthOfReadingPattern=function(e){const n=t.basename(e);return _(e)||p(n)},w.expandPatternsWithBraceExpansion=function(t){return t.reduce((t,e)=>t.concat(y(e)),[])},w.expandBraceExpansion=y,w.getPatternParts=function(t,e){let{parts:r}=n.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return 0===r.length&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r},w.makeRe=m,w.convertPatternsToRe=function(t,e){return t.map(t=>m(t,e))},w.matchAny=function(t,e){return e.some(e=>e.test(t))},w.removeDuplicateSlashes=function(t){return t.replace(l,"/")},w.partitionAbsoluteAndRelative=function(t){const e=[],n=[];for(const r of t)R(r)?e.push(r):n.push(r);return[e,n]},w.isAbsolute=R,w}var Ct,Ot,Tt,wt={};function kt(){if(Ot)return Ct;Ot=1;const t=s.PassThrough,e=Array.prototype.slice;function n(e,r){if(Array.isArray(e))for(let t=0,o=e.length;t<o;t++)e[t]=n(e[t],r);else{if(!e._readableState&&e.pipe&&(e=e.pipe(t(r))),!e._readableState||!e.pause||!e.pipe)throw new Error("Only readable stream can be merged.");e.pause()}return e}return Ct=function(){const r=[],o=e.call(arguments);let s=!1,i=o[o.length-1];i&&!Array.isArray(i)&&null==i.pipe?o.pop():i={};const a=!1!==i.end,u=!0===i.pipeError;null==i.objectMode&&(i.objectMode=!0);null==i.highWaterMark&&(i.highWaterMark=65536);const c=t(i);function l(){for(let t=0,e=arguments.length;t<e;t++)r.push(n(arguments[t],i));return p(),this}function p(){if(s)return;s=!0;let t=r.shift();if(!t)return void process.nextTick(h);Array.isArray(t)||(t=[t]);let e=t.length+1;function n(){--e>0||(s=!1,p())}function o(t){function e(){t.removeListener("merge2UnpipeEnd",e),t.removeListener("end",e),u&&t.removeListener("error",r),n()}function r(t){c.emit("error",t)}if(t._readableState.endEmitted)return n();t.on("merge2UnpipeEnd",e),t.on("end",e),u&&t.on("error",r),t.pipe(c,{end:!1}),t.resume()}for(let e=0;e<t.length;e++)o(t[e]);n()}function h(){s=!1,c.emit("queueDrain"),a&&c.end()}c.setMaxListeners(0),c.add=l,c.on("unpipe",function(t){t.emit("merge2UnpipeEnd")}),o.length&&l.apply(null,o);return c},Ct}var Lt,$t,Mt,Ht={};function Dt(){if(Lt)return Ht;return Lt=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.isEmpty=Ht.isString=void 0,Ht.isString=function(t){return"string"==typeof t},Ht.isEmpty=function(t){return""===t},Ht}function Ft(){if($t)return f;$t=1,Object.defineProperty(f,"__esModule",{value:!0}),f.string=f.stream=f.pattern=f.path=f.fs=f.errno=f.array=void 0;const t=g();f.array=t;const e=m();f.errno=e;const n=function(){if(R)return v;R=1,Object.defineProperty(v,"__esModule",{value:!0}),v.createDirentFromStats=void 0;class t{constructor(t,e){this.name=t,this.isBlockDevice=e.isBlockDevice.bind(e),this.isCharacterDevice=e.isCharacterDevice.bind(e),this.isDirectory=e.isDirectory.bind(e),this.isFIFO=e.isFIFO.bind(e),this.isFile=e.isFile.bind(e),this.isSocket=e.isSocket.bind(e),this.isSymbolicLink=e.isSymbolicLink.bind(e)}}return v.createDirentFromStats=function(e,n){return new t(e,n)},v}();f.fs=n;const r=E();f.path=r;const o=xt();f.pattern=o;const s=function(){if(Tt)return wt;Tt=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.merge=void 0;const t=kt();function e(t){t.forEach(t=>t.emit("close"))}return wt.merge=function(n){const r=t(n);return n.forEach(t=>{t.once("error",t=>r.emit("error",t))}),r.once("close",()=>e(n)),r.once("end",()=>e(n)),r},wt}();f.stream=s;const i=Dt();return f.string=i,f}var It,Nt={},jt={},Bt={},Gt={},Ut={},Wt={},Kt={},Vt={},Qt={};function qt(){if(It)return Qt;function t(t,e){t(e)}function e(t,e){t(null,e)}return It=1,Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.read=void 0,Qt.read=function(n,r,o){r.fs.lstat(n,(s,i)=>{null===s?i.isSymbolicLink()&&r.followSymbolicLink?r.fs.stat(n,(n,s)=>{if(null!==n)return r.throwErrorOnBrokenSymbolicLink?void t(o,n):void e(o,i);r.markSymbolicLink&&(s.isSymbolicLink=()=>!0),e(o,s)}):e(o,i):t(o,s)})},Qt}var Yt,Xt={};var Zt,zt,Jt,te,ee,ne,re,oe={},se={};function ie(){if(zt)return oe;zt=1,Object.defineProperty(oe,"__esModule",{value:!0});const t=(Zt||(Zt=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const e=a;t.FILE_SYSTEM_ADAPTER={lstat:e.lstat,stat:e.stat,lstatSync:e.lstatSync,statSync:e.statSync},t.createFileSystemAdapter=function(e){return void 0===e?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}}(se)),se);return oe.default=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=t.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(t,e){return null!=t?t:e}},oe}function ae(){if(Jt)return Vt;Jt=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.statSync=Vt.stat=Vt.Settings=void 0;const t=qt(),e=(Yt||(Yt=1,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.read=void 0,Xt.read=function(t,e){const n=e.fs.lstatSync(t);if(!n.isSymbolicLink()||!e.followSymbolicLink)return n;try{const n=e.fs.statSync(t);return e.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(t){if(!e.throwErrorOnBrokenSymbolicLink)return n;throw t}}),Xt),n=ie();function r(t={}){return t instanceof n.default?t:new n.default(t)}return Vt.Settings=n.default,Vt.stat=function(e,n,o){"function"!=typeof n?t.read(e,r(n),o):t.read(e,r(),n)},Vt.statSync=function(t,n){const o=r(n);return e.read(t,o)},Vt}function ue(){if(ee)return te;let t;return ee=1,te="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:p):e=>(t||(t=Promise.resolve())).then(e).catch(t=>setTimeout(()=>{throw t},0))}var ce,le={};function pe(){if(ce)return le;ce=1,Object.defineProperty(le,"__esModule",{value:!0}),le.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const t=process.versions.node.split(".");if(void 0===t[0]||void 0===t[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const e=Number.parseInt(t[0],10),n=Number.parseInt(t[1],10),r=e>10,o=10===e&&n>=10;return le.IS_SUPPORT_READDIR_WITH_FILE_TYPES=r||o,le}var he,fe,de={},ge={};function _e(){if(fe)return de;fe=1,Object.defineProperty(de,"__esModule",{value:!0}),de.fs=void 0;const t=function(){if(he)return ge;he=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.createDirentFromStats=void 0;class t{constructor(t,e){this.name=t,this.isBlockDevice=e.isBlockDevice.bind(e),this.isCharacterDevice=e.isCharacterDevice.bind(e),this.isDirectory=e.isDirectory.bind(e),this.isFIFO=e.isFIFO.bind(e),this.isFile=e.isFile.bind(e),this.isSocket=e.isSocket.bind(e),this.isSymbolicLink=e.isSymbolicLink.bind(e)}}return ge.createDirentFromStats=function(e,n){return new t(e,n)},ge}();return de.fs=t,de}var ye,me,Re={};function ve(){if(ye)return Re;return ye=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.joinPathSegments=void 0,Re.joinPathSegments=function(t,e,n){return t.endsWith(n)?t+e:t+n+e},Re}function be(){if(me)return Kt;me=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.readdir=Kt.readdirWithFileTypes=Kt.read=void 0;const t=ae(),e=function(){if(re)return ne;re=1,ne=function(e,n){let r,o,s,i=!0;function a(e){function o(){n&&n(e,r),n=null}i?t(o):o()}function u(t,e,n){r[t]=n,(0===--o||e)&&a(e)}Array.isArray(e)?(r=[],o=e.length):(s=Object.keys(e),r={},o=s.length),o?s?s.forEach(function(t){e[t](function(e,n){u(t,e,n)})}):e.forEach(function(t,e){t(function(t,n){u(e,t,n)})}):a(null),i=!1};const t=ue();return ne}(),n=pe(),r=_e(),o=ve();function s(t,n,s){n.fs.readdir(t,{withFileTypes:!0},(i,c)=>{if(null!==i)return void a(s,i);const l=c.map(e=>({dirent:e,name:e.name,path:o.joinPathSegments(t,e.name,n.pathSegmentSeparator)}));if(!n.followSymbolicLinks)return void u(s,l);const p=l.map(t=>function(t,e){return n=>{t.dirent.isSymbolicLink()?e.fs.stat(t.path,(o,s)=>{if(null!==o)return e.throwErrorOnBrokenSymbolicLink?void n(o):void n(null,t);t.dirent=r.fs.createDirentFromStats(t.name,s),n(null,t)}):n(null,t)}}(t,n));e(p,(t,e)=>{null===t?u(s,e):a(s,t)})})}function i(n,s,i){s.fs.readdir(n,(c,l)=>{if(null!==c)return void a(i,c);const p=l.map(e=>{const i=o.joinPathSegments(n,e,s.pathSegmentSeparator);return n=>{t.stat(i,s.fsStatSettings,(t,o)=>{if(null!==t)return void n(t);const a={name:e,path:i,dirent:r.fs.createDirentFromStats(e,o)};s.stats&&(a.stats=o),n(null,a)})}});e(p,(t,e)=>{null===t?u(i,e):a(i,t)})})}function a(t,e){t(e)}function u(t,e){t(null,e)}return Kt.read=function(t,e,r){e.stats||!n.IS_SUPPORT_READDIR_WITH_FILE_TYPES?i(t,e,r):s(t,e,r)},Kt.readdirWithFileTypes=s,Kt.readdir=i,Kt}var Se,Ee={};var Ae,Pe,xe,Ce={},Oe={};function Te(){return Ae||(Ae=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const e=a;t.FILE_SYSTEM_ADAPTER={lstat:e.lstat,stat:e.stat,lstatSync:e.lstatSync,statSync:e.statSync,readdir:e.readdir,readdirSync:e.readdirSync},t.createFileSystemAdapter=function(e){return void 0===e?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}}(Oe)),Oe}function we(){if(xe)return Wt;xe=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.Settings=Wt.scandirSync=Wt.scandir=void 0;const t=be(),e=function(){if(Se)return Ee;Se=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.readdir=Ee.readdirWithFileTypes=Ee.read=void 0;const t=ae(),e=pe(),n=_e(),r=ve();function o(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(o=>{const s={dirent:o,name:o.name,path:r.joinPathSegments(t,o.name,e.pathSegmentSeparator)};if(s.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{const t=e.fs.statSync(s.path);s.dirent=n.fs.createDirentFromStats(s.name,t)}catch(t){if(e.throwErrorOnBrokenSymbolicLink)throw t}return s})}function s(e,o){return o.fs.readdirSync(e).map(s=>{const i=r.joinPathSegments(e,s,o.pathSegmentSeparator),a=t.statSync(i,o.fsStatSettings),u={name:s,path:i,dirent:n.fs.createDirentFromStats(s,a)};return o.stats&&(u.stats=a),u})}return Ee.read=function(t,n){return!n.stats&&e.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(t,n):s(t,n)},Ee.readdirWithFileTypes=o,Ee.readdir=s,Ee}(),n=function(){if(Pe)return Ce;Pe=1,Object.defineProperty(Ce,"__esModule",{value:!0});const t=r,e=ae(),n=Te();return Ce.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,t.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new e.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,e){return null!=t?t:e}},Ce}();function o(t={}){return t instanceof n.default?t:new n.default(t)}return Wt.Settings=n.default,Wt.scandir=function(e,n,r){"function"!=typeof n?t.read(e,o(n),r):t.read(e,o(),n)},Wt.scandirSync=function(t,n){const r=o(n);return e.read(t,r)},Wt}var ke,Le,$e,Me={exports:{}};function He(){if($e)return Me.exports;$e=1;var t=Le?ke:(Le=1,ke=function(t){var e=new t,n=e;return{get:function(){var r=e;return r.next?e=r.next:(e=new t,n=e),r.next=null,r},release:function(t){n.next=t,n=t}}});function e(e,o,s){if("function"==typeof e&&(s=o,o=e,e=null),!(s>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var i=t(r),a=null,u=null,c=0,l=null,p={push:function(t,r){var f=i.get();f.context=e,f.release=h,f.value=t,f.callback=r||n,f.errorHandler=l,c>=s||p.paused?u?(u.next=f,u=f):(a=f,u=f,p.saturated()):(c++,o.call(e,f.value,f.worked))},drain:n,saturated:n,pause:function(){p.paused=!0},paused:!1,get concurrency(){return s},set concurrency(t){if(!(t>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(s=t,!p.paused)for(;a&&c<s;)c++,h()},running:function(){return c},resume:function(){if(!p.paused)return;if(p.paused=!1,null===a)return c++,void h();for(;a&&c<s;)c++,h()},idle:function(){return 0===c&&0===p.length()},length:function(){var t=a,e=0;for(;t;)t=t.next,e++;return e},getQueue:function(){var t=a,e=[];for(;t;)e.push(t.value),t=t.next;return e},unshift:function(t,r){var f=i.get();f.context=e,f.release=h,f.value=t,f.callback=r||n,f.errorHandler=l,c>=s||p.paused?a?(f.next=a,a=f):(a=f,u=f,p.saturated()):(c++,o.call(e,f.value,f.worked))},empty:n,kill:function(){a=null,u=null,p.drain=n},killAndDrain:function(){a=null,u=null,p.drain(),p.drain=n},error:function(t){l=t},abort:function(){var t=a;a=null,u=null;for(;t;){var e=t.next,r=t.callback,o=t.errorHandler,s=t.value,i=t.context;t.value=null,t.callback=n,t.errorHandler=null,o&&o(new Error("abort"),s),r.call(i,new Error("abort")),t.release(t),t=e}p.drain=n}};return p;function h(t){t&&i.release(t);var n=a;n&&c<=s?p.paused?c--:(u===a&&(u=null),a=n.next,n.next=null,o.call(e,n.value,n.worked),null===u&&p.empty()):0===--c&&p.drain()}}function n(){}function r(){this.value=null,this.callback=n,this.next=null,this.release=n,this.context=null,this.errorHandler=null;var t=this;this.worked=function(e,r){var o=t.callback,s=t.errorHandler,i=t.value;t.value=null,t.callback=n,t.errorHandler&&s(e,i),o.call(t.context,e,r),t.release(t)}}return Me.exports=e,Me.exports.promise=function(t,r,o){"function"==typeof t&&(o=r,r=t,t=null);var s=e(t,function(t,e){r.call(this,t).then(function(t){e(null,t)},e)},o),i=s.push,a=s.unshift;return s.push=function(t){var e=new Promise(function(e,n){i(t,function(t,r){t?n(t):e(r)})});return e.catch(n),e},s.unshift=function(t){var e=new Promise(function(e,n){a(t,function(t,r){t?n(t):e(r)})});return e.catch(n),e},s.drained=function(){return new Promise(function(t){process.nextTick(function(){if(s.idle())t();else{var e=s.drain;s.drain=function(){"function"==typeof e&&e(),t(),s.drain=e}}})})},s},Me.exports}var De,Fe={};function Ie(){if(De)return Fe;return De=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.joinPathSegments=Fe.replacePathSegmentSeparator=Fe.isAppliedFilter=Fe.isFatalError=void 0,Fe.isFatalError=function(t,e){return null===t.errorFilter||!t.errorFilter(e)},Fe.isAppliedFilter=function(t,e){return null===t||t(e)},Fe.replacePathSegmentSeparator=function(t,e){return t.split(/[/\\]/).join(e)},Fe.joinPathSegments=function(t,e,n){return""===t?e:t.endsWith(n)?t+e:t+n+e},Fe}var Ne,je,Be,Ge={};function Ue(){if(Ne)return Ge;Ne=1,Object.defineProperty(Ge,"__esModule",{value:!0});const t=Ie();return Ge.default=class{constructor(e,n){this._root=e,this._settings=n,this._root=t.replacePathSegmentSeparator(e,n.pathSegmentSeparator)}},Ge}function We(){if(je)return Ut;je=1,Object.defineProperty(Ut,"__esModule",{value:!0});const t=i,e=we(),n=He(),r=Ie(),o=Ue();class s extends o.default{constructor(r,o){super(r,o),this._settings=o,this._scandir=e.scandir,this._emitter=new t.EventEmitter,this._queue=n(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(t){this._emitter.on("entry",t)}onError(t){this._emitter.once("error",t)}onEnd(t){this._emitter.once("end",t)}_pushToQueue(t,e){const n={directory:t,base:e};this._queue.push(n,t=>{null!==t&&this._handleError(t)})}_worker(t,e){this._scandir(t.directory,this._settings.fsScandirSettings,(n,r)=>{if(null===n){for(const e of r)this._handleEntry(e,t.base);e(null,void 0)}else e(n,void 0)})}_handleError(t){!this._isDestroyed&&r.isFatalError(this._settings,t)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",t))}_handleEntry(t,e){if(this._isDestroyed||this._isFatalError)return;const n=t.path;void 0!==e&&(t.path=r.joinPathSegments(e,t.name,this._settings.pathSegmentSeparator)),r.isAppliedFilter(this._settings.entryFilter,t)&&this._emitEntry(t),t.dirent.isDirectory()&&r.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,void 0===e?void 0:t.path)}_emitEntry(t){this._emitter.emit("entry",t)}}return Ut.default=s,Ut}var Ke,Ve={};var Qe,qe,Ye={},Xe={};function Ze(){if(qe)return Ye;qe=1,Object.defineProperty(Ye,"__esModule",{value:!0});const t=function(){if(Qe)return Xe;Qe=1,Object.defineProperty(Xe,"__esModule",{value:!0});const t=we(),e=Ie(),n=Ue();class r extends n.default{constructor(){super(...arguments),this._scandir=t.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(t,e){this._queue.add({directory:t,base:e})}_handleQueue(){for(const t of this._queue.values())this._handleDirectory(t.directory,t.base)}_handleDirectory(t,e){try{const n=this._scandir(t,this._settings.fsScandirSettings);for(const t of n)this._handleEntry(t,e)}catch(t){this._handleError(t)}}_handleError(t){if(e.isFatalError(this._settings,t))throw t}_handleEntry(t,n){const r=t.path;void 0!==n&&(t.path=e.joinPathSegments(n,t.name,this._settings.pathSegmentSeparator)),e.isAppliedFilter(this._settings.entryFilter,t)&&this._pushToStorage(t),t.dirent.isDirectory()&&e.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(r,void 0===n?void 0:t.path)}_pushToStorage(t){this._storage.push(t)}}return Xe.default=r,Xe}();return Ye.default=class{constructor(e,n){this._root=e,this._settings=n,this._reader=new t.default(this._root,this._settings)}read(){return this._reader.read()}},Ye}var ze,Je,tn={};function en(){if(Je)return Bt;Je=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const t=function(){if(Be)return Gt;Be=1,Object.defineProperty(Gt,"__esModule",{value:!0});const t=We();return Gt.default=class{constructor(e,n){this._root=e,this._settings=n,this._reader=new t.default(this._root,this._settings),this._storage=[]}read(t){this._reader.onError(e=>{!function(t,e){t(e)}(t,e)}),this._reader.onEntry(t=>{this._storage.push(t)}),this._reader.onEnd(()=>{!function(t,e){t(null,e)}(t,this._storage)}),this._reader.read()}},Gt}(),e=function(){if(Ke)return Ve;Ke=1,Object.defineProperty(Ve,"__esModule",{value:!0});const t=s,e=We();return Ve.default=class{constructor(n,r){this._root=n,this._settings=r,this._reader=new e.default(this._root,this._settings),this._stream=new t.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(t=>{this._stream.emit("error",t)}),this._reader.onEntry(t=>{this._stream.push(t)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Ve}(),n=Ze(),o=function(){if(ze)return tn;ze=1,Object.defineProperty(tn,"__esModule",{value:!0});const t=r,e=we();return tn.default=class{constructor(n={}){this._options=n,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,t.sep),this.fsScandirSettings=new e.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(t,e){return null!=t?t:e}},tn}();function i(t={}){return t instanceof o.default?t:new o.default(t)}return Bt.Settings=o.default,Bt.walk=function(e,n,r){"function"!=typeof n?new t.default(e,i(n)).read(r):new t.default(e,i()).read(n)},Bt.walkSync=function(t,e){const r=i(e);return new n.default(t,r).read()},Bt.walkStream=function(t,n){const r=i(n);return new e.default(t,r).read()},Bt}var nn,rn={};function on(){if(nn)return rn;nn=1,Object.defineProperty(rn,"__esModule",{value:!0});const t=r,e=ae(),n=Ft();return rn.default=class{constructor(t){this._settings=t,this._fsStatSettings=new e.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return t.resolve(this._settings.cwd,e)}_makeEntry(t,e){const r={name:e,path:e,dirent:n.fs.createDirentFromStats(e,t)};return this._settings.stats&&(r.stats=t),r}_isFatalError(t){return!n.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}},rn}var sn,an,un={};function cn(){if(sn)return un;sn=1,Object.defineProperty(un,"__esModule",{value:!0});const t=s,e=ae(),n=en(),r=on();class o extends r.default{constructor(){super(...arguments),this._walkStream=n.walkStream,this._stat=e.stat}dynamic(t,e){return this._walkStream(t,e)}static(e,n){const r=e.map(this._getFullEntryPath,this),o=new t.PassThrough({objectMode:!0});o._write=(t,s,i)=>this._getEntry(r[t],e[t],n).then(e=>{null!==e&&n.entryFilter(e)&&o.push(e),t===r.length-1&&o.end(),i()}).catch(i);for(let t=0;t<r.length;t++)o.write(t);return o}_getEntry(t,e,n){return this._getStat(t).then(t=>this._makeEntry(t,e)).catch(t=>{if(n.errorFilter(t))return null;throw t})}_getStat(t){return new Promise((e,n)=>{this._stat(t,this._fsStatSettings,(t,r)=>null===t?e(r):n(t))})}}return un.default=o,un}var ln,pn,hn,fn={},dn={},gn={},_n={};function yn(){if(pn)return gn;pn=1,Object.defineProperty(gn,"__esModule",{value:!0});const t=function(){if(ln)return _n;ln=1,Object.defineProperty(_n,"__esModule",{value:!0});const t=Ft();return _n.default=class{constructor(t,e,n){this._patterns=t,this._settings=e,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(const t of this._patterns){const e=this._getPatternSegments(t),n=this._splitSegmentsIntoSections(e);this._storage.push({complete:n.length<=1,pattern:t,segments:e,sections:n})}}_getPatternSegments(e){return t.pattern.getPatternParts(e,this._micromatchOptions).map(e=>t.pattern.isDynamicPattern(e,this._settings)?{dynamic:!0,pattern:e,patternRe:t.pattern.makeRe(e,this._micromatchOptions)}:{dynamic:!1,pattern:e})}_splitSegmentsIntoSections(e){return t.array.splitWhen(e,e=>e.dynamic&&t.pattern.hasGlobStar(e.pattern))}},_n}();class e extends t.default{match(t){const e=t.split("/"),n=e.length,r=this._storage.filter(t=>!t.complete||t.segments.length>n);for(const t of r){const r=t.sections[0];if(!t.complete&&n>r.length)return!0;if(e.every((e,n)=>{const r=t.segments[n];return!(!r.dynamic||!r.patternRe.test(e))||!r.dynamic&&r.pattern===e}))return!0}return!1}}return gn.default=e,gn}var mn,Rn={};var vn,bn={};var Sn,En,An,Pn={};function xn(){if(En)return fn;En=1,Object.defineProperty(fn,"__esModule",{value:!0});const t=r,e=function(){if(hn)return dn;hn=1,Object.defineProperty(dn,"__esModule",{value:!0});const t=Ft(),e=yn();return dn.default=class{constructor(t,e){this._settings=t,this._micromatchOptions=e}getFilter(t,e,n){const r=this._getMatcher(e),o=this._getNegativePatternsRe(n);return e=>this._filter(t,e,r,o)}_getMatcher(t){return new e.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){const n=e.filter(t.pattern.isAffectDepthOfReadingPattern);return t.pattern.convertPatternsToRe(n,this._micromatchOptions)}_filter(e,n,r,o){if(this._isSkippedByDeep(e,n.path))return!1;if(this._isSkippedSymbolicLink(n))return!1;const s=t.path.removeLeadingDotSegment(n.path);return!this._isSkippedByPositivePatterns(s,r)&&this._isSkippedByNegativePatterns(s,o)}_isSkippedByDeep(t,e){return this._settings.deep!==1/0&&this._getEntryLevel(t,e)>=this._settings.deep}_getEntryLevel(t,e){const n=e.split("/").length;return""===t?n:n-t.split("/").length}_isSkippedSymbolicLink(t){return!this._settings.followSymbolicLinks&&t.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(t,e){return!this._settings.baseNameMatch&&!e.match(t)}_isSkippedByNegativePatterns(e,n){return!t.pattern.matchAny(e,n)}},dn}(),n=function(){if(mn)return Rn;mn=1,Object.defineProperty(Rn,"__esModule",{value:!0});const t=Ft();return Rn.default=class{constructor(t,e){this._settings=t,this._micromatchOptions=e,this.index=new Map}getFilter(e,n){const[r,o]=t.pattern.partitionAbsoluteAndRelative(n),s={positive:{all:t.pattern.convertPatternsToRe(e,this._micromatchOptions)},negative:{absolute:t.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:t.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return t=>this._filter(t,s)}_filter(e,n){const r=t.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(r))return!1;if(this._onlyFileFilter(e)||this._onlyDirectoryFilter(e))return!1;const o=this._isMatchToPatternsSet(r,n,e.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(r),o}_isDuplicateEntry(t){return this.index.has(t)}_createIndexRecord(t){this.index.set(t,void 0)}_onlyFileFilter(t){return this._settings.onlyFiles&&!t.dirent.isFile()}_onlyDirectoryFilter(t){return this._settings.onlyDirectories&&!t.dirent.isDirectory()}_isMatchToPatternsSet(t,e,n){return!!this._isMatchToPatterns(t,e.positive.all,n)&&(!this._isMatchToPatterns(t,e.negative.relative,n)&&!this._isMatchToAbsoluteNegative(t,e.negative.absolute,n))}_isMatchToAbsoluteNegative(e,n,r){if(0===n.length)return!1;const o=t.path.makeAbsolute(this._settings.cwd,e);return this._isMatchToPatterns(o,n,r)}_isMatchToPatterns(e,n,r){if(0===n.length)return!1;const o=t.pattern.matchAny(e,n);return!o&&r?t.pattern.matchAny(e+"/",n):o}},Rn}(),o=function(){if(vn)return bn;vn=1,Object.defineProperty(bn,"__esModule",{value:!0});const t=Ft();return bn.default=class{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(e){return t.errno.isEnoentCodeError(e)||this._settings.suppressErrors}},bn}(),s=function(){if(Sn)return Pn;Sn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const t=Ft();return Pn.default=class{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(e){let n=e.path;return this._settings.absolute&&(n=t.path.makeAbsolute(this._settings.cwd,n),n=t.path.unixify(n)),this._settings.markDirectories&&e.dirent.isDirectory()&&(n+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:n}):n}},Pn}();return fn.default=class{constructor(t){this._settings=t,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new e.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new s.default(this._settings)}_getRootDirectory(e){return t.resolve(this._settings.cwd,e.base)}_getReaderOptions(t){const e="."===t.base?"":t.base;return{basePath:e,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(e,t.positive,t.negative),entryFilter:this.entryFilter.getFilter(t.positive,t.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},fn}function Cn(){if(An)return Nt;An=1,Object.defineProperty(Nt,"__esModule",{value:!0});const t=function(){if(an)return jt;an=1,Object.defineProperty(jt,"__esModule",{value:!0});const t=en(),e=on(),n=cn();class r extends e.default{constructor(){super(...arguments),this._walkAsync=t.walk,this._readerStream=new n.default(this._settings)}dynamic(t,e){return new Promise((n,r)=>{this._walkAsync(t,e,(t,e)=>{null===t?n(e):r(t)})})}async static(t,e){const n=[],r=this._readerStream.static(t,e);return new Promise((t,e)=>{r.once("error",e),r.on("data",t=>n.push(t)),r.once("end",()=>t(n))})}}return jt.default=r,jt}(),e=xn();class n extends e.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}async read(t){const e=this._getRootDirectory(t),n=this._getReaderOptions(t);return(await this.api(e,t,n)).map(t=>n.transform(t))}api(t,e,n){return e.dynamic?this._reader.dynamic(t,n):this._reader.static(e.patterns,n)}}return Nt.default=n,Nt}var On,Tn={};var wn,kn,Ln={},$n={};function Mn(){if(kn)return Ln;kn=1,Object.defineProperty(Ln,"__esModule",{value:!0});const t=function(){if(wn)return $n;wn=1,Object.defineProperty($n,"__esModule",{value:!0});const t=ae(),e=en(),n=on();class r extends n.default{constructor(){super(...arguments),this._walkSync=e.walkSync,this._statSync=t.statSync}dynamic(t,e){return this._walkSync(t,e)}static(t,e){const n=[];for(const r of t){const t=this._getFullEntryPath(r),o=this._getEntry(t,r,e);null!==o&&e.entryFilter(o)&&n.push(o)}return n}_getEntry(t,e,n){try{const n=this._getStat(t);return this._makeEntry(n,e)}catch(t){if(n.errorFilter(t))return null;throw t}}_getStat(t){return this._statSync(t,this._fsStatSettings)}}return $n.default=r,$n}(),e=xn();class n extends e.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const e=this._getRootDirectory(t),n=this._getReaderOptions(t);return this.api(e,t,n).map(n.transform)}api(t,e,n){return e.dynamic?this._reader.dynamic(t,n):this._reader.static(e.patterns,n)}}return Ln.default=n,Ln}var Hn,Dn,Fn,In={};!function(){if(Fn)return Dn;Fn=1;const t=function(){if(Mt)return h;Mt=1,Object.defineProperty(h,"__esModule",{value:!0}),h.convertPatternGroupToTask=h.convertPatternGroupsToTasks=h.groupPatternsByBaseDirectory=h.getNegativePatternsAsPositive=h.getPositivePatterns=h.convertPatternsToTasks=h.generate=void 0;const t=Ft();function e(e,n){let r=e;return n.braceExpansion&&(r=t.pattern.expandPatternsWithBraceExpansion(r)),n.baseNameMatch&&(r=r.map(t=>t.includes("/")?t:`**/${t}`)),r.map(e=>t.pattern.removeDuplicateSlashes(e))}function n(e,n,r){const o=[],u=t.pattern.getPatternsOutsideCurrentDirectory(e),c=t.pattern.getPatternsInsideCurrentDirectory(e),l=s(u),p=s(c);return o.push(...i(l,n,r)),"."in p?o.push(a(".",c,n,r)):o.push(...i(p,n,r)),o}function r(e){return t.pattern.getPositivePatterns(e)}function o(e,n){return t.pattern.getNegativePatterns(e).concat(n).map(t.pattern.convertToPositivePattern)}function s(e){return e.reduce((e,n)=>{const r=t.pattern.getBaseDirectory(n);return r in e?e[r].push(n):e[r]=[n],e},{})}function i(t,e,n){return Object.keys(t).map(r=>a(r,t[r],e,n))}function a(e,n,r,o){return{dynamic:o,positive:n,negative:r,base:e,patterns:[].concat(n,r.map(t.pattern.convertToNegativePattern))}}return h.generate=function(s,i){const a=e(s,i),u=e(i.ignore,i),c=r(a),l=o(a,u),p=c.filter(e=>t.pattern.isStaticPattern(e,i)),h=c.filter(e=>t.pattern.isDynamicPattern(e,i)),f=n(p,l,!1),d=n(h,l,!0);return f.concat(d)},h.convertPatternsToTasks=n,h.getPositivePatterns=r,h.getNegativePatternsAsPositive=o,h.groupPatternsByBaseDirectory=s,h.convertPatternGroupsToTasks=i,h.convertPatternGroupToTask=a,h}(),e=Cn(),r=function(){if(On)return Tn;On=1,Object.defineProperty(Tn,"__esModule",{value:!0});const t=s,e=cn(),n=xn();class r extends n.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const n=this._getRootDirectory(e),r=this._getReaderOptions(e),o=this.api(n,e,r),s=new t.Readable({objectMode:!0,read:()=>{}});return o.once("error",t=>s.emit("error",t)).on("data",t=>s.emit("data",r.transform(t))).once("end",()=>s.emit("end")),s.once("close",()=>o.destroy()),s}api(t,e,n){return e.dynamic?this._reader.dynamic(t,n):this._reader.static(e.patterns,n)}}return Tn.default=r,Tn}(),o=Mn(),i=(Hn||(Hn=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const e=a,r=n,o=Math.max(r.cpus().length,1);t.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:e.lstat,lstatSync:e.lstatSync,stat:e.stat,statSync:e.statSync,readdir:e.readdir,readdirSync:e.readdirSync},t.default=class{constructor(t={}){this._options=t,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,o),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(t,e){return void 0===t?e:t}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},t.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(In)),In),u=Ft();async function c(t,n){p(t);const r=l(t,e.default,n),o=await Promise.all(r);return u.array.flatten(o)}function l(e,n,r){const o=[].concat(e),s=new i.default(r),a=t.generate(o,s),u=new n(s);return a.map(u.read,u)}function p(t){if(![].concat(t).every(t=>u.string.isString(t)&&!u.string.isEmpty(t)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}(function(e){function n(t,e){p(t);const n=l(t,o.default,e);return u.array.flatten(n)}function s(t,e){p(t);const n=l(t,r.default,e);return u.stream.merge(n)}var a,c;e.glob=e,e.globSync=n,e.globStream=s,e.async=e,e.sync=n,e.stream=s,e.generateTasks=function(e,n){p(e);const r=[].concat(e),o=new i.default(n);return t.generate(r,o)},e.isDynamicPattern=function(t,e){p(t);const n=new i.default(e);return u.pattern.isDynamicPattern(t,n)},e.escapePath=function(t){return p(t),u.path.escape(t)},e.convertPathToPattern=function(t){return p(t),u.path.convertPathToPattern(t)},(a=e.posix||(e.posix={})).escapePath=function(t){return p(t),u.path.escapePosixPath(t)},a.convertPathToPattern=function(t){return p(t),u.path.convertPosixPathToPattern(t)},(c=e.win32||(e.win32={})).escapePath=function(t){return p(t),u.path.escapeWindowsPath(t)},c.convertPathToPattern=function(t){return p(t),u.path.convertWindowsPathToPattern(t)}})(c||(c={})),Dn=c}();const Nn=(n,r,o,s)=>{const i=e.resolve(r,n);if(!t.existsSync(i))throw new Error(`[ono-auto-router] Pages directory does not exist: ${i}`);const a=o.split(".")[0],u=(t=>`// Auto-generated by ono-auto-router${t?"\nexport { defineConfig } from './defineConfig'":""}\nexport { routes } from './getRoutes'\n`)(s),c=((t,e)=>`// Auto-generated by ono-auto-router${e?"\nimport type { RouteRecordRaw } from 'vue-router'":""}\nimport { buildRouteTree } from './buildRouteTree'\nimport { cleanIsRoot } from './cleanIsRoot'\nimport { removeEmptyChildren } from './removeEmptyChildren'${e?"\nimport type { MyRouteObject, PageConfig, PagesComponentType } from './types'":""}\nimport { hasDuplicateProperty, replaceBracketsWithColon } from './utils'\n\nconst pathCache = new Map${e?"<string, { compPath: string; basePath: string }>":""}()\nconst basenameCache = new Map${e?"<string, string>":""}()\n\nconst normalizePagePath = ${e?"(key: string): string":"(key)"} => {\n if (key.includes('index.vue')) return key.replace('index.vue', 'index.ts')\n if (key.includes('root.vue')) return key.replace('root.vue', 'root/index.ts')\n if (key.includes('404.vue')) return key.replace('404.vue', '404/index.ts')\n if (key.toLowerCase().includes('notfound.vue'))\n return key.toLowerCase().replace('notfound.vue', 'notfound/index.ts')\n return key\n}\n\nconst getBasename = ${e?"(filePath: string, ext?: string): string":"(filePath)"} => {\n const cacheKey = ext ? filePath + ':' + ext : filePath\n if (basenameCache.has(cacheKey)) {\n return basenameCache.get(cacheKey)!\n }\n const parts = filePath.split('/')\n const lastPart = parts[parts.length - 1] || ''\n let result = lastPart\n if (ext && lastPart.endsWith(ext)) {\n result = lastPart.slice(0, -ext.length)\n }\n basenameCache.set(cacheKey, result)\n return result\n}\n\nconst getDirname = ${e?"(filePath: string): string":"(filePath)"} => {\n const parts = filePath.split('/')\n parts.pop()\n return parts.join('/')\n}\n\nconst getPathsFromConfig = ${e?"(configPath: string)":"(configPath)"} => {\n const cacheKey = configPath\n if (pathCache.has(cacheKey)) {\n return pathCache.get(cacheKey)!\n }\n\n let compPath: string\n let basePath: string\n\n if (configPath.endsWith('.config.ts')) {\n const fileName = getBasename(configPath, '.config.ts')\n const dirPath = getDirname(configPath).replace('/${t}', '')\n\n if (fileName === 'index') {\n compPath = configPath.replace('index.config.ts', 'index.ts')\n basePath = dirPath || '/'\n } else {\n compPath = configPath.slice(0, -10) + '.vue'\n basePath = dirPath ? dirPath + '/' + fileName : '/' + fileName\n }\n } else {\n compPath = configPath.replace('index.config.ts', 'index.ts')\n basePath =\n configPath.replace('/${t}', '').replace('/index.config.ts', '') ||\n '/'\n }\n\n const result = { compPath, basePath }\n pathCache.set(cacheKey, result)\n return result\n}\n\nconst formatPath = ${e?"(path: string): string":"(path)"} => {\n const lowerPath = path.toLowerCase()\n if (lowerPath === '/home') return '/'\n if (lowerPath === '/notfound' || path === '/404') return '/:pathMatch(.*)*'\n return path.replace('/index.ts', '') || '/'\n}\n\nconst getConfigFileName = ${e?"(pagePath: string): string":"(pagePath)"} => {\n if (pagePath.endsWith('.vue')) {\n return pagePath.slice(0, -4) + '.config.ts'\n }\n return pagePath.replace('index.ts', 'index.config.ts')\n}\n\nconst createBaseRoutes = ()${e?": MyRouteObject[]":""} => {\n const pagesComponent = Object.fromEntries(\n Object.entries({\n ...import.meta.glob('/${t}/**/index.vue'),\n ...import.meta.glob('/${t}/*.vue')\n }${e?" as PagesComponentType":""}).map(([key, value]) => [\n normalizePagePath(key),\n value\n ])\n )\n\n const pagesModule${e?": Record<string, PageConfig>":""} = import.meta.glob(\n '/${t}/**/*.config.ts',\n { eager: true, import: 'default' }\n )\n\n const result${e?": MyRouteObject[]":""} = []\n\n for (const pagePath of Object.keys(pagesComponent)) {\n const configPath = getConfigFileName(pagePath)\n const content = pagesModule[configPath] || {}\n const { compPath, basePath } = getPathsFromConfig(configPath)\n const path = replaceBracketsWithColon(content?.path || basePath || '/')\n const name = path.split('/').filter(Boolean).join('-') || 'index'\n\n result.push({\n path: formatPath(path),\n name,\n component: pagesComponent[compPath],\n isRoot: path === '/root',\n ...content!\n })\n }\n\n return result\n}\n\nconst processRoutes = ${e?"(\n routes: MyRouteObject[],\n removeLeadingSlash = false\n): MyRouteObject[]":"(routes, removeLeadingSlash)"} =>\n buildRouteTree(routes, removeLeadingSlash)\n .map(removeEmptyChildren)\n .map(cleanIsRoot)\n\nconst handleRootRoute = (\n routes${e?": (MyRouteObject & { isRoot?: boolean })[]":""}\n): MyRouteObject[] => {\n let rootRoute${e?": (MyRouteObject & { isRoot?: boolean }) | undefined":" = undefined"}\n let homeRoute${e?": MyRouteObject | undefined":" = undefined"}\n let notFoundRoute${e?": MyRouteObject | undefined":" = undefined"}\n const filteredRoutes${e?": (MyRouteObject & { isRoot?: boolean })[]":""} = []\n\n for (const route of routes) {\n if (route.isRoot) {\n if (rootRoute)\n throw new Error('There cannot be multiple root routes in a route')\n rootRoute = route\n } else if (route.path === '/') {\n homeRoute = route\n } else if (route.path === '/:pathMatch(.*)*') {\n notFoundRoute = route\n } else {\n filteredRoutes.push(route)\n }\n }\n\n if (hasDuplicateProperty(filteredRoutes, 'path'))\n throw new Error('There cannot be duplicate paths in a route')\n\n const processedRoutes${e?": (MyRouteObject & { isRoot?: boolean })[]":""} = []\n\n if (rootRoute) {\n const children = [\n homeRoute && { ...homeRoute, path: '' },\n ...processRoutes(filteredRoutes, true)\n ].filter(Boolean)${e?" as MyRouteObject[]":""}\n processedRoutes.push({ ...rootRoute, path: '/', children })\n }\n\n if (notFoundRoute) processedRoutes.push(notFoundRoute)\n\n return processedRoutes.map(cleanIsRoot)\n}\n\nexport const createRoutes = ()${e?": RouteRecordRaw[]":""} => {\n const routes = createBaseRoutes()\n\n if (routes.some((r${e?": MyRouteObject & { isRoot?: boolean }":""}) => r.isRoot))\n return handleRootRoute(routes)${e?" as RouteRecordRaw[]":""}\n\n if (hasDuplicateProperty(routes, 'path'))\n throw new Error('There cannot be duplicate paths in a route')\n\n return processRoutes(routes)${e?" as RouteRecordRaw[]":""}\n}\n`)(n,s),l=(t=>`// Auto-generated by ono-auto-router${t?"\nimport type { MyRouteObject } from './types'\n":""}\nexport const buildRouteTree = ${t?"(\n routes: MyRouteObject[],\n removeLeadingSlash: boolean = false\n)":"(routes, removeLeadingSlash)"} => {\n const routeMap = new Map<string, MyRouteObject & { isRoot?: boolean }>()\n const rootRoutes${t?": MyRouteObject[]":""} = []\n\n const sortedRoutes = [...routes].sort((a, b) => a.path.length - b.path.length)\n\n for (const route of sortedRoutes) {\n let path = route.path\n if (removeLeadingSlash && path.startsWith('/')) {\n path = path.slice(1)\n }\n routeMap.set(path, { ...route, path, children: [] })\n }\n\n for (const [path, route] of routeMap) {\n const slashIndex = path.lastIndexOf('/')\n\n if (slashIndex <= 0) {\n const { isRoot, ...rest } = route\n rootRoutes.push(rest)\n continue\n }\n\n const parentPath = path.slice(0, slashIndex)\n const parentRoute = routeMap.get(parentPath)\n\n if (parentRoute) {\n const relativePath = path.slice(slashIndex + 1)\n const childRoute = { ...route, path: relativePath }\n parentRoute.children!.push(childRoute)\n } else {\n const { isRoot, ...rest } = route\n rootRoutes.push(rest)\n }\n }\n\n return rootRoutes\n}\n`)(s),p=(t=>`// Auto-generated by ono-auto-router${t?"\nimport type { MyRouteObject } from './types'\n":""}\nexport const cleanIsRoot = ${t?"(\n route: MyRouteObject & { isRoot?: boolean }\n): MyRouteObject":"(route)"} => {\n const { isRoot, type, children, ...rest } = route\n const result${t?": MyRouteObject":""} = { ...rest }\n\n if (children?.length) {\n result.children = children.map(cleanIsRoot)\n }\n\n return result\n}\n`)(s),h=(t=>`// Auto-generated by ono-auto-router${t?"\nimport type { MyRouteObject } from './types'\n":""}\nexport const removeEmptyChildren = ${t?"(route: MyRouteObject): MyRouteObject":"(route)"} => {\n if (!route.children?.length) {\n const { children, ...rest } = route\n return rest\n }\n\n const hasIndexRoute = route.children.some(\n child => child.path === '' || child.path === '/'\n )\n\n const routeType = route.type || 'single'\n\n if (routeType === 'wrap') {\n const { children, ...rest } = route\n return { ...rest, children: children.map(removeEmptyChildren) }\n }\n\n if (routeType === 'single' || (!hasIndexRoute && route.component)) {\n const { path, component, type, ...rest } = route\n return {\n path,\n children: [\n { path: '', component, ...rest } as MyRouteObject,\n ...route.children.map(removeEmptyChildren)\n ]\n }\n }\n\n if (hasIndexRoute) {\n const { path, ...rest } = route\n const updatedChildren = route.children.map(child =>\n child.path === '' || child.path === '/' ? { ...rest, ...child } : child\n )\n return { path, children: updatedChildren.map(removeEmptyChildren) }\n }\n\n return { ...route, children: route.children.map(removeEmptyChildren) }\n}\n`)(s),f=s?"// Auto-generated by ono-auto-router\nimport type { PageConfig } from './types'\n\nexport const defineConfig = (config: PageConfig) => config\n":"",d=s?"// Auto-generated by ono-auto-router\nimport type { RouteRecordRaw } from 'vue-router'\n\nexport type PagesComponentType = Record<string, () => Promise<unknown>>\n\nexport interface MyRouteObject extends Omit<RouteRecordRaw, 'children'> {\n type?: 'single' | 'wrap'\n isRoot?: boolean\n children?: MyRouteObject[]\n}\n\nexport type PageConfig = Partial<Omit<MyRouteObject, 'component' | 'children' | 'isRoot'>>\n":"",g=(t=>`// Auto-generated by ono-auto-router\nconst hasDuplicateProperty = ${t?"<T>(items: T[], propName: keyof T)":"(items, propName)"} => {\n const seenValues = new Set()\n return items.some(item => {\n if (seenValues.has(item[propName])) {\n return true\n }\n seenValues.add(item[propName])\n return false\n })\n}\n\nconst replaceBracketsWithColon = ${t?"(str: string)":"(str)"} => {\n return str.replace(/\\[([^\\]]+)\\]/g, ':$1').replace('.tsx', '')\n}\n\nexport { hasDuplicateProperty, replaceBracketsWithColon }\n`)(s);Gn(e.resolve(a,"./index.ts"),u),Gn(e.resolve(a,"./createRoutes.tsx"),c),Gn(e.resolve(a,"./buildRouteTree.ts"),l),Gn(e.resolve(a,"./cleanIsRoot.ts"),p),Gn(e.resolve(a,"./removeEmptyChildren.ts"),h),f&&Gn(e.resolve(a,"./defineConfig.ts"),f),d&&Gn(e.resolve(a,"./types.ts"),d),Gn(e.resolve(a,"./getRoutes.ts"),"// Auto-generated by ono-auto-router\nimport { createRoutes } from './createRoutes'\n\nexport const routes = createRoutes()\n"),Gn(e.resolve(a,"./utils.ts"),g)},jn=e=>{try{if(!t.existsSync(e))return;t.unlinkSync(e)}catch(t){console.error("删除文件失败:",t)}},Bn=(e,n,r,o,s,i)=>{const a=u(r),c=o.split(".")[0];jn(c+".js"),jn(c+".ts"),jn(c+".jsx"),jn(c+".tsx"),(e=>{try{if(!t.existsSync(e))return;t.rmSync(e,{recursive:!0})}catch(t){console.error("删除目录失败:",t)}})(c),Nn(n,r,o,a)};async function Gn(n,r){const o=e.dirname(n);await t.promises.mkdir(o,{recursive:!0}),await t.promises.writeFile(n,r,"utf-8")}function Un(n){const{pagesDir:r="src/pages",routesFile:o,lazy:s=!0,hmr:i=!1}=n||{};let a,l;return{name:"ono-vite-plugin-auto-router-vue",configResolved:async n=>{a=n,l=a.root;const s=e.resolve(l,r);if(!t.existsSync(s))throw new Error(`Pages directory not found: ${s}`);const i=((t,n,r)=>{let o=r;return o||(o=e.resolve(n,c[t][u(n)?"ts":"js"])),o})("vue",l,o);Bn(0,r,l,i),console.log(`[ono-auto-router] Routes file generated: ${i}`)}}}export{Un as default};
1
+ import t from"node:fs";import e from"node:path";import n from"os";import r from"path";import o from"util";import s from"stream";import i from"events";import a from"fs";const u=n=>t.existsSync(e.resolve(n,"tsconfig.json")),c={react:{ts:"src/router/autoRouter.tsx",js:"src/router/autoRouter.jsx"},vue:{ts:"src/router/autoRouter.ts",js:"src/router/autoRouter.js"}};var l,p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},h={},f={},d={};function g(){if(l)return d;return l=1,Object.defineProperty(d,"__esModule",{value:!0}),d.splitWhen=d.flatten=void 0,d.flatten=function(t){return t.reduce((t,e)=>[].concat(t,e),[])},d.splitWhen=function(t,e){const n=[[]];let r=0;for(const o of t)e(o)?(r++,n[r]=[]):n[r].push(o);return n},d}var _,y={};function m(){if(_)return y;return _=1,Object.defineProperty(y,"__esModule",{value:!0}),y.isEnoentCodeError=void 0,y.isEnoentCodeError=function(t){return"ENOENT"===t.code},y}var R,v={};var b,S={};function E(){if(b)return S;b=1,Object.defineProperty(S,"__esModule",{value:!0}),S.convertPosixPathToPattern=S.convertWindowsPathToPattern=S.convertPathToPattern=S.escapePosixPath=S.escapeWindowsPath=S.escape=S.removeLeadingDotSegment=S.makeAbsolute=S.unixify=void 0;const t=r,e="win32"===n.platform(),o=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,s=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,i=/^\\\\([.?])/,a=/\\(?![!()+@[\]{}])/g;function u(t){return t.replace(s,"\\$2")}function c(t){return t.replace(o,"\\$2")}function l(t){return u(t).replace(i,"//$1").replace(a,"/")}function p(t){return c(t)}return S.unixify=function(t){return t.replace(/\\/g,"/")},S.makeAbsolute=function(e,n){return t.resolve(e,n)},S.removeLeadingDotSegment=function(t){if("."===t.charAt(0)){const e=t.charAt(1);if("/"===e||"\\"===e)return t.slice(2)}return t},S.escape=e?u:c,S.escapeWindowsPath=u,S.escapePosixPath=c,S.convertPathToPattern=e?l:p,S.convertWindowsPathToPattern=l,S.convertPosixPathToPattern=p,S}var A,P,x,C,O,T,w={};function k(){return P?A:(P=1,A=function(t){if("string"!=typeof t||""===t)return!1;for(var e;e=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(e[2])return!0;t=t.slice(e.index+e[0].length)}return!1})}function $(){if(C)return x;C=1;var t=k(),e={"{":"}","(":")","[":"]"},n=function(t){if("!"===t[0])return!0;for(var n=0,r=-2,o=-2,s=-2,i=-2,a=-2;n<t.length;){if("*"===t[n])return!0;if("?"===t[n+1]&&/[\].+)]/.test(t[n]))return!0;if(-1!==o&&"["===t[n]&&"]"!==t[n+1]&&(o<n&&(o=t.indexOf("]",n)),o>n)){if(-1===a||a>o)return!0;if(-1===(a=t.indexOf("\\",n))||a>o)return!0}if(-1!==s&&"{"===t[n]&&"}"!==t[n+1]&&(s=t.indexOf("}",n))>n&&(-1===(a=t.indexOf("\\",n))||a>s))return!0;if(-1!==i&&"("===t[n]&&"?"===t[n+1]&&/[:!=]/.test(t[n+2])&&")"!==t[n+3]&&(i=t.indexOf(")",n))>n&&(-1===(a=t.indexOf("\\",n))||a>i))return!0;if(-1!==r&&"("===t[n]&&"|"!==t[n+1]&&(r<n&&(r=t.indexOf("|",n)),-1!==r&&")"!==t[r+1]&&(i=t.indexOf(")",r))>r&&(-1===(a=t.indexOf("\\",r))||a>i)))return!0;if("\\"===t[n]){var u=t[n+1];n+=2;var c=e[u];if(c){var l=t.indexOf(c,n);-1!==l&&(n=l+1)}if("!"===t[n])return!0}else n++}return!1},r=function(t){if("!"===t[0])return!0;for(var n=0;n<t.length;){if(/[*?{}()[\]]/.test(t[n]))return!0;if("\\"===t[n]){var r=t[n+1];n+=2;var o=e[r];if(o){var s=t.indexOf(o,n);-1!==s&&(n=s+1)}if("!"===t[n])return!0}else n++}return!1};return x=function(e,o){if("string"!=typeof e||""===e)return!1;if(t(e))return!0;var s=n;return o&&!1===o.strict&&(s=r),s(e)}}function L(){if(T)return O;T=1;var t=$(),e=r.posix.dirname,o="win32"===n.platform(),s=/\\/g,i=/[\{\[].*[\}\]]$/,a=/(^|[^\\])([\{\[]|\([^\)]+$)/,u=/\\([\!\*\?\|\[\]\(\)\{\}])/g;return O=function(n,r){Object.assign({flipBackslashes:!0},r).flipBackslashes&&o&&n.indexOf("/")<0&&(n=n.replace(s,"/")),i.test(n)&&(n+="/"),n+="a";do{n=e(n)}while(t(n)||a.test(n));return n.replace(u,"$1")}}var M,H,D,j,F,I,N,B,G,U,W,K,V,Q,q,Y,X,Z,z,J={};function tt(){return M||(M=1,(t=J).isInteger=t=>"number"==typeof t?Number.isInteger(t):"string"==typeof t&&""!==t.trim()&&Number.isInteger(Number(t)),t.find=(t,e)=>t.nodes.find(t=>t.type===e),t.exceedsLimit=(e,n,r=1,o)=>!1!==o&&!(!t.isInteger(e)||!t.isInteger(n))&&(Number(n)-Number(e))/Number(r)>=o,t.escapeNode=(t,e=0,n)=>{const r=t.nodes[e];r&&(n&&r.type===n||"open"===r.type||"close"===r.type)&&!0!==r.escaped&&(r.value="\\"+r.value,r.escaped=!0)},t.encloseBrace=t=>!("brace"!==t.type||t.commas>>0+t.ranges|0||(t.invalid=!0,0)),t.isInvalidBrace=t=>!("brace"!==t.type||!0!==t.invalid&&!t.dollar&&(t.commas>>0+t.ranges|0&&!0===t.open&&!0===t.close||(t.invalid=!0,0))),t.isOpenOrClose=t=>"open"===t.type||"close"===t.type||!0===t.open||!0===t.close,t.reduce=t=>t.reduce((t,e)=>("text"===e.type&&t.push(e.value),"range"===e.type&&(e.type="text"),t),[]),t.flatten=(...t)=>{const e=[],n=t=>{for(let r=0;r<t.length;r++){const o=t[r];Array.isArray(o)?n(o):void 0!==o&&e.push(o)}return e};return n(t),e}),J;var t}function et(){if(D)return H;D=1;const t=tt();return H=(e,n={})=>{const r=(e,o={})=>{const s=n.escapeInvalid&&t.isInvalidBrace(o),i=!0===e.invalid&&!0===n.escapeInvalid;let a="";if(e.value)return(s||i)&&t.isOpenOrClose(e)?"\\"+e.value:e.value;if(e.value)return e.value;if(e.nodes)for(const t of e.nodes)a+=r(t);return a};return r(e)}}function nt(){return F?j:(F=1,j=function(t){return"number"==typeof t?t-t===0:"string"==typeof t&&""!==t.trim()&&(Number.isFinite?Number.isFinite(+t):isFinite(+t))})}function rt(){if(N)return I;N=1;const t=nt(),e=(n,s,i)=>{if(!1===t(n))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===s||n===s)return String(n);if(!1===t(s))throw new TypeError("toRegexRange: expected the second argument to be a number.");let a={relaxZeros:!0,...i};"boolean"==typeof a.strictZeros&&(a.relaxZeros=!1===a.strictZeros);let u=n+":"+s+"="+String(a.relaxZeros)+String(a.shorthand)+String(a.capture)+String(a.wrap);if(e.cache.hasOwnProperty(u))return e.cache[u].result;let c=Math.min(n,s),l=Math.max(n,s);if(1===Math.abs(c-l)){let t=n+"|"+s;return a.capture?`(${t})`:!1===a.wrap?t:`(?:${t})`}let h=p(n)||p(s),f={min:n,max:s,a:c,b:l},d=[],g=[];if(h&&(f.isPadded=h,f.maxLen=String(f.max).length),c<0){g=r(l<0?Math.abs(l):1,Math.abs(c),f,a),c=f.a=0}return l>=0&&(d=r(c,l,f,a)),f.negatives=g,f.positives=d,f.result=function(t,e){let n=o(t,e,"-",!1)||[],r=o(e,t,"",!1)||[],s=o(t,e,"-?",!0)||[];return n.concat(s).concat(r).join("|")}(g,d),!0===a.capture?f.result=`(${f.result})`:!1!==a.wrap&&d.length+g.length>1&&(f.result=`(?:${f.result})`),e.cache[u]=f,f.result};function n(t,e,n){if(t===e)return{pattern:t,count:[],digits:0};let r=function(t,e){let n=[];for(let r=0;r<t.length;r++)n.push([t[r],e[r]]);return n}(t,e),o=r.length,s="",i=0;for(let t=0;t<o;t++){let[e,n]=r[t];e===n?s+=e:"0"!==e||"9"!==n?s+=l(e,n):i++}return i&&(s+=!0===n.shorthand?"\\d":"[0-9]"),{pattern:s,count:[i],digits:o}}function r(t,e,r,o){let i,l=function(t,e){let n=1,r=1,o=a(t,n),i=new Set([e]);for(;t<=o&&o<=e;)i.add(o),n+=1,o=a(t,n);for(o=u(e+1,r)-1;t<o&&o<=e;)i.add(o),r+=1,o=u(e+1,r)-1;return i=[...i],i.sort(s),i}(t,e),p=[],f=t;for(let t=0;t<l.length;t++){let e=l[t],s=n(String(f),String(e),o),a="";r.isPadded||!i||i.pattern!==s.pattern?(r.isPadded&&(a=h(e,r,o)),s.string=a+s.pattern+c(s.count),p.push(s),f=e+1,i=s):(i.count.length>1&&i.count.pop(),i.count.push(s.count[0]),i.string=i.pattern+c(i.count),f=e+1)}return p}function o(t,e,n,r,o){let s=[];for(let o of t){let{string:t}=o;r||i(e,"string",t)||s.push(n+t),r&&i(e,"string",t)&&s.push(n+t)}return s}function s(t,e){return t>e?1:e>t?-1:0}function i(t,e,n){return t.some(t=>t[e]===n)}function a(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function u(t,e){return t-t%Math.pow(10,e)}function c(t){let[e=0,n=""]=t;return n||e>1?`{${e+(n?","+n:"")}}`:""}function l(t,e,n){return`[${t}${e-t===1?"":"-"}${e}]`}function p(t){return/^-?(0+)\d/.test(t)}function h(t,e,n){if(!e.isPadded)return t;let r=Math.abs(e.maxLen-String(t).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}}`}}return e.cache={},e.clearCache=()=>e.cache={},I=e}function ot(){if(G)return B;G=1;const t=o,e=rt(),n=t=>null!==t&&"object"==typeof t&&!Array.isArray(t),r=t=>"number"==typeof t||"string"==typeof t&&""!==t,s=t=>Number.isInteger(+t),i=t=>{let e=`${t}`,n=-1;if("-"===e[0]&&(e=e.slice(1)),"0"===e)return!1;for(;"0"===e[++n];);return n>0},a=(t,e,n)=>{if(e>0){let n="-"===t[0]?"-":"";n&&(t=t.slice(1)),t=n+t.padStart(n?e-1:e,"0")}return!1===n?String(t):t},u=(t,e)=>{let n="-"===t[0]?"-":"";for(n&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return n?"-"+t:t},c=(t,n,r,o)=>{if(r)return e(t,n,{wrap:!1,...o});let s=String.fromCharCode(t);return t===n?s:`[${s}-${String.fromCharCode(n)}]`},l=(t,n,r)=>{if(Array.isArray(t)){let e=!0===r.wrap,n=r.capture?"":"?:";return e?`(${n}${t.join("|")})`:t.join("|")}return e(t,n,r)},p=(...e)=>new RangeError("Invalid range arguments: "+t.inspect(...e)),h=(t,e,n)=>{if(!0===n.strictRanges)throw p([t,e]);return[]},f=(t,e,n=1,r={})=>{let o=Number(t),s=Number(e);if(!Number.isInteger(o)||!Number.isInteger(s)){if(!0===r.strictRanges)throw p([t,e]);return[]}0===o&&(o=0),0===s&&(s=0);let h=o>s,f=String(t),d=String(e),g=String(n);n=Math.max(Math.abs(n),1);let _=i(f)||i(d)||i(g),y=_?Math.max(f.length,d.length,g.length):0,m=!1===_&&!1===((t,e,n)=>"string"==typeof t||"string"==typeof e||!0===n.stringify)(t,e,r),R=r.transform||(t=>e=>!0===t?Number(e):String(e))(m);if(r.toRegex&&1===n)return c(u(t,y),u(e,y),!0,r);let v={negatives:[],positives:[]},b=t=>v[t<0?"negatives":"positives"].push(Math.abs(t)),S=[],E=0;for(;h?o>=s:o<=s;)!0===r.toRegex&&n>1?b(o):S.push(a(R(o,E),y,m)),o=h?o-n:o+n,E++;return!0===r.toRegex?n>1?((t,e,n)=>{t.negatives.sort((t,e)=>t<e?-1:t>e?1:0),t.positives.sort((t,e)=>t<e?-1:t>e?1:0);let r,o=e.capture?"":"?:",s="",i="";return t.positives.length&&(s=t.positives.map(t=>u(String(t),n)).join("|")),t.negatives.length&&(i=`-(${o}${t.negatives.map(t=>u(String(t),n)).join("|")})`),r=s&&i?`${s}|${i}`:s||i,e.wrap?`(${o}${r})`:r})(v,r,y):l(S,null,{wrap:!1,...r}):S},d=(t,e,o,i={})=>{if(null==e&&r(t))return[t];if(!r(t)||!r(e))return h(t,e,i);if("function"==typeof o)return d(t,e,1,{transform:o});if(n(o))return d(t,e,0,o);let a={...i};return!0===a.capture&&(a.wrap=!0),o=o||a.step||1,s(o)?s(t)&&s(e)?f(t,e,o,a):((t,e,n=1,r={})=>{if(!s(t)&&t.length>1||!s(e)&&e.length>1)return h(t,e,r);let o=r.transform||(t=>String.fromCharCode(t)),i=`${t}`.charCodeAt(0),a=`${e}`.charCodeAt(0),u=i>a,p=Math.min(i,a),f=Math.max(i,a);if(r.toRegex&&1===n)return c(p,f,!1,r);let d=[],g=0;for(;u?i>=a:i<=a;)d.push(o(i,g)),i=u?i-n:i+n,g++;return!0===r.toRegex?l(d,null,{wrap:!1,options:r}):d})(t,e,Math.max(Math.abs(o),1),a):null==o||n(o)?d(t,e,1,o):((t,e)=>{if(!0===e.strictRanges)throw new TypeError(`Expected step "${t}" to be a number`);return[]})(o,a)};return B=d}function st(){if(X)return Y;X=1;const t=et(),{MAX_LENGTH:e,CHAR_BACKSLASH:n,CHAR_BACKTICK:r,CHAR_COMMA:o,CHAR_DOT:s,CHAR_LEFT_PARENTHESES:i,CHAR_RIGHT_PARENTHESES:a,CHAR_LEFT_CURLY_BRACE:u,CHAR_RIGHT_CURLY_BRACE:c,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_RIGHT_SQUARE_BRACKET:p,CHAR_DOUBLE_QUOTE:h,CHAR_SINGLE_QUOTE:f,CHAR_NO_BREAK_SPACE:d,CHAR_ZERO_WIDTH_NOBREAK_SPACE:g}=q?Q:(q=1,Q={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"});return Y=(_,y={})=>{if("string"!=typeof _)throw new TypeError("Expected a string");const m=y||{},R="number"==typeof m.maxLength?Math.min(e,m.maxLength):e;if(_.length>R)throw new SyntaxError(`Input length (${_.length}), exceeds max characters (${R})`);const v={type:"root",input:_,nodes:[]},b=[v];let S=v,E=v,A=0;const P=_.length;let x,C=0,O=0;const T=()=>_[C++],w=t=>{if("text"===t.type&&"dot"===E.type&&(E.type="text"),!E||"text"!==E.type||"text"!==t.type)return S.nodes.push(t),t.parent=S,t.prev=E,E=t,t;E.value+=t.value};for(w({type:"bos"});C<P;)if(S=b[b.length-1],x=T(),x!==g&&x!==d)if(x!==n)if(x!==p){if(x===l){let t;for(A++;C<P&&(t=T());)if(x+=t,t!==l)if(t!==n){if(t===p&&(A--,0===A))break}else x+=T();else A++;w({type:"text",value:x});continue}if(x!==i)if(x!==a){if(x===h||x===f||x===r){const t=x;let e;for(!0!==y.keepQuotes&&(x="");C<P&&(e=T());)if(e!==n){if(e===t){!0===y.keepQuotes&&(x+=e);break}x+=e}else x+=e+T();w({type:"text",value:x});continue}if(x===u){O++;const t=E.value&&"$"===E.value.slice(-1)||!0===S.dollar;S=w({type:"brace",open:!0,close:!1,dollar:t,depth:O,commas:0,ranges:0,nodes:[]}),b.push(S),w({type:"open",value:x});continue}if(x===c){if("brace"!==S.type){w({type:"text",value:x});continue}const t="close";S=b.pop(),S.close=!0,w({type:t,value:x}),O--,S=b[b.length-1];continue}if(x===o&&O>0){if(S.ranges>0){S.ranges=0;const e=S.nodes.shift();S.nodes=[e,{type:"text",value:t(S)}]}w({type:"comma",value:x}),S.commas++}else{if(x===s&&O>0&&0===S.commas){const t=S.nodes;if(0===O||0===t.length){w({type:"text",value:x});continue}if("dot"===E.type){if(S.range=[],E.value+=x,E.type="range",3!==S.nodes.length&&5!==S.nodes.length){S.invalid=!0,S.ranges=0,E.type="text";continue}S.ranges++,S.args=[];continue}if("range"===E.type){t.pop();const e=t[t.length-1];e.value+=E.value+x,E=e,S.ranges--;continue}w({type:"dot",value:x});continue}w({type:"text",value:x})}}else{if("paren"!==S.type){w({type:"text",value:x});continue}S=b.pop(),w({type:"text",value:x}),S=b[b.length-1]}else S=w({type:"paren",nodes:[]}),b.push(S),w({type:"text",value:x})}else w({type:"text",value:"\\"+x});else w({type:"text",value:(y.keepEscaping?x:"")+T()});do{if(S=b.pop(),"root"!==S.type){S.nodes.forEach(t=>{t.nodes||("open"===t.type&&(t.isOpen=!0),"close"===t.type&&(t.isClose=!0),t.nodes||(t.type="text"),t.invalid=!0)});const t=b[b.length-1],e=t.nodes.indexOf(S);t.nodes.splice(e,1,...S.nodes)}}while(b.length>0);return w({type:"eos"}),v}}function it(){if(z)return Z;z=1;const t=et(),e=function(){if(W)return U;W=1;const t=ot(),e=tt();return U=(n,r={})=>{const o=(n,s={})=>{const i=e.isInvalidBrace(s),a=!0===n.invalid&&!0===r.escapeInvalid,u=!0===i||!0===a,c=!0===r.escapeInvalid?"\\":"";let l="";if(!0===n.isOpen)return c+n.value;if(!0===n.isClose)return console.log("node.isClose",c,n.value),c+n.value;if("open"===n.type)return u?c+n.value:"(";if("close"===n.type)return u?c+n.value:")";if("comma"===n.type)return"comma"===n.prev.type?"":u?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){const o=e.reduce(n.nodes),s=t(...o,{...r,wrap:!1,toRegex:!0,strictZeros:!0});if(0!==s.length)return o.length>1&&s.length>1?`(${s})`:s}if(n.nodes)for(const t of n.nodes)l+=o(t,n);return l};return o(n)}}(),n=function(){if(V)return K;V=1;const t=ot(),e=et(),n=tt(),r=(t="",e="",o=!1)=>{const s=[];if(t=[].concat(t),!(e=[].concat(e)).length)return t;if(!t.length)return o?n.flatten(e).map(t=>`{${t}}`):e;for(const n of t)if(Array.isArray(n))for(const t of n)s.push(r(t,e,o));else for(let t of e)!0===o&&"string"==typeof t&&(t=`{${t}}`),s.push(Array.isArray(t)?r(n,t,o):n+t);return n.flatten(s)};return K=(o,s={})=>{const i=void 0===s.rangeLimit?1e3:s.rangeLimit,a=(o,u={})=>{o.queue=[];let c=u,l=u.queue;for(;"brace"!==c.type&&"root"!==c.type&&c.parent;)c=c.parent,l=c.queue;if(o.invalid||o.dollar)return void l.push(r(l.pop(),e(o,s)));if("brace"===o.type&&!0!==o.invalid&&2===o.nodes.length)return void l.push(r(l.pop(),["{}"]));if(o.nodes&&o.ranges>0){const a=n.reduce(o.nodes);if(n.exceedsLimit(...a,s.step,i))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let u=t(...a,s);return 0===u.length&&(u=e(o,s)),l.push(r(l.pop(),u)),void(o.nodes=[])}const p=n.encloseBrace(o);let h=o.queue,f=o;for(;"brace"!==f.type&&"root"!==f.type&&f.parent;)f=f.parent,h=f.queue;for(let t=0;t<o.nodes.length;t++){const e=o.nodes[t];"comma"!==e.type||"brace"!==o.type?"close"!==e.type?e.value&&"open"!==e.type?h.push(r(h.pop(),e.value)):e.nodes&&a(e,o):l.push(r(l.pop(),h,p)):(1===t&&h.push(""),h.push(""))}return h};return n.flatten(a(o))},K}(),r=st(),o=(t,e={})=>{let n=[];if(Array.isArray(t))for(const r of t){const t=o.create(r,e);Array.isArray(t)?n.push(...t):n.push(t)}else n=[].concat(o.create(t,e));return e&&!0===e.expand&&!0===e.nodupes&&(n=[...new Set(n)]),n};return o.parse=(t,e={})=>r(t,e),o.stringify=(e,n={})=>t("string"==typeof e?o.parse(e,n):e,n),o.compile=(t,n={})=>("string"==typeof t&&(t=o.parse(t,n)),e(t,n)),o.expand=(t,e={})=>{"string"==typeof t&&(t=o.parse(t,e));let r=n(t,e);return!0===e.noempty&&(r=r.filter(Boolean)),!0===e.nodupes&&(r=[...new Set(r)]),r},o.create=(t,e={})=>""===t||t.length<3?[t]:!0!==e.expand?o.compile(t,e):o.expand(t,e),Z=o}var at,ut,ct,lt,pt,ht,ft,dt,gt,_t,yt,mt,Rt,vt,bt={};function St(){if(ut)return at;ut=1;const t=r,e="\\\\/",n=`[^${e}]`,o="\\.",s="\\/",i="[^/]",a=`(?:${s}|$)`,u=`(?:^|${s})`,c=`${o}{1,2}${a}`,l={DOT_LITERAL:o,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:s,ONE_CHAR:"(?=.)",QMARK:i,END_ANCHOR:a,DOTS_SLASH:c,NO_DOT:`(?!${o})`,NO_DOTS:`(?!${u}${c})`,NO_DOT_SLASH:`(?!${o}{0,1}${a})`,NO_DOTS_SLASH:`(?!${c})`,QMARK_NO_DOT:`[^.${s}]`,STAR:`${i}*?`,START_ANCHOR:u},p={...l,SLASH_LITERAL:`[${e}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${o}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[${e}])${o}{1,2}(?:[${e}]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`};return at={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:t.sep,extglobChars:t=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:t=>!0===t?p:l}}function Et(){return ct||(ct=1,function(t){const e=r,n="win32"===process.platform,{REGEX_BACKSLASH:o,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:a}=St();t.isObject=t=>null!==t&&"object"==typeof t&&!Array.isArray(t),t.hasRegexChars=t=>i.test(t),t.isRegexChar=e=>1===e.length&&t.hasRegexChars(e),t.escapeRegex=t=>t.replace(a,"\\$1"),t.toPosixSlashes=t=>t.replace(o,"/"),t.removeBackslashes=t=>t.replace(s,t=>"\\"===t?"":t),t.supportsLookbehinds=()=>{const t=process.version.slice(1).split(".").map(Number);return 3===t.length&&t[0]>=9||8===t[0]&&t[1]>=10},t.isWindows=t=>t&&"boolean"==typeof t.windows?t.windows:!0===n||"\\"===e.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=(t,e={})=>{let n=t;return n.startsWith("./")&&(n=n.slice(2),e.prefix="./"),n},t.wrapOutput=(t,e={},n={})=>{let r=`${n.contains?"":"^"}(?:${t})${n.contains?"":"$"}`;return!0===e.negated&&(r=`(?:^(?!${r}).*$)`),r}}(bt)),bt}function At(){if(gt)return dt;gt=1;const t=r,e=function(){if(pt)return lt;pt=1;const t=Et(),{CHAR_ASTERISK:e,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:o,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:i,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:c,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:p,CHAR_QUESTION_MARK:h,CHAR_RIGHT_CURLY_BRACE:f,CHAR_RIGHT_PARENTHESES:d,CHAR_RIGHT_SQUARE_BRACKET:g}=St(),_=t=>t===a||t===r,y=t=>{!0!==t.isPrefix&&(t.depth=t.isGlobstar?1/0:1)};return lt=(m,R)=>{const v=R||{},b=m.length-1,S=!0===v.parts||!0===v.scanToEnd,E=[],A=[],P=[];let x,C,O=m,T=-1,w=0,k=0,$=!1,L=!1,M=!1,H=!1,D=!1,j=!1,F=!1,I=!1,N=!1,B=!1,G=0,U={value:"",depth:0,isGlob:!1};const W=()=>T>=b,K=()=>O.charCodeAt(T+1),V=()=>(x=C,O.charCodeAt(++T));for(;T<b;){let t;if(C=V(),C!==r){if(!0===j||C===u){for(G++;!0!==W()&&(C=V());)if(C!==r)if(C!==u){if(!0!==j&&C===s&&(C=V())===s){if($=U.isBrace=!0,M=U.isGlob=!0,B=!0,!0===S)continue;break}if(!0!==j&&C===o){if($=U.isBrace=!0,M=U.isGlob=!0,B=!0,!0===S)continue;break}if(C===f&&(G--,0===G)){j=!1,$=U.isBrace=!0,B=!0;break}}else G++;else F=U.backslashes=!0,V();if(!0===S)continue;break}if(C!==a){if(!0!==v.noext&&!0==(C===p||C===n||C===e||C===h||C===i)&&K()===c){if(M=U.isGlob=!0,H=U.isExtglob=!0,B=!0,C===i&&T===w&&(N=!0),!0===S){for(;!0!==W()&&(C=V());)if(C!==r){if(C===d){M=U.isGlob=!0,B=!0;break}}else F=U.backslashes=!0,C=V();continue}break}if(C===e){if(x===e&&(D=U.isGlobstar=!0),M=U.isGlob=!0,B=!0,!0===S)continue;break}if(C===h){if(M=U.isGlob=!0,B=!0,!0===S)continue;break}if(C===l){for(;!0!==W()&&(t=V());)if(t!==r){if(t===g){L=U.isBracket=!0,M=U.isGlob=!0,B=!0;break}}else F=U.backslashes=!0,V();if(!0===S)continue;break}if(!0===v.nonegate||C!==i||T!==w){if(!0!==v.noparen&&C===c){if(M=U.isGlob=!0,!0===S){for(;!0!==W()&&(C=V());)if(C!==c){if(C===d){B=!0;break}}else F=U.backslashes=!0,C=V();continue}break}if(!0===M){if(B=!0,!0===S)continue;break}}else I=U.negated=!0,w++}else{if(E.push(T),A.push(U),U={value:"",depth:0,isGlob:!1},!0===B)continue;if(x===s&&T===w+1){w+=2;continue}k=T+1}}else F=U.backslashes=!0,C=V(),C===u&&(j=!0)}!0===v.noext&&(H=!1,M=!1);let Q=O,q="",Y="";w>0&&(q=O.slice(0,w),O=O.slice(w),k-=w),Q&&!0===M&&k>0?(Q=O.slice(0,k),Y=O.slice(k)):!0===M?(Q="",Y=O):Q=O,Q&&""!==Q&&"/"!==Q&&Q!==O&&_(Q.charCodeAt(Q.length-1))&&(Q=Q.slice(0,-1)),!0===v.unescape&&(Y&&(Y=t.removeBackslashes(Y)),Q&&!0===F&&(Q=t.removeBackslashes(Q)));const X={prefix:q,input:m,start:w,base:Q,glob:Y,isBrace:$,isBracket:L,isGlob:M,isExtglob:H,isGlobstar:D,negated:I,negatedExtglob:N};if(!0===v.tokens&&(X.maxDepth=0,_(C)||A.push(U),X.tokens=A),!0===v.parts||!0===v.tokens){let t;for(let e=0;e<E.length;e++){const n=t?t+1:w,r=E[e],o=m.slice(n,r);v.tokens&&(0===e&&0!==w?(A[e].isPrefix=!0,A[e].value=q):A[e].value=o,y(A[e]),X.maxDepth+=A[e].depth),0===e&&""===o||P.push(o),t=r}if(t&&t+1<m.length){const e=m.slice(t+1);P.push(e),v.tokens&&(A[A.length-1].value=e,y(A[A.length-1]),X.maxDepth+=A[A.length-1].depth)}X.slashes=E,X.parts=P}return X},lt}(),n=function(){if(ft)return ht;ft=1;const t=St(),e=Et(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:i}=t,a=(t,n)=>{if("function"==typeof n.expandRange)return n.expandRange(...t,n);t.sort();const r=`[${t.join("-")}]`;try{new RegExp(r)}catch(n){return t.map(t=>e.escapeRegex(t)).join("..")}return r},u=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,c=(l,p)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=i[l]||l;const h={...p},f="number"==typeof h.maxLength?Math.min(n,h.maxLength):n;let d=l.length;if(d>f)throw new SyntaxError(`Input length: ${d}, exceeds maximum allowed length: ${f}`);const g={type:"bos",value:"",output:h.prepend||""},_=[g],y=h.capture?"":"?:",m=e.isWindows(p),R=t.globChars(m),v=t.extglobChars(R),{DOT_LITERAL:b,PLUS_LITERAL:S,SLASH_LITERAL:E,ONE_CHAR:A,DOTS_SLASH:P,NO_DOT:x,NO_DOT_SLASH:C,NO_DOTS_SLASH:O,QMARK:T,QMARK_NO_DOT:w,STAR:k,START_ANCHOR:$}=R,L=t=>`(${y}(?:(?!${$}${t.dot?P:b}).)*?)`,M=h.dot?"":x,H=h.dot?T:w;let D=!0===h.bash?L(h):k;h.capture&&(D=`(${D})`),"boolean"==typeof h.noext&&(h.noextglob=h.noext);const j={input:l,index:-1,start:0,dot:!0===h.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:_};l=e.removePrefix(l,j),d=l.length;const F=[],I=[],N=[];let B,G=g;const U=()=>j.index===d-1,W=j.peek=(t=1)=>l[j.index+t],K=j.advance=()=>l[++j.index]||"",V=()=>l.slice(j.index+1),Q=(t="",e=0)=>{j.consumed+=t,j.index+=e},q=t=>{j.output+=null!=t.output?t.output:t.value,Q(t.value)},Y=()=>{let t=1;for(;"!"===W()&&("("!==W(2)||"?"===W(3));)K(),j.start++,t++;return t%2!=0&&(j.negated=!0,j.start++,!0)},X=t=>{j[t]++,N.push(t)},Z=t=>{j[t]--,N.pop()},z=t=>{if("globstar"===G.type){const e=j.braces>0&&("comma"===t.type||"brace"===t.type),n=!0===t.extglob||F.length&&("pipe"===t.type||"paren"===t.type);"slash"===t.type||"paren"===t.type||e||n||(j.output=j.output.slice(0,-G.output.length),G.type="star",G.value="*",G.output=D,j.output+=G.output)}if(F.length&&"paren"!==t.type&&(F[F.length-1].inner+=t.value),(t.value||t.output)&&q(t),G&&"text"===G.type&&"text"===t.type)return G.value+=t.value,void(G.output=(G.output||"")+t.value);t.prev=G,_.push(t),G=t},J=(t,e)=>{const n={...v[e],conditions:1,inner:""};n.prev=G,n.parens=j.parens,n.output=j.output;const r=(h.capture?"(":"")+n.open;X("parens"),z({type:t,value:e,output:j.output?"":A}),z({type:"paren",extglob:!0,value:K(),output:r}),F.push(n)},tt=t=>{let e,n=t.close+(h.capture?")":"");if("negate"===t.type){let r=D;if(t.inner&&t.inner.length>1&&t.inner.includes("/")&&(r=L(h)),(r!==D||U()||/^\)+$/.test(V()))&&(n=t.close=`)$))${r}`),t.inner.includes("*")&&(e=V())&&/^\.[^\\/.]+$/.test(e)){const o=c(e,{...p,fastpaths:!1}).output;n=t.close=`)${o})${r})`}"bos"===t.prev.type&&(j.negatedExtglob=!0)}z({type:"paren",extglob:!0,value:B,output:n}),Z("parens")};if(!1!==h.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let t=!1,n=l.replace(s,(e,n,r,o,s,i)=>"\\"===o?(t=!0,e):"?"===o?n?n+o+(s?T.repeat(s.length):""):0===i?H+(s?T.repeat(s.length):""):T.repeat(r.length):"."===o?b.repeat(r.length):"*"===o?n?n+o+(s?D:""):D:n?e:`\\${e}`);return!0===t&&(n=!0===h.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,t=>t.length%2==0?"\\\\":t?"\\":"")),n===l&&!0===h.contains?(j.output=l,j):(j.output=e.wrapOutput(n,j,p),j)}for(;!U();){if(B=K(),"\0"===B)continue;if("\\"===B){const t=W();if("/"===t&&!0!==h.bash)continue;if("."===t||";"===t)continue;if(!t){B+="\\",z({type:"text",value:B});continue}const e=/^\\+/.exec(V());let n=0;if(e&&e[0].length>2&&(n=e[0].length,j.index+=n,n%2!=0&&(B+="\\")),!0===h.unescape?B=K():B+=K(),0===j.brackets){z({type:"text",value:B});continue}}if(j.brackets>0&&("]"!==B||"["===G.value||"[^"===G.value)){if(!1!==h.posix&&":"===B){const t=G.value.slice(1);if(t.includes("[")&&(G.posix=!0,t.includes(":"))){const t=G.value.lastIndexOf("["),e=G.value.slice(0,t),n=G.value.slice(t+2),o=r[n];if(o){G.value=e+o,j.backtrack=!0,K(),g.output||1!==_.indexOf(G)||(g.output=A);continue}}}("["===B&&":"!==W()||"-"===B&&"]"===W())&&(B=`\\${B}`),"]"!==B||"["!==G.value&&"[^"!==G.value||(B=`\\${B}`),!0===h.posix&&"!"===B&&"["===G.value&&(B="^"),G.value+=B,q({value:B});continue}if(1===j.quotes&&'"'!==B){B=e.escapeRegex(B),G.value+=B,q({value:B});continue}if('"'===B){j.quotes=1===j.quotes?0:1,!0===h.keepQuotes&&z({type:"text",value:B});continue}if("("===B){X("parens"),z({type:"paren",value:B});continue}if(")"===B){if(0===j.parens&&!0===h.strictBrackets)throw new SyntaxError(u("opening","("));const t=F[F.length-1];if(t&&j.parens===t.parens+1){tt(F.pop());continue}z({type:"paren",value:B,output:j.parens?")":"\\)"}),Z("parens");continue}if("["===B){if(!0!==h.nobracket&&V().includes("]"))X("brackets");else{if(!0!==h.nobracket&&!0===h.strictBrackets)throw new SyntaxError(u("closing","]"));B=`\\${B}`}z({type:"bracket",value:B});continue}if("]"===B){if(!0===h.nobracket||G&&"bracket"===G.type&&1===G.value.length){z({type:"text",value:B,output:`\\${B}`});continue}if(0===j.brackets){if(!0===h.strictBrackets)throw new SyntaxError(u("opening","["));z({type:"text",value:B,output:`\\${B}`});continue}Z("brackets");const t=G.value.slice(1);if(!0===G.posix||"^"!==t[0]||t.includes("/")||(B=`/${B}`),G.value+=B,q({value:B}),!1===h.literalBrackets||e.hasRegexChars(t))continue;const n=e.escapeRegex(G.value);if(j.output=j.output.slice(0,-G.value.length),!0===h.literalBrackets){j.output+=n,G.value=n;continue}G.value=`(${y}${n}|${G.value})`,j.output+=G.value;continue}if("{"===B&&!0!==h.nobrace){X("braces");const t={type:"brace",value:B,output:"(",outputIndex:j.output.length,tokensIndex:j.tokens.length};I.push(t),z(t);continue}if("}"===B){const t=I[I.length-1];if(!0===h.nobrace||!t){z({type:"text",value:B,output:B});continue}let e=")";if(!0===t.dots){const t=_.slice(),n=[];for(let e=t.length-1;e>=0&&(_.pop(),"brace"!==t[e].type);e--)"dots"!==t[e].type&&n.unshift(t[e].value);e=a(n,h),j.backtrack=!0}if(!0!==t.comma&&!0!==t.dots){const n=j.output.slice(0,t.outputIndex),r=j.tokens.slice(t.tokensIndex);t.value=t.output="\\{",B=e="\\}",j.output=n;for(const t of r)j.output+=t.output||t.value}z({type:"brace",value:B,output:e}),Z("braces"),I.pop();continue}if("|"===B){F.length>0&&F[F.length-1].conditions++,z({type:"text",value:B});continue}if(","===B){let t=B;const e=I[I.length-1];e&&"braces"===N[N.length-1]&&(e.comma=!0,t="|"),z({type:"comma",value:B,output:t});continue}if("/"===B){if("dot"===G.type&&j.index===j.start+1){j.start=j.index+1,j.consumed="",j.output="",_.pop(),G=g;continue}z({type:"slash",value:B,output:E});continue}if("."===B){if(j.braces>0&&"dot"===G.type){"."===G.value&&(G.output=b);const t=I[I.length-1];G.type="dots",G.output+=B,G.value+=B,t.dots=!0;continue}if(j.braces+j.parens===0&&"bos"!==G.type&&"slash"!==G.type){z({type:"text",value:B,output:b});continue}z({type:"dot",value:B,output:b});continue}if("?"===B){if((!G||"("!==G.value)&&!0!==h.noextglob&&"("===W()&&"?"!==W(2)){J("qmark",B);continue}if(G&&"paren"===G.type){const t=W();let n=B;if("<"===t&&!e.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===G.value&&!/[!=<:]/.test(t)||"<"===t&&!/<([!=]|\w+>)/.test(V()))&&(n=`\\${B}`),z({type:"text",value:B,output:n});continue}if(!0!==h.dot&&("slash"===G.type||"bos"===G.type)){z({type:"qmark",value:B,output:w});continue}z({type:"qmark",value:B,output:T});continue}if("!"===B){if(!0!==h.noextglob&&"("===W()&&("?"!==W(2)||!/[!=<:]/.test(W(3)))){J("negate",B);continue}if(!0!==h.nonegate&&0===j.index){Y();continue}}if("+"===B){if(!0!==h.noextglob&&"("===W()&&"?"!==W(2)){J("plus",B);continue}if(G&&"("===G.value||!1===h.regex){z({type:"plus",value:B,output:S});continue}if(G&&("bracket"===G.type||"paren"===G.type||"brace"===G.type)||j.parens>0){z({type:"plus",value:B});continue}z({type:"plus",value:S});continue}if("@"===B){if(!0!==h.noextglob&&"("===W()&&"?"!==W(2)){z({type:"at",extglob:!0,value:B,output:""});continue}z({type:"text",value:B});continue}if("*"!==B){"$"!==B&&"^"!==B||(B=`\\${B}`);const t=o.exec(V());t&&(B+=t[0],j.index+=t[0].length),z({type:"text",value:B});continue}if(G&&("globstar"===G.type||!0===G.star)){G.type="star",G.star=!0,G.value+=B,G.output=D,j.backtrack=!0,j.globstar=!0,Q(B);continue}let t=V();if(!0!==h.noextglob&&/^\([^?]/.test(t)){J("star",B);continue}if("star"===G.type){if(!0===h.noglobstar){Q(B);continue}const e=G.prev,n=e.prev,r="slash"===e.type||"bos"===e.type,o=n&&("star"===n.type||"globstar"===n.type);if(!0===h.bash&&(!r||t[0]&&"/"!==t[0])){z({type:"star",value:B,output:""});continue}const s=j.braces>0&&("comma"===e.type||"brace"===e.type),i=F.length&&("pipe"===e.type||"paren"===e.type);if(!r&&"paren"!==e.type&&!s&&!i){z({type:"star",value:B,output:""});continue}for(;"/**"===t.slice(0,3);){const e=l[j.index+4];if(e&&"/"!==e)break;t=t.slice(3),Q("/**",3)}if("bos"===e.type&&U()){G.type="globstar",G.value+=B,G.output=L(h),j.output=G.output,j.globstar=!0,Q(B);continue}if("slash"===e.type&&"bos"!==e.prev.type&&!o&&U()){j.output=j.output.slice(0,-(e.output+G.output).length),e.output=`(?:${e.output}`,G.type="globstar",G.output=L(h)+(h.strictSlashes?")":"|$)"),G.value+=B,j.globstar=!0,j.output+=e.output+G.output,Q(B);continue}if("slash"===e.type&&"bos"!==e.prev.type&&"/"===t[0]){const n=void 0!==t[1]?"|$":"";j.output=j.output.slice(0,-(e.output+G.output).length),e.output=`(?:${e.output}`,G.type="globstar",G.output=`${L(h)}${E}|${E}${n})`,G.value+=B,j.output+=e.output+G.output,j.globstar=!0,Q(B+K()),z({type:"slash",value:"/",output:""});continue}if("bos"===e.type&&"/"===t[0]){G.type="globstar",G.value+=B,G.output=`(?:^|${E}|${L(h)}${E})`,j.output=G.output,j.globstar=!0,Q(B+K()),z({type:"slash",value:"/",output:""});continue}j.output=j.output.slice(0,-G.output.length),G.type="globstar",G.output=L(h),G.value+=B,j.output+=G.output,j.globstar=!0,Q(B);continue}const n={type:"star",value:B,output:D};!0!==h.bash?!G||"bracket"!==G.type&&"paren"!==G.type||!0!==h.regex?(j.index!==j.start&&"slash"!==G.type&&"dot"!==G.type||("dot"===G.type?(j.output+=C,G.output+=C):!0===h.dot?(j.output+=O,G.output+=O):(j.output+=M,G.output+=M),"*"!==W()&&(j.output+=A,G.output+=A)),z(n)):(n.output=B,z(n)):(n.output=".*?","bos"!==G.type&&"slash"!==G.type||(n.output=M+n.output),z(n))}for(;j.brackets>0;){if(!0===h.strictBrackets)throw new SyntaxError(u("closing","]"));j.output=e.escapeLast(j.output,"["),Z("brackets")}for(;j.parens>0;){if(!0===h.strictBrackets)throw new SyntaxError(u("closing",")"));j.output=e.escapeLast(j.output,"("),Z("parens")}for(;j.braces>0;){if(!0===h.strictBrackets)throw new SyntaxError(u("closing","}"));j.output=e.escapeLast(j.output,"{"),Z("braces")}if(!0===h.strictSlashes||"star"!==G.type&&"bracket"!==G.type||z({type:"maybe_slash",value:"",output:`${E}?`}),!0===j.backtrack){j.output="";for(const t of j.tokens)j.output+=null!=t.output?t.output:t.value,t.suffix&&(j.output+=t.suffix)}return j};return c.fastpaths=(r,o)=>{const s={...o},a="number"==typeof s.maxLength?Math.min(n,s.maxLength):n,u=r.length;if(u>a)throw new SyntaxError(`Input length: ${u}, exceeds maximum allowed length: ${a}`);r=i[r]||r;const c=e.isWindows(o),{DOT_LITERAL:l,SLASH_LITERAL:p,ONE_CHAR:h,DOTS_SLASH:f,NO_DOT:d,NO_DOTS:g,NO_DOTS_SLASH:_,STAR:y,START_ANCHOR:m}=t.globChars(c),R=s.dot?g:d,v=s.dot?_:d,b=s.capture?"":"?:";let S=!0===s.bash?".*?":y;s.capture&&(S=`(${S})`);const E=t=>!0===t.noglobstar?S:`(${b}(?:(?!${m}${t.dot?f:l}).)*?)`,A=t=>{switch(t){case"*":return`${R}${h}${S}`;case".*":return`${l}${h}${S}`;case"*.*":return`${R}${S}${l}${h}${S}`;case"*/*":return`${R}${S}${p}${h}${v}${S}`;case"**":return R+E(s);case"**/*":return`(?:${R}${E(s)}${p})?${v}${h}${S}`;case"**/*.*":return`(?:${R}${E(s)}${p})?${v}${S}${l}${h}${S}`;case"**/.*":return`(?:${R}${E(s)}${p})?${l}${h}${S}`;default:{const e=/^(.*?)\.(\w+)$/.exec(t);if(!e)return;const n=A(e[1]);if(!n)return;return n+l+e[2]}}},P=e.removePrefix(r,{negated:!1,prefix:""});let x=A(P);return x&&!0!==s.strictSlashes&&(x+=`${p}?`),x},ht=c}(),o=Et(),s=St(),i=(t,e,n=!1)=>{if(Array.isArray(t)){const r=t.map(t=>i(t,e,n)),o=t=>{for(const e of r){const n=e(t);if(n)return n}return!1};return o}const r=(s=t)&&"object"==typeof s&&!Array.isArray(s)&&t.tokens&&t.input;var s;if(""===t||"string"!=typeof t&&!r)throw new TypeError("Expected pattern to be a non-empty string");const a=e||{},u=o.isWindows(e),c=r?i.compileRe(t,e):i.makeRe(t,e,!1,!0),l=c.state;delete c.state;let p=()=>!1;if(a.ignore){const t={...e,ignore:null,onMatch:null,onResult:null};p=i(a.ignore,t,n)}const h=(n,r=!1)=>{const{isMatch:o,match:s,output:h}=i.test(n,c,e,{glob:t,posix:u}),f={glob:t,state:l,regex:c,posix:u,input:n,output:h,match:s,isMatch:o};return"function"==typeof a.onResult&&a.onResult(f),!1===o?(f.isMatch=!1,!!r&&f):p(n)?("function"==typeof a.onIgnore&&a.onIgnore(f),f.isMatch=!1,!!r&&f):("function"==typeof a.onMatch&&a.onMatch(f),!r||f)};return n&&(h.state=l),h};return i.test=(t,e,n,{glob:r,posix:s}={})=>{if("string"!=typeof t)throw new TypeError("Expected input to be a string");if(""===t)return{isMatch:!1,output:""};const a=n||{},u=a.format||(s?o.toPosixSlashes:null);let c=t===r,l=c&&u?u(t):t;return!1===c&&(l=u?u(t):t,c=l===r),!1!==c&&!0!==a.capture||(c=!0===a.matchBase||!0===a.basename?i.matchBase(t,e,n,s):e.exec(l)),{isMatch:Boolean(c),match:c,output:l}},i.matchBase=(e,n,r,s=o.isWindows(r))=>(n instanceof RegExp?n:i.makeRe(n,r)).test(t.basename(e)),i.isMatch=(t,e,n)=>i(e,n)(t),i.parse=(t,e)=>Array.isArray(t)?t.map(t=>i.parse(t,e)):n(t,{...e,fastpaths:!1}),i.scan=(t,n)=>e(t,n),i.compileRe=(t,e,n=!1,r=!1)=>{if(!0===n)return t.output;const o=e||{},s=o.contains?"":"^",a=o.contains?"":"$";let u=`${s}(?:${t.output})${a}`;t&&!0===t.negated&&(u=`^(?!${u}).*$`);const c=i.toRegex(u,e);return!0===r&&(c.state=t),c},i.makeRe=(t,e={},r=!1,o=!1)=>{if(!t||"string"!=typeof t)throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return!1===e.fastpaths||"."!==t[0]&&"*"!==t[0]||(s.output=n.fastpaths(t,e)),s.output||(s=n(t,e)),i.compileRe(s,e,r,o)},i.toRegex=(t,e)=>{try{const n=e||{};return new RegExp(t,n.flags||(n.nocase?"i":""))}catch(t){if(e&&!0===e.debug)throw t;return/$^/}},i.constants=s,dt=i}function Pt(){return yt?_t:(yt=1,_t=At())}function xt(){if(vt)return w;vt=1,Object.defineProperty(w,"__esModule",{value:!0}),w.isAbsolute=w.partitionAbsoluteAndRelative=w.removeDuplicateSlashes=w.matchAny=w.convertPatternsToRe=w.makeRe=w.getPatternParts=w.expandBraceExpansion=w.expandPatternsWithBraceExpansion=w.isAffectDepthOfReadingPattern=w.endsWithSlashGlobStar=w.hasGlobStar=w.getBaseDirectory=w.isPatternRelatedToParentDirectory=w.getPatternsOutsideCurrentDirectory=w.getPatternsInsideCurrentDirectory=w.getPositivePatterns=w.getNegativePatterns=w.isPositivePattern=w.isNegativePattern=w.convertToNegativePattern=w.convertToPositivePattern=w.isDynamicPattern=w.isStaticPattern=void 0;const t=r,e=L(),n=function(){if(Rt)return mt;Rt=1;const t=o,e=it(),n=Pt(),r=Et(),s=t=>""===t||"./"===t,i=t=>{const e=t.indexOf("{");return e>-1&&t.indexOf("}",e)>-1},a=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let o=new Set,s=new Set,i=new Set,a=0,u=t=>{i.add(t.output),r&&r.onResult&&r.onResult(t)};for(let i=0;i<e.length;i++){let c=n(String(e[i]),{...r,onResult:u},!0),l=c.state.negated||c.state.negatedExtglob;l&&a++;for(let e of t){let t=c(e,!0);(l?!t.isMatch:t.isMatch)&&(l?o.add(t.output):(o.delete(t.output),s.add(t.output)))}}let c=(a===e.length?[...i]:[...s]).filter(t=>!o.has(t));if(r&&0===c.length){if(!0===r.failglob)throw new Error(`No matches found for "${e.join(", ")}"`);if(!0===r.nonull||!0===r.nullglob)return r.unescape?e.map(t=>t.replace(/\\/g,"")):e}return c};return a.match=a,a.matcher=(t,e)=>n(t,e),a.any=a.isMatch=(t,e,r)=>n(e,r)(t),a.not=(t,e,n={})=>{e=[].concat(e).map(String);let r=new Set,o=[],s=new Set(a(t,e,{...n,onResult:t=>{n.onResult&&n.onResult(t),o.push(t.output)}}));for(let t of o)s.has(t)||r.add(t);return[...r]},a.contains=(e,n,r)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${t.inspect(e)}"`);if(Array.isArray(n))return n.some(t=>a.contains(e,t,r));if("string"==typeof n){if(s(e)||s(n))return!1;if(e.includes(n)||e.startsWith("./")&&e.slice(2).includes(n))return!0}return a.isMatch(e,n,{...r,contains:!0})},a.matchKeys=(t,e,n)=>{if(!r.isObject(t))throw new TypeError("Expected the first argument to be an object");let o=a(Object.keys(t),e,n),s={};for(let e of o)s[e]=t[e];return s},a.some=(t,e,r)=>{let o=[].concat(t);for(let t of[].concat(e)){let e=n(String(t),r);if(o.some(t=>e(t)))return!0}return!1},a.every=(t,e,r)=>{let o=[].concat(t);for(let t of[].concat(e)){let e=n(String(t),r);if(!o.every(t=>e(t)))return!1}return!0},a.all=(e,r,o)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${t.inspect(e)}"`);return[].concat(r).every(t=>n(t,o)(e))},a.capture=(t,e,o)=>{let s=r.isWindows(o),i=n.makeRe(String(t),{...o,capture:!0}).exec(s?r.toPosixSlashes(e):e);if(i)return i.slice(1).map(t=>void 0===t?"":t)},a.makeRe=(...t)=>n.makeRe(...t),a.scan=(...t)=>n.scan(...t),a.parse=(t,r)=>{let o=[];for(let s of[].concat(t||[]))for(let t of e(String(s),r))o.push(n.parse(t,r));return o},a.braces=(t,n)=>{if("string"!=typeof t)throw new TypeError("Expected a string");return n&&!0===n.nobrace||!i(t)?[t]:e(t,n)},a.braceExpand=(t,e)=>{if("string"!=typeof t)throw new TypeError("Expected a string");return a.braces(t,{...e,expand:!0})},a.hasBraces=i,mt=a}(),s=/[*?]|^!/,i=/\[[^[]*]/,a=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,u=/[!*+?@]\([^(]*\)/,c=/,|\.\./,l=/(?!^)\/{2,}/g;function p(t,e={}){return!h(t,e)}function h(t,e={}){return""!==t&&(!(!1!==e.caseSensitiveMatch&&!t.includes("\\"))||(!!(s.test(t)||i.test(t)||a.test(t))||(!(!1===e.extglob||!u.test(t))||!(!1===e.braceExpansion||!function(t){const e=t.indexOf("{");if(-1===e)return!1;const n=t.indexOf("}",e+1);if(-1===n)return!1;const r=t.slice(e,n);return c.test(r)}(t)))))}function f(t){return t.startsWith("!")&&"("!==t[1]}function d(t){return!f(t)}function g(t){return t.startsWith("..")||t.startsWith("./..")}function _(t){return t.endsWith("/**")}function y(t){const e=n.braces(t,{expand:!0,nodupes:!0,keepEscaping:!0});return e.sort((t,e)=>t.length-e.length),e.filter(t=>""!==t)}function m(t,e){return n.makeRe(t,e)}function R(e){return t.isAbsolute(e)}return w.isStaticPattern=p,w.isDynamicPattern=h,w.convertToPositivePattern=function(t){return f(t)?t.slice(1):t},w.convertToNegativePattern=function(t){return"!"+t},w.isNegativePattern=f,w.isPositivePattern=d,w.getNegativePatterns=function(t){return t.filter(f)},w.getPositivePatterns=function(t){return t.filter(d)},w.getPatternsInsideCurrentDirectory=function(t){return t.filter(t=>!g(t))},w.getPatternsOutsideCurrentDirectory=function(t){return t.filter(g)},w.isPatternRelatedToParentDirectory=g,w.getBaseDirectory=function(t){return e(t,{flipBackslashes:!1})},w.hasGlobStar=function(t){return t.includes("**")},w.endsWithSlashGlobStar=_,w.isAffectDepthOfReadingPattern=function(e){const n=t.basename(e);return _(e)||p(n)},w.expandPatternsWithBraceExpansion=function(t){return t.reduce((t,e)=>t.concat(y(e)),[])},w.expandBraceExpansion=y,w.getPatternParts=function(t,e){let{parts:r}=n.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return 0===r.length&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r},w.makeRe=m,w.convertPatternsToRe=function(t,e){return t.map(t=>m(t,e))},w.matchAny=function(t,e){return e.some(e=>e.test(t))},w.removeDuplicateSlashes=function(t){return t.replace(l,"/")},w.partitionAbsoluteAndRelative=function(t){const e=[],n=[];for(const r of t)R(r)?e.push(r):n.push(r);return[e,n]},w.isAbsolute=R,w}var Ct,Ot,Tt,wt={};function kt(){if(Ot)return Ct;Ot=1;const t=s.PassThrough,e=Array.prototype.slice;function n(e,r){if(Array.isArray(e))for(let t=0,o=e.length;t<o;t++)e[t]=n(e[t],r);else{if(!e._readableState&&e.pipe&&(e=e.pipe(t(r))),!e._readableState||!e.pause||!e.pipe)throw new Error("Only readable stream can be merged.");e.pause()}return e}return Ct=function(){const r=[],o=e.call(arguments);let s=!1,i=o[o.length-1];i&&!Array.isArray(i)&&null==i.pipe?o.pop():i={};const a=!1!==i.end,u=!0===i.pipeError;null==i.objectMode&&(i.objectMode=!0);null==i.highWaterMark&&(i.highWaterMark=65536);const c=t(i);function l(){for(let t=0,e=arguments.length;t<e;t++)r.push(n(arguments[t],i));return p(),this}function p(){if(s)return;s=!0;let t=r.shift();if(!t)return void process.nextTick(h);Array.isArray(t)||(t=[t]);let e=t.length+1;function n(){--e>0||(s=!1,p())}function o(t){function e(){t.removeListener("merge2UnpipeEnd",e),t.removeListener("end",e),u&&t.removeListener("error",r),n()}function r(t){c.emit("error",t)}if(t._readableState.endEmitted)return n();t.on("merge2UnpipeEnd",e),t.on("end",e),u&&t.on("error",r),t.pipe(c,{end:!1}),t.resume()}for(let e=0;e<t.length;e++)o(t[e]);n()}function h(){s=!1,c.emit("queueDrain"),a&&c.end()}c.setMaxListeners(0),c.add=l,c.on("unpipe",function(t){t.emit("merge2UnpipeEnd")}),o.length&&l.apply(null,o);return c},Ct}var $t,Lt,Mt,Ht={};function Dt(){if($t)return Ht;return $t=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.isEmpty=Ht.isString=void 0,Ht.isString=function(t){return"string"==typeof t},Ht.isEmpty=function(t){return""===t},Ht}function jt(){if(Lt)return f;Lt=1,Object.defineProperty(f,"__esModule",{value:!0}),f.string=f.stream=f.pattern=f.path=f.fs=f.errno=f.array=void 0;const t=g();f.array=t;const e=m();f.errno=e;const n=function(){if(R)return v;R=1,Object.defineProperty(v,"__esModule",{value:!0}),v.createDirentFromStats=void 0;class t{constructor(t,e){this.name=t,this.isBlockDevice=e.isBlockDevice.bind(e),this.isCharacterDevice=e.isCharacterDevice.bind(e),this.isDirectory=e.isDirectory.bind(e),this.isFIFO=e.isFIFO.bind(e),this.isFile=e.isFile.bind(e),this.isSocket=e.isSocket.bind(e),this.isSymbolicLink=e.isSymbolicLink.bind(e)}}return v.createDirentFromStats=function(e,n){return new t(e,n)},v}();f.fs=n;const r=E();f.path=r;const o=xt();f.pattern=o;const s=function(){if(Tt)return wt;Tt=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.merge=void 0;const t=kt();function e(t){t.forEach(t=>t.emit("close"))}return wt.merge=function(n){const r=t(n);return n.forEach(t=>{t.once("error",t=>r.emit("error",t))}),r.once("close",()=>e(n)),r.once("end",()=>e(n)),r},wt}();f.stream=s;const i=Dt();return f.string=i,f}var Ft,It={},Nt={},Bt={},Gt={},Ut={},Wt={},Kt={},Vt={},Qt={};function qt(){if(Ft)return Qt;function t(t,e){t(e)}function e(t,e){t(null,e)}return Ft=1,Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.read=void 0,Qt.read=function(n,r,o){r.fs.lstat(n,(s,i)=>{null===s?i.isSymbolicLink()&&r.followSymbolicLink?r.fs.stat(n,(n,s)=>{if(null!==n)return r.throwErrorOnBrokenSymbolicLink?void t(o,n):void e(o,i);r.markSymbolicLink&&(s.isSymbolicLink=()=>!0),e(o,s)}):e(o,i):t(o,s)})},Qt}var Yt,Xt={};var Zt,zt,Jt,te,ee,ne,re,oe={},se={};function ie(){if(zt)return oe;zt=1,Object.defineProperty(oe,"__esModule",{value:!0});const t=(Zt||(Zt=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const e=a;t.FILE_SYSTEM_ADAPTER={lstat:e.lstat,stat:e.stat,lstatSync:e.lstatSync,statSync:e.statSync},t.createFileSystemAdapter=function(e){return void 0===e?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}}(se)),se);return oe.default=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=t.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(t,e){return null!=t?t:e}},oe}function ae(){if(Jt)return Vt;Jt=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.statSync=Vt.stat=Vt.Settings=void 0;const t=qt(),e=(Yt||(Yt=1,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.read=void 0,Xt.read=function(t,e){const n=e.fs.lstatSync(t);if(!n.isSymbolicLink()||!e.followSymbolicLink)return n;try{const n=e.fs.statSync(t);return e.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(t){if(!e.throwErrorOnBrokenSymbolicLink)return n;throw t}}),Xt),n=ie();function r(t={}){return t instanceof n.default?t:new n.default(t)}return Vt.Settings=n.default,Vt.stat=function(e,n,o){"function"!=typeof n?t.read(e,r(n),o):t.read(e,r(),n)},Vt.statSync=function(t,n){const o=r(n);return e.read(t,o)},Vt}function ue(){if(ee)return te;let t;return ee=1,te="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:p):e=>(t||(t=Promise.resolve())).then(e).catch(t=>setTimeout(()=>{throw t},0))}var ce,le={};function pe(){if(ce)return le;ce=1,Object.defineProperty(le,"__esModule",{value:!0}),le.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const t=process.versions.node.split(".");if(void 0===t[0]||void 0===t[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const e=Number.parseInt(t[0],10),n=Number.parseInt(t[1],10),r=e>10,o=10===e&&n>=10;return le.IS_SUPPORT_READDIR_WITH_FILE_TYPES=r||o,le}var he,fe,de={},ge={};function _e(){if(fe)return de;fe=1,Object.defineProperty(de,"__esModule",{value:!0}),de.fs=void 0;const t=function(){if(he)return ge;he=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.createDirentFromStats=void 0;class t{constructor(t,e){this.name=t,this.isBlockDevice=e.isBlockDevice.bind(e),this.isCharacterDevice=e.isCharacterDevice.bind(e),this.isDirectory=e.isDirectory.bind(e),this.isFIFO=e.isFIFO.bind(e),this.isFile=e.isFile.bind(e),this.isSocket=e.isSocket.bind(e),this.isSymbolicLink=e.isSymbolicLink.bind(e)}}return ge.createDirentFromStats=function(e,n){return new t(e,n)},ge}();return de.fs=t,de}var ye,me,Re={};function ve(){if(ye)return Re;return ye=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.joinPathSegments=void 0,Re.joinPathSegments=function(t,e,n){return t.endsWith(n)?t+e:t+n+e},Re}function be(){if(me)return Kt;me=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.readdir=Kt.readdirWithFileTypes=Kt.read=void 0;const t=ae(),e=function(){if(re)return ne;re=1,ne=function(e,n){let r,o,s,i=!0;function a(e){function o(){n&&n(e,r),n=null}i?t(o):o()}function u(t,e,n){r[t]=n,(0===--o||e)&&a(e)}Array.isArray(e)?(r=[],o=e.length):(s=Object.keys(e),r={},o=s.length),o?s?s.forEach(function(t){e[t](function(e,n){u(t,e,n)})}):e.forEach(function(t,e){t(function(t,n){u(e,t,n)})}):a(null),i=!1};const t=ue();return ne}(),n=pe(),r=_e(),o=ve();function s(t,n,s){n.fs.readdir(t,{withFileTypes:!0},(i,c)=>{if(null!==i)return void a(s,i);const l=c.map(e=>({dirent:e,name:e.name,path:o.joinPathSegments(t,e.name,n.pathSegmentSeparator)}));if(!n.followSymbolicLinks)return void u(s,l);const p=l.map(t=>function(t,e){return n=>{t.dirent.isSymbolicLink()?e.fs.stat(t.path,(o,s)=>{if(null!==o)return e.throwErrorOnBrokenSymbolicLink?void n(o):void n(null,t);t.dirent=r.fs.createDirentFromStats(t.name,s),n(null,t)}):n(null,t)}}(t,n));e(p,(t,e)=>{null===t?u(s,e):a(s,t)})})}function i(n,s,i){s.fs.readdir(n,(c,l)=>{if(null!==c)return void a(i,c);const p=l.map(e=>{const i=o.joinPathSegments(n,e,s.pathSegmentSeparator);return n=>{t.stat(i,s.fsStatSettings,(t,o)=>{if(null!==t)return void n(t);const a={name:e,path:i,dirent:r.fs.createDirentFromStats(e,o)};s.stats&&(a.stats=o),n(null,a)})}});e(p,(t,e)=>{null===t?u(i,e):a(i,t)})})}function a(t,e){t(e)}function u(t,e){t(null,e)}return Kt.read=function(t,e,r){e.stats||!n.IS_SUPPORT_READDIR_WITH_FILE_TYPES?i(t,e,r):s(t,e,r)},Kt.readdirWithFileTypes=s,Kt.readdir=i,Kt}var Se,Ee={};var Ae,Pe,xe,Ce={},Oe={};function Te(){return Ae||(Ae=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const e=a;t.FILE_SYSTEM_ADAPTER={lstat:e.lstat,stat:e.stat,lstatSync:e.lstatSync,statSync:e.statSync,readdir:e.readdir,readdirSync:e.readdirSync},t.createFileSystemAdapter=function(e){return void 0===e?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}}(Oe)),Oe}function we(){if(xe)return Wt;xe=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.Settings=Wt.scandirSync=Wt.scandir=void 0;const t=be(),e=function(){if(Se)return Ee;Se=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.readdir=Ee.readdirWithFileTypes=Ee.read=void 0;const t=ae(),e=pe(),n=_e(),r=ve();function o(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(o=>{const s={dirent:o,name:o.name,path:r.joinPathSegments(t,o.name,e.pathSegmentSeparator)};if(s.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{const t=e.fs.statSync(s.path);s.dirent=n.fs.createDirentFromStats(s.name,t)}catch(t){if(e.throwErrorOnBrokenSymbolicLink)throw t}return s})}function s(e,o){return o.fs.readdirSync(e).map(s=>{const i=r.joinPathSegments(e,s,o.pathSegmentSeparator),a=t.statSync(i,o.fsStatSettings),u={name:s,path:i,dirent:n.fs.createDirentFromStats(s,a)};return o.stats&&(u.stats=a),u})}return Ee.read=function(t,n){return!n.stats&&e.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(t,n):s(t,n)},Ee.readdirWithFileTypes=o,Ee.readdir=s,Ee}(),n=function(){if(Pe)return Ce;Pe=1,Object.defineProperty(Ce,"__esModule",{value:!0});const t=r,e=ae(),n=Te();return Ce.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,t.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new e.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,e){return null!=t?t:e}},Ce}();function o(t={}){return t instanceof n.default?t:new n.default(t)}return Wt.Settings=n.default,Wt.scandir=function(e,n,r){"function"!=typeof n?t.read(e,o(n),r):t.read(e,o(),n)},Wt.scandirSync=function(t,n){const r=o(n);return e.read(t,r)},Wt}var ke,$e,Le,Me={exports:{}};function He(){if(Le)return Me.exports;Le=1;var t=$e?ke:($e=1,ke=function(t){var e=new t,n=e;return{get:function(){var r=e;return r.next?e=r.next:(e=new t,n=e),r.next=null,r},release:function(t){n.next=t,n=t}}});function e(e,o,s){if("function"==typeof e&&(s=o,o=e,e=null),!(s>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var i=t(r),a=null,u=null,c=0,l=null,p={push:function(t,r){var f=i.get();f.context=e,f.release=h,f.value=t,f.callback=r||n,f.errorHandler=l,c>=s||p.paused?u?(u.next=f,u=f):(a=f,u=f,p.saturated()):(c++,o.call(e,f.value,f.worked))},drain:n,saturated:n,pause:function(){p.paused=!0},paused:!1,get concurrency(){return s},set concurrency(t){if(!(t>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(s=t,!p.paused)for(;a&&c<s;)c++,h()},running:function(){return c},resume:function(){if(!p.paused)return;if(p.paused=!1,null===a)return c++,void h();for(;a&&c<s;)c++,h()},idle:function(){return 0===c&&0===p.length()},length:function(){var t=a,e=0;for(;t;)t=t.next,e++;return e},getQueue:function(){var t=a,e=[];for(;t;)e.push(t.value),t=t.next;return e},unshift:function(t,r){var f=i.get();f.context=e,f.release=h,f.value=t,f.callback=r||n,f.errorHandler=l,c>=s||p.paused?a?(f.next=a,a=f):(a=f,u=f,p.saturated()):(c++,o.call(e,f.value,f.worked))},empty:n,kill:function(){a=null,u=null,p.drain=n},killAndDrain:function(){a=null,u=null,p.drain(),p.drain=n},error:function(t){l=t},abort:function(){var t=a;a=null,u=null;for(;t;){var e=t.next,r=t.callback,o=t.errorHandler,s=t.value,i=t.context;t.value=null,t.callback=n,t.errorHandler=null,o&&o(new Error("abort"),s),r.call(i,new Error("abort")),t.release(t),t=e}p.drain=n}};return p;function h(t){t&&i.release(t);var n=a;n&&c<=s?p.paused?c--:(u===a&&(u=null),a=n.next,n.next=null,o.call(e,n.value,n.worked),null===u&&p.empty()):0===--c&&p.drain()}}function n(){}function r(){this.value=null,this.callback=n,this.next=null,this.release=n,this.context=null,this.errorHandler=null;var t=this;this.worked=function(e,r){var o=t.callback,s=t.errorHandler,i=t.value;t.value=null,t.callback=n,t.errorHandler&&s(e,i),o.call(t.context,e,r),t.release(t)}}return Me.exports=e,Me.exports.promise=function(t,r,o){"function"==typeof t&&(o=r,r=t,t=null);var s=e(t,function(t,e){r.call(this,t).then(function(t){e(null,t)},e)},o),i=s.push,a=s.unshift;return s.push=function(t){var e=new Promise(function(e,n){i(t,function(t,r){t?n(t):e(r)})});return e.catch(n),e},s.unshift=function(t){var e=new Promise(function(e,n){a(t,function(t,r){t?n(t):e(r)})});return e.catch(n),e},s.drained=function(){return new Promise(function(t){process.nextTick(function(){if(s.idle())t();else{var e=s.drain;s.drain=function(){"function"==typeof e&&e(),t(),s.drain=e}}})})},s},Me.exports}var De,je={};function Fe(){if(De)return je;return De=1,Object.defineProperty(je,"__esModule",{value:!0}),je.joinPathSegments=je.replacePathSegmentSeparator=je.isAppliedFilter=je.isFatalError=void 0,je.isFatalError=function(t,e){return null===t.errorFilter||!t.errorFilter(e)},je.isAppliedFilter=function(t,e){return null===t||t(e)},je.replacePathSegmentSeparator=function(t,e){return t.split(/[/\\]/).join(e)},je.joinPathSegments=function(t,e,n){return""===t?e:t.endsWith(n)?t+e:t+n+e},je}var Ie,Ne,Be,Ge={};function Ue(){if(Ie)return Ge;Ie=1,Object.defineProperty(Ge,"__esModule",{value:!0});const t=Fe();return Ge.default=class{constructor(e,n){this._root=e,this._settings=n,this._root=t.replacePathSegmentSeparator(e,n.pathSegmentSeparator)}},Ge}function We(){if(Ne)return Ut;Ne=1,Object.defineProperty(Ut,"__esModule",{value:!0});const t=i,e=we(),n=He(),r=Fe(),o=Ue();class s extends o.default{constructor(r,o){super(r,o),this._settings=o,this._scandir=e.scandir,this._emitter=new t.EventEmitter,this._queue=n(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(t){this._emitter.on("entry",t)}onError(t){this._emitter.once("error",t)}onEnd(t){this._emitter.once("end",t)}_pushToQueue(t,e){const n={directory:t,base:e};this._queue.push(n,t=>{null!==t&&this._handleError(t)})}_worker(t,e){this._scandir(t.directory,this._settings.fsScandirSettings,(n,r)=>{if(null===n){for(const e of r)this._handleEntry(e,t.base);e(null,void 0)}else e(n,void 0)})}_handleError(t){!this._isDestroyed&&r.isFatalError(this._settings,t)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",t))}_handleEntry(t,e){if(this._isDestroyed||this._isFatalError)return;const n=t.path;void 0!==e&&(t.path=r.joinPathSegments(e,t.name,this._settings.pathSegmentSeparator)),r.isAppliedFilter(this._settings.entryFilter,t)&&this._emitEntry(t),t.dirent.isDirectory()&&r.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,void 0===e?void 0:t.path)}_emitEntry(t){this._emitter.emit("entry",t)}}return Ut.default=s,Ut}var Ke,Ve={};var Qe,qe,Ye={},Xe={};function Ze(){if(qe)return Ye;qe=1,Object.defineProperty(Ye,"__esModule",{value:!0});const t=function(){if(Qe)return Xe;Qe=1,Object.defineProperty(Xe,"__esModule",{value:!0});const t=we(),e=Fe(),n=Ue();class r extends n.default{constructor(){super(...arguments),this._scandir=t.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(t,e){this._queue.add({directory:t,base:e})}_handleQueue(){for(const t of this._queue.values())this._handleDirectory(t.directory,t.base)}_handleDirectory(t,e){try{const n=this._scandir(t,this._settings.fsScandirSettings);for(const t of n)this._handleEntry(t,e)}catch(t){this._handleError(t)}}_handleError(t){if(e.isFatalError(this._settings,t))throw t}_handleEntry(t,n){const r=t.path;void 0!==n&&(t.path=e.joinPathSegments(n,t.name,this._settings.pathSegmentSeparator)),e.isAppliedFilter(this._settings.entryFilter,t)&&this._pushToStorage(t),t.dirent.isDirectory()&&e.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(r,void 0===n?void 0:t.path)}_pushToStorage(t){this._storage.push(t)}}return Xe.default=r,Xe}();return Ye.default=class{constructor(e,n){this._root=e,this._settings=n,this._reader=new t.default(this._root,this._settings)}read(){return this._reader.read()}},Ye}var ze,Je,tn={};function en(){if(Je)return Bt;Je=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const t=function(){if(Be)return Gt;Be=1,Object.defineProperty(Gt,"__esModule",{value:!0});const t=We();return Gt.default=class{constructor(e,n){this._root=e,this._settings=n,this._reader=new t.default(this._root,this._settings),this._storage=[]}read(t){this._reader.onError(e=>{!function(t,e){t(e)}(t,e)}),this._reader.onEntry(t=>{this._storage.push(t)}),this._reader.onEnd(()=>{!function(t,e){t(null,e)}(t,this._storage)}),this._reader.read()}},Gt}(),e=function(){if(Ke)return Ve;Ke=1,Object.defineProperty(Ve,"__esModule",{value:!0});const t=s,e=We();return Ve.default=class{constructor(n,r){this._root=n,this._settings=r,this._reader=new e.default(this._root,this._settings),this._stream=new t.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(t=>{this._stream.emit("error",t)}),this._reader.onEntry(t=>{this._stream.push(t)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Ve}(),n=Ze(),o=function(){if(ze)return tn;ze=1,Object.defineProperty(tn,"__esModule",{value:!0});const t=r,e=we();return tn.default=class{constructor(n={}){this._options=n,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,t.sep),this.fsScandirSettings=new e.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(t,e){return null!=t?t:e}},tn}();function i(t={}){return t instanceof o.default?t:new o.default(t)}return Bt.Settings=o.default,Bt.walk=function(e,n,r){"function"!=typeof n?new t.default(e,i(n)).read(r):new t.default(e,i()).read(n)},Bt.walkSync=function(t,e){const r=i(e);return new n.default(t,r).read()},Bt.walkStream=function(t,n){const r=i(n);return new e.default(t,r).read()},Bt}var nn,rn={};function on(){if(nn)return rn;nn=1,Object.defineProperty(rn,"__esModule",{value:!0});const t=r,e=ae(),n=jt();return rn.default=class{constructor(t){this._settings=t,this._fsStatSettings=new e.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return t.resolve(this._settings.cwd,e)}_makeEntry(t,e){const r={name:e,path:e,dirent:n.fs.createDirentFromStats(e,t)};return this._settings.stats&&(r.stats=t),r}_isFatalError(t){return!n.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}},rn}var sn,an,un={};function cn(){if(sn)return un;sn=1,Object.defineProperty(un,"__esModule",{value:!0});const t=s,e=ae(),n=en(),r=on();class o extends r.default{constructor(){super(...arguments),this._walkStream=n.walkStream,this._stat=e.stat}dynamic(t,e){return this._walkStream(t,e)}static(e,n){const r=e.map(this._getFullEntryPath,this),o=new t.PassThrough({objectMode:!0});o._write=(t,s,i)=>this._getEntry(r[t],e[t],n).then(e=>{null!==e&&n.entryFilter(e)&&o.push(e),t===r.length-1&&o.end(),i()}).catch(i);for(let t=0;t<r.length;t++)o.write(t);return o}_getEntry(t,e,n){return this._getStat(t).then(t=>this._makeEntry(t,e)).catch(t=>{if(n.errorFilter(t))return null;throw t})}_getStat(t){return new Promise((e,n)=>{this._stat(t,this._fsStatSettings,(t,r)=>null===t?e(r):n(t))})}}return un.default=o,un}var ln,pn,hn,fn={},dn={},gn={},_n={};function yn(){if(pn)return gn;pn=1,Object.defineProperty(gn,"__esModule",{value:!0});const t=function(){if(ln)return _n;ln=1,Object.defineProperty(_n,"__esModule",{value:!0});const t=jt();return _n.default=class{constructor(t,e,n){this._patterns=t,this._settings=e,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(const t of this._patterns){const e=this._getPatternSegments(t),n=this._splitSegmentsIntoSections(e);this._storage.push({complete:n.length<=1,pattern:t,segments:e,sections:n})}}_getPatternSegments(e){return t.pattern.getPatternParts(e,this._micromatchOptions).map(e=>t.pattern.isDynamicPattern(e,this._settings)?{dynamic:!0,pattern:e,patternRe:t.pattern.makeRe(e,this._micromatchOptions)}:{dynamic:!1,pattern:e})}_splitSegmentsIntoSections(e){return t.array.splitWhen(e,e=>e.dynamic&&t.pattern.hasGlobStar(e.pattern))}},_n}();class e extends t.default{match(t){const e=t.split("/"),n=e.length,r=this._storage.filter(t=>!t.complete||t.segments.length>n);for(const t of r){const r=t.sections[0];if(!t.complete&&n>r.length)return!0;if(e.every((e,n)=>{const r=t.segments[n];return!(!r.dynamic||!r.patternRe.test(e))||!r.dynamic&&r.pattern===e}))return!0}return!1}}return gn.default=e,gn}var mn,Rn={};var vn,bn={};var Sn,En,An,Pn={};function xn(){if(En)return fn;En=1,Object.defineProperty(fn,"__esModule",{value:!0});const t=r,e=function(){if(hn)return dn;hn=1,Object.defineProperty(dn,"__esModule",{value:!0});const t=jt(),e=yn();return dn.default=class{constructor(t,e){this._settings=t,this._micromatchOptions=e}getFilter(t,e,n){const r=this._getMatcher(e),o=this._getNegativePatternsRe(n);return e=>this._filter(t,e,r,o)}_getMatcher(t){return new e.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){const n=e.filter(t.pattern.isAffectDepthOfReadingPattern);return t.pattern.convertPatternsToRe(n,this._micromatchOptions)}_filter(e,n,r,o){if(this._isSkippedByDeep(e,n.path))return!1;if(this._isSkippedSymbolicLink(n))return!1;const s=t.path.removeLeadingDotSegment(n.path);return!this._isSkippedByPositivePatterns(s,r)&&this._isSkippedByNegativePatterns(s,o)}_isSkippedByDeep(t,e){return this._settings.deep!==1/0&&this._getEntryLevel(t,e)>=this._settings.deep}_getEntryLevel(t,e){const n=e.split("/").length;return""===t?n:n-t.split("/").length}_isSkippedSymbolicLink(t){return!this._settings.followSymbolicLinks&&t.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(t,e){return!this._settings.baseNameMatch&&!e.match(t)}_isSkippedByNegativePatterns(e,n){return!t.pattern.matchAny(e,n)}},dn}(),n=function(){if(mn)return Rn;mn=1,Object.defineProperty(Rn,"__esModule",{value:!0});const t=jt();return Rn.default=class{constructor(t,e){this._settings=t,this._micromatchOptions=e,this.index=new Map}getFilter(e,n){const[r,o]=t.pattern.partitionAbsoluteAndRelative(n),s={positive:{all:t.pattern.convertPatternsToRe(e,this._micromatchOptions)},negative:{absolute:t.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:t.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return t=>this._filter(t,s)}_filter(e,n){const r=t.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(r))return!1;if(this._onlyFileFilter(e)||this._onlyDirectoryFilter(e))return!1;const o=this._isMatchToPatternsSet(r,n,e.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(r),o}_isDuplicateEntry(t){return this.index.has(t)}_createIndexRecord(t){this.index.set(t,void 0)}_onlyFileFilter(t){return this._settings.onlyFiles&&!t.dirent.isFile()}_onlyDirectoryFilter(t){return this._settings.onlyDirectories&&!t.dirent.isDirectory()}_isMatchToPatternsSet(t,e,n){return!!this._isMatchToPatterns(t,e.positive.all,n)&&(!this._isMatchToPatterns(t,e.negative.relative,n)&&!this._isMatchToAbsoluteNegative(t,e.negative.absolute,n))}_isMatchToAbsoluteNegative(e,n,r){if(0===n.length)return!1;const o=t.path.makeAbsolute(this._settings.cwd,e);return this._isMatchToPatterns(o,n,r)}_isMatchToPatterns(e,n,r){if(0===n.length)return!1;const o=t.pattern.matchAny(e,n);return!o&&r?t.pattern.matchAny(e+"/",n):o}},Rn}(),o=function(){if(vn)return bn;vn=1,Object.defineProperty(bn,"__esModule",{value:!0});const t=jt();return bn.default=class{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(e){return t.errno.isEnoentCodeError(e)||this._settings.suppressErrors}},bn}(),s=function(){if(Sn)return Pn;Sn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const t=jt();return Pn.default=class{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(e){let n=e.path;return this._settings.absolute&&(n=t.path.makeAbsolute(this._settings.cwd,n),n=t.path.unixify(n)),this._settings.markDirectories&&e.dirent.isDirectory()&&(n+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:n}):n}},Pn}();return fn.default=class{constructor(t){this._settings=t,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new e.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new s.default(this._settings)}_getRootDirectory(e){return t.resolve(this._settings.cwd,e.base)}_getReaderOptions(t){const e="."===t.base?"":t.base;return{basePath:e,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(e,t.positive,t.negative),entryFilter:this.entryFilter.getFilter(t.positive,t.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},fn}function Cn(){if(An)return It;An=1,Object.defineProperty(It,"__esModule",{value:!0});const t=function(){if(an)return Nt;an=1,Object.defineProperty(Nt,"__esModule",{value:!0});const t=en(),e=on(),n=cn();class r extends e.default{constructor(){super(...arguments),this._walkAsync=t.walk,this._readerStream=new n.default(this._settings)}dynamic(t,e){return new Promise((n,r)=>{this._walkAsync(t,e,(t,e)=>{null===t?n(e):r(t)})})}async static(t,e){const n=[],r=this._readerStream.static(t,e);return new Promise((t,e)=>{r.once("error",e),r.on("data",t=>n.push(t)),r.once("end",()=>t(n))})}}return Nt.default=r,Nt}(),e=xn();class n extends e.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}async read(t){const e=this._getRootDirectory(t),n=this._getReaderOptions(t);return(await this.api(e,t,n)).map(t=>n.transform(t))}api(t,e,n){return e.dynamic?this._reader.dynamic(t,n):this._reader.static(e.patterns,n)}}return It.default=n,It}var On,Tn={};var wn,kn,$n={},Ln={};function Mn(){if(kn)return $n;kn=1,Object.defineProperty($n,"__esModule",{value:!0});const t=function(){if(wn)return Ln;wn=1,Object.defineProperty(Ln,"__esModule",{value:!0});const t=ae(),e=en(),n=on();class r extends n.default{constructor(){super(...arguments),this._walkSync=e.walkSync,this._statSync=t.statSync}dynamic(t,e){return this._walkSync(t,e)}static(t,e){const n=[];for(const r of t){const t=this._getFullEntryPath(r),o=this._getEntry(t,r,e);null!==o&&e.entryFilter(o)&&n.push(o)}return n}_getEntry(t,e,n){try{const n=this._getStat(t);return this._makeEntry(n,e)}catch(t){if(n.errorFilter(t))return null;throw t}}_getStat(t){return this._statSync(t,this._fsStatSettings)}}return Ln.default=r,Ln}(),e=xn();class n extends e.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const e=this._getRootDirectory(t),n=this._getReaderOptions(t);return this.api(e,t,n).map(n.transform)}api(t,e,n){return e.dynamic?this._reader.dynamic(t,n):this._reader.static(e.patterns,n)}}return $n.default=n,$n}var Hn,Dn,jn,Fn={};!function(){if(jn)return Dn;jn=1;const t=function(){if(Mt)return h;Mt=1,Object.defineProperty(h,"__esModule",{value:!0}),h.convertPatternGroupToTask=h.convertPatternGroupsToTasks=h.groupPatternsByBaseDirectory=h.getNegativePatternsAsPositive=h.getPositivePatterns=h.convertPatternsToTasks=h.generate=void 0;const t=jt();function e(e,n){let r=e;return n.braceExpansion&&(r=t.pattern.expandPatternsWithBraceExpansion(r)),n.baseNameMatch&&(r=r.map(t=>t.includes("/")?t:`**/${t}`)),r.map(e=>t.pattern.removeDuplicateSlashes(e))}function n(e,n,r){const o=[],u=t.pattern.getPatternsOutsideCurrentDirectory(e),c=t.pattern.getPatternsInsideCurrentDirectory(e),l=s(u),p=s(c);return o.push(...i(l,n,r)),"."in p?o.push(a(".",c,n,r)):o.push(...i(p,n,r)),o}function r(e){return t.pattern.getPositivePatterns(e)}function o(e,n){return t.pattern.getNegativePatterns(e).concat(n).map(t.pattern.convertToPositivePattern)}function s(e){return e.reduce((e,n)=>{const r=t.pattern.getBaseDirectory(n);return r in e?e[r].push(n):e[r]=[n],e},{})}function i(t,e,n){return Object.keys(t).map(r=>a(r,t[r],e,n))}function a(e,n,r,o){return{dynamic:o,positive:n,negative:r,base:e,patterns:[].concat(n,r.map(t.pattern.convertToNegativePattern))}}return h.generate=function(s,i){const a=e(s,i),u=e(i.ignore,i),c=r(a),l=o(a,u),p=c.filter(e=>t.pattern.isStaticPattern(e,i)),h=c.filter(e=>t.pattern.isDynamicPattern(e,i)),f=n(p,l,!1),d=n(h,l,!0);return f.concat(d)},h.convertPatternsToTasks=n,h.getPositivePatterns=r,h.getNegativePatternsAsPositive=o,h.groupPatternsByBaseDirectory=s,h.convertPatternGroupsToTasks=i,h.convertPatternGroupToTask=a,h}(),e=Cn(),r=function(){if(On)return Tn;On=1,Object.defineProperty(Tn,"__esModule",{value:!0});const t=s,e=cn(),n=xn();class r extends n.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const n=this._getRootDirectory(e),r=this._getReaderOptions(e),o=this.api(n,e,r),s=new t.Readable({objectMode:!0,read:()=>{}});return o.once("error",t=>s.emit("error",t)).on("data",t=>s.emit("data",r.transform(t))).once("end",()=>s.emit("end")),s.once("close",()=>o.destroy()),s}api(t,e,n){return e.dynamic?this._reader.dynamic(t,n):this._reader.static(e.patterns,n)}}return Tn.default=r,Tn}(),o=Mn(),i=(Hn||(Hn=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const e=a,r=n,o=Math.max(r.cpus().length,1);t.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:e.lstat,lstatSync:e.lstatSync,stat:e.stat,statSync:e.statSync,readdir:e.readdir,readdirSync:e.readdirSync},t.default=class{constructor(t={}){this._options=t,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,o),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(t,e){return void 0===t?e:t}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},t.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Fn)),Fn),u=jt();async function c(t,n){p(t);const r=l(t,e.default,n),o=await Promise.all(r);return u.array.flatten(o)}function l(e,n,r){const o=[].concat(e),s=new i.default(r),a=t.generate(o,s),u=new n(s);return a.map(u.read,u)}function p(t){if(![].concat(t).every(t=>u.string.isString(t)&&!u.string.isEmpty(t)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}(function(e){function n(t,e){p(t);const n=l(t,o.default,e);return u.array.flatten(n)}function s(t,e){p(t);const n=l(t,r.default,e);return u.stream.merge(n)}var a,c;e.glob=e,e.globSync=n,e.globStream=s,e.async=e,e.sync=n,e.stream=s,e.generateTasks=function(e,n){p(e);const r=[].concat(e),o=new i.default(n);return t.generate(r,o)},e.isDynamicPattern=function(t,e){p(t);const n=new i.default(e);return u.pattern.isDynamicPattern(t,n)},e.escapePath=function(t){return p(t),u.path.escape(t)},e.convertPathToPattern=function(t){return p(t),u.path.convertPathToPattern(t)},(a=e.posix||(e.posix={})).escapePath=function(t){return p(t),u.path.escapePosixPath(t)},a.convertPathToPattern=function(t){return p(t),u.path.convertPosixPathToPattern(t)},(c=e.win32||(e.win32={})).escapePath=function(t){return p(t),u.path.escapeWindowsPath(t)},c.convertPathToPattern=function(t){return p(t),u.path.convertWindowsPathToPattern(t)}})(c||(c={})),Dn=c}();const In=(n,r,o,s)=>{const i=e.resolve(r,n);if(!t.existsSync(i))throw new Error(`[ono-auto-router] Pages directory does not exist: ${i}`);const a=o.split(".")[0],u=(t=>`// Auto-generated by ono-auto-router${t?"\nexport { defineConfig } from './defineConfig'":""}\nexport { routes } from './getRoutes'\n`)(s),c=((t,e)=>`// Auto-generated by ono-auto-router${e?"\nimport type { RouteRecordRaw } from 'vue-router'":""}\nimport { buildRouteTree } from './buildRouteTree'\nimport { cleanIsRoot } from './cleanIsRoot'\nimport { removeEmptyChildren } from './removeEmptyChildren'${e?"\nimport type { MyRouteObject, PageConfig, PagesComponentType } from './types'":""}\nimport { hasDuplicateProperty, replaceBracketsWithColon } from './utils'\n\nconst pathCache = new Map${e?"<string, { compPath: string; basePath: string }>":""}()\nconst basenameCache = new Map${e?"<string, string>":""}()\n\nconst normalizePagePath = ${e?"(key: string): string":"(key)"} => {\n if (key.includes('index.vue')) return key.replace('index.vue', 'index.${e?"ts":"js"}')\n if (key.includes('root.vue')) return key.replace('root.vue', 'root/index.${e?"ts":"js"}')\n if (key.includes('404.vue')) return key.replace('404.vue', '404/index.${e?"ts":"js"}')\n if (key.toLowerCase().includes('notfound.vue'))\n return key.toLowerCase().replace('notfound.vue', 'notfound/index.${e?"ts":"js"}')\n return key\n}\n\nconst getBasename = ${e?"(filePath: string, ext?: string): string":"(filePath, ext)"} => {\n const cacheKey = ext ? filePath + ':' + ext : filePath\n if (basenameCache.has(cacheKey)) {\n return basenameCache.get(cacheKey)${e?"!":""}\n }\n const parts = filePath.split('/')\n const lastPart = parts[parts.length - 1] || ''\n let result = lastPart\n if (ext && lastPart.endsWith(ext)) {\n result = lastPart.slice(0, -ext.length)\n }\n basenameCache.set(cacheKey, result)\n return result\n}\n\nconst getDirname = ${e?"(filePath: string): string":"(filePath)"} => {\n const parts = filePath.split('/')\n parts.pop()\n return parts.join('/')\n}\n\nconst getPathsFromConfig = ${e?"(configPath: string)":"(configPath)"} => {\n const cacheKey = configPath\n if (pathCache.has(cacheKey)) {\n return pathCache.get(cacheKey)${e?"!":""}\n }\n\n let compPath${e?": string":" = ''"}\n let basePath${e?": string":" = ''"}\n\n if (configPath.endsWith('.config.${e?"ts":"js"}')) {\n const fileName = getBasename(configPath, '.config.${e?"ts":"js"}')\n const dirPath = getDirname(configPath).replace('/${t}', '')\n\n if (fileName === 'index') {\n compPath = configPath.replace('index.config.${e?"ts":"js"}', 'index.${e?"ts":"js"}')\n basePath = dirPath || '/'\n } else {\n compPath = configPath.slice(0, -10) + '.vue'\n basePath = dirPath ? dirPath + '/' + fileName : '/' + fileName\n }\n } else {\n compPath = configPath.replace('index.config.${e?"ts":"js"}', 'index.${e?"ts":"js"}')\n basePath =\n configPath.replace('/${t}', '').replace('/index.config.${e?"ts":"js"}', '') ||\n '/'\n }\n\n const result = { compPath, basePath }\n pathCache.set(cacheKey, result)\n return result\n}\n\nconst formatPath = ${e?"(path: string): string":"(path)"} => {\n const lowerPath = path.toLowerCase()\n if (lowerPath === '/home') return '/'\n if (lowerPath === '/notfound' || path === '/404') return '/:pathMatch(.*)*'\n return path.replace('/index.${e?"ts":"js"}', '') || '/'\n}\n\nconst getConfigFileName = ${e?"(pagePath: string): string":"(pagePath)"} => {\n if (pagePath.endsWith('.vue')) {\n return pagePath.slice(0, -4) + '.config.${e?"ts":"js"}'\n }\n return pagePath.replace('index.${e?"ts":"js"}', 'index.config.${e?"ts":"js"}')\n}\n\nconst createBaseRoutes = ()${e?": MyRouteObject[]":""} => {\n const pagesComponent = Object.fromEntries(\n Object.entries({\n ...import.meta.glob('/${t}/**/index.vue'),\n ...import.meta.glob('/${t}/*.vue')\n }${e?" as PagesComponentType":""}).map(([key, value]) => [\n normalizePagePath(key),\n value\n ])\n )\n\n const pagesModule${e?": Record<string, PageConfig>":""} = import.meta.glob(\n '/${t}/**/*.config.${e?"ts":"js"}',\n { eager: true, import: 'default' }\n )\n\n const result${e?": MyRouteObject[]":""} = []\n\n for (const pagePath of Object.keys(pagesComponent)) {\n const configPath = getConfigFileName(pagePath)\n const content = pagesModule[configPath] || {}\n const { compPath, basePath } = getPathsFromConfig(configPath)\n const path = replaceBracketsWithColon(content?.path || basePath || '/')\n const name = path.split('/').filter(Boolean).join('-') || 'index'\n\n result.push({\n path: formatPath(path),\n name,\n component: pagesComponent[compPath],\n isRoot: path === '/root',\n ...content${e?"!":""}\n })\n }\n\n return result\n}\n\nconst processRoutes = ${e?"(\n routes: MyRouteObject[],\n removeLeadingSlash = false\n): MyRouteObject[]":"(routes, removeLeadingSlash)"} =>\n buildRouteTree(routes, removeLeadingSlash)\n .map(removeEmptyChildren)\n .map(cleanIsRoot)\n\nconst handleRootRoute = ${e?"(\n routes: (MyRouteObject & { isRoot?: boolean })[]\n): MyRouteObject[]":"(routes)"} => {\n let rootRoute${e?": (MyRouteObject & { isRoot?: boolean }) | undefined":" = undefined"}\n let homeRoute${e?": MyRouteObject | undefined":" = undefined"}\n let notFoundRoute${e?": MyRouteObject | undefined":" = undefined"}\n const filteredRoutes${e?": (MyRouteObject & { isRoot?: boolean })[]":""} = []\n\n for (const route of routes) {\n if (route.isRoot) {\n if (rootRoute)\n throw new Error('There cannot be multiple root routes in a route')\n rootRoute = route\n } else if (route.path === '/') {\n homeRoute = route\n } else if (route.path === '/:pathMatch(.*)*') {\n notFoundRoute = route\n } else {\n filteredRoutes.push(route)\n }\n }\n\n if (hasDuplicateProperty(filteredRoutes, 'path'))\n throw new Error('There cannot be duplicate paths in a route')\n\n const processedRoutes${e?": (MyRouteObject & { isRoot?: boolean })[]":""} = []\n\n if (rootRoute) {\n const children = [\n homeRoute && { ...homeRoute, path: '' },\n ...processRoutes(filteredRoutes, true)\n ].filter(Boolean)${e?" as MyRouteObject[]":""}\n processedRoutes.push({ ...rootRoute, path: '/', children })\n }\n\n if (notFoundRoute) processedRoutes.push(notFoundRoute)\n\n return processedRoutes.map(cleanIsRoot)\n}\n\nexport const createRoutes = ()${e?": RouteRecordRaw[]":""} => {\n const routes = createBaseRoutes()\n\n if (routes.some((r${e?": MyRouteObject & { isRoot?: boolean }":""}) => r.isRoot))\n return handleRootRoute(routes)${e?" as RouteRecordRaw[]":""}\n\n if (hasDuplicateProperty(routes, 'path'))\n throw new Error('There cannot be duplicate paths in a route')\n\n return processRoutes(routes)${e?" as RouteRecordRaw[]":""}\n}\n`)(n,s),l=(t=>`// Auto-generated by ono-auto-router${t?"\nimport type { MyRouteObject } from './types'\n":""}\nexport const buildRouteTree = ${t?"(\n routes: MyRouteObject[],\n removeLeadingSlash: boolean = false\n)":"(routes, removeLeadingSlash)"} => {\n const routeMap = new Map${t?"<string, MyRouteObject & { isRoot?: boolean }>":""}()\n const rootRoutes${t?": MyRouteObject[]":""} = []\n\n const sortedRoutes = [...routes].sort((a, b) => a.path.length - b.path.length)\n\n for (const route of sortedRoutes) {\n let path = route.path\n if (removeLeadingSlash && path.startsWith('/')) {\n path = path.slice(1)\n }\n routeMap.set(path, { ...route, path, children: [] })\n }\n\n for (const [path, route] of routeMap) {\n const slashIndex = path.lastIndexOf('/')\n\n if (slashIndex <= 0) {\n const { isRoot, ...rest } = route\n rootRoutes.push(rest)\n continue\n }\n\n const parentPath = path.slice(0, slashIndex)\n const parentRoute = routeMap.get(parentPath)\n\n if (parentRoute) {\n const relativePath = path.slice(slashIndex + 1)\n const childRoute = { ...route, path: relativePath }\n parentRoute.children${t?"!":""}.push(childRoute)\n } else {\n const { isRoot, ...rest } = route\n rootRoutes.push(rest)\n }\n }\n\n return rootRoutes\n}\n`)(s),p=(t=>`// Auto-generated by ono-auto-router${t?"\nimport type { MyRouteObject } from './types'\n":""}\nexport const cleanIsRoot = ${t?"(\n route: MyRouteObject & { isRoot?: boolean }\n): MyRouteObject":"(route)"} => {\n const { isRoot, type, children, ...rest } = route\n const result${t?": MyRouteObject":""} = { ...rest }\n\n if (children?.length) {\n result.children = children.map(cleanIsRoot)\n }\n\n return result\n}\n`)(s),h=(t=>`// Auto-generated by ono-auto-router${t?"\nimport type { MyRouteObject } from './types'\n":""}\nexport const removeEmptyChildren = ${t?"(route: MyRouteObject): MyRouteObject":"(route)"} => {\n if (!route.children?.length) {\n const { children, ...rest } = route\n return rest\n }\n\n const hasIndexRoute = route.children.some(\n child => child.path === '' || child.path === '/'\n )\n\n const routeType = route.type || 'single'\n\n if (routeType === 'wrap') {\n const { children, ...rest } = route\n return { ...rest, children: children.map(removeEmptyChildren) }\n }\n\n if (routeType === 'single' || (!hasIndexRoute && route.component)) {\n const { path, component, type, ...rest } = route\n return {\n path,\n children: [\n { path: '', component, ...rest }${t?" as MyRouteObject":""},\n ...route.children.map(removeEmptyChildren)\n ]\n }\n }\n\n if (hasIndexRoute) {\n const { path, ...rest } = route\n const updatedChildren = route.children.map(child =>\n child.path === '' || child.path === '/' ? { ...rest, ...child } : child\n )\n return { path, children: updatedChildren.map(removeEmptyChildren) }\n }\n\n return { ...route, children: route.children.map(removeEmptyChildren) }\n}\n`)(s),f=s?"// Auto-generated by ono-auto-router\nimport type { PageConfig } from './types'\n\nexport const defineConfig = (config: PageConfig) => config\n":"",d=s?"// Auto-generated by ono-auto-router\nimport type { RouteRecordRaw } from 'vue-router'\n\nexport type PagesComponentType = Record<string, () => Promise<unknown>>\n\nexport interface MyRouteObject extends Omit<RouteRecordRaw, 'children'> {\n type?: 'single' | 'wrap'\n isRoot?: boolean\n children?: MyRouteObject[]\n}\n\nexport type PageConfig = Partial<Omit<MyRouteObject, 'component' | 'children' | 'isRoot'>>\n":"",g=(t=>`// Auto-generated by ono-auto-router\nconst hasDuplicateProperty = ${t?"<T>(items: T[], propName: keyof T)":"(items, propName)"} => {\n const seenValues = new Set()\n return items.some(item => {\n if (seenValues.has(item[propName])) {\n return true\n }\n seenValues.add(item[propName])\n return false\n })\n}\n\nconst replaceBracketsWithColon = ${t?"(str: string)":"(str)"} => {\n return str.replace(/\\[([^\\]]+)\\]/g, ':$1').replace('.tsx', '')\n}\n\nexport { hasDuplicateProperty, replaceBracketsWithColon }\n`)(s);Gn(e.resolve(a,"./index."+(s?"ts":"js")),u),Gn(e.resolve(a,"./createRoutes."+(s?"ts":"js")),c),Gn(e.resolve(a,"./buildRouteTree."+(s?"ts":"js")),l),Gn(e.resolve(a,"./cleanIsRoot."+(s?"ts":"js")),p),Gn(e.resolve(a,"./removeEmptyChildren."+(s?"ts":"js")),h),f&&Gn(e.resolve(a,"./defineConfig.ts"),f),d&&Gn(e.resolve(a,"./types.ts"),d),Gn(e.resolve(a,"./getRoutes."+(s?"ts":"js")),"// Auto-generated by ono-auto-router\nimport { createRoutes } from './createRoutes'\n\nexport const routes = createRoutes()\n"),Gn(e.resolve(a,"./utils."+(s?"ts":"js")),g)},Nn=e=>{try{if(!t.existsSync(e))return;t.unlinkSync(e)}catch(t){console.error("删除文件失败:",t)}},Bn=(e,n,r,o,s,i)=>{const a=u(r),c=o.split(".")[0];Nn(c+".js"),Nn(c+".ts"),Nn(c+".jsx"),Nn(c+".tsx"),(e=>{try{if(!t.existsSync(e))return;t.rmSync(e,{recursive:!0})}catch(t){console.error("删除目录失败:",t)}})(c),In(n,r,o,a)};async function Gn(n,r){const o=e.dirname(n);await t.promises.mkdir(o,{recursive:!0}),await t.promises.writeFile(n,r,"utf-8")}function Un(n){const{pagesDir:r="src/pages",routesFile:o,lazy:s=!0,hmr:i=!1}=n||{};let a,l;return{name:"ono-vite-plugin-auto-router-vue",configResolved:async n=>{a=n,l=a.root;const s=e.resolve(l,r);if(!t.existsSync(s))throw new Error(`Pages directory not found: ${s}`);const i=((t,n,r)=>{let o=r;return o||(o=e.resolve(n,c[t][u(n)?"ts":"js"])),o})("vue",l,o);Bn(0,r,l,i),console.log(`[ono-auto-router] Routes file generated: ${i}`)}}}export{Un as default};
package/package.json CHANGED
@@ -1,55 +1,55 @@
1
- {
2
- "name": "@onoxm/vite-plugin-auto-router",
3
- "version": "0.1.2",
4
- "description": "",
5
- "type": "module",
6
- "main": "dist/index.cjs",
7
- "module": "dist/index.js",
8
- "types": "dist/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "import": "./dist/index.js",
12
- "require": "./dist/index.cjs",
13
- "types": "./dist/index.d.ts"
14
- },
15
- "./react": {
16
- "import": "./dist/react.js",
17
- "require": "./dist/react.cjs",
18
- "types": "./dist/react.d.ts"
19
- },
20
- "./vue": {
21
- "import": "./dist/vue.js",
22
- "require": "./dist/vue.cjs",
23
- "types": "./dist/vue.d.ts"
24
- }
25
- },
26
- "scripts": {
27
- "build": "rimraf dist && rollup -c rollup.config.js"
28
- },
29
- "keywords": [],
30
- "author": "ono",
31
- "license": "MIT",
32
- "files": [
33
- "dist"
34
- ],
35
- "devDependencies": {
36
- "@rollup/plugin-commonjs": "^29.0.2",
37
- "@rollup/plugin-json": "^6.1.0",
38
- "@rollup/plugin-node-resolve": "^16.0.3",
39
- "@rollup/plugin-terser": "^1.0.0",
40
- "@rollup/plugin-typescript": "^12.1.2",
41
- "@types/node": "^24.1.12",
42
- "@types/react": "^18.0.0",
43
- "fast-glob": "^3.3.3",
44
- "react-router": "^7.0.0",
45
- "rimraf": "^6.1.3",
46
- "rollup": "^4.59.0",
47
- "rollup-plugin-dts": "^6.1.1",
48
- "tslib": "^2.8.1",
49
- "typescript": "~5.8.3",
50
- "vite": "^7.0.0"
51
- },
52
- "publishConfig": {
53
- "access": "public"
54
- }
55
- }
1
+ {
2
+ "name": "@onoxm/vite-plugin-auto-router",
3
+ "version": "0.1.4",
4
+ "description": "",
5
+ "type": "module",
6
+ "main": "dist/index.cjs",
7
+ "module": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.js",
12
+ "require": "./dist/index.cjs",
13
+ "types": "./dist/index.d.ts"
14
+ },
15
+ "./react": {
16
+ "import": "./dist/react.js",
17
+ "require": "./dist/react.cjs",
18
+ "types": "./dist/react.d.ts"
19
+ },
20
+ "./vue": {
21
+ "import": "./dist/vue.js",
22
+ "require": "./dist/vue.cjs",
23
+ "types": "./dist/vue.d.ts"
24
+ }
25
+ },
26
+ "keywords": [],
27
+ "author": "ono",
28
+ "license": "MIT",
29
+ "files": [
30
+ "dist"
31
+ ],
32
+ "devDependencies": {
33
+ "@rollup/plugin-commonjs": "^29.0.2",
34
+ "@rollup/plugin-json": "^6.1.0",
35
+ "@rollup/plugin-node-resolve": "^16.0.3",
36
+ "@rollup/plugin-terser": "^1.0.0",
37
+ "@rollup/plugin-typescript": "^12.1.2",
38
+ "@types/node": "^24.1.12",
39
+ "@types/react": "^18.0.0",
40
+ "fast-glob": "^3.3.3",
41
+ "react-router": "^7.0.0",
42
+ "rimraf": "^6.1.3",
43
+ "rollup": "^4.59.0",
44
+ "rollup-plugin-dts": "^6.1.1",
45
+ "tslib": "^2.8.1",
46
+ "typescript": "~5.8.3",
47
+ "vite": "^7.0.0"
48
+ },
49
+ "publishConfig": {
50
+ "access": "public"
51
+ },
52
+ "scripts": {
53
+ "build": "rimraf dist && rollup -c rollup.config.js"
54
+ }
55
+ }