pkgroll 2.26.0 → 2.26.1

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.
@@ -1,44 +1,44 @@
1
- var ku=Object.defineProperty;var c=(e,t)=>ku(e,"name",{value:t,configurable:!0});import Fe,{existsSync as _u}from"node:fs";import b,{resolve as Ou,isAbsolute as Tu,dirname as ju,join as Pu}from"node:path";import Nu from"tty";import{rollup as Iu,watch as Lu}from"rollup";import{importTrace as Ht,patchErrorWithTrace as Mu}from"rollup-plugin-import-trace";import ue from"node:fs/promises";import{parse as Hu}from"yaml";import _e from"node:path/posix";import Wu from"@rollup/plugin-node-resolve";import Uu from"@rollup/plugin-commonjs";import Gu from"@rollup/plugin-json";import qu from"@rollup/plugin-alias";import Ku from"@rollup/plugin-dynamic-import-vars";import{transform as Wt}from"esbuild";import Vu,{builtinModules as zu}from"node:module";import Le from"magic-string";import Xu from"fs";import Ju from"os";import Qu from"path";import{attachScopes as Zu}from"rollup-pluginutils";import"node:url";import{init as Yu,parse as er}from"cjs-module-lexer";var tr=Object.defineProperty,J=c((e,t)=>tr(e,"name",{value:t,configurable:!0}),"a$1");const nr="known-flag",ur="unknown-flag",rr="argument",sr=/\B([A-Z])/g,or=J(e=>e.replaceAll(sr,"-$1").toLowerCase(),"camelToKebab"),{hasOwnProperty:ir}=Object.prototype,Oe=J((e,t)=>ir.call(e,t),"hasOwn"),at=J(e=>typeof e=="function"?[e,!1]:Array.isArray(e)?[e[0],!0]:at(e.type),"parseFlagType"),Ut=J((e,t)=>e===Boolean?t!=="false":t,"normalizeBoolean"),Gt=J((e,t)=>typeof t=="boolean"?t:e===Number&&t===""?Number.NaN:e(t),"applyParser"),ar=/[\s.:=]/,cr=J(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(ar);if(u)throw new Error(`${t} cannot contain "${u?.[0]}"`)},"validateFlagName"),ct=J((e,t,u)=>{if(Oe(e,t))throw new Error(`Duplicate flags named "${t}"`);e[t]=u},"setFlag"),lr=J(e=>{const t={};for(const u in e){if(!Oe(e,u))continue;cr(u);const n=e[u],r=[[],...at(n),n];ct(t,u,r);const s=or(u);if(u!==s&&ct(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`);ct(t,o,r)}}return t},"createRegistry"),Dr=J((e,t)=>{const u={};for(const n in e){if(!Oe(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"),Me="--",fr=3,pr=/^-{1,2}\w/,qt=J(e=>{if(!pr.test(e))return;const t=!e.startsWith(Me);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"),Kt=J((e,{onFlag:t,onArgument:u})=>{let n;const r=J((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===Me){r();const a=e.slice(s+1);u?.(a,[s],!0);break}const i=qt(o);if(i){if(r(),!t)continue;const[a,f,D]=i;if(D)for(let d=0;d<a.length;d+=1){r();const l=d===a.length-1;n=t(a[d],l?f:void 0,[s,d+1,l])}else n=t(a,f,[s])}else r(o,[s])&&u?.([o],[s])}r()},"argvIterator"),Vt=J((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"),dr=J((e,t=process.argv.slice(2),{ignore:u}={})=>{const n=[],r=lr(e),s={},o=[];return o[Me]=[],Kt(t,{onFlag(i,a,f){const D=(f.length===fr||i.length>1)&&Oe(r,i);if(!u?.(D?nr:ur,i,a)){if(D){const[d,l]=r[i],m=Ut(l,a),E=J((y,$)=>{n.push(f),$&&n.push($),d.push(Gt(l,y||""))},"getFollowingValue");return m===void 0?E:E(m)}Oe(s,i)||(s[i]=[]),s[i].push(a===void 0?!0:a),n.push(f)}},onArgument:J((i,a,f)=>{u?.(rr,t[a[0]])||(o.push(...i),f?(o[Me]=i,t.splice(a[0])):n.push(a))},"onArgument")}),Vt(t,n),{flags:Dr(e,r),unknownFlags:s,_:o}},"typeFlag");J((e,t,u=process.argv.slice(2))=>{const n=new Set(e.split(",").map(a=>qt(a)?.[0])),[r,s]=at(t),o=[],i=[];return Kt(u,{onFlag:J((a,f,D)=>{if(!n.has(a)||!s&&o.length>0)return;const d=Ut(r,f),l=J((m,E)=>{i.push(D),E&&i.push(E),o.push(Gt(r,m||""))},"getFollowingValue");return d===void 0?l:l(d)},"onFlag")}),Vt(u,i),s?o:o[0]},"getFlag");var Fr=Object.defineProperty,j=c((e,t)=>Fr(e,"name",{value:t,configurable:!0}),"n");const hr=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 zt({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(zt,"j$1"),j(zt,"ansiRegex");const mr=zt();function lt(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(mr,"")}c(lt,"w$2"),j(lt,"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"),j(Xt,"isAmbiguous");function Jt(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}c(Jt,"z$1"),j(Jt,"isFullWidth");function Qt(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(Qt,"G$2"),j(Qt,"isWide");function Zt(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}c(Zt,"Z$2"),j(Zt,"validate");function Yt(e,{ambiguousAsWide:t=!1}={}){return Zt(e),Jt(e)||Qt(e)||t&&Xt(e)?2:1}c(Yt,"V$2"),j(Yt,"eastAsianWidth");var gr=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 Er=new Intl.Segmenter,Cr=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function Ce(e,t={}){if(typeof e!="string"||e.length===0)return 0;const{ambiguousIsNarrow:u=!0,countAnsiEscapeCodes:n=!1}=t;if(n||(e=lt(e)),e.length===0)return 0;let r=0;const s={ambiguousAsWide:!u};for(const{segment:o}of Er.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)&&!Cr.test(o)){if(gr().test(o)){r+=2;continue}r+=Yt(i,s)}}return r}c(Ce,"d$1"),j(Ce,"stringWidth");const en=j(e=>Math.max(...e.split(`
2
- `).map(t=>Ce(t))),"getLongestLineWidth"),yr=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=en(u[s]);o>t[s]&&(t[s]=o)}}return t},"getColumnContentWidths"),tn=/^\d+%$/,nn={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},Ar=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"&&tn.test(r)){u.push({...nn,width:r,contentWidth:e[n]});continue}if(r&&typeof r=="object"){const s={...nn,...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"),br=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"&&tn.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,f=Math.ceil(u.paddingLeft/r*a),D=a-f;u.paddingLeft-=f,u.paddingRight-=D,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"),un=j(()=>Object.assign([],{columns:0}),"makeRow"),wr=j((e,t)=>{const u=[un()];let[n]=u;for(const r of e){const s=r.width+r.horizontalPadding;n.columns+s>t&&(n=un(),u.push(n)),n.push(r),n.columns+=s}for(const r of u){const s=r.reduce((l,m)=>l+m.width+m.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),f=a.reduce((l,m)=>l+m.autoOverflow,0),D=Math.min(f,o);for(const l of a){const m=Math.floor(l.autoOverflow/f*D);l.width+=m,o-=m}const d=Math.floor(o/i.length);for(let l=0;l<i.length;l+=1){const m=i[l];l===i.length-1?m.width+=o:m.width+=d,o-=d}}return u},"balanceAuto"),Br=j((e,t,u)=>{const n=Ar(u,t);return br(n,e),wr(n,e)},"computeColumnWidths"),Dt=10,rn=j((e=0)=>t=>`\x1B[${t+e}m`,"wrapAnsi16"),sn=j((e=0)=>t=>`\x1B[${38+e};5;${t}m`,"wrapAnsi256"),on=j((e=0)=>(t,u,n)=>`\x1B[${38+e};2;${t};${u};${n}m`,"wrapAnsi16m"),G={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(G.modifier);const vr=Object.keys(G.color),$r=Object.keys(G.bgColor);[...vr,...$r];function an(){const e=new Map;for(const[t,u]of Object.entries(G)){for(const[n,r]of Object.entries(u))G[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},u[n]=G[n],e.set(r[0],r[1]);Object.defineProperty(G,t,{value:u,enumerable:!1})}return Object.defineProperty(G,"codes",{value:e,enumerable:!1}),G.color.close="\x1B[39m",G.bgColor.close="\x1B[49m",G.color.ansi=rn(),G.color.ansi256=sn(),G.color.ansi16m=on(),G.bgColor.ansi=rn(Dt),G.bgColor.ansi256=sn(Dt),G.bgColor.ansi16m=on(Dt),Object.defineProperties(G,{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=>G.rgbToAnsi256(...G.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)=>G.ansi256ToAnsi(G.rgbToAnsi256(t,u,n)),"value"),enumerable:!1},hexToAnsi:{value:j(t=>G.ansi256ToAnsi(G.hexToAnsi256(t)),"value"),enumerable:!1}}),G}c(an,"FD"),j(an,"assembleStyles");const xr=an(),He=new Set(["\x1B","\x9B"]),Rr=39,ft="\x07",cn="[",Sr="]",ln="m",We=`${Sr}8;;`,Dn=j(e=>`${He.values().next().value}${cn}${e}${ln}`,"wrapAnsiCode"),fn=j(e=>`${He.values().next().value}${We}${e}${ft}`,"wrapAnsiHyperlink"),kr=j(e=>e.split(" ").map(t=>Ce(t)),"wordLengths"),pt=j((e,t,u)=>{const n=[...t];let r=!1,s=!1,o=Ce(lt(e.at(-1)));for(const[i,a]of n.entries()){const f=Ce(a);if(o+f<=u?e[e.length-1]+=a:(e.push(a),o=0),He.has(a)&&(r=!0,s=n.slice(i+1,i+1+We.length).join("")===We),r){s?a===ft&&(r=!1,s=!1):a===ln&&(r=!1);continue}o+=f,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"),_r=j(e=>{const t=e.split(" ");let u=t.length;for(;u>0&&!(Ce(t[u-1])>0);)u--;return u===t.length?e:t.slice(0,u).join(" ")+t.slice(u).join("")},"stringVisibleTrimSpacesRight"),Or=j((e,t,u={})=>{if(u.trim!==!1&&e.trim()==="")return"";let n="",r,s;const o=kr(e);let i=[""];for(const[d,l]of e.split(" ").entries()){u.trim!==!1&&(i[i.length-1]=i.at(-1).trimStart());let m=Ce(i.at(-1));if(d!==0&&(m>=t&&(u.wordWrap===!1||u.trim===!1)&&(i.push(""),m=0),(m>0||u.trim===!1)&&(i[i.length-1]+=" ",m++)),u.hard&&o[d]>t){const E=t-m,y=1+Math.floor((o[d]-E-1)/t);Math.floor((o[d]-1)/t)<y&&i.push(""),pt(i,l,t);continue}if(m+o[d]>t&&m>0&&o[d]>0){if(u.wordWrap===!1&&m<t){pt(i,l,t);continue}i.push("")}if(m+o[d]>t&&u.wordWrap===!1){pt(i,l,t);continue}i[i.length-1]+=l}u.trim!==!1&&(i=i.map(d=>_r(d)));const a=i.join(`
3
- `),f=[...a];let D=0;for(const[d,l]of f.entries()){if(n+=l,He.has(l)){const{groups:E}=new RegExp(`(?:\\${cn}(?<code>\\d+)m|\\${We}(?<uri>.*)${ft})`).exec(a.slice(D))||{groups:{}};if(E.code!==void 0){const y=Number.parseFloat(E.code);r=y===Rr?void 0:y}else E.uri!==void 0&&(s=E.uri.length===0?void 0:E.uri)}const m=xr.codes.get(Number(r));f[d+1]===`
4
- `?(s&&(n+=fn("")),r&&m&&(n+=Dn(m))):l===`
5
- `&&(r&&m&&(n+=Dn(r)),s&&(n+=fn(s))),D+=l.length}return n},"exec");function pn(e,t,u){return String(e).normalize().replaceAll(`\r
1
+ var ku=Object.defineProperty;var c=(e,t)=>ku(e,"name",{value:t,configurable:!0});import Fe,{existsSync as _u}from"node:fs";import b,{resolve as Ou,isAbsolute as Tu,dirname as ju,join as Pu}from"node:path";import Nu from"tty";import{rollup as Iu,watch as Lu}from"rollup";import{importTrace as Wt,patchErrorWithTrace as Mu}from"rollup-plugin-import-trace";import ue from"node:fs/promises";import{parse as Hu}from"yaml";import _e from"node:path/posix";import Wu from"@rollup/plugin-node-resolve";import Uu from"@rollup/plugin-commonjs";import Gu from"@rollup/plugin-json";import qu from"@rollup/plugin-alias";import Ku from"@rollup/plugin-dynamic-import-vars";import{transform as Ut}from"esbuild";import Vu,{builtinModules as zu}from"node:module";import Le from"magic-string";import Xu from"fs";import Ju from"os";import Qu from"path";import{attachScopes as Zu}from"rollup-pluginutils";import"node:url";import{init as Yu,parse as er}from"cjs-module-lexer";var tr=Object.defineProperty,J=c((e,t)=>tr(e,"name",{value:t,configurable:!0}),"a$1");const nr="known-flag",ur="unknown-flag",rr="argument",sr=/\B([A-Z])/g,or=J(e=>e.replaceAll(sr,"-$1").toLowerCase(),"camelToKebab"),{hasOwnProperty:ir}=Object.prototype,Oe=J((e,t)=>ir.call(e,t),"hasOwn"),at=J(e=>typeof e=="function"?[e,!1]:Array.isArray(e)?[e[0],!0]:at(e.type),"parseFlagType"),Gt=J((e,t)=>e===Boolean?t!=="false":t,"normalizeBoolean"),qt=J((e,t)=>typeof t=="boolean"?t:e===Number&&t===""?Number.NaN:e(t),"applyParser"),ar=/[\s.:=]/,cr=J(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(ar);if(u)throw new Error(`${t} cannot contain "${u?.[0]}"`)},"validateFlagName"),ct=J((e,t,u)=>{if(Oe(e,t))throw new Error(`Duplicate flags named "${t}"`);e[t]=u},"setFlag"),lr=J(e=>{const t={};for(const u in e){if(!Oe(e,u))continue;cr(u);const n=e[u],r=[[],...at(n),n];ct(t,u,r);const s=or(u);if(u!==s&&ct(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`);ct(t,o,r)}}return t},"createRegistry"),Dr=J((e,t)=>{const u={};for(const n in e){if(!Oe(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"),Me="--",fr=3,pr=/^-{1,2}\w/,Kt=J(e=>{if(!pr.test(e))return;const t=!e.startsWith(Me);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=J((e,{onFlag:t,onArgument:u})=>{let n;const r=J((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===Me){r();const a=e.slice(s+1);u?.(a,[s],!0);break}const i=Kt(o);if(i){if(r(),!t)continue;const[a,f,D]=i;if(D)for(let d=0;d<a.length;d+=1){r();const l=d===a.length-1;n=t(a[d],l?f:void 0,[s,d+1,l])}else n=t(a,f,[s])}else r(o,[s])&&u?.([o],[s])}r()},"argvIterator"),zt=J((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"),dr=J((e,t=process.argv.slice(2),{ignore:u}={})=>{const n=[],r=lr(e),s={},o=[];return o[Me]=[],Vt(t,{onFlag(i,a,f){const D=(f.length===fr||i.length>1)&&Oe(r,i);if(!u?.(D?nr:ur,i,a)){if(D){const[d,l]=r[i],m=Gt(l,a),E=J((y,$)=>{n.push(f),$&&n.push($),d.push(qt(l,y||""))},"getFollowingValue");return m===void 0?E:E(m)}Oe(s,i)||(s[i]=[]),s[i].push(a===void 0?!0:a),n.push(f)}},onArgument:J((i,a,f)=>{u?.(rr,t[a[0]])||(o.push(...i),f?(o[Me]=i,t.splice(a[0])):n.push(a))},"onArgument")}),zt(t,n),{flags:Dr(e,r),unknownFlags:s,_:o}},"typeFlag");J((e,t,u=process.argv.slice(2))=>{const n=new Set(e.split(",").map(a=>Kt(a)?.[0])),[r,s]=at(t),o=[],i=[];return Vt(u,{onFlag:J((a,f,D)=>{if(!n.has(a)||!s&&o.length>0)return;const d=Gt(r,f),l=J((m,E)=>{i.push(D),E&&i.push(E),o.push(qt(r,m||""))},"getFollowingValue");return d===void 0?l:l(d)},"onFlag")}),zt(u,i),s?o:o[0]},"getFlag");var Fr=Object.defineProperty,j=c((e,t)=>Fr(e,"name",{value:t,configurable:!0}),"n");const hr=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 Xt({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(Xt,"j$1"),j(Xt,"ansiRegex");const mr=Xt();function lt(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(mr,"")}c(lt,"w$2"),j(lt,"stripAnsi");function Jt(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(Jt,"P"),j(Jt,"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&&Jt(e)?2:1}c(en,"V$2"),j(en,"eastAsianWidth");var gr=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 Er=new Intl.Segmenter,Cr=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function Ce(e,t={}){if(typeof e!="string"||e.length===0)return 0;const{ambiguousIsNarrow:u=!0,countAnsiEscapeCodes:n=!1}=t;if(n||(e=lt(e)),e.length===0)return 0;let r=0;const s={ambiguousAsWide:!u};for(const{segment:o}of Er.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)&&!Cr.test(o)){if(gr().test(o)){r+=2;continue}r+=en(i,s)}}return r}c(Ce,"d$1"),j(Ce,"stringWidth");const tn=j(e=>Math.max(...e.split(`
2
+ `).map(t=>Ce(t))),"getLongestLineWidth"),yr=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:""},Ar=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"),br=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,f=Math.ceil(u.paddingLeft/r*a),D=a-f;u.paddingLeft-=f,u.paddingRight-=D,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"),wr=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,m)=>l+m.width+m.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),f=a.reduce((l,m)=>l+m.autoOverflow,0),D=Math.min(f,o);for(const l of a){const m=Math.floor(l.autoOverflow/f*D);l.width+=m,o-=m}const d=Math.floor(o/i.length);for(let l=0;l<i.length;l+=1){const m=i[l];l===i.length-1?m.width+=o:m.width+=d,o-=d}}return u},"balanceAuto"),Br=j((e,t,u)=>{const n=Ar(u,t);return br(n,e),wr(n,e)},"computeColumnWidths"),Dt=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"),G={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(G.modifier);const vr=Object.keys(G.color),$r=Object.keys(G.bgColor);[...vr,...$r];function cn(){const e=new Map;for(const[t,u]of Object.entries(G)){for(const[n,r]of Object.entries(u))G[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},u[n]=G[n],e.set(r[0],r[1]);Object.defineProperty(G,t,{value:u,enumerable:!1})}return Object.defineProperty(G,"codes",{value:e,enumerable:!1}),G.color.close="\x1B[39m",G.bgColor.close="\x1B[49m",G.color.ansi=sn(),G.color.ansi256=on(),G.color.ansi16m=an(),G.bgColor.ansi=sn(Dt),G.bgColor.ansi256=on(Dt),G.bgColor.ansi16m=an(Dt),Object.defineProperties(G,{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=>G.rgbToAnsi256(...G.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)=>G.ansi256ToAnsi(G.rgbToAnsi256(t,u,n)),"value"),enumerable:!1},hexToAnsi:{value:j(t=>G.ansi256ToAnsi(G.hexToAnsi256(t)),"value"),enumerable:!1}}),G}c(cn,"FD"),j(cn,"assembleStyles");const xr=cn(),He=new Set(["\x1B","\x9B"]),Rr=39,ft="\x07",ln="[",Sr="]",Dn="m",We=`${Sr}8;;`,fn=j(e=>`${He.values().next().value}${ln}${e}${Dn}`,"wrapAnsiCode"),pn=j(e=>`${He.values().next().value}${We}${e}${ft}`,"wrapAnsiHyperlink"),kr=j(e=>e.split(" ").map(t=>Ce(t)),"wordLengths"),pt=j((e,t,u)=>{const n=[...t];let r=!1,s=!1,o=Ce(lt(e.at(-1)));for(const[i,a]of n.entries()){const f=Ce(a);if(o+f<=u?e[e.length-1]+=a:(e.push(a),o=0),He.has(a)&&(r=!0,s=n.slice(i+1,i+1+We.length).join("")===We),r){s?a===ft&&(r=!1,s=!1):a===Dn&&(r=!1);continue}o+=f,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"),_r=j(e=>{const t=e.split(" ");let u=t.length;for(;u>0&&!(Ce(t[u-1])>0);)u--;return u===t.length?e:t.slice(0,u).join(" ")+t.slice(u).join("")},"stringVisibleTrimSpacesRight"),Or=j((e,t,u={})=>{if(u.trim!==!1&&e.trim()==="")return"";let n="",r,s;const o=kr(e);let i=[""];for(const[d,l]of e.split(" ").entries()){u.trim!==!1&&(i[i.length-1]=i.at(-1).trimStart());let m=Ce(i.at(-1));if(d!==0&&(m>=t&&(u.wordWrap===!1||u.trim===!1)&&(i.push(""),m=0),(m>0||u.trim===!1)&&(i[i.length-1]+=" ",m++)),u.hard&&o[d]>t){const E=t-m,y=1+Math.floor((o[d]-E-1)/t);Math.floor((o[d]-1)/t)<y&&i.push(""),pt(i,l,t);continue}if(m+o[d]>t&&m>0&&o[d]>0){if(u.wordWrap===!1&&m<t){pt(i,l,t);continue}i.push("")}if(m+o[d]>t&&u.wordWrap===!1){pt(i,l,t);continue}i[i.length-1]+=l}u.trim!==!1&&(i=i.map(d=>_r(d)));const a=i.join(`
3
+ `),f=[...a];let D=0;for(const[d,l]of f.entries()){if(n+=l,He.has(l)){const{groups:E}=new RegExp(`(?:\\${ln}(?<code>\\d+)m|\\${We}(?<uri>.*)${ft})`).exec(a.slice(D))||{groups:{}};if(E.code!==void 0){const y=Number.parseFloat(E.code);r=y===Rr?void 0:y}else E.uri!==void 0&&(s=E.uri.length===0?void 0:E.uri)}const m=xr.codes.get(Number(r));f[d+1]===`
4
+ `?(s&&(n+=pn("")),r&&m&&(n+=fn(m))):l===`
5
+ `&&(r&&m&&(n+=fn(r)),s&&(n+=pn(s))),D+=l.length}return n},"exec");function dn(e,t,u){return String(e).normalize().replaceAll(`\r
6
6
  `,`
7
7
  `).split(`
8
8
  `).map(n=>Or(n,t,u)).join(`
9
- `)}c(pn,"BD"),j(pn,"wrapAnsi");const dn=j(e=>Array.from({length:e}).fill(""),"emptyLines"),Tr=j((e,t)=>{const u=[];let n=0;for(const r of e){let s=0;const o=r.map(a=>{let f=t[n]??"";n+=1,a.preprocess&&(f=a.preprocess(f)),en(f)>a.width&&(f=pn(f,a.width,{hard:!0}));let D=f.split(`
10
- `);if(a.postprocess){const{postprocess:d}=a;D=D.map((l,m)=>d.call(a,l,m))}return a.paddingTop&&D.unshift(...dn(a.paddingTop)),a.paddingBottom&&D.push(...dn(a.paddingBottom)),D.length>s&&(s=D.length),{...a,lines:D}}),i=[];for(let a=0;a<s;a+=1){const f=o.map(D=>{const d=D.lines[a]??"",l=Number.isFinite(D.width)?" ".repeat(D.width-Ce(d)):"";let m=D.paddingLeftString;return D.align==="right"&&(m+=l),m+=d,D.align==="left"&&(m+=l),m+D.paddingRightString}).join("");i.push(f)}u.push(i.join(`
9
+ `)}c(dn,"BD"),j(dn,"wrapAnsi");const Fn=j(e=>Array.from({length:e}).fill(""),"emptyLines"),Tr=j((e,t)=>{const u=[];let n=0;for(const r of e){let s=0;const o=r.map(a=>{let f=t[n]??"";n+=1,a.preprocess&&(f=a.preprocess(f)),tn(f)>a.width&&(f=dn(f,a.width,{hard:!0}));let D=f.split(`
10
+ `);if(a.postprocess){const{postprocess:d}=a;D=D.map((l,m)=>d.call(a,l,m))}return a.paddingTop&&D.unshift(...Fn(a.paddingTop)),a.paddingBottom&&D.push(...Fn(a.paddingBottom)),D.length>s&&(s=D.length),{...a,lines:D}}),i=[];for(let a=0;a<s;a+=1){const f=o.map(D=>{const d=D.lines[a]??"",l=Number.isFinite(D.width)?" ".repeat(D.width-Ce(d)):"";let m=D.paddingLeftString;return D.align==="right"&&(m+=l),m+=d,D.align==="left"&&(m+=l),m+D.paddingRightString}).join("");i.push(f)}u.push(i.join(`
11
11
  `))}return u.join(`
12
12
  `)},"renderRow"),jr=j((e,t)=>{if(!e||e.length===0)return"";const u=yr(e),n=u.length;if(n===0)return"";const{stdoutColumns:r,columns:s}=hr(t);if(s.length>n)throw new Error(`${s.length} columns defined, but only ${n} columns found`);const o=Br(r,s,u);return e.map(i=>Tr(o,i)).join(`
13
- `)},"terminalColumns"),Pr=["<",">","=",">=","<="],Nr=j(e=>{if(!Pr.includes(e))throw new TypeError(`Invalid breakpoint operator: ${e}`)},"assertOperator"),Ir=j(e=>{const t=Object.keys(e).map(u=>{const[n,r]=u.split(" ");Nr(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 Lr=Object.defineProperty,U=c((e,t)=>Lr(e,"name",{value:t,configurable:!0}),"s$1");const Mr=U(e=>e.replaceAll(/[\W_]([a-z\d])?/gi,(t,u)=>u?u.toUpperCase():""),"camelCase"),Hr=U(e=>e.replaceAll(/\B([A-Z])/g,"-$1").toLowerCase(),"kebabCase"),Wr={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:U(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 Fn(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:`--${Hr(u)}`,aliasesEnabled:t,aliasFormatted:r?`-${n.alias}`:void 0}}).map(u=>(u.aliasesEnabled=t,[{type:"flagName",data:u},{type:"flagDescription",data:u}])),tableBreakpoints:Wr}}}c(Fn,"T"),U(Fn,"renderFlags");const hn=U(e=>!e||(e.version??(e.help?e.help.version:void 0)),"getVersion"),mn=U(e=>{const t="parent"in e&&e.parent?.name;return(t?`${t} `:"")+e.name},"getName");function gn(e){const t=[];e.name&&t.push(mn(e));const u=hn(e)??("parent"in e&&hn(e.parent));if(u&&t.push(`v${u}`),t.length!==0)return{id:"name",type:"text",data:`${t.join(" ")}
14
- `}}c(gn,"k"),U(gn,"getNameAndVersion");function En(e){const{help:t}=e;if(!(!t||!t.description))return{id:"description",type:"text",data:`${t.description}
15
- `}}c(En,"_$1"),U(En,"getDescription");function Cn(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(`
16
- `):t.usage}}:void 0;if(e.name){const u=[],n=[mn(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(`
17
- `)}}}}c(Cn,"F"),U(Cn,"getUsage");function yn(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=>[t.options.name,t.options.help?t.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}c(yn,"H$1"),U(yn,"getCommands");function An(e){if(!(!e.flags||Object.keys(e.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:Fn(e.flags),indentBody:0}}}c(An,"U"),U(An,"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(`
18
- `)),u)return{id:"examples",type:"section",data:{title:"Examples:",body:u}}}c(bn,"V$1"),U(bn,"getExamples");function wn(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(wn,"J$1"),U(wn,"getAliases");const Ur=U(e=>[gn,En,Cn,yn,An,bn,wn].map(t=>t(e)).filter(Boolean),"generateHelp"),Gr=Nu.WriteStream.prototype.hasColors();class qr{static{c(this,"z")}static{U(this,"Renderers")}text(t){return t}bold(t){return Gr?`\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)}
13
+ `)},"terminalColumns"),Pr=["<",">","=",">=","<="],Nr=j(e=>{if(!Pr.includes(e))throw new TypeError(`Invalid breakpoint operator: ${e}`)},"assertOperator"),Ir=j(e=>{const t=Object.keys(e).map(u=>{const[n,r]=u.split(" ");Nr(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 Lr=Object.defineProperty,U=c((e,t)=>Lr(e,"name",{value:t,configurable:!0}),"s$1");const Mr=U(e=>e.replaceAll(/[\W_]([a-z\d])?/gi,(t,u)=>u?u.toUpperCase():""),"camelCase"),Hr=U(e=>e.replaceAll(/\B([A-Z])/g,"-$1").toLowerCase(),"kebabCase"),Wr={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:U(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 hn(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:`--${Hr(u)}`,aliasesEnabled:t,aliasFormatted:r?`-${n.alias}`:void 0}}).map(u=>(u.aliasesEnabled=t,[{type:"flagName",data:u},{type:"flagDescription",data:u}])),tableBreakpoints:Wr}}}c(hn,"T"),U(hn,"renderFlags");const mn=U(e=>!e||(e.version??(e.help?e.help.version:void 0)),"getVersion"),gn=U(e=>{const t="parent"in e&&e.parent?.name;return(t?`${t} `:"")+e.name},"getName");function En(e){const t=[];e.name&&t.push(gn(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(" ")}
14
+ `}}c(En,"k"),U(En,"getNameAndVersion");function Cn(e){const{help:t}=e;if(!(!t||!t.description))return{id:"description",type:"text",data:`${t.description}
15
+ `}}c(Cn,"_$1"),U(Cn,"getDescription");function yn(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(`
16
+ `):t.usage}}:void 0;if(e.name){const u=[],n=[gn(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(`
17
+ `)}}}}c(yn,"F"),U(yn,"getUsage");function An(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=>[t.options.name,t.options.help?t.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}c(An,"H$1"),U(An,"getCommands");function bn(e){if(!(!e.flags||Object.keys(e.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:hn(e.flags),indentBody:0}}}c(bn,"U"),U(bn,"getFlags");function wn(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(`
18
+ `)),u)return{id:"examples",type:"section",data:{title:"Examples:",body:u}}}c(wn,"V$1"),U(wn,"getExamples");function Bn(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(Bn,"J$1"),U(Bn,"getAliases");const Ur=U(e=>[En,Cn,yn,An,bn,wn,Bn].map(t=>t(e)).filter(Boolean),"generateHelp"),Gr=Nu.WriteStream.prototype.hasColors();class qr{static{c(this,"z")}static{U(this,"Renderers")}text(t){return t}bold(t){return Gr?`\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)}
19
19
  `:"")+(u?this.indentText({text:this.render(u),spaces:n}):"")}
20
20
  `}table({tableData:t,tableOptions:u,tableBreakpoints:n}){return jr(t.map(r=>r.map(s=>this.render(s))),n?Ir(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(`
21
21
  `);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 dt=U(e=>e.length>0&&!e.includes(" "),"isValidScriptName"),{stringify:he}=JSON,Kr=/[|\\{}()[\]^$+*?.]/;function Ue(e){const t=[];let u,n;for(const r of e){if(n)throw new Error(`Invalid parameter: Spread parameter ${he(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 ${he(r)} cannot come after optional parameter ${he(u)}`);if(s==="["&&o==="]"&&(i=!1,u=r),i===void 0)throw new Error(`Invalid parameter: ${he(r)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let a=r.slice(1,-1);const f=a.slice(-3)==="...";f&&(n=r,a=a.slice(0,-3));const D=a.match(Kr);if(D)throw new Error(`Invalid parameter: ${he(r)}. Invalid character found ${he(D[0])}`);t.push({name:a,required:i,spread:f})}return t}c(Ue,"b"),U(Ue,"parseParameters");function Ge(e,t,u,n){for(let r=0;r<t.length;r+=1){const{name:s,required:o,spread:i}=t[r],a=Mr(s);if(a in e)throw new Error(`Invalid parameter: ${he(s)} is used more than once.`);const f=i?u.slice(r):u[r];if(i&&(r=t.length),o&&(!f||i&&f.length===0))return console.error(`Error: Missing required parameter ${he(s)}
22
- `),n(),process.exit(1);e[a]=f}}c(Ge,"v$1"),U(Ge,"mapParametersToArguments");function Bn(e){return e===void 0||e!==!1}c(Bn,"G$1"),U(Bn,"helpEnabled");function Ft(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=Bn(o);i&&!("help"in r)&&(r.help={type:Boolean,alias:"h",description:"Show help"});const a=dr(r,n,{ignore:t.ignoreArgv}),f=U(()=>{console.log(t.version)},"showVersion");if(s&&a.flags.version===!0)return f(),process.exit(0);const D=new qr,d=i&&o?.render?o.render:y=>D.render(y),l=U(y=>{const $=Ur({...t,...y?{help:y}:{},flags:r});console.log(d($,D))},"showHelp");if(i&&a.flags.help===!0)return l(),process.exit(0);if(t.parameters){let{parameters:y}=t,$=a._;const T=y.indexOf("--"),_=y.slice(T+1),g=Object.create(null);if(T>-1&&_.length>0){y=y.slice(0,T);const S=a._["--"];$=$.slice(0,-S.length||void 0),Ge(g,Ue(y),$,l),Ge(g,Ue(_),S,l)}else Ge(g,Ue(y),$,l);Object.assign(a._,g)}const m={...a,showVersion:f,showHelp:l},E={command:e,...m};if(typeof u=="function"){const y=u(m);if(y&&"then"in y)return Object.assign(Promise.resolve(y),E)}return E}c(Ft,"j"),U(Ft,"cliBase");function vn(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: ${he(o)}`);u.set(o,n)}}return u.get(e)}c(vn,"K$1"),U(vn,"getCommand");function $n(e,t,u=process.argv.slice(2)){if(!e)throw new Error("Options is required");if("name"in e&&(!e.name||!dt(e.name)))throw new Error(`Invalid script name: ${he(e.name)}`);const n=u[0];if(e.commands&&n&&dt(n)){const r=vn(n,e.commands);if(r)return Ft(r.options.name,{...r.options,parent:e},r.callback,u.slice(1))}return Ft(void 0,e,t,u)}c($n,"Q$1"),U($n,"cli");function Vr(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(!dt(u))throw new Error(`Invalid command name ${JSON.stringify(u)}. Command names must be one word.`);return{options:e,callback:t}}c(Vr,"X$1"),U(Vr,"command");var zr="2.26.0";const ye=c(e=>Fe.promises.access(e).then(()=>!0,()=>!1),"fsExists");let we=!0;const $e=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let Te=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"?we=!1:e==="1"||e==="2"||e==="3"?we=!0:n==="dumb"?we=!1:"CI"in $e.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(s=>s in $e.process.env)?we=!0:we=process.stdout.isTTY,we&&(process.platform==="win32"||r&&(r==="truecolor"||r==="24bit")?Te=3:n&&(n.endsWith("-256color")||n.endsWith("256"))?Te=2:Te=1)}let xn={enabled:we,supportLevel:Te};function Xr(e,t,u=1){const n=`\x1B[${e}m`,r=`\x1B[${t}m`,s=new RegExp(`\\x1b\\[${t}m`,"g");return o=>xn.enabled&&xn.supportLevel>=u?n+(""+o).replace(s,n)+r:""+o}c(Xr,"kolorist");const Jr=Xr(2,22),qe=c(e=>e.replaceAll("\\","/"),"slash"),Y=c((e,t)=>(!b.isAbsolute(e)&&!e.startsWith(".")&&!e.startsWith("/")&&(e=`./${e}`),t&&!e.endsWith("/")&&(e+="/"),e),"normalizePath"),Qr=c(()=>new Date().toLocaleTimeString(),"currentTime"),xe=c((...e)=>console.log(Jr(Qr()),...e),"log"),Zr=process.cwd(),Ke=c(e=>Y(b.relative(Zr,e)),"formatPath"),Yr=c(async e=>{const t=await ue.readFile(e,"utf8");try{return Hu(t)}catch(u){throw new Error(`Failed to parse ${Ke(e)}: ${u.message}`)}},"readPackageYaml"),Rn=c(async e=>{const t=await ue.readFile(e,"utf8");try{return JSON.parse(t)}catch(u){throw new Error(`Failed to parse ${Ke(e)}: ${u.message}`)}},"readPackageJson"),es=c(async e=>{const t=b.join(e,"package.yaml");if(await ye(t))return{packageJson:await Yr(t),packageJsonPath:t};const u=b.join(e,"package.json");if(await ye(u))return{packageJson:await Rn(u),packageJsonPath:u};throw new Error(`package.json not found at: ${u} (also checked for package.yaml)`)},"readPackage"),ts=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"),ns=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 ht={},mt,kn;function Ve(){if(kn)return mt;kn=1;const e="\\\\/",t=`[^${e}]`,u="\\.",n="\\+",r="\\?",s="\\/",o="(?=.)",i="[^/]",a=`(?:${s}|$)`,f=`(?:^|${s})`,D=`${u}{1,2}${a}`,d=`(?!${u})`,l=`(?!${f}${D})`,m=`(?!${u}{0,1}${a})`,E=`(?!${D})`,y=`[^.${s}]`,$=`${i}*?`,_={DOT_LITERAL:u,PLUS_LITERAL:n,QMARK_LITERAL:r,SLASH_LITERAL:s,ONE_CHAR:o,QMARK:i,END_ANCHOR:a,DOTS_SLASH:D,NO_DOT:d,NO_DOTS:l,NO_DOT_SLASH:m,NO_DOTS_SLASH:E,QMARK_NO_DOT:y,STAR:$,START_ANCHOR:f,SEP:"/"},g={..._,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:"\\"},S={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 mt={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:S,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?g:_}},mt}c(Ve,"requireConstants");var _n;function ze(){return _n||(_n=1,(function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:u,REGEX_SPECIAL_CHARS:n,REGEX_SPECIAL_CHARS_GLOBAL:r}=Ve();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?"":"^",f=i.contains?"":"$";let D=`${a}(?:${s})${f}`;return o.negated===!0&&(D=`(?:^(?!${D}).*$)`),D},e.basename=(s,{windows:o}={})=>{const i=s.split(o?/[\\/]/:"/"),a=i[i.length-1];return a===""?i[i.length-2]:a}})(ht)),ht}c(ze,"requireUtils");var gt,On;function us(){if(On)return gt;On=1;const e=ze(),{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:f,CHAR_LEFT_SQUARE_BRACKET:D,CHAR_PLUS:d,CHAR_QUESTION_MARK:l,CHAR_RIGHT_CURLY_BRACE:m,CHAR_RIGHT_PARENTHESES:E,CHAR_RIGHT_SQUARE_BRACKET:y}=Ve(),$=c(g=>g===i||g===n,"isPathSeparator"),T=c(g=>{g.isPrefix!==!0&&(g.depth=g.isGlobstar?1/0:1)},"depth");return gt=c((g,S)=>{const B=S||{},R=g.length-1,v=B.parts===!0||B.scanToEnd===!0,Q=[],q=[],De=[];let V=g,N=-1,W=0,O=0,H=!1,ee=!1,L=!1,me=!1,re=!1,h=!1,z=!1,fe=!1,be=!1,p=!1,F=0,ge,x,I={value:"",depth:0,isGlob:!1};const le=c(()=>N>=R,"eos"),pe=c(()=>V.charCodeAt(N+1),"peek"),te=c(()=>(ge=x,V.charCodeAt(++N)),"advance");for(;N<R;){x=te();let se;if(x===n){z=I.backslashes=!0,x=te(),x===a&&(h=!0);continue}if(h===!0||x===a){for(F++;le()!==!0&&(x=te());){if(x===n){z=I.backslashes=!0,te();continue}if(x===a){F++;continue}if(h!==!0&&x===s&&(x=te())===s){if(H=I.isBrace=!0,L=I.isGlob=!0,p=!0,v===!0)continue;break}if(h!==!0&&x===r){if(H=I.isBrace=!0,L=I.isGlob=!0,p=!0,v===!0)continue;break}if(x===m&&(F--,F===0)){h=!1,H=I.isBrace=!0,p=!0;break}}if(v===!0)continue;break}if(x===i){if(Q.push(N),q.push(I),I={value:"",depth:0,isGlob:!1},p===!0)continue;if(ge===s&&N===W+1){W+=2;continue}O=N+1;continue}if(B.noext!==!0&&(x===d||x===u||x===t||x===l||x===o)===!0&&pe()===f){if(L=I.isGlob=!0,me=I.isExtglob=!0,p=!0,x===o&&N===W&&(be=!0),v===!0){for(;le()!==!0&&(x=te());){if(x===n){z=I.backslashes=!0,x=te();continue}if(x===E){L=I.isGlob=!0,p=!0;break}}continue}break}if(x===t){if(ge===t&&(re=I.isGlobstar=!0),L=I.isGlob=!0,p=!0,v===!0)continue;break}if(x===l){if(L=I.isGlob=!0,p=!0,v===!0)continue;break}if(x===D){for(;le()!==!0&&(se=te());){if(se===n){z=I.backslashes=!0,te();continue}if(se===y){ee=I.isBracket=!0,L=I.isGlob=!0,p=!0;break}}if(v===!0)continue;break}if(B.nonegate!==!0&&x===o&&N===W){fe=I.negated=!0,W++;continue}if(B.noparen!==!0&&x===f){if(L=I.isGlob=!0,v===!0){for(;le()!==!0&&(x=te());){if(x===f){z=I.backslashes=!0,x=te();continue}if(x===E){p=!0;break}}continue}break}if(L===!0){if(p=!0,v===!0)continue;break}}B.noext===!0&&(me=!1,L=!1);let Z=V,Ee="",ie="";W>0&&(Ee=V.slice(0,W),V=V.slice(W),O-=W),Z&&L===!0&&O>0?(Z=V.slice(0,O),ie=V.slice(O)):L===!0?(Z="",ie=V):Z=V,Z&&Z!==""&&Z!=="/"&&Z!==V&&$(Z.charCodeAt(Z.length-1))&&(Z=Z.slice(0,-1)),B.unescape===!0&&(ie&&(ie=e.removeBackslashes(ie)),Z&&z===!0&&(Z=e.removeBackslashes(Z)));const k={prefix:Ee,input:g,start:W,base:Z,glob:ie,isBrace:H,isBracket:ee,isGlob:L,isExtglob:me,isGlobstar:re,negated:fe,negatedExtglob:be};if(B.tokens===!0&&(k.maxDepth=0,$(x)||q.push(I),k.tokens=q),B.parts===!0||B.tokens===!0){let se;for(let ne=0;ne<Q.length;ne++){const A=se?se+1:W,M=Q[ne],C=g.slice(A,M);B.tokens&&(ne===0&&W!==0?(q[ne].isPrefix=!0,q[ne].value=Ee):q[ne].value=C,T(q[ne]),k.maxDepth+=q[ne].depth),(ne!==0||C!=="")&&De.push(C),se=M}if(se&&se+1<g.length){const ne=g.slice(se+1);De.push(ne),B.tokens&&(q[q.length-1].value=ne,T(q[q.length-1]),k.maxDepth+=q[q.length-1].depth)}k.slashes=Q,k.parts=De}return k},"scan"),gt}c(us,"requireScan");var Et,Tn;function rs(){if(Tn)return Et;Tn=1;const e=Ve(),t=ze(),{MAX_LENGTH:u,POSIX_REGEX_SOURCE:n,REGEX_NON_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:o}=e,i=c((D,d)=>{if(typeof d.expandRange=="function")return d.expandRange(...D,d);D.sort();const l=`[${D.join("-")}]`;try{new RegExp(l)}catch{return D.map(E=>t.escapeRegex(E)).join("..")}return l},"expandRange"),a=c((D,d)=>`Missing ${D}: "${d}" - use "\\\\${d}" to match literal characters`,"syntaxError"),f=c((D,d)=>{if(typeof D!="string")throw new TypeError("Expected a string");D=o[D]||D;const l={...d},m=typeof l.maxLength=="number"?Math.min(u,l.maxLength):u;let E=D.length;if(E>m)throw new SyntaxError(`Input length: ${E}, exceeds maximum allowed length: ${m}`);const y={type:"bos",value:"",output:l.prepend||""},$=[y],T=l.capture?"":"?:",_=e.globChars(l.windows),g=e.extglobChars(_),{DOT_LITERAL:S,PLUS_LITERAL:B,SLASH_LITERAL:R,ONE_CHAR:v,DOTS_SLASH:Q,NO_DOT:q,NO_DOT_SLASH:De,NO_DOTS_SLASH:V,QMARK:N,QMARK_NO_DOT:W,STAR:O,START_ANCHOR:H}=_,ee=c(A=>`(${T}(?:(?!${H}${A.dot?Q:S}).)*?)`,"globstar"),L=l.dot?"":q,me=l.dot?N:W;let re=l.bash===!0?ee(l):O;l.capture&&(re=`(${re})`),typeof l.noext=="boolean"&&(l.noextglob=l.noext);const h={input:D,index:-1,start:0,dot:l.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:$};D=t.removePrefix(D,h),E=D.length;const z=[],fe=[],be=[];let p=y,F;const ge=c(()=>h.index===E-1,"eos"),x=h.peek=(A=1)=>D[h.index+A],I=h.advance=()=>D[++h.index]||"",le=c(()=>D.slice(h.index+1),"remaining"),pe=c((A="",M=0)=>{h.consumed+=A,h.index+=M},"consume"),te=c(A=>{h.output+=A.output!=null?A.output:A.value,pe(A.value)},"append"),Z=c(()=>{let A=1;for(;x()==="!"&&(x(2)!=="("||x(3)==="?");)I(),h.start++,A++;return A%2===0?!1:(h.negated=!0,h.start++,!0)},"negate"),Ee=c(A=>{h[A]++,be.push(A)},"increment"),ie=c(A=>{h[A]--,be.pop()},"decrement"),k=c(A=>{if(p.type==="globstar"){const M=h.braces>0&&(A.type==="comma"||A.type==="brace"),C=A.extglob===!0||z.length&&(A.type==="pipe"||A.type==="paren");A.type!=="slash"&&A.type!=="paren"&&!M&&!C&&(h.output=h.output.slice(0,-p.output.length),p.type="star",p.value="*",p.output=re,h.output+=p.output)}if(z.length&&A.type!=="paren"&&(z[z.length-1].inner+=A.value),(A.value||A.output)&&te(A),p&&p.type==="text"&&A.type==="text"){p.output=(p.output||p.value)+A.value,p.value+=A.value;return}A.prev=p,$.push(A),p=A},"push"),se=c((A,M)=>{const C={...g[M],conditions:1,inner:""};C.prev=p,C.parens=h.parens,C.output=h.output;const P=(l.capture?"(":"")+C.open;Ee("parens"),k({type:A,value:M,output:h.output?"":v}),k({type:"paren",extglob:!0,value:I(),output:P}),z.push(C)},"extglobOpen"),ne=c(A=>{let M=A.close+(l.capture?")":""),C;if(A.type==="negate"){let P=re;if(A.inner&&A.inner.length>1&&A.inner.includes("/")&&(P=ee(l)),(P!==re||ge()||/^\)+$/.test(le()))&&(M=A.close=`)$))${P}`),A.inner.includes("*")&&(C=le())&&/^\.[^\\/.]+$/.test(C)){const K=f(C,{...d,fastpaths:!1}).output;M=A.close=`)${K})${P})`}A.prev.type==="bos"&&(h.negatedExtglob=!0)}k({type:"paren",extglob:!0,value:F,output:M}),ie("parens")},"extglobClose");if(l.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(D)){let A=!1,M=D.replace(s,(C,P,K,oe,X,it)=>oe==="\\"?(A=!0,C):oe==="?"?P?P+oe+(X?N.repeat(X.length):""):it===0?me+(X?N.repeat(X.length):""):N.repeat(K.length):oe==="."?S.repeat(K.length):oe==="*"?P?P+oe+(X?re:""):re:P?C:`\\${C}`);return A===!0&&(l.unescape===!0?M=M.replace(/\\/g,""):M=M.replace(/\\+/g,C=>C.length%2===0?"\\\\":C?"\\":"")),M===D&&l.contains===!0?(h.output=D,h):(h.output=t.wrapOutput(M,h,d),h)}for(;!ge();){if(F=I(),F==="\0")continue;if(F==="\\"){const C=x();if(C==="/"&&l.bash!==!0||C==="."||C===";")continue;if(!C){F+="\\",k({type:"text",value:F});continue}const P=/^\\+/.exec(le());let K=0;if(P&&P[0].length>2&&(K=P[0].length,h.index+=K,K%2!==0&&(F+="\\")),l.unescape===!0?F=I():F+=I(),h.brackets===0){k({type:"text",value:F});continue}}if(h.brackets>0&&(F!=="]"||p.value==="["||p.value==="[^")){if(l.posix!==!1&&F===":"){const C=p.value.slice(1);if(C.includes("[")&&(p.posix=!0,C.includes(":"))){const P=p.value.lastIndexOf("["),K=p.value.slice(0,P),oe=p.value.slice(P+2),X=n[oe];if(X){p.value=K+X,h.backtrack=!0,I(),!y.output&&$.indexOf(p)===1&&(y.output=v);continue}}}(F==="["&&x()!==":"||F==="-"&&x()==="]")&&(F=`\\${F}`),F==="]"&&(p.value==="["||p.value==="[^")&&(F=`\\${F}`),l.posix===!0&&F==="!"&&p.value==="["&&(F="^"),p.value+=F,te({value:F});continue}if(h.quotes===1&&F!=='"'){F=t.escapeRegex(F),p.value+=F,te({value:F});continue}if(F==='"'){h.quotes=h.quotes===1?0:1,l.keepQuotes===!0&&k({type:"text",value:F});continue}if(F==="("){Ee("parens"),k({type:"paren",value:F});continue}if(F===")"){if(h.parens===0&&l.strictBrackets===!0)throw new SyntaxError(a("opening","("));const C=z[z.length-1];if(C&&h.parens===C.parens+1){ne(z.pop());continue}k({type:"paren",value:F,output:h.parens?")":"\\)"}),ie("parens");continue}if(F==="["){if(l.nobracket===!0||!le().includes("]")){if(l.nobracket!==!0&&l.strictBrackets===!0)throw new SyntaxError(a("closing","]"));F=`\\${F}`}else Ee("brackets");k({type:"bracket",value:F});continue}if(F==="]"){if(l.nobracket===!0||p&&p.type==="bracket"&&p.value.length===1){k({type:"text",value:F,output:`\\${F}`});continue}if(h.brackets===0){if(l.strictBrackets===!0)throw new SyntaxError(a("opening","["));k({type:"text",value:F,output:`\\${F}`});continue}ie("brackets");const C=p.value.slice(1);if(p.posix!==!0&&C[0]==="^"&&!C.includes("/")&&(F=`/${F}`),p.value+=F,te({value:F}),l.literalBrackets===!1||t.hasRegexChars(C))continue;const P=t.escapeRegex(p.value);if(h.output=h.output.slice(0,-p.value.length),l.literalBrackets===!0){h.output+=P,p.value=P;continue}p.value=`(${T}${P}|${p.value})`,h.output+=p.value;continue}if(F==="{"&&l.nobrace!==!0){Ee("braces");const C={type:"brace",value:F,output:"(",outputIndex:h.output.length,tokensIndex:h.tokens.length};fe.push(C),k(C);continue}if(F==="}"){const C=fe[fe.length-1];if(l.nobrace===!0||!C){k({type:"text",value:F,output:F});continue}let P=")";if(C.dots===!0){const K=$.slice(),oe=[];for(let X=K.length-1;X>=0&&($.pop(),K[X].type!=="brace");X--)K[X].type!=="dots"&&oe.unshift(K[X].value);P=i(oe,l),h.backtrack=!0}if(C.comma!==!0&&C.dots!==!0){const K=h.output.slice(0,C.outputIndex),oe=h.tokens.slice(C.tokensIndex);C.value=C.output="\\{",F=P="\\}",h.output=K;for(const X of oe)h.output+=X.output||X.value}k({type:"brace",value:F,output:P}),ie("braces"),fe.pop();continue}if(F==="|"){z.length>0&&z[z.length-1].conditions++,k({type:"text",value:F});continue}if(F===","){let C=F;const P=fe[fe.length-1];P&&be[be.length-1]==="braces"&&(P.comma=!0,C="|"),k({type:"comma",value:F,output:C});continue}if(F==="/"){if(p.type==="dot"&&h.index===h.start+1){h.start=h.index+1,h.consumed="",h.output="",$.pop(),p=y;continue}k({type:"slash",value:F,output:R});continue}if(F==="."){if(h.braces>0&&p.type==="dot"){p.value==="."&&(p.output=S);const C=fe[fe.length-1];p.type="dots",p.output+=F,p.value+=F,C.dots=!0;continue}if(h.braces+h.parens===0&&p.type!=="bos"&&p.type!=="slash"){k({type:"text",value:F,output:S});continue}k({type:"dot",value:F,output:S});continue}if(F==="?"){if(!(p&&p.value==="(")&&l.noextglob!==!0&&x()==="("&&x(2)!=="?"){se("qmark",F);continue}if(p&&p.type==="paren"){const P=x();let K=F;(p.value==="("&&!/[!=<:]/.test(P)||P==="<"&&!/<([!=]|\w+>)/.test(le()))&&(K=`\\${F}`),k({type:"text",value:F,output:K});continue}if(l.dot!==!0&&(p.type==="slash"||p.type==="bos")){k({type:"qmark",value:F,output:W});continue}k({type:"qmark",value:F,output:N});continue}if(F==="!"){if(l.noextglob!==!0&&x()==="("&&(x(2)!=="?"||!/[!=<:]/.test(x(3)))){se("negate",F);continue}if(l.nonegate!==!0&&h.index===0){Z();continue}}if(F==="+"){if(l.noextglob!==!0&&x()==="("&&x(2)!=="?"){se("plus",F);continue}if(p&&p.value==="("||l.regex===!1){k({type:"plus",value:F,output:B});continue}if(p&&(p.type==="bracket"||p.type==="paren"||p.type==="brace")||h.parens>0){k({type:"plus",value:F});continue}k({type:"plus",value:B});continue}if(F==="@"){if(l.noextglob!==!0&&x()==="("&&x(2)!=="?"){k({type:"at",extglob:!0,value:F,output:""});continue}k({type:"text",value:F});continue}if(F!=="*"){(F==="$"||F==="^")&&(F=`\\${F}`);const C=r.exec(le());C&&(F+=C[0],h.index+=C[0].length),k({type:"text",value:F});continue}if(p&&(p.type==="globstar"||p.star===!0)){p.type="star",p.star=!0,p.value+=F,p.output=re,h.backtrack=!0,h.globstar=!0,pe(F);continue}let A=le();if(l.noextglob!==!0&&/^\([^?]/.test(A)){se("star",F);continue}if(p.type==="star"){if(l.noglobstar===!0){pe(F);continue}const C=p.prev,P=C.prev,K=C.type==="slash"||C.type==="bos",oe=P&&(P.type==="star"||P.type==="globstar");if(l.bash===!0&&(!K||A[0]&&A[0]!=="/")){k({type:"star",value:F,output:""});continue}const X=h.braces>0&&(C.type==="comma"||C.type==="brace"),it=z.length&&(C.type==="pipe"||C.type==="paren");if(!K&&C.type!=="paren"&&!X&&!it){k({type:"star",value:F,output:""});continue}for(;A.slice(0,3)==="/**";){const Ie=D[h.index+4];if(Ie&&Ie!=="/")break;A=A.slice(3),pe("/**",3)}if(C.type==="bos"&&ge()){p.type="globstar",p.value+=F,p.output=ee(l),h.output=p.output,h.globstar=!0,pe(F);continue}if(C.type==="slash"&&C.prev.type!=="bos"&&!oe&&ge()){h.output=h.output.slice(0,-(C.output+p.output).length),C.output=`(?:${C.output}`,p.type="globstar",p.output=ee(l)+(l.strictSlashes?")":"|$)"),p.value+=F,h.globstar=!0,h.output+=C.output+p.output,pe(F);continue}if(C.type==="slash"&&C.prev.type!=="bos"&&A[0]==="/"){const Ie=A[1]!==void 0?"|$":"";h.output=h.output.slice(0,-(C.output+p.output).length),C.output=`(?:${C.output}`,p.type="globstar",p.output=`${ee(l)}${R}|${R}${Ie})`,p.value+=F,h.output+=C.output+p.output,h.globstar=!0,pe(F+I()),k({type:"slash",value:"/",output:""});continue}if(C.type==="bos"&&A[0]==="/"){p.type="globstar",p.value+=F,p.output=`(?:^|${R}|${ee(l)}${R})`,h.output=p.output,h.globstar=!0,pe(F+I()),k({type:"slash",value:"/",output:""});continue}h.output=h.output.slice(0,-p.output.length),p.type="globstar",p.output=ee(l),p.value+=F,h.output+=p.output,h.globstar=!0,pe(F);continue}const M={type:"star",value:F,output:re};if(l.bash===!0){M.output=".*?",(p.type==="bos"||p.type==="slash")&&(M.output=L+M.output),k(M);continue}if(p&&(p.type==="bracket"||p.type==="paren")&&l.regex===!0){M.output=F,k(M);continue}(h.index===h.start||p.type==="slash"||p.type==="dot")&&(p.type==="dot"?(h.output+=De,p.output+=De):l.dot===!0?(h.output+=V,p.output+=V):(h.output+=L,p.output+=L),x()!=="*"&&(h.output+=v,p.output+=v)),k(M)}for(;h.brackets>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing","]"));h.output=t.escapeLast(h.output,"["),ie("brackets")}for(;h.parens>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing",")"));h.output=t.escapeLast(h.output,"("),ie("parens")}for(;h.braces>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing","}"));h.output=t.escapeLast(h.output,"{"),ie("braces")}if(l.strictSlashes!==!0&&(p.type==="star"||p.type==="bracket")&&k({type:"maybe_slash",value:"",output:`${R}?`}),h.backtrack===!0){h.output="";for(const A of h.tokens)h.output+=A.output!=null?A.output:A.value,A.suffix&&(h.output+=A.suffix)}return h},"parse");return f.fastpaths=(D,d)=>{const l={...d},m=typeof l.maxLength=="number"?Math.min(u,l.maxLength):u,E=D.length;if(E>m)throw new SyntaxError(`Input length: ${E}, exceeds maximum allowed length: ${m}`);D=o[D]||D;const{DOT_LITERAL:y,SLASH_LITERAL:$,ONE_CHAR:T,DOTS_SLASH:_,NO_DOT:g,NO_DOTS:S,NO_DOTS_SLASH:B,STAR:R,START_ANCHOR:v}=e.globChars(l.windows),Q=l.dot?S:g,q=l.dot?B:g,De=l.capture?"":"?:",V={negated:!1,prefix:""};let N=l.bash===!0?".*?":R;l.capture&&(N=`(${N})`);const W=c(L=>L.noglobstar===!0?N:`(${De}(?:(?!${v}${L.dot?_:y}).)*?)`,"globstar"),O=c(L=>{switch(L){case"*":return`${Q}${T}${N}`;case".*":return`${y}${T}${N}`;case"*.*":return`${Q}${N}${y}${T}${N}`;case"*/*":return`${Q}${N}${$}${T}${q}${N}`;case"**":return Q+W(l);case"**/*":return`(?:${Q}${W(l)}${$})?${q}${T}${N}`;case"**/*.*":return`(?:${Q}${W(l)}${$})?${q}${N}${y}${T}${N}`;case"**/.*":return`(?:${Q}${W(l)}${$})?${y}${T}${N}`;default:{const me=/^(.*?)\.(\w+)$/.exec(L);if(!me)return;const re=O(me[1]);return re?re+y+me[2]:void 0}}},"create"),H=t.removePrefix(D,V);let ee=O(H);return ee&&l.strictSlashes!==!0&&(ee+=`${$}?`),ee},Et=f,Et}c(rs,"requireParse");var Ct,jn;function ss(){if(jn)return Ct;jn=1;const e=us(),t=rs(),u=ze(),n=Ve(),r=c(o=>o&&typeof o=="object"&&!Array.isArray(o),"isObject"),s=c((o,i,a=!1)=>{if(Array.isArray(o)){const $=o.map(_=>s(_,i,a));return c(_=>{for(const g of $){const S=g(_);if(S)return S}return!1},"arrayMatcher")}const f=r(o)&&o.tokens&&o.input;if(o===""||typeof o!="string"&&!f)throw new TypeError("Expected pattern to be a non-empty string");const D=i||{},d=D.windows,l=f?s.compileRe(o,i):s.makeRe(o,i,!1,!0),m=l.state;delete l.state;let E=c(()=>!1,"isIgnored");if(D.ignore){const $={...i,ignore:null,onMatch:null,onResult:null};E=s(D.ignore,$,a)}const y=c(($,T=!1)=>{const{isMatch:_,match:g,output:S}=s.test($,l,i,{glob:o,posix:d}),B={glob:o,state:m,regex:l,posix:d,input:$,output:S,match:g,isMatch:_};return typeof D.onResult=="function"&&D.onResult(B),_===!1?(B.isMatch=!1,T?B:!1):E($)?(typeof D.onIgnore=="function"&&D.onIgnore(B),B.isMatch=!1,T?B:!1):(typeof D.onMatch=="function"&&D.onMatch(B),T?B:!0)},"matcher");return a&&(y.state=m),y},"picomatch");return s.test=(o,i,a,{glob:f,posix:D}={})=>{if(typeof o!="string")throw new TypeError("Expected input to be a string");if(o==="")return{isMatch:!1,output:""};const d=a||{},l=d.format||(D?u.toPosixSlashes:null);let m=o===f,E=m&&l?l(o):o;return m===!1&&(E=l?l(o):o,m=E===f),(m===!1||d.capture===!0)&&(d.matchBase===!0||d.basename===!0?m=s.matchBase(o,i,a,D):m=i.exec(E)),{isMatch:!!m,match:m,output:E}},s.matchBase=(o,i,a)=>(i instanceof RegExp?i:s.makeRe(i,a)).test(u.basename(o)),s.isMatch=(o,i,a)=>s(i,a)(o),s.parse=(o,i)=>Array.isArray(o)?o.map(a=>s.parse(a,i)):t(o,{...i,fastpaths:!1}),s.scan=(o,i)=>e(o,i),s.compileRe=(o,i,a=!1,f=!1)=>{if(a===!0)return o.output;const D=i||{},d=D.contains?"":"^",l=D.contains?"":"$";let m=`${d}(?:${o.output})${l}`;o&&o.negated===!0&&(m=`^(?!${m}).*$`);const E=s.toRegex(m,i);return f===!0&&(E.state=o),E},s.makeRe=(o,i={},a=!1,f=!1)=>{if(!o||typeof o!="string")throw new TypeError("Expected a non-empty string");let D={negated:!1,fastpaths:!0};return i.fastpaths!==!1&&(o[0]==="."||o[0]==="*")&&(D.output=t.fastpaths(o,i)),D.output||(D=t(o,i)),s.compileRe(D,i,a,f)},s.toRegex=(o,i)=>{try{const a=i||{};return new RegExp(o,a.flags||(a.nocase?"i":""))}catch(a){if(i&&i.debug===!0)throw a;return/$^/}},s.constants=n,Ct=s,Ct}c(ss,"requirePicomatch$1");var yt,Pn;function os(){if(Pn)return yt;Pn=1;const e=ss(),t=ze();function u(n,r,s=!1){return r&&(r.windows===null||r.windows===void 0)&&(r={...r,windows:t.isWindows()}),e(n,r,s)}return c(u,"picomatch"),Object.assign(u,e),yt=u,yt}c(os,"requirePicomatch");var is=os(),as=Sn(is);const cs=c(e=>{const{publishConfig:t}=e;if(!t)return;const u=["bin","main","exports","types","module"];for(const n of u)t[n]&&(e[n]=t[n])},"applyPublishConfig"),Be=c(e=>{if(e.endsWith(".mjs"))return"module";if(e.endsWith(".cjs"))return"commonjs";if(e.endsWith(".d.ts")||e.endsWith(".d.cts")||e.endsWith(".d.mts"))return"types"},"getFileType"),ls=c(e=>e[0]===".","isPath"),Nn=c(e=>e.slice(1).filter(t=>typeof t=="string"&&t[0]!=="."),"getConditions"),Xe=c((e,t,u,n=[u])=>{if(!e)return[];if(typeof e=="string")return[{source:{type:"package.json",path:[...n]},type:u,conditions:[],format:Be(e)||t,outputPath:Y(e)}];if(Array.isArray(e))return e.flatMap((s,o)=>{const i=[...n,o];return typeof s=="string"?ls(s)?{source:{type:"package.json",path:[...i]},type:u,conditions:Nn(i),format:Be(s)||t,outputPath:Y(s)}:[]:Xe(s,t,u,i)});const r=u==="imports"&&n.length===1;return Object.entries(e).flatMap(([s,o])=>{if(r&&s[0]!=="#")return[];const i=[...n,s];if(typeof o=="string"){const a=Nn(i),f={type:u,source:{type:"package.json",path:i},outputPath:Y(o),conditions:a};return a.includes("types")?{...f,format:"types"}:{...f,format:Be(o)||t}}return Xe(o,t,u,i)})},"parsePackageMap"),Ds=c((e,t)=>{const u=[],n=e.main;n&&u.push({source:{type:"package.json",path:["main"]},type:"legacy",format:Be(n)??t,outputPath:Y(n)});const r=e.module;r&&u.push({source:{type:"package.json",path:["module"]},type:"legacy",format:"module",outputPath:Y(r)});const s=e.types;s&&u.push({source:{type:"package.json",path:["types"]},type:"legacy",format:"types",outputPath:Y(s)});const{bin:o}=e;if(o)if(typeof o=="string")u.push({source:{type:"package.json",path:["bin"]},type:"binary",format:Be(o)??t,outputPath:Y(o)});else for(const[i,a]of Object.entries(o))u.push({source:{type:"package.json",path:["bin",i]},type:"binary",format:Be(a)??t,outputPath:Y(a)});if(e.exports){const i=Xe(e.exports,t,"exports");u.push(...i)}if(e.imports){const i=Xe(e.imports,t,"imports");u.push(...i)}return u},"getPkgEntryPoints"),fs=c(async(e,t)=>{for(const u of t){const n=e+u;if(await ye(n))return{srcExtension:u,sourcePath:n}}},"tryExtensions"),At={".d.ts":[".d.ts",".d.mts",".d.cts",".ts",".tsx",".mts",".cts"],".d.mts":[".d.mts",".d.ts",".d.cts",".ts",".tsx",".mts",".cts"],".d.cts":[".d.cts",".d.ts",".d.mts",".ts",".tsx",".mts",".cts"],".js":[".js",".ts",".tsx",".mts",".cts"],".mjs":[".mjs",".js",".cjs",".mts",".cts",".ts",".tsx"],".cjs":[".cjs",".js",".mjs",".mts",".cts",".ts",".tsx"]},In=Object.keys(At),ps=c(async(e,t)=>{const{outputPath:u}=e,n=In.find(o=>u.endsWith(o));if(!n)return{error:`Unsupported extension (must be ${In.join("|")})`,exportEntry:e};const r=u.slice(t.dist.length,-n.length),s=await fs(_e.join(t.srcResolved,r),At[n]);return s?{exportEntry:e,distExtension:n,srcdist:t,...s}:{error:`Source file not found: ${_e.join(t.src,r)}(${At[n].join("|")})`,exportEntry:e}},"getSourcePath"),ds=c(async e=>{try{return await ue.readdir(e,{withFileTypes:!0})}catch(t){const{code:u}=t;if(u==="ENOENT")return[];throw t}},"safeReaddir"),Ln=c(async(e,t)=>{const u=await ds(e);return(await Promise.all(u.map(async r=>{const s=_e.join(e,r.name);return r.isDirectory()?Ln(s,t):r.isFile()?_e.relative(t,s):[]}))).flat()},"getDirectoryFilesRecursive"),Mn=new Map,Hn=c(async e=>{let t=Mn.get(e);return t||(t=Ln(e,e),Mn.set(e,t)),t},"getDirectoryFiles"),Je=/\.[^./]+$/,Wn=c((e,t)=>{const u=t.at(-1);if(!e.endsWith(u))return;if(t.some(r=>r.includes("/"))){const r=e.split("/").filter(Boolean);for(let s=1;s<=r.length;s+=1){const o=r.slice(0,s).join("/"),i=o+t.join(o);if(i===e)return i}}else for(let r=1;r<=e.length;r+=1){const s=e.slice(0,r),o=s+t.join(s);if(o===e)return o}},"extractWildcardMatch"),Fs=c(async(e,t)=>{const u=Array.from(t).sort((r,s)=>s.dist.length-r.dist.length);return(await Promise.all(e.map(async r=>{if(typeof r.source=="string"||r.source.path[0]!=="exports"&&r.source.path[0]!=="imports"||!r.outputPath.includes("*"))return[r];const s=r.source.path[1];if(!s.includes("*"))return[r];const o=r.outputPath.match(/\.d\.[cm]?ts$/)||r.outputPath.match(Je);if(!o)return[{exportEntry:r,error:`Wildcard pattern must include a file extension (e.g., ".mjs", ".cjs"). Pattern: ${s}`}];const[i]=o,a=r.outputPath.slice(0,-i.length),[f,...D]=a.split("*"),d=f.lastIndexOf("/"),l=d===-1?f:f.slice(0,d+1),m=d>=0?f.slice(d+1):"",E=c(_=>{const g=_.replace(Je,""),S=g.split("/").at(-1)||"";if(m&&!S.startsWith(m))return!1;if(D.length===1){const R=D[0];return!(R&&!(R.includes("/")?g:S).endsWith(R))}const B=m?S.slice(m.length):g;return!!Wn(B,D)},"matchesPattern");if(l==="./")return(await Promise.all(u.map(async g=>{const S=g.srcResolved;return(await Hn(S)).flatMap(R=>{if(!E(R))return[];const v=R.replace(Je,"");return[{...r,outputPath:g.dist+v+i}]})}))).flat();const y=u.find(({dist:_})=>l===_||l.startsWith(_));if(!y)return[];const $=b.posix.join(y.srcResolved,l.slice(y.dist.length));return(await Hn($)).flatMap(_=>{if(!E(_))return[];const g=_.replace(Je,"");if(D.length>1){const S=Wn(g,D);return[{...r,outputPath:l+S+i}]}return[{...r,outputPath:l+g+i}]})}))).flat()},"expandBuildOutputWildcards"),hs=c(async(e,t,u,n)=>{cs(t);const r=t.type??"commonjs",s=n?.includes("false");let o=[];if(!s){o=await Fs(Ds(t,r),e);const a=n?.filter(f=>f!=="false");if(a&&a.length>0){const f=a.map(D=>as(D,D.includes("/")?{}:{matchBase:!0}));o=o.filter(D=>{const l=("error"in D?D.exportEntry:D).outputPath.replace(/^\.\//,"");return f.some(m=>m(l))})}}u.length>0&&o.push(...u.map(a=>({...a,format:Be(a.outputPath)??r})));const i=new Map;return await Promise.all(o.map(async a=>{if("error"in a)return a;const f=e.find(({dist:d})=>a.outputPath.startsWith(d));if(!f)return{exportEntry:a,error:"Ignoring file outside of dist directories"};const D=i.get(a.outputPath);if(D){if(D.format!==a.format)throw new Error(`Conflicting export types "${D.format}" & "${a.format}" found for ${a.outputPath}`)}else i.set(a.outputPath,a);return await ps(a,f)}))},"getBuildEntryPoints"),je=Symbol("entry"),ms=c(e=>({name:"esbuild-transform",transform:{filter:{id:/\.([cm]?[jt]s|[jt]sx)$/},async handler(t,u){const n=await Wt(t,{...e,supported:{"import-meta":!0,"import-attributes":!0},loader:"default",sourcefile:u.replace(/\.[cm]ts/,".ts")});return{code:n.code,map:n.map||null}}}}),"esbuildTransform"),gs=c(e=>{if(e==="es")return"esm";if(e==="cjs"||e==="iife")return e},"getEsbuildFormat"),Es=c(e=>({name:"esbuild-minify",renderChunk:c(async(t,u,n)=>{const r=await Wt(t,{...e,format:gs(n.format),minify:!0,keepNames:!0});return{code:r.code,map:r.map||null}},"renderChunk")}),"esbuildMinify"),bt=c((e,t)=>e[0]-t[0]||e[1]-t[1]||e[2]-t[2],"compareSemver"),Un=c(({target:e})=>{const t=e.some(u=>{if(u=u.trim(),!u.startsWith("node"))return;const n=u.slice(4).split(".").map(Number),r=[n[0],n[1]??0,n[2]??0];return!(bt(r,[12,20,0])>=0&&bt(r,[13,0,0])<0||bt(r,[14,13,1])>=0)});return{name:"node-builtins",resolveId:c(u=>{const n=u.startsWith("node:");if(t&&n&&(u=u.slice(5)),zu.includes(u)||n)return{id:u,external:!0}},"resolveId")}},"nodeBuiltins"),Cs=c(e=>{const t=e.filter(n=>n.exportEntry.type==="binary");if(t.length===0)return{name:"patch-binary"};let u;return{name:"patch-binary",options:c(()=>{u=new Set(t.flatMap(n=>n.inputNames))},"options"),renderChunk:c((n,r,s)=>{if(!r.isEntry||!r.facadeModuleId||!u.has(r.name))return;const o=new Le(n);return o.prepend(`#!/usr/bin/env node
23
- `),{code:o.toString(),map:s.sourcemap?o.generateMap({hires:!0}):void 0}},"renderChunk"),writeBundle:c(async(n,r)=>{const s=new Set(Object.keys(r).map(o=>Y(_e.join(n.dir,o))));await Promise.all(t.map(async({exportEntry:o})=>{const{outputPath:i}=o;s.has(i)&&await Fe.promises.chmod(i,493)}))},"writeBundle")}},"patchBinary"),Gn=c(e=>{const t=e.indexOf("/");if(t===-1)return[e,void 0];if(e[0]==="@"){const u=e.indexOf("/",t+1);return u===-1?[e,void 0]:[e.slice(0,u),e.slice(u+1)]}return[e.slice(0,t),e.slice(t+1)]},"parseSpecifier"),qn=c(e=>{const t=e[0];return!(t==="."||t==="/"||t==="#"||b.isAbsolute(e))},"isBareSpecifier"),wt=c((e,t=process.cwd())=>qe(b.relative(t,e)).split("/").includes("node_modules"),"isFromNodeModules"),Kn=c(()=>{const e=/\.(?:[mc]?js|jsx)$/;return{name:"resolve-js-to-ts",async resolveId(t,u,n){if(u&&e.test(t)){if(!wt(u)){const i=t.replace(/js(x?)$/,"ts$1");return this.resolve(i,u,{...n,skipSelf:!0})}const r=await this.resolve(t,u,{...n,skipSelf:!0});if(r)return r;const s=t.replace(/js(x?)$/,"ts$1"),o=await this.resolve(s,u,{...n,skipSelf:!0});if(o)return o}return null}}},"resolveJsToTs"),Vn=c(e=>e!==null&&typeof e=="object","A"),Re=c((e,t)=>Object.assign(new Error(`[${e}]: ${t}`),{code:e}),"a"),zn="ERR_INVALID_PACKAGE_CONFIG",Bt="ERR_INVALID_PACKAGE_TARGET",ys="ERR_PACKAGE_PATH_NOT_EXPORTED",As=/^\d+$/,bs=/^(\.{1,2}|node_modules)$/i,ws=/\/|\\/;var Xn=(e=>(e.Export="exports",e.Import="imports",e))(Xn||{});const vt=c((e,t,u,n,r)=>{if(t==null)return[];if(typeof t=="string"){const[s,...o]=t.split(ws);if(s===".."||o.some(i=>bs.test(i)))throw Re(Bt,`Invalid "${e}" target "${t}" defined in the package config`);return[r?t.replace(/\*/g,r):t]}if(Array.isArray(t))return t.flatMap(s=>vt(e,s,u,n,r));if(Vn(t)){for(const s of Object.keys(t)){if(As.test(s))throw Re(zn,"Cannot contain numeric property keys");if(s==="default"||n.includes(s))return vt(e,t[s],u,n,r)}return[]}throw Re(Bt,`Invalid "${e}" target "${t}"`)},"f"),Pe="*",Bs=c((e,t)=>{const u=e.indexOf(Pe),n=t.indexOf(Pe);return u===n?t.length>e.length:n>u},"m");function vs(e,t){if(!t.includes(Pe)&&e.hasOwnProperty(t))return[t];let u,n;for(const r of Object.keys(e))if(r.includes(Pe)){const[s,o,i]=r.split(Pe);if(i===void 0&&t.startsWith(s)&&t.endsWith(o)){const a=t.slice(s.length,-o.length||void 0);a&&(!u||Bs(u,r))&&(u=r,n=a)}}return[u,n]}c(vs,"d");const $s=c(e=>Object.keys(e).reduce((t,u)=>{const n=u===""||u[0]!==".";if(t===void 0||t===n)return n;throw Re(zn,'"exports" cannot contain some keys starting with "." and some not')},void 0),"p"),xs=/^\w+:/,Rs=c((e,t,u)=>{if(!e)throw new Error('"exports" is required');t=t===""?".":`./${t}`,(typeof e=="string"||Array.isArray(e)||Vn(e)&&$s(e))&&(e={".":e});const[n,r]=vs(e,t),s=vt(Xn.Export,e[n],t,u,r);if(s.length===0)throw Re(ys,t==="."?'No "exports" main defined':`Package subpath '${t}' is not defined by "exports"`);for(const o of s)if(!o.startsWith("./")&&!xs.test(o))throw Re(Bt,`Invalid "exports" target "${o}" defined in the package config`);return s},"v");var Ss=Object.defineProperty,w=c((e,t)=>Ss(e,"name",{value:t,configurable:!0}),"o");function ae(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}c(ae,"h"),w(ae,"slash");const $t=w(e=>{const t=Fe[e];return(u,...n)=>{const r=`${e}:${n.join(":")}`;let s=u?.get(r);return s===void 0&&(s=Reflect.apply(t,Fe,n),u?.set(r,s)),s}},"cacheFs"),de=$t("existsSync"),ks=$t("readFileSync"),Qe=$t("statSync"),Jn=w((e,t,u)=>{for(;;){const n=b.posix.join(e,t);if(de(u,n))return n;const r=b.dirname(e);if(r===e)return;e=r}},"findUp"),xt=/^\.{1,2}(\/.*)?$/,Rt=w(e=>{const t=ae(e);return xt.test(t)?t:`./${t}`},"normalizeRelativePath");function Qn(e,t=!1){const u=e.length;let n=0,r="",s=0,o=16,i=0,a=0,f=0,D=0,d=0;function l(g,S){let B=0,R=0;for(;B<g;){let v=e.charCodeAt(n);if(v>=48&&v<=57)R=R*16+v-48;else if(v>=65&&v<=70)R=R*16+v-65+10;else if(v>=97&&v<=102)R=R*16+v-97+10;else break;n++,B++}return B<g&&(R=-1),R}c(l,"y"),w(l,"scanHexDigits");function m(g){n=g,r="",s=0,o=16,d=0}c(m,"v"),w(m,"setPosition");function E(){let g=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&ve(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&ve(e.charCodeAt(n)))for(n++;n<e.length&&ve(e.charCodeAt(n));)n++;else return d=3,e.substring(g,n);let S=n;if(n<e.length&&(e.charCodeAt(n)===69||e.charCodeAt(n)===101))if(n++,(n<e.length&&e.charCodeAt(n)===43||e.charCodeAt(n)===45)&&n++,n<e.length&&ve(e.charCodeAt(n))){for(n++;n<e.length&&ve(e.charCodeAt(n));)n++;S=n}else d=3;return e.substring(g,S)}c(E,"j"),w(E,"scanNumber");function y(){let g="",S=n;for(;;){if(n>=u){g+=e.substring(S,n),d=2;break}const B=e.charCodeAt(n);if(B===34){g+=e.substring(S,n),n++;break}if(B===92){if(g+=e.substring(S,n),n++,n>=u){d=2;break}switch(e.charCodeAt(n++)){case 34:g+='"';break;case 92:g+="\\";break;case 47:g+="/";break;case 98:g+="\b";break;case 102:g+="\f";break;case 110:g+=`
22
+ `),n(),process.exit(1);e[a]=f}}c(Ge,"v$1"),U(Ge,"mapParametersToArguments");function vn(e){return e===void 0||e!==!1}c(vn,"G$1"),U(vn,"helpEnabled");function Ft(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=vn(o);i&&!("help"in r)&&(r.help={type:Boolean,alias:"h",description:"Show help"});const a=dr(r,n,{ignore:t.ignoreArgv}),f=U(()=>{console.log(t.version)},"showVersion");if(s&&a.flags.version===!0)return f(),process.exit(0);const D=new qr,d=i&&o?.render?o.render:y=>D.render(y),l=U(y=>{const $=Ur({...t,...y?{help:y}:{},flags:r});console.log(d($,D))},"showHelp");if(i&&a.flags.help===!0)return l(),process.exit(0);if(t.parameters){let{parameters:y}=t,$=a._;const T=y.indexOf("--"),_=y.slice(T+1),g=Object.create(null);if(T>-1&&_.length>0){y=y.slice(0,T);const S=a._["--"];$=$.slice(0,-S.length||void 0),Ge(g,Ue(y),$,l),Ge(g,Ue(_),S,l)}else Ge(g,Ue(y),$,l);Object.assign(a._,g)}const m={...a,showVersion:f,showHelp:l},E={command:e,...m};if(typeof u=="function"){const y=u(m);if(y&&"then"in y)return Object.assign(Promise.resolve(y),E)}return E}c(Ft,"j"),U(Ft,"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: ${he(o)}`);u.set(o,n)}}return u.get(e)}c($n,"K$1"),U($n,"getCommand");function xn(e,t,u=process.argv.slice(2)){if(!e)throw new Error("Options is required");if("name"in e&&(!e.name||!dt(e.name)))throw new Error(`Invalid script name: ${he(e.name)}`);const n=u[0];if(e.commands&&n&&dt(n)){const r=$n(n,e.commands);if(r)return Ft(r.options.name,{...r.options,parent:e},r.callback,u.slice(1))}return Ft(void 0,e,t,u)}c(xn,"Q$1"),U(xn,"cli");function Vr(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(!dt(u))throw new Error(`Invalid command name ${JSON.stringify(u)}. Command names must be one word.`);return{options:e,callback:t}}c(Vr,"X$1"),U(Vr,"command");var zr="2.26.1",Xr={version:zr};const ye=c(e=>Fe.promises.access(e).then(()=>!0,()=>!1),"fsExists");let we=!0;const $e=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let Te=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"?we=!1:e==="1"||e==="2"||e==="3"?we=!0:n==="dumb"?we=!1:"CI"in $e.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(s=>s in $e.process.env)?we=!0:we=process.stdout.isTTY,we&&(process.platform==="win32"||r&&(r==="truecolor"||r==="24bit")?Te=3:n&&(n.endsWith("-256color")||n.endsWith("256"))?Te=2:Te=1)}let Rn={enabled:we,supportLevel:Te};function Jr(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(Jr,"kolorist");const Qr=Jr(2,22),qe=c(e=>e.replaceAll("\\","/"),"slash"),Y=c((e,t)=>(!b.isAbsolute(e)&&!e.startsWith(".")&&!e.startsWith("/")&&(e=`./${e}`),t&&!e.endsWith("/")&&(e+="/"),e),"normalizePath"),Zr=c(()=>new Date().toLocaleTimeString(),"currentTime"),xe=c((...e)=>console.log(Qr(Zr()),...e),"log"),Yr=process.cwd(),Ke=c(e=>Y(b.relative(Yr,e)),"formatPath"),es=c(async e=>{const t=await ue.readFile(e,"utf8");try{return Hu(t)}catch(u){throw new Error(`Failed to parse ${Ke(e)}: ${u.message}`)}},"readPackageYaml"),Sn=c(async e=>{const t=await ue.readFile(e,"utf8");try{return JSON.parse(t)}catch(u){throw new Error(`Failed to parse ${Ke(e)}: ${u.message}`)}},"readPackageJson"),ts=c(async e=>{const t=b.join(e,"package.yaml");if(await ye(t))return{packageJson:await es(t),packageJsonPath:t};const u=b.join(e,"package.json");if(await ye(u))return{packageJson:await Sn(u),packageJsonPath:u};throw new Error(`package.json not found at: ${u} (also checked for package.yaml)`)},"readPackage"),ns=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"),us=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 kn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}c(kn,"getDefaultExportFromCjs");var ht={},mt,_n;function Ve(){if(_n)return mt;_n=1;const e="\\\\/",t=`[^${e}]`,u="\\.",n="\\+",r="\\?",s="\\/",o="(?=.)",i="[^/]",a=`(?:${s}|$)`,f=`(?:^|${s})`,D=`${u}{1,2}${a}`,d=`(?!${u})`,l=`(?!${f}${D})`,m=`(?!${u}{0,1}${a})`,E=`(?!${D})`,y=`[^.${s}]`,$=`${i}*?`,_={DOT_LITERAL:u,PLUS_LITERAL:n,QMARK_LITERAL:r,SLASH_LITERAL:s,ONE_CHAR:o,QMARK:i,END_ANCHOR:a,DOTS_SLASH:D,NO_DOT:d,NO_DOTS:l,NO_DOT_SLASH:m,NO_DOTS_SLASH:E,QMARK_NO_DOT:y,STAR:$,START_ANCHOR:f,SEP:"/"},g={..._,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:"\\"},S={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 mt={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:S,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?g:_}},mt}c(Ve,"requireConstants");var On;function ze(){return On||(On=1,(function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:u,REGEX_SPECIAL_CHARS:n,REGEX_SPECIAL_CHARS_GLOBAL:r}=Ve();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?"":"^",f=i.contains?"":"$";let D=`${a}(?:${s})${f}`;return o.negated===!0&&(D=`(?:^(?!${D}).*$)`),D},e.basename=(s,{windows:o}={})=>{const i=s.split(o?/[\\/]/:"/"),a=i[i.length-1];return a===""?i[i.length-2]:a}})(ht)),ht}c(ze,"requireUtils");var gt,Tn;function rs(){if(Tn)return gt;Tn=1;const e=ze(),{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:f,CHAR_LEFT_SQUARE_BRACKET:D,CHAR_PLUS:d,CHAR_QUESTION_MARK:l,CHAR_RIGHT_CURLY_BRACE:m,CHAR_RIGHT_PARENTHESES:E,CHAR_RIGHT_SQUARE_BRACKET:y}=Ve(),$=c(g=>g===i||g===n,"isPathSeparator"),T=c(g=>{g.isPrefix!==!0&&(g.depth=g.isGlobstar?1/0:1)},"depth");return gt=c((g,S)=>{const B=S||{},R=g.length-1,v=B.parts===!0||B.scanToEnd===!0,Q=[],q=[],De=[];let V=g,N=-1,W=0,O=0,H=!1,ee=!1,L=!1,me=!1,re=!1,h=!1,z=!1,fe=!1,be=!1,p=!1,F=0,ge,x,I={value:"",depth:0,isGlob:!1};const le=c(()=>N>=R,"eos"),pe=c(()=>V.charCodeAt(N+1),"peek"),te=c(()=>(ge=x,V.charCodeAt(++N)),"advance");for(;N<R;){x=te();let se;if(x===n){z=I.backslashes=!0,x=te(),x===a&&(h=!0);continue}if(h===!0||x===a){for(F++;le()!==!0&&(x=te());){if(x===n){z=I.backslashes=!0,te();continue}if(x===a){F++;continue}if(h!==!0&&x===s&&(x=te())===s){if(H=I.isBrace=!0,L=I.isGlob=!0,p=!0,v===!0)continue;break}if(h!==!0&&x===r){if(H=I.isBrace=!0,L=I.isGlob=!0,p=!0,v===!0)continue;break}if(x===m&&(F--,F===0)){h=!1,H=I.isBrace=!0,p=!0;break}}if(v===!0)continue;break}if(x===i){if(Q.push(N),q.push(I),I={value:"",depth:0,isGlob:!1},p===!0)continue;if(ge===s&&N===W+1){W+=2;continue}O=N+1;continue}if(B.noext!==!0&&(x===d||x===u||x===t||x===l||x===o)===!0&&pe()===f){if(L=I.isGlob=!0,me=I.isExtglob=!0,p=!0,x===o&&N===W&&(be=!0),v===!0){for(;le()!==!0&&(x=te());){if(x===n){z=I.backslashes=!0,x=te();continue}if(x===E){L=I.isGlob=!0,p=!0;break}}continue}break}if(x===t){if(ge===t&&(re=I.isGlobstar=!0),L=I.isGlob=!0,p=!0,v===!0)continue;break}if(x===l){if(L=I.isGlob=!0,p=!0,v===!0)continue;break}if(x===D){for(;le()!==!0&&(se=te());){if(se===n){z=I.backslashes=!0,te();continue}if(se===y){ee=I.isBracket=!0,L=I.isGlob=!0,p=!0;break}}if(v===!0)continue;break}if(B.nonegate!==!0&&x===o&&N===W){fe=I.negated=!0,W++;continue}if(B.noparen!==!0&&x===f){if(L=I.isGlob=!0,v===!0){for(;le()!==!0&&(x=te());){if(x===f){z=I.backslashes=!0,x=te();continue}if(x===E){p=!0;break}}continue}break}if(L===!0){if(p=!0,v===!0)continue;break}}B.noext===!0&&(me=!1,L=!1);let Z=V,Ee="",ie="";W>0&&(Ee=V.slice(0,W),V=V.slice(W),O-=W),Z&&L===!0&&O>0?(Z=V.slice(0,O),ie=V.slice(O)):L===!0?(Z="",ie=V):Z=V,Z&&Z!==""&&Z!=="/"&&Z!==V&&$(Z.charCodeAt(Z.length-1))&&(Z=Z.slice(0,-1)),B.unescape===!0&&(ie&&(ie=e.removeBackslashes(ie)),Z&&z===!0&&(Z=e.removeBackslashes(Z)));const k={prefix:Ee,input:g,start:W,base:Z,glob:ie,isBrace:H,isBracket:ee,isGlob:L,isExtglob:me,isGlobstar:re,negated:fe,negatedExtglob:be};if(B.tokens===!0&&(k.maxDepth=0,$(x)||q.push(I),k.tokens=q),B.parts===!0||B.tokens===!0){let se;for(let ne=0;ne<Q.length;ne++){const A=se?se+1:W,M=Q[ne],C=g.slice(A,M);B.tokens&&(ne===0&&W!==0?(q[ne].isPrefix=!0,q[ne].value=Ee):q[ne].value=C,T(q[ne]),k.maxDepth+=q[ne].depth),(ne!==0||C!=="")&&De.push(C),se=M}if(se&&se+1<g.length){const ne=g.slice(se+1);De.push(ne),B.tokens&&(q[q.length-1].value=ne,T(q[q.length-1]),k.maxDepth+=q[q.length-1].depth)}k.slashes=Q,k.parts=De}return k},"scan"),gt}c(rs,"requireScan");var Et,jn;function ss(){if(jn)return Et;jn=1;const e=Ve(),t=ze(),{MAX_LENGTH:u,POSIX_REGEX_SOURCE:n,REGEX_NON_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:o}=e,i=c((D,d)=>{if(typeof d.expandRange=="function")return d.expandRange(...D,d);D.sort();const l=`[${D.join("-")}]`;try{new RegExp(l)}catch{return D.map(E=>t.escapeRegex(E)).join("..")}return l},"expandRange"),a=c((D,d)=>`Missing ${D}: "${d}" - use "\\\\${d}" to match literal characters`,"syntaxError"),f=c((D,d)=>{if(typeof D!="string")throw new TypeError("Expected a string");D=o[D]||D;const l={...d},m=typeof l.maxLength=="number"?Math.min(u,l.maxLength):u;let E=D.length;if(E>m)throw new SyntaxError(`Input length: ${E}, exceeds maximum allowed length: ${m}`);const y={type:"bos",value:"",output:l.prepend||""},$=[y],T=l.capture?"":"?:",_=e.globChars(l.windows),g=e.extglobChars(_),{DOT_LITERAL:S,PLUS_LITERAL:B,SLASH_LITERAL:R,ONE_CHAR:v,DOTS_SLASH:Q,NO_DOT:q,NO_DOT_SLASH:De,NO_DOTS_SLASH:V,QMARK:N,QMARK_NO_DOT:W,STAR:O,START_ANCHOR:H}=_,ee=c(A=>`(${T}(?:(?!${H}${A.dot?Q:S}).)*?)`,"globstar"),L=l.dot?"":q,me=l.dot?N:W;let re=l.bash===!0?ee(l):O;l.capture&&(re=`(${re})`),typeof l.noext=="boolean"&&(l.noextglob=l.noext);const h={input:D,index:-1,start:0,dot:l.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:$};D=t.removePrefix(D,h),E=D.length;const z=[],fe=[],be=[];let p=y,F;const ge=c(()=>h.index===E-1,"eos"),x=h.peek=(A=1)=>D[h.index+A],I=h.advance=()=>D[++h.index]||"",le=c(()=>D.slice(h.index+1),"remaining"),pe=c((A="",M=0)=>{h.consumed+=A,h.index+=M},"consume"),te=c(A=>{h.output+=A.output!=null?A.output:A.value,pe(A.value)},"append"),Z=c(()=>{let A=1;for(;x()==="!"&&(x(2)!=="("||x(3)==="?");)I(),h.start++,A++;return A%2===0?!1:(h.negated=!0,h.start++,!0)},"negate"),Ee=c(A=>{h[A]++,be.push(A)},"increment"),ie=c(A=>{h[A]--,be.pop()},"decrement"),k=c(A=>{if(p.type==="globstar"){const M=h.braces>0&&(A.type==="comma"||A.type==="brace"),C=A.extglob===!0||z.length&&(A.type==="pipe"||A.type==="paren");A.type!=="slash"&&A.type!=="paren"&&!M&&!C&&(h.output=h.output.slice(0,-p.output.length),p.type="star",p.value="*",p.output=re,h.output+=p.output)}if(z.length&&A.type!=="paren"&&(z[z.length-1].inner+=A.value),(A.value||A.output)&&te(A),p&&p.type==="text"&&A.type==="text"){p.output=(p.output||p.value)+A.value,p.value+=A.value;return}A.prev=p,$.push(A),p=A},"push"),se=c((A,M)=>{const C={...g[M],conditions:1,inner:""};C.prev=p,C.parens=h.parens,C.output=h.output;const P=(l.capture?"(":"")+C.open;Ee("parens"),k({type:A,value:M,output:h.output?"":v}),k({type:"paren",extglob:!0,value:I(),output:P}),z.push(C)},"extglobOpen"),ne=c(A=>{let M=A.close+(l.capture?")":""),C;if(A.type==="negate"){let P=re;if(A.inner&&A.inner.length>1&&A.inner.includes("/")&&(P=ee(l)),(P!==re||ge()||/^\)+$/.test(le()))&&(M=A.close=`)$))${P}`),A.inner.includes("*")&&(C=le())&&/^\.[^\\/.]+$/.test(C)){const K=f(C,{...d,fastpaths:!1}).output;M=A.close=`)${K})${P})`}A.prev.type==="bos"&&(h.negatedExtglob=!0)}k({type:"paren",extglob:!0,value:F,output:M}),ie("parens")},"extglobClose");if(l.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(D)){let A=!1,M=D.replace(s,(C,P,K,oe,X,it)=>oe==="\\"?(A=!0,C):oe==="?"?P?P+oe+(X?N.repeat(X.length):""):it===0?me+(X?N.repeat(X.length):""):N.repeat(K.length):oe==="."?S.repeat(K.length):oe==="*"?P?P+oe+(X?re:""):re:P?C:`\\${C}`);return A===!0&&(l.unescape===!0?M=M.replace(/\\/g,""):M=M.replace(/\\+/g,C=>C.length%2===0?"\\\\":C?"\\":"")),M===D&&l.contains===!0?(h.output=D,h):(h.output=t.wrapOutput(M,h,d),h)}for(;!ge();){if(F=I(),F==="\0")continue;if(F==="\\"){const C=x();if(C==="/"&&l.bash!==!0||C==="."||C===";")continue;if(!C){F+="\\",k({type:"text",value:F});continue}const P=/^\\+/.exec(le());let K=0;if(P&&P[0].length>2&&(K=P[0].length,h.index+=K,K%2!==0&&(F+="\\")),l.unescape===!0?F=I():F+=I(),h.brackets===0){k({type:"text",value:F});continue}}if(h.brackets>0&&(F!=="]"||p.value==="["||p.value==="[^")){if(l.posix!==!1&&F===":"){const C=p.value.slice(1);if(C.includes("[")&&(p.posix=!0,C.includes(":"))){const P=p.value.lastIndexOf("["),K=p.value.slice(0,P),oe=p.value.slice(P+2),X=n[oe];if(X){p.value=K+X,h.backtrack=!0,I(),!y.output&&$.indexOf(p)===1&&(y.output=v);continue}}}(F==="["&&x()!==":"||F==="-"&&x()==="]")&&(F=`\\${F}`),F==="]"&&(p.value==="["||p.value==="[^")&&(F=`\\${F}`),l.posix===!0&&F==="!"&&p.value==="["&&(F="^"),p.value+=F,te({value:F});continue}if(h.quotes===1&&F!=='"'){F=t.escapeRegex(F),p.value+=F,te({value:F});continue}if(F==='"'){h.quotes=h.quotes===1?0:1,l.keepQuotes===!0&&k({type:"text",value:F});continue}if(F==="("){Ee("parens"),k({type:"paren",value:F});continue}if(F===")"){if(h.parens===0&&l.strictBrackets===!0)throw new SyntaxError(a("opening","("));const C=z[z.length-1];if(C&&h.parens===C.parens+1){ne(z.pop());continue}k({type:"paren",value:F,output:h.parens?")":"\\)"}),ie("parens");continue}if(F==="["){if(l.nobracket===!0||!le().includes("]")){if(l.nobracket!==!0&&l.strictBrackets===!0)throw new SyntaxError(a("closing","]"));F=`\\${F}`}else Ee("brackets");k({type:"bracket",value:F});continue}if(F==="]"){if(l.nobracket===!0||p&&p.type==="bracket"&&p.value.length===1){k({type:"text",value:F,output:`\\${F}`});continue}if(h.brackets===0){if(l.strictBrackets===!0)throw new SyntaxError(a("opening","["));k({type:"text",value:F,output:`\\${F}`});continue}ie("brackets");const C=p.value.slice(1);if(p.posix!==!0&&C[0]==="^"&&!C.includes("/")&&(F=`/${F}`),p.value+=F,te({value:F}),l.literalBrackets===!1||t.hasRegexChars(C))continue;const P=t.escapeRegex(p.value);if(h.output=h.output.slice(0,-p.value.length),l.literalBrackets===!0){h.output+=P,p.value=P;continue}p.value=`(${T}${P}|${p.value})`,h.output+=p.value;continue}if(F==="{"&&l.nobrace!==!0){Ee("braces");const C={type:"brace",value:F,output:"(",outputIndex:h.output.length,tokensIndex:h.tokens.length};fe.push(C),k(C);continue}if(F==="}"){const C=fe[fe.length-1];if(l.nobrace===!0||!C){k({type:"text",value:F,output:F});continue}let P=")";if(C.dots===!0){const K=$.slice(),oe=[];for(let X=K.length-1;X>=0&&($.pop(),K[X].type!=="brace");X--)K[X].type!=="dots"&&oe.unshift(K[X].value);P=i(oe,l),h.backtrack=!0}if(C.comma!==!0&&C.dots!==!0){const K=h.output.slice(0,C.outputIndex),oe=h.tokens.slice(C.tokensIndex);C.value=C.output="\\{",F=P="\\}",h.output=K;for(const X of oe)h.output+=X.output||X.value}k({type:"brace",value:F,output:P}),ie("braces"),fe.pop();continue}if(F==="|"){z.length>0&&z[z.length-1].conditions++,k({type:"text",value:F});continue}if(F===","){let C=F;const P=fe[fe.length-1];P&&be[be.length-1]==="braces"&&(P.comma=!0,C="|"),k({type:"comma",value:F,output:C});continue}if(F==="/"){if(p.type==="dot"&&h.index===h.start+1){h.start=h.index+1,h.consumed="",h.output="",$.pop(),p=y;continue}k({type:"slash",value:F,output:R});continue}if(F==="."){if(h.braces>0&&p.type==="dot"){p.value==="."&&(p.output=S);const C=fe[fe.length-1];p.type="dots",p.output+=F,p.value+=F,C.dots=!0;continue}if(h.braces+h.parens===0&&p.type!=="bos"&&p.type!=="slash"){k({type:"text",value:F,output:S});continue}k({type:"dot",value:F,output:S});continue}if(F==="?"){if(!(p&&p.value==="(")&&l.noextglob!==!0&&x()==="("&&x(2)!=="?"){se("qmark",F);continue}if(p&&p.type==="paren"){const P=x();let K=F;(p.value==="("&&!/[!=<:]/.test(P)||P==="<"&&!/<([!=]|\w+>)/.test(le()))&&(K=`\\${F}`),k({type:"text",value:F,output:K});continue}if(l.dot!==!0&&(p.type==="slash"||p.type==="bos")){k({type:"qmark",value:F,output:W});continue}k({type:"qmark",value:F,output:N});continue}if(F==="!"){if(l.noextglob!==!0&&x()==="("&&(x(2)!=="?"||!/[!=<:]/.test(x(3)))){se("negate",F);continue}if(l.nonegate!==!0&&h.index===0){Z();continue}}if(F==="+"){if(l.noextglob!==!0&&x()==="("&&x(2)!=="?"){se("plus",F);continue}if(p&&p.value==="("||l.regex===!1){k({type:"plus",value:F,output:B});continue}if(p&&(p.type==="bracket"||p.type==="paren"||p.type==="brace")||h.parens>0){k({type:"plus",value:F});continue}k({type:"plus",value:B});continue}if(F==="@"){if(l.noextglob!==!0&&x()==="("&&x(2)!=="?"){k({type:"at",extglob:!0,value:F,output:""});continue}k({type:"text",value:F});continue}if(F!=="*"){(F==="$"||F==="^")&&(F=`\\${F}`);const C=r.exec(le());C&&(F+=C[0],h.index+=C[0].length),k({type:"text",value:F});continue}if(p&&(p.type==="globstar"||p.star===!0)){p.type="star",p.star=!0,p.value+=F,p.output=re,h.backtrack=!0,h.globstar=!0,pe(F);continue}let A=le();if(l.noextglob!==!0&&/^\([^?]/.test(A)){se("star",F);continue}if(p.type==="star"){if(l.noglobstar===!0){pe(F);continue}const C=p.prev,P=C.prev,K=C.type==="slash"||C.type==="bos",oe=P&&(P.type==="star"||P.type==="globstar");if(l.bash===!0&&(!K||A[0]&&A[0]!=="/")){k({type:"star",value:F,output:""});continue}const X=h.braces>0&&(C.type==="comma"||C.type==="brace"),it=z.length&&(C.type==="pipe"||C.type==="paren");if(!K&&C.type!=="paren"&&!X&&!it){k({type:"star",value:F,output:""});continue}for(;A.slice(0,3)==="/**";){const Ie=D[h.index+4];if(Ie&&Ie!=="/")break;A=A.slice(3),pe("/**",3)}if(C.type==="bos"&&ge()){p.type="globstar",p.value+=F,p.output=ee(l),h.output=p.output,h.globstar=!0,pe(F);continue}if(C.type==="slash"&&C.prev.type!=="bos"&&!oe&&ge()){h.output=h.output.slice(0,-(C.output+p.output).length),C.output=`(?:${C.output}`,p.type="globstar",p.output=ee(l)+(l.strictSlashes?")":"|$)"),p.value+=F,h.globstar=!0,h.output+=C.output+p.output,pe(F);continue}if(C.type==="slash"&&C.prev.type!=="bos"&&A[0]==="/"){const Ie=A[1]!==void 0?"|$":"";h.output=h.output.slice(0,-(C.output+p.output).length),C.output=`(?:${C.output}`,p.type="globstar",p.output=`${ee(l)}${R}|${R}${Ie})`,p.value+=F,h.output+=C.output+p.output,h.globstar=!0,pe(F+I()),k({type:"slash",value:"/",output:""});continue}if(C.type==="bos"&&A[0]==="/"){p.type="globstar",p.value+=F,p.output=`(?:^|${R}|${ee(l)}${R})`,h.output=p.output,h.globstar=!0,pe(F+I()),k({type:"slash",value:"/",output:""});continue}h.output=h.output.slice(0,-p.output.length),p.type="globstar",p.output=ee(l),p.value+=F,h.output+=p.output,h.globstar=!0,pe(F);continue}const M={type:"star",value:F,output:re};if(l.bash===!0){M.output=".*?",(p.type==="bos"||p.type==="slash")&&(M.output=L+M.output),k(M);continue}if(p&&(p.type==="bracket"||p.type==="paren")&&l.regex===!0){M.output=F,k(M);continue}(h.index===h.start||p.type==="slash"||p.type==="dot")&&(p.type==="dot"?(h.output+=De,p.output+=De):l.dot===!0?(h.output+=V,p.output+=V):(h.output+=L,p.output+=L),x()!=="*"&&(h.output+=v,p.output+=v)),k(M)}for(;h.brackets>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing","]"));h.output=t.escapeLast(h.output,"["),ie("brackets")}for(;h.parens>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing",")"));h.output=t.escapeLast(h.output,"("),ie("parens")}for(;h.braces>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing","}"));h.output=t.escapeLast(h.output,"{"),ie("braces")}if(l.strictSlashes!==!0&&(p.type==="star"||p.type==="bracket")&&k({type:"maybe_slash",value:"",output:`${R}?`}),h.backtrack===!0){h.output="";for(const A of h.tokens)h.output+=A.output!=null?A.output:A.value,A.suffix&&(h.output+=A.suffix)}return h},"parse");return f.fastpaths=(D,d)=>{const l={...d},m=typeof l.maxLength=="number"?Math.min(u,l.maxLength):u,E=D.length;if(E>m)throw new SyntaxError(`Input length: ${E}, exceeds maximum allowed length: ${m}`);D=o[D]||D;const{DOT_LITERAL:y,SLASH_LITERAL:$,ONE_CHAR:T,DOTS_SLASH:_,NO_DOT:g,NO_DOTS:S,NO_DOTS_SLASH:B,STAR:R,START_ANCHOR:v}=e.globChars(l.windows),Q=l.dot?S:g,q=l.dot?B:g,De=l.capture?"":"?:",V={negated:!1,prefix:""};let N=l.bash===!0?".*?":R;l.capture&&(N=`(${N})`);const W=c(L=>L.noglobstar===!0?N:`(${De}(?:(?!${v}${L.dot?_:y}).)*?)`,"globstar"),O=c(L=>{switch(L){case"*":return`${Q}${T}${N}`;case".*":return`${y}${T}${N}`;case"*.*":return`${Q}${N}${y}${T}${N}`;case"*/*":return`${Q}${N}${$}${T}${q}${N}`;case"**":return Q+W(l);case"**/*":return`(?:${Q}${W(l)}${$})?${q}${T}${N}`;case"**/*.*":return`(?:${Q}${W(l)}${$})?${q}${N}${y}${T}${N}`;case"**/.*":return`(?:${Q}${W(l)}${$})?${y}${T}${N}`;default:{const me=/^(.*?)\.(\w+)$/.exec(L);if(!me)return;const re=O(me[1]);return re?re+y+me[2]:void 0}}},"create"),H=t.removePrefix(D,V);let ee=O(H);return ee&&l.strictSlashes!==!0&&(ee+=`${$}?`),ee},Et=f,Et}c(ss,"requireParse");var Ct,Pn;function os(){if(Pn)return Ct;Pn=1;const e=rs(),t=ss(),u=ze(),n=Ve(),r=c(o=>o&&typeof o=="object"&&!Array.isArray(o),"isObject"),s=c((o,i,a=!1)=>{if(Array.isArray(o)){const $=o.map(_=>s(_,i,a));return c(_=>{for(const g of $){const S=g(_);if(S)return S}return!1},"arrayMatcher")}const f=r(o)&&o.tokens&&o.input;if(o===""||typeof o!="string"&&!f)throw new TypeError("Expected pattern to be a non-empty string");const D=i||{},d=D.windows,l=f?s.compileRe(o,i):s.makeRe(o,i,!1,!0),m=l.state;delete l.state;let E=c(()=>!1,"isIgnored");if(D.ignore){const $={...i,ignore:null,onMatch:null,onResult:null};E=s(D.ignore,$,a)}const y=c(($,T=!1)=>{const{isMatch:_,match:g,output:S}=s.test($,l,i,{glob:o,posix:d}),B={glob:o,state:m,regex:l,posix:d,input:$,output:S,match:g,isMatch:_};return typeof D.onResult=="function"&&D.onResult(B),_===!1?(B.isMatch=!1,T?B:!1):E($)?(typeof D.onIgnore=="function"&&D.onIgnore(B),B.isMatch=!1,T?B:!1):(typeof D.onMatch=="function"&&D.onMatch(B),T?B:!0)},"matcher");return a&&(y.state=m),y},"picomatch");return s.test=(o,i,a,{glob:f,posix:D}={})=>{if(typeof o!="string")throw new TypeError("Expected input to be a string");if(o==="")return{isMatch:!1,output:""};const d=a||{},l=d.format||(D?u.toPosixSlashes:null);let m=o===f,E=m&&l?l(o):o;return m===!1&&(E=l?l(o):o,m=E===f),(m===!1||d.capture===!0)&&(d.matchBase===!0||d.basename===!0?m=s.matchBase(o,i,a,D):m=i.exec(E)),{isMatch:!!m,match:m,output:E}},s.matchBase=(o,i,a)=>(i instanceof RegExp?i:s.makeRe(i,a)).test(u.basename(o)),s.isMatch=(o,i,a)=>s(i,a)(o),s.parse=(o,i)=>Array.isArray(o)?o.map(a=>s.parse(a,i)):t(o,{...i,fastpaths:!1}),s.scan=(o,i)=>e(o,i),s.compileRe=(o,i,a=!1,f=!1)=>{if(a===!0)return o.output;const D=i||{},d=D.contains?"":"^",l=D.contains?"":"$";let m=`${d}(?:${o.output})${l}`;o&&o.negated===!0&&(m=`^(?!${m}).*$`);const E=s.toRegex(m,i);return f===!0&&(E.state=o),E},s.makeRe=(o,i={},a=!1,f=!1)=>{if(!o||typeof o!="string")throw new TypeError("Expected a non-empty string");let D={negated:!1,fastpaths:!0};return i.fastpaths!==!1&&(o[0]==="."||o[0]==="*")&&(D.output=t.fastpaths(o,i)),D.output||(D=t(o,i)),s.compileRe(D,i,a,f)},s.toRegex=(o,i)=>{try{const a=i||{};return new RegExp(o,a.flags||(a.nocase?"i":""))}catch(a){if(i&&i.debug===!0)throw a;return/$^/}},s.constants=n,Ct=s,Ct}c(os,"requirePicomatch$1");var yt,Nn;function is(){if(Nn)return yt;Nn=1;const e=os(),t=ze();function u(n,r,s=!1){return r&&(r.windows===null||r.windows===void 0)&&(r={...r,windows:t.isWindows()}),e(n,r,s)}return c(u,"picomatch"),Object.assign(u,e),yt=u,yt}c(is,"requirePicomatch");var as=is(),cs=kn(as);const ls=c(e=>{const{publishConfig:t}=e;if(!t)return;const u=["bin","main","exports","types","module"];for(const n of u)t[n]&&(e[n]=t[n])},"applyPublishConfig"),Be=c(e=>{if(e.endsWith(".mjs"))return"module";if(e.endsWith(".cjs"))return"commonjs";if(e.endsWith(".d.ts")||e.endsWith(".d.cts")||e.endsWith(".d.mts"))return"types"},"getFileType"),Ds=c(e=>e[0]===".","isPath"),In=c(e=>e.slice(1).filter(t=>typeof t=="string"&&t[0]!=="."),"getConditions"),Xe=c((e,t,u,n=[u])=>{if(!e)return[];if(typeof e=="string")return[{source:{type:"package.json",path:[...n]},type:u,conditions:[],format:Be(e)||t,outputPath:Y(e)}];if(Array.isArray(e))return e.flatMap((s,o)=>{const i=[...n,o];return typeof s=="string"?Ds(s)?{source:{type:"package.json",path:[...i]},type:u,conditions:In(i),format:Be(s)||t,outputPath:Y(s)}:[]:Xe(s,t,u,i)});const r=u==="imports"&&n.length===1;return Object.entries(e).flatMap(([s,o])=>{if(r&&s[0]!=="#")return[];const i=[...n,s];if(typeof o=="string"){const a=In(i),f={type:u,source:{type:"package.json",path:i},outputPath:Y(o),conditions:a};return a.includes("types")?{...f,format:"types"}:{...f,format:Be(o)||t}}return Xe(o,t,u,i)})},"parsePackageMap"),fs=c((e,t)=>{const u=[],n=e.main;n&&u.push({source:{type:"package.json",path:["main"]},type:"legacy",format:Be(n)??t,outputPath:Y(n)});const r=e.module;r&&u.push({source:{type:"package.json",path:["module"]},type:"legacy",format:"module",outputPath:Y(r)});const s=e.types;s&&u.push({source:{type:"package.json",path:["types"]},type:"legacy",format:"types",outputPath:Y(s)});const{bin:o}=e;if(o)if(typeof o=="string")u.push({source:{type:"package.json",path:["bin"]},type:"binary",format:Be(o)??t,outputPath:Y(o)});else for(const[i,a]of Object.entries(o))u.push({source:{type:"package.json",path:["bin",i]},type:"binary",format:Be(a)??t,outputPath:Y(a)});if(e.exports){const i=Xe(e.exports,t,"exports");u.push(...i)}if(e.imports){const i=Xe(e.imports,t,"imports");u.push(...i)}return u},"getPkgEntryPoints"),ps=c(async(e,t)=>{for(const u of t){const n=e+u;if(await ye(n))return{srcExtension:u,sourcePath:n}}},"tryExtensions"),At={".d.ts":[".d.ts",".d.mts",".d.cts",".ts",".tsx",".mts",".cts"],".d.mts":[".d.mts",".d.ts",".d.cts",".ts",".tsx",".mts",".cts"],".d.cts":[".d.cts",".d.ts",".d.mts",".ts",".tsx",".mts",".cts"],".js":[".js",".ts",".tsx",".mts",".cts"],".mjs":[".mjs",".js",".cjs",".mts",".cts",".ts",".tsx"],".cjs":[".cjs",".js",".mjs",".mts",".cts",".ts",".tsx"]},Ln=Object.keys(At),ds=c(async(e,t)=>{const{outputPath:u}=e,n=Ln.find(o=>u.endsWith(o));if(!n)return{error:`Unsupported extension (must be ${Ln.join("|")})`,exportEntry:e};const r=u.slice(t.dist.length,-n.length),s=await ps(_e.join(t.srcResolved,r),At[n]);return s?{exportEntry:e,distExtension:n,srcdist:t,...s}:{error:`Source file not found: ${_e.join(t.src,r)}(${At[n].join("|")})`,exportEntry:e}},"getSourcePath"),Fs=c(async e=>{try{return await ue.readdir(e,{withFileTypes:!0})}catch(t){const{code:u}=t;if(u==="ENOENT")return[];throw t}},"safeReaddir"),Mn=c(async(e,t)=>{const u=await Fs(e);return(await Promise.all(u.map(async r=>{const s=_e.join(e,r.name);return r.isDirectory()?Mn(s,t):r.isFile()?_e.relative(t,s):[]}))).flat()},"getDirectoryFilesRecursive"),Hn=new Map,Wn=c(async e=>{let t=Hn.get(e);return t||(t=Mn(e,e),Hn.set(e,t)),t},"getDirectoryFiles"),Je=/\.[^./]+$/,Un=c((e,t)=>{const u=t.at(-1);if(!e.endsWith(u))return;if(t.some(r=>r.includes("/"))){const r=e.split("/").filter(Boolean);for(let s=1;s<=r.length;s+=1){const o=r.slice(0,s).join("/"),i=o+t.join(o);if(i===e)return i}}else for(let r=1;r<=e.length;r+=1){const s=e.slice(0,r),o=s+t.join(s);if(o===e)return o}},"extractWildcardMatch"),hs=c(async(e,t)=>{const u=Array.from(t).sort((r,s)=>s.dist.length-r.dist.length);return(await Promise.all(e.map(async r=>{if(typeof r.source=="string"||r.source.path[0]!=="exports"&&r.source.path[0]!=="imports"||!r.outputPath.includes("*"))return[r];const s=r.source.path[1];if(!s.includes("*"))return[r];const o=r.outputPath.match(/\.d\.[cm]?ts$/)||r.outputPath.match(Je);if(!o)return[{exportEntry:r,error:`Wildcard pattern must include a file extension (e.g., ".mjs", ".cjs"). Pattern: ${s}`}];const[i]=o,a=r.outputPath.slice(0,-i.length),[f,...D]=a.split("*"),d=f.lastIndexOf("/"),l=d===-1?f:f.slice(0,d+1),m=d>=0?f.slice(d+1):"",E=c(_=>{const g=_.replace(Je,""),S=g.split("/").at(-1)||"";if(m&&!S.startsWith(m))return!1;if(D.length===1){const R=D[0];return!(R&&!(R.includes("/")?g:S).endsWith(R))}const B=m?S.slice(m.length):g;return!!Un(B,D)},"matchesPattern");if(l==="./")return(await Promise.all(u.map(async g=>{const S=g.srcResolved;return(await Wn(S)).flatMap(R=>{if(!E(R))return[];const v=R.replace(Je,"");return[{...r,outputPath:g.dist+v+i}]})}))).flat();const y=u.find(({dist:_})=>l===_||l.startsWith(_));if(!y)return[];const $=b.posix.join(y.srcResolved,l.slice(y.dist.length));return(await Wn($)).flatMap(_=>{if(!E(_))return[];const g=_.replace(Je,"");if(D.length>1){const S=Un(g,D);return[{...r,outputPath:l+S+i}]}return[{...r,outputPath:l+g+i}]})}))).flat()},"expandBuildOutputWildcards"),ms=c(async(e,t,u,n)=>{ls(t);const r=t.type??"commonjs",s=n?.includes("false");let o=[];if(!s){o=await hs(fs(t,r),e);const a=n?.filter(f=>f!=="false");if(a&&a.length>0){const f=a.map(D=>cs(D,D.includes("/")?{}:{matchBase:!0}));o=o.filter(D=>{const l=("error"in D?D.exportEntry:D).outputPath.replace(/^\.\//,"");return f.some(m=>m(l))})}}u.length>0&&o.push(...u.map(a=>({...a,format:Be(a.outputPath)??r})));const i=new Map;return await Promise.all(o.map(async a=>{if("error"in a)return a;const f=e.find(({dist:d})=>a.outputPath.startsWith(d));if(!f)return{exportEntry:a,error:"Ignoring file outside of dist directories"};const D=i.get(a.outputPath);if(D){if(D.format!==a.format)throw new Error(`Conflicting export types "${D.format}" & "${a.format}" found for ${a.outputPath}`)}else i.set(a.outputPath,a);return await ds(a,f)}))},"getBuildEntryPoints"),je=Symbol("entry"),gs=c(e=>({name:"esbuild-transform",transform:{filter:{id:/\.([cm]?[jt]s|[jt]sx)$/},async handler(t,u){const n=await Ut(t,{...e,supported:{"import-meta":!0,"import-attributes":!0},loader:"default",sourcefile:u.replace(/\.[cm]ts/,".ts")});return{code:n.code,map:n.map||null}}}}),"esbuildTransform"),Es=c(e=>{if(e==="es")return"esm";if(e==="cjs"||e==="iife")return e},"getEsbuildFormat"),Cs=c(e=>({name:"esbuild-minify",renderChunk:c(async(t,u,n)=>{const r=await Ut(t,{...e,format:Es(n.format),minify:!0,keepNames:!0});return{code:r.code,map:r.map||null}},"renderChunk")}),"esbuildMinify"),bt=c((e,t)=>e[0]-t[0]||e[1]-t[1]||e[2]-t[2],"compareSemver"),Gn=c(({target:e})=>{const t=e.some(u=>{if(u=u.trim(),!u.startsWith("node"))return;const n=u.slice(4).split(".").map(Number),r=[n[0],n[1]??0,n[2]??0];return!(bt(r,[12,20,0])>=0&&bt(r,[13,0,0])<0||bt(r,[14,13,1])>=0)});return{name:"node-builtins",resolveId:c(u=>{const n=u.startsWith("node:");if(t&&n&&(u=u.slice(5)),zu.includes(u)||n)return{id:u,external:!0}},"resolveId")}},"nodeBuiltins"),ys=c(e=>{const t=e.filter(n=>n.exportEntry.type==="binary");if(t.length===0)return{name:"patch-binary"};let u;return{name:"patch-binary",options:c(()=>{u=new Set(t.flatMap(n=>n.inputNames))},"options"),renderChunk:c((n,r,s)=>{if(!r.isEntry||!r.facadeModuleId||!u.has(r.name))return;const o=new Le(n);return o.prepend(`#!/usr/bin/env node
23
+ `),{code:o.toString(),map:s.sourcemap?o.generateMap({hires:!0}):void 0}},"renderChunk"),writeBundle:c(async(n,r)=>{const s=new Set(Object.keys(r).map(o=>Y(_e.join(n.dir,o))));await Promise.all(t.map(async({exportEntry:o})=>{const{outputPath:i}=o;s.has(i)&&await Fe.promises.chmod(i,493)}))},"writeBundle")}},"patchBinary"),qn=c(e=>{const t=e.indexOf("/");if(t===-1)return[e,void 0];if(e[0]==="@"){const u=e.indexOf("/",t+1);return u===-1?[e,void 0]:[e.slice(0,u),e.slice(u+1)]}return[e.slice(0,t),e.slice(t+1)]},"parseSpecifier"),wt=c(e=>{const t=e[0];return!(t==="."||t==="/"||t==="#"||b.isAbsolute(e))},"isBareSpecifier"),Bt=c((e,t=process.cwd())=>qe(b.relative(t,e)).split("/").includes("node_modules"),"isFromNodeModules"),Kn=c(()=>{const e=/\.(?:[mc]?js|jsx)$/;return{name:"resolve-js-to-ts",async resolveId(t,u,n){if(u&&e.test(t)){if(!wt(t)&&!Bt(u)){const i=t.replace(/js(x?)$/,"ts$1");return this.resolve(i,u,{...n,skipSelf:!0})}const r=await this.resolve(t,u,{...n,skipSelf:!0});if(r)return r;const s=t.replace(/js(x?)$/,"ts$1"),o=await this.resolve(s,u,{...n,skipSelf:!0});if(o)return o}return null}}},"resolveJsToTs"),Vn=c(e=>e!==null&&typeof e=="object","A"),Re=c((e,t)=>Object.assign(new Error(`[${e}]: ${t}`),{code:e}),"a"),zn="ERR_INVALID_PACKAGE_CONFIG",vt="ERR_INVALID_PACKAGE_TARGET",As="ERR_PACKAGE_PATH_NOT_EXPORTED",bs=/^\d+$/,ws=/^(\.{1,2}|node_modules)$/i,Bs=/\/|\\/;var Xn=(e=>(e.Export="exports",e.Import="imports",e))(Xn||{});const $t=c((e,t,u,n,r)=>{if(t==null)return[];if(typeof t=="string"){const[s,...o]=t.split(Bs);if(s===".."||o.some(i=>ws.test(i)))throw Re(vt,`Invalid "${e}" target "${t}" defined in the package config`);return[r?t.replace(/\*/g,r):t]}if(Array.isArray(t))return t.flatMap(s=>$t(e,s,u,n,r));if(Vn(t)){for(const s of Object.keys(t)){if(bs.test(s))throw Re(zn,"Cannot contain numeric property keys");if(s==="default"||n.includes(s))return $t(e,t[s],u,n,r)}return[]}throw Re(vt,`Invalid "${e}" target "${t}"`)},"f"),Pe="*",vs=c((e,t)=>{const u=e.indexOf(Pe),n=t.indexOf(Pe);return u===n?t.length>e.length:n>u},"m");function $s(e,t){if(!t.includes(Pe)&&e.hasOwnProperty(t))return[t];let u,n;for(const r of Object.keys(e))if(r.includes(Pe)){const[s,o,i]=r.split(Pe);if(i===void 0&&t.startsWith(s)&&t.endsWith(o)){const a=t.slice(s.length,-o.length||void 0);a&&(!u||vs(u,r))&&(u=r,n=a)}}return[u,n]}c($s,"d");const xs=c(e=>Object.keys(e).reduce((t,u)=>{const n=u===""||u[0]!==".";if(t===void 0||t===n)return n;throw Re(zn,'"exports" cannot contain some keys starting with "." and some not')},void 0),"p"),Rs=/^\w+:/,Ss=c((e,t,u)=>{if(!e)throw new Error('"exports" is required');t=t===""?".":`./${t}`,(typeof e=="string"||Array.isArray(e)||Vn(e)&&xs(e))&&(e={".":e});const[n,r]=$s(e,t),s=$t(Xn.Export,e[n],t,u,r);if(s.length===0)throw Re(As,t==="."?'No "exports" main defined':`Package subpath '${t}' is not defined by "exports"`);for(const o of s)if(!o.startsWith("./")&&!Rs.test(o))throw Re(vt,`Invalid "exports" target "${o}" defined in the package config`);return s},"v");var ks=Object.defineProperty,w=c((e,t)=>ks(e,"name",{value:t,configurable:!0}),"o");function ae(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}c(ae,"h"),w(ae,"slash");const xt=w(e=>{const t=Fe[e];return(u,...n)=>{const r=`${e}:${n.join(":")}`;let s=u?.get(r);return s===void 0&&(s=Reflect.apply(t,Fe,n),u?.set(r,s)),s}},"cacheFs"),de=xt("existsSync"),_s=xt("readFileSync"),Qe=xt("statSync"),Jn=w((e,t,u)=>{for(;;){const n=b.posix.join(e,t);if(de(u,n))return n;const r=b.dirname(e);if(r===e)return;e=r}},"findUp"),Rt=/^\.{1,2}(\/.*)?$/,St=w(e=>{const t=ae(e);return Rt.test(t)?t:`./${t}`},"normalizeRelativePath");function Qn(e,t=!1){const u=e.length;let n=0,r="",s=0,o=16,i=0,a=0,f=0,D=0,d=0;function l(g,S){let B=0,R=0;for(;B<g;){let v=e.charCodeAt(n);if(v>=48&&v<=57)R=R*16+v-48;else if(v>=65&&v<=70)R=R*16+v-65+10;else if(v>=97&&v<=102)R=R*16+v-97+10;else break;n++,B++}return B<g&&(R=-1),R}c(l,"y"),w(l,"scanHexDigits");function m(g){n=g,r="",s=0,o=16,d=0}c(m,"v"),w(m,"setPosition");function E(){let g=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&ve(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&ve(e.charCodeAt(n)))for(n++;n<e.length&&ve(e.charCodeAt(n));)n++;else return d=3,e.substring(g,n);let S=n;if(n<e.length&&(e.charCodeAt(n)===69||e.charCodeAt(n)===101))if(n++,(n<e.length&&e.charCodeAt(n)===43||e.charCodeAt(n)===45)&&n++,n<e.length&&ve(e.charCodeAt(n))){for(n++;n<e.length&&ve(e.charCodeAt(n));)n++;S=n}else d=3;return e.substring(g,S)}c(E,"j"),w(E,"scanNumber");function y(){let g="",S=n;for(;;){if(n>=u){g+=e.substring(S,n),d=2;break}const B=e.charCodeAt(n);if(B===34){g+=e.substring(S,n),n++;break}if(B===92){if(g+=e.substring(S,n),n++,n>=u){d=2;break}switch(e.charCodeAt(n++)){case 34:g+='"';break;case 92:g+="\\";break;case 47:g+="/";break;case 98:g+="\b";break;case 102:g+="\f";break;case 110:g+=`
24
24
  `;break;case 114:g+="\r";break;case 116:g+=" ";break;case 117:const R=l(4);R>=0?g+=String.fromCharCode(R):d=4;break;default:d=5}S=n;continue}if(B>=0&&B<=31)if(Se(B)){g+=e.substring(S,n),d=2;break}else d=6;n++}return g}c(y,"d"),w(y,"scanString");function $(){if(r="",d=0,s=n,a=i,D=f,n>=u)return s=u,o=17;let g=e.charCodeAt(n);if(Ze(g)){do n++,r+=String.fromCharCode(g),g=e.charCodeAt(n);while(Ze(g));return o=15}if(Se(g))return n++,r+=String.fromCharCode(g),g===13&&e.charCodeAt(n)===10&&(n++,r+=`
25
25
  `),i++,f=n,o=14;switch(g){case 123:return n++,o=1;case 125:return n++,o=2;case 91:return n++,o=3;case 93:return n++,o=4;case 58:return n++,o=6;case 44:return n++,o=5;case 34:return n++,r=y(),o=10;case 47:const S=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n<u&&!Se(e.charCodeAt(n));)n++;return r=e.substring(S,n),o=12}if(e.charCodeAt(n+1)===42){n+=2;const B=u-1;let R=!1;for(;n<B;){const v=e.charCodeAt(n);if(v===42&&e.charCodeAt(n+1)===47){n+=2,R=!0;break}n++,Se(v)&&(v===13&&e.charCodeAt(n)===10&&n++,i++,f=n)}return R||(n++,d=1),r=e.substring(S,n),o=13}return r+=String.fromCharCode(g),n++,o=16;case 45:if(r+=String.fromCharCode(g),n++,n===u||!ve(e.charCodeAt(n)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return r+=E(),o=11;default:for(;n<u&&T(g);)n++,g=e.charCodeAt(n);if(s!==n){switch(r=e.substring(s,n),r){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return r+=String.fromCharCode(g),n++,o=16}}c($,"A"),w($,"scanNext");function T(g){if(Ze(g)||Se(g))return!1;switch(g){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}c(T,"E"),w(T,"isUnknownContentCharacter");function _(){let g;do g=$();while(g>=12&&g<=15);return g}return c(_,"B"),w(_,"scanNextNonTrivia"),{setPosition:m,getPosition:w(()=>n,"getPosition"),scan:t?_:$,getToken:w(()=>o,"getToken"),getTokenValue:w(()=>r,"getTokenValue"),getTokenOffset:w(()=>s,"getTokenOffset"),getTokenLength:w(()=>n-s,"getTokenLength"),getTokenStartLine:w(()=>a,"getTokenStartLine"),getTokenStartCharacter:w(()=>s-D,"getTokenStartCharacter"),getTokenError:w(()=>d,"getTokenError")}}c(Qn,"Le"),w(Qn,"createScanner");function Ze(e){return e===32||e===9}c(Ze,"X"),w(Ze,"isWhiteSpace");function Se(e){return e===10||e===13}c(Se,"S"),w(Se,"isLineBreak");function ve(e){return e>=48&&e<=57}c(ve,"$"),w(ve,"isDigit");var Zn;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(Zn||(Zn={})),new Array(20).fill(0).map((e,t)=>" ".repeat(t));const ke=200;new Array(ke).fill(0).map((e,t)=>`
26
26
  `+" ".repeat(t)),new Array(ke).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(ke).fill(0).map((e,t)=>`\r
27
27
  `+" ".repeat(t)),new Array(ke).fill(0).map((e,t)=>`
28
28
  `+" ".repeat(t)),new Array(ke).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(ke).fill(0).map((e,t)=>`\r
29
- `+" ".repeat(t));var Ye;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Ye||(Ye={}));function Yn(e,t=[],u=Ye.DEFAULT){let n=null,r=[];const s=[];function o(i){Array.isArray(r)?r.push(i):n!==null&&(r[n]=i)}return c(o,"r"),w(o,"onValue"),eu(e,{onObjectBegin:w(()=>{const i={};o(i),s.push(r),r=i,n=null},"onObjectBegin"),onObjectProperty:w(i=>{n=i},"onObjectProperty"),onObjectEnd:w(()=>{r=s.pop()},"onObjectEnd"),onArrayBegin:w(()=>{const i=[];o(i),s.push(r),r=i,n=null},"onArrayBegin"),onArrayEnd:w(()=>{r=s.pop()},"onArrayEnd"),onLiteralValue:o,onError:w((i,a,f)=>{t.push({error:i,offset:a,length:f})},"onError")},u),r[0]}c(Yn,"$e"),w(Yn,"parse$1");function eu(e,t,u=Ye.DEFAULT){const n=Qn(e,!1),r=[];let s=0;function o(O){return O?()=>s===0&&O(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}c(o,"r"),w(o,"toNoArgVisit");function i(O){return O?H=>s===0&&O(H,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}c(i,"f"),w(i,"toOneArgVisit");function a(O){return O?H=>s===0&&O(H,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>r.slice()):()=>!0}c(a,"u"),w(a,"toOneArgVisitWithPath");function f(O){return O?()=>{s>0?s++:O(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>r.slice())===!1&&(s=1)}:()=>!0}c(f,"g"),w(f,"toBeginVisit");function D(O){return O?()=>{s>0&&s--,s===0&&O(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:()=>!0}c(D,"w"),w(D,"toEndVisit");const d=f(t.onObjectBegin),l=a(t.onObjectProperty),m=D(t.onObjectEnd),E=f(t.onArrayBegin),y=D(t.onArrayEnd),$=a(t.onLiteralValue),T=i(t.onSeparator),_=o(t.onComment),g=i(t.onError),S=u&&u.disallowComments,B=u&&u.allowTrailingComma;function R(){for(;;){const O=n.scan();switch(n.getTokenError()){case 4:v(14);break;case 5:v(15);break;case 3:v(13);break;case 1:S||v(11);break;case 2:v(12);break;case 6:v(16);break}switch(O){case 12:case 13:S?v(10):_();break;case 16:v(1);break;case 15:case 14:break;default:return O}}}c(R,"T"),w(R,"scanNext");function v(O,H=[],ee=[]){if(g(O),H.length+ee.length>0){let L=n.getToken();for(;L!==17;){if(H.indexOf(L)!==-1){R();break}else if(ee.indexOf(L)!==-1)break;L=R()}}}c(v,"p"),w(v,"handleError");function Q(O){const H=n.getTokenValue();return O?$(H):(l(H),r.push(H)),R(),!0}c(Q,"U"),w(Q,"parseString");function q(){switch(n.getToken()){case 11:const O=n.getTokenValue();let H=Number(O);isNaN(H)&&(v(2),H=0),$(H);break;case 7:$(null);break;case 8:$(!0);break;case 9:$(!1);break;default:return!1}return R(),!0}c(q,"a"),w(q,"parseLiteral");function De(){return n.getToken()!==10?(v(3,[],[2,5]),!1):(Q(!1),n.getToken()===6?(T(":"),R(),W()||v(4,[],[2,5])):v(5,[],[2,5]),r.pop(),!0)}c(De,"N"),w(De,"parseProperty");function V(){d(),R();let O=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(O||v(4,[],[]),T(","),R(),n.getToken()===2&&B)break}else O&&v(6,[],[]);De()||v(4,[],[2,5]),O=!0}return m(),n.getToken()!==2?v(7,[2],[]):R(),!0}c(V,"_e"),w(V,"parseObject");function N(){E(),R();let O=!0,H=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(H||v(4,[],[]),T(","),R(),n.getToken()===4&&B)break}else H&&v(6,[],[]);O?(r.push(0),O=!1):r[r.length-1]++,W()||v(4,[],[4,5]),H=!0}return y(),O||r.pop(),n.getToken()!==4?v(8,[4],[]):R(),!0}c(N,"ye"),w(N,"parseArray");function W(){switch(n.getToken()){case 3:return N();case 1:return V();case 10:return Q(!0);default:return q()}}return c(W,"z"),w(W,"parseValue"),R(),n.getToken()===17?u.allowEmptyContent?!0:(v(4,[],[]),!1):W()?(n.getToken()!==17&&v(9,[],[]),!0):(v(4,[],[]),!1)}c(eu,"xe"),w(eu,"visit");var tu;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(tu||(tu={}));var nu;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(nu||(nu={}));const _s=Yn;var uu;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(uu||(uu={}));const ru=w((e,t)=>_s(ks(t,e,"utf8")),"readJsonc"),St=Symbol("implicitBaseUrl"),Ae="${configDir}",Os=w(()=>{const{findPnpApi:e}=Vu;return e&&e(process.cwd())},"getPnpApi"),kt=w((e,t,u,n)=>{const r=`resolveFromPackageJsonPath:${e}:${t}:${u}`;if(n!=null&&n.has(r))return n.get(r);const s=ru(e,n);if(!s)return;let o=t||"tsconfig.json";if(!u&&s.exports)try{const[i]=Rs(s.exports,t,["require","types"]);o=i}catch{return!1}else!t&&s.tsconfig&&(o=s.tsconfig);return o=b.join(e,"..",o),n?.set(r,o),o},"resolveFromPackageJsonPath"),_t="package.json",Ot="tsconfig.json",Ts=w((e,t,u)=>{let n=e;if(e===".."&&(n=b.join(n,Ot)),e[0]==="."&&(n=b.resolve(t,n)),b.isAbsolute(n)){if(de(u,n)){if(Qe(u,n).isFile())return n}else if(!n.endsWith(".json")){const m=`${n}.json`;if(de(u,m))return m}return}const[r,...s]=e.split("/"),o=r[0]==="@"?`${r}/${s.shift()}`:r,i=s.join("/"),a=Os();if(a){const{resolveRequest:m}=a;try{if(o===e){const E=m(b.join(o,_t),t);if(E){const y=kt(E,i,!1,u);if(y&&de(u,y))return y}}else{let E;try{E=m(e,t,{extensions:[".json"]})}catch{E=m(b.join(e,Ot),t)}if(E)return E}}catch{}}const f=Jn(b.resolve(t),b.join("node_modules",o),u);if(!f||!Qe(u,f).isDirectory())return;const D=b.join(f,_t);if(de(u,D)){const m=kt(D,i,!1,u);if(m===!1)return;if(m&&de(u,m)&&Qe(u,m).isFile())return m}const d=b.join(f,i),l=d.endsWith(".json");if(!l){const m=`${d}.json`;if(de(u,m))return m}if(de(u,d)){if(Qe(u,d).isDirectory()){const m=b.join(d,_t);if(de(u,m)){const y=kt(m,"",!0,u);if(y&&de(u,y))return y}const E=b.join(d,Ot);if(de(u,E))return E}else if(l)return d}},"resolveExtendsPath"),Tt=w((e,t)=>Rt(b.relative(e,t)),"pathRelative"),su=["files","include","exclude"],ou=w((e,t,u)=>{const n=b.join(t,u),r=b.relative(e,n);return ae(r)||"./"},"resolveAndRelativize"),js=w((e,t,u)=>{const n=b.relative(e,t);if(!n)return u;const r=u.startsWith("./")?u.slice(2):u;return ae(`${n}/${r}`)},"prefixPattern"),Ps=w((e,t,u,n)=>{const r=Ts(e,t,n);if(!r)throw new Error(`File '${e}' not found.`);if(u.has(r))throw new Error(`Circularity detected while resolving configuration: ${r}`);u.add(r);const s=b.dirname(r),o=iu(r,n,u);delete o.references;const{compilerOptions:i}=o;if(i){const{baseUrl:a}=i;a&&!a.startsWith(Ae)&&(i.baseUrl=ou(t,s,a));const{outDir:f}=i;f&&!f.startsWith(Ae)&&(i.outDir=ou(t,s,f))}for(const a of su){const f=o[a];f&&(o[a]=f.map(D=>D.startsWith(Ae)?D:js(t,s,D)))}return o},"resolveExtends"),Ns=["outDir","declarationDir"],iu=w((e,t,u=new Set)=>{let n;try{n=ru(e,t)||{}}catch{throw new Error(`Cannot resolve tsconfig at path: ${e}`)}if(typeof n!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${e}`);const r=b.dirname(e);if(n.compilerOptions){const{compilerOptions:s}=n;s.paths&&!s.baseUrl&&(s[St]=r)}if(n.extends){const s=Array.isArray(n.extends)?n.extends:[n.extends];delete n.extends;for(const o of s.reverse()){const i=Ps(o,r,new Set(u),t),a={...i,...n,compilerOptions:{...i.compilerOptions,...n.compilerOptions}};i.watchOptions&&(a.watchOptions={...i.watchOptions,...n.watchOptions}),n=a}}if(n.compilerOptions){const{compilerOptions:s}=n,o=["baseUrl","rootDir"];for(const i of o){const a=s[i];if(a&&!a.startsWith(Ae)){const f=b.resolve(r,a),D=Tt(r,f);s[i]=D}}for(const i of Ns){let a=s[i];a&&(Array.isArray(n.exclude)||(n.exclude=[]),n.exclude.includes(a)||n.exclude.push(a),a.startsWith(Ae)||(a=Rt(a)),s[i]=a)}}else n.compilerOptions={};if(n.include?(n.include=n.include.map(ae),n.files&&delete n.files):n.files&&(n.files=n.files.map(s=>s.startsWith(Ae)?s:Rt(s))),n.watchOptions){const{watchOptions:s}=n;s.excludeDirectories&&(s.excludeDirectories=s.excludeDirectories.map(o=>ae(b.resolve(r,o))))}return n},"_parseTsconfig"),et=w((e,t)=>{if(e.startsWith(Ae))return ae(b.join(t,e.slice(Ae.length)))},"interpolateConfigDir"),Is=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],Ls=w(e=>{if(e.strict){const t=["noImplicitAny","noImplicitThis","strictNullChecks","strictFunctionTypes","strictBindCallApply","strictPropertyInitialization","strictBuiltinIteratorReturn","alwaysStrict","useUnknownInCatchVariables"];for(const u of t)e[u]===void 0&&(e[u]=!0)}if(e.target){let t=e.target.toLowerCase();t==="es2015"&&(t="es6"),e.target=t,t==="esnext"&&(e.module!=null||(e.module="es6"),e.useDefineForClassFields!=null||(e.useDefineForClassFields=!0)),(t==="es6"||t==="es2016"||t==="es2017"||t==="es2018"||t==="es2019"||t==="es2020"||t==="es2021"||t==="es2022"||t==="es2023"||t==="es2024")&&(e.module!=null||(e.module="es6")),(t==="es2022"||t==="es2023"||t==="es2024")&&(e.useDefineForClassFields!=null||(e.useDefineForClassFields=!0))}if(e.module){let t=e.module.toLowerCase();t==="es2015"&&(t="es6"),e.module=t,(t==="es6"||t==="es2020"||t==="es2022"||t==="esnext"||t==="none"||t==="system"||t==="umd"||t==="amd")&&(e.moduleResolution!=null||(e.moduleResolution="classic")),t==="system"&&(e.allowSyntheticDefaultImports!=null||(e.allowSyntheticDefaultImports=!0)),(t==="node16"||t==="nodenext"||t==="preserve")&&(e.esModuleInterop!=null||(e.esModuleInterop=!0),e.allowSyntheticDefaultImports!=null||(e.allowSyntheticDefaultImports=!0)),(t==="node16"||t==="nodenext")&&(e.moduleDetection!=null||(e.moduleDetection="force"),e.useDefineForClassFields!=null||(e.useDefineForClassFields=!0)),t==="node16"&&(e.target!=null||(e.target="es2022"),e.moduleResolution!=null||(e.moduleResolution="node16")),t==="nodenext"&&(e.target!=null||(e.target="esnext"),e.moduleResolution!=null||(e.moduleResolution="nodenext")),t==="preserve"&&(e.moduleResolution!=null||(e.moduleResolution="bundler"))}if(e.moduleResolution){let t=e.moduleResolution.toLowerCase();t==="node"&&(t="node10"),e.moduleResolution=t,(t==="node16"||t==="nodenext"||t==="bundler")&&(e.resolvePackageJsonExports!=null||(e.resolvePackageJsonExports=!0),e.resolvePackageJsonImports!=null||(e.resolvePackageJsonImports=!0)),t==="bundler"&&(e.allowSyntheticDefaultImports!=null||(e.allowSyntheticDefaultImports=!0),e.resolveJsonModule!=null||(e.resolveJsonModule=!0))}e.esModuleInterop&&(e.allowSyntheticDefaultImports!=null||(e.allowSyntheticDefaultImports=!0)),e.verbatimModuleSyntax&&(e.isolatedModules!=null||(e.isolatedModules=!0),e.preserveConstEnums!=null||(e.preserveConstEnums=!0)),e.isolatedModules&&(e.preserveConstEnums!=null||(e.preserveConstEnums=!0)),e.rewriteRelativeImportExtensions&&(e.allowImportingTsExtensions!=null||(e.allowImportingTsExtensions=!0))},"normalizeCompilerOptions"),au=w((e,t=new Map)=>{const u=b.resolve(e),n=iu(u,t),r=b.dirname(u),{compilerOptions:s}=n;if(s){for(const i of Is){const a=s[i];if(a){const f=et(a,r);s[i]=f?Tt(r,f):a}}for(const i of["rootDirs","typeRoots"]){const a=s[i];a&&(s[i]=a.map(f=>{const D=et(f,r);return D?Tt(r,D):f}))}const{paths:o}=s;if(o)for(const i of Object.keys(o))o[i]=o[i].map(a=>{var f;return(f=et(a,r))!=null?f:a});Ls(s)}for(const o of su){const i=n[o];i&&(n[o]=i.map(a=>{var f;return(f=et(a,r))!=null?f:a}))}return n},"parseTsconfig"),Ms=w((e=process.cwd(),t="tsconfig.json",u=new Map)=>{const n=Jn(ae(e),t,u);if(!n)return null;const r=au(n,u);return{path:n,config:r}},"getTsconfig"),Hs=/\*/g,cu=w((e,t)=>{const u=e.match(Hs);if(u&&u.length>1)throw new Error(t)},"assertStarCount"),Ws=w(e=>{if(e.includes("*")){const[t,u]=e.split("*");return{prefix:t,suffix:u}}return e},"parsePattern"),Us=w(({prefix:e,suffix:t},u)=>u.startsWith(e)&&u.endsWith(t),"isPatternMatch"),Gs=w((e,t,u)=>Object.entries(e).map(([n,r])=>(cu(n,`Pattern '${n}' can have at most one '*' character.`),{pattern:Ws(n),substitutions:r.map(s=>{if(cu(s,`Substitution '${s}' in pattern '${n}' can have at most one '*' character.`),!t&&!xt.test(s))throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return b.resolve(u,s)})})),"parsePaths"),qs=w(e=>{const{compilerOptions:t}=e.config;if(!t)return null;const{baseUrl:u,paths:n}=t;if(!u&&!n)return null;const r=St in t&&t[St],s=b.resolve(b.dirname(e.path),u||r||"."),o=n?Gs(n,u,s):[];return i=>{if(xt.test(i))return[];const a=[];for(const l of o){if(l.pattern===i)return l.substitutions.map(ae);typeof l.pattern!="string"&&a.push(l)}let f,D=-1;for(const l of a)Us(l.pattern,i)&&l.pattern.prefix.length>D&&(D=l.pattern.prefix.length,f=l);if(!f)return u?[ae(b.join(s,i))]:[];const d=i.slice(f.pattern.prefix.length,i.length-f.pattern.suffix.length);return f.substitutions.map(l=>ae(l.replace("*",d)))}},"createPathsMatcher");var Ks=Object.defineProperty,tt=w((e,t)=>Ks(e,"name",{value:t,configurable:!0}),"s");const lu=tt(e=>{let t="";for(let u=0;u<e.length;u+=1){const n=e[u],r=n.toUpperCase();t+=n===r?n.toLowerCase():r}return t},"invertCase"),jt=new Map,Du=tt((e,t)=>{const u=Qu.join(e,`.is-fs-case-sensitive-test-${process.pid}`);try{return t.writeFileSync(u,""),!t.existsSync(lu(u))}finally{try{t.unlinkSync(u)}catch{}}},"checkDirectoryCaseWithWrite"),Vs=tt((e,t,u)=>{try{return Du(e,u)}catch(n){if(t===void 0)return Du(Ju.tmpdir(),u);throw n}},"checkDirectoryCaseWithFallback"),zs=tt((e,t=Xu,u=!0)=>{const n=e??process.cwd();if(u&&jt.has(n))return jt.get(n);let r;const s=lu(n);return s!==n&&t.existsSync(n)?r=!t.existsSync(s):r=Vs(n,e,t),u&&jt.set(n,r),r},"isFsCaseSensitive"),{join:nt}=b.posix,Pt={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},Xs=w(e=>{const t=[...Pt.ts],u=[...Pt.cts],n=[...Pt.mts];return e!=null&&e.allowJs&&(t.push(".js",".jsx"),u.push(".cjs"),n.push(".mjs")),[...t,...u,...n]},"getSupportedExtensions"),Js=w(e=>{const t=[];if(!e)return t;const{outDir:u,declarationDir:n}=e;return u&&t.push(u),n&&t.push(n),t},"getDefaultExcludeSpec"),fu=w(e=>e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),Qs=["node_modules","bower_components","jspm_packages"],Nt=`(?!(${Qs.join("|")})(/|$))`,Zs=/(?:^|\/)[^.*?]+$/,pu="**/*",ut="[^/]",It="[^./]",du=process.platform==="win32";w(({config:e,path:t},u=zs())=>{if("extends"in e)throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");if(!b.isAbsolute(t))throw new Error("The tsconfig path must be absolute");du&&(t=ae(t));const n=b.dirname(t),{files:r,include:s,exclude:o,compilerOptions:i}=e,a=r?.map(E=>nt(n,E)),f=Xs(i),D=u?"":"i",d=(o||Js(i)).map(E=>{const y=nt(n,E),$=fu(y).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${ut}*`).replaceAll(String.raw`\?`,ut);return new RegExp(`^${$}($|/)`,D)}),l=r||s?s:[pu],m=l?l.map(E=>{let y=nt(n,E);Zs.test(y)&&(y=nt(y,pu));const $=fu(y).replaceAll(String.raw`/\*\*`,`(/${Nt}${It}${ut}*)*?`).replaceAll(/(\/)?\\\*/g,(T,_)=>{const g=`(${It}|(\\.(?!min\\.js$))?)*`;return _?`/${Nt}${It}${g}`:g}).replaceAll(/(\/)?\\\?/g,(T,_)=>{const g=ut;return _?`/${Nt}${g}`:g});return new RegExp(`^${$}$`,D)}):void 0;return E=>{if(!b.isAbsolute(E))throw new Error("filePath must be absolute");if(du&&(E=ae(E)),a!=null&&a.includes(E)||!(!f.some(y=>E.endsWith(y))||d.some(y=>y.test(E)))&&m&&m.some(y=>y.test(E)))return e}},"createFilesMatcher");const Fu="resolve-tsconfig-paths",Ys=c(e=>e[0]===".","isRelative"),eo=c(e=>e[0]==="/"||/^[\s\S]:/.test(e),"isAbsolute"),hu=c(e=>{const t=qs(e);return t?{name:Fu,async resolveId(u,n,r){if(!n||Ys(u)||eo(u)||u.startsWith("\0"))return null;const s=t(u);for(const o of s){const i=await this.resolve(o,n,{skipSelf:!0,...r});if(i)return i}return null}}:{name:Fu}},"resolveTsconfigPaths"),mu=/^#!.*/,to=c(()=>({name:"strip-hashbang",transform:c(e=>{if(!mu.test(e))return null;const t=new Le(e);return t.replace(mu,""),{code:t.toString(),map:t.generateMap({hires:!0})}},"transform")}),"stripHashbang");class no{static{c(this,"WalkerBase")}constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:c(()=>this.should_skip=!0,"skip"),remove:c(()=>this.should_remove=!0,"remove"),replace:c(t=>this.replacement=t,"replace")}}replace(t,u,n,r){t&&u&&(n!=null?t[u][n]=r:t[u]=r)}remove(t,u,n){t&&u&&(n!=null?t[u].splice(n,1):delete t[u])}}class uo extends no{static{c(this,"SyncWalker")}constructor(t,u){super(),this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:c(()=>this.should_skip=!0,"skip"),remove:c(()=>this.should_remove=!0,"remove"),replace:c(n=>this.replacement=n,"replace")},this.enter=t,this.leave=u}visit(t,u,n,r){if(t){if(this.enter){const o=this.should_skip,i=this.should_remove,a=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,t,u,n,r),this.replacement&&(t=this.replacement,this.replace(u,n,r,t)),this.should_remove&&this.remove(u,n,r);const f=this.should_skip,D=this.should_remove;if(this.should_skip=o,this.should_remove=i,this.replacement=a,f)return t;if(D)return null}let s;for(s in t){const o=t[s];if(o&&typeof o=="object")if(Array.isArray(o)){const i=o;for(let a=0;a<i.length;a+=1){const f=i[a];gu(f)&&(this.visit(f,t,s,a)||a--)}}else gu(o)&&this.visit(o,t,s,null)}if(this.leave){const o=this.replacement,i=this.should_remove;this.replacement=null,this.should_remove=!1,this.leave.call(this.context,t,u,n,r),this.replacement&&(t=this.replacement,this.replace(u,n,r,t)),this.should_remove&&this.remove(u,n,r);const a=this.should_remove;if(this.replacement=o,this.should_remove=i,a)return null}}return t}}function gu(e){return e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"}c(gu,"isNode");function ro(e,{enter:t,leave:u}){return new uo(t,u).visit(e,null)}c(ro,"walk");const so=c(()=>{const e='import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);';return{name:"esmInjectCreateRequire",renderChunk(t,u,n){if(n.format!=="es"||!/\brequire\b/.test(t))return null;const r=this.parse(t);let s=Zu(r,"scope"),o=!1;if(ro(r,{enter(a,f){a.scope&&(s=a.scope),!(a.type!=="Identifier"||a.name!=="require")&&(f?.type==="Property"&&f.key===a&&!f.compute||f?.type!=="MemberExpression"&&(s.contains("require")||(o=!0,this.skip())))},leave:c(a=>{a.scope&&(s=s.parent)},"leave")}),!o)return null;const i=new Le(t);return i.prepend(e),{code:i.toString(),map:i.generateMap({hires:!0})}}}},"esmInjectCreateRequire"),rt="\0natives:",oo=c(e=>{const t=`${e}/natives`,u=new Map;return{name:"native-modules",buildStart:c(()=>{u.clear()},"buildStart"),async resolveId(n,r){if(n.startsWith(rt)||!n.endsWith(".node"))return null;const s=r?b.resolve(b.dirname(r),n):b.resolve(n);try{await ue.access(s)}catch{return this.warn(`Native module not found: ${s}`),null}const o=b.basename(s);let i=o,a=1;const f=new Set(Array.from(u.values()).map(d=>b.basename(d)));for(;f.has(i);){const d=b.extname(o);i=`${b.basename(o,d)}_${a}${d}`,a+=1}const D=b.join(t,i);return u.set(s,D),rt+s},load(n){if(!n.startsWith(rt))return null;const r=n.slice(rt.length),s=u.get(r);return s?`export default require("${`./${qe(b.relative(e,s))}`}");`:this.error(`Could not find staged native module for: ${r}`)},generateBundle:c(async()=>{u.size!==0&&(await ue.mkdir(t,{recursive:!0}),await Promise.all(Array.from(u.entries()).map(([n,r])=>ue.copyFile(n,r))))},"generateBundle")}},"nativeModules"),io=c(()=>{const e=new Map;return{name:"import-attributes",async resolveId(t,u,{attributes:n}){if(n.type!=="text"&&n.type!=="bytes"||!u||!t.startsWith("./")&&!t.startsWith("../"))return null;const r=b.resolve(b.dirname(u),t);return e.set(r,n.type),r},async load(t){const u=e.get(t);if(!u)return null;if(this.addWatchFile(t),u==="text"){const n=await ue.readFile(t,"utf8");return`export default ${JSON.stringify(n)}`}return u==="bytes"?`export default new Uint8Array([${(await ue.readFile(t)).join(",")}])`:null}}},"importAttributes"),Eu=c(()=>{const e=Fe.realpathSync.native(process.cwd());return{name:"external-pkg-imports",resolveId(t,u){return t[0]!=="#"||u&&wt(u,e)?null:{id:t,external:!0}}}},"externalPkgImports");function Cu(e,t){return Tu(e)?e:Ou(t||".",e)}c(Cu,"absolute");function ao(e,t){let{last:u,cwd:n}=t||{},r=Cu(e,n),s=Cu(u||"/",n),o,i=[];for(;o!==s&&(i.push(r),r=ju(o=r),r!==o););return i}c(ao,"up$1");function co(e,t){let u,n,r=t&&t.cwd||"";for(u of ao(r,t))if(n=Pu(u,e),_u(n))return n}c(co,"up");const lo=c(async e=>{const t=await ue.stat(e).catch(()=>{});if(t){if(t.isFile())return e;if(t.isDirectory()){const r=b.join(e,"index.js");if(await ye(r))return r;const s=b.join(e,"index.json");if(await ye(s))return s}}const u=`${e}.js`;if(await ye(u))return u;const n=`${e}.json`;return await ye(n)?n:null},"tryResolveImplicit"),Do=c(()=>({name:"resolve-implicit-externals",async resolveId(e,t,u){if(!qn(e))return null;const[n,r]=Gn(e);if(!r)return null;const s=await this.resolve(e,t,{...u,skipSelf:!0});if(!s||!s.external)return s;const o=t?b.dirname(t):process.cwd(),i=co(`node_modules/${n}/package.json`,{cwd:o});if(!i)return s;const a=await Rn(i),f=b.dirname(i);if(a.exports)return s;const D=b.join(f,r),d=await lo(D);if(!d)return s;const l=qe(b.relative(f,d)),m=`${n}/${l}`;return{...s,id:m}}}),"resolveImplicitExternals"),st="@types/",yu=c(e=>e[0]==="@"?`${st}${e.slice(1).replace("/","__")}`:`${st}${e}`,"getAtTypesPackageName"),fo=c(e=>{const t=e.slice(st.length);return t.includes("__")?`@${t.replace("__","/")}`:t},"getOriginalPackageName"),po=["peerDependencies","dependencies","optionalDependencies"],Au=c((e,t)=>{const u=Fe.realpathSync.native(process.cwd()),n=new Set,r=new Set(Object.keys(e.devDependencies||{}));for(const s of po){const o=e[s];if(o)for(const i of Object.keys(o))n.add(i),i.startsWith(st)&&n.add(fo(i))}return{name:"externalize-dependencies",async resolveId(s,o,i){if(!qn(s))return null;const[a]=Gn(s);if(n.has(a)){if(t?.forTypes){const f=yu(a);r.has(f)&&console.warn(`Recommendation: "${f}" is bundled (devDependencies) but "${a}" is externalized. Place "${f}" in dependencies/peerDependencies as well so users don't have missing types.`)}return{id:s,external:!0}}if(r.has(a)){const f=await this.resolve(s,o,{...i,skipSelf:!0});if(!f){const D=`Could not resolve "${s}" even though it's declared in package.json. Try re-installing node_modules.`;throw console.error(D),new Error(D)}if(t?.forTypes){const D=yu(a);n.has(D)&&console.warn(`Recommendation: "${D}" is externalized but "${a}" is bundled (devDependencies). This may cause type mismatches for consumers. Consider moving "${a}" to dependencies or "${D}" to devDependencies.`)}return f}return o&&!wt(o,u)&&!t?.skipUnlistedWarnings&&console.warn(`"${a}" imported by "${qe(o)}" but not declared in package.json. Will be bundled to prevent failure at runtime.`),null}}},"externalizeDependencies"),ot=c(e=>e.replace("\0","").split("?")[0],"cleanRollupId"),Fo=c(e=>{try{return er(e)}catch{return{exports:[],reexports:[]}}},"safeParse"),ho=c(()=>{const e=new Map,t=c((u,n=new Set)=>{const r=ot(u);if(n.has(r))return[];n.add(r);const s=e.get(r);if(!s)return[];const o=[...s.exports];for(const i of s.reexports)o.push(...t(i,n));return o},"getFinalExports");return{name:"cjs-annotate-exports",buildStart:c(async()=>{await Yu(),e.clear()},"buildStart"),async transform(u,n){const r=ot(n);if(!/\.c?js$/.test(r)||!u.includes("exports"))return;const{exports:s,reexports:o}=Fo(u);if(s.length===0&&o.length===0)return;const a=(await Promise.all(o.map(async f=>{const D=await this.resolve(f,n);return D?ot(D.id):""}))).filter(Boolean);e.set(r,{exports:s,reexports:a})},renderChunk:{order:"post",handler(u,n,r){if(r.format!=="cjs"||!n.isEntry||!n.facadeModuleId)return null;const s=ot(n.facadeModuleId),o=[...new Set(t(s))];if(o.length>0){const i=new Le(u);return i.append(`
30
- 0&&(module.exports={${o.join(",")}});`),{code:i.toString(),map:i.generateMap({hires:!0})}}}}}},"cjsAnnotateExports"),mo=["LICENSE","LICENSE.txt","LICENSE.md","LICENCE","LICENCE.txt","LICENCE.md"],bu="----------- BUNDLED DEPENDENCIES -----------",go=/-{2,} BUNDLED DEPENDENCIES -{2,}/,Lt=c(e=>ue.access(e).then(()=>!0,()=>!1),"fileExists"),wu=c(async e=>{for(const t of mo){const u=b.join(e,t);if(await Lt(u))return u}},"findLicenseFile"),Bu=c(e=>{if(!e)return null;if(typeof e=="object")return e.name??null;const t=e.indexOf("<"),u=e.indexOf("(");let n=e.length;return t>0&&(n=t),u>0&&u<n&&(n=u),e.slice(0,n).trim()||null},"parsePersonName"),Eo=c(e=>{const t=new Set;for(const u of Object.values(e))if(u.type==="chunk")for(const[n,r]of Object.entries(u.modules))r.renderedLength>0&&t.add(n);return t},"getRenderedModuleIds"),Co=c(async(e,t)=>{const u=await wu(t),n=u?await ue.readFile(u,"utf8"):null,r=Bu(e.author),s=e.contributors,o=Array.isArray(s)?s.map(Bu).filter(Boolean):[],{repository:i}=e,a=i?typeof i=="string"?i:i.url:null;return{name:e.name,version:e.version,license:e.license??null,author:r,contributors:o,repository:a,licenseText:n}},"buildDependencyInfo"),yo=c(async(e,t)=>{let u=b.dirname(e);for(;u!==b.dirname(u);){if(t.has(u))return t.get(u);const n=b.join(u,"package.json");if(await Lt(n)){const r=JSON.parse(await ue.readFile(n,"utf8"));if(r.name&&r.version){const s=r.private?null:await Co(r,u);return t.set(u,s),s}}u=b.dirname(u)}return null},"findDependencyForModule"),Ao=c(async e=>{const t=Eo(e),u=new Map,n=new Map;for(const r of t){if(!/[/\\]node_modules[/\\]/.test(r))continue;const s=await yo(r,u);if(s){const o=`${s.name}@${s.version}`;n.has(o)||n.set(o,s)}}return[...n.values()]},"collectBundledDependencies"),bo=c(e=>{const t=[`## ${e.name}@${e.version}`];e.license&&t.push(`License: ${e.license}`);const u=new Set;e.author&&u.add(e.author);for(const n of e.contributors)u.add(n);if(u.size>0&&t.push(`By: ${[...u].join(", ")}`),e.repository&&t.push(`Repository: ${e.repository}`),e.licenseText){const n=e.licenseText.trim().replaceAll(/\r\n?/g,`
29
+ `+" ".repeat(t));var Ye;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Ye||(Ye={}));function Yn(e,t=[],u=Ye.DEFAULT){let n=null,r=[];const s=[];function o(i){Array.isArray(r)?r.push(i):n!==null&&(r[n]=i)}return c(o,"r"),w(o,"onValue"),eu(e,{onObjectBegin:w(()=>{const i={};o(i),s.push(r),r=i,n=null},"onObjectBegin"),onObjectProperty:w(i=>{n=i},"onObjectProperty"),onObjectEnd:w(()=>{r=s.pop()},"onObjectEnd"),onArrayBegin:w(()=>{const i=[];o(i),s.push(r),r=i,n=null},"onArrayBegin"),onArrayEnd:w(()=>{r=s.pop()},"onArrayEnd"),onLiteralValue:o,onError:w((i,a,f)=>{t.push({error:i,offset:a,length:f})},"onError")},u),r[0]}c(Yn,"$e"),w(Yn,"parse$1");function eu(e,t,u=Ye.DEFAULT){const n=Qn(e,!1),r=[];let s=0;function o(O){return O?()=>s===0&&O(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}c(o,"r"),w(o,"toNoArgVisit");function i(O){return O?H=>s===0&&O(H,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}c(i,"f"),w(i,"toOneArgVisit");function a(O){return O?H=>s===0&&O(H,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>r.slice()):()=>!0}c(a,"u"),w(a,"toOneArgVisitWithPath");function f(O){return O?()=>{s>0?s++:O(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>r.slice())===!1&&(s=1)}:()=>!0}c(f,"g"),w(f,"toBeginVisit");function D(O){return O?()=>{s>0&&s--,s===0&&O(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:()=>!0}c(D,"w"),w(D,"toEndVisit");const d=f(t.onObjectBegin),l=a(t.onObjectProperty),m=D(t.onObjectEnd),E=f(t.onArrayBegin),y=D(t.onArrayEnd),$=a(t.onLiteralValue),T=i(t.onSeparator),_=o(t.onComment),g=i(t.onError),S=u&&u.disallowComments,B=u&&u.allowTrailingComma;function R(){for(;;){const O=n.scan();switch(n.getTokenError()){case 4:v(14);break;case 5:v(15);break;case 3:v(13);break;case 1:S||v(11);break;case 2:v(12);break;case 6:v(16);break}switch(O){case 12:case 13:S?v(10):_();break;case 16:v(1);break;case 15:case 14:break;default:return O}}}c(R,"T"),w(R,"scanNext");function v(O,H=[],ee=[]){if(g(O),H.length+ee.length>0){let L=n.getToken();for(;L!==17;){if(H.indexOf(L)!==-1){R();break}else if(ee.indexOf(L)!==-1)break;L=R()}}}c(v,"p"),w(v,"handleError");function Q(O){const H=n.getTokenValue();return O?$(H):(l(H),r.push(H)),R(),!0}c(Q,"U"),w(Q,"parseString");function q(){switch(n.getToken()){case 11:const O=n.getTokenValue();let H=Number(O);isNaN(H)&&(v(2),H=0),$(H);break;case 7:$(null);break;case 8:$(!0);break;case 9:$(!1);break;default:return!1}return R(),!0}c(q,"a"),w(q,"parseLiteral");function De(){return n.getToken()!==10?(v(3,[],[2,5]),!1):(Q(!1),n.getToken()===6?(T(":"),R(),W()||v(4,[],[2,5])):v(5,[],[2,5]),r.pop(),!0)}c(De,"N"),w(De,"parseProperty");function V(){d(),R();let O=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(O||v(4,[],[]),T(","),R(),n.getToken()===2&&B)break}else O&&v(6,[],[]);De()||v(4,[],[2,5]),O=!0}return m(),n.getToken()!==2?v(7,[2],[]):R(),!0}c(V,"_e"),w(V,"parseObject");function N(){E(),R();let O=!0,H=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(H||v(4,[],[]),T(","),R(),n.getToken()===4&&B)break}else H&&v(6,[],[]);O?(r.push(0),O=!1):r[r.length-1]++,W()||v(4,[],[4,5]),H=!0}return y(),O||r.pop(),n.getToken()!==4?v(8,[4],[]):R(),!0}c(N,"ye"),w(N,"parseArray");function W(){switch(n.getToken()){case 3:return N();case 1:return V();case 10:return Q(!0);default:return q()}}return c(W,"z"),w(W,"parseValue"),R(),n.getToken()===17?u.allowEmptyContent?!0:(v(4,[],[]),!1):W()?(n.getToken()!==17&&v(9,[],[]),!0):(v(4,[],[]),!1)}c(eu,"xe"),w(eu,"visit");var tu;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(tu||(tu={}));var nu;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(nu||(nu={}));const Os=Yn;var uu;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(uu||(uu={}));const ru=w((e,t)=>Os(_s(t,e,"utf8")),"readJsonc"),kt=Symbol("implicitBaseUrl"),Ae="${configDir}",Ts=w(()=>{const{findPnpApi:e}=Vu;return e&&e(process.cwd())},"getPnpApi"),_t=w((e,t,u,n)=>{const r=`resolveFromPackageJsonPath:${e}:${t}:${u}`;if(n!=null&&n.has(r))return n.get(r);const s=ru(e,n);if(!s)return;let o=t||"tsconfig.json";if(!u&&s.exports)try{const[i]=Ss(s.exports,t,["require","types"]);o=i}catch{return!1}else!t&&s.tsconfig&&(o=s.tsconfig);return o=b.join(e,"..",o),n?.set(r,o),o},"resolveFromPackageJsonPath"),Ot="package.json",Tt="tsconfig.json",js=w((e,t,u)=>{let n=e;if(e===".."&&(n=b.join(n,Tt)),e[0]==="."&&(n=b.resolve(t,n)),b.isAbsolute(n)){if(de(u,n)){if(Qe(u,n).isFile())return n}else if(!n.endsWith(".json")){const m=`${n}.json`;if(de(u,m))return m}return}const[r,...s]=e.split("/"),o=r[0]==="@"?`${r}/${s.shift()}`:r,i=s.join("/"),a=Ts();if(a){const{resolveRequest:m}=a;try{if(o===e){const E=m(b.join(o,Ot),t);if(E){const y=_t(E,i,!1,u);if(y&&de(u,y))return y}}else{let E;try{E=m(e,t,{extensions:[".json"]})}catch{E=m(b.join(e,Tt),t)}if(E)return E}}catch{}}const f=Jn(b.resolve(t),b.join("node_modules",o),u);if(!f||!Qe(u,f).isDirectory())return;const D=b.join(f,Ot);if(de(u,D)){const m=_t(D,i,!1,u);if(m===!1)return;if(m&&de(u,m)&&Qe(u,m).isFile())return m}const d=b.join(f,i),l=d.endsWith(".json");if(!l){const m=`${d}.json`;if(de(u,m))return m}if(de(u,d)){if(Qe(u,d).isDirectory()){const m=b.join(d,Ot);if(de(u,m)){const y=_t(m,"",!0,u);if(y&&de(u,y))return y}const E=b.join(d,Tt);if(de(u,E))return E}else if(l)return d}},"resolveExtendsPath"),jt=w((e,t)=>St(b.relative(e,t)),"pathRelative"),su=["files","include","exclude"],ou=w((e,t,u)=>{const n=b.join(t,u),r=b.relative(e,n);return ae(r)||"./"},"resolveAndRelativize"),Ps=w((e,t,u)=>{const n=b.relative(e,t);if(!n)return u;const r=u.startsWith("./")?u.slice(2):u;return ae(`${n}/${r}`)},"prefixPattern"),Ns=w((e,t,u,n)=>{const r=js(e,t,n);if(!r)throw new Error(`File '${e}' not found.`);if(u.has(r))throw new Error(`Circularity detected while resolving configuration: ${r}`);u.add(r);const s=b.dirname(r),o=iu(r,n,u);delete o.references;const{compilerOptions:i}=o;if(i){const{baseUrl:a}=i;a&&!a.startsWith(Ae)&&(i.baseUrl=ou(t,s,a));const{outDir:f}=i;f&&!f.startsWith(Ae)&&(i.outDir=ou(t,s,f))}for(const a of su){const f=o[a];f&&(o[a]=f.map(D=>D.startsWith(Ae)?D:Ps(t,s,D)))}return o},"resolveExtends"),Is=["outDir","declarationDir"],iu=w((e,t,u=new Set)=>{let n;try{n=ru(e,t)||{}}catch{throw new Error(`Cannot resolve tsconfig at path: ${e}`)}if(typeof n!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${e}`);const r=b.dirname(e);if(n.compilerOptions){const{compilerOptions:s}=n;s.paths&&!s.baseUrl&&(s[kt]=r)}if(n.extends){const s=Array.isArray(n.extends)?n.extends:[n.extends];delete n.extends;for(const o of s.reverse()){const i=Ns(o,r,new Set(u),t),a={...i,...n,compilerOptions:{...i.compilerOptions,...n.compilerOptions}};i.watchOptions&&(a.watchOptions={...i.watchOptions,...n.watchOptions}),n=a}}if(n.compilerOptions){const{compilerOptions:s}=n,o=["baseUrl","rootDir"];for(const i of o){const a=s[i];if(a&&!a.startsWith(Ae)){const f=b.resolve(r,a),D=jt(r,f);s[i]=D}}for(const i of Is){let a=s[i];a&&(Array.isArray(n.exclude)||(n.exclude=[]),n.exclude.includes(a)||n.exclude.push(a),a.startsWith(Ae)||(a=St(a)),s[i]=a)}}else n.compilerOptions={};if(n.include?(n.include=n.include.map(ae),n.files&&delete n.files):n.files&&(n.files=n.files.map(s=>s.startsWith(Ae)?s:St(s))),n.watchOptions){const{watchOptions:s}=n;s.excludeDirectories&&(s.excludeDirectories=s.excludeDirectories.map(o=>ae(b.resolve(r,o))))}return n},"_parseTsconfig"),et=w((e,t)=>{if(e.startsWith(Ae))return ae(b.join(t,e.slice(Ae.length)))},"interpolateConfigDir"),Ls=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],Ms=w(e=>{if(e.strict){const t=["noImplicitAny","noImplicitThis","strictNullChecks","strictFunctionTypes","strictBindCallApply","strictPropertyInitialization","strictBuiltinIteratorReturn","alwaysStrict","useUnknownInCatchVariables"];for(const u of t)e[u]===void 0&&(e[u]=!0)}if(e.target){let t=e.target.toLowerCase();t==="es2015"&&(t="es6"),e.target=t,t==="esnext"&&(e.module!=null||(e.module="es6"),e.useDefineForClassFields!=null||(e.useDefineForClassFields=!0)),(t==="es6"||t==="es2016"||t==="es2017"||t==="es2018"||t==="es2019"||t==="es2020"||t==="es2021"||t==="es2022"||t==="es2023"||t==="es2024")&&(e.module!=null||(e.module="es6")),(t==="es2022"||t==="es2023"||t==="es2024")&&(e.useDefineForClassFields!=null||(e.useDefineForClassFields=!0))}if(e.module){let t=e.module.toLowerCase();t==="es2015"&&(t="es6"),e.module=t,(t==="es6"||t==="es2020"||t==="es2022"||t==="esnext"||t==="none"||t==="system"||t==="umd"||t==="amd")&&(e.moduleResolution!=null||(e.moduleResolution="classic")),t==="system"&&(e.allowSyntheticDefaultImports!=null||(e.allowSyntheticDefaultImports=!0)),(t==="node16"||t==="nodenext"||t==="preserve")&&(e.esModuleInterop!=null||(e.esModuleInterop=!0),e.allowSyntheticDefaultImports!=null||(e.allowSyntheticDefaultImports=!0)),(t==="node16"||t==="nodenext")&&(e.moduleDetection!=null||(e.moduleDetection="force"),e.useDefineForClassFields!=null||(e.useDefineForClassFields=!0)),t==="node16"&&(e.target!=null||(e.target="es2022"),e.moduleResolution!=null||(e.moduleResolution="node16")),t==="nodenext"&&(e.target!=null||(e.target="esnext"),e.moduleResolution!=null||(e.moduleResolution="nodenext")),t==="preserve"&&(e.moduleResolution!=null||(e.moduleResolution="bundler"))}if(e.moduleResolution){let t=e.moduleResolution.toLowerCase();t==="node"&&(t="node10"),e.moduleResolution=t,(t==="node16"||t==="nodenext"||t==="bundler")&&(e.resolvePackageJsonExports!=null||(e.resolvePackageJsonExports=!0),e.resolvePackageJsonImports!=null||(e.resolvePackageJsonImports=!0)),t==="bundler"&&(e.allowSyntheticDefaultImports!=null||(e.allowSyntheticDefaultImports=!0),e.resolveJsonModule!=null||(e.resolveJsonModule=!0))}e.esModuleInterop&&(e.allowSyntheticDefaultImports!=null||(e.allowSyntheticDefaultImports=!0)),e.verbatimModuleSyntax&&(e.isolatedModules!=null||(e.isolatedModules=!0),e.preserveConstEnums!=null||(e.preserveConstEnums=!0)),e.isolatedModules&&(e.preserveConstEnums!=null||(e.preserveConstEnums=!0)),e.rewriteRelativeImportExtensions&&(e.allowImportingTsExtensions!=null||(e.allowImportingTsExtensions=!0))},"normalizeCompilerOptions"),au=w((e,t=new Map)=>{const u=b.resolve(e),n=iu(u,t),r=b.dirname(u),{compilerOptions:s}=n;if(s){for(const i of Ls){const a=s[i];if(a){const f=et(a,r);s[i]=f?jt(r,f):a}}for(const i of["rootDirs","typeRoots"]){const a=s[i];a&&(s[i]=a.map(f=>{const D=et(f,r);return D?jt(r,D):f}))}const{paths:o}=s;if(o)for(const i of Object.keys(o))o[i]=o[i].map(a=>{var f;return(f=et(a,r))!=null?f:a});Ms(s)}for(const o of su){const i=n[o];i&&(n[o]=i.map(a=>{var f;return(f=et(a,r))!=null?f:a}))}return n},"parseTsconfig"),Hs=w((e=process.cwd(),t="tsconfig.json",u=new Map)=>{const n=Jn(ae(e),t,u);if(!n)return null;const r=au(n,u);return{path:n,config:r}},"getTsconfig"),Ws=/\*/g,cu=w((e,t)=>{const u=e.match(Ws);if(u&&u.length>1)throw new Error(t)},"assertStarCount"),Us=w(e=>{if(e.includes("*")){const[t,u]=e.split("*");return{prefix:t,suffix:u}}return e},"parsePattern"),Gs=w(({prefix:e,suffix:t},u)=>u.startsWith(e)&&u.endsWith(t),"isPatternMatch"),qs=w((e,t,u)=>Object.entries(e).map(([n,r])=>(cu(n,`Pattern '${n}' can have at most one '*' character.`),{pattern:Us(n),substitutions:r.map(s=>{if(cu(s,`Substitution '${s}' in pattern '${n}' can have at most one '*' character.`),!t&&!Rt.test(s))throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return b.resolve(u,s)})})),"parsePaths"),Ks=w(e=>{const{compilerOptions:t}=e.config;if(!t)return null;const{baseUrl:u,paths:n}=t;if(!u&&!n)return null;const r=kt in t&&t[kt],s=b.resolve(b.dirname(e.path),u||r||"."),o=n?qs(n,u,s):[];return i=>{if(Rt.test(i))return[];const a=[];for(const l of o){if(l.pattern===i)return l.substitutions.map(ae);typeof l.pattern!="string"&&a.push(l)}let f,D=-1;for(const l of a)Gs(l.pattern,i)&&l.pattern.prefix.length>D&&(D=l.pattern.prefix.length,f=l);if(!f)return u?[ae(b.join(s,i))]:[];const d=i.slice(f.pattern.prefix.length,i.length-f.pattern.suffix.length);return f.substitutions.map(l=>ae(l.replace("*",d)))}},"createPathsMatcher");var Vs=Object.defineProperty,tt=w((e,t)=>Vs(e,"name",{value:t,configurable:!0}),"s");const lu=tt(e=>{let t="";for(let u=0;u<e.length;u+=1){const n=e[u],r=n.toUpperCase();t+=n===r?n.toLowerCase():r}return t},"invertCase"),Pt=new Map,Du=tt((e,t)=>{const u=Qu.join(e,`.is-fs-case-sensitive-test-${process.pid}`);try{return t.writeFileSync(u,""),!t.existsSync(lu(u))}finally{try{t.unlinkSync(u)}catch{}}},"checkDirectoryCaseWithWrite"),zs=tt((e,t,u)=>{try{return Du(e,u)}catch(n){if(t===void 0)return Du(Ju.tmpdir(),u);throw n}},"checkDirectoryCaseWithFallback"),Xs=tt((e,t=Xu,u=!0)=>{const n=e??process.cwd();if(u&&Pt.has(n))return Pt.get(n);let r;const s=lu(n);return s!==n&&t.existsSync(n)?r=!t.existsSync(s):r=zs(n,e,t),u&&Pt.set(n,r),r},"isFsCaseSensitive"),{join:nt}=b.posix,Nt={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},Js=w(e=>{const t=[...Nt.ts],u=[...Nt.cts],n=[...Nt.mts];return e!=null&&e.allowJs&&(t.push(".js",".jsx"),u.push(".cjs"),n.push(".mjs")),[...t,...u,...n]},"getSupportedExtensions"),Qs=w(e=>{const t=[];if(!e)return t;const{outDir:u,declarationDir:n}=e;return u&&t.push(u),n&&t.push(n),t},"getDefaultExcludeSpec"),fu=w(e=>e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),Zs=["node_modules","bower_components","jspm_packages"],It=`(?!(${Zs.join("|")})(/|$))`,Ys=/(?:^|\/)[^.*?]+$/,pu="**/*",ut="[^/]",Lt="[^./]",du=process.platform==="win32";w(({config:e,path:t},u=Xs())=>{if("extends"in e)throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");if(!b.isAbsolute(t))throw new Error("The tsconfig path must be absolute");du&&(t=ae(t));const n=b.dirname(t),{files:r,include:s,exclude:o,compilerOptions:i}=e,a=r?.map(E=>nt(n,E)),f=Js(i),D=u?"":"i",d=(o||Qs(i)).map(E=>{const y=nt(n,E),$=fu(y).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${ut}*`).replaceAll(String.raw`\?`,ut);return new RegExp(`^${$}($|/)`,D)}),l=r||s?s:[pu],m=l?l.map(E=>{let y=nt(n,E);Ys.test(y)&&(y=nt(y,pu));const $=fu(y).replaceAll(String.raw`/\*\*`,`(/${It}${Lt}${ut}*)*?`).replaceAll(/(\/)?\\\*/g,(T,_)=>{const g=`(${Lt}|(\\.(?!min\\.js$))?)*`;return _?`/${It}${Lt}${g}`:g}).replaceAll(/(\/)?\\\?/g,(T,_)=>{const g=ut;return _?`/${It}${g}`:g});return new RegExp(`^${$}$`,D)}):void 0;return E=>{if(!b.isAbsolute(E))throw new Error("filePath must be absolute");if(du&&(E=ae(E)),a!=null&&a.includes(E)||!(!f.some(y=>E.endsWith(y))||d.some(y=>y.test(E)))&&m&&m.some(y=>y.test(E)))return e}},"createFilesMatcher");const Fu="resolve-tsconfig-paths",eo=c(e=>e[0]===".","isRelative"),to=c(e=>e[0]==="/"||/^[\s\S]:/.test(e),"isAbsolute"),hu=c(e=>{const t=Ks(e);return t?{name:Fu,async resolveId(u,n,r){if(!n||eo(u)||to(u)||u.startsWith("\0"))return null;const s=t(u);for(const o of s){const i=await this.resolve(o,n,{skipSelf:!0,...r});if(i)return i}return null}}:{name:Fu}},"resolveTsconfigPaths"),mu=/^#!.*/,no=c(()=>({name:"strip-hashbang",transform:c(e=>{if(!mu.test(e))return null;const t=new Le(e);return t.replace(mu,""),{code:t.toString(),map:t.generateMap({hires:!0})}},"transform")}),"stripHashbang");class uo{static{c(this,"WalkerBase")}constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:c(()=>this.should_skip=!0,"skip"),remove:c(()=>this.should_remove=!0,"remove"),replace:c(t=>this.replacement=t,"replace")}}replace(t,u,n,r){t&&u&&(n!=null?t[u][n]=r:t[u]=r)}remove(t,u,n){t&&u&&(n!=null?t[u].splice(n,1):delete t[u])}}class ro extends uo{static{c(this,"SyncWalker")}constructor(t,u){super(),this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:c(()=>this.should_skip=!0,"skip"),remove:c(()=>this.should_remove=!0,"remove"),replace:c(n=>this.replacement=n,"replace")},this.enter=t,this.leave=u}visit(t,u,n,r){if(t){if(this.enter){const o=this.should_skip,i=this.should_remove,a=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,t,u,n,r),this.replacement&&(t=this.replacement,this.replace(u,n,r,t)),this.should_remove&&this.remove(u,n,r);const f=this.should_skip,D=this.should_remove;if(this.should_skip=o,this.should_remove=i,this.replacement=a,f)return t;if(D)return null}let s;for(s in t){const o=t[s];if(o&&typeof o=="object")if(Array.isArray(o)){const i=o;for(let a=0;a<i.length;a+=1){const f=i[a];gu(f)&&(this.visit(f,t,s,a)||a--)}}else gu(o)&&this.visit(o,t,s,null)}if(this.leave){const o=this.replacement,i=this.should_remove;this.replacement=null,this.should_remove=!1,this.leave.call(this.context,t,u,n,r),this.replacement&&(t=this.replacement,this.replace(u,n,r,t)),this.should_remove&&this.remove(u,n,r);const a=this.should_remove;if(this.replacement=o,this.should_remove=i,a)return null}}return t}}function gu(e){return e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"}c(gu,"isNode");function so(e,{enter:t,leave:u}){return new ro(t,u).visit(e,null)}c(so,"walk");const oo=c(()=>{const e='import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);';return{name:"esmInjectCreateRequire",renderChunk(t,u,n){if(n.format!=="es"||!/\brequire\b/.test(t))return null;const r=this.parse(t);let s=Zu(r,"scope"),o=!1;if(so(r,{enter(a,f){a.scope&&(s=a.scope),!(a.type!=="Identifier"||a.name!=="require")&&(f?.type==="Property"&&f.key===a&&!f.compute||f?.type!=="MemberExpression"&&(s.contains("require")||(o=!0,this.skip())))},leave:c(a=>{a.scope&&(s=s.parent)},"leave")}),!o)return null;const i=new Le(t);return i.prepend(e),{code:i.toString(),map:i.generateMap({hires:!0})}}}},"esmInjectCreateRequire"),rt="\0natives:",io=c(e=>{const t=`${e}/natives`,u=new Map;return{name:"native-modules",buildStart:c(()=>{u.clear()},"buildStart"),async resolveId(n,r){if(n.startsWith(rt)||!n.endsWith(".node"))return null;const s=r?b.resolve(b.dirname(r),n):b.resolve(n);try{await ue.access(s)}catch{return this.warn(`Native module not found: ${s}`),null}const o=b.basename(s);let i=o,a=1;const f=new Set(Array.from(u.values()).map(d=>b.basename(d)));for(;f.has(i);){const d=b.extname(o);i=`${b.basename(o,d)}_${a}${d}`,a+=1}const D=b.join(t,i);return u.set(s,D),rt+s},load(n){if(!n.startsWith(rt))return null;const r=n.slice(rt.length),s=u.get(r);return s?`export default require("${`./${qe(b.relative(e,s))}`}");`:this.error(`Could not find staged native module for: ${r}`)},generateBundle:c(async()=>{u.size!==0&&(await ue.mkdir(t,{recursive:!0}),await Promise.all(Array.from(u.entries()).map(([n,r])=>ue.copyFile(n,r))))},"generateBundle")}},"nativeModules"),ao=c(()=>{const e=new Map;return{name:"import-attributes",async resolveId(t,u,{attributes:n}){if(n.type!=="text"&&n.type!=="bytes"||!u||!t.startsWith("./")&&!t.startsWith("../"))return null;const r=b.resolve(b.dirname(u),t);return e.set(r,n.type),r},async load(t){const u=e.get(t);if(!u)return null;if(this.addWatchFile(t),u==="text"){const n=await ue.readFile(t,"utf8");return`export default ${JSON.stringify(n)}`}return u==="bytes"?`export default new Uint8Array([${(await ue.readFile(t)).join(",")}])`:null}}},"importAttributes"),Eu=c(()=>{const e=Fe.realpathSync.native(process.cwd());return{name:"external-pkg-imports",resolveId(t,u){return t[0]!=="#"||u&&Bt(u,e)?null:{id:t,external:!0}}}},"externalPkgImports");function Cu(e,t){return Tu(e)?e:Ou(t||".",e)}c(Cu,"absolute");function co(e,t){let{last:u,cwd:n}=t||{},r=Cu(e,n),s=Cu(u||"/",n),o,i=[];for(;o!==s&&(i.push(r),r=ju(o=r),r!==o););return i}c(co,"up$1");function lo(e,t){let u,n,r=t&&t.cwd||"";for(u of co(r,t))if(n=Pu(u,e),_u(n))return n}c(lo,"up");const Do=c(async e=>{const t=await ue.stat(e).catch(()=>{});if(t){if(t.isFile())return e;if(t.isDirectory()){const r=b.join(e,"index.js");if(await ye(r))return r;const s=b.join(e,"index.json");if(await ye(s))return s}}const u=`${e}.js`;if(await ye(u))return u;const n=`${e}.json`;return await ye(n)?n:null},"tryResolveImplicit"),fo=c(()=>({name:"resolve-implicit-externals",async resolveId(e,t,u){if(!wt(e))return null;const[n,r]=qn(e);if(!r)return null;const s=await this.resolve(e,t,{...u,skipSelf:!0});if(!s||!s.external)return s;const o=t?b.dirname(t):process.cwd(),i=lo(`node_modules/${n}/package.json`,{cwd:o});if(!i)return s;const a=await Sn(i),f=b.dirname(i);if(a.exports)return s;const D=b.join(f,r),d=await Do(D);if(!d)return s;const l=qe(b.relative(f,d)),m=`${n}/${l}`;return{...s,id:m}}}),"resolveImplicitExternals"),st="@types/",yu=c(e=>e[0]==="@"?`${st}${e.slice(1).replace("/","__")}`:`${st}${e}`,"getAtTypesPackageName"),po=c(e=>{const t=e.slice(st.length);return t.includes("__")?`@${t.replace("__","/")}`:t},"getOriginalPackageName"),Fo=["peerDependencies","dependencies","optionalDependencies"],Au=c((e,t)=>{const u=Fe.realpathSync.native(process.cwd()),n=new Set,r=new Set(Object.keys(e.devDependencies||{}));for(const s of Fo){const o=e[s];if(o)for(const i of Object.keys(o))n.add(i),i.startsWith(st)&&n.add(po(i))}return{name:"externalize-dependencies",async resolveId(s,o,i){if(!wt(s))return null;const[a]=qn(s);if(n.has(a)){if(t?.forTypes){const f=yu(a);r.has(f)&&console.warn(`Recommendation: "${f}" is bundled (devDependencies) but "${a}" is externalized. Place "${f}" in dependencies/peerDependencies as well so users don't have missing types.`)}return{id:s,external:!0}}if(r.has(a)){const f=await this.resolve(s,o,{...i,skipSelf:!0});if(!f){const D=`Could not resolve "${s}" even though it's declared in package.json. Try re-installing node_modules.`;throw console.error(D),new Error(D)}if(t?.forTypes){const D=yu(a);n.has(D)&&console.warn(`Recommendation: "${D}" is externalized but "${a}" is bundled (devDependencies). This may cause type mismatches for consumers. Consider moving "${a}" to dependencies or "${D}" to devDependencies.`)}return f}return o&&!Bt(o,u)&&!t?.skipUnlistedWarnings&&console.warn(`"${a}" imported by "${qe(o)}" but not declared in package.json. Will be bundled to prevent failure at runtime.`),null}}},"externalizeDependencies"),ot=c(e=>e.replace("\0","").split("?")[0],"cleanRollupId"),ho=c(e=>{try{return er(e)}catch{return{exports:[],reexports:[]}}},"safeParse"),mo=c(()=>{const e=new Map,t=c((u,n=new Set)=>{const r=ot(u);if(n.has(r))return[];n.add(r);const s=e.get(r);if(!s)return[];const o=[...s.exports];for(const i of s.reexports)o.push(...t(i,n));return o},"getFinalExports");return{name:"cjs-annotate-exports",buildStart:c(async()=>{await Yu(),e.clear()},"buildStart"),async transform(u,n){const r=ot(n);if(!/\.c?js$/.test(r)||!u.includes("exports"))return;const{exports:s,reexports:o}=ho(u);if(s.length===0&&o.length===0)return;const a=(await Promise.all(o.map(async f=>{const D=await this.resolve(f,n);return D?ot(D.id):""}))).filter(Boolean);e.set(r,{exports:s,reexports:a})},renderChunk:{order:"post",handler(u,n,r){if(r.format!=="cjs"||!n.isEntry||!n.facadeModuleId)return null;const s=ot(n.facadeModuleId),o=[...new Set(t(s))];if(o.length>0){const i=new Le(u);return i.append(`
30
+ 0&&(module.exports={${o.join(",")}});`),{code:i.toString(),map:i.generateMap({hires:!0})}}}}}},"cjsAnnotateExports"),go=["LICENSE","LICENSE.txt","LICENSE.md","LICENCE","LICENCE.txt","LICENCE.md"],bu="----------- BUNDLED DEPENDENCIES -----------",Eo=/-{2,} BUNDLED DEPENDENCIES -{2,}/,Mt=c(e=>ue.access(e).then(()=>!0,()=>!1),"fileExists"),wu=c(async e=>{for(const t of go){const u=b.join(e,t);if(await Mt(u))return u}},"findLicenseFile"),Bu=c(e=>{if(!e)return null;if(typeof e=="object")return e.name??null;const t=e.indexOf("<"),u=e.indexOf("(");let n=e.length;return t>0&&(n=t),u>0&&u<n&&(n=u),e.slice(0,n).trim()||null},"parsePersonName"),Co=c(e=>{const t=new Set;for(const u of Object.values(e))if(u.type==="chunk")for(const[n,r]of Object.entries(u.modules))r.renderedLength>0&&t.add(n);return t},"getRenderedModuleIds"),yo=c(async(e,t)=>{const u=await wu(t),n=u?await ue.readFile(u,"utf8"):null,r=Bu(e.author),s=e.contributors,o=Array.isArray(s)?s.map(Bu).filter(Boolean):[],{repository:i}=e,a=i?typeof i=="string"?i:i.url:null;return{name:e.name,version:e.version,license:e.license??null,author:r,contributors:o,repository:a,licenseText:n}},"buildDependencyInfo"),Ao=c(async(e,t)=>{let u=b.dirname(e);for(;u!==b.dirname(u);){if(t.has(u))return t.get(u);const n=b.join(u,"package.json");if(await Mt(n)){const r=JSON.parse(await ue.readFile(n,"utf8"));if(r.name&&r.version){const s=r.private?null:await yo(r,u);return t.set(u,s),s}}u=b.dirname(u)}return null},"findDependencyForModule"),bo=c(async e=>{const t=Co(e),u=new Map,n=new Map;for(const r of t){if(!/[/\\]node_modules[/\\]/.test(r))continue;const s=await Ao(r,u);if(s){const o=`${s.name}@${s.version}`;n.has(o)||n.set(o,s)}}return[...n.values()]},"collectBundledDependencies"),wo=c(e=>{const t=[`## ${e.name}@${e.version}`];e.license&&t.push(`License: ${e.license}`);const u=new Set;e.author&&u.add(e.author);for(const n of e.contributors)u.add(n);if(u.size>0&&t.push(`By: ${[...u].join(", ")}`),e.repository&&t.push(`Repository: ${e.repository}`),e.licenseText){const n=e.licenseText.trim().replaceAll(/\r\n?/g,`
31
31
  `).split(`
32
32
  `).map(r=>`> ${r}`).join(`
33
33
  `);t.push("",n)}return t.join(`
34
- `)},"formatDependency"),wo=c(e=>{if(e.length===0)return`${bu}
34
+ `)},"formatDependency"),Bo=c(e=>{if(e.length===0)return`${bu}
35
35
 
36
- No bundled dependencies.`;const n=e.slice().sort((r,s)=>r.name!==s.name?r.name<s.name?-1:1:r.version<s.version?-1:r.version>s.version?1:0).map(bo).join(`
36
+ No bundled dependencies.`;const n=e.slice().sort((r,s)=>r.name!==s.name?r.name<s.name?-1:1:r.version<s.version?-1:r.version>s.version?1:0).map(wo).join(`
37
37
 
38
38
  ---------------------------------------
39
39
 
40
40
  `);return`${bu}
41
41
 
42
- ${n}`},"formatLicenseContent"),Bo=c(async(e,t)=>{const u=wo(t);if(!await Lt(e)){await ue.mkdir(b.dirname(e),{recursive:!0}),await ue.writeFile(e,u,"utf8"),console.log(`License file created: ${e}`);return}const n=await ue.readFile(e,"utf8"),r=go.exec(n);let s;r?s=n.slice(0,r.index)+u:s=`${n.trimEnd()}
42
+ ${n}`},"formatLicenseContent"),vo=c(async(e,t)=>{const u=Bo(t);if(!await Mt(e)){await ue.mkdir(b.dirname(e),{recursive:!0}),await ue.writeFile(e,u,"utf8"),console.log(`License file created: ${e}`);return}const n=await ue.readFile(e,"utf8"),r=Eo.exec(n);let s;r?s=n.slice(0,r.index)+u:s=`${n.trimEnd()}
43
43
 
44
- ${u}`,n!==s&&(await ue.writeFile(e,s,"utf8"),console.log(`License file updated: ${e}`))},"writeLicenseFile"),vo=c(e=>{const t=process.cwd();let u=!1;return{name:"pkgroll-license",async generateBundle(n,r){if(this.meta.watchMode||u)return;u=!0;const s=await Ao(r);let o;typeof e=="string"?o=b.resolve(t,e):o=await wu(t)??b.join(t,"LICENSE"),await Bo(o,s)}}},"licensePlugin"),$o=c((e,t,u,n,r,s)=>{const o=Object.fromEntries(e.env.map(({key:f,value:D})=>[`process.env.${f}`,JSON.stringify(D)])),i=Object.fromEntries(e.define.map(({key:f,value:D})=>[f,D])),a={target:e.target,sourcemap:e.sourcemap,tsconfigRaw:r?.config,define:{...o,...i}};return{input:{},preserveEntrySignatures:"strict",plugins:[Ht(),Un(e),...r?[hu(r)]:[],qu({entries:u}),Eu(),Do(),Au(t),io(),Kn(),Wu({extensions:[".mjs",".js",".ts",".jsx",".tsx",".json"],exportConditions:e.exportCondition}),to(),Gu(),ms(a),ho(),Uu({ignoreDynamicRequires:!0,extensions:[".js",".ts",".jsx",".tsx"],transformMixedEsModules:!0}),Ku({warnOnError:!0}),so(),oo(s),...e.minify?[Es(a)]:[],Cs(n),...e.license?[vo(e.license)]:[]],output:[]}},"getPkgConfig"),xo=c(async(e,t,u)=>{const[n,r]=await Promise.all([import("./rollup-plugin-dts-DncDc_Fp.mjs"),import("./local-typescript-loader-CSvrvK-x.mjs")]);return{input:{},preserveEntrySignatures:"strict",plugins:[Ht(),Eu(),Un(e),...u?[hu(u)]:[],Au(t,{skipUnlistedWarnings:!0,forTypes:!0}),Kn(),n.default({respectExternal:!0,compilerOptions:{composite:!1,preserveSymlinks:!1,module:r.default.ModuleKind.Preserve,moduleResolution:r.default.ModuleResolutionKind.Bundler},tsconfig:u?.path,sourcemap:!!(e.sourcemap||u?.config.compilerOptions?.declarationMap)})],output:[]}},"getDtsConfig"),Ro=c(e=>{if(e.length===0)return"";const t=e.map(s=>s.split("/")),u=t[0],n=Math.min(...t.map(s=>s.length)),r=[];for(let s=0;s<n;s+=1){const o=u[s];if(t.every(i=>i[s]===o))r.push(o);else break}return r.length===0?"/":r.join("/")||"/"},"getCommonPath"),So=c(async(e,t,u,n,r,s)=>{const o=Y(Ro(e.map(({dist:d})=>d)),!0);for(const d of e)d.distPrefix=d.dist.slice(o.length);const i=e;let a;const f=new Map;for(const d of t){const{sourcePath:l,srcExtension:m,distExtension:E,exportEntry:y}=d,$=d.srcdist,T=$.distPrefix+l.slice($.srcResolved.length,-m.length);if(d.inputNames=[T],y.format==="types"){a||(a=await xo(u,r,s)),a.input[T]||(a.input[T]=l);const B=a.output;if(B[E])B[E][je].inputNames.push(T);else{const R={dir:o,entryFileNames:`[name]${E}`,chunkFileNames:`${$.distPrefix}[name]-[hash]${E}`,exports:"auto",format:"esm",sourcemap:u.sourcemap||s?.config.compilerOptions?.declarationMap,[je]:d};B.push(R),B[E]=R}continue}const _=`${y.format}-${E}`;let g=f.get(_);if(!g){const B=i[0].dist;g=$o(u,r,n,t,s,B),f.set(_,g)}g.input[T]||(g.input[T]=l);const S=g.output;if(S[_])S[_][je].inputNames.push(T);else{const B={dir:o,exports:"auto",format:y.format,sourcemap:u.sourcemap,entryFileNames:`[name]${E}`,chunkFileNames:`${$.distPrefix}[name]-[hash]${E}`,[je]:d};S.push(B),S[_]=B}}const D=[...f.values()];return a&&D.push(a),D},"getRollupConfigs"),ko=c(e=>{if(!e)return Ms();const t=b.resolve(e),u=au(t);return{path:t,config:u}},"getTsconfig"),_o=c(async e=>{await ye(e)&&await Fe.promises.rm(e,{recursive:!0,force:!0})},"cleanDist"),Oo=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,To=new Set(["do","if","in","for","int","new","try","var","byte","case","char","else","enum","goto","long","null","this","true","void","with","break","catch","class","const","false","final","float","short","super","throw","while","delete","double","export","import","native","public","return","static","switch","throws","typeof","boolean","default","extends","finally","package","private","abstract","continue","debugger","function","volatile","interface","protected","transient","implements","instanceof","synchronized"]),jo=c(e=>!Oo.test(e)||To.has(e),"propertyNeedsQuotes"),Po=c(e=>e.map((t,u)=>typeof t=="number"?`[${t}]`:jo(t)?`[${JSON.stringify(t)}]`:u>0?`.${t}`:t).join(""),"prettyPath"),No=c(e=>({name:"filter-unnecessary-outputs",generateBundle:c((t,u)=>{const n=Object.keys(u).filter(o=>u[o].type==="chunk"),r=[];for(const o of n){const i=u[o];i.isEntry&&e.includes(i.name)&&r.push(o)}const s=new Set;for(;r.length>0;){const o=r.shift(),i=u[o];if(!i||s.has(o))continue;s.add(o);const a=[...i.imports,...i.dynamicImports];for(const f of a)r.push(f)}for(const o of n)s.has(o)||delete u[o]},"generateBundle")}),"filterUnnecessaryOutputs"),{stringify:vu}=JSON,$u=c(e=>{const[t,u]=e.split("=",2);return{key:t,value:u}},"keyValue"),ce=$n({name:"pkgroll",version:zr,flags:{input:{type:[ts],alias:"i",description:"Dist paths for source files to bundle (Only use if you cannot use package.json entries)"},src:{type:String,description:"Source directory (Deprecated, use `srcdist` instead)",default:"./src"},dist:{type:String,description:"Distribution directory (Deprecated, use `srcdist` instead)",default:"./dist"},srcdist:{type:[String],description:"Source and distribution folder pairs (eg. default `src:dist`)"},minify:{type:Boolean,description:"Minify output",alias:"m",default:!1},target:{type:[String],default:[`node${process.versions.node}`],description:"Environments to support. `target` in tsconfig.json is automatically added. Defaults to the current Node.js version.",alias:"t"},tsconfig:{type:String,description:"Custom tsconfig.json file path",alias:"p"},watch:{type:Boolean,description:"Watch mode",alias:"w",default:!1},env:{type:[$u],description:"Compile-time environment variables (eg. --env.NODE_ENV=production)"},define:{type:[$u],description:"Targeted strings to replace (eg. --define.process.env.NODE_ENV='production')"},exportCondition:{type:[String],description:"Export conditions for resolving dependency export and import maps (eg. --export-condition=node)"},sourcemap:{type:c(e=>{if(e==="")return!0;if(e==="inline")return e;throw new Error(`Invalid sourcemap option ${vu(e)}`)},"type"),description:"Sourcemap generation. Provide `inline` option for inline sourcemap (eg. --sourcemap, --sourcemap=inline)"},packagejson:{type:[String],description:"Filter package.json entry points by glob pattern on output path (eg. --packagejson='*.d.ts'). Use --packagejson=false to skip all."},cleanDist:{type:Boolean,description:"Clean dist before bundling",default:!1},license:{type:c(e=>e===""?!0:e,"type"),description:"Generate licenses for bundled dependencies. Optionally specify output path (eg. --license, --license=NOTICES.txt)"}},help:{description:"Minimalistic package bundler",render:c((e,t)=>(t.flagOperator=u=>u.name==="env"?".key=":" ",t.render(e)),"render")}}),Mt=process.cwd(),Ne=[];if(ce.flags.srcdist.length>0)for(const e of ce.flags.srcdist){const[t,u]=e.split(":",2);if(!t||!u)throw new Error(`Invalid src:dist pair ${vu(e)}. Expected format: src:dist`);Ne.push({src:Y(t,!0),srcResolved:Y(Fe.realpathSync.native(t),!0),dist:Y(u,!0)})}else Ne.push({src:Y(ce.flags.src,!0),srcResolved:Y(Fe.realpathSync.native(ce.flags.src),!0),dist:Y(ce.flags.dist,!0)});const xu=ko(ce.flags.tsconfig),Ru=xu?.config.compilerOptions?.target;Ru&&ce.flags.target.push(Ru);const Su=c(async()=>{const{packageJson:e}=await es(Mt),t=ce.flags.packagejson.length>0?ce.flags.packagejson:void 0,u=await hs(Ne,e,ce.flags.input,t);for(const r of u)if("error"in r){const{exportEntry:s}=r,o=typeof s.source=="string"?s.source:`${s.source.type}#${Po(s.source.path)}`;console.warn(`Warning (${o}):`,r.error)}const n=u.filter(r=>!("error"in r));if(n.length===0)throw new Error("No entry points found");return So(Ne,n,ce.flags,ns(e,Mt),e,xu)},"generateRollupConfigs");(async()=>{if(ce.flags.cleanDist&&await Promise.all(Ne.map(({dist:e})=>_o(e))),ce.flags.watch){xe("Watch initialized");let e=[];const t=c(async()=>{e=(await Su()).map(s=>{const o=Lu(s);return o.on("event",async i=>{if(i.code==="BUNDLE_START"){const a=Array.isArray(i.input)?i.input:Object.values(i.input);xe("Building",...a.map(Ke))}if(i.code==="BUNDLE_END")try{await Promise.all(s.output.map(f=>i.result.write(f)));const a=Array.isArray(i.input)?i.input:Object.values(i.input);xe("Built",...a.map(Ke))}finally{await i.result.close()}i.code==="ERROR"&&(xe("Error:",i.error.message),await i.result?.close())}),o})},"startWatchers"),u=c(async()=>{await Promise.all(e.map(r=>r.close())),e=[]},"closeWatchers");await t();let n;Fe.watch(b.join(Mt,"package.json"),()=>{clearTimeout(n),n=setTimeout(async()=>{xe("package.json changed, restarting...");try{await u(),await t()}catch(r){xe("Error:",r.message)}},100)})}else{const e=await Su();await Promise.all(e.map(async t=>{const u=await Iu(t);try{await Promise.all(t.output.map(n=>{const r=n[je].inputNames;return n.plugins=[No(r)],u.write(n)}))}finally{await u.close()}}))}})().catch(e=>{Mu(e),console.error("Error:",e instanceof Error?e.message:String(e)),process.exit(1)});export{Sn as g};
44
+ ${u}`,n!==s&&(await ue.writeFile(e,s,"utf8"),console.log(`License file updated: ${e}`))},"writeLicenseFile"),$o=c(e=>{const t=process.cwd();let u=!1;return{name:"pkgroll-license",async generateBundle(n,r){if(this.meta.watchMode||u)return;u=!0;const s=await bo(r);let o;typeof e=="string"?o=b.resolve(t,e):o=await wu(t)??b.join(t,"LICENSE"),await vo(o,s)}}},"licensePlugin"),xo=c((e,t,u,n,r,s)=>{const o=Object.fromEntries(e.env.map(({key:f,value:D})=>[`process.env.${f}`,JSON.stringify(D)])),i=Object.fromEntries(e.define.map(({key:f,value:D})=>[f,D])),a={target:e.target,sourcemap:e.sourcemap,tsconfigRaw:r?.config,define:{...o,...i}};return{input:{},preserveEntrySignatures:"strict",plugins:[Wt(),Gn(e),...r?[hu(r)]:[],qu({entries:u}),Eu(),fo(),Au(t),ao(),Kn(),Wu({extensions:[".mjs",".js",".ts",".jsx",".tsx",".json"],exportConditions:e.exportCondition}),no(),Gu(),gs(a),mo(),Uu({ignoreDynamicRequires:!0,extensions:[".js",".ts",".jsx",".tsx"],transformMixedEsModules:!0}),Ku({warnOnError:!0}),oo(),io(s),...e.minify?[Cs(a)]:[],ys(n),...e.license?[$o(e.license)]:[]],output:[]}},"getPkgConfig"),Ro=c(async(e,t,u)=>{const[n,r]=await Promise.all([import("./rollup-plugin-dts-DreVEcHT.mjs"),import("./local-typescript-loader-CSvrvK-x.mjs")]);return{input:{},preserveEntrySignatures:"strict",plugins:[Wt(),Eu(),Gn(e),...u?[hu(u)]:[],Au(t,{skipUnlistedWarnings:!0,forTypes:!0}),Kn(),n.default({respectExternal:!0,compilerOptions:{composite:!1,preserveSymlinks:!1,module:r.default.ModuleKind.Preserve,moduleResolution:r.default.ModuleResolutionKind.Bundler},tsconfig:u?.path,sourcemap:!!(e.sourcemap||u?.config.compilerOptions?.declarationMap)})],output:[]}},"getDtsConfig"),So=c(e=>{if(e.length===0)return"";const t=e.map(s=>s.split("/")),u=t[0],n=Math.min(...t.map(s=>s.length)),r=[];for(let s=0;s<n;s+=1){const o=u[s];if(t.every(i=>i[s]===o))r.push(o);else break}return r.length===0?"/":r.join("/")||"/"},"getCommonPath"),ko=c(async(e,t,u,n,r,s)=>{const o=Y(So(e.map(({dist:d})=>d)),!0);for(const d of e)d.distPrefix=d.dist.slice(o.length);const i=e;let a;const f=new Map;for(const d of t){const{sourcePath:l,srcExtension:m,distExtension:E,exportEntry:y}=d,$=d.srcdist,T=$.distPrefix+l.slice($.srcResolved.length,-m.length);if(d.inputNames=[T],y.format==="types"){a||(a=await Ro(u,r,s)),a.input[T]||(a.input[T]=l);const B=a.output;if(B[E])B[E][je].inputNames.push(T);else{const R={dir:o,entryFileNames:`[name]${E}`,chunkFileNames:`${$.distPrefix}[name]-[hash]${E}`,exports:"auto",format:"esm",sourcemap:u.sourcemap||s?.config.compilerOptions?.declarationMap,[je]:d};B.push(R),B[E]=R}continue}const _=`${y.format}-${E}`;let g=f.get(_);if(!g){const B=i[0].dist;g=xo(u,r,n,t,s,B),f.set(_,g)}g.input[T]||(g.input[T]=l);const S=g.output;if(S[_])S[_][je].inputNames.push(T);else{const B={dir:o,exports:"auto",format:y.format,sourcemap:u.sourcemap,entryFileNames:`[name]${E}`,chunkFileNames:`${$.distPrefix}[name]-[hash]${E}`,[je]:d};S.push(B),S[_]=B}}const D=[...f.values()];return a&&D.push(a),D},"getRollupConfigs"),_o=c(e=>{if(!e)return Hs();const t=b.resolve(e),u=au(t);return{path:t,config:u}},"getTsconfig"),Oo=c(async e=>{await ye(e)&&await Fe.promises.rm(e,{recursive:!0,force:!0})},"cleanDist"),To=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,jo=new Set(["do","if","in","for","int","new","try","var","byte","case","char","else","enum","goto","long","null","this","true","void","with","break","catch","class","const","false","final","float","short","super","throw","while","delete","double","export","import","native","public","return","static","switch","throws","typeof","boolean","default","extends","finally","package","private","abstract","continue","debugger","function","volatile","interface","protected","transient","implements","instanceof","synchronized"]),Po=c(e=>!To.test(e)||jo.has(e),"propertyNeedsQuotes"),No=c(e=>e.map((t,u)=>typeof t=="number"?`[${t}]`:Po(t)?`[${JSON.stringify(t)}]`:u>0?`.${t}`:t).join(""),"prettyPath"),Io=c(e=>({name:"filter-unnecessary-outputs",generateBundle:c((t,u)=>{const n=Object.keys(u).filter(o=>u[o].type==="chunk"),r=[];for(const o of n){const i=u[o];i.isEntry&&e.includes(i.name)&&r.push(o)}const s=new Set;for(;r.length>0;){const o=r.shift(),i=u[o];if(!i||s.has(o))continue;s.add(o);const a=[...i.imports,...i.dynamicImports];for(const f of a)r.push(f)}for(const o of n)s.has(o)||delete u[o]},"generateBundle")}),"filterUnnecessaryOutputs"),{stringify:vu}=JSON,$u=c(e=>{const[t,u]=e.split("=",2);return{key:t,value:u}},"keyValue"),ce=xn({name:"pkgroll",version:Xr.version,flags:{input:{type:[ns],alias:"i",description:"Dist paths for source files to bundle (Only use if you cannot use package.json entries)"},src:{type:String,description:"Source directory (Deprecated, use `srcdist` instead)",default:"./src"},dist:{type:String,description:"Distribution directory (Deprecated, use `srcdist` instead)",default:"./dist"},srcdist:{type:[String],description:"Source and distribution folder pairs (eg. default `src:dist`)"},minify:{type:Boolean,description:"Minify output",alias:"m",default:!1},target:{type:[String],default:[`node${process.versions.node}`],description:"Environments to support. `target` in tsconfig.json is automatically added. Defaults to the current Node.js version.",alias:"t"},tsconfig:{type:String,description:"Custom tsconfig.json file path",alias:"p"},watch:{type:Boolean,description:"Watch mode",alias:"w",default:!1},env:{type:[$u],description:"Compile-time environment variables (eg. --env.NODE_ENV=production)"},define:{type:[$u],description:"Targeted strings to replace (eg. --define.process.env.NODE_ENV='production')"},exportCondition:{type:[String],description:"Export conditions for resolving dependency export and import maps (eg. --export-condition=node)"},sourcemap:{type:c(e=>{if(e==="")return!0;if(e==="inline")return e;throw new Error(`Invalid sourcemap option ${vu(e)}`)},"type"),description:"Sourcemap generation. Provide `inline` option for inline sourcemap (eg. --sourcemap, --sourcemap=inline)"},packagejson:{type:[String],description:"Filter package.json entry points by glob pattern on output path (eg. --packagejson='*.d.ts'). Use --packagejson=false to skip all."},cleanDist:{type:Boolean,description:"Clean dist before bundling",default:!1},license:{type:c(e=>e===""?!0:e,"type"),description:"Generate licenses for bundled dependencies. Optionally specify output path (eg. --license, --license=NOTICES.txt)"}},help:{description:"Minimalistic package bundler",render:c((e,t)=>(t.flagOperator=u=>u.name==="env"?".key=":" ",t.render(e)),"render")}}),Ht=process.cwd(),Ne=[];if(ce.flags.srcdist.length>0)for(const e of ce.flags.srcdist){const[t,u]=e.split(":",2);if(!t||!u)throw new Error(`Invalid src:dist pair ${vu(e)}. Expected format: src:dist`);Ne.push({src:Y(t,!0),srcResolved:Y(Fe.realpathSync.native(t),!0),dist:Y(u,!0)})}else Ne.push({src:Y(ce.flags.src,!0),srcResolved:Y(Fe.realpathSync.native(ce.flags.src),!0),dist:Y(ce.flags.dist,!0)});const xu=_o(ce.flags.tsconfig),Ru=xu?.config.compilerOptions?.target;Ru&&ce.flags.target.push(Ru);const Su=c(async()=>{const{packageJson:e}=await ts(Ht),t=ce.flags.packagejson.length>0?ce.flags.packagejson:void 0,u=await ms(Ne,e,ce.flags.input,t);for(const r of u)if("error"in r){const{exportEntry:s}=r,o=typeof s.source=="string"?s.source:`${s.source.type}#${No(s.source.path)}`;console.warn(`Warning (${o}):`,r.error)}const n=u.filter(r=>!("error"in r));if(n.length===0)throw new Error("No entry points found");return ko(Ne,n,ce.flags,us(e,Ht),e,xu)},"generateRollupConfigs");(async()=>{if(ce.flags.cleanDist&&await Promise.all(Ne.map(({dist:e})=>Oo(e))),ce.flags.watch){xe("Watch initialized");let e=[];const t=c(async()=>{e=(await Su()).map(s=>{const o=Lu(s);return o.on("event",async i=>{if(i.code==="BUNDLE_START"){const a=Array.isArray(i.input)?i.input:Object.values(i.input);xe("Building",...a.map(Ke))}if(i.code==="BUNDLE_END")try{await Promise.all(s.output.map(f=>i.result.write(f)));const a=Array.isArray(i.input)?i.input:Object.values(i.input);xe("Built",...a.map(Ke))}finally{await i.result.close()}i.code==="ERROR"&&(xe("Error:",i.error.message),await i.result?.close())}),o})},"startWatchers"),u=c(async()=>{await Promise.all(e.map(r=>r.close())),e=[]},"closeWatchers");await t();let n;Fe.watch(b.join(Ht,"package.json"),()=>{clearTimeout(n),n=setTimeout(async()=>{xe("package.json changed, restarting...");try{await u(),await t()}catch(r){xe("Error:",r.message)}},100)})}else{const e=await Su();await Promise.all(e.map(async t=>{const u=await Iu(t);try{await Promise.all(t.output.map(n=>{const r=n[je].inputNames;return n.plugins=[Io(r)],u.write(n)}))}finally{await u.close()}}))}})().catch(e=>{Mu(e),console.error("Error:",e instanceof Error?e.message:String(e)),process.exit(1)});export{kn as g};
package/dist/cli.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import"node:fs";import"node:path";import"./cli-DfZhaCyT.mjs";import"rollup";import"rollup-plugin-import-trace";import"tty";import"node:fs/promises";import"yaml";import"node:path/posix";import"@rollup/plugin-node-resolve";import"@rollup/plugin-commonjs";import"@rollup/plugin-json";import"@rollup/plugin-alias";import"@rollup/plugin-dynamic-import-vars";import"esbuild";import"node:module";import"magic-string";import"fs";import"os";import"path";import"rollup-pluginutils";import"node:url";import"cjs-module-lexer";
2
+ import"node:fs";import"node:path";import"./cli-NQZo3LXa.mjs";import"rollup";import"rollup-plugin-import-trace";import"tty";import"node:fs/promises";import"yaml";import"node:path/posix";import"@rollup/plugin-node-resolve";import"@rollup/plugin-commonjs";import"@rollup/plugin-json";import"@rollup/plugin-alias";import"@rollup/plugin-dynamic-import-vars";import"esbuild";import"node:module";import"magic-string";import"fs";import"os";import"path";import"rollup-pluginutils";import"node:url";import"cjs-module-lexer";
@@ -1,4 +1,4 @@
1
- var Qe=Object.defineProperty;var c=(n,e)=>Qe(n,"name",{value:e,configurable:!0});import{createRequire as Ye}from"node:module";const Ze=Ye(import.meta.url);import*as T from"node:path";import i from"typescript";import{createRequire as et}from"node:module";import X from"magic-string";import le from"node:fs/promises";import{g as tt}from"./cli-DfZhaCyT.mjs";import"node:fs";import"tty";import"rollup";import"rollup-plugin-import-trace";import"yaml";import"node:path/posix";import"@rollup/plugin-node-resolve";import"@rollup/plugin-commonjs";import"@rollup/plugin-json";import"@rollup/plugin-alias";import"@rollup/plugin-dynamic-import-vars";import"esbuild";import"fs";import"os";import"path";import"rollup-pluginutils";import"node:url";import"cjs-module-lexer";var ue=44,nt=59,pe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fe=new Uint8Array(64),me=new Uint8Array(128);for(let n=0;n<pe.length;n++){const e=pe.charCodeAt(n);fe[n]=e,me[e]=n}function K(n,e){let t=0,r=0,s=0;do{const a=n.next();s=me[a],t|=(s&31)<<r,r+=5}while(s&32);const o=t&1;return t>>>=1,o&&(t=-2147483648|-t),e+t}c(K,"decodeInteger");function z(n,e,t){let r=e-t;r=r<0?-r<<1|1:r<<1;do{let s=r&31;r>>>=5,r>0&&(s|=32),n.write(fe[s])}while(r>0);return e}c(z,"encodeInteger");function de(n,e){return n.pos>=e?!1:n.peek()!==ue}c(de,"hasMoreVlq");var he=1024*16,ye=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(n){return Buffer.from(n.buffer,n.byteOffset,n.byteLength).toString()}}:{decode(n){let e="";for(let t=0;t<n.length;t++)e+=String.fromCharCode(n[t]);return e}},rt=class{static{c(this,"StringWriter")}constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(he)}write(n){const{buffer:e}=this;e[this.pos++]=n,this.pos===he&&(this.out+=ye.decode(e),this.pos=0)}flush(){const{buffer:n,out:e,pos:t}=this;return t>0?e+ye.decode(n.subarray(0,t)):e}},st=class{static{c(this,"StringReader")}constructor(n){this.pos=0,this.buffer=n}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(n){const{buffer:e,pos:t}=this,r=e.indexOf(n,t);return r===-1?e.length:r}};function Q(n){const{length:e}=n,t=new st(n),r=[];let s=0,o=0,a=0,u=0,m=0;do{const p=t.indexOf(";"),d=[];let h=!0,l=0;for(s=0;t.pos<p;){let y;s=K(t,s),s<l&&(h=!1),l=s,de(t,p)?(o=K(t,o),a=K(t,a),u=K(t,u),de(t,p)?(m=K(t,m),y=[s,o,a,u,m]):y=[s,o,a,u]):y=[s],d.push(y),t.pos++}h||it(d),r.push(d),t.pos=p+1}while(t.pos<=e);return r}c(Q,"decode");function it(n){n.sort(ot)}c(it,"sort");function ot(n,e){return n[0]-e[0]}c(ot,"sortComparator$1");function ge(n){const e=new rt;let t=0,r=0,s=0,o=0;for(let a=0;a<n.length;a++){const u=n[a];if(a>0&&e.write(nt),u.length===0)continue;let m=0;for(let p=0;p<u.length;p++){const d=u[p];p>0&&e.write(ue),m=z(e,d[0],m),d.length!==1&&(t=z(e,d[1],t),r=z(e,d[2],r),s=z(e,d[3],s),d.length!==4&&(o=z(e,d[4],o)))}}return e.flush()}c(ge,"encode");const at=/^[\w+.-]+:\/\//,ct=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,lt=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function ut(n){return at.test(n)}c(ut,"isAbsoluteUrl");function pt(n){return n.startsWith("//")}c(pt,"isSchemeRelativeUrl");function xe(n){return n.startsWith("/")}c(xe,"isAbsolutePath");function ft(n){return n.startsWith("file:")}c(ft,"isFileUrl");function Se(n){return/^[.?#]/.test(n)}c(Se,"isRelative");function q(n){const e=ct.exec(n);return ve(e[1],e[2]||"",e[3],e[4]||"",e[5]||"/",e[6]||"",e[7]||"")}c(q,"parseAbsoluteUrl");function mt(n){const e=lt.exec(n),t=e[2];return ve("file:","",e[1]||"","",xe(t)?t:"/"+t,e[3]||"",e[4]||"")}c(mt,"parseFileUrl");function ve(n,e,t,r,s,o,a){return{scheme:n,user:e,host:t,port:r,path:s,query:o,hash:a,type:7}}c(ve,"makeUrl");function Ee(n){if(pt(n)){const t=q("http:"+n);return t.scheme="",t.type=6,t}if(xe(n)){const t=q("http://foo.com"+n);return t.scheme="",t.host="",t.type=5,t}if(ft(n))return mt(n);if(ut(n))return q(n);const e=q("http://foo.com/"+n);return e.scheme="",e.host="",e.type=n?n.startsWith("?")?3:n.startsWith("#")?2:4:1,e}c(Ee,"parseUrl");function dt(n){if(n.endsWith("/.."))return n;const e=n.lastIndexOf("/");return n.slice(0,e+1)}c(dt,"stripPathFilename");function ht(n,e){Te(e,e.type),n.path==="/"?n.path=e.path:n.path=dt(e.path)+n.path}c(ht,"mergePaths");function Te(n,e){const t=e<=4,r=n.path.split("/");let s=1,o=0,a=!1;for(let m=1;m<r.length;m++){const p=r[m];if(!p){a=!0;continue}if(a=!1,p!=="."){if(p===".."){o?(a=!0,o--,s--):t&&(r[s++]=p);continue}r[s++]=p,o++}}let u="";for(let m=1;m<s;m++)u+="/"+r[m];(!u||a&&!u.endsWith("/.."))&&(u+="/"),n.path=u}c(Te,"normalizePath");function yt(n,e){if(!n&&!e)return"";const t=Ee(n);let r=t.type;if(e&&r!==7){const o=Ee(e),a=o.type;switch(r){case 1:t.hash=o.hash;case 2:t.query=o.query;case 3:case 4:ht(t,o);case 5:t.user=o.user,t.host=o.host,t.port=o.port;case 6:t.scheme=o.scheme}a>r&&(r=a)}Te(t,r);const s=t.query+t.hash;switch(r){case 2:case 3:return s;case 4:{const o=t.path.slice(1);return o?Se(e||n)&&!Se(o)?"./"+o+s:o+s:s||"."}case 5:return t.path+s;default:return t.scheme+"//"+t.user+t.host+t.port+t.path+s}}c(yt,"resolve");function gt(n){if(!n)return"";const e=n.lastIndexOf("/");return n.slice(0,e+1)}c(gt,"stripFilename");function xt(n,e){const t=gt(n),r=e?e+"/":"";return s=>yt(r+(s||""),t)}c(xt,"resolver");var k=0;function St(n,e){const t=Ne(n,0);if(t===n.length)return n;e||(n=n.slice());for(let r=t;r<n.length;r=Ne(n,r+1))n[r]=Et(n[r],e);return n}c(St,"maybeSort");function Ne(n,e){for(let t=e;t<n.length;t++)if(!vt(n[t]))return t;return n.length}c(Ne,"nextUnsortedSegmentLine");function vt(n){for(let e=1;e<n.length;e++)if(n[e][k]<n[e-1][k])return!1;return!0}c(vt,"isSorted");function Et(n,e){return e||(n=n.slice()),n.sort(Tt)}c(Et,"sortSegments");function Tt(n,e){return n[k]-e[k]}c(Tt,"sortComparator");var H=!1;function Nt(n,e,t,r){for(;t<=r;){const s=t+(r-t>>1),o=n[s][k]-e;if(o===0)return H=!0,s;o<0?t=s+1:r=s-1}return H=!1,t-1}c(Nt,"binarySearch");function Ct(n,e,t){for(let r=t-1;r>=0&&n[r][k]===e;t=r--);return t}c(Ct,"lowerBound");function wt(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}c(wt,"memoizedState");function Dt(n,e,t,r){const{lastKey:s,lastNeedle:o,lastIndex:a}=t;let u=0,m=n.length-1;if(r===s){if(e===o)return H=a!==-1&&n[a][k]===e,a;e>=o?u=a===-1?0:a:m=a}return t.lastKey=r,t.lastNeedle=e,t.lastIndex=Nt(n,e,u,m)}c(Dt,"memoizedBinarySearch");function bt(n){return typeof n=="string"?JSON.parse(n):n}c(bt,"parse$1");var Ce=class{static{c(this,"TraceMap")}constructor(n,e){const t=typeof n=="string";if(!t&&n._decodedMemo)return n;const r=bt(n),{version:s,file:o,names:a,sourceRoot:u,sources:m,sourcesContent:p}=r;this.version=s,this.file=o,this.names=a||[],this.sourceRoot=u,this.sources=m,this.sourcesContent=p,this.ignoreList=r.ignoreList||r.x_google_ignoreList||void 0;const d=xt(e,u);this.resolvedSources=m.map(d);const{mappings:h}=r;if(typeof h=="string")this._encoded=h,this._decoded=void 0;else if(Array.isArray(h))this._encoded=void 0,this._decoded=St(h,t);else throw r.sections?new Error("TraceMap passed sectioned source map, please use FlattenMap export instead"):new Error(`invalid source map: ${JSON.stringify(r)}`);this._decodedMemo=wt(),this._bySources=void 0,this._bySourceMemos=void 0}};function er(n){return n}c(er,"cast$1");function we(n){var e;return(e=n)._decoded||(e._decoded=Q(n._encoded))}c(we,"decodedMappings");function It(n,e,t){const r=we(n);if(e>=r.length)return null;const s=r[e],o=Mt(s,n._decodedMemo,e,t);return o===-1?null:s[o]}c(It,"traceSegment");function Mt(n,e,t,r,s){let o=Dt(n,r,e,t);return H&&(o=Ct(n,r,o)),o===-1||o===n.length?-1:o}c(Mt,"traceSegmentInternal");var Y=class{static{c(this,"SetArray")}constructor(){this._indexes={__proto__:null},this.array=[]}};function tr(n){return n}c(tr,"cast");function De(n,e){return n._indexes[e]}c(De,"get");function V(n,e){const t=De(n,e);if(t!==void 0)return t;const{array:r,_indexes:s}=n,o=r.push(e);return s[e]=o-1}c(V,"put");function Ft(n,e){const t=De(n,e);if(t===void 0)return;const{array:r,_indexes:s}=n;for(let o=t+1;o<r.length;o++){const a=r[o];r[o-1]=a,s[a]--}s[e]=void 0,r.pop()}c(Ft,"remove");var Ot=0,Rt=1,At=2,Lt=3,Pt=4,be=-1,_t=class{static{c(this,"GenMapping")}constructor({file:n,sourceRoot:e}={}){this._names=new Y,this._sources=new Y,this._sourcesContent=[],this._mappings=[],this.file=n,this.sourceRoot=e,this._ignoreList=new Y}};function nr(n){return n}c(nr,"cast2");var $t=c((n,e,t,r,s,o,a,u)=>Ut(!0,n,e,t,r,s,o,a),"maybeAddSegment");function Bt(n,e,t){const{_sources:r,_sourcesContent:s}=n,o=V(r,e);s[o]=t}c(Bt,"setSourceContent");function kt(n,e,t=!0){const{_sources:r,_sourcesContent:s,_ignoreList:o}=n,a=V(r,e);a===s.length&&(s[a]=null),t?V(o,a):Ft(o,a)}c(kt,"setIgnore");function Ie(n){const{_mappings:e,_sources:t,_sourcesContent:r,_names:s,_ignoreList:o}=n;return Vt(e),{version:3,file:n.file||void 0,names:s.array,sourceRoot:n.sourceRoot||void 0,sources:t.array,sourcesContent:r,mappings:e,ignoreList:o.array}}c(Ie,"toDecodedMap");function jt(n){const e=Ie(n);return Object.assign({},e,{mappings:ge(e.mappings)})}c(jt,"toEncodedMap");function Ut(n,e,t,r,s,o,a,u,m){const{_mappings:p,_sources:d,_sourcesContent:h,_names:l}=e,y=Kt(p,t),x=zt(y,r);if(!s)return Jt(y,x)?void 0:Me(y,x,[r]);const S=V(d,s),E=u?V(l,u):be;if(S===h.length&&(h[S]=null),!Wt(y,x,S,o,a,E))return Me(y,x,u?[r,S,o,a,E]:[r,S,o,a])}c(Ut,"addSegmentInternal");function Kt(n,e){for(let t=n.length;t<=e;t++)n[t]=[];return n[e]}c(Kt,"getIndex");function zt(n,e){let t=n.length;for(let r=t-1;r>=0;t=r--){const s=n[r];if(e>=s[Ot])break}return t}c(zt,"getColumnIndex");function Me(n,e,t){for(let r=n.length;r>e;r--)n[r]=n[r-1];n[e]=t}c(Me,"insert");function Vt(n){const{length:e}=n;let t=e;for(let r=t-1;r>=0&&!(n[r].length>0);t=r,r--);t<e&&(n.length=t)}c(Vt,"removeEmptyFinalLines");function Jt(n,e){return e===0?!0:n[e-1].length===1}c(Jt,"skipSourceless");function Wt(n,e,t,r,s,o){if(e===0)return!1;const a=n[e-1];return a.length===1?!1:t===a[Rt]&&r===a[At]&&s===a[Lt]&&o===(a.length===5?a[Pt]:be)}c(Wt,"skipSource");var Fe=Oe("",-1,-1,"",null,!1),Gt=[];function Oe(n,e,t,r,s,o){return{source:n,line:e,column:t,name:r,content:s,ignore:o}}c(Oe,"SegmentObject");function Re(n,e,t,r,s){return{map:n,sources:e,source:t,content:r,ignore:s}}c(Re,"Source");function Ae(n,e){return Re(n,e,"",null,!1)}c(Ae,"MapSource");function qt(n,e,t){return Re(null,Gt,n,e,t)}c(qt,"OriginalSource");function Ht(n){const e=new _t({file:n.map.file}),{sources:t,map:r}=n,s=r.names,o=we(r);for(let a=0;a<o.length;a++){const u=o[a];for(let m=0;m<u.length;m++){const p=u[m],d=p[0];let h=Fe;if(p.length!==1){const D=t[p[1]];if(h=Le(D,p[2],p[3],p.length===5?s[p[4]]:""),h==null)continue}const{column:l,line:y,name:x,content:S,source:E,ignore:N}=h;$t(e,a,d,E,y,l,x),E&&S!=null&&Bt(e,E,S),N&&kt(e,E,!0)}}return e}c(Ht,"traceMappings");function Le(n,e,t,r){if(!n.map)return Oe(n.source,e,t,r,n.content,n.ignore);const s=It(n.map,e,t);return s==null?null:s.length===1?Fe:Le(n.sources[s[1]],s[2],s[3],s.length===5?n.map.names[s[4]]:r)}c(Le,"originalPositionFor");function Xt(n){return Array.isArray(n)?n:[n]}c(Xt,"asArray");function Qt(n,e){const t=Xt(n).map(o=>new Ce(o,"")),r=t.pop();for(let o=0;o<t.length;o++)if(t[o].sources.length>1)throw new Error(`Transformation map ${o} must have exactly one source file.
1
+ var Qe=Object.defineProperty;var c=(n,e)=>Qe(n,"name",{value:e,configurable:!0});import{createRequire as Ye}from"node:module";const Ze=Ye(import.meta.url);import*as T from"node:path";import i from"typescript";import{createRequire as et}from"node:module";import X from"magic-string";import le from"node:fs/promises";import{g as tt}from"./cli-NQZo3LXa.mjs";import"node:fs";import"tty";import"rollup";import"rollup-plugin-import-trace";import"yaml";import"node:path/posix";import"@rollup/plugin-node-resolve";import"@rollup/plugin-commonjs";import"@rollup/plugin-json";import"@rollup/plugin-alias";import"@rollup/plugin-dynamic-import-vars";import"esbuild";import"fs";import"os";import"path";import"rollup-pluginutils";import"node:url";import"cjs-module-lexer";var ue=44,nt=59,pe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fe=new Uint8Array(64),me=new Uint8Array(128);for(let n=0;n<pe.length;n++){const e=pe.charCodeAt(n);fe[n]=e,me[e]=n}function K(n,e){let t=0,r=0,s=0;do{const a=n.next();s=me[a],t|=(s&31)<<r,r+=5}while(s&32);const o=t&1;return t>>>=1,o&&(t=-2147483648|-t),e+t}c(K,"decodeInteger");function z(n,e,t){let r=e-t;r=r<0?-r<<1|1:r<<1;do{let s=r&31;r>>>=5,r>0&&(s|=32),n.write(fe[s])}while(r>0);return e}c(z,"encodeInteger");function de(n,e){return n.pos>=e?!1:n.peek()!==ue}c(de,"hasMoreVlq");var he=1024*16,ye=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(n){return Buffer.from(n.buffer,n.byteOffset,n.byteLength).toString()}}:{decode(n){let e="";for(let t=0;t<n.length;t++)e+=String.fromCharCode(n[t]);return e}},rt=class{static{c(this,"StringWriter")}constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(he)}write(n){const{buffer:e}=this;e[this.pos++]=n,this.pos===he&&(this.out+=ye.decode(e),this.pos=0)}flush(){const{buffer:n,out:e,pos:t}=this;return t>0?e+ye.decode(n.subarray(0,t)):e}},st=class{static{c(this,"StringReader")}constructor(n){this.pos=0,this.buffer=n}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(n){const{buffer:e,pos:t}=this,r=e.indexOf(n,t);return r===-1?e.length:r}};function Q(n){const{length:e}=n,t=new st(n),r=[];let s=0,o=0,a=0,u=0,m=0;do{const p=t.indexOf(";"),d=[];let h=!0,l=0;for(s=0;t.pos<p;){let y;s=K(t,s),s<l&&(h=!1),l=s,de(t,p)?(o=K(t,o),a=K(t,a),u=K(t,u),de(t,p)?(m=K(t,m),y=[s,o,a,u,m]):y=[s,o,a,u]):y=[s],d.push(y),t.pos++}h||it(d),r.push(d),t.pos=p+1}while(t.pos<=e);return r}c(Q,"decode");function it(n){n.sort(ot)}c(it,"sort");function ot(n,e){return n[0]-e[0]}c(ot,"sortComparator$1");function ge(n){const e=new rt;let t=0,r=0,s=0,o=0;for(let a=0;a<n.length;a++){const u=n[a];if(a>0&&e.write(nt),u.length===0)continue;let m=0;for(let p=0;p<u.length;p++){const d=u[p];p>0&&e.write(ue),m=z(e,d[0],m),d.length!==1&&(t=z(e,d[1],t),r=z(e,d[2],r),s=z(e,d[3],s),d.length!==4&&(o=z(e,d[4],o)))}}return e.flush()}c(ge,"encode");const at=/^[\w+.-]+:\/\//,ct=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,lt=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function ut(n){return at.test(n)}c(ut,"isAbsoluteUrl");function pt(n){return n.startsWith("//")}c(pt,"isSchemeRelativeUrl");function xe(n){return n.startsWith("/")}c(xe,"isAbsolutePath");function ft(n){return n.startsWith("file:")}c(ft,"isFileUrl");function Se(n){return/^[.?#]/.test(n)}c(Se,"isRelative");function q(n){const e=ct.exec(n);return ve(e[1],e[2]||"",e[3],e[4]||"",e[5]||"/",e[6]||"",e[7]||"")}c(q,"parseAbsoluteUrl");function mt(n){const e=lt.exec(n),t=e[2];return ve("file:","",e[1]||"","",xe(t)?t:"/"+t,e[3]||"",e[4]||"")}c(mt,"parseFileUrl");function ve(n,e,t,r,s,o,a){return{scheme:n,user:e,host:t,port:r,path:s,query:o,hash:a,type:7}}c(ve,"makeUrl");function Ee(n){if(pt(n)){const t=q("http:"+n);return t.scheme="",t.type=6,t}if(xe(n)){const t=q("http://foo.com"+n);return t.scheme="",t.host="",t.type=5,t}if(ft(n))return mt(n);if(ut(n))return q(n);const e=q("http://foo.com/"+n);return e.scheme="",e.host="",e.type=n?n.startsWith("?")?3:n.startsWith("#")?2:4:1,e}c(Ee,"parseUrl");function dt(n){if(n.endsWith("/.."))return n;const e=n.lastIndexOf("/");return n.slice(0,e+1)}c(dt,"stripPathFilename");function ht(n,e){Te(e,e.type),n.path==="/"?n.path=e.path:n.path=dt(e.path)+n.path}c(ht,"mergePaths");function Te(n,e){const t=e<=4,r=n.path.split("/");let s=1,o=0,a=!1;for(let m=1;m<r.length;m++){const p=r[m];if(!p){a=!0;continue}if(a=!1,p!=="."){if(p===".."){o?(a=!0,o--,s--):t&&(r[s++]=p);continue}r[s++]=p,o++}}let u="";for(let m=1;m<s;m++)u+="/"+r[m];(!u||a&&!u.endsWith("/.."))&&(u+="/"),n.path=u}c(Te,"normalizePath");function yt(n,e){if(!n&&!e)return"";const t=Ee(n);let r=t.type;if(e&&r!==7){const o=Ee(e),a=o.type;switch(r){case 1:t.hash=o.hash;case 2:t.query=o.query;case 3:case 4:ht(t,o);case 5:t.user=o.user,t.host=o.host,t.port=o.port;case 6:t.scheme=o.scheme}a>r&&(r=a)}Te(t,r);const s=t.query+t.hash;switch(r){case 2:case 3:return s;case 4:{const o=t.path.slice(1);return o?Se(e||n)&&!Se(o)?"./"+o+s:o+s:s||"."}case 5:return t.path+s;default:return t.scheme+"//"+t.user+t.host+t.port+t.path+s}}c(yt,"resolve");function gt(n){if(!n)return"";const e=n.lastIndexOf("/");return n.slice(0,e+1)}c(gt,"stripFilename");function xt(n,e){const t=gt(n),r=e?e+"/":"";return s=>yt(r+(s||""),t)}c(xt,"resolver");var k=0;function St(n,e){const t=Ne(n,0);if(t===n.length)return n;e||(n=n.slice());for(let r=t;r<n.length;r=Ne(n,r+1))n[r]=Et(n[r],e);return n}c(St,"maybeSort");function Ne(n,e){for(let t=e;t<n.length;t++)if(!vt(n[t]))return t;return n.length}c(Ne,"nextUnsortedSegmentLine");function vt(n){for(let e=1;e<n.length;e++)if(n[e][k]<n[e-1][k])return!1;return!0}c(vt,"isSorted");function Et(n,e){return e||(n=n.slice()),n.sort(Tt)}c(Et,"sortSegments");function Tt(n,e){return n[k]-e[k]}c(Tt,"sortComparator");var H=!1;function Nt(n,e,t,r){for(;t<=r;){const s=t+(r-t>>1),o=n[s][k]-e;if(o===0)return H=!0,s;o<0?t=s+1:r=s-1}return H=!1,t-1}c(Nt,"binarySearch");function Ct(n,e,t){for(let r=t-1;r>=0&&n[r][k]===e;t=r--);return t}c(Ct,"lowerBound");function wt(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}c(wt,"memoizedState");function Dt(n,e,t,r){const{lastKey:s,lastNeedle:o,lastIndex:a}=t;let u=0,m=n.length-1;if(r===s){if(e===o)return H=a!==-1&&n[a][k]===e,a;e>=o?u=a===-1?0:a:m=a}return t.lastKey=r,t.lastNeedle=e,t.lastIndex=Nt(n,e,u,m)}c(Dt,"memoizedBinarySearch");function bt(n){return typeof n=="string"?JSON.parse(n):n}c(bt,"parse$1");var Ce=class{static{c(this,"TraceMap")}constructor(n,e){const t=typeof n=="string";if(!t&&n._decodedMemo)return n;const r=bt(n),{version:s,file:o,names:a,sourceRoot:u,sources:m,sourcesContent:p}=r;this.version=s,this.file=o,this.names=a||[],this.sourceRoot=u,this.sources=m,this.sourcesContent=p,this.ignoreList=r.ignoreList||r.x_google_ignoreList||void 0;const d=xt(e,u);this.resolvedSources=m.map(d);const{mappings:h}=r;if(typeof h=="string")this._encoded=h,this._decoded=void 0;else if(Array.isArray(h))this._encoded=void 0,this._decoded=St(h,t);else throw r.sections?new Error("TraceMap passed sectioned source map, please use FlattenMap export instead"):new Error(`invalid source map: ${JSON.stringify(r)}`);this._decodedMemo=wt(),this._bySources=void 0,this._bySourceMemos=void 0}};function er(n){return n}c(er,"cast$1");function we(n){var e;return(e=n)._decoded||(e._decoded=Q(n._encoded))}c(we,"decodedMappings");function It(n,e,t){const r=we(n);if(e>=r.length)return null;const s=r[e],o=Mt(s,n._decodedMemo,e,t);return o===-1?null:s[o]}c(It,"traceSegment");function Mt(n,e,t,r,s){let o=Dt(n,r,e,t);return H&&(o=Ct(n,r,o)),o===-1||o===n.length?-1:o}c(Mt,"traceSegmentInternal");var Y=class{static{c(this,"SetArray")}constructor(){this._indexes={__proto__:null},this.array=[]}};function tr(n){return n}c(tr,"cast");function De(n,e){return n._indexes[e]}c(De,"get");function V(n,e){const t=De(n,e);if(t!==void 0)return t;const{array:r,_indexes:s}=n,o=r.push(e);return s[e]=o-1}c(V,"put");function Ft(n,e){const t=De(n,e);if(t===void 0)return;const{array:r,_indexes:s}=n;for(let o=t+1;o<r.length;o++){const a=r[o];r[o-1]=a,s[a]--}s[e]=void 0,r.pop()}c(Ft,"remove");var Ot=0,Rt=1,At=2,Lt=3,Pt=4,be=-1,_t=class{static{c(this,"GenMapping")}constructor({file:n,sourceRoot:e}={}){this._names=new Y,this._sources=new Y,this._sourcesContent=[],this._mappings=[],this.file=n,this.sourceRoot=e,this._ignoreList=new Y}};function nr(n){return n}c(nr,"cast2");var $t=c((n,e,t,r,s,o,a,u)=>Ut(!0,n,e,t,r,s,o,a),"maybeAddSegment");function Bt(n,e,t){const{_sources:r,_sourcesContent:s}=n,o=V(r,e);s[o]=t}c(Bt,"setSourceContent");function kt(n,e,t=!0){const{_sources:r,_sourcesContent:s,_ignoreList:o}=n,a=V(r,e);a===s.length&&(s[a]=null),t?V(o,a):Ft(o,a)}c(kt,"setIgnore");function Ie(n){const{_mappings:e,_sources:t,_sourcesContent:r,_names:s,_ignoreList:o}=n;return Vt(e),{version:3,file:n.file||void 0,names:s.array,sourceRoot:n.sourceRoot||void 0,sources:t.array,sourcesContent:r,mappings:e,ignoreList:o.array}}c(Ie,"toDecodedMap");function jt(n){const e=Ie(n);return Object.assign({},e,{mappings:ge(e.mappings)})}c(jt,"toEncodedMap");function Ut(n,e,t,r,s,o,a,u,m){const{_mappings:p,_sources:d,_sourcesContent:h,_names:l}=e,y=Kt(p,t),x=zt(y,r);if(!s)return Jt(y,x)?void 0:Me(y,x,[r]);const S=V(d,s),E=u?V(l,u):be;if(S===h.length&&(h[S]=null),!Wt(y,x,S,o,a,E))return Me(y,x,u?[r,S,o,a,E]:[r,S,o,a])}c(Ut,"addSegmentInternal");function Kt(n,e){for(let t=n.length;t<=e;t++)n[t]=[];return n[e]}c(Kt,"getIndex");function zt(n,e){let t=n.length;for(let r=t-1;r>=0;t=r--){const s=n[r];if(e>=s[Ot])break}return t}c(zt,"getColumnIndex");function Me(n,e,t){for(let r=n.length;r>e;r--)n[r]=n[r-1];n[e]=t}c(Me,"insert");function Vt(n){const{length:e}=n;let t=e;for(let r=t-1;r>=0&&!(n[r].length>0);t=r,r--);t<e&&(n.length=t)}c(Vt,"removeEmptyFinalLines");function Jt(n,e){return e===0?!0:n[e-1].length===1}c(Jt,"skipSourceless");function Wt(n,e,t,r,s,o){if(e===0)return!1;const a=n[e-1];return a.length===1?!1:t===a[Rt]&&r===a[At]&&s===a[Lt]&&o===(a.length===5?a[Pt]:be)}c(Wt,"skipSource");var Fe=Oe("",-1,-1,"",null,!1),Gt=[];function Oe(n,e,t,r,s,o){return{source:n,line:e,column:t,name:r,content:s,ignore:o}}c(Oe,"SegmentObject");function Re(n,e,t,r,s){return{map:n,sources:e,source:t,content:r,ignore:s}}c(Re,"Source");function Ae(n,e){return Re(n,e,"",null,!1)}c(Ae,"MapSource");function qt(n,e,t){return Re(null,Gt,n,e,t)}c(qt,"OriginalSource");function Ht(n){const e=new _t({file:n.map.file}),{sources:t,map:r}=n,s=r.names,o=we(r);for(let a=0;a<o.length;a++){const u=o[a];for(let m=0;m<u.length;m++){const p=u[m],d=p[0];let h=Fe;if(p.length!==1){const D=t[p[1]];if(h=Le(D,p[2],p[3],p.length===5?s[p[4]]:""),h==null)continue}const{column:l,line:y,name:x,content:S,source:E,ignore:N}=h;$t(e,a,d,E,y,l,x),E&&S!=null&&Bt(e,E,S),N&&kt(e,E,!0)}}return e}c(Ht,"traceMappings");function Le(n,e,t,r){if(!n.map)return Oe(n.source,e,t,r,n.content,n.ignore);const s=It(n.map,e,t);return s==null?null:s.length===1?Fe:Le(n.sources[s[1]],s[2],s[3],s.length===5?n.map.names[s[4]]:r)}c(Le,"originalPositionFor");function Xt(n){return Array.isArray(n)?n:[n]}c(Xt,"asArray");function Qt(n,e){const t=Xt(n).map(o=>new Ce(o,"")),r=t.pop();for(let o=0;o<t.length;o++)if(t[o].sources.length>1)throw new Error(`Transformation map ${o} must have exactly one source file.
2
2
  Did you specify these with the most recent transformation maps first?`);let s=Pe(r,e,"",0);for(let o=t.length-1;o>=0;o--)s=Ae(t[o],[s]);return s}c(Qt,"buildSourceMapTree");function Pe(n,e,t,r){const{resolvedSources:s,sourcesContent:o,ignoreList:a}=n,u=r+1,m=s.map((p,d)=>{const h={importer:t,depth:u,source:p||"",content:void 0,ignore:void 0},l=e(h.source,h),{source:y}=h;if(l)return Pe(new Ce(l,y),e,y,u);const x=o?o[d]:null,S=a?a.includes(d):!1;return qt(y,x,S)});return Ae(n,m)}c(Pe,"build");var Yt=class{static{c(this,"SourceMap")}constructor(n,e){const t=e.decodedMappings?Ie(n):jt(n);this.version=t.version,this.file=t.file,this.mappings=t.mappings,this.names=t.names,this.ignoreList=t.ignoreList,this.sourceRoot=t.sourceRoot,this.sources=t.sources,e.excludeContent||(this.sourcesContent=t.sourcesContent)}toString(){return JSON.stringify(this)}};function Zt(n,e,t){const r={excludeContent:!1,decodedMappings:!1},s=Qt(n,e);return new Yt(Ht(s),r)}c(Zt,"remapping");var Z={},_e;function en(){return _e||(_e=1,(function(n){Object.defineProperty(n,"commentRegex",{get:c(function(){return/^\s*?\/[\/\*][@#]\s+?sourceMappingURL=data:(((?:application|text)\/json)(?:;charset=([^;,]+?)?)?)?(?:;(base64))?,(.*?)$/mg},"getCommentRegex")}),Object.defineProperty(n,"mapFileCommentRegex",{get:c(function(){return/(?:\/\/[@#][ \t]+?sourceMappingURL=([^\s'"`]+?)[ \t]*?$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*?(?:\*\/){1}[ \t]*?$)/mg},"getMapFileCommentRegex")});var e;typeof Buffer<"u"?typeof Buffer.from=="function"?e=t:e=r:e=s;function t(l){return Buffer.from(l,"base64").toString()}c(t,"decodeBase64WithBufferFrom");function r(l){if(typeof value=="number")throw new TypeError("The value to decode must not be of type number.");return new Buffer(l,"base64").toString()}c(r,"decodeBase64WithNewBuffer");function s(l){return decodeURIComponent(escape(atob(l)))}c(s,"decodeBase64WithAtob");function o(l){return l.split(",").pop()}c(o,"stripComment");function a(l,y){var x=n.mapFileCommentRegex.exec(l),S=x[1]||x[2];try{var l=y(S);return l!=null&&typeof l.catch=="function"?l.catch(E):l}catch(N){E(N)}function E(N){throw new Error("An error occurred while trying to read the map file at "+S+`
3
3
  `+N.stack)}c(E,"throwError")}c(a,"readFromFileMap");function u(l,y){y=y||{},y.hasComment&&(l=o(l)),y.encoding==="base64"?l=e(l):y.encoding==="uri"&&(l=decodeURIComponent(l)),(y.isJSON||y.encoding)&&(l=JSON.parse(l)),this.sourcemap=l}c(u,"Converter"),u.prototype.toJSON=function(l){return JSON.stringify(this.sourcemap,null,l)},typeof Buffer<"u"?typeof Buffer.from=="function"?u.prototype.toBase64=m:u.prototype.toBase64=p:u.prototype.toBase64=d;function m(){var l=this.toJSON();return Buffer.from(l,"utf8").toString("base64")}c(m,"encodeBase64WithBufferFrom");function p(){var l=this.toJSON();if(typeof l=="number")throw new TypeError("The json to encode must not be of type number.");return new Buffer(l,"utf8").toString("base64")}c(p,"encodeBase64WithNewBuffer");function d(){var l=this.toJSON();return btoa(unescape(encodeURIComponent(l)))}c(d,"encodeBase64WithBtoa"),u.prototype.toURI=function(){var l=this.toJSON();return encodeURIComponent(l)},u.prototype.toComment=function(l){var y,x,S;return l!=null&&l.encoding==="uri"?(y="",x=this.toURI()):(y=";base64",x=this.toBase64()),S="sourceMappingURL=data:application/json;charset=utf-8"+y+","+x,l!=null&&l.multiline?"/*# "+S+" */":"//# "+S},u.prototype.toObject=function(){return JSON.parse(this.toJSON())},u.prototype.addProperty=function(l,y){if(this.sourcemap.hasOwnProperty(l))throw new Error('property "'+l+'" already exists on the sourcemap, use set property instead');return this.setProperty(l,y)},u.prototype.setProperty=function(l,y){return this.sourcemap[l]=y,this},u.prototype.getProperty=function(l){return this.sourcemap[l]},n.fromObject=function(l){return new u(l)},n.fromJSON=function(l){return new u(l,{isJSON:!0})},n.fromURI=function(l){return new u(l,{encoding:"uri"})},n.fromBase64=function(l){return new u(l,{encoding:"base64"})},n.fromComment=function(l){var y,x;return l=l.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),y=n.commentRegex.exec(l),x=y&&y[4]||"uri",new u(l,{encoding:x,hasComment:!0})};function h(l){return new u(l,{isJSON:!0})}c(h,"makeConverter"),n.fromMapFileComment=function(l,y){if(typeof y=="string")throw new Error("String directory paths are no longer supported with `fromMapFileComment`\nPlease review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading");var x=a(l,y);return x!=null&&typeof x.then=="function"?x.then(h):h(x)},n.fromSource=function(l){var y=l.match(n.commentRegex);return y?n.fromComment(y.pop()):null},n.fromMapFileSource=function(l,y){if(typeof y=="string")throw new Error("String directory paths are no longer supported with `fromMapFileSource`\nPlease review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading");var x=l.match(n.mapFileCommentRegex);return x?n.fromMapFileComment(x.pop(),y):null},n.removeComments=function(l){return l.replace(n.commentRegex,"")},n.removeMapFileComments=function(l){return l.replace(n.mapFileCommentRegex,"")},n.generateMapFileComment=function(l,y){var x="sourceMappingURL="+l;return y&&y.multiline?"/*# "+x+" */":"//# "+x}})(Z)),Z}c(en,"requireConvertSourceMap");var tn=en(),$e=tt(tn);function nn(n){return{...n,compilerOptions:n.compilerOptions??{},respectExternal:n.respectExternal??!1,includeExternal:n.includeExternal??[],sourcemap:n.sourcemap??!1}}c(nn,"resolveDefaultOptions");const j=/\.d\.(c|m)?tsx?$/,ee=/\.json$/,Be=/((\.d)?\.(c|m)?(t|j)sx?|\.json)$/;function te(n){return n.replace(Be,"")}c(te,"trimExtension");function ke(n){return n.replace(Be,".d.ts")}c(ke,"getDeclarationId");function J(n,e){return i.createSourceFile(n,e,i.ScriptTarget.Latest,!0)}c(J,"parse");const ne={getCurrentDirectory:c(()=>i.sys.getCurrentDirectory(),"getCurrentDirectory"),getNewLine:c(()=>i.sys.newLine,"getNewLine"),getCanonicalFileName:i.sys.useCaseSensitiveFileNames?n=>n:n=>n.toLowerCase()},rn={declaration:!0,noEmit:!1,emitDeclarationOnly:!0,noEmitOnError:!0,checkJs:!1,declarationMap:!1,skipLibCheck:!0,preserveSymlinks:!0,target:i.ScriptTarget.ESNext,resolveJsonModule:!0},W=new Map,U=c((...n)=>process.env.DTS_LOG_CACHE?console.log("[cache]",...n):null,"logCache");function je([n,e],t){for(U(n),W.set(n,t);n!==e&&n!==T.dirname(n);){if(n=T.dirname(n),U("up",n),W.has(n))return U("has",n);W.set(n,t)}}c(je,"cacheConfig");function re(n,e,t,r){const s={...rn,...e,...r===!0&&{declarationMap:!0}};let o=T.dirname(n),a=[];const u=t||o;if(W.has(u))U("HIT",u);else{U("miss",u);const h=t?T.resolve(process.cwd(),t):i.findConfigFile(o,i.sys.fileExists);if(!h)return{dtsFiles:a,dirName:o,compilerOptions:s};const l=o;o=T.dirname(h);const{config:y,error:x}=i.readConfigFile(h,i.sys.readFile);if(x)return console.error(i.formatDiagnostic(x,ne)),{dtsFiles:a,dirName:o,compilerOptions:s};U("tsconfig",y);const S=i.parseJsonConfigFileContent(y,i.sys,o);je(t?[t,t]:[l,o],S)}const{fileNames:m,options:p,errors:d}=W.get(u);return a=m.filter(h=>j.test(h)),d.length?(console.error(i.formatDiagnostics(d,ne)),{dtsFiles:a,dirName:o,compilerOptions:s}):{dtsFiles:a,dirName:o,compilerOptions:{...p,...s}}}c(re,"getCompilerOptions");function sn(n,e,t,r){const{dtsFiles:s,compilerOptions:o}=re(n,e,t,r);return i.createProgram([n].concat(Array.from(s)),o,i.createCompilerHost(o,!0))}c(sn,"createProgram$1");function on(n,e,t,r){const s=[],o=new Set;let a=[],u="",m={};for(let p of n){if(j.test(p))continue;p=T.resolve(p);const d=re(p,e,t,r);if(d.dtsFiles.forEach(o.add,o),!a.length){a.push(p),{dirName:u,compilerOptions:m}=d;continue}if(d.dirName===u)a.push(p);else{const h=i.createCompilerHost(m,!0),l=i.createProgram(a.concat(Array.from(o)),m,h);s.push(l),a=[p],{dirName:u,compilerOptions:m}=d}}if(a.length){const p=i.createCompilerHost(m,!0),d=i.createProgram(a.concat(Array.from(o)),m,p);s.push(d)}return s}c(on,"createPrograms");function an(){let n;try{return{codeFrameColumns:n}=Ze("@babel/code-frame"),n}catch{try{return{codeFrameColumns:n}=et(import.meta.url)("@babel/code-frame"),n}catch{}}}c(an,"getCodeFrame");function cn(n){const e=n.getSourceFile(),t=e.getLineAndCharacterOfPosition(n.getStart()),r=e.getLineAndCharacterOfPosition(n.getEnd());return{start:{line:t.line+1,column:t.character+1},end:{line:r.line+1,column:r.character+1}}}c(cn,"getLocation");function ln(n){const e=an(),r=n.getSourceFile().getFullText(),s=cn(n);return e?`
4
4
  `+e(r,s,{highlightCode:!0}):`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pkgroll",
3
- "version": "2.26.0",
3
+ "version": "2.26.1",
4
4
  "description": "Zero-config rollup bundler",
5
5
  "keywords": [
6
6
  "zero config",