@visulima/cerebro 1.1.28 → 1.1.29

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/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## @visulima/cerebro [1.1.29](https://github.com/visulima/visulima/compare/@visulima/cerebro@1.1.28...@visulima/cerebro@1.1.29) (2025-01-08)
2
+
3
+
4
+ ### Dependencies
5
+
6
+ * **@visulima/boxen:** upgraded to 1.0.24
7
+ * **@visulima/colorize:** upgraded to 1.4.15
8
+ * **@visulima/find-cache-dir:** upgraded to 1.0.19
9
+ * **@visulima/pail:** upgraded to 2.1.14
10
+ * **@visulima/path:** upgraded to 1.3.0
11
+
1
12
  ## @visulima/cerebro [1.1.28](https://github.com/visulima/visulima/compare/@visulima/cerebro@1.1.27...@visulima/cerebro@1.1.28) (2024-12-31)
2
13
 
3
14
 
package/LICENSE.md CHANGED
@@ -105,9 +105,38 @@ Repository: git+https://github.com/visulima/visulima.git
105
105
  >
106
106
  > # Licenses of bundled dependencies
107
107
  > The published @visulima/path artifact additionally contains code with the following licenses:
108
- > MIT
108
+ > ISC, MIT
109
109
  >
110
110
  > # Bundled dependencies:
111
+ > ## balanced-match
112
+ > License: MIT
113
+ > By: Julian Gruber
114
+ > Repository: git://github.com/juliangruber/balanced-match.git
115
+ >
116
+ > > (MIT)
117
+ > >
118
+ > > Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
119
+ > >
120
+ > > Permission is hereby granted, free of charge, to any person obtaining a copy of
121
+ > > this software and associated documentation files (the "Software"), to deal in
122
+ > > the Software without restriction, including without limitation the rights to
123
+ > > use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
124
+ > > of the Software, and to permit persons to whom the Software is furnished to do
125
+ > > so, subject to the following conditions:
126
+ > >
127
+ > > The above copyright notice and this permission notice shall be included in all
128
+ > > copies or substantial portions of the Software.
129
+ > >
130
+ > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
131
+ > > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
132
+ > > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
133
+ > > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
134
+ > > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
135
+ > > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
136
+ > > SOFTWARE.
137
+ >
138
+ > ---------------------------------------
139
+ >
111
140
  > ## binary-extensions
112
141
  > License: MIT
113
142
  > By: Sindre Sorhus
@@ -123,6 +152,58 @@ Repository: git+https://github.com/visulima/visulima.git
123
152
  > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
124
153
  > >
125
154
  > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
155
+ >
156
+ > ---------------------------------------
157
+ >
158
+ > ## brace-expansion
159
+ > License: MIT
160
+ > By: Julian Gruber
161
+ > Repository: git://github.com/juliangruber/brace-expansion.git
162
+ >
163
+ > > MIT License
164
+ > >
165
+ > > Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
166
+ > >
167
+ > > Permission is hereby granted, free of charge, to any person obtaining a copy
168
+ > > of this software and associated documentation files (the "Software"), to deal
169
+ > > in the Software without restriction, including without limitation the rights
170
+ > > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
171
+ > > copies of the Software, and to permit persons to whom the Software is
172
+ > > furnished to do so, subject to the following conditions:
173
+ > >
174
+ > > The above copyright notice and this permission notice shall be included in all
175
+ > > copies or substantial portions of the Software.
176
+ > >
177
+ > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
178
+ > > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
179
+ > > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
180
+ > > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
181
+ > > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
182
+ > > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
183
+ > > SOFTWARE.
184
+ >
185
+ > ---------------------------------------
186
+ >
187
+ > ## minimatch
188
+ > License: ISC
189
+ > By: Isaac Z. Schlueter
190
+ > Repository: git://github.com/isaacs/minimatch.git
191
+ >
192
+ > > The ISC License
193
+ > >
194
+ > > Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors
195
+ > >
196
+ > > Permission to use, copy, modify, and/or distribute this software for any
197
+ > > purpose with or without fee is hereby granted, provided that the above
198
+ > > copyright notice and this permission notice appear in all copies.
199
+ > >
200
+ > > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
201
+ > > WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
202
+ > > MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
203
+ > > ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
204
+ > > WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
205
+ > > ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
206
+ > > IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
126
207
 
127
208
  ---------------------------------------
128
209
 
