pkgroll
Version:
Zero-config rollup bundler
22 lines • 121 kB
JavaScript
var Tu=Object.defineProperty;var c=(e,t)=>Tu(e,"name",{value:t,configurable:!0});import he,{existsSync as ju}from"node:fs";import b,{isAbsolute as Pu,resolve as Lu,dirname as Nu,join as Iu}from"node:path";import Mu from"tty";import{rollup as Hu,watch as Wu}from"rollup";import{importTrace as Wt,patchErrorWithTrace as Uu}from"rollup-plugin-import-trace";import ue from"node:fs/promises";import{parse as Gu}from"yaml";import Oe from"node:path/posix";import qu from"@rollup/plugin-node-resolve";import Ku from"@rollup/plugin-commonjs";import Vu from"@rollup/plugin-json";import zu from"@rollup/plugin-alias";import Ju from"@rollup/plugin-dynamic-import-vars";import{transform as Ut}from"esbuild";import Xu,{builtinModules as Qu}from"node:module";import Me from"magic-string";import Zu from"fs";import Yu from"os";import er from"path";import{attachScopes as tr}from"rollup-pluginutils";import"node:url";import{init as nr,parse as ur}from"cjs-module-lexer";var rr=Object.defineProperty,Q=c((e,t)=>rr(e,"name",{value:t,configurable:!0}),"a$1");const sr="known-flag",or="unknown-flag",ir="argument",ar=/\B([A-Z])/g,cr=Q(e=>e.replaceAll(ar,"-$1").toLowerCase(),"camelToKebab"),{hasOwnProperty:lr}=Object.prototype,Te=Q((e,t)=>lr.call(e,t),"hasOwn"),ot=Q(e=>typeof e=="function"?[e,!1]:Array.isArray(e)?[e[0],!0]:ot(e.type),"parseFlagType"),Gt=Q((e,t)=>e===Boolean?t!=="false":t,"normalizeBoolean"),qt=Q((e,t)=>typeof t=="boolean"?t:e===Number&&t===""?Number.NaN:e(t),"applyParser"),Dr=/[\s.:=]/,fr=Q(e=>{const t=`Flag name "${e}"`;if(e.length===0)throw new Error(`${t} cannot be empty`);if(e.length===1)throw new Error(`${t} must be longer than a character`);const u=e.match(Dr);if(u)throw new Error(`${t} cannot contain "${u?.[0]}"`)},"validateFlagName"),it=Q((e,t,u)=>{if(Te(e,t))throw new Error(`Duplicate flags named "${t}"`);e[t]=u},"setFlag"),pr=Q(e=>{const t={};for(const u in e){if(!Te(e,u))continue;fr(u);const n=e[u],r=[[],...ot(n),n];it(t,u,r);const s=cr(u);if(u!==s&&it(t,s,r),"alias"in n&&typeof n.alias=="string"){const{alias:o}=n,i=`Flag alias "${o}" for flag "${u}"`;if(o.length===0)throw new Error(`${i} cannot be empty`);if(o.length>1)throw new Error(`${i} must be a single character`);it(t,o,r)}}return t},"createRegistry"),dr=Q((e,t)=>{const u={};for(const n in e){if(!Te(e,n))continue;const[r,,s,o]=t[n];if(r.length===0&&"default"in o){let{default:i}=o;typeof i=="function"&&(i=i()),u[n]=i}else u[n]=s?r:r.pop()}return u},"finalizeFlags"),He="--",hr=3,Fr=/^-{1,2}\w/,Kt=Q(e=>{if(!Fr.test(e))return;const t=!e.startsWith(He);let u=e.slice(t?1:2),n,r=-1;for(const s of["=",":","."]){const o=u.indexOf(s);o!==-1&&(r===-1||o<r)&&(r=o)}return r!==-1&&(n=u.slice(r+1),u=u.slice(0,r)),[u,n,t]},"parseFlagArgv"),Vt=Q((e,{onFlag:t,onArgument:u})=>{let n;const r=Q((s,o)=>{if(typeof n!="function")return!0;n(s,o),n=void 0},"triggerValueCallback");for(let s=0;s<e.length;s+=1){const o=e[s];if(o===He){r();const a=e.slice(s+1);u?.(a,[s],!0);break}const i=Kt(o);if(i){if(r(),!t)continue;const[a,D,f]=i;if(f)for(let p=0;p<a.length;p+=1){r();const l=p===a.length-1;n=t(a[p],l?D:void 0,[s,p+1,l])}else n=t(a,D,[s])}else r(o,[s])&&u?.([o],[s])}r()},"argvIterator"),zt=Q((e,t)=>{for(let u=t.length-1;u>=0;u-=1){const[n,r,s]=t[u];if(r){const o=e[n];let i=o.slice(0,r);if(s||(i+=o.slice(r+1)),i!=="-"){e[n]=i;continue}}e.splice(n,1)}},"spliceFromArgv"),gr=Q((e,t=process.argv.slice(2),{ignore:u}={})=>{const n=[],r=pr(e),s={},o=[];return o[He]=[],Vt(t,{onFlag(i,a,D){const f=(D.length===hr||i.length>1)&&Te(r,i);if(!u?.(f?sr:or,i,a)){if(f){const[p,l]=r[i],g=Gt(l,a),C=Q((E,A)=>{n.push(D),A&&n.push(A),p.push(qt(l,E||""))},"getFollowingValue");return g===void 0?C:C(g)}Te(s,i)||(s[i]=[]),s[i].push(a===void 0?!0:a),n.push(D)}},onArgument:Q((i,a,D)=>{u?.(ir,t[a[0]])||(o.push(...i),D?(o[He]=i,t.splice(a[0])):n.push(a))},"onArgument")}),zt(t,n),{flags:dr(e,r),unknownFlags:s,_:o}},"typeFlag");Q((e,t,u=process.argv.slice(2))=>{const n=new Set(e.split(",").map(a=>Kt(a)?.[0])),[r,s]=ot(t),o=[],i=[];return Vt(u,{onFlag:Q((a,D,f)=>{if(!n.has(a)||!s&&o.length>0)return;const p=Gt(r,D),l=Q((g,C)=>{i.push(f),C&&i.push(C),o.push(qt(r,g||""))},"getFollowingValue");return p===void 0?l:l(p)},"onFlag")}),zt(u,i),s?o:o[0]},"getFlag");var mr=Object.defineProperty,j=c((e,t)=>mr(e,"name",{value:t,configurable:!0}),"n");const Cr=j(e=>{const t=process.stdout.columns??Number.POSITIVE_INFINITY;return typeof e=="function"&&(e=e(t)),e||(e={}),Array.isArray(e)?{columns:e,stdoutColumns:t}:{columns:e.columns??[],stdoutColumns:e.stdoutColumns??t}},"getOptions");function Jt({onlyFirst:e=!1}={}){const t=["[\\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(t,e?void 0:"g")}c(Jt,"j"),j(Jt,"ansiRegex");const Er=Jt();function at(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Er,"")}c(at,"w$1"),j(at,"stripAnsi");function Xt(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}c(Xt,"P$2"),j(Xt,"isAmbiguous");function Qt(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}c(Qt,"z$1"),j(Qt,"isFullWidth");function Zt(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}c(Zt,"G$2"),j(Zt,"isWide");function Yt(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}c(Yt,"Z$2"),j(Yt,"validate");function en(e,{ambiguousAsWide:t=!1}={}){return Yt(e),Qt(e)||Zt(e)||t&&Xt(e)?2:1}c(en,"V$1"),j(en,"eastAsianWidth");var yr=j(()=>/[#*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 Ar=new Intl.Segmenter,br=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function ye(e,t={}){if(typeof e!="string"||e.length===0)return 0;const{ambiguousIsNarrow:u=!0,countAnsiEscapeCodes:n=!1}=t;if(n||(e=at(e)),e.length===0)return 0;let r=0;const s={ambiguousAsWide:!u};for(const{segment:o}of Ar.segment(e)){const i=o.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)&&!br.test(o)){if(yr().test(o)){r+=2;continue}r+=en(i,s)}}return r}c(ye,"d$1"),j(ye,"stringWidth");const tn=j(e=>Math.max(...e.split(`
`).map(t=>ye(t))),"getLongestLineWidth"),wr=j(e=>{const t=[];for(const u of e){const{length:n}=u,r=n-t.length;for(let s=0;s<r;s+=1)t.push(0);for(let s=0;s<n;s+=1){const o=tn(u[s]);o>t[s]&&(t[s]=o)}}return t},"getColumnContentWidths"),nn=/^\d+%$/,un={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},Br=j((e,t)=>{const u=[];for(let n=0;n<e.length;n+=1){const r=t[n]??"auto";if(typeof r=="number"||r==="auto"||r==="content-width"||typeof r=="string"&&nn.test(r)){u.push({...un,width:r,contentWidth:e[n]});continue}if(r&&typeof r=="object"){const s={...un,...r,contentWidth:e[n]};s.horizontalPadding=s.paddingLeft+s.paddingRight,u.push(s);continue}throw new Error(`Invalid column width: ${JSON.stringify(r)}`)}return u},"initColumns"),vr=j((e,t)=>{for(const u of e){const{width:n}=u;if(n==="content-width"&&(u.width=u.contentWidth),n==="auto"){const a=Math.min(20,u.contentWidth);u.width=a,u.autoOverflow=u.contentWidth-a}if(typeof n=="string"&&nn.test(n)){const a=Number.parseFloat(n.slice(0,-1))/100;u.width=Math.floor(t*a)-(u.paddingLeft+u.paddingRight)}const{horizontalPadding:r}=u,s=1,o=s+r;if(o>=t){const a=o-t,D=Math.ceil(u.paddingLeft/r*a),f=a-D;u.paddingLeft-=D,u.paddingRight-=f,u.horizontalPadding=u.paddingLeft+u.paddingRight}u.paddingLeftString=u.paddingLeft?" ".repeat(u.paddingLeft):"",u.paddingRightString=u.paddingRight?" ".repeat(u.paddingRight):"";const i=t-u.horizontalPadding;u.width=Math.max(Math.min(u.width,i),s)}},"resolveColumnWidths"),rn=j(()=>Object.assign([],{columns:0}),"makeRow"),xr=j((e,t)=>{const u=[rn()];let[n]=u;for(const r of e){const s=r.width+r.horizontalPadding;n.columns+s>t&&(n=rn(),u.push(n)),n.push(r),n.columns+=s}for(const r of u){const s=r.reduce((l,g)=>l+g.width+g.horizontalPadding,0);let o=t-s;if(o===0)continue;const i=r.filter(l=>"autoOverflow"in l),a=i.filter(l=>l.autoOverflow>0),D=a.reduce((l,g)=>l+g.autoOverflow,0),f=Math.min(D,o);for(const l of a){const g=Math.floor(l.autoOverflow/D*f);l.width+=g,o-=g}const p=Math.floor(o/i.length);for(let l=0;l<i.length;l+=1){const g=i[l];l===i.length-1?g.width+=o:g.width+=p,o-=p}}return u},"balanceAuto"),$r=j((e,t,u)=>{const n=Br(u,t);return vr(n,e),xr(n,e)},"computeColumnWidths"),ct=10,sn=j((e=0)=>t=>`\x1B[${t+e}m`,"wrapAnsi16"),on=j((e=0)=>t=>`\x1B[${38+e};5;${t}m`,"wrapAnsi256"),an=j((e=0)=>(t,u,n)=>`\x1B[${38+e};2;${t};${u};${n}m`,"wrapAnsi16m"),K={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(K.modifier);const kr=Object.keys(K.color),Rr=Object.keys(K.bgColor);[...kr,...Rr];function cn(){const e=new Map;for(const[t,u]of Object.entries(K)){for(const[n,r]of Object.entries(u))K[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},u[n]=K[n],e.set(r[0],r[1]);Object.defineProperty(K,t,{value:u,enumerable:!1})}return Object.defineProperty(K,"codes",{value:e,enumerable:!1}),K.color.close="\x1B[39m",K.bgColor.close="\x1B[49m",K.color.ansi=sn(),K.color.ansi256=on(),K.color.ansi16m=an(),K.bgColor.ansi=sn(ct),K.bgColor.ansi256=on(ct),K.bgColor.ansi16m=an(ct),Object.defineProperties(K,{rgbToAnsi256:{value:j((t,u,n)=>t===u&&u===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(u/255*5)+Math.round(n/255*5),"value"),enumerable:!1},hexToRgb:{value:j(t=>{const u=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!u)return[0,0,0];let[n]=u;n.length===3&&(n=[...n].map(s=>s+s).join(""));const r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},"value"),enumerable:!1},hexToAnsi256:{value:j(t=>K.rgbToAnsi256(...K.hexToRgb(t)),"value"),enumerable:!1},ansi256ToAnsi:{value:j(t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let u,n,r;if(t>=232)u=((t-232)*10+8)/255,n=u,r=u;else{t-=16;const i=t%36;u=Math.floor(t/36)/5,n=Math.floor(i/6)/5,r=i%6/5}const s=Math.max(u,n,r)*2;if(s===0)return 30;let o=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(u));return s===2&&(o+=60),o},"value"),enumerable:!1},rgbToAnsi:{value:j((t,u,n)=>K.ansi256ToAnsi(K.rgbToAnsi256(t,u,n)),"value"),enumerable:!1},hexToAnsi:{value:j(t=>K.ansi256ToAnsi(K.hexToAnsi256(t)),"value"),enumerable:!1}}),K}c(cn,"FD"),j(cn,"assembleStyles");const _r=cn(),We=new Set(["\x1B","\x9B"]),Sr=39,lt="\x07",ln="[",Or="]",Dn="m",Ue=`${Or}8;;`,fn=j(e=>`${We.values().next().value}${ln}${e}${Dn}`,"wrapAnsiCode"),pn=j(e=>`${We.values().next().value}${Ue}${e}${lt}`,"wrapAnsiHyperlink"),Tr=j(e=>e.split(" ").map(t=>ye(t)),"wordLengths"),Dt=j((e,t,u)=>{const n=[...t];let r=!1,s=!1,o=ye(at(e.at(-1)));for(const[i,a]of n.entries()){const D=ye(a);if(o+D<=u?e[e.length-1]+=a:(e.push(a),o=0),We.has(a)&&(r=!0,s=n.slice(i+1,i+1+Ue.length).join("")===Ue),r){s?a===lt&&(r=!1,s=!1):a===Dn&&(r=!1);continue}o+=D,o===u&&i<n.length-1&&(e.push(""),o=0)}!o&&e.at(-1).length>0&&e.length>1&&(e[e.length-2]+=e.pop())},"wrapWord"),jr=j(e=>{const t=e.split(" ");let u=t.length;for(;u>0&&!(ye(t[u-1])>0);)u--;return u===t.length?e:t.slice(0,u).join(" ")+t.slice(u).join("")},"stringVisibleTrimSpacesRight"),Pr=j((e,t,u={})=>{if(u.trim!==!1&&e.trim()==="")return"";let n="",r,s;const o=Tr(e);let i=[""];for(const[p,l]of e.split(" ").entries()){u.trim!==!1&&(i[i.length-1]=i.at(-1).trimStart());let g=ye(i.at(-1));if(p!==0&&(g>=t&&(u.wordWrap===!1||u.trim===!1)&&(i.push(""),g=0),(g>0||u.trim===!1)&&(i[i.length-1]+=" ",g++)),u.hard&&o[p]>t){const C=t-g,E=1+Math.floor((o[p]-C-1)/t);Math.floor((o[p]-1)/t)<E&&i.push(""),Dt(i,l,t);continue}if(g+o[p]>t&&g>0&&o[p]>0){if(u.wordWrap===!1&&g<t){Dt(i,l,t);continue}i.push("")}if(g+o[p]>t&&u.wordWrap===!1){Dt(i,l,t);continue}i[i.length-1]+=l}u.trim!==!1&&(i=i.map(p=>jr(p)));const a=i.join(`
`),D=[...a];let f=0;for(const[p,l]of D.entries()){if(n+=l,We.has(l)){const{groups:C}=new RegExp(`(?:\\${ln}(?<code>\\d+)m|\\${Ue}(?<uri>.*)${lt})`).exec(a.slice(f))||{groups:{}};if(C.code!==void 0){const E=Number.parseFloat(C.code);r=E===Sr?void 0:E}else C.uri!==void 0&&(s=C.uri.length===0?void 0:C.uri)}const g=_r.codes.get(Number(r));D[p+1]===`
`?(s&&(n+=pn("")),r&&g&&(n+=fn(g))):l===`
`&&(r&&g&&(n+=fn(r)),s&&(n+=pn(s))),f+=l.length}return n},"exec");function dn(e,t,u){return String(e).normalize().replaceAll(`\r
`,`
`).split(`
`).map(n=>Pr(n,t,u)).join(`
`)}c(dn,"BD"),j(dn,"wrapAnsi");const hn=j(e=>Array.from({length:e}).fill(""),"emptyLines"),Lr=j((e,t)=>{const u=[];let n=0;for(const r of e){let s=0;const o=r.map(a=>{let D=t[n]??"";n+=1,a.preprocess&&(D=a.preprocess(D)),tn(D)>a.width&&(D=dn(D,a.width,{hard:!0}));let f=D.split(`
`);if(a.postprocess){const{postprocess:p}=a;f=f.map((l,g)=>p.call(a,l,g))}return a.paddingTop&&f.unshift(...hn(a.paddingTop)),a.paddingBottom&&f.push(...hn(a.paddingBottom)),f.length>s&&(s=f.length),{...a,lines:f}}),i=[];for(let a=0;a<s;a+=1){const D=o.map(f=>{const p=f.lines[a]??"",l=Number.isFinite(f.width)?" ".repeat(f.width-ye(p)):"";let g=f.paddingLeftString;return f.align==="right"&&(g+=l),g+=p,f.align==="left"&&(g+=l),g+f.paddingRightString}).join("");i.push(D)}u.push(i.join(`
`))}return u.join(`
`)},"renderRow"),Nr=j((e,t)=>{if(!e||e.length===0)return"";const u=wr(e),n=u.length;if(n===0)return"";const{stdoutColumns:r,columns:s}=Cr(t);if(s.length>n)throw new Error(`${s.length} columns defined, but only ${n} columns found`);const o=$r(r,s,u);return e.map(i=>Lr(o,i)).join(`
`)},"terminalColumns"),Ir=["<",">","=",">=","<="],Mr=j(e=>{if(!Ir.includes(e))throw new TypeError(`Invalid breakpoint operator: ${e}`)},"assertOperator"),Hr=j(e=>{const t=Object.keys(e).map(u=>{const[n,r]=u.split(" ");Mr(n);const s=Number.parseInt(r,10);if(Number.isNaN(s))throw new TypeError(`Invalid breakpoint value: ${r}`);const o=e[u];return{operator:n,breakpoint:s,value:o}}).sort((u,n)=>n.breakpoint-u.breakpoint);return u=>t.find(({operator:n,breakpoint:r})=>n==="="&&u===r||n===">"&&u>r||n==="<"&&u<r||n===">="&&u>=r||n==="<="&&u<=r)?.value},"breakpoints");var Wr=Object.defineProperty,I=c((e,t)=>Wr(e,"name",{value:t,configurable:!0}),"o");const me=new Uint32Array(65536),Ur=I((e,t)=>{const u=e.length,n=t.length,r=1<<u-1;let s=-1,o=0,i=u,a=u;for(;a--;)me[e.charCodeAt(a)]|=1<<a;for(a=0;a<n;a++){let D=me[t.charCodeAt(a)];const f=D|o;D|=(D&s)+s^s,o|=~(D|s),s&=D,o&r&&i++,s&r&&i--,o=o<<1|1,s=s<<1|~(f|o),o&=f}for(a=u;a--;)me[e.charCodeAt(a)]=0;return i},"myers_32"),Gr=I((e,t)=>{const u=t.length,n=e.length,r=[],s=[],o=Math.ceil(u/32),i=Math.ceil(n/32);for(let C=0;C<o;C++)s[C]=-1,r[C]=0;let a=0;for(;a<i-1;a++){let C=0,E=-1;const A=a*32,_=Math.min(32,n)+A;for(let x=A;x<_;x++)me[e.charCodeAt(x)]|=1<<x;for(let x=0;x<u;x++){const m=me[t.charCodeAt(x)],$=s[x/32|0]>>>x&1,B=r[x/32|0]>>>x&1,R=m|C,k=((m|B)&E)+E^E|m|B;let q=C|~(k|E),M=E&k;q>>>31^$&&(s[x/32|0]^=1<<x),M>>>31^B&&(r[x/32|0]^=1<<x),q=q<<1|$,M=M<<1|B,E=M|~(R|q),C=q&R}for(let x=A;x<_;x++)me[e.charCodeAt(x)]=0}let D=0,f=-1;const p=a*32,l=Math.min(32,n-p)+p;for(let C=p;C<l;C++)me[e.charCodeAt(C)]|=1<<C;let g=n;for(let C=0;C<u;C++){const E=me[t.charCodeAt(C)],A=s[C/32|0]>>>C&1,_=r[C/32|0]>>>C&1,x=E|D,m=((E|_)&f)+f^f|E|_;let $=D|~(m|f),B=f&m;g+=$>>>n-1&1,g-=B>>>n-1&1,$>>>31^A&&(s[C/32|0]^=1<<C),B>>>31^_&&(r[C/32|0]^=1<<C),$=$<<1|A,B=B<<1|_,f=B|~(x|$),D=$&x}for(let C=p;C<l;C++)me[e.charCodeAt(C)]=0;return g},"myers_x"),Fn=I((e,t)=>{if(e.length<t.length){const u=t;t=e,e=u}return t.length===0?e.length:e.length<=32?Ur(e,t):Gr(e,t)},"distance"),qr=I((e,t)=>{let u=1/0,n=0;for(let r=0;r<t.length;r++){const s=Fn(e,t[r]);s<u&&(u=s,n=r)}return t[n]},"closest"),Kr=I(e=>e.replaceAll(/[\W_]([a-z\d])?/gi,(t,u)=>u?u.toUpperCase():""),"camelCase"),Vr=I(e=>e.replaceAll(/\B([A-Z])/g,"-$1").toLowerCase(),"kebabCase"),zr={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:I(e=>e.trim(),"preprocess")},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function gn(e){let t=!1;return{type:"table",data:{tableData:Object.keys(e).sort((u,n)=>u.localeCompare(n)).map(u=>{const n=e[u],r="alias"in n;return r&&(t=!0),{name:u,flag:n,flagFormatted:`--${Vr(u)}`,aliasesEnabled:t,aliasFormatted:r?`-${n.alias}`:void 0}}).map(u=>(u.aliasesEnabled=t,[{type:"flagName",data:u},{type:"flagDescription",data:u}])),tableBreakpoints:zr}}}c(gn,"z"),I(gn,"renderFlags");const mn=I(e=>!e||(e.version??(e.help?e.help.version:void 0)),"getVersion"),Cn=I(e=>{const t="parent"in e&&e.parent?.name;return(t?`${t} `:"")+e.name},"getName");function En(e){const t=[];e.name&&t.push(Cn(e));const u=mn(e)??("parent"in e&&mn(e.parent));if(u&&t.push(`v${u}`),t.length!==0)return{id:"name",type:"text",data:`${t.join(" ")}
`}}c(En,"K$1"),I(En,"getNameAndVersion");function yn(e){const{help:t}=e;if(!(!t||!t.description))return{id:"description",type:"text",data:`${t.description}
`}}c(yn,"Z$1"),I(yn,"getDescription");function An(e){const t=e.help||{};if("usage"in t)return t.usage?{id:"usage",type:"section",data:{title:"Usage:",body:Array.isArray(t.usage)?t.usage.join(`
`):t.usage}}:void 0;if(e.name){const u=[],n=[Cn(e)];if(e.flags&&Object.keys(e.flags).length>0&&n.push("[flags...]"),e.parameters&&e.parameters.length>0){const{parameters:r}=e,s=r.indexOf("--"),o=s!==-1&&r.slice(s+1).some(i=>i.startsWith("<"));n.push(r.map(i=>i!=="--"?i:o?"--":"[--]").join(" "))}if(n.length>1&&u.push(n.join(" ")),"commands"in e&&e.commands?.length&&u.push(`${e.name} <command>`),u.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:u.join(`
`)}}}}c(An,"G$1"),I(An,"getUsage");function bn(e){return!("commands"in e)||!e.commands?.length?void 0:{id:"commands",type:"section",data:{title:"Commands:",body:{type:"table",data:{tableData:e.commands.map(t=>{const{help:u}=t.options;return[t.options.name,typeof u=="object"&&u.description||""]}),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}c(bn,"Q$1"),I(bn,"getCommands");function wn(e){if(!(!e.flags||Object.keys(e.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:gn(e.flags),indentBody:0}}}c(wn,"X$1"),I(wn,"getFlags");function Bn(e){const{help:t}=e;if(!t||!t.examples||t.examples.length===0)return;let{examples:u}=t;if(Array.isArray(u)&&(u=u.join(`
`)),u)return{id:"examples",type:"section",data:{title:"Examples:",body:u}}}c(Bn,"Y$1"),I(Bn,"getExamples");function vn(e){if(!("alias"in e)||!e.alias)return;const{alias:t}=e;return{id:"aliases",type:"section",data:{title:"Aliases:",body:Array.isArray(t)?t.join(", "):t}}}c(vn,"ee$1"),I(vn,"getAliases");const Jr=I(e=>[En,yn,An,bn,wn,Bn,vn].map(t=>t(e)).filter(Boolean),"generateHelp"),Xr=Mu.WriteStream.prototype.hasColors();let Qr=class{static{c(this,"ne")}static{I(this,"Renderers")}text(t){return t}bold(t){return Xr?`\x1B[1m${t}\x1B[22m`:t.toLocaleUpperCase()}indentText({text:t,spaces:u}){return t.replaceAll(/^/gm," ".repeat(u))}heading(t){return this.bold(t)}section({title:t,body:u,indentBody:n=2}){return`${(t?`${this.heading(t)}
`:"")+(u?this.indentText({text:this.render(u),spaces:n}):"")}
`}table({tableData:t,tableOptions:u,tableBreakpoints:n}){return Nr(t.map(r=>r.map(s=>this.render(s))),n?Hr(n):u)}flagParameter(t){return t===Boolean?"":t===String?"<string>":t===Number?"<number>":Array.isArray(t)?this.flagParameter(t[0]):"<value>"}flagOperator(t){return" "}flagName(t){const{flag:u,flagFormatted:n,aliasesEnabled:r,aliasFormatted:s}=t;let o="";if(s?o+=`${s}, `:r&&(o+=" "),o+=n,"placeholder"in u&&typeof u.placeholder=="string")o+=`${this.flagOperator(t)}${u.placeholder}`;else{const i=this.flagParameter("type"in u?u.type:u);i&&(o+=`${this.flagOperator(t)}${i}`)}return o}flagDefault(t){return JSON.stringify(t)}flagDescription({flag:t}){let u="description"in t?t.description??"":"";if("default"in t){let{default:n}=t;typeof n=="function"&&(n=n()),n&&(u+=` (default: ${this.flagDefault(n)})`)}return u}render(t){if(typeof t=="string")return t;if(Array.isArray(t))return t.map(u=>this.render(u)).join(`
`);if("type"in t&&this[t.type]){const u=this[t.type];if(typeof u=="function")return u.call(this,t.data)}throw new Error(`Invalid node type: ${JSON.stringify(t)}`)}};const ft=I(e=>e.length>0&&!e.includes(" "),"isValidScriptName"),{stringify:Fe}=JSON,Zr=/[|\\{}()[\]^$+*?.]/;function pt(e){const t=[];let u,n;for(const r of e){if(n)throw new Error(`Invalid parameter: Spread parameter ${Fe(n)} must be last`);const s=r[0],o=r.at(-1);let i;if(s==="<"&&o===">"&&(i=!0,u))throw new Error(`Invalid parameter: Required parameter ${Fe(r)} cannot come after optional parameter ${Fe(u)}`);if(s==="["&&o==="]"&&(i=!1,u=r),i===void 0)throw new Error(`Invalid parameter: ${Fe(r)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let a=r.slice(1,-1);const D=a.slice(-3)==="...";D&&(n=r,a=a.slice(0,-3));const f=a.match(Zr);if(f)throw new Error(`Invalid parameter: ${Fe(r)}. Invalid character found ${Fe(f[0])}`);t.push({name:a,required:i,spread:D})}return t}c(pt,"P$1"),I(pt,"parseParameters");function dt(e,t,u,n){for(let r=0;r<t.length;r+=1){const{name:s,required:o,spread:i}=t[r],a=Kr(s);if(a in e)throw new Error(`Invalid parameter: ${Fe(s)} is used more than once.`);const D=i?u.slice(r):u[r];if(i&&(r=t.length),o&&(!D||i&&D.length===0))return console.error(`Error: Missing required parameter ${Fe(s)}
`),n(),process.exit(1);e[a]=D}}c(dt,"S"),I(dt,"mapParametersToArguments");function xn(e){return e!==!1}c(xn,"se$1"),I(xn,"helpEnabled");const Yr=I(e=>{const t=[];for(const[u,n]of Object.entries(e))if(t.push(u),n&&typeof n=="object"&&"alias"in n){const{alias:r}=n;typeof r=="string"&&r?t.push(r):Array.isArray(r)&&t.push(...r.filter(Boolean))}return t},"getKnownFlagNames"),es=I((e,t)=>{if(e.length<3||t.length===0)return;const u=qr(e,t);return Fn(e,u)<=2?u:void 0},"findClosestFlag"),ts=I((e,t)=>{const u=Object.keys(e);if(u.length!==0){for(const n of u){const r=es(n,t),s=r?` (Did you mean --${r}?)`:"";console.error(`Error: Unknown flag: --${n}.${s}`)}process.exit(1)}},"handleUnknownFlags");function ht(e,t,u,n){const r={...t.flags},s=t.version&&!("version"in r);s&&(r.version={type:Boolean,description:"Show version"});const{help:o}=t,i=xn(o);i&&!("help"in r)&&(r.help={type:Boolean,alias:"h",description:"Show help"});const a=gr(r,n,{ignore:t.ignoreArgv}),D=I(()=>{console.log(t.version)},"showVersion");if(s&&a.flags.version===!0)return D(),process.exit(0);const f=new Qr,p=i&&o?.render?o.render:E=>f.render(E),l=I(E=>{const A=Jr({...t,...E?{help:E}:{},flags:r});console.log(p(A,f))},"showHelp");if(i&&a.flags.help===!0)return l(),process.exit(0);if((t.strictFlags??t.parent?.strictFlags)&&ts(a.unknownFlags,Yr(r)),t.parameters){let{parameters:E}=t,A=a._;const _=E.indexOf("--"),x=E.slice(_+1),m=Object.create(null);let $=[];_>-1&&x.length>0&&(E=E.slice(0,_),$=a._["--"],A=A.slice(0,-$.length||void 0)),dt(m,pt(E),A,l),_>-1&&x.length>0&&dt(m,pt(x),$,l),Object.assign(a._,m)}const g={...a,showVersion:D,showHelp:l},C={command:e,...g};if(typeof u=="function"){const E=u(g);if(E&&"then"in E)return Object.assign(Promise.resolve(E),C)}return C}c(ht,"I$2"),I(ht,"cliBase");function $n(e,t){const u=new Map;for(const n of t){const r=[n.options.name],{alias:s}=n.options;s&&(Array.isArray(s)?r.push(...s):r.push(s));for(const o of r){if(u.has(o))throw new Error(`Duplicate command name found: ${Fe(o)}`);u.set(o,n)}}return u.get(e)}c($n,"ce$1"),I($n,"getCommand");function kn(e,t,u=process.argv.slice(2)){if(!e)throw new Error("Options is required");if("name"in e&&(!e.name||!ft(e.name)))throw new Error(`Invalid script name: ${Fe(e.name)}`);const n=u[0];if(e.commands&&n&&ft(n)){const r=$n(n,e.commands);if(r)return ht(r.options.name,{...r.options,parent:e},r.callback,u.slice(1))}return ht(void 0,e,t,u)}c(kn,"fe$1"),I(kn,"cli");function ns(e,t){if(!e)throw new Error("Command options are required");const{name:u}=e;if(u===void 0)throw new Error("Command name is required");if(!ft(u))throw new Error(`Invalid command name ${JSON.stringify(u)}. Command names must be one word.`);return{options:e,callback:t}}c(ns,"de$1"),I(ns,"command");var us="2.27.0",rs={version:us};const Ae=c(e=>he.promises.access(e).then(()=>!0,()=>!1),"fsExists");let Be=!0;const $e=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let je=0;if($e.process&&$e.process.env&&$e.process.stdout){const{FORCE_COLOR:e,NODE_DISABLE_COLORS:t,NO_COLOR:u,TERM:n,COLORTERM:r}=$e.process.env;t||u||e==="0"?Be=!1:e==="1"||e==="2"||e==="3"?Be=!0:n==="dumb"?Be=!1:"CI"in $e.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(s=>s in $e.process.env)?Be=!0:Be=process.stdout.isTTY,Be&&(process.platform==="win32"||r&&(r==="truecolor"||r==="24bit")?je=3:n&&(n.endsWith("-256color")||n.endsWith("256"))?je=2:je=1)}let Rn={enabled:Be,supportLevel:je};function ss(e,t,u=1){const n=`\x1B[${e}m`,r=`\x1B[${t}m`,s=new RegExp(`\\x1b\\[${t}m`,"g");return o=>Rn.enabled&&Rn.supportLevel>=u?n+(""+o).replace(s,n)+r:""+o}c(ss,"kolorist");const os=ss(2,22),Ge=c(e=>e.replaceAll("\\","/"),"slash"),Y=c((e,t)=>(!b.isAbsolute(e)&&!e.startsWith(".")&&!e.startsWith("/")&&(e=`./${e}`),t&&!e.endsWith("/")&&(e+="/"),e),"normalizePath"),is=c(()=>new Date().toLocaleTimeString(),"currentTime"),ke=c((...e)=>console.log(os(is()),...e),"log"),as=process.cwd(),qe=c(e=>Y(b.relative(as,e)),"formatPath"),cs=c(async e=>{const t=await ue.readFile(e,"utf8");try{return Gu(t)}catch(u){throw new Error(`Failed to parse ${qe(e)}: ${u.message}`)}},"readPackageYaml"),_n=c(async e=>{const t=await ue.readFile(e,"utf8");try{return JSON.parse(t)}catch(u){throw new Error(`Failed to parse ${qe(e)}: ${u.message}`)}},"readPackageJson"),ls=c(async e=>{const t=b.join(e,"package.yaml");if(await Ae(t))return{packageJson:await cs(t),packageJsonPath:t};const u=b.join(e,"package.json");if(await Ae(u))return{packageJson:await _n(u),packageJsonPath:u};throw new Error(`package.json not found at: ${u} (also checked for package.yaml)`)},"readPackage"),Ds=c(e=>{let t=!1;if(e.includes("=")){const[u,n]=e.split("=");e=n,t=u==="bin"||u==="binary"}return{type:"legacy",source:"cli",outputPath:Y(e),isExecutable:t}},"parseCliInputFlag"),fs=c(({imports:e},t)=>{const u={};if(e)for(const n in e){if(n.startsWith("#"))continue;const r=e[n];typeof r=="string"&&(u[n]=b.join(t,r))}return u},"getAliases");function Sn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}c(Sn,"getDefaultExportFromCjs");var Ft={},gt,On;function Ke(){if(On)return gt;On=1;const e="\\\\/",t=`[^${e}]`,u="\\.",n="\\+",r="\\?",s="\\/",o="(?=.)",i="[^/]",a=`(?:${s}|$)`,D=`(?:^|${s})`,f=`${u}{1,2}${a}`,p=`(?!${u})`,l=`(?!${D}${f})`,g=`(?!${u}{0,1}${a})`,C=`(?!${f})`,E=`[^.${s}]`,A=`${i}*?`,x={DOT_LITERAL:u,PLUS_LITERAL:n,QMARK_LITERAL:r,SLASH_LITERAL:s,ONE_CHAR:o,QMARK:i,END_ANCHOR:a,DOTS_SLASH:f,NO_DOT:p,NO_DOTS:l,NO_DOT_SLASH:g,NO_DOTS_SLASH:C,QMARK_NO_DOT:E,STAR:A,START_ANCHOR:D,SEP:"/"},m={...x,SLASH_LITERAL:`[${e}]`,QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${u}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${u})`,NO_DOTS:`(?!(?:^|[${e}])${u}{1,2}(?:[${e}]|$))`,NO_DOT_SLASH:`(?!${u}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${u}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`,SEP:"\\"},$={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return gt={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:$,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(B){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${B.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(B){return B===!0?m:x}},gt}c(Ke,"requireConstants");var Tn;function Ve(){return Tn||(Tn=1,(function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:u,REGEX_SPECIAL_CHARS:n,REGEX_SPECIAL_CHARS_GLOBAL:r}=Ke();e.isObject=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),e.hasRegexChars=s=>n.test(s),e.isRegexChar=s=>s.length===1&&e.hasRegexChars(s),e.escapeRegex=s=>s.replace(r,"\\$1"),e.toPosixSlashes=s=>s.replace(t,"/"),e.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const s=navigator.platform.toLowerCase();return s==="win32"||s==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1},e.removeBackslashes=s=>s.replace(u,o=>o==="\\"?"":o),e.escapeLast=(s,o,i)=>{const a=s.lastIndexOf(o,i);return a===-1?s:s[a-1]==="\\"?e.escapeLast(s,o,a-1):`${s.slice(0,a)}\\${s.slice(a)}`},e.removePrefix=(s,o={})=>{let i=s;return i.startsWith("./")&&(i=i.slice(2),o.prefix="./"),i},e.wrapOutput=(s,o={},i={})=>{const a=i.contains?"":"^",D=i.contains?"":"$";let f=`${a}(?:${s})${D}`;return o.negated===!0&&(f=`(?:^(?!${f}).*$)`),f},e.basename=(s,{windows:o}={})=>{const i=s.split(o?/[\\/]/:"/"),a=i[i.length-1];return a===""?i[i.length-2]:a}})(Ft)),Ft}c(Ve,"requireUtils");var mt,jn;function ps(){if(jn)return mt;jn=1;const e=Ve(),{CHAR_ASTERISK:t,CHAR_AT:u,CHAR_BACKWARD_SLASH:n,CHAR_COMMA:r,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:i,CHAR_LEFT_CURLY_BRACE:a,CHAR_LEFT_PARENTHESES:D,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:p,CHAR_QUESTION_MARK:l,CHAR_RIGHT_CURLY_BRACE:g,CHAR_RIGHT_PARENTHESES:C,CHAR_RIGHT_SQUARE_BRACKET:E}=Ke(),A=c(m=>m===i||m===n,"isPathSeparator"),_=c(m=>{m.isPrefix!==!0&&(m.depth=m.isGlobstar?1/0:1)},"depth");return mt=c((m,$)=>{const B=$||{},R=m.length-1,k=B.parts===!0||B.scanToEnd===!0,q=[],M=[],De=[];let z=m,L=-1,G=0,T=0,U=!1,ee=!1,H=!1,ge=!1,re=!1,F=!1,J=!1,fe=!1,we=!1,d=!1,h=0,Ce,S,N={value:"",depth:0,isGlob:!1};const le=c(()=>L>=R,"eos"),pe=c(()=>z.charCodeAt(L+1),"peek"),te=c(()=>(Ce=S,z.charCodeAt(++L)),"advance");for(;L<R;){S=te();let se;if(S===n){J=N.backslashes=!0,S=te(),S===a&&(F=!0);continue}if(F===!0||S===a){for(h++;le()!==!0&&(S=te());){if(S===n){J=N.backslashes=!0,te();continue}if(S===a){h++;continue}if(F!==!0&&S===s&&(S=te())===s){if(U=N.isBrace=!0,H=N.isGlob=!0,d=!0,k===!0)continue;break}if(F!==!0&&S===r){if(U=N.isBrace=!0,H=N.isGlob=!0,d=!0,k===!0)continue;break}if(S===g&&(h--,h===0)){F=!1,U=N.isBrace=!0,d=!0;break}}if(k===!0)continue;break}if(S===i){if(q.push(L),M.push(N),N={value:"",depth:0,