@likec4/mcp 1.56.0 → 1.57.0

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.
@@ -1 +1 @@
1
- import{o as e,t}from"../rolldown-runtime.mjs";var n=t((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.normalizePath=t.convertSlashes=t.cleanPath=void 0;let n=e(`node:path`);function cleanPath(e){let t=(0,n.normalize)(e);return t.length>1&&t[t.length-1]===n.sep&&(t=t.substring(0,t.length-1)),t}t.cleanPath=cleanPath;let r=/[\\/]/g;function convertSlashes(e,t){return e.replace(r,t)}t.convertSlashes=convertSlashes;function normalizePath(e,t){let{resolvePaths:r,normalizePath:i,pathSeparator:a}=t,o=process.platform===`win32`&&e.includes(`/`)||e.startsWith(`.`);return r&&(e=(0,n.resolve)(e)),(i||o)&&(e=cleanPath(e)),e===`.`?``:convertSlashes(e[e.length-1]===a?e:e+a,a)}t.normalizePath=normalizePath})),r=t((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.build=t.joinDirectoryPath=t.joinPathWithBasePath=void 0;let r=e(`node:path`),i=n();function joinPathWithBasePath(e,t){return t+e}t.joinPathWithBasePath=joinPathWithBasePath;function joinPathWithRelativePath(e,t){return function(n,a){return a.startsWith(e)?a.replace(e,``)+n:(0,i.convertSlashes)((0,r.relative)(e,a),t.pathSeparator)+t.pathSeparator+n}}function joinPath(e){return e}function joinDirectoryPath(e,t,n){return t+e+n}t.joinDirectoryPath=joinDirectoryPath;function build(e,t){let{relativePaths:n,includeBasePath:r}=t;return n&&e?joinPathWithRelativePath(e,t):r?joinPathWithBasePath:joinPath}t.build=build})),i=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.build=void 0;function pushDirectoryWithRelativePath(e){return function(t,n){n.push(t.substring(e.length)||`.`)}}function pushDirectoryFilterWithRelativePath(e){return function(t,n,r){let i=t.substring(e.length)||`.`;r.every(e=>e(i,!0))&&n.push(i)}}let pushDirectory=(e,t)=>{t.push(e||`.`)},pushDirectoryFilter=(e,t,n)=>{let r=e||`.`;n.every(e=>e(r,!0))&&t.push(r)},empty=()=>{};function build(e,t){let{includeDirs:n,filters:r,relativePaths:i}=t;return n?i?r&&r.length?pushDirectoryFilterWithRelativePath(e):pushDirectoryWithRelativePath(e):r&&r.length?pushDirectoryFilter:pushDirectory:empty}e.build=build})),a=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.build=void 0;let pushFileFilterAndCount=(e,t,n,r)=>{r.every(t=>t(e,!1))&&n.files++},pushFileFilter=(e,t,n,r)=>{r.every(t=>t(e,!1))&&t.push(e)},pushFileCount=(e,t,n,r)=>{n.files++},pushFile=(e,t)=>{t.push(e)},empty=()=>{};function build(e){let{excludeFiles:t,filters:n,onlyCounts:r}=e;return t?empty:n&&n.length?r?pushFileFilterAndCount:pushFileFilter:r?pushFileCount:pushFile}e.build=build})),o=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.build=void 0;let getArray=e=>e,getArrayGroup=()=>[``].slice(0,0);function build(e){return e.group?getArrayGroup:getArray}e.build=build})),s=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.build=void 0;let groupFiles=(e,t,n)=>{e.push({directory:t,files:n,dir:t})},empty=()=>{};function build(e){return e.group?groupFiles:empty}e.build=build})),c=t((t=>{var n=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,`__esModule`,{value:!0}),t.build=void 0;let r=n(e(`node:fs`)),resolveSymlinksAsync=function(e,t,n){let{queue:i,options:{suppressErrors:a}}=t;i.enqueue(),r.default.stat(e,(r,o)=>{if(r){i.dequeue(a?null:r,t);return}n(o,e),i.dequeue(null,t)})},resolveSymlinksWithRealPathsAsync=function(e,t,n){let{queue:i,options:{suppressErrors:a}}=t;i.enqueue(),r.default.realpath(e,(e,o)=>{if(e){i.dequeue(a?null:e,t);return}r.default.lstat(o,(e,r)=>{n(r,o),i.dequeue(null,t)})})},resolveSymlinksSync=function(e,t,n){try{n(r.default.statSync(e),e)}catch(e){if(!t.options.suppressErrors)throw e}},resolveSymlinksWithRealPathsSync=function(e,t,n){try{let t=r.default.realpathSync(e);n(r.default.lstatSync(t),t)}catch(e){if(!t.options.suppressErrors)throw e}};function build(e,t){return!e.resolveSymlinks||e.excludeSymlinks?null:e.useRealPaths?t?resolveSymlinksWithRealPathsSync:resolveSymlinksWithRealPathsAsync:t?resolveSymlinksSync:resolveSymlinksAsync}t.build=build})),l=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.build=void 0;let onlyCountsSync=e=>e.counts,groupsSync=e=>e.groups,defaultSync=e=>e.paths,limitFilesSync=e=>e.paths.slice(0,e.options.maxFiles),onlyCountsAsync=(e,t,n)=>(report(t,n,e.counts,e.options.suppressErrors),null),defaultAsync=(e,t,n)=>(report(t,n,e.paths,e.options.suppressErrors),null),limitFilesAsync=(e,t,n)=>(report(t,n,e.paths.slice(0,e.options.maxFiles),e.options.suppressErrors),null),groupsAsync=(e,t,n)=>(report(t,n,e.groups,e.options.suppressErrors),null);function report(e,t,n,r){t(e&&!r?e:null,n)}function build(e,t){let{onlyCounts:n,group:r,maxFiles:i}=e;return n?t?onlyCountsSync:onlyCountsAsync:r?t?groupsSync:groupsAsync:i?t?limitFilesSync:limitFilesAsync:t?defaultSync:defaultAsync}e.build=build})),u=t((t=>{var n=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,`__esModule`,{value:!0}),t.build=void 0;let r=n(e(`node:fs`)),i={withFileTypes:!0},walkAsync=(e,t,n,a)=>{if(e.queue.enqueue(),n<0){e.queue.dequeue(null,e);return}e.counts.directories++,r.default.readdir(t||`.`,i,function process(r,i=[]){a(i,t,n),e.queue.dequeue(e.options.suppressErrors?null:r,e)})},walkSync=(e,t,n,a)=>{if(n<0)return;e.counts.directories++;let o=[];try{o=r.default.readdirSync(t||`.`,i)}catch(t){if(!e.options.suppressErrors)throw t}a(o,t,n)};function build(e){return e?walkSync:walkAsync}t.build=build})),d=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Queue=void 0;var Queue=class{onQueueEmpty;count=0;constructor(e){this.onQueueEmpty=e}enqueue(){this.count++}dequeue(e,t){(--this.count===0||e)&&this.onQueueEmpty(e,t)}};e.Queue=Queue})),f=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Counter=void 0;var Counter=class{_files=0;_directories=0;set files(e){this._files=e}get files(){return this._files}set directories(e){this._directories=e}get directories(){return this._directories}get dirs(){return this._directories}};e.Counter=Counter})),p=t((t=>{var p=t&&t.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),m=t&&t.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),h=t&&t.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!==`default`&&Object.prototype.hasOwnProperty.call(e,n)&&p(t,e,n);return m(t,e),t};Object.defineProperty(t,`__esModule`,{value:!0}),t.Walker=void 0;let g=e(`node:path`),_=n(),v=h(r()),y=h(i()),b=h(a()),x=h(o()),S=h(s()),C=h(c()),w=h(l()),T=h(u()),E=d(),D=f();var Walker=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,t,n){this.isSynchronous=!n,this.callbackInvoker=w.build(t,this.isSynchronous),this.state={paths:[``].slice(0,0),groups:[],counts:new D.Counter,options:t,queue:new E.Queue((e,t)=>this.callbackInvoker(t,e,n))},this.root=(0,_.normalizePath)(e,this.state.options),this.joinPath=v.build(this.root,t),this.pushDirectory=y.build(this.root,t),this.pushFile=b.build(t),this.getArray=x.build(t),this.groupFiles=S.build(t),this.resolveSymlink=C.build(t,this.isSynchronous),this.walkDirectory=T.build(this.isSynchronous)}start(){return this.walkDirectory(this.state,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(e,t,n)=>{let{paths:r,options:{filters:i,resolveSymlinks:a,excludeSymlinks:o,exclude:s,maxFiles:c,signal:l}}=this.state;if(l&&l.aborted||c&&r.length>c)return;this.pushDirectory(t,r,i);let u=this.getArray(this.state.paths);for(let r=0;r<e.length;++r){let c=e[r];if(c.isFile()||c.isSymbolicLink()&&!a&&!o){let e=this.joinPath(c.name,t);this.pushFile(e,u,this.state.counts,i)}else if(c.isDirectory()){let e=v.joinDirectoryPath(c.name,t,this.state.options.pathSeparator);if(s&&s(c.name,e))continue;this.walkDirectory(this.state,e,n-1,this.walk)}else if(c.isSymbolicLink()&&this.resolveSymlink){let e=v.joinPathWithBasePath(c.name,t);this.resolveSymlink(e,this.state,(e,t)=>{if(e.isDirectory()){if(t=(0,_.normalizePath)(t,this.state.options),s&&s(c.name,t))return;this.walkDirectory(this.state,t,n-1,this.walk)}else{let e=(0,g.basename)(t),n=(0,_.normalizePath)((0,g.dirname)(t),this.state.options);t=this.joinPath(e,n),this.pushFile(t,u,this.state.counts,i)}})}}this.groupFiles(this.state.groups,t,u)}};t.Walker=Walker})),m=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.callback=e.promise=void 0;let t=p();function promise(e,t){return new Promise((n,r)=>{callback(e,t,(e,t)=>{if(e)return r(e);n(t)})})}e.promise=promise;function callback(e,n,r){new t.Walker(e,n,r).start()}e.callback=callback})),h=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.sync=void 0;let t=p();function sync(e,n){return new t.Walker(e,n).start()}e.sync=sync})),g=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.APIBuilder=void 0;let t=m(),n=h();var APIBuilder=class{root;options;constructor(e,t){this.root=e,this.options=t}withPromise(){return(0,t.promise)(this.root,this.options)}withCallback(e){(0,t.callback)(this.root,this.options,e)}sync(){return(0,n.sync)(this.root,this.options)}};e.APIBuilder=APIBuilder})),_=t(((e,t)=>{let n=`[^\\\\/]`,r=`[^/]`,i=`(?:\\/|$)`,a=`(?:^|\\/)`,o=`\\.{1,2}${i}`,s={DOT_LITERAL:`\\.`,PLUS_LITERAL:`\\+`,QMARK_LITERAL:`\\?`,SLASH_LITERAL:`\\/`,ONE_CHAR:`(?=.)`,QMARK:r,END_ANCHOR:i,DOTS_SLASH:o,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!${a}${o})`,NO_DOT_SLASH:`(?!\\.{0,1}${i})`,NO_DOTS_SLASH:`(?!${o})`,QMARK_NO_DOT:`[^.\\/]`,STAR:`${r}*?`,START_ANCHOR:a,SEP:`/`},c={...s,SLASH_LITERAL:`[\\\\/]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`\\.{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!\\.{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!\\.{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:`[^.\\\\/]`,START_ANCHOR:`(?:^|[\\\\/])`,END_ANCHOR:`(?:[\\\\/]|$)`,SEP:`\\`};t.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:{__proto__:null,alnum:`a-zA-Z0-9`,alpha:`a-zA-Z`,ascii:`\\x00-\\x7F`,blank:` \\t`,cntrl:`\\x00-\\x1F\\x7F`,digit:`0-9`,graph:`\\x21-\\x7E`,lower:`a-z`,print:`\\x20-\\x7E `,punct:`\\-!"#$%&'()\\*+,./:;<=>?@[\\]^_\`{|}~`,space:` \\t\\r\\n\\v\\f`,upper:`A-Z`,word:`A-Za-z0-9_`,xdigit:`A-Fa-f0-9`},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":`*`,"**/**":`**`,"**/**/**":`**`},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:`negate`,open:`(?:(?!(?:`,close:`))${e.STAR})`},"?":{type:`qmark`,open:`(?:`,close:`)?`},"+":{type:`plus`,open:`(?:`,close:`)+`},"*":{type:`star`,open:`(?:`,close:`)*`},"@":{type:`at`,open:`(?:`,close:`)`}}},globChars(e){return e===!0?c:s}}})),v=t((e=>{let{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=_();e.isObject=e=>typeof e==`object`&&!!e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,`\\$1`),e.toPosixSlashes=e=>e.replace(t,`/`),e.isWindows=()=>{if(typeof navigator<`u`&&navigator.platform){let e=navigator.platform.toLowerCase();return e===`win32`||e===`windows`}return typeof process<`u`&&process.platform?process.platform===`win32`:!1},e.removeBackslashes=e=>e.replace(n,e=>e===`\\`?``:e),e.escapeLast=(t,n,r)=>{let i=t.lastIndexOf(n,r);return i===-1?t:t[i-1]===`\\`?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith(`./`)&&(n=n.slice(2),t.prefix=`./`),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?``:`^`}(?:${e})${n.contains?``:`$`}`;return t.negated===!0&&(r=`(?:^(?!${r}).*$)`),r},e.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:`/`),r=n[n.length-1];return r===``?n[n.length-2]:r}})),y=t(((e,t)=>{let n=v(),{CHAR_ASTERISK:r,CHAR_AT:i,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:o,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:p,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:h,CHAR_RIGHT_PARENTHESES:g,CHAR_RIGHT_SQUARE_BRACKET:y}=_(),isPathSeparator=e=>e===l||e===a,depth=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},scan=(e,t)=>{let _=t||{},v=e.length-1,b=_.parts===!0||_.scanToEnd===!0,x=[],S=[],C=[],w=e,T=-1,E=0,D=0,O=!1,k=!1,A=!1,j=!1,M=!1,N=!1,P=!1,F=!1,I=!1,L=!1,R=0,z,B,V={value:``,depth:0,isGlob:!1},eos=()=>T>=v,peek=()=>w.charCodeAt(T+1),advance=()=>(z=B,w.charCodeAt(++T));for(;T<v;){B=advance();let e;if(B===a){P=V.backslashes=!0,B=advance(),B===u&&(N=!0);continue}if(N===!0||B===u){for(R++;eos()!==!0&&(B=advance());){if(B===a){P=V.backslashes=!0,advance();continue}if(B===u){R++;continue}if(N!==!0&&B===s&&(B=advance())===s){if(O=V.isBrace=!0,A=V.isGlob=!0,L=!0,b===!0)continue;break}if(N!==!0&&B===o){if(O=V.isBrace=!0,A=V.isGlob=!0,L=!0,b===!0)continue;break}if(B===h&&(R--,R===0)){N=!1,O=V.isBrace=!0,L=!0;break}}if(b===!0)continue;break}if(B===l){if(x.push(T),S.push(V),V={value:``,depth:0,isGlob:!1},L===!0)continue;if(z===s&&T===E+1){E+=2;continue}D=T+1;continue}if(_.noext!==!0&&(B===p||B===i||B===r||B===m||B===c)&&peek()===d){if(A=V.isGlob=!0,j=V.isExtglob=!0,L=!0,B===c&&T===E&&(I=!0),b===!0){for(;eos()!==!0&&(B=advance());){if(B===a){P=V.backslashes=!0,B=advance();continue}if(B===g){A=V.isGlob=!0,L=!0;break}}continue}break}if(B===r){if(z===r&&(M=V.isGlobstar=!0),A=V.isGlob=!0,L=!0,b===!0)continue;break}if(B===m){if(A=V.isGlob=!0,L=!0,b===!0)continue;break}if(B===f){for(;eos()!==!0&&(e=advance());){if(e===a){P=V.backslashes=!0,advance();continue}if(e===y){k=V.isBracket=!0,A=V.isGlob=!0,L=!0;break}}if(b===!0)continue;break}if(_.nonegate!==!0&&B===c&&T===E){F=V.negated=!0,E++;continue}if(_.noparen!==!0&&B===d){if(A=V.isGlob=!0,b===!0){for(;eos()!==!0&&(B=advance());){if(B===d){P=V.backslashes=!0,B=advance();continue}if(B===g){L=!0;break}}continue}break}if(A===!0){if(L=!0,b===!0)continue;break}}_.noext===!0&&(j=!1,A=!1);let H=w,U=``,W=``;E>0&&(U=w.slice(0,E),w=w.slice(E),D-=E),H&&A===!0&&D>0?(H=w.slice(0,D),W=w.slice(D)):A===!0?(H=``,W=w):H=w,H&&H!==``&&H!==`/`&&H!==w&&isPathSeparator(H.charCodeAt(H.length-1))&&(H=H.slice(0,-1)),_.unescape===!0&&(W&&=n.removeBackslashes(W),H&&P===!0&&(H=n.removeBackslashes(H)));let G={prefix:U,input:e,start:E,base:H,glob:W,isBrace:O,isBracket:k,isGlob:A,isExtglob:j,isGlobstar:M,negated:F,negatedExtglob:I};if(_.tokens===!0&&(G.maxDepth=0,isPathSeparator(B)||S.push(V),G.tokens=S),_.parts===!0||_.tokens===!0){let t;for(let n=0;n<x.length;n++){let r=t?t+1:E,i=x[n],a=e.slice(r,i);_.tokens&&(n===0&&E!==0?(S[n].isPrefix=!0,S[n].value=U):S[n].value=a,depth(S[n]),G.maxDepth+=S[n].depth),(n!==0||a!==``)&&C.push(a),t=i}if(t&&t+1<e.length){let n=e.slice(t+1);C.push(n),_.tokens&&(S[S.length-1].value=n,depth(S[S.length-1]),G.maxDepth+=S[S.length-1].depth)}G.slashes=x,G.parts=C}return G};t.exports=scan})),b=t(((e,t)=>{let n=_(),r=v(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:c}=n,expandRange=(e,t)=>{if(typeof t.expandRange==`function`)return t.expandRange(...e,t);e.sort();let n=`[${e.join(`-`)}]`;try{new RegExp(n)}catch{return e.map(e=>r.escapeRegex(e)).join(`..`)}return n},syntaxError=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,splitTopLevel=e=>{let t=[],n=0,r=0,i=0,a=``,o=!1;for(let s of e){if(o===!0){a+=s,o=!1;continue}if(s===`\\`){a+=s,o=!0;continue}if(s===`"`){i=i===1?0:1,a+=s;continue}if(i===0){if(s===`[`)n++;else if(s===`]`&&n>0)n--;else if(n===0){if(s===`(`)r++;else if(s===`)`&&r>0)r--;else if(s===`|`&&r===0){t.push(a),a=``;continue}}}a+=s}return t.push(a),t},isPlainBranch=e=>{let t=!1;for(let n of e){if(t===!0){t=!1;continue}if(n===`\\`){t=!0;continue}if(/[?*+@!()[\]{}]/.test(n))return!1}return!0},normalizeSimpleBranch=e=>{let t=e.trim(),n=!0;for(;n===!0;)n=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),n=!0);if(isPlainBranch(t))return t.replace(/\\(.)/g,`$1`)},hasRepeatedCharPrefixOverlap=e=>{let t=e.map(normalizeSimpleBranch).filter(Boolean);for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++){let r=t[e],i=t[n],a=r[0];if(!(!a||r!==a.repeat(r.length)||i!==a.repeat(i.length))&&(r===i||r.startsWith(i)||i.startsWith(r)))return!0}return!1},parseRepeatedExtglob=(e,t=!0)=>{if(e[0]!==`+`&&e[0]!==`*`||e[1]!==`(`)return;let n=0,r=0,i=0,a=!1;for(let o=1;o<e.length;o++){let s=e[o];if(a===!0){a=!1;continue}if(s===`\\`){a=!0;continue}if(s===`"`){i=i===1?0:1;continue}if(i!==1){if(s===`[`){n++;continue}if(s===`]`&&n>0){n--;continue}if(!(n>0)){if(s===`(`){r++;continue}if(s===`)`&&(r--,r===0))return t===!0&&o!==e.length-1?void 0:{type:e[0],body:e.slice(2,o),end:o}}}}},getStarExtglobSequenceOutput=e=>{let t=0,n=[];for(;t<e.length;){let r=parseRepeatedExtglob(e.slice(t),!1);if(!r||r.type!==`*`)return;let i=splitTopLevel(r.body).map(e=>e.trim());if(i.length!==1)return;let a=normalizeSimpleBranch(i[0]);if(!a||a.length!==1)return;n.push(a),t+=r.end+1}if(!(n.length<1))return`${n.length===1?r.escapeRegex(n[0]):`[${n.map(e=>r.escapeRegex(e)).join(``)}]`}*`},repeatedExtglobRecursion=e=>{let t=0,n=e.trim(),r=parseRepeatedExtglob(n);for(;r;)t++,n=r.body.trim(),r=parseRepeatedExtglob(n);return t},analyzeRepeatedExtglob=(e,t)=>{if(t.maxExtglobRecursion===!1)return{risky:!1};let r=typeof t.maxExtglobRecursion==`number`?t.maxExtglobRecursion:n.DEFAULT_MAX_EXTGLOB_RECURSION,i=splitTopLevel(e).map(e=>e.trim());if(i.length>1&&(i.some(e=>e===``)||i.some(e=>/^[*?]+$/.test(e))||hasRepeatedCharPrefixOverlap(i)))return{risky:!0};for(let e of i){let t=getStarExtglobSequenceOutput(e);if(t)return{risky:!0,safeOutput:t};if(repeatedExtglobRecursion(e)>r)return{risky:!0}}return{risky:!1}},parse=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);e=c[e]||e;let l={...t},u=typeof l.maxLength==`number`?Math.min(i,l.maxLength):i,d=e.length;if(d>u)throw SyntaxError(`Input length: ${d}, exceeds maximum allowed length: ${u}`);let f={type:`bos`,value:``,output:l.prepend||``},p=[f],m=l.capture?``:`?:`,h=n.globChars(l.windows),g=n.extglobChars(h),{DOT_LITERAL:_,PLUS_LITERAL:v,SLASH_LITERAL:y,ONE_CHAR:b,DOTS_SLASH:x,NO_DOT:S,NO_DOT_SLASH:C,NO_DOTS_SLASH:w,QMARK:T,QMARK_NO_DOT:E,STAR:D,START_ANCHOR:O}=h,globstar=e=>`(${m}(?:(?!${O}${e.dot?x:_}).)*?)`,k=l.dot?``:S,A=l.dot?T:E,j=l.bash===!0?globstar(l):D;l.capture&&(j=`(${j})`),typeof l.noext==`boolean`&&(l.noextglob=l.noext);let M={input:e,index:-1,start:0,dot:l.dot===!0,consumed:``,output:``,prefix:``,backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:p};e=r.removePrefix(e,M),d=e.length;let N=[],P=[],F=[],I=f,L,eos=()=>M.index===d-1,R=M.peek=(t=1)=>e[M.index+t],z=M.advance=()=>e[++M.index]||``,remaining=()=>e.slice(M.index+1),consume=(e=``,t=0)=>{M.consumed+=e,M.index+=t},append=e=>{M.output+=e.output==null?e.value:e.output,consume(e.value)},negate=()=>{let e=1;for(;R()===`!`&&(R(2)!==`(`||R(3)===`?`);)z(),M.start++,e++;return e%2==0?!1:(M.negated=!0,M.start++,!0)},increment=e=>{M[e]++,F.push(e)},decrement=e=>{M[e]--,F.pop()},push=e=>{if(I.type===`globstar`){let t=M.braces>0&&(e.type===`comma`||e.type===`brace`),n=e.extglob===!0||N.length&&(e.type===`pipe`||e.type===`paren`);e.type!==`slash`&&e.type!==`paren`&&!t&&!n&&(M.output=M.output.slice(0,-I.output.length),I.type=`star`,I.value=`*`,I.output=j,M.output+=I.output)}if(N.length&&e.type!==`paren`&&(N[N.length-1].inner+=e.value),(e.value||e.output)&&append(e),I&&I.type===`text`&&e.type===`text`){I.output=(I.output||I.value)+e.value,I.value+=e.value;return}e.prev=I,p.push(e),I=e},extglobOpen=(e,t)=>{let n={...g[t],conditions:1,inner:``};n.prev=I,n.parens=M.parens,n.output=M.output,n.startIndex=M.index,n.tokensIndex=p.length;let r=(l.capture?`(`:``)+n.open;increment(`parens`),push({type:e,value:t,output:M.output?``:b}),push({type:`paren`,extglob:!0,value:z(),output:r}),N.push(n)},extglobClose=n=>{let i=e.slice(n.startIndex,M.index+1),a=analyzeRepeatedExtglob(e.slice(n.startIndex+2,M.index),l);if((n.type===`plus`||n.type===`star`)&&a.risky){let e=a.safeOutput?(n.output?``:b)+(l.capture?`(${a.safeOutput})`:a.safeOutput):void 0,t=p[n.tokensIndex];t.type=`text`,t.value=i,t.output=e||r.escapeRegex(i);for(let e=n.tokensIndex+1;e<p.length;e++)p[e].value=``,p[e].output=``,delete p[e].suffix;M.output=n.output+t.output,M.backtrack=!0,push({type:`paren`,extglob:!0,value:L,output:``}),decrement(`parens`);return}let o=n.close+(l.capture?`)`:``),s;if(n.type===`negate`){let e=j;n.inner&&n.inner.length>1&&n.inner.includes(`/`)&&(e=globstar(l)),(e!==j||eos()||/^\)+$/.test(remaining()))&&(o=n.close=`)$))${e}`),n.inner.includes(`*`)&&(s=remaining())&&/^\.[^\\/.]+$/.test(s)&&(o=n.close=`)${parse(s,{...t,fastpaths:!1}).output})${e})`),n.prev.type===`bos`&&(M.negatedExtglob=!0)}push({type:`paren`,extglob:!0,value:L,output:o}),decrement(`parens`)};if(l.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,i=e.replace(s,(e,t,r,i,a,o)=>i===`\\`?(n=!0,e):i===`?`?t?t+i+(a?T.repeat(a.length):``):o===0?A+(a?T.repeat(a.length):``):T.repeat(r.length):i===`.`?_.repeat(r.length):i===`*`?t?t+i+(a?j:``):j:t?e:`\\${e}`);return n===!0&&(i=l.unescape===!0?i.replace(/\\/g,``):i.replace(/\\+/g,e=>e.length%2==0?`\\\\`:e?`\\`:``)),i===e&&l.contains===!0?(M.output=e,M):(M.output=r.wrapOutput(i,M,t),M)}for(;!eos();){if(L=z(),L===`\0`)continue;if(L===`\\`){let e=R();if(e===`/`&&l.bash!==!0||e===`.`||e===`;`)continue;if(!e){L+=`\\`,push({type:`text`,value:L});continue}let t=/^\\+/.exec(remaining()),n=0;if(t&&t[0].length>2&&(n=t[0].length,M.index+=n,n%2!=0&&(L+=`\\`)),l.unescape===!0?L=z():L+=z(),M.brackets===0){push({type:`text`,value:L});continue}}if(M.brackets>0&&(L!==`]`||I.value===`[`||I.value===`[^`)){if(l.posix!==!1&&L===`:`){let e=I.value.slice(1);if(e.includes(`[`)&&(I.posix=!0,e.includes(`:`))){let e=I.value.lastIndexOf(`[`),t=I.value.slice(0,e),n=a[I.value.slice(e+2)];if(n){I.value=t+n,M.backtrack=!0,z(),!f.output&&p.indexOf(I)===1&&(f.output=b);continue}}}(L===`[`&&R()!==`:`||L===`-`&&R()===`]`)&&(L=`\\${L}`),L===`]`&&(I.value===`[`||I.value===`[^`)&&(L=`\\${L}`),l.posix===!0&&L===`!`&&I.value===`[`&&(L=`^`),I.value+=L,append({value:L});continue}if(M.quotes===1&&L!==`"`){L=r.escapeRegex(L),I.value+=L,append({value:L});continue}if(L===`"`){M.quotes=M.quotes===1?0:1,l.keepQuotes===!0&&push({type:`text`,value:L});continue}if(L===`(`){increment(`parens`),push({type:`paren`,value:L});continue}if(L===`)`){if(M.parens===0&&l.strictBrackets===!0)throw SyntaxError(syntaxError(`opening`,`(`));let e=N[N.length-1];if(e&&M.parens===e.parens+1){extglobClose(N.pop());continue}push({type:`paren`,value:L,output:M.parens?`)`:`\\)`}),decrement(`parens`);continue}if(L===`[`){if(l.nobracket===!0||!remaining().includes(`]`)){if(l.nobracket!==!0&&l.strictBrackets===!0)throw SyntaxError(syntaxError(`closing`,`]`));L=`\\${L}`}else increment(`brackets`);push({type:`bracket`,value:L});continue}if(L===`]`){if(l.nobracket===!0||I&&I.type===`bracket`&&I.value.length===1){push({type:`text`,value:L,output:`\\${L}`});continue}if(M.brackets===0){if(l.strictBrackets===!0)throw SyntaxError(syntaxError(`opening`,`[`));push({type:`text`,value:L,output:`\\${L}`});continue}decrement(`brackets`);let e=I.value.slice(1);if(I.posix!==!0&&e[0]===`^`&&!e.includes(`/`)&&(L=`/${L}`),I.value+=L,append({value:L}),l.literalBrackets===!1||r.hasRegexChars(e))continue;let t=r.escapeRegex(I.value);if(M.output=M.output.slice(0,-I.value.length),l.literalBrackets===!0){M.output+=t,I.value=t;continue}I.value=`(${m}${t}|${I.value})`,M.output+=I.value;continue}if(L===`{`&&l.nobrace!==!0){increment(`braces`);let e={type:`brace`,value:L,output:`(`,outputIndex:M.output.length,tokensIndex:M.tokens.length};P.push(e),push(e);continue}if(L===`}`){let e=P[P.length-1];if(l.nobrace===!0||!e){push({type:`text`,value:L,output:L});continue}let t=`)`;if(e.dots===!0){let e=p.slice(),n=[];for(let t=e.length-1;t>=0&&(p.pop(),e[t].type!==`brace`);t--)e[t].type!==`dots`&&n.unshift(e[t].value);t=expandRange(n,l),M.backtrack=!0}if(e.comma!==!0&&e.dots!==!0){let n=M.output.slice(0,e.outputIndex),r=M.tokens.slice(e.tokensIndex);e.value=e.output=`\\{`,L=t=`\\}`,M.output=n;for(let e of r)M.output+=e.output||e.value}push({type:`brace`,value:L,output:t}),decrement(`braces`),P.pop();continue}if(L===`|`){N.length>0&&N[N.length-1].conditions++,push({type:`text`,value:L});continue}if(L===`,`){let e=L,t=P[P.length-1];t&&F[F.length-1]===`braces`&&(t.comma=!0,e=`|`),push({type:`comma`,value:L,output:e});continue}if(L===`/`){if(I.type===`dot`&&M.index===M.start+1){M.start=M.index+1,M.consumed=``,M.output=``,p.pop(),I=f;continue}push({type:`slash`,value:L,output:y});continue}if(L===`.`){if(M.braces>0&&I.type===`dot`){I.value===`.`&&(I.output=_);let e=P[P.length-1];I.type=`dots`,I.output+=L,I.value+=L,e.dots=!0;continue}if(M.braces+M.parens===0&&I.type!==`bos`&&I.type!==`slash`){push({type:`text`,value:L,output:_});continue}push({type:`dot`,value:L,output:_});continue}if(L===`?`){if(!(I&&I.value===`(`)&&l.noextglob!==!0&&R()===`(`&&R(2)!==`?`){extglobOpen(`qmark`,L);continue}if(I&&I.type===`paren`){let e=R(),t=L;(I.value===`(`&&!/[!=<:]/.test(e)||e===`<`&&!/<([!=]|\w+>)/.test(remaining()))&&(t=`\\${L}`),push({type:`text`,value:L,output:t});continue}if(l.dot!==!0&&(I.type===`slash`||I.type===`bos`)){push({type:`qmark`,value:L,output:E});continue}push({type:`qmark`,value:L,output:T});continue}if(L===`!`){if(l.noextglob!==!0&&R()===`(`&&(R(2)!==`?`||!/[!=<:]/.test(R(3)))){extglobOpen(`negate`,L);continue}if(l.nonegate!==!0&&M.index===0){negate();continue}}if(L===`+`){if(l.noextglob!==!0&&R()===`(`&&R(2)!==`?`){extglobOpen(`plus`,L);continue}if(I&&I.value===`(`||l.regex===!1){push({type:`plus`,value:L,output:v});continue}if(I&&(I.type===`bracket`||I.type===`paren`||I.type===`brace`)||M.parens>0){push({type:`plus`,value:L});continue}push({type:`plus`,value:v});continue}if(L===`@`){if(l.noextglob!==!0&&R()===`(`&&R(2)!==`?`){push({type:`at`,extglob:!0,value:L,output:``});continue}push({type:`text`,value:L});continue}if(L!==`*`){(L===`$`||L===`^`)&&(L=`\\${L}`);let e=o.exec(remaining());e&&(L+=e[0],M.index+=e[0].length),push({type:`text`,value:L});continue}if(I&&(I.type===`globstar`||I.star===!0)){I.type=`star`,I.star=!0,I.value+=L,I.output=j,M.backtrack=!0,M.globstar=!0,consume(L);continue}let t=remaining();if(l.noextglob!==!0&&/^\([^?]/.test(t)){extglobOpen(`star`,L);continue}if(I.type===`star`){if(l.noglobstar===!0){consume(L);continue}let n=I.prev,r=n.prev,i=n.type===`slash`||n.type===`bos`,a=r&&(r.type===`star`||r.type===`globstar`);if(l.bash===!0&&(!i||t[0]&&t[0]!==`/`)){push({type:`star`,value:L,output:``});continue}let o=M.braces>0&&(n.type===`comma`||n.type===`brace`),s=N.length&&(n.type===`pipe`||n.type===`paren`);if(!i&&n.type!==`paren`&&!o&&!s){push({type:`star`,value:L,output:``});continue}for(;t.slice(0,3)===`/**`;){let n=e[M.index+4];if(n&&n!==`/`)break;t=t.slice(3),consume(`/**`,3)}if(n.type===`bos`&&eos()){I.type=`globstar`,I.value+=L,I.output=globstar(l),M.output=I.output,M.globstar=!0,consume(L);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&!a&&eos()){M.output=M.output.slice(0,-(n.output+I.output).length),n.output=`(?:${n.output}`,I.type=`globstar`,I.output=globstar(l)+(l.strictSlashes?`)`:`|$)`),I.value+=L,M.globstar=!0,M.output+=n.output+I.output,consume(L);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&t[0]===`/`){let e=t[1]===void 0?``:`|$`;M.output=M.output.slice(0,-(n.output+I.output).length),n.output=`(?:${n.output}`,I.type=`globstar`,I.output=`${globstar(l)}${y}|${y}${e})`,I.value+=L,M.output+=n.output+I.output,M.globstar=!0,consume(L+z()),push({type:`slash`,value:`/`,output:``});continue}if(n.type===`bos`&&t[0]===`/`){I.type=`globstar`,I.value+=L,I.output=`(?:^|${y}|${globstar(l)}${y})`,M.output=I.output,M.globstar=!0,consume(L+z()),push({type:`slash`,value:`/`,output:``});continue}M.output=M.output.slice(0,-I.output.length),I.type=`globstar`,I.output=globstar(l),I.value+=L,M.output+=I.output,M.globstar=!0,consume(L);continue}let n={type:`star`,value:L,output:j};if(l.bash===!0){n.output=`.*?`,(I.type===`bos`||I.type===`slash`)&&(n.output=k+n.output),push(n);continue}if(I&&(I.type===`bracket`||I.type===`paren`)&&l.regex===!0){n.output=L,push(n);continue}(M.index===M.start||I.type===`slash`||I.type===`dot`)&&(I.type===`dot`?(M.output+=C,I.output+=C):l.dot===!0?(M.output+=w,I.output+=w):(M.output+=k,I.output+=k),R()!==`*`&&(M.output+=b,I.output+=b)),push(n)}for(;M.brackets>0;){if(l.strictBrackets===!0)throw SyntaxError(syntaxError(`closing`,`]`));M.output=r.escapeLast(M.output,`[`),decrement(`brackets`)}for(;M.parens>0;){if(l.strictBrackets===!0)throw SyntaxError(syntaxError(`closing`,`)`));M.output=r.escapeLast(M.output,`(`),decrement(`parens`)}for(;M.braces>0;){if(l.strictBrackets===!0)throw SyntaxError(syntaxError(`closing`,`}`));M.output=r.escapeLast(M.output,`{`),decrement(`braces`)}if(l.strictSlashes!==!0&&(I.type===`star`||I.type===`bracket`)&&push({type:`maybe_slash`,value:``,output:`${y}?`}),M.backtrack===!0){M.output=``;for(let e of M.tokens)M.output+=e.output==null?e.value:e.output,e.suffix&&(M.output+=e.suffix)}return M};parse.fastpaths=(e,t)=>{let a={...t},o=typeof a.maxLength==`number`?Math.min(i,a.maxLength):i,s=e.length;if(s>o)throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${o}`);e=c[e]||e;let{DOT_LITERAL:l,SLASH_LITERAL:u,ONE_CHAR:d,DOTS_SLASH:f,NO_DOT:p,NO_DOTS:m,NO_DOTS_SLASH:h,STAR:g,START_ANCHOR:_}=n.globChars(a.windows),v=a.dot?m:p,y=a.dot?h:p,b=a.capture?``:`?:`,x={negated:!1,prefix:``},S=a.bash===!0?`.*?`:g;a.capture&&(S=`(${S})`);let globstar=e=>e.noglobstar===!0?S:`(${b}(?:(?!${_}${e.dot?f:l}).)*?)`,create=e=>{switch(e){case`*`:return`${v}${d}${S}`;case`.*`:return`${l}${d}${S}`;case`*.*`:return`${v}${S}${l}${d}${S}`;case`*/*`:return`${v}${S}${u}${d}${y}${S}`;case`**`:return v+globstar(a);case`**/*`:return`(?:${v}${globstar(a)}${u})?${y}${d}${S}`;case`**/*.*`:return`(?:${v}${globstar(a)}${u})?${y}${S}${l}${d}${S}`;case`**/.*`:return`(?:${v}${globstar(a)}${u})?${l}${d}${S}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=create(t[1]);return n?n+l+t[2]:void 0}}},C=create(r.removePrefix(e,x));return C&&a.strictSlashes!==!0&&(C+=`${u}?`),C},t.exports=parse})),x=t(((e,t)=>{let n=y(),r=b(),i=v(),a=_(),isObject=e=>e&&typeof e==`object`&&!Array.isArray(e),picomatch=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>picomatch(e,t,n)),arrayMatcher=e=>{for(let t of r){let n=t(e);if(n)return n}return!1};return arrayMatcher}let r=isObject(e)&&e.tokens&&e.input;if(e===``||typeof e!=`string`&&!r)throw TypeError(`Expected pattern to be a non-empty string`);let i=t||{},a=i.windows,o=r?picomatch.compileRe(e,t):picomatch.makeRe(e,t,!1,!0),s=o.state;delete o.state;let isIgnored=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(i.ignore,e,n)}let matcher=(n,r=!1)=>{let{isMatch:c,match:l,output:u}=picomatch.test(n,o,t,{glob:e,posix:a}),d={glob:e,state:s,regex:o,posix:a,input:n,output:u,match:l,isMatch:c};return typeof i.onResult==`function`&&i.onResult(d),c===!1?(d.isMatch=!1,r?d:!1):isIgnored(n)?(typeof i.onIgnore==`function`&&i.onIgnore(d),d.isMatch=!1,r?d:!1):(typeof i.onMatch==`function`&&i.onMatch(d),r?d:!0)};return n&&(matcher.state=s),matcher};picomatch.test=(e,t,n,{glob:r,posix:a}={})=>{if(typeof e!=`string`)throw TypeError(`Expected input to be a string`);if(e===``)return{isMatch:!1,output:``};let o=n||{},s=o.format||(a?i.toPosixSlashes:null),c=e===r,l=c&&s?s(e):e;return c===!1&&(l=s?s(e):e,c=l===r),(c===!1||o.capture===!0)&&(c=o.matchBase===!0||o.basename===!0?picomatch.matchBase(e,t,n,a):t.exec(l)),{isMatch:!!c,match:c,output:l}},picomatch.matchBase=(e,t,n)=>(t instanceof RegExp?t:picomatch.makeRe(t,n)).test(i.basename(e)),picomatch.isMatch=(e,t,n)=>picomatch(t,n)(e),picomatch.parse=(e,t)=>Array.isArray(e)?e.map(e=>picomatch.parse(e,t)):r(e,{...t,fastpaths:!1}),picomatch.scan=(e,t)=>n(e,t),picomatch.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},a=i.contains?``:`^`,o=i.contains?``:`$`,s=`${a}(?:${e.output})${o}`;e&&e.negated===!0&&(s=`^(?!${s}).*$`);let c=picomatch.toRegex(s,t);return r===!0&&(c.state=e),c},picomatch.makeRe=(e,t={},n=!1,i=!1)=>{if(!e||typeof e!=`string`)throw TypeError(`Expected a non-empty string`);let a={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]===`.`||e[0]===`*`)&&(a.output=r.fastpaths(e,t)),a.output||(a=r(e,t)),picomatch.compileRe(a,t,n,i)},picomatch.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?`i`:``))}catch(e){if(t&&t.debug===!0)throw e;return/$^/}},picomatch.constants=a,t.exports=picomatch})),S=t(((e,t)=>{let n=x(),r=v();function picomatch(e,t,i=!1){return t&&(t.windows===null||t.windows===void 0)&&(t={...t,windows:r.isWindows()}),n(e,t,i)}Object.assign(picomatch,n),t.exports=picomatch})),C=t((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.Builder=void 0;let n=e(`node:path`),r=g();var i=null;try{e.resolve(`picomatch`),i=S()}catch{}var Builder=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:n.sep,filters:[]};globFunction;constructor(e){this.options={...this.options,...e},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(e){return this.options.pathSeparator=e,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(e){return this.options.maxDepth=e,this}withMaxFiles(e){return this.options.maxFiles=e,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:e=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=e,this.withFullPaths()}withAbortSignal(e){return this.options.signal=e,this}normalize(){return this.options.normalizePath=!0,this}filter(e){return this.options.filters.push(e),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(e){return this.options.exclude=e,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(e){return new r.APIBuilder(e||`.`,this.options)}withGlobFunction(e){return this.globFunction=e,this}crawlWithOptions(e,t){return this.options={...this.options,...t},new r.APIBuilder(e||`.`,this.options)}glob(...e){return this.globFunction?this.globWithOptions(e):this.globWithOptions(e,{dot:!0})}globWithOptions(e,...t){let n=this.globFunction||i;if(!n)throw Error(`Please specify a glob function to use glob matching.`);var r=this.globCache[e.join(`\0`)];return r||(r=n(e,...t),this.globCache[e.join(`\0`)]=r),this.options.filters.push(e=>r(e)),this}};t.Builder=Builder})),w=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),T=t((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.fdir=void 0;let r=C();Object.defineProperty(e,`fdir`,{enumerable:!0,get:function(){return r.Builder}}),n(w(),e)}));export{S as n,T as t};
1
+ import{o as e,t}from"../rolldown-runtime.mjs";var n=t((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.normalizePath=t.convertSlashes=t.cleanPath=void 0;let n=e(`node:path`);function cleanPath(e){let t=(0,n.normalize)(e);return t.length>1&&t[t.length-1]===n.sep&&(t=t.substring(0,t.length-1)),t}t.cleanPath=cleanPath;let r=/[\\/]/g;function convertSlashes(e,t){return e.replace(r,t)}t.convertSlashes=convertSlashes;function normalizePath(e,t){let{resolvePaths:r,normalizePath:i,pathSeparator:a}=t,o=process.platform===`win32`&&e.includes(`/`)||e.startsWith(`.`);return r&&(e=(0,n.resolve)(e)),(i||o)&&(e=cleanPath(e)),e===`.`?``:convertSlashes(e[e.length-1]===a?e:e+a,a)}t.normalizePath=normalizePath})),r=t((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.build=t.joinDirectoryPath=t.joinPathWithBasePath=void 0;let r=e(`node:path`),i=n();function joinPathWithBasePath(e,t){return t+e}t.joinPathWithBasePath=joinPathWithBasePath;function joinPathWithRelativePath(e,t){return function(n,a){return a.startsWith(e)?a.replace(e,``)+n:(0,i.convertSlashes)((0,r.relative)(e,a),t.pathSeparator)+t.pathSeparator+n}}function joinPath(e){return e}function joinDirectoryPath(e,t,n){return t+e+n}t.joinDirectoryPath=joinDirectoryPath;function build(e,t){let{relativePaths:n,includeBasePath:r}=t;return n&&e?joinPathWithRelativePath(e,t):r?joinPathWithBasePath:joinPath}t.build=build})),i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.build=void 0;function pushDirectoryWithRelativePath(e){return function(t,n){n.push(t.substring(e.length)||`.`)}}function pushDirectoryFilterWithRelativePath(e){return function(t,n,r){let i=t.substring(e.length)||`.`;r.every(e=>e(i,!0))&&n.push(i)}}let pushDirectory=(e,t)=>{t.push(e||`.`)},pushDirectoryFilter=(e,t,n)=>{let r=e||`.`;n.every(e=>e(r,!0))&&t.push(r)},empty=()=>{};function build(e,t){let{includeDirs:n,filters:r,relativePaths:i}=t;return n?i?r&&r.length?pushDirectoryFilterWithRelativePath(e):pushDirectoryWithRelativePath(e):r&&r.length?pushDirectoryFilter:pushDirectory:empty}e.build=build})),a=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.build=void 0;let pushFileFilterAndCount=(e,t,n,r)=>{r.every(t=>t(e,!1))&&n.files++},pushFileFilter=(e,t,n,r)=>{r.every(t=>t(e,!1))&&t.push(e)},pushFileCount=(e,t,n,r)=>{n.files++},pushFile=(e,t)=>{t.push(e)},empty=()=>{};function build(e){let{excludeFiles:t,filters:n,onlyCounts:r}=e;return t?empty:n&&n.length?r?pushFileFilterAndCount:pushFileFilter:r?pushFileCount:pushFile}e.build=build})),o=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.build=void 0;let getArray=e=>e,getArrayGroup=()=>[``].slice(0,0);function build(e){return e.group?getArrayGroup:getArray}e.build=build})),s=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.build=void 0;let groupFiles=(e,t,n)=>{e.push({directory:t,files:n,dir:t})},empty=()=>{};function build(e){return e.group?groupFiles:empty}e.build=build})),c=t((t=>{var n=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.build=void 0;let r=n(e(`node:fs`)),resolveSymlinksAsync=function(e,t,n){let{queue:i,options:{suppressErrors:a}}=t;i.enqueue(),r.default.stat(e,(r,o)=>{if(r){i.dequeue(a?null:r,t);return}n(o,e),i.dequeue(null,t)})},resolveSymlinksWithRealPathsAsync=function(e,t,n){let{queue:i,options:{suppressErrors:a}}=t;i.enqueue(),r.default.realpath(e,(e,o)=>{if(e){i.dequeue(a?null:e,t);return}r.default.lstat(o,(e,r)=>{n(r,o),i.dequeue(null,t)})})},resolveSymlinksSync=function(e,t,n){try{n(r.default.statSync(e),e)}catch(e){if(!t.options.suppressErrors)throw e}},resolveSymlinksWithRealPathsSync=function(e,t,n){try{let t=r.default.realpathSync(e);n(r.default.lstatSync(t),t)}catch(e){if(!t.options.suppressErrors)throw e}};function build(e,t){return!e.resolveSymlinks||e.excludeSymlinks?null:e.useRealPaths?t?resolveSymlinksWithRealPathsSync:resolveSymlinksWithRealPathsAsync:t?resolveSymlinksSync:resolveSymlinksAsync}t.build=build})),l=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.build=void 0;let onlyCountsSync=e=>e.counts,groupsSync=e=>e.groups,defaultSync=e=>e.paths,limitFilesSync=e=>e.paths.slice(0,e.options.maxFiles),onlyCountsAsync=(e,t,n)=>(report(t,n,e.counts,e.options.suppressErrors),null),defaultAsync=(e,t,n)=>(report(t,n,e.paths,e.options.suppressErrors),null),limitFilesAsync=(e,t,n)=>(report(t,n,e.paths.slice(0,e.options.maxFiles),e.options.suppressErrors),null),groupsAsync=(e,t,n)=>(report(t,n,e.groups,e.options.suppressErrors),null);function report(e,t,n,r){t(e&&!r?e:null,n)}function build(e,t){let{onlyCounts:n,group:r,maxFiles:i}=e;return n?t?onlyCountsSync:onlyCountsAsync:r?t?groupsSync:groupsAsync:i?t?limitFilesSync:limitFilesAsync:t?defaultSync:defaultAsync}e.build=build})),u=t((t=>{var n=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.build=void 0;let r=n(e(`node:fs`)),i={withFileTypes:!0},walkAsync=(e,t,n,a)=>{if(e.queue.enqueue(),n<0){e.queue.dequeue(null,e);return}e.counts.directories++,r.default.readdir(t||`.`,i,function process(r,i=[]){a(i,t,n),e.queue.dequeue(e.options.suppressErrors?null:r,e)})},walkSync=(e,t,n,a)=>{if(n<0)return;e.counts.directories++;let o=[];try{o=r.default.readdirSync(t||`.`,i)}catch(t){if(!e.options.suppressErrors)throw t}a(o,t,n)};function build(e){return e?walkSync:walkAsync}t.build=build})),d=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Queue=void 0;var Queue=class{onQueueEmpty;count=0;constructor(e){this.onQueueEmpty=e}enqueue(){this.count++}dequeue(e,t){(--this.count===0||e)&&this.onQueueEmpty(e,t)}};e.Queue=Queue})),f=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Counter=void 0;var Counter=class{_files=0;_directories=0;set files(e){this._files=e}get files(){return this._files}set directories(e){this._directories=e}get directories(){return this._directories}get dirs(){return this._directories}};e.Counter=Counter})),p=t((t=>{var p=t&&t.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),m=t&&t.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),h=t&&t.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!==`default`&&Object.prototype.hasOwnProperty.call(e,n)&&p(t,e,n);return m(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Walker=void 0;let g=e(`node:path`),_=n(),v=h(r()),y=h(i()),b=h(a()),x=h(o()),S=h(s()),C=h(c()),w=h(l()),T=h(u()),E=d(),D=f();var Walker=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,t,n){this.isSynchronous=!n,this.callbackInvoker=w.build(t,this.isSynchronous),this.state={paths:[``].slice(0,0),groups:[],counts:new D.Counter,options:t,queue:new E.Queue((e,t)=>this.callbackInvoker(t,e,n))},this.root=(0,_.normalizePath)(e,this.state.options),this.joinPath=v.build(this.root,t),this.pushDirectory=y.build(this.root,t),this.pushFile=b.build(t),this.getArray=x.build(t),this.groupFiles=S.build(t),this.resolveSymlink=C.build(t,this.isSynchronous),this.walkDirectory=T.build(this.isSynchronous)}start(){return this.walkDirectory(this.state,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(e,t,n)=>{let{paths:r,options:{filters:i,resolveSymlinks:a,excludeSymlinks:o,exclude:s,maxFiles:c,signal:l}}=this.state;if(l&&l.aborted||c&&r.length>c)return;this.pushDirectory(t,r,i);let u=this.getArray(this.state.paths);for(let r=0;r<e.length;++r){let c=e[r];if(c.isFile()||c.isSymbolicLink()&&!a&&!o){let e=this.joinPath(c.name,t);this.pushFile(e,u,this.state.counts,i)}else if(c.isDirectory()){let e=v.joinDirectoryPath(c.name,t,this.state.options.pathSeparator);if(s&&s(c.name,e))continue;this.walkDirectory(this.state,e,n-1,this.walk)}else if(c.isSymbolicLink()&&this.resolveSymlink){let e=v.joinPathWithBasePath(c.name,t);this.resolveSymlink(e,this.state,(e,t)=>{if(e.isDirectory()){if(t=(0,_.normalizePath)(t,this.state.options),s&&s(c.name,t))return;this.walkDirectory(this.state,t,n-1,this.walk)}else{let e=(0,g.basename)(t),n=(0,_.normalizePath)((0,g.dirname)(t),this.state.options);t=this.joinPath(e,n),this.pushFile(t,u,this.state.counts,i)}})}}this.groupFiles(this.state.groups,t,u)}};t.Walker=Walker})),m=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callback=e.promise=void 0;let t=p();function promise(e,t){return new Promise((n,r)=>{callback(e,t,(e,t)=>{if(e)return r(e);n(t)})})}e.promise=promise;function callback(e,n,r){new t.Walker(e,n,r).start()}e.callback=callback})),h=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sync=void 0;let t=p();function sync(e,n){return new t.Walker(e,n).start()}e.sync=sync})),g=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.APIBuilder=void 0;let t=m(),n=h();var APIBuilder=class{root;options;constructor(e,t){this.root=e,this.options=t}withPromise(){return(0,t.promise)(this.root,this.options)}withCallback(e){(0,t.callback)(this.root,this.options,e)}sync(){return(0,n.sync)(this.root,this.options)}};e.APIBuilder=APIBuilder})),_=t(((e,t)=>{let n=`[^\\\\/]`,r=`[^/]`,i=`(?:\\/|$)`,a=`(?:^|\\/)`,o=`\\.{1,2}${i}`,s={DOT_LITERAL:`\\.`,PLUS_LITERAL:`\\+`,QMARK_LITERAL:`\\?`,SLASH_LITERAL:`\\/`,ONE_CHAR:`(?=.)`,QMARK:r,END_ANCHOR:i,DOTS_SLASH:o,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!${a}${o})`,NO_DOT_SLASH:`(?!\\.{0,1}${i})`,NO_DOTS_SLASH:`(?!${o})`,QMARK_NO_DOT:`[^.\\/]`,STAR:`${r}*?`,START_ANCHOR:a,SEP:`/`},c={...s,SLASH_LITERAL:`[\\\\/]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`\\.{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!\\.{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!\\.{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:`[^.\\\\/]`,START_ANCHOR:`(?:^|[\\\\/])`,END_ANCHOR:`(?:[\\\\/]|$)`,SEP:`\\`};t.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:{__proto__:null,alnum:`a-zA-Z0-9`,alpha:`a-zA-Z`,ascii:`\\x00-\\x7F`,blank:` \\t`,cntrl:`\\x00-\\x1F\\x7F`,digit:`0-9`,graph:`\\x21-\\x7E`,lower:`a-z`,print:`\\x20-\\x7E `,punct:`\\-!"#$%&'()\\*+,./:;<=>?@[\\]^_\`{|}~`,space:` \\t\\r\\n\\v\\f`,upper:`A-Z`,word:`A-Za-z0-9_`,xdigit:`A-Fa-f0-9`},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":`*`,"**/**":`**`,"**/**/**":`**`},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:`negate`,open:`(?:(?!(?:`,close:`))${e.STAR})`},"?":{type:`qmark`,open:`(?:`,close:`)?`},"+":{type:`plus`,open:`(?:`,close:`)+`},"*":{type:`star`,open:`(?:`,close:`)*`},"@":{type:`at`,open:`(?:`,close:`)`}}},globChars(e){return e===!0?c:s}}})),v=t((e=>{let{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=_();e.isObject=e=>typeof e==`object`&&!!e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,`\\$1`),e.toPosixSlashes=e=>e.replace(t,`/`),e.isWindows=()=>{if(typeof navigator<`u`&&navigator.platform){let e=navigator.platform.toLowerCase();return e===`win32`||e===`windows`}return typeof process<`u`&&process.platform?process.platform===`win32`:!1},e.removeBackslashes=e=>e.replace(n,e=>e===`\\`?``:e),e.escapeLast=(t,n,r)=>{let i=t.lastIndexOf(n,r);return i===-1?t:t[i-1]===`\\`?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith(`./`)&&(n=n.slice(2),t.prefix=`./`),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?``:`^`}(?:${e})${n.contains?``:`$`}`;return t.negated===!0&&(r=`(?:^(?!${r}).*$)`),r},e.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:`/`),r=n[n.length-1];return r===``?n[n.length-2]:r}})),y=t(((e,t)=>{let n=v(),{CHAR_ASTERISK:r,CHAR_AT:i,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:o,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:p,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:h,CHAR_RIGHT_PARENTHESES:g,CHAR_RIGHT_SQUARE_BRACKET:y}=_(),isPathSeparator=e=>e===l||e===a,depth=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},scan=(e,t)=>{let _=t||{},v=e.length-1,b=_.parts===!0||_.scanToEnd===!0,x=[],S=[],C=[],w=e,T=-1,E=0,D=0,O=!1,k=!1,A=!1,j=!1,M=!1,N=!1,P=!1,F=!1,I=!1,L=!1,R=0,z,B,V={value:``,depth:0,isGlob:!1},eos=()=>T>=v,peek=()=>w.charCodeAt(T+1),advance=()=>(z=B,w.charCodeAt(++T));for(;T<v;){B=advance();let e;if(B===a){P=V.backslashes=!0,B=advance(),B===u&&(N=!0);continue}if(N===!0||B===u){for(R++;eos()!==!0&&(B=advance());){if(B===a){P=V.backslashes=!0,advance();continue}if(B===u){R++;continue}if(N!==!0&&B===s&&(B=advance())===s){if(O=V.isBrace=!0,A=V.isGlob=!0,L=!0,b===!0)continue;break}if(N!==!0&&B===o){if(O=V.isBrace=!0,A=V.isGlob=!0,L=!0,b===!0)continue;break}if(B===h&&(R--,R===0)){N=!1,O=V.isBrace=!0,L=!0;break}}if(b===!0)continue;break}if(B===l){if(x.push(T),S.push(V),V={value:``,depth:0,isGlob:!1},L===!0)continue;if(z===s&&T===E+1){E+=2;continue}D=T+1;continue}if(_.noext!==!0&&(B===p||B===i||B===r||B===m||B===c)&&peek()===d){if(A=V.isGlob=!0,j=V.isExtglob=!0,L=!0,B===c&&T===E&&(I=!0),b===!0){for(;eos()!==!0&&(B=advance());){if(B===a){P=V.backslashes=!0,B=advance();continue}if(B===g){A=V.isGlob=!0,L=!0;break}}continue}break}if(B===r){if(z===r&&(M=V.isGlobstar=!0),A=V.isGlob=!0,L=!0,b===!0)continue;break}if(B===m){if(A=V.isGlob=!0,L=!0,b===!0)continue;break}if(B===f){for(;eos()!==!0&&(e=advance());){if(e===a){P=V.backslashes=!0,advance();continue}if(e===y){k=V.isBracket=!0,A=V.isGlob=!0,L=!0;break}}if(b===!0)continue;break}if(_.nonegate!==!0&&B===c&&T===E){F=V.negated=!0,E++;continue}if(_.noparen!==!0&&B===d){if(A=V.isGlob=!0,b===!0){for(;eos()!==!0&&(B=advance());){if(B===d){P=V.backslashes=!0,B=advance();continue}if(B===g){L=!0;break}}continue}break}if(A===!0){if(L=!0,b===!0)continue;break}}_.noext===!0&&(j=!1,A=!1);let H=w,U=``,W=``;E>0&&(U=w.slice(0,E),w=w.slice(E),D-=E),H&&A===!0&&D>0?(H=w.slice(0,D),W=w.slice(D)):A===!0?(H=``,W=w):H=w,H&&H!==``&&H!==`/`&&H!==w&&isPathSeparator(H.charCodeAt(H.length-1))&&(H=H.slice(0,-1)),_.unescape===!0&&(W&&=n.removeBackslashes(W),H&&P===!0&&(H=n.removeBackslashes(H)));let G={prefix:U,input:e,start:E,base:H,glob:W,isBrace:O,isBracket:k,isGlob:A,isExtglob:j,isGlobstar:M,negated:F,negatedExtglob:I};if(_.tokens===!0&&(G.maxDepth=0,isPathSeparator(B)||S.push(V),G.tokens=S),_.parts===!0||_.tokens===!0){let t;for(let n=0;n<x.length;n++){let r=t?t+1:E,i=x[n],a=e.slice(r,i);_.tokens&&(n===0&&E!==0?(S[n].isPrefix=!0,S[n].value=U):S[n].value=a,depth(S[n]),G.maxDepth+=S[n].depth),(n!==0||a!==``)&&C.push(a),t=i}if(t&&t+1<e.length){let n=e.slice(t+1);C.push(n),_.tokens&&(S[S.length-1].value=n,depth(S[S.length-1]),G.maxDepth+=S[S.length-1].depth)}G.slashes=x,G.parts=C}return G};t.exports=scan})),b=t(((e,t)=>{let n=_(),r=v(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:c}=n,expandRange=(e,t)=>{if(typeof t.expandRange==`function`)return t.expandRange(...e,t);e.sort();let n=`[${e.join(`-`)}]`;try{new RegExp(n)}catch{return e.map(e=>r.escapeRegex(e)).join(`..`)}return n},syntaxError=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,splitTopLevel=e=>{let t=[],n=0,r=0,i=0,a=``,o=!1;for(let s of e){if(o===!0){a+=s,o=!1;continue}if(s===`\\`){a+=s,o=!0;continue}if(s===`"`){i=i===1?0:1,a+=s;continue}if(i===0){if(s===`[`)n++;else if(s===`]`&&n>0)n--;else if(n===0){if(s===`(`)r++;else if(s===`)`&&r>0)r--;else if(s===`|`&&r===0){t.push(a),a=``;continue}}}a+=s}return t.push(a),t},isPlainBranch=e=>{let t=!1;for(let n of e){if(t===!0){t=!1;continue}if(n===`\\`){t=!0;continue}if(/[?*+@!()[\]{}]/.test(n))return!1}return!0},normalizeSimpleBranch=e=>{let t=e.trim(),n=!0;for(;n===!0;)n=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),n=!0);if(isPlainBranch(t))return t.replace(/\\(.)/g,`$1`)},hasRepeatedCharPrefixOverlap=e=>{let t=e.map(normalizeSimpleBranch).filter(Boolean);for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++){let r=t[e],i=t[n],a=r[0];if(!(!a||r!==a.repeat(r.length)||i!==a.repeat(i.length))&&(r===i||r.startsWith(i)||i.startsWith(r)))return!0}return!1},parseRepeatedExtglob=(e,t=!0)=>{if(e[0]!==`+`&&e[0]!==`*`||e[1]!==`(`)return;let n=0,r=0,i=0,a=!1;for(let o=1;o<e.length;o++){let s=e[o];if(a===!0){a=!1;continue}if(s===`\\`){a=!0;continue}if(s===`"`){i=i===1?0:1;continue}if(i!==1){if(s===`[`){n++;continue}if(s===`]`&&n>0){n--;continue}if(!(n>0)){if(s===`(`){r++;continue}if(s===`)`&&(r--,r===0))return t===!0&&o!==e.length-1?void 0:{type:e[0],body:e.slice(2,o),end:o}}}}},getStarExtglobSequenceOutput=e=>{let t=0,n=[];for(;t<e.length;){let r=parseRepeatedExtglob(e.slice(t),!1);if(!r||r.type!==`*`)return;let i=splitTopLevel(r.body).map(e=>e.trim());if(i.length!==1)return;let a=normalizeSimpleBranch(i[0]);if(!a||a.length!==1)return;n.push(a),t+=r.end+1}if(!(n.length<1))return`${n.length===1?r.escapeRegex(n[0]):`[${n.map(e=>r.escapeRegex(e)).join(``)}]`}*`},repeatedExtglobRecursion=e=>{let t=0,n=e.trim(),r=parseRepeatedExtglob(n);for(;r;)t++,n=r.body.trim(),r=parseRepeatedExtglob(n);return t},analyzeRepeatedExtglob=(e,t)=>{if(t.maxExtglobRecursion===!1)return{risky:!1};let r=typeof t.maxExtglobRecursion==`number`?t.maxExtglobRecursion:n.DEFAULT_MAX_EXTGLOB_RECURSION,i=splitTopLevel(e).map(e=>e.trim());if(i.length>1&&(i.some(e=>e===``)||i.some(e=>/^[*?]+$/.test(e))||hasRepeatedCharPrefixOverlap(i)))return{risky:!0};for(let e of i){let t=getStarExtglobSequenceOutput(e);if(t)return{risky:!0,safeOutput:t};if(repeatedExtglobRecursion(e)>r)return{risky:!0}}return{risky:!1}},parse=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);e=c[e]||e;let l={...t},u=typeof l.maxLength==`number`?Math.min(i,l.maxLength):i,d=e.length;if(d>u)throw SyntaxError(`Input length: ${d}, exceeds maximum allowed length: ${u}`);let f={type:`bos`,value:``,output:l.prepend||``},p=[f],m=l.capture?``:`?:`,h=n.globChars(l.windows),g=n.extglobChars(h),{DOT_LITERAL:_,PLUS_LITERAL:v,SLASH_LITERAL:y,ONE_CHAR:b,DOTS_SLASH:x,NO_DOT:S,NO_DOT_SLASH:C,NO_DOTS_SLASH:w,QMARK:T,QMARK_NO_DOT:E,STAR:D,START_ANCHOR:O}=h,globstar=e=>`(${m}(?:(?!${O}${e.dot?x:_}).)*?)`,k=l.dot?``:S,A=l.dot?T:E,j=l.bash===!0?globstar(l):D;l.capture&&(j=`(${j})`),typeof l.noext==`boolean`&&(l.noextglob=l.noext);let M={input:e,index:-1,start:0,dot:l.dot===!0,consumed:``,output:``,prefix:``,backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:p};e=r.removePrefix(e,M),d=e.length;let N=[],P=[],F=[],I=f,L,eos=()=>M.index===d-1,R=M.peek=(t=1)=>e[M.index+t],z=M.advance=()=>e[++M.index]||``,remaining=()=>e.slice(M.index+1),consume=(e=``,t=0)=>{M.consumed+=e,M.index+=t},append=e=>{M.output+=e.output==null?e.value:e.output,consume(e.value)},negate=()=>{let e=1;for(;R()===`!`&&(R(2)!==`(`||R(3)===`?`);)z(),M.start++,e++;return e%2==0?!1:(M.negated=!0,M.start++,!0)},increment=e=>{M[e]++,F.push(e)},decrement=e=>{M[e]--,F.pop()},push=e=>{if(I.type===`globstar`){let t=M.braces>0&&(e.type===`comma`||e.type===`brace`),n=e.extglob===!0||N.length&&(e.type===`pipe`||e.type===`paren`);e.type!==`slash`&&e.type!==`paren`&&!t&&!n&&(M.output=M.output.slice(0,-I.output.length),I.type=`star`,I.value=`*`,I.output=j,M.output+=I.output)}if(N.length&&e.type!==`paren`&&(N[N.length-1].inner+=e.value),(e.value||e.output)&&append(e),I&&I.type===`text`&&e.type===`text`){I.output=(I.output||I.value)+e.value,I.value+=e.value;return}e.prev=I,p.push(e),I=e},extglobOpen=(e,t)=>{let n={...g[t],conditions:1,inner:``};n.prev=I,n.parens=M.parens,n.output=M.output,n.startIndex=M.index,n.tokensIndex=p.length;let r=(l.capture?`(`:``)+n.open;increment(`parens`),push({type:e,value:t,output:M.output?``:b}),push({type:`paren`,extglob:!0,value:z(),output:r}),N.push(n)},extglobClose=n=>{let i=e.slice(n.startIndex,M.index+1),a=analyzeRepeatedExtglob(e.slice(n.startIndex+2,M.index),l);if((n.type===`plus`||n.type===`star`)&&a.risky){let e=a.safeOutput?(n.output?``:b)+(l.capture?`(${a.safeOutput})`:a.safeOutput):void 0,t=p[n.tokensIndex];t.type=`text`,t.value=i,t.output=e||r.escapeRegex(i);for(let e=n.tokensIndex+1;e<p.length;e++)p[e].value=``,p[e].output=``,delete p[e].suffix;M.output=n.output+t.output,M.backtrack=!0,push({type:`paren`,extglob:!0,value:L,output:``}),decrement(`parens`);return}let o=n.close+(l.capture?`)`:``),s;if(n.type===`negate`){let e=j;n.inner&&n.inner.length>1&&n.inner.includes(`/`)&&(e=globstar(l)),(e!==j||eos()||/^\)+$/.test(remaining()))&&(o=n.close=`)$))${e}`),n.inner.includes(`*`)&&(s=remaining())&&/^\.[^\\/.]+$/.test(s)&&(o=n.close=`)${parse(s,{...t,fastpaths:!1}).output})${e})`),n.prev.type===`bos`&&(M.negatedExtglob=!0)}push({type:`paren`,extglob:!0,value:L,output:o}),decrement(`parens`)};if(l.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,i=e.replace(s,(e,t,r,i,a,o)=>i===`\\`?(n=!0,e):i===`?`?t?t+i+(a?T.repeat(a.length):``):o===0?A+(a?T.repeat(a.length):``):T.repeat(r.length):i===`.`?_.repeat(r.length):i===`*`?t?t+i+(a?j:``):j:t?e:`\\${e}`);return n===!0&&(i=l.unescape===!0?i.replace(/\\/g,``):i.replace(/\\+/g,e=>e.length%2==0?`\\\\`:e?`\\`:``)),i===e&&l.contains===!0?(M.output=e,M):(M.output=r.wrapOutput(i,M,t),M)}for(;!eos();){if(L=z(),L===`\0`)continue;if(L===`\\`){let e=R();if(e===`/`&&l.bash!==!0||e===`.`||e===`;`)continue;if(!e){L+=`\\`,push({type:`text`,value:L});continue}let t=/^\\+/.exec(remaining()),n=0;if(t&&t[0].length>2&&(n=t[0].length,M.index+=n,n%2!=0&&(L+=`\\`)),l.unescape===!0?L=z():L+=z(),M.brackets===0){push({type:`text`,value:L});continue}}if(M.brackets>0&&(L!==`]`||I.value===`[`||I.value===`[^`)){if(l.posix!==!1&&L===`:`){let e=I.value.slice(1);if(e.includes(`[`)&&(I.posix=!0,e.includes(`:`))){let e=I.value.lastIndexOf(`[`),t=I.value.slice(0,e),n=a[I.value.slice(e+2)];if(n){I.value=t+n,M.backtrack=!0,z(),!f.output&&p.indexOf(I)===1&&(f.output=b);continue}}}(L===`[`&&R()!==`:`||L===`-`&&R()===`]`)&&(L=`\\${L}`),L===`]`&&(I.value===`[`||I.value===`[^`)&&(L=`\\${L}`),l.posix===!0&&L===`!`&&I.value===`[`&&(L=`^`),I.value+=L,append({value:L});continue}if(M.quotes===1&&L!==`"`){L=r.escapeRegex(L),I.value+=L,append({value:L});continue}if(L===`"`){M.quotes=M.quotes===1?0:1,l.keepQuotes===!0&&push({type:`text`,value:L});continue}if(L===`(`){increment(`parens`),push({type:`paren`,value:L});continue}if(L===`)`){if(M.parens===0&&l.strictBrackets===!0)throw SyntaxError(syntaxError(`opening`,`(`));let e=N[N.length-1];if(e&&M.parens===e.parens+1){extglobClose(N.pop());continue}push({type:`paren`,value:L,output:M.parens?`)`:`\\)`}),decrement(`parens`);continue}if(L===`[`){if(l.nobracket===!0||!remaining().includes(`]`)){if(l.nobracket!==!0&&l.strictBrackets===!0)throw SyntaxError(syntaxError(`closing`,`]`));L=`\\${L}`}else increment(`brackets`);push({type:`bracket`,value:L});continue}if(L===`]`){if(l.nobracket===!0||I&&I.type===`bracket`&&I.value.length===1){push({type:`text`,value:L,output:`\\${L}`});continue}if(M.brackets===0){if(l.strictBrackets===!0)throw SyntaxError(syntaxError(`opening`,`[`));push({type:`text`,value:L,output:`\\${L}`});continue}decrement(`brackets`);let e=I.value.slice(1);if(I.posix!==!0&&e[0]===`^`&&!e.includes(`/`)&&(L=`/${L}`),I.value+=L,append({value:L}),l.literalBrackets===!1||r.hasRegexChars(e))continue;let t=r.escapeRegex(I.value);if(M.output=M.output.slice(0,-I.value.length),l.literalBrackets===!0){M.output+=t,I.value=t;continue}I.value=`(${m}${t}|${I.value})`,M.output+=I.value;continue}if(L===`{`&&l.nobrace!==!0){increment(`braces`);let e={type:`brace`,value:L,output:`(`,outputIndex:M.output.length,tokensIndex:M.tokens.length};P.push(e),push(e);continue}if(L===`}`){let e=P[P.length-1];if(l.nobrace===!0||!e){push({type:`text`,value:L,output:L});continue}let t=`)`;if(e.dots===!0){let e=p.slice(),n=[];for(let t=e.length-1;t>=0&&(p.pop(),e[t].type!==`brace`);t--)e[t].type!==`dots`&&n.unshift(e[t].value);t=expandRange(n,l),M.backtrack=!0}if(e.comma!==!0&&e.dots!==!0){let n=M.output.slice(0,e.outputIndex),r=M.tokens.slice(e.tokensIndex);e.value=e.output=`\\{`,L=t=`\\}`,M.output=n;for(let e of r)M.output+=e.output||e.value}push({type:`brace`,value:L,output:t}),decrement(`braces`),P.pop();continue}if(L===`|`){N.length>0&&N[N.length-1].conditions++,push({type:`text`,value:L});continue}if(L===`,`){let e=L,t=P[P.length-1];t&&F[F.length-1]===`braces`&&(t.comma=!0,e=`|`),push({type:`comma`,value:L,output:e});continue}if(L===`/`){if(I.type===`dot`&&M.index===M.start+1){M.start=M.index+1,M.consumed=``,M.output=``,p.pop(),I=f;continue}push({type:`slash`,value:L,output:y});continue}if(L===`.`){if(M.braces>0&&I.type===`dot`){I.value===`.`&&(I.output=_);let e=P[P.length-1];I.type=`dots`,I.output+=L,I.value+=L,e.dots=!0;continue}if(M.braces+M.parens===0&&I.type!==`bos`&&I.type!==`slash`){push({type:`text`,value:L,output:_});continue}push({type:`dot`,value:L,output:_});continue}if(L===`?`){if(!(I&&I.value===`(`)&&l.noextglob!==!0&&R()===`(`&&R(2)!==`?`){extglobOpen(`qmark`,L);continue}if(I&&I.type===`paren`){let e=R(),t=L;(I.value===`(`&&!/[!=<:]/.test(e)||e===`<`&&!/<([!=]|\w+>)/.test(remaining()))&&(t=`\\${L}`),push({type:`text`,value:L,output:t});continue}if(l.dot!==!0&&(I.type===`slash`||I.type===`bos`)){push({type:`qmark`,value:L,output:E});continue}push({type:`qmark`,value:L,output:T});continue}if(L===`!`){if(l.noextglob!==!0&&R()===`(`&&(R(2)!==`?`||!/[!=<:]/.test(R(3)))){extglobOpen(`negate`,L);continue}if(l.nonegate!==!0&&M.index===0){negate();continue}}if(L===`+`){if(l.noextglob!==!0&&R()===`(`&&R(2)!==`?`){extglobOpen(`plus`,L);continue}if(I&&I.value===`(`||l.regex===!1){push({type:`plus`,value:L,output:v});continue}if(I&&(I.type===`bracket`||I.type===`paren`||I.type===`brace`)||M.parens>0){push({type:`plus`,value:L});continue}push({type:`plus`,value:v});continue}if(L===`@`){if(l.noextglob!==!0&&R()===`(`&&R(2)!==`?`){push({type:`at`,extglob:!0,value:L,output:``});continue}push({type:`text`,value:L});continue}if(L!==`*`){(L===`$`||L===`^`)&&(L=`\\${L}`);let e=o.exec(remaining());e&&(L+=e[0],M.index+=e[0].length),push({type:`text`,value:L});continue}if(I&&(I.type===`globstar`||I.star===!0)){I.type=`star`,I.star=!0,I.value+=L,I.output=j,M.backtrack=!0,M.globstar=!0,consume(L);continue}let t=remaining();if(l.noextglob!==!0&&/^\([^?]/.test(t)){extglobOpen(`star`,L);continue}if(I.type===`star`){if(l.noglobstar===!0){consume(L);continue}let n=I.prev,r=n.prev,i=n.type===`slash`||n.type===`bos`,a=r&&(r.type===`star`||r.type===`globstar`);if(l.bash===!0&&(!i||t[0]&&t[0]!==`/`)){push({type:`star`,value:L,output:``});continue}let o=M.braces>0&&(n.type===`comma`||n.type===`brace`),s=N.length&&(n.type===`pipe`||n.type===`paren`);if(!i&&n.type!==`paren`&&!o&&!s){push({type:`star`,value:L,output:``});continue}for(;t.slice(0,3)===`/**`;){let n=e[M.index+4];if(n&&n!==`/`)break;t=t.slice(3),consume(`/**`,3)}if(n.type===`bos`&&eos()){I.type=`globstar`,I.value+=L,I.output=globstar(l),M.output=I.output,M.globstar=!0,consume(L);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&!a&&eos()){M.output=M.output.slice(0,-(n.output+I.output).length),n.output=`(?:${n.output}`,I.type=`globstar`,I.output=globstar(l)+(l.strictSlashes?`)`:`|$)`),I.value+=L,M.globstar=!0,M.output+=n.output+I.output,consume(L);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&t[0]===`/`){let e=t[1]===void 0?``:`|$`;M.output=M.output.slice(0,-(n.output+I.output).length),n.output=`(?:${n.output}`,I.type=`globstar`,I.output=`${globstar(l)}${y}|${y}${e})`,I.value+=L,M.output+=n.output+I.output,M.globstar=!0,consume(L+z()),push({type:`slash`,value:`/`,output:``});continue}if(n.type===`bos`&&t[0]===`/`){I.type=`globstar`,I.value+=L,I.output=`(?:^|${y}|${globstar(l)}${y})`,M.output=I.output,M.globstar=!0,consume(L+z()),push({type:`slash`,value:`/`,output:``});continue}M.output=M.output.slice(0,-I.output.length),I.type=`globstar`,I.output=globstar(l),I.value+=L,M.output+=I.output,M.globstar=!0,consume(L);continue}let n={type:`star`,value:L,output:j};if(l.bash===!0){n.output=`.*?`,(I.type===`bos`||I.type===`slash`)&&(n.output=k+n.output),push(n);continue}if(I&&(I.type===`bracket`||I.type===`paren`)&&l.regex===!0){n.output=L,push(n);continue}(M.index===M.start||I.type===`slash`||I.type===`dot`)&&(I.type===`dot`?(M.output+=C,I.output+=C):l.dot===!0?(M.output+=w,I.output+=w):(M.output+=k,I.output+=k),R()!==`*`&&(M.output+=b,I.output+=b)),push(n)}for(;M.brackets>0;){if(l.strictBrackets===!0)throw SyntaxError(syntaxError(`closing`,`]`));M.output=r.escapeLast(M.output,`[`),decrement(`brackets`)}for(;M.parens>0;){if(l.strictBrackets===!0)throw SyntaxError(syntaxError(`closing`,`)`));M.output=r.escapeLast(M.output,`(`),decrement(`parens`)}for(;M.braces>0;){if(l.strictBrackets===!0)throw SyntaxError(syntaxError(`closing`,`}`));M.output=r.escapeLast(M.output,`{`),decrement(`braces`)}if(l.strictSlashes!==!0&&(I.type===`star`||I.type===`bracket`)&&push({type:`maybe_slash`,value:``,output:`${y}?`}),M.backtrack===!0){M.output=``;for(let e of M.tokens)M.output+=e.output==null?e.value:e.output,e.suffix&&(M.output+=e.suffix)}return M};parse.fastpaths=(e,t)=>{let a={...t},o=typeof a.maxLength==`number`?Math.min(i,a.maxLength):i,s=e.length;if(s>o)throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${o}`);e=c[e]||e;let{DOT_LITERAL:l,SLASH_LITERAL:u,ONE_CHAR:d,DOTS_SLASH:f,NO_DOT:p,NO_DOTS:m,NO_DOTS_SLASH:h,STAR:g,START_ANCHOR:_}=n.globChars(a.windows),v=a.dot?m:p,y=a.dot?h:p,b=a.capture?``:`?:`,x={negated:!1,prefix:``},S=a.bash===!0?`.*?`:g;a.capture&&(S=`(${S})`);let globstar=e=>e.noglobstar===!0?S:`(${b}(?:(?!${_}${e.dot?f:l}).)*?)`,create=e=>{switch(e){case`*`:return`${v}${d}${S}`;case`.*`:return`${l}${d}${S}`;case`*.*`:return`${v}${S}${l}${d}${S}`;case`*/*`:return`${v}${S}${u}${d}${y}${S}`;case`**`:return v+globstar(a);case`**/*`:return`(?:${v}${globstar(a)}${u})?${y}${d}${S}`;case`**/*.*`:return`(?:${v}${globstar(a)}${u})?${y}${S}${l}${d}${S}`;case`**/.*`:return`(?:${v}${globstar(a)}${u})?${l}${d}${S}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=create(t[1]);return n?n+l+t[2]:void 0}}},C=create(r.removePrefix(e,x));return C&&a.strictSlashes!==!0&&(C+=`${u}?`),C},t.exports=parse})),x=t(((e,t)=>{let n=y(),r=b(),i=v(),a=_(),isObject=e=>e&&typeof e==`object`&&!Array.isArray(e),picomatch=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>picomatch(e,t,n)),arrayMatcher=e=>{for(let t of r){let n=t(e);if(n)return n}return!1};return arrayMatcher}let r=isObject(e)&&e.tokens&&e.input;if(e===``||typeof e!=`string`&&!r)throw TypeError(`Expected pattern to be a non-empty string`);let i=t||{},a=i.windows,o=r?picomatch.compileRe(e,t):picomatch.makeRe(e,t,!1,!0),s=o.state;delete o.state;let isIgnored=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(i.ignore,e,n)}let matcher=(n,r=!1)=>{let{isMatch:c,match:l,output:u}=picomatch.test(n,o,t,{glob:e,posix:a}),d={glob:e,state:s,regex:o,posix:a,input:n,output:u,match:l,isMatch:c};return typeof i.onResult==`function`&&i.onResult(d),c===!1?(d.isMatch=!1,r?d:!1):isIgnored(n)?(typeof i.onIgnore==`function`&&i.onIgnore(d),d.isMatch=!1,r?d:!1):(typeof i.onMatch==`function`&&i.onMatch(d),r?d:!0)};return n&&(matcher.state=s),matcher};picomatch.test=(e,t,n,{glob:r,posix:a}={})=>{if(typeof e!=`string`)throw TypeError(`Expected input to be a string`);if(e===``)return{isMatch:!1,output:``};let o=n||{},s=o.format||(a?i.toPosixSlashes:null),c=e===r,l=c&&s?s(e):e;return c===!1&&(l=s?s(e):e,c=l===r),(c===!1||o.capture===!0)&&(c=o.matchBase===!0||o.basename===!0?picomatch.matchBase(e,t,n,a):t.exec(l)),{isMatch:!!c,match:c,output:l}},picomatch.matchBase=(e,t,n)=>(t instanceof RegExp?t:picomatch.makeRe(t,n)).test(i.basename(e)),picomatch.isMatch=(e,t,n)=>picomatch(t,n)(e),picomatch.parse=(e,t)=>Array.isArray(e)?e.map(e=>picomatch.parse(e,t)):r(e,{...t,fastpaths:!1}),picomatch.scan=(e,t)=>n(e,t),picomatch.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},a=i.contains?``:`^`,o=i.contains?``:`$`,s=`${a}(?:${e.output})${o}`;e&&e.negated===!0&&(s=`^(?!${s}).*$`);let c=picomatch.toRegex(s,t);return r===!0&&(c.state=e),c},picomatch.makeRe=(e,t={},n=!1,i=!1)=>{if(!e||typeof e!=`string`)throw TypeError(`Expected a non-empty string`);let a={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]===`.`||e[0]===`*`)&&(a.output=r.fastpaths(e,t)),a.output||(a=r(e,t)),picomatch.compileRe(a,t,n,i)},picomatch.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?`i`:``))}catch(e){if(t&&t.debug===!0)throw e;return/$^/}},picomatch.constants=a,t.exports=picomatch})),S=t(((e,t)=>{let n=x(),r=v();function picomatch(e,t,i=!1){return t&&(t.windows===null||t.windows===void 0)&&(t={...t,windows:r.isWindows()}),n(e,t,i)}Object.assign(picomatch,n),t.exports=picomatch})),C=t((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Builder=void 0;let n=e(`node:path`),r=g();var i=null;try{e.resolve(`picomatch`),i=S()}catch{}var Builder=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:n.sep,filters:[]};globFunction;constructor(e){this.options={...this.options,...e},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(e){return this.options.pathSeparator=e,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(e){return this.options.maxDepth=e,this}withMaxFiles(e){return this.options.maxFiles=e,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:e=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=e,this.withFullPaths()}withAbortSignal(e){return this.options.signal=e,this}normalize(){return this.options.normalizePath=!0,this}filter(e){return this.options.filters.push(e),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(e){return this.options.exclude=e,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(e){return new r.APIBuilder(e||`.`,this.options)}withGlobFunction(e){return this.globFunction=e,this}crawlWithOptions(e,t){return this.options={...this.options,...t},new r.APIBuilder(e||`.`,this.options)}glob(...e){return this.globFunction?this.globWithOptions(e):this.globWithOptions(e,{dot:!0})}globWithOptions(e,...t){let n=this.globFunction||i;if(!n)throw Error(`Please specify a glob function to use glob matching.`);var r=this.globCache[e.join(`\0`)];return r||(r=n(e,...t),this.globCache[e.join(`\0`)]=r),this.options.filters.push(e=>r(e)),this}};t.Builder=Builder})),w=t((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),T=t((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.fdir=void 0;let r=C();Object.defineProperty(e,"fdir",{enumerable:!0,get:function(){return r.Builder}}),n(w(),e)}));export{S as n,T as t};
@@ -1 +1 @@
1
- import{t as e}from"../rolldown-runtime.mjs";var t=e((e=>{e.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<`u`,e.SYMBOL_SUPPORT=typeof Symbol<`u`})),n=e(((e,n)=>{var r=t(),i=r.ARRAY_BUFFER_SUPPORT,a=r.SYMBOL_SUPPORT;n.exports=function forEach(e,t){var n,r,o,s,c;if(!e)throw Error(`obliterator/forEach: invalid iterable.`);if(typeof t!=`function`)throw Error(`obliterator/forEach: expecting a callback.`);if(Array.isArray(e)||i&&ArrayBuffer.isView(e)||typeof e==`string`||e.toString()===`[object Arguments]`){for(o=0,s=e.length;o<s;o++)t(e[o],o);return}if(typeof e.forEach==`function`){e.forEach(t);return}if(a&&Symbol.iterator in e&&typeof e.next!=`function`&&(e=e[Symbol.iterator]()),typeof e.next==`function`){for(n=e,o=0;c=n.next(),c.done!==!0;)t(c.value,o),o++;return}for(r in e)e.hasOwnProperty(r)&&t(e[r],r)}})),r=e(((e,t)=>{function Iterator(e){if(typeof e!=`function`)throw Error(`obliterator/iterator: expecting a function!`);this.next=e}typeof Symbol<`u`&&(Iterator.prototype[Symbol.iterator]=function(){return this}),Iterator.of=function(){var e=arguments,t=e.length,n=0;return new Iterator(function(){return n>=t?{done:!0}:{done:!1,value:e[n++]}})},Iterator.empty=function(){return new Iterator(function(){return{done:!0}})},Iterator.fromSequence=function(e){var t=0,n=e.length;return new Iterator(function(){return t>=n?{done:!0}:{done:!1,value:e[t++]}})},Iterator.is=function(e){return e instanceof Iterator?!0:typeof e==`object`&&!!e&&typeof e.next==`function`},t.exports=Iterator})),i=e((e=>{var t=2**8-1,n=2**16-1,r=2**32-1,i=2**7-1,a=2**15-1,o=2**31-1;e.getPointerArray=function(e){var i=e-1;if(i<=t)return Uint8Array;if(i<=n)return Uint16Array;if(i<=r)return Uint32Array;throw Error(`mnemonist: Pointer Array of size > 4294967295 is not supported.`)},e.getSignedPointerArray=function(e){var t=e-1;return t<=i?Int8Array:t<=a?Int16Array:t<=o?Int32Array:Float64Array},e.getNumberType=function(e){return e===(e|0)?Math.sign(e)===-1?e<=127&&e>=-128?Int8Array:e<=32767&&e>=-32768?Int16Array:Int32Array:e<=255?Uint8Array:e<=65535?Uint16Array:Uint32Array:Float64Array};var s={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};e.getMinimalRepresentation=function(t,n){var r=null,i=0,a,o,c,l,u;for(l=0,u=t.length;l<u;l++)c=n?n(t[l]):t[l],o=e.getNumberType(c),a=s[o.name],a>i&&(i=a,r=o);return r},e.isTypedArray=function(e){return typeof ArrayBuffer<`u`&&ArrayBuffer.isView(e)},e.concat=function(){var e=0,t,n,r;for(t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var i=new arguments[0].constructor(e);for(t=0,n=0;t<r;t++)i.set(arguments[t],n),n+=arguments[t].length;return i},e.indices=function(t){for(var n=new(e.getPointerArray(t))(t),r=0;r<t;r++)n[r]=r;return n}})),a=e((e=>{var t=n(),r=i();function isArrayLike(e){return Array.isArray(e)||r.isTypedArray(e)}function guessLength(e){if(typeof e.length==`number`)return e.length;if(typeof e.size==`number`)return e.size}function toArray(e){var n=guessLength(e),r=typeof n==`number`?Array(n):[],i=0;return t(e,function(e){r[i++]=e}),r}function toArrayWithIndices(e){var n=guessLength(e),i=typeof n==`number`?r.getPointerArray(n):Array,a=typeof n==`number`?Array(n):[],o=typeof n==`number`?new i(n):[],s=0;return t(e,function(e){a[s]=e,o[s]=s++}),[a,o]}e.isArrayLike=isArrayLike,e.guessLength=guessLength,e.toArray=toArray,e.toArrayWithIndices=toArrayWithIndices})),o=e(((e,t)=>{t.exports=function isGraph(e){return typeof e==`object`&&!!e&&typeof e.addUndirectedEdgeWithKey==`function`&&typeof e.dropNode==`function`&&typeof e.multi==`boolean`}})),s=e(((e,t)=>{var n=a(),i=r();function FixedDeque(e,t){if(arguments.length<2)throw Error(`mnemonist/fixed-deque: expecting an Array class and a capacity.`);if(typeof t!=`number`||t<=0)throw Error("mnemonist/fixed-deque: `capacity` should be a positive number.");this.ArrayClass=e,this.capacity=t,this.items=new e(this.capacity),this.clear()}FixedDeque.prototype.clear=function(){this.start=0,this.size=0},FixedDeque.prototype.push=function(e){if(this.size===this.capacity)throw Error(`mnemonist/fixed-deque.push: deque capacity (`+this.capacity+`) exceeded!`);var t=this.start+this.size;return t>=this.capacity&&(t-=this.capacity),this.items[t]=e,++this.size},FixedDeque.prototype.unshift=function(e){if(this.size===this.capacity)throw Error(`mnemonist/fixed-deque.unshift: deque capacity (`+this.capacity+`) exceeded!`);var t=this.start-1;return this.start===0&&(t=this.capacity-1),this.items[t]=e,this.start=t,++this.size},FixedDeque.prototype.pop=function(){if(this.size!==0){this.size--;var e=this.start+this.size;return e>=this.capacity&&(e-=this.capacity),this.items[e]}},FixedDeque.prototype.shift=function(){if(this.size!==0){var e=this.start;return this.size--,this.start++,this.start===this.capacity&&(this.start=0),this.items[e]}},FixedDeque.prototype.peekFirst=function(){if(this.size!==0)return this.items[this.start]},FixedDeque.prototype.peekLast=function(){if(this.size!==0){var e=this.start+this.size-1;return e>=this.capacity&&(e-=this.capacity),this.items[e]}},FixedDeque.prototype.get=function(e){if(!(this.size===0||e>=this.capacity))return e=this.start+e,e>=this.capacity&&(e-=this.capacity),this.items[e]},FixedDeque.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=this.capacity,r=this.size,i=this.start,a=0;a<r;)e.call(t,this.items[i],a,this),i++,a++,i===n&&(i=0)},FixedDeque.prototype.toArray=function(){var e=this.start+this.size;if(e<this.capacity)return this.items.slice(this.start,e);for(var t=new this.ArrayClass(this.size),n=this.capacity,r=this.size,i=this.start,a=0;a<r;)t[a]=this.items[i],i++,a++,i===n&&(i=0);return t},FixedDeque.prototype.values=function(){var e=this.items,t=this.capacity,n=this.size,r=this.start,a=0;return new i(function(){if(a>=n)return{done:!0};var i=e[r];return r++,a++,r===t&&(r=0),{value:i,done:!1}})},FixedDeque.prototype.entries=function(){var e=this.items,t=this.capacity,n=this.size,r=this.start,a=0;return new i(function(){if(a>=n)return{done:!0};var i=e[r];return r++,r===t&&(r=0),{value:[a++,i],done:!1}})},typeof Symbol<`u`&&(FixedDeque.prototype[Symbol.iterator]=FixedDeque.prototype.values),FixedDeque.prototype.inspect=function(){var e=this.toArray();return e.type=this.ArrayClass.name,e.capacity=this.capacity,Object.defineProperty(e,`constructor`,{value:FixedDeque,enumerable:!1}),e},typeof Symbol<`u`&&(FixedDeque.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=FixedDeque.prototype.inspect),FixedDeque.from=function(e,t,r){if(arguments.length<3&&(r=n.guessLength(e),typeof r!=`number`))throw Error(`mnemonist/fixed-deque.from: could not guess iterable length. Please provide desired capacity as last argument.`);var i=new FixedDeque(t,r);if(n.isArrayLike(e)){var a,o;for(a=0,o=e.length;a<o;a++)i.items[a]=e[a];return i.size=o,i}return n.forEach(e,function(e){i.push(e)}),i},t.exports=FixedDeque})),c=e((e=>{let t=o(),n=s();function simpleInDegree(e,t){let n=0;return e.forEachInNeighbor(t,()=>{n++}),n}function forEachNodeInTopologicalOrder(e,r){if(!t(e))throw Error(`graphology-dag/topological-sort: the given graph is not a valid graphology instance.`);if(e.type===`undirected`||e.undirectedSize!==0)throw Error(`graphology-dag/topological-sort: cannot work if graph is not directed.`);if(e.order===0)return;let i=new n(Array,e.order),a={},o=0;e.forEachNode((t,n)=>{let r=e.multi?simpleInDegree(e,t):e.inDegree(t);r===0?i.push([t,n,0]):(a[t]=r,o+=r)});let s=0;function neighborCallback(e,t){let n=--a[e];o--,n===0&&i.push([e,t,s+1]),a[e]=n}for(;i.size!==0;){let[t,n,a]=i.shift();s=a,r(t,n,a),e.forEachOutNeighbor(t,neighborCallback)}if(o!==0)throw Error(`graphology-dag/topological-sort: given graph is not acyclic.`)}function topologicalSort(e){if(!t(e))throw Error(`graphology-dag/topological-sort: the given graph is not a valid graphology instance.`);let n=Array(e.order),r=0;return forEachNodeInTopologicalOrder(e,e=>{n[r++]=e}),n}e.topologicalSort=topologicalSort})),l=e(((e,t)=>{let n=o();t.exports=function willCreateCycle(e,t,r){if(!n(e))throw Error(`graphology-dag/will-create-cycle: the given graph is not a valid graphology instance.`);if(t=``+t,r=``+r,t===r)return!0;if(!e.hasNode(t)||!e.hasNode(r)||e.hasDirectedEdge(t,r))return!1;if(e.hasDirectedEdge(r,t))return!0;let i=e.outNeighbors(r);function push(e){i.push(e)}for(;i.length!==0;){let n=i.pop();if(n===t)return!0;e.forEachOutNeighbor(n,push)}return!1}}));export{r as a,i,c as n,n as o,a as r,l as t};
1
+ import{t as e}from"../rolldown-runtime.mjs";var t=e((e=>{e.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<`u`,e.SYMBOL_SUPPORT=typeof Symbol<`u`})),n=e(((e,n)=>{var r=t(),i=r.ARRAY_BUFFER_SUPPORT,a=r.SYMBOL_SUPPORT;n.exports=function forEach(e,t){var n,r,o,s,c;if(!e)throw Error(`obliterator/forEach: invalid iterable.`);if(typeof t!=`function`)throw Error(`obliterator/forEach: expecting a callback.`);if(Array.isArray(e)||i&&ArrayBuffer.isView(e)||typeof e==`string`||e.toString()===`[object Arguments]`){for(o=0,s=e.length;o<s;o++)t(e[o],o);return}if(typeof e.forEach==`function`){e.forEach(t);return}if(a&&Symbol.iterator in e&&typeof e.next!=`function`&&(e=e[Symbol.iterator]()),typeof e.next==`function`){for(n=e,o=0;c=n.next(),c.done!==!0;)t(c.value,o),o++;return}for(r in e)e.hasOwnProperty(r)&&t(e[r],r)}})),r=e(((e,t)=>{function Iterator(e){if(typeof e!=`function`)throw Error(`obliterator/iterator: expecting a function!`);this.next=e}typeof Symbol<`u`&&(Iterator.prototype[Symbol.iterator]=function(){return this}),Iterator.of=function(){var e=arguments,t=e.length,n=0;return new Iterator(function(){return n>=t?{done:!0}:{done:!1,value:e[n++]}})},Iterator.empty=function(){return new Iterator(function(){return{done:!0}})},Iterator.fromSequence=function(e){var t=0,n=e.length;return new Iterator(function(){return t>=n?{done:!0}:{done:!1,value:e[t++]}})},Iterator.is=function(e){return e instanceof Iterator?!0:typeof e==`object`&&!!e&&typeof e.next==`function`},t.exports=Iterator})),i=e(((e,t)=>{t.exports=function isGraph(e){return typeof e==`object`&&!!e&&typeof e.addUndirectedEdgeWithKey==`function`&&typeof e.dropNode==`function`&&typeof e.multi==`boolean`}})),a=e((e=>{var t=2**8-1,n=2**16-1,r=2**32-1,i=2**7-1,a=2**15-1,o=2**31-1;e.getPointerArray=function(e){var i=e-1;if(i<=t)return Uint8Array;if(i<=n)return Uint16Array;if(i<=r)return Uint32Array;throw Error(`mnemonist: Pointer Array of size > 4294967295 is not supported.`)},e.getSignedPointerArray=function(e){var t=e-1;return t<=i?Int8Array:t<=a?Int16Array:t<=o?Int32Array:Float64Array},e.getNumberType=function(e){return e===(e|0)?Math.sign(e)===-1?e<=127&&e>=-128?Int8Array:e<=32767&&e>=-32768?Int16Array:Int32Array:e<=255?Uint8Array:e<=65535?Uint16Array:Uint32Array:Float64Array};var s={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};e.getMinimalRepresentation=function(t,n){var r=null,i=0,a,o,c,l,u;for(l=0,u=t.length;l<u;l++)c=n?n(t[l]):t[l],o=e.getNumberType(c),a=s[o.name],a>i&&(i=a,r=o);return r},e.isTypedArray=function(e){return typeof ArrayBuffer<`u`&&ArrayBuffer.isView(e)},e.concat=function(){var e=0,t,n,r;for(t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var i=new arguments[0].constructor(e);for(t=0,n=0;t<r;t++)i.set(arguments[t],n),n+=arguments[t].length;return i},e.indices=function(t){for(var n=new(e.getPointerArray(t))(t),r=0;r<t;r++)n[r]=r;return n}})),o=e((e=>{var t=n(),r=a();function isArrayLike(e){return Array.isArray(e)||r.isTypedArray(e)}function guessLength(e){if(typeof e.length==`number`)return e.length;if(typeof e.size==`number`)return e.size}function toArray(e){var n=guessLength(e),r=typeof n==`number`?Array(n):[],i=0;return t(e,function(e){r[i++]=e}),r}function toArrayWithIndices(e){var n=guessLength(e),i=typeof n==`number`?r.getPointerArray(n):Array,a=typeof n==`number`?Array(n):[],o=typeof n==`number`?new i(n):[],s=0;return t(e,function(e){a[s]=e,o[s]=s++}),[a,o]}e.isArrayLike=isArrayLike,e.guessLength=guessLength,e.toArray=toArray,e.toArrayWithIndices=toArrayWithIndices})),s=e(((e,t)=>{var n=o(),i=r();function FixedDeque(e,t){if(arguments.length<2)throw Error(`mnemonist/fixed-deque: expecting an Array class and a capacity.`);if(typeof t!=`number`||t<=0)throw Error("mnemonist/fixed-deque: `capacity` should be a positive number.");this.ArrayClass=e,this.capacity=t,this.items=new e(this.capacity),this.clear()}FixedDeque.prototype.clear=function(){this.start=0,this.size=0},FixedDeque.prototype.push=function(e){if(this.size===this.capacity)throw Error(`mnemonist/fixed-deque.push: deque capacity (`+this.capacity+`) exceeded!`);var t=this.start+this.size;return t>=this.capacity&&(t-=this.capacity),this.items[t]=e,++this.size},FixedDeque.prototype.unshift=function(e){if(this.size===this.capacity)throw Error(`mnemonist/fixed-deque.unshift: deque capacity (`+this.capacity+`) exceeded!`);var t=this.start-1;return this.start===0&&(t=this.capacity-1),this.items[t]=e,this.start=t,++this.size},FixedDeque.prototype.pop=function(){if(this.size!==0){this.size--;var e=this.start+this.size;return e>=this.capacity&&(e-=this.capacity),this.items[e]}},FixedDeque.prototype.shift=function(){if(this.size!==0){var e=this.start;return this.size--,this.start++,this.start===this.capacity&&(this.start=0),this.items[e]}},FixedDeque.prototype.peekFirst=function(){if(this.size!==0)return this.items[this.start]},FixedDeque.prototype.peekLast=function(){if(this.size!==0){var e=this.start+this.size-1;return e>=this.capacity&&(e-=this.capacity),this.items[e]}},FixedDeque.prototype.get=function(e){if(!(this.size===0||e>=this.capacity))return e=this.start+e,e>=this.capacity&&(e-=this.capacity),this.items[e]},FixedDeque.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=this.capacity,r=this.size,i=this.start,a=0;a<r;)e.call(t,this.items[i],a,this),i++,a++,i===n&&(i=0)},FixedDeque.prototype.toArray=function(){var e=this.start+this.size;if(e<this.capacity)return this.items.slice(this.start,e);for(var t=new this.ArrayClass(this.size),n=this.capacity,r=this.size,i=this.start,a=0;a<r;)t[a]=this.items[i],i++,a++,i===n&&(i=0);return t},FixedDeque.prototype.values=function(){var e=this.items,t=this.capacity,n=this.size,r=this.start,a=0;return new i(function(){if(a>=n)return{done:!0};var i=e[r];return r++,a++,r===t&&(r=0),{value:i,done:!1}})},FixedDeque.prototype.entries=function(){var e=this.items,t=this.capacity,n=this.size,r=this.start,a=0;return new i(function(){if(a>=n)return{done:!0};var i=e[r];return r++,r===t&&(r=0),{value:[a++,i],done:!1}})},typeof Symbol<`u`&&(FixedDeque.prototype[Symbol.iterator]=FixedDeque.prototype.values),FixedDeque.prototype.inspect=function(){var e=this.toArray();return e.type=this.ArrayClass.name,e.capacity=this.capacity,Object.defineProperty(e,"constructor",{value:FixedDeque,enumerable:!1}),e},typeof Symbol<`u`&&(FixedDeque.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=FixedDeque.prototype.inspect),FixedDeque.from=function(e,t,r){if(arguments.length<3&&(r=n.guessLength(e),typeof r!=`number`))throw Error(`mnemonist/fixed-deque.from: could not guess iterable length. Please provide desired capacity as last argument.`);var i=new FixedDeque(t,r);if(n.isArrayLike(e)){var a,o;for(a=0,o=e.length;a<o;a++)i.items[a]=e[a];return i.size=o,i}return n.forEach(e,function(e){i.push(e)}),i},t.exports=FixedDeque})),c=e((e=>{let t=i(),n=s();function simpleInDegree(e,t){let n=0;return e.forEachInNeighbor(t,()=>{n++}),n}function forEachNodeInTopologicalOrder(e,r){if(!t(e))throw Error(`graphology-dag/topological-sort: the given graph is not a valid graphology instance.`);if(e.type===`undirected`||e.undirectedSize!==0)throw Error(`graphology-dag/topological-sort: cannot work if graph is not directed.`);if(e.order===0)return;let i=new n(Array,e.order),a={},o=0;e.forEachNode((t,n)=>{let r=e.multi?simpleInDegree(e,t):e.inDegree(t);r===0?i.push([t,n,0]):(a[t]=r,o+=r)});let s=0;function neighborCallback(e,t){let n=--a[e];o--,n===0&&i.push([e,t,s+1]),a[e]=n}for(;i.size!==0;){let[t,n,a]=i.shift();s=a,r(t,n,a),e.forEachOutNeighbor(t,neighborCallback)}if(o!==0)throw Error(`graphology-dag/topological-sort: given graph is not acyclic.`)}function topologicalSort(e){if(!t(e))throw Error(`graphology-dag/topological-sort: the given graph is not a valid graphology instance.`);let n=Array(e.order),r=0;return forEachNodeInTopologicalOrder(e,e=>{n[r++]=e}),n}e.topologicalSort=topologicalSort})),l=e(((e,t)=>{let n=i();t.exports=function willCreateCycle(e,t,r){if(!n(e))throw Error(`graphology-dag/will-create-cycle: the given graph is not a valid graphology instance.`);if(t=``+t,r=``+r,t===r)return!0;if(!e.hasNode(t)||!e.hasNode(r)||e.hasDirectedEdge(t,r))return!1;if(e.hasDirectedEdge(r,t))return!0;let i=e.outNeighbors(r);function push(e){i.push(e)}for(;i.length!==0;){let n=i.pop();if(n===t)return!0;e.forEachOutNeighbor(n,push)}return!1}}));export{n as i,c as n,r,l as t};