@visulima/packem 2.0.0-alpha.79 → 2.0.0-alpha.80

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.
@@ -4,7 +4,7 @@ import { InternalOXCTransformPluginConfig } from '@visulima/packem-plugins/oxc';
4
4
  import { ResolveExternalsPluginOptions } from '@visulima/packem-plugins/plugin/externals';
5
5
  import { NativeModulesOptions } from '@visulima/packem-plugins/plugin/native-modules';
6
6
  import { PackemRollupOptions } from '@visulima/packem-rollup';
7
- import { Environment, Runtime, BuildContext, Format, BuildHooks, Mode } from '@visulima/packem-share/types';
7
+ import { BuildContext, Environment, Runtime, Format, BuildHooks, Mode } from '@visulima/packem-share/types';
8
8
  import { FileCache } from '@visulima/packem-share/utils';
9
9
  import { StyleOptions } from '@visulima/rollup-plugin-css';
10
10
  import { JitiOptions } from 'jiti';
@@ -188,7 +188,14 @@ interface BuildOptions {
188
188
  browserTargets?: string[];
189
189
  /** Custom builder functions for different build types */
190
190
  builder?: Record<string, (context: BuildContext<BuildOptions>, cachePath: string | undefined, fileCache: FileCache, logged: boolean) => Promise<void>>;
191
- /** Bundler to use for building source files */
191
+ /**
192
+ * Bundler to use for building source files.
193
+ *
194
+ * When set to `"rolldown"` the `transformer` option must be omitted —
195
+ * rolldown ships its own oxc-based transform and always uses it. The
196
+ * esbuild/swc/sucrase/oxc transformer adapters only apply under the default
197
+ * `"rollup"` bundler.
198
+ */
192
199
  bundler?: "rollup" | "rolldown";
193
200
  /** Whether to enable CommonJS interop for ESM modules */
194
201
  cjsInterop?: boolean;
@@ -280,8 +287,15 @@ interface BuildOptions {
280
287
  sourceDir: string;
281
288
  /** Whether to generate source maps */
282
289
  sourcemap: boolean;
283
- /** Transformer function for processing source files */
284
- transformer: TransformerFn;
290
+ /**
291
+ * Transformer function for processing source files.
292
+ *
293
+ * Required when `bundler` is `"rollup"` (the default). Must be omitted
294
+ * when `bundler` is `"rolldown"` — rolldown bundles its own oxc-based
295
+ * transform natively and never invokes packem's transformer adapter, so
296
+ * passing one is a configuration mistake and packem will refuse to build.
297
+ */
298
+ transformer?: TransformerFn;
285
299
  /** TypeDoc configuration for generating documentation */
286
300
  typedoc: TypeDocumentOptions | false;
287
301
  /**
@@ -409,4 +423,4 @@ type ValidationOptions = {
409
423
  typesVersions?: boolean;
410
424
  };
411
425
  };
412
- export { BuildConfig as B, InternalBuildOptions as I, RollupBuildOptions as R, BuildConfigFunction as a, BuildEntry as b, BuildOptions as c, BuildPreset as d };
426
+ export { BuildConfig as B, InternalBuildOptions as I, RollupBuildOptions as R, BuildConfigFunction as a, BuildPreset as b, BuildEntry as c, BuildOptions as d };
@@ -1 +1 @@
1
- var tn=Object.defineProperty;var I=(r,l)=>tn(r,"name",{value:l,configurable:!0});import{createRequire as nn}from"node:module";var rn=Object.defineProperty,i=I((r,l)=>rn(r,"name",{value:l,configurable:!0}),"s");let me=i(()=>{var r=(()=>{var l=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,h=Object.prototype.hasOwnProperty,v=i((e,t)=>{for(var n in t)l(e,n,{get:t[n],enumerable:!0})},"ne"),A=i((e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of u(t))!h.call(e,o)&&o!==n&&l(e,o,{get:i(()=>t[o],"get"),enumerable:!(s=a(t,o))||s.enumerable});return e},"ae"),x=i(e=>A(l({},"__esModule",{value:!0}),e),"oe"),R={};v(R,{zeptomatch:i(()=>he,"zeptomatch")});var H=i(e=>{const t=new Set,n=[e];for(let s=0;s<n.length;s++){const o=n[s];if(t.has(o))continue;t.add(o);const{children:c}=o;if(c?.length)for(let p=0,g=c.length;p<g;p++)n.push(c[p])}return Array.from(t)},"M"),Oe=i(e=>{let t="";const n=H(e);for(let s=0,o=n.length;s<o;s++){const c=n[s];if(!c.regex)continue;const p=c.regex.flags;if(t||(t=p),t!==p)throw new Error(`Inconsistent RegExp flags used: "${t}" and "${p}"`)}return t},"se"),J=i((e,t,n)=>{const s=n.get(e);if(s!==void 0)return s;const o=e.partial??t;let c="";if(e.regex&&(c+=o?"(?:$|":"",c+=e.regex.source),e.children?.length){const p=Pe(e.children.map(g=>J(g,t,n)).filter(Boolean));if(p?.length){const g=e.children.some(_=>!_.regex||!(_.partial??t)),d=p.length>1||o&&(!c.length||g);c+=d?o?"(?:$|":"(?:":"",c+=p.join("|"),c+=d?")":""}}return e.regex&&(c+=o?")":""),n.set(e,c),c},"O"),Ee=i((e,t)=>{const n=new Map,s=H(e);for(let o=s.length-1;o>=0;o--){const c=J(s[o],t,n);if(!(o>0))return c}return""},"ie"),Pe=i(e=>Array.from(new Set(e)),"ue"),L=i((e,t,n)=>L.compile(e,n).test(t),"R");L.compile=(e,t)=>{const n=t?.partial??!1,s=Ee(e,n),o=Oe(e);return new RegExp(`^(?:${s})$`,o)};var Re=L,Se=i((e,t)=>{const n=Re.compile(e,t),s=`${n.source.slice(0,-1)}[\\\\/]?$`,o=n.flags;return new RegExp(s,o)},"le"),Be=Se,_e=i(e=>{const t=e.map(s=>s.source).join("|")||"$^",n=e[0]?.flags;return new RegExp(t,n)},"ve"),We=_e,K=i(e=>Array.isArray(e),"j"),S=i(e=>typeof e=="function","_"),Ie=i(e=>e.length===0,"he"),Te=(()=>{const{toString:e}=Function.prototype,t=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return n=>(n.length===0||n.length===1)&&t.test(e.call(n))})(),qe=i(e=>typeof e=="number","de"),Ce=i(e=>typeof e=="object"&&e!==null,"xe"),Ze=i(e=>e instanceof RegExp,"me"),Le=(()=>{const e=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return t=>e.test(t.source)})(),Fe=(()=>{const e=/^[a-zA-Z0-9_-]+$/;return t=>e.test(t.source)&&!t.flags.includes("i")})(),Q=i(e=>typeof e=="string","A"),j=i(e=>e===void 0,"f"),Ne=i(e=>{const t=new Map;return n=>{const s=t.get(n);if(s!==void 0)return s;const o=e(n);return t.set(n,o),o}},"ye"),X=i((e,t,n={})=>{const s={cache:{},input:e,index:0,indexBacktrackMax:0,options:n,output:[]},o=z(t)(s),c=Math.max(s.index,s.indexBacktrackMax);if(o&&s.index===e.length)return s.output;throw new Error(`Failed to parse at index ${c}`)},"I"),f=i((e,t)=>K(e)?Ue(e,t):Q(e)?ee(e,t):De(e,t),"i"),Ue=i((e,t)=>{const n={};for(const s of e){if(s.length!==1)throw new Error(`Invalid character: "${s}"`);const o=s.charCodeAt(0);n[o]=!0}return s=>{const o=s.input;let c=s.index,p=c;for(;p<o.length&&o.charCodeAt(p)in n;)p+=1;if(p>c){if(!j(t)&&!s.options.silent){const g=o.slice(c,p),d=S(t)?t(g,o,`${c}`):t;j(d)||s.output.push(d)}s.index=p}return!0}},"we"),De=i((e,t)=>{if(Fe(e))return ee(e.source,t);{const n=e.source,s=e.flags.replace(/y|$/,"y"),o=new RegExp(n,s);return Le(e)&&S(t)&&!Te(t)?Ge(o,t):Ve(o,t)}},"$e"),Ge=i((e,t)=>n=>{const s=n.index,o=n.input;e.lastIndex=s;const c=e.exec(o);if(c){const p=e.lastIndex;if(!n.options.silent){const g=t(...c,o,`${s}`);j(g)||n.output.push(g)}return n.index=p,!0}else return!1},"Ee"),Ve=i((e,t)=>n=>{const s=n.index,o=n.input;if(e.lastIndex=s,e.test(o)){const c=e.lastIndex;if(!j(t)&&!n.options.silent){const p=S(t)?t(o.slice(s,c),o,`${s}`):t;j(p)||n.output.push(p)}return n.index=c,!0}else return!1},"Ce"),ee=i((e,t)=>n=>{const s=n.index,o=n.input;if(o.startsWith(e,s)){if(!j(t)&&!n.options.silent){const c=S(t)?t(e,o,`${s}`):t;j(c)||n.output.push(c)}return n.index+=e.length,!0}else return!1},"F"),F=i((e,t,n,s)=>{const o=z(e),c=t>1;return U(N(ne(p=>{let g=0;for(;g<n;){const d=p.index;if(!o(p)||(g+=1,p.index===d))break}return g>=t},c),s))},"k"),te=i((e,t)=>F(e,0,1,t),"L"),C=i((e,t)=>F(e,0,1/0,t),"$"),Ye=i((e,t)=>F(e,1,1/0,t),"Re"),O=i((e,t)=>{const n=e.map(z);return U(N(ne(s=>{for(let o=0,c=n.length;o<c;o++)if(!n[o](s))return!1;return!0}),t))},"x"),w=i((e,t)=>{const n=e.map(z);return U(N(s=>{for(let o=0,c=n.length;o<c;o++)if(n[o](s))return!0;return!1},t))},"p"),ne=i((e,t=!0,n=!1)=>{const s=z(e);return t?o=>{const c=o.index,p=o.output.length,g=s(o);return!g&&!n&&(o.indexBacktrackMax=Math.max(o.indexBacktrackMax,o.index)),(!g||n)&&(o.index=c,o.output.length!==p&&(o.output.length=p)),g}:s},"q"),N=i((e,t)=>{const n=z(e);return t?s=>{if(s.options.silent)return n(s);const o=s.output.length;if(n(s)){const c=s.output.splice(o,1/0),p=t(c);return j(p)||s.output.push(p),!0}else return!1}:n},"B"),U=(()=>{let e=0;return t=>{const n=z(t),s=e+=1;return o=>{var c;if(o.options.memoization===!1)return n(o);const p=o.index,g=(c=o.cache)[s]||(c[s]={indexMax:-1,queue:[]}),d=g.queue;if(p<=g.indexMax){const W=g.store||(g.store=new Map);if(d.length){for(let P=0,Qt=d.length;P<Qt;P+=2){const Xt=d[P*2],en=d[P*2+1];W.set(Xt,en)}d.length=0}const $=W.get(p);if($===!1)return!1;if(qe($))return o.index=$,!0;if($)return o.index=$.index,$.output?.length&&o.output.push(...$.output),!0}const _=o.output.length,Kt=n(o);if(g.indexMax=Math.max(g.indexMax,p),Kt){const W=o.index,$=o.output.length;if($>_){const P=o.output.slice(_,$);d.push(p,{index:W,output:P})}else d.push(p,W);return!0}else return d.push(p,!1),!1}}})(),re=i(e=>{let t;return n=>(t||(t=z(e())),t(n))},"G"),z=Ne(e=>{if(S(e))return Ie(e)?re(e):e;if(Q(e)||Ze(e))return f(e);if(K(e))return O(e);if(Ce(e))return w(Object.values(e));throw new Error("Invalid rule")}),M=i(e=>e,"d"),He=i(e=>typeof e=="string","ke"),Je=i(e=>{const t=new WeakMap,n=new WeakMap;return(s,o)=>{const c=o?.partial?n:t,p=c.get(s);if(p!==void 0)return p;const g=e(s,o);return c.set(s,g),g}},"Be"),Ke=i(e=>{const t={},n={};return(s,o)=>{const c=o?.partial?n:t;return c[s]??(c[s]=e(s,o))}},"Pe"),Qe=f(/\\./,M),Xe=f(/./,M),et=f(/\*\*\*+/,"*"),tt=f(/([^/{[(!])\*\*/,(e,t)=>`${t}*`),nt=f(/(^|.)\*\*(?=[^*/)\]}])/,(e,t)=>`${t}*`),rt=C(w([Qe,et,tt,nt,Xe])),ot=rt,st=i(e=>X(e,ot,{memoization:!1}).join(""),"Ie"),lt=st,oe="abcdefghijklmnopqrstuvwxyz",at=i(e=>{let t="";for(;e>0;){const n=(e-1)%26;t=oe[n]+t,e=Math.floor((e-1)/26)}return t},"Le"),se=i(e=>{let t=0;for(let n=0,s=e.length;n<s;n++)t=t*26+oe.indexOf(e[n])+1;return t},"V"),D=i((e,t)=>{if(t<e)return D(t,e);const n=[];for(;e<=t;)n.push(e++);return n},"b"),it=i((e,t,n)=>D(e,t).map(s=>String(s).padStart(n,"0")),"qe"),le=i((e,t)=>D(se(e),se(t)).map(at),"W"),m=i(e=>({partial:!1,regex:new RegExp(e,"s"),children:[]}),"c"),B=i(e=>({children:e}),"y"),E=(()=>{const e=i((t,n,s)=>{if(s.has(t))return;s.add(t);const{children:o}=t;if(!o.length)o.push(n);else for(let c=0,p=o.length;c<p;c++)e(o[c],n,s)},"e");return t=>{if(!t.length)return B([]);for(let n=t.length-1;n>=1;n--){const s=new Set,o=t[n-1],c=t[n];e(o,c,s)}return t[0]}})(),k=i(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),ct=f(/\\./,m),ut=f(/[$.*+?^(){}[\]\|]/,e=>m(`\\${e}`)),pt=f(/[\\\/]/,k),ft=f(/[^$.*+?^(){}[\]\|\\\/]+/,m),gt=f(/^(?:!!)*!(.*)$/,(e,t)=>m(`(?!^${he.compile(t).source}$).*?`)),ht=f(/^(!!)+/),mt=w([gt,ht]),dt=f(/\/(\*\*\/)+/,()=>B([E([k(),m(".+?"),k()]),k()])),xt=f(/^(\*\*\/)+/,()=>B([m("^"),E([m(".*?"),k()])])),bt=f(/\/(\*\*)$/,()=>B([E([k(),m(".*?")]),m("$")])),vt=f(/\*\*/,()=>m(".*?")),ae=w([dt,xt,bt,vt]),wt=f(/\*\/(?!\*\*\/|\*$)/,()=>E([m("[^\\\\/]*?"),k()])),$t=f(/\*/,()=>m("[^\\\\/]*")),ie=w([wt,$t]),ce=f("?",()=>m("[^\\\\/]")),yt=f("[",M),jt=f("]",M),zt=f(/[!^]/,"^\\\\/"),kt=f(/[a-z]-[a-z]|[0-9]-[0-9]/i,M),At=f(/\\./,M),Mt=f(/[$.*+?^(){}[\|]/,e=>`\\${e}`),Ot=f(/[\\\/]/,"\\\\/"),Et=f(/[^$.*+?^(){}[\]\|\\\/]+/,M),Pt=w([At,Mt,Ot,kt,Et]),ue=O([yt,te(zt),C(Pt),jt],e=>m(e.join(""))),Rt=f("{","(?:"),St=f("}",")"),Bt=f(/(\d+)\.\.(\d+)/,(e,t,n)=>it(+t,+n,Math.min(t.length,n.length)).join("|")),_t=f(/([a-z]+)\.\.([a-z]+)/,(e,t,n)=>le(t,n).join("|")),Wt=f(/([A-Z]+)\.\.([A-Z]+)/,(e,t,n)=>le(t.toLowerCase(),n.toLowerCase()).join("|").toUpperCase()),It=w([Bt,_t,Wt]),pe=O([Rt,It,St],e=>m(e.join(""))),Tt=f("{"),qt=f("}"),Ct=f(","),Zt=f(/\\./,m),Lt=f(/[$.*+?^(){[\]\|]/,e=>m(`\\${e}`)),Ft=f(/[\\\/]/,k),Nt=f(/[^$.*+?^(){}[\]\|\\\/,]+/,m),Ut=re(()=>ge),Dt=f("",()=>m("(?:)")),Gt=Ye(w([ae,ie,ce,ue,pe,Ut,Zt,Lt,Ft,Nt]),E),fe=w([Gt,Dt]),ge=O([Tt,te(O([fe,C(O([Ct,fe]))])),qt],B),Vt=C(w([mt,ae,ie,ce,ue,pe,ge,ct,ut,pt,ft]),E),Yt=Vt,Ht=i(e=>X(e,Yt,{memoization:!1})[0],"kr"),Jt=Ht,G=i((e,t,n)=>G.compile(e,n).test(t),"N");G.compile=(()=>{const e=Ke((n,s)=>Be(Jt(lt(n)),s)),t=Je((n,s)=>We(n.map(o=>e(o,s))));return(n,s)=>He(n)?e(n,s):t(n,s)})();var he=G;return x(R)})();return r.default||r},"_lazyMatch"),V;const on=i((r,l)=>(V||(V=me(),me=null),V(r,l)),"zeptomatch"),sn=/^[A-Z]:\//i,y=i((r="")=>r&&r.replaceAll("\\","/").replace(sn,l=>l.toUpperCase()),"normalizeWindowsPath"),ln=/^[/\\]{2}/,an=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,we=/^[A-Z]:$/i,de=/^\/([A-Z]:)?$/i,cn=/.(\.[^./]+)$/,un=/^[/\\]|^[a-z]:[/\\]/i,pn=/\/$/,fn=i(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),$e=i((r,l)=>{let a="",u=0,h=-1,v=0,A;for(let x=0;x<=r.length;++x){if(x<r.length)A=r[x];else{if(A==="/")break;A="/"}if(A==="/"){if(!(h===x-1||v===1))if(v===2){if(a.length<2||u!==2||!a.endsWith(".")||a.at(-2)!=="."){if(a.length>2){const R=a.lastIndexOf("/");R===-1?(a="",u=0):(a=a.slice(0,R),u=a.length-1-a.lastIndexOf("/")),h=x,v=0;continue}else if(a.length>0){a="",u=0,h=x,v=0;continue}}l&&(a+=a.length>0?"/..":"..",u=2)}else a.length>0?a+=`/${r.slice(h+1,x)}`:a=r.slice(h+1,x),u=x-h-1;h=x,v=0}else A==="."&&v!==-1?++v:v=-1}return a},"normalizeString"),q=i(r=>an.test(r),"isAbsolute"),ye=i(function(r){if(r.length===0)return".";r=y(r);const l=ln.exec(r),a=q(r),u=r.at(-1)==="/";return r=$e(r,!a),r.length===0?a?"/":u?"./":".":(u&&(r+="/"),we.test(r)&&(r+="/"),l?a?`//${r}`:`//./${r}`:a&&!q(r)?`/${r}`:r)},"normalize"),je=i((...r)=>{let l="";for(const a of r)if(a)if(l.length>0){const u=l.at(-1)==="/",h=a[0]==="/";u&&h?l+=a.slice(1):l+=u||h?a:`/${a}`}else l+=a;return ye(l)},"join"),Y=i(function(...r){r=r.map(u=>y(u));let l="",a=!1;for(let u=r.length-1;u>=-1&&!a;u--){const h=u>=0?r[u]:fn();!h||h.length===0||(l=`${h}/${l}`,a=q(h))}return l=$e(l,!a),a&&!q(l)?`/${l}`:l.length>0?l:"."},"resolve"),En=i(function(r){return y(r)},"toNamespacedPath"),ze=i(function(r){return cn.exec(y(r))?.[1]??""},"extname"),Pn=i(function(r,l){const a=Y(r).replace(de,"$1").split("/"),u=Y(l).replace(de,"$1").split("/");if(u[0][1]===":"&&a[0][1]===":"&&a[0]!==u[0])return u.join("/");const h=[...a];for(const v of h){if(u[0]!==v)break;a.shift(),u.shift()}return[...a.map(()=>".."),...u].join("/")},"relative"),gn=i(r=>{const l=y(r).replace(pn,"").split("/").slice(0,-1);return l.length===1&&we.test(l[0])&&(l[0]=`${l[0]}/`),l.join("/")||(q(r)?"/":".")},"dirname");i(function(r){const l=[r.root,r.dir,r.base??r.name+r.ext].filter(Boolean);return y(r.root?Y(...l):l.join("/"))},"format");const hn=i((r,l)=>{const a=y(r).split("/").pop();return l&&a.endsWith(l)?a.slice(0,-l.length):a},"basename"),Rn=i(function(r){const l=un.exec(r)?.[0]?.replaceAll("\\","/")??"",a=hn(r),u=ze(a);return{base:a,dir:gn(r),ext:u,name:a.slice(0,a.length-u.length),root:l}},"parse");i((r,l)=>on(l,ye(r)),"matchesGlob");var mn=Object.defineProperty,b=I((r,l)=>mn(r,"name",{value:l,configurable:!0}),"i");const dn=nn(import.meta.url),T=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,xn=b(r=>{if(typeof T<"u"&&T.versions&&T.versions.node){const[l,a]=T.versions.node.split(".").map(Number);if(l>22||l===22&&a>=3||l===20&&a>=16)return T.getBuiltinModule(r)}return dn(r)},"__cjs_getBuiltinModule"),{fileURLToPath:bn}=xn("node:url");function ke(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}I(ke,"w");b(ke,"getDefaultExportFromCjs");var xe,be;function Ae(){return be||(be=1,xe=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),xe}I(Ae,"y");b(Ae,"requireBinaryExtensions");var vn=Ae();const wn=ke(vn),$n=new Set(wn),yn=new Set(["/","\\",void 0]),ve=Symbol.for("pathe:normalizedAlias"),jn=/(^|[/\\])([^/\\]+?)(?=(?:\.[^.]+)?$)/,zn=b((r,l)=>l.split("/").length-r.split("/").length,"compareAliases"),Z=b((r="/")=>{const l=r.at(-1);return l==="/"||l==="\\"},"hasTrailingSlash"),Me=b(r=>{if(r[ve])return r;const l=Object.fromEntries(Object.entries(r).toSorted(([a],[u])=>zn(a,u)));for(const a in l)for(const u in l)u===a||a.startsWith(u)||l[a].startsWith(u)&&yn.has(l[a][u.length])&&(l[a]=l[u]+l[a].slice(u.length));return Object.defineProperty(l,ve,{enumerable:!1,value:!0}),l},"normalizeAliases"),Sn=b((r,l)=>{r=y(r),l=Me(l);for(const[a,u]of Object.entries(l)){if(!r.startsWith(a))continue;const h=Z(a)?a.slice(0,-1):a;if(Z(r[h.length]))return je(u,r.slice(a.length))}return r},"resolveAlias");b(r=>jn.exec(r)?.[2],"filename");b((r,l)=>{r=y(r),l=Me(l);for(const[a,u]of Object.entries(l).toReversed()){if(!r.startsWith(u))continue;const h=Z(u)?u.slice(0,-1):u;if(Z(r[h.length]))return je(a,r.slice(u.length))}return r},"reverseResolveAlias");const kn=/^(?:\.?\.[/\\]|\.\.\B)/,An=/^(?:msys|cygwin)$/,Bn=b(r=>kn.test(r)||r==="..","isRelative");b(r=>$n.has(ze(r).slice(1).toLowerCase()),"isBinaryPath");const _n=b(r=>y(r instanceof URL?bn(r):r),"toPath");b(()=>{if(!globalThis.process)return!1;if(globalThis.process.platform==="win32"||globalThis.process.platform==="cygwin")return!0;const r=globalThis.process.env.OSTYPE;return typeof r!="string"?!1:An.test(r)},"isWindows");export{En as A,ye as B,ze as H,Y as L,q as M,_n as P,Sn as R,gn as V,hn as X,je as _,Bn as a,Pn as b,Rn as c};
1
+ var tn=Object.defineProperty;var I=(r,l)=>tn(r,"name",{value:l,configurable:!0});import{createRequire as nn}from"node:module";var rn=Object.defineProperty,i=I((r,l)=>rn(r,"name",{value:l,configurable:!0}),"s");let me=i(()=>{var r=(()=>{var l=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,h=Object.prototype.hasOwnProperty,v=i((e,t)=>{for(var n in t)l(e,n,{get:t[n],enumerable:!0})},"ne"),A=i((e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of u(t))!h.call(e,o)&&o!==n&&l(e,o,{get:i(()=>t[o],"get"),enumerable:!(s=a(t,o))||s.enumerable});return e},"ae"),x=i(e=>A(l({},"__esModule",{value:!0}),e),"oe"),P={};v(P,{zeptomatch:i(()=>he,"zeptomatch")});var H=i(e=>{const t=new Set,n=[e];for(let s=0;s<n.length;s++){const o=n[s];if(t.has(o))continue;t.add(o);const{children:c}=o;if(c?.length)for(let p=0,g=c.length;p<g;p++)n.push(c[p])}return Array.from(t)},"M"),Oe=i(e=>{let t="";const n=H(e);for(let s=0,o=n.length;s<o;s++){const c=n[s];if(!c.regex)continue;const p=c.regex.flags;if(t||(t=p),t!==p)throw new Error(`Inconsistent RegExp flags used: "${t}" and "${p}"`)}return t},"se"),J=i((e,t,n)=>{const s=n.get(e);if(s!==void 0)return s;const o=e.partial??t;let c="";if(e.regex&&(c+=o?"(?:$|":"",c+=e.regex.source),e.children?.length){const p=Re(e.children.map(g=>J(g,t,n)).filter(Boolean));if(p?.length){const g=e.children.some(_=>!_.regex||!(_.partial??t)),d=p.length>1||o&&(!c.length||g);c+=d?o?"(?:$|":"(?:":"",c+=p.join("|"),c+=d?")":""}}return e.regex&&(c+=o?")":""),n.set(e,c),c},"O"),Ee=i((e,t)=>{const n=new Map,s=H(e);for(let o=s.length-1;o>=0;o--){const c=J(s[o],t,n);if(!(o>0))return c}return""},"ie"),Re=i(e=>Array.from(new Set(e)),"ue"),L=i((e,t,n)=>L.compile(e,n).test(t),"R");L.compile=(e,t)=>{const n=t?.partial??!1,s=Ee(e,n),o=Oe(e);return new RegExp(`^(?:${s})$`,o)};var Pe=L,Se=i((e,t)=>{const n=Pe.compile(e,t),s=`${n.source.slice(0,-1)}[\\\\/]?$`,o=n.flags;return new RegExp(s,o)},"le"),Be=Se,_e=i(e=>{const t=e.map(s=>s.source).join("|")||"$^",n=e[0]?.flags;return new RegExp(t,n)},"ve"),We=_e,K=i(e=>Array.isArray(e),"j"),S=i(e=>typeof e=="function","_"),Ie=i(e=>e.length===0,"he"),Te=(()=>{const{toString:e}=Function.prototype,t=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return n=>(n.length===0||n.length===1)&&t.test(e.call(n))})(),qe=i(e=>typeof e=="number","de"),Ce=i(e=>typeof e=="object"&&e!==null,"xe"),Ze=i(e=>e instanceof RegExp,"me"),Le=(()=>{const e=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return t=>e.test(t.source)})(),Fe=(()=>{const e=/^[a-zA-Z0-9_-]+$/;return t=>e.test(t.source)&&!t.flags.includes("i")})(),Q=i(e=>typeof e=="string","A"),j=i(e=>e===void 0,"f"),Ne=i(e=>{const t=new Map;return n=>{const s=t.get(n);if(s!==void 0)return s;const o=e(n);return t.set(n,o),o}},"ye"),X=i((e,t,n={})=>{const s={cache:{},input:e,index:0,indexBacktrackMax:0,options:n,output:[]},o=z(t)(s),c=Math.max(s.index,s.indexBacktrackMax);if(o&&s.index===e.length)return s.output;throw new Error(`Failed to parse at index ${c}`)},"I"),f=i((e,t)=>K(e)?Ue(e,t):Q(e)?ee(e,t):De(e,t),"i"),Ue=i((e,t)=>{const n={};for(const s of e){if(s.length!==1)throw new Error(`Invalid character: "${s}"`);const o=s.charCodeAt(0);n[o]=!0}return s=>{const o=s.input;let c=s.index,p=c;for(;p<o.length&&o.charCodeAt(p)in n;)p+=1;if(p>c){if(!j(t)&&!s.options.silent){const g=o.slice(c,p),d=S(t)?t(g,o,`${c}`):t;j(d)||s.output.push(d)}s.index=p}return!0}},"we"),De=i((e,t)=>{if(Fe(e))return ee(e.source,t);{const n=e.source,s=e.flags.replace(/y|$/,"y"),o=new RegExp(n,s);return Le(e)&&S(t)&&!Te(t)?Ge(o,t):Ve(o,t)}},"$e"),Ge=i((e,t)=>n=>{const s=n.index,o=n.input;e.lastIndex=s;const c=e.exec(o);if(c){const p=e.lastIndex;if(!n.options.silent){const g=t(...c,o,`${s}`);j(g)||n.output.push(g)}return n.index=p,!0}else return!1},"Ee"),Ve=i((e,t)=>n=>{const s=n.index,o=n.input;if(e.lastIndex=s,e.test(o)){const c=e.lastIndex;if(!j(t)&&!n.options.silent){const p=S(t)?t(o.slice(s,c),o,`${s}`):t;j(p)||n.output.push(p)}return n.index=c,!0}else return!1},"Ce"),ee=i((e,t)=>n=>{const s=n.index,o=n.input;if(o.startsWith(e,s)){if(!j(t)&&!n.options.silent){const c=S(t)?t(e,o,`${s}`):t;j(c)||n.output.push(c)}return n.index+=e.length,!0}else return!1},"F"),F=i((e,t,n,s)=>{const o=z(e),c=t>1;return U(N(ne(p=>{let g=0;for(;g<n;){const d=p.index;if(!o(p)||(g+=1,p.index===d))break}return g>=t},c),s))},"k"),te=i((e,t)=>F(e,0,1,t),"L"),C=i((e,t)=>F(e,0,1/0,t),"$"),Ye=i((e,t)=>F(e,1,1/0,t),"Re"),O=i((e,t)=>{const n=e.map(z);return U(N(ne(s=>{for(let o=0,c=n.length;o<c;o++)if(!n[o](s))return!1;return!0}),t))},"x"),w=i((e,t)=>{const n=e.map(z);return U(N(s=>{for(let o=0,c=n.length;o<c;o++)if(n[o](s))return!0;return!1},t))},"p"),ne=i((e,t=!0,n=!1)=>{const s=z(e);return t?o=>{const c=o.index,p=o.output.length,g=s(o);return!g&&!n&&(o.indexBacktrackMax=Math.max(o.indexBacktrackMax,o.index)),(!g||n)&&(o.index=c,o.output.length!==p&&(o.output.length=p)),g}:s},"q"),N=i((e,t)=>{const n=z(e);return t?s=>{if(s.options.silent)return n(s);const o=s.output.length;if(n(s)){const c=s.output.splice(o,1/0),p=t(c);return j(p)||s.output.push(p),!0}else return!1}:n},"B"),U=(()=>{let e=0;return t=>{const n=z(t),s=e+=1;return o=>{var c;if(o.options.memoization===!1)return n(o);const p=o.index,g=(c=o.cache)[s]||(c[s]={indexMax:-1,queue:[]}),d=g.queue;if(p<=g.indexMax){const W=g.store||(g.store=new Map);if(d.length){for(let R=0,Qt=d.length;R<Qt;R+=2){const Xt=d[R*2],en=d[R*2+1];W.set(Xt,en)}d.length=0}const $=W.get(p);if($===!1)return!1;if(qe($))return o.index=$,!0;if($)return o.index=$.index,$.output?.length&&o.output.push(...$.output),!0}const _=o.output.length,Kt=n(o);if(g.indexMax=Math.max(g.indexMax,p),Kt){const W=o.index,$=o.output.length;if($>_){const R=o.output.slice(_,$);d.push(p,{index:W,output:R})}else d.push(p,W);return!0}else return d.push(p,!1),!1}}})(),re=i(e=>{let t;return n=>(t||(t=z(e())),t(n))},"G"),z=Ne(e=>{if(S(e))return Ie(e)?re(e):e;if(Q(e)||Ze(e))return f(e);if(K(e))return O(e);if(Ce(e))return w(Object.values(e));throw new Error("Invalid rule")}),M=i(e=>e,"d"),He=i(e=>typeof e=="string","ke"),Je=i(e=>{const t=new WeakMap,n=new WeakMap;return(s,o)=>{const c=o?.partial?n:t,p=c.get(s);if(p!==void 0)return p;const g=e(s,o);return c.set(s,g),g}},"Be"),Ke=i(e=>{const t={},n={};return(s,o)=>{const c=o?.partial?n:t;return c[s]??(c[s]=e(s,o))}},"Pe"),Qe=f(/\\./,M),Xe=f(/./,M),et=f(/\*\*\*+/,"*"),tt=f(/([^/{[(!])\*\*/,(e,t)=>`${t}*`),nt=f(/(^|.)\*\*(?=[^*/)\]}])/,(e,t)=>`${t}*`),rt=C(w([Qe,et,tt,nt,Xe])),ot=rt,st=i(e=>X(e,ot,{memoization:!1}).join(""),"Ie"),lt=st,oe="abcdefghijklmnopqrstuvwxyz",at=i(e=>{let t="";for(;e>0;){const n=(e-1)%26;t=oe[n]+t,e=Math.floor((e-1)/26)}return t},"Le"),se=i(e=>{let t=0;for(let n=0,s=e.length;n<s;n++)t=t*26+oe.indexOf(e[n])+1;return t},"V"),D=i((e,t)=>{if(t<e)return D(t,e);const n=[];for(;e<=t;)n.push(e++);return n},"b"),it=i((e,t,n)=>D(e,t).map(s=>String(s).padStart(n,"0")),"qe"),le=i((e,t)=>D(se(e),se(t)).map(at),"W"),m=i(e=>({partial:!1,regex:new RegExp(e,"s"),children:[]}),"c"),B=i(e=>({children:e}),"y"),E=(()=>{const e=i((t,n,s)=>{if(s.has(t))return;s.add(t);const{children:o}=t;if(!o.length)o.push(n);else for(let c=0,p=o.length;c<p;c++)e(o[c],n,s)},"e");return t=>{if(!t.length)return B([]);for(let n=t.length-1;n>=1;n--){const s=new Set,o=t[n-1],c=t[n];e(o,c,s)}return t[0]}})(),k=i(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),ct=f(/\\./,m),ut=f(/[$.*+?^(){}[\]\|]/,e=>m(`\\${e}`)),pt=f(/[\\\/]/,k),ft=f(/[^$.*+?^(){}[\]\|\\\/]+/,m),gt=f(/^(?:!!)*!(.*)$/,(e,t)=>m(`(?!^${he.compile(t).source}$).*?`)),ht=f(/^(!!)+/),mt=w([gt,ht]),dt=f(/\/(\*\*\/)+/,()=>B([E([k(),m(".+?"),k()]),k()])),xt=f(/^(\*\*\/)+/,()=>B([m("^"),E([m(".*?"),k()])])),bt=f(/\/(\*\*)$/,()=>B([E([k(),m(".*?")]),m("$")])),vt=f(/\*\*/,()=>m(".*?")),ae=w([dt,xt,bt,vt]),wt=f(/\*\/(?!\*\*\/|\*$)/,()=>E([m("[^\\\\/]*?"),k()])),$t=f(/\*/,()=>m("[^\\\\/]*")),ie=w([wt,$t]),ce=f("?",()=>m("[^\\\\/]")),yt=f("[",M),jt=f("]",M),zt=f(/[!^]/,"^\\\\/"),kt=f(/[a-z]-[a-z]|[0-9]-[0-9]/i,M),At=f(/\\./,M),Mt=f(/[$.*+?^(){}[\|]/,e=>`\\${e}`),Ot=f(/[\\\/]/,"\\\\/"),Et=f(/[^$.*+?^(){}[\]\|\\\/]+/,M),Rt=w([At,Mt,Ot,kt,Et]),ue=O([yt,te(zt),C(Rt),jt],e=>m(e.join(""))),Pt=f("{","(?:"),St=f("}",")"),Bt=f(/(\d+)\.\.(\d+)/,(e,t,n)=>it(+t,+n,Math.min(t.length,n.length)).join("|")),_t=f(/([a-z]+)\.\.([a-z]+)/,(e,t,n)=>le(t,n).join("|")),Wt=f(/([A-Z]+)\.\.([A-Z]+)/,(e,t,n)=>le(t.toLowerCase(),n.toLowerCase()).join("|").toUpperCase()),It=w([Bt,_t,Wt]),pe=O([Pt,It,St],e=>m(e.join(""))),Tt=f("{"),qt=f("}"),Ct=f(","),Zt=f(/\\./,m),Lt=f(/[$.*+?^(){[\]\|]/,e=>m(`\\${e}`)),Ft=f(/[\\\/]/,k),Nt=f(/[^$.*+?^(){}[\]\|\\\/,]+/,m),Ut=re(()=>ge),Dt=f("",()=>m("(?:)")),Gt=Ye(w([ae,ie,ce,ue,pe,Ut,Zt,Lt,Ft,Nt]),E),fe=w([Gt,Dt]),ge=O([Tt,te(O([fe,C(O([Ct,fe]))])),qt],B),Vt=C(w([mt,ae,ie,ce,ue,pe,ge,ct,ut,pt,ft]),E),Yt=Vt,Ht=i(e=>X(e,Yt,{memoization:!1})[0],"kr"),Jt=Ht,G=i((e,t,n)=>G.compile(e,n).test(t),"N");G.compile=(()=>{const e=Ke((n,s)=>Be(Jt(lt(n)),s)),t=Je((n,s)=>We(n.map(o=>e(o,s))));return(n,s)=>He(n)?e(n,s):t(n,s)})();var he=G;return x(P)})();return r.default||r},"_lazyMatch"),V;const on=i((r,l)=>(V||(V=me(),me=null),V(r,l)),"zeptomatch"),sn=/^[A-Z]:\//i,y=i((r="")=>r&&r.replaceAll("\\","/").replace(sn,l=>l.toUpperCase()),"normalizeWindowsPath"),ln=/^[/\\]{2}/,an=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,we=/^[A-Z]:$/i,de=/^\/([A-Z]:)?$/i,cn=/.(\.[^./]+)$/,un=/^[/\\]|^[a-z]:[/\\]/i,pn=/\/$/,fn=i(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),$e=i((r,l)=>{let a="",u=0,h=-1,v=0,A;for(let x=0;x<=r.length;++x){if(x<r.length)A=r[x];else{if(A==="/")break;A="/"}if(A==="/"){if(!(h===x-1||v===1))if(v===2){if(a.length<2||u!==2||!a.endsWith(".")||a.at(-2)!=="."){if(a.length>2){const P=a.lastIndexOf("/");P===-1?(a="",u=0):(a=a.slice(0,P),u=a.length-1-a.lastIndexOf("/")),h=x,v=0;continue}else if(a.length>0){a="",u=0,h=x,v=0;continue}}l&&(a+=a.length>0?"/..":"..",u=2)}else a.length>0?a+=`/${r.slice(h+1,x)}`:a=r.slice(h+1,x),u=x-h-1;h=x,v=0}else A==="."&&v!==-1?++v:v=-1}return a},"normalizeString"),q=i(r=>an.test(r),"isAbsolute"),ye=i(function(r){if(r.length===0)return".";r=y(r);const l=ln.exec(r),a=q(r),u=r.at(-1)==="/";return r=$e(r,!a),r.length===0?a?"/":u?"./":".":(u&&(r+="/"),we.test(r)&&(r+="/"),l?a?`//${r}`:`//./${r}`:a&&!q(r)?`/${r}`:r)},"normalize"),je=i((...r)=>{let l="";for(const a of r)if(a)if(l.length>0){const u=l.at(-1)==="/",h=a[0]==="/";u&&h?l+=a.slice(1):l+=u||h?a:`/${a}`}else l+=a;return ye(l)},"join"),Y=i(function(...r){r=r.map(u=>y(u));let l="",a=!1;for(let u=r.length-1;u>=-1&&!a;u--){const h=u>=0?r[u]:fn();!h||h.length===0||(l=`${h}/${l}`,a=q(h))}return l=$e(l,!a),a&&!q(l)?`/${l}`:l.length>0?l:"."},"resolve"),En=i(function(r){return y(r)},"toNamespacedPath"),ze=i(function(r){return cn.exec(y(r))?.[1]??""},"extname"),Rn=i(function(r,l){const a=Y(r).replace(de,"$1").split("/"),u=Y(l).replace(de,"$1").split("/");if(u[0][1]===":"&&a[0][1]===":"&&a[0]!==u[0])return u.join("/");const h=[...a];for(const v of h){if(u[0]!==v)break;a.shift(),u.shift()}return[...a.map(()=>".."),...u].join("/")},"relative"),gn=i(r=>{const l=y(r).replace(pn,"").split("/").slice(0,-1);return l.length===1&&we.test(l[0])&&(l[0]=`${l[0]}/`),l.join("/")||(q(r)?"/":".")},"dirname");i(function(r){const l=[r.root,r.dir,r.base??r.name+r.ext].filter(Boolean);return y(r.root?Y(...l):l.join("/"))},"format");const hn=i((r,l)=>{const a=y(r).split("/").pop();return l&&a.endsWith(l)?a.slice(0,-l.length):a},"basename"),Pn=i(function(r){const l=un.exec(r)?.[0]?.replaceAll("\\","/")??"",a=hn(r),u=ze(a);return{base:a,dir:gn(r),ext:u,name:a.slice(0,a.length-u.length),root:l}},"parse");i((r,l)=>on(l,ye(r)),"matchesGlob");var mn=Object.defineProperty,b=I((r,l)=>mn(r,"name",{value:l,configurable:!0}),"i");const dn=nn(import.meta.url),T=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,xn=b(r=>{if(typeof T<"u"&&T.versions&&T.versions.node){const[l,a]=T.versions.node.split(".").map(Number);if(l>22||l===22&&a>=3||l===20&&a>=16)return T.getBuiltinModule(r)}return dn(r)},"__cjs_getBuiltinModule"),{fileURLToPath:bn}=xn("node:url");function ke(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}I(ke,"w");b(ke,"getDefaultExportFromCjs");var xe,be;function Ae(){return be||(be=1,xe=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),xe}I(Ae,"y");b(Ae,"requireBinaryExtensions");var vn=Ae();const wn=ke(vn),$n=new Set(wn),yn=new Set(["/","\\",void 0]),ve=Symbol.for("pathe:normalizedAlias"),jn=/(^|[/\\])([^/\\]+?)(?=(?:\.[^.]+)?$)/,zn=b((r,l)=>l.split("/").length-r.split("/").length,"compareAliases"),Z=b((r="/")=>{const l=r.at(-1);return l==="/"||l==="\\"},"hasTrailingSlash"),Me=b(r=>{if(r[ve])return r;const l=Object.fromEntries(Object.entries(r).toSorted(([a],[u])=>zn(a,u)));for(const a in l)for(const u in l)u===a||a.startsWith(u)||l[a].startsWith(u)&&yn.has(l[a][u.length])&&(l[a]=l[u]+l[a].slice(u.length));return Object.defineProperty(l,ve,{enumerable:!1,value:!0}),l},"normalizeAliases"),Sn=b((r,l)=>{r=y(r),l=Me(l);for(const[a,u]of Object.entries(l)){if(!r.startsWith(a))continue;const h=Z(a)?a.slice(0,-1):a;if(Z(r[h.length]))return je(u,r.slice(a.length))}return r},"resolveAlias");b(r=>jn.exec(r)?.[2],"filename");b((r,l)=>{r=y(r),l=Me(l);for(const[a,u]of Object.entries(l).toReversed()){if(!r.startsWith(u))continue;const h=Z(u)?u.slice(0,-1):u;if(Z(r[h.length]))return je(a,r.slice(u.length))}return r},"reverseResolveAlias");const kn=/^(?:\.?\.[/\\]|\.\.\B)/,An=/^(?:msys|cygwin)$/,Bn=b(r=>kn.test(r)||r==="..","isRelative");b(r=>$n.has(ze(r).slice(1).toLowerCase()),"isBinaryPath");const _n=b(r=>y(r instanceof URL?bn(r):r),"toPath");b(()=>{if(!globalThis.process)return!1;if(globalThis.process.platform==="win32"||globalThis.process.platform==="cygwin")return!0;const r=globalThis.process.env.OSTYPE;return typeof r!="string"?!1:An.test(r)},"isWindows");export{En as A,ye as B,ze as H,Y as L,q as M,_n as P,Rn as R,gn as V,hn as X,je as _,Sn as a,Pn as b,Bn as c};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/packem",
3
- "version": "2.0.0-alpha.79",
3
+ "version": "2.0.0-alpha.80",
4
4
  "description": "A fast and modern bundler for Node.js and TypeScript.",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -171,12 +171,12 @@
171
171
  ],
