pkgroll 2.11.2 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/dist/cli.mjs +18 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -287,6 +287,17 @@ Or to inline them in the distribution files:
|
|
|
287
287
|
pkgroll --sourcemap=inline
|
|
288
288
|
```
|
|
289
289
|
|
|
290
|
+
## Dev vs Prod config
|
|
291
|
+
|
|
292
|
+
In some cases, it makes sense to use different `package.json` field values for the published environment. You can achieve this by using the [`publishConfig`](https://pnpm.io/package_json#publishconfig) field (extended by pnpm). This allows you to override specific fields during publication with a clean separation of concerns.
|
|
293
|
+
|
|
294
|
+
The following fields can be overridden using `publishConfig`:
|
|
295
|
+
- `bin`
|
|
296
|
+
- `main`
|
|
297
|
+
- `exports`
|
|
298
|
+
- `types`
|
|
299
|
+
- `module`
|
|
300
|
+
|
|
290
301
|
## FAQ
|
|
291
302
|
|
|
292
303
|
### Why bundle with Rollup?
|
package/dist/cli.mjs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var ze=Object.defineProperty;var i=(u,e)=>ze(u,"name",{value:e,configurable:!0});import S from"node:fs";import qe from"tty";import{watch as Je,rollup as Ge}from"rollup";import h from"node:path";import Ke from"@rollup/plugin-node-resolve";import He from"@rollup/plugin-commonjs";import Ze from"@rollup/plugin-json";import Qe from"@rollup/plugin-alias";import Ye from"@rollup/plugin-dynamic-import-vars";import{createFilter as Xe}from"@rollup/pluginutils";import{transform as Mu}from"esbuild";import ut,{builtinModules as et}from"node:module";import cu from"magic-string";import tt from"fs";import{attachScopes as Dt}from"rollup-pluginutils";const nt="known-flag",rt="unknown-flag",ot="argument",{stringify:q}=JSON,st=/\B([A-Z])/g,it=i(u=>u.replace(st,"-$1").toLowerCase(),"v$2"),{hasOwnProperty:at}=Object.prototype,J=i((u,e)=>at.call(u,e),"w$3"),lt=i(u=>Array.isArray(u),"L$2"),Wu=i(u=>typeof u=="function"?[u,!1]:lt(u)?[u[0],!0]:Wu(u.type),"b$2"),ct=i((u,e)=>u===Boolean?e!=="false":e,"d$3"),ft=i((u,e)=>typeof e=="boolean"?e:u===Number&&e===""?Number.NaN:u(e),"m$2"),Ft=/[\s.:=]/,Ct=i(u=>{const e=`Flag name ${q(u)}`;if(u.length===0)throw new Error(`${e} cannot be empty`);if(u.length===1)throw new Error(`${e} must be longer than a character`);const D=u.match(Ft);if(D)throw new Error(`${e} cannot contain ${q(D?.[0])}`)},"B$1"),pt=i(u=>{const e={},D=i((t,n)=>{if(J(e,t))throw new Error(`Duplicate flags named ${q(t)}`);e[t]=n},"r");for(const t in u){if(!J(u,t))continue;Ct(t);const n=u[t],r=[[],...Wu(n),n];D(t,r);const o=it(t);if(t!==o&&D(o,r),"alias"in n&&typeof n.alias=="string"){const{alias:s}=n,a=`Flag alias ${q(s)} for flag ${q(t)}`;if(s.length===0)throw new Error(`${a} cannot be empty`);if(s.length>1)throw new Error(`${a} must be a single character`);D(s,r)}}return e},"K$2"),dt=i((u,e)=>{const D={};for(const t in u){if(!J(u,t))continue;const[n,,r,o]=e[t];if(n.length===0&&"default"in o){let{default:s}=o;typeof s=="function"&&(s=s()),D[t]=s}else D[t]=r?n:n.pop()}return D},"_$3"),X="--",Et=/[.:=]/,ht=/^-{1,2}\w/,mt=i(u=>{if(!ht.test(u))return;const e=!u.startsWith(X);let D=u.slice(e?1:2),t;const n=D.match(Et);if(n){const{index:r}=n;t=D.slice(r+1),D=D.slice(0,r)}return[D,t,e]},"N$1"),gt=i((u,{onFlag:e,onArgument:D})=>{let t;const n=i((r,o)=>{if(typeof t!="function")return!0;t(r,o),t=void 0},"o");for(let r=0;r<u.length;r+=1){const o=u[r];if(o===X){n();const a=u.slice(r+1);D?.(a,[r],!0);break}const s=mt(o);if(s){if(n(),!e)continue;const[a,l,C]=s;if(C)for(let F=0;F<a.length;F+=1){n();const c=F===a.length-1;t=e(a[F],c?l:void 0,[r,F+1,c])}else t=e(a,l,[r])}else n(o,[r])&&D?.([o],[r])}n()},"$$2"),Bt=i((u,e)=>{for(const[D,t,n]of e.reverse()){if(t){const r=u[D];let o=r.slice(0,t);if(n||(o+=r.slice(t+1)),o!=="-"){u[D]=o;continue}}u.splice(D,1)}},"E$2"),At=i((u,e=process.argv.slice(2),{ignore:D}={})=>{const t=[],n=pt(u),r={},o=[];return o[X]=[],gt(e,{onFlag(s,a,l){const C=J(n,s);if(!D?.(C?nt:rt,s,a)){if(C){const[F,c]=n[s],E=ct(c,a),d=i((m,y)=>{t.push(l),y&&t.push(y),F.push(ft(c,m||""))},"p");return E===void 0?d:d(E)}J(r,s)||(r[s]=[]),r[s].push(a===void 0?!0:a),t.push(l)}},onArgument(s,a,l){D?.(ot,e[a[0]])||(o.push(...s),l?(o[X]=s,e.splice(a[0])):t.push(a))}}),Bt(e,t),{flags:dt(u,n),unknownFlags:r,_:o}},"U$2");var yt=Object.create,uu=Object.defineProperty,bt=Object.defineProperties,wt=Object.getOwnPropertyDescriptor,vt=Object.getOwnPropertyDescriptors,$t=Object.getOwnPropertyNames,Uu=Object.getOwnPropertySymbols,xt=Object.getPrototypeOf,Vu=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,zu=i((u,e,D)=>e in u?uu(u,e,{enumerable:!0,configurable:!0,writable:!0,value:D}):u[e]=D,"W$2"),eu=i((u,e)=>{for(var D in e||(e={}))Vu.call(e,D)&&zu(u,D,e[D]);if(Uu)for(var D of Uu(e))kt.call(e,D)&&zu(u,D,e[D]);return u},"p$1"),fu=i((u,e)=>bt(u,vt(e)),"c"),jt=i(u=>uu(u,"__esModule",{value:!0}),"nD"),Ot=i((u,e)=>()=>(u&&(e=u(u=0)),e),"rD"),Tt=i((u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports),"iD"),St=i((u,e,D,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of $t(e))!Vu.call(u,n)&&n!=="default"&&uu(u,n,{get:i(()=>e[n],"get"),enumerable:!(t=wt(e,n))||t.enumerable});return u},"oD"),Pt=i((u,e)=>St(jt(uu(u!=null?yt(xt(u)):{},"default",{value:u,enumerable:!0})),u),"BD"),x=Ot(()=>{}),_t=Tt((u,e)=>{x(),e.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});x(),x(),x();var It=i(u=>{var e,D,t;let n=(e=process.stdout.columns)!=null?e:Number.POSITIVE_INFINITY;return typeof u=="function"&&(u=u(n)),u||(u={}),Array.isArray(u)?{columns:u,stdoutColumns:n}:{columns:(D=u.columns)!=null?D:[],stdoutColumns:(t=u.stdoutColumns)!=null?t:n}},"v$1");x(),x(),x(),x(),x();function Nt({onlyFirst:u=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,u?void 0:"g")}i(Nt,"w$2");function qu(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(Nt(),"")}i(qu,"d$2"),x();function Rt(u){return Number.isInteger(u)?u>=4352&&(u<=4447||u===9001||u===9002||11904<=u&&u<=12871&&u!==12351||12880<=u&&u<=19903||19968<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65131||65281<=u&&u<=65376||65504<=u&&u<=65510||110592<=u&&u<=110593||127488<=u&&u<=127569||131072<=u&&u<=262141):!1}i(Rt,"y$1");var Lt=Pt(_t());function N(u){if(typeof u!="string"||u.length===0||(u=qu(u),u.length===0))return 0;u=u.replace((0,Lt.default)()," ");let e=0;for(let D=0;D<u.length;D++){let t=u.codePointAt(D);t<=31||t>=127&&t<=159||t>=768&&t<=879||(t>65535&&D++,e+=Rt(t)?2:1)}return e}i(N,"g");var Ju=i(u=>Math.max(...u.split(`
|
|
3
|
-
`).map(N)),"b$1"),Mt=i(u=>{let e=[];for(let D of u){let{length:t}=D,n=t-e.length;for(let r=0;r<n;r+=1)e.push(0);for(let r=0;r<t;r+=1){let o=
|
|
4
|
-
`)];for(let[l,
|
|
5
|
-
`?(r&&(t+=te("")),n&&F&&(t+=ee(F))):
|
|
2
|
+
var Ve=Object.defineProperty;var i=(u,e)=>Ve(u,"name",{value:e,configurable:!0});import S from"node:fs";import ze from"tty";import{watch as qe,rollup as Ge}from"rollup";import h from"node:path";import Ke from"@rollup/plugin-node-resolve";import He from"@rollup/plugin-commonjs";import Ze from"@rollup/plugin-json";import Qe from"@rollup/plugin-alias";import Ye from"@rollup/plugin-dynamic-import-vars";import{createFilter as Xe}from"@rollup/pluginutils";import{transform as Mu}from"esbuild";import ut,{builtinModules as et}from"node:module";import cu from"magic-string";import tt from"fs";import{attachScopes as Dt}from"rollup-pluginutils";const nt="known-flag",rt="unknown-flag",ot="argument",{stringify:z}=JSON,st=/\B([A-Z])/g,it=i(u=>u.replace(st,"-$1").toLowerCase(),"v$2"),{hasOwnProperty:at}=Object.prototype,q=i((u,e)=>at.call(u,e),"w$3"),lt=i(u=>Array.isArray(u),"L$2"),Wu=i(u=>typeof u=="function"?[u,!1]:lt(u)?[u[0],!0]:Wu(u.type),"b$2"),ct=i((u,e)=>u===Boolean?e!=="false":e,"d$3"),ft=i((u,e)=>typeof e=="boolean"?e:u===Number&&e===""?Number.NaN:u(e),"m$2"),Ft=/[\s.:=]/,pt=i(u=>{const e=`Flag name ${z(u)}`;if(u.length===0)throw new Error(`${e} cannot be empty`);if(u.length===1)throw new Error(`${e} must be longer than a character`);const D=u.match(Ft);if(D)throw new Error(`${e} cannot contain ${z(D?.[0])}`)},"B$1"),Ct=i(u=>{const e={},D=i((t,n)=>{if(q(e,t))throw new Error(`Duplicate flags named ${z(t)}`);e[t]=n},"r");for(const t in u){if(!q(u,t))continue;pt(t);const n=u[t],r=[[],...Wu(n),n];D(t,r);const o=it(t);if(t!==o&&D(o,r),"alias"in n&&typeof n.alias=="string"){const{alias:s}=n,a=`Flag alias ${z(s)} for flag ${z(t)}`;if(s.length===0)throw new Error(`${a} cannot be empty`);if(s.length>1)throw new Error(`${a} must be a single character`);D(s,r)}}return e},"K$2"),dt=i((u,e)=>{const D={};for(const t in u){if(!q(u,t))continue;const[n,,r,o]=e[t];if(n.length===0&&"default"in o){let{default:s}=o;typeof s=="function"&&(s=s()),D[t]=s}else D[t]=r?n:n.pop()}return D},"_$3"),X="--",Et=/[.:=]/,ht=/^-{1,2}\w/,mt=i(u=>{if(!ht.test(u))return;const e=!u.startsWith(X);let D=u.slice(e?1:2),t;const n=D.match(Et);if(n){const{index:r}=n;t=D.slice(r+1),D=D.slice(0,r)}return[D,t,e]},"N$1"),gt=i((u,{onFlag:e,onArgument:D})=>{let t;const n=i((r,o)=>{if(typeof t!="function")return!0;t(r,o),t=void 0},"o");for(let r=0;r<u.length;r+=1){const o=u[r];if(o===X){n();const a=u.slice(r+1);D?.(a,[r],!0);break}const s=mt(o);if(s){if(n(),!e)continue;const[a,l,p]=s;if(p)for(let F=0;F<a.length;F+=1){n();const c=F===a.length-1;t=e(a[F],c?l:void 0,[r,F+1,c])}else t=e(a,l,[r])}else n(o,[r])&&D?.([o],[r])}n()},"$$2"),Bt=i((u,e)=>{for(const[D,t,n]of e.reverse()){if(t){const r=u[D];let o=r.slice(0,t);if(n||(o+=r.slice(t+1)),o!=="-"){u[D]=o;continue}}u.splice(D,1)}},"E$2"),At=i((u,e=process.argv.slice(2),{ignore:D}={})=>{const t=[],n=Ct(u),r={},o=[];return o[X]=[],gt(e,{onFlag(s,a,l){const p=q(n,s);if(!D?.(p?nt:rt,s,a)){if(p){const[F,c]=n[s],E=ct(c,a),d=i((m,y)=>{t.push(l),y&&t.push(y),F.push(ft(c,m||""))},"p");return E===void 0?d:d(E)}q(r,s)||(r[s]=[]),r[s].push(a===void 0?!0:a),t.push(l)}},onArgument(s,a,l){D?.(ot,e[a[0]])||(o.push(...s),l?(o[X]=s,e.splice(a[0])):t.push(a))}}),Bt(e,t),{flags:dt(u,n),unknownFlags:r,_:o}},"U$2");var yt=Object.create,uu=Object.defineProperty,bt=Object.defineProperties,wt=Object.getOwnPropertyDescriptor,vt=Object.getOwnPropertyDescriptors,$t=Object.getOwnPropertyNames,Uu=Object.getOwnPropertySymbols,xt=Object.getPrototypeOf,Ju=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,Vu=i((u,e,D)=>e in u?uu(u,e,{enumerable:!0,configurable:!0,writable:!0,value:D}):u[e]=D,"W$2"),eu=i((u,e)=>{for(var D in e||(e={}))Ju.call(e,D)&&Vu(u,D,e[D]);if(Uu)for(var D of Uu(e))kt.call(e,D)&&Vu(u,D,e[D]);return u},"p$1"),fu=i((u,e)=>bt(u,vt(e)),"c"),jt=i(u=>uu(u,"__esModule",{value:!0}),"nD"),Ot=i((u,e)=>()=>(u&&(e=u(u=0)),e),"rD"),Tt=i((u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports),"iD"),St=i((u,e,D,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of $t(e))!Ju.call(u,n)&&n!=="default"&&uu(u,n,{get:i(()=>e[n],"get"),enumerable:!(t=wt(e,n))||t.enumerable});return u},"oD"),Pt=i((u,e)=>St(jt(uu(u!=null?yt(xt(u)):{},"default",{value:u,enumerable:!0})),u),"BD"),x=Ot(()=>{}),_t=Tt((u,e)=>{x(),e.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});x(),x(),x();var It=i(u=>{var e,D,t;let n=(e=process.stdout.columns)!=null?e:Number.POSITIVE_INFINITY;return typeof u=="function"&&(u=u(n)),u||(u={}),Array.isArray(u)?{columns:u,stdoutColumns:n}:{columns:(D=u.columns)!=null?D:[],stdoutColumns:(t=u.stdoutColumns)!=null?t:n}},"v$1");x(),x(),x(),x(),x();function Nt({onlyFirst:u=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,u?void 0:"g")}i(Nt,"w$2");function zu(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(Nt(),"")}i(zu,"d$2"),x();function Rt(u){return Number.isInteger(u)?u>=4352&&(u<=4447||u===9001||u===9002||11904<=u&&u<=12871&&u!==12351||12880<=u&&u<=19903||19968<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65131||65281<=u&&u<=65376||65504<=u&&u<=65510||110592<=u&&u<=110593||127488<=u&&u<=127569||131072<=u&&u<=262141):!1}i(Rt,"y$1");var Lt=Pt(_t());function N(u){if(typeof u!="string"||u.length===0||(u=zu(u),u.length===0))return 0;u=u.replace((0,Lt.default)()," ");let e=0;for(let D=0;D<u.length;D++){let t=u.codePointAt(D);t<=31||t>=127&&t<=159||t>=768&&t<=879||(t>65535&&D++,e+=Rt(t)?2:1)}return e}i(N,"g");var qu=i(u=>Math.max(...u.split(`
|
|
3
|
+
`).map(N)),"b$1"),Mt=i(u=>{let e=[];for(let D of u){let{length:t}=D,n=t-e.length;for(let r=0;r<n;r+=1)e.push(0);for(let r=0;r<t;r+=1){let o=qu(D[r]);o>e[r]&&(e[r]=o)}}return e},"k$1");x();var Gu=/^\d+%$/,Ku={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},Wt=i((u,e)=>{var D;let t=[];for(let n=0;n<u.length;n+=1){let r=(D=e[n])!=null?D:"auto";if(typeof r=="number"||r==="auto"||r==="content-width"||typeof r=="string"&&Gu.test(r)){t.push(fu(eu({},Ku),{width:r,contentWidth:u[n]}));continue}if(r&&typeof r=="object"){let o=fu(eu(eu({},Ku),r),{contentWidth:u[n]});o.horizontalPadding=o.paddingLeft+o.paddingRight,t.push(o);continue}throw new Error(`Invalid column width: ${JSON.stringify(r)}`)}return t},"sD");function Ut(u,e){for(let D of u){let{width:t}=D;if(t==="content-width"&&(D.width=D.contentWidth),t==="auto"){let a=Math.min(20,D.contentWidth);D.width=a,D.autoOverflow=D.contentWidth-a}if(typeof t=="string"&&Gu.test(t)){let a=Number.parseFloat(t.slice(0,-1))/100;D.width=Math.floor(e*a)-(D.paddingLeft+D.paddingRight)}let{horizontalPadding:n}=D,r=1,o=r+n;if(o>=e){let a=o-e,l=Math.ceil(D.paddingLeft/n*a),p=a-l;D.paddingLeft-=l,D.paddingRight-=p,D.horizontalPadding=D.paddingLeft+D.paddingRight}D.paddingLeftString=D.paddingLeft?" ".repeat(D.paddingLeft):"",D.paddingRightString=D.paddingRight?" ".repeat(D.paddingRight):"";let s=e-D.horizontalPadding;D.width=Math.max(Math.min(D.width,s),r)}}i(Ut,"aD");var Hu=i(()=>Object.assign([],{columns:0}),"G$1");function Jt(u,e){let D=[Hu()],[t]=D;for(let n of u){let r=n.width+n.horizontalPadding;t.columns+r>e&&(t=Hu(),D.push(t)),t.push(n),t.columns+=r}for(let n of D){let r=n.reduce((c,E)=>c+E.width+E.horizontalPadding,0),o=e-r;if(o===0)continue;let s=n.filter(c=>"autoOverflow"in c),a=s.filter(c=>c.autoOverflow>0),l=a.reduce((c,E)=>c+E.autoOverflow,0),p=Math.min(l,o);for(let c of a){let E=Math.floor(c.autoOverflow/l*p);c.width+=E,o-=E}let F=Math.floor(o/s.length);for(let c=0;c<s.length;c+=1){let E=s[c];c===s.length-1?E.width+=o:E.width+=F,o-=F}}return D}i(Jt,"lD");function Vt(u,e,D){let t=Wt(D,e);return Ut(t,u),Jt(t,u)}i(Vt,"Z$2"),x(),x(),x();var Fu=10,Zu=i((u=0)=>e=>`\x1B[${e+u}m`,"U$1"),Qu=i((u=0)=>e=>`\x1B[${38+u};5;${e}m`,"V$2"),Yu=i((u=0)=>(e,D,t)=>`\x1B[${38+u};2;${e};${D};${t}m`,"Y$1");function zt(){let u=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[D,t]of Object.entries(e)){for(let[n,r]of Object.entries(t))e[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},t[n]=e[n],u.set(r[0],r[1]);Object.defineProperty(e,D,{value:t,enumerable:!1})}return Object.defineProperty(e,"codes",{value:u,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=Zu(),e.color.ansi256=Qu(),e.color.ansi16m=Yu(),e.bgColor.ansi=Zu(Fu),e.bgColor.ansi256=Qu(Fu),e.bgColor.ansi16m=Yu(Fu),Object.defineProperties(e,{rgbToAnsi256:{value:i((D,t,n)=>D===t&&t===n?D<8?16:D>248?231:Math.round((D-8)/247*24)+232:16+36*Math.round(D/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),"value"),enumerable:!1},hexToRgb:{value:i(D=>{let t=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(D.toString(16));if(!t)return[0,0,0];let{colorString:n}=t.groups;n.length===3&&(n=n.split("").map(o=>o+o).join(""));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},"value"),enumerable:!1},hexToAnsi256:{value:i(D=>e.rgbToAnsi256(...e.hexToRgb(D)),"value"),enumerable:!1},ansi256ToAnsi:{value:i(D=>{if(D<8)return 30+D;if(D<16)return 90+(D-8);let t,n,r;if(D>=232)t=((D-232)*10+8)/255,n=t,r=t;else{D-=16;let a=D%36;t=Math.floor(D/36)/5,n=Math.floor(a/6)/5,r=a%6/5}let o=Math.max(t,n,r)*2;if(o===0)return 30;let s=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return o===2&&(s+=60),s},"value"),enumerable:!1},rgbToAnsi:{value:i((D,t,n)=>e.ansi256ToAnsi(e.rgbToAnsi256(D,t,n)),"value"),enumerable:!1},hexToAnsi:{value:i(D=>e.ansi256ToAnsi(e.hexToAnsi256(D)),"value"),enumerable:!1}}),e}i(zt,"AD");var qt=zt(),Gt=qt,tu=new Set(["\x1B","\x9B"]),Kt=39,pu="\x07",Xu="[",Ht="]",ue="m",Cu=`${Ht}8;;`,ee=i(u=>`${tu.values().next().value}${Xu}${u}${ue}`,"J$2"),te=i(u=>`${tu.values().next().value}${Cu}${u}${pu}`,"Q$1"),Zt=i(u=>u.split(" ").map(e=>N(e)),"hD"),du=i((u,e,D)=>{let t=[...e],n=!1,r=!1,o=N(zu(u[u.length-1]));for(let[s,a]of t.entries()){let l=N(a);if(o+l<=D?u[u.length-1]+=a:(u.push(a),o=0),tu.has(a)&&(n=!0,r=t.slice(s+1).join("").startsWith(Cu)),n){r?a===pu&&(n=!1,r=!1):a===ue&&(n=!1);continue}o+=l,o===D&&s<t.length-1&&(u.push(""),o=0)}!o&&u[u.length-1].length>0&&u.length>1&&(u[u.length-2]+=u.pop())},"S"),Qt=i(u=>{let e=u.split(" "),D=e.length;for(;D>0&&!(N(e[D-1])>0);)D--;return D===e.length?u:e.slice(0,D).join(" ")+e.slice(D).join("")},"cD"),Yt=i((u,e,D={})=>{if(D.trim!==!1&&u.trim()==="")return"";let t="",n,r,o=Zt(u),s=[""];for(let[l,p]of u.split(" ").entries()){D.trim!==!1&&(s[s.length-1]=s[s.length-1].trimStart());let F=N(s[s.length-1]);if(l!==0&&(F>=e&&(D.wordWrap===!1||D.trim===!1)&&(s.push(""),F=0),(F>0||D.trim===!1)&&(s[s.length-1]+=" ",F++)),D.hard&&o[l]>e){let c=e-F,E=1+Math.floor((o[l]-c-1)/e);Math.floor((o[l]-1)/e)<E&&s.push(""),du(s,p,e);continue}if(F+o[l]>e&&F>0&&o[l]>0){if(D.wordWrap===!1&&F<e){du(s,p,e);continue}s.push("")}if(F+o[l]>e&&D.wordWrap===!1){du(s,p,e);continue}s[s.length-1]+=p}D.trim!==!1&&(s=s.map(l=>Qt(l)));let a=[...s.join(`
|
|
4
|
+
`)];for(let[l,p]of a.entries()){if(t+=p,tu.has(p)){let{groups:c}=new RegExp(`(?:\\${Xu}(?<code>\\d+)m|\\${Cu}(?<uri>.*)${pu})`).exec(a.slice(l).join(""))||{groups:{}};if(c.code!==void 0){let E=Number.parseFloat(c.code);n=E===Kt?void 0:E}else c.uri!==void 0&&(r=c.uri.length===0?void 0:c.uri)}let F=Gt.codes.get(Number(n));a[l+1]===`
|
|
5
|
+
`?(r&&(t+=te("")),n&&F&&(t+=ee(F))):p===`
|
|
6
6
|
`&&(n&&F&&(t+=ee(n)),r&&(t+=te(r)))}return t},"dD");function Xt(u,e,D){return String(u).normalize().replace(/\r\n/g,`
|
|
7
7
|
`).split(`
|
|
8
8
|
`).map(t=>Yt(t,e,D)).join(`
|
|
9
|
-
`)}i(Xt,"T$1");var De=i(u=>Array.from({length:u}).fill(""),"X$1");function uD(u,e){let D=[],t=0;for(let n of u){let r=0,o=n.map(a=>{var l;let
|
|
10
|
-
`);if(a.postprocess){let{postprocess:c}=a;F=F.map((E,d)=>c.call(a,E,d))}return a.paddingTop&&F.unshift(...De(a.paddingTop)),a.paddingBottom&&F.push(...De(a.paddingBottom)),F.length>r&&(r=F.length),fu(eu({},a),{lines:F})}),s=[];for(let a=0;a<r;a+=1){let l=o.map(
|
|
9
|
+
`)}i(Xt,"T$1");var De=i(u=>Array.from({length:u}).fill(""),"X$1");function uD(u,e){let D=[],t=0;for(let n of u){let r=0,o=n.map(a=>{var l;let p=(l=e[t])!=null?l:"";t+=1,a.preprocess&&(p=a.preprocess(p)),qu(p)>a.width&&(p=Xt(p,a.width,{hard:!0}));let F=p.split(`
|
|
10
|
+
`);if(a.postprocess){let{postprocess:c}=a;F=F.map((E,d)=>c.call(a,E,d))}return a.paddingTop&&F.unshift(...De(a.paddingTop)),a.paddingBottom&&F.push(...De(a.paddingBottom)),F.length>r&&(r=F.length),fu(eu({},a),{lines:F})}),s=[];for(let a=0;a<r;a+=1){let l=o.map(p=>{var F;let c=(F=p.lines[a])!=null?F:"",E=Number.isFinite(p.width)?" ".repeat(p.width-N(c)):"",d=p.paddingLeftString;return p.align==="right"&&(d+=E),d+=c,p.align==="left"&&(d+=E),d+p.paddingRightString}).join("");s.push(l)}D.push(s.join(`
|
|
11
11
|
`))}return D.join(`
|
|
12
|
-
`)}i(uD,"P$1");function eD(u,e){if(!u||u.length===0)return"";let D=Mt(u),t=D.length;if(t===0)return"";let{stdoutColumns:n,columns:r}=It(e);if(r.length>t)throw new Error(`${r.length} columns defined, but only ${t} columns found`);let o=
|
|
12
|
+
`)}i(uD,"P$1");function eD(u,e){if(!u||u.length===0)return"";let D=Mt(u),t=D.length;if(t===0)return"";let{stdoutColumns:n,columns:r}=It(e);if(r.length>t)throw new Error(`${r.length} columns defined, but only ${t} columns found`);let o=Vt(n,r,D);return u.map(s=>uD(o,s)).join(`
|
|
13
13
|
`)}i(eD,"mD"),x();var tD=["<",">","=",">=","<="];function DD(u){if(!tD.includes(u))throw new TypeError(`Invalid breakpoint operator: ${u}`)}i(DD,"xD");function nD(u){let e=Object.keys(u).map(D=>{let[t,n]=D.split(" ");DD(t);let r=Number.parseInt(n,10);if(Number.isNaN(r))throw new TypeError(`Invalid breakpoint value: ${n}`);let o=u[D];return{operator:t,breakpoint:r,value:o}}).sort((D,t)=>t.breakpoint-D.breakpoint);return D=>{var t;return(t=e.find(({operator:n,breakpoint:r})=>n==="="&&D===r||n===">"&&D>r||n==="<"&&D<r||n===">="&&D>=r||n==="<="&&D<=r))==null?void 0:t.value}}i(nD,"wD");const rD=i(u=>u.replace(/[\W_]([a-z\d])?/gi,(e,D)=>D?D.toUpperCase():""),"P"),oD=i(u=>u.replace(/\B([A-Z])/g,"-$1").toLowerCase(),"q$1"),sD={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:i(u=>u.trim(),"preprocess")},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function iD(u){let e=!1;return{type:"table",data:{tableData:Object.keys(u).sort((D,t)=>D.localeCompare(t)).map(D=>{const t=u[D],n="alias"in t;return n&&(e=!0),{name:D,flag:t,flagFormatted:`--${oD(D)}`,aliasesEnabled:e,aliasFormatted:n?`-${t.alias}`:void 0}}).map(D=>(D.aliasesEnabled=e,[{type:"flagName",data:D},{type:"flagDescription",data:D}])),tableBreakpoints:sD}}}i(iD,"D");const ne=i(u=>!u||(u.version??(u.help?u.help.version:void 0)),"A$1"),re=i(u=>{const e="parent"in u&&u.parent?.name;return(e?`${e} `:"")+u.name},"C$1");function aD(u){const e=[];u.name&&e.push(re(u));const D=ne(u)??("parent"in u&&ne(u.parent));if(D&&e.push(`v${D}`),e.length!==0)return{id:"name",type:"text",data:`${e.join(" ")}
|
|
14
14
|
`}}i(aD,"R$1");function lD(u){const{help:e}=u;if(!(!e||!e.description))return{id:"description",type:"text",data:`${e.description}
|
|
15
15
|
`}}i(lD,"L");function cD(u){const e=u.help||{};if("usage"in e)return e.usage?{id:"usage",type:"section",data:{title:"Usage:",body:Array.isArray(e.usage)?e.usage.join(`
|
|
16
16
|
`):e.usage}}:void 0;if(u.name){const D=[],t=[re(u)];if(u.flags&&Object.keys(u.flags).length>0&&t.push("[flags...]"),u.parameters&&u.parameters.length>0){const{parameters:n}=u,r=n.indexOf("--"),o=r>-1&&n.slice(r+1).some(s=>s.startsWith("<"));t.push(n.map(s=>s!=="--"?s:o?"--":"[--]").join(" "))}if(t.length>1&&D.push(t.join(" ")),"commands"in u&&u.commands?.length&&D.push(`${u.name} <command>`),D.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:D.join(`
|
|
17
|
-
`)}}}}i(cD,"T");function fD(u){return!("commands"in u)||!u.commands?.length?void 0:{id:"commands",type:"section",data:{title:"Commands:",body:{type:"table",data:{tableData:u.commands.map(e=>[e.options.name,e.options.help?e.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}i(fD,"_$1");function FD(u){if(!(!u.flags||Object.keys(u.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:iD(u.flags),indentBody:0}}}i(FD,"k");function
|
|
18
|
-
`)),D)return{id:"examples",type:"section",data:{title:"Examples:",body:D}}}i(
|
|
17
|
+
`)}}}}i(cD,"T");function fD(u){return!("commands"in u)||!u.commands?.length?void 0:{id:"commands",type:"section",data:{title:"Commands:",body:{type:"table",data:{tableData:u.commands.map(e=>[e.options.name,e.options.help?e.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}i(fD,"_$1");function FD(u){if(!(!u.flags||Object.keys(u.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:iD(u.flags),indentBody:0}}}i(FD,"k");function pD(u){const{help:e}=u;if(!e||!e.examples||e.examples.length===0)return;let{examples:D}=e;if(Array.isArray(D)&&(D=D.join(`
|
|
18
|
+
`)),D)return{id:"examples",type:"section",data:{title:"Examples:",body:D}}}i(pD,"F");function CD(u){if(!("alias"in u)||!u.alias)return;const{alias:e}=u;return{id:"aliases",type:"section",data:{title:"Aliases:",body:Array.isArray(e)?e.join(", "):e}}}i(CD,"H$1");const dD=i(u=>[aD,lD,cD,fD,FD,pD,CD].map(e=>e(u)).filter(Boolean),"U"),ED=ze.WriteStream.prototype.hasColors();let hD=class{static{i(this,"J")}text(e){return e}bold(e){return ED?`\x1B[1m${e}\x1B[22m`:e.toLocaleUpperCase()}indentText({text:e,spaces:D}){return e.replace(/^/gm," ".repeat(D))}heading(e){return this.bold(e)}section({title:e,body:D,indentBody:t=2}){return`${(e?`${this.heading(e)}
|
|
19
19
|
`:"")+(D?this.indentText({text:this.render(D),spaces:t}):"")}
|
|
20
20
|
`}table({tableData:e,tableOptions:D,tableBreakpoints:t}){return eD(e.map(n=>n.map(r=>this.render(r))),t?nD(t):D)}flagParameter(e){return e===Boolean?"":e===String?"<string>":e===Number?"<number>":Array.isArray(e)?this.flagParameter(e[0]):"<value>"}flagOperator(e){return" "}flagName(e){const{flag:D,flagFormatted:t,aliasesEnabled:n,aliasFormatted:r}=e;let o="";if(r?o+=`${r}, `:n&&(o+=" "),o+=t,"placeholder"in D&&typeof D.placeholder=="string")o+=`${this.flagOperator(e)}${D.placeholder}`;else{const s=this.flagParameter("type"in D?D.type:D);s&&(o+=`${this.flagOperator(e)}${s}`)}return o}flagDefault(e){return JSON.stringify(e)}flagDescription({flag:e}){let D="description"in e?e.description??"":"";if("default"in e){let{default:t}=e;typeof t=="function"&&(t=t()),t&&(D+=` (default: ${this.flagDefault(t)})`)}return D}render(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(D=>this.render(D)).join(`
|
|
21
|
-
`);if("type"in e&&this[e.type]){const D=this[e.type];if(typeof D=="function")return D.call(this,e.data)}throw new Error(`Invalid node type: ${JSON.stringify(e)}`)}};const oe=i(u=>u.length>0&&!u.includes(" "),"y"),{stringify:T}=JSON,mD=/[|\\{}()[\]^$+*?.]/;function Eu(u){const e=[];let D,t;for(const n of u){if(t)throw new Error(`Invalid parameter: Spread parameter ${T(t)} must be last`);const r=n[0],o=n[n.length-1];let s;if(r==="<"&&o===">"&&(s=!0,D))throw new Error(`Invalid parameter: Required parameter ${T(n)} cannot come after optional parameter ${T(D)}`);if(r==="["&&o==="]"&&(s=!1,D=n),s===void 0)throw new Error(`Invalid parameter: ${T(n)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let a=n.slice(1,-1);const l=a.slice(-3)==="...";l&&(t=n,a=a.slice(0,-3));const
|
|
22
|
-
`),t(),process.exit(1);u[a]=l}}i(hu,"b");function gD(u){return u===void 0||u!==!1}i(gD,"W$1");function se(u,e,D,t){const n={...e.flags},r=e.version;r&&(n.version={type:Boolean,description:"Show version"});const{help:o}=e,s=gD(o);s&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const a=At(n,t,{ignore:e.ignoreArgv}),l=i(()=>{console.log(e.version)},"f");if(r&&a.flags.version===!0)return l(),process.exit(0);const
|
|
23
|
-
`),{code:o.toString(),map:t.sourcemap?o.generateMap({hires:!0}):void 0}}},"renderChunk"),writeBundle:i(async(e,D)=>{const t=e.entryFileNames,n=Object.values(D).map(async r=>{const o=r;if(o.isEntry&&o.facadeModuleId){const s=`./${h.posix.join(e.dir,t(o))}`;await S.promises.chmod(s,493)}});await Promise.all(n)},"writeBundle")}),"patchBinary"),fe=i(()=>{const u=/\.(?:[mc]?js|jsx)$/;return{name:"resolve-typescript-mjs-cjs",resolveId(e,D,t){return u.test(e)&&D?this.resolve(e.replace(/js(x?)$/,"ts$1"),D,t):null}}},"resolveTypescriptMjsCts"),Fe=i(u=>u!==null&&typeof u=="object","A"),W=i((u,e)=>Object.assign(new Error(`[${u}]: ${e}`),{code:u}),"a"),
|
|
24
|
-
`;break;case 114:
|
|
25
|
-
`),s++,l=t,o=14;switch(
|
|
26
|
-
`+" ".repeat(e)),new Array(
|
|
27
|
-
`+" ".repeat(e)),new Array(
|
|
28
|
-
`+" ".repeat(e)),new Array(
|
|
29
|
-
`+" ".repeat(e));var ru;(function(u){u.DEFAULT={allowTrailingComma:!1}})(ru||(ru={}));function me(u,e=[],D=ru.DEFAULT){let t=null,n=[];const r=[];function o(s){Array.isArray(n)?n.push(s):t!==null&&(n[t]=s)}return i(o,"u"),f(o,"onValue"),ge(u,{onObjectBegin:f(()=>{const s={};o(s),r.push(n),n=s,t=null},"onObjectBegin"),onObjectProperty:f(s=>{t=s},"onObjectProperty"),onObjectEnd:f(()=>{n=r.pop()},"onObjectEnd"),onArrayBegin:f(()=>{const s=[];o(s),r.push(n),n=s,t=null},"onArrayBegin"),onArrayEnd:f(()=>{n=r.pop()},"onArrayEnd"),onLiteralValue:o,onError:f((s,a,l)=>{e.push({error:s,offset:a,length:l})},"onError")},D),n[0]}i(me,"ye"),f(me,"parse$1");function ge(u,e,D=ru.DEFAULT){const t=Ee(u,!1),n=[];function r(A){return A?()=>A(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}i(r,"i"),f(r,"toNoArgVisit");function o(A){return A?()=>A(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>n.slice()):()=>!0}i(o,"u"),f(o,"toNoArgVisitWithPath");function s(A){return A?v=>A(v,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}i(s,"f"),f(s,"toOneArgVisit");function a(A){return A?v=>A(v,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>n.slice()):()=>!0}i(a,"r"),f(a,"toOneArgVisitWithPath");const l=o(e.onObjectBegin),C=a(e.onObjectProperty),F=r(e.onObjectEnd),c=o(e.onArrayBegin),E=r(e.onArrayEnd),d=a(e.onLiteralValue),m=s(e.onSeparator),y=r(e.onComment),j=s(e.onError),$=D&&D.disallowComments,p=D&&D.allowTrailingComma;function B(){for(;;){const A=t.scan();switch(t.getTokenError()){case 4:g(14);break;case 5:g(15);break;case 3:g(13);break;case 1:$||g(11);break;case 2:g(12);break;case 6:g(16);break}switch(A){case 12:case 13:$?g(10):y();break;case 16:g(1);break;case 15:case 14:break;default:return A}}}i(B,"k"),f(B,"scanNext");function g(A,v=[],Lu=[]){if(j(A),v.length+Lu.length>0){let Y=t.getToken();for(;Y!==17;){if(v.indexOf(Y)!==-1){B();break}else if(Lu.indexOf(Y)!==-1)break;Y=B()}}}i(g,"m"),f(g,"handleError");function b(A){const v=t.getTokenValue();return A?d(v):(C(v),n.push(v)),B(),!0}i(b,"F"),f(b,"parseString");function w(){switch(t.getToken()){case 11:const A=t.getTokenValue();let v=Number(A);isNaN(v)&&(g(2),v=0),d(v);break;case 7:d(null);break;case 8:d(!0);break;case 9:d(!1);break;default:return!1}return B(),!0}i(w,"j"),f(w,"parseLiteral");function lu(){return t.getToken()!==10?(g(3,[],[2,5]),!1):(b(!1),t.getToken()===6?(m(":"),B(),Q()||g(4,[],[2,5])):g(5,[],[2,5]),n.pop(),!0)}i(lu,"S"),f(lu,"parseProperty");function Nu(){l(),B();let A=!1;for(;t.getToken()!==2&&t.getToken()!==17;){if(t.getToken()===5){if(A||g(4,[],[]),m(","),B(),t.getToken()===2&&p)break}else A&&g(6,[],[]);lu()||g(4,[],[2,5]),A=!0}return F(),t.getToken()!==2?g(7,[2],[]):B(),!0}i(Nu,"R"),f(Nu,"parseObject");function Ru(){c(),B();let A=!0,v=!1;for(;t.getToken()!==4&&t.getToken()!==17;){if(t.getToken()===5){if(v||g(4,[],[]),m(","),B(),t.getToken()===4&&p)break}else v&&g(6,[],[]);A?(n.push(0),A=!1):n[n.length-1]++,Q()||g(4,[],[4,5]),v=!0}return E(),A||n.pop(),t.getToken()!==4?g(8,[4],[]):B(),!0}i(Ru,"a"),f(Ru,"parseArray");function Q(){switch(t.getToken()){case 3:return Ru();case 1:return Nu();case 10:return b(!0);default:return w()}}return i(Q,"U"),f(Q,"parseValue"),B(),t.getToken()===17?D.allowEmptyContent?!0:(g(4,[],[]),!1):Q()?(t.getToken()!==17&&g(9,[],[]),!0):(g(4,[],[]),!1)}i(ge,"Fe"),f(ge,"visit");var Be;(function(u){u[u.None=0]="None",u[u.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",u[u.UnexpectedEndOfString=2]="UnexpectedEndOfString",u[u.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",u[u.InvalidUnicode=4]="InvalidUnicode",u[u.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",u[u.InvalidCharacter=6]="InvalidCharacter"})(Be||(Be={}));var Ae;(function(u){u[u.OpenBraceToken=1]="OpenBraceToken",u[u.CloseBraceToken=2]="CloseBraceToken",u[u.OpenBracketToken=3]="OpenBracketToken",u[u.CloseBracketToken=4]="CloseBracketToken",u[u.CommaToken=5]="CommaToken",u[u.ColonToken=6]="ColonToken",u[u.NullKeyword=7]="NullKeyword",u[u.TrueKeyword=8]="TrueKeyword",u[u.FalseKeyword=9]="FalseKeyword",u[u.StringLiteral=10]="StringLiteral",u[u.NumericLiteral=11]="NumericLiteral",u[u.LineCommentTrivia=12]="LineCommentTrivia",u[u.BlockCommentTrivia=13]="BlockCommentTrivia",u[u.LineBreakTrivia=14]="LineBreakTrivia",u[u.Trivia=15]="Trivia",u[u.Unknown=16]="Unknown",u[u.EOF=17]="EOF"})(Ae||(Ae={}));const QD=me;var ye;(function(u){u[u.InvalidSymbol=1]="InvalidSymbol",u[u.InvalidNumberFormat=2]="InvalidNumberFormat",u[u.PropertyNameExpected=3]="PropertyNameExpected",u[u.ValueExpected=4]="ValueExpected",u[u.ColonExpected=5]="ColonExpected",u[u.CommaExpected=6]="CommaExpected",u[u.CloseBraceExpected=7]="CloseBraceExpected",u[u.CloseBracketExpected=8]="CloseBracketExpected",u[u.EndOfFileExpected=9]="EndOfFileExpected",u[u.InvalidCommentToken=10]="InvalidCommentToken",u[u.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",u[u.UnexpectedEndOfString=12]="UnexpectedEndOfString",u[u.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",u[u.InvalidUnicode=14]="InvalidUnicode",u[u.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",u[u.InvalidCharacter=16]="InvalidCharacter"})(ye||(ye={}));const be=f((u,e)=>QD(ZD(e,u,"utf8")),"readJsonc"),ku=Symbol("implicitBaseUrl"),_="${configDir}",YD=f(()=>{const{findPnpApi:u}=ut;return u&&u(process.cwd())},"getPnpApi"),ju=f((u,e,D,t)=>{const n=`resolveFromPackageJsonPath:${u}:${e}:${D}`;if(t!=null&&t.has(n))return t.get(n);const r=be(u,t);if(!r)return;let o=e||"tsconfig.json";if(!D&&r.exports)try{const[s]=KD(r.exports,e,["require","types"]);o=s}catch{return!1}else!e&&r.tsconfig&&(o=r.tsconfig);return o=h.join(u,"..",o),t?.set(n,o),o},"resolveFromPackageJsonPath"),Ou="package.json",Tu="tsconfig.json",XD=f((u,e,D)=>{let t=u;if(u===".."&&(t=h.join(t,Tu)),u[0]==="."&&(t=h.resolve(e,t)),h.isAbsolute(t)){if(O(D,t)){if(Du(D,t).isFile())return t}else if(!t.endsWith(".json")){const E=`${t}.json`;if(O(D,E))return E}return}const[n,...r]=u.split("/"),o=n[0]==="@"?`${n}/${r.shift()}`:n,s=r.join("/"),a=YD();if(a){const{resolveRequest:E}=a;try{if(o===u){const d=E(h.join(o,Ou),e);if(d){const m=ju(d,s,!1,D);if(m&&O(D,m))return m}}else{let d;try{d=E(u,e,{extensions:[".json"]})}catch{d=E(h.join(u,Tu),e)}if(d)return d}}catch{}}const l=de(h.resolve(e),h.join("node_modules",o),D);if(!l||!Du(D,l).isDirectory())return;const C=h.join(l,Ou);if(O(D,C)){const E=ju(C,s,!1,D);if(E===!1)return;if(E&&O(D,E)&&Du(D,E).isFile())return E}const F=h.join(l,s),c=F.endsWith(".json");if(!c){const E=`${F}.json`;if(O(D,E))return E}if(O(D,F)){if(Du(D,F).isDirectory()){const E=h.join(F,Ou);if(O(D,E)){const m=ju(E,"",!0,D);if(m&&O(D,m))return m}const d=h.join(F,Tu);if(O(D,d))return d}else if(c)return F}},"resolveExtendsPath"),Su=f((u,e)=>xu(h.relative(u,e)),"pathRelative"),we=["files","include","exclude"],un=f((u,e,D,t)=>{const n=XD(u,e,t);if(!n)throw new Error(`File '${u}' not found.`);if(D.has(n))throw new Error(`Circularity detected while resolving configuration: ${n}`);D.add(n);const r=h.dirname(n),o=ve(n,t,D);delete o.references;const{compilerOptions:s}=o;if(s){const{baseUrl:a}=s;a&&!a.startsWith(_)&&(s.baseUrl=k(h.relative(e,h.join(r,a)))||"./");let{outDir:l}=s;l&&(l.startsWith(_)||(l=h.relative(e,h.join(r,l))),s.outDir=k(l)||"./")}for(const a of we){const l=o[a];l&&(o[a]=l.map(C=>C.startsWith(_)?C:k(h.relative(e,h.join(r,C)))))}return o},"resolveExtends"),en=["outDir","declarationDir"],ve=f((u,e,D=new Set)=>{let t;try{t=be(u,e)||{}}catch{throw new Error(`Cannot resolve tsconfig at path: ${u}`)}if(typeof t!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${u}`);const n=h.dirname(u);if(t.compilerOptions){const{compilerOptions:r}=t;r.paths&&!r.baseUrl&&(r[ku]=n)}if(t.extends){const r=Array.isArray(t.extends)?t.extends:[t.extends];delete t.extends;for(const o of r.reverse()){const s=un(o,n,new Set(D),e),a={...s,...t,compilerOptions:{...s.compilerOptions,...t.compilerOptions}};s.watchOptions&&(a.watchOptions={...s.watchOptions,...t.watchOptions}),t=a}}if(t.compilerOptions){const{compilerOptions:r}=t,o=["baseUrl","rootDir"];for(const s of o){const a=r[s];if(a&&!a.startsWith(_)){const l=h.resolve(n,a),C=Su(n,l);r[s]=C}}for(const s of en){let a=r[s];a&&(Array.isArray(t.exclude)||(t.exclude=[]),t.exclude.includes(a)||t.exclude.push(a),a.startsWith(_)||(a=xu(a)),r[s]=a)}}else t.compilerOptions={};if(t.include?(t.include=t.include.map(k),t.files&&delete t.files):t.files&&(t.files=t.files.map(r=>r.startsWith(_)?r:xu(r))),t.watchOptions){const{watchOptions:r}=t;r.excludeDirectories&&(r.excludeDirectories=r.excludeDirectories.map(o=>k(h.resolve(n,o))))}return t},"_parseTsconfig"),ou=f((u,e)=>{if(u.startsWith(_))return k(h.join(e,u.slice(_.length)))},"interpolateConfigDir"),tn=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],Dn=f(u=>{if(u.strict){const e=["noImplicitAny","noImplicitThis","strictNullChecks","strictFunctionTypes","strictBindCallApply","strictPropertyInitialization","strictBuiltinIteratorReturn","alwaysStrict","useUnknownInCatchVariables"];for(const D of e)u[D]===void 0&&(u[D]=!0)}if(u.target){let e=u.target.toLowerCase();e==="es2015"&&(e="es6"),u.target=e,e==="esnext"&&(u.module!=null||(u.module="es6"),u.moduleResolution!=null||(u.moduleResolution="classic"),u.useDefineForClassFields!=null||(u.useDefineForClassFields=!0)),(e==="es6"||e==="es2016"||e==="es2017"||e==="es2018"||e==="es2019"||e==="es2020"||e==="es2021"||e==="es2022"||e==="es2023"||e==="es2024")&&(u.module!=null||(u.module="es6"),u.moduleResolution!=null||(u.moduleResolution="classic")),(e==="es2022"||e==="es2023"||e==="es2024")&&(u.useDefineForClassFields!=null||(u.useDefineForClassFields=!0))}if(u.module){let e=u.module.toLowerCase();e==="es2015"&&(e="es6"),u.module=e,(e==="es6"||e==="es2020"||e==="es2022"||e==="esnext"||e==="none"||e==="system"||e==="umd"||e==="amd")&&(u.moduleResolution!=null||(u.moduleResolution="classic")),e==="system"&&(u.allowSyntheticDefaultImports!=null||(u.allowSyntheticDefaultImports=!0)),(e==="node16"||e==="nodenext"||e==="preserve")&&(u.esModuleInterop!=null||(u.esModuleInterop=!0),u.allowSyntheticDefaultImports!=null||(u.allowSyntheticDefaultImports=!0)),(e==="node16"||e==="nodenext")&&(u.moduleDetection!=null||(u.moduleDetection="force"),u.useDefineForClassFields!=null||(u.useDefineForClassFields=!0)),e==="node16"&&(u.target!=null||(u.target="es2022"),u.moduleResolution!=null||(u.moduleResolution="node16")),e==="nodenext"&&(u.target!=null||(u.target="esnext"),u.moduleResolution!=null||(u.moduleResolution="nodenext")),e==="preserve"&&(u.moduleResolution!=null||(u.moduleResolution="bundler"))}if(u.moduleResolution){let e=u.moduleResolution.toLowerCase();e==="node"&&(e="node10"),u.moduleResolution=e,(e==="node16"||e==="nodenext"||e==="bundler")&&(u.resolvePackageJsonExports!=null||(u.resolvePackageJsonExports=!0),u.resolvePackageJsonImports!=null||(u.resolvePackageJsonImports=!0)),e==="bundler"&&(u.allowSyntheticDefaultImports!=null||(u.allowSyntheticDefaultImports=!0),u.resolveJsonModule!=null||(u.resolveJsonModule=!0))}u.esModuleInterop&&(u.allowSyntheticDefaultImports!=null||(u.allowSyntheticDefaultImports=!0)),u.verbatimModuleSyntax&&(u.isolatedModules!=null||(u.isolatedModules=!0),u.preserveConstEnums!=null||(u.preserveConstEnums=!0)),u.isolatedModules&&(u.preserveConstEnums!=null||(u.preserveConstEnums=!0))},"normalizeCompilerOptions"),$e=f((u,e=new Map)=>{const D=h.resolve(u),t=ve(D,e),n=h.dirname(D),{compilerOptions:r}=t;if(r){for(const s of tn){const a=r[s];if(a){const l=ou(a,n);r[s]=l?Su(n,l):a}}for(const s of["rootDirs","typeRoots"]){const a=r[s];a&&(r[s]=a.map(l=>{const C=ou(l,n);return C?Su(n,C):l}))}const{paths:o}=r;if(o)for(const s of Object.keys(o))o[s]=o[s].map(a=>{var l;return(l=ou(a,n))!=null?l:a});Dn(r)}for(const o of we){const s=t[o];s&&(t[o]=s.map(a=>{var l;return(l=ou(a,n))!=null?l:a}))}return t},"parseTsconfig"),nn=f((u=process.cwd(),e="tsconfig.json",D=new Map)=>{const t=de(k(u),e,D);if(!t)return null;const n=$e(t,D);return{path:t,config:n}},"getTsconfig"),rn=/\*/g,xe=f((u,e)=>{const D=u.match(rn);if(D&&D.length>1)throw new Error(e)},"assertStarCount"),on=f(u=>{if(u.includes("*")){const[e,D]=u.split("*");return{prefix:e,suffix:D}}return u},"parsePattern"),sn=f(({prefix:u,suffix:e},D)=>D.startsWith(u)&&D.endsWith(e),"isPatternMatch"),an=f((u,e,D)=>Object.entries(u).map(([t,n])=>(xe(t,`Pattern '${t}' can have at most one '*' character.`),{pattern:on(t),substitutions:n.map(r=>{if(xe(r,`Substitution '${r}' in pattern '${t}' can have at most one '*' character.`),!e&&!$u.test(r))throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return h.resolve(D,r)})})),"parsePaths"),ln=f(u=>{const{compilerOptions:e}=u.config;if(!e)return null;const{baseUrl:D,paths:t}=e;if(!D&&!t)return null;const n=ku in e&&e[ku],r=h.resolve(h.dirname(u.path),D||n||"."),o=t?an(t,D,r):[];return s=>{if($u.test(s))return[];const a=[];for(const c of o){if(c.pattern===s)return c.substitutions.map(k);typeof c.pattern!="string"&&a.push(c)}let l,C=-1;for(const c of a)sn(c.pattern,s)&&c.pattern.prefix.length>C&&(C=c.pattern.prefix.length,l=c);if(!l)return D?[k(h.join(r,s))]:[];const F=s.slice(l.pattern.prefix.length,s.length-l.pattern.suffix.length);return l.substitutions.map(c=>k(c.replace("*",F)))}},"createPathsMatcher"),ke=f(u=>{let e="";for(let D=0;D<u.length;D+=1){const t=u[D],n=t.toUpperCase();e+=t===n?t.toLowerCase():n}return e},"s"),cn=65,fn=97,Fn=f(()=>Math.floor(Math.random()*26),"m"),Cn=f(u=>Array.from({length:u},()=>String.fromCodePoint(Fn()+(Math.random()>.5?cn:fn))).join(""),"S"),pn=f((u=tt)=>{const e=process.execPath;if(u.existsSync(e))return!u.existsSync(ke(e));const D=`/${Cn(10)}`;u.writeFileSync(D,"");const t=!u.existsSync(ke(D));return u.unlinkSync(D),t},"l"),{join:su}=h.posix,Pu={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},dn=f(u=>{const e=[...Pu.ts],D=[...Pu.cts],t=[...Pu.mts];return u!=null&&u.allowJs&&(e.push(".js",".jsx"),D.push(".cjs"),t.push(".mjs")),[...e,...D,...t]},"getSupportedExtensions"),En=f(u=>{const e=[];if(!u)return e;const{outDir:D,declarationDir:t}=u;return D&&e.push(D),t&&e.push(t),e},"getDefaultExcludeSpec"),je=f(u=>u.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),hn=["node_modules","bower_components","jspm_packages"],_u=`(?!(${hn.join("|")})(/|$))`,mn=/(?:^|\/)[^.*?]+$/,Oe="**/*",iu="[^/]",Iu="[^./]",Te=process.platform==="win32";f(({config:u,path:e},D=pn())=>{if("extends"in u)throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");if(!h.isAbsolute(e))throw new Error("The tsconfig path must be absolute");Te&&(e=k(e));const t=h.dirname(e),{files:n,include:r,exclude:o,compilerOptions:s}=u,a=n?.map(d=>su(t,d)),l=dn(s),C=D?"":"i",F=(o||En(s)).map(d=>{const m=su(t,d),y=je(m).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${iu}*`).replaceAll(String.raw`\?`,iu);return new RegExp(`^${y}($|/)`,C)}),c=n||r?r:[Oe],E=c?c.map(d=>{let m=su(t,d);mn.test(m)&&(m=su(m,Oe));const y=je(m).replaceAll(String.raw`/\*\*`,`(/${_u}${Iu}${iu}*)*?`).replaceAll(/(\/)?\\\*/g,(j,$)=>{const p=`(${Iu}|(\\.(?!min\\.js$))?)*`;return $?`/${_u}${Iu}${p}`:p}).replaceAll(/(\/)?\\\?/g,(j,$)=>{const p=iu;return $?`/${_u}${p}`:p});return new RegExp(`^${y}$`,C)}):void 0;return d=>{if(!h.isAbsolute(d))throw new Error("filePath must be absolute");if(Te&&(d=k(d)),a!=null&&a.includes(d)||!(!l.some(m=>d.endsWith(m))||F.some(m=>m.test(d)))&&E&&E.some(m=>m.test(d)))return u}},"createFilesMatcher");const Se="resolve-tsconfig-paths",gn=i(u=>u[0]===".","isRelative"),Bn=i(u=>u[0]==="/"||/^[\s\S]:/.test(u),"isAbsolute"),Pe=i(u=>{const e=ln(u);return e?{name:Se,async resolveId(D,t,n){if(!t||gn(D)||Bn(D)||D.startsWith("\0"))return null;const r=e(D);for(const o of r){const s=await this.resolve(o,t,{skipSelf:!0,...n});if(s)return s}return null}}:{name:Se}},"resolveTsconfigPaths"),_e=/^#!.*/,An=i(()=>({name:"strip-hashbang",transform:i(u=>{if(!_e.test(u))return null;const e=new cu(u);return e.replace(_e,""),{code:e.toString(),map:e.generateMap({hires:!0})}},"transform")}),"stripHashbang");class yn{static{i(this,"WalkerBase")}constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:i(()=>this.should_skip=!0,"skip"),remove:i(()=>this.should_remove=!0,"remove"),replace:i(e=>this.replacement=e,"replace")}}replace(e,D,t,n){e&&D&&(t!=null?e[D][t]=n:e[D]=n)}remove(e,D,t){e&&D&&(t!=null?e[D].splice(t,1):delete e[D])}}class bn extends yn{static{i(this,"SyncWalker")}constructor(e,D){super(),this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:i(()=>this.should_skip=!0,"skip"),remove:i(()=>this.should_remove=!0,"remove"),replace:i(t=>this.replacement=t,"replace")},this.enter=e,this.leave=D}visit(e,D,t,n){if(e){if(this.enter){const o=this.should_skip,s=this.should_remove,a=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,e,D,t,n),this.replacement&&(e=this.replacement,this.replace(D,t,n,e)),this.should_remove&&this.remove(D,t,n);const l=this.should_skip,C=this.should_remove;if(this.should_skip=o,this.should_remove=s,this.replacement=a,l)return e;if(C)return null}let r;for(r in e){const o=e[r];if(o&&typeof o=="object")if(Array.isArray(o)){const s=o;for(let a=0;a<s.length;a+=1){const l=s[a];Ie(l)&&(this.visit(l,e,r,a)||a--)}}else Ie(o)&&this.visit(o,e,r,null)}if(this.leave){const o=this.replacement,s=this.should_remove;this.replacement=null,this.should_remove=!1,this.leave.call(this.context,e,D,t,n),this.replacement&&(e=this.replacement,this.replace(D,t,n,e)),this.should_remove&&this.remove(D,t,n);const a=this.should_remove;if(this.replacement=o,this.should_remove=s,a)return null}}return e}}function Ie(u){return u!==null&&typeof u=="object"&&"type"in u&&typeof u.type=="string"}i(Ie,"isNode");function wn(u,{enter:e,leave:D}){return new bn(e,D).visit(u,null)}i(wn,"walk");const vn=i(()=>{const u='import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);';return{name:"esmInjectCreateRequire",renderChunk(e,D,t){if(t.format!=="es"||!/\brequire\b/.test(e))return null;const n=this.parse(e);let r=Dt(n,"scope"),o=!1;if(wn(n,{enter(a,l){a.scope&&(r=a.scope),!(a.type!=="Identifier"||a.name!=="require")&&(l?.type==="Property"&&l.key===a&&!l.compute||r.contains("require")||(o=!0,this.skip()))},leave:i(a=>{a.scope&&(r=r.parent)},"leave")}),!o)return null;const s=new cu(e);return s.prepend(u),{code:s.toString(),map:s.generateMap({hires:!0})}}}},"esmInjectCreateRequire"),$n=i((u,e,D,t,n)=>{const r={target:u.target,tsconfigRaw:n?.config,define:D};return{input:[],preserveEntrySignatures:"strict",plugins:[ce(u),...n?[Pe(n)]:[],fe(),Qe({entries:e}),Ke({extensions:[".mjs",".js",".ts",".jsx",".tsx",".json"],exportConditions:u.exportCondition}),An(),Ze(),ID(r),He({ignoreDynamicRequires:!0,extensions:[".js",".ts",".jsx",".tsx"],transformMixedEsModules:!0}),Ye({warnOnError:!0}),vn(),...u.minify?[RD(r)]:[],LD(t)],output:[],external:[]}},"getPkgConfig"),xn=i(async(u,e)=>{const[D,t]=await Promise.all([import("./rollup-plugin-dts-CKfQVads.mjs"),import("./local-typescript-loader-CSvrvK-x.mjs")]);return{input:[],preserveEntrySignatures:"strict",plugins:[ce(u),...e?[Pe(e)]:[],fe(),D.default({respectExternal:!0,compilerOptions:{composite:!1,preserveSymlinks:!1,module:t.default.ModuleKind.Preserve,moduleResolution:t.default.ModuleResolutionKind.Bundler},tsconfig:e?.path})],output:[],external:[]}},"getDtsConfig"),Ne=i(u=>u.split("?")[0],"stripQuery"),kn=i(async(u,e,D,t,n,r,o)=>{const s=D.filter(({exportEntry:c})=>c.isExecutable).map(({exportEntry:c})=>c.outputPath),a=Object.create(null),l=Object.fromEntries(t.env.map(({key:c,value:E})=>[`process.env.${c}`,JSON.stringify(E)])),C=le(r,n),F=le(r,n,!0);for(const{input:c,srcExtension:E,distExtension:d,exportEntry:m}of D){if(m.type==="types"){let B=a.dts;B||(B=await xn(t,o),B.external=F,a.dts=B),B.input.includes(c)||B.input.push(c),B.output.push({dir:e,entryFileNames:i(g=>S.realpathSync.native(Ne(g.facadeModuleId)).slice(u.length,-E.length)+d,"entryFileNames"),exports:"auto",format:"esm"});continue}let y=a.pkg;y||(y=$n(t,n,l,s,o),y.external=C,a.pkg=y),y.input.includes(c)||y.input.push(c);const j=y.output,$=h.extname(m.outputPath),p=`${m.type}-${$}`;if(!j[p]){const B={dir:e,exports:"auto",format:m.type,chunkFileNames:`[name]-[hash]${$}`,sourcemap:t.sourcemap,entryFileNames:i(g=>{const w=S.realpathSync.native(Ne(g.facadeModuleId)).slice(u.length);return h.posix.join(h.dirname(w),g.name)+d},"entryFileNames")};j.push(B),j[p]=B}}return Object.values(a)},"getRollupConfigs"),jn=i(u=>{if(!u)return nn();const e=h.resolve(u),D=$e(e);return{path:e,config:D}},"getTsconfig");let L=!0;const z=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let H=0;if(z.process&&z.process.env&&z.process.stdout){const{FORCE_COLOR:u,NODE_DISABLE_COLORS:e,NO_COLOR:D,TERM:t,COLORTERM:n}=z.process.env;e||D||u==="0"?L=!1:u==="1"||u==="2"||u==="3"?L=!0:t==="dumb"?L=!1:"CI"in z.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(r=>r in z.process.env)?L=!0:L=process.stdout.isTTY,L&&(process.platform==="win32"||n&&(n==="truecolor"||n==="24bit")?H=3:t&&(t.endsWith("-256color")||t.endsWith("256"))?H=2:H=1)}let Re={enabled:L,supportLevel:H};function On(u,e,D=1){const t=`\x1B[${u}m`,n=`\x1B[${e}m`,r=new RegExp(`\\x1b\\[${e}m`,"g");return o=>Re.enabled&&Re.supportLevel>=D?t+(""+o).replace(r,t)+n:""+o}i(On,"kolorist");const Tn=On(90,39),Sn=i(()=>new Date().toLocaleTimeString(),"currentTime"),au=i((...u)=>console.log(`[${Tn(Sn())}]`,...u),"log"),Pn=i(async u=>{await mu(u)&&await S.promises.rm(u,{recursive:!0,force:!0})},"cleanDist"),{stringify:Le}=JSON,I=AD({name:"pkgroll",version:yD,flags:{input:{type:[kD],alias:"i",description:"Dist paths for source files to bundle (Only use if you cannot use package.json entries)"},src:{type:String,description:"Source directory",default:"./src"},dist:{type:String,description:"Distribution directory",default:"./dist"},minify:{type:Boolean,description:"Minify output",alias:"m",default:!1},target:{type:[String],default:[`node${process.versions.node}`],description:"Environments to support. `target` in tsconfig.json is automatically added. Defaults to the current Node.js version.",alias:"t"},tsconfig:{type:String,description:"Custom tsconfig.json file path",alias:"p"},watch:{type:Boolean,description:"Watch mode",alias:"w",default:!1},env:{type:[u=>{const[e,D]=u.split("=");return{key:e,value:D}}],description:"Compile-time environment variables (eg. --env.NODE_ENV=production)"},exportCondition:{type:[String],description:"Export conditions for resolving dependency export and import maps (eg. --export-condition=node)"},sourcemap:{type:i(u=>{if(u==="")return!0;if(u==="inline")return u;throw new Error(`Invalid sourcemap option ${Le(u)}`)},"type"),description:"Sourcemap generation. Provide `inline` option for inline sourcemap (eg. --sourcemap, --sourcemap=inline)"},cleanDist:{type:Boolean,description:"Clean dist before bundling",default:!1}},help:{description:"Minimalistic package bundler",render:i((u,e)=>(e.flagOperator=D=>D.name==="env"?".key=":" ",e.render(u)),"render")}}),Me=process.cwd(),We=G(I.flags.src,!0),Z=G(I.flags.dist,!0),Ue=jn(I.flags.tsconfig),Ve=Ue?.config.compilerOptions?.target;Ve&&I.flags.target.push(Ve),(async()=>{const u=await bD(Me);let e=xD(u);const D=I.flags.input;if(D.length>0){const r=u.type??"commonjs";e.push(...D.map(o=>(o.type||(o.type=r),o)))}if(e=e.filter(r=>{const o=r.outputPath.startsWith(Z);return o||console.warn(`Ignoring entry outside of ${Z} directory: package.json#${r.from}=${Le(r.outputPath)}`),o}),e.length===0)throw new Error("No export entries found in package.json");const t=await Promise.all(e.map(async r=>({...await PD(r,We,Z),exportEntry:r}))),n=await kn(G(S.realpathSync.native(We),!0),Z,t,I.flags,jD(u,Me),u,Ue);I.flags.cleanDist&&await Pn(Z),I.flags.watch?(au("Watch initialized"),n.map(async r=>{Je(r).on("event",async s=>{s.code==="BUNDLE_START"&&au("Building",...Array.isArray(s.input)?s.input:[s.input]),s.code==="BUNDLE_END"&&(await Promise.all(r.output.map(a=>s.result.write(a))),au("Built",...Array.isArray(s.input)?s.input:[s.input])),s.code==="ERROR"&&au("Error:",s.error.message)})})):await Promise.all(n.map(async r=>{const o=await Ge(r);return Promise.all(r.output.map(s=>o.write(s)))}))})().catch(u=>{console.error(u),process.exit(1)});
|
|
21
|
+
`);if("type"in e&&this[e.type]){const D=this[e.type];if(typeof D=="function")return D.call(this,e.data)}throw new Error(`Invalid node type: ${JSON.stringify(e)}`)}};const oe=i(u=>u.length>0&&!u.includes(" "),"y"),{stringify:T}=JSON,mD=/[|\\{}()[\]^$+*?.]/;function Eu(u){const e=[];let D,t;for(const n of u){if(t)throw new Error(`Invalid parameter: Spread parameter ${T(t)} must be last`);const r=n[0],o=n[n.length-1];let s;if(r==="<"&&o===">"&&(s=!0,D))throw new Error(`Invalid parameter: Required parameter ${T(n)} cannot come after optional parameter ${T(D)}`);if(r==="["&&o==="]"&&(s=!1,D=n),s===void 0)throw new Error(`Invalid parameter: ${T(n)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let a=n.slice(1,-1);const l=a.slice(-3)==="...";l&&(t=n,a=a.slice(0,-3));const p=a.match(mD);if(p)throw new Error(`Invalid parameter: ${T(n)}. Invalid character found ${T(p[0])}`);e.push({name:a,required:s,spread:l})}return e}i(Eu,"w$1");function hu(u,e,D,t){for(let n=0;n<e.length;n+=1){const{name:r,required:o,spread:s}=e[n],a=rD(r);if(a in u)throw new Error(`Invalid parameter: ${T(r)} is used more than once.`);const l=s?D.slice(n):D[n];if(s&&(n=e.length),o&&(!l||s&&l.length===0))return console.error(`Error: Missing required parameter ${T(r)}
|
|
22
|
+
`),t(),process.exit(1);u[a]=l}}i(hu,"b");function gD(u){return u===void 0||u!==!1}i(gD,"W$1");function se(u,e,D,t){const n={...e.flags},r=e.version;r&&(n.version={type:Boolean,description:"Show version"});const{help:o}=e,s=gD(o);s&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const a=At(n,t,{ignore:e.ignoreArgv}),l=i(()=>{console.log(e.version)},"f");if(r&&a.flags.version===!0)return l(),process.exit(0);const p=new hD,F=s&&o?.render?o.render:d=>p.render(d),c=i(d=>{const m=dD({...e,...d?{help:d}:{},flags:n});console.log(F(m,p))},"p");if(s&&a.flags.help===!0)return c(),process.exit(0);if(e.parameters){let{parameters:d}=e,m=a._;const y=d.indexOf("--"),j=d.slice(y+1),$=Object.create(null);if(y>-1&&j.length>0){d=d.slice(0,y);const C=a._["--"];m=m.slice(0,-C.length||void 0),hu($,Eu(d),m,c),hu($,Eu(j),C,c)}else hu($,Eu(d),m,c);Object.assign(a._,$)}const E={...a,showVersion:l,showHelp:c};return typeof D=="function"&&D(E),{command:u,...E}}i(se,"x$1");function BD(u,e){const D=new Map;for(const t of e){const n=[t.options.name],{alias:r}=t.options;r&&(Array.isArray(r)?n.push(...r):n.push(r));for(const o of n){if(D.has(o))throw new Error(`Duplicate command name found: ${T(o)}`);D.set(o,t)}}return D.get(u)}i(BD,"z$1");function AD(u,e,D=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!oe(u.name)))throw new Error(`Invalid script name: ${T(u.name)}`);const t=D[0];if(u.commands&&oe(t)){const n=BD(t,u.commands);if(n)return se(n.options.name,{...n.options,parent:u},n.callback,D.slice(1))}return se(void 0,u,e,D)}i(AD,"Z$1");var yD="2.12.0";const mu=i(u=>S.promises.access(u).then(()=>!0,()=>!1),"fsExists"),bD=i(async u=>{const e=h.join(u,"package.json");if(!await mu(e))throw new Error(`package.json not found at: ${e}`);const t=await S.promises.readFile(e,"utf8");try{return JSON.parse(t)}catch(n){throw new Error(`Cannot parse package.json: ${n.message}`)}},"readPackageJson"),wD=/^[/.]/,G=i((u,e)=>(!h.isAbsolute(u)&&!wD.test(u)&&(u=`./${u}`),e&&!u.endsWith("/")&&(u+="/"),u),"normalizePath"),vD=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,$D=new Set(["do","if","in","for","int","new","try","var","byte","case","char","else","enum","goto","long","null","this","true","void","with","break","catch","class","const","false","final","float","short","super","throw","while","delete","double","export","import","native","public","return","static","switch","throws","typeof","boolean","default","extends","finally","package","private","abstract","continue","debugger","function","volatile","interface","protected","transient","implements","instanceof","synchronized"]),gu=i(u=>!vD.test(u)||$D.has(u),"propertyNeedsQuotes"),P=i(u=>{if(u.endsWith(".mjs"))return"module";if(u.endsWith(".cjs"))return"commonjs";if(u.endsWith(".d.ts")||u.endsWith(".d.cts")||u.endsWith(".d.mts"))return"types"},"getFileType"),ie=i(u=>u.startsWith("."),"isPath"),Bu=i((u,e,D="exports")=>{if(u){if(typeof u=="string")return ie(u)?[{outputPath:u,type:P(u)||e,from:D}]:[];if(Array.isArray(u))return u.flatMap((t,n)=>{const r=`${D}[${n}]`;return typeof t=="string"?ie(t)?{outputPath:t,type:P(t)||e,from:r}:[]:Bu(t,e,r)});if(typeof u=="object")return Object.entries(u).flatMap(([t,n])=>{if(typeof n=="string"){const o=gu(t)?`["${t}"]`:`.${t}`,s={outputPath:n,from:`${D}${o}`};if(t==="require")return{...s,type:"commonjs"};if(t==="import")return{...s,type:P(n)||e};if(t==="types")return{...s,type:"types"};if(t==="node")return{...s,type:P(n)||e,platform:"node"};if(t==="default")return{...s,type:P(n)||e}}const r=gu(t)?`["${t}"]`:`.${t}`;return Bu(n,e,`${D}${r}`)})}return[]},"parseExportsMap"),M=i((u,e)=>{e.outputPath=G(e.outputPath);const{outputPath:D,type:t,platform:n}=e,r=u[D];if(r){if(r.type!==t)throw new Error(`Conflicting export types "${r.type}" & "${t}" found for ${D}`);if(r.platform!==n)throw new Error(`Conflicting export platforms "${r.platform}" & "${n}" found for ${D}`);Object.assign(r,e)}else u[D]=e},"addExportPath"),xD=i(u=>{const e={...u},{publishConfig:D}=e;if(D){const s=["bin","main","exports","types","module"];for(const a of s)D[a]&&(e[a]=D[a])}const t={},n=e.type??"commonjs",r=e.main;r&&M(t,{outputPath:r,type:P(r)??n,from:"main"}),e.module&&M(t,{outputPath:e.module,type:"module",from:"module"}),e.types&&M(t,{outputPath:e.types,type:"types",from:"types"});const{bin:o}=e;if(o)if(typeof o=="string")M(t,{outputPath:o,type:P(o)??n,isExecutable:!0,from:"bin"});else for(const[s,a]of Object.entries(o)){const l=gu(s)?`["${s}"]`:`.${s}`;M(t,{outputPath:a,type:P(a)??n,isExecutable:!0,from:`bin${l}`})}if(e.exports){const s=Bu(e.exports,n);for(const a of s)M(t,a)}return Object.values(t)},"getExportEntries"),kD=i(u=>{let e=!1;if(u.includes("=")){const[D,t]=u.split("=");u=t,e=D==="bin"||D==="binary"}return{outputPath:G(u),type:P(u),isExecutable:e,from:"cli"}},"parseCliInputFlag"),jD=i(({imports:u},e)=>{const D={};if(u)for(const t in u){if(t.startsWith("#"))continue;const n=u[t];typeof n=="string"&&(D[t]=h.join(e,n))}return D},"getAliases"),{stringify:OD}=JSON,TD=i(async(u,e)=>{for(const D of e){const t=u+D;if(await mu(t))return{extension:D,path:t}}},"tryExtensions"),ae={".d.ts":[".d.ts",".d.mts",".d.cts",".ts",".tsx",".mts",".cts"],".d.mts":[".d.mts",".d.ts",".d.cts",".ts",".tsx",".mts",".cts"],".d.cts":[".d.cts",".d.ts",".d.mts",".ts",".tsx",".mts",".cts"],".js":[".js",".ts",".tsx",".mts",".cts"],".mjs":[".mjs",".js",".cjs",".mts",".cts",".ts",".tsx"],".cjs":[".cjs",".js",".mjs",".mts",".cts",".ts",".tsx"]},SD=Object.keys(ae),PD=i(async(u,e,D)=>{const t=e+u.outputPath.slice(D.length);for(const n of SD)if(u.outputPath.endsWith(n)){const r=await TD(t.slice(0,-n.length),ae[n]);if(r)return{input:r.path,srcExtension:r.extension,distExtension:n}}throw new Error(`Could not find matching source file for export path ${OD(u.outputPath)}`)},"getSourcePath"),_D=["peerDependencies","dependencies","optionalDependencies"],Au="@types/",le=i((u,e,D=!1)=>{const t=[],{devDependencies:n}=u;for(const r of _D){const o=u[r];if(!o)continue;const s=Object.keys(o);for(const a of s)if(!(a in e))if(a.startsWith(Au)){if(D){let l=a.slice(Au.length);l.includes("__")&&(l=`@${l.replace("__","/")}`),t.push(l)}}else{if(n&&D){const l=Au+a.replace("@","").replace("/","__");n[l]&&!(l in o)&&console.warn(`Recommendation: "${l}" is externalized because "${a}" is in "${r}". Place "${l}" in "${r}" as well so users don't have missing types.`)}t.push(a)}}return t.flatMap(r=>[r,new RegExp(`^${r}/`)])},"getExternalDependencies"),ID=i(u=>{const e=Xe(/\.([cm]?[jt]s|[jt]sx)$/);return{name:"esbuild-transform",transform:i(async(D,t)=>{if(!e(t))return null;const n=await Mu(D,{...u,supported:{"import-meta":!0},loader:"default",sourcefile:t.replace(/\.[cm]ts/,".ts")});return{code:n.code,map:n.map||null}},"transform")}},"esbuildTransform"),ND=i(u=>{if(u==="es")return"esm";if(u==="cjs"||u==="iife")return u},"getEsbuildFormat"),RD=i(u=>({name:"esbuild-minify",renderChunk:i(async(e,D,t)=>{const n=await Mu(e,{...u,format:ND(t.format),minify:!0,keepNames:!0});return{code:n.code,map:n.map||null}},"renderChunk")}),"esbuildMinify"),yu=i((u,e)=>u[0]-e[0]||u[1]-e[1]||u[2]-e[2],"compareSemver"),ce=i(({target:u})=>{const e=u.some(D=>{if(D=D.trim(),!D.startsWith("node"))return;const t=D.slice(4).split(".").map(Number),n=[t[0],t[1]??0,t[2]??0];return!(yu(n,[12,20,0])>=0&&yu(n,[13,0,0])<0||yu(n,[14,13,1])>=0)});return{name:"externalize-node-builtins",resolveId:i(D=>{const t=D.startsWith("node:");if(e&&t&&(D=D.slice(5)),et.includes(D)||t)return{id:D,external:!0}},"resolveId")}},"externalizeNodeBuiltins"),LD=i(u=>({name:"patch-binary",renderChunk:i((e,D,t)=>{if(!D.isEntry||!D.facadeModuleId)return;const n=t.entryFileNames,r=`./${h.posix.join(t.dir,n(D))}`;if(u.includes(r)){const o=new cu(e);return o.prepend(`#!/usr/bin/env node
|
|
23
|
+
`),{code:o.toString(),map:t.sourcemap?o.generateMap({hires:!0}):void 0}}},"renderChunk"),writeBundle:i(async(e,D)=>{const t=e.entryFileNames,n=Object.values(D).map(async r=>{const o=r;if(o.isEntry&&o.facadeModuleId){const s=`./${h.posix.join(e.dir,t(o))}`;await S.promises.chmod(s,493)}});await Promise.all(n)},"writeBundle")}),"patchBinary"),fe=i(()=>{const u=/\.(?:[mc]?js|jsx)$/;return{name:"resolve-typescript-mjs-cjs",resolveId(e,D,t){return u.test(e)&&D?this.resolve(e.replace(/js(x?)$/,"ts$1"),D,t):null}}},"resolveTypescriptMjsCts"),Fe=i(u=>u!==null&&typeof u=="object","A"),W=i((u,e)=>Object.assign(new Error(`[${u}]: ${e}`),{code:u}),"a"),pe="ERR_INVALID_PACKAGE_CONFIG",bu="ERR_INVALID_PACKAGE_TARGET",MD="ERR_PACKAGE_PATH_NOT_EXPORTED",WD=/^\d+$/,UD=/^(\.{1,2}|node_modules)$/i,JD=/\/|\\/;var Ce=(u=>(u.Export="exports",u.Import="imports",u))(Ce||{});const wu=i((u,e,D,t,n)=>{if(e==null)return[];if(typeof e=="string"){const[r,...o]=e.split(JD);if(r===".."||o.some(s=>UD.test(s)))throw W(bu,`Invalid "${u}" target "${e}" defined in the package config`);return[n?e.replace(/\*/g,n):e]}if(Array.isArray(e))return e.flatMap(r=>wu(u,r,D,t,n));if(Fe(e)){for(const r of Object.keys(e)){if(WD.test(r))throw W(pe,"Cannot contain numeric property keys");if(r==="default"||t.includes(r))return wu(u,e[r],D,t,n)}return[]}throw W(bu,`Invalid "${u}" target "${e}"`)},"f"),K="*",VD=i((u,e)=>{const D=u.indexOf(K),t=e.indexOf(K);return D===t?e.length>u.length:t>D},"m");function zD(u,e){if(!e.includes(K)&&u.hasOwnProperty(e))return[e];let D,t;for(const n of Object.keys(u))if(n.includes(K)){const[r,o,s]=n.split(K);if(s===void 0&&e.startsWith(r)&&e.endsWith(o)){const a=e.slice(r.length,-o.length||void 0);a&&(!D||VD(D,n))&&(D=n,t=a)}}return[D,t]}i(zD,"d");const qD=i(u=>Object.keys(u).reduce((e,D)=>{const t=D===""||D[0]!==".";if(e===void 0||e===t)return t;throw W(pe,'"exports" cannot contain some keys starting with "." and some not')},void 0),"p"),GD=/^\w+:/,KD=i((u,e,D)=>{if(!u)throw new Error('"exports" is required');e=e===""?".":`./${e}`,(typeof u=="string"||Array.isArray(u)||Fe(u)&&qD(u))&&(u={".":u});const[t,n]=zD(u,e),r=wu(Ce.Export,u[t],e,D,n);if(r.length===0)throw W(MD,e==="."?'No "exports" main defined':`Package subpath '${e}' is not defined by "exports"`);for(const o of r)if(!o.startsWith("./")&&!GD.test(o))throw W(bu,`Invalid "exports" target "${o}" defined in the package config`);return r},"v");var HD=Object.defineProperty,f=i((u,e)=>HD(u,"name",{value:e,configurable:!0}),"o");function k(u){return u.startsWith("\\\\?\\")?u:u.replace(/\\/g,"/")}i(k,"E"),f(k,"slash");const vu=f(u=>{const e=S[u];return(D,...t)=>{const n=`${u}:${t.join(":")}`;let r=D?.get(n);return r===void 0&&(r=Reflect.apply(e,S,t),D?.set(n,r)),r}},"cacheFs"),O=vu("existsSync"),ZD=vu("readFileSync"),Du=vu("statSync"),de=f((u,e,D)=>{for(;;){const t=h.posix.join(u,e);if(O(D,t))return t;const n=h.dirname(u);if(n===u)return;u=n}},"findUp"),$u=/^\.{1,2}(\/.*)?$/,xu=f(u=>{const e=k(u);return $u.test(e)?e:`./${e}`},"normalizeRelativePath");function Ee(u,e=!1){const D=u.length;let t=0,n="",r=0,o=16,s=0,a=0,l=0,p=0,F=0;function c(C,B){let g=0,b=0;for(;g<C;){let w=u.charCodeAt(t);if(w>=48&&w<=57)b=b*16+w-48;else if(w>=65&&w<=70)b=b*16+w-65+10;else if(w>=97&&w<=102)b=b*16+w-97+10;else break;t++,g++}return g<C&&(b=-1),b}i(c,"_"),f(c,"scanHexDigits");function E(C){t=C,n="",r=0,o=16,F=0}i(E,"d"),f(E,"setPosition");function d(){let C=t;if(u.charCodeAt(t)===48)t++;else for(t++;t<u.length&&R(u.charCodeAt(t));)t++;if(t<u.length&&u.charCodeAt(t)===46)if(t++,t<u.length&&R(u.charCodeAt(t)))for(t++;t<u.length&&R(u.charCodeAt(t));)t++;else return F=3,u.substring(C,t);let B=t;if(t<u.length&&(u.charCodeAt(t)===69||u.charCodeAt(t)===101))if(t++,(t<u.length&&u.charCodeAt(t)===43||u.charCodeAt(t)===45)&&t++,t<u.length&&R(u.charCodeAt(t))){for(t++;t<u.length&&R(u.charCodeAt(t));)t++;B=t}else F=3;return u.substring(C,B)}i(d,"A"),f(d,"scanNumber");function m(){let C="",B=t;for(;;){if(t>=D){C+=u.substring(B,t),F=2;break}const g=u.charCodeAt(t);if(g===34){C+=u.substring(B,t),t++;break}if(g===92){if(C+=u.substring(B,t),t++,t>=D){F=2;break}switch(u.charCodeAt(t++)){case 34:C+='"';break;case 92:C+="\\";break;case 47:C+="/";break;case 98:C+="\b";break;case 102:C+="\f";break;case 110:C+=`
|
|
24
|
+
`;break;case 114:C+="\r";break;case 116:C+=" ";break;case 117:const b=c(4);b>=0?C+=String.fromCharCode(b):F=4;break;default:F=5}B=t;continue}if(g>=0&&g<=31)if(U(g)){C+=u.substring(B,t),F=2;break}else F=6;t++}return C}i(m,"w"),f(m,"scanString");function y(){if(n="",F=0,r=t,a=s,p=l,t>=D)return r=D,o=17;let C=u.charCodeAt(t);if(nu(C)){do t++,n+=String.fromCharCode(C),C=u.charCodeAt(t);while(nu(C));return o=15}if(U(C))return t++,n+=String.fromCharCode(C),C===13&&u.charCodeAt(t)===10&&(t++,n+=`
|
|
25
|
+
`),s++,l=t,o=14;switch(C){case 123:return t++,o=1;case 125:return t++,o=2;case 91:return t++,o=3;case 93:return t++,o=4;case 58:return t++,o=6;case 44:return t++,o=5;case 34:return t++,n=m(),o=10;case 47:const B=t-1;if(u.charCodeAt(t+1)===47){for(t+=2;t<D&&!U(u.charCodeAt(t));)t++;return n=u.substring(B,t),o=12}if(u.charCodeAt(t+1)===42){t+=2;const g=D-1;let b=!1;for(;t<g;){const w=u.charCodeAt(t);if(w===42&&u.charCodeAt(t+1)===47){t+=2,b=!0;break}t++,U(w)&&(w===13&&u.charCodeAt(t)===10&&t++,s++,l=t)}return b||(t++,F=1),n=u.substring(B,t),o=13}return n+=String.fromCharCode(C),t++,o=16;case 45:if(n+=String.fromCharCode(C),t++,t===D||!R(u.charCodeAt(t)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return n+=d(),o=11;default:for(;t<D&&j(C);)t++,C=u.charCodeAt(t);if(r!==t){switch(n=u.substring(r,t),n){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return n+=String.fromCharCode(C),t++,o=16}}i(y,"y"),f(y,"scanNext");function j(C){if(nu(C)||U(C))return!1;switch(C){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}i(j,"I"),f(j,"isUnknownContentCharacter");function $(){let C;do C=y();while(C>=12&&C<=15);return C}return i($,"L"),f($,"scanNextNonTrivia"),{setPosition:E,getPosition:f(()=>t,"getPosition"),scan:e?$:y,getToken:f(()=>o,"getToken"),getTokenValue:f(()=>n,"getTokenValue"),getTokenOffset:f(()=>r,"getTokenOffset"),getTokenLength:f(()=>t-r,"getTokenLength"),getTokenStartLine:f(()=>a,"getTokenStartLine"),getTokenStartCharacter:f(()=>r-p,"getTokenStartCharacter"),getTokenError:f(()=>F,"getTokenError")}}i(Ee,"je"),f(Ee,"createScanner");function nu(u){return u===32||u===9}i(nu,"H"),f(nu,"isWhiteSpace");function U(u){return u===10||u===13}i(U,"N"),f(U,"isLineBreak");function R(u){return u>=48&&u<=57}i(R,"h"),f(R,"isDigit");var he;(function(u){u[u.lineFeed=10]="lineFeed",u[u.carriageReturn=13]="carriageReturn",u[u.space=32]="space",u[u._0=48]="_0",u[u._1=49]="_1",u[u._2=50]="_2",u[u._3=51]="_3",u[u._4=52]="_4",u[u._5=53]="_5",u[u._6=54]="_6",u[u._7=55]="_7",u[u._8=56]="_8",u[u._9=57]="_9",u[u.a=97]="a",u[u.b=98]="b",u[u.c=99]="c",u[u.d=100]="d",u[u.e=101]="e",u[u.f=102]="f",u[u.g=103]="g",u[u.h=104]="h",u[u.i=105]="i",u[u.j=106]="j",u[u.k=107]="k",u[u.l=108]="l",u[u.m=109]="m",u[u.n=110]="n",u[u.o=111]="o",u[u.p=112]="p",u[u.q=113]="q",u[u.r=114]="r",u[u.s=115]="s",u[u.t=116]="t",u[u.u=117]="u",u[u.v=118]="v",u[u.w=119]="w",u[u.x=120]="x",u[u.y=121]="y",u[u.z=122]="z",u[u.A=65]="A",u[u.B=66]="B",u[u.C=67]="C",u[u.D=68]="D",u[u.E=69]="E",u[u.F=70]="F",u[u.G=71]="G",u[u.H=72]="H",u[u.I=73]="I",u[u.J=74]="J",u[u.K=75]="K",u[u.L=76]="L",u[u.M=77]="M",u[u.N=78]="N",u[u.O=79]="O",u[u.P=80]="P",u[u.Q=81]="Q",u[u.R=82]="R",u[u.S=83]="S",u[u.T=84]="T",u[u.U=85]="U",u[u.V=86]="V",u[u.W=87]="W",u[u.X=88]="X",u[u.Y=89]="Y",u[u.Z=90]="Z",u[u.asterisk=42]="asterisk",u[u.backslash=92]="backslash",u[u.closeBrace=125]="closeBrace",u[u.closeBracket=93]="closeBracket",u[u.colon=58]="colon",u[u.comma=44]="comma",u[u.dot=46]="dot",u[u.doubleQuote=34]="doubleQuote",u[u.minus=45]="minus",u[u.openBrace=123]="openBrace",u[u.openBracket=91]="openBracket",u[u.plus=43]="plus",u[u.slash=47]="slash",u[u.formFeed=12]="formFeed",u[u.tab=9]="tab"})(he||(he={})),new Array(20).fill(0).map((u,e)=>" ".repeat(e));const J=200;new Array(J).fill(0).map((u,e)=>`
|
|
26
|
+
`+" ".repeat(e)),new Array(J).fill(0).map((u,e)=>"\r"+" ".repeat(e)),new Array(J).fill(0).map((u,e)=>`\r
|
|
27
|
+
`+" ".repeat(e)),new Array(J).fill(0).map((u,e)=>`
|
|
28
|
+
`+" ".repeat(e)),new Array(J).fill(0).map((u,e)=>"\r"+" ".repeat(e)),new Array(J).fill(0).map((u,e)=>`\r
|
|
29
|
+
`+" ".repeat(e));var ru;(function(u){u.DEFAULT={allowTrailingComma:!1}})(ru||(ru={}));function me(u,e=[],D=ru.DEFAULT){let t=null,n=[];const r=[];function o(s){Array.isArray(n)?n.push(s):t!==null&&(n[t]=s)}return i(o,"u"),f(o,"onValue"),ge(u,{onObjectBegin:f(()=>{const s={};o(s),r.push(n),n=s,t=null},"onObjectBegin"),onObjectProperty:f(s=>{t=s},"onObjectProperty"),onObjectEnd:f(()=>{n=r.pop()},"onObjectEnd"),onArrayBegin:f(()=>{const s=[];o(s),r.push(n),n=s,t=null},"onArrayBegin"),onArrayEnd:f(()=>{n=r.pop()},"onArrayEnd"),onLiteralValue:o,onError:f((s,a,l)=>{e.push({error:s,offset:a,length:l})},"onError")},D),n[0]}i(me,"ye"),f(me,"parse$1");function ge(u,e,D=ru.DEFAULT){const t=Ee(u,!1),n=[];function r(A){return A?()=>A(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}i(r,"i"),f(r,"toNoArgVisit");function o(A){return A?()=>A(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>n.slice()):()=>!0}i(o,"u"),f(o,"toNoArgVisitWithPath");function s(A){return A?v=>A(v,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}i(s,"f"),f(s,"toOneArgVisit");function a(A){return A?v=>A(v,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>n.slice()):()=>!0}i(a,"r"),f(a,"toOneArgVisitWithPath");const l=o(e.onObjectBegin),p=a(e.onObjectProperty),F=r(e.onObjectEnd),c=o(e.onArrayBegin),E=r(e.onArrayEnd),d=a(e.onLiteralValue),m=s(e.onSeparator),y=r(e.onComment),j=s(e.onError),$=D&&D.disallowComments,C=D&&D.allowTrailingComma;function B(){for(;;){const A=t.scan();switch(t.getTokenError()){case 4:g(14);break;case 5:g(15);break;case 3:g(13);break;case 1:$||g(11);break;case 2:g(12);break;case 6:g(16);break}switch(A){case 12:case 13:$?g(10):y();break;case 16:g(1);break;case 15:case 14:break;default:return A}}}i(B,"k"),f(B,"scanNext");function g(A,v=[],Lu=[]){if(j(A),v.length+Lu.length>0){let Y=t.getToken();for(;Y!==17;){if(v.indexOf(Y)!==-1){B();break}else if(Lu.indexOf(Y)!==-1)break;Y=B()}}}i(g,"m"),f(g,"handleError");function b(A){const v=t.getTokenValue();return A?d(v):(p(v),n.push(v)),B(),!0}i(b,"F"),f(b,"parseString");function w(){switch(t.getToken()){case 11:const A=t.getTokenValue();let v=Number(A);isNaN(v)&&(g(2),v=0),d(v);break;case 7:d(null);break;case 8:d(!0);break;case 9:d(!1);break;default:return!1}return B(),!0}i(w,"j"),f(w,"parseLiteral");function lu(){return t.getToken()!==10?(g(3,[],[2,5]),!1):(b(!1),t.getToken()===6?(m(":"),B(),Q()||g(4,[],[2,5])):g(5,[],[2,5]),n.pop(),!0)}i(lu,"S"),f(lu,"parseProperty");function Nu(){l(),B();let A=!1;for(;t.getToken()!==2&&t.getToken()!==17;){if(t.getToken()===5){if(A||g(4,[],[]),m(","),B(),t.getToken()===2&&C)break}else A&&g(6,[],[]);lu()||g(4,[],[2,5]),A=!0}return F(),t.getToken()!==2?g(7,[2],[]):B(),!0}i(Nu,"R"),f(Nu,"parseObject");function Ru(){c(),B();let A=!0,v=!1;for(;t.getToken()!==4&&t.getToken()!==17;){if(t.getToken()===5){if(v||g(4,[],[]),m(","),B(),t.getToken()===4&&C)break}else v&&g(6,[],[]);A?(n.push(0),A=!1):n[n.length-1]++,Q()||g(4,[],[4,5]),v=!0}return E(),A||n.pop(),t.getToken()!==4?g(8,[4],[]):B(),!0}i(Ru,"a"),f(Ru,"parseArray");function Q(){switch(t.getToken()){case 3:return Ru();case 1:return Nu();case 10:return b(!0);default:return w()}}return i(Q,"U"),f(Q,"parseValue"),B(),t.getToken()===17?D.allowEmptyContent?!0:(g(4,[],[]),!1):Q()?(t.getToken()!==17&&g(9,[],[]),!0):(g(4,[],[]),!1)}i(ge,"Fe"),f(ge,"visit");var Be;(function(u){u[u.None=0]="None",u[u.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",u[u.UnexpectedEndOfString=2]="UnexpectedEndOfString",u[u.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",u[u.InvalidUnicode=4]="InvalidUnicode",u[u.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",u[u.InvalidCharacter=6]="InvalidCharacter"})(Be||(Be={}));var Ae;(function(u){u[u.OpenBraceToken=1]="OpenBraceToken",u[u.CloseBraceToken=2]="CloseBraceToken",u[u.OpenBracketToken=3]="OpenBracketToken",u[u.CloseBracketToken=4]="CloseBracketToken",u[u.CommaToken=5]="CommaToken",u[u.ColonToken=6]="ColonToken",u[u.NullKeyword=7]="NullKeyword",u[u.TrueKeyword=8]="TrueKeyword",u[u.FalseKeyword=9]="FalseKeyword",u[u.StringLiteral=10]="StringLiteral",u[u.NumericLiteral=11]="NumericLiteral",u[u.LineCommentTrivia=12]="LineCommentTrivia",u[u.BlockCommentTrivia=13]="BlockCommentTrivia",u[u.LineBreakTrivia=14]="LineBreakTrivia",u[u.Trivia=15]="Trivia",u[u.Unknown=16]="Unknown",u[u.EOF=17]="EOF"})(Ae||(Ae={}));const QD=me;var ye;(function(u){u[u.InvalidSymbol=1]="InvalidSymbol",u[u.InvalidNumberFormat=2]="InvalidNumberFormat",u[u.PropertyNameExpected=3]="PropertyNameExpected",u[u.ValueExpected=4]="ValueExpected",u[u.ColonExpected=5]="ColonExpected",u[u.CommaExpected=6]="CommaExpected",u[u.CloseBraceExpected=7]="CloseBraceExpected",u[u.CloseBracketExpected=8]="CloseBracketExpected",u[u.EndOfFileExpected=9]="EndOfFileExpected",u[u.InvalidCommentToken=10]="InvalidCommentToken",u[u.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",u[u.UnexpectedEndOfString=12]="UnexpectedEndOfString",u[u.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",u[u.InvalidUnicode=14]="InvalidUnicode",u[u.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",u[u.InvalidCharacter=16]="InvalidCharacter"})(ye||(ye={}));const be=f((u,e)=>QD(ZD(e,u,"utf8")),"readJsonc"),ku=Symbol("implicitBaseUrl"),_="${configDir}",YD=f(()=>{const{findPnpApi:u}=ut;return u&&u(process.cwd())},"getPnpApi"),ju=f((u,e,D,t)=>{const n=`resolveFromPackageJsonPath:${u}:${e}:${D}`;if(t!=null&&t.has(n))return t.get(n);const r=be(u,t);if(!r)return;let o=e||"tsconfig.json";if(!D&&r.exports)try{const[s]=KD(r.exports,e,["require","types"]);o=s}catch{return!1}else!e&&r.tsconfig&&(o=r.tsconfig);return o=h.join(u,"..",o),t?.set(n,o),o},"resolveFromPackageJsonPath"),Ou="package.json",Tu="tsconfig.json",XD=f((u,e,D)=>{let t=u;if(u===".."&&(t=h.join(t,Tu)),u[0]==="."&&(t=h.resolve(e,t)),h.isAbsolute(t)){if(O(D,t)){if(Du(D,t).isFile())return t}else if(!t.endsWith(".json")){const E=`${t}.json`;if(O(D,E))return E}return}const[n,...r]=u.split("/"),o=n[0]==="@"?`${n}/${r.shift()}`:n,s=r.join("/"),a=YD();if(a){const{resolveRequest:E}=a;try{if(o===u){const d=E(h.join(o,Ou),e);if(d){const m=ju(d,s,!1,D);if(m&&O(D,m))return m}}else{let d;try{d=E(u,e,{extensions:[".json"]})}catch{d=E(h.join(u,Tu),e)}if(d)return d}}catch{}}const l=de(h.resolve(e),h.join("node_modules",o),D);if(!l||!Du(D,l).isDirectory())return;const p=h.join(l,Ou);if(O(D,p)){const E=ju(p,s,!1,D);if(E===!1)return;if(E&&O(D,E)&&Du(D,E).isFile())return E}const F=h.join(l,s),c=F.endsWith(".json");if(!c){const E=`${F}.json`;if(O(D,E))return E}if(O(D,F)){if(Du(D,F).isDirectory()){const E=h.join(F,Ou);if(O(D,E)){const m=ju(E,"",!0,D);if(m&&O(D,m))return m}const d=h.join(F,Tu);if(O(D,d))return d}else if(c)return F}},"resolveExtendsPath"),Su=f((u,e)=>xu(h.relative(u,e)),"pathRelative"),we=["files","include","exclude"],un=f((u,e,D,t)=>{const n=XD(u,e,t);if(!n)throw new Error(`File '${u}' not found.`);if(D.has(n))throw new Error(`Circularity detected while resolving configuration: ${n}`);D.add(n);const r=h.dirname(n),o=ve(n,t,D);delete o.references;const{compilerOptions:s}=o;if(s){const{baseUrl:a}=s;a&&!a.startsWith(_)&&(s.baseUrl=k(h.relative(e,h.join(r,a)))||"./");let{outDir:l}=s;l&&(l.startsWith(_)||(l=h.relative(e,h.join(r,l))),s.outDir=k(l)||"./")}for(const a of we){const l=o[a];l&&(o[a]=l.map(p=>p.startsWith(_)?p:k(h.relative(e,h.join(r,p)))))}return o},"resolveExtends"),en=["outDir","declarationDir"],ve=f((u,e,D=new Set)=>{let t;try{t=be(u,e)||{}}catch{throw new Error(`Cannot resolve tsconfig at path: ${u}`)}if(typeof t!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${u}`);const n=h.dirname(u);if(t.compilerOptions){const{compilerOptions:r}=t;r.paths&&!r.baseUrl&&(r[ku]=n)}if(t.extends){const r=Array.isArray(t.extends)?t.extends:[t.extends];delete t.extends;for(const o of r.reverse()){const s=un(o,n,new Set(D),e),a={...s,...t,compilerOptions:{...s.compilerOptions,...t.compilerOptions}};s.watchOptions&&(a.watchOptions={...s.watchOptions,...t.watchOptions}),t=a}}if(t.compilerOptions){const{compilerOptions:r}=t,o=["baseUrl","rootDir"];for(const s of o){const a=r[s];if(a&&!a.startsWith(_)){const l=h.resolve(n,a),p=Su(n,l);r[s]=p}}for(const s of en){let a=r[s];a&&(Array.isArray(t.exclude)||(t.exclude=[]),t.exclude.includes(a)||t.exclude.push(a),a.startsWith(_)||(a=xu(a)),r[s]=a)}}else t.compilerOptions={};if(t.include?(t.include=t.include.map(k),t.files&&delete t.files):t.files&&(t.files=t.files.map(r=>r.startsWith(_)?r:xu(r))),t.watchOptions){const{watchOptions:r}=t;r.excludeDirectories&&(r.excludeDirectories=r.excludeDirectories.map(o=>k(h.resolve(n,o))))}return t},"_parseTsconfig"),ou=f((u,e)=>{if(u.startsWith(_))return k(h.join(e,u.slice(_.length)))},"interpolateConfigDir"),tn=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],Dn=f(u=>{if(u.strict){const e=["noImplicitAny","noImplicitThis","strictNullChecks","strictFunctionTypes","strictBindCallApply","strictPropertyInitialization","strictBuiltinIteratorReturn","alwaysStrict","useUnknownInCatchVariables"];for(const D of e)u[D]===void 0&&(u[D]=!0)}if(u.target){let e=u.target.toLowerCase();e==="es2015"&&(e="es6"),u.target=e,e==="esnext"&&(u.module!=null||(u.module="es6"),u.moduleResolution!=null||(u.moduleResolution="classic"),u.useDefineForClassFields!=null||(u.useDefineForClassFields=!0)),(e==="es6"||e==="es2016"||e==="es2017"||e==="es2018"||e==="es2019"||e==="es2020"||e==="es2021"||e==="es2022"||e==="es2023"||e==="es2024")&&(u.module!=null||(u.module="es6"),u.moduleResolution!=null||(u.moduleResolution="classic")),(e==="es2022"||e==="es2023"||e==="es2024")&&(u.useDefineForClassFields!=null||(u.useDefineForClassFields=!0))}if(u.module){let e=u.module.toLowerCase();e==="es2015"&&(e="es6"),u.module=e,(e==="es6"||e==="es2020"||e==="es2022"||e==="esnext"||e==="none"||e==="system"||e==="umd"||e==="amd")&&(u.moduleResolution!=null||(u.moduleResolution="classic")),e==="system"&&(u.allowSyntheticDefaultImports!=null||(u.allowSyntheticDefaultImports=!0)),(e==="node16"||e==="nodenext"||e==="preserve")&&(u.esModuleInterop!=null||(u.esModuleInterop=!0),u.allowSyntheticDefaultImports!=null||(u.allowSyntheticDefaultImports=!0)),(e==="node16"||e==="nodenext")&&(u.moduleDetection!=null||(u.moduleDetection="force"),u.useDefineForClassFields!=null||(u.useDefineForClassFields=!0)),e==="node16"&&(u.target!=null||(u.target="es2022"),u.moduleResolution!=null||(u.moduleResolution="node16")),e==="nodenext"&&(u.target!=null||(u.target="esnext"),u.moduleResolution!=null||(u.moduleResolution="nodenext")),e==="preserve"&&(u.moduleResolution!=null||(u.moduleResolution="bundler"))}if(u.moduleResolution){let e=u.moduleResolution.toLowerCase();e==="node"&&(e="node10"),u.moduleResolution=e,(e==="node16"||e==="nodenext"||e==="bundler")&&(u.resolvePackageJsonExports!=null||(u.resolvePackageJsonExports=!0),u.resolvePackageJsonImports!=null||(u.resolvePackageJsonImports=!0)),e==="bundler"&&(u.allowSyntheticDefaultImports!=null||(u.allowSyntheticDefaultImports=!0),u.resolveJsonModule!=null||(u.resolveJsonModule=!0))}u.esModuleInterop&&(u.allowSyntheticDefaultImports!=null||(u.allowSyntheticDefaultImports=!0)),u.verbatimModuleSyntax&&(u.isolatedModules!=null||(u.isolatedModules=!0),u.preserveConstEnums!=null||(u.preserveConstEnums=!0)),u.isolatedModules&&(u.preserveConstEnums!=null||(u.preserveConstEnums=!0))},"normalizeCompilerOptions"),$e=f((u,e=new Map)=>{const D=h.resolve(u),t=ve(D,e),n=h.dirname(D),{compilerOptions:r}=t;if(r){for(const s of tn){const a=r[s];if(a){const l=ou(a,n);r[s]=l?Su(n,l):a}}for(const s of["rootDirs","typeRoots"]){const a=r[s];a&&(r[s]=a.map(l=>{const p=ou(l,n);return p?Su(n,p):l}))}const{paths:o}=r;if(o)for(const s of Object.keys(o))o[s]=o[s].map(a=>{var l;return(l=ou(a,n))!=null?l:a});Dn(r)}for(const o of we){const s=t[o];s&&(t[o]=s.map(a=>{var l;return(l=ou(a,n))!=null?l:a}))}return t},"parseTsconfig"),nn=f((u=process.cwd(),e="tsconfig.json",D=new Map)=>{const t=de(k(u),e,D);if(!t)return null;const n=$e(t,D);return{path:t,config:n}},"getTsconfig"),rn=/\*/g,xe=f((u,e)=>{const D=u.match(rn);if(D&&D.length>1)throw new Error(e)},"assertStarCount"),on=f(u=>{if(u.includes("*")){const[e,D]=u.split("*");return{prefix:e,suffix:D}}return u},"parsePattern"),sn=f(({prefix:u,suffix:e},D)=>D.startsWith(u)&&D.endsWith(e),"isPatternMatch"),an=f((u,e,D)=>Object.entries(u).map(([t,n])=>(xe(t,`Pattern '${t}' can have at most one '*' character.`),{pattern:on(t),substitutions:n.map(r=>{if(xe(r,`Substitution '${r}' in pattern '${t}' can have at most one '*' character.`),!e&&!$u.test(r))throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return h.resolve(D,r)})})),"parsePaths"),ln=f(u=>{const{compilerOptions:e}=u.config;if(!e)return null;const{baseUrl:D,paths:t}=e;if(!D&&!t)return null;const n=ku in e&&e[ku],r=h.resolve(h.dirname(u.path),D||n||"."),o=t?an(t,D,r):[];return s=>{if($u.test(s))return[];const a=[];for(const c of o){if(c.pattern===s)return c.substitutions.map(k);typeof c.pattern!="string"&&a.push(c)}let l,p=-1;for(const c of a)sn(c.pattern,s)&&c.pattern.prefix.length>p&&(p=c.pattern.prefix.length,l=c);if(!l)return D?[k(h.join(r,s))]:[];const F=s.slice(l.pattern.prefix.length,s.length-l.pattern.suffix.length);return l.substitutions.map(c=>k(c.replace("*",F)))}},"createPathsMatcher"),ke=f(u=>{let e="";for(let D=0;D<u.length;D+=1){const t=u[D],n=t.toUpperCase();e+=t===n?t.toLowerCase():n}return e},"s"),cn=65,fn=97,Fn=f(()=>Math.floor(Math.random()*26),"m"),pn=f(u=>Array.from({length:u},()=>String.fromCodePoint(Fn()+(Math.random()>.5?cn:fn))).join(""),"S"),Cn=f((u=tt)=>{const e=process.execPath;if(u.existsSync(e))return!u.existsSync(ke(e));const D=`/${pn(10)}`;u.writeFileSync(D,"");const t=!u.existsSync(ke(D));return u.unlinkSync(D),t},"l"),{join:su}=h.posix,Pu={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},dn=f(u=>{const e=[...Pu.ts],D=[...Pu.cts],t=[...Pu.mts];return u!=null&&u.allowJs&&(e.push(".js",".jsx"),D.push(".cjs"),t.push(".mjs")),[...e,...D,...t]},"getSupportedExtensions"),En=f(u=>{const e=[];if(!u)return e;const{outDir:D,declarationDir:t}=u;return D&&e.push(D),t&&e.push(t),e},"getDefaultExcludeSpec"),je=f(u=>u.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),hn=["node_modules","bower_components","jspm_packages"],_u=`(?!(${hn.join("|")})(/|$))`,mn=/(?:^|\/)[^.*?]+$/,Oe="**/*",iu="[^/]",Iu="[^./]",Te=process.platform==="win32";f(({config:u,path:e},D=Cn())=>{if("extends"in u)throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");if(!h.isAbsolute(e))throw new Error("The tsconfig path must be absolute");Te&&(e=k(e));const t=h.dirname(e),{files:n,include:r,exclude:o,compilerOptions:s}=u,a=n?.map(d=>su(t,d)),l=dn(s),p=D?"":"i",F=(o||En(s)).map(d=>{const m=su(t,d),y=je(m).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${iu}*`).replaceAll(String.raw`\?`,iu);return new RegExp(`^${y}($|/)`,p)}),c=n||r?r:[Oe],E=c?c.map(d=>{let m=su(t,d);mn.test(m)&&(m=su(m,Oe));const y=je(m).replaceAll(String.raw`/\*\*`,`(/${_u}${Iu}${iu}*)*?`).replaceAll(/(\/)?\\\*/g,(j,$)=>{const C=`(${Iu}|(\\.(?!min\\.js$))?)*`;return $?`/${_u}${Iu}${C}`:C}).replaceAll(/(\/)?\\\?/g,(j,$)=>{const C=iu;return $?`/${_u}${C}`:C});return new RegExp(`^${y}$`,p)}):void 0;return d=>{if(!h.isAbsolute(d))throw new Error("filePath must be absolute");if(Te&&(d=k(d)),a!=null&&a.includes(d)||!(!l.some(m=>d.endsWith(m))||F.some(m=>m.test(d)))&&E&&E.some(m=>m.test(d)))return u}},"createFilesMatcher");const Se="resolve-tsconfig-paths",gn=i(u=>u[0]===".","isRelative"),Bn=i(u=>u[0]==="/"||/^[\s\S]:/.test(u),"isAbsolute"),Pe=i(u=>{const e=ln(u);return e?{name:Se,async resolveId(D,t,n){if(!t||gn(D)||Bn(D)||D.startsWith("\0"))return null;const r=e(D);for(const o of r){const s=await this.resolve(o,t,{skipSelf:!0,...n});if(s)return s}return null}}:{name:Se}},"resolveTsconfigPaths"),_e=/^#!.*/,An=i(()=>({name:"strip-hashbang",transform:i(u=>{if(!_e.test(u))return null;const e=new cu(u);return e.replace(_e,""),{code:e.toString(),map:e.generateMap({hires:!0})}},"transform")}),"stripHashbang");class yn{static{i(this,"WalkerBase")}constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:i(()=>this.should_skip=!0,"skip"),remove:i(()=>this.should_remove=!0,"remove"),replace:i(e=>this.replacement=e,"replace")}}replace(e,D,t,n){e&&D&&(t!=null?e[D][t]=n:e[D]=n)}remove(e,D,t){e&&D&&(t!=null?e[D].splice(t,1):delete e[D])}}class bn extends yn{static{i(this,"SyncWalker")}constructor(e,D){super(),this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:i(()=>this.should_skip=!0,"skip"),remove:i(()=>this.should_remove=!0,"remove"),replace:i(t=>this.replacement=t,"replace")},this.enter=e,this.leave=D}visit(e,D,t,n){if(e){if(this.enter){const o=this.should_skip,s=this.should_remove,a=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,e,D,t,n),this.replacement&&(e=this.replacement,this.replace(D,t,n,e)),this.should_remove&&this.remove(D,t,n);const l=this.should_skip,p=this.should_remove;if(this.should_skip=o,this.should_remove=s,this.replacement=a,l)return e;if(p)return null}let r;for(r in e){const o=e[r];if(o&&typeof o=="object")if(Array.isArray(o)){const s=o;for(let a=0;a<s.length;a+=1){const l=s[a];Ie(l)&&(this.visit(l,e,r,a)||a--)}}else Ie(o)&&this.visit(o,e,r,null)}if(this.leave){const o=this.replacement,s=this.should_remove;this.replacement=null,this.should_remove=!1,this.leave.call(this.context,e,D,t,n),this.replacement&&(e=this.replacement,this.replace(D,t,n,e)),this.should_remove&&this.remove(D,t,n);const a=this.should_remove;if(this.replacement=o,this.should_remove=s,a)return null}}return e}}function Ie(u){return u!==null&&typeof u=="object"&&"type"in u&&typeof u.type=="string"}i(Ie,"isNode");function wn(u,{enter:e,leave:D}){return new bn(e,D).visit(u,null)}i(wn,"walk");const vn=i(()=>{const u='import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);';return{name:"esmInjectCreateRequire",renderChunk(e,D,t){if(t.format!=="es"||!/\brequire\b/.test(e))return null;const n=this.parse(e);let r=Dt(n,"scope"),o=!1;if(wn(n,{enter(a,l){a.scope&&(r=a.scope),!(a.type!=="Identifier"||a.name!=="require")&&(l?.type==="Property"&&l.key===a&&!l.compute||r.contains("require")||(o=!0,this.skip()))},leave:i(a=>{a.scope&&(r=r.parent)},"leave")}),!o)return null;const s=new cu(e);return s.prepend(u),{code:s.toString(),map:s.generateMap({hires:!0})}}}},"esmInjectCreateRequire"),$n=i((u,e,D,t,n)=>{const r={target:u.target,tsconfigRaw:n?.config,define:D};return{input:[],preserveEntrySignatures:"strict",plugins:[ce(u),...n?[Pe(n)]:[],fe(),Qe({entries:e}),Ke({extensions:[".mjs",".js",".ts",".jsx",".tsx",".json"],exportConditions:u.exportCondition}),An(),Ze(),ID(r),He({ignoreDynamicRequires:!0,extensions:[".js",".ts",".jsx",".tsx"],transformMixedEsModules:!0}),Ye({warnOnError:!0}),vn(),...u.minify?[RD(r)]:[],LD(t)],output:[],external:[]}},"getPkgConfig"),xn=i(async(u,e)=>{const[D,t]=await Promise.all([import("./rollup-plugin-dts-CKfQVads.mjs"),import("./local-typescript-loader-CSvrvK-x.mjs")]);return{input:[],preserveEntrySignatures:"strict",plugins:[ce(u),...e?[Pe(e)]:[],fe(),D.default({respectExternal:!0,compilerOptions:{composite:!1,preserveSymlinks:!1,module:t.default.ModuleKind.Preserve,moduleResolution:t.default.ModuleResolutionKind.Bundler},tsconfig:e?.path})],output:[],external:[]}},"getDtsConfig"),Ne=i(u=>u.split("?")[0],"stripQuery"),kn=i(async(u,e,D,t,n,r,o)=>{const s=D.filter(({exportEntry:c})=>c.isExecutable).map(({exportEntry:c})=>c.outputPath),a=Object.create(null),l=Object.fromEntries(t.env.map(({key:c,value:E})=>[`process.env.${c}`,JSON.stringify(E)])),p=le(r,n),F=le(r,n,!0);for(const{input:c,srcExtension:E,distExtension:d,exportEntry:m}of D){if(m.type==="types"){let B=a.dts;B||(B=await xn(t,o),B.external=F,a.dts=B),B.input.includes(c)||B.input.push(c),B.output.push({dir:e,entryFileNames:i(g=>S.realpathSync.native(Ne(g.facadeModuleId)).slice(u.length,-E.length)+d,"entryFileNames"),exports:"auto",format:"esm"});continue}let y=a.pkg;y||(y=$n(t,n,l,s,o),y.external=p,a.pkg=y),y.input.includes(c)||y.input.push(c);const j=y.output,$=h.extname(m.outputPath),C=`${m.type}-${$}`;if(!j[C]){const B={dir:e,exports:"auto",format:m.type,chunkFileNames:`[name]-[hash]${$}`,sourcemap:t.sourcemap,entryFileNames:i(g=>{const w=S.realpathSync.native(Ne(g.facadeModuleId)).slice(u.length);return h.posix.join(h.dirname(w),g.name)+d},"entryFileNames")};j.push(B),j[C]=B}}return Object.values(a)},"getRollupConfigs"),jn=i(u=>{if(!u)return nn();const e=h.resolve(u),D=$e(e);return{path:e,config:D}},"getTsconfig");let L=!0;const V=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let H=0;if(V.process&&V.process.env&&V.process.stdout){const{FORCE_COLOR:u,NODE_DISABLE_COLORS:e,NO_COLOR:D,TERM:t,COLORTERM:n}=V.process.env;e||D||u==="0"?L=!1:u==="1"||u==="2"||u==="3"?L=!0:t==="dumb"?L=!1:"CI"in V.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(r=>r in V.process.env)?L=!0:L=process.stdout.isTTY,L&&(process.platform==="win32"||n&&(n==="truecolor"||n==="24bit")?H=3:t&&(t.endsWith("-256color")||t.endsWith("256"))?H=2:H=1)}let Re={enabled:L,supportLevel:H};function On(u,e,D=1){const t=`\x1B[${u}m`,n=`\x1B[${e}m`,r=new RegExp(`\\x1b\\[${e}m`,"g");return o=>Re.enabled&&Re.supportLevel>=D?t+(""+o).replace(r,t)+n:""+o}i(On,"kolorist");const Tn=On(90,39),Sn=i(()=>new Date().toLocaleTimeString(),"currentTime"),au=i((...u)=>console.log(`[${Tn(Sn())}]`,...u),"log"),Pn=i(async u=>{await mu(u)&&await S.promises.rm(u,{recursive:!0,force:!0})},"cleanDist"),{stringify:Le}=JSON,I=AD({name:"pkgroll",version:yD,flags:{input:{type:[kD],alias:"i",description:"Dist paths for source files to bundle (Only use if you cannot use package.json entries)"},src:{type:String,description:"Source directory",default:"./src"},dist:{type:String,description:"Distribution directory",default:"./dist"},minify:{type:Boolean,description:"Minify output",alias:"m",default:!1},target:{type:[String],default:[`node${process.versions.node}`],description:"Environments to support. `target` in tsconfig.json is automatically added. Defaults to the current Node.js version.",alias:"t"},tsconfig:{type:String,description:"Custom tsconfig.json file path",alias:"p"},watch:{type:Boolean,description:"Watch mode",alias:"w",default:!1},env:{type:[u=>{const[e,D]=u.split("=");return{key:e,value:D}}],description:"Compile-time environment variables (eg. --env.NODE_ENV=production)"},exportCondition:{type:[String],description:"Export conditions for resolving dependency export and import maps (eg. --export-condition=node)"},sourcemap:{type:i(u=>{if(u==="")return!0;if(u==="inline")return u;throw new Error(`Invalid sourcemap option ${Le(u)}`)},"type"),description:"Sourcemap generation. Provide `inline` option for inline sourcemap (eg. --sourcemap, --sourcemap=inline)"},cleanDist:{type:Boolean,description:"Clean dist before bundling",default:!1}},help:{description:"Minimalistic package bundler",render:i((u,e)=>(e.flagOperator=D=>D.name==="env"?".key=":" ",e.render(u)),"render")}}),Me=process.cwd(),We=G(I.flags.src,!0),Z=G(I.flags.dist,!0),Ue=jn(I.flags.tsconfig),Je=Ue?.config.compilerOptions?.target;Je&&I.flags.target.push(Je),(async()=>{const u=await bD(Me);let e=xD(u);const D=I.flags.input;if(D.length>0){const r=u.type??"commonjs";e.push(...D.map(o=>(o.type||(o.type=r),o)))}if(e=e.filter(r=>{const o=r.outputPath.startsWith(Z);return o||console.warn(`Ignoring entry outside of ${Z} directory: package.json#${r.from}=${Le(r.outputPath)}`),o}),e.length===0)throw new Error("No export entries found in package.json");const t=await Promise.all(e.map(async r=>({...await PD(r,We,Z),exportEntry:r}))),n=await kn(G(S.realpathSync.native(We),!0),Z,t,I.flags,jD(u,Me),u,Ue);I.flags.cleanDist&&await Pn(Z),I.flags.watch?(au("Watch initialized"),n.map(async r=>{qe(r).on("event",async s=>{s.code==="BUNDLE_START"&&au("Building",...Array.isArray(s.input)?s.input:[s.input]),s.code==="BUNDLE_END"&&(await Promise.all(r.output.map(a=>s.result.write(a))),au("Built",...Array.isArray(s.input)?s.input:[s.input])),s.code==="ERROR"&&au("Error:",s.error.message)})})):await Promise.all(n.map(async r=>{const o=await Ge(r);return Promise.all(r.output.map(s=>o.write(s)))}))})().catch(u=>{console.error(u),process.exit(1)});
|