@@ -1 +1,3 @@
1
- "use strict";var j=Object.defineProperty;var f=(e,t)=>j(e,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("node:fs"),O=require("@visulima/find-cache-dir"),k=require("node:https");var P=Object.defineProperty,S=f((e,t)=>P(e,"name",{value:t,configurable:!0}),"o$1");const N=S((e,t)=>{const n=e.split(".").map(Number),r=t.split(".").map(Number);for(const[o,i]of n.entries()){if(i>r[o])return!0;if(i<r[o])return!1}return!1},"semverGt");var _=Object.defineProperty,x=f((e,t)=>_(e,"name",{value:t,configurable:!0}),"v"),A=Object.defineProperty,m=x((e,t)=>A(e,"name",{value:t,configurable:!0}),"u"),C=Object.defineProperty,U=m((e,t)=>C(e,"name",{value:t,configurable:!0}),"t");const D=/^[A-Z]:\//i,l=U((e="")=>e&&e.replaceAll("\\","/").replace(D,t=>t.toUpperCase()),"normalizeWindowsPath");var E=Object.defineProperty,c=m((e,t)=>E(e,"name",{value:t,configurable:!0}),"r");const L=/^[/\\]{2}/,Z=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,b=/^[A-Z]:$/i,v=/^\/([A-Z]:)?$/i,I=/.(\.[^./]+)$/,M=c(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),y=c((e,t)=>{let n="",r=0,o=-1,i=0,s=null;for(let a=0;a<=e.length;++a){if(a<e.length)s=e[a];else{if(s==="/")break;s="/"}if(s==="/"){if(!(o===a-1||i===1))if(i===2){if(n.length<2||r!==2||!n.endsWith(".")||n.at(-2)!=="."){if(n.length>2){const u=n.lastIndexOf("/");u===-1?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),o=a,i=0;continue}else if(n.length>0){n="",r=0,o=a,i=0;continue}}t&&(n+=n.length>0?"/..":"..",r=2)}else n.length>0?n+=`/${e.slice(o+1,a)}`:n=e.slice(o+1,a),r=a-o-1;o=a,i=0}else s==="."&&i!==-1?++i:i=-1}return n},"normalizeString"),d=c(e=>Z.test(e),"isAbsolute"),T=c(function(e){if(e.length===0)return".";e=l(e);const t=L.exec(e),n=d(e),r=e.at(-1)==="/";return e=y(e,!n),e.length===0?n?"/":r?"./":".":(r&&(e+="/"),b.test(e)&&(e+="/"),t?n?`//${e}`:`//./${e}`:n&&!d(e)?`/${e}`:e)},"normalize"),W=c(function(...e){if(e.length===0)return".";let t;for(const n of e)n&&n.length>0&&(t===void 0?t=n:t+=`/${n}`);return t===void 0?".":T(t.replaceAll(/\/{2,}/g,"/"))},"join"),g=c(function(...e){e=e.map(r=>l(r));let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const o=r>=0?e[r]:M();!o||o.length===0||(t=`${o}/${t}`,n=d(o))}return t=y(t,!n),n&&!d(t)?`/${t}`:t.length>0?t:"."},"resolve");c(function(e){return l(e)},"toNamespacedPath");const q=c(function(e){return I.exec(l(e))?.[1]??""},"extname");c(function(e,t){const n=g(e).replace(v,"$1").split("/"),r=g(t).replace(v,"$1").split("/");if(r[0][1]===":"&&n[0][1]===":"&&n[0]!==r[0])return r.join("/");const o=[...n];for(const i of o){if(r[0]!==i)break;n.shift(),r.shift()}return[...n.map(()=>".."),...r].join("/")},"relative");const $=c(e=>{const t=l(e).replace(/\/$/,"").split("/").slice(0,-1);return t.length===1&&b.test(t[0])&&(t[0]+="/"),t.join("/")||(d(e)?"/":".")},"dirname");c(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return l(e.root?g(...t):t.join("/"))},"format");const z=c((e,t)=>{const n=l(e).split("/").pop();return t&&n.endsWith(t)?n.slice(0,-t.length):n},"basename");c(function(e){let t=l(e).split("/").shift();t===""?t="/":t+="/";const n=z(e),r=q(n);return{base:n,dir:$(e),ext:r,name:n.slice(0,n.length-r.length),root:t}},"parse");var F=Object.defineProperty,h=f((e,t)=>F(e,"name",{value:t,configurable:!0}),"r");const J="last-update-check.json",w=h(e=>{const t=O.findCacheDirSync(e);if(t===void 0)throw new Error("Could not find cache directory");return W(t,J)},"getConfigFile"),B=h(e=>{const t=w(e);try{if(!p.existsSync(t))return;const{lastUpdateCheck:n}=JSON.parse(p.readFileSync(t,"utf8"));return n}catch{return}},"getLastUpdate"),V=h(e=>{const t=w(e),n=$(t);p.existsSync(n)||p.mkdirSync(n,{recursive:!0}),p.writeFileSync(t,JSON.stringify({lastUpdateCheck:Date.now()}))},"saveLastUpdate");var G=Object.defineProperty,R=f((e,t)=>G(e,"name",{value:t,configurable:!0}),"g");const H=R(async(e,t,n)=>{const r=n.replace("__NAME__",e);return await new Promise((o,i)=>{k.get(r,s=>{let a="";s.on("data",u=>a+=u),s.on("end",()=>{try{const u=JSON.parse(a)[t];u||i(new Error("Error getting version")),o(u)}catch{i(new Error("Could not parse version response"))}})}).on("error",s=>i(s))})},"getDistributionVersion");var K=Object.defineProperty,Q=f((e,t)=>K(e,"name",{value:t,configurable:!0}),"i");const X=Q(async({alwaysRun:e,debug:t,distTag:n="latest",pkg:r,registryUrl:o="https://registry.npmjs.org/-/package/__NAME__/dist-tags",updateCheckInterval:i=1e3*60*60*24})=>{const s=B(r.name);if(e||!s||s<Date.now()-i){const a=await H(r.name,n,o);if(V(r.name),N(a,r.version))return a;t&&console.error(`Latest version (${a}) not newer than current version (${r.version})`)}else t&&console.error(`Too recent to check for a new update. simpleUpdateNotifier() interval set to ${i}ms but only ${Date.now()-s}ms since last check.`);return null},"hasNewVersion");exports.default=X;
1
+ "use strict";var zt=Object.defineProperty;var v=(s,t)=>zt(s,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("node:fs"),Dt=require("@visulima/find-cache-dir"),Rt=require("node:https");var Gt=Object.defineProperty,Bt=v((s,t)=>Gt(s,"name",{value:t,configurable:!0}),"o$1");const Ut=Bt((s,t)=>{const e=s.split(".").map(Number),n=t.split(".").map(Number);for(const[i,r]of e.entries()){if(r>n[i])return!0;if(r<n[i])return!1}return!1},"semverGt");var _t=Object.defineProperty,x=v((s,t)=>_t(s,"name",{value:t,configurable:!0}),"w"),Ft=Object.defineProperty,y=x((s,t)=>Ft(s,"name",{value:t,configurable:!0}),"y");function Y(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}v(Y,"Y");x(Y,"Wt");y(Y,"getDefaultExportFromCjs");var K,ut;function tt(){if(ut)return K;ut=1;var s=Object.defineProperty,t=y((r,o)=>s(r,"name",{value:o,configurable:!0}),"u");K=e;function e(r,o,a){r instanceof RegExp&&(r=n(r,a)),o instanceof RegExp&&(o=n(o,a));var h=i(r,o,a);return h&&{start:h[0],end:h[1],pre:a.slice(0,h[0]),body:a.slice(h[0]+r.length,h[1]),post:a.slice(h[1]+o.length)}}v(e,"e"),x(e,"e"),y(e,"balanced"),t(e,"balanced");function n(r,o){var a=o.match(r);return a?a[0]:null}v(n,"s"),x(n,"s"),y(n,"maybeMatch"),t(n,"maybeMatch"),e.range=i;function i(r,o,a){var h,c,l,g,u,p=a.indexOf(r),f=a.indexOf(o,p+1),m=p;if(p>=0&&f>0){if(r===o)return[p,f];for(h=[],l=a.length;m>=0&&!u;)m==p?(h.push(m),p=a.indexOf(r,m+1)):h.length==1?u=[h.pop(),f]:(c=h.pop(),c<l&&(l=c,g=f),f=a.indexOf(o,m+1)),m=p<f&&p>=0?p:f;h.length&&(u=[l,g])}return u}return v(i,"n"),x(i,"r"),y(i,"range"),t(i,"range"),K}v(tt,"xt");x(tt,"Ct");y(tt,"requireBalancedMatch");var Q,ft;function et(){if(ft)return Q;ft=1;var s=Object.defineProperty,t=y((d,O)=>s(d,"name",{value:O,configurable:!0}),"o"),e=tt();Q=u;var n="\0SLASH"+Math.random()+"\0",i="\0OPEN"+Math.random()+"\0",r="\0CLOSE"+Math.random()+"\0",o="\0COMMA"+Math.random()+"\0",a="\0PERIOD"+Math.random()+"\0";function h(d){return parseInt(d,10)==d?parseInt(d,10):d.charCodeAt(0)}v(h,"h"),x(h,"h"),y(h,"numeric"),t(h,"numeric");function c(d){return d.split("\\\\").join(n).split("\\{").join(i).split("\\}").join(r).split("\\,").join(o).split("\\.").join(a)}v(c,"c"),x(c,"c"),y(c,"escapeBraces"),t(c,"escapeBraces");function l(d){return d.split(n).join("\\").split(i).join("{").split(r).join("}").split(o).join(",").split(a).join(".")}v(l,"l"),x(l,"l"),y(l,"unescapeBraces"),t(l,"unescapeBraces");function g(d){if(!d)return[""];var O=[],S=e("{","}",d);if(!S)return d.split(",");var w=S.pre,G=S.body,W=S.post,P=w.split(",");P[P.length-1]+="{"+G+"}";var L=g(W);return W.length&&(P[P.length-1]+=L.shift(),P.push.apply(P,L)),O.push.apply(O,P),O}v(g,"g"),x(g,"g"),y(g,"parseCommaParts"),t(g,"parseCommaParts");function u(d){return d?(d.substr(0,2)==="{}"&&(d="\\{\\}"+d.substr(2)),T(c(d),!0).map(l)):[]}v(u,"u"),x(u,"u"),y(u,"expandTop"),t(u,"expandTop");function p(d){return"{"+d+"}"}v(p,"p"),x(p,"p"),y(p,"embrace"),t(p,"embrace");function f(d){return/^-?0\d/.test(d)}v(f,"f"),x(f,"f"),y(f,"isPadded"),t(f,"isPadded");function m(d,O){return d<=O}v(m,"m"),x(m,"m"),y(m,"lte"),t(m,"lte");function j(d,O){return d>=O}v(j,"O"),x(j,"M"),y(j,"gte"),t(j,"gte");function T(d,O){var S=[],w=e("{","}",d);if(!w)return[d];var G=w.pre,W=w.post.length?T(w.post,!1):[""];if(/\$$/.test(w.pre))for(var P=0;P<W.length;P++){var L=G+"{"+w.body+"}"+W[P];S.push(L)}else{var Tt=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(w.body),it=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(w.body),q=Tt||it,At=w.body.indexOf(",")>=0;if(!q&&!At)return w.post.match(/,.*\}/)?(d=w.pre+"{"+w.body+r+w.post,T(d)):[d];var $;if(q)$=w.body.split(/\.\./);else if($=g(w.body),$.length===1&&($=T($[0],!1).map(p),$.length===1))return W.map(function(Lt){return w.pre+$[0]+Lt});var z;if(q){var ot=h($[0]),at=h($[1]),Ct=Math.max($[0].length,$[1].length),ht=$.length==3?Math.abs(h($[2])):1,ct=m,kt=at<ot;kt&&(ht*=-1,ct=j);var Wt=$.some(f);z=[];for(var B=ot;ct(B,at);B+=ht){var k;if(it)k=String.fromCharCode(B),k==="\\"&&(k="");else if(k=String(B),Wt){var lt=Ct-k.length;if(lt>0){var pt=new Array(lt+1).join("0");B<0?k="-"+pt+k.slice(1):k=pt+k}}z.push(k)}}else{z=[];for(var D=0;D<$.length;D++)z.push.apply(z,T($[D],!1))}for(var D=0;D<z.length;D++)for(var P=0;P<W.length;P++){var L=G+z[D]+W[P];(!O||q||L)&&S.push(L)}}return S}return v(T,"$"),x(T,"A"),y(T,"expand"),t(T,"expand"),Q}v(et,"St");x(et,"Rt");y(et,"requireBraceExpansion");var Zt=et();const qt=Y(Zt);var It=Object.defineProperty,Jt=y((s,t)=>It(s,"name",{value:t,configurable:!0}),"r");const J=Jt(s=>{if(typeof s!="string")throw new TypeError("invalid pattern");if(s.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern");var Ht=Object.defineProperty,H=y((s,t)=>Ht(s,"name",{value:t,configurable:!0}),"p$1");const Vt={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},U=H(s=>s.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),Kt=H(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),gt=H(s=>s.join(""),"rangesToString"),Qt=H((s,t)=>{const e=t;if(s.charAt(e)!=="[")throw new Error("not in a brace expression");const n=[],i=[];let r=e+1,o=!1,a=!1,h=!1,c=!1,l=e,g="";t:for(;r<s.length;){const f=s.charAt(r);if((f==="!"||f==="^")&&r===e+1){c=!0,r++;continue}if(f==="]"&&o&&!h){l=r+1;break}if(o=!0,f==="\\"&&!h){h=!0,r++;continue}if(f==="["&&!h){for(const[m,[j,T,d]]of Object.entries(Vt))if(s.startsWith(m,r)){if(g)return["$.",!1,s.length-e,!0];r+=m.length,d?i.push(j):n.push(j),a=a||T;continue t}}if(h=!1,g){f>g?n.push(U(g)+"-"+U(f)):f===g&&n.push(U(f)),g="",r++;continue}if(s.startsWith("-]",r+1)){n.push(U(f+"-")),r+=2;continue}if(s.startsWith("-",r+1)){g=f,r+=2;continue}n.push(U(f)),r++}if(l<r)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,s.length-e,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!c){const f=n[0].length===2?n[0].slice(-1):n[0];return[Kt(f),!1,l-e,!1]}const u="["+(c?"^":"")+gt(n)+"]",p="["+(c?"":"^")+gt(i)+"]";return[n.length&&i.length?"("+u+"|"+p+")":n.length?u:p,a,l-e,!0]},"parseClass");var Xt=Object.defineProperty,Yt=y((s,t)=>Xt(s,"name",{value:t,configurable:!0}),"a$2");const _=Yt((s,{windowsPathsNoEscape:t=!1}={})=>t?s.replace(/\[([^\/\\])\]/g,"$1"):s.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");var te=Object.defineProperty,st=y((s,t)=>te(s,"name",{value:t,configurable:!0}),"E$1");const ee=new Set(["!","?","+","*","@"]),dt=st(s=>ee.has(s),"isExtglobType"),se="(?!(?:^|/)\\.\\.?(?:$|/))",I="(?!\\.)",ne=new Set(["[","."]),re=new Set(["..","."]),ie=new Set("().*{}+?[]^$\\!"),oe=st(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),nt="[^/]",mt=nt+"*?",bt=nt+"+?";class M{static{v(this,"A")}static{x(this,"O")}static{y(this,"AST")}static{st(this,"AST")}type;#s;#n;#i=!1;#t=[];#e;#o;#h;#a=!1;#r;#c;#p=!1;constructor(t,e,n={}){this.type=t,t&&(this.#n=!0),this.#e=e,this.#s=this.#e?this.#e.#s:this,this.#r=this.#s===this?n:this.#s.#r,this.#h=this.#s===this?[]:this.#s.#h,t==="!"&&!this.#s.#a&&this.#h.push(this),this.#o=this.#e?this.#e.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(const t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#c!==void 0?this.#c:this.type?this.#c=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#c=this.#t.map(t=>String(t)).join("")}#f(){if(this!==this.#s)throw new Error("should only call on root");if(this.#a)return this;this.toString(),this.#a=!0;let t;for(;t=this.#h.pop();){if(t.type!=="!")continue;let e=t,n=e.#e;for(;n;){for(let i=e.#o+1;!n.type&&i<n.#t.length;i++)for(const r of t.#t){if(typeof r=="string")throw new Error("string part in extglob AST??");r.copyIn(n.#t[i])}e=n,n=e.#e}}return this}push(...t){for(const e of t)if(e!==""){if(typeof e!="string"&&!(e instanceof M&&e.#e===this))throw new Error("invalid part: "+e);this.#t.push(e)}}toJSON(){const t=this.type===null?this.#t.slice().map(e=>typeof e=="string"?e:e.toJSON()):[this.type,...this.#t.map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#s||this.#s.#a&&this.#e?.type==="!")&&t.push({}),t}isStart(){if(this.#s===this)return!0;if(!this.#e?.isStart())return!1;if(this.#o===0)return!0;const t=this.#e;for(let e=0;e<this.#o;e++){const n=t.#t[e];if(!(n instanceof M&&n.type==="!"))return!1}return!0}isEnd(){if(this.#s===this||this.#e?.type==="!")return!0;if(!this.#e?.isEnd())return!1;if(!this.type)return this.#e?.isEnd();const t=this.#e?this.#e.#t.length:0;return this.#o===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const e=new M(this.type,t);for(const n of this.#t)e.copyIn(n);return e}static#l(t,e,n,i){let r=!1,o=!1,a=-1,h=!1;if(e.type===null){let p=n,f="";for(;p<t.length;){const m=t.charAt(p++);if(r||m==="\\"){r=!r,f+=m;continue}if(o){p===a+1?(m==="^"||m==="!")&&(h=!0):m==="]"&&!(p===a+2&&h)&&(o=!1),f+=m;continue}else if(m==="["){o=!0,a=p,h=!1,f+=m;continue}if(!i.noext&&dt(m)&&t.charAt(p)==="("){e.push(f),f="";const j=new M(m,e);p=M.#l(t,j,p,i),e.push(j);continue}f+=m}return e.push(f),p}let c=n+1,l=new M(null,e);const g=[];let u="";for(;c<t.length;){const p=t.charAt(c++);if(r||p==="\\"){r=!r,u+=p;continue}if(o){c===a+1?(p==="^"||p==="!")&&(h=!0):p==="]"&&!(c===a+2&&h)&&(o=!1),u+=p;continue}else if(p==="["){o=!0,a=c,h=!1,u+=p;continue}if(dt(p)&&t.charAt(c)==="("){l.push(u),u="";const f=new M(p,l);l.push(f),c=M.#l(t,f,c,i);continue}if(p==="|"){l.push(u),u="",g.push(l),l=new M(null,e);continue}if(p===")")return u===""&&e.#t.length===0&&(e.#p=!0),l.push(u),u="",e.push(...g,l),c;u+=p}return e.type=null,e.#n=void 0,e.#t=[t.substring(n-1)],c}static fromGlob(t,e={}){const n=new M(null,void 0,e);return M.#l(t,n,0,e),n}toMMPattern(){if(this!==this.#s)return this.#s.toMMPattern();const t=this.toString(),[e,n,i,r]=this.toRegExpSource();if(!(i||this.#n||this.#r.nocase&&!this.#r.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;const o=(this.#r.nocase?"i":"")+(r?"u":"");return Object.assign(new RegExp(`^${e}$`,o),{_src:e,_glob:t})}get options(){return this.#r}toRegExpSource(t){const e=t??!!this.#r.dot;if(this.#s===this&&this.#f(),!this.type){const h=this.isStart()&&this.isEnd(),c=this.#t.map(u=>{const[p,f,m,j]=typeof u=="string"?M.#g(u,this.#n,h):u.toRegExpSource(t);return this.#n=this.#n||m,this.#i=this.#i||j,p}).join("");let l="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&re.has(this.#t[0]))){const u=ne,p=e&&u.has(c.charAt(0))||c.startsWith("\\.")&&u.has(c.charAt(2))||c.startsWith("\\.\\.")&&u.has(c.charAt(4)),f=!e&&!t&&u.has(c.charAt(0));l=p?se:f?I:""}let g="";return this.isEnd()&&this.#s.#a&&this.#e?.type==="!"&&(g="(?:$|\\/)"),[l+c+g,_(c),this.#n=!!this.#n,this.#i]}const n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:";let r=this.#u(e);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){const h=this.toString();return this.#t=[h],this.type=null,this.#n=void 0,[h,_(this.toString()),!1,!1]}let o=!n||t||e||!I?"":this.#u(!0);o===r&&(o=""),o&&(r=`(?:${r})(?:${o})*?`);let a="";if(this.type==="!"&&this.#p)a=(this.isStart()&&!e?I:"")+bt;else{const h=this.type==="!"?"))"+(this.isStart()&&!e&&!t?I:"")+mt+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=i+r+h}return[a,_(r),this.#n=!!this.#n,this.#i]}#u(t){return this.#t.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");const[n,i,r,o]=e.toRegExpSource(t);return this.#i=this.#i||o,n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#g(t,e,n=!1){let i=!1,r="",o=!1;for(let a=0;a<t.length;a++){const h=t.charAt(a);if(i){i=!1,r+=(ie.has(h)?"\\":"")+h;continue}if(h==="\\"){a===t.length-1?r+="\\\\":i=!0;continue}if(h==="["){const[c,l,g,u]=Qt(t,a);if(g){r+=c,o=o||l,a+=g-1,e=e||u;continue}}if(h==="*"){n&&t==="*"?r+=bt:r+=mt,e=!0;continue}if(h==="?"){r+=nt,e=!0;continue}r+=oe(h)}return[r,_(t),!!e,o]}}var ae=Object.defineProperty,he=y((s,t)=>ae(s,"name",{value:t,configurable:!0}),"a$1");const ce=he((s,{windowsPathsNoEscape:t=!1}={})=>t?s.replace(/[?*()[\]]/g,"[$&]"):s.replace(/[?*()[\]\\]/g,"\\$&"),"escape");var le=Object.defineProperty,b=y((s,t)=>le(s,"name",{value:t,configurable:!0}),"h$1");const E=b((s,t,e={})=>(J(t),!e.nocomment&&t.charAt(0)==="#"?!1:new V(t,e).match(s)),"minimatch"),pe=/^\*+([^+@!?\*\[\(]*)$/,ue=b(s=>t=>!t.startsWith(".")&&t.endsWith(s),"starDotExtTest"),fe=b(s=>t=>t.endsWith(s),"starDotExtTestDot"),ge=b(s=>(s=s.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(s)),"starDotExtTestNocase"),de=b(s=>(s=s.toLowerCase(),t=>t.toLowerCase().endsWith(s)),"starDotExtTestNocaseDot"),me=/^\*+\.\*+$/,be=b(s=>!s.startsWith(".")&&s.includes("."),"starDotStarTest"),ye=b(s=>s!=="."&&s!==".."&&s.includes("."),"starDotStarTestDot"),ve=/^\.\*+$/,we=b(s=>s!=="."&&s!==".."&&s.startsWith("."),"dotStarTest"),xe=/^\*+$/,Oe=b(s=>s.length!==0&&!s.startsWith("."),"starTest"),$e=b(s=>s.length!==0&&s!=="."&&s!=="..","starTestDot"),Ee=/^\?+([^+@!?\*\[\(]*)?$/,Se=b(([s,t=""])=>{const e=xt([s]);return t?(t=t.toLowerCase(),n=>e(n)&&n.toLowerCase().endsWith(t)):e},"qmarksTestNocase"),Pe=b(([s,t=""])=>{const e=Ot([s]);return t?(t=t.toLowerCase(),n=>e(n)&&n.toLowerCase().endsWith(t)):e},"qmarksTestNocaseDot"),Me=b(([s,t=""])=>{const e=Ot([s]);return t?n=>e(n)&&n.endsWith(t):e},"qmarksTestDot"),je=b(([s,t=""])=>{const e=xt([s]);return t?n=>e(n)&&n.endsWith(t):e},"qmarksTest"),xt=b(([s])=>{const t=s.length;return e=>e.length===t&&!e.startsWith(".")},"qmarksTestNoExt"),Ot=b(([s])=>{const t=s.length;return e=>e.length===t&&e!=="."&&e!==".."},"qmarksTestNoExtDot"),$t=process?process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",yt={win32:{sep:"\\"},posix:{sep:"/"}},Ne=$t==="win32"?yt.win32.sep:yt.posix.sep;E.sep=Ne;const C=Symbol("globstar **");E.GLOBSTAR=C;const Te="[^/]",Ae=Te+"*?",Ce="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",ke="(?:(?!(?:\\/|^)\\.).)*?",We=b((s,t={})=>e=>E(e,s,t),"filter");E.filter=We;const A=b((s,t={})=>Object.assign({},s,t),"ext"),Le=b(s=>{if(!s||typeof s!="object"||!Object.keys(s).length)return E;const t=E;return Object.assign(b((e,n,i={})=>t(e,n,A(s,i)),"m"),{Minimatch:class extends t.Minimatch{static{v(this,"Minimatch")}static{x(this,"Minimatch")}static{y(this,"Minimatch")}static{b(this,"Minimatch")}constructor(e,n={}){super(e,A(s,n))}static defaults(e){return t.defaults(A(s,e)).Minimatch}},AST:class extends t.AST{static{v(this,"AST")}static{x(this,"AST")}static{y(this,"AST")}static{b(this,"AST")}constructor(e,n,i={}){super(e,n,A(s,i))}static fromGlob(e,n={}){return t.AST.fromGlob(e,A(s,n))}},unescape:b((e,n={})=>t.unescape(e,A(s,n)),"unescape"),escape:b((e,n={})=>t.escape(e,A(s,n)),"escape"),filter:b((e,n={})=>t.filter(e,A(s,n)),"filter"),defaults:b(e=>t.defaults(A(s,e)),"defaults"),makeRe:b((e,n={})=>t.makeRe(e,A(s,n)),"makeRe"),braceExpand:b((e,n={})=>t.braceExpand(e,A(s,n)),"braceExpand"),match:b((e,n,i={})=>t.match(e,n,A(s,i)),"match"),sep:t.sep,GLOBSTAR:C})},"defaults");E.defaults=Le;const Et=b((s,t={})=>(J(s),t.nobrace||!/\{(?:(?!\{).)*\}/.test(s)?[s]:qt(s)),"braceExpand");E.braceExpand=Et;const ze=b((s,t={})=>new V(s,t).makeRe(),"makeRe");E.makeRe=ze;const De=b((s,t,e={})=>{const n=new V(t,e);return s=s.filter(i=>n.match(i)),n.options.nonull&&!s.length&&s.push(t),s},"match");E.match=De;const vt=/[?*]|[+@!]\(.*?\)|\[|\]/,Re=b(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape");class V{static{v(this,"U")}static{x(this,"H")}static{y(this,"Minimatch")}static{b(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){J(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||$t,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);const n=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((r,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){const h=r[0]===""&&r[1]===""&&(r[2]==="?"||!vt.test(r[2]))&&!vt.test(r[3]),c=/^[a-z]:/i.test(r[0]);if(h)return[...r.slice(0,4),...r.slice(4).map(l=>this.parse(l))];if(c)return[r[0],...r.slice(1).map(l=>this.parse(l))]}return r.map(h=>this.parse(h))});if(this.debug(this.pattern,i),this.set=i.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r<this.set.length;r++){const o=this.set[r];o[0]===""&&o[1]===""&&this.globParts[r][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let n=0;n<t.length;n++)for(let i=0;i<t[n].length;i++)t[n][i]==="**"&&(t[n][i]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let n=-1;for(;(n=e.indexOf("**",n+1))!==-1;){let i=n;for(;e[i+1]==="**";)i++;i!==n&&e.splice(n,i-n)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((n,i)=>{const r=n[n.length-1];return i==="**"&&r==="**"?n:i===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(n.pop(),n):(n.push(i),n)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){const r=t[i];i===1&&r===""&&t[0]===""||(r==="."||r==="")&&(e=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(e=!0,t.pop())}let n=0;for(;(n=t.indexOf("..",n+1))!==-1;){const i=t[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let o=i;for(;n[o+1]==="**";)o++;o>i&&n.splice(i+1,o-i);let a=n[i+1];const h=n[i+2],c=n[i+3];if(a!==".."||!h||h==="."||h===".."||!c||c==="."||c==="..")continue;e=!0,n.splice(i,1);const l=n.slice(0);l[i]="**",t.push(l),i--}if(!this.preserveMultipleSlashes){for(let o=1;o<n.length-1;o++){const a=n[o];o===1&&a===""&&n[0]===""||(a==="."||a==="")&&(e=!0,n.splice(o,1),o--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(e=!0,n.pop())}let r=0;for(;(r=n.indexOf("..",r+1))!==-1;){const o=n[r-1];if(o&&o!=="."&&o!==".."&&o!=="**"){e=!0;const a=r===1&&n[r+1]==="**"?["."]:[];n.splice(r-1,2,...a),n.length===0&&n.push(""),r-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const i=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);if(i){t[e]=[],t[n]=i;break}}return t.filter(e=>e.length)}partsMatch(t,e,n=!1){let i=0,r=0,o=[],a="";for(;i<t.length&&r<e.length;)if(t[i]===e[r])o.push(a==="b"?e[r]:t[i]),i++,r++;else if(n&&t[i]==="**"&&e[r]===t[i+1])o.push(t[i]),i++;else if(n&&e[r]==="**"&&t[i]===e[r+1])o.push(e[r]),r++;else if(t[i]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(a==="b")return!1;a="a",o.push(t[i]),i++,r++}else if(e[r]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(a==="a")return!1;a="b",o.push(e[r]),i++,r++}else return!1;return t.length===e.length&&o}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,e,n=!1){const i=this.options;if(this.isWindows){const m=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),j=!m&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),T=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),d=!T&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),O=j?3:m?0:void 0,S=d?3:T?0:void 0;if(typeof O=="number"&&typeof S=="number"){const[w,G]=[t[O],e[S]];w.toLowerCase()===G.toLowerCase()&&(e[S]=w,S>O?e=e.slice(S):O>S&&(t=t.slice(O)))}}const{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,a=0,h=t.length,c=e.length;o<h&&a<c;o++,a++){this.debug("matchOne loop");var l=e[a],g=t[o];if(this.debug(e,l,g),l===!1)return!1;if(l===C){this.debug("GLOBSTAR",[e,l,g]);var u=o,p=a+1;if(p===c){for(this.debug("** at the end");o<h;o++)if(t[o]==="."||t[o]===".."||!i.dot&&t[o].charAt(0)===".")return!1;return!0}for(;u<h;){var f=t[u];if(this.debug(`
2
+ globstar while`,t,u,e,p,f),this.matchOne(t.slice(u),e.slice(p),n))return this.debug("globstar found match!",u,h,f),!0;if(f==="."||f===".."||!i.dot&&f.charAt(0)==="."){this.debug("dot detected!",t,u,e,p);break}this.debug("globstar swallow a segment, and continue"),u++}return!!(n&&(this.debug(`
3
+ >>> no match, partial?`,t,u,e,p),u===h))}let m;if(typeof l=="string"?(m=g===l,this.debug("string match",l,g,m)):(m=l.test(g),this.debug("pattern match",l,g,m)),!m)return!1}if(o===h&&a===c)return!0;if(o===h)return n;if(a===c)return o===h-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return Et(this.pattern,this.options)}parse(t){J(t);const e=this.options;if(t==="**")return C;if(t==="")return"";let n,i=null;(n=t.match(xe))?i=e.dot?$e:Oe:(n=t.match(pe))?i=(e.nocase?e.dot?de:ge:e.dot?fe:ue)(n[1]):(n=t.match(Ee))?i=(e.nocase?e.dot?Pe:Se:e.dot?Me:je)(n):(n=t.match(me))?i=e.dot?ye:be:(n=t.match(ve))&&(i=we);const r=M.fromGlob(t,this.options).toMMPattern();return i&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:i}),r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,n=e.noglobstar?Ae:e.dot?Ce:ke,i=new Set(e.nocase?["i"]:[]);let r=t.map(h=>{const c=h.map(l=>{if(l instanceof RegExp)for(const g of l.flags.split(""))i.add(g);return typeof l=="string"?Re(l):l===C?C:l._src});return c.forEach((l,g)=>{const u=c[g+1],p=c[g-1];l!==C||p===C||(p===void 0?u!==void 0&&u!==C?c[g+1]="(?:\\/|"+n+"\\/)?"+u:c[g]=n:u===void 0?c[g-1]=p+"(?:\\/|"+n+")?":u!==C&&(c[g-1]=p+"(?:\\/|\\/"+n+"\\/)"+u,c[g+1]=C))}),c.filter(l=>l!==C).join("/")}).join("|");const[o,a]=t.length>1?["(?:",")"]:["",""];r="^"+o+r+a+"$",this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const i=this.slashSplit(t);this.debug(this.pattern,"split",i);const r=this.set;this.debug(this.pattern,"set",r);let o=i[i.length-1];if(!o)for(let a=i.length-2;!o&&a>=0;a--)o=i[a];for(let a=0;a<r.length;a++){const h=r[a];let c=i;if(n.matchBase&&h.length===1&&(c=[o]),this.matchOne(c,h,e))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(t){return E.defaults(t).Minimatch}}E.AST=M;E.Minimatch=V;E.escape=ce;E.unescape=_;var Ge=Object.defineProperty,Be=y((s,t)=>Ge(s,"name",{value:t,configurable:!0}),"t");const Ue=/^[A-Z]:\//i,R=Be((s="")=>s&&s.replaceAll("\\","/").replace(Ue,t=>t.toUpperCase()),"normalizeWindowsPath");var _e=Object.defineProperty,N=y((s,t)=>_e(s,"name",{value:t,configurable:!0}),"s");const Fe=/^[/\\]{2}/,Ze=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,St=/^[A-Z]:$/i,wt=/^\/([A-Z]:)?$/i,qe=/.(\.[^./]+)$/,Ie=/^[/\\]|^[a-z]:[/\\]/i,Je=N(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),Pt=N((s,t)=>{let e="",n=0,i=-1,r=0,o=null;for(let a=0;a<=s.length;++a){if(a<s.length)o=s[a];else{if(o==="/")break;o="/"}if(o==="/"){if(!(i===a-1||r===1))if(r===2){if(e.length<2||n!==2||!e.endsWith(".")||e.at(-2)!=="."){if(e.length>2){const h=e.lastIndexOf("/");h===-1?(e="",n=0):(e=e.slice(0,h),n=e.length-1-e.lastIndexOf("/")),i=a,r=0;continue}else if(e.length>0){e="",n=0,i=a,r=0;continue}}t&&(e+=e.length>0?"/..":"..",n=2)}else e.length>0?e+=`/${s.slice(i+1,a)}`:e=s.slice(i+1,a),n=a-i-1;i=a,r=0}else o==="."&&r!==-1?++r:r=-1}return e},"normalizeString"),Z=N(s=>Ze.test(s),"isAbsolute"),Mt=N(function(s){if(s.length===0)return".";s=R(s);const t=Fe.exec(s),e=Z(s),n=s.at(-1)==="/";return s=Pt(s,!e),s.length===0?e?"/":n?"./":".":(n&&(s+="/"),St.test(s)&&(s+="/"),t?e?`//${s}`:`//./${s}`:e&&!Z(s)?`/${s}`:s)},"normalize"),He=N(function(...s){if(s.length===0)return".";let t;for(const e of s)e&&e.length>0&&(t===void 0?t=e:t+=`/${e}`);return t===void 0?".":Mt(t.replaceAll(/\/{2,}/g,"/"))},"join"),X=N(function(...s){s=s.map(n=>R(n));let t="",e=!1;for(let n=s.length-1;n>=-1&&!e;n--){const i=n>=0?s[n]:Je();!i||i.length===0||(t=`${i}/${t}`,e=Z(i))}return t=Pt(t,!e),e&&!Z(t)?`/${t}`:t.length>0?t:"."},"resolve");N(function(s){return R(s)},"toNamespacedPath");const Ve=N(function(s){return qe.exec(R(s))?.[1]??""},"extname");N(function(s,t){const e=X(s).replace(wt,"$1").split("/"),n=X(t).replace(wt,"$1").split("/");if(n[0][1]===":"&&e[0][1]===":"&&e[0]!==n[0])return n.join("/");const i=[...e];for(const r of i){if(n[0]!==r)break;e.shift(),n.shift()}return[...e.map(()=>".."),...n].join("/")},"relative");const jt=N(s=>{const t=R(s).replace(/\/$/,"").split("/").slice(0,-1);return t.length===1&&St.test(t[0])&&(t[0]+="/"),t.join("/")||(Z(s)?"/":".")},"dirname");N(function(s){const t=[s.root,s.dir,s.base??s.name+s.ext].filter(Boolean);return R(s.root?X(...t):t.join("/"))},"format");const Ke=N((s,t)=>{const e=R(s).split("/").pop();return t&&e.endsWith(t)?e.slice(0,-t.length):e},"basename");N(function(s){const t=Ie.exec(s)?.[0]?.replace(/\\/g,"/")??"",e=Ke(s),n=Ve(e);return{base:e,dir:jt(s),ext:n,name:e.slice(0,e.length-n.length),root:t}},"parse");N((s,t)=>E(Mt(s),t,{nocaseMagicOnly:!0,nocomment:!0,nonegate:!0,optimizationLevel:2,windowsPathsNoEscape:!0}),"matchesGlob");var Qe=Object.defineProperty,rt=v((s,t)=>Qe(s,"name",{value:t,configurable:!0}),"r");const Xe="last-update-check.json",Nt=rt(s=>{const t=Dt.findCacheDirSync(s);if(t===void 0)throw new Error("Could not find cache directory");return He(t,Xe)},"getConfigFile"),Ye=rt(s=>{const t=Nt(s);try{if(!F.existsSync(t))return;const{lastUpdateCheck:e}=JSON.parse(F.readFileSync(t,"utf8"));return e}catch{return}},"getLastUpdate"),ts=rt(s=>{const t=Nt(s),e=jt(t);F.existsSync(e)||F.mkdirSync(e,{recursive:!0}),F.writeFileSync(t,JSON.stringify({lastUpdateCheck:Date.now()}))},"saveLastUpdate");var es=Object.defineProperty,ss=v((s,t)=>es(s,"name",{value:t,configurable:!0}),"g");const ns=ss(async(s,t,e)=>{const n=e.replace("__NAME__",s);return await new Promise((i,r)=>{Rt.get(n,o=>{let a="";o.on("data",h=>a+=h),o.on("end",()=>{try{const h=JSON.parse(a)[t];h||r(new Error("Error getting version")),i(h)}catch{r(new Error("Could not parse version response"))}})}).on("error",o=>r(o))})},"getDistributionVersion");var rs=Object.defineProperty,is=v((s,t)=>rs(s,"name",{value:t,configurable:!0}),"i");const os=is(async({alwaysRun:s,debug:t,distTag:e="latest",pkg:n,registryUrl:i="https://registry.npmjs.org/-/package/__NAME__/dist-tags",updateCheckInterval:r=1e3*60*60*24})=>{const o=Ye(n.name);if(s||!o||o<Date.now()-r){const a=await ns(n.name,e,i);if(ts(n.name),Ut(a,n.version))return a;t&&console.error(`Latest version (${a}) not newer than current version (${n.version})`)}else t&&console.error(`Too recent to check for a new update. simpleUpdateNotifier() interval set to ${r}ms but only ${Date.now()-o}ms since last check.`);return null},"hasNewVersion");exports.default=os;
@@ -1 +1,3 @@
1
- var j=Object.defineProperty;var f=(e,t)=>j(e,"name",{value:t,configurable:!0});import{existsSync as h,readFileSync as O,mkdirSync as k,writeFileSync as N}from"node:fs";import{findCacheDirSync as P}from"@visulima/find-cache-dir";import{get as x}from"node:https";var A=Object.defineProperty,C=f((e,t)=>A(e,"name",{value:t,configurable:!0}),"o$1");const S=C((e,t)=>{const n=e.split(".").map(Number),r=t.split(".").map(Number);for(const[o,a]of n.entries()){if(a>r[o])return!0;if(a<r[o])return!1}return!1},"semverGt");var U=Object.defineProperty,_=f((e,t)=>U(e,"name",{value:t,configurable:!0}),"v"),E=Object.defineProperty,v=_((e,t)=>E(e,"name",{value:t,configurable:!0}),"u"),D=Object.defineProperty,L=v((e,t)=>D(e,"name",{value:t,configurable:!0}),"t");const Z=/^[A-Z]:\//i,l=L((e="")=>e&&e.replaceAll("\\","/").replace(Z,t=>t.toUpperCase()),"normalizeWindowsPath");var I=Object.defineProperty,c=v((e,t)=>I(e,"name",{value:t,configurable:!0}),"r");const W=/^[/\\]{2}/,z=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,b=/^[A-Z]:$/i,m=/^\/([A-Z]:)?$/i,F=/.(\.[^./]+)$/,J=c(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),$=c((e,t)=>{let n="",r=0,o=-1,a=0,s=null;for(let i=0;i<=e.length;++i){if(i<e.length)s=e[i];else{if(s==="/")break;s="/"}if(s==="/"){if(!(o===i-1||a===1))if(a===2){if(n.length<2||r!==2||!n.endsWith(".")||n.at(-2)!=="."){if(n.length>2){const u=n.lastIndexOf("/");u===-1?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),o=i,a=0;continue}else if(n.length>0){n="",r=0,o=i,a=0;continue}}t&&(n+=n.length>0?"/..":"..",r=2)}else n.length>0?n+=`/${e.slice(o+1,i)}`:n=e.slice(o+1,i),r=i-o-1;o=i,a=0}else s==="."&&a!==-1?++a:a=-1}return n},"normalizeString"),p=c(e=>z.test(e),"isAbsolute"),M=c(function(e){if(e.length===0)return".";e=l(e);const t=W.exec(e),n=p(e),r=e.at(-1)==="/";return e=$(e,!n),e.length===0?n?"/":r?"./":".":(r&&(e+="/"),b.test(e)&&(e+="/"),t?n?`//${e}`:`//./${e}`:n&&!p(e)?`/${e}`:e)},"normalize"),T=c(function(...e){if(e.length===0)return".";let t;for(const n of e)n&&n.length>0&&(t===void 0?t=n:t+=`/${n}`);return t===void 0?".":M(t.replaceAll(/\/{2,}/g,"/"))},"join"),g=c(function(...e){e=e.map(r=>l(r));let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const o=r>=0?e[r]:J();!o||o.length===0||(t=`${o}/${t}`,n=p(o))}return t=$(t,!n),n&&!p(t)?`/${t}`:t.length>0?t:"."},"resolve");c(function(e){return l(e)},"toNamespacedPath");const B=c(function(e){return F.exec(l(e))?.[1]??""},"extname");c(function(e,t){const n=g(e).replace(m,"$1").split("/"),r=g(t).replace(m,"$1").split("/");if(r[0][1]===":"&&n[0][1]===":"&&n[0]!==r[0])return r.join("/");const o=[...n];for(const a of o){if(r[0]!==a)break;n.shift(),r.shift()}return[...n.map(()=>".."),...r].join("/")},"relative");const y=c(e=>{const t=l(e).replace(/\/$/,"").split("/").slice(0,-1);return t.length===1&&b.test(t[0])&&(t[0]+="/"),t.join("/")||(p(e)?"/":".")},"dirname");c(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return l(e.root?g(...t):t.join("/"))},"format");const V=c((e,t)=>{const n=l(e).split("/").pop();return t&&n.endsWith(t)?n.slice(0,-t.length):n},"basename");c(function(e){let t=l(e).split("/").shift();t===""?t="/":t+="/";const n=V(e),r=B(n);return{base:n,dir:y(e),ext:r,name:n.slice(0,n.length-r.length),root:t}},"parse");var G=Object.defineProperty,d=f((e,t)=>G(e,"name",{value:t,configurable:!0}),"r");const R="last-update-check.json",w=d(e=>{const t=P(e);if(t===void 0)throw new Error("Could not find cache directory");return T(t,R)},"getConfigFile"),q=d(e=>{const t=w(e);try{if(!h(t))return;const{lastUpdateCheck:n}=JSON.parse(O(t,"utf8"));return n}catch{return}},"getLastUpdate"),H=d(e=>{const t=w(e),n=y(t);h(n)||k(n,{recursive:!0}),N(t,JSON.stringify({lastUpdateCheck:Date.now()}))},"saveLastUpdate");var K=Object.defineProperty,Q=f((e,t)=>K(e,"name",{value:t,configurable:!0}),"g");const X=Q(async(e,t,n)=>{const r=n.replace("__NAME__",e);return await new Promise((o,a)=>{x(r,s=>{let i="";s.on("data",u=>i+=u),s.on("end",()=>{try{const u=JSON.parse(i)[t];u||a(new Error("Error getting version")),o(u)}catch{a(new Error("Could not parse version response"))}})}).on("error",s=>a(s))})},"getDistributionVersion");var Y=Object.defineProperty,ee=f((e,t)=>Y(e,"name",{value:t,configurable:!0}),"i");const ae=ee(async({alwaysRun:e,debug:t,distTag:n="latest",pkg:r,registryUrl:o="https://registry.npmjs.org/-/package/__NAME__/dist-tags",updateCheckInterval:a=1e3*60*60*24})=>{const s=q(r.name);if(e||!s||s<Date.now()-a){const i=await X(r.name,n,o);if(H(r.name),S(i,r.version))return i;t&&console.error(`Latest version (${i}) not newer than current version (${r.version})`)}else t&&console.error(`Too recent to check for a new update. simpleUpdateNotifier() interval set to ${a}ms but only ${Date.now()-s}ms since last check.`);return null},"hasNewVersion");export{ae as default};
1
+ var zt=Object.defineProperty;var v=(s,t)=>zt(s,"name",{value:t,configurable:!0});import{existsSync as wt,readFileSync as Dt,mkdirSync as Rt,writeFileSync as Gt}from"node:fs";import{findCacheDirSync as Bt}from"@visulima/find-cache-dir";import{get as Ut}from"node:https";var Ft=Object.defineProperty,Zt=v((s,t)=>Ft(s,"name",{value:t,configurable:!0}),"o$1");const _t=Zt((s,t)=>{const e=s.split(".").map(Number),n=t.split(".").map(Number);for(const[i,r]of e.entries()){if(r>n[i])return!0;if(r<n[i])return!1}return!1},"semverGt");var It=Object.defineProperty,x=v((s,t)=>It(s,"name",{value:t,configurable:!0}),"w"),Jt=Object.defineProperty,y=x((s,t)=>Jt(s,"name",{value:t,configurable:!0}),"y");function X(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}v(X,"Y");x(X,"Wt");y(X,"getDefaultExportFromCjs");var V,pt;function Y(){if(pt)return V;pt=1;var s=Object.defineProperty,t=y((r,o)=>s(r,"name",{value:o,configurable:!0}),"u");V=e;function e(r,o,a){r instanceof RegExp&&(r=n(r,a)),o instanceof RegExp&&(o=n(o,a));var h=i(r,o,a);return h&&{start:h[0],end:h[1],pre:a.slice(0,h[0]),body:a.slice(h[0]+r.length,h[1]),post:a.slice(h[1]+o.length)}}v(e,"e"),x(e,"e"),y(e,"balanced"),t(e,"balanced");function n(r,o){var a=o.match(r);return a?a[0]:null}v(n,"s"),x(n,"s"),y(n,"maybeMatch"),t(n,"maybeMatch"),e.range=i;function i(r,o,a){var h,c,l,g,u,p=a.indexOf(r),f=a.indexOf(o,p+1),m=p;if(p>=0&&f>0){if(r===o)return[p,f];for(h=[],l=a.length;m>=0&&!u;)m==p?(h.push(m),p=a.indexOf(r,m+1)):h.length==1?u=[h.pop(),f]:(c=h.pop(),c<l&&(l=c,g=f),f=a.indexOf(o,m+1)),m=p<f&&p>=0?p:f;h.length&&(u=[l,g])}return u}return v(i,"n"),x(i,"r"),y(i,"range"),t(i,"range"),V}v(Y,"xt");x(Y,"Ct");y(Y,"requireBalancedMatch");var K,ut;function tt(){if(ut)return K;ut=1;var s=Object.defineProperty,t=y((d,O)=>s(d,"name",{value:O,configurable:!0}),"o"),e=Y();K=u;var n="\0SLASH"+Math.random()+"\0",i="\0OPEN"+Math.random()+"\0",r="\0CLOSE"+Math.random()+"\0",o="\0COMMA"+Math.random()+"\0",a="\0PERIOD"+Math.random()+"\0";function h(d){return parseInt(d,10)==d?parseInt(d,10):d.charCodeAt(0)}v(h,"h"),x(h,"h"),y(h,"numeric"),t(h,"numeric");function c(d){return d.split("\\\\").join(n).split("\\{").join(i).split("\\}").join(r).split("\\,").join(o).split("\\.").join(a)}v(c,"c"),x(c,"c"),y(c,"escapeBraces"),t(c,"escapeBraces");function l(d){return d.split(n).join("\\").split(i).join("{").split(r).join("}").split(o).join(",").split(a).join(".")}v(l,"l"),x(l,"l"),y(l,"unescapeBraces"),t(l,"unescapeBraces");function g(d){if(!d)return[""];var O=[],S=e("{","}",d);if(!S)return d.split(",");var w=S.pre,G=S.body,W=S.post,P=w.split(",");P[P.length-1]+="{"+G+"}";var L=g(W);return W.length&&(P[P.length-1]+=L.shift(),P.push.apply(P,L)),O.push.apply(O,P),O}v(g,"g"),x(g,"g"),y(g,"parseCommaParts"),t(g,"parseCommaParts");function u(d){return d?(d.substr(0,2)==="{}"&&(d="\\{\\}"+d.substr(2)),T(c(d),!0).map(l)):[]}v(u,"u"),x(u,"u"),y(u,"expandTop"),t(u,"expandTop");function p(d){return"{"+d+"}"}v(p,"p"),x(p,"p"),y(p,"embrace"),t(p,"embrace");function f(d){return/^-?0\d/.test(d)}v(f,"f"),x(f,"f"),y(f,"isPadded"),t(f,"isPadded");function m(d,O){return d<=O}v(m,"m"),x(m,"m"),y(m,"lte"),t(m,"lte");function j(d,O){return d>=O}v(j,"O"),x(j,"M"),y(j,"gte"),t(j,"gte");function T(d,O){var S=[],w=e("{","}",d);if(!w)return[d];var G=w.pre,W=w.post.length?T(w.post,!1):[""];if(/\$$/.test(w.pre))for(var P=0;P<W.length;P++){var L=G+"{"+w.body+"}"+W[P];S.push(L)}else{var Tt=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(w.body),rt=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(w.body),_=Tt||rt,At=w.body.indexOf(",")>=0;if(!_&&!At)return w.post.match(/,.*\}/)?(d=w.pre+"{"+w.body+r+w.post,T(d)):[d];var $;if(_)$=w.body.split(/\.\./);else if($=g(w.body),$.length===1&&($=T($[0],!1).map(p),$.length===1))return W.map(function(Lt){return w.pre+$[0]+Lt});var z;if(_){var it=h($[0]),ot=h($[1]),Ct=Math.max($[0].length,$[1].length),at=$.length==3?Math.abs(h($[2])):1,ht=m,kt=ot<it;kt&&(at*=-1,ht=j);var Wt=$.some(f);z=[];for(var B=it;ht(B,ot);B+=at){var k;if(rt)k=String.fromCharCode(B),k==="\\"&&(k="");else if(k=String(B),Wt){var ct=Ct-k.length;if(ct>0){var lt=new Array(ct+1).join("0");B<0?k="-"+lt+k.slice(1):k=lt+k}}z.push(k)}}else{z=[];for(var D=0;D<$.length;D++)z.push.apply(z,T($[D],!1))}for(var D=0;D<z.length;D++)for(var P=0;P<W.length;P++){var L=G+z[D]+W[P];(!O||_||L)&&S.push(L)}}return S}return v(T,"$"),x(T,"A"),y(T,"expand"),t(T,"expand"),K}v(tt,"St");x(tt,"Rt");y(tt,"requireBraceExpansion");var qt=tt();const Ht=X(qt);var Vt=Object.defineProperty,Kt=y((s,t)=>Vt(s,"name",{value:t,configurable:!0}),"r");const J=Kt(s=>{if(typeof s!="string")throw new TypeError("invalid pattern");if(s.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern");var Qt=Object.defineProperty,q=y((s,t)=>Qt(s,"name",{value:t,configurable:!0}),"p$1");const Xt={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},U=q(s=>s.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),Yt=q(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),ft=q(s=>s.join(""),"rangesToString"),te=q((s,t)=>{const e=t;if(s.charAt(e)!=="[")throw new Error("not in a brace expression");const n=[],i=[];let r=e+1,o=!1,a=!1,h=!1,c=!1,l=e,g="";t:for(;r<s.length;){const f=s.charAt(r);if((f==="!"||f==="^")&&r===e+1){c=!0,r++;continue}if(f==="]"&&o&&!h){l=r+1;break}if(o=!0,f==="\\"&&!h){h=!0,r++;continue}if(f==="["&&!h){for(const[m,[j,T,d]]of Object.entries(Xt))if(s.startsWith(m,r)){if(g)return["$.",!1,s.length-e,!0];r+=m.length,d?i.push(j):n.push(j),a=a||T;continue t}}if(h=!1,g){f>g?n.push(U(g)+"-"+U(f)):f===g&&n.push(U(f)),g="",r++;continue}if(s.startsWith("-]",r+1)){n.push(U(f+"-")),r+=2;continue}if(s.startsWith("-",r+1)){g=f,r+=2;continue}n.push(U(f)),r++}if(l<r)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,s.length-e,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!c){const f=n[0].length===2?n[0].slice(-1):n[0];return[Yt(f),!1,l-e,!1]}const u="["+(c?"^":"")+ft(n)+"]",p="["+(c?"":"^")+ft(i)+"]";return[n.length&&i.length?"("+u+"|"+p+")":n.length?u:p,a,l-e,!0]},"parseClass");var ee=Object.defineProperty,se=y((s,t)=>ee(s,"name",{value:t,configurable:!0}),"a$2");const F=se((s,{windowsPathsNoEscape:t=!1}={})=>t?s.replace(/\[([^\/\\])\]/g,"$1"):s.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");var ne=Object.defineProperty,et=y((s,t)=>ne(s,"name",{value:t,configurable:!0}),"E$1");const re=new Set(["!","?","+","*","@"]),gt=et(s=>re.has(s),"isExtglobType"),ie="(?!(?:^|/)\\.\\.?(?:$|/))",I="(?!\\.)",oe=new Set(["[","."]),ae=new Set(["..","."]),he=new Set("().*{}+?[]^$\\!"),ce=et(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),st="[^/]",dt=st+"*?",mt=st+"+?";class M{static{v(this,"A")}static{x(this,"O")}static{y(this,"AST")}static{et(this,"AST")}type;#s;#n;#i=!1;#t=[];#e;#o;#h;#a=!1;#r;#c;#p=!1;constructor(t,e,n={}){this.type=t,t&&(this.#n=!0),this.#e=e,this.#s=this.#e?this.#e.#s:this,this.#r=this.#s===this?n:this.#s.#r,this.#h=this.#s===this?[]:this.#s.#h,t==="!"&&!this.#s.#a&&this.#h.push(this),this.#o=this.#e?this.#e.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(const t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#c!==void 0?this.#c:this.type?this.#c=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#c=this.#t.map(t=>String(t)).join("")}#f(){if(this!==this.#s)throw new Error("should only call on root");if(this.#a)return this;this.toString(),this.#a=!0;let t;for(;t=this.#h.pop();){if(t.type!=="!")continue;let e=t,n=e.#e;for(;n;){for(let i=e.#o+1;!n.type&&i<n.#t.length;i++)for(const r of t.#t){if(typeof r=="string")throw new Error("string part in extglob AST??");r.copyIn(n.#t[i])}e=n,n=e.#e}}return this}push(...t){for(const e of t)if(e!==""){if(typeof e!="string"&&!(e instanceof M&&e.#e===this))throw new Error("invalid part: "+e);this.#t.push(e)}}toJSON(){const t=this.type===null?this.#t.slice().map(e=>typeof e=="string"?e:e.toJSON()):[this.type,...this.#t.map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#s||this.#s.#a&&this.#e?.type==="!")&&t.push({}),t}isStart(){if(this.#s===this)return!0;if(!this.#e?.isStart())return!1;if(this.#o===0)return!0;const t=this.#e;for(let e=0;e<this.#o;e++){const n=t.#t[e];if(!(n instanceof M&&n.type==="!"))return!1}return!0}isEnd(){if(this.#s===this||this.#e?.type==="!")return!0;if(!this.#e?.isEnd())return!1;if(!this.type)return this.#e?.isEnd();const t=this.#e?this.#e.#t.length:0;return this.#o===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const e=new M(this.type,t);for(const n of this.#t)e.copyIn(n);return e}static#l(t,e,n,i){let r=!1,o=!1,a=-1,h=!1;if(e.type===null){let p=n,f="";for(;p<t.length;){const m=t.charAt(p++);if(r||m==="\\"){r=!r,f+=m;continue}if(o){p===a+1?(m==="^"||m==="!")&&(h=!0):m==="]"&&!(p===a+2&&h)&&(o=!1),f+=m;continue}else if(m==="["){o=!0,a=p,h=!1,f+=m;continue}if(!i.noext&&gt(m)&&t.charAt(p)==="("){e.push(f),f="";const j=new M(m,e);p=M.#l(t,j,p,i),e.push(j);continue}f+=m}return e.push(f),p}let c=n+1,l=new M(null,e);const g=[];let u="";for(;c<t.length;){const p=t.charAt(c++);if(r||p==="\\"){r=!r,u+=p;continue}if(o){c===a+1?(p==="^"||p==="!")&&(h=!0):p==="]"&&!(c===a+2&&h)&&(o=!1),u+=p;continue}else if(p==="["){o=!0,a=c,h=!1,u+=p;continue}if(gt(p)&&t.charAt(c)==="("){l.push(u),u="";const f=new M(p,l);l.push(f),c=M.#l(t,f,c,i);continue}if(p==="|"){l.push(u),u="",g.push(l),l=new M(null,e);continue}if(p===")")return u===""&&e.#t.length===0&&(e.#p=!0),l.push(u),u="",e.push(...g,l),c;u+=p}return e.type=null,e.#n=void 0,e.#t=[t.substring(n-1)],c}static fromGlob(t,e={}){const n=new M(null,void 0,e);return M.#l(t,n,0,e),n}toMMPattern(){if(this!==this.#s)return this.#s.toMMPattern();const t=this.toString(),[e,n,i,r]=this.toRegExpSource();if(!(i||this.#n||this.#r.nocase&&!this.#r.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;const o=(this.#r.nocase?"i":"")+(r?"u":"");return Object.assign(new RegExp(`^${e}$`,o),{_src:e,_glob:t})}get options(){return this.#r}toRegExpSource(t){const e=t??!!this.#r.dot;if(this.#s===this&&this.#f(),!this.type){const h=this.isStart()&&this.isEnd(),c=this.#t.map(u=>{const[p,f,m,j]=typeof u=="string"?M.#g(u,this.#n,h):u.toRegExpSource(t);return this.#n=this.#n||m,this.#i=this.#i||j,p}).join("");let l="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&ae.has(this.#t[0]))){const u=oe,p=e&&u.has(c.charAt(0))||c.startsWith("\\.")&&u.has(c.charAt(2))||c.startsWith("\\.\\.")&&u.has(c.charAt(4)),f=!e&&!t&&u.has(c.charAt(0));l=p?ie:f?I:""}let g="";return this.isEnd()&&this.#s.#a&&this.#e?.type==="!"&&(g="(?:$|\\/)"),[l+c+g,F(c),this.#n=!!this.#n,this.#i]}const n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:";let r=this.#u(e);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){const h=this.toString();return this.#t=[h],this.type=null,this.#n=void 0,[h,F(this.toString()),!1,!1]}let o=!n||t||e||!I?"":this.#u(!0);o===r&&(o=""),o&&(r=`(?:${r})(?:${o})*?`);let a="";if(this.type==="!"&&this.#p)a=(this.isStart()&&!e?I:"")+mt;else{const h=this.type==="!"?"))"+(this.isStart()&&!e&&!t?I:"")+dt+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=i+r+h}return[a,F(r),this.#n=!!this.#n,this.#i]}#u(t){return this.#t.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");const[n,i,r,o]=e.toRegExpSource(t);return this.#i=this.#i||o,n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#g(t,e,n=!1){let i=!1,r="",o=!1;for(let a=0;a<t.length;a++){const h=t.charAt(a);if(i){i=!1,r+=(he.has(h)?"\\":"")+h;continue}if(h==="\\"){a===t.length-1?r+="\\\\":i=!0;continue}if(h==="["){const[c,l,g,u]=te(t,a);if(g){r+=c,o=o||l,a+=g-1,e=e||u;continue}}if(h==="*"){n&&t==="*"?r+=mt:r+=dt,e=!0;continue}if(h==="?"){r+=st,e=!0;continue}r+=ce(h)}return[r,F(t),!!e,o]}}var le=Object.defineProperty,pe=y((s,t)=>le(s,"name",{value:t,configurable:!0}),"a$1");const ue=pe((s,{windowsPathsNoEscape:t=!1}={})=>t?s.replace(/[?*()[\]]/g,"[$&]"):s.replace(/[?*()[\]\\]/g,"\\$&"),"escape");var fe=Object.defineProperty,b=y((s,t)=>fe(s,"name",{value:t,configurable:!0}),"h$1");const E=b((s,t,e={})=>(J(t),!e.nocomment&&t.charAt(0)==="#"?!1:new H(t,e).match(s)),"minimatch"),ge=/^\*+([^+@!?\*\[\(]*)$/,de=b(s=>t=>!t.startsWith(".")&&t.endsWith(s),"starDotExtTest"),me=b(s=>t=>t.endsWith(s),"starDotExtTestDot"),be=b(s=>(s=s.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(s)),"starDotExtTestNocase"),ye=b(s=>(s=s.toLowerCase(),t=>t.toLowerCase().endsWith(s)),"starDotExtTestNocaseDot"),ve=/^\*+\.\*+$/,we=b(s=>!s.startsWith(".")&&s.includes("."),"starDotStarTest"),xe=b(s=>s!=="."&&s!==".."&&s.includes("."),"starDotStarTestDot"),Oe=/^\.\*+$/,$e=b(s=>s!=="."&&s!==".."&&s.startsWith("."),"dotStarTest"),Ee=/^\*+$/,Se=b(s=>s.length!==0&&!s.startsWith("."),"starTest"),Pe=b(s=>s.length!==0&&s!=="."&&s!=="..","starTestDot"),Me=/^\?+([^+@!?\*\[\(]*)?$/,je=b(([s,t=""])=>{const e=xt([s]);return t?(t=t.toLowerCase(),n=>e(n)&&n.toLowerCase().endsWith(t)):e},"qmarksTestNocase"),Ne=b(([s,t=""])=>{const e=Ot([s]);return t?(t=t.toLowerCase(),n=>e(n)&&n.toLowerCase().endsWith(t)):e},"qmarksTestNocaseDot"),Te=b(([s,t=""])=>{const e=Ot([s]);return t?n=>e(n)&&n.endsWith(t):e},"qmarksTestDot"),Ae=b(([s,t=""])=>{const e=xt([s]);return t?n=>e(n)&&n.endsWith(t):e},"qmarksTest"),xt=b(([s])=>{const t=s.length;return e=>e.length===t&&!e.startsWith(".")},"qmarksTestNoExt"),Ot=b(([s])=>{const t=s.length;return e=>e.length===t&&e!=="."&&e!==".."},"qmarksTestNoExtDot"),$t=process?process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",bt={win32:{sep:"\\"},posix:{sep:"/"}},Ce=$t==="win32"?bt.win32.sep:bt.posix.sep;E.sep=Ce;const C=Symbol("globstar **");E.GLOBSTAR=C;const ke="[^/]",We=ke+"*?",Le="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",ze="(?:(?!(?:\\/|^)\\.).)*?",De=b((s,t={})=>e=>E(e,s,t),"filter");E.filter=De;const A=b((s,t={})=>Object.assign({},s,t),"ext"),Re=b(s=>{if(!s||typeof s!="object"||!Object.keys(s).length)return E;const t=E;return Object.assign(b((e,n,i={})=>t(e,n,A(s,i)),"m"),{Minimatch:class extends t.Minimatch{static{v(this,"Minimatch")}static{x(this,"Minimatch")}static{y(this,"Minimatch")}static{b(this,"Minimatch")}constructor(e,n={}){super(e,A(s,n))}static defaults(e){return t.defaults(A(s,e)).Minimatch}},AST:class extends t.AST{static{v(this,"AST")}static{x(this,"AST")}static{y(this,"AST")}static{b(this,"AST")}constructor(e,n,i={}){super(e,n,A(s,i))}static fromGlob(e,n={}){return t.AST.fromGlob(e,A(s,n))}},unescape:b((e,n={})=>t.unescape(e,A(s,n)),"unescape"),escape:b((e,n={})=>t.escape(e,A(s,n)),"escape"),filter:b((e,n={})=>t.filter(e,A(s,n)),"filter"),defaults:b(e=>t.defaults(A(s,e)),"defaults"),makeRe:b((e,n={})=>t.makeRe(e,A(s,n)),"makeRe"),braceExpand:b((e,n={})=>t.braceExpand(e,A(s,n)),"braceExpand"),match:b((e,n,i={})=>t.match(e,n,A(s,i)),"match"),sep:t.sep,GLOBSTAR:C})},"defaults");E.defaults=Re;const Et=b((s,t={})=>(J(s),t.nobrace||!/\{(?:(?!\{).)*\}/.test(s)?[s]:Ht(s)),"braceExpand");E.braceExpand=Et;const Ge=b((s,t={})=>new H(s,t).makeRe(),"makeRe");E.makeRe=Ge;const Be=b((s,t,e={})=>{const n=new H(t,e);return s=s.filter(i=>n.match(i)),n.options.nonull&&!s.length&&s.push(t),s},"match");E.match=Be;const yt=/[?*]|[+@!]\(.*?\)|\[|\]/,Ue=b(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape");class H{static{v(this,"U")}static{x(this,"H")}static{y(this,"Minimatch")}static{b(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){J(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||$t,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);const n=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((r,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){const h=r[0]===""&&r[1]===""&&(r[2]==="?"||!yt.test(r[2]))&&!yt.test(r[3]),c=/^[a-z]:/i.test(r[0]);if(h)return[...r.slice(0,4),...r.slice(4).map(l=>this.parse(l))];if(c)return[r[0],...r.slice(1).map(l=>this.parse(l))]}return r.map(h=>this.parse(h))});if(this.debug(this.pattern,i),this.set=i.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r<this.set.length;r++){const o=this.set[r];o[0]===""&&o[1]===""&&this.globParts[r][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let n=0;n<t.length;n++)for(let i=0;i<t[n].length;i++)t[n][i]==="**"&&(t[n][i]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let n=-1;for(;(n=e.indexOf("**",n+1))!==-1;){let i=n;for(;e[i+1]==="**";)i++;i!==n&&e.splice(n,i-n)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((n,i)=>{const r=n[n.length-1];return i==="**"&&r==="**"?n:i===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(n.pop(),n):(n.push(i),n)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){const r=t[i];i===1&&r===""&&t[0]===""||(r==="."||r==="")&&(e=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(e=!0,t.pop())}let n=0;for(;(n=t.indexOf("..",n+1))!==-1;){const i=t[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let o=i;for(;n[o+1]==="**";)o++;o>i&&n.splice(i+1,o-i);let a=n[i+1];const h=n[i+2],c=n[i+3];if(a!==".."||!h||h==="."||h===".."||!c||c==="."||c==="..")continue;e=!0,n.splice(i,1);const l=n.slice(0);l[i]="**",t.push(l),i--}if(!this.preserveMultipleSlashes){for(let o=1;o<n.length-1;o++){const a=n[o];o===1&&a===""&&n[0]===""||(a==="."||a==="")&&(e=!0,n.splice(o,1),o--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(e=!0,n.pop())}let r=0;for(;(r=n.indexOf("..",r+1))!==-1;){const o=n[r-1];if(o&&o!=="."&&o!==".."&&o!=="**"){e=!0;const a=r===1&&n[r+1]==="**"?["."]:[];n.splice(r-1,2,...a),n.length===0&&n.push(""),r-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const i=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);if(i){t[e]=[],t[n]=i;break}}return t.filter(e=>e.length)}partsMatch(t,e,n=!1){let i=0,r=0,o=[],a="";for(;i<t.length&&r<e.length;)if(t[i]===e[r])o.push(a==="b"?e[r]:t[i]),i++,r++;else if(n&&t[i]==="**"&&e[r]===t[i+1])o.push(t[i]),i++;else if(n&&e[r]==="**"&&t[i]===e[r+1])o.push(e[r]),r++;else if(t[i]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(a==="b")return!1;a="a",o.push(t[i]),i++,r++}else if(e[r]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(a==="a")return!1;a="b",o.push(e[r]),i++,r++}else return!1;return t.length===e.length&&o}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,e,n=!1){const i=this.options;if(this.isWindows){const m=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),j=!m&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),T=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),d=!T&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),O=j?3:m?0:void 0,S=d?3:T?0:void 0;if(typeof O=="number"&&typeof S=="number"){const[w,G]=[t[O],e[S]];w.toLowerCase()===G.toLowerCase()&&(e[S]=w,S>O?e=e.slice(S):O>S&&(t=t.slice(O)))}}const{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,a=0,h=t.length,c=e.length;o<h&&a<c;o++,a++){this.debug("matchOne loop");var l=e[a],g=t[o];if(this.debug(e,l,g),l===!1)return!1;if(l===C){this.debug("GLOBSTAR",[e,l,g]);var u=o,p=a+1;if(p===c){for(this.debug("** at the end");o<h;o++)if(t[o]==="."||t[o]===".."||!i.dot&&t[o].charAt(0)===".")return!1;return!0}for(;u<h;){var f=t[u];if(this.debug(`
2
+ globstar while`,t,u,e,p,f),this.matchOne(t.slice(u),e.slice(p),n))return this.debug("globstar found match!",u,h,f),!0;if(f==="."||f===".."||!i.dot&&f.charAt(0)==="."){this.debug("dot detected!",t,u,e,p);break}this.debug("globstar swallow a segment, and continue"),u++}return!!(n&&(this.debug(`
3
+ >>> no match, partial?`,t,u,e,p),u===h))}let m;if(typeof l=="string"?(m=g===l,this.debug("string match",l,g,m)):(m=l.test(g),this.debug("pattern match",l,g,m)),!m)return!1}if(o===h&&a===c)return!0;if(o===h)return n;if(a===c)return o===h-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return Et(this.pattern,this.options)}parse(t){J(t);const e=this.options;if(t==="**")return C;if(t==="")return"";let n,i=null;(n=t.match(Ee))?i=e.dot?Pe:Se:(n=t.match(ge))?i=(e.nocase?e.dot?ye:be:e.dot?me:de)(n[1]):(n=t.match(Me))?i=(e.nocase?e.dot?Ne:je:e.dot?Te:Ae)(n):(n=t.match(ve))?i=e.dot?xe:we:(n=t.match(Oe))&&(i=$e);const r=M.fromGlob(t,this.options).toMMPattern();return i&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:i}),r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,n=e.noglobstar?We:e.dot?Le:ze,i=new Set(e.nocase?["i"]:[]);let r=t.map(h=>{const c=h.map(l=>{if(l instanceof RegExp)for(const g of l.flags.split(""))i.add(g);return typeof l=="string"?Ue(l):l===C?C:l._src});return c.forEach((l,g)=>{const u=c[g+1],p=c[g-1];l!==C||p===C||(p===void 0?u!==void 0&&u!==C?c[g+1]="(?:\\/|"+n+"\\/)?"+u:c[g]=n:u===void 0?c[g-1]=p+"(?:\\/|"+n+")?":u!==C&&(c[g-1]=p+"(?:\\/|\\/"+n+"\\/)"+u,c[g+1]=C))}),c.filter(l=>l!==C).join("/")}).join("|");const[o,a]=t.length>1?["(?:",")"]:["",""];r="^"+o+r+a+"$",this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const i=this.slashSplit(t);this.debug(this.pattern,"split",i);const r=this.set;this.debug(this.pattern,"set",r);let o=i[i.length-1];if(!o)for(let a=i.length-2;!o&&a>=0;a--)o=i[a];for(let a=0;a<r.length;a++){const h=r[a];let c=i;if(n.matchBase&&h.length===1&&(c=[o]),this.matchOne(c,h,e))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(t){return E.defaults(t).Minimatch}}E.AST=M;E.Minimatch=H;E.escape=ue;E.unescape=F;var Fe=Object.defineProperty,Ze=y((s,t)=>Fe(s,"name",{value:t,configurable:!0}),"t");const _e=/^[A-Z]:\//i,R=Ze((s="")=>s&&s.replaceAll("\\","/").replace(_e,t=>t.toUpperCase()),"normalizeWindowsPath");var Ie=Object.defineProperty,N=y((s,t)=>Ie(s,"name",{value:t,configurable:!0}),"s");const Je=/^[/\\]{2}/,qe=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,St=/^[A-Z]:$/i,vt=/^\/([A-Z]:)?$/i,He=/.(\.[^./]+)$/,Ve=/^[/\\]|^[a-z]:[/\\]/i,Ke=N(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),Pt=N((s,t)=>{let e="",n=0,i=-1,r=0,o=null;for(let a=0;a<=s.length;++a){if(a<s.length)o=s[a];else{if(o==="/")break;o="/"}if(o==="/"){if(!(i===a-1||r===1))if(r===2){if(e.length<2||n!==2||!e.endsWith(".")||e.at(-2)!=="."){if(e.length>2){const h=e.lastIndexOf("/");h===-1?(e="",n=0):(e=e.slice(0,h),n=e.length-1-e.lastIndexOf("/")),i=a,r=0;continue}else if(e.length>0){e="",n=0,i=a,r=0;continue}}t&&(e+=e.length>0?"/..":"..",n=2)}else e.length>0?e+=`/${s.slice(i+1,a)}`:e=s.slice(i+1,a),n=a-i-1;i=a,r=0}else o==="."&&r!==-1?++r:r=-1}return e},"normalizeString"),Z=N(s=>qe.test(s),"isAbsolute"),Mt=N(function(s){if(s.length===0)return".";s=R(s);const t=Je.exec(s),e=Z(s),n=s.at(-1)==="/";return s=Pt(s,!e),s.length===0?e?"/":n?"./":".":(n&&(s+="/"),St.test(s)&&(s+="/"),t?e?`//${s}`:`//./${s}`:e&&!Z(s)?`/${s}`:s)},"normalize"),Qe=N(function(...s){if(s.length===0)return".";let t;for(const e of s)e&&e.length>0&&(t===void 0?t=e:t+=`/${e}`);return t===void 0?".":Mt(t.replaceAll(/\/{2,}/g,"/"))},"join"),Q=N(function(...s){s=s.map(n=>R(n));let t="",e=!1;for(let n=s.length-1;n>=-1&&!e;n--){const i=n>=0?s[n]:Ke();!i||i.length===0||(t=`${i}/${t}`,e=Z(i))}return t=Pt(t,!e),e&&!Z(t)?`/${t}`:t.length>0?t:"."},"resolve");N(function(s){return R(s)},"toNamespacedPath");const Xe=N(function(s){return He.exec(R(s))?.[1]??""},"extname");N(function(s,t){const e=Q(s).replace(vt,"$1").split("/"),n=Q(t).replace(vt,"$1").split("/");if(n[0][1]===":"&&e[0][1]===":"&&e[0]!==n[0])return n.join("/");const i=[...e];for(const r of i){if(n[0]!==r)break;e.shift(),n.shift()}return[...e.map(()=>".."),...n].join("/")},"relative");const jt=N(s=>{const t=R(s).replace(/\/$/,"").split("/").slice(0,-1);return t.length===1&&St.test(t[0])&&(t[0]+="/"),t.join("/")||(Z(s)?"/":".")},"dirname");N(function(s){const t=[s.root,s.dir,s.base??s.name+s.ext].filter(Boolean);return R(s.root?Q(...t):t.join("/"))},"format");const Ye=N((s,t)=>{const e=R(s).split("/").pop();return t&&e.endsWith(t)?e.slice(0,-t.length):e},"basename");N(function(s){const t=Ve.exec(s)?.[0]?.replace(/\\/g,"/")??"",e=Ye(s),n=Xe(e);return{base:e,dir:jt(s),ext:n,name:e.slice(0,e.length-n.length),root:t}},"parse");N((s,t)=>E(Mt(s),t,{nocaseMagicOnly:!0,nocomment:!0,nonegate:!0,optimizationLevel:2,windowsPathsNoEscape:!0}),"matchesGlob");var ts=Object.defineProperty,nt=v((s,t)=>ts(s,"name",{value:t,configurable:!0}),"r");const es="last-update-check.json",Nt=nt(s=>{const t=Bt(s);if(t===void 0)throw new Error("Could not find cache directory");return Qe(t,es)},"getConfigFile"),ss=nt(s=>{const t=Nt(s);try{if(!wt(t))return;const{lastUpdateCheck:e}=JSON.parse(Dt(t,"utf8"));return e}catch{return}},"getLastUpdate"),ns=nt(s=>{const t=Nt(s),e=jt(t);wt(e)||Rt(e,{recursive:!0}),Gt(t,JSON.stringify({lastUpdateCheck:Date.now()}))},"saveLastUpdate");var rs=Object.defineProperty,is=v((s,t)=>rs(s,"name",{value:t,configurable:!0}),"g");const os=is(async(s,t,e)=>{const n=e.replace("__NAME__",s);return await new Promise((i,r)=>{Ut(n,o=>{let a="";o.on("data",h=>a+=h),o.on("end",()=>{try{const h=JSON.parse(a)[t];h||r(new Error("Error getting version")),i(h)}catch{r(new Error("Could not parse version response"))}})}).on("error",o=>r(o))})},"getDistributionVersion");var as=Object.defineProperty,hs=v((s,t)=>as(s,"name",{value:t,configurable:!0}),"i");const fs=hs(async({alwaysRun:s,debug:t,distTag:e="latest",pkg:n,registryUrl:i="https://registry.npmjs.org/-/package/__NAME__/dist-tags",updateCheckInterval:r=1e3*60*60*24})=>{const o=ss(n.name);if(s||!o||o<Date.now()-r){const a=await os(n.name,e,i);if(ns(n.name),_t(a,n.version))return a;t&&console.error(`Latest version (${a}) not newer than current version (${n.version})`)}else t&&console.error(`Too recent to check for a new update. simpleUpdateNotifier() interval set to ${r}ms but only ${Date.now()-o}ms since last check.`);return null},"hasNewVersion");export{fs as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/cerebro",
3
- "version": "1.1.28",
3
+ "version": "1.1.29",
4
4
  "description": "A delightful toolkit for building Node-powered CLIs.",
5
5
  "keywords": [
6
6
  "command",
@@ -86,10 +86,10 @@
86
86
  "LICENSE.md"
87
87
  ],
88
88
  "dependencies": {
89
- "@visulima/boxen": "1.0.23",
90
- "@visulima/colorize": "1.4.14",
91
- "@visulima/find-cache-dir": "1.0.18",
92
- "@visulima/pail": "2.1.13",
89
+ "@visulima/boxen": "1.0.24",
90
+ "@visulima/colorize": "1.4.15",
91
+ "@visulima/find-cache-dir": "1.0.19",
92
+ "@visulima/pail": "2.1.14",
93
93
  "cli-table3": "^0.6.5",
94
94
  "command-line-args": "^6.0.0",
95
95
  "fastest-levenshtein": "^1.0.16"
@@ -112,7 +112,7 @@
112
112
  "@types/node": "18.19.15",
113
113
  "@visulima/nextra-theme-docs": "4.0.26",
114
114
  "@visulima/packem": "1.9.2",
115
- "@visulima/path": "1.2.0",
115
+ "@visulima/path": "1.3.0",
116
116
  "@vitest/coverage-v8": "^2.1.8",
117
117
  "camelcase": "8.0.0",
118
118
  "conventional-changelog-conventionalcommits": "8.0.0",