yummacss 3.20.8 → 3.21.1
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/cli.mjs +7 -3
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{ConfigSchema as e,configName as t,extractor as n,generator as r}from"@yummacss/nitro";import{existsSync as i,mkdirSync as a,watch as o,writeFileSync as s}from"node:fs";import{dirname as c,join as l}from"node:path";import{pathToFileURL as u}from"node:url";import*as d from"fs";import f from"fs";import p,{basename as m,dirname as h,normalize as g,posix as _,relative as v,resolve as y,sep as b}from"path";import{fileURLToPath as x}from"url";import{createRequire as S}from"module";var C=Object.create,w=Object.defineProperty,T=Object.getOwnPropertyDescriptor,E=Object.getOwnPropertyNames,D=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty,k=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),A=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=E(t),a=0,o=i.length,s;a<o;a++)s=i[a],!O.call(e,s)&&s!==n&&w(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=T(t,s))||r.enumerable});return e},ee=(e,t,n)=>(n=e==null?{}:C(D(e)),A(t||!e||!e.__esModule?w(n,`default`,{value:e,enumerable:!0}):n,e)),j=`3.
|
|
3
|
-
|
|
4
|
-
`)}\n${r}}`}return String(e)}function W(){return{filename:t,content:`import { defineConfig } from "yummacss";\n\nexport default defineConfig(${U(e.parse({}))});\n`}}function G(){let e=B.progress(`Initialize the configuration...`);try{let{filename:t,content:n}=W();s(t,n),e.succeed(L.init.success)}catch{e.fail(L.init.fail),process.exit(1)}}function K(e){"@babel/helpers - typeof";return K=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},K(e)}function q(e,t){if(K(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(K(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function J(e){var t=q(e,`string`);return K(t)==`symbol`?t:t+``}function Y(e,t,n){return(t=J(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var X=S(import.meta.url);function Z(e){let t=g(e);return t.length>1&&t[t.length-1]===b&&(t=t.substring(0,t.length-1)),t}const te=/[\\/]/g;function ne(e,t){return e.replace(te,t)}const re=/^[a-z]:[\\/]$/i;function ie(e){return e===`/`||re.test(e)}function ae(e,t){let{resolvePaths:n,normalizePath:r,pathSeparator:i}=t,a=process.platform===`win32`&&e.includes(`/`)||e.startsWith(`.`);return n&&(e=y(e)),(r||a)&&(e=Z(e)),e===`.`?``:ne(e[e.length-1]===i?e:e+i,i)}function oe(e,t){return t+e}function se(e,t){return function(n,r){return r.startsWith(e)?r.slice(e.length)+n:ne(v(e,r),t.pathSeparator)+t.pathSeparator+n}}function ce(e){return e}function le(e,t,n){return t+e+n}function ue(e,t){let{relativePaths:n,includeBasePath:r}=t;return n&&e?se(e,t):r?oe:ce}function de(e){return function(t,n){n.push(t.substring(e.length)||`.`)}}function fe(e){return function(t,n,r){let i=t.substring(e.length)||`.`;r.every(e=>e(i,!0))&&n.push(i)}}const pe=(e,t)=>{t.push(e||`.`)},me=(e,t,n)=>{let r=e||`.`;n.every(e=>e(r,!0))&&t.push(r)},he=()=>{};function ge(e,t){let{includeDirs:n,filters:r,relativePaths:i}=t;return n?i?r&&r.length?fe(e):de(e):r&&r.length?me:pe:he}const _e=(e,t,n,r)=>{r.every(t=>t(e,!1))&&n.files++},ve=(e,t,n,r)=>{r.every(t=>t(e,!1))&&t.push(e)},ye=(e,t,n,r)=>{n.files++},be=(e,t)=>{t.push(e)},xe=()=>{};function Se(e){let{excludeFiles:t,filters:n,onlyCounts:r}=e;return t?xe:n&&n.length?r?_e:ve:r?ye:be}const Ce=e=>e,we=()=>[``].slice(0,0);function Te(e){return e.group?we:Ce}const Ee=(e,t,n)=>{e.push({directory:t,files:n,dir:t})},De=()=>{};function Oe(e){return e.group?Ee:De}const ke=function(e,t,n){let{queue:r,fs:i,options:{suppressErrors:a}}=t;r.enqueue(),i.realpath(e,(o,s)=>{if(o)return r.dequeue(a?null:o,t);i.stat(s,(i,o)=>{if(i)return r.dequeue(a?null:i,t);if(o.isDirectory()&&Me(e,s,t))return r.dequeue(null,t);n(o,s),r.dequeue(null,t)})})},Ae=function(e,t,n){let{queue:r,fs:i,options:{suppressErrors:a}}=t;r.enqueue();try{let r=i.realpathSync(e),a=i.statSync(r);if(a.isDirectory()&&Me(e,r,t))return;n(a,r)}catch(e){if(!a)throw e}};function je(e,t){return!e.resolveSymlinks||e.excludeSymlinks?null:t?Ae:ke}function Me(e,t,n){if(n.options.useRealPaths)return Ne(t,n);let r=h(e),i=1;for(;r!==n.root&&i<2;){let e=n.symlinks.get(r);e&&(e===t||e.startsWith(t)||t.startsWith(e))?i++:r=h(r)}return n.symlinks.set(e,t),i>1}function Ne(e,t){return t.visited.includes(e+t.options.pathSeparator)}const Pe=e=>e.counts,Fe=e=>e.groups,Ie=e=>e.paths,Le=e=>e.paths.slice(0,e.options.maxFiles),Re=(e,t,n)=>(He(t,n,e.counts,e.options.suppressErrors),null),ze=(e,t,n)=>(He(t,n,e.paths,e.options.suppressErrors),null),Be=(e,t,n)=>(He(t,n,e.paths.slice(0,e.options.maxFiles),e.options.suppressErrors),null),Ve=(e,t,n)=>(He(t,n,e.groups,e.options.suppressErrors),null);function He(e,t,n,r){t(e&&!r?e:null,n)}function Ue(e,t){let{onlyCounts:n,group:r,maxFiles:i}=e;return n?t?Pe:Re:r?t?Fe:Ve:i?t?Le:Be:t?Ie:ze}const We={withFileTypes:!0},Ge=(e,t,n,r,i)=>{if(e.queue.enqueue(),r<0)return e.queue.dequeue(null,e);let{fs:a}=e;e.visited.push(t),e.counts.directories++,a.readdir(t||`.`,We,(t,a=[])=>{i(a,n,r),e.queue.dequeue(e.options.suppressErrors?null:t,e)})},Ke=(e,t,n,r,i)=>{let{fs:a}=e;if(r<0)return;e.visited.push(t),e.counts.directories++;let o=[];try{o=a.readdirSync(t||`.`,We)}catch(t){if(!e.options.suppressErrors)throw t}i(o,n,r)};function qe(e){return e?Ke:Ge}var Je=class{constructor(e){Y(this,`count`,0),this.onQueueEmpty=e}enqueue(){return this.count++,this.count}dequeue(e,t){this.onQueueEmpty&&(--this.count<=0||e)&&(this.onQueueEmpty(e,t),e&&(t.controller.abort(),this.onQueueEmpty=void 0))}},Ye=class{constructor(){Y(this,`_files`,0),Y(this,`_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}},Xe=class{constructor(){Y(this,`aborted`,!1)}abort(){this.aborted=!0}},Ze=class{constructor(e,t,n){Y(this,`root`,void 0),Y(this,`isSynchronous`,void 0),Y(this,`state`,void 0),Y(this,`joinPath`,void 0),Y(this,`pushDirectory`,void 0),Y(this,`pushFile`,void 0),Y(this,`getArray`,void 0),Y(this,`groupFiles`,void 0),Y(this,`resolveSymlink`,void 0),Y(this,`walkDirectory`,void 0),Y(this,`callbackInvoker`,void 0),Y(this,`walk`,(e,t,n)=>{let{paths:r,options:{filters:i,resolveSymlinks:a,excludeSymlinks:o,exclude:s,maxFiles:c,signal:l,useRealPaths:u,pathSeparator:d},controller:f}=this.state;if(f.aborted||l&&l.aborted||c&&r.length>c)return;let p=this.getArray(this.state.paths);for(let c=0;c<e.length;++c){let l=e[c];if(l.isFile()||l.isSymbolicLink()&&!a&&!o){let e=this.joinPath(l.name,t);this.pushFile(e,p,this.state.counts,i)}else if(l.isDirectory()){let e=le(l.name,t,this.state.options.pathSeparator);if(s&&s(l.name,e))continue;this.pushDirectory(e,r,i),this.walkDirectory(this.state,e,e,n-1,this.walk)}else if(this.resolveSymlink&&l.isSymbolicLink()){let e=oe(l.name,t);this.resolveSymlink(e,this.state,(t,r)=>{if(t.isDirectory()){if(r=ae(r,this.state.options),s&&s(l.name,u?r:e+d))return;this.walkDirectory(this.state,r,u?r:e+d,n-1,this.walk)}else{r=u?r:e;let t=m(r),n=ae(h(r),this.state.options);r=this.joinPath(t,n),this.pushFile(r,p,this.state.counts,i)}})}}this.groupFiles(this.state.groups,t,p)}),this.isSynchronous=!n,this.callbackInvoker=Ue(t,this.isSynchronous),this.root=ae(e,t),this.state={root:ie(this.root)?this.root:this.root.slice(0,-1),paths:[``].slice(0,0),groups:[],counts:new Ye,options:t,queue:new Je((e,t)=>this.callbackInvoker(t,e,n)),symlinks:new Map,visited:[``].slice(0,0),controller:new Xe,fs:t.fs||d},this.joinPath=ue(this.root,t),this.pushDirectory=ge(this.root,t),this.pushFile=Se(t),this.getArray=Te(t),this.groupFiles=Oe(t),this.resolveSymlink=je(t,this.isSynchronous),this.walkDirectory=qe(this.isSynchronous)}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}};function Qe(e,t){return new Promise((n,r)=>{$e(e,t,(e,t)=>{if(e)return r(e);n(t)})})}function $e(e,t,n){new Ze(e,t,n).start()}function et(e,t){return new Ze(e,t).start()}var tt=class{constructor(e,t){this.root=e,this.options=t}withPromise(){return Qe(this.root,this.options)}withCallback(e){$e(this.root,this.options,e)}sync(){return et(this.root,this.options)}};let nt=null;try{X.resolve(`picomatch`),nt=X(`picomatch`)}catch{}var rt=class{constructor(e){Y(this,`globCache`,{}),Y(this,`options`,{maxDepth:1/0,suppressErrors:!0,pathSeparator:b,filters:[]}),Y(this,`globFunction`,void 0),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 tt(e||`.`,this.options)}withGlobFunction(e){return this.globFunction=e,this}crawlWithOptions(e,t){return this.options={...this.options,...t},new tt(e||`.`,this.options)}glob(...e){return this.globFunction?this.globWithOptions(e):this.globWithOptions(e,{dot:!0})}globWithOptions(e,...t){let n=this.globFunction||nt;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}},it=k(((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={MAX_LENGTH:1024*64,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:{__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}}})),at=k((e=>{let{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=it();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}})),ot=k(((e,t)=>{let n=at(),{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:_}=it(),v=e=>e===l||e===a,y=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)};t.exports=(e,t)=>{let b=t||{},x=e.length-1,S=b.parts===!0||b.scanToEnd===!0,C=[],w=[],T=[],E=e,D=-1,O=0,k=0,A=!1,ee=!1,j=!1,M=!1,N=!1,P=!1,F=!1,I=!1,L=!1,R=!1,z=0,B,V,H={value:``,depth:0,isGlob:!1},U=()=>D>=x,W=()=>E.charCodeAt(D+1),G=()=>(B=V,E.charCodeAt(++D));for(;D<x;){V=G();let e;if(V===a){F=H.backslashes=!0,V=G(),V===u&&(P=!0);continue}if(P===!0||V===u){for(z++;U()!==!0&&(V=G());){if(V===a){F=H.backslashes=!0,G();continue}if(V===u){z++;continue}if(P!==!0&&V===s&&(V=G())===s){if(A=H.isBrace=!0,j=H.isGlob=!0,R=!0,S===!0)continue;break}if(P!==!0&&V===o){if(A=H.isBrace=!0,j=H.isGlob=!0,R=!0,S===!0)continue;break}if(V===h&&(z--,z===0)){P=!1,A=H.isBrace=!0,R=!0;break}}if(S===!0)continue;break}if(V===l){if(C.push(D),w.push(H),H={value:``,depth:0,isGlob:!1},R===!0)continue;if(B===s&&D===O+1){O+=2;continue}k=D+1;continue}if(b.noext!==!0&&(V===p||V===i||V===r||V===m||V===c)&&W()===d){if(j=H.isGlob=!0,M=H.isExtglob=!0,R=!0,V===c&&D===O&&(L=!0),S===!0){for(;U()!==!0&&(V=G());){if(V===a){F=H.backslashes=!0,V=G();continue}if(V===g){j=H.isGlob=!0,R=!0;break}}continue}break}if(V===r){if(B===r&&(N=H.isGlobstar=!0),j=H.isGlob=!0,R=!0,S===!0)continue;break}if(V===m){if(j=H.isGlob=!0,R=!0,S===!0)continue;break}if(V===f){for(;U()!==!0&&(e=G());){if(e===a){F=H.backslashes=!0,G();continue}if(e===_){ee=H.isBracket=!0,j=H.isGlob=!0,R=!0;break}}if(S===!0)continue;break}if(b.nonegate!==!0&&V===c&&D===O){I=H.negated=!0,O++;continue}if(b.noparen!==!0&&V===d){if(j=H.isGlob=!0,S===!0){for(;U()!==!0&&(V=G());){if(V===d){F=H.backslashes=!0,V=G();continue}if(V===g){R=!0;break}}continue}break}if(j===!0){if(R=!0,S===!0)continue;break}}b.noext===!0&&(M=!1,j=!1);let K=E,q=``,J=``;O>0&&(q=E.slice(0,O),E=E.slice(O),k-=O),K&&j===!0&&k>0?(K=E.slice(0,k),J=E.slice(k)):j===!0?(K=``,J=E):K=E,K&&K!==``&&K!==`/`&&K!==E&&v(K.charCodeAt(K.length-1))&&(K=K.slice(0,-1)),b.unescape===!0&&(J&&(J=n.removeBackslashes(J)),K&&F===!0&&(K=n.removeBackslashes(K)));let Y={prefix:q,input:e,start:O,base:K,glob:J,isBrace:A,isBracket:ee,isGlob:j,isExtglob:M,isGlobstar:N,negated:I,negatedExtglob:L};if(b.tokens===!0&&(Y.maxDepth=0,v(V)||w.push(H),Y.tokens=w),b.parts===!0||b.tokens===!0){let t;for(let n=0;n<C.length;n++){let r=t?t+1:O,i=C[n],a=e.slice(r,i);b.tokens&&(n===0&&O!==0?(w[n].isPrefix=!0,w[n].value=q):w[n].value=a,y(w[n]),Y.maxDepth+=w[n].depth),(n!==0||a!==``)&&T.push(a),t=i}if(t&&t+1<e.length){let n=e.slice(t+1);T.push(n),b.tokens&&(w[w.length-1].value=n,y(w[w.length-1]),Y.maxDepth+=w[w.length-1].depth)}Y.slashes=C,Y.parts=T}return Y}})),st=k(((e,t)=>{let n=it(),r=at(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:c}=n,l=(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},u=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,d=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);e=c[e]||e;let f={...t},p=typeof f.maxLength==`number`?Math.min(i,f.maxLength):i,m=e.length;if(m>p)throw SyntaxError(`Input length: ${m}, exceeds maximum allowed length: ${p}`);let h={type:`bos`,value:``,output:f.prepend||``},g=[h],_=f.capture?``:`?:`,v=n.globChars(f.windows),y=n.extglobChars(v),{DOT_LITERAL:b,PLUS_LITERAL:x,SLASH_LITERAL:S,ONE_CHAR:C,DOTS_SLASH:w,NO_DOT:T,NO_DOT_SLASH:E,NO_DOTS_SLASH:D,QMARK:O,QMARK_NO_DOT:k,STAR:A,START_ANCHOR:ee}=v,j=e=>`(${_}(?:(?!${ee}${e.dot?w:b}).)*?)`,M=f.dot?``:T,N=f.dot?O:k,P=f.bash===!0?j(f):A;f.capture&&(P=`(${P})`),typeof f.noext==`boolean`&&(f.noextglob=f.noext);let F={input:e,index:-1,start:0,dot:f.dot===!0,consumed:``,output:``,prefix:``,backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};e=r.removePrefix(e,F),m=e.length;let I=[],L=[],R=[],z=h,B,V=()=>F.index===m-1,H=F.peek=(t=1)=>e[F.index+t],U=F.advance=()=>e[++F.index]||``,W=()=>e.slice(F.index+1),G=(e=``,t=0)=>{F.consumed+=e,F.index+=t},K=e=>{F.output+=e.output==null?e.value:e.output,G(e.value)},q=()=>{let e=1;for(;H()===`!`&&(H(2)!==`(`||H(3)===`?`);)U(),F.start++,e++;return e%2==0?!1:(F.negated=!0,F.start++,!0)},J=e=>{F[e]++,R.push(e)},Y=e=>{F[e]--,R.pop()},X=e=>{if(z.type===`globstar`){let t=F.braces>0&&(e.type===`comma`||e.type===`brace`),n=e.extglob===!0||I.length&&(e.type===`pipe`||e.type===`paren`);e.type!==`slash`&&e.type!==`paren`&&!t&&!n&&(F.output=F.output.slice(0,-z.output.length),z.type=`star`,z.value=`*`,z.output=P,F.output+=z.output)}if(I.length&&e.type!==`paren`&&(I[I.length-1].inner+=e.value),(e.value||e.output)&&K(e),z&&z.type===`text`&&e.type===`text`){z.output=(z.output||z.value)+e.value,z.value+=e.value;return}e.prev=z,g.push(e),z=e},Z=(e,t)=>{let n={...y[t],conditions:1,inner:``};n.prev=z,n.parens=F.parens,n.output=F.output;let r=(f.capture?`(`:``)+n.open;J(`parens`),X({type:e,value:t,output:F.output?``:C}),X({type:`paren`,extglob:!0,value:U(),output:r}),I.push(n)},te=e=>{let n=e.close+(f.capture?`)`:``),r;if(e.type===`negate`){let i=P;e.inner&&e.inner.length>1&&e.inner.includes(`/`)&&(i=j(f)),(i!==P||V()||/^\)+$/.test(W()))&&(n=e.close=`)$))${i}`),e.inner.includes(`*`)&&(r=W())&&/^\.[^\\/.]+$/.test(r)&&(n=e.close=`)${d(r,{...t,fastpaths:!1}).output})${i})`),e.prev.type===`bos`&&(F.negatedExtglob=!0)}X({type:`paren`,extglob:!0,value:B,output:n}),Y(`parens`)};if(f.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?O.repeat(a.length):``):o===0?N+(a?O.repeat(a.length):``):O.repeat(r.length):i===`.`?b.repeat(r.length):i===`*`?t?t+i+(a?P:``):P:t?e:`\\${e}`);return n===!0&&(i=f.unescape===!0?i.replace(/\\/g,``):i.replace(/\\+/g,e=>e.length%2==0?`\\\\`:e?`\\`:``)),i===e&&f.contains===!0?(F.output=e,F):(F.output=r.wrapOutput(i,F,t),F)}for(;!V();){if(B=U(),B===`\0`)continue;if(B===`\\`){let e=H();if(e===`/`&&f.bash!==!0||e===`.`||e===`;`)continue;if(!e){B+=`\\`,X({type:`text`,value:B});continue}let t=/^\\+/.exec(W()),n=0;if(t&&t[0].length>2&&(n=t[0].length,F.index+=n,n%2!=0&&(B+=`\\`)),f.unescape===!0?B=U():B+=U(),F.brackets===0){X({type:`text`,value:B});continue}}if(F.brackets>0&&(B!==`]`||z.value===`[`||z.value===`[^`)){if(f.posix!==!1&&B===`:`){let e=z.value.slice(1);if(e.includes(`[`)&&(z.posix=!0,e.includes(`:`))){let e=z.value.lastIndexOf(`[`),t=z.value.slice(0,e),n=a[z.value.slice(e+2)];if(n){z.value=t+n,F.backtrack=!0,U(),!h.output&&g.indexOf(z)===1&&(h.output=C);continue}}}(B===`[`&&H()!==`:`||B===`-`&&H()===`]`)&&(B=`\\${B}`),B===`]`&&(z.value===`[`||z.value===`[^`)&&(B=`\\${B}`),f.posix===!0&&B===`!`&&z.value===`[`&&(B=`^`),z.value+=B,K({value:B});continue}if(F.quotes===1&&B!==`"`){B=r.escapeRegex(B),z.value+=B,K({value:B});continue}if(B===`"`){F.quotes=F.quotes===1?0:1,f.keepQuotes===!0&&X({type:`text`,value:B});continue}if(B===`(`){J(`parens`),X({type:`paren`,value:B});continue}if(B===`)`){if(F.parens===0&&f.strictBrackets===!0)throw SyntaxError(u(`opening`,`(`));let e=I[I.length-1];if(e&&F.parens===e.parens+1){te(I.pop());continue}X({type:`paren`,value:B,output:F.parens?`)`:`\\)`}),Y(`parens`);continue}if(B===`[`){if(f.nobracket===!0||!W().includes(`]`)){if(f.nobracket!==!0&&f.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));B=`\\${B}`}else J(`brackets`);X({type:`bracket`,value:B});continue}if(B===`]`){if(f.nobracket===!0||z&&z.type===`bracket`&&z.value.length===1){X({type:`text`,value:B,output:`\\${B}`});continue}if(F.brackets===0){if(f.strictBrackets===!0)throw SyntaxError(u(`opening`,`[`));X({type:`text`,value:B,output:`\\${B}`});continue}Y(`brackets`);let e=z.value.slice(1);if(z.posix!==!0&&e[0]===`^`&&!e.includes(`/`)&&(B=`/${B}`),z.value+=B,K({value:B}),f.literalBrackets===!1||r.hasRegexChars(e))continue;let t=r.escapeRegex(z.value);if(F.output=F.output.slice(0,-z.value.length),f.literalBrackets===!0){F.output+=t,z.value=t;continue}z.value=`(${_}${t}|${z.value})`,F.output+=z.value;continue}if(B===`{`&&f.nobrace!==!0){J(`braces`);let e={type:`brace`,value:B,output:`(`,outputIndex:F.output.length,tokensIndex:F.tokens.length};L.push(e),X(e);continue}if(B===`}`){let e=L[L.length-1];if(f.nobrace===!0||!e){X({type:`text`,value:B,output:B});continue}let t=`)`;if(e.dots===!0){let e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),e[t].type!==`brace`);t--)e[t].type!==`dots`&&n.unshift(e[t].value);t=l(n,f),F.backtrack=!0}if(e.comma!==!0&&e.dots!==!0){let n=F.output.slice(0,e.outputIndex),r=F.tokens.slice(e.tokensIndex);e.value=e.output=`\\{`,B=t=`\\}`,F.output=n;for(let e of r)F.output+=e.output||e.value}X({type:`brace`,value:B,output:t}),Y(`braces`),L.pop();continue}if(B===`|`){I.length>0&&I[I.length-1].conditions++,X({type:`text`,value:B});continue}if(B===`,`){let e=B,t=L[L.length-1];t&&R[R.length-1]===`braces`&&(t.comma=!0,e=`|`),X({type:`comma`,value:B,output:e});continue}if(B===`/`){if(z.type===`dot`&&F.index===F.start+1){F.start=F.index+1,F.consumed=``,F.output=``,g.pop(),z=h;continue}X({type:`slash`,value:B,output:S});continue}if(B===`.`){if(F.braces>0&&z.type===`dot`){z.value===`.`&&(z.output=b);let e=L[L.length-1];z.type=`dots`,z.output+=B,z.value+=B,e.dots=!0;continue}if(F.braces+F.parens===0&&z.type!==`bos`&&z.type!==`slash`){X({type:`text`,value:B,output:b});continue}X({type:`dot`,value:B,output:b});continue}if(B===`?`){if(!(z&&z.value===`(`)&&f.noextglob!==!0&&H()===`(`&&H(2)!==`?`){Z(`qmark`,B);continue}if(z&&z.type===`paren`){let e=H(),t=B;(z.value===`(`&&!/[!=<:]/.test(e)||e===`<`&&!/<([!=]|\w+>)/.test(W()))&&(t=`\\${B}`),X({type:`text`,value:B,output:t});continue}if(f.dot!==!0&&(z.type===`slash`||z.type===`bos`)){X({type:`qmark`,value:B,output:k});continue}X({type:`qmark`,value:B,output:O});continue}if(B===`!`){if(f.noextglob!==!0&&H()===`(`&&(H(2)!==`?`||!/[!=<:]/.test(H(3)))){Z(`negate`,B);continue}if(f.nonegate!==!0&&F.index===0){q();continue}}if(B===`+`){if(f.noextglob!==!0&&H()===`(`&&H(2)!==`?`){Z(`plus`,B);continue}if(z&&z.value===`(`||f.regex===!1){X({type:`plus`,value:B,output:x});continue}if(z&&(z.type===`bracket`||z.type===`paren`||z.type===`brace`)||F.parens>0){X({type:`plus`,value:B});continue}X({type:`plus`,value:x});continue}if(B===`@`){if(f.noextglob!==!0&&H()===`(`&&H(2)!==`?`){X({type:`at`,extglob:!0,value:B,output:``});continue}X({type:`text`,value:B});continue}if(B!==`*`){(B===`$`||B===`^`)&&(B=`\\${B}`);let e=o.exec(W());e&&(B+=e[0],F.index+=e[0].length),X({type:`text`,value:B});continue}if(z&&(z.type===`globstar`||z.star===!0)){z.type=`star`,z.star=!0,z.value+=B,z.output=P,F.backtrack=!0,F.globstar=!0,G(B);continue}let t=W();if(f.noextglob!==!0&&/^\([^?]/.test(t)){Z(`star`,B);continue}if(z.type===`star`){if(f.noglobstar===!0){G(B);continue}let n=z.prev,r=n.prev,i=n.type===`slash`||n.type===`bos`,a=r&&(r.type===`star`||r.type===`globstar`);if(f.bash===!0&&(!i||t[0]&&t[0]!==`/`)){X({type:`star`,value:B,output:``});continue}let o=F.braces>0&&(n.type===`comma`||n.type===`brace`),s=I.length&&(n.type===`pipe`||n.type===`paren`);if(!i&&n.type!==`paren`&&!o&&!s){X({type:`star`,value:B,output:``});continue}for(;t.slice(0,3)===`/**`;){let n=e[F.index+4];if(n&&n!==`/`)break;t=t.slice(3),G(`/**`,3)}if(n.type===`bos`&&V()){z.type=`globstar`,z.value+=B,z.output=j(f),F.output=z.output,F.globstar=!0,G(B);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&!a&&V()){F.output=F.output.slice(0,-(n.output+z.output).length),n.output=`(?:${n.output}`,z.type=`globstar`,z.output=j(f)+(f.strictSlashes?`)`:`|$)`),z.value+=B,F.globstar=!0,F.output+=n.output+z.output,G(B);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&t[0]===`/`){let e=t[1]===void 0?``:`|$`;F.output=F.output.slice(0,-(n.output+z.output).length),n.output=`(?:${n.output}`,z.type=`globstar`,z.output=`${j(f)}${S}|${S}${e})`,z.value+=B,F.output+=n.output+z.output,F.globstar=!0,G(B+U()),X({type:`slash`,value:`/`,output:``});continue}if(n.type===`bos`&&t[0]===`/`){z.type=`globstar`,z.value+=B,z.output=`(?:^|${S}|${j(f)}${S})`,F.output=z.output,F.globstar=!0,G(B+U()),X({type:`slash`,value:`/`,output:``});continue}F.output=F.output.slice(0,-z.output.length),z.type=`globstar`,z.output=j(f),z.value+=B,F.output+=z.output,F.globstar=!0,G(B);continue}let n={type:`star`,value:B,output:P};if(f.bash===!0){n.output=`.*?`,(z.type===`bos`||z.type===`slash`)&&(n.output=M+n.output),X(n);continue}if(z&&(z.type===`bracket`||z.type===`paren`)&&f.regex===!0){n.output=B,X(n);continue}(F.index===F.start||z.type===`slash`||z.type===`dot`)&&(z.type===`dot`?(F.output+=E,z.output+=E):f.dot===!0?(F.output+=D,z.output+=D):(F.output+=M,z.output+=M),H()!==`*`&&(F.output+=C,z.output+=C)),X(n)}for(;F.brackets>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));F.output=r.escapeLast(F.output,`[`),Y(`brackets`)}for(;F.parens>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`)`));F.output=r.escapeLast(F.output,`(`),Y(`parens`)}for(;F.braces>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`}`));F.output=r.escapeLast(F.output,`{`),Y(`braces`)}if(f.strictSlashes!==!0&&(z.type===`star`||z.type===`bracket`)&&X({type:`maybe_slash`,value:``,output:`${S}?`}),F.backtrack===!0){F.output=``;for(let e of F.tokens)F.output+=e.output==null?e.value:e.output,e.suffix&&(F.output+=e.suffix)}return F};d.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 C=e=>e.noglobstar===!0?S:`(${b}(?:(?!${_}${e.dot?f:l}).)*?)`,w=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+C(a);case`**/*`:return`(?:${v}${C(a)}${u})?${y}${d}${S}`;case`**/*.*`:return`(?:${v}${C(a)}${u})?${y}${S}${l}${d}${S}`;case`**/.*`:return`(?:${v}${C(a)}${u})?${l}${d}${S}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=w(t[1]);return n?n+l+t[2]:void 0}}},T=w(r.removePrefix(e,x));return T&&a.strictSlashes!==!0&&(T+=`${u}?`),T},t.exports=d})),ct=k(((e,t)=>{let n=ot(),r=st(),i=at(),a=it(),o=e=>e&&typeof e==`object`&&!Array.isArray(e),s=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>s(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=o(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,c=r?s.compileRe(e,t):s.makeRe(e,t,!1,!0),l=c.state;delete c.state;let u=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};u=s(i.ignore,e,n)}let d=(n,r=!1)=>{let{isMatch:o,match:d,output:f}=s.test(n,c,t,{glob:e,posix:a}),p={glob:e,state:l,regex:c,posix:a,input:n,output:f,match:d,isMatch:o};return typeof i.onResult==`function`&&i.onResult(p),o===!1?(p.isMatch=!1,r?p:!1):u(n)?(typeof i.onIgnore==`function`&&i.onIgnore(p),p.isMatch=!1,r?p:!1):(typeof i.onMatch==`function`&&i.onMatch(p),r?p:!0)};return n&&(d.state=l),d};s.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||{},c=o.format||(a?i.toPosixSlashes:null),l=e===r,u=l&&c?c(e):e;return l===!1&&(u=c?c(e):e,l=u===r),(l===!1||o.capture===!0)&&(l=o.matchBase===!0||o.basename===!0?s.matchBase(e,t,n,a):t.exec(u)),{isMatch:!!l,match:l,output:u}},s.matchBase=(e,t,n)=>(t instanceof RegExp?t:s.makeRe(t,n)).test(i.basename(e)),s.isMatch=(e,t,n)=>s(t,n)(e),s.parse=(e,t)=>Array.isArray(e)?e.map(e=>s.parse(e,t)):r(e,{...t,fastpaths:!1}),s.scan=(e,t)=>n(e,t),s.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},a=i.contains?``:`^`,o=i.contains?``:`$`,c=`${a}(?:${e.output})${o}`;e&&e.negated===!0&&(c=`^(?!${c}).*$`);let l=s.toRegex(c,t);return r===!0&&(l.state=e),l},s.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)),s.compileRe(a,t,n,i)},s.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/$^/}},s.constants=a,t.exports=s})),Q=ee(k(((e,t)=>{let n=ct(),r=at();function i(e,t,i=!1){return t&&(t.windows===null||t.windows===void 0)&&(t={...t,windows:r.isWindows()}),n(e,t,i)}Object.assign(i,n),t.exports=i}))(),1);const lt=Array.isArray,ut=process.platform===`win32`,dt=/^(\/?\.\.)+$/;function ft(e,t={}){let n=e.length,r=Array(n),i=Array(n),a=!t.noglobstar;for(let a=0;a<n;a++){let n=vt(e[a]);r[a]=n;let o=n.length,s=Array(o);for(let e=0;e<o;e++)s[e]=(0,Q.default)(n[e],t);i[a]=s}return t=>{let n=t.split(`/`);if(n[0]===`..`&&dt.test(t))return!0;for(let t=0;t<e.length;t++){let e=r[t],o=i[t],s=n.length,c=Math.min(s,e.length),l=0;for(;l<c;){let t=e[l];if(t.includes(`/`))return!0;if(!o[l](n[l]))break;if(a&&t===`**`)return!0;l++}if(l===s)return!0}return!1}}const pt=/^[A-Z]:\/$/i,mt=ut?e=>pt.test(e):e=>e===`/`;function ht(e,t,n){if(e===t||t.startsWith(`${e}/`)){if(n){let t=mt(e)?e.length:e.length+1;return(e,n)=>e.slice(t,n?-1:void 0)||`.`}let r=t.slice(e.length+1);return r?(e,t)=>{if(e===`.`)return r;let n=`${r}/${e}`;return t?n.slice(0,-1):n}:(e,t)=>t&&e!==`.`?e.slice(0,-1):e}return n?t=>_.relative(e,t)||`.`:n=>_.relative(e,`${t}/${n}`)||`.`}function gt(e,t){if(t.startsWith(`${e}/`)){let n=t.slice(e.length+1);return e=>`${n}/${e}`}return n=>{let r=_.relative(e,`${t}/${n}`);return n.endsWith(`/`)&&r!==``?`${r}/`:r||`.`}}const _t={parts:!0};function vt(e){let t=Q.default.scan(e,_t);return t.parts?.length?t.parts:[e]}const yt=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,bt=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,xt=ut?e=>e.replace(bt,`\\$&`):e=>e.replace(yt,`\\$&`);function St(e,t){if(t?.caseSensitiveMatch===!1)return!0;let n=Q.default.scan(e);return n.isGlob||n.negated}function $(...e){console.log(`[tinyglobby ${new Date().toLocaleTimeString(`es`)}]`,...e)}const Ct=/^(\/?\.\.)+/,wt=/\\(?=[()[\]{}!*+?@|])/g,Tt=/\\/g;function Et(e,t,n,r,i){let a=e;e.endsWith(`/`)&&(a=e.slice(0,-1)),!a.endsWith(`*`)&&t&&(a+=`/**`);let o=xt(n);a=p.isAbsolute(a.replace(wt,``))?_.relative(o,a):_.normalize(a);let s=Ct.exec(a),c=vt(a);if(s?.[0]){let e=(s[0].length+1)/3,t=0,i=o.split(`/`);for(;t<e&&c[t+e]===i[i.length+t-e];)a=a.slice(0,(e-t-1)*3)+a.slice((e-t)*3+c[t+e].length+1)||`.`,t++;let l=_.join(n,s[0].slice(t*3));!l.startsWith(`.`)&&r.root.length>l.length&&(r.root=l,r.depthOffset=-e+t)}if(!i&&r.depthOffset>=0){r.commonPath??(r.commonPath=c);let e=[],t=Math.min(r.commonPath.length,c.length);for(let n=0;n<t;n++){let t=c[n];if(t===`**`&&!c[n+1]){e.pop();break}if(t!==r.commonPath[n]||St(t)||n===c.length-1)break;e.push(t)}r.depthOffset=e.length,r.commonPath=e,r.root=e.length>0?_.join(n,...e):n}return a}function Dt({patterns:e=[`**/*`],ignore:t=[],expandDirectories:n=!0},r,i){typeof e==`string`&&(e=[e]),typeof t==`string`&&(t=[t]);let a=[],o=[];for(let e of t)e&&(e[0]!==`!`||e[1]===`(`)&&o.push(Et(e,n,r,i,!0));for(let t of e)t&&(t[0]!==`!`||t[1]===`(`?a.push(Et(t,n,r,i,!1)):(t[1]!==`!`||t[2]===`(`)&&o.push(Et(t.slice(1),n,r,i,!0)));return{match:a,ignore:o}}function Ot(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];e[n]=t(r)}return e}function kt(e){return e?e instanceof URL?x(e).replace(Tt,`/`):p.resolve(e).replace(Tt,`/`):process.cwd().replace(Tt,`/`)}function At(e,t={}){let n=process.env.TINYGLOBBY_DEBUG?{...t,debug:!0}:t,r=kt(n.cwd);if(n.debug&&$(`globbing with:`,{patterns:e,options:n,cwd:r}),Array.isArray(e)&&e.length===0)return[{sync:()=>[],withPromise:async()=>[]},!1];let i={root:r,commonPath:null,depthOffset:0},a=Dt({...n,patterns:e},r,i);n.debug&&$(`internal processing patterns:`,a);let o={dot:n.dot,nobrace:n.braceExpansion===!1,nocase:n.caseSensitiveMatch===!1,noextglob:n.extglob===!1,noglobstar:n.globstar===!1,posix:!0},s=(0,Q.default)(a.match,{...o,ignore:a.ignore}),c=(0,Q.default)(a.ignore,o),l=ft(a.match,o),u=ht(r,i.root,n.absolute),d=n.absolute?u:ht(r,i.root,!0),p={filters:[n.debug?(e,t)=>{let n=u(e,t),r=s(n);return r&&$(`matched ${n}`),r}:(e,t)=>s(u(e,t))],exclude:n.debug?(e,t)=>{let n=d(t,!0),r=n!==`.`&&!l(n)||c(n);return $(r?`skipped ${t}`:`crawling ${t}`),r}:(e,t)=>{let n=d(t,!0);return n!==`.`&&!l(n)||c(n)},fs:n.fs?{readdir:n.fs.readdir||f.readdir,readdirSync:n.fs.readdirSync||f.readdirSync,realpath:n.fs.realpath||f.realpath,realpathSync:n.fs.realpathSync||f.realpathSync,stat:n.fs.stat||f.stat,statSync:n.fs.statSync||f.statSync}:void 0,pathSeparator:`/`,relativePaths:!0,resolveSymlinks:!0,signal:n.signal};n.deep!==void 0&&(p.maxDepth=Math.round(n.deep-i.depthOffset)),n.absolute&&(p.relativePaths=!1,p.resolvePaths=!0,p.includeBasePath=!0),n.followSymbolicLinks===!1&&(p.resolveSymlinks=!1,p.excludeSymlinks=!0),n.onlyDirectories?(p.excludeFiles=!0,p.includeDirs=!0):n.onlyFiles===!1&&(p.includeDirs=!0),i.root=i.root.replace(Tt,``);let m=i.root;n.debug&&$(`internal properties:`,i);let h=r!==m&&!n.absolute&>(r,i.root);return[new rt(p).crawl(m),h]}async function jt(e,t){if(e&&t?.patterns)throw Error(`Cannot pass patterns as both an argument and an option`);let n=lt(e)||typeof e==`string`,r=n?t:e,[i,a]=At(n?e:e.patterns,r);return a?Ot(await i.withPromise(),a):i.withPromise()}let Mt,Nt=null;const Pt=new Set;function Ft(e,t){Pt.add(e),Nt&&clearTimeout(Nt),Nt=setTimeout(async()=>{Pt.size>0&&(await H(Mt,!0),Pt.clear()),Nt=null},500)}async function It(){try{Mt=await V(),await H(Mt,!0),B.info(L.watch.start);let e=await jt(Mt.source);for(let t of e)o(t,e=>{Ft(t,e)})}catch{B.fail(L.watch.fail),process.exit(1)}}switch(process.argv.slice(2)[0]){case`init`:case`i`:G();break;case`build`:case`b`:H().catch(()=>process.exit(1));break;case`watch`:case`w`:It().catch(()=>process.exit(1));break;default:console.log(`
|
|
2
|
+
import{ConfigSchema as e,configName as t,extractor as n,generator as r}from"@yummacss/nitro";import{existsSync as i,mkdirSync as a,watch as o,writeFileSync as s}from"node:fs";import{dirname as c,join as l}from"node:path";import{pathToFileURL as u}from"node:url";import*as d from"fs";import f from"fs";import p,{basename as m,dirname as h,normalize as g,posix as _,relative as v,resolve as y,sep as b}from"path";import{fileURLToPath as x}from"url";import{createRequire as S}from"module";var C=Object.create,w=Object.defineProperty,T=Object.getOwnPropertyDescriptor,E=Object.getOwnPropertyNames,D=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty,k=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),A=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=E(t),a=0,o=i.length,s;a<o;a++)s=i[a],!O.call(e,s)&&s!==n&&w(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=T(t,s))||r.enumerable});return e},ee=(e,t,n)=>(n=e==null?{}:C(D(e)),A(t||!e||!e.__esModule?w(n,`default`,{value:e,enumerable:!0}):n,e)),j=`3.21.1`;let M={};function N(){return M}function P(e){M=e}function F(e){let t=JSON.stringify(e);return M.configHash!==t}async function I(e){return{css:r(await n(e.source),e),dependencies:e.source}}const L={build:{start:`Build the styles...`,success:(e,t)=>`Built the styles in ${e} ms. (${t})`,fail:`Something went wrong—check the files and try again.`},init:{fail:`Something went wrong—try again or check the documentation.`,invalid:`Your configuration is invalid. Check the syntax and try again.`,notFound:`Your configuration was not found. Initialize a new one with the 'init' command.`,success:`Created the configuration.`},watch:{start:`Watch for file changes...`,fail:`Something went wrong—try again or check the documentation.`},common:{unknownError:`Something went wrong—try again or contact support.`}},R=`[Yumma CSS]`;function z(){process.stdout.isTTY&&process.stdout.write(`\x1B[2K\x1B[0G`)}const B={fail:e=>console.error(`${R} Error: ${e}`),info:e=>console.info(`${R} Info: ${e}`),progress:e=>(console.log(`${R}: ${e}`),{succeed:t=>{z(),console.log(`${R} Done: ${t||e}`)},fail:t=>{z(),console.error(`${R} Error: ${t||e}`)},warn:t=>{z(),console.warn(`${R} Warn: ${t||e}`)},info:t=>{z(),console.info(`${R} Info: ${t||e}`)},stop:()=>{z()}}),success:e=>console.log(`${R} Done: ${e}`),warn:e=>console.warn(`${R} Warn: ${e}`)};async function V(){let n=u(l(process.cwd(),t)).href;try{let{default:t}=await import(n);return e.parse(t)}catch{i(t)||(B.progress(L.init.notFound).fail(L.init.notFound),process.exit(1)),B.progress(L.init.invalid).fail(L.init.invalid),process.exit(1)}}async function H(e,t=!1){let n=B.progress(L.build.start),r=Date.now();try{let i=e||await V(),o=N(),l=F(i),u;if(t||l||!o.css){let e=await I(i);u=e.css,P({configHash:JSON.stringify(i),css:e.css,dependencies:e.dependencies})}else u=o.css;a(c(i.output),{recursive:!0}),s(i.output,u),n.succeed(L.build.success(Date.now()-r,i.output))}catch(e){n.fail(`${L.build.fail} ${e instanceof Error?e.message:String(e)}`),process.exit(1)}}function U(){return{filename:t,content:`import { defineConfig } from "yummacss";
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
source: [""],
|
|
6
|
+
output: "",
|
|
7
|
+
});
|
|
8
|
+
`}}function W(){let e=B.progress(`Initialize the configuration...`);try{let{filename:t,content:n}=U();s(t,n),e.succeed(L.init.success)}catch{e.fail(L.init.fail),process.exit(1)}}function G(e){"@babel/helpers - typeof";return G=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},G(e)}function K(e,t){if(G(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(G(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function q(e){var t=K(e,`string`);return G(t)==`symbol`?t:t+``}function J(e,t,n){return(t=q(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Y=S(import.meta.url);function X(e){let t=g(e);return t.length>1&&t[t.length-1]===b&&(t=t.substring(0,t.length-1)),t}const Z=/[\\/]/g;function te(e,t){return e.replace(Z,t)}const ne=/^[a-z]:[\\/]$/i;function re(e){return e===`/`||ne.test(e)}function ie(e,t){let{resolvePaths:n,normalizePath:r,pathSeparator:i}=t,a=process.platform===`win32`&&e.includes(`/`)||e.startsWith(`.`);return n&&(e=y(e)),(r||a)&&(e=X(e)),e===`.`?``:te(e[e.length-1]===i?e:e+i,i)}function ae(e,t){return t+e}function oe(e,t){return function(n,r){return r.startsWith(e)?r.slice(e.length)+n:te(v(e,r),t.pathSeparator)+t.pathSeparator+n}}function se(e){return e}function ce(e,t,n){return t+e+n}function le(e,t){let{relativePaths:n,includeBasePath:r}=t;return n&&e?oe(e,t):r?ae:se}function ue(e){return function(t,n){n.push(t.substring(e.length)||`.`)}}function de(e){return function(t,n,r){let i=t.substring(e.length)||`.`;r.every(e=>e(i,!0))&&n.push(i)}}const fe=(e,t)=>{t.push(e||`.`)},pe=(e,t,n)=>{let r=e||`.`;n.every(e=>e(r,!0))&&t.push(r)},me=()=>{};function he(e,t){let{includeDirs:n,filters:r,relativePaths:i}=t;return n?i?r&&r.length?de(e):ue(e):r&&r.length?pe:fe:me}const ge=(e,t,n,r)=>{r.every(t=>t(e,!1))&&n.files++},_e=(e,t,n,r)=>{r.every(t=>t(e,!1))&&t.push(e)},ve=(e,t,n,r)=>{n.files++},ye=(e,t)=>{t.push(e)},be=()=>{};function xe(e){let{excludeFiles:t,filters:n,onlyCounts:r}=e;return t?be:n&&n.length?r?ge:_e:r?ve:ye}const Se=e=>e,Ce=()=>[``].slice(0,0);function we(e){return e.group?Ce:Se}const Te=(e,t,n)=>{e.push({directory:t,files:n,dir:t})},Ee=()=>{};function De(e){return e.group?Te:Ee}const Oe=function(e,t,n){let{queue:r,fs:i,options:{suppressErrors:a}}=t;r.enqueue(),i.realpath(e,(o,s)=>{if(o)return r.dequeue(a?null:o,t);i.stat(s,(i,o)=>{if(i)return r.dequeue(a?null:i,t);if(o.isDirectory()&&je(e,s,t))return r.dequeue(null,t);n(o,s),r.dequeue(null,t)})})},ke=function(e,t,n){let{queue:r,fs:i,options:{suppressErrors:a}}=t;r.enqueue();try{let r=i.realpathSync(e),a=i.statSync(r);if(a.isDirectory()&&je(e,r,t))return;n(a,r)}catch(e){if(!a)throw e}};function Ae(e,t){return!e.resolveSymlinks||e.excludeSymlinks?null:t?ke:Oe}function je(e,t,n){if(n.options.useRealPaths)return Me(t,n);let r=h(e),i=1;for(;r!==n.root&&i<2;){let e=n.symlinks.get(r);e&&(e===t||e.startsWith(t)||t.startsWith(e))?i++:r=h(r)}return n.symlinks.set(e,t),i>1}function Me(e,t){return t.visited.includes(e+t.options.pathSeparator)}const Ne=e=>e.counts,Pe=e=>e.groups,Fe=e=>e.paths,Ie=e=>e.paths.slice(0,e.options.maxFiles),Le=(e,t,n)=>(Ve(t,n,e.counts,e.options.suppressErrors),null),Re=(e,t,n)=>(Ve(t,n,e.paths,e.options.suppressErrors),null),ze=(e,t,n)=>(Ve(t,n,e.paths.slice(0,e.options.maxFiles),e.options.suppressErrors),null),Be=(e,t,n)=>(Ve(t,n,e.groups,e.options.suppressErrors),null);function Ve(e,t,n,r){t(e&&!r?e:null,n)}function He(e,t){let{onlyCounts:n,group:r,maxFiles:i}=e;return n?t?Ne:Le:r?t?Pe:Be:i?t?Ie:ze:t?Fe:Re}const Ue={withFileTypes:!0},We=(e,t,n,r,i)=>{if(e.queue.enqueue(),r<0)return e.queue.dequeue(null,e);let{fs:a}=e;e.visited.push(t),e.counts.directories++,a.readdir(t||`.`,Ue,(t,a=[])=>{i(a,n,r),e.queue.dequeue(e.options.suppressErrors?null:t,e)})},Ge=(e,t,n,r,i)=>{let{fs:a}=e;if(r<0)return;e.visited.push(t),e.counts.directories++;let o=[];try{o=a.readdirSync(t||`.`,Ue)}catch(t){if(!e.options.suppressErrors)throw t}i(o,n,r)};function Ke(e){return e?Ge:We}var qe=class{constructor(e){J(this,`count`,0),this.onQueueEmpty=e}enqueue(){return this.count++,this.count}dequeue(e,t){this.onQueueEmpty&&(--this.count<=0||e)&&(this.onQueueEmpty(e,t),e&&(t.controller.abort(),this.onQueueEmpty=void 0))}},Je=class{constructor(){J(this,`_files`,0),J(this,`_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}},Ye=class{constructor(){J(this,`aborted`,!1)}abort(){this.aborted=!0}},Xe=class{constructor(e,t,n){J(this,`root`,void 0),J(this,`isSynchronous`,void 0),J(this,`state`,void 0),J(this,`joinPath`,void 0),J(this,`pushDirectory`,void 0),J(this,`pushFile`,void 0),J(this,`getArray`,void 0),J(this,`groupFiles`,void 0),J(this,`resolveSymlink`,void 0),J(this,`walkDirectory`,void 0),J(this,`callbackInvoker`,void 0),J(this,`walk`,(e,t,n)=>{let{paths:r,options:{filters:i,resolveSymlinks:a,excludeSymlinks:o,exclude:s,maxFiles:c,signal:l,useRealPaths:u,pathSeparator:d},controller:f}=this.state;if(f.aborted||l&&l.aborted||c&&r.length>c)return;let p=this.getArray(this.state.paths);for(let c=0;c<e.length;++c){let l=e[c];if(l.isFile()||l.isSymbolicLink()&&!a&&!o){let e=this.joinPath(l.name,t);this.pushFile(e,p,this.state.counts,i)}else if(l.isDirectory()){let e=ce(l.name,t,this.state.options.pathSeparator);if(s&&s(l.name,e))continue;this.pushDirectory(e,r,i),this.walkDirectory(this.state,e,e,n-1,this.walk)}else if(this.resolveSymlink&&l.isSymbolicLink()){let e=ae(l.name,t);this.resolveSymlink(e,this.state,(t,r)=>{if(t.isDirectory()){if(r=ie(r,this.state.options),s&&s(l.name,u?r:e+d))return;this.walkDirectory(this.state,r,u?r:e+d,n-1,this.walk)}else{r=u?r:e;let t=m(r),n=ie(h(r),this.state.options);r=this.joinPath(t,n),this.pushFile(r,p,this.state.counts,i)}})}}this.groupFiles(this.state.groups,t,p)}),this.isSynchronous=!n,this.callbackInvoker=He(t,this.isSynchronous),this.root=ie(e,t),this.state={root:re(this.root)?this.root:this.root.slice(0,-1),paths:[``].slice(0,0),groups:[],counts:new Je,options:t,queue:new qe((e,t)=>this.callbackInvoker(t,e,n)),symlinks:new Map,visited:[``].slice(0,0),controller:new Ye,fs:t.fs||d},this.joinPath=le(this.root,t),this.pushDirectory=he(this.root,t),this.pushFile=xe(t),this.getArray=we(t),this.groupFiles=De(t),this.resolveSymlink=Ae(t,this.isSynchronous),this.walkDirectory=Ke(this.isSynchronous)}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}};function Ze(e,t){return new Promise((n,r)=>{Qe(e,t,(e,t)=>{if(e)return r(e);n(t)})})}function Qe(e,t,n){new Xe(e,t,n).start()}function $e(e,t){return new Xe(e,t).start()}var et=class{constructor(e,t){this.root=e,this.options=t}withPromise(){return Ze(this.root,this.options)}withCallback(e){Qe(this.root,this.options,e)}sync(){return $e(this.root,this.options)}};let tt=null;try{Y.resolve(`picomatch`),tt=Y(`picomatch`)}catch{}var nt=class{constructor(e){J(this,`globCache`,{}),J(this,`options`,{maxDepth:1/0,suppressErrors:!0,pathSeparator:b,filters:[]}),J(this,`globFunction`,void 0),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 et(e||`.`,this.options)}withGlobFunction(e){return this.globFunction=e,this}crawlWithOptions(e,t){return this.options={...this.options,...t},new et(e||`.`,this.options)}glob(...e){return this.globFunction?this.globWithOptions(e):this.globWithOptions(e,{dot:!0})}globWithOptions(e,...t){let n=this.globFunction||tt;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}},rt=k(((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={MAX_LENGTH:1024*64,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:{__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}}})),it=k((e=>{let{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=rt();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}})),at=k(((e,t)=>{let n=it(),{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:_}=rt(),v=e=>e===l||e===a,y=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)};t.exports=(e,t)=>{let b=t||{},x=e.length-1,S=b.parts===!0||b.scanToEnd===!0,C=[],w=[],T=[],E=e,D=-1,O=0,k=0,A=!1,ee=!1,j=!1,M=!1,N=!1,P=!1,F=!1,I=!1,L=!1,R=!1,z=0,B,V,H={value:``,depth:0,isGlob:!1},U=()=>D>=x,W=()=>E.charCodeAt(D+1),G=()=>(B=V,E.charCodeAt(++D));for(;D<x;){V=G();let e;if(V===a){F=H.backslashes=!0,V=G(),V===u&&(P=!0);continue}if(P===!0||V===u){for(z++;U()!==!0&&(V=G());){if(V===a){F=H.backslashes=!0,G();continue}if(V===u){z++;continue}if(P!==!0&&V===s&&(V=G())===s){if(A=H.isBrace=!0,j=H.isGlob=!0,R=!0,S===!0)continue;break}if(P!==!0&&V===o){if(A=H.isBrace=!0,j=H.isGlob=!0,R=!0,S===!0)continue;break}if(V===h&&(z--,z===0)){P=!1,A=H.isBrace=!0,R=!0;break}}if(S===!0)continue;break}if(V===l){if(C.push(D),w.push(H),H={value:``,depth:0,isGlob:!1},R===!0)continue;if(B===s&&D===O+1){O+=2;continue}k=D+1;continue}if(b.noext!==!0&&(V===p||V===i||V===r||V===m||V===c)&&W()===d){if(j=H.isGlob=!0,M=H.isExtglob=!0,R=!0,V===c&&D===O&&(L=!0),S===!0){for(;U()!==!0&&(V=G());){if(V===a){F=H.backslashes=!0,V=G();continue}if(V===g){j=H.isGlob=!0,R=!0;break}}continue}break}if(V===r){if(B===r&&(N=H.isGlobstar=!0),j=H.isGlob=!0,R=!0,S===!0)continue;break}if(V===m){if(j=H.isGlob=!0,R=!0,S===!0)continue;break}if(V===f){for(;U()!==!0&&(e=G());){if(e===a){F=H.backslashes=!0,G();continue}if(e===_){ee=H.isBracket=!0,j=H.isGlob=!0,R=!0;break}}if(S===!0)continue;break}if(b.nonegate!==!0&&V===c&&D===O){I=H.negated=!0,O++;continue}if(b.noparen!==!0&&V===d){if(j=H.isGlob=!0,S===!0){for(;U()!==!0&&(V=G());){if(V===d){F=H.backslashes=!0,V=G();continue}if(V===g){R=!0;break}}continue}break}if(j===!0){if(R=!0,S===!0)continue;break}}b.noext===!0&&(M=!1,j=!1);let K=E,q=``,J=``;O>0&&(q=E.slice(0,O),E=E.slice(O),k-=O),K&&j===!0&&k>0?(K=E.slice(0,k),J=E.slice(k)):j===!0?(K=``,J=E):K=E,K&&K!==``&&K!==`/`&&K!==E&&v(K.charCodeAt(K.length-1))&&(K=K.slice(0,-1)),b.unescape===!0&&(J&&(J=n.removeBackslashes(J)),K&&F===!0&&(K=n.removeBackslashes(K)));let Y={prefix:q,input:e,start:O,base:K,glob:J,isBrace:A,isBracket:ee,isGlob:j,isExtglob:M,isGlobstar:N,negated:I,negatedExtglob:L};if(b.tokens===!0&&(Y.maxDepth=0,v(V)||w.push(H),Y.tokens=w),b.parts===!0||b.tokens===!0){let t;for(let n=0;n<C.length;n++){let r=t?t+1:O,i=C[n],a=e.slice(r,i);b.tokens&&(n===0&&O!==0?(w[n].isPrefix=!0,w[n].value=q):w[n].value=a,y(w[n]),Y.maxDepth+=w[n].depth),(n!==0||a!==``)&&T.push(a),t=i}if(t&&t+1<e.length){let n=e.slice(t+1);T.push(n),b.tokens&&(w[w.length-1].value=n,y(w[w.length-1]),Y.maxDepth+=w[w.length-1].depth)}Y.slashes=C,Y.parts=T}return Y}})),ot=k(((e,t)=>{let n=rt(),r=it(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:c}=n,l=(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},u=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,d=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);e=c[e]||e;let f={...t},p=typeof f.maxLength==`number`?Math.min(i,f.maxLength):i,m=e.length;if(m>p)throw SyntaxError(`Input length: ${m}, exceeds maximum allowed length: ${p}`);let h={type:`bos`,value:``,output:f.prepend||``},g=[h],_=f.capture?``:`?:`,v=n.globChars(f.windows),y=n.extglobChars(v),{DOT_LITERAL:b,PLUS_LITERAL:x,SLASH_LITERAL:S,ONE_CHAR:C,DOTS_SLASH:w,NO_DOT:T,NO_DOT_SLASH:E,NO_DOTS_SLASH:D,QMARK:O,QMARK_NO_DOT:k,STAR:A,START_ANCHOR:ee}=v,j=e=>`(${_}(?:(?!${ee}${e.dot?w:b}).)*?)`,M=f.dot?``:T,N=f.dot?O:k,P=f.bash===!0?j(f):A;f.capture&&(P=`(${P})`),typeof f.noext==`boolean`&&(f.noextglob=f.noext);let F={input:e,index:-1,start:0,dot:f.dot===!0,consumed:``,output:``,prefix:``,backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};e=r.removePrefix(e,F),m=e.length;let I=[],L=[],R=[],z=h,B,V=()=>F.index===m-1,H=F.peek=(t=1)=>e[F.index+t],U=F.advance=()=>e[++F.index]||``,W=()=>e.slice(F.index+1),G=(e=``,t=0)=>{F.consumed+=e,F.index+=t},K=e=>{F.output+=e.output==null?e.value:e.output,G(e.value)},q=()=>{let e=1;for(;H()===`!`&&(H(2)!==`(`||H(3)===`?`);)U(),F.start++,e++;return e%2==0?!1:(F.negated=!0,F.start++,!0)},J=e=>{F[e]++,R.push(e)},Y=e=>{F[e]--,R.pop()},X=e=>{if(z.type===`globstar`){let t=F.braces>0&&(e.type===`comma`||e.type===`brace`),n=e.extglob===!0||I.length&&(e.type===`pipe`||e.type===`paren`);e.type!==`slash`&&e.type!==`paren`&&!t&&!n&&(F.output=F.output.slice(0,-z.output.length),z.type=`star`,z.value=`*`,z.output=P,F.output+=z.output)}if(I.length&&e.type!==`paren`&&(I[I.length-1].inner+=e.value),(e.value||e.output)&&K(e),z&&z.type===`text`&&e.type===`text`){z.output=(z.output||z.value)+e.value,z.value+=e.value;return}e.prev=z,g.push(e),z=e},Z=(e,t)=>{let n={...y[t],conditions:1,inner:``};n.prev=z,n.parens=F.parens,n.output=F.output;let r=(f.capture?`(`:``)+n.open;J(`parens`),X({type:e,value:t,output:F.output?``:C}),X({type:`paren`,extglob:!0,value:U(),output:r}),I.push(n)},te=e=>{let n=e.close+(f.capture?`)`:``),r;if(e.type===`negate`){let i=P;e.inner&&e.inner.length>1&&e.inner.includes(`/`)&&(i=j(f)),(i!==P||V()||/^\)+$/.test(W()))&&(n=e.close=`)$))${i}`),e.inner.includes(`*`)&&(r=W())&&/^\.[^\\/.]+$/.test(r)&&(n=e.close=`)${d(r,{...t,fastpaths:!1}).output})${i})`),e.prev.type===`bos`&&(F.negatedExtglob=!0)}X({type:`paren`,extglob:!0,value:B,output:n}),Y(`parens`)};if(f.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?O.repeat(a.length):``):o===0?N+(a?O.repeat(a.length):``):O.repeat(r.length):i===`.`?b.repeat(r.length):i===`*`?t?t+i+(a?P:``):P:t?e:`\\${e}`);return n===!0&&(i=f.unescape===!0?i.replace(/\\/g,``):i.replace(/\\+/g,e=>e.length%2==0?`\\\\`:e?`\\`:``)),i===e&&f.contains===!0?(F.output=e,F):(F.output=r.wrapOutput(i,F,t),F)}for(;!V();){if(B=U(),B===`\0`)continue;if(B===`\\`){let e=H();if(e===`/`&&f.bash!==!0||e===`.`||e===`;`)continue;if(!e){B+=`\\`,X({type:`text`,value:B});continue}let t=/^\\+/.exec(W()),n=0;if(t&&t[0].length>2&&(n=t[0].length,F.index+=n,n%2!=0&&(B+=`\\`)),f.unescape===!0?B=U():B+=U(),F.brackets===0){X({type:`text`,value:B});continue}}if(F.brackets>0&&(B!==`]`||z.value===`[`||z.value===`[^`)){if(f.posix!==!1&&B===`:`){let e=z.value.slice(1);if(e.includes(`[`)&&(z.posix=!0,e.includes(`:`))){let e=z.value.lastIndexOf(`[`),t=z.value.slice(0,e),n=a[z.value.slice(e+2)];if(n){z.value=t+n,F.backtrack=!0,U(),!h.output&&g.indexOf(z)===1&&(h.output=C);continue}}}(B===`[`&&H()!==`:`||B===`-`&&H()===`]`)&&(B=`\\${B}`),B===`]`&&(z.value===`[`||z.value===`[^`)&&(B=`\\${B}`),f.posix===!0&&B===`!`&&z.value===`[`&&(B=`^`),z.value+=B,K({value:B});continue}if(F.quotes===1&&B!==`"`){B=r.escapeRegex(B),z.value+=B,K({value:B});continue}if(B===`"`){F.quotes=F.quotes===1?0:1,f.keepQuotes===!0&&X({type:`text`,value:B});continue}if(B===`(`){J(`parens`),X({type:`paren`,value:B});continue}if(B===`)`){if(F.parens===0&&f.strictBrackets===!0)throw SyntaxError(u(`opening`,`(`));let e=I[I.length-1];if(e&&F.parens===e.parens+1){te(I.pop());continue}X({type:`paren`,value:B,output:F.parens?`)`:`\\)`}),Y(`parens`);continue}if(B===`[`){if(f.nobracket===!0||!W().includes(`]`)){if(f.nobracket!==!0&&f.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));B=`\\${B}`}else J(`brackets`);X({type:`bracket`,value:B});continue}if(B===`]`){if(f.nobracket===!0||z&&z.type===`bracket`&&z.value.length===1){X({type:`text`,value:B,output:`\\${B}`});continue}if(F.brackets===0){if(f.strictBrackets===!0)throw SyntaxError(u(`opening`,`[`));X({type:`text`,value:B,output:`\\${B}`});continue}Y(`brackets`);let e=z.value.slice(1);if(z.posix!==!0&&e[0]===`^`&&!e.includes(`/`)&&(B=`/${B}`),z.value+=B,K({value:B}),f.literalBrackets===!1||r.hasRegexChars(e))continue;let t=r.escapeRegex(z.value);if(F.output=F.output.slice(0,-z.value.length),f.literalBrackets===!0){F.output+=t,z.value=t;continue}z.value=`(${_}${t}|${z.value})`,F.output+=z.value;continue}if(B===`{`&&f.nobrace!==!0){J(`braces`);let e={type:`brace`,value:B,output:`(`,outputIndex:F.output.length,tokensIndex:F.tokens.length};L.push(e),X(e);continue}if(B===`}`){let e=L[L.length-1];if(f.nobrace===!0||!e){X({type:`text`,value:B,output:B});continue}let t=`)`;if(e.dots===!0){let e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),e[t].type!==`brace`);t--)e[t].type!==`dots`&&n.unshift(e[t].value);t=l(n,f),F.backtrack=!0}if(e.comma!==!0&&e.dots!==!0){let n=F.output.slice(0,e.outputIndex),r=F.tokens.slice(e.tokensIndex);e.value=e.output=`\\{`,B=t=`\\}`,F.output=n;for(let e of r)F.output+=e.output||e.value}X({type:`brace`,value:B,output:t}),Y(`braces`),L.pop();continue}if(B===`|`){I.length>0&&I[I.length-1].conditions++,X({type:`text`,value:B});continue}if(B===`,`){let e=B,t=L[L.length-1];t&&R[R.length-1]===`braces`&&(t.comma=!0,e=`|`),X({type:`comma`,value:B,output:e});continue}if(B===`/`){if(z.type===`dot`&&F.index===F.start+1){F.start=F.index+1,F.consumed=``,F.output=``,g.pop(),z=h;continue}X({type:`slash`,value:B,output:S});continue}if(B===`.`){if(F.braces>0&&z.type===`dot`){z.value===`.`&&(z.output=b);let e=L[L.length-1];z.type=`dots`,z.output+=B,z.value+=B,e.dots=!0;continue}if(F.braces+F.parens===0&&z.type!==`bos`&&z.type!==`slash`){X({type:`text`,value:B,output:b});continue}X({type:`dot`,value:B,output:b});continue}if(B===`?`){if(!(z&&z.value===`(`)&&f.noextglob!==!0&&H()===`(`&&H(2)!==`?`){Z(`qmark`,B);continue}if(z&&z.type===`paren`){let e=H(),t=B;(z.value===`(`&&!/[!=<:]/.test(e)||e===`<`&&!/<([!=]|\w+>)/.test(W()))&&(t=`\\${B}`),X({type:`text`,value:B,output:t});continue}if(f.dot!==!0&&(z.type===`slash`||z.type===`bos`)){X({type:`qmark`,value:B,output:k});continue}X({type:`qmark`,value:B,output:O});continue}if(B===`!`){if(f.noextglob!==!0&&H()===`(`&&(H(2)!==`?`||!/[!=<:]/.test(H(3)))){Z(`negate`,B);continue}if(f.nonegate!==!0&&F.index===0){q();continue}}if(B===`+`){if(f.noextglob!==!0&&H()===`(`&&H(2)!==`?`){Z(`plus`,B);continue}if(z&&z.value===`(`||f.regex===!1){X({type:`plus`,value:B,output:x});continue}if(z&&(z.type===`bracket`||z.type===`paren`||z.type===`brace`)||F.parens>0){X({type:`plus`,value:B});continue}X({type:`plus`,value:x});continue}if(B===`@`){if(f.noextglob!==!0&&H()===`(`&&H(2)!==`?`){X({type:`at`,extglob:!0,value:B,output:``});continue}X({type:`text`,value:B});continue}if(B!==`*`){(B===`$`||B===`^`)&&(B=`\\${B}`);let e=o.exec(W());e&&(B+=e[0],F.index+=e[0].length),X({type:`text`,value:B});continue}if(z&&(z.type===`globstar`||z.star===!0)){z.type=`star`,z.star=!0,z.value+=B,z.output=P,F.backtrack=!0,F.globstar=!0,G(B);continue}let t=W();if(f.noextglob!==!0&&/^\([^?]/.test(t)){Z(`star`,B);continue}if(z.type===`star`){if(f.noglobstar===!0){G(B);continue}let n=z.prev,r=n.prev,i=n.type===`slash`||n.type===`bos`,a=r&&(r.type===`star`||r.type===`globstar`);if(f.bash===!0&&(!i||t[0]&&t[0]!==`/`)){X({type:`star`,value:B,output:``});continue}let o=F.braces>0&&(n.type===`comma`||n.type===`brace`),s=I.length&&(n.type===`pipe`||n.type===`paren`);if(!i&&n.type!==`paren`&&!o&&!s){X({type:`star`,value:B,output:``});continue}for(;t.slice(0,3)===`/**`;){let n=e[F.index+4];if(n&&n!==`/`)break;t=t.slice(3),G(`/**`,3)}if(n.type===`bos`&&V()){z.type=`globstar`,z.value+=B,z.output=j(f),F.output=z.output,F.globstar=!0,G(B);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&!a&&V()){F.output=F.output.slice(0,-(n.output+z.output).length),n.output=`(?:${n.output}`,z.type=`globstar`,z.output=j(f)+(f.strictSlashes?`)`:`|$)`),z.value+=B,F.globstar=!0,F.output+=n.output+z.output,G(B);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&t[0]===`/`){let e=t[1]===void 0?``:`|$`;F.output=F.output.slice(0,-(n.output+z.output).length),n.output=`(?:${n.output}`,z.type=`globstar`,z.output=`${j(f)}${S}|${S}${e})`,z.value+=B,F.output+=n.output+z.output,F.globstar=!0,G(B+U()),X({type:`slash`,value:`/`,output:``});continue}if(n.type===`bos`&&t[0]===`/`){z.type=`globstar`,z.value+=B,z.output=`(?:^|${S}|${j(f)}${S})`,F.output=z.output,F.globstar=!0,G(B+U()),X({type:`slash`,value:`/`,output:``});continue}F.output=F.output.slice(0,-z.output.length),z.type=`globstar`,z.output=j(f),z.value+=B,F.output+=z.output,F.globstar=!0,G(B);continue}let n={type:`star`,value:B,output:P};if(f.bash===!0){n.output=`.*?`,(z.type===`bos`||z.type===`slash`)&&(n.output=M+n.output),X(n);continue}if(z&&(z.type===`bracket`||z.type===`paren`)&&f.regex===!0){n.output=B,X(n);continue}(F.index===F.start||z.type===`slash`||z.type===`dot`)&&(z.type===`dot`?(F.output+=E,z.output+=E):f.dot===!0?(F.output+=D,z.output+=D):(F.output+=M,z.output+=M),H()!==`*`&&(F.output+=C,z.output+=C)),X(n)}for(;F.brackets>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));F.output=r.escapeLast(F.output,`[`),Y(`brackets`)}for(;F.parens>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`)`));F.output=r.escapeLast(F.output,`(`),Y(`parens`)}for(;F.braces>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`}`));F.output=r.escapeLast(F.output,`{`),Y(`braces`)}if(f.strictSlashes!==!0&&(z.type===`star`||z.type===`bracket`)&&X({type:`maybe_slash`,value:``,output:`${S}?`}),F.backtrack===!0){F.output=``;for(let e of F.tokens)F.output+=e.output==null?e.value:e.output,e.suffix&&(F.output+=e.suffix)}return F};d.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 C=e=>e.noglobstar===!0?S:`(${b}(?:(?!${_}${e.dot?f:l}).)*?)`,w=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+C(a);case`**/*`:return`(?:${v}${C(a)}${u})?${y}${d}${S}`;case`**/*.*`:return`(?:${v}${C(a)}${u})?${y}${S}${l}${d}${S}`;case`**/.*`:return`(?:${v}${C(a)}${u})?${l}${d}${S}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=w(t[1]);return n?n+l+t[2]:void 0}}},T=w(r.removePrefix(e,x));return T&&a.strictSlashes!==!0&&(T+=`${u}?`),T},t.exports=d})),st=k(((e,t)=>{let n=at(),r=ot(),i=it(),a=rt(),o=e=>e&&typeof e==`object`&&!Array.isArray(e),s=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>s(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=o(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,c=r?s.compileRe(e,t):s.makeRe(e,t,!1,!0),l=c.state;delete c.state;let u=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};u=s(i.ignore,e,n)}let d=(n,r=!1)=>{let{isMatch:o,match:d,output:f}=s.test(n,c,t,{glob:e,posix:a}),p={glob:e,state:l,regex:c,posix:a,input:n,output:f,match:d,isMatch:o};return typeof i.onResult==`function`&&i.onResult(p),o===!1?(p.isMatch=!1,r?p:!1):u(n)?(typeof i.onIgnore==`function`&&i.onIgnore(p),p.isMatch=!1,r?p:!1):(typeof i.onMatch==`function`&&i.onMatch(p),r?p:!0)};return n&&(d.state=l),d};s.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||{},c=o.format||(a?i.toPosixSlashes:null),l=e===r,u=l&&c?c(e):e;return l===!1&&(u=c?c(e):e,l=u===r),(l===!1||o.capture===!0)&&(l=o.matchBase===!0||o.basename===!0?s.matchBase(e,t,n,a):t.exec(u)),{isMatch:!!l,match:l,output:u}},s.matchBase=(e,t,n)=>(t instanceof RegExp?t:s.makeRe(t,n)).test(i.basename(e)),s.isMatch=(e,t,n)=>s(t,n)(e),s.parse=(e,t)=>Array.isArray(e)?e.map(e=>s.parse(e,t)):r(e,{...t,fastpaths:!1}),s.scan=(e,t)=>n(e,t),s.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},a=i.contains?``:`^`,o=i.contains?``:`$`,c=`${a}(?:${e.output})${o}`;e&&e.negated===!0&&(c=`^(?!${c}).*$`);let l=s.toRegex(c,t);return r===!0&&(l.state=e),l},s.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)),s.compileRe(a,t,n,i)},s.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/$^/}},s.constants=a,t.exports=s})),Q=ee(k(((e,t)=>{let n=st(),r=it();function i(e,t,i=!1){return t&&(t.windows===null||t.windows===void 0)&&(t={...t,windows:r.isWindows()}),n(e,t,i)}Object.assign(i,n),t.exports=i}))(),1);const ct=Array.isArray,lt=process.platform===`win32`,ut=/^(\/?\.\.)+$/;function dt(e,t={}){let n=e.length,r=Array(n),i=Array(n),a=!t.noglobstar;for(let a=0;a<n;a++){let n=_t(e[a]);r[a]=n;let o=n.length,s=Array(o);for(let e=0;e<o;e++)s[e]=(0,Q.default)(n[e],t);i[a]=s}return t=>{let n=t.split(`/`);if(n[0]===`..`&&ut.test(t))return!0;for(let t=0;t<e.length;t++){let e=r[t],o=i[t],s=n.length,c=Math.min(s,e.length),l=0;for(;l<c;){let t=e[l];if(t.includes(`/`))return!0;if(!o[l](n[l]))break;if(a&&t===`**`)return!0;l++}if(l===s)return!0}return!1}}const ft=/^[A-Z]:\/$/i,pt=lt?e=>ft.test(e):e=>e===`/`;function mt(e,t,n){if(e===t||t.startsWith(`${e}/`)){if(n){let t=pt(e)?e.length:e.length+1;return(e,n)=>e.slice(t,n?-1:void 0)||`.`}let r=t.slice(e.length+1);return r?(e,t)=>{if(e===`.`)return r;let n=`${r}/${e}`;return t?n.slice(0,-1):n}:(e,t)=>t&&e!==`.`?e.slice(0,-1):e}return n?t=>_.relative(e,t)||`.`:n=>_.relative(e,`${t}/${n}`)||`.`}function ht(e,t){if(t.startsWith(`${e}/`)){let n=t.slice(e.length+1);return e=>`${n}/${e}`}return n=>{let r=_.relative(e,`${t}/${n}`);return n.endsWith(`/`)&&r!==``?`${r}/`:r||`.`}}const gt={parts:!0};function _t(e){let t=Q.default.scan(e,gt);return t.parts?.length?t.parts:[e]}const vt=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,yt=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,bt=lt?e=>e.replace(yt,`\\$&`):e=>e.replace(vt,`\\$&`);function xt(e,t){if(t?.caseSensitiveMatch===!1)return!0;let n=Q.default.scan(e);return n.isGlob||n.negated}function $(...e){console.log(`[tinyglobby ${new Date().toLocaleTimeString(`es`)}]`,...e)}const St=/^(\/?\.\.)+/,Ct=/\\(?=[()[\]{}!*+?@|])/g,wt=/\\/g;function Tt(e,t,n,r,i){let a=e;e.endsWith(`/`)&&(a=e.slice(0,-1)),!a.endsWith(`*`)&&t&&(a+=`/**`);let o=bt(n);a=p.isAbsolute(a.replace(Ct,``))?_.relative(o,a):_.normalize(a);let s=St.exec(a),c=_t(a);if(s?.[0]){let e=(s[0].length+1)/3,t=0,i=o.split(`/`);for(;t<e&&c[t+e]===i[i.length+t-e];)a=a.slice(0,(e-t-1)*3)+a.slice((e-t)*3+c[t+e].length+1)||`.`,t++;let l=_.join(n,s[0].slice(t*3));!l.startsWith(`.`)&&r.root.length>l.length&&(r.root=l,r.depthOffset=-e+t)}if(!i&&r.depthOffset>=0){r.commonPath??(r.commonPath=c);let e=[],t=Math.min(r.commonPath.length,c.length);for(let n=0;n<t;n++){let t=c[n];if(t===`**`&&!c[n+1]){e.pop();break}if(t!==r.commonPath[n]||xt(t)||n===c.length-1)break;e.push(t)}r.depthOffset=e.length,r.commonPath=e,r.root=e.length>0?_.join(n,...e):n}return a}function Et({patterns:e=[`**/*`],ignore:t=[],expandDirectories:n=!0},r,i){typeof e==`string`&&(e=[e]),typeof t==`string`&&(t=[t]);let a=[],o=[];for(let e of t)e&&(e[0]!==`!`||e[1]===`(`)&&o.push(Tt(e,n,r,i,!0));for(let t of e)t&&(t[0]!==`!`||t[1]===`(`?a.push(Tt(t,n,r,i,!1)):(t[1]!==`!`||t[2]===`(`)&&o.push(Tt(t.slice(1),n,r,i,!0)));return{match:a,ignore:o}}function Dt(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];e[n]=t(r)}return e}function Ot(e){return e?e instanceof URL?x(e).replace(wt,`/`):p.resolve(e).replace(wt,`/`):process.cwd().replace(wt,`/`)}function kt(e,t={}){let n=process.env.TINYGLOBBY_DEBUG?{...t,debug:!0}:t,r=Ot(n.cwd);if(n.debug&&$(`globbing with:`,{patterns:e,options:n,cwd:r}),Array.isArray(e)&&e.length===0)return[{sync:()=>[],withPromise:async()=>[]},!1];let i={root:r,commonPath:null,depthOffset:0},a=Et({...n,patterns:e},r,i);n.debug&&$(`internal processing patterns:`,a);let o={dot:n.dot,nobrace:n.braceExpansion===!1,nocase:n.caseSensitiveMatch===!1,noextglob:n.extglob===!1,noglobstar:n.globstar===!1,posix:!0},s=(0,Q.default)(a.match,{...o,ignore:a.ignore}),c=(0,Q.default)(a.ignore,o),l=dt(a.match,o),u=mt(r,i.root,n.absolute),d=n.absolute?u:mt(r,i.root,!0),p={filters:[n.debug?(e,t)=>{let n=u(e,t),r=s(n);return r&&$(`matched ${n}`),r}:(e,t)=>s(u(e,t))],exclude:n.debug?(e,t)=>{let n=d(t,!0),r=n!==`.`&&!l(n)||c(n);return $(r?`skipped ${t}`:`crawling ${t}`),r}:(e,t)=>{let n=d(t,!0);return n!==`.`&&!l(n)||c(n)},fs:n.fs?{readdir:n.fs.readdir||f.readdir,readdirSync:n.fs.readdirSync||f.readdirSync,realpath:n.fs.realpath||f.realpath,realpathSync:n.fs.realpathSync||f.realpathSync,stat:n.fs.stat||f.stat,statSync:n.fs.statSync||f.statSync}:void 0,pathSeparator:`/`,relativePaths:!0,resolveSymlinks:!0,signal:n.signal};n.deep!==void 0&&(p.maxDepth=Math.round(n.deep-i.depthOffset)),n.absolute&&(p.relativePaths=!1,p.resolvePaths=!0,p.includeBasePath=!0),n.followSymbolicLinks===!1&&(p.resolveSymlinks=!1,p.excludeSymlinks=!0),n.onlyDirectories?(p.excludeFiles=!0,p.includeDirs=!0):n.onlyFiles===!1&&(p.includeDirs=!0),i.root=i.root.replace(wt,``);let m=i.root;n.debug&&$(`internal properties:`,i);let h=r!==m&&!n.absolute&&ht(r,i.root);return[new nt(p).crawl(m),h]}async function At(e,t){if(e&&t?.patterns)throw Error(`Cannot pass patterns as both an argument and an option`);let n=ct(e)||typeof e==`string`,r=n?t:e,[i,a]=kt(n?e:e.patterns,r);return a?Dt(await i.withPromise(),a):i.withPromise()}let jt,Mt=null;const Nt=new Set;function Pt(e,t){Nt.add(e),Mt&&clearTimeout(Mt),Mt=setTimeout(async()=>{Nt.size>0&&(await H(jt,!0),Nt.clear()),Mt=null},500)}async function Ft(){try{jt=await V(),await H(jt,!0),B.info(L.watch.start);let e=await At(jt.source);for(let t of e)o(t,e=>{Pt(t,e)})}catch{B.fail(L.watch.fail),process.exit(1)}}switch(process.argv.slice(2)[0]){case`init`:case`i`:W();break;case`build`:case`b`:H().catch(()=>process.exit(1));break;case`watch`:case`w`:Ft().catch(()=>process.exit(1));break;default:console.log(`
|
|
5
9
|
Yumma CSS v${j}
|
|
6
10
|
|
|
7
11
|
Commands:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yummacss",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.21.1",
|
|
4
4
|
"description": "An atomic CSS framework with abbreviated class names.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css-framework",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@yummacss/nitro": "3.
|
|
32
|
+
"@yummacss/nitro": "3.21.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"tinyglobby": "^0.2.15"
|