@visulima/vis 4.1.11 → 4.1.12

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 +1 @@
1
- import{a as r,x as o,d as i,r as n,i as s}from"../packem_shared/vis-user-error-C8HBoCLE.js";import{e as t}from"../packem_shared/index-CXY06Bwa.js";import{g as d}from"../packem_shared/package-version-CuJee7dB.js";const g=async()=>{const e=r("vis",{packageName:"vis",packageVersion:d()}),a=process.argv.includes("--debug")||!!process.env.DEBUG;e.addPlugin(o({concise:s,detailed:a,exitOnError:!1})),e.addGlobalOption({description:"Target JS runtime: node (default) or bun. Overrides VIS_RUNTIME; falls back to lockfile detection.",name:"runtime",type:String}),e.addCommand(t),e.addCommand(i),await n(e)};export{g as runExecCli};
1
+ import{a as r,x as o,d as i,r as n,i as s}from"../packem_shared/vis-user-error-Um2Qg_C1.js";import{e as t}from"../packem_shared/index-AZByDAgr.js";import{g as d}from"../packem_shared/package-version-BdIBhdr7.js";const g=async()=>{const e=r("vis",{packageName:"vis",packageVersion:d()}),a=process.argv.includes("--debug")||!!process.env.DEBUG;e.addPlugin(o({concise:s,detailed:a,exitOnError:!1})),e.addGlobalOption({description:"Target JS runtime: node (default) or bun. Overrides VIS_RUNTIME; falls back to lockfile detection.",name:"runtime",type:String}),e.addCommand(t),e.addCommand(i),await n(e)};export{g as runExecCli};
@@ -1,4 +1,4 @@
1
- import{createRequire as Nf}from"node:module";import{n as Lf,b as R,d as _f,a as Ff,x as Vf,r as Hf,i as Wf}from"../packem_shared/vis-user-error-C8HBoCLE.js";import{k as xl,e as m,h as lr,m as rt,z as J,v as no,l as Nt,a as cs,b as Uf,U as pn}from"../packem_shared/index-DHD8wb6Z.js";import{N as $l,p as de}from"../packem_shared/readJsonSync-CbryXYxN-B2aSeDpC.js";import{u as S,y,X as V,m as O,S as Gf,U as ta,V as Ee,W as zf,Y as Jf,Z as Ge,_ as qf,$ as Kf,a0 as Yf,a1 as Xf,a2 as Zf,a3 as Qf,a4 as eh,a5 as th,z as El,F as Xe,d as nh,a6 as sh,j as na,i as ih,x as rh,p as dr,D as sa,R as oh,c as ah,h as ch,a7 as ur,a8 as pr,a9 as lh,aa as dh}from"./catalog.js";import{parseStacktrace as uh}from"@visulima/error/stacktrace";import{i as ht}from"../packem_shared/index-BjdW45xX.js";import{y as x}from"../packem_shared/isAccessibleSync-DYKTrrvc-CSnBISfV.js";import{U as ye,h as bt}from"../packem_shared/writeFileSync-DJoHk3Ks-CgQ-VNNT.js";import{findVisConfigFile as Ht,loadVisConfig as ra}from"./CONFIG_FILES.js";import{S as vh}from"../packem_shared/index-BisalDCf.js";import{T as bh}from"../packem_shared/target-merge-B4No-LHM.js";import{s as wh}from"../packem_shared/bin-CITyBwBM.js";import{X as $i,j as Le,b as Bn,q as tt,F as an,T as kh,t as ri,J as Sh}from"../packem_shared/index.server-sXNQYpsl.js";import{s as hr}from"../packem_shared/index-B4AjSxHU.js";import{g as Us}from"../packem_shared/package-version-CuJee7dB.js";import{l as wt,k as oa,ad as Ch,ae as Al,g as Rh,d as kt,af as gr,ag as Oh,$ as Kn,c as Hn,ah as Il}from"../packem_shared/formatBytes-BHAzNIrn-Bkk_uRS-.js";import{d as aa}from"../packem_shared/pm-runner-d93_73O6.js";import{m as jh}from"./ts-loader.js";import{getMainWorktreeRoot as Th,Cache as Gs,readLastRunSummary as Bl,getLastRunSummaryPath as mr,parseCacheSize as Ah,digestFile as Pl}from"@visulima/task-runner";import{e as Fh}from"../packem_shared/index-CXY06Bwa.js";let Df;const Mf=e=>(Df??=Nf(import.meta.url))(e),xn=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ce=e=>{if(typeof xn<"u"&&xn.versions&&xn.versions.node){const[t,n]=xn.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return xn.getBuiltinModule(e)}return Mf(e)},{createRequire:De}=Ce("node:module"),{spawnSync:ct,execSync:Cl,execFileSync:ph,execFile:fh}=Ce("node:child_process"),{writeFileSync:ce,existsSync:fr,renameSync:Rl,readFileSync:Ol,readdirSync:be,statSync:Dt,rmSync:fn,copyFileSync:hh,unlinkSync:vt,mkdirSync:gh,cpSync:mh,watch:yh}=Ce("node:fs"),{dirname:jl,delimiter:ia,resolve:Ws}=Ce("node:path"),{createInterface:Tl}=Ce("node:readline"),{homedir:xh,platform:$h,tmpdir:Eh}=Ce("node:os"),{readFile:Nl,readdir:ls,stat:yn,realpath:ca,rm:so,mkdtemp:Ih,mkdir:Bh}=Ce("node:fs/promises"),{isIP:Ph}=Ce("node:net"),{createServer:Nh,STATUS_CODES:Dh}=Ce("node:http"),{Http2ServerRequest:lt,constants:Mh}=Ce("node:http2"),{Readable:la}=Ce("node:stream"),{randomUUID:Lh}=Ce("node:crypto"),{fileURLToPath:_h}=Ce("node:url"),Vh=["pnpm-lock.yaml","package-lock.json","npm-shrinkwrap.json","yarn.lock","bun.lock","bun.lockb"];let Hh;const Wh=e=>(Hh??=De(import.meta.url))(e),$n=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Dl=e=>{if(typeof $n<"u"&&$n.versions&&$n.versions.node){const[t,n]=$n.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return $n.getBuiltinModule(e)}return Wh(e)},{execFileSync:Uh}=Dl("node:child_process"),{existsSync:da,readFileSync:Gh}=Dl("node:fs"),zh=[...Vh],ua=new Set(["bun","npm","pnpm","yarn"]),Ml=e=>{const t=$l(Gh(e,"utf8"));return typeof t?.packageManager=="string"?t.packageManager:void 0},Jh=e=>{let t;if(zh.forEach(s=>{!t&&da(m(e,s))&&(t=m(e,s))}),t)return t;const n=m(e,"package.json");if(da(n)&&Ml(n)!==void 0)return n},qh=e=>{if(!e)throw new lr("Could not find a package manager");if(e.endsWith("package.json")){const t=Ml(e);if(t){const n=["npm","yarn","pnpm","bun"].find(s=>t.startsWith(s));if(n)return{packageManager:n,path:rt(e)}}}if(e.endsWith("yarn.lock"))return{packageManager:"yarn",path:rt(e)};if(e.endsWith("package-lock.json")||e.endsWith("npm-shrinkwrap.json"))return{packageManager:"npm",path:rt(e)};if(e.endsWith("pnpm-lock.yaml"))return{packageManager:"pnpm",path:rt(e)};if(e.endsWith("bun.lock")||e.endsWith("bun.lockb"))return{packageManager:"bun",path:rt(e)};throw new lr("Could not find a package manager")},Kh=e=>{const t=xl(Jh,{...e&&{cwd:e}});return qh(t)},y4=e=>{if(!ua.has(e))throw new Error(`Unsupported package manager "${e}". Expected one of: ${[...ua].join(", ")}.`);return Uh(e,["--version"]).toString("utf8").trim()};let Yh;const Xh=e=>(Yh??=De(import.meta.url))(e),En=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Zh=e=>{if(typeof En<"u"&&En.versions&&En.versions.node){const[t,n]=En.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return En.getBuiltinModule(e)}return Xh(e)},{existsSync:pa,readFileSync:Qh}=Zh("node:fs"),eg=e=>{let t;try{t=$l(e)}catch{return!1}if(!t||typeof t!="object"||Array.isArray(t))return!1;const{workspaces:n}=t;return typeof n=="object"&&n!==null},Ll=e=>{const t=xl(["lerna.json","turbo.json"],{type:"file",...e&&{cwd:e}});if(t?.endsWith("lerna.json")){const s=de(t);if(s&&typeof s=="object"&&!Array.isArray(s)){const i=s;if(i.useWorkspaces||i.packages)return{path:rt(t),strategy:"lerna"}}}const n=t?.endsWith("turbo.json");try{const{packageManager:s,path:i}=Kh(e);if(["npm","yarn"].includes(s)){const r=m(i,"package.json");if(pa(r)){const o=Qh(m(i,"package.json"),"utf8");if(eg(o))return{path:i,strategy:n?"turbo":s}}}else if(s==="pnpm"){const r=m(i,"pnpm-workspace.yaml");if(pa(r))return{path:i,strategy:n?"turbo":"pnpm"}}}catch(s){if(!(s instanceof lr))throw s}throw new Error(`No monorepo root could be found upwards from the directory ${String(e??process.cwd())} using lerna, yarn, pnpm, or npm as indicators.`)};function _l(e,t,n,s){let i,r,o;r=n,o=s;const a=vh(t,r,o??i);ye(e,a,i)}const G=(e,t)=>async()=>({default:(await e())[t]}),tg=new Set(["--cwd"]),ng=new Set(["--help","--version","-h","-V"]),sg=e=>{const t=[];for(let n=0;n<e.length;n+=1){const s=e[n];if(s!==void 0){if(ng.has(s))return!1;if(s.startsWith("-")){const i=s.indexOf("="),r=i===-1?s:s.slice(0,i);if(tg.has(r)&&i===-1){const o=e[n+1];o!==void 0&&!o.startsWith("-")&&(n+=1)}continue}t.push(s)}}return t.length===1&&t[0]==="migrate"},ig=e=>{if(e.length===0)return!1;for(const t of e){const n=t.codePointAt(0)??0;return!(n<=127||n<=255)}return!1};let rg=class{buffer="";timer;onFlush;timeout;constructor({onFlush:t,timeout:n}){this.onFlush=t,this.timeout=n}add(t){this.buffer+=t,this.timer!==void 0&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.flush()},this.timeout)}flush(){if(this.timer!==void 0&&(clearTimeout(this.timer),this.timer=void 0),this.buffer.length>0){const t=this.buffer;this.buffer="",this.onFlush(t)}}destroy(){this.timer!==void 0&&(clearTimeout(this.timer),this.timer=void 0),this.buffer=""}};const og={disambiguateEscapeCodes:1,reportAllKeysAsEscapeCodes:8,reportAlternateKeys:4,reportAssociatedText:16,reportEventTypes:2};function fa(e){let t=0;for(const n of e)t|=og[n];return t}const Ze={alt:2,capsLock:64,ctrl:4,hyper:16,meta:32,numLock:128,shift:1,super:8},ag="\x1B",ue="\x1B[",cg=";",ha=`${ue}?1049h`,ga=`${ue}?1049l`,Fl=typeof globalThis<"u"&&typeof globalThis.window=="object"&&globalThis.window.document!==void 0,lg=/^(?:msys|cygwin)$/,Vl=process,yr=Vl?.env??{};!Fl&&yr.TERM_PROGRAM;const dg=!Fl&&(Vl?.platform==="win32"||yr.OSTYPE!==void 0&&lg.test(yr.OSTYPE)),ug=(e=1)=>`${ue}${String(e)}B`,Yn=`${ue}?25l`,pg=`${ue}G`,fg=(e=1)=>`${ue}${String(e)}G`,hg=(e=1)=>`${ue}${String(e)}E`,Xn=`${ue}?25h`,oi=(e,t)=>t===void 0?fg(e+1):`${ue}${String(t+1)}${cg}${String(e+1)}H`,zs=(e=1)=>`${ue}${String(e)}A`;var gg=(e=>(e[e.Default=0]="Default",e[e.BlinkingBlock=1]="BlinkingBlock",e[e.SteadyBlock=2]="SteadyBlock",e[e.BlinkingUnderline=3]="BlinkingUnderline",e[e.SteadyUnderline=4]="SteadyUnderline",e[e.BlinkingBar=5]="BlinkingBar",e[e.SteadyBar=6]="SteadyBar",e))(gg||{});const mg=e=>`${ue}${String(e)} q`;var cn=(e=>(e[e.ToEnd=0]="ToEnd",e[e.ToBeginning=1]="ToBeginning",e[e.EntireScreen=2]="EntireScreen",e[e.EntireScreenAndScrollback=3]="EntireScreenAndScrollback",e))(cn||{});const Wn=e=>{const t=e>=0&&e<=3?e:0;return`${ue}${t===0?"":String(t)}J`};var Hl=(e=>(e[e.ToEnd=0]="ToEnd",e[e.ToBeginning=1]="ToBeginning",e[e.EntireLine=2]="EntireLine",e))(Hl||{});const io=e=>{const t=e>=0&&e<=2?e:0;return`${ue}${t===0?"":String(t)}K`},yg=io(2),vg=io(0),Zn=e=>{if(e<=0)return"";let t="";for(let n=0;n<e;n+=1)t+=yg,n<e-1&&(t+=zs());return t+=pg,t};oi(0,0)+Wn(cn.ToEnd);`${io(Hl.EntireLine)}${ue}`;const bg=`${ue}H${Wn(cn.EntireScreen)}`;dg?`${Wn(cn.EntireScreen)}${ue}`:`${Wn(cn.EntireScreen)}${Wn(cn.EntireScreenAndScrollback)}${ue}${ag}`;let wg=class{code;isDecMode=!0;constructor(t){this.code=t}};const Wl=(e,...t)=>{if(t.length===0)return"";const n=e?"l":"h";if(t.length===1){const o=t[0];let a=ue;return o.isDecMode&&(a+="?"),a+String(o.code)+n}const s=t.filter(o=>!o.isDecMode).map(o=>o.code),i=t.filter(o=>o.isDecMode).map(o=>o.code);let r="";return s.length>0&&(r+=`${ue}${s.join(";")}${n}`),i.length>0&&(r+=`${ue}?${i.join(";")}${n}`),r};var kg=(e=>(e[e.NotRecognized=0]="NotRecognized",e[e.Set=1]="Set",e[e.Reset=2]="Reset",e[e.PermanentlySet=3]="PermanentlySet",e[e.PermanentlyReset=4]="PermanentlyReset",e))(kg||{});const Ul=e=>new wg(e),Gl=(...e)=>Wl(!1,...e),zl=(...e)=>Wl(!0,...e),Jl=Ul(2004),Sg={aliceblue:"f0f8ff",antiquewhite:"faebd7",antiquewhite1:"ffefdb",antiquewhite2:"eedfcc",antiquewhite3:"cdc0b0",antiquewhite4:"8b8378",aqua:"00ffff",aquamarine:"7fffd4",aquamarine1:"7fffd4",aquamarine2:"76eec6",aquamarine3:"66cdaa",aquamarine4:"458b74",azure:"f0ffff",azure1:"f0ffff",azure2:"e0eeee",azure3:"c1cdcd",azure4:"838b8b",beige:"f5f5dc",bisque:"ffe4c4",bisque1:"ffe4c4",bisque2:"eed5b7",bisque3:"cdb79e",bisque4:"8b7d6b",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blue1:"0000ff",blue2:"0000ee",blue3:"0000cd",blue4:"00008b",blueviolet:"8a2be2",brown:"a52a2a",brown1:"ff4040",brown2:"ee3b3b",brown3:"cd3333",brown4:"8b2323",burlywood:"deb887",burlywood1:"ffd39b",burlywood2:"eec591",burlywood3:"cdaa7d",burlywood4:"8b7355",cadetblue:"5f9ea0",cadetblue1:"98f5ff",cadetblue2:"8ee5ee",cadetblue3:"7ac5cd",cadetblue4:"53868b",chartreuse:"7fff00",chartreuse1:"7fff00",chartreuse2:"76ee00",chartreuse3:"66cd00",chartreuse4:"458b00",chocolate:"d2691e",chocolate1:"ff7f24",chocolate2:"ee7621",chocolate3:"cd661d",chocolate4:"8b4513",coral:"ff7f50",coral1:"ff7256",coral2:"ee6a50",coral3:"cd5b45",coral4:"8b3e2f",cornflowerblue:"6495ed",cornsilk:"fff8dc",cornsilk1:"fff8dc",cornsilk2:"eee8cd",cornsilk3:"cdc8b1",cornsilk4:"8b8878",crimson:"dc143c",cyan:"00ffff",cyan1:"00ffff",cyan2:"00eeee",cyan3:"00cdcd",cyan4:"008b8b",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgoldenrod1:"ffb90f",darkgoldenrod2:"eead0e",darkgoldenrod3:"cd950c",darkgoldenrod4:"8b6508",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkolivegreen1:"caff70",darkolivegreen2:"bcee68",darkolivegreen3:"a2cd5a",darkolivegreen4:"6e8b3d",darkorange:"ff8c00",darkorange1:"ff7f00",darkorange2:"ee7600",darkorange3:"cd6600",darkorange4:"8b4500",darkorchid:"9932cc",darkorchid1:"bf3eff",darkorchid2:"b23aee",darkorchid3:"9a32cd",darkorchid4:"68228b",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkseagreen1:"c1ffc1",darkseagreen2:"b4eeb4",darkseagreen3:"9bcd9b",darkseagreen4:"698b69",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategray1:"97ffff",darkslategray2:"8deeee",darkslategray3:"79cdcd",darkslategray4:"528b8b",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deeppink1:"ff1493",deeppink2:"ee1289",deeppink3:"cd1076",deeppink4:"8b0a50",deepskyblue:"00bfff",deepskyblue1:"00bfff",deepskyblue2:"00b2ee",deepskyblue3:"009acd",deepskyblue4:"00688b",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",dodgerblue1:"1e90ff",dodgerblue2:"1c86ee",dodgerblue3:"1874cd",dodgerblue4:"104e8b",firebrick:"b22222",firebrick1:"ff3030",firebrick2:"ee2c2c",firebrick3:"cd2626",firebrick4:"8b1a1a",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",gold1:"ffd700",gold2:"eec900",gold3:"cdad00",gold4:"8b7500",goldenrod:"daa520",goldenrod1:"ffc125",goldenrod2:"eeb422",goldenrod3:"cd9b1d",goldenrod4:"8b6914",gray:"bebebe",gray0:"000000",gray1:"030303",gray2:"050505",gray3:"080808",gray4:"0a0a0a",gray5:"0d0d0d",gray6:"0f0f0f",gray7:"121212",gray8:"141414",gray9:"171717",gray10:"1a1a1a",gray11:"1c1c1c",gray12:"1f1f1f",gray13:"212121",gray14:"242424",gray15:"262626",gray16:"292929",gray17:"2b2b2b",gray18:"2e2e2e",gray19:"303030",gray20:"333333",gray21:"363636",gray22:"383838",gray23:"3b3b3b",gray24:"3d3d3d",gray25:"404040",gray26:"424242",gray27:"454545",gray28:"474747",gray29:"4a4a4a",gray30:"4d4d4d",gray31:"4f4f4f",gray32:"525252",gray33:"545454",gray34:"575757",gray35:"595959",gray36:"5c5c5c",gray37:"5e5e5e",gray38:"616161",gray39:"636363",gray40:"666666",gray41:"696969",gray42:"6b6b6b",gray43:"6e6e6e",gray44:"707070",gray45:"737373",gray46:"757575",gray47:"787878",gray48:"7a7a7a",gray49:"7d7d7d",gray50:"7f7f7f",gray51:"828282",gray52:"858585",gray53:"878787",gray54:"8a8a8a",gray55:"8c8c8c",gray56:"8f8f8f",gray57:"919191",gray58:"949494",gray59:"969696",gray60:"999999",gray61:"9c9c9c",gray62:"9e9e9e",gray63:"a1a1a1",gray64:"a3a3a3",gray65:"a6a6a6",gray66:"a8a8a8",gray67:"ababab",gray68:"adadad",gray69:"b0b0b0",gray70:"b3b3b3",gray71:"b5b5b5",gray72:"b8b8b8",gray73:"bababa",gray74:"bdbdbd",gray75:"bfbfbf",gray76:"c2c2c2",gray77:"c4c4c4",gray78:"c7c7c7",gray79:"c9c9c9",gray80:"cccccc",gray81:"cfcfcf",gray82:"d1d1d1",gray83:"d4d4d4",gray84:"d6d6d6",gray85:"d9d9d9",gray86:"dbdbdb",gray87:"dedede",gray88:"e0e0e0",gray89:"e3e3e3",gray90:"e5e5e5",gray91:"e8e8e8",gray92:"ebebeb",gray93:"ededed",gray94:"f0f0f0",gray95:"f2f2f2",gray96:"f5f5f5",gray97:"f7f7f7",gray98:"fafafa",gray99:"fcfcfc",gray100:"ffffff",green:"00ff00",green1:"00ff00",green2:"00ee00",green3:"00cd00",green4:"008b00",greenyellow:"adff2f",grey:"bebebe",grey0:"000000",grey1:"030303",grey2:"050505",grey3:"080808",grey4:"0a0a0a",grey5:"0d0d0d",grey6:"0f0f0f",grey7:"121212",grey8:"141414",grey9:"171717",grey10:"1a1a1a",grey11:"1c1c1c",grey12:"1f1f1f",grey13:"212121",grey14:"242424",grey15:"262626",grey16:"292929",grey17:"2b2b2b",grey18:"2e2e2e",grey19:"303030",grey20:"333333",grey21:"363636",grey22:"383838",grey23:"3b3b3b",grey24:"3d3d3d",grey25:"404040",grey26:"424242",grey27:"454545",grey28:"474747",grey29:"4a4a4a",grey30:"4d4d4d",grey31:"4f4f4f",grey32:"525252",grey33:"545454",grey34:"575757",grey35:"595959",grey36:"5c5c5c",grey37:"5e5e5e",grey38:"616161",grey39:"636363",grey40:"666666",grey41:"696969",grey42:"6b6b6b",grey43:"6e6e6e",grey44:"707070",grey45:"737373",grey46:"757575",grey47:"787878",grey48:"7a7a7a",grey49:"7d7d7d",grey50:"7f7f7f",grey51:"828282",grey52:"858585",grey53:"878787",grey54:"8a8a8a",grey55:"8c8c8c",grey56:"8f8f8f",grey57:"919191",grey58:"949494",grey59:"969696",grey60:"999999",grey61:"9c9c9c",grey62:"9e9e9e",grey63:"a1a1a1",grey64:"a3a3a3",grey65:"a6a6a6",grey66:"a8a8a8",grey67:"ababab",grey68:"adadad",grey69:"b0b0b0",grey70:"b3b3b3",grey71:"b5b5b5",grey72:"b8b8b8",grey73:"bababa",grey74:"bdbdbd",grey75:"bfbfbf",grey76:"c2c2c2",grey77:"c4c4c4",grey78:"c7c7c7",grey79:"c9c9c9",grey80:"cccccc",grey81:"cfcfcf",grey82:"d1d1d1",grey83:"d4d4d4",grey84:"d6d6d6",grey85:"d9d9d9",grey86:"dbdbdb",grey87:"dedede",grey88:"e0e0e0",grey89:"e3e3e3",grey90:"e5e5e5",grey91:"e8e8e8",grey92:"ebebeb",grey93:"ededed",grey94:"f0f0f0",grey95:"f2f2f2",grey96:"f5f5f5",grey97:"f7f7f7",grey98:"fafafa",grey99:"fcfcfc",grey100:"ffffff",honeydew:"f0fff0",honeydew1:"f0fff0",honeydew2:"e0eee0",honeydew3:"c1cdc1",honeydew4:"838b83",hotpink:"ff69b4",hotpink1:"ff6eb4",hotpink2:"ee6aa7",hotpink3:"cd6090",hotpink4:"8b3a62",indianred:"cd5c5c",indianred1:"ff6a6a",indianred2:"ee6363",indianred3:"cd5555",indianred4:"8b3a3a",indigo:"4b0082",ivory:"fffff0",ivory1:"fffff0",ivory2:"eeeee0",ivory3:"cdcdc1",ivory4:"8b8b83",khaki:"f0e68c",khaki1:"fff68f",khaki2:"eee685",khaki3:"cdc673",khaki4:"8b864e",lavender:"e6e6fa",lavenderblush:"fff0f5",lavenderblush1:"fff0f5",lavenderblush2:"eee0e5",lavenderblush3:"cdc1c5",lavenderblush4:"8b8386",lawngreen:"7cfc00",lemonchiffon:"fffacd",lemonchiffon1:"fffacd",lemonchiffon2:"eee9bf",lemonchiffon3:"cdc9a5",lemonchiffon4:"8b8970",lightblue:"add8e6",lightblue1:"bfefff",lightblue2:"b2dfee",lightblue3:"9ac0cd",lightblue4:"68838b",lightcoral:"f08080",lightcyan:"e0ffff",lightcyan1:"e0ffff",lightcyan2:"d1eeee",lightcyan3:"b4cdcd",lightcyan4:"7a8b8b",lightgoldenrod:"eedd82",lightgoldenrod1:"ffec8b",lightgoldenrod2:"eedc82",lightgoldenrod3:"cdbe70",lightgoldenrod4:"8b814c",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightpink1:"ffaeb9",lightpink2:"eea2ad",lightpink3:"cd8c95",lightpink4:"8b5f65",lightsalmon:"ffa07a",lightsalmon1:"ffa07a",lightsalmon2:"ee9572",lightsalmon3:"cd8162",lightsalmon4:"8b5742",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightskyblue1:"b0e2ff",lightskyblue2:"a4d3ee",lightskyblue3:"8db6cd",lightskyblue4:"607b8b",lightslateblue:"8470ff",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightsteelblue1:"cae1ff",lightsteelblue2:"bcd2ee",lightsteelblue3:"a2b5cd",lightsteelblue4:"6e7b8b",lightyellow:"ffffe0",lightyellow1:"ffffe0",lightyellow2:"eeeed1",lightyellow3:"cdcdb4",lightyellow4:"8b8b7a",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",magenta1:"ff00ff",magenta2:"ee00ee",magenta3:"cd00cd",magenta4:"8b008b",maroon:"b03060",maroon1:"ff34b3",maroon2:"ee30a7",maroon3:"cd2990",maroon4:"8b1c62",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumorchid1:"e066ff",mediumorchid2:"d15fee",mediumorchid3:"b452cd",mediumorchid4:"7a378b",mediumpurple:"9370db",mediumpurple1:"ab82ff",mediumpurple2:"9f79ee",mediumpurple3:"8968cd",mediumpurple4:"5d478b",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",mistyrose1:"ffe4e1",mistyrose2:"eed5d2",mistyrose3:"cdb7b5",mistyrose4:"8b7d7b",moccasin:"ffe4b5",navajowhite:"ffdead",navajowhite1:"ffdead",navajowhite2:"eecfa1",navajowhite3:"cdb38b",navajowhite4:"8b795e",navy:"000080",navyblue:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",olivedrab1:"c0ff3e",olivedrab2:"b3ee3a",olivedrab3:"9acd32",olivedrab4:"698b22",orange:"ffa500",orange1:"ffa500",orange2:"ee9a00",orange3:"cd8500",orange4:"8b5a00",orangered:"ff4500",orangered1:"ff4500",orangered2:"ee4000",orangered3:"cd3700",orangered4:"8b2500",orchid:"da70d6",orchid1:"ff83fa",orchid2:"ee7ae9",orchid3:"cd69c9",orchid4:"8b4789",palegoldenrod:"eee8aa",palegreen:"98fb98",palegreen1:"9aff9a",palegreen2:"90ee90",palegreen3:"7ccd7c",palegreen4:"548b54",paleturquoise:"afeeee",paleturquoise1:"bbffff",paleturquoise2:"aeeeee",paleturquoise3:"96cdcd",paleturquoise4:"668b8b",palevioletred:"db7093",palevioletred1:"ff82ab",palevioletred2:"ee799f",palevioletred3:"cd6889",palevioletred4:"8b475d",papayawhip:"ffefd5",peachpuff:"ffdab9",peachpuff1:"ffdab9",peachpuff2:"eecbad",peachpuff3:"cdaf95",peachpuff4:"8b7765",peru:"cd853f",pink:"ffc0cb",pink1:"ffb5c5",pink2:"eea9b8",pink3:"cd919e",pink4:"8b636c",plum:"dda0dd",plum1:"ffbbff",plum2:"eeaeee",plum3:"cd96cd",plum4:"8b668b",powderblue:"b0e0e6",purple:"a020f0",purple1:"9b30ff",purple2:"912cee",purple3:"7d26cd",purple4:"551a8b",rebeccapurple:"663399",red:"ff0000",red1:"ff0000",red2:"ee0000",red3:"cd0000",red4:"8b0000",rosybrown:"bc8f8f",rosybrown1:"ffc1c1",rosybrown2:"eeb4b4",rosybrown3:"cd9b9b",rosybrown4:"8b6969",royalblue:"4169e1",royalblue1:"4876ff",royalblue2:"436eee",royalblue3:"3a5fcd",royalblue4:"27408b",saddlebrown:"8b4513",salmon:"fa8072",salmon1:"ff8c69",salmon2:"ee8262",salmon3:"cd7054",salmon4:"8b4c39",sandybrown:"f4a460",seagreen:"2e8b57",seagreen1:"54ff9f",seagreen2:"4eee94",seagreen3:"43cd80",seagreen4:"2e8b57",seashell:"fff5ee",seashell1:"fff5ee",seashell2:"eee5de",seashell3:"cdc5bf",seashell4:"8b8682",sienna:"a0522d",sienna1:"ff8247",sienna2:"ee7942",sienna3:"cd6839",sienna4:"8b4726",silver:"c0c0c0",skyblue:"87ceeb",skyblue1:"87ceff",skyblue2:"7ec0ee",skyblue3:"6ca6cd",skyblue4:"4a708b",slateblue:"6a5acd",slateblue1:"836fff",slateblue2:"7a67ee",slateblue3:"6959cd",slateblue4:"473c8b",slategray:"708090",slategray1:"c6e2ff",slategray2:"b9d3ee",slategray3:"9fb6cd",slategray4:"6c7b8b",slategrey:"708090",snow:"fffafa",snow1:"fffafa",snow2:"eee9e9",snow3:"cdc9c9",snow4:"8b8989",springgreen:"00ff7f",springgreen1:"00ff7f",springgreen2:"00ee76",springgreen3:"00cd66",springgreen4:"008b45",steelblue:"4682b4",steelblue1:"63b8ff",steelblue2:"5cacee",steelblue3:"4f94cd",steelblue4:"36648b",tan:"d2b48c",tan1:"ffa54f",tan2:"ee9a49",tan3:"cd853f",tan4:"8b5a2b",teal:"008080",thistle:"d8bfd8",thistle1:"ffe1ff",thistle2:"eed2ee",thistle3:"cdb5cd",thistle4:"8b7b8b",tomato:"ff6347",tomato1:"ff6347",tomato2:"ee5c42",tomato3:"cd4f39",tomato4:"8b3626",turquoise:"40e0d0",turquoise1:"00f5ff",turquoise2:"00e5ee",turquoise3:"00c5cd",turquoise4:"00868b",violet:"ee82ee",violetred:"d02090",violetred1:"ff3e96",violetred2:"ee3a8c",violetred3:"cd3278",violetred4:"8b2252",webgray:"808080",webgreen:"008000",webgrey:"808080",webmaroon:"800000",webpurple:"800080",wheat:"f5deb3",wheat1:"ffe7ba",wheat2:"eed8ae",wheat3:"cdba96",wheat4:"8b7e66",white:"ffffff",whitesmoke:"f5f5f5",x11gray:"bebebe",x11green:"00ff00",x11grey:"bebebe",x11maroon:"b03060",x11purple:"a020f0",yellow:"ffff00",yellow1:"ffff00",yellow2:"eeee00",yellow3:"cdcd00",yellow4:"8b8b00",yellowgreen:"9acd32"},xg=e=>{const t=Sg[e.toLowerCase().replaceAll(" ","")];return t===void 0?void 0:`#${t}`},$g=/^rgba?:([\da-f]{1,4})\/([\da-f]{1,4})\/([\da-f]{1,4})(?:\/[\da-f]{1,4})?$/i,Eg=/^#((?:[\da-f]{3}){1,4})$/i,Jt=e=>{const t=16**e.length-1;return Math.round(Number.parseInt(e,16)/t*255)},Cg=e=>{const t=e.trim(),n=$g.exec(t);if(n)return{b:Jt(n[3]),g:Jt(n[2]),r:Jt(n[1])};const s=t.startsWith("#")?t:xg(t);if(s===void 0)return;const i=Eg.exec(s);if(!i)return;const r=i[1],o=r.length/3;return{b:Jt(r.slice(o*2)),g:Jt(r.slice(o,o*2)),r:Jt(r.slice(0,o))}},ql=S.createContext({renderThrottleMs:0,subscribe(){return{startTime:0,unsubscribe(){}}}});ql.displayName="InternalAnimationContext";const ro=S.createContext({exit(){},suspendTerminal:(()=>Promise.resolve(void 0)),async waitUntilRenderFlush(){}});ro.displayName="InternalAppContext";const Kl=S.createContext({setCursorPosition(){}});Kl.displayName="InternalCursorContext";let Rg;const Og=e=>(Rg??=De(import.meta.url))(e),Xt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,jg=e=>{if(typeof Xt<"u"&&Xt.versions&&Xt.versions.node){const[t,n]=Xt.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Xt.getBuiltinModule(e)}return Og(e)},{existsSync:Tg,readFileSync:Ag}=jg("node:fs"),{cwd:Ig}=Xt,Bg=(e,t=2)=>e.replace(/^\t+/gm,n=>" ".repeat(n.length*t)),Pg=(e,t)=>{const n=[],s=e-t,i=e+t;for(let r=s;r<=i;r++)n.push(r);return n},Ng=(e,t,n={})=>{var s;if(typeof e!="string")throw new TypeError("Source code is missing.");if(!t||t<1)throw new TypeError("Line number must start from `1`.");const i=Bg(e).split(/\r?\n/);if(!(t>i.length))return Pg(t,(s=n.around)!==null&&s!==void 0?s:3).filter(r=>i[r-1]!==void 0).map(r=>({line:r,value:i[r-1]}))},Ei=e=>{if(!e)return e;const t=Ig();return e.replace(`file://${t}/`,"").replace(`${t}/`,"")};function Dg({error:e}){const t=uh(e),n=new Map,s=t.map(c=>{const l=!c.methodName&&!c.file?`raw:${c.raw}`:`${Ei(c.file)??""}:${c.line}:${c.column}:${c.methodName??""}`,d=n.get(l)??0;return n.set(l,d+1),{key:`${l}#${d}`,trace:c}}),i=t[0],r=Ei(i?.file);let o,a=0;if(r&&i?.line&&Tg(r)){const c=Ag(r,"utf8");if(o=Ng(c,i.line),o)for(const{line:l}of o)a=Math.max(a,String(l).length)}return y.jsxs(V,{flexDirection:"column",padding:1,children:[y.jsxs(V,{children:[y.jsxs(O,{backgroundColor:"red",color:"white",children:[" ","ERROR"," "]}),y.jsxs(O,{children:[" ",e.message]})]}),i&&r?y.jsx(V,{marginTop:1,children:y.jsxs(O,{dimColor:!0,children:[r,":",i.line,":",i.column]})}):null,i&&o?y.jsx(V,{flexDirection:"column",marginTop:1,children:o.map(({line:c,value:l})=>y.jsxs(V,{children:[y.jsx(V,{width:a+1,children:y.jsxs(O,{"aria-label":c===i.line?`Line ${c}, error`:`Line ${c}`,backgroundColor:c===i.line?"red":void 0,color:c===i.line?"white":void 0,dimColor:c!==i.line,children:[String(c).padStart(a," "),":"]})}),y.jsx(O,{backgroundColor:c===i.line?"red":void 0,color:c===i.line?"white":void 0,children:` ${l}`})]},`excerpt-${c}`))}):null,t.length>0?y.jsx(V,{flexDirection:"column",marginTop:1,children:s.map(({key:c,trace:l})=>{const d=Ei(l.file)??"";return!l.methodName&&!l.file?y.jsxs(V,{children:[y.jsx(O,{dimColor:!0,children:"- "}),y.jsx(O,{bold:!0,dimColor:!0,children:l.raw})]},c):y.jsxs(V,{children:[y.jsx(O,{dimColor:!0,children:"- "}),y.jsx(O,{bold:!0,dimColor:!0,children:l.methodName??"<anonymous>"}),y.jsxs(O,{"aria-label":`at ${d} line ${l.line} column ${l.column}`,color:"gray",dimColor:!0,children:[" ","(",d,":",l.line,":",l.column,")"]})]},c)})}):null]})}let Mg=class extends S.PureComponent{static displayName="InternalErrorBoundary";static getDerivedStateFromError(t){return{error:t}}state={error:void 0};componentDidCatch(t){this.props.onError(t)}render(){return this.state.error?y.jsx(Dg,{error:this.state.error}):this.props.children}};const oo=S.createContext({activate(){},activeId:void 0,add(){},deactivate(){},disableFocus(){},enableFocus(){},focus(){},focusNext(){},focusPrevious(){},remove(){}});oo.displayName="InternalFocusContext";const Lg=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:Yl,Yl=Lg,Xl=S.createContext({stderr:Yl.stderr,write(){}});Xl.displayName="InternalStderrContext";let _g;const Fg=e=>(_g??=De(import.meta.url))(e),Zt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:Zl,Vg=e=>{if(typeof Zt<"u"&&Zt.versions&&Zt.versions.node){const[t,n]=Zt.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Zt.getBuiltinModule(e)}return Fg(e)},{EventEmitter:Hg}=Vg("node:events"),Zl=Zt,ai=S.createContext({internal_eventEmitter:new Hg,internal_exitOnCtrlC:!0,isRawModeSupported:!1,setBracketedPasteMode(){},setRawMode(){},stdin:Zl.stdin});ai.displayName="InternalStdinContext";const Wg=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:Ql,Ql=Wg,ao=S.createContext({stdout:Ql.stdout,write(){}});ao.displayName="InternalStdoutContext";const Ug={bar:6,"blinking-bar":5,"blinking-block":1,"blinking-underline":3,block:2,default:0,underline:4},ma=e=>mg(Ug[e]),ya=(e,t)=>e?.x!==t?.x||e?.y!==t?.y,ci=(e,t)=>{if(!t)return"";const n=e-t.y;return(n>0?zs(n):"")+oi(t.x)+Xn},ed=(e,t)=>{if(!t)return"";const n=e-1-t.y;return(n>0?ug(n):"")+oi(0)},Gg=e=>{const t=e.cursorWasShown?Yn:"",n=ed(e.previousLineCount,e.previousCursorPosition),s=ci(e.visibleLineCount,e.cursorPosition);return t+n+s},va=(e,t,n)=>e?Yn+ed(t,n):"";let zg;const Jg=e=>(zg??=De(import.meta.url))(e),Cn=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,li=e=>{if(typeof Cn<"u"&&Cn.versions&&Cn.versions.node){const[t,n]=Cn.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Cn.getBuiltinModule(e)}return Jg(e)},{existsSync:ba}=li("node:fs"),{createRequire:qg}=li("node:module"),{dirname:wa,join:ws}=li("node:path"),{fileURLToPath:Kg}=li("node:url"),Yg=12,Xg=e=>{const t=qg(e),n=wa(Kg(e));let s=n;for(let i=0;i<Yg;i+=1){if(ba(ws(s,"package.json"))&&ba(ws(s,"index.js")))return t(ws(s,"index.js"));const r=wa(s);if(r===s)break;s=r}return t(ws(n,"..","index.js"))},ks=new WeakMap,Zg=async(e,t)=>(await e,t()),td=(e,t)=>{const n=ks.get(e),s=n===void 0?t():Zg(n,t);let i;return i=(async()=>{try{await s}catch{}ks.get(e)===i&&ks.delete(e)})(),ks.set(e,i),s};let Qg=class{constructor(t,n){this.target=t,this.contentRect=n}target;contentRect};function em(e,t,n=!1){const s=e.resizeObservers&&e.resizeObservers.size>0;if((s||n)&&e.yogaNode){const i=Math.round(e.yogaNode.getComputedWidth()),r=Math.round(e.yogaNode.getComputedHeight());if(!Number.isNaN(i)&&!Number.isNaN(r)){const o=e.internal_lastMeasuredSize;if((o?.width!==i||o.height!==r)&&(e.internal_lastMeasuredSize={height:r,width:i},s)){const a=new Qg(e,{height:r,width:i});for(const c of e.resizeObservers)t.has(c)||t.set(c,[]),t.get(c).push(a)}}}}let tm;const nm=e=>(tm??=De(import.meta.url))(e),Qt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:dt,co=e=>{if(typeof Qt<"u"&&Qt.versions&&Qt.versions.node){const[t,n]=Qt.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Qt.getBuiltinModule(e)}return nm(e)},dt=Qt,{execFileSync:sm}=co("node:child_process"),Pn=co("node:fs"),im=co("node:tty"),nd=80,sd=24,vr=(e,t,{shell:n,env:s}={})=>sm(e,t,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:500,shell:n,env:s}).trim(),Ns=(e,t)=>({columns:Number.parseInt(e,10),rows:Number.parseInt(t,10)}),id=(e,t)=>{const{columns:n,rows:s}=Ns(e,t);if(!(Number.isNaN(n)||Number.isNaN(s))&&!(n===nd&&s===sd))return{columns:n,rows:s}},rm=()=>{if(dt.platform!=="linux")return!0;try{const e=Pn.readFileSync("/proc/self/stat","utf8"),t=e.lastIndexOf(") ");if(t===-1)return!1;const n=e.slice(t+2).trim().split(/\s+/),s=Number.parseInt(n[2],10),i=Number.parseInt(n[5],10);return Number.isNaN(s)||Number.isNaN(i)||i<=0?!1:s===i}catch{return!1}};function om(){const{env:e,stdout:t,stderr:n}=dt;if(t?.columns&&t?.rows)return Ns(t.columns,t.rows);if(n?.columns&&n?.rows)return Ns(n.columns,n.rows);if(e.COLUMNS&&e.LINES)return Ns(e.COLUMNS,e.LINES);const s={columns:nd,rows:sd};return dt.platform==="win32"?Ci()??s:dt.platform==="darwin"?ka()??Ci()??s:ka()??Ci()??am()??s}const ka=()=>{try{const e=dt.platform==="darwin"?Pn.constants.O_EVTONLY|Pn.constants.O_NONBLOCK:Pn.constants.O_NONBLOCK,{columns:t,rows:n}=im.WriteStream(Pn.openSync("/dev/tty",e));return{columns:t,rows:n}}catch{}},Ci=()=>{try{const e=vr("tput",["cols"],{env:{TERM:"dumb",...dt.env}}),t=vr("tput",["lines"],{env:{TERM:"dumb",...dt.env}});if(e&&t)return id(e,t)}catch{}},am=()=>{try{if(!rm())return;const e=vr("resize",["-u"]).match(/\d+/g);if(e.length===2)return id(e[0],e[1])}catch{}},nt=e=>{const{columns:t,rows:n}=e;if(t&&n)return{columns:t,rows:n};const s=om();return{columns:t||s.columns||80,rows:n||s.rows||24}};let cm;const lm=e=>(cm??=De(import.meta.url))(e),en=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,di=e=>{if(typeof en<"u"&&en.versions&&en.versions.node){const[t,n]=en.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return en.getBuiltinModule(e)}return lm(e)},Ae=en,{env:Ri}=Ae,{PassThrough:Sa,Stream:dm}=di("node:stream"),{Buffer:xa}=di("node:buffer"),{Console:um}=di("node:console"),{EventEmitter:pm}=di("node:events"),$a=e=>e in Ri&&Ri[e]!=="0"&&Ri[e]!=="false",rd=$a("CI")||$a("CONTINUOUS_INTEGRATION"),Ea=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"];let Oi={};const fm=e=>{const t=new Sa,n=new Sa;t.write=i=>{e("stdout",i)},n.write=i=>{e("stderr",i)};const s=new console.Console(t,n);for(const i of Ea)Oi[i]=console[i],console[i]=s[i];return()=>{for(const i of Ea)console[i]=Oi[i];Oi={}}},ln=[];ln.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&ln.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&ln.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Ds=e=>!!e&&!0&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",ji=Symbol.for("signal-exit emitter"),Ti=globalThis,hm=Object.defineProperty.bind(Object);class gm{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Ti[ji])return Ti[ji];hm(Ti,ji,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,n){this.listeners[t].push(n)}removeListener(t,n){const s=this.listeners[t],i=s.indexOf(n);i!==-1&&(i===0&&s.length===1?s.length=0:s.splice(i,1))}emit(t,n,s){if(this.emitted[t])return!1;this.emitted[t]=!0;let i=!1;for(const r of this.listeners[t])i=r(n,s)===!0||i;return t==="exit"&&(i=this.emit("afterExit",n,s)||i),i}}let od=class{};const mm=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}});class ym extends od{onExit(){return()=>{}}load(){}unload(){}}class vm extends od{#e=br.platform==="win32"?"SIGINT":"SIGHUP";#t=new gm;#n;#r;#s;#i={};#o=!1;constructor(t){super(),this.#n=t,this.#i={};for(const n of ln)this.#i[n]=()=>{const s=this.#n.listeners(n);let{count:i}=this.#t;const r=t;if(typeof r.__signal_exit_emitter__=="object"&&typeof r.__signal_exit_emitter__.count=="number"&&(i+=r.__signal_exit_emitter__.count),s.length===i){this.unload();const o=this.#t.emit("exit",null,n),a=n==="SIGHUP"?this.#e:n;o||t.kill(t.pid,a)}};this.#s=t.reallyExit,this.#r=t.emit}onExit(t,n){if(!Ds(this.#n))return()=>{};this.#o===!1&&this.load();const s=n?.alwaysLast?"afterExit":"exit";return this.#t.on(s,t),()=>{this.#t.removeListener(s,t),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(const t of ln)try{const n=this.#i[t];n&&this.#n.on(t,n)}catch{}this.#n.emit=(t,...n)=>this.#c(t,...n),this.#n.reallyExit=t=>this.#a(t)}}unload(){this.#o&&(this.#o=!1,ln.forEach(t=>{const n=this.#i[t];if(!n)throw new Error("Listener not defined for signal: "+t);try{this.#n.removeListener(t,n)}catch{}}),this.#n.emit=this.#r,this.#n.reallyExit=this.#s,this.#t.count-=1)}#a(t){return Ds(this.#n)?(this.#n.exitCode=t||0,this.#t.emit("exit",this.#n.exitCode,null),this.#s.call(this.#n,this.#n.exitCode)):0}#c(t,...n){const s=this.#r;if(t==="exit"&&Ds(this.#n)){typeof n[0]=="number"&&(this.#n.exitCode=n[0]);const i=s.call(this.#n,t,...n);return this.#t.emit("exit",this.#n.exitCode,null),i}else return s.call(this.#n,t,...n)}}const br=globalThis.process,{onExit:bm}=mm(Ds(br)?new vm(br):new ym),Js="\x1B",ad="\x1B[200~",Ca="\x1B[201~",wm=e=>e>=48&&e<=63,km=e=>e>=32&&e<=47,cd=e=>e>=64&&e<=126,Sm=(e,t,n)=>{const s=t+n+1;let i=s;for(;i<e.length;i++){const r=e.codePointAt(i);if(r===void 0)return"pending";if(!(wm(r)||km(r))&&!(r===91&&i===s))return cd(r)?{nextIndex:i+1,sequence:e.slice(t,i+1)}:void 0}return"pending"},xm=(e,t,n)=>{const s=t+n+2;if(s>e.length)return"pending";const i=e.codePointAt(s-1);if(!(i===void 0||!cd(i)))return{nextIndex:s,sequence:e.slice(t,s)}},Ra=(e,t,n)=>{const s=e[t+n];if(s===void 0)return"pending";if(s==="[")return Sm(e,t,n);if(s==="O")return xm(e,t,n)},$m=(e,t)=>{const n=e.codePointAt(t+1),s=n!==void 0&&n>65535?2:1,i=t+1+s;return{nextIndex:i,sequence:e.slice(t,i)}},Em=(e,t)=>{if(t===e.length-1)return"pending";if(e[t+1]===Js){if(t+2>=e.length)return"pending";const s=Ra(e,t,2);return s==="pending"?"pending":s||{nextIndex:t+2,sequence:e.slice(t,t+2)}}const n=Ra(e,t,1);return n==="pending"?"pending":n||$m(e,t)},Oa=(e,t)=>{let n=0;for(let s=0;s<e.length;s++){const i=e[s];(i===""||i==="\b")&&(s>n&&t.push(e.slice(n,s)),t.push(i),n=s+1)}n<e.length&&t.push(e.slice(n))},Cm=e=>{const t=[];let n=0;const s=i=>({events:t,pending:e.slice(i)});for(;n<e.length;){const i=e.indexOf(Js,n);if(i===-1)return Oa(e.slice(n),t),{events:t,pending:""};i>n&&Oa(e.slice(n,i),t);const r=Em(e,i);if(r==="pending")return s(i);if(r.sequence===ad){const o=r.nextIndex,a=e.indexOf(Ca,o);if(a===-1)return s(i);t.push({paste:e.slice(o,a)}),n=a+Ca.length;continue}t.push(r.sequence),n=r.nextIndex}return{events:t,pending:""}},Rm=()=>{let e="";return{flushPendingEscape(){if(!e.startsWith(Js))return;const t=e;return e="",t},hasPendingEscape(){return e.startsWith(Js)&&!e.startsWith(ad)&&e!=="\x1B[200"},push(t){const n=Cm(e+t);return e=n.pending,n.events},reset(){e=""}}},Om=" ",jm="\x1B[Z",Tm="\x1B",ja=Gl(Jl),Ai=zl(Jl),ld=({children:e,exitOnCtrlC:t,interactive:n,onExit:s,onRegisterInputControl:i,onSuspendTerminal:r,onWaitUntilRenderFlush:o,renderThrottleMs:a,setCursorPosition:c,stderr:l,stdin:d,stdout:u,writeToStderr:p,writeToStdout:f})=>{const[h,g]=S.useState(!0),[v,$]=S.useState(void 0),[,b]=S.useState([]),w=S.useRef(0),C=S.useRef([]),A=S.useRef(new Map),P=S.useRef(void 0),N=S.useRef(0),F=S.useRef(!1),H=S.useRef(0),[ee]=S.useState(()=>{const M=new pm;return M.setMaxListeners(1/0),M}),ne=S.useRef(void 0),se=S.useRef(void 0);se.current??=Rm();const re=S.useRef(void 0),oe=S.useRef(!1),L=20,k=S.useCallback(()=>{re.current&&(clearTimeout(re.current),re.current=void 0)},[]),I=S.useCallback(()=>{P.current&&(clearTimeout(P.current),P.current=void 0)},[]),U=S.useCallback(()=>{if(I(),A.current.size===0)return;let M=Number.POSITIVE_INFINITY;for(const X of A.current.values())M=Math.min(M,X.nextDueTime);const Z=Math.max(0,M-performance.now());P.current=setTimeout(()=>{P.current=void 0;const X=performance.now(),pe=[...A.current.values()];for(const $e of pe){if(X<$e.nextDueTime)continue;$e.callback(X);const Bf=X-$e.startTime,Pf=Math.floor(Bf/$e.interval)+1;$e.nextDueTime=$e.startTime+Pf*$e.interval}U()},Z)},[I]),T=S.useCallback((M,Z)=>{const X=performance.now();return A.current.set(M,{callback:M,interval:Z,nextDueTime:X+Z,startTime:X}),U(),{startTime:X,unsubscribe(){if(A.current.delete(M),A.current.size===0){I();return}U()}}},[I,U]);S.useEffect(()=>()=>{I()},[I]);const B=d.isTTY,j=S.useCallback(()=>{ne.current&&(d.removeListener("readable",ne.current),ne.current=void 0)},[d]),_=S.useCallback(()=>{se.current?.reset(),k(),j()},[k,j]),W=S.useCallback(()=>{F.current=!1,d.setRawMode(!1),d.unref(),N.current=0,_()},[d,_]),z=S.useCallback(M=>{B&&(N.current>0||F.current)&&W(),s(M)},[B,W,s]),Y=S.useCallback(M=>{if(M.includes("")&&t){z();return}M===Tm&&h&&$(Z=>{if(!Z)return Z})},[t,z,h]),D=S.useCallback(M=>{Y(M),ee.emit("input",M)},[Y,ee]),K=S.useCallback(()=>{k(),re.current=setTimeout(()=>{re.current=void 0;const M=se.current.flushPendingEscape();M&&D(M)},L)},[k,D]),ae=S.useCallback(()=>{k();let M;for(;(M=d.read())!==null;){const Z=se.current.push(M);for(const X of Z)if(typeof X=="string")D(X);else{if(ee.listenerCount("paste")===0){oe.current||(oe.current=!0,p(`Warning: useInput() received bracketed paste because no usePaste() handler is active. This fallback is deprecated and will be removed in the next major version. Migrate paste handling to usePaste().
1
+ import{createRequire as Nf}from"node:module";import{n as Lf,b as R,d as _f,a as Ff,x as Vf,r as Hf,i as Wf}from"../packem_shared/vis-user-error-Um2Qg_C1.js";import{k as xl,e as m,h as lr,m as rt,z as J,v as no,l as Nt,a as cs,b as Uf,U as pn}from"../packem_shared/index-DHD8wb6Z.js";import{N as $l,p as de}from"../packem_shared/readJsonSync-CbryXYxN-B2aSeDpC.js";import{u as S,y,X as V,m as O,S as Gf,U as ta,V as Ee,W as zf,Y as Jf,Z as Ge,_ as qf,$ as Kf,a0 as Yf,a1 as Xf,a2 as Zf,a3 as Qf,a4 as eh,a5 as th,z as El,F as Xe,d as nh,a6 as sh,j as na,i as ih,x as rh,p as dr,D as sa,R as oh,c as ah,h as ch,a7 as ur,a8 as pr,a9 as lh,aa as dh}from"./catalog.js";import{parseStacktrace as uh}from"@visulima/error/stacktrace";import{i as ht}from"../packem_shared/index-BjdW45xX.js";import{y as x}from"../packem_shared/isAccessibleSync-DYKTrrvc-CSnBISfV.js";import{U as ye,h as bt}from"../packem_shared/writeFileSync-DJoHk3Ks-CgQ-VNNT.js";import{findVisConfigFile as Ht,loadVisConfig as ra}from"./CONFIG_FILES.js";import{S as vh}from"../packem_shared/index-BisalDCf.js";import{T as bh}from"../packem_shared/target-merge-B4No-LHM.js";import{s as wh}from"../packem_shared/bin-Cl7wUf6p.js";import{X as $i,j as Le,b as Bn,q as tt,F as an,T as kh,t as ri,J as Sh}from"../packem_shared/index.server-sXNQYpsl.js";import{s as hr}from"../packem_shared/index-B4AjSxHU.js";import{g as Us}from"../packem_shared/package-version-BdIBhdr7.js";import{l as wt,k as oa,ad as Ch,ae as Al,g as Rh,d as kt,af as gr,ag as Oh,$ as Kn,c as Hn,ah as Il}from"../packem_shared/formatBytes-BHAzNIrn-Bkk_uRS-.js";import{d as aa}from"../packem_shared/pm-runner-d93_73O6.js";import{m as jh}from"./ts-loader.js";import{getMainWorktreeRoot as Th,Cache as Gs,readLastRunSummary as Bl,getLastRunSummaryPath as mr,parseCacheSize as Ah,digestFile as Pl}from"@visulima/task-runner";import{e as Fh}from"../packem_shared/index-AZByDAgr.js";let Df;const Mf=e=>(Df??=Nf(import.meta.url))(e),xn=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ce=e=>{if(typeof xn<"u"&&xn.versions&&xn.versions.node){const[t,n]=xn.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return xn.getBuiltinModule(e)}return Mf(e)},{createRequire:De}=Ce("node:module"),{spawnSync:ct,execSync:Cl,execFileSync:ph,execFile:fh}=Ce("node:child_process"),{writeFileSync:ce,existsSync:fr,renameSync:Rl,readFileSync:Ol,readdirSync:be,statSync:Dt,rmSync:fn,copyFileSync:hh,unlinkSync:vt,mkdirSync:gh,cpSync:mh,watch:yh}=Ce("node:fs"),{dirname:jl,delimiter:ia,resolve:Ws}=Ce("node:path"),{createInterface:Tl}=Ce("node:readline"),{homedir:xh,platform:$h,tmpdir:Eh}=Ce("node:os"),{readFile:Nl,readdir:ls,stat:yn,realpath:ca,rm:so,mkdtemp:Ih,mkdir:Bh}=Ce("node:fs/promises"),{isIP:Ph}=Ce("node:net"),{createServer:Nh,STATUS_CODES:Dh}=Ce("node:http"),{Http2ServerRequest:lt,constants:Mh}=Ce("node:http2"),{Readable:la}=Ce("node:stream"),{randomUUID:Lh}=Ce("node:crypto"),{fileURLToPath:_h}=Ce("node:url"),Vh=["pnpm-lock.yaml","package-lock.json","npm-shrinkwrap.json","yarn.lock","bun.lock","bun.lockb"];let Hh;const Wh=e=>(Hh??=De(import.meta.url))(e),$n=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Dl=e=>{if(typeof $n<"u"&&$n.versions&&$n.versions.node){const[t,n]=$n.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return $n.getBuiltinModule(e)}return Wh(e)},{execFileSync:Uh}=Dl("node:child_process"),{existsSync:da,readFileSync:Gh}=Dl("node:fs"),zh=[...Vh],ua=new Set(["bun","npm","pnpm","yarn"]),Ml=e=>{const t=$l(Gh(e,"utf8"));return typeof t?.packageManager=="string"?t.packageManager:void 0},Jh=e=>{let t;if(zh.forEach(s=>{!t&&da(m(e,s))&&(t=m(e,s))}),t)return t;const n=m(e,"package.json");if(da(n)&&Ml(n)!==void 0)return n},qh=e=>{if(!e)throw new lr("Could not find a package manager");if(e.endsWith("package.json")){const t=Ml(e);if(t){const n=["npm","yarn","pnpm","bun"].find(s=>t.startsWith(s));if(n)return{packageManager:n,path:rt(e)}}}if(e.endsWith("yarn.lock"))return{packageManager:"yarn",path:rt(e)};if(e.endsWith("package-lock.json")||e.endsWith("npm-shrinkwrap.json"))return{packageManager:"npm",path:rt(e)};if(e.endsWith("pnpm-lock.yaml"))return{packageManager:"pnpm",path:rt(e)};if(e.endsWith("bun.lock")||e.endsWith("bun.lockb"))return{packageManager:"bun",path:rt(e)};throw new lr("Could not find a package manager")},Kh=e=>{const t=xl(Jh,{...e&&{cwd:e}});return qh(t)},y4=e=>{if(!ua.has(e))throw new Error(`Unsupported package manager "${e}". Expected one of: ${[...ua].join(", ")}.`);return Uh(e,["--version"]).toString("utf8").trim()};let Yh;const Xh=e=>(Yh??=De(import.meta.url))(e),En=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Zh=e=>{if(typeof En<"u"&&En.versions&&En.versions.node){const[t,n]=En.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return En.getBuiltinModule(e)}return Xh(e)},{existsSync:pa,readFileSync:Qh}=Zh("node:fs"),eg=e=>{let t;try{t=$l(e)}catch{return!1}if(!t||typeof t!="object"||Array.isArray(t))return!1;const{workspaces:n}=t;return typeof n=="object"&&n!==null},Ll=e=>{const t=xl(["lerna.json","turbo.json"],{type:"file",...e&&{cwd:e}});if(t?.endsWith("lerna.json")){const s=de(t);if(s&&typeof s=="object"&&!Array.isArray(s)){const i=s;if(i.useWorkspaces||i.packages)return{path:rt(t),strategy:"lerna"}}}const n=t?.endsWith("turbo.json");try{const{packageManager:s,path:i}=Kh(e);if(["npm","yarn"].includes(s)){const r=m(i,"package.json");if(pa(r)){const o=Qh(m(i,"package.json"),"utf8");if(eg(o))return{path:i,strategy:n?"turbo":s}}}else if(s==="pnpm"){const r=m(i,"pnpm-workspace.yaml");if(pa(r))return{path:i,strategy:n?"turbo":"pnpm"}}}catch(s){if(!(s instanceof lr))throw s}throw new Error(`No monorepo root could be found upwards from the directory ${String(e??process.cwd())} using lerna, yarn, pnpm, or npm as indicators.`)};function _l(e,t,n,s){let i,r,o;r=n,o=s;const a=vh(t,r,o??i);ye(e,a,i)}const G=(e,t)=>async()=>({default:(await e())[t]}),tg=new Set(["--cwd"]),ng=new Set(["--help","--version","-h","-V"]),sg=e=>{const t=[];for(let n=0;n<e.length;n+=1){const s=e[n];if(s!==void 0){if(ng.has(s))return!1;if(s.startsWith("-")){const i=s.indexOf("="),r=i===-1?s:s.slice(0,i);if(tg.has(r)&&i===-1){const o=e[n+1];o!==void 0&&!o.startsWith("-")&&(n+=1)}continue}t.push(s)}}return t.length===1&&t[0]==="migrate"},ig=e=>{if(e.length===0)return!1;for(const t of e){const n=t.codePointAt(0)??0;return!(n<=127||n<=255)}return!1};let rg=class{buffer="";timer;onFlush;timeout;constructor({onFlush:t,timeout:n}){this.onFlush=t,this.timeout=n}add(t){this.buffer+=t,this.timer!==void 0&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.flush()},this.timeout)}flush(){if(this.timer!==void 0&&(clearTimeout(this.timer),this.timer=void 0),this.buffer.length>0){const t=this.buffer;this.buffer="",this.onFlush(t)}}destroy(){this.timer!==void 0&&(clearTimeout(this.timer),this.timer=void 0),this.buffer=""}};const og={disambiguateEscapeCodes:1,reportAllKeysAsEscapeCodes:8,reportAlternateKeys:4,reportAssociatedText:16,reportEventTypes:2};function fa(e){let t=0;for(const n of e)t|=og[n];return t}const Ze={alt:2,capsLock:64,ctrl:4,hyper:16,meta:32,numLock:128,shift:1,super:8},ag="\x1B",ue="\x1B[",cg=";",ha=`${ue}?1049h`,ga=`${ue}?1049l`,Fl=typeof globalThis<"u"&&typeof globalThis.window=="object"&&globalThis.window.document!==void 0,lg=/^(?:msys|cygwin)$/,Vl=process,yr=Vl?.env??{};!Fl&&yr.TERM_PROGRAM;const dg=!Fl&&(Vl?.platform==="win32"||yr.OSTYPE!==void 0&&lg.test(yr.OSTYPE)),ug=(e=1)=>`${ue}${String(e)}B`,Yn=`${ue}?25l`,pg=`${ue}G`,fg=(e=1)=>`${ue}${String(e)}G`,hg=(e=1)=>`${ue}${String(e)}E`,Xn=`${ue}?25h`,oi=(e,t)=>t===void 0?fg(e+1):`${ue}${String(t+1)}${cg}${String(e+1)}H`,zs=(e=1)=>`${ue}${String(e)}A`;var gg=(e=>(e[e.Default=0]="Default",e[e.BlinkingBlock=1]="BlinkingBlock",e[e.SteadyBlock=2]="SteadyBlock",e[e.BlinkingUnderline=3]="BlinkingUnderline",e[e.SteadyUnderline=4]="SteadyUnderline",e[e.BlinkingBar=5]="BlinkingBar",e[e.SteadyBar=6]="SteadyBar",e))(gg||{});const mg=e=>`${ue}${String(e)} q`;var cn=(e=>(e[e.ToEnd=0]="ToEnd",e[e.ToBeginning=1]="ToBeginning",e[e.EntireScreen=2]="EntireScreen",e[e.EntireScreenAndScrollback=3]="EntireScreenAndScrollback",e))(cn||{});const Wn=e=>{const t=e>=0&&e<=3?e:0;return`${ue}${t===0?"":String(t)}J`};var Hl=(e=>(e[e.ToEnd=0]="ToEnd",e[e.ToBeginning=1]="ToBeginning",e[e.EntireLine=2]="EntireLine",e))(Hl||{});const io=e=>{const t=e>=0&&e<=2?e:0;return`${ue}${t===0?"":String(t)}K`},yg=io(2),vg=io(0),Zn=e=>{if(e<=0)return"";let t="";for(let n=0;n<e;n+=1)t+=yg,n<e-1&&(t+=zs());return t+=pg,t};oi(0,0)+Wn(cn.ToEnd);`${io(Hl.EntireLine)}${ue}`;const bg=`${ue}H${Wn(cn.EntireScreen)}`;dg?`${Wn(cn.EntireScreen)}${ue}`:`${Wn(cn.EntireScreen)}${Wn(cn.EntireScreenAndScrollback)}${ue}${ag}`;let wg=class{code;isDecMode=!0;constructor(t){this.code=t}};const Wl=(e,...t)=>{if(t.length===0)return"";const n=e?"l":"h";if(t.length===1){const o=t[0];let a=ue;return o.isDecMode&&(a+="?"),a+String(o.code)+n}const s=t.filter(o=>!o.isDecMode).map(o=>o.code),i=t.filter(o=>o.isDecMode).map(o=>o.code);let r="";return s.length>0&&(r+=`${ue}${s.join(";")}${n}`),i.length>0&&(r+=`${ue}?${i.join(";")}${n}`),r};var kg=(e=>(e[e.NotRecognized=0]="NotRecognized",e[e.Set=1]="Set",e[e.Reset=2]="Reset",e[e.PermanentlySet=3]="PermanentlySet",e[e.PermanentlyReset=4]="PermanentlyReset",e))(kg||{});const Ul=e=>new wg(e),Gl=(...e)=>Wl(!1,...e),zl=(...e)=>Wl(!0,...e),Jl=Ul(2004),Sg={aliceblue:"f0f8ff",antiquewhite:"faebd7",antiquewhite1:"ffefdb",antiquewhite2:"eedfcc",antiquewhite3:"cdc0b0",antiquewhite4:"8b8378",aqua:"00ffff",aquamarine:"7fffd4",aquamarine1:"7fffd4",aquamarine2:"76eec6",aquamarine3:"66cdaa",aquamarine4:"458b74",azure:"f0ffff",azure1:"f0ffff",azure2:"e0eeee",azure3:"c1cdcd",azure4:"838b8b",beige:"f5f5dc",bisque:"ffe4c4",bisque1:"ffe4c4",bisque2:"eed5b7",bisque3:"cdb79e",bisque4:"8b7d6b",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blue1:"0000ff",blue2:"0000ee",blue3:"0000cd",blue4:"00008b",blueviolet:"8a2be2",brown:"a52a2a",brown1:"ff4040",brown2:"ee3b3b",brown3:"cd3333",brown4:"8b2323",burlywood:"deb887",burlywood1:"ffd39b",burlywood2:"eec591",burlywood3:"cdaa7d",burlywood4:"8b7355",cadetblue:"5f9ea0",cadetblue1:"98f5ff",cadetblue2:"8ee5ee",cadetblue3:"7ac5cd",cadetblue4:"53868b",chartreuse:"7fff00",chartreuse1:"7fff00",chartreuse2:"76ee00",chartreuse3:"66cd00",chartreuse4:"458b00",chocolate:"d2691e",chocolate1:"ff7f24",chocolate2:"ee7621",chocolate3:"cd661d",chocolate4:"8b4513",coral:"ff7f50",coral1:"ff7256",coral2:"ee6a50",coral3:"cd5b45",coral4:"8b3e2f",cornflowerblue:"6495ed",cornsilk:"fff8dc",cornsilk1:"fff8dc",cornsilk2:"eee8cd",cornsilk3:"cdc8b1",cornsilk4:"8b8878",crimson:"dc143c",cyan:"00ffff",cyan1:"00ffff",cyan2:"00eeee",cyan3:"00cdcd",cyan4:"008b8b",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgoldenrod1:"ffb90f",darkgoldenrod2:"eead0e",darkgoldenrod3:"cd950c",darkgoldenrod4:"8b6508",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkolivegreen1:"caff70",darkolivegreen2:"bcee68",darkolivegreen3:"a2cd5a",darkolivegreen4:"6e8b3d",darkorange:"ff8c00",darkorange1:"ff7f00",darkorange2:"ee7600",darkorange3:"cd6600",darkorange4:"8b4500",darkorchid:"9932cc",darkorchid1:"bf3eff",darkorchid2:"b23aee",darkorchid3:"9a32cd",darkorchid4:"68228b",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkseagreen1:"c1ffc1",darkseagreen2:"b4eeb4",darkseagreen3:"9bcd9b",darkseagreen4:"698b69",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategray1:"97ffff",darkslategray2:"8deeee",darkslategray3:"79cdcd",darkslategray4:"528b8b",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deeppink1:"ff1493",deeppink2:"ee1289",deeppink3:"cd1076",deeppink4:"8b0a50",deepskyblue:"00bfff",deepskyblue1:"00bfff",deepskyblue2:"00b2ee",deepskyblue3:"009acd",deepskyblue4:"00688b",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",dodgerblue1:"1e90ff",dodgerblue2:"1c86ee",dodgerblue3:"1874cd",dodgerblue4:"104e8b",firebrick:"b22222",firebrick1:"ff3030",firebrick2:"ee2c2c",firebrick3:"cd2626",firebrick4:"8b1a1a",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",gold1:"ffd700",gold2:"eec900",gold3:"cdad00",gold4:"8b7500",goldenrod:"daa520",goldenrod1:"ffc125",goldenrod2:"eeb422",goldenrod3:"cd9b1d",goldenrod4:"8b6914",gray:"bebebe",gray0:"000000",gray1:"030303",gray2:"050505",gray3:"080808",gray4:"0a0a0a",gray5:"0d0d0d",gray6:"0f0f0f",gray7:"121212",gray8:"141414",gray9:"171717",gray10:"1a1a1a",gray11:"1c1c1c",gray12:"1f1f1f",gray13:"212121",gray14:"242424",gray15:"262626",gray16:"292929",gray17:"2b2b2b",gray18:"2e2e2e",gray19:"303030",gray20:"333333",gray21:"363636",gray22:"383838",gray23:"3b3b3b",gray24:"3d3d3d",gray25:"404040",gray26:"424242",gray27:"454545",gray28:"474747",gray29:"4a4a4a",gray30:"4d4d4d",gray31:"4f4f4f",gray32:"525252",gray33:"545454",gray34:"575757",gray35:"595959",gray36:"5c5c5c",gray37:"5e5e5e",gray38:"616161",gray39:"636363",gray40:"666666",gray41:"696969",gray42:"6b6b6b",gray43:"6e6e6e",gray44:"707070",gray45:"737373",gray46:"757575",gray47:"787878",gray48:"7a7a7a",gray49:"7d7d7d",gray50:"7f7f7f",gray51:"828282",gray52:"858585",gray53:"878787",gray54:"8a8a8a",gray55:"8c8c8c",gray56:"8f8f8f",gray57:"919191",gray58:"949494",gray59:"969696",gray60:"999999",gray61:"9c9c9c",gray62:"9e9e9e",gray63:"a1a1a1",gray64:"a3a3a3",gray65:"a6a6a6",gray66:"a8a8a8",gray67:"ababab",gray68:"adadad",gray69:"b0b0b0",gray70:"b3b3b3",gray71:"b5b5b5",gray72:"b8b8b8",gray73:"bababa",gray74:"bdbdbd",gray75:"bfbfbf",gray76:"c2c2c2",gray77:"c4c4c4",gray78:"c7c7c7",gray79:"c9c9c9",gray80:"cccccc",gray81:"cfcfcf",gray82:"d1d1d1",gray83:"d4d4d4",gray84:"d6d6d6",gray85:"d9d9d9",gray86:"dbdbdb",gray87:"dedede",gray88:"e0e0e0",gray89:"e3e3e3",gray90:"e5e5e5",gray91:"e8e8e8",gray92:"ebebeb",gray93:"ededed",gray94:"f0f0f0",gray95:"f2f2f2",gray96:"f5f5f5",gray97:"f7f7f7",gray98:"fafafa",gray99:"fcfcfc",gray100:"ffffff",green:"00ff00",green1:"00ff00",green2:"00ee00",green3:"00cd00",green4:"008b00",greenyellow:"adff2f",grey:"bebebe",grey0:"000000",grey1:"030303",grey2:"050505",grey3:"080808",grey4:"0a0a0a",grey5:"0d0d0d",grey6:"0f0f0f",grey7:"121212",grey8:"141414",grey9:"171717",grey10:"1a1a1a",grey11:"1c1c1c",grey12:"1f1f1f",grey13:"212121",grey14:"242424",grey15:"262626",grey16:"292929",grey17:"2b2b2b",grey18:"2e2e2e",grey19:"303030",grey20:"333333",grey21:"363636",grey22:"383838",grey23:"3b3b3b",grey24:"3d3d3d",grey25:"404040",grey26:"424242",grey27:"454545",grey28:"474747",grey29:"4a4a4a",grey30:"4d4d4d",grey31:"4f4f4f",grey32:"525252",grey33:"545454",grey34:"575757",grey35:"595959",grey36:"5c5c5c",grey37:"5e5e5e",grey38:"616161",grey39:"636363",grey40:"666666",grey41:"696969",grey42:"6b6b6b",grey43:"6e6e6e",grey44:"707070",grey45:"737373",grey46:"757575",grey47:"787878",grey48:"7a7a7a",grey49:"7d7d7d",grey50:"7f7f7f",grey51:"828282",grey52:"858585",grey53:"878787",grey54:"8a8a8a",grey55:"8c8c8c",grey56:"8f8f8f",grey57:"919191",grey58:"949494",grey59:"969696",grey60:"999999",grey61:"9c9c9c",grey62:"9e9e9e",grey63:"a1a1a1",grey64:"a3a3a3",grey65:"a6a6a6",grey66:"a8a8a8",grey67:"ababab",grey68:"adadad",grey69:"b0b0b0",grey70:"b3b3b3",grey71:"b5b5b5",grey72:"b8b8b8",grey73:"bababa",grey74:"bdbdbd",grey75:"bfbfbf",grey76:"c2c2c2",grey77:"c4c4c4",grey78:"c7c7c7",grey79:"c9c9c9",grey80:"cccccc",grey81:"cfcfcf",grey82:"d1d1d1",grey83:"d4d4d4",grey84:"d6d6d6",grey85:"d9d9d9",grey86:"dbdbdb",grey87:"dedede",grey88:"e0e0e0",grey89:"e3e3e3",grey90:"e5e5e5",grey91:"e8e8e8",grey92:"ebebeb",grey93:"ededed",grey94:"f0f0f0",grey95:"f2f2f2",grey96:"f5f5f5",grey97:"f7f7f7",grey98:"fafafa",grey99:"fcfcfc",grey100:"ffffff",honeydew:"f0fff0",honeydew1:"f0fff0",honeydew2:"e0eee0",honeydew3:"c1cdc1",honeydew4:"838b83",hotpink:"ff69b4",hotpink1:"ff6eb4",hotpink2:"ee6aa7",hotpink3:"cd6090",hotpink4:"8b3a62",indianred:"cd5c5c",indianred1:"ff6a6a",indianred2:"ee6363",indianred3:"cd5555",indianred4:"8b3a3a",indigo:"4b0082",ivory:"fffff0",ivory1:"fffff0",ivory2:"eeeee0",ivory3:"cdcdc1",ivory4:"8b8b83",khaki:"f0e68c",khaki1:"fff68f",khaki2:"eee685",khaki3:"cdc673",khaki4:"8b864e",lavender:"e6e6fa",lavenderblush:"fff0f5",lavenderblush1:"fff0f5",lavenderblush2:"eee0e5",lavenderblush3:"cdc1c5",lavenderblush4:"8b8386",lawngreen:"7cfc00",lemonchiffon:"fffacd",lemonchiffon1:"fffacd",lemonchiffon2:"eee9bf",lemonchiffon3:"cdc9a5",lemonchiffon4:"8b8970",lightblue:"add8e6",lightblue1:"bfefff",lightblue2:"b2dfee",lightblue3:"9ac0cd",lightblue4:"68838b",lightcoral:"f08080",lightcyan:"e0ffff",lightcyan1:"e0ffff",lightcyan2:"d1eeee",lightcyan3:"b4cdcd",lightcyan4:"7a8b8b",lightgoldenrod:"eedd82",lightgoldenrod1:"ffec8b",lightgoldenrod2:"eedc82",lightgoldenrod3:"cdbe70",lightgoldenrod4:"8b814c",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightpink1:"ffaeb9",lightpink2:"eea2ad",lightpink3:"cd8c95",lightpink4:"8b5f65",lightsalmon:"ffa07a",lightsalmon1:"ffa07a",lightsalmon2:"ee9572",lightsalmon3:"cd8162",lightsalmon4:"8b5742",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightskyblue1:"b0e2ff",lightskyblue2:"a4d3ee",lightskyblue3:"8db6cd",lightskyblue4:"607b8b",lightslateblue:"8470ff",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightsteelblue1:"cae1ff",lightsteelblue2:"bcd2ee",lightsteelblue3:"a2b5cd",lightsteelblue4:"6e7b8b",lightyellow:"ffffe0",lightyellow1:"ffffe0",lightyellow2:"eeeed1",lightyellow3:"cdcdb4",lightyellow4:"8b8b7a",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",magenta1:"ff00ff",magenta2:"ee00ee",magenta3:"cd00cd",magenta4:"8b008b",maroon:"b03060",maroon1:"ff34b3",maroon2:"ee30a7",maroon3:"cd2990",maroon4:"8b1c62",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumorchid1:"e066ff",mediumorchid2:"d15fee",mediumorchid3:"b452cd",mediumorchid4:"7a378b",mediumpurple:"9370db",mediumpurple1:"ab82ff",mediumpurple2:"9f79ee",mediumpurple3:"8968cd",mediumpurple4:"5d478b",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",mistyrose1:"ffe4e1",mistyrose2:"eed5d2",mistyrose3:"cdb7b5",mistyrose4:"8b7d7b",moccasin:"ffe4b5",navajowhite:"ffdead",navajowhite1:"ffdead",navajowhite2:"eecfa1",navajowhite3:"cdb38b",navajowhite4:"8b795e",navy:"000080",navyblue:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",olivedrab1:"c0ff3e",olivedrab2:"b3ee3a",olivedrab3:"9acd32",olivedrab4:"698b22",orange:"ffa500",orange1:"ffa500",orange2:"ee9a00",orange3:"cd8500",orange4:"8b5a00",orangered:"ff4500",orangered1:"ff4500",orangered2:"ee4000",orangered3:"cd3700",orangered4:"8b2500",orchid:"da70d6",orchid1:"ff83fa",orchid2:"ee7ae9",orchid3:"cd69c9",orchid4:"8b4789",palegoldenrod:"eee8aa",palegreen:"98fb98",palegreen1:"9aff9a",palegreen2:"90ee90",palegreen3:"7ccd7c",palegreen4:"548b54",paleturquoise:"afeeee",paleturquoise1:"bbffff",paleturquoise2:"aeeeee",paleturquoise3:"96cdcd",paleturquoise4:"668b8b",palevioletred:"db7093",palevioletred1:"ff82ab",palevioletred2:"ee799f",palevioletred3:"cd6889",palevioletred4:"8b475d",papayawhip:"ffefd5",peachpuff:"ffdab9",peachpuff1:"ffdab9",peachpuff2:"eecbad",peachpuff3:"cdaf95",peachpuff4:"8b7765",peru:"cd853f",pink:"ffc0cb",pink1:"ffb5c5",pink2:"eea9b8",pink3:"cd919e",pink4:"8b636c",plum:"dda0dd",plum1:"ffbbff",plum2:"eeaeee",plum3:"cd96cd",plum4:"8b668b",powderblue:"b0e0e6",purple:"a020f0",purple1:"9b30ff",purple2:"912cee",purple3:"7d26cd",purple4:"551a8b",rebeccapurple:"663399",red:"ff0000",red1:"ff0000",red2:"ee0000",red3:"cd0000",red4:"8b0000",rosybrown:"bc8f8f",rosybrown1:"ffc1c1",rosybrown2:"eeb4b4",rosybrown3:"cd9b9b",rosybrown4:"8b6969",royalblue:"4169e1",royalblue1:"4876ff",royalblue2:"436eee",royalblue3:"3a5fcd",royalblue4:"27408b",saddlebrown:"8b4513",salmon:"fa8072",salmon1:"ff8c69",salmon2:"ee8262",salmon3:"cd7054",salmon4:"8b4c39",sandybrown:"f4a460",seagreen:"2e8b57",seagreen1:"54ff9f",seagreen2:"4eee94",seagreen3:"43cd80",seagreen4:"2e8b57",seashell:"fff5ee",seashell1:"fff5ee",seashell2:"eee5de",seashell3:"cdc5bf",seashell4:"8b8682",sienna:"a0522d",sienna1:"ff8247",sienna2:"ee7942",sienna3:"cd6839",sienna4:"8b4726",silver:"c0c0c0",skyblue:"87ceeb",skyblue1:"87ceff",skyblue2:"7ec0ee",skyblue3:"6ca6cd",skyblue4:"4a708b",slateblue:"6a5acd",slateblue1:"836fff",slateblue2:"7a67ee",slateblue3:"6959cd",slateblue4:"473c8b",slategray:"708090",slategray1:"c6e2ff",slategray2:"b9d3ee",slategray3:"9fb6cd",slategray4:"6c7b8b",slategrey:"708090",snow:"fffafa",snow1:"fffafa",snow2:"eee9e9",snow3:"cdc9c9",snow4:"8b8989",springgreen:"00ff7f",springgreen1:"00ff7f",springgreen2:"00ee76",springgreen3:"00cd66",springgreen4:"008b45",steelblue:"4682b4",steelblue1:"63b8ff",steelblue2:"5cacee",steelblue3:"4f94cd",steelblue4:"36648b",tan:"d2b48c",tan1:"ffa54f",tan2:"ee9a49",tan3:"cd853f",tan4:"8b5a2b",teal:"008080",thistle:"d8bfd8",thistle1:"ffe1ff",thistle2:"eed2ee",thistle3:"cdb5cd",thistle4:"8b7b8b",tomato:"ff6347",tomato1:"ff6347",tomato2:"ee5c42",tomato3:"cd4f39",tomato4:"8b3626",turquoise:"40e0d0",turquoise1:"00f5ff",turquoise2:"00e5ee",turquoise3:"00c5cd",turquoise4:"00868b",violet:"ee82ee",violetred:"d02090",violetred1:"ff3e96",violetred2:"ee3a8c",violetred3:"cd3278",violetred4:"8b2252",webgray:"808080",webgreen:"008000",webgrey:"808080",webmaroon:"800000",webpurple:"800080",wheat:"f5deb3",wheat1:"ffe7ba",wheat2:"eed8ae",wheat3:"cdba96",wheat4:"8b7e66",white:"ffffff",whitesmoke:"f5f5f5",x11gray:"bebebe",x11green:"00ff00",x11grey:"bebebe",x11maroon:"b03060",x11purple:"a020f0",yellow:"ffff00",yellow1:"ffff00",yellow2:"eeee00",yellow3:"cdcd00",yellow4:"8b8b00",yellowgreen:"9acd32"},xg=e=>{const t=Sg[e.toLowerCase().replaceAll(" ","")];return t===void 0?void 0:`#${t}`},$g=/^rgba?:([\da-f]{1,4})\/([\da-f]{1,4})\/([\da-f]{1,4})(?:\/[\da-f]{1,4})?$/i,Eg=/^#((?:[\da-f]{3}){1,4})$/i,Jt=e=>{const t=16**e.length-1;return Math.round(Number.parseInt(e,16)/t*255)},Cg=e=>{const t=e.trim(),n=$g.exec(t);if(n)return{b:Jt(n[3]),g:Jt(n[2]),r:Jt(n[1])};const s=t.startsWith("#")?t:xg(t);if(s===void 0)return;const i=Eg.exec(s);if(!i)return;const r=i[1],o=r.length/3;return{b:Jt(r.slice(o*2)),g:Jt(r.slice(o,o*2)),r:Jt(r.slice(0,o))}},ql=S.createContext({renderThrottleMs:0,subscribe(){return{startTime:0,unsubscribe(){}}}});ql.displayName="InternalAnimationContext";const ro=S.createContext({exit(){},suspendTerminal:(()=>Promise.resolve(void 0)),async waitUntilRenderFlush(){}});ro.displayName="InternalAppContext";const Kl=S.createContext({setCursorPosition(){}});Kl.displayName="InternalCursorContext";let Rg;const Og=e=>(Rg??=De(import.meta.url))(e),Xt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,jg=e=>{if(typeof Xt<"u"&&Xt.versions&&Xt.versions.node){const[t,n]=Xt.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Xt.getBuiltinModule(e)}return Og(e)},{existsSync:Tg,readFileSync:Ag}=jg("node:fs"),{cwd:Ig}=Xt,Bg=(e,t=2)=>e.replace(/^\t+/gm,n=>" ".repeat(n.length*t)),Pg=(e,t)=>{const n=[],s=e-t,i=e+t;for(let r=s;r<=i;r++)n.push(r);return n},Ng=(e,t,n={})=>{var s;if(typeof e!="string")throw new TypeError("Source code is missing.");if(!t||t<1)throw new TypeError("Line number must start from `1`.");const i=Bg(e).split(/\r?\n/);if(!(t>i.length))return Pg(t,(s=n.around)!==null&&s!==void 0?s:3).filter(r=>i[r-1]!==void 0).map(r=>({line:r,value:i[r-1]}))},Ei=e=>{if(!e)return e;const t=Ig();return e.replace(`file://${t}/`,"").replace(`${t}/`,"")};function Dg({error:e}){const t=uh(e),n=new Map,s=t.map(c=>{const l=!c.methodName&&!c.file?`raw:${c.raw}`:`${Ei(c.file)??""}:${c.line}:${c.column}:${c.methodName??""}`,d=n.get(l)??0;return n.set(l,d+1),{key:`${l}#${d}`,trace:c}}),i=t[0],r=Ei(i?.file);let o,a=0;if(r&&i?.line&&Tg(r)){const c=Ag(r,"utf8");if(o=Ng(c,i.line),o)for(const{line:l}of o)a=Math.max(a,String(l).length)}return y.jsxs(V,{flexDirection:"column",padding:1,children:[y.jsxs(V,{children:[y.jsxs(O,{backgroundColor:"red",color:"white",children:[" ","ERROR"," "]}),y.jsxs(O,{children:[" ",e.message]})]}),i&&r?y.jsx(V,{marginTop:1,children:y.jsxs(O,{dimColor:!0,children:[r,":",i.line,":",i.column]})}):null,i&&o?y.jsx(V,{flexDirection:"column",marginTop:1,children:o.map(({line:c,value:l})=>y.jsxs(V,{children:[y.jsx(V,{width:a+1,children:y.jsxs(O,{"aria-label":c===i.line?`Line ${c}, error`:`Line ${c}`,backgroundColor:c===i.line?"red":void 0,color:c===i.line?"white":void 0,dimColor:c!==i.line,children:[String(c).padStart(a," "),":"]})}),y.jsx(O,{backgroundColor:c===i.line?"red":void 0,color:c===i.line?"white":void 0,children:` ${l}`})]},`excerpt-${c}`))}):null,t.length>0?y.jsx(V,{flexDirection:"column",marginTop:1,children:s.map(({key:c,trace:l})=>{const d=Ei(l.file)??"";return!l.methodName&&!l.file?y.jsxs(V,{children:[y.jsx(O,{dimColor:!0,children:"- "}),y.jsx(O,{bold:!0,dimColor:!0,children:l.raw})]},c):y.jsxs(V,{children:[y.jsx(O,{dimColor:!0,children:"- "}),y.jsx(O,{bold:!0,dimColor:!0,children:l.methodName??"<anonymous>"}),y.jsxs(O,{"aria-label":`at ${d} line ${l.line} column ${l.column}`,color:"gray",dimColor:!0,children:[" ","(",d,":",l.line,":",l.column,")"]})]},c)})}):null]})}let Mg=class extends S.PureComponent{static displayName="InternalErrorBoundary";static getDerivedStateFromError(t){return{error:t}}state={error:void 0};componentDidCatch(t){this.props.onError(t)}render(){return this.state.error?y.jsx(Dg,{error:this.state.error}):this.props.children}};const oo=S.createContext({activate(){},activeId:void 0,add(){},deactivate(){},disableFocus(){},enableFocus(){},focus(){},focusNext(){},focusPrevious(){},remove(){}});oo.displayName="InternalFocusContext";const Lg=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:Yl,Yl=Lg,Xl=S.createContext({stderr:Yl.stderr,write(){}});Xl.displayName="InternalStderrContext";let _g;const Fg=e=>(_g??=De(import.meta.url))(e),Zt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:Zl,Vg=e=>{if(typeof Zt<"u"&&Zt.versions&&Zt.versions.node){const[t,n]=Zt.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Zt.getBuiltinModule(e)}return Fg(e)},{EventEmitter:Hg}=Vg("node:events"),Zl=Zt,ai=S.createContext({internal_eventEmitter:new Hg,internal_exitOnCtrlC:!0,isRawModeSupported:!1,setBracketedPasteMode(){},setRawMode(){},stdin:Zl.stdin});ai.displayName="InternalStdinContext";const Wg=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:Ql,Ql=Wg,ao=S.createContext({stdout:Ql.stdout,write(){}});ao.displayName="InternalStdoutContext";const Ug={bar:6,"blinking-bar":5,"blinking-block":1,"blinking-underline":3,block:2,default:0,underline:4},ma=e=>mg(Ug[e]),ya=(e,t)=>e?.x!==t?.x||e?.y!==t?.y,ci=(e,t)=>{if(!t)return"";const n=e-t.y;return(n>0?zs(n):"")+oi(t.x)+Xn},ed=(e,t)=>{if(!t)return"";const n=e-1-t.y;return(n>0?ug(n):"")+oi(0)},Gg=e=>{const t=e.cursorWasShown?Yn:"",n=ed(e.previousLineCount,e.previousCursorPosition),s=ci(e.visibleLineCount,e.cursorPosition);return t+n+s},va=(e,t,n)=>e?Yn+ed(t,n):"";let zg;const Jg=e=>(zg??=De(import.meta.url))(e),Cn=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,li=e=>{if(typeof Cn<"u"&&Cn.versions&&Cn.versions.node){const[t,n]=Cn.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Cn.getBuiltinModule(e)}return Jg(e)},{existsSync:ba}=li("node:fs"),{createRequire:qg}=li("node:module"),{dirname:wa,join:ws}=li("node:path"),{fileURLToPath:Kg}=li("node:url"),Yg=12,Xg=e=>{const t=qg(e),n=wa(Kg(e));let s=n;for(let i=0;i<Yg;i+=1){if(ba(ws(s,"package.json"))&&ba(ws(s,"index.js")))return t(ws(s,"index.js"));const r=wa(s);if(r===s)break;s=r}return t(ws(n,"..","index.js"))},ks=new WeakMap,Zg=async(e,t)=>(await e,t()),td=(e,t)=>{const n=ks.get(e),s=n===void 0?t():Zg(n,t);let i;return i=(async()=>{try{await s}catch{}ks.get(e)===i&&ks.delete(e)})(),ks.set(e,i),s};let Qg=class{constructor(t,n){this.target=t,this.contentRect=n}target;contentRect};function em(e,t,n=!1){const s=e.resizeObservers&&e.resizeObservers.size>0;if((s||n)&&e.yogaNode){const i=Math.round(e.yogaNode.getComputedWidth()),r=Math.round(e.yogaNode.getComputedHeight());if(!Number.isNaN(i)&&!Number.isNaN(r)){const o=e.internal_lastMeasuredSize;if((o?.width!==i||o.height!==r)&&(e.internal_lastMeasuredSize={height:r,width:i},s)){const a=new Qg(e,{height:r,width:i});for(const c of e.resizeObservers)t.has(c)||t.set(c,[]),t.get(c).push(a)}}}}let tm;const nm=e=>(tm??=De(import.meta.url))(e),Qt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:dt,co=e=>{if(typeof Qt<"u"&&Qt.versions&&Qt.versions.node){const[t,n]=Qt.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Qt.getBuiltinModule(e)}return nm(e)},dt=Qt,{execFileSync:sm}=co("node:child_process"),Pn=co("node:fs"),im=co("node:tty"),nd=80,sd=24,vr=(e,t,{shell:n,env:s}={})=>sm(e,t,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:500,shell:n,env:s}).trim(),Ns=(e,t)=>({columns:Number.parseInt(e,10),rows:Number.parseInt(t,10)}),id=(e,t)=>{const{columns:n,rows:s}=Ns(e,t);if(!(Number.isNaN(n)||Number.isNaN(s))&&!(n===nd&&s===sd))return{columns:n,rows:s}},rm=()=>{if(dt.platform!=="linux")return!0;try{const e=Pn.readFileSync("/proc/self/stat","utf8"),t=e.lastIndexOf(") ");if(t===-1)return!1;const n=e.slice(t+2).trim().split(/\s+/),s=Number.parseInt(n[2],10),i=Number.parseInt(n[5],10);return Number.isNaN(s)||Number.isNaN(i)||i<=0?!1:s===i}catch{return!1}};function om(){const{env:e,stdout:t,stderr:n}=dt;if(t?.columns&&t?.rows)return Ns(t.columns,t.rows);if(n?.columns&&n?.rows)return Ns(n.columns,n.rows);if(e.COLUMNS&&e.LINES)return Ns(e.COLUMNS,e.LINES);const s={columns:nd,rows:sd};return dt.platform==="win32"?Ci()??s:dt.platform==="darwin"?ka()??Ci()??s:ka()??Ci()??am()??s}const ka=()=>{try{const e=dt.platform==="darwin"?Pn.constants.O_EVTONLY|Pn.constants.O_NONBLOCK:Pn.constants.O_NONBLOCK,{columns:t,rows:n}=im.WriteStream(Pn.openSync("/dev/tty",e));return{columns:t,rows:n}}catch{}},Ci=()=>{try{const e=vr("tput",["cols"],{env:{TERM:"dumb",...dt.env}}),t=vr("tput",["lines"],{env:{TERM:"dumb",...dt.env}});if(e&&t)return id(e,t)}catch{}},am=()=>{try{if(!rm())return;const e=vr("resize",["-u"]).match(/\d+/g);if(e.length===2)return id(e[0],e[1])}catch{}},nt=e=>{const{columns:t,rows:n}=e;if(t&&n)return{columns:t,rows:n};const s=om();return{columns:t||s.columns||80,rows:n||s.rows||24}};let cm;const lm=e=>(cm??=De(import.meta.url))(e),en=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,di=e=>{if(typeof en<"u"&&en.versions&&en.versions.node){const[t,n]=en.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return en.getBuiltinModule(e)}return lm(e)},Ae=en,{env:Ri}=Ae,{PassThrough:Sa,Stream:dm}=di("node:stream"),{Buffer:xa}=di("node:buffer"),{Console:um}=di("node:console"),{EventEmitter:pm}=di("node:events"),$a=e=>e in Ri&&Ri[e]!=="0"&&Ri[e]!=="false",rd=$a("CI")||$a("CONTINUOUS_INTEGRATION"),Ea=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"];let Oi={};const fm=e=>{const t=new Sa,n=new Sa;t.write=i=>{e("stdout",i)},n.write=i=>{e("stderr",i)};const s=new console.Console(t,n);for(const i of Ea)Oi[i]=console[i],console[i]=s[i];return()=>{for(const i of Ea)console[i]=Oi[i];Oi={}}},ln=[];ln.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&ln.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&ln.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Ds=e=>!!e&&!0&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",ji=Symbol.for("signal-exit emitter"),Ti=globalThis,hm=Object.defineProperty.bind(Object);class gm{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Ti[ji])return Ti[ji];hm(Ti,ji,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,n){this.listeners[t].push(n)}removeListener(t,n){const s=this.listeners[t],i=s.indexOf(n);i!==-1&&(i===0&&s.length===1?s.length=0:s.splice(i,1))}emit(t,n,s){if(this.emitted[t])return!1;this.emitted[t]=!0;let i=!1;for(const r of this.listeners[t])i=r(n,s)===!0||i;return t==="exit"&&(i=this.emit("afterExit",n,s)||i),i}}let od=class{};const mm=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}});class ym extends od{onExit(){return()=>{}}load(){}unload(){}}class vm extends od{#e=br.platform==="win32"?"SIGINT":"SIGHUP";#t=new gm;#n;#r;#s;#i={};#o=!1;constructor(t){super(),this.#n=t,this.#i={};for(const n of ln)this.#i[n]=()=>{const s=this.#n.listeners(n);let{count:i}=this.#t;const r=t;if(typeof r.__signal_exit_emitter__=="object"&&typeof r.__signal_exit_emitter__.count=="number"&&(i+=r.__signal_exit_emitter__.count),s.length===i){this.unload();const o=this.#t.emit("exit",null,n),a=n==="SIGHUP"?this.#e:n;o||t.kill(t.pid,a)}};this.#s=t.reallyExit,this.#r=t.emit}onExit(t,n){if(!Ds(this.#n))return()=>{};this.#o===!1&&this.load();const s=n?.alwaysLast?"afterExit":"exit";return this.#t.on(s,t),()=>{this.#t.removeListener(s,t),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(const t of ln)try{const n=this.#i[t];n&&this.#n.on(t,n)}catch{}this.#n.emit=(t,...n)=>this.#c(t,...n),this.#n.reallyExit=t=>this.#a(t)}}unload(){this.#o&&(this.#o=!1,ln.forEach(t=>{const n=this.#i[t];if(!n)throw new Error("Listener not defined for signal: "+t);try{this.#n.removeListener(t,n)}catch{}}),this.#n.emit=this.#r,this.#n.reallyExit=this.#s,this.#t.count-=1)}#a(t){return Ds(this.#n)?(this.#n.exitCode=t||0,this.#t.emit("exit",this.#n.exitCode,null),this.#s.call(this.#n,this.#n.exitCode)):0}#c(t,...n){const s=this.#r;if(t==="exit"&&Ds(this.#n)){typeof n[0]=="number"&&(this.#n.exitCode=n[0]);const i=s.call(this.#n,t,...n);return this.#t.emit("exit",this.#n.exitCode,null),i}else return s.call(this.#n,t,...n)}}const br=globalThis.process,{onExit:bm}=mm(Ds(br)?new vm(br):new ym),Js="\x1B",ad="\x1B[200~",Ca="\x1B[201~",wm=e=>e>=48&&e<=63,km=e=>e>=32&&e<=47,cd=e=>e>=64&&e<=126,Sm=(e,t,n)=>{const s=t+n+1;let i=s;for(;i<e.length;i++){const r=e.codePointAt(i);if(r===void 0)return"pending";if(!(wm(r)||km(r))&&!(r===91&&i===s))return cd(r)?{nextIndex:i+1,sequence:e.slice(t,i+1)}:void 0}return"pending"},xm=(e,t,n)=>{const s=t+n+2;if(s>e.length)return"pending";const i=e.codePointAt(s-1);if(!(i===void 0||!cd(i)))return{nextIndex:s,sequence:e.slice(t,s)}},Ra=(e,t,n)=>{const s=e[t+n];if(s===void 0)return"pending";if(s==="[")return Sm(e,t,n);if(s==="O")return xm(e,t,n)},$m=(e,t)=>{const n=e.codePointAt(t+1),s=n!==void 0&&n>65535?2:1,i=t+1+s;return{nextIndex:i,sequence:e.slice(t,i)}},Em=(e,t)=>{if(t===e.length-1)return"pending";if(e[t+1]===Js){if(t+2>=e.length)return"pending";const s=Ra(e,t,2);return s==="pending"?"pending":s||{nextIndex:t+2,sequence:e.slice(t,t+2)}}const n=Ra(e,t,1);return n==="pending"?"pending":n||$m(e,t)},Oa=(e,t)=>{let n=0;for(let s=0;s<e.length;s++){const i=e[s];(i===""||i==="\b")&&(s>n&&t.push(e.slice(n,s)),t.push(i),n=s+1)}n<e.length&&t.push(e.slice(n))},Cm=e=>{const t=[];let n=0;const s=i=>({events:t,pending:e.slice(i)});for(;n<e.length;){const i=e.indexOf(Js,n);if(i===-1)return Oa(e.slice(n),t),{events:t,pending:""};i>n&&Oa(e.slice(n,i),t);const r=Em(e,i);if(r==="pending")return s(i);if(r.sequence===ad){const o=r.nextIndex,a=e.indexOf(Ca,o);if(a===-1)return s(i);t.push({paste:e.slice(o,a)}),n=a+Ca.length;continue}t.push(r.sequence),n=r.nextIndex}return{events:t,pending:""}},Rm=()=>{let e="";return{flushPendingEscape(){if(!e.startsWith(Js))return;const t=e;return e="",t},hasPendingEscape(){return e.startsWith(Js)&&!e.startsWith(ad)&&e!=="\x1B[200"},push(t){const n=Cm(e+t);return e=n.pending,n.events},reset(){e=""}}},Om=" ",jm="\x1B[Z",Tm="\x1B",ja=Gl(Jl),Ai=zl(Jl),ld=({children:e,exitOnCtrlC:t,interactive:n,onExit:s,onRegisterInputControl:i,onSuspendTerminal:r,onWaitUntilRenderFlush:o,renderThrottleMs:a,setCursorPosition:c,stderr:l,stdin:d,stdout:u,writeToStderr:p,writeToStdout:f})=>{const[h,g]=S.useState(!0),[v,$]=S.useState(void 0),[,b]=S.useState([]),w=S.useRef(0),C=S.useRef([]),A=S.useRef(new Map),P=S.useRef(void 0),N=S.useRef(0),F=S.useRef(!1),H=S.useRef(0),[ee]=S.useState(()=>{const M=new pm;return M.setMaxListeners(1/0),M}),ne=S.useRef(void 0),se=S.useRef(void 0);se.current??=Rm();const re=S.useRef(void 0),oe=S.useRef(!1),L=20,k=S.useCallback(()=>{re.current&&(clearTimeout(re.current),re.current=void 0)},[]),I=S.useCallback(()=>{P.current&&(clearTimeout(P.current),P.current=void 0)},[]),U=S.useCallback(()=>{if(I(),A.current.size===0)return;let M=Number.POSITIVE_INFINITY;for(const X of A.current.values())M=Math.min(M,X.nextDueTime);const Z=Math.max(0,M-performance.now());P.current=setTimeout(()=>{P.current=void 0;const X=performance.now(),pe=[...A.current.values()];for(const $e of pe){if(X<$e.nextDueTime)continue;$e.callback(X);const Bf=X-$e.startTime,Pf=Math.floor(Bf/$e.interval)+1;$e.nextDueTime=$e.startTime+Pf*$e.interval}U()},Z)},[I]),T=S.useCallback((M,Z)=>{const X=performance.now();return A.current.set(M,{callback:M,interval:Z,nextDueTime:X+Z,startTime:X}),U(),{startTime:X,unsubscribe(){if(A.current.delete(M),A.current.size===0){I();return}U()}}},[I,U]);S.useEffect(()=>()=>{I()},[I]);const B=d.isTTY,j=S.useCallback(()=>{ne.current&&(d.removeListener("readable",ne.current),ne.current=void 0)},[d]),_=S.useCallback(()=>{se.current?.reset(),k(),j()},[k,j]),W=S.useCallback(()=>{F.current=!1,d.setRawMode(!1),d.unref(),N.current=0,_()},[d,_]),z=S.useCallback(M=>{B&&(N.current>0||F.current)&&W(),s(M)},[B,W,s]),Y=S.useCallback(M=>{if(M.includes("")&&t){z();return}M===Tm&&h&&$(Z=>{if(!Z)return Z})},[t,z,h]),D=S.useCallback(M=>{Y(M),ee.emit("input",M)},[Y,ee]),K=S.useCallback(()=>{k(),re.current=setTimeout(()=>{re.current=void 0;const M=se.current.flushPendingEscape();M&&D(M)},L)},[k,D]),ae=S.useCallback(()=>{k();let M;for(;(M=d.read())!==null;){const Z=se.current.push(M);for(const X of Z)if(typeof X=="string")D(X);else{if(ee.listenerCount("paste")===0){oe.current||(oe.current=!0,p(`Warning: useInput() received bracketed paste because no usePaste() handler is active. This fallback is deprecated and will be removed in the next major version. Migrate paste handling to usePaste().
2
2
  `)),D(X.paste);continue}ee.emit("paste",X.paste)}}se.current.hasPendingEscape()&&K()},[d,D,k,K,p,ee]),le=S.useCallback(()=>{ne.current||(ne.current=ae,d.addListener("readable",ae))},[d,ae]),ge=S.useCallback(M=>{if(!B)throw d===Ae.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
3
3
  Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink.
4
4
  Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(d.setEncoding("utf8"),M){if(N.current===0){const Z=F.current;F.current=!1,Z||(d.ref(),d.setRawMode(!0)),le()}N.current++;return}N.current!==0&&--N.current===0&&(_(),F.current=!0,queueMicrotask(()=>{F.current&&W()}))},[B,d,le,_,W]),Se=S.useCallback(M=>{if(u.isTTY){if(M){H.current===0&&u.write(ja),H.current++;return}H.current!==0&&--H.current===0&&u.write(Ai)}},[u]),xe=S.useRef({bracketedPaste:!1,rawMode:!1}),$t=S.useCallback(()=>{const M=B&&(N.current>0||F.current),Z=H.current>0;xe.current={bracketedPaste:Z,rawMode:M},Z&&u.isTTY&&u.write(Ai),M&&(F.current=!1,_(),d.setRawMode(!1),d.unref())},[B,u,d,_]),Go=S.useCallback(()=>{const{bracketedPaste:M,rawMode:Z}=xe.current;Z&&(d.ref(),d.setRawMode(!0),d.setEncoding("utf8"),le()),M&&u.isTTY&&u.write(ja)},[d,u,le]);S.useEffect(()=>{i($t,Go)},[i,$t,Go]);const zo=S.useCallback((M,Z)=>{const X=M.findIndex(pe=>pe.id===Z);for(let pe=X+1;pe<M.length;pe++){const $e=M[pe];if($e?.isActive)return $e.id}},[]),Jo=S.useCallback((M,Z)=>{const X=M.findIndex(pe=>pe.id===Z);for(let pe=X-1;pe>=0;pe--){const $e=M[pe];if($e?.isActive)return $e.id}},[]),vs=S.useCallback(()=>{const M=C.current;$(Z=>{const X=M.find(pe=>pe.isActive)?.id;return zo(M,Z)??X})},[zo]),bs=S.useCallback(()=>{const M=C.current;$(Z=>{const X=M.findLast(pe=>pe.isActive)?.id;return Jo(M,Z)??X})},[Jo]);S.useEffect(()=>{const M=X=>{!h||w.current===0||(X===Om&&vs(),X===jm&&bs())};ee.on("input",M);const Z=ee;return()=>{Z.off("input",M)}},[h,vs,bs,ee]);const qo=S.useCallback(()=>{g(!0)},[]),Ko=S.useCallback(()=>{g(!1)},[]),Yo=S.useCallback(M=>{C.current.some(Z=>Z?.id===M)&&$(M)},[]),Xo=S.useCallback((M,{autoFocus:Z})=>{const X=[...C.current,{id:M,isActive:!0}];w.current=X.length,C.current=X,b(X),Z&&$(pe=>pe||M)},[]),Zo=S.useCallback(M=>{$(X=>{if(X!==M)return X});const Z=C.current.filter(X=>X.id!==M);w.current=Z.length,C.current=Z,b(Z)},[]),Qo=S.useCallback(M=>{const Z=C.current.map(X=>X.id!==M?X:{id:M,isActive:!0});C.current=Z,b(Z)},[]),ea=S.useCallback(M=>{$(X=>{if(X!==M)return X});const Z=C.current.map(X=>X.id!==M?X:{id:M,isActive:!1});C.current=Z,b(Z)},[]);S.useEffect(()=>()=>{const M=!u.destroyed&&!u.writableEnded;n&&M&&u.write(Xn),B&&(N.current>0||F.current)&&W(),H.current>0&&(u.isTTY&&M&&u.write(Ai),H.current=0)},[u,B,W,n]);const Cf=S.useMemo(()=>({exit:z,suspendTerminal:r,waitUntilRenderFlush:o}),[z,r,o]),Rf=S.useMemo(()=>({internal_eventEmitter:ee,internal_exitOnCtrlC:t,isRawModeSupported:B,setBracketedPasteMode:Se,setRawMode:ge,stdin:d}),[d,ge,Se,B,t,ee]),Of=S.useMemo(()=>({stdout:u,write:f}),[u,f]),jf=S.useMemo(()=>({stderr:l,write:p}),[l,p]),Tf=S.useMemo(()=>({setCursorPosition:c}),[c]),Af=S.useMemo(()=>({activate:Qo,activeId:v,add:Xo,deactivate:ea,disableFocus:Ko,enableFocus:qo,focus:Yo,focusNext:vs,focusPrevious:bs,remove:Zo}),[v,Xo,Zo,Qo,ea,qo,Ko,vs,bs,Yo]),If=S.useMemo(()=>({renderThrottleMs:a,subscribe:T}),[T,a]);return y.jsx(ro.Provider,{value:Cf,children:y.jsx(ai.Provider,{value:Rf,children:y.jsx(ao.Provider,{value:Of,children:y.jsx(Xl.Provider,{value:jf,children:y.jsx(oo.Provider,{value:Af,children:y.jsx(ql.Provider,{value:If,children:y.jsx(Kl.Provider,{value:Tf,children:y.jsx(Mg,{onError:z,children:e})})})})})})})})};ld.displayName="InternalApp";const Am=(e,t,n)=>{if(n<=0||!e.yogaNode)return"";const{yogaNode:s}=e,i=s.getComputedBorder(Ge.EDGE_LEFT),r=s.getComputedBorder(Ge.EDGE_RIGHT),o=s.getComputedBorder(Ge.EDGE_TOP),a=s.getComputedPadding(Ge.EDGE_LEFT),c=s.getComputedPadding(Ge.EDGE_RIGHT),l=s.getComputedPadding(Ge.EDGE_TOP),d=Math.round(s.getComputedWidth()-i-r-a-c);if(d<=0)return"";const u=new eh({height:n,width:d}),p=-(e.internal_scrollState?.scrollLeft??0)-i-a,f=-t-o-l;for(const h of e.childNodes)th(h,u,{absoluteOffsetX:p,absoluteOffsetY:f,offsetX:p,offsetY:f,skipStaticElements:!1});return u.get().output},wr=new WeakMap,qt=e=>e??"default",Im=()=>{let e,t;return{consumeDelta:()=>{if(qt(t)===qt(e))return"";const n=qt(t);return e=t,ma(n)},consumeRestoreOnDone:()=>{const n=qt(e)!=="default";return e=void 0,t=void 0,n?ma("default"):""},isDirty:()=>qt(t)!==qt(e),setPending:n=>{t=n}}},Qn=(e,t)=>t.endsWith(`
@@ -1 +1 @@
1
- import{createTaskGraph as $}from"@visulima/task-runner";import{d as b,b as O}from"./catalog.js";import{f as P}from"../packem_shared/project-name-filter-eprMebpE.js";import{r as S,f as E,a as G}from"../packem_shared/selectors-B7lSFz7l.js";const T=(l,s,t)=>{const a=[],e=new Set,n=(r,u)=>{if(e.has(r))return;e.add(r);const m=s[r]??[];for(const d of m)n(d,u+1);const o=t[r],h=" ".repeat(u);a.push(`${h}${r}${o?.cache===!1?" (no-cache)":""}`)};for(const r of l)n(r,0);return a},x=(l,s,t)=>({roots:l,tasks:Object.fromEntries(Object.entries(t).map(([a,e])=>[a,{cache:e.cache,dependsOn:s[a]??[],outputs:e.outputs,parallelism:e.parallelism,projectRoot:e.projectRoot,target:e.target}]))}),C=async({argument:l,logger:s,options:t,process:a,visConfig:e,workspaceRoot:n})=>{const r=l[0];if(!r)throw new Error("Missing selector. Usage: vis action-graph <selector>");if(!n)throw new Error("Could not determine workspace root. Run inside a monorepo.");const{config:u,packageJsons:m,workspace:o}=b(n,e),h=O(n,o,m),d=await S(r,o,a.cwd,n),{target:f}=d;let i=d.projects;t.projects!==void 0&&(i=P(i,String(t.projects),Object.keys(o.projects))),t.query&&(i=E(i,o,t.query)),i=G(i,o,t.tag);const k=i.filter(p=>o.projects[p]?.targets?.[f]!==void 0);if(k.length===0){s.info(`No projects have a "${f}" target.`);return}const y=k.map(p=>{const g=o.projects[p],j=g.targets?.[f],v={project:p,target:f};return{cache:j?.cache,id:`${p}:${f}`,outputs:j?.outputs??[],overrides:{command:j?.command},parallelism:j?.parallelism,projectRoot:g.root,target:v}}),c=$(y,{projectGraph:h,targetDefaults:u.tasks,workspace:o});if(t.json){s.info(JSON.stringify(x(c.roots,c.dependencies,c.tasks),null,2));return}const w=T(c.roots,c.dependencies,c.tasks);s.info(`Execution plan (${Object.keys(c.tasks).length} task(s), ${c.roots.length} root(s)):`),s.info("");for(const p of w)s.info(p)};export{C as default};
1
+ import{createTaskGraph as $}from"@visulima/task-runner";import{d as b,b as O}from"./catalog.js";import{f as P}from"../packem_shared/project-name-filter-DfqnrCub.js";import{r as S,f as E,a as G}from"../packem_shared/selectors-B7lSFz7l.js";const T=(l,s,t)=>{const a=[],e=new Set,n=(r,u)=>{if(e.has(r))return;e.add(r);const m=s[r]??[];for(const d of m)n(d,u+1);const o=t[r],h=" ".repeat(u);a.push(`${h}${r}${o?.cache===!1?" (no-cache)":""}`)};for(const r of l)n(r,0);return a},x=(l,s,t)=>({roots:l,tasks:Object.fromEntries(Object.entries(t).map(([a,e])=>[a,{cache:e.cache,dependsOn:s[a]??[],outputs:e.outputs,parallelism:e.parallelism,projectRoot:e.projectRoot,target:e.target}]))}),C=async({argument:l,logger:s,options:t,process:a,visConfig:e,workspaceRoot:n})=>{const r=l[0];if(!r)throw new Error("Missing selector. Usage: vis action-graph <selector>");if(!n)throw new Error("Could not determine workspace root. Run inside a monorepo.");const{config:u,packageJsons:m,workspace:o}=b(n,e),h=O(n,o,m),d=await S(r,o,a.cwd,n),{target:f}=d;let i=d.projects;t.projects!==void 0&&(i=P(i,String(t.projects),Object.keys(o.projects))),t.query&&(i=E(i,o,t.query)),i=G(i,o,t.tag);const k=i.filter(p=>o.projects[p]?.targets?.[f]!==void 0);if(k.length===0){s.info(`No projects have a "${f}" target.`);return}const y=k.map(p=>{const g=o.projects[p],j=g.targets?.[f],v={project:p,target:f};return{cache:j?.cache,id:`${p}:${f}`,outputs:j?.outputs??[],overrides:{command:j?.command},parallelism:j?.parallelism,projectRoot:g.root,target:v}}),c=$(y,{projectGraph:h,targetDefaults:u.tasks,workspace:o});if(t.json){s.info(JSON.stringify(x(c.roots,c.dependencies,c.tasks),null,2));return}const w=T(c.roots,c.dependencies,c.tasks);s.info(`Execution plan (${Object.keys(c.tasks).length} task(s), ${c.roots.length} root(s)):`),s.info("");for(const p of w)s.info(p)};export{C as default};
@@ -1,3 +1,3 @@
1
- import{createRequire as u}from"node:module";import{g as m}from"../packem_shared/package-version-CuJee7dB.js";let a;const f=t=>(a??=u(import.meta.url))(t),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,d=t=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[e,s]=r.versions.node.split(".").map(Number);if(e>22||e===22&&s>=3||e===20&&s>=16)return r.getBuiltinModule(t)}return f(t)},{execSync:l,spawnSync:p}=d("node:child_process"),y=async({argument:t,logger:e,options:s})=>{const o=t?.[0];e.info("info: checking for updates...");const i=m();let n;try{const c=l("npm view @visulima/vis version",{encoding:"utf8"}).trim();n=o??c}catch{throw new Error("Failed to query npm registry. Check your network connection.")}if(i===n&&!s.force){e.info(`
1
+ import{createRequire as u}from"node:module";import{g as m}from"../packem_shared/package-version-BdIBhdr7.js";let a;const f=t=>(a??=u(import.meta.url))(t),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,d=t=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[e,s]=r.versions.node.split(".").map(Number);if(e>22||e===22&&s>=3||e===20&&s>=16)return r.getBuiltinModule(t)}return f(t)},{execSync:l,spawnSync:p}=d("node:child_process"),y=async({argument:t,logger:e,options:s})=>{const o=t?.[0];e.info("info: checking for updates...");const i=m();let n;try{const c=l("npm view @visulima/vis version",{encoding:"utf8"}).trim();n=o??c}catch{throw new Error("Failed to query npm registry. Check your network connection.")}if(i===n&&!s.force){e.info(`
2
2
  ✓ Already up to date (${i})`);return}if(s.check){i===n?e.info(`✓ Already up to date (${i})`):e.info(`info: found @visulima/vis@${n} (current: ${i})`);return}if(e.info(`info: found @visulima/vis@${n} (current: ${i})`),e.info("info: installing..."),p("npm",["install","-g",`@visulima/vis@${n}`],{encoding:"utf8",stdio:"inherit"}).status!==0)throw new Error("Failed to update. Try running with sudo or fix npm permissions.");e.info(`
3
3
  ✓ Updated @visulima/vis from ${i} → ${n}`)};export{y as default};
@@ -1,3 +1,3 @@
1
- import{d as h,b as j}from"./catalog.js";import{V as n}from"../packem_shared/vis-user-error-C8HBoCLE.js";import{s as k}from"../packem_shared/affected-selection-qsJRfp6I.js";import{f as P,a as y}from"../packem_shared/selectors-B7lSFz7l.js";const b=(r,e)=>{if(r.length>0)return[...r];const s=e.indexOf("affected",2);return s===-1?[]:e.slice(s+1)},G=async({argument:r,options:e,process:s,rawArgv:u,runtime:g,visConfig:d,workspaceRoot:f})=>{if(!r[0])throw new n("Missing target. Usage: vis affected <target>");if(!f)throw new n("Could not determine workspace root. Run this command inside a monorepo.");if(e.sparseCheckout){const o=f,{packageJsons:p,workspace:t}=h(o,d),l=j(o,t,p),w=await k({base:e.base,downstream:e.downstream,head:e.head,uncommitted:e.uncommitted,upstream:e.upstream},{projectGraph:l,projects:t.projects,workspaceRoot:o},{defaultBase:d?.defaultBase});let c=P(w.affectedProjects,t,e.query);c=y(c,t,e.tag);const i=[...new Set(c.map(m=>t.projects[m]?.root??m))].sort();process.stdout.write(i.length>0?`${i.join(`
1
+ import{d as h,b as j}from"./catalog.js";import{V as n}from"../packem_shared/vis-user-error-Um2Qg_C1.js";import{s as k}from"../packem_shared/affected-selection-DZfFEb-u.js";import{f as P,a as y}from"../packem_shared/selectors-B7lSFz7l.js";const b=(r,e)=>{if(r.length>0)return[...r];const s=e.indexOf("affected",2);return s===-1?[]:e.slice(s+1)},G=async({argument:r,options:e,process:s,rawArgv:u,runtime:g,visConfig:d,workspaceRoot:f})=>{if(!r[0])throw new n("Missing target. Usage: vis affected <target>");if(!f)throw new n("Could not determine workspace root. Run this command inside a monorepo.");if(e.sparseCheckout){const o=f,{packageJsons:p,workspace:t}=h(o,d),l=j(o,t,p),w=await k({base:e.base,downstream:e.downstream,head:e.head,uncommitted:e.uncommitted,upstream:e.upstream},{projectGraph:l,projects:t.projects,workspaceRoot:o},{defaultBase:d?.defaultBase});let c=P(w.affectedProjects,t,e.query);c=y(c,t,e.tag);const i=[...new Set(c.map(m=>t.projects[m]?.root??m))].sort();process.stdout.write(i.length>0?`${i.join(`
2
2
  `)}
3
3
  `:"");return}const a=b(u??[],s?.argv??[]);if(a.length===0)throw new n("Missing target. Usage: vis affected <target>");await g.runCommand("run",{argv:a.includes("--affected")?a:[...a,"--affected"]})};export{G as default,b as forwardedArgv};
@@ -1,4 +1,4 @@
1
- import{createRequire as D}from"node:module";import{V as q}from"../packem_shared/vis-user-error-C8HBoCLE.js";let W;const L=e=>(W??=D(import.meta.url))(e),R=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,E=e=>{if(typeof R<"u"&&R.versions&&R.versions.node){const[t,n]=R.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return R.getBuiltinModule(e)}return L(e)},{relative:h,join:u,dirname:_}=E("node:path"),{lstat:G}=E("node:fs/promises"),U=new Set(["ENOENT","ENOTDIR"]),$=e=>U.has(e?.code??""),T=async(e,t)=>{const n=e.lstat;try{return(typeof n=="function"?await n.call(e,t):await G(t)).isSymbolicLink()}catch(i){if($(i))return!1;throw i}},v=async(e,t,n)=>{if(await T(e,t))throw new q(`Refusing to write ${t}: it is a symlink, and following it would write somewhere else. Remove or replace the link, then re-run.`);await e.writeFile(t,n)},g=async(e,t)=>{try{return await e.access(t),!0}catch(n){if($(n))return!1;throw n}},Y=async(e,t)=>{try{return(await e.stat(t)).isDirectory()}catch(n){if($(n))return!1;throw n}},b=async(e,t)=>{try{return await e.readFile(t,"utf8")}catch(n){if($(n))return;throw n}},K=e=>{const t=/\n([\t ]+)\S/.exec(e);return t?.[1]!==void 0?t[1]:e.includes(`
1
+ import{createRequire as D}from"node:module";import{V as q}from"../packem_shared/vis-user-error-Um2Qg_C1.js";let W;const L=e=>(W??=D(import.meta.url))(e),R=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,E=e=>{if(typeof R<"u"&&R.versions&&R.versions.node){const[t,n]=R.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return R.getBuiltinModule(e)}return L(e)},{relative:h,join:u,dirname:_}=E("node:path"),{lstat:G}=E("node:fs/promises"),U=new Set(["ENOENT","ENOTDIR"]),$=e=>U.has(e?.code??""),T=async(e,t)=>{const n=e.lstat;try{return(typeof n=="function"?await n.call(e,t):await G(t)).isSymbolicLink()}catch(i){if($(i))return!1;throw i}},v=async(e,t,n)=>{if(await T(e,t))throw new q(`Refusing to write ${t}: it is a symlink, and following it would write somewhere else. Remove or replace the link, then re-run.`);await e.writeFile(t,n)},g=async(e,t)=>{try{return await e.access(t),!0}catch(n){if($(n))return!1;throw n}},Y=async(e,t)=>{try{return(await e.stat(t)).isDirectory()}catch(n){if($(n))return!1;throw n}},b=async(e,t)=>{try{return await e.readFile(t,"utf8")}catch(n){if($(n))return;throw n}},K=e=>{const t=/\n([\t ]+)\S/.exec(e);return t?.[1]!==void 0?t[1]:e.includes(`
2
2
  `)?" ":""},V=(e,t)=>{const n=t.includes(`\r
3
3
  `)?`\r
4
4
  `:`
@@ -1,4 +1,4 @@
1
- import{a as q,b as J,p as f,O as G,c as T,d as O}from"./cli-main.js";import{l as H,r as K,t as m,c as Q,k as W,R as c,E as X,m as y,n as P,o as Z,s as _}from"./catalog.js";import{i as ee}from"../packem_shared/index-BjdW45xX.js";import{v as te,r as se,f as re}from"../packem_shared/ai-analysis-DSQQDFU9.js";import{V as ae}from"../packem_shared/vis-user-error-C8HBoCLE.js";import{d as ne}from"../packem_shared/pm-runner-d93_73O6.js";import{s as oe}from"../packem_shared/formatBytes-BHAzNIrn-Bkk_uRS-.js";import{U as ce,V as ie,C as j}from"../packem_shared/vis-update-app-DNeU8RBQ.js";const we=async({argument:$,logger:s,options:e,visConfig:o,workspaceRoot:C})=>{if(!C)throw new Error("Could not determine workspace root. Run this command inside a monorepo.");const d=C;if(e.sync&&!e.securityConfig)throw new ae("--sync requires --security-config. Run `vis check --security-config --sync`.");if(e.securityConfig){const t=ne(d);if(q(o??{},t.name),e.sync&&t.name==="pnpm"){const r=J(o??{});if(r.length>0){f.info(`
1
+ import{a as q,b as J,p as f,O as G,c as T,d as O}from"./cli-main.js";import{l as H,r as K,t as m,c as Q,k as W,R as c,E as X,m as y,n as P,o as Z,s as _}from"./catalog.js";import{i as ee}from"../packem_shared/index-BjdW45xX.js";import{v as te,r as se,f as re}from"../packem_shared/ai-analysis-DSQQDFU9.js";import{V as ae}from"../packem_shared/vis-user-error-Um2Qg_C1.js";import{d as ne}from"../packem_shared/pm-runner-d93_73O6.js";import{s as oe}from"../packem_shared/formatBytes-BHAzNIrn-Bkk_uRS-.js";import{U as ce,V as ie,C as j}from"../packem_shared/vis-update-app-DNeU8RBQ.js";const we=async({argument:$,logger:s,options:e,visConfig:o,workspaceRoot:C})=>{if(!C)throw new Error("Could not determine workspace root. Run this command inside a monorepo.");const d=C;if(e.sync&&!e.securityConfig)throw new ae("--sync requires --security-config. Run `vis check --security-config --sync`.");if(e.securityConfig){const t=ne(d);if(q(o??{},t.name),e.sync&&t.name==="pnpm"){const r=J(o??{});if(r.length>0){f.info(`
2
2
  Settings that would sync to pnpm-workspace.yaml:`);for(const S of r)f.success(` ${S}`)}else f.info("No security settings to sync.")}else e.sync&&t.name!=="pnpm"&&(f.info(`--sync is only available for pnpm projects. Your project uses ${t.name}.`),f.info("vis enforces security settings at the vis layer for non-pnpm projects."));if(!e.security&&!$?.length)return}const{packageManager:N}=G(d),U=H(d),i=o?.update??{},h=K(d,N,{dev:e.dev,includeInternal:e["include-internal"],peer:e.peer,prod:e.prod});if(h.size===0){s.info("No catalogs found.");return}const k=e.target??i.target??"latest";if(!["latest","minor","patch"].includes(k))throw new Error(`Invalid target "${k}". Use: latest, minor, or patch.`);const D={exclude:[...m(e.exclude),...m(i.exclude)],ignore:m(i.ignore),include:[...m(e.include),...m(i.include),...$],includeLocked:!!e.includeLocked,includePrerelease:e.prerelease||i.prerelease||!1,security:e.security!==!1,target:k};let x=0;for(const t of h.values())x+=t.size;const w=!!process.stdout.isTTY&&!ee;let l;const I=w?(t,r)=>{l?l.rerender(c.createElement(j,{current:t,total:r})):l=O(c.createElement(j,{current:t,total:r}),{interactive:!0,patchConsole:!1})}:(t,r)=>{s.info(`Checking ${String(t)}/${String(r)} dependencies...`)};w||s.info(`Checking ${String(x)} catalog dependencies against npm registry...
3
3
  `);const g=new Set;T("socket")&&g.add("socket"),T("depsDev")&&g.add("deps-dev");const v=o?.security?.policies?.score?.minimum,M=Q(o?.security,{disabled:g,minimumScore:v}),{failed:E,outdated:n}=await W(h,D,U,I,d,M,o?.security?.acceptedRisks);if(l&&(l.clear(),l.unmount()),E.length>0&&s.warn(`Failed to fetch: ${E.join(", ")}`),n.length===0){s.info("All catalog dependencies are up to date.");return}const R=e.format??i.format??"table",V=te(e.aiType??"impact"),u=e.ai?await se(n,s,o?.ai,V):void 0;if(w&&R==="table"){const t=new ce(n,u??null),r=o?.tui?.autoExit??!1,S=r===!0?3:typeof r=="number"?r:0;await O(c.createElement(ie,{autoExitSeconds:S,isDryRun:!0,store:t}),{alternateScreen:!0,exitOnCtrlC:!1,interactive:!0,patchConsole:!0}).waitUntilExit();const B=process.stdout.columns||80;process.stdout.write(`
4
4
  `);for(const a of n){const Y=a.vulnerabilities?.length||a.socketReport&&a.socketReport.alerts.length>0,b=!!a.acceptedRisk,z=Y?b?"✓":"⚠":"✓",F=b?"gray":a.updateType==="major"?"red":a.updateType==="minor"?"yellow":"green",p=a.socketReport?.score.overall,L=p===void 0?"":` [${String(Math.round(p*100))}%]`,A=p===void 0?void 0:oe(p);process.stdout.write(`${X(c.createElement(y,null," ",c.createElement(y,{color:F},z),` ${a.packageName} ${a.currentRange} → ${a.newRange}`,c.createElement(y,{dimColor:!0},` ${a.updateType}`),A?c.createElement(y,{color:A},L):null),{columns:B})}
@@ -1,4 +1,4 @@
1
- import{createRequire as ae}from"node:module";import{e as h,z as O}from"../packem_shared/index-DHD8wb6Z.js";import{V as J}from"../packem_shared/vis-user-error-C8HBoCLE.js";import{ab as z,ac as he,ad as X,ae as R,af as me,ag as pe,ah as ke,ai as $e,aj as j,ak as we,al as Y,am as Q,an as Z,ao as ee,ap as te}from"./cli-main.js";import{y as b}from"../packem_shared/isAccessibleSync-DYKTrrvc-CSnBISfV.js";import{m as Ee}from"./ts-loader.js";import{L as ye}from"../packem_shared/index-BisalDCf.js";import{F as ve}from"./catalog.js";import{allKnownTags as Se,tagsFromPaths as Re,NATIVE_BINDING_VERSION as G}from"#native";import{h as ne}from"../packem_shared/writeFileSync-DJoHk3Ks-CgQ-VNNT.js";let ce;const fe=e=>(ce??=ae(import.meta.url))(e),x=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,F=e=>{if(typeof x<"u"&&x.versions&&x.versions.node){const[t,n]=x.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return x.getBuiltinModule(e)}return fe(e)},{readdirSync:q,statSync:M,readFileSync:I,existsSync:T,writeFileSync:y,unlinkSync:le,rmSync:ue,chmodSync:de}=F("node:fs"),{cwd:A}=x,{createInterface:ge}=F("node:readline"),{spawnSync:E}=F("node:child_process"),{basename:be}=F("node:path"),_e=/^# ([^:\s]\S*)(?::\s+(.+))?$/,xe=e=>{const t=[],n=e.split(`
1
+ import{createRequire as ae}from"node:module";import{e as h,z as O}from"../packem_shared/index-DHD8wb6Z.js";import{V as J}from"../packem_shared/vis-user-error-Um2Qg_C1.js";import{ab as z,ac as he,ad as X,ae as R,af as me,ag as pe,ah as ke,ai as $e,aj as j,ak as we,al as Y,am as Q,an as Z,ao as ee,ap as te}from"./cli-main.js";import{y as b}from"../packem_shared/isAccessibleSync-DYKTrrvc-CSnBISfV.js";import{m as Ee}from"./ts-loader.js";import{L as ye}from"../packem_shared/index-BisalDCf.js";import{F as ve}from"./catalog.js";import{allKnownTags as Se,tagsFromPaths as Re,NATIVE_BINDING_VERSION as G}from"#native";import{h as ne}from"../packem_shared/writeFileSync-DJoHk3Ks-CgQ-VNNT.js";let ce;const fe=e=>(ce??=ae(import.meta.url))(e),x=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,F=e=>{if(typeof x<"u"&&x.versions&&x.versions.node){const[t,n]=x.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return x.getBuiltinModule(e)}return fe(e)},{readdirSync:q,statSync:M,readFileSync:I,existsSync:T,writeFileSync:y,unlinkSync:le,rmSync:ue,chmodSync:de}=F("node:fs"),{cwd:A}=x,{createInterface:ge}=F("node:readline"),{spawnSync:E}=F("node:child_process"),{basename:be}=F("node:path"),_e=/^# ([^:\s]\S*)(?::\s+(.+))?$/,xe=e=>{const t=[],n=e.split(`
2
2
  `);let s;for(const o of n){if(o.startsWith("#!")||o.startsWith("# Generated by")||o.startsWith("# NOTE:")||o==="set -e"||o==="")continue;const i=_e.exec(o);if(i){s&&t.push(s),s={command:"",id:i[1]??"",...i[2]?{name:i[2]}:{}};continue}s?s.command=s.command.length>0?`${s.command}
3
3
  ${o}`:o:s={command:o,id:"(custom)"}}return s&&t.push(s),t},Ae=(e,t)=>{const n=h(e,t),s=[],o=new Set(z);if(b(n))for(const i of q(n)){if(i.startsWith(".")||i==="_"||!o.has(i))continue;const r=h(n,i);if(!M(r).isFile())continue;const c=O(r),a=xe(c);s.push({blocks:a,rawLineCount:c.split(`
4
4
  `).length,stage:i})}return s.sort((i,r)=>i.stage.localeCompare(r.stage)),{hooksDirectory:t,stages:s}},Ie=e=>{const t=[];if(e.stages.length===0)return t.push(`No hooks installed in ${e.hooksDirectory}/.`),t;t.push(`Hooks in ${e.hooksDirectory}/:`);for(const n of e.stages)if(t.push("",`${n.stage} (${n.rawLineCount} lines)`),n.blocks.length===0)t.push(" (empty)");else for(const s of n.blocks){const o=s.name?`${s.id} — ${s.name}`:s.id;t.push(` - ${o}`);const i=s.command.split(`
@@ -1,4 +1,4 @@
1
- import{createRequire as rr}from"node:module";import{e as ue,m as Ss,$ as or,a as cr,z as ar}from"../packem_shared/index-DHD8wb6Z.js";import{expandAffected as lr,getChangedFiles as dr,buildEnhancedPath as ur,enforceProjectConstraints as fr,expandTokensInString as zt,parsePartition as hr,TaskScheduler as pr,createTaskGraph as mr,reverseTaskGraph as gr,resolveTurboEnvCompat as wr,CompositeLifeCycle as Yt,defaultTaskRunner as Kt,TerminalBuffer as yt,runConcurrently as tt,createLogReporter as vr,generateRunSummary as Xt,writeRunSummary as yr,readLastRunSummary as xr,getLastRunSummaryPath as jr,writeChromeTrace as kr}from"@visulima/task-runner";import{i as Ye}from"../packem_shared/index-BjdW45xX.js";import{U as Ts,W as br,T as Sr,v as Jt,X as Tr,Y as $r,d as Ir,Z as Cr,ar as Er,as as Rr,at as Pr,au as Mr,k as Fr,av as Or}from"./cli-main.js";import{u as U,y as n,X as g,m as a,E as me,R as J,w as Ar,d as Lr,b as Dr,Q as Br}from"./catalog.js";import{V as Ke}from"../packem_shared/vis-user-error-C8HBoCLE.js";import{d as _r,r as Nr}from"../packem_shared/lockfile-DVFySxTS.js";import{y as $s}from"../packem_shared/index-BisalDCf.js";import{F as Yr}from"../packem_shared/failure-log-DE_MJCzB.js";import{r as Kr}from"../packem_shared/command-runtime-CiLVo4ED.js";import{r as Xr}from"../packem_shared/toolchain-DY11tPCw.js";import{i as Jr,r as Qr,s as Zr,a as en,b as tn,c as sn,d as rn,e as nn,H as on,f as cn}from"../packem_shared/lifecycle-DW8KRF5d.js";import{s as an}from"../packem_shared/affected-selection-qsJRfp6I.js";import{c as Zt,p as ln,a as dn,b as un,r as fn,f as hn,s as pn}from"../packem_shared/project-name-filter-eprMebpE.js";import{p as mn,r as gn,f as wn,a as vn}from"../packem_shared/selectors-B7lSFz7l.js";import{r as at,l as jt,d as yn,s as xn,m as jn,a as kn}from"../packem_shared/target-options-d_rIrLyq.js";import{T as Is,C as Cs,D as lt,E as Es}from"../packem_shared/symbols-BXDZ_sKt.js";import{q as In,j as Cn,X as ht,F as ts}from"../packem_shared/index.server-sXNQYpsl.js";import{parseStacktrace as En,codeFrame as Rn}from"@visulima/error";import{originalPositionFor as Pn,sourceContentFor as Mn,loadSourceMap as Fn}from"@visulima/source-map";import{l as Rs}from"../packem_shared/spinner-BM_0Bj6x.js";import{R as Bn,c as st}from"../packem_shared/formatBytes-BHAzNIrn-Bkk_uRS-.js";import{c as ss,a as _n,s as rs}from"../packem_shared/watch-Dswvj6Zp.js";import gt from"./index.js";import{U as Ps}from"../packem_shared/writeFileSync-DJoHk3Ks-CgQ-VNNT.js";let nr;const ir=s=>(nr??=rr(import.meta.url))(s),ze=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Pe=s=>{if(typeof ze<"u"&&ze.versions&&ze.versions.node){const[e,t]=ze.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ze.getBuiltinModule(s)}return ir(s)},{existsSync:De,mkdirSync:Gr,writeFileSync:xt,readFileSync:We,openSync:Wr,statSync:Qt,readSync:Hr,closeSync:qr,mkdtempSync:Vr}=Pe("node:fs"),{createInterface:Ur,emitKeypressEvents:zr}=Pe("node:readline"),{isAbsolute:bn,resolve:es,dirname:Sn,relative:Tn}=Pe("node:path"),{fileURLToPath:$n}=Pe("node:url"),{createHash:On}=Pe("node:crypto"),{mkdir:An,appendFile:dt}=Pe("node:fs/promises"),{platform:Ln,homedir:kt,tmpdir:Dn}=Pe("node:os"),{spawn:Nn}=Pe("node:child_process"),Gn=27,Wn={95:"apc",80:"dcs",94:"pm",88:"sos"},Hn={159:"apc",144:"dcs",158:"pm",152:"sos"},Ms=s=>s===155||s===157||s===144||s===152||s===158||s===159,Fs=(s,e)=>{for(let t=e;t<s.length;t+=1){const r=s.codePointAt(t);if(r>=64&&r<=126)return t}return-1},rt=(s,e,t)=>{for(let r=e;r<s.length;r+=1){const c=s.codePointAt(r);if(c===156||t&&c===7)return r;if(c===27&&s.codePointAt(r+1)===92)return r+1}return-1},qn=(s,e)=>{const t=s.codePointAt(e+1);if(t===91){const r=Fs(s,e+2);return r===-1?void 0:{end:r,kind:"csi"}}if(t===93){const r=rt(s,e+2,!0);return r===-1?void 0:{end:r,kind:"osc"}}if(t===80||t===88||t===94||t===95){const r=rt(s,e+2,!1),c=Wn[t];return r===-1?void 0:{end:r,kind:c}}return t===void 0?void 0:{end:e+1,kind:"escape"}},Vn=(s,e)=>{const t=s.codePointAt(e);if(t===155){const r=Fs(s,e+1);return r===-1?void 0:{end:r,kind:"csi"}}if(t===157){const r=rt(s,e+1,!0);return r===-1?void 0:{end:r,kind:"osc"}}if(t===144||t===152||t===158||t===159){const r=rt(s,e+1,!1),c=Hn[t];return r===-1?void 0:{end:r,kind:c}}},Un=s=>{if(s.includes(String.fromCodePoint(27)))return!0;for(let e=0;e<s.length;e+=1)if(Ms(s.codePointAt(e)))return!0;return!1},zn=s=>{if(!Un(s))return s;let e="",t=0,r=0;const{length:c}=s;for(;r<c;){const o=s.codePointAt(r);let i;if(o===Gn)i=qn(s,r);else if(Ms(o))i=Vn(s,r);else{r+=1;continue}const d=i===void 0?c-1:i.end;e+=s.slice(t,r),t=d+1,r=d+1}return e+=s.slice(t),e},Yn=(s,e,t,r,c,o,i,d,u,p,f,h,l,b)=>{const T={d:r,h:c,m:o,mo:e,ms:d,s:i,w:t,y:s};return T.future=u,T.past=p,T.decimal=f,h!==void 0&&(T.unitMap=h),T.groupSeparator=l,T.placeholderSeparator=b,T},Kn={d:"d",day:"d",days:"d",h:"h",hour:"h",hours:"h",hr:"h",hrs:"h",m:"m",millisecond:"ms",milliseconds:"ms",min:"m",mins:"m",minute:"m",minutes:"m",mo:"mo",month:"mo",months:"mo",ms:"ms",s:"s",sec:"s",second:"s",seconds:"s",secs:"s",w:"w",week:"w",weeks:"w",y:"y",year:"y",years:"y",yr:"y",yrs:"y"},Xn=Yn(s=>`year${s===1?"":"s"}`,s=>`month${s===1?"":"s"}`,s=>`week${s===1?"":"s"}`,s=>`day${s===1?"":"s"}`,s=>`hour${s===1?"":"s"}`,s=>`minute${s===1?"":"s"}`,s=>`second${s===1?"":"s"}`,s=>`millisecond${s===1?"":"s"}`,"in %s","%s ago",".",Kn,",","_"),ns=new WeakSet,Jn=s=>{if(ns.has(s))return;const e=["y","mo","w","d","h","m","s","ms"];for(const r of e)if(!Object.hasOwn(s,r))throw new TypeError(`Missing required property: ${r}`);if(s.future!==void 0&&typeof s.future!="string")throw new TypeError("Properties future and past must be of type string");if(s.past!==void 0&&typeof s.past!="string")throw new TypeError("Properties future and past must be of type string");const t=["y","mo","w","d","h","m","s","ms"];for(const r of t)if(typeof s[r]!="string"&&typeof s[r]!="function")throw new TypeError(`Property ${r} must be of type string or function`);if(s.decimal&&typeof s.decimal!="string")throw new TypeError("Property decimal must be of type string");if(s.delimiter&&typeof s.delimiter!="string")throw new TypeError("Property delimiter must be of type string");if(s._digitReplacements&&!Array.isArray(s._digitReplacements))throw new TypeError("Property _digitReplacements must be an array");if(s._numberFirst&&typeof s._numberFirst!="boolean")throw new TypeError("Property _numberFirst must be of type boolean");if(s.unitMap&&typeof s.unitMap!="object")throw new TypeError("Property unitMap must be an object");if(s.unitMap&&Object.values(s.unitMap).some(r=>typeof r!="string"))throw new TypeError("All values in unitMap must be of type string");ns.add(s)},Os=(s,e)=>{if(!Number.isFinite(s)||e<0||Number.isInteger(s))return s;const t=10**e,r=Number((s*t).toPrecision(15));return Math.trunc(r)/t},is=({unitCount:s,unitName:e},t,r)=>{let{spacer:c}=r;const{maxDecimalPoints:o}=r;let i=".";r.decimal!==void 0?i=r.decimal:t.decimal!==void 0&&(i=t.decimal);let d;"digitReplacements"in r?d=r.digitReplacements:"_digitReplacements"in t&&(d=t._digitReplacements);let u,p=s;o!==void 0&&(p=Os(s,o));const f=p.toString();if(!t._hideCountIf2||s!==2)if(d){u="";for(const b of f)u+=b==="."?i:d[b]}else u=f.replace(".",i);else u="";const h=t[e];let l=h;return typeof h=="function"&&(l=h(s)),t._hideCountIf2&&s===2&&(c=""),t._numberFirst?l+c+u:u+c+l},Qn=(s,e)=>{const{units:t}=e;if(t.length===0)return[];const{unitMeasures:r}=e,c=e.largest??Number.POSITIVE_INFINITY,o={};let i,d,u,p=s;for(d=0;d<t.length;d++){i=t[d];const h=r[i];u=d===t.length-1?p/h:Math.floor(p/h),o[i]=u,p-=u*h}if(e.round){let h=c;for(d=0;d<t.length;d++)if(i=t[d],u=o[i],u!==0&&(h--,h===0)){for(let l=d+1;l<t.length;l++){const b=t[l],T=o[b];o[i]=(o[i]??0)+T*r[b]/r[i],o[b]=0}break}for(d=t.length-1;d>=0;d--){if(i=t[d],u=o[i],u===0)continue;const l=Math.round(u);if(o[i]=l,d===0)break;const b=t[d-1],T=r[b],N=Math.floor(l*r[i]/T);if(N)o[b]=(o[b]??0)+N,o[i]=0;else break}}const f=[];for(d=0;d<t.length&&f.length<c;d++){if(i=t[d],u=o[i],u&&!e.round&&f.length===c-1){let h,l=0;for(h=d+1,t.length;h<t.length;h++){const b=t[h];l+=o[b]*(e.unitMeasures[b]/e.unitMeasures[i])}u+=l,e.maxDecimalPoints!==void 0&&(u=Os(u,e.maxDecimalPoints))}u&&f.push({unitCount:u,unitName:i})}return f},Zn=(s,e,t)=>{const{language:r,units:c}=e;if(s.length===0){const h=c.at(-1);return is({unitCount:0,unitName:h},r,e)}const{conjunction:o,serialComma:i}=e;let d=", ";e.delimiter!==void 0?d=e.delimiter:r.delimiter!==void 0&&(d=r.delimiter);let u="";e.timeAdverb&&t!==0&&(u=r.future??"",t<0&&(u=r.past??""));const p=s.map(h=>is(h,r,e));let f;return!o||s.length===1?f=p.join(d):s.length===2?f=p.join(o):f=p.slice(0,-1).join(d)+(i?",":"")+o+(p.at(-1)??""),u&&(f=u.replace("%s",f)),f},ei=(s,e)=>{if(Number.isNaN(s))throw new TypeError("Expected a valid number");if(typeof s!="number")throw new TypeError("Expected a number for milliseconds input");const t={conjunction:"",language:Xn,round:!1,serialComma:!0,spacer:" ",timeAdverb:!1,unitMeasures:{d:864e5,h:36e5,m:6e4,mo:2629746e3,ms:1,s:1e3,w:6048e5,y:31556952e3},units:["w","d","h","m","s"],...e};Jn(t.language);const r=Math.abs(s),c=Qn(r,t);return Zn(c,t,s)},be="@voidzero-dev/vite-task-client",bt="@visulima/task-runner-client",nt=`npm:${bt}@^1`,As=ue(".vis",".vite-client-override-declined"),it="pnpm-workspace.yaml",ti=["dependencies","devDependencies","optionalDependencies","peerDependencies"],Ls=s=>{try{return JSON.parse(We(s,"utf8"))}catch{return}},si=s=>{const e=ue(s,it);if(De(e))try{return $s(We(e,"utf8")).toJS()?.overrides}catch{return}},ri=s=>s==="pnpm"||s==="aube"?"pnpm.overrides":s==="yarn"?"resolutions":"overrides",ni=s=>{const e=ue(s,it);try{const t=$s(We(e,"utf8"));return t.setIn(["overrides",be],nt),xt(e,t.toString()),!0}catch{return!1}},os=s=>s!==void 0&&ti.some(e=>s[e]?.[be]!==void 0),ii=(s,e)=>s!==void 0&&(s.pnpm?.overrides?.[be]!==void 0||s.overrides?.[be]!==void 0||s.resolutions?.[be]!==void 0)||e?.[be]!==void 0,oi=(s,e=[])=>{const t=Ls(ue(s,"package.json")),r=De(ue(s,"node_modules","@voidzero-dev","vite-task-client"));return{alreadyOverridden:ii(t,si(s)),declined:De(ue(s,As)),manager:_r(s)?.manager,present:os(t)||r||e.some(c=>os(c))}},ci=s=>{try{const e=ue(s,As);Gr(Ss(e),{recursive:!0}),xt(e,`Declined adding the ${be} → ${bt} override.
1
+ import{createRequire as rr}from"node:module";import{e as ue,m as Ss,$ as or,a as cr,z as ar}from"../packem_shared/index-DHD8wb6Z.js";import{expandAffected as lr,getChangedFiles as dr,buildEnhancedPath as ur,enforceProjectConstraints as fr,expandTokensInString as zt,parsePartition as hr,TaskScheduler as pr,createTaskGraph as mr,reverseTaskGraph as gr,resolveTurboEnvCompat as wr,CompositeLifeCycle as Yt,defaultTaskRunner as Kt,TerminalBuffer as yt,runConcurrently as tt,createLogReporter as vr,generateRunSummary as Xt,writeRunSummary as yr,readLastRunSummary as xr,getLastRunSummaryPath as jr,writeChromeTrace as kr}from"@visulima/task-runner";import{i as Ye}from"../packem_shared/index-BjdW45xX.js";import{U as Ts,W as br,T as Sr,v as Jt,X as Tr,Y as $r,d as Ir,Z as Cr,ar as Er,as as Rr,at as Pr,au as Mr,k as Fr,av as Or}from"./cli-main.js";import{u as U,y as n,X as g,m as a,E as me,R as J,w as Ar,d as Lr,b as Dr,Q as Br}from"./catalog.js";import{V as Ke}from"../packem_shared/vis-user-error-Um2Qg_C1.js";import{d as _r,r as Nr}from"../packem_shared/lockfile-DVFySxTS.js";import{y as $s}from"../packem_shared/index-BisalDCf.js";import{F as Yr}from"../packem_shared/failure-log-DE_MJCzB.js";import{r as Kr}from"../packem_shared/command-runtime-CiLVo4ED.js";import{r as Xr}from"../packem_shared/toolchain-DY11tPCw.js";import{i as Jr,r as Qr,s as Zr,a as en,b as tn,c as sn,d as rn,e as nn,H as on,f as cn}from"../packem_shared/lifecycle-DW8KRF5d.js";import{s as an}from"../packem_shared/affected-selection-DZfFEb-u.js";import{c as Zt,p as ln,a as dn,b as un,r as fn,f as hn,s as pn}from"../packem_shared/project-name-filter-DfqnrCub.js";import{p as mn,r as gn,f as wn,a as vn}from"../packem_shared/selectors-B7lSFz7l.js";import{r as at,l as jt,d as yn,s as xn,m as jn,a as kn}from"../packem_shared/target-options-d_rIrLyq.js";import{T as Is,C as Cs,D as lt,E as Es}from"../packem_shared/symbols-BXDZ_sKt.js";import{q as In,j as Cn,X as ht,F as ts}from"../packem_shared/index.server-sXNQYpsl.js";import{parseStacktrace as En,codeFrame as Rn}from"@visulima/error";import{originalPositionFor as Pn,sourceContentFor as Mn,loadSourceMap as Fn}from"@visulima/source-map";import{l as Rs}from"../packem_shared/spinner-BM_0Bj6x.js";import{R as Bn,c as st}from"../packem_shared/formatBytes-BHAzNIrn-Bkk_uRS-.js";import{c as ss,a as _n,s as rs}from"../packem_shared/watch-Dswvj6Zp.js";import gt from"./index.js";import{U as Ps}from"../packem_shared/writeFileSync-DJoHk3Ks-CgQ-VNNT.js";let nr;const ir=s=>(nr??=rr(import.meta.url))(s),ze=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Pe=s=>{if(typeof ze<"u"&&ze.versions&&ze.versions.node){const[e,t]=ze.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ze.getBuiltinModule(s)}return ir(s)},{existsSync:De,mkdirSync:Gr,writeFileSync:xt,readFileSync:We,openSync:Wr,statSync:Qt,readSync:Hr,closeSync:qr,mkdtempSync:Vr}=Pe("node:fs"),{createInterface:Ur,emitKeypressEvents:zr}=Pe("node:readline"),{isAbsolute:bn,resolve:es,dirname:Sn,relative:Tn}=Pe("node:path"),{fileURLToPath:$n}=Pe("node:url"),{createHash:On}=Pe("node:crypto"),{mkdir:An,appendFile:dt}=Pe("node:fs/promises"),{platform:Ln,homedir:kt,tmpdir:Dn}=Pe("node:os"),{spawn:Nn}=Pe("node:child_process"),Gn=27,Wn={95:"apc",80:"dcs",94:"pm",88:"sos"},Hn={159:"apc",144:"dcs",158:"pm",152:"sos"},Ms=s=>s===155||s===157||s===144||s===152||s===158||s===159,Fs=(s,e)=>{for(let t=e;t<s.length;t+=1){const r=s.codePointAt(t);if(r>=64&&r<=126)return t}return-1},rt=(s,e,t)=>{for(let r=e;r<s.length;r+=1){const c=s.codePointAt(r);if(c===156||t&&c===7)return r;if(c===27&&s.codePointAt(r+1)===92)return r+1}return-1},qn=(s,e)=>{const t=s.codePointAt(e+1);if(t===91){const r=Fs(s,e+2);return r===-1?void 0:{end:r,kind:"csi"}}if(t===93){const r=rt(s,e+2,!0);return r===-1?void 0:{end:r,kind:"osc"}}if(t===80||t===88||t===94||t===95){const r=rt(s,e+2,!1),c=Wn[t];return r===-1?void 0:{end:r,kind:c}}return t===void 0?void 0:{end:e+1,kind:"escape"}},Vn=(s,e)=>{const t=s.codePointAt(e);if(t===155){const r=Fs(s,e+1);return r===-1?void 0:{end:r,kind:"csi"}}if(t===157){const r=rt(s,e+1,!0);return r===-1?void 0:{end:r,kind:"osc"}}if(t===144||t===152||t===158||t===159){const r=rt(s,e+1,!1),c=Hn[t];return r===-1?void 0:{end:r,kind:c}}},Un=s=>{if(s.includes(String.fromCodePoint(27)))return!0;for(let e=0;e<s.length;e+=1)if(Ms(s.codePointAt(e)))return!0;return!1},zn=s=>{if(!Un(s))return s;let e="",t=0,r=0;const{length:c}=s;for(;r<c;){const o=s.codePointAt(r);let i;if(o===Gn)i=qn(s,r);else if(Ms(o))i=Vn(s,r);else{r+=1;continue}const d=i===void 0?c-1:i.end;e+=s.slice(t,r),t=d+1,r=d+1}return e+=s.slice(t),e},Yn=(s,e,t,r,c,o,i,d,u,p,f,h,l,b)=>{const T={d:r,h:c,m:o,mo:e,ms:d,s:i,w:t,y:s};return T.future=u,T.past=p,T.decimal=f,h!==void 0&&(T.unitMap=h),T.groupSeparator=l,T.placeholderSeparator=b,T},Kn={d:"d",day:"d",days:"d",h:"h",hour:"h",hours:"h",hr:"h",hrs:"h",m:"m",millisecond:"ms",milliseconds:"ms",min:"m",mins:"m",minute:"m",minutes:"m",mo:"mo",month:"mo",months:"mo",ms:"ms",s:"s",sec:"s",second:"s",seconds:"s",secs:"s",w:"w",week:"w",weeks:"w",y:"y",year:"y",years:"y",yr:"y",yrs:"y"},Xn=Yn(s=>`year${s===1?"":"s"}`,s=>`month${s===1?"":"s"}`,s=>`week${s===1?"":"s"}`,s=>`day${s===1?"":"s"}`,s=>`hour${s===1?"":"s"}`,s=>`minute${s===1?"":"s"}`,s=>`second${s===1?"":"s"}`,s=>`millisecond${s===1?"":"s"}`,"in %s","%s ago",".",Kn,",","_"),ns=new WeakSet,Jn=s=>{if(ns.has(s))return;const e=["y","mo","w","d","h","m","s","ms"];for(const r of e)if(!Object.hasOwn(s,r))throw new TypeError(`Missing required property: ${r}`);if(s.future!==void 0&&typeof s.future!="string")throw new TypeError("Properties future and past must be of type string");if(s.past!==void 0&&typeof s.past!="string")throw new TypeError("Properties future and past must be of type string");const t=["y","mo","w","d","h","m","s","ms"];for(const r of t)if(typeof s[r]!="string"&&typeof s[r]!="function")throw new TypeError(`Property ${r} must be of type string or function`);if(s.decimal&&typeof s.decimal!="string")throw new TypeError("Property decimal must be of type string");if(s.delimiter&&typeof s.delimiter!="string")throw new TypeError("Property delimiter must be of type string");if(s._digitReplacements&&!Array.isArray(s._digitReplacements))throw new TypeError("Property _digitReplacements must be an array");if(s._numberFirst&&typeof s._numberFirst!="boolean")throw new TypeError("Property _numberFirst must be of type boolean");if(s.unitMap&&typeof s.unitMap!="object")throw new TypeError("Property unitMap must be an object");if(s.unitMap&&Object.values(s.unitMap).some(r=>typeof r!="string"))throw new TypeError("All values in unitMap must be of type string");ns.add(s)},Os=(s,e)=>{if(!Number.isFinite(s)||e<0||Number.isInteger(s))return s;const t=10**e,r=Number((s*t).toPrecision(15));return Math.trunc(r)/t},is=({unitCount:s,unitName:e},t,r)=>{let{spacer:c}=r;const{maxDecimalPoints:o}=r;let i=".";r.decimal!==void 0?i=r.decimal:t.decimal!==void 0&&(i=t.decimal);let d;"digitReplacements"in r?d=r.digitReplacements:"_digitReplacements"in t&&(d=t._digitReplacements);let u,p=s;o!==void 0&&(p=Os(s,o));const f=p.toString();if(!t._hideCountIf2||s!==2)if(d){u="";for(const b of f)u+=b==="."?i:d[b]}else u=f.replace(".",i);else u="";const h=t[e];let l=h;return typeof h=="function"&&(l=h(s)),t._hideCountIf2&&s===2&&(c=""),t._numberFirst?l+c+u:u+c+l},Qn=(s,e)=>{const{units:t}=e;if(t.length===0)return[];const{unitMeasures:r}=e,c=e.largest??Number.POSITIVE_INFINITY,o={};let i,d,u,p=s;for(d=0;d<t.length;d++){i=t[d];const h=r[i];u=d===t.length-1?p/h:Math.floor(p/h),o[i]=u,p-=u*h}if(e.round){let h=c;for(d=0;d<t.length;d++)if(i=t[d],u=o[i],u!==0&&(h--,h===0)){for(let l=d+1;l<t.length;l++){const b=t[l],T=o[b];o[i]=(o[i]??0)+T*r[b]/r[i],o[b]=0}break}for(d=t.length-1;d>=0;d--){if(i=t[d],u=o[i],u===0)continue;const l=Math.round(u);if(o[i]=l,d===0)break;const b=t[d-1],T=r[b],N=Math.floor(l*r[i]/T);if(N)o[b]=(o[b]??0)+N,o[i]=0;else break}}const f=[];for(d=0;d<t.length&&f.length<c;d++){if(i=t[d],u=o[i],u&&!e.round&&f.length===c-1){let h,l=0;for(h=d+1,t.length;h<t.length;h++){const b=t[h];l+=o[b]*(e.unitMeasures[b]/e.unitMeasures[i])}u+=l,e.maxDecimalPoints!==void 0&&(u=Os(u,e.maxDecimalPoints))}u&&f.push({unitCount:u,unitName:i})}return f},Zn=(s,e,t)=>{const{language:r,units:c}=e;if(s.length===0){const h=c.at(-1);return is({unitCount:0,unitName:h},r,e)}const{conjunction:o,serialComma:i}=e;let d=", ";e.delimiter!==void 0?d=e.delimiter:r.delimiter!==void 0&&(d=r.delimiter);let u="";e.timeAdverb&&t!==0&&(u=r.future??"",t<0&&(u=r.past??""));const p=s.map(h=>is(h,r,e));let f;return!o||s.length===1?f=p.join(d):s.length===2?f=p.join(o):f=p.slice(0,-1).join(d)+(i?",":"")+o+(p.at(-1)??""),u&&(f=u.replace("%s",f)),f},ei=(s,e)=>{if(Number.isNaN(s))throw new TypeError("Expected a valid number");if(typeof s!="number")throw new TypeError("Expected a number for milliseconds input");const t={conjunction:"",language:Xn,round:!1,serialComma:!0,spacer:" ",timeAdverb:!1,unitMeasures:{d:864e5,h:36e5,m:6e4,mo:2629746e3,ms:1,s:1e3,w:6048e5,y:31556952e3},units:["w","d","h","m","s"],...e};Jn(t.language);const r=Math.abs(s),c=Qn(r,t);return Zn(c,t,s)},be="@voidzero-dev/vite-task-client",bt="@visulima/task-runner-client",nt=`npm:${bt}@^1`,As=ue(".vis",".vite-client-override-declined"),it="pnpm-workspace.yaml",ti=["dependencies","devDependencies","optionalDependencies","peerDependencies"],Ls=s=>{try{return JSON.parse(We(s,"utf8"))}catch{return}},si=s=>{const e=ue(s,it);if(De(e))try{return $s(We(e,"utf8")).toJS()?.overrides}catch{return}},ri=s=>s==="pnpm"||s==="aube"?"pnpm.overrides":s==="yarn"?"resolutions":"overrides",ni=s=>{const e=ue(s,it);try{const t=$s(We(e,"utf8"));return t.setIn(["overrides",be],nt),xt(e,t.toString()),!0}catch{return!1}},os=s=>s!==void 0&&ti.some(e=>s[e]?.[be]!==void 0),ii=(s,e)=>s!==void 0&&(s.pnpm?.overrides?.[be]!==void 0||s.overrides?.[be]!==void 0||s.resolutions?.[be]!==void 0)||e?.[be]!==void 0,oi=(s,e=[])=>{const t=Ls(ue(s,"package.json")),r=De(ue(s,"node_modules","@voidzero-dev","vite-task-client"));return{alreadyOverridden:ii(t,si(s)),declined:De(ue(s,As)),manager:_r(s)?.manager,present:os(t)||r||e.some(c=>os(c))}},ci=s=>{try{const e=ue(s,As);Gr(Ss(e),{recursive:!0}),xt(e,`Declined adding the ${be} → ${bt} override.
2
2
  Delete this file to be asked again.
3
3
  `)}catch{}},ai=(s,e="npm")=>{const t=`${e} install`;if((e==="pnpm"||e==="aube")&&De(ue(s,it))&&ni(s))return{file:it,installCommand:t};const r=ue(s,"package.json"),c=Ls(r);if(!c)return;const o=ri(e);o==="pnpm.overrides"?(c.pnpm??={},c.pnpm.overrides??={},c.pnpm.overrides[be]=nt):(c[o]??={},c[o][be]=nt);try{xt(r,`${JSON.stringify(c,void 0,4)}
4
4
  `)}catch{return}return{file:"package.json",installCommand:t}},li=async(s,e)=>{const t=oi(s,e.projectManifests);if(!t.present||t.alreadyOverridden||t.declined)return!1;const r=Ur({input:process.stdin,output:process.stdout});try{e.logger.info(`Detected ${be}. Its cache hints no-op under @visulima/task-runner unless aliased to ${bt} (a drop-in replacement).`);const c=await new Promise(i=>{r.question("Add the override now? [y/N] ",i)});if(!/^y(?:es)?$/i.test(c.trim()))return ci(s),e.logger.info("Skipped. Delete .vis/.vite-client-override-declined to be asked again."),!1;const o=ai(s,t.manager);return o===void 0?(e.logger.warn("Could not write the override automatically — add it manually (see @visulima/task-runner-client README)."),!1):(e.logger.info(`Added "${be}": "${nt}" to ${o.file}. Run \`${o.installCommand}\` to apply it.`),!0)}finally{r.close()}},di=({interactive:s,taskPty:e,workspacePty:t})=>e===!0?!0:e===!1?!1:s&&t!==!1,ui=s=>s.split(",").map(e=>e.trim()).filter(e=>e!==""),fi=(s,e,t)=>{const r=new Set,c=[];if(s===void 0||s.trim()==="")return{skipTaskIds:r,unmatchedPatterns:c};const o=[...t],i=new Set(o),d=new Map;for(const u of o){const p=u.lastIndexOf(":");if(p===-1)continue;const f=u.slice(p+1),h=d.get(f);h===void 0?d.set(f,[u]):h.push(u)}for(const u of ui(s)){if(u.startsWith("~:"))throw new Error(`--skip-cache does not support the closest-project selector "~:" (received "${u}"). Use \`pkg:target\`, \`:target\`, or \`#tag:target\`.`);if(i.has(u)){r.add(u);continue}const p=mn(u);if(!p){c.push(u);continue}let f=!1;switch(p.kind){case"all":{const h=d.get(p.target)??[];for(const l of h)r.add(l),f=!0;break}case"project":{const h=p.projects?.[0];if(h!==void 0){const l=`${h}:${p.target}`;i.has(l)&&(r.add(l),f=!0)}break}case"tag":{const{tag:h}=p;if(h!==void 0){const l=d.get(p.target)??[];for(const b of l){const T=b.slice(0,b.lastIndexOf(":"));e.projects[T]?.tags?.includes(h)===!0&&(r.add(b),f=!0)}}break}}f||c.push(u)}return{skipTaskIds:r,unmatchedPatterns:c}},hi=/\$(?:\{([A-Z_]\w*)(:-[^}]*)?\}|([A-Z_]\w*))/gi,pi=new Set(["0","!","#","$","*","-","?","@","_"]),mi=s=>{const e=new Map;for(const t of s.matchAll(hi)){const r=t[1],c=t[3],o=t[2],i=r??c;if(i===void 0||pi.has(i))continue;const d=o!==void 0,u=e.get(i);u===void 0?e.set(i,d):u&&!d&&e.set(i,!1)}return[...e.entries()].map(([t,r])=>({hasDefault:r,name:t}))},gi=s=>{const{command:e,processEnv:t,taskEnv:r,taskId:c}=s,o=mi(e);if(o.length===0)return;const i=[];for(const{hasDefault:d,name:u}of o){if(d)continue;const p=r[u],f=t[u];p===void 0&&f===void 0&&i.push(u)}if(i.length!==0)return{missing:i.toSorted(),taskId:c}},wi=s=>{const e=s.missing.map(t=>`$${t}`).join(", ");return`Strict env: ${s.taskId} references unset variable${s.missing.length===1?"":"s"} ${e}. Set ${s.missing.length===1?"it":"them"} in the task env, an envFile, or the parent shell — or opt out with options.strictEnv: false.`},vi=64*1024,cs=256,yi=new RegExp("[\x1B›]\\[[0-?]*[ -/]*[@-~]","g"),pt=s=>s.replaceAll(yi,"").replaceAll("\r","");class as{#e=[];#r=new Set;#s=new Map;#n=new Map;constructor(e=[]){for(const t of e)this.#n.set(t,{id:t,status:"pending",tailLines:[]});this.#e=[...e],this.#i()}getSnapshot=()=>this.#s;subscribe=e=>(this.#r.add(e),()=>{this.#r.delete(e)});getIds(){return this.#e}getState(e){return this.#n.get(e)}getDockState(){let e=!1,t=!1;for(const r of this.#n.values())r.status==="crashed"||r.status==="failed"?e=!0:(r.status==="pending"||r.status==="starting")&&(t=!0);return e?"crash":t?"boot":"ready"}registerService(e){this.#n.has(e)||(this.#n.set(e,{id:e,status:"pending",tailLines:[]}),this.#e=[...this.#e,e],this.#o())}markStarting(e){this.#t(e,t=>({...t,errorMessage:void 0,startedAt:t.startedAt??Date.now(),status:"starting"}))}markStarted(e,t){this.#t(e,r=>({...r,startedAt:r.startedAt??Date.now(),status:r.status==="ready"?"ready":"starting"}))}markReady(e,t){this.#t(e,r=>({...r,errorMessage:void 0,port:t.port,readyAt:Date.now(),status:"ready"}))}markFailed(e,t,r){const c=r?.message;this.#t(e,o=>({...o,errorMessage:pt(c??t),status:"failed"}))}markCrashed(e,t){const r=t.slice(-cs).map(c=>pt(c));this.#t(e,c=>({...c,errorMessage:r.length>0?r[r.length-1]:"process exited",status:"crashed",tailLines:r}))}appendLog(e,t){const r=t.split(`
@@ -1,4 +1,4 @@
1
- import{createRequire as At}from"node:module";import{w as It,$ as Wt,e as kt,j,P as b,q as x,J as N,b as L}from"../packem_shared/index.server-sXNQYpsl.js";import{u as ut,c as B,e as Mt}from"../packem_shared/vis-user-error-C8HBoCLE.js";import{N as R,a as _}from"../packem_shared/Table-DyORjLji-CC9cYgCG.js";import{b as Ct}from"../packem_shared/package-version-CuJee7dB.js";let Ot;const xt=t=>(Ot??=At(import.meta.url))(t),E=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Et=t=>{if(typeof E<"u"&&E.versions&&E.versions.node){const[e,n]=E.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return E.getBuiltinModule(t)}return xt(t)},{createRequire:Bt}=Et("node:module"),jt=/^#?([a-f\d]{3}|[a-f\d]{6})$/i,z=t=>{let[,e]=jt.exec(t)??[];const n=e?e.length:0;if(n===3){const s=e.charAt(0),o=e.charAt(1),i=e.charAt(2);e=s+s+o+o+i+i}else if(n!==6)return globalThis.process?.env?.NODE_ENV!=="production"&&console.warn(`[@visulima/colorize] Invalid hex color "${t}"; expected a 3- or 6-digit hex string (e.g. "#96C" or "#E0115F"). Falling back to black.`),[0,0,0];const r=Number.parseInt(e,16);return[r>>16&255,r>>8&255,r&255]},dt=(t,e,n)=>t===e&&e===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/51)+6*Math.round(e/51)+Math.round(n/51),H=t=>{let e,n,r;if(t<8)return 30+t;if(t<16)return 90+(t-8);if(t>=232)e=n=r=((t-232)*10+8)/255;else{t-=16;const i=t%36;e=Math.floor(t/36)/5,n=Math.floor(i/6)/5,r=i%6/5}const s=Math.max(e,n,r)*2;if(s===0)return 30;const o=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(e));return s===2?o+60:o},Z=(t,e,n)=>H(dt(t,e,n));function Rt({onlyFirst:t=!1}={}){const e="(?:\\u001B\\][^\\u0007\\u001B\\u009C]*(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(e,t?void 0:"g")}const S=(t,e,n)=>e>t?e:Math.min(t,n),m=39,f=49,X=10,tt={close:"",open:""},ht=t=>{const e=t>0?(l,d)=>({close:`\x1B[${String(d)}m`,open:`\x1B[${String(l)}m`}):()=>tt,n=l=>(d,p,g)=>l(dt(Number(d),Number(p),Number(g))),r=l=>d=>{const[p,g,w]=z(d);return l(p,g,w)};let s=l=>e(`38;5;${String(l)}`,m),o=l=>e(`48;5;${String(l)}`,f),i=(l,d,p)=>e(`38;2;${String(l)};${String(d)};${String(p)}`,m),a=(l,d,p)=>e(`48;2;${String(l)};${String(d)};${String(p)}`,f);t===1?(s=l=>e(H(Number(l)),m),o=l=>e(H(Number(l))+X,f),i=(l,d,p)=>e(Z(Number(l),Number(d),Number(p)),m),a=(l,d,p)=>e(Z(Number(l),Number(d),Number(p))+X,f)):t===2&&(i=n(s),a=n(o));const u={bold:e(1,22),dim:e(2,22),hidden:e(8,28),inverse:e(7,27),italic:e(3,23),overline:e(53,55),reset:e(0,0),strike:e(9,29),strikethrough:e(9,29),underline:e(4,24),underlineCurly:e("4:3",24),underlineDashed:e("4:5",24),underlineDotted:e("4:4",24),underlineDouble:e("4:2",24),visible:tt},c={bgBlack:e(40,f),bgBlackBright:e(100,f),bgBlue:e(44,f),bgBlueBright:e(104,f),bgCyan:e(46,f),bgCyanBright:e(106,f),bgGray:e(100,f),bgGreen:e(42,f),bgGreenBright:e(102,f),bgGrey:e(100,f),bgMagenta:e(45,f),bgMagentaBright:e(105,f),bgRed:e(41,f),bgRedBright:e(101,f),bgWhite:e(47,f),bgWhiteBright:e(107,f),bgYellow:e(43,f),bgYellowBright:e(103,f),black:e(30,m),blackBright:e(90,m),blue:e(34,m),blueBright:e(94,m),cyan:e(36,m),cyanBright:e(96,m),gray:e(90,m),green:e(32,m),greenBright:e(92,m),grey:e(90,m),magenta:e(35,m),magentaBright:e(95,m),red:e(31,m),redBright:e(91,m),white:e(37,m),whiteBright:e(97,m),yellow:e(33,m),yellowBright:e(93,m)},h={bg:l=>o(S(l,0,255)),bgHex:r(a),bgRgb:(l,d,p)=>a(S(l,0,255),S(d,0,255),S(p,0,255)),fg:l=>s(S(l,0,255)),hex:r(i),rgb:(l,d,p)=>i(S(l,0,255),S(d,0,255),S(p,0,255))};return{baseColors:c,baseStyles:u,styleMethods:h}},pt=It();Wt();ht(pt);const _t=(t,e,n)=>{if(e==="")return t;let r=t.indexOf(e);if(r<0)return t;const s=e.length;let o=0,i="";for(;~r;)i+=t.slice(o,r)+n,o=r+s,r=t.indexOf(e,o);return i+t.slice(o)},Pt=(t,e,n)=>{if(t==null||t==="")return"";let r;if(t.raw===void 0?r=String(t):r=String.raw(t,...e),r.includes("\x1B"))for(let s=n;s;s=s.props)r=_t(r,s.close,s.open);return r.includes(`
1
+ import{createRequire as At}from"node:module";import{w as It,$ as Wt,e as kt,j,P as b,q as x,J as N,b as L}from"../packem_shared/index.server-sXNQYpsl.js";import{u as ut,c as B,e as Mt}from"../packem_shared/vis-user-error-Um2Qg_C1.js";import{N as R,a as _}from"../packem_shared/Table-DyORjLji-CC9cYgCG.js";import{b as Ct}from"../packem_shared/package-version-BdIBhdr7.js";let Ot;const xt=t=>(Ot??=At(import.meta.url))(t),E=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Et=t=>{if(typeof E<"u"&&E.versions&&E.versions.node){const[e,n]=E.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return E.getBuiltinModule(t)}return xt(t)},{createRequire:Bt}=Et("node:module"),jt=/^#?([a-f\d]{3}|[a-f\d]{6})$/i,z=t=>{let[,e]=jt.exec(t)??[];const n=e?e.length:0;if(n===3){const s=e.charAt(0),o=e.charAt(1),i=e.charAt(2);e=s+s+o+o+i+i}else if(n!==6)return globalThis.process?.env?.NODE_ENV!=="production"&&console.warn(`[@visulima/colorize] Invalid hex color "${t}"; expected a 3- or 6-digit hex string (e.g. "#96C" or "#E0115F"). Falling back to black.`),[0,0,0];const r=Number.parseInt(e,16);return[r>>16&255,r>>8&255,r&255]},dt=(t,e,n)=>t===e&&e===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/51)+6*Math.round(e/51)+Math.round(n/51),H=t=>{let e,n,r;if(t<8)return 30+t;if(t<16)return 90+(t-8);if(t>=232)e=n=r=((t-232)*10+8)/255;else{t-=16;const i=t%36;e=Math.floor(t/36)/5,n=Math.floor(i/6)/5,r=i%6/5}const s=Math.max(e,n,r)*2;if(s===0)return 30;const o=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(e));return s===2?o+60:o},Z=(t,e,n)=>H(dt(t,e,n));function Rt({onlyFirst:t=!1}={}){const e="(?:\\u001B\\][^\\u0007\\u001B\\u009C]*(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(e,t?void 0:"g")}const S=(t,e,n)=>e>t?e:Math.min(t,n),m=39,f=49,X=10,tt={close:"",open:""},ht=t=>{const e=t>0?(l,d)=>({close:`\x1B[${String(d)}m`,open:`\x1B[${String(l)}m`}):()=>tt,n=l=>(d,p,g)=>l(dt(Number(d),Number(p),Number(g))),r=l=>d=>{const[p,g,w]=z(d);return l(p,g,w)};let s=l=>e(`38;5;${String(l)}`,m),o=l=>e(`48;5;${String(l)}`,f),i=(l,d,p)=>e(`38;2;${String(l)};${String(d)};${String(p)}`,m),a=(l,d,p)=>e(`48;2;${String(l)};${String(d)};${String(p)}`,f);t===1?(s=l=>e(H(Number(l)),m),o=l=>e(H(Number(l))+X,f),i=(l,d,p)=>e(Z(Number(l),Number(d),Number(p)),m),a=(l,d,p)=>e(Z(Number(l),Number(d),Number(p))+X,f)):t===2&&(i=n(s),a=n(o));const u={bold:e(1,22),dim:e(2,22),hidden:e(8,28),inverse:e(7,27),italic:e(3,23),overline:e(53,55),reset:e(0,0),strike:e(9,29),strikethrough:e(9,29),underline:e(4,24),underlineCurly:e("4:3",24),underlineDashed:e("4:5",24),underlineDotted:e("4:4",24),underlineDouble:e("4:2",24),visible:tt},c={bgBlack:e(40,f),bgBlackBright:e(100,f),bgBlue:e(44,f),bgBlueBright:e(104,f),bgCyan:e(46,f),bgCyanBright:e(106,f),bgGray:e(100,f),bgGreen:e(42,f),bgGreenBright:e(102,f),bgGrey:e(100,f),bgMagenta:e(45,f),bgMagentaBright:e(105,f),bgRed:e(41,f),bgRedBright:e(101,f),bgWhite:e(47,f),bgWhiteBright:e(107,f),bgYellow:e(43,f),bgYellowBright:e(103,f),black:e(30,m),blackBright:e(90,m),blue:e(34,m),blueBright:e(94,m),cyan:e(36,m),cyanBright:e(96,m),gray:e(90,m),green:e(32,m),greenBright:e(92,m),grey:e(90,m),magenta:e(35,m),magentaBright:e(95,m),red:e(31,m),redBright:e(91,m),white:e(37,m),whiteBright:e(97,m),yellow:e(33,m),yellowBright:e(93,m)},h={bg:l=>o(S(l,0,255)),bgHex:r(a),bgRgb:(l,d,p)=>a(S(l,0,255),S(d,0,255),S(p,0,255)),fg:l=>s(S(l,0,255)),hex:r(i),rgb:(l,d,p)=>i(S(l,0,255),S(d,0,255),S(p,0,255))};return{baseColors:c,baseStyles:u,styleMethods:h}},pt=It();Wt();ht(pt);const _t=(t,e,n)=>{if(e==="")return t;let r=t.indexOf(e);if(r<0)return t;const s=e.length;let o=0,i="";for(;~r;)i+=t.slice(o,r)+n,o=r+s,r=t.indexOf(e,o);return i+t.slice(o)},Pt=(t,e,n)=>{if(t==null||t==="")return"";let r;if(t.raw===void 0?r=String(t):r=String.raw(t,...e),r.includes("\x1B"))for(let s=n;s;s=s.props)r=_t(r,s.close,s.open);return r.includes(`
2
2
  `)&&(r=r.replace(/(\r*\n)/g,`${n.closeStack}$1${n.openStack}`)),n.openStack+r+n.closeStack},Tt=function(t){const e=t?.level??pt,{baseColors:n,baseStyles:r,styleMethods:s}=ht(e),o={};let i=null;const a=({props:c},{close:h,open:l})=>{const d=(c?.openStack??"")+l,p=h+(c?.closeStack??""),g=(w,...y)=>Pt(w,y,g.props);return Object.setPrototypeOf(g,i),g.props={close:h,closeStack:p,open:l,openStack:d,props:c},g.open=d,g.close=p,g},u=c=>String(c);u.strip=c=>c.replaceAll(Rt(),"");for(const c in n)o[c]={get(){const h=a(this,n[c]);return Object.defineProperty(this,c,{value:h}),h}};for(const c in r)o[c]={get(){const h=a(this,r[c]);return Object.defineProperty(this,c,{value:h}),h}};for(const c in s)o[c]={get(){return(...h)=>a(this,s[c](...h))}};return o.ansi256=o.fg,o.bgAnsi256=o.bg,i=Object.defineProperties({},o),Object.setPrototypeOf(u,i),u},Lt=t=>(e,...n)=>{if(!Array.isArray(e)||!Array.isArray(e.raw))throw new TypeError("A tagged template literal must be provided");const r=[e.raw[0]];for(let s=1;s<e.raw.length;s+=1)r.push(String(n[s-1]).replaceAll(/[{}\\]/g,String.raw`\$&`),String(e.raw[s]));return t(r.join(""))},Ft=new Map([["0","\0"],["\\","\\"],["a","\x07"],["b","\b"],["e","\x1B"],["f","\f"],["n",`
3
3
  `],["r","\r"],["t"," "],["v","\v"]]),mt=t=>{const e=t.startsWith("u"),n=t[1]==="{";return e&&!n&&t.length===5||t.startsWith("x")&&t.length===3?String.fromCodePoint(Number.parseInt(t.slice(1),16)):e&&n?String.fromCodePoint(Number.parseInt(t.slice(2,-1),16)):Ft.get(t)??t},Dt=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|\{(~)?(#?[\w:]+(?:\([^)]*\))?(?:\.#?[\w:]+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n))|(\})|((?:.|[\r\n\f])+?)/gi,et=/(?:^|\.)(?:(\w+)(?:\(([^)]*)\))?|#(?=[:a-f\d]{2,})([a-f\d]{6})?(?::([a-f\d]{6}))?)/gi,Vt=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,qt=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,Ut=/\s*,\s*/,Gt=(t,e)=>{const n=[],r=e.trim().split(Ut);let s;for(const o of r){const i=Number(o);if(!Number.isNaN(i))n.push(i);else if(s=Vt.exec(o))n.push(s[2].replaceAll(qt,(a,u,c)=>u?mt(u):c));else throw new Error(`Invalid template style argument: ${o} (in style '${t}')`)}return n},zt=t=>{et.lastIndex=0;const e=[];let n;for(;(n=et.exec(t))!==null;){const r=n[1];n[2]?e.push([r,...Gt(r,n[2])]):n[3]||n[4]?(n[3]&&e.push(["rgb",...z(n[3])]),n[4]&&e.push(["bgRgb",...z(n[4])])):e.push([r])}return e},nt=(t,e)=>{const n={};for(const s of e)for(const o of s.styles)n[o[0]]=s.inverse?void 0:o.slice(1);let r=t;for(const[s,o]of Object.entries(n))if(Array.isArray(o)){if(!(s in r))throw new Error(`Unknown style: ${s}`);r=o.length>0?r[s](...o):r[s]}return r},Ht=t=>e=>{const n=[],r=[];let s=[];if(e.replaceAll(Dt,(o,i,a,u,c,h)=>{if(i)s.push(mt(i));else if(u){const l=s.join("");s=[],r.push(n.length===0?l:nt(t,n)(l)),n.push({inverse:a,styles:zt(u)})}else if(c){if(n.length===0)throw new Error("Found extraneous } in template literal");r.push(nt(t,n)(s.join(""))),s=[],n.pop()}else s.push(h)}),r.push(s.join("")),n.length>0)throw new Error(`template literal is missing ${String(n.length)} closing bracket${n.length===1?"":"s"} (\`}\`)`);return r.join("")},Yt=new Tt,Jt=Ht(Yt),Kt=Lt(Jt);let Qt;const Zt=t=>(Qt??=Bt(import.meta.url))(t),O=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:A,F=t=>{if(typeof O<"u"&&O.versions&&O.versions.node){const[e,n]=O.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return O.getBuiltinModule(t)}return Zt(t)},A=O,{execFileSync:Xt}=F("node:child_process"),W=F("node:fs"),te=F("node:tty"),ee=F("node:os"),ne=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],re=12288,oe=65510,ie=[12288,12288,65281,65376,65504,65510],se=8361,ae=65518,le=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],ce=32,ue=10630,de=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],he=4352,pe=262141,ft=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],k=(t,e)=>{let n=0,r=Math.floor(t.length/2)-1;for(;n<=r;){const s=Math.floor((n+r)/2),o=s*2;if(e<t[o])r=s-1;else if(e>t[o+1])n=s+1;else return!0}return!1},rt=19968,[me,fe]=ge(ft);function ge(t){let e=t[0],n=t[1];for(let r=0;r<t.length;r+=2){const s=t[r],o=t[r+1];if(rt>=s&&rt<=o)return[s,o];o-s>n-e&&(e=s,n=o)}return[e,n]}const we=t=>t<161||t>1114109?!1:k(ne,t),be=t=>t<re||t>oe?!1:k(ie,t),ye=t=>t<se||t>ae?!1:k(le,t),$e=t=>t<ce||t>ue?!1:k(de,t),Ne=t=>t>=me&&t<=fe?!0:t<he||t>pe?!1:k(ft,t);function ve(t){return we(t)?"ambiguous":be(t)?"fullwidth":ye(t)?"halfwidth":$e(t)?"narrow":Ne(t)?"wide":"neutral"}function Se(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}function gt(t){return Se(t),ve(t)}const ot=new Map,Ae=t=>[t.ambiguousIsNarrow?1:0,t.control,t.fullWidth,t.regular,t.wide].join("|"),Oe=t=>{const e=Ae(t.width);let n=ot.get(e);return n||(n=new Map,ot.set(e,n)),n},M=new RegExp(ut.source,"y"),U=new RegExp(Mt.source,"uy"),C=/(?:[\u0020-\u007E\u00A0-\u00FF](?!\uFE0F)){1,1000}/y,wt=t=>t>=32&&t<=126?"latin":t===8203||t===8204||t===8205||t===8288?"zero":t<=31||t>=127&&t<=159?"control":t>=160&&t<=255||t>=9472&&t<=9599?"latin":t>=4352&&t<=4607||t>=11904&&t<=40959||t>=44032&&t<=55215||t>=63744&&t<=64255||t>=65280&&t<=65519&&!(t>=65377&&t<=65439)||t>=12352&&t<=12543?"wide":t===8230?"latin":"other",xe=(t,e)=>{const n=Oe(e),r=Math.floor(t/65536),s=t%65536;let o=n.get(r);if(o||(o=new Map,n.set(r,o)),o.has(s))return o.get(s);let i;switch(wt(t)){case"control":{i=e.width.control;break}case"latin":{i=e.width.regular;break}case"wide":{i=e.width.wide;break}case"zero":{i=0;break}default:switch(gt(t)){case"ambiguous":{i=e.width.ambiguousIsNarrow?e.width.regular:e.width.wide;break}case"fullwidth":{i=e.width.fullWidth;break}case"wide":{i=e.width.wide;break}default:i=e.width.regular}}return o.set(s,i),i},Ee=t=>t>=768&&t<=879||t>=6832&&t<=6911||t>=7616&&t<=7679||t>=8400&&t<=8447||t>=65056&&t<=65071||t>=917760&&t<=917999||t>=65024&&t<=65039||t>=3633&&t<=3642||t>=3655&&t<=3662||t>=3761&&t<=3769||t>=3771&&t<=3772||t>=3784&&t<=3789||t>=2304&&t<=2307||t>=2362&&t<=2383||t>=2385&&t<=2391||t>=2402&&t<=2403||t>=2433&&t<=2435||t>=2492&&t<=2500||t>=2509&&t<=2509||t>=2561&&t<=2563||t>=2620&&t<=2637||t>=1611&&t<=1631||t>=1648&&t<=1648||t>=1750&&t<=1773||t>=2276&&t<=2302||t>=1425&&t<=1469||t>=1471&&t<=1471||t>=1473&&t<=1474||t>=1476&&t<=1477||t>=1479&&t<=1479||t>=3893&&t<=3893||t>=3895&&t<=3895||t>=3897&&t<=3897||t>=3953&&t<=3966||t>=3968&&t<=3972||t>=3974&&t<=3975?!0:t>=768&&t<=777||t>=803&&t<=803,Y=(t,e={})=>{if(!t||t.length===0)return{ellipsed:!1,index:0,truncated:!1,width:0};const n={truncation:{countAnsiEscapeCodes:e.countAnsiEscapeCodes??!1,ellipsis:e.ellipsis??"",ellipsisWidth:e.ellipsisWidth??(e.ellipsis?Y(e.ellipsis,{...e,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width:0),limit:e.limit??Number.POSITIVE_INFINITY},width:{ambiguousIsNarrow:e.ambiguousIsNarrow??!1,ansi:e.ansiWidth??0,control:e.controlWidth??0,emoji:e.emojiWidth??2,fullWidth:e.fullWidth??2,halfWidth:e.halfWidth??1,regular:e.regularWidth??1,tab:e.tabWidth??8,wide:e.wideWidth??2}},r=Math.max(0,n.truncation.limit-n.truncation.ellipsisWidth),{length:s}=t,o=s>1e4;let i=0,a=0,u=s,c=!1;const h=t.includes("\x1B")||t.includes("›");for(;i<s;){if(h&&(t[i]==="\x1B"||t[i]==="›")){if(t.startsWith("\x1B]8;;",i)){const y="\x1B]8;;\x07",v=y.length,D=t.indexOf("\x07",i+5);if(D!==-1){const V=t.indexOf(y,D+1);if(V!==-1){const vt=V+v,St=t.slice(D+1,V).replace(ut,""),Q=Y(St,{ambiguousIsNarrow:n.width.ambiguousIsNarrow,ansiWidth:n.width.ansi,controlWidth:n.width.control,countAnsiEscapeCodes:!1,ellipsis:n.truncation.ellipsis,ellipsisWidth:n.truncation.ellipsisWidth,emojiWidth:n.width.emoji,fullWidth:n.width.fullWidth,halfWidth:n.width.halfWidth,limit:Math.max(0,r-a),regularWidth:n.width.regular,tabWidth:n.width.tab,wideWidth:n.width.wide}),q=Q.width;if(Q.truncated)c=!0,u=Math.min(u,i);else if(a+q>r&&(u=Math.min(u,i),c=!0,a+q>n.truncation.limit))break;if(a+=q,i=vt,c&&a>=n.truncation.limit)break;continue}}}if(M.lastIndex=i,M.test(t)){const y=M.lastIndex-i,v=n.truncation.countAnsiEscapeCodes?y:n.width.ansi;if(a+v>r&&(u=Math.min(u,i),a+v>n.truncation.limit)){c=!0;break}a+=v,i=M.lastIndex;continue}}const p=t.codePointAt(i);if(p===8203||p===65279||p>=8288&&p<=8292){i+=1;continue}if(p===9){if(a+n.width.tab>r&&(u=Math.min(u,i),a+n.width.tab>n.truncation.limit)){c=!0;break}a+=n.width.tab,i+=1;continue}if(C.lastIndex=i,C.test(t)){const y=(C.lastIndex-i)*n.width.regular;if(a+y>r){const v=n.width.regular>0?Math.floor((r-a)/n.width.regular):0;if(u=Math.min(u,i+v),a+y>n.truncation.limit){c=!0;break}}a+=y,i=C.lastIndex;continue}if((p<=31||p>=127&&p<=159)&&(B.lastIndex=i,B.test(t))){const y=(B.lastIndex-i)*n.width.control;if(a+y>r){const v=n.width.control>0?Math.floor((r-a)/n.width.control):0;if(u=Math.min(u,i+v),a+y>n.truncation.limit){c=!0;break}}a+=y,i=B.lastIndex;continue}if(U.lastIndex=i,U.test(t)){if(a+n.width.emoji>r&&(u=Math.min(u,i),a+n.width.emoji>n.truncation.limit)){c=!0;break}a+=n.width.emoji,i=U.lastIndex;continue}const g=t.codePointAt(i)??0;if(Ee(g)){i+=g>65535?2:1;continue}let w;if(o)w=xe(g,n);else switch(wt(g)){case"control":{w=n.width.control;break}case"latin":{w=n.width.regular;break}case"wide":{w=n.width.wide;break}case"zero":{w=0;break}default:switch(gt(g)){case"ambiguous":{w=n.width.ambiguousIsNarrow?n.width.regular:n.width.wide;break}case"fullwidth":{w=n.width.fullWidth;break}case"wide":{w=n.width.wide;break}default:w=n.width.regular}}if(a+w>r&&(u=Math.min(u,i),a+w>n.truncation.limit)){c=!0;break}a+=w,i+=g>65535?2:1}let l=a,d=!1;return c&&n.truncation.limit>=n.truncation.ellipsisWidth&&(l=n.truncation.limit,d=!0),{ellipsed:d,index:c?u:s,truncated:c,width:l}},Ie=(t,e={})=>Y(t,{...e,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width,bt=80,yt=24,J=(t,e,{shell:n,env:r}={})=>Xt(t,e,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:500,shell:n,env:r}).trim(),P=(t,e)=>({columns:Number.parseInt(t,10),rows:Number.parseInt(e,10)}),$t=(t,e)=>{const{columns:n,rows:r}=P(t,e);if(!(Number.isNaN(n)||Number.isNaN(r))&&!(n===bt&&r===yt))return{columns:n,rows:r}},We=()=>{if(A.platform!=="linux")return!0;try{const t=W.readFileSync("/proc/self/stat","utf8"),e=t.lastIndexOf(") ");if(e===-1)return!1;const n=t.slice(e+2).trim().split(/\s+/),r=Number.parseInt(n[2],10),s=Number.parseInt(n[5],10);return Number.isNaN(r)||Number.isNaN(s)||s<=0?!1:r===s}catch{return!1}};function ke(){const{env:t,stdout:e,stderr:n}=A;if(e?.columns&&e?.rows)return P(e.columns,e.rows);if(n?.columns&&n?.rows)return P(n.columns,n.rows);if(t.COLUMNS&&t.LINES)return P(t.COLUMNS,t.LINES);const r={columns:bt,rows:yt};return A.platform==="win32"?G()??r:A.platform==="darwin"?it()??G()??r:it()??G()??Be()??r}const it=()=>{try{const t=A.platform==="darwin"?W.constants.O_EVTONLY|W.constants.O_NONBLOCK:W.constants.O_NONBLOCK,{columns:e,rows:n}=te.WriteStream(W.openSync("/dev/tty",t));return{columns:e,rows:n}}catch{}},G=()=>{try{const t=J("tput",["cols"],{env:{TERM:"dumb",...A.env}}),e=J("tput",["lines"],{env:{TERM:"dumb",...A.env}});if(t&&e)return $t(t,e)}catch{}},Be=()=>{try{if(!We())return;const t=J("resize",["-u"]).match(/\d+/g);if(t.length===2)return $t(t[0],t[1])}catch{}},I=new Map,Me=500,$=t=>{if(!t||t==="")return"";const e=I.get(t);if(e!==void 0)return e;let n;try{n=Kt(Object.assign([],{raw:[t]}))}catch{n=t}if(I.size>=Me){const r=I.keys().next().value;r!==void 0&&I.delete(r)}return I.set(t,n),n},T=()=>{const t=Ct().CEREBRO_TERMINAL_WIDTH;if(t===void 0)return;const e=Number.parseInt(t,10);if(!(Number.isNaN(e)||e<=0))return e};class Nt{lines;constructor(){this.lines=[]}add(e){this.lines.push(e)}toString(){return this.lines.join(ee.EOL)}header(e){this.add(j(e)),this.lines.push("")}}const Ce=t=>t!==void 0&&t>0?t:ke().columns,je=(t,e,n,r)=>{if(t.length===0||t.some(c=>c.length!==2))return;let s=0;for(const c of t){const h=c[0];if(h===void 0)continue;const l=Ie(h);l>s&&(s=l)}if(s===0)return;const o=n+r,i=s+o,a=20+o;if(i+a>e)return;const u=e-i;return[i,u]};class Re extends Nt{constructor(e){if(super(),e.header&&this.header($(e.header)),e.content){if(e.raw)if(Array.isArray(e.content)&&e.content.every(n=>typeof n=="string"))e.content.forEach(n=>{Array.isArray(n)?n.forEach(r=>{this.add($(r))}):this.add($(n))});else if(typeof e.content=="string")this.add($(e.content));else throw new TypeError("Invalid raw content, must be a string or array of strings.");else this.add(this.getContentLines(e.content));this.add("")}}getContentLines(e){if(typeof e=="string"){const n=R({showHeader:!1,style:{border:_,paddingLeft:4,paddingRight:1},terminalWidth:T(),truncateOverflow:!1,wordWrap:!0});return n.addRow([$(e)]),n.toString()}if(Array.isArray(e)&&e.every(n=>typeof n=="string"||Array.isArray(n)&&n.every(r=>typeof r=="string"))){const n=Ce(T()),r=a=>Array.isArray(a)?a.map(u=>$(u)):[$(a)],s=e.map(a=>r(a)),o=je(s,n,4,1),i=R({columnWidths:o,showHeader:!1,style:{border:_,paddingLeft:4,paddingRight:1},terminalWidth:n,truncateOverflow:!1,wordWrap:!0});return s.forEach(a=>{o!==void 0&&a.length===2?i.addRow([{content:a[0],wordWrap:!1},a[1]]):i.addRow(a)}),i.toString()}if(typeof e=="object"){const n=e;if(!n.options||!n.data)throw new Error(`Must have an "options" or "data" property
4
4
  ${JSON.stringify(e)}`);const r=R({showHeader:!1,style:{border:_,paddingLeft:4,paddingRight:1},terminalWidth:T(),truncateOverflow:!1,wordWrap:!0});return n.data.forEach(s=>{Array.isArray(s)?r.addRow(s.map(o=>$(o))):r.addRow([$(s)])}),r.toString()}throw new Error(`invalid input - 'content' must be a string, array of strings or a object:
@@ -1 +1 @@
1
- import{createRequire as C}from"node:module";import{getAffectedProjects as S}from"@visulima/task-runner";import{i as W}from"./index-BjdW45xX.js";import{V as j}from"./vis-user-error-C8HBoCLE.js";import{r as A}from"./affected-shas-Dd0P7fGD.js";let T;const $=e=>(T??=C(import.meta.url))(e),f=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,R=e=>{if(typeof f<"u"&&f.versions&&f.versions.node){const[t,s]=f.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return f.getBuiltinModule(e)}return $(e)},{spawnSync:I}=R("node:child_process"),v=new Set(["deep","direct","none"]),B=e=>{const t=[],s=e.split("\0");for(let n=0;n<s.length;n++){const o=s[n];if(!o||o.length<4)continue;const p=o.slice(0,2),d=o.slice(3);if(d&&t.push(d),p.includes("R")||p.includes("C")){n+=1;const c=s[n];c&&t.push(c)}}return t},P=e=>{const t=I("git",["status","--porcelain","-z"],{cwd:e,encoding:"utf8"});return t.error||t.status!==0||typeof t.stdout!="string"?[]:B(t.stdout)},D=async(e,t,s={})=>{const n=e.downstream??"deep",o=e.upstream??"none";if(!v.has(n))throw new j(`Invalid --downstream value: "${n}". Must be "none", "direct", or "deep".`);if(!v.has(o))throw new j(`Invalid --upstream value: "${o}". Must be "none", "direct", or "deep".`);const{projectGraph:p,projects:d,workspaceRoot:c}=t,u=[];let{base:m}=e,{head:r}=e;if(!m||!r){const l=A({defaultBase:s.defaultBase,workspaceRoot:c});m=m||l.base,r=r||l.head,u.push(`Resolved affected refs from ${l.provider} (${l.notes.join("; ")})`)}const k=s.runningInCi??W,h=r==="HEAD"||r==="",b=e.uncommitted??(!k&&h);let a=[];if(b)if(h){const g=(s.readWorkingTreeChanges??P)(c),y=Object.values(d).map(i=>i.root?.replace(/\/$/,"")).filter(i=>!!i&&i!==".");a=g.filter(i=>y.some(_=>i===_||i.startsWith(`${_}/`)));const w=g.length-a.length;a.length>0&&u.push(`including ${a.length} uncommitted working-tree file(s)`),w>0&&u.push(`ignoring ${w} uncommitted path(s) outside any project (untracked scratch would otherwise mark every project affected)`)}else u.push(`ignoring --uncommitted: --head=${r} pins the comparison to a commit, not the working tree`);return{...await S({additionalChangedFiles:a,base:m,downstream:n,head:r,projectGraph:p,projects:d,upstream:o,workspaceRoot:c}),notes:u,uncommittedFileCount:a.length}};export{D as s};
1
+ import{createRequire as C}from"node:module";import{getAffectedProjects as S}from"@visulima/task-runner";import{i as W}from"./index-BjdW45xX.js";import{V as j}from"./vis-user-error-Um2Qg_C1.js";import{r as A}from"./affected-shas-Dd0P7fGD.js";let T;const $=e=>(T??=C(import.meta.url))(e),f=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,R=e=>{if(typeof f<"u"&&f.versions&&f.versions.node){const[t,s]=f.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return f.getBuiltinModule(e)}return $(e)},{spawnSync:I}=R("node:child_process"),v=new Set(["deep","direct","none"]),B=e=>{const t=[],s=e.split("\0");for(let n=0;n<s.length;n++){const o=s[n];if(!o||o.length<4)continue;const p=o.slice(0,2),d=o.slice(3);if(d&&t.push(d),p.includes("R")||p.includes("C")){n+=1;const c=s[n];c&&t.push(c)}}return t},P=e=>{const t=I("git",["status","--porcelain","-z"],{cwd:e,encoding:"utf8"});return t.error||t.status!==0||typeof t.stdout!="string"?[]:B(t.stdout)},D=async(e,t,s={})=>{const n=e.downstream??"deep",o=e.upstream??"none";if(!v.has(n))throw new j(`Invalid --downstream value: "${n}". Must be "none", "direct", or "deep".`);if(!v.has(o))throw new j(`Invalid --upstream value: "${o}". Must be "none", "direct", or "deep".`);const{projectGraph:p,projects:d,workspaceRoot:c}=t,u=[];let{base:m}=e,{head:r}=e;if(!m||!r){const l=A({defaultBase:s.defaultBase,workspaceRoot:c});m=m||l.base,r=r||l.head,u.push(`Resolved affected refs from ${l.provider} (${l.notes.join("; ")})`)}const k=s.runningInCi??W,h=r==="HEAD"||r==="",b=e.uncommitted??(!k&&h);let a=[];if(b)if(h){const g=(s.readWorkingTreeChanges??P)(c),y=Object.values(d).map(i=>i.root?.replace(/\/$/,"")).filter(i=>!!i&&i!==".");a=g.filter(i=>y.some(_=>i===_||i.startsWith(`${_}/`)));const w=g.length-a.length;a.length>0&&u.push(`including ${a.length} uncommitted working-tree file(s)`),w>0&&u.push(`ignoring ${w} uncommitted path(s) outside any project (untracked scratch would otherwise mark every project affected)`)}else u.push(`ignoring --uncommitted: --head=${r} pins the comparison to a commit, not the working tree`);return{...await S({additionalChangedFiles:a,base:m,downstream:n,head:r,projectGraph:p,projects:d,upstream:o,workspaceRoot:c}),notes:u,uncommittedFileCount:a.length}};export{D as s};
@@ -1 +1 @@
1
- import{createRequire as v}from"node:module";import{t as T}from"./compile-cache-DoMHRsRZ.js";import{l as w,i as R,a as j,b as M,c as m,g as S}from"./package-version-CuJee7dB.js";import{i as $}from"./index-BjdW45xX.js";let _;const x=s=>(_??=v(import.meta.url))(s),t=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,b=s=>{if(typeof t<"u"&&t.versions&&t.versions.node){const[e,o]=t.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return t.getBuiltinModule(s)}return x(s)},{createRequire:y}=b("node:module");let N;const O=s=>(N??=y(import.meta.url))(s),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,f=s=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[e,o]=r.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return r.getBuiltinModule(s)}return O(s)},{execFileSync:C}=f("node:child_process"),{totalmem:I}=f("node:os"),q=/--max-old-space-size=(\d+)/,z=/--max-semi-space-size=(\d+)/,E=s=>Math.floor(I()/1024/1024*s),P=s=>s<=512?4:s<=1024?8:s<=2048?16:s<=4096?32:s<=8192?64:Math.floor(Math.log2(s))*8,d=(s,e)=>{for(const o of e){const n=s.exec(o);if(n)return Number.parseInt(n[1],10)}},B=s=>{const o=[...w()],n=[...R()],a=d(q,o),p=d(z,o);if(a!==void 0&&p!==void 0)return;const l=a??E(.75),g=p??P(l),c=[];if(a===void 0&&c.push(`--max-old-space-size=${String(l)}`),p===void 0&&c.push(`--max-semi-space-size=${String(g)}`),c.length!==0)try{C(j(),[...c,...o,...n.slice(1)],{env:M(),stdio:"inherit"}),m(0)}catch(h){const u=h.status;m(typeof u=="number"?u:1)}},V=()=>{process.env.VIS_VERSION=S()},H=s=>{!process.stdout.isTTY||$||process.env.TERM==="dumb"||process.stdout.write(`\x1B]0;${s}\x07`)},L=new Set(["","--help","--version","-h","-v","completion","dlx","exec","x"]),i=process.argv[2]??"";!L.has(i)&&!process.argv.includes("--help")&&!process.argv.includes("-h")&&B();process.argv.includes("--no-color")&&(process.env.NO_COLOR="1",process.env.FORCE_COLOR="0");V();T();(async()=>{if(i==="__pm-shim"){const{dispatchShim:e}=await import("../packem_chunks/dispatch.js");e(process.argv[3]??"",process.argv.slice(4));return}if(i==="x"){const{runLeanX:e}=await import("../packem_chunks/lean.js");await e(process.argv.slice(3));return}if(i==="exec"||i==="dlx"){const{runExecCli:e}=await import("../packem_chunks/cli-exec.js");await e();return}const{runCli:s}=await import("../packem_chunks/cli-main.js").then(e=>e.ax);await s()})();export{H as s};
1
+ import{createRequire as v}from"node:module";import{t as T}from"./compile-cache-DoMHRsRZ.js";import{l as w,i as R,a as j,b as M,c as m,g as S}from"./package-version-BdIBhdr7.js";import{i as $}from"./index-BjdW45xX.js";let _;const x=s=>(_??=v(import.meta.url))(s),t=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,b=s=>{if(typeof t<"u"&&t.versions&&t.versions.node){const[e,o]=t.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return t.getBuiltinModule(s)}return x(s)},{createRequire:y}=b("node:module");let N;const O=s=>(N??=y(import.meta.url))(s),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,f=s=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[e,o]=r.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return r.getBuiltinModule(s)}return O(s)},{execFileSync:C}=f("node:child_process"),{totalmem:I}=f("node:os"),q=/--max-old-space-size=(\d+)/,z=/--max-semi-space-size=(\d+)/,E=s=>Math.floor(I()/1024/1024*s),P=s=>s<=512?4:s<=1024?8:s<=2048?16:s<=4096?32:s<=8192?64:Math.floor(Math.log2(s))*8,d=(s,e)=>{for(const o of e){const n=s.exec(o);if(n)return Number.parseInt(n[1],10)}},B=s=>{const o=[...w()],n=[...R()],a=d(q,o),p=d(z,o);if(a!==void 0&&p!==void 0)return;const l=a??E(.75),g=p??P(l),c=[];if(a===void 0&&c.push(`--max-old-space-size=${String(l)}`),p===void 0&&c.push(`--max-semi-space-size=${String(g)}`),c.length!==0)try{C(j(),[...c,...o,...n.slice(1)],{env:M(),stdio:"inherit"}),m(0)}catch(h){const u=h.status;m(typeof u=="number"?u:1)}},V=()=>{process.env.VIS_VERSION=S()},H=s=>{!process.stdout.isTTY||$||process.env.TERM==="dumb"||process.stdout.write(`\x1B]0;${s}\x07`)},L=new Set(["","--help","--version","-h","-v","completion","dlx","exec","x"]),i=process.argv[2]??"";!L.has(i)&&!process.argv.includes("--help")&&!process.argv.includes("-h")&&B();process.argv.includes("--no-color")&&(process.env.NO_COLOR="1",process.env.FORCE_COLOR="0");V();T();(async()=>{if(i==="__pm-shim"){const{dispatchShim:e}=await import("../packem_chunks/dispatch.js");e(process.argv[3]??"",process.argv.slice(4));return}if(i==="x"){const{runLeanX:e}=await import("../packem_chunks/lean.js");await e(process.argv.slice(3));return}if(i==="exec"||i==="dlx"){const{runExecCli:e}=await import("../packem_chunks/cli-exec.js");await e();return}const{runCli:s}=await import("../packem_chunks/cli-main.js").then(e=>e.ax);await s()})();export{H as s};
@@ -1 +1 @@
1
- import{b as e}from"./vis-user-error-C8HBoCLE.js";const o={filter:{alias:"F",description:"Filter packages by name pattern",multiple:!0,type:String},parallel:{defaultValue:!1,description:"Run concurrently without topological ordering",type:Boolean},recursive:{alias:"r",defaultValue:!1,description:"Run in every workspace package",type:Boolean},reverse:{defaultValue:!1,description:"Reverse topological execution order",type:Boolean},"shell-mode":{alias:"c",defaultValue:!1,description:"Execute within shell environment",type:Boolean},"workspace-root":{alias:"w",defaultValue:!1,description:"Run on workspace root only",type:Boolean}},l=e({argument:{description:"Command to execute followed by arguments",name:"command",type:String},description:"Execute a local node_modules/.bin command (no remote fallback)",examples:[["vis exec eslint .","Run local eslint"],["vis exec tsc --noEmit","Run local TypeScript check"],["vis exec -r -- eslint .","Run in all workspace packages"],["vis exec -c 'echo $PATH'","Shell mode"]],group:"Run & Execute",loader:()=>import("../packem_chunks/handler.js"),name:"exec",options:o});export{l as e};
1
+ import{b as e}from"./vis-user-error-Um2Qg_C1.js";const o={filter:{alias:"F",description:"Filter packages by name pattern",multiple:!0,type:String},parallel:{defaultValue:!1,description:"Run concurrently without topological ordering",type:Boolean},recursive:{alias:"r",defaultValue:!1,description:"Run in every workspace package",type:Boolean},reverse:{defaultValue:!1,description:"Reverse topological execution order",type:Boolean},"shell-mode":{alias:"c",defaultValue:!1,description:"Execute within shell environment",type:Boolean},"workspace-root":{alias:"w",defaultValue:!1,description:"Run on workspace root only",type:Boolean}},l=e({argument:{description:"Command to execute followed by arguments",name:"command",type:String},description:"Execute a local node_modules/.bin command (no remote fallback)",examples:[["vis exec eslint .","Run local eslint"],["vis exec tsc --noEmit","Run local TypeScript check"],["vis exec -r -- eslint .","Run in all workspace packages"],["vis exec -c 'echo $PATH'","Shell mode"]],group:"Run & Execute",loader:()=>import("../packem_chunks/handler.js"),name:"exec",options:o});export{l as e};