git-publish 2.4.0 → 2.4.2

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.
Files changed (2) hide show
  1. package/dist/index.js +25 -24
  2. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -1,27 +1,28 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var fD=Object.defineProperty;var n=(u,D)=>fD(u,"name",{value:D,configurable:!0});var f=require("node:path"),M=require("node:fs/promises"),dD=require("node:os"),B=require("node:process"),hD=require("node:util"),mu=require("node:url"),gD=require("node:child_process"),X=require("node:events"),wu=require("node:stream/promises"),BD=require("node:readline/promises"),mD=require("tasuku"),bu=require("tty"),wD=require("os"),bD=require("node:fs"),AD=require("tar-fs"),yD=require("gunzip-maybe");function vD(u){var D=Object.create(null);return u&&Object.keys(u).forEach(function(e){if(e!=="default"){var t=Object.getOwnPropertyDescriptor(u,e);Object.defineProperty(D,e,t.get?t:{enumerable:!0,get:n(function(){return u[e]},"get")})}}),D.default=u,Object.freeze(D)}n(vD,"_interopNamespaceDefault");var $D=vD(BD);const OD=n(u=>({start:B.hrtime.bigint(),command:u.map(D=>TD(hD.stripVTControlCharacters(D))).join(" "),state:{stdout:"",stderr:"",output:""}}),"getContext"),TD=n(u=>/[^\w./-]/.test(u)?`'${u.replaceAll("'","'\\''")}'`:u,"getCommandPart"),MD=n(({stdin:u,stdout:D,stderr:e,stdio:t=[u,D,e],env:r,preferLocal:o,cwd:i=".",...a})=>{const s=i instanceof URL?mu.fileURLToPath(i):f.resolve(i),l=r?{...B.env,...r}:void 0,c=t[0]?.string;return{...a,input:c,stdio:c===void 0?t:["pipe",...t.slice(1)],env:o?kD(l??B.env,s):l,cwd:s}},"getOptions"),kD=n(({Path:u="",PATH:D=u,...e},t)=>{const r=D.split(f.delimiter),o=Au([],f.resolve(t)).map(i=>f.join(i,"node_modules/.bin")).filter(i=>!r.includes(i));return{...e,PATH:[...o,D].filter(Boolean).join(f.delimiter)}},"addLocalPath"),Au=n((u,D)=>u.at(-1)===D?u:Au([...u,D],f.resolve(D,"..")),"getLocalPaths"),RD=n(async(u,D,e)=>await SD(u,e)?[Q(u),D.map(t=>LD(t)),{...e,shell:!0}]:[u,D,e],"applyForceShell"),SD=n(async(u,{shell:D,cwd:e,env:t=B.env})=>B.platform==="win32"&&!D&&!await xD(u,e,t),"shouldForceShell"),xD=n((u,D,{Path:e="",PATH:t=e})=>vu.some(r=>u.toLowerCase().endsWith(r))||ID(u,D,t),"isExe"),jD={},yu=n(u=>(...D)=>jD[D.join("\0")]??=u(...D),"memoize"),PD=yu(M.access),ID=yu(async(u,D,e)=>{const t=e.split(f.delimiter).filter(Boolean).map(r=>r.replace(/^"(.*)"$/,"$1"));try{await Promise.any([D,...t].flatMap(r=>vu.map(o=>PD(`${f.resolve(r,u)}${o}`))))}catch{return!1}return!0}),vu=[".exe",".com"],LD=n(u=>Q(Q(`"${u.replaceAll(/(\\*)"/g,'$1$1\\"').replace(/(\\*)$/,"$1$1")}"`)),"escapeArgument"),Q=n(u=>u.replaceAll(/([()\][%!^"`<>&|;, *?])/g,"^$1"),"escapeFile"),ND=n(async(u,{input:D},e)=>{const t=await u;D!==void 0&&t.stdin.end(D);const r=X.once(t,"close");try{return await Promise.race([r,...t.stdio.filter(Boolean).map(o=>_D(o))]),WD(e,Ou(t)),Tu(e)}catch(o){throw await Promise.allSettled([r]),$u(o,t,e)}},"getResult"),_D=n(async u=>{for await(const[D]of X.on(u,"error"))if(!["ERR_STREAM_PREMATURE_CLOSE","EPIPE"].includes(D?.code))throw D},"onStreamError"),WD=n(({command:u},{exitCode:D,signalName:e})=>{if(e!==void 0)throw new W(`Command was terminated with ${e}: ${u}`);if(D!==void 0)throw new W(`Command failed with exit code ${D}: ${u}`)},"checkFailure"),$u=n((u,D,e)=>Object.assign(qD(u,e),Ou(D),Tu(e)),"getResultError"),qD=n((u,{command:D})=>u instanceof W?u:new W(`Command failed: ${D}`,{cause:u}),"getErrorInstance");class W extends Error{static{n(this,"SubprocessError")}name="SubprocessError"}const Ou=n(({exitCode:u,signalCode:D})=>({...u<1?{}:{exitCode:u},...D===null?{}:{signalName:D}}),"getErrorOutput"),Tu=n(({state:{stdout:u,stderr:D,output:e},command:t,start:r})=>({stdout:uu(u),stderr:uu(D),output:uu(e),command:t,durationMs:Number(B.hrtime.bigint()-r)/1e6}),"getOutputs"),uu=n(u=>u.at(-1)===`
3
- `?u.slice(0,u.at(-2)==="\r"?-2:-1):u,"getOutput"),GD=n(async(u,D,e,t)=>{try{["node","node.exe"].includes(u.toLowerCase())&&(u=B.execPath,D=[...B.execArgv.filter(o=>!o.startsWith("--inspect")),...D]),[u,D,e]=await RD(u,D,e),[u,D,e]=zD(u,D,e);const r=gD.spawn(u,D,e);return Mu(r.stdout,t,"stdout"),Mu(r.stderr,t,"stderr"),r.once("error",()=>{}),await X.once(r,"spawn"),r}catch(r){throw $u(r,{},t)}},"spawnSubprocess"),zD=n((u,D,e)=>e.shell&&D.length>0?[[u,...D].join(" "),[],e]:[u,D,e],"concatenateShell"),Mu=n((u,{state:D},e)=>{u&&(u.setEncoding("utf8"),D.isIterating||(D.isIterating=!1,u.on("data",t=>{D[e]+=t,D.output+=t})))},"bufferOutput"),UD=n(async u=>{const[[D,e]]=await Promise.all([Promise.allSettled(u),HD(u)]);if(e.reason)throw e.reason.pipedFrom=D.reason??D.value,e.reason;if(D.reason)throw D.reason;return{...e.value,pipedFrom:D.value}},"handlePipe"),HD=n(async u=>{try{const[{stdout:D},{stdin:e}]=await Promise.all(u.map(({nodeChildProcess:t})=>t));if(e===null)throw new Error('The "stdin" option must be set on the first "spawn()" call in the pipeline.');if(D===null)throw new Error('The "stdout" option must be set on the last "spawn()" call in the pipeline.');wu.pipeline(D,e).catch(()=>{})}catch(D){throw await Promise.allSettled(u.map(({nodeChildProcess:e})=>VD(e))),D}},"pipeStreams"),VD=n(async u=>{const{stdin:D}=await u;D.end()},"closeStdin"),ku=n(async function*(u,{state:D},e){if(D.isIterating===!1)throw new Error(`The subprocess must be iterated right away, for example:
4
- for await (const line of spawn(...)) { ... }`);D.isIterating=!0;try{const{[e]:t}=await u.nodeChildProcess;if(!t)return;YD(u),yield*$D.createInterface({input:t})}finally{await u}},"lineIterator"),YD=n(async u=>{try{await u}catch{}},"handleErrors"),JD=n(async function*(...u){try{let D=[];for(;u.length>0;){D=u.map((i,a)=>D[a]??ZD(i));const[{value:e,done:t},r]=await Promise.race(D.map((i,a)=>Promise.all([i,a]))),[o]=u.splice(r,1);D.splice(r,1),t||(u.push(o),yield e)}}finally{await Promise.all(u.map(D=>D.return()))}},"combineAsyncIterators"),ZD=n(async u=>{try{return await u.next()}catch(D){await u.throw(D)}},"getNext");function g(u,D,e,t){const[r=[],o={}]=Array.isArray(D)?[D,e]:[[],D],i=OD([u,...r]),a=MD(o),s=GD(u,r,a,i);let l=ND(s,a,i);Object.assign(l,{nodeChildProcess:s}),l=t?UD([t,l]):l;const c=ku(l,i,"stdout"),F=ku(l,i,"stderr");return Object.assign(l,{nodeChildProcess:s,stdout:c,stderr:F,[Symbol.asyncIterator]:()=>JD(c,F),pipe:n((C,E,p)=>g(C,E,p,l),"pipe")})}n(g,"spawn");const KD="known-flag",XD="unknown-flag",QD="argument",{stringify:P}=JSON,ue=/\B([A-Z])/g,De=n(u=>u.replace(ue,"-$1").toLowerCase(),"v$1"),{hasOwnProperty:ee}=Object.prototype,I=n((u,D)=>ee.call(u,D),"w$2"),te=n(u=>Array.isArray(u),"L$2"),Ru=n(u=>typeof u=="function"?[u,!1]:te(u)?[u[0],!0]:Ru(u.type),"b$2"),re=n((u,D)=>u===Boolean?D!=="false":D,"d$2"),oe=n((u,D)=>typeof D=="boolean"?D:u===Number&&D===""?Number.NaN:u(D),"m$1"),ne=/[\s.:=]/,ie=n(u=>{const D=`Flag name ${P(u)}`;if(u.length===0)throw new Error(`${D} cannot be empty`);if(u.length===1)throw new Error(`${D} must be longer than a character`);const e=u.match(ne);if(e)throw new Error(`${D} cannot contain ${P(e?.[0])}`)},"B"),ae=n(u=>{const D={},e=n((t,r)=>{if(I(D,t))throw new Error(`Duplicate flags named ${P(t)}`);D[t]=r},"r");for(const t in u){if(!I(u,t))continue;ie(t);const r=u[t],o=[[],...Ru(r),r];e(t,o);const i=De(t);if(t!==i&&e(i,o),"alias"in r&&typeof r.alias=="string"){const{alias:a}=r,s=`Flag alias ${P(a)} for flag ${P(t)}`;if(a.length===0)throw new Error(`${s} cannot be empty`);if(a.length>1)throw new Error(`${s} must be a single character`);e(a,o)}}return D},"K$1"),se=n((u,D)=>{const e={};for(const t in u){if(!I(u,t))continue;const[r,,o,i]=D[t];if(r.length===0&&"default"in i){let{default:a}=i;typeof a=="function"&&(a=a()),e[t]=a}else e[t]=o?r:r.pop()}return e},"_$2"),q="--",le=/[.:=]/,Fe=/^-{1,2}\w/,ce=n(u=>{if(!Fe.test(u))return;const D=!u.startsWith(q);let e=u.slice(D?1:2),t;const r=e.match(le);if(r){const{index:o}=r;t=e.slice(o+1),e=e.slice(0,o)}return[e,t,D]},"N"),Ce=n((u,{onFlag:D,onArgument:e})=>{let t;const r=n((o,i)=>{if(typeof t!="function")return!0;t(o,i),t=void 0},"o");for(let o=0;o<u.length;o+=1){const i=u[o];if(i===q){r();const s=u.slice(o+1);e?.(s,[o],!0);break}const a=ce(i);if(a){if(r(),!D)continue;const[s,l,c]=a;if(c)for(let F=0;F<s.length;F+=1){r();const C=F===s.length-1;t=D(s[F],C?l:void 0,[o,F+1,C])}else t=D(s,l,[o])}else r(i,[o])&&e?.([i],[o])}r()},"$$1"),Ee=n((u,D)=>{for(const[e,t,r]of D.reverse()){if(t){const o=u[e];let i=o.slice(0,t);if(r||(i+=o.slice(t+1)),i!=="-"){u[e]=i;continue}}u.splice(e,1)}},"E"),pe=n((u,D=process.argv.slice(2),{ignore:e}={})=>{const t=[],r=ae(u),o={},i=[];return i[q]=[],Ce(D,{onFlag(a,s,l){const c=I(r,a);if(!e?.(c?KD:XD,a,s)){if(c){const[F,C]=r[a],E=re(C,s),p=n((m,A)=>{t.push(l),A&&t.push(A),F.push(oe(C,m||""))},"p");return E===void 0?p:p(E)}I(o,a)||(o[a]=[]),o[a].push(s===void 0?!0:s),t.push(l)}},onArgument(a,s,l){e?.(QD,D[s[0]])||(i.push(...a),l?(i[q]=a,D.splice(s[0])):t.push(s))}}),Ee(D,t),{flags:se(u,r),unknownFlags:o,_:i}},"U$2");var fe=Object.create,G=Object.defineProperty,de=Object.defineProperties,he=Object.getOwnPropertyDescriptor,ge=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertyNames,Su=Object.getOwnPropertySymbols,me=Object.getPrototypeOf,xu=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,ju=n((u,D,e)=>D in u?G(u,D,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[D]=e,"W$1"),z=n((u,D)=>{for(var e in D||(D={}))xu.call(D,e)&&ju(u,e,D[e]);if(Su)for(var e of Su(D))we.call(D,e)&&ju(u,e,D[e]);return u},"p"),Du=n((u,D)=>de(u,ge(D)),"c"),be=n(u=>G(u,"__esModule",{value:!0}),"nD"),Ae=n((u,D)=>()=>(u&&(D=u(u=0)),D),"rD"),ye=n((u,D)=>()=>(D||u((D={exports:{}}).exports,D),D.exports),"iD"),ve=n((u,D,e,t)=>{if(D&&typeof D=="object"||typeof D=="function")for(let r of Be(D))!xu.call(u,r)&&r!=="default"&&G(u,r,{get:n(()=>D[r],"get"),enumerable:!(t=he(D,r))||t.enumerable});return u},"oD"),$e=n((u,D)=>ve(be(G(u!=null?fe(me(u)):{},"default",{value:u,enumerable:!0})),u),"BD"),h=Ae(()=>{}),Oe=ye((u,D)=>{h(),D.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}});h(),h(),h();var Te=n(u=>{var D,e,t;let r=(D=process.stdout.columns)!=null?D:Number.POSITIVE_INFINITY;return typeof u=="function"&&(u=u(r)),u||(u={}),Array.isArray(u)?{columns:u,stdoutColumns:r}:{columns:(e=u.columns)!=null?e:[],stdoutColumns:(t=u.stdoutColumns)!=null?t:r}},"v");h(),h(),h(),h(),h();function Me({onlyFirst:u=!1}={}){let D=["[\\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(D,u?void 0:"g")}n(Me,"w$1");function Pu(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(Me(),"")}n(Pu,"d$1"),h();function ke(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}n(ke,"y$1");var Re=$e(Oe());function k(u){if(typeof u!="string"||u.length===0||(u=Pu(u),u.length===0))return 0;u=u.replace((0,Re.default)()," ");let D=0;for(let e=0;e<u.length;e++){let t=u.codePointAt(e);t<=31||t>=127&&t<=159||t>=768&&t<=879||(t>65535&&e++,D+=ke(t)?2:1)}return D}n(k,"g");var Iu=n(u=>Math.max(...u.split(`
5
- `).map(k)),"b$1"),Se=n(u=>{let D=[];for(let e of u){let{length:t}=e,r=t-D.length;for(let o=0;o<r;o+=1)D.push(0);for(let o=0;o<t;o+=1){let i=Iu(e[o]);i>D[o]&&(D[o]=i)}}return D},"k$1");h();var Lu=/^\d+%$/,Nu={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},xe=n((u,D)=>{var e;let t=[];for(let r=0;r<u.length;r+=1){let o=(e=D[r])!=null?e:"auto";if(typeof o=="number"||o==="auto"||o==="content-width"||typeof o=="string"&&Lu.test(o)){t.push(Du(z({},Nu),{width:o,contentWidth:u[r]}));continue}if(o&&typeof o=="object"){let i=Du(z(z({},Nu),o),{contentWidth:u[r]});i.horizontalPadding=i.paddingLeft+i.paddingRight,t.push(i);continue}throw new Error(`Invalid column width: ${JSON.stringify(o)}`)}return t},"sD");function je(u,D){for(let e of u){let{width:t}=e;if(t==="content-width"&&(e.width=e.contentWidth),t==="auto"){let s=Math.min(20,e.contentWidth);e.width=s,e.autoOverflow=e.contentWidth-s}if(typeof t=="string"&&Lu.test(t)){let s=Number.parseFloat(t.slice(0,-1))/100;e.width=Math.floor(D*s)-(e.paddingLeft+e.paddingRight)}let{horizontalPadding:r}=e,o=1,i=o+r;if(i>=D){let s=i-D,l=Math.ceil(e.paddingLeft/r*s),c=s-l;e.paddingLeft-=l,e.paddingRight-=c,e.horizontalPadding=e.paddingLeft+e.paddingRight}e.paddingLeftString=e.paddingLeft?" ".repeat(e.paddingLeft):"",e.paddingRightString=e.paddingRight?" ".repeat(e.paddingRight):"";let a=D-e.horizontalPadding;e.width=Math.max(Math.min(e.width,a),o)}}n(je,"aD");var _u=n(()=>Object.assign([],{columns:0}),"G");function Pe(u,D){let e=[_u()],[t]=e;for(let r of u){let o=r.width+r.horizontalPadding;t.columns+o>D&&(t=_u(),e.push(t)),t.push(r),t.columns+=o}for(let r of e){let o=r.reduce((C,E)=>C+E.width+E.horizontalPadding,0),i=D-o;if(i===0)continue;let a=r.filter(C=>"autoOverflow"in C),s=a.filter(C=>C.autoOverflow>0),l=s.reduce((C,E)=>C+E.autoOverflow,0),c=Math.min(l,i);for(let C of s){let E=Math.floor(C.autoOverflow/l*c);C.width+=E,i-=E}let F=Math.floor(i/a.length);for(let C=0;C<a.length;C+=1){let E=a[C];C===a.length-1?E.width+=i:E.width+=F,i-=F}}return e}n(Pe,"lD");function Ie(u,D,e){let t=xe(e,D);return je(t,u),Pe(t,u)}n(Ie,"Z$1"),h(),h(),h();var eu=10,Wu=n((u=0)=>D=>`\x1B[${D+u}m`,"U$1"),qu=n((u=0)=>D=>`\x1B[${38+u};5;${D}m`,"V$1"),Gu=n((u=0)=>(D,e,t)=>`\x1B[${38+u};2;${D};${e};${t}m`,"Y");function Le(){let u=new Map,D={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]}};D.color.gray=D.color.blackBright,D.bgColor.bgGray=D.bgColor.bgBlackBright,D.color.grey=D.color.blackBright,D.bgColor.bgGrey=D.bgColor.bgBlackBright;for(let[e,t]of Object.entries(D)){for(let[r,o]of Object.entries(t))D[r]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},t[r]=D[r],u.set(o[0],o[1]);Object.defineProperty(D,e,{value:t,enumerable:!1})}return Object.defineProperty(D,"codes",{value:u,enumerable:!1}),D.color.close="\x1B[39m",D.bgColor.close="\x1B[49m",D.color.ansi=Wu(),D.color.ansi256=qu(),D.color.ansi16m=Gu(),D.bgColor.ansi=Wu(eu),D.bgColor.ansi256=qu(eu),D.bgColor.ansi16m=Gu(eu),Object.defineProperties(D,{rgbToAnsi256:{value:n((e,t,r)=>e===t&&t===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(r/255*5),"value"),enumerable:!1},hexToRgb:{value:n(e=>{let t=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(e.toString(16));if(!t)return[0,0,0];let{colorString:r}=t.groups;r.length===3&&(r=r.split("").map(i=>i+i).join(""));let o=Number.parseInt(r,16);return[o>>16&255,o>>8&255,o&255]},"value"),enumerable:!1},hexToAnsi256:{value:n(e=>D.rgbToAnsi256(...D.hexToRgb(e)),"value"),enumerable:!1},ansi256ToAnsi:{value:n(e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,r,o;if(e>=232)t=((e-232)*10+8)/255,r=t,o=t;else{e-=16;let s=e%36;t=Math.floor(e/36)/5,r=Math.floor(s/6)/5,o=s%6/5}let i=Math.max(t,r,o)*2;if(i===0)return 30;let a=30+(Math.round(o)<<2|Math.round(r)<<1|Math.round(t));return i===2&&(a+=60),a},"value"),enumerable:!1},rgbToAnsi:{value:n((e,t,r)=>D.ansi256ToAnsi(D.rgbToAnsi256(e,t,r)),"value"),enumerable:!1},hexToAnsi:{value:n(e=>D.ansi256ToAnsi(D.hexToAnsi256(e)),"value"),enumerable:!1}}),D}n(Le,"AD");var Ne=Le(),_e=Ne,U=new Set(["\x1B","\x9B"]),We=39,tu="\x07",zu="[",qe="]",Uu="m",ru=`${qe}8;;`,Hu=n(u=>`${U.values().next().value}${zu}${u}${Uu}`,"J$1"),Vu=n(u=>`${U.values().next().value}${ru}${u}${tu}`,"Q"),Ge=n(u=>u.split(" ").map(D=>k(D)),"hD"),ou=n((u,D,e)=>{let t=[...D],r=!1,o=!1,i=k(Pu(u[u.length-1]));for(let[a,s]of t.entries()){let l=k(s);if(i+l<=e?u[u.length-1]+=s:(u.push(s),i=0),U.has(s)&&(r=!0,o=t.slice(a+1).join("").startsWith(ru)),r){o?s===tu&&(r=!1,o=!1):s===Uu&&(r=!1);continue}i+=l,i===e&&a<t.length-1&&(u.push(""),i=0)}!i&&u[u.length-1].length>0&&u.length>1&&(u[u.length-2]+=u.pop())},"S"),ze=n(u=>{let D=u.split(" "),e=D.length;for(;e>0&&!(k(D[e-1])>0);)e--;return e===D.length?u:D.slice(0,e).join(" ")+D.slice(e).join("")},"cD"),Ue=n((u,D,e={})=>{if(e.trim!==!1&&u.trim()==="")return"";let t="",r,o,i=Ge(u),a=[""];for(let[l,c]of u.split(" ").entries()){e.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let F=k(a[a.length-1]);if(l!==0&&(F>=D&&(e.wordWrap===!1||e.trim===!1)&&(a.push(""),F=0),(F>0||e.trim===!1)&&(a[a.length-1]+=" ",F++)),e.hard&&i[l]>D){let C=D-F,E=1+Math.floor((i[l]-C-1)/D);Math.floor((i[l]-1)/D)<E&&a.push(""),ou(a,c,D);continue}if(F+i[l]>D&&F>0&&i[l]>0){if(e.wordWrap===!1&&F<D){ou(a,c,D);continue}a.push("")}if(F+i[l]>D&&e.wordWrap===!1){ou(a,c,D);continue}a[a.length-1]+=c}e.trim!==!1&&(a=a.map(l=>ze(l)));let s=[...a.join(`
6
- `)];for(let[l,c]of s.entries()){if(t+=c,U.has(c)){let{groups:C}=new RegExp(`(?:\\${zu}(?<code>\\d+)m|\\${ru}(?<uri>.*)${tu})`).exec(s.slice(l).join(""))||{groups:{}};if(C.code!==void 0){let E=Number.parseFloat(C.code);r=E===We?void 0:E}else C.uri!==void 0&&(o=C.uri.length===0?void 0:C.uri)}let F=_e.codes.get(Number(r));s[l+1]===`
7
- `?(o&&(t+=Vu("")),r&&F&&(t+=Hu(F))):c===`
8
- `&&(r&&F&&(t+=Hu(r)),o&&(t+=Vu(o)))}return t},"dD");function He(u,D,e){return String(u).normalize().replace(/\r\n/g,`
2
+ "use strict";var qe=Object.defineProperty;var s=(u,e)=>qe(u,"name",{value:e,configurable:!0});var g=require("node:path"),$=require("node:fs/promises"),ze=require("node:os"),k=require("node:process"),Ge=require("node:util"),Ou=require("node:url"),Ve=require("node:child_process"),iu=require("node:events"),ku=require("node:stream/promises"),Ue=require("node:readline/promises"),He=require("tasuku"),Mu=require("tty"),Ye=require("os"),Je=require("node:fs"),Ze=require("fast-glob"),Ke=require("tar-fs"),Xe=require("gunzip-maybe");function Qe(u){var e=Object.create(null);return u&&Object.keys(u).forEach(function(t){if(t!=="default"){var r=Object.getOwnPropertyDescriptor(u,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:s(function(){return u[t]},"get")})}}),e.default=u,Object.freeze(e)}s(Qe,"_interopNamespaceDefault");var ut=Qe(Ue);const et=s(u=>({start:k.hrtime.bigint(),command:u.map(e=>tt(Ge.stripVTControlCharacters(e))).join(" "),state:{stdout:"",stderr:"",output:"",isIterating:{},nonIterable:[!1,!1]}}),"getContext"),tt=s(u=>/[^\w./-]/.test(u)?`'${u.replaceAll("'","'\\''")}'`:u,"getCommandPart"),rt=s(({stdin:u,stdout:e,stderr:t,stdio:r=[u,e,t],env:o,preferLocal:n,cwd:D=".",...i})=>{const a=D instanceof URL?Ou.fileURLToPath(D):g.resolve(D),l=o?{...k.env,...o}:void 0,p=r[0]?.string;return{...i,input:p,stdio:p===void 0?r:["pipe",...r.slice(1)],env:n?ot(l??k.env,a):l,cwd:a}},"getOptions"),ot=s(({Path:u="",PATH:e=u,...t},r)=>{const o=e.split(g.delimiter),n=Ru([],g.resolve(r)).map(D=>g.join(D,"node_modules/.bin")).filter(D=>!o.includes(D));return{...t,PATH:[...n,e].filter(Boolean).join(g.delimiter)}},"addLocalPath"),Ru=s((u,e)=>u.at(-1)===e?u:Ru([...u,e],g.resolve(e,"..")),"getLocalPaths"),nt=s(async(u,e,t)=>await Dt(u,t)?[au(u),e.map(r=>ct(r)),{...t,shell:!0}]:[u,e,t],"applyForceShell"),Dt=s(async(u,{shell:e,cwd:t,env:r=k.env})=>k.platform==="win32"&&!e&&!await it(u,t,r),"shouldForceShell"),it=s((u,e,{Path:t="",PATH:r=t})=>Su.some(o=>u.toLowerCase().endsWith(o))||lt(u,e,r),"isExe"),at={},ju=s(u=>(...e)=>at[e.join("\0")]??=u(...e),"memoize"),st=ju($.access),lt=ju(async(u,e,t)=>{const r=t.split(g.delimiter).filter(Boolean).map(o=>o.replace(/^"(.*)"$/,"$1"));try{await Promise.any([e,...r].flatMap(o=>Su.map(n=>st(`${g.resolve(o,u)}${n}`))))}catch{return!1}return!0}),Su=[".exe",".com"],ct=s(u=>au(au(`"${u.replaceAll(/(\\*)"/g,'$1$1\\"').replace(/(\\*)$/,"$1$1")}"`)),"escapeArgument"),au=s(u=>u.replaceAll(/([()\][%!^"`<>&|;, *?])/g,"^$1"),"escapeFile"),Ft=s(async(u,{input:e},t)=>{const r=await u;e!==void 0&&r.stdin.end(e);const o=iu.once(r,"close");try{return await Promise.race([o,...r.stdio.filter(Boolean).map(n=>pt(n))]),ft(t,Iu(r)),Pu(t)}catch(n){throw await Promise.allSettled([o]),xu(n,r,t)}},"getResult"),pt=s(async u=>{for await(const[e]of iu.on(u,"error"))if(!["ERR_STREAM_PREMATURE_CLOSE","EPIPE"].includes(e?.code))throw e},"onStreamError"),ft=s(({command:u},{exitCode:e,signalName:t})=>{if(t!==void 0)throw new Z(`Command was terminated with ${t}: ${u}`);if(e!==void 0)throw new Z(`Command failed with exit code ${e}: ${u}`)},"checkFailure"),xu=s((u,e,t)=>Object.assign(dt(u,t),Iu(e),Pu(t)),"getResultError"),dt=s((u,{command:e})=>u instanceof Z?u:new Z(`Command failed: ${e}`,{cause:u}),"getErrorInstance");class Z extends Error{static{s(this,"SubprocessError")}name="SubprocessError"}const Iu=s(({exitCode:u,signalCode:e})=>({...u<1?{}:{exitCode:u},...e===null?{}:{signalName:e}}),"getErrorOutput"),Pu=s(({state:{stdout:u,stderr:e,output:t},command:r,start:o})=>({stdout:su(u),stderr:su(e),output:su(t),command:r,durationMs:Number(k.hrtime.bigint()-o)/1e6}),"getOutputs"),su=s(u=>u.at(-1)===`
3
+ `?u.slice(0,u.at(-2)==="\r"?-2:-1):u,"getOutput"),ht=s(async(u,e,t,r)=>{try{["node","node.exe"].includes(u.toLowerCase())&&(u=k.execPath,e=[...k.execArgv.filter(n=>!n.startsWith("--inspect")),...e]),[u,e,t]=await nt(u,e,t),[u,e,t]=Et(u,e,t);const o=Ve.spawn(u,e,t);return _u(o.stdout,r,"stdout"),_u(o.stderr,r,"stderr"),o.once("error",()=>{}),await iu.once(o,"spawn"),o}catch(o){throw xu(o,{},r)}},"spawnSubprocess"),Et=s((u,e,t)=>t.shell&&e.length>0?[[u,...e].join(" "),[],t]:[u,e,t],"concatenateShell"),_u=s((u,{state:e},t)=>{u&&(u.setEncoding("utf8"),e.isIterating[t]||(e.isIterating[t]=!1,u.on("data",r=>{e[t]+=r,e.output+=r})))},"bufferOutput"),Ct=s(async u=>{const[[e,t]]=await Promise.all([Promise.allSettled(u),gt(u)]);if(t.reason)throw t.reason.pipedFrom=e.reason??e.value,t.reason;if(e.reason)throw e.reason;return{...t.value,pipedFrom:e.value}},"handlePipe"),gt=s(async u=>{try{const[{stdout:e},{stdin:t}]=await Promise.all(u.map(({nodeChildProcess:r})=>r));if(t===null)throw new Error('The "stdin" option must be set on the first "spawn()" call in the pipeline.');if(e===null)throw new Error('The "stdout" option must be set on the last "spawn()" call in the pipeline.');ku.pipeline(e,t).catch(()=>{})}catch(e){throw await Promise.allSettled(u.map(({nodeChildProcess:t})=>mt(t))),e}},"pipeStreams"),mt=s(async u=>{const{stdin:e}=await u;e.end()},"closeStdin"),Nu=s(async function*(u,{state:e},t,r){if(e.isIterating[t]===!1)throw new Error(`The subprocess must be iterated right away, for example:
4
+ for await (const line of spawn(...)) { ... }`);e.isIterating[t]=!0;try{const{[t]:o}=await u.nodeChildProcess;if(!o){e.nonIterable[r]=!0;const n=e.nonIterable.every(Boolean)?"either the option `stdout` or `stderr`":`the option \`${t}\``;throw new TypeError(`The subprocess cannot be iterated unless ${n} is 'pipe'.`)}Bt(u),yield*ut.createInterface({input:o})}finally{await u}},"lineIterator"),Bt=s(async u=>{try{await u}catch{}},"handleErrors"),wt=s(async function*({state:u},...e){try{let t=[];for(;e.length>0;){t=e.map((i,a)=>t[a]??bt(i,a,u));const[{value:r,done:o},n]=await Promise.race(t.map((i,a)=>Promise.all([i,a]))),[D]=e.splice(n,1);t.splice(n,1),o||(e.push(D),yield r)}}finally{await Promise.all(e.map(t=>t.return()))}},"combineAsyncIterators"),bt=s(async(u,e,{nonIterable:t})=>{try{return await u.next()}catch(r){return yt(t,e)?u.return():u.throw(r)}},"getNext"),yt=s((u,e)=>u.every(Boolean)?e!==u.length-1:u[e],"shouldIgnoreError");function T(u,e,t,r){const[o=[],n={}]=Array.isArray(e)?[e,t]:[[],e],D=et([u,...o]),i=rt(n),a=ht(u,o,i,D);let l=Ft(a,i,D);Object.assign(l,{nodeChildProcess:a}),l=r?Ct([r,l]):l;const p=Nu(l,D,"stdout",0),F=Nu(l,D,"stderr",1);return Object.assign(l,{nodeChildProcess:a,stdout:p,stderr:F,[Symbol.asyncIterator]:()=>wt(D,p,F),pipe:s((f,c,d)=>T(f,c,d,l),"pipe")})}s(T,"spawn");var At=Object.defineProperty,A=s((u,e)=>At(u,"name",{value:e,configurable:!0}),"a");const vt="known-flag",$t="unknown-flag",Tt="argument",Ot=/\B([A-Z])/g,kt=A(u=>u.replaceAll(Ot,"-$1").toLowerCase(),"camelToKebab"),{hasOwnProperty:Mt}=Object.prototype,U=A((u,e)=>Mt.call(u,e),"hasOwn"),lu=A(u=>typeof u=="function"?[u,!1]:Array.isArray(u)?[u[0],!0]:lu(u.type),"parseFlagType"),Lu=A((u,e)=>u===Boolean?e!=="false":e,"normalizeBoolean"),Wu=A((u,e)=>typeof e=="boolean"?e:u===Number&&e===""?Number.NaN:u(e),"applyParser"),Rt=/[\s.:=]/,jt=A(u=>{const e=`Flag name "${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 t=u.match(Rt);if(t)throw new Error(`${e} cannot contain "${t?.[0]}"`)},"validateFlagName"),cu=A((u,e,t)=>{if(U(u,e))throw new Error(`Duplicate flags named "${e}"`);u[e]=t},"setFlag"),St=A(u=>{const e={};for(const t in u){if(!U(u,t))continue;jt(t);const r=u[t],o=[[],...lu(r),r];cu(e,t,o);const n=kt(t);if(t!==n&&cu(e,n,o),"alias"in r&&typeof r.alias=="string"){const{alias:D}=r,i=`Flag alias "${D}" for flag "${t}"`;if(D.length===0)throw new Error(`${i} cannot be empty`);if(D.length>1)throw new Error(`${i} must be a single character`);cu(e,D,o)}}return e},"createRegistry"),xt=A((u,e)=>{const t={};for(const r in u){if(!U(u,r))continue;const[o,,n,D]=e[r];if(o.length===0&&"default"in D){let{default:i}=D;typeof i=="function"&&(i=i()),t[r]=i}else t[r]=n?o:o.pop()}return t},"finalizeFlags"),K="--",It=3,Pt=/^-{1,2}\w/,qu=A(u=>{if(!Pt.test(u))return;const e=!u.startsWith(K);let t=u.slice(e?1:2),r,o=-1;for(const n of["=",":","."]){const D=t.indexOf(n);D!==-1&&(o===-1||D<o)&&(o=D)}return o!==-1&&(r=t.slice(o+1),t=t.slice(0,o)),[t,r,e]},"parseFlagArgv"),zu=A((u,{onFlag:e,onArgument:t})=>{let r;const o=A((n,D)=>{if(typeof r!="function")return!0;r(n,D),r=void 0},"triggerValueCallback");for(let n=0;n<u.length;n+=1){const D=u[n];if(D===K){o();const a=u.slice(n+1);t?.(a,[n],!0);break}const i=qu(D);if(i){if(o(),!e)continue;const[a,l,p]=i;if(p)for(let F=0;F<a.length;F+=1){o();const f=F===a.length-1;r=e(a[F],f?l:void 0,[n,F+1,f])}else r=e(a,l,[n])}else o(D,[n])&&t?.([D],[n])}o()},"argvIterator"),Gu=A((u,e)=>{for(let t=e.length-1;t>=0;t-=1){const[r,o,n]=e[t];if(o){const D=u[r];let i=D.slice(0,o);if(n||(i+=D.slice(o+1)),i!=="-"){u[r]=i;continue}}u.splice(r,1)}},"spliceFromArgv"),_t=A((u,e=process.argv.slice(2),{ignore:t}={})=>{const r=[],o=St(u),n={},D=[];return D[K]=[],zu(e,{onFlag(i,a,l){const p=(l.length===It||i.length>1)&&U(o,i);if(!t?.(p?vt:$t,i,a)){if(p){const[F,f]=o[i],c=Lu(f,a),d=A((h,B)=>{r.push(l),B&&r.push(B),F.push(Wu(f,h||""))},"getFollowingValue");return c===void 0?d:d(c)}U(n,i)||(n[i]=[]),n[i].push(a===void 0?!0:a),r.push(l)}},onArgument:A((i,a,l)=>{t?.(Tt,e[a[0]])||(D.push(...i),l?(D[K]=i,e.splice(a[0])):r.push(a))},"onArgument")}),Gu(e,r),{flags:xt(u,o),unknownFlags:n,_:D}},"typeFlag");A((u,e,t=process.argv.slice(2))=>{const r=new Set(u.split(",").map(a=>qu(a)?.[0])),[o,n]=lu(e),D=[],i=[];return zu(t,{onFlag:A((a,l,p)=>{if(!r.has(a)||!n&&D.length>0)return;const F=Lu(o,l),f=A((c,d)=>{i.push(p),d&&i.push(d),D.push(Wu(o,c||""))},"getFollowingValue");return F===void 0?f:f(F)},"onFlag")}),Gu(t,i),n?D:D[0]},"getFlag");var Nt=Object.defineProperty,E=s((u,e)=>Nt(u,"name",{value:e,configurable:!0}),"n");const Lt=E(u=>{const e=process.stdout.columns??Number.POSITIVE_INFINITY;return typeof u=="function"&&(u=u(e)),u||(u={}),Array.isArray(u)?{columns:u,stdoutColumns:e}:{columns:u.columns??[],stdoutColumns:u.stdoutColumns??e}},"getOptions");function Vu({onlyFirst:u=!1}={}){const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(e,u?void 0:"g")}s(Vu,"j"),E(Vu,"ansiRegex");const Wt=Vu();function Fu(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(Wt,"")}s(Fu,"w"),E(Fu,"stripAnsi");function Uu(u){return u===161||u===164||u===167||u===168||u===170||u===173||u===174||u>=176&&u<=180||u>=182&&u<=186||u>=188&&u<=191||u===198||u===208||u===215||u===216||u>=222&&u<=225||u===230||u>=232&&u<=234||u===236||u===237||u===240||u===242||u===243||u>=247&&u<=250||u===252||u===254||u===257||u===273||u===275||u===283||u===294||u===295||u===299||u>=305&&u<=307||u===312||u>=319&&u<=322||u===324||u>=328&&u<=331||u===333||u===338||u===339||u===358||u===359||u===363||u===462||u===464||u===466||u===468||u===470||u===472||u===474||u===476||u===593||u===609||u===708||u===711||u>=713&&u<=715||u===717||u===720||u>=728&&u<=731||u===733||u===735||u>=768&&u<=879||u>=913&&u<=929||u>=931&&u<=937||u>=945&&u<=961||u>=963&&u<=969||u===1025||u>=1040&&u<=1103||u===1105||u===8208||u>=8211&&u<=8214||u===8216||u===8217||u===8220||u===8221||u>=8224&&u<=8226||u>=8228&&u<=8231||u===8240||u===8242||u===8243||u===8245||u===8251||u===8254||u===8308||u===8319||u>=8321&&u<=8324||u===8364||u===8451||u===8453||u===8457||u===8467||u===8470||u===8481||u===8482||u===8486||u===8491||u===8531||u===8532||u>=8539&&u<=8542||u>=8544&&u<=8555||u>=8560&&u<=8569||u===8585||u>=8592&&u<=8601||u===8632||u===8633||u===8658||u===8660||u===8679||u===8704||u===8706||u===8707||u===8711||u===8712||u===8715||u===8719||u===8721||u===8725||u===8730||u>=8733&&u<=8736||u===8739||u===8741||u>=8743&&u<=8748||u===8750||u>=8756&&u<=8759||u===8764||u===8765||u===8776||u===8780||u===8786||u===8800||u===8801||u>=8804&&u<=8807||u===8810||u===8811||u===8814||u===8815||u===8834||u===8835||u===8838||u===8839||u===8853||u===8857||u===8869||u===8895||u===8978||u>=9312&&u<=9449||u>=9451&&u<=9547||u>=9552&&u<=9587||u>=9600&&u<=9615||u>=9618&&u<=9621||u===9632||u===9633||u>=9635&&u<=9641||u===9650||u===9651||u===9654||u===9655||u===9660||u===9661||u===9664||u===9665||u>=9670&&u<=9672||u===9675||u>=9678&&u<=9681||u>=9698&&u<=9701||u===9711||u===9733||u===9734||u===9737||u===9742||u===9743||u===9756||u===9758||u===9792||u===9794||u===9824||u===9825||u>=9827&&u<=9829||u>=9831&&u<=9834||u===9836||u===9837||u===9839||u===9886||u===9887||u===9919||u>=9926&&u<=9933||u>=9935&&u<=9939||u>=9941&&u<=9953||u===9955||u===9960||u===9961||u>=9963&&u<=9969||u===9972||u>=9974&&u<=9977||u===9979||u===9980||u===9982||u===9983||u===10045||u>=10102&&u<=10111||u>=11094&&u<=11097||u>=12872&&u<=12879||u>=57344&&u<=63743||u>=65024&&u<=65039||u===65533||u>=127232&&u<=127242||u>=127248&&u<=127277||u>=127280&&u<=127337||u>=127344&&u<=127373||u===127375||u===127376||u>=127387&&u<=127404||u>=917760&&u<=917999||u>=983040&&u<=1048573||u>=1048576&&u<=1114109}s(Uu,"P$1"),E(Uu,"isAmbiguous");function Hu(u){return u===12288||u>=65281&&u<=65376||u>=65504&&u<=65510}s(Hu,"z$1"),E(Hu,"isFullWidth");function Yu(u){return u>=4352&&u<=4447||u===8986||u===8987||u===9001||u===9002||u>=9193&&u<=9196||u===9200||u===9203||u===9725||u===9726||u===9748||u===9749||u>=9776&&u<=9783||u>=9800&&u<=9811||u===9855||u>=9866&&u<=9871||u===9875||u===9889||u===9898||u===9899||u===9917||u===9918||u===9924||u===9925||u===9934||u===9940||u===9962||u===9970||u===9971||u===9973||u===9978||u===9981||u===9989||u===9994||u===9995||u===10024||u===10060||u===10062||u>=10067&&u<=10069||u===10071||u>=10133&&u<=10135||u===10160||u===10175||u===11035||u===11036||u===11088||u===11093||u>=11904&&u<=11929||u>=11931&&u<=12019||u>=12032&&u<=12245||u>=12272&&u<=12287||u>=12289&&u<=12350||u>=12353&&u<=12438||u>=12441&&u<=12543||u>=12549&&u<=12591||u>=12593&&u<=12686||u>=12688&&u<=12773||u>=12783&&u<=12830||u>=12832&&u<=12871||u>=12880&&u<=42124||u>=42128&&u<=42182||u>=43360&&u<=43388||u>=44032&&u<=55203||u>=63744&&u<=64255||u>=65040&&u<=65049||u>=65072&&u<=65106||u>=65108&&u<=65126||u>=65128&&u<=65131||u>=94176&&u<=94180||u===94192||u===94193||u>=94208&&u<=100343||u>=100352&&u<=101589||u>=101631&&u<=101640||u>=110576&&u<=110579||u>=110581&&u<=110587||u===110589||u===110590||u>=110592&&u<=110882||u===110898||u>=110928&&u<=110930||u===110933||u>=110948&&u<=110951||u>=110960&&u<=111355||u>=119552&&u<=119638||u>=119648&&u<=119670||u===126980||u===127183||u===127374||u>=127377&&u<=127386||u>=127488&&u<=127490||u>=127504&&u<=127547||u>=127552&&u<=127560||u===127568||u===127569||u>=127584&&u<=127589||u>=127744&&u<=127776||u>=127789&&u<=127797||u>=127799&&u<=127868||u>=127870&&u<=127891||u>=127904&&u<=127946||u>=127951&&u<=127955||u>=127968&&u<=127984||u===127988||u>=127992&&u<=128062||u===128064||u>=128066&&u<=128252||u>=128255&&u<=128317||u>=128331&&u<=128334||u>=128336&&u<=128359||u===128378||u===128405||u===128406||u===128420||u>=128507&&u<=128591||u>=128640&&u<=128709||u===128716||u>=128720&&u<=128722||u>=128725&&u<=128727||u>=128732&&u<=128735||u===128747||u===128748||u>=128756&&u<=128764||u>=128992&&u<=129003||u===129008||u>=129292&&u<=129338||u>=129340&&u<=129349||u>=129351&&u<=129535||u>=129648&&u<=129660||u>=129664&&u<=129673||u>=129679&&u<=129734||u>=129742&&u<=129756||u>=129759&&u<=129769||u>=129776&&u<=129784||u>=131072&&u<=196605||u>=196608&&u<=262141}s(Yu,"G$1"),E(Yu,"isWide");function Ju(u){if(!Number.isSafeInteger(u))throw new TypeError(`Expected a code point, got \`${typeof u}\`.`)}s(Ju,"Z$1"),E(Ju,"validate");function Zu(u,{ambiguousAsWide:e=!1}={}){return Ju(u),Hu(u)||Yu(u)||e&&Uu(u)?2:1}s(Zu,"V$1"),E(Zu,"eastAsianWidth");var qt=E(()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\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?|[\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](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\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-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,"emojiRegex");const zt=new Intl.Segmenter,Gt=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function x(u,e={}){if(typeof u!="string"||u.length===0)return 0;const{ambiguousIsNarrow:t=!0,countAnsiEscapeCodes:r=!1}=e;if(r||(u=Fu(u)),u.length===0)return 0;let o=0;const n={ambiguousAsWide:!t};for(const{segment:D}of zt.segment(u)){const i=D.codePointAt(0);if(!(i<=31||i>=127&&i<=159)&&!(i>=8203&&i<=8207||i===65279)&&!(i>=768&&i<=879||i>=6832&&i<=6911||i>=7616&&i<=7679||i>=8400&&i<=8447||i>=65056&&i<=65071)&&!(i>=55296&&i<=57343)&&!(i>=65024&&i<=65039)&&!Gt.test(D)){if(qt().test(D)){o+=2;continue}o+=Zu(i,n)}}return o}s(x,"d"),E(x,"stringWidth");const Ku=E(u=>Math.max(...u.split(`
5
+ `).map(e=>x(e))),"getLongestLineWidth"),Vt=E(u=>{const e=[];for(const t of u){const{length:r}=t,o=r-e.length;for(let n=0;n<o;n+=1)e.push(0);for(let n=0;n<r;n+=1){const D=Ku(t[n]);D>e[n]&&(e[n]=D)}}return e},"getColumnContentWidths"),Xu=/^\d+%$/,Qu={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},Ut=E((u,e)=>{const t=[];for(let r=0;r<u.length;r+=1){const o=e[r]??"auto";if(typeof o=="number"||o==="auto"||o==="content-width"||typeof o=="string"&&Xu.test(o)){t.push({...Qu,width:o,contentWidth:u[r]});continue}if(o&&typeof o=="object"){const n={...Qu,...o,contentWidth:u[r]};n.horizontalPadding=n.paddingLeft+n.paddingRight,t.push(n);continue}throw new Error(`Invalid column width: ${JSON.stringify(o)}`)}return t},"initColumns"),Ht=E((u,e)=>{for(const t of u){const{width:r}=t;if(r==="content-width"&&(t.width=t.contentWidth),r==="auto"){const a=Math.min(20,t.contentWidth);t.width=a,t.autoOverflow=t.contentWidth-a}if(typeof r=="string"&&Xu.test(r)){const a=Number.parseFloat(r.slice(0,-1))/100;t.width=Math.floor(e*a)-(t.paddingLeft+t.paddingRight)}const{horizontalPadding:o}=t,n=1,D=n+o;if(D>=e){const a=D-e,l=Math.ceil(t.paddingLeft/o*a),p=a-l;t.paddingLeft-=l,t.paddingRight-=p,t.horizontalPadding=t.paddingLeft+t.paddingRight}t.paddingLeftString=t.paddingLeft?" ".repeat(t.paddingLeft):"",t.paddingRightString=t.paddingRight?" ".repeat(t.paddingRight):"";const i=e-t.horizontalPadding;t.width=Math.max(Math.min(t.width,i),n)}},"resolveColumnWidths"),ue=E(()=>Object.assign([],{columns:0}),"makeRow"),Yt=E((u,e)=>{const t=[ue()];let[r]=t;for(const o of u){const n=o.width+o.horizontalPadding;r.columns+n>e&&(r=ue(),t.push(r)),r.push(o),r.columns+=n}for(const o of t){const n=o.reduce((f,c)=>f+c.width+c.horizontalPadding,0);let D=e-n;if(D===0)continue;const i=o.filter(f=>"autoOverflow"in f),a=i.filter(f=>f.autoOverflow>0),l=a.reduce((f,c)=>f+c.autoOverflow,0),p=Math.min(l,D);for(const f of a){const c=Math.floor(f.autoOverflow/l*p);f.width+=c,D-=c}const F=Math.floor(D/i.length);for(let f=0;f<i.length;f+=1){const c=i[f];f===i.length-1?c.width+=D:c.width+=F,D-=F}}return t},"balanceAuto"),Jt=E((u,e,t)=>{const r=Ut(t,e);return Ht(r,u),Yt(r,u)},"computeColumnWidths"),pu=10,ee=E((u=0)=>e=>`\x1B[${e+u}m`,"wrapAnsi16"),te=E((u=0)=>e=>`\x1B[${38+u};5;${e}m`,"wrapAnsi256"),re=E((u=0)=>(e,t,r)=>`\x1B[${38+u};2;${e};${t};${r}m`,"wrapAnsi16m"),b={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],gray:[90,39],grey:[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],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(b.modifier);const Zt=Object.keys(b.color),Kt=Object.keys(b.bgColor);[...Zt,...Kt];function oe(){const u=new Map;for(const[e,t]of Object.entries(b)){for(const[r,o]of Object.entries(t))b[r]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},t[r]=b[r],u.set(o[0],o[1]);Object.defineProperty(b,e,{value:t,enumerable:!1})}return Object.defineProperty(b,"codes",{value:u,enumerable:!1}),b.color.close="\x1B[39m",b.bgColor.close="\x1B[49m",b.color.ansi=ee(),b.color.ansi256=te(),b.color.ansi16m=re(),b.bgColor.ansi=ee(pu),b.bgColor.ansi256=te(pu),b.bgColor.ansi16m=re(pu),Object.defineProperties(b,{rgbToAnsi256:{value:E((e,t,r)=>e===t&&t===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(r/255*5),"value"),enumerable:!1},hexToRgb:{value:E(e=>{const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[r]=t;r.length===3&&(r=[...r].map(n=>n+n).join(""));const o=Number.parseInt(r,16);return[o>>16&255,o>>8&255,o&255]},"value"),enumerable:!1},hexToAnsi256:{value:E(e=>b.rgbToAnsi256(...b.hexToRgb(e)),"value"),enumerable:!1},ansi256ToAnsi:{value:E(e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,r,o;if(e>=232)t=((e-232)*10+8)/255,r=t,o=t;else{e-=16;const i=e%36;t=Math.floor(e/36)/5,r=Math.floor(i/6)/5,o=i%6/5}const n=Math.max(t,r,o)*2;if(n===0)return 30;let D=30+(Math.round(o)<<2|Math.round(r)<<1|Math.round(t));return n===2&&(D+=60),D},"value"),enumerable:!1},rgbToAnsi:{value:E((e,t,r)=>b.ansi256ToAnsi(b.rgbToAnsi256(e,t,r)),"value"),enumerable:!1},hexToAnsi:{value:E(e=>b.ansi256ToAnsi(b.hexToAnsi256(e)),"value"),enumerable:!1}}),b}s(oe,"FD"),E(oe,"assembleStyles");const Xt=oe(),X=new Set(["\x1B","\x9B"]),Qt=39,fu="\x07",ne="[",ur="]",De="m",Q=`${ur}8;;`,ie=E(u=>`${X.values().next().value}${ne}${u}${De}`,"wrapAnsiCode"),ae=E(u=>`${X.values().next().value}${Q}${u}${fu}`,"wrapAnsiHyperlink"),er=E(u=>u.split(" ").map(e=>x(e)),"wordLengths"),du=E((u,e,t)=>{const r=[...e];let o=!1,n=!1,D=x(Fu(u.at(-1)));for(const[i,a]of r.entries()){const l=x(a);if(D+l<=t?u[u.length-1]+=a:(u.push(a),D=0),X.has(a)&&(o=!0,n=r.slice(i+1,i+1+Q.length).join("")===Q),o){n?a===fu&&(o=!1,n=!1):a===De&&(o=!1);continue}D+=l,D===t&&i<r.length-1&&(u.push(""),D=0)}!D&&u.at(-1).length>0&&u.length>1&&(u[u.length-2]+=u.pop())},"wrapWord"),tr=E(u=>{const e=u.split(" ");let t=e.length;for(;t>0&&!(x(e[t-1])>0);)t--;return t===e.length?u:e.slice(0,t).join(" ")+e.slice(t).join("")},"stringVisibleTrimSpacesRight"),rr=E((u,e,t={})=>{if(t.trim!==!1&&u.trim()==="")return"";let r="",o,n;const D=er(u);let i=[""];for(const[F,f]of u.split(" ").entries()){t.trim!==!1&&(i[i.length-1]=i.at(-1).trimStart());let c=x(i.at(-1));if(F!==0&&(c>=e&&(t.wordWrap===!1||t.trim===!1)&&(i.push(""),c=0),(c>0||t.trim===!1)&&(i[i.length-1]+=" ",c++)),t.hard&&D[F]>e){const d=e-c,h=1+Math.floor((D[F]-d-1)/e);Math.floor((D[F]-1)/e)<h&&i.push(""),du(i,f,e);continue}if(c+D[F]>e&&c>0&&D[F]>0){if(t.wordWrap===!1&&c<e){du(i,f,e);continue}i.push("")}if(c+D[F]>e&&t.wordWrap===!1){du(i,f,e);continue}i[i.length-1]+=f}t.trim!==!1&&(i=i.map(F=>tr(F)));const a=i.join(`
6
+ `),l=[...a];let p=0;for(const[F,f]of l.entries()){if(r+=f,X.has(f)){const{groups:d}=new RegExp(`(?:\\${ne}(?<code>\\d+)m|\\${Q}(?<uri>.*)${fu})`).exec(a.slice(p))||{groups:{}};if(d.code!==void 0){const h=Number.parseFloat(d.code);o=h===Qt?void 0:h}else d.uri!==void 0&&(n=d.uri.length===0?void 0:d.uri)}const c=Xt.codes.get(Number(o));l[F+1]===`
7
+ `?(n&&(r+=ae("")),o&&c&&(r+=ie(c))):f===`
8
+ `&&(o&&c&&(r+=ie(o)),n&&(r+=ae(n))),p+=f.length}return r},"exec");function se(u,e,t){return String(u).normalize().replaceAll(`\r
9
+ `,`
9
10
  `).split(`
10
- `).map(t=>Ue(t,D,e)).join(`
11
- `)}n(He,"T$1");var Yu=n(u=>Array.from({length:u}).fill(""),"X");function Ve(u,D){let e=[],t=0;for(let r of u){let o=0,i=r.map(s=>{var l;let c=(l=D[t])!=null?l:"";t+=1,s.preprocess&&(c=s.preprocess(c)),Iu(c)>s.width&&(c=He(c,s.width,{hard:!0}));let F=c.split(`
12
- `);if(s.postprocess){let{postprocess:C}=s;F=F.map((E,p)=>C.call(s,E,p))}return s.paddingTop&&F.unshift(...Yu(s.paddingTop)),s.paddingBottom&&F.push(...Yu(s.paddingBottom)),F.length>o&&(o=F.length),Du(z({},s),{lines:F})}),a=[];for(let s=0;s<o;s+=1){let l=i.map(c=>{var F;let C=(F=c.lines[s])!=null?F:"",E=Number.isFinite(c.width)?" ".repeat(c.width-k(C)):"",p=c.paddingLeftString;return c.align==="right"&&(p+=E),p+=C,c.align==="left"&&(p+=E),p+c.paddingRightString}).join("");a.push(l)}e.push(a.join(`
13
- `))}return e.join(`
14
- `)}n(Ve,"P$1");function Ye(u,D){if(!u||u.length===0)return"";let e=Se(u),t=e.length;if(t===0)return"";let{stdoutColumns:r,columns:o}=Te(D);if(o.length>t)throw new Error(`${o.length} columns defined, but only ${t} columns found`);let i=Ie(r,o,e);return u.map(a=>Ve(i,a)).join(`
15
- `)}n(Ye,"mD"),h();var Je=["<",">","=",">=","<="];function Ze(u){if(!Je.includes(u))throw new TypeError(`Invalid breakpoint operator: ${u}`)}n(Ze,"xD");function Ke(u){let D=Object.keys(u).map(e=>{let[t,r]=e.split(" ");Ze(t);let o=Number.parseInt(r,10);if(Number.isNaN(o))throw new TypeError(`Invalid breakpoint value: ${r}`);let i=u[e];return{operator:t,breakpoint:o,value:i}}).sort((e,t)=>t.breakpoint-e.breakpoint);return e=>{var t;return(t=D.find(({operator:r,breakpoint:o})=>r==="="&&e===o||r===">"&&e>o||r==="<"&&e<o||r===">="&&e>=o||r==="<="&&e<=o))==null?void 0:t.value}}n(Ke,"wD");const Xe=n(u=>u.replace(/[\W_]([a-z\d])?/gi,(D,e)=>e?e.toUpperCase():""),"P"),Qe=n(u=>u.replace(/\B([A-Z])/g,"-$1").toLowerCase(),"q"),ut={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:n(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 Dt(u){let D=!1;return{type:"table",data:{tableData:Object.keys(u).sort((e,t)=>e.localeCompare(t)).map(e=>{const t=u[e],r="alias"in t;return r&&(D=!0),{name:e,flag:t,flagFormatted:`--${Qe(e)}`,aliasesEnabled:D,aliasFormatted:r?`-${t.alias}`:void 0}}).map(e=>(e.aliasesEnabled=D,[{type:"flagName",data:e},{type:"flagDescription",data:e}])),tableBreakpoints:ut}}}n(Dt,"D");const Ju=n(u=>!u||(u.version??(u.help?u.help.version:void 0)),"A"),Zu=n(u=>{const D="parent"in u&&u.parent?.name;return(D?`${D} `:"")+u.name},"C");function et(u){const D=[];u.name&&D.push(Zu(u));const e=Ju(u)??("parent"in u&&Ju(u.parent));if(e&&D.push(`v${e}`),D.length!==0)return{id:"name",type:"text",data:`${D.join(" ")}
16
- `}}n(et,"R");function tt(u){const{help:D}=u;if(!(!D||!D.description))return{id:"description",type:"text",data:`${D.description}
17
- `}}n(tt,"L");function rt(u){const D=u.help||{};if("usage"in D)return D.usage?{id:"usage",type:"section",data:{title:"Usage:",body:Array.isArray(D.usage)?D.usage.join(`
18
- `):D.usage}}:void 0;if(u.name){const e=[],t=[Zu(u)];if(u.flags&&Object.keys(u.flags).length>0&&t.push("[flags...]"),u.parameters&&u.parameters.length>0){const{parameters:r}=u,o=r.indexOf("--"),i=o>-1&&r.slice(o+1).some(a=>a.startsWith("<"));t.push(r.map(a=>a!=="--"?a:i?"--":"[--]").join(" "))}if(t.length>1&&e.push(t.join(" ")),"commands"in u&&u.commands?.length&&e.push(`${u.name} <command>`),e.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:e.join(`
19
- `)}}}}n(rt,"T");function ot(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(D=>[D.options.name,D.options.help?D.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}n(ot,"_");function nt(u){if(!(!u.flags||Object.keys(u.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:Dt(u.flags),indentBody:0}}}n(nt,"k");function it(u){const{help:D}=u;if(!D||!D.examples||D.examples.length===0)return;let{examples:e}=D;if(Array.isArray(e)&&(e=e.join(`
20
- `)),e)return{id:"examples",type:"section",data:{title:"Examples:",body:e}}}n(it,"F");function at(u){if(!("alias"in u)||!u.alias)return;const{alias:D}=u;return{id:"aliases",type:"section",data:{title:"Aliases:",body:Array.isArray(D)?D.join(", "):D}}}n(at,"H");const st=n(u=>[et,tt,rt,ot,nt,it,at].map(D=>D(u)).filter(Boolean),"U"),lt=bu.WriteStream.prototype.hasColors();class Ft{static{n(this,"J")}text(D){return D}bold(D){return lt?`\x1B[1m${D}\x1B[22m`:D.toLocaleUpperCase()}indentText({text:D,spaces:e}){return D.replace(/^/gm," ".repeat(e))}heading(D){return this.bold(D)}section({title:D,body:e,indentBody:t=2}){return`${(D?`${this.heading(D)}
21
- `:"")+(e?this.indentText({text:this.render(e),spaces:t}):"")}
22
- `}table({tableData:D,tableOptions:e,tableBreakpoints:t}){return Ye(D.map(r=>r.map(o=>this.render(o))),t?Ke(t):e)}flagParameter(D){return D===Boolean?"":D===String?"<string>":D===Number?"<number>":Array.isArray(D)?this.flagParameter(D[0]):"<value>"}flagOperator(D){return" "}flagName(D){const{flag:e,flagFormatted:t,aliasesEnabled:r,aliasFormatted:o}=D;let i="";if(o?i+=`${o}, `:r&&(i+=" "),i+=t,"placeholder"in e&&typeof e.placeholder=="string")i+=`${this.flagOperator(D)}${e.placeholder}`;else{const a=this.flagParameter("type"in e?e.type:e);a&&(i+=`${this.flagOperator(D)}${a}`)}return i}flagDefault(D){return JSON.stringify(D)}flagDescription({flag:D}){let e="description"in D?D.description??"":"";if("default"in D){let{default:t}=D;typeof t=="function"&&(t=t()),t&&(e+=` (default: ${this.flagDefault(t)})`)}return e}render(D){if(typeof D=="string")return D;if(Array.isArray(D))return D.map(e=>this.render(e)).join(`
23
- `);if("type"in D&&this[D.type]){const e=this[D.type];if(typeof e=="function")return e.call(this,D.data)}throw new Error(`Invalid node type: ${JSON.stringify(D)}`)}}const Ku=n(u=>u.length>0&&!u.includes(" "),"y"),{stringify:b}=JSON,ct=/[|\\{}()[\]^$+*?.]/;function nu(u){const D=[];let e,t;for(const r of u){if(t)throw new Error(`Invalid parameter: Spread parameter ${b(t)} must be last`);const o=r[0],i=r[r.length-1];let a;if(o==="<"&&i===">"&&(a=!0,e))throw new Error(`Invalid parameter: Required parameter ${b(r)} cannot come after optional parameter ${b(e)}`);if(o==="["&&i==="]"&&(a=!1,e=r),a===void 0)throw new Error(`Invalid parameter: ${b(r)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let s=r.slice(1,-1);const l=s.slice(-3)==="...";l&&(t=r,s=s.slice(0,-3));const c=s.match(ct);if(c)throw new Error(`Invalid parameter: ${b(r)}. Invalid character found ${b(c[0])}`);D.push({name:s,required:a,spread:l})}return D}n(nu,"w");function iu(u,D,e,t){for(let r=0;r<D.length;r+=1){const{name:o,required:i,spread:a}=D[r],s=Xe(o);if(s in u)throw new Error(`Invalid parameter: ${b(o)} is used more than once.`);const l=a?e.slice(r):e[r];if(a&&(r=D.length),i&&(!l||a&&l.length===0))return console.error(`Error: Missing required parameter ${b(o)}
24
- `),t(),process.exit(1);u[s]=l}}n(iu,"b");function Ct(u){return u===void 0||u!==!1}n(Ct,"W");function Xu(u,D,e,t){const r={...D.flags},o=D.version;o&&(r.version={type:Boolean,description:"Show version"});const{help:i}=D,a=Ct(i);a&&!("help"in r)&&(r.help={type:Boolean,alias:"h",description:"Show help"});const s=pe(r,t,{ignore:D.ignoreArgv}),l=n(()=>{console.log(D.version)},"f");if(o&&s.flags.version===!0)return l(),process.exit(0);const c=new Ft,F=a&&i?.render?i.render:p=>c.render(p),C=n(p=>{const m=st({...D,...p?{help:p}:{},flags:r});console.log(F(m,c))},"u");if(a&&s.flags.help===!0)return C(),process.exit(0);if(D.parameters){let{parameters:p}=D,m=s._;const A=p.indexOf("--"),y=p.slice(A+1),v=Object.create(null);if(A>-1&&y.length>0){p=p.slice(0,A);const d=s._["--"];m=m.slice(0,-d.length||void 0),iu(v,nu(p),m,C),iu(v,nu(y),d,C)}else iu(v,nu(p),m,C);Object.assign(s._,v)}const E={...s,showVersion:l,showHelp:C};return typeof e=="function"&&e(E),{command:u,...E}}n(Xu,"x");function Et(u,D){const e=new Map;for(const t of D){const r=[t.options.name],{alias:o}=t.options;o&&(Array.isArray(o)?r.push(...o):r.push(o));for(const i of r){if(e.has(i))throw new Error(`Duplicate command name found: ${b(i)}`);e.set(i,t)}}return e.get(u)}n(Et,"z");function pt(u,D,e=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!Ku(u.name)))throw new Error(`Invalid script name: ${b(u.name)}`);const t=e[0];if(u.commands&&t&&Ku(t)){const r=Et(t,u.commands);if(r)return Xu(r.options.name,{...r.options,parent:u},r.callback,e.slice(1))}return Xu(void 0,u,D,e)}n(pt,"Z");let Qu={};const uD=new WeakMap,DD={metric:[{from:0,to:1e3,unit:"B",long:"bytes"},{from:1e3,to:1e6,unit:"kB",long:"kilobytes"},{from:1e6,to:1e9,unit:"MB",long:"megabytes"},{from:1e9,to:1e12,unit:"GB",long:"gigabytes"},{from:1e12,to:1e15,unit:"TB",long:"terabytes"},{from:1e15,to:1e18,unit:"PB",long:"petabytes"},{from:1e18,to:1e21,unit:"EB",long:"exabytes"},{from:1e21,to:1e24,unit:"ZB",long:"zettabytes"},{from:1e24,to:1e27,unit:"YB",long:"yottabytes"}],metric_octet:[{from:0,to:1e3,unit:"o",long:"octets"},{from:1e3,to:1e6,unit:"ko",long:"kilooctets"},{from:1e6,to:1e9,unit:"Mo",long:"megaoctets"},{from:1e9,to:1e12,unit:"Go",long:"gigaoctets"},{from:1e12,to:1e15,unit:"To",long:"teraoctets"},{from:1e15,to:1e18,unit:"Po",long:"petaoctets"},{from:1e18,to:1e21,unit:"Eo",long:"exaoctets"},{from:1e21,to:1e24,unit:"Zo",long:"zettaoctets"},{from:1e24,to:1e27,unit:"Yo",long:"yottaoctets"}],iec:[{from:0,to:Math.pow(1024,1),unit:"B",long:"bytes"},{from:Math.pow(1024,1),to:Math.pow(1024,2),unit:"KiB",long:"kibibytes"},{from:Math.pow(1024,2),to:Math.pow(1024,3),unit:"MiB",long:"mebibytes"},{from:Math.pow(1024,3),to:Math.pow(1024,4),unit:"GiB",long:"gibibytes"},{from:Math.pow(1024,4),to:Math.pow(1024,5),unit:"TiB",long:"tebibytes"},{from:Math.pow(1024,5),to:Math.pow(1024,6),unit:"PiB",long:"pebibytes"},{from:Math.pow(1024,6),to:Math.pow(1024,7),unit:"EiB",long:"exbibytes"},{from:Math.pow(1024,7),to:Math.pow(1024,8),unit:"ZiB",long:"zebibytes"},{from:Math.pow(1024,8),to:Math.pow(1024,9),unit:"YiB",long:"yobibytes"}],iec_octet:[{from:0,to:Math.pow(1024,1),unit:"o",long:"octets"},{from:Math.pow(1024,1),to:Math.pow(1024,2),unit:"Kio",long:"kibioctets"},{from:Math.pow(1024,2),to:Math.pow(1024,3),unit:"Mio",long:"mebioctets"},{from:Math.pow(1024,3),to:Math.pow(1024,4),unit:"Gio",long:"gibioctets"},{from:Math.pow(1024,4),to:Math.pow(1024,5),unit:"Tio",long:"tebioctets"},{from:Math.pow(1024,5),to:Math.pow(1024,6),unit:"Pio",long:"pebioctets"},{from:Math.pow(1024,6),to:Math.pow(1024,7),unit:"Eio",long:"exbioctets"},{from:Math.pow(1024,7),to:Math.pow(1024,8),unit:"Zio",long:"zebioctets"},{from:Math.pow(1024,8),to:Math.pow(1024,9),unit:"Yio",long:"yobioctets"}]};class ft{static{n(this,"ByteSize")}constructor(D,e){e=Object.assign({units:"metric",precision:1,locale:void 0},Qu,e),uD.set(this,e),Object.assign(DD,e.customUnits);const t=D<0?"-":"";D=Math.abs(D);const r=DD[e.units];if(r){const o=r.find(i=>D>=i.from&&D<i.to);if(o){const i=new Intl.NumberFormat(e.locale,{style:"decimal",maximumFractionDigits:e.precision}),a=o.from===0?t+i.format(D):t+i.format(D/o.from);this.value=a,this.unit=o.unit,this.long=o.long}else this.value=t+D,this.unit="",this.long=""}else throw new Error(`Invalid units specified: ${e.units}`)}toString(){const D=uD.get(this);return D.toStringFn?D.toStringFn.bind(this)():`${this.value} ${this.unit}`}}function au(u,D){return new ft(u,D)}n(au,"byteSize"),au.defaultOptions=function(u){Qu=u};let R=!0;const x=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let L=0;if(x.process&&x.process.env&&x.process.stdout){const{FORCE_COLOR:u,NODE_DISABLE_COLORS:D,NO_COLOR:e,TERM:t,COLORTERM:r}=x.process.env;D||e||u==="0"?R=!1:u==="1"||u==="2"||u==="3"?R=!0:t==="dumb"?R=!1:"CI"in x.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(o=>o in x.process.env)?R=!0:R=process.stdout.isTTY,R&&(process.platform==="win32"||r&&(r==="truecolor"||r==="24bit")?L=3:t&&(t.endsWith("-256color")||t.endsWith("256"))?L=2:L=1)}let eD={enabled:R,supportLevel:L};function su(u,D,e=1){const t=`\x1B[${u}m`,r=`\x1B[${D}m`,o=new RegExp(`\\x1b\\[${D}m`,"g");return i=>eD.enabled&&eD.supportLevel>=e?t+(""+i).replace(o,t)+r:""+i}n(su,"kolorist");const tD=su(2,22),dt=su(36,39),rD=su(94,39),lu=globalThis.window?.document!==void 0;globalThis.process?.versions?.node,globalThis.process?.versions?.bun,globalThis.Deno?.version?.deno,globalThis.process?.versions?.electron,globalThis.navigator?.userAgent?.includes("jsdom"),typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,typeof DedicatedWorkerGlobalScope<"u"&&globalThis instanceof DedicatedWorkerGlobalScope,typeof SharedWorkerGlobalScope<"u"&&globalThis instanceof SharedWorkerGlobalScope,typeof ServiceWorkerGlobalScope<"u"&&globalThis instanceof ServiceWorkerGlobalScope;const H=globalThis.navigator?.userAgentData?.platform;H==="macOS"||globalThis.navigator?.platform==="MacIntel"||globalThis.navigator?.userAgent?.includes(" Mac ")===!0||globalThis.process?.platform,H==="Windows"||globalThis.navigator?.platform==="Win32"||globalThis.process?.platform,H==="Linux"||globalThis.navigator?.platform?.startsWith("Linux")===!0||globalThis.navigator?.userAgent?.includes(" Linux ")===!0||globalThis.process?.platform,H==="Android"||globalThis.navigator?.platform==="Android"||globalThis.navigator?.userAgent?.includes(" Android ")===!0||globalThis.process?.platform;const oD="\x1B]",nD="\x07",V=";";!lu&&B.env.TERM_PROGRAM,!lu&&B.platform,lu||B.cwd;const ht=n((u,D)=>[oD,"8",V,V,D,nD,u,oD,"8",V,V,nD].join(""),"link");function gt(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}n(gt,"getDefaultExportFromCjs");var Fu,iD;function aD(){return iD||(iD=1,Fu=n((u,D=process.argv)=>{const e=u.startsWith("-")?"":u.length===1?"-":"--",t=D.indexOf(e+u),r=D.indexOf("--");return t!==-1&&(r===-1||t<r)},"hasFlag")),Fu}n(aD,"requireHasFlag");var cu,sD;function Bt(){if(sD)return cu;sD=1;const u=wD,D=bu,e=aD(),{env:t}=process;let r;e("no-color")||e("no-colors")||e("color=false")||e("color=never")?r=0:(e("color")||e("colors")||e("color=true")||e("color=always"))&&(r=1),"FORCE_COLOR"in t&&(t.FORCE_COLOR==="true"?r=1:t.FORCE_COLOR==="false"?r=0:r=t.FORCE_COLOR.length===0?1:Math.min(parseInt(t.FORCE_COLOR,10),3));function o(s){return s===0?!1:{level:s,hasBasic:!0,has256:s>=2,has16m:s>=3}}n(o,"translateLevel");function i(s,l){if(r===0)return 0;if(e("color=16m")||e("color=full")||e("color=truecolor"))return 3;if(e("color=256"))return 2;if(s&&!l&&r===void 0)return 0;const c=r||0;if(t.TERM==="dumb")return c;if(process.platform==="win32"){const F=u.release().split(".");return Number(F[0])>=10&&Number(F[2])>=10586?Number(F[2])>=14931?3:2:1}if("CI"in t)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(F=>F in t)||t.CI_NAME==="codeship"?1:c;if("TEAMCITY_VERSION"in t)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(t.TEAMCITY_VERSION)?1:0;if(t.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in t){const F=parseInt((t.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(t.TERM_PROGRAM){case"iTerm.app":return F>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(t.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(t.TERM)||"COLORTERM"in t?1:c}n(i,"supportsColor");function a(s){const l=i(s,s&&s.isTTY);return o(l)}return n(a,"getSupportLevel"),cu={supportsColor:a,stdout:o(i(!0,D.isatty(1))),stderr:o(i(!0,D.isatty(2)))},cu}n(Bt,"requireSupportsColor");var Cu,lD;function mt(){if(lD)return Cu;lD=1;const u=Bt(),D=aD();function e(r){if(/^\d{3,4}$/.test(r)){const i=/(\d{1,2})(\d{2})/.exec(r)||[];return{major:0,minor:parseInt(i[1],10),patch:parseInt(i[2],10)}}const o=(r||"").split(".").map(i=>parseInt(i,10));return{major:o[0],minor:o[1],patch:o[2]}}n(e,"parseVersion");function t(r){const{CI:o,FORCE_HYPERLINK:i,NETLIFY:a,TEAMCITY_VERSION:s,TERM_PROGRAM:l,TERM_PROGRAM_VERSION:c,VTE_VERSION:F,TERM:C}=process.env;if(i)return!(i.length>0&&parseInt(i,10)===0);if(D("no-hyperlink")||D("no-hyperlinks")||D("hyperlink=false")||D("hyperlink=never"))return!1;if(D("hyperlink=true")||D("hyperlink=always")||a)return!0;if(!u.supportsColor(r)||r&&!r.isTTY)return!1;if("WT_SESSION"in process.env)return!0;if(process.platform==="win32"||o||s)return!1;if(l){const E=e(c||"");switch(l){case"iTerm.app":return E.major===3?E.minor>=1:E.major>3;case"WezTerm":return E.major>=20200620;case"vscode":return E.major>1||E.major===1&&E.minor>=72;case"ghostty":return!0}}if(F){if(F==="0.50.0")return!1;const E=e(F);return E.major>0||E.minor>=50}switch(C){case"alacritty":return!0}return!1}return n(t,"supportsHyperlink"),Cu={supportsHyperlink:t,stdout:t(process.stdout),stderr:t(process.stderr)},Cu}n(mt,"requireSupportsHyperlinks");var wt=mt(),Eu=gt(wt);function N(u,D,{target:e="stdout",...t}={}){return Eu[e]?ht(u,D):t.fallback===!1?u:typeof t.fallback=="function"?t.fallback(u,D):`${u} (\u200B${D}\u200B)`}n(N,"terminalLink"),N.isSupported=Eu.stdout,N.stderr=(u,D,e={})=>N(u,D,{target:"stderr",...e}),N.stderr.isSupported=Eu.stderr;var bt="git-publish",At="2.4.0",yt="Publish your npm package to a GitHub repository branch";const j=n(async(u,D,e)=>(await g(u,D,e)).stdout.trim(),"simpleSpawn"),FD=n(u=>j("git",["status","--porcelain","--untracked-files=no"],u),"gitStatusTracked"),vt=n(async()=>{if(await FD().catch(D=>{throw D.stderr.includes("not a git repository")?new Error("Not in a git repository."):D}))throw new Error("The working tree is not clean. Please commit or stash your changes before publishing.")},"assertCleanTree"),$t=n(async()=>{try{return await j("git",["branch","--show-current"])}catch(u){try{return await j("git",["describe","--tags"])}catch(D){throw new Error(`Failed to get current branch name: ${u.stderr} ${D.stderr}`)}}},"getCurrentBranchOrTagName"),cD=n(async u=>j("git",["rev-parse","--short","HEAD"],u).catch(()=>{}),"getCurrentCommit"),Ot=n(async u=>{const D=await M.readFile(u,"utf8");try{return JSON.parse(D)}catch{throw new Error(`Failed to parse JSON file: ${u}`)}},"readJson"),CD=n(u=>u instanceof URL?mu.fileURLToPath(u):u,"toPath");async function Y(u,{cwd:D=B.cwd(),type:e="file",stopAt:t}={}){let r=f.resolve(CD(D)??"");const{root:o}=f.parse(r);t=f.resolve(r,CD(t??o));const i=f.isAbsolute(u);for(;r;){const a=i?u:f.join(r,u);try{const s=await M.stat(a);if(e==="file"&&s.isFile()||e==="directory"&&s.isDirectory())return a}catch{}if(r===t||r===o)break;r=f.dirname(r)}}n(Y,"findUp");const Tt=n(async(u,D)=>{const e={cwd:u,stopAt:D};return await Y("pnpm-lock.yaml",e)?"pnpm":await Y("yarn.lock",e)?"yarn":await Y("bun.lockb",e)||await Y("bun.lock",e)?"bun":"npm"},"detectPackageManager"),Mt=n(async(u,D,e)=>{await M.mkdir(e,{recursive:!0}),await g(u,u==="bun"?["pm","pack","--destination",e]:["pack","--pack-destination",e],{cwd:D});const o=(await M.readdir(e)).find(i=>i.endsWith(".tgz"));if(!o)throw new Error("No tarball found after pack");return f.join(e,o)},"packPackage"),kt=n(async(u,D)=>{const e=[];return await wu.pipeline(bD.createReadStream(u),yD(),AD.extract(D,{map:n(t=>(t.name.startsWith("package/")&&(t.name=t.name.slice(8)),t.type==="file"&&t.name&&e.push({file:t.name,size:t.size||0}),t),"map")})),e.sort((t,r)=>t.file<r.file?-1:t.file>r.file?1:0),e},"extractTarball"),{stringify:_}=JSON;(async()=>{const u=pt({name:bt,version:At,flags:{branch:{type:String,alias:"b",placeholder:"<branch name>",description:'The branch to publish the package to. Defaults to prefixing "npm/" to the current branch or tag name.'},remote:{type:String,alias:"r",placeholder:"<remote>",description:"The remote to push to.",default:"origin"},fresh:{type:Boolean,alias:"o",description:"Publish without a commit history. Warning: Force-pushes to remote"},dry:{type:Boolean,alias:"d",description:"Dry run mode. Will not commit or push to the remote."},force:{type:Boolean,alias:"f",description:"Skip checks and force publish."}},help:{description:yt}});await vt();const D=process.cwd(),e=await j("git",["rev-parse","--show-toplevel"]),t=f.relative(e,D),r=await $t(),o=await cD(),i="package.json";try{await M.access(i)}catch{throw new Error("No package.json found in current working directory.")}const a=await Ot(i);if(a.private&&!u.flags.force)throw new Error("This package is marked as private. Use --force to publish it anyway.");const{branch:s,remote:l,fresh:c,dry:F}=u.flags,C=s||(t?`npm/${r}-${a.name}`:`npm/${r}`);await mD(`Publishing branch ${_(r)} \u2192 ${_(C)}`,async({task:E,setTitle:p,setStatus:m,setOutput:A})=>{F&&m("Dry run");const y=`git-publish-${Date.now()}-${process.pid}`,v=f.join(dD.tmpdir(),"git-publish",y),d=f.join(v,"worktree"),ED=f.join(v,"pack");let pu=!1,fu;try{fu=await j("git",["remote","get-url",l])}catch{throw new Error(`Git remote ${_(l)} does not exist`)}let du;const hu=await Tt(D,e),pD=await E("Creating worktree",async({setWarning:$})=>{if(F){$("");return}await g("git",["worktree","add","--force",d,"HEAD"])});F||pD.clear();try{const $=await E("Checking out branch",async({setWarning:T})=>{if(F){T("");return}let w=!1;c?w=!0:w="exitCode"in await g("git",["fetch","--depth=1",l,`${C}:${y}`],{cwd:d}).catch(Bu=>Bu),w?await g("git",["checkout","--orphan",y],{cwd:d}):await g("git",["symbolic-ref","HEAD",`refs/heads/${y}`],{cwd:d}),await g("git",["rm","--cached","-r",":/"],{cwd:d}).catch(()=>{}),await g("git",["clean","-fdx"],{cwd:d})});F||$.clear();const O=await E("Packing package",async({setWarning:T})=>{if(F){T("");return}const w=await Mt(hu,D,ED);return await kt(w,d)});F||O.clear();const J=await E("Commiting publish assets",async({setWarning:T})=>{if(F){T("");return}await g("git",["add","-A"],{cwd:d});const w=await O.result;if(!w||w.length===0)throw new Error("No publish files found");const gu=w.reduce((S,{size:K})=>S+K,0);if(console.log(rD(`Publishing ${a.name}`)),console.log(w.map(({file:S,size:K})=>`${S} ${tD(au(K).toString())}`).join(`
11
+ `).map(r=>rr(r,e,t)).join(`
12
+ `)}s(se,"BD"),E(se,"wrapAnsi");const le=E(u=>Array.from({length:u}).fill(""),"emptyLines"),or=E((u,e)=>{const t=[];let r=0;for(const o of u){let n=0;const D=o.map(a=>{let l=e[r]??"";r+=1,a.preprocess&&(l=a.preprocess(l)),Ku(l)>a.width&&(l=se(l,a.width,{hard:!0}));let p=l.split(`
13
+ `);if(a.postprocess){const{postprocess:F}=a;p=p.map((f,c)=>F.call(a,f,c))}return a.paddingTop&&p.unshift(...le(a.paddingTop)),a.paddingBottom&&p.push(...le(a.paddingBottom)),p.length>n&&(n=p.length),{...a,lines:p}}),i=[];for(let a=0;a<n;a+=1){const l=D.map(p=>{const F=p.lines[a]??"",f=Number.isFinite(p.width)?" ".repeat(p.width-x(F)):"";let c=p.paddingLeftString;return p.align==="right"&&(c+=f),c+=F,p.align==="left"&&(c+=f),c+p.paddingRightString}).join("");i.push(l)}t.push(i.join(`
14
+ `))}return t.join(`
15
+ `)},"renderRow"),nr=E((u,e)=>{if(!u||u.length===0)return"";const t=Vt(u),r=t.length;if(r===0)return"";const{stdoutColumns:o,columns:n}=Lt(e);if(n.length>r)throw new Error(`${n.length} columns defined, but only ${r} columns found`);const D=Jt(o,n,t);return u.map(i=>or(D,i)).join(`
16
+ `)},"terminalColumns"),Dr=["<",">","=",">=","<="],ir=E(u=>{if(!Dr.includes(u))throw new TypeError(`Invalid breakpoint operator: ${u}`)},"assertOperator"),ar=E(u=>{const e=Object.keys(u).map(t=>{const[r,o]=t.split(" ");ir(r);const n=Number.parseInt(o,10);if(Number.isNaN(n))throw new TypeError(`Invalid breakpoint value: ${o}`);const D=u[t];return{operator:r,breakpoint:n,value:D}}).sort((t,r)=>r.breakpoint-t.breakpoint);return t=>e.find(({operator:r,breakpoint:o})=>r==="="&&t===o||r===">"&&t>o||r==="<"&&t<o||r===">="&&t>=o||r==="<="&&t<=o)?.value},"breakpoints");var sr=Object.defineProperty,m=s((u,e)=>sr(u,"name",{value:e,configurable:!0}),"o");const j=new Uint32Array(65536),lr=m((u,e)=>{const t=u.length,r=e.length,o=1<<t-1;let n=-1,D=0,i=t,a=t;for(;a--;)j[u.charCodeAt(a)]|=1<<a;for(a=0;a<r;a++){let l=j[e.charCodeAt(a)];const p=l|D;l|=(l&n)+n^n,D|=~(l|n),n&=l,D&o&&i++,n&o&&i--,D=D<<1|1,n=n<<1|~(p|D),D&=p}for(a=t;a--;)j[u.charCodeAt(a)]=0;return i},"myers_32"),cr=m((u,e)=>{const t=e.length,r=u.length,o=[],n=[],D=Math.ceil(t/32),i=Math.ceil(r/32);for(let d=0;d<D;d++)n[d]=-1,o[d]=0;let a=0;for(;a<i-1;a++){let d=0,h=-1;const B=a*32,y=Math.min(32,r)+B;for(let C=B;C<y;C++)j[u.charCodeAt(C)]|=1<<C;for(let C=0;C<t;C++){const w=j[e.charCodeAt(C)],v=n[C/32|0]>>>C&1,O=o[C/32|0]>>>C&1,G=w|d,V=((w|O)&h)+h^h|w|O;let S=d|~(V|h),I=h&V;S>>>31^v&&(n[C/32|0]^=1<<C),I>>>31^O&&(o[C/32|0]^=1<<C),S=S<<1|v,I=I<<1|O,h=I|~(G|S),d=S&G}for(let C=B;C<y;C++)j[u.charCodeAt(C)]=0}let l=0,p=-1;const F=a*32,f=Math.min(32,r-F)+F;for(let d=F;d<f;d++)j[u.charCodeAt(d)]|=1<<d;let c=r;for(let d=0;d<t;d++){const h=j[e.charCodeAt(d)],B=n[d/32|0]>>>d&1,y=o[d/32|0]>>>d&1,C=h|l,w=((h|y)&p)+p^p|h|y;let v=l|~(w|p),O=p&w;c+=v>>>r-1&1,c-=O>>>r-1&1,v>>>31^B&&(n[d/32|0]^=1<<d),O>>>31^y&&(o[d/32|0]^=1<<d),v=v<<1|B,O=O<<1|y,p=O|~(C|v),l=v&C}for(let d=F;d<f;d++)j[u.charCodeAt(d)]=0;return c},"myers_x"),ce=m((u,e)=>{if(u.length<e.length){const t=e;e=u,u=t}return e.length===0?u.length:u.length<=32?lr(u,e):cr(u,e)},"distance"),Fr=m((u,e)=>{let t=1/0,r=0;for(let o=0;o<e.length;o++){const n=ce(u,e[o]);n<t&&(t=n,r=o)}return e[r]},"closest"),pr=m(u=>u.replaceAll(/[\W_]([a-z\d])?/gi,(e,t)=>t?t.toUpperCase():""),"camelCase"),fr=m(u=>u.replaceAll(/\B([A-Z])/g,"-$1").toLowerCase(),"kebabCase"),dr={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:m(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 Fe(u){let e=!1;return{type:"table",data:{tableData:Object.keys(u).sort((t,r)=>t.localeCompare(r)).map(t=>{const r=u[t],o="alias"in r;return o&&(e=!0),{name:t,flag:r,flagFormatted:`--${fr(t)}`,aliasesEnabled:e,aliasFormatted:o?`-${r.alias}`:void 0}}).map(t=>(t.aliasesEnabled=e,[{type:"flagName",data:t},{type:"flagDescription",data:t}])),tableBreakpoints:dr}}}s(Fe,"z"),m(Fe,"renderFlags");const pe=m(u=>!u||(u.version??(u.help?u.help.version:void 0)),"getVersion"),fe=m(u=>{const e="parent"in u&&u.parent?.name;return(e?`${e} `:"")+u.name},"getName");function de(u){const e=[];u.name&&e.push(fe(u));const t=pe(u)??("parent"in u&&pe(u.parent));if(t&&e.push(`v${t}`),e.length!==0)return{id:"name",type:"text",data:`${e.join(" ")}
17
+ `}}s(de,"K"),m(de,"getNameAndVersion");function he(u){const{help:e}=u;if(!(!e||!e.description))return{id:"description",type:"text",data:`${e.description}
18
+ `}}s(he,"Z"),m(he,"getDescription");function Ee(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(`
19
+ `):e.usage}}:void 0;if(u.name){const t=[],r=[fe(u)];if(u.flags&&Object.keys(u.flags).length>0&&r.push("[flags...]"),u.parameters&&u.parameters.length>0){const{parameters:o}=u,n=o.indexOf("--"),D=n!==-1&&o.slice(n+1).some(i=>i.startsWith("<"));r.push(o.map(i=>i!=="--"?i:D?"--":"[--]").join(" "))}if(r.length>1&&t.push(r.join(" ")),"commands"in u&&u.commands?.length&&t.push(`${u.name} <command>`),t.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:t.join(`
20
+ `)}}}}s(Ee,"G"),m(Ee,"getUsage");function Ce(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=>{const{help:t}=e.options;return[e.options.name,typeof t=="object"&&t.description||""]}),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}s(Ce,"Q"),m(Ce,"getCommands");function ge(u){if(!(!u.flags||Object.keys(u.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:Fe(u.flags),indentBody:0}}}s(ge,"X"),m(ge,"getFlags");function me(u){const{help:e}=u;if(!e||!e.examples||e.examples.length===0)return;let{examples:t}=e;if(Array.isArray(t)&&(t=t.join(`
21
+ `)),t)return{id:"examples",type:"section",data:{title:"Examples:",body:t}}}s(me,"Y"),m(me,"getExamples");function Be(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}}}s(Be,"ee"),m(Be,"getAliases");const hr=m(u=>[de,he,Ee,Ce,ge,me,Be].map(e=>e(u)).filter(Boolean),"generateHelp"),Er=Mu.WriteStream.prototype.hasColors();class Cr{static{s(this,"ne")}static{m(this,"Renderers")}text(e){return e}bold(e){return Er?`\x1B[1m${e}\x1B[22m`:e.toLocaleUpperCase()}indentText({text:e,spaces:t}){return e.replaceAll(/^/gm," ".repeat(t))}heading(e){return this.bold(e)}section({title:e,body:t,indentBody:r=2}){return`${(e?`${this.heading(e)}
22
+ `:"")+(t?this.indentText({text:this.render(t),spaces:r}):"")}
23
+ `}table({tableData:e,tableOptions:t,tableBreakpoints:r}){return nr(e.map(o=>o.map(n=>this.render(n))),r?ar(r):t)}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:t,flagFormatted:r,aliasesEnabled:o,aliasFormatted:n}=e;let D="";if(n?D+=`${n}, `:o&&(D+=" "),D+=r,"placeholder"in t&&typeof t.placeholder=="string")D+=`${this.flagOperator(e)}${t.placeholder}`;else{const i=this.flagParameter("type"in t?t.type:t);i&&(D+=`${this.flagOperator(e)}${i}`)}return D}flagDefault(e){return JSON.stringify(e)}flagDescription({flag:e}){let t="description"in e?e.description??"":"";if("default"in e){let{default:r}=e;typeof r=="function"&&(r=r()),r&&(t+=` (default: ${this.flagDefault(r)})`)}return t}render(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>this.render(t)).join(`
24
+ `);if("type"in e&&this[e.type]){const t=this[e.type];if(typeof t=="function")return t.call(this,e.data)}throw new Error(`Invalid node type: ${JSON.stringify(e)}`)}}const hu=m(u=>u.length>0&&!u.includes(" "),"isValidScriptName"),{stringify:R}=JSON,gr=/[|\\{}()[\]^$+*?.]/;function Eu(u){const e=[];let t,r;for(const o of u){if(r)throw new Error(`Invalid parameter: Spread parameter ${R(r)} must be last`);const n=o[0],D=o.at(-1);let i;if(n==="<"&&D===">"&&(i=!0,t))throw new Error(`Invalid parameter: Required parameter ${R(o)} cannot come after optional parameter ${R(t)}`);if(n==="["&&D==="]"&&(i=!1,t=o),i===void 0)throw new Error(`Invalid parameter: ${R(o)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let a=o.slice(1,-1);const l=a.slice(-3)==="...";l&&(r=o,a=a.slice(0,-3));const p=a.match(gr);if(p)throw new Error(`Invalid parameter: ${R(o)}. Invalid character found ${R(p[0])}`);e.push({name:a,required:i,spread:l})}return e}s(Eu,"P"),m(Eu,"parseParameters");function Cu(u,e,t,r){for(let o=0;o<e.length;o+=1){const{name:n,required:D,spread:i}=e[o],a=pr(n);if(a in u)throw new Error(`Invalid parameter: ${R(n)} is used more than once.`);const l=i?t.slice(o):t[o];if(i&&(o=e.length),D&&(!l||i&&l.length===0))return console.error(`Error: Missing required parameter ${R(n)}
25
+ `),r(),process.exit(1);u[a]=l}}s(Cu,"S"),m(Cu,"mapParametersToArguments");function we(u){return u!==!1}s(we,"se"),m(we,"helpEnabled");const mr=m(u=>{const e=[];for(const[t,r]of Object.entries(u))if(e.push(t),r&&typeof r=="object"&&"alias"in r){const{alias:o}=r;typeof o=="string"&&o?e.push(o):Array.isArray(o)&&e.push(...o.filter(Boolean))}return e},"getKnownFlagNames"),Br=m((u,e)=>{if(u.length<3||e.length===0)return;const t=Fr(u,e);return ce(u,t)<=2?t:void 0},"findClosestFlag"),wr=m((u,e)=>{const t=Object.keys(u);if(t.length!==0){for(const r of t){const o=Br(r,e),n=o?` (Did you mean --${o}?)`:"";console.error(`Error: Unknown flag: --${r}.${n}`)}process.exit(1)}},"handleUnknownFlags");function gu(u,e,t,r){const o={...e.flags},n=e.version&&!("version"in o);n&&(o.version={type:Boolean,description:"Show version"});const{help:D}=e,i=we(D);i&&!("help"in o)&&(o.help={type:Boolean,alias:"h",description:"Show help"});const a=_t(o,r,{ignore:e.ignoreArgv}),l=m(()=>{console.log(e.version)},"showVersion");if(n&&a.flags.version===!0)return l(),process.exit(0);const p=new Cr,F=i&&D?.render?D.render:h=>p.render(h),f=m(h=>{const B=hr({...e,...h?{help:h}:{},flags:o});console.log(F(B,p))},"showHelp");if(i&&a.flags.help===!0)return f(),process.exit(0);if((e.strictFlags??e.parent?.strictFlags)&&wr(a.unknownFlags,mr(o)),e.parameters){let{parameters:h}=e,B=a._;const y=h.indexOf("--"),C=h.slice(y+1),w=Object.create(null);let v=[];y>-1&&C.length>0&&(h=h.slice(0,y),v=a._["--"],B=B.slice(0,-v.length||void 0)),Cu(w,Eu(h),B,f),y>-1&&C.length>0&&Cu(w,Eu(C),v,f),Object.assign(a._,w)}const c={...a,showVersion:l,showHelp:f},d={command:u,...c};if(typeof t=="function"){const h=t(c);if(h&&"then"in h)return Object.assign(Promise.resolve(h),d)}return d}s(gu,"I"),m(gu,"cliBase");function be(u,e){const t=new Map;for(const r of e){const o=[r.options.name],{alias:n}=r.options;n&&(Array.isArray(n)?o.push(...n):o.push(n));for(const D of o){if(t.has(D))throw new Error(`Duplicate command name found: ${R(D)}`);t.set(D,r)}}return t.get(u)}s(be,"ce"),m(be,"getCommand");function ye(u,e,t=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!hu(u.name)))throw new Error(`Invalid script name: ${R(u.name)}`);const r=t[0];if(u.commands&&r&&hu(r)){const o=be(r,u.commands);if(o)return gu(o.options.name,{...o.options,parent:u},o.callback,t.slice(1))}return gu(void 0,u,e,t)}s(ye,"fe"),m(ye,"cli");function br(u,e){if(!u)throw new Error("Command options are required");const{name:t}=u;if(t===void 0)throw new Error("Command name is required");if(!hu(t))throw new Error(`Invalid command name ${JSON.stringify(t)}. Command names must be one word.`);return{options:u,callback:e}}s(br,"de"),m(br,"command");let Ae={};const ve=new WeakMap,$e={metric:[{from:0,to:1e3,unit:"B",long:"bytes"},{from:1e3,to:1e6,unit:"kB",long:"kilobytes"},{from:1e6,to:1e9,unit:"MB",long:"megabytes"},{from:1e9,to:1e12,unit:"GB",long:"gigabytes"},{from:1e12,to:1e15,unit:"TB",long:"terabytes"},{from:1e15,to:1e18,unit:"PB",long:"petabytes"},{from:1e18,to:1e21,unit:"EB",long:"exabytes"},{from:1e21,to:1e24,unit:"ZB",long:"zettabytes"},{from:1e24,to:1e27,unit:"YB",long:"yottabytes"}],metric_octet:[{from:0,to:1e3,unit:"o",long:"octets"},{from:1e3,to:1e6,unit:"ko",long:"kilooctets"},{from:1e6,to:1e9,unit:"Mo",long:"megaoctets"},{from:1e9,to:1e12,unit:"Go",long:"gigaoctets"},{from:1e12,to:1e15,unit:"To",long:"teraoctets"},{from:1e15,to:1e18,unit:"Po",long:"petaoctets"},{from:1e18,to:1e21,unit:"Eo",long:"exaoctets"},{from:1e21,to:1e24,unit:"Zo",long:"zettaoctets"},{from:1e24,to:1e27,unit:"Yo",long:"yottaoctets"}],iec:[{from:0,to:Math.pow(1024,1),unit:"B",long:"bytes"},{from:Math.pow(1024,1),to:Math.pow(1024,2),unit:"KiB",long:"kibibytes"},{from:Math.pow(1024,2),to:Math.pow(1024,3),unit:"MiB",long:"mebibytes"},{from:Math.pow(1024,3),to:Math.pow(1024,4),unit:"GiB",long:"gibibytes"},{from:Math.pow(1024,4),to:Math.pow(1024,5),unit:"TiB",long:"tebibytes"},{from:Math.pow(1024,5),to:Math.pow(1024,6),unit:"PiB",long:"pebibytes"},{from:Math.pow(1024,6),to:Math.pow(1024,7),unit:"EiB",long:"exbibytes"},{from:Math.pow(1024,7),to:Math.pow(1024,8),unit:"ZiB",long:"zebibytes"},{from:Math.pow(1024,8),to:Math.pow(1024,9),unit:"YiB",long:"yobibytes"}],iec_octet:[{from:0,to:Math.pow(1024,1),unit:"o",long:"octets"},{from:Math.pow(1024,1),to:Math.pow(1024,2),unit:"Kio",long:"kibioctets"},{from:Math.pow(1024,2),to:Math.pow(1024,3),unit:"Mio",long:"mebioctets"},{from:Math.pow(1024,3),to:Math.pow(1024,4),unit:"Gio",long:"gibioctets"},{from:Math.pow(1024,4),to:Math.pow(1024,5),unit:"Tio",long:"tebioctets"},{from:Math.pow(1024,5),to:Math.pow(1024,6),unit:"Pio",long:"pebioctets"},{from:Math.pow(1024,6),to:Math.pow(1024,7),unit:"Eio",long:"exbioctets"},{from:Math.pow(1024,7),to:Math.pow(1024,8),unit:"Zio",long:"zebioctets"},{from:Math.pow(1024,8),to:Math.pow(1024,9),unit:"Yio",long:"yobioctets"}]};class yr{static{s(this,"ByteSize")}constructor(e,t){t=Object.assign({units:"metric",precision:1,locale:void 0},Ae,t),ve.set(this,t),Object.assign($e,t.customUnits);const r=e<0?"-":"";e=Math.abs(e);const o=$e[t.units];if(o){const n=o.find(D=>e>=D.from&&e<D.to);if(n){const D=new Intl.NumberFormat(t.locale,{style:"decimal",maximumFractionDigits:t.precision}),i=n.from===0?r+D.format(e):r+D.format(e/n.from);this.value=i,this.unit=n.unit,this.long=n.long}else this.value=r+e,this.unit="",this.long=""}else throw new Error(`Invalid units specified: ${t.units}`)}toString(){const e=ve.get(this);return e.toStringFn?e.toStringFn.bind(this)():`${this.value} ${this.unit}`}}function mu(u,e){return new yr(u,e)}s(mu,"byteSize"),mu.defaultOptions=function(u){Ae=u};let L=!0;const q=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let H=0;if(q.process&&q.process.env&&q.process.stdout){const{FORCE_COLOR:u,NODE_DISABLE_COLORS:e,NO_COLOR:t,TERM:r,COLORTERM:o}=q.process.env;e||t||u==="0"?L=!1:u==="1"||u==="2"||u==="3"?L=!0:r==="dumb"?L=!1:"CI"in q.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(n=>n in q.process.env)?L=!0:L=process.stdout.isTTY,L&&(process.platform==="win32"||o&&(o==="truecolor"||o==="24bit")?H=3:r&&(r.endsWith("-256color")||r.endsWith("256"))?H=2:H=1)}let Te={enabled:L,supportLevel:H};function Bu(u,e,t=1){const r=`\x1B[${u}m`,o=`\x1B[${e}m`,n=new RegExp(`\\x1b\\[${e}m`,"g");return D=>Te.enabled&&Te.supportLevel>=t?r+(""+D).replace(n,r)+o:""+D}s(Bu,"kolorist");const Oe=Bu(2,22),Ar=Bu(36,39),ke=Bu(94,39),wu=globalThis.window?.document!==void 0;globalThis.process?.versions?.node,globalThis.process?.versions?.bun,globalThis.Deno?.version?.deno,globalThis.process?.versions?.electron,globalThis.navigator?.userAgent?.includes("jsdom"),typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,typeof DedicatedWorkerGlobalScope<"u"&&globalThis instanceof DedicatedWorkerGlobalScope,typeof SharedWorkerGlobalScope<"u"&&globalThis instanceof SharedWorkerGlobalScope,typeof ServiceWorkerGlobalScope<"u"&&globalThis instanceof ServiceWorkerGlobalScope;const uu=globalThis.navigator?.userAgentData?.platform;uu==="macOS"||globalThis.navigator?.platform==="MacIntel"||globalThis.navigator?.userAgent?.includes(" Mac ")===!0||globalThis.process?.platform,uu==="Windows"||globalThis.navigator?.platform==="Win32"||globalThis.process?.platform,uu==="Linux"||globalThis.navigator?.platform?.startsWith("Linux")===!0||globalThis.navigator?.userAgent?.includes(" Linux ")===!0||globalThis.process?.platform,uu==="Android"||globalThis.navigator?.platform==="Android"||globalThis.navigator?.userAgent?.includes(" Android ")===!0||globalThis.process?.platform;const Me="\x1B]",Re="\x07",eu=";";!wu&&k.env.TERM_PROGRAM,!wu&&k.platform,wu||k.cwd;const vr=s((u,e)=>[Me,"8",eu,eu,e,Re,u,Me,"8",eu,eu,Re].join(""),"link");function $r(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}s($r,"getDefaultExportFromCjs");var bu,je;function Se(){return je||(je=1,bu=s((u,e=process.argv)=>{const t=u.startsWith("-")?"":u.length===1?"-":"--",r=e.indexOf(t+u),o=e.indexOf("--");return r!==-1&&(o===-1||r<o)},"hasFlag")),bu}s(Se,"requireHasFlag");var yu,xe;function Tr(){if(xe)return yu;xe=1;const u=Ye,e=Mu,t=Se(),{env:r}=process;let o;t("no-color")||t("no-colors")||t("color=false")||t("color=never")?o=0:(t("color")||t("colors")||t("color=true")||t("color=always"))&&(o=1),"FORCE_COLOR"in r&&(r.FORCE_COLOR==="true"?o=1:r.FORCE_COLOR==="false"?o=0:o=r.FORCE_COLOR.length===0?1:Math.min(parseInt(r.FORCE_COLOR,10),3));function n(a){return a===0?!1:{level:a,hasBasic:!0,has256:a>=2,has16m:a>=3}}s(n,"translateLevel");function D(a,l){if(o===0)return 0;if(t("color=16m")||t("color=full")||t("color=truecolor"))return 3;if(t("color=256"))return 2;if(a&&!l&&o===void 0)return 0;const p=o||0;if(r.TERM==="dumb")return p;if(process.platform==="win32"){const F=u.release().split(".");return Number(F[0])>=10&&Number(F[2])>=10586?Number(F[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(F=>F in r)||r.CI_NAME==="codeship"?1:p;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if(r.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in r){const F=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return F>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:p}s(D,"supportsColor");function i(a){const l=D(a,a&&a.isTTY);return n(l)}return s(i,"getSupportLevel"),yu={supportsColor:i,stdout:n(D(!0,e.isatty(1))),stderr:n(D(!0,e.isatty(2)))},yu}s(Tr,"requireSupportsColor");var Au,Ie;function Or(){if(Ie)return Au;Ie=1;const u=Tr(),e=Se();function t(o){if(/^\d{3,4}$/.test(o)){const D=/(\d{1,2})(\d{2})/.exec(o)||[];return{major:0,minor:parseInt(D[1],10),patch:parseInt(D[2],10)}}const n=(o||"").split(".").map(D=>parseInt(D,10));return{major:n[0],minor:n[1],patch:n[2]}}s(t,"parseVersion");function r(o){const{CI:n,FORCE_HYPERLINK:D,NETLIFY:i,TEAMCITY_VERSION:a,TERM_PROGRAM:l,TERM_PROGRAM_VERSION:p,VTE_VERSION:F,TERM:f}=process.env;if(D)return!(D.length>0&&parseInt(D,10)===0);if(e("no-hyperlink")||e("no-hyperlinks")||e("hyperlink=false")||e("hyperlink=never"))return!1;if(e("hyperlink=true")||e("hyperlink=always")||i)return!0;if(!u.supportsColor(o)||o&&!o.isTTY)return!1;if("WT_SESSION"in process.env)return!0;if(process.platform==="win32"||n||a)return!1;if(l){const c=t(p||"");switch(l){case"iTerm.app":return c.major===3?c.minor>=1:c.major>3;case"WezTerm":return c.major>=20200620;case"vscode":return c.major>1||c.major===1&&c.minor>=72;case"ghostty":return!0}}if(F){if(F==="0.50.0")return!1;const c=t(F);return c.major>0||c.minor>=50}switch(f){case"alacritty":return!0}return!1}return s(r,"supportsHyperlink"),Au={supportsHyperlink:r,stdout:r(process.stdout),stderr:r(process.stderr)},Au}s(Or,"requireSupportsHyperlinks");var kr=Or(),vu=$r(kr);function Y(u,e,{target:t="stdout",...r}={}){return vu[t]?vr(u,e):r.fallback===!1?u:typeof r.fallback=="function"?r.fallback(u,e):`${u} (\u200B${e}\u200B)`}s(Y,"terminalLink"),Y.isSupported=vu.stdout,Y.stderr=(u,e,t={})=>Y(u,e,{target:"stderr",...t}),Y.stderr.isSupported=vu.stderr;var Mr="git-publish",Rr="2.4.2",jr="Publish your npm package to a GitHub repository branch";const z=s(async(u,e,t)=>(await T(u,e,t)).stdout.trim(),"simpleSpawn"),Pe=s(u=>z("git",["status","--porcelain","--untracked-files=no"],u),"gitStatusTracked"),Sr=s(async()=>{if(await Pe().catch(e=>{throw e.stderr.includes("not a git repository")?new Error("Not in a git repository."):e}))throw new Error("The working tree is not clean. Please commit or stash your changes before publishing.")},"assertCleanTree"),xr=s(async()=>{try{return await z("git",["branch","--show-current"])}catch(u){try{return await z("git",["describe","--tags"])}catch(e){throw new Error(`Failed to get current branch name: ${u.stderr} ${e.stderr}`)}}},"getCurrentBranchOrTagName"),_e=s(async u=>z("git",["rev-parse","--short","HEAD"],u).catch(()=>{}),"getCurrentCommit"),Ne=s(async u=>{const e=await $.readFile(u,"utf8");try{return JSON.parse(e)}catch{throw new Error(`Failed to parse JSON file: ${u}`)}},"readJson"),Le=s(u=>u instanceof URL?Ou.fileURLToPath(u):u,"toPath");async function tu(u,{cwd:e=k.cwd(),type:t="file",stopAt:r}={}){let o=g.resolve(Le(e)??"");const{root:n}=g.parse(o);r=g.resolve(o,Le(r??n));const D=g.isAbsolute(u);for(;o;){const i=D?u:g.join(o,u);try{const a=await $.stat(i);if(t==="file"&&a.isFile()||t==="directory"&&a.isDirectory())return i}catch{}if(o===r||o===n)break;o=g.dirname(o)}}s(tu,"findUp");const Ir=s(async(u,e)=>{const t={cwd:u,stopAt:e};return await tu("pnpm-lock.yaml",t)?"pnpm":await tu("yarn.lock",t)?"yarn":await tu("bun.lockb",t)||await tu("bun.lock",t)?"bun":"npm"},"detectPackageManager"),Pr=s(async(u,e)=>{await $.mkdir(g.dirname(e),{recursive:!0}),await $.copyFile(u,e)},"copyFile"),ru=s(u=>typeof u=="object"&&u!==null&&"code"in u&&u.code!=="ENOENT","isNotEnoent"),_r=s(async(u,e,t,r,o,n)=>{await $.mkdir(t,{recursive:!0});const D=n.length>0,i=g.join(r,"package.json"),a=await Ne(i);if(a.files&&a.files.length>0){const c=D?g.join(e,n):e,d=await Promise.all(a.files.map(async B=>{const y=g.join(r,B);try{return(await $.stat(y)).isDirectory()?`${B}/**`:B}catch(C){if(ru(C))throw C;return B}})),h=await Ze(d,{cwd:r,dot:!0});for(const B of h){const y=g.join(r,B),C=g.join(c,B);await Pr(y,C)}}if(D){const c=g.join(e,"node_modules");await $.rm(c,{recursive:!0,force:!0});try{await $.symlink(g.join(o,"node_modules"),c,"dir")}catch(h){if(ru(h))throw h}const d=g.join(e,n,"node_modules");await $.rm(d,{recursive:!0,force:!0});try{await $.symlink(g.join(r,"node_modules"),d,"dir")}catch(h){if(ru(h))throw h}}else{const c=g.join(e,"node_modules");await $.rm(c,{recursive:!0,force:!0});try{await $.symlink(g.join(r,"node_modules"),c,"dir")}catch(d){if(ru(d))throw d}}const l=u==="bun"?["pm","pack","--destination",t]:["pack","--pack-destination",t],p=n?g.join(e,n):e;await T(u,l,{cwd:p});const f=(await $.readdir(t)).find(c=>c.endsWith(".tgz"));if(!f)throw new Error("No tarball found after pack");return g.join(t,f)},"packPackage"),Nr=s(async(u,e)=>{const t=[];return await ku.pipeline(Je.createReadStream(u),Xe(),Ke.extract(e,{map:s(r=>(r.name.startsWith("package/")&&(r.name=r.name.slice(8)),r.type==="file"&&r.name&&t.push({file:r.name,size:r.size||0}),r),"map")})),t.sort((r,o)=>r.file<o.file?-1:r.file>o.file?1:0),t},"extractTarball"),{stringify:J}=JSON;(async()=>{const u=ye({name:Mr,version:Rr,flags:{branch:{type:String,alias:"b",placeholder:"<branch name>",description:'The branch to publish the package to. Defaults to prefixing "npm/" to the current branch or tag name.'},remote:{type:String,alias:"r",placeholder:"<remote>",description:"The remote to push to.",default:"origin"},fresh:{type:Boolean,alias:"o",description:"Publish without a commit history. Warning: Force-pushes to remote"},dry:{type:Boolean,alias:"d",description:"Dry run mode. Will not commit or push to the remote."},force:{type:Boolean,alias:"f",description:"Skip checks and force publish."}},help:{description:jr}});await Sr();const e=process.cwd(),t=await z("git",["rev-parse","--show-toplevel"]),r=g.relative(t,e),o=await xr(),n=await _e(),D="package.json";try{await $.access(D)}catch{throw new Error("No package.json found in current working directory.")}const i=await Ne(D);if(i.private&&!u.flags.force)throw new Error("This package is marked as private. Use --force to publish it anyway.");const{branch:a,remote:l,fresh:p,dry:F}=u.flags,f=a||(r?`npm/${o}-${i.name}`:`npm/${o}`);await He(`Publishing branch ${J(o)} \u2192 ${J(f)}`,async({task:c,setTitle:d,setStatus:h,setOutput:B})=>{F&&h("Dry run");const y=`git-publish-${Date.now()}-${process.pid}`,C=g.join(ze.tmpdir(),"git-publish",y),w=g.join(C,"publish-worktree"),v=g.join(C,"pack-worktree"),O=g.join(C,"pack");let G=!1,V;try{V=await z("git",["remote","get-url",l])}catch{throw new Error(`Git remote ${J(l)} does not exist`)}let S;const I=await Ir(e,t),We=await c("Creating worktrees",async({setWarning:P})=>{if(F){P("");return}await T("git",["worktree","add","--force",w,"HEAD"]),await T("git",["worktree","add","--force",v,"HEAD"])});F||We.clear();try{const P=await c("Checking out branch",async({setWarning:N})=>{if(F){N("");return}let M=!1;p?M=!0:M="exitCode"in await T("git",["fetch","--depth=1",l,`${f}:${y}`],{cwd:w}).catch(Tu=>Tu),M?await T("git",["checkout","--orphan",y],{cwd:w}):await T("git",["symbolic-ref","HEAD",`refs/heads/${y}`],{cwd:w}),await T("git",["rm","--cached","-r",":/"],{cwd:w}).catch(()=>{}),await T("git",["clean","-fdx"],{cwd:w})});F||P.clear();const _=await c("Packing package",async({setWarning:N})=>{if(F){N("");return}const M=await _r(I,v,O,e,t,r);return await Nr(M,w)});F||_.clear();const ou=await c("Commiting publish assets",async({setWarning:N})=>{if(F){N("");return}await T("git",["add","-A"],{cwd:w});const M=await _.result;if(!M||M.length===0)throw new Error("No publish files found");const $u=M.reduce((W,{size:Du})=>W+Du,0);if(console.log(ke(`Publishing ${i.name}`)),console.log(M.map(({file:W,size:Du})=>`${W} ${Oe(mu(Du).toString())}`).join(`
25
26
  `)),console.log(`
26
- ${rD("Total size")}`,au(gu).toString()),(await FD({cwd:d})).length===0)console.warn("\u26A0\uFE0F No new changes found to commit.");else{let S=`Published from "${r}"`;o&&(S+=` (${o})`),await g("git",["-c","user.name=git-publish","-c","user.email=bot@git-publish","commit","--no-verify","-m",S,"--author=git-publish <bot@git-publish>"],{cwd:d})}du=await cD({cwd:d})});F||J.clear();const Z=await E(`Pushing branch ${_(C)} to remote ${_(l)}`,async({setWarning:T})=>{if(F){T("");return}await g("git",["push",...c?["--force"]:[],"--no-verify",l,`HEAD:${C}`],{cwd:d}),pu=!0});F||Z.clear()}finally{(await E("Cleaning up",async({setWarning:O})=>{if(F){O("");return}await g("git",["worktree","remove","--force",d]),await g("git",["branch","-D",y]),await M.rm(v,{recursive:!0,force:!0})})).clear()}if(pu){const $=fu.match(/github\.com:(.+)\.git$/);if($){const[,O]=$,J=N(`${dt(C)} ${tD(`(${du})`)}`,`https://github.com/${O}/tree/${C}`);p(`Successfully published branch: ${J}`);const Z=["Install command",`${hu} i '${O}#${C}'`].join(`
27
- `);A(Z)}}})})().catch(u=>{console.error("Error:",u.message),process.exit(1)});
27
+ ${ke("Total size")}`,mu($u).toString()),(await Pe({cwd:w})).length===0)console.warn("\u26A0\uFE0F No new changes found to commit.");else{let W=`Published from "${o}"`;n&&(W+=` (${n})`),await T("git",["-c","user.name=git-publish","-c","user.email=bot@git-publish","commit","--no-verify","-m",W,"--author=git-publish <bot@git-publish>"],{cwd:w})}S=await _e({cwd:w})});F||ou.clear();const nu=await c(`Pushing branch ${J(f)} to remote ${J(l)}`,async({setWarning:N})=>{if(F){N("");return}await T("git",["push",...p?["--force"]:[],"--no-verify",l,`HEAD:${f}`],{cwd:w}),G=!0});F||nu.clear()}finally{(await c("Cleaning up",async({setWarning:_})=>{if(F){_("");return}await T("git",["worktree","remove","--force",w]),await T("git",["worktree","remove","--force",v]),await T("git",["branch","-D",y]).catch(()=>{}),await $.rm(C,{recursive:!0,force:!0})})).clear()}if(G){const P=V.match(/github\.com:(.+)\.git$/);if(P){const[,_]=P,ou=Y(`${Ar(f)} ${Oe(`(${S})`)}`,`https://github.com/${_}/tree/${f}`);d(`Successfully published branch: ${ou}`);const nu=["Install command",`${I} i '${_}#${f}'`].join(`
28
+ `);B(nu)}}})})().catch(u=>{console.error("Error:",u.message),process.exit(1)});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-publish",
3
- "version": "2.4.0",
3
+ "version": "2.4.2",
4
4
  "description": "Publish your npm package to a GitHub repository branch",
5
5
  "keywords": [
6
6
  "npm",
@@ -22,8 +22,9 @@
22
22
  ],
23
23
  "bin": "dist/index.js",
24
24
  "dependencies": {
25
+ "fast-glob": "^3.3.3",
25
26
  "gunzip-maybe": "^1.4.2",
26
27
  "tar-fs": "^3.1.1",
27
- "tasuku": "^2.0.2"
28
+ "tasuku": "^2.0.5"
28
29
  }
29
30
  }