172
172
  "dependencies": {
173
173
  "@antfu/install-pkg": "1.1.0",
174
- "@clack/prompts": "1.4.0",
175
- "@rollup/pluginutils": "5.3.0",
174
+ "@clack/prompts": "1.5.0",
175
+ "@rollup/pluginutils": "5.4.0",
176
176
  "@visulima/cerebro": "3.0.0-alpha.25",
177
177
  "@visulima/packem-share": "1.0.0-alpha.47",
178
- "@visulima/rollup-plugin-css": "1.0.0-alpha.46",
179
- "@visulima/rollup-plugin-dts": "1.0.0-alpha.27",
178
+ "@visulima/rollup-plugin-css": "1.0.0-alpha.47",
179
+ "@visulima/rollup-plugin-dts": "1.0.0-alpha.28",
180
180
  "@visulima/tsconfig": "3.0.0-alpha.24",
181
181
  "browserslist": "4.28.2",
182
182
  "cjs-module-lexer": "2.2.0",
@@ -188,14 +188,14 @@
188
188
  "jiti": "2.7.0",
189
189
  "magic-string": "0.30.21",
190
190
  "mlly": "1.8.2",
191
- "tinyexec": "1.2.2"
191
+ "tinyexec": "1.2.4"
192
192
  },
193
193
  "peerDependencies": {
194
- "@arethetypeswrong/core": ">=0.18.2",
194
+ "@arethetypeswrong/core": ">=0.18.3",
195
195
  "@swc/core": ">=1.15.40",
196
196
  "@tailwindcss/node": "4.3.0",
197
197
  "@tailwindcss/oxide": "4.3.0",
198
- "@visulima/packem-rollup": "1.0.0-alpha.66",
198
+ "@visulima/packem-rollup": "1.0.0-alpha.67",
199
199
  "cssnano": ">=8.0.1",
200
200
  "esbuild": ">=0.28.0",
201
201
  "icss-utils": ">=5.1.0",