@socketsecurity/lib 3.2.6 → 3.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/constants/node.js +1 -1
- package/dist/constants/packages.js +4 -4
- package/dist/external/@inquirer/confirm.js +3199 -18
- package/dist/external/@inquirer/input.js +3223 -18
- package/dist/external/@inquirer/password.js +3331 -18
- package/dist/external/@inquirer/search.js +3328 -21
- package/dist/external/@inquirer/select.js +3445 -21
- package/dist/external/@npmcli/package-json/lib/read-package.js +149 -2
- package/dist/external/@npmcli/package-json/lib/sort.js +96 -1
- package/dist/external/@npmcli/package-json.js +16758 -13
- package/dist/external/@npmcli/promise-spawn.js +480 -1
- package/dist/external/@socketregistry/is-unicode-supported.js +42 -1
- package/dist/external/@socketregistry/packageurl-js.js +6493 -2
- package/dist/external/@socketregistry/yocto-spinner.js +460 -4
- package/dist/external/@yarnpkg/extensions.js +1025 -1
- package/dist/external/cacache.js +13016 -12
- package/dist/external/debug.js +27 -1
- package/dist/external/del.js +7088 -2
- package/dist/external/fast-glob.js +5721 -2
- package/dist/external/fast-sort.js +140 -1
- package/dist/external/get-east-asian-width.js +90 -1
- package/dist/external/libnpmexec.js +33 -1
- package/dist/external/libnpmpack.js +67595 -129
- package/dist/external/make-fetch-happen.js +22595 -21
- package/dist/external/normalize-package-data.js +4474 -2
- package/dist/external/npm-package-arg.js +4511 -2
- package/dist/external/pacote.js +50270 -57
- package/dist/external/picomatch.js +1520 -1
- package/dist/external/semver.js +1930 -1
- package/dist/external/spdx-correct.js +1380 -1
- package/dist/external/spdx-expression-parse.js +1043 -1
- package/dist/external/streaming-iterables.js +1056 -1
- package/dist/external/validate-npm-package-name.js +100 -1
- package/dist/external/which.js +258 -1
- package/dist/external/yargs-parser.js +1075 -1
- package/dist/external/yoctocolors-cjs.js +88 -1
- package/dist/external/zod.js +15207 -13
- package/dist/lifecycle-script-names.js +3 -4
- package/dist/maintained-node-versions.js +3 -4
- package/dist/package-default-node-range.js +4 -5
- package/dist/package-default-socket-categories.js +3 -4
- package/dist/package-extensions.js +3 -4
- package/dist/utils/get-ipc.js +3 -5
- package/package.json +1 -1
|
@@ -3,21 +3,3334 @@
|
|
|
3
3
|
* Bundled from @inquirer/password
|
|
4
4
|
* This is a zero-dependency bundle created by esbuild.
|
|
5
5
|
*/
|
|
6
|
-
"use strict";var pt=Object.defineProperty;var s=(e,u)=>pt(e,"name",{value:u,configurable:!0});var p=(e,u)=>()=>(u||e((u={exports:{}}).exports,u),u.exports);var eu=p(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});A.isEnterKey=A.isNumberKey=A.isTabKey=A.isBackspaceKey=A.isSpaceKey=A.isDownKey=A.isUpKey=void 0;var Ct=s((e,u=[])=>e.name==="up"||u.includes("vim")&&e.name==="k"||u.includes("emacs")&&e.ctrl&&e.name==="p","isUpKey");A.isUpKey=Ct;var gt=s((e,u=[])=>e.name==="down"||u.includes("vim")&&e.name==="j"||u.includes("emacs")&&e.ctrl&&e.name==="n","isDownKey");A.isDownKey=gt;var Et=s(e=>e.name==="space","isSpaceKey");A.isSpaceKey=Et;var bt=s(e=>e.name==="backspace","isBackspaceKey");A.isBackspaceKey=bt;var mt=s(e=>e.name==="tab","isTabKey");A.isTabKey=mt;var Bt=s(e=>"1234567890".includes(e.name),"isNumberKey");A.isNumberKey=Bt;var yt=s(e=>e.name==="enter"||e.name==="return","isEnterKey");A.isEnterKey=yt});var te=p(S=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});S.ValidationError=S.HookError=S.ExitPromptError=S.CancelPromptError=S.AbortPromptError=void 0;var pe=class extends Error{static{s(this,"AbortPromptError")}name="AbortPromptError";message="Prompt was aborted";constructor(u){super(),this.cause=u?.cause}};S.AbortPromptError=pe;var Ce=class extends Error{static{s(this,"CancelPromptError")}name="CancelPromptError";message="Prompt was canceled"};S.CancelPromptError=Ce;var ge=class extends Error{static{s(this,"ExitPromptError")}name="ExitPromptError"};S.ExitPromptError=ge;var Ee=class extends Error{static{s(this,"HookError")}name="HookError"};S.HookError=Ee;var be=class extends Error{static{s(this,"ValidationError")}name="ValidationError"};S.ValidationError=be});var I=p(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.effectScheduler=void 0;j.withHooks=wt;j.readline=nu;j.withUpdates=Du;j.withPointer=At;j.handleChange=vt;var uu=require("node:async_hooks"),tu=te(),ru=new uu.AsyncLocalStorage;function _t(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}s(_t,"createStore");function wt(e,u){let t=_t(e);return ru.run(t,()=>{function r(n){t.handleChange=()=>{t.index=0,n()},t.handleChange()}return s(r,"cycle"),u(r)})}s(wt,"withHooks");function K(){let e=ru.getStore();if(!e)throw new tu.HookError("[Inquirer] Hook functions can only be called from within a prompt");return e}s(K,"getStore");function nu(){return K().rl}s(nu,"readline");function Du(e){let u=s((...t)=>{let r=K(),n=!1,D=r.handleChange;r.handleChange=()=>{n=!0};let i=e(...t);return n&&D(),r.handleChange=D,i},"wrapped");return uu.AsyncResource.bind(u)}s(Du,"withUpdates");function At(e){let u=K(),{index:t}=u,r={get(){return u.hooks[t]},set(D){u.hooks[t]=D},initialized:t in u.hooks},n=e(r);return u.index++,n}s(At,"withPointer");function vt(){K().handleChange()}s(vt,"handleChange");j.effectScheduler={queue(e){let u=K(),{index:t}=u;u.hooksEffect.push(()=>{u.hooksCleanup[t]?.();let r=e(nu());if(r!=null&&typeof r!="function")throw new tu.ValidationError("useEffect return value must be a cleanup function or nothing.");u.hooksCleanup[t]=r})},run(){let e=K();Du(()=>{e.hooksEffect.forEach(u=>{u()}),e.hooksEffect.length=0})()},clearAll(){let e=K();e.hooksCleanup.forEach(u=>{u?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}}});var re=p(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.useState=kt;var xt=require("node:async_hooks"),iu=I();function kt(e){return(0,iu.withPointer)(u=>{let t=xt.AsyncResource.bind(s(function(D){u.get()!==D&&(u.set(D),(0,iu.handleChange)())},"setState"));if(u.initialized)return[u.get(),t];let r=typeof e=="function"?e():e;return u.set(r),[r,t]})}s(kt,"useState")});var ne=p(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.useEffect=St;var su=I();function St(e,u){(0,su.withPointer)(t=>{let r=t.get();(!Array.isArray(r)||u.some((D,i)=>!Object.is(D,r[i])))&&su.effectScheduler.queue(e),t.set(u)})}s(St,"useEffect")});var ye=p((yn,ou)=>{var Lt=require("node:tty"),Pt=Lt?.WriteStream?.prototype?.hasColors?.()??!1,d=s((e,u)=>{if(!Pt)return n=>n;let t=`\x1B[${e}m`,r=`\x1B[${u}m`;return n=>{let D=n+"",i=D.indexOf(r);if(i===-1)return t+D+r;let o=t,l=0,f=(u===22?r:"")+t;for(;i!==-1;)o+=D.slice(l,i)+f,l=i+r.length,i=D.indexOf(r,l);return o+=D.slice(l)+r,o}},"format"),h={};h.reset=d(0,0);h.bold=d(1,22);h.dim=d(2,22);h.italic=d(3,23);h.underline=d(4,24);h.overline=d(53,55);h.inverse=d(7,27);h.hidden=d(8,28);h.strikethrough=d(9,29);h.black=d(30,39);h.red=d(31,39);h.green=d(32,39);h.yellow=d(33,39);h.blue=d(34,39);h.magenta=d(35,39);h.cyan=d(36,39);h.white=d(37,39);h.gray=d(90,39);h.bgBlack=d(40,49);h.bgRed=d(41,49);h.bgGreen=d(42,49);h.bgYellow=d(43,49);h.bgBlue=d(44,49);h.bgMagenta=d(45,49);h.bgCyan=d(46,49);h.bgWhite=d(47,49);h.bgGray=d(100,49);h.redBright=d(91,39);h.greenBright=d(92,39);h.yellowBright=d(93,39);h.blueBright=d(94,39);h.magentaBright=d(95,39);h.cyanBright=d(96,39);h.whiteBright=d(97,39);h.bgRedBright=d(101,49);h.bgGreenBright=d(102,49);h.bgYellowBright=d(103,49);h.bgBlueBright=d(104,49);h.bgMagentaBright=d(105,49);h.bgCyanBright=d(106,49);h.bgWhiteBright=d(107,49);ou.exports=h});var _e=p(x=>{"use strict";var Ot=x&&x.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(x,"__esModule",{value:!0});x.replaceSymbols=x.fallbackSymbols=x.mainSymbols=void 0;var R=Ot(require("node:process"));function Rt(){return R.default.platform!=="win32"?R.default.env.TERM!=="linux":!!R.default.env.WT_SESSION||!!R.default.env.TERMINUS_SUBLIME||R.default.env.ConEmuTask==="{cmd::Cmder}"||R.default.env.TERM_PROGRAM==="Terminus-Sublime"||R.default.env.TERM_PROGRAM==="vscode"||R.default.env.TERM==="xterm-256color"||R.default.env.TERM==="alacritty"||R.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}s(Rt,"isUnicodeSupported");var lu={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},au={tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},Mt={tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"};x.mainSymbols={...lu,...au};x.fallbackSymbols={...lu,...Mt};var cu=Rt(),jt=cu?x.mainSymbols:x.fallbackSymbols;x.default=jt;var Ut=Object.entries(au),qt=s((e,{useFallback:u=!cu}={})=>{if(u)for(let[t,r]of Ut){let n=x.fallbackSymbols[t];if(!n)throw new Error(`Unable to find fallback for ${t}`);e=e.replaceAll(r,n)}return e},"replaceSymbols");x.replaceSymbols=qt});var hu=p(G=>{"use strict";var fu=G&&G.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(G,"__esModule",{value:!0});G.defaultTheme=void 0;var L=fu(ye()),Tt=fu(_e());G.defaultTheme={prefix:{idle:L.default.blue("?"),done:L.default.green(Tt.default.tick)},spinner:{interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"].map(e=>L.default.yellow(e))},style:{answer:L.default.cyan,message:L.default.bold,error:s(e=>L.default.red(`> ${e}`),"error"),defaultAnswer:s(e=>L.default.dim(`(${e})`),"defaultAnswer"),help:L.default.dim,highlight:L.default.cyan,key:s(e=>L.default.cyan(L.default.bold(`<${e}>`)),"key")}}});var Ae=p(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.makeTheme=It;var Kt=hu();function du(e){if(typeof e!="object"||e===null)return!1;let u=e;for(;Object.getPrototypeOf(u)!==null;)u=Object.getPrototypeOf(u);return Object.getPrototypeOf(e)===u}s(du,"isPlainObject");function Fu(...e){let u={};for(let t of e)for(let[r,n]of Object.entries(t)){let D=u[r];u[r]=du(D)&&du(n)?Fu(D,n):n}return u}s(Fu,"deepMerge");function It(...e){let u=[Kt.defaultTheme,...e.filter(t=>t!=null)];return Fu(...u)}s(It,"makeTheme")});var Cu=p(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.usePrefix=Gt;var pu=re(),$t=ne(),Nt=Ae();function Gt({status:e="idle",theme:u}){let[t,r]=(0,pu.useState)(!1),[n,D]=(0,pu.useState)(0),{prefix:i,spinner:o}=(0,Nt.makeTheme)(u);return(0,$t.useEffect)(()=>{if(e==="loading"){let a,f=-1,C=setTimeout(()=>{r(!0),a=setInterval(()=>{f=f+1,D(f%o.frames.length)},o.interval)},300);return()=>{clearTimeout(C),clearInterval(a)}}else r(!1)},[e]),t?o.frames[n]:typeof i=="string"?i:i[e==="loading"?"idle":e]??i.idle}s(Gt,"usePrefix")});var gu=p(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.useMemo=Vt;var Wt=I();function Vt(e,u){return(0,Wt.withPointer)(t=>{let r=t.get();if(!r||r.dependencies.length!==u.length||r.dependencies.some((n,D)=>n!==u[D])){let n=e();return t.set({value:n,dependencies:u}),n}return r.value})}s(Vt,"useMemo")});var De=p(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.useRef=zt;var Ht=re();function zt(e){return(0,Ht.useState)({current:e})[0]}s(zt,"useRef")});var Eu=p(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.useKeypress=Qt;var Yt=De(),Jt=ne(),Zt=I();function Qt(e){let u=(0,Yt.useRef)(e);u.current=e,(0,Jt.useEffect)(t=>{let r=!1,n=(0,Zt.withUpdates)((D,i)=>{r||u.current(i,t)});return t.input.on("keypress",n),()=>{r=!0,t.input.removeListener("keypress",n)}},[])}s(Qt,"useKeypress")});var mu=p((Tn,bu)=>{"use strict";bu.exports=er;function Xt(e){let u={defaultWidth:0,output:process.stdout,tty:require("tty")};return e?(Object.keys(u).forEach(function(t){e[t]||(e[t]=u[t])}),e):u}s(Xt,"normalizeOpts");function er(e){let u=Xt(e);if(u.output.getWindowSize)return u.output.getWindowSize()[0]||u.defaultWidth;if(u.tty.getWindowSize)return u.tty.getWindowSize()[1]||u.defaultWidth;if(u.output.columns)return u.output.columns;if(process.env.CLI_WIDTH){let t=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(t)&&t!==0)return t}return u.defaultWidth}s(er,"cliWidth")});var yu=p((In,Bu)=>{"use strict";Bu.exports=({onlyFirst:e=!1}={})=>{let u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(u,e?void 0:"g")}});var Le=p(($n,_u)=>{"use strict";var ur=yu();_u.exports=e=>typeof e=="string"?e.replace(ur(),""):e});var Au=p((Nn,Pe)=>{"use strict";var wu=s(e=>Number.isNaN(e)?!1:e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141),"isFullwidthCodePoint");Pe.exports=wu;Pe.exports.default=wu});var xu=p((Wn,vu)=>{"use strict";vu.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var Su=p((Vn,Oe)=>{"use strict";var tr=Le(),rr=Au(),nr=xu(),ku=s(e=>{if(typeof e!="string"||e.length===0||(e=tr(e),e.length===0))return 0;e=e.replace(nr()," ");let u=0;for(let t=0;t<e.length;t++){let r=e.codePointAt(t);r<=31||r>=127&&r<=159||r>=768&&r<=879||(r>65535&&t++,u+=rr(r)?2:1)}return u},"stringWidth");Oe.exports=ku;Oe.exports.default=ku});var Pu=p((zn,Lu)=>{"use strict";Lu.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Re=p((Yn,Ru)=>{var Z=Pu(),Ou={};for(let e of Object.keys(Z))Ou[Z[e]]=e;var c={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Ru.exports=c;for(let e of Object.keys(c)){if(!("channels"in c[e]))throw new Error("missing channels property: "+e);if(!("labels"in c[e]))throw new Error("missing channel labels property: "+e);if(c[e].labels.length!==c[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:u,labels:t}=c[e];delete c[e].channels,delete c[e].labels,Object.defineProperty(c[e],"channels",{value:u}),Object.defineProperty(c[e],"labels",{value:t})}c.rgb.hsl=function(e){let u=e[0]/255,t=e[1]/255,r=e[2]/255,n=Math.min(u,t,r),D=Math.max(u,t,r),i=D-n,o,l;D===n?o=0:u===D?o=(t-r)/i:t===D?o=2+(r-u)/i:r===D&&(o=4+(u-t)/i),o=Math.min(o*60,360),o<0&&(o+=360);let a=(n+D)/2;return D===n?l=0:a<=.5?l=i/(D+n):l=i/(2-D-n),[o,l*100,a*100]};c.rgb.hsv=function(e){let u,t,r,n,D,i=e[0]/255,o=e[1]/255,l=e[2]/255,a=Math.max(i,o,l),f=a-Math.min(i,o,l),C=s(function(y){return(a-y)/6/f+1/2},"diffc");return f===0?(n=0,D=0):(D=f/a,u=C(i),t=C(o),r=C(l),i===a?n=r-t:o===a?n=1/3+u-r:l===a&&(n=2/3+t-u),n<0?n+=1:n>1&&(n-=1)),[n*360,D*100,a*100]};c.rgb.hwb=function(e){let u=e[0],t=e[1],r=e[2],n=c.rgb.hsl(e)[0],D=1/255*Math.min(u,Math.min(t,r));return r=1-1/255*Math.max(u,Math.max(t,r)),[n,D*100,r*100]};c.rgb.cmyk=function(e){let u=e[0]/255,t=e[1]/255,r=e[2]/255,n=Math.min(1-u,1-t,1-r),D=(1-u-n)/(1-n)||0,i=(1-t-n)/(1-n)||0,o=(1-r-n)/(1-n)||0;return[D*100,i*100,o*100,n*100]};function Dr(e,u){return(e[0]-u[0])**2+(e[1]-u[1])**2+(e[2]-u[2])**2}s(Dr,"comparativeDistance");c.rgb.keyword=function(e){let u=Ou[e];if(u)return u;let t=1/0,r;for(let n of Object.keys(Z)){let D=Z[n],i=Dr(e,D);i<t&&(t=i,r=n)}return r};c.keyword.rgb=function(e){return Z[e]};c.rgb.xyz=function(e){let u=e[0]/255,t=e[1]/255,r=e[2]/255;u=u>.04045?((u+.055)/1.055)**2.4:u/12.92,t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;let n=u*.4124+t*.3576+r*.1805,D=u*.2126+t*.7152+r*.0722,i=u*.0193+t*.1192+r*.9505;return[n*100,D*100,i*100]};c.rgb.lab=function(e){let u=c.rgb.xyz(e),t=u[0],r=u[1],n=u[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let D=116*r-16,i=500*(t-r),o=200*(r-n);return[D,i,o]};c.hsl.rgb=function(e){let u=e[0]/360,t=e[1]/100,r=e[2]/100,n,D,i;if(t===0)return i=r*255,[i,i,i];r<.5?n=r*(1+t):n=r+t-r*t;let o=2*r-n,l=[0,0,0];for(let a=0;a<3;a++)D=u+1/3*-(a-1),D<0&&D++,D>1&&D--,6*D<1?i=o+(n-o)*6*D:2*D<1?i=n:3*D<2?i=o+(n-o)*(2/3-D)*6:i=o,l[a]=i*255;return l};c.hsl.hsv=function(e){let u=e[0],t=e[1]/100,r=e[2]/100,n=t,D=Math.max(r,.01);r*=2,t*=r<=1?r:2-r,n*=D<=1?D:2-D;let i=(r+t)/2,o=r===0?2*n/(D+n):2*t/(r+t);return[u,o*100,i*100]};c.hsv.rgb=function(e){let u=e[0]/60,t=e[1]/100,r=e[2]/100,n=Math.floor(u)%6,D=u-Math.floor(u),i=255*r*(1-t),o=255*r*(1-t*D),l=255*r*(1-t*(1-D));switch(r*=255,n){case 0:return[r,l,i];case 1:return[o,r,i];case 2:return[i,r,l];case 3:return[i,o,r];case 4:return[l,i,r];case 5:return[r,i,o]}};c.hsv.hsl=function(e){let u=e[0],t=e[1]/100,r=e[2]/100,n=Math.max(r,.01),D,i;i=(2-t)*r;let o=(2-t)*n;return D=t*n,D/=o<=1?o:2-o,D=D||0,i/=2,[u,D*100,i*100]};c.hwb.rgb=function(e){let u=e[0]/360,t=e[1]/100,r=e[2]/100,n=t+r,D;n>1&&(t/=n,r/=n);let i=Math.floor(6*u),o=1-r;D=6*u-i,(i&1)!==0&&(D=1-D);let l=t+D*(o-t),a,f,C;switch(i){default:case 6:case 0:a=o,f=l,C=t;break;case 1:a=l,f=o,C=t;break;case 2:a=t,f=o,C=l;break;case 3:a=t,f=l,C=o;break;case 4:a=l,f=t,C=o;break;case 5:a=o,f=t,C=l;break}return[a*255,f*255,C*255]};c.cmyk.rgb=function(e){let u=e[0]/100,t=e[1]/100,r=e[2]/100,n=e[3]/100,D=1-Math.min(1,u*(1-n)+n),i=1-Math.min(1,t*(1-n)+n),o=1-Math.min(1,r*(1-n)+n);return[D*255,i*255,o*255]};c.xyz.rgb=function(e){let u=e[0]/100,t=e[1]/100,r=e[2]/100,n,D,i;return n=u*3.2406+t*-1.5372+r*-.4986,D=u*-.9689+t*1.8758+r*.0415,i=u*.0557+t*-.204+r*1.057,n=n>.0031308?1.055*n**(1/2.4)-.055:n*12.92,D=D>.0031308?1.055*D**(1/2.4)-.055:D*12.92,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,n=Math.min(Math.max(0,n),1),D=Math.min(Math.max(0,D),1),i=Math.min(Math.max(0,i),1),[n*255,D*255,i*255]};c.xyz.lab=function(e){let u=e[0],t=e[1],r=e[2];u/=95.047,t/=100,r/=108.883,u=u>.008856?u**(1/3):7.787*u+16/116,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;let n=116*t-16,D=500*(u-t),i=200*(t-r);return[n,D,i]};c.lab.xyz=function(e){let u=e[0],t=e[1],r=e[2],n,D,i;D=(u+16)/116,n=t/500+D,i=D-r/200;let o=D**3,l=n**3,a=i**3;return D=o>.008856?o:(D-16/116)/7.787,n=l>.008856?l:(n-16/116)/7.787,i=a>.008856?a:(i-16/116)/7.787,n*=95.047,D*=100,i*=108.883,[n,D,i]};c.lab.lch=function(e){let u=e[0],t=e[1],r=e[2],n;n=Math.atan2(r,t)*360/2/Math.PI,n<0&&(n+=360);let i=Math.sqrt(t*t+r*r);return[u,i,n]};c.lch.lab=function(e){let u=e[0],t=e[1],n=e[2]/360*2*Math.PI,D=t*Math.cos(n),i=t*Math.sin(n);return[u,D,i]};c.rgb.ansi16=function(e,u=null){let[t,r,n]=e,D=u===null?c.rgb.hsv(e)[2]:u;if(D=Math.round(D/50),D===0)return 30;let i=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(t/255));return D===2&&(i+=60),i};c.hsv.ansi16=function(e){return c.rgb.ansi16(c.hsv.rgb(e),e[2])};c.rgb.ansi256=function(e){let u=e[0],t=e[1],r=e[2];return u===t&&t===r?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(t/255*5)+Math.round(r/255*5)};c.ansi16.rgb=function(e){let u=e%10;if(u===0||u===7)return e>50&&(u+=3.5),u=u/10.5*255,[u,u,u];let t=(~~(e>50)+1)*.5,r=(u&1)*t*255,n=(u>>1&1)*t*255,D=(u>>2&1)*t*255;return[r,n,D]};c.ansi256.rgb=function(e){if(e>=232){let D=(e-232)*10+8;return[D,D,D]}e-=16;let u,t=Math.floor(e/36)/5*255,r=Math.floor((u=e%36)/6)/5*255,n=u%6/5*255;return[t,r,n]};c.rgb.hex=function(e){let t=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(t.length)+t};c.hex.rgb=function(e){let u=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!u)return[0,0,0];let t=u[0];u[0].length===3&&(t=t.split("").map(o=>o+o).join(""));let r=parseInt(t,16),n=r>>16&255,D=r>>8&255,i=r&255;return[n,D,i]};c.rgb.hcg=function(e){let u=e[0]/255,t=e[1]/255,r=e[2]/255,n=Math.max(Math.max(u,t),r),D=Math.min(Math.min(u,t),r),i=n-D,o,l;return i<1?o=D/(1-i):o=0,i<=0?l=0:n===u?l=(t-r)/i%6:n===t?l=2+(r-u)/i:l=4+(u-t)/i,l/=6,l%=1,[l*360,i*100,o*100]};c.hsl.hcg=function(e){let u=e[1]/100,t=e[2]/100,r=t<.5?2*u*t:2*u*(1-t),n=0;return r<1&&(n=(t-.5*r)/(1-r)),[e[0],r*100,n*100]};c.hsv.hcg=function(e){let u=e[1]/100,t=e[2]/100,r=u*t,n=0;return r<1&&(n=(t-r)/(1-r)),[e[0],r*100,n*100]};c.hcg.rgb=function(e){let u=e[0]/360,t=e[1]/100,r=e[2]/100;if(t===0)return[r*255,r*255,r*255];let n=[0,0,0],D=u%1*6,i=D%1,o=1-i,l=0;switch(Math.floor(D)){case 0:n[0]=1,n[1]=i,n[2]=0;break;case 1:n[0]=o,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=i;break;case 3:n[0]=0,n[1]=o,n[2]=1;break;case 4:n[0]=i,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=o}return l=(1-t)*r,[(t*n[0]+l)*255,(t*n[1]+l)*255,(t*n[2]+l)*255]};c.hcg.hsv=function(e){let u=e[1]/100,t=e[2]/100,r=u+t*(1-u),n=0;return r>0&&(n=u/r),[e[0],n*100,r*100]};c.hcg.hsl=function(e){let u=e[1]/100,r=e[2]/100*(1-u)+.5*u,n=0;return r>0&&r<.5?n=u/(2*r):r>=.5&&r<1&&(n=u/(2*(1-r))),[e[0],n*100,r*100]};c.hcg.hwb=function(e){let u=e[1]/100,t=e[2]/100,r=u+t*(1-u);return[e[0],(r-u)*100,(1-r)*100]};c.hwb.hcg=function(e){let u=e[1]/100,r=1-e[2]/100,n=r-u,D=0;return n<1&&(D=(r-n)/(1-n)),[e[0],n*100,D*100]};c.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};c.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};c.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};c.gray.hsl=function(e){return[0,0,e[0]]};c.gray.hsv=c.gray.hsl;c.gray.hwb=function(e){return[0,100,e[0]]};c.gray.cmyk=function(e){return[0,0,0,e[0]]};c.gray.lab=function(e){return[e[0],0,0]};c.gray.hex=function(e){let u=Math.round(e[0]/100*255)&255,r=((u<<16)+(u<<8)+u).toString(16).toUpperCase();return"000000".substring(r.length)+r};c.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});var ju=p((Zn,Mu)=>{var ie=Re();function ir(){let e={},u=Object.keys(ie);for(let t=u.length,r=0;r<t;r++)e[u[r]]={distance:-1,parent:null};return e}s(ir,"buildGraph");function sr(e){let u=ir(),t=[e];for(u[e].distance=0;t.length;){let r=t.pop(),n=Object.keys(ie[r]);for(let D=n.length,i=0;i<D;i++){let o=n[i],l=u[o];l.distance===-1&&(l.distance=u[r].distance+1,l.parent=r,t.unshift(o))}}return u}s(sr,"deriveBFS");function or(e,u){return function(t){return u(e(t))}}s(or,"link");function lr(e,u){let t=[u[e].parent,e],r=ie[u[e].parent][e],n=u[e].parent;for(;u[n].parent;)t.unshift(u[n].parent),r=or(ie[u[n].parent][n],r),n=u[n].parent;return r.conversion=t,r}s(lr,"wrapConversion");Mu.exports=function(e){let u=sr(e),t={},r=Object.keys(u);for(let n=r.length,D=0;D<n;D++){let i=r[D];u[i].parent!==null&&(t[i]=lr(i,u))}return t}});var qu=p((Xn,Uu)=>{var Me=Re(),ar=ju(),W={},cr=Object.keys(Me);function fr(e){let u=s(function(...t){let r=t[0];return r==null?r:(r.length>1&&(t=r),e(t))},"wrappedFn");return"conversion"in e&&(u.conversion=e.conversion),u}s(fr,"wrapRaw");function hr(e){let u=s(function(...t){let r=t[0];if(r==null)return r;r.length>1&&(t=r);let n=e(t);if(typeof n=="object")for(let D=n.length,i=0;i<D;i++)n[i]=Math.round(n[i]);return n},"wrappedFn");return"conversion"in e&&(u.conversion=e.conversion),u}s(hr,"wrapRounded");cr.forEach(e=>{W[e]={},Object.defineProperty(W[e],"channels",{value:Me[e].channels}),Object.defineProperty(W[e],"labels",{value:Me[e].labels});let u=ar(e);Object.keys(u).forEach(r=>{let n=u[r];W[e][r]=hr(n),W[e][r].raw=fr(n)})});Uu.exports=W});var Gu=p((uD,Nu)=>{"use strict";var Tu=s((e,u)=>(...t)=>`\x1B[${e(...t)+u}m`,"wrapAnsi16"),Ku=s((e,u)=>(...t)=>{let r=e(...t);return`\x1B[${38+u};5;${r}m`},"wrapAnsi256"),Iu=s((e,u)=>(...t)=>{let r=e(...t);return`\x1B[${38+u};2;${r[0]};${r[1]};${r[2]}m`},"wrapAnsi16m"),se=s(e=>e,"ansi2ansi"),$u=s((e,u,t)=>[e,u,t],"rgb2rgb"),V=s((e,u,t)=>{Object.defineProperty(e,u,{get:s(()=>{let r=t();return Object.defineProperty(e,u,{value:r,enumerable:!0,configurable:!0}),r},"get"),enumerable:!0,configurable:!0})},"setLazyProperty"),je,H=s((e,u,t,r)=>{je===void 0&&(je=qu());let n=r?10:0,D={};for(let[i,o]of Object.entries(je)){let l=i==="ansi16"?"ansi":i;i===u?D[l]=e(t,n):typeof o=="object"&&(D[l]=e(o[u],n))}return D},"makeDynamicStyles");function dr(){let e=new Map,u={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};u.color.gray=u.color.blackBright,u.bgColor.bgGray=u.bgColor.bgBlackBright,u.color.grey=u.color.blackBright,u.bgColor.bgGrey=u.bgColor.bgBlackBright;for(let[t,r]of Object.entries(u)){for(let[n,D]of Object.entries(r))u[n]={open:`\x1B[${D[0]}m`,close:`\x1B[${D[1]}m`},r[n]=u[n],e.set(D[0],D[1]);Object.defineProperty(u,t,{value:r,enumerable:!1})}return Object.defineProperty(u,"codes",{value:e,enumerable:!1}),u.color.close="\x1B[39m",u.bgColor.close="\x1B[49m",V(u.color,"ansi",()=>H(Tu,"ansi16",se,!1)),V(u.color,"ansi256",()=>H(Ku,"ansi256",se,!1)),V(u.color,"ansi16m",()=>H(Iu,"rgb",$u,!1)),V(u.bgColor,"ansi",()=>H(Tu,"ansi16",se,!0)),V(u.bgColor,"ansi256",()=>H(Ku,"ansi256",se,!0)),V(u.bgColor,"ansi16m",()=>H(Iu,"rgb",$u,!0)),u}s(dr,"assembleStyles");Object.defineProperty(Nu,"exports",{enumerable:!0,get:dr})});var Hu=p((rD,Vu)=>{"use strict";var Q=Su(),Fr=Le(),pr=Gu(),qe=new Set(["\x1B",""]),Cr=39,Wu=s(e=>`${qe.values().next().value}[${e}m`,"wrapAnsi"),gr=s(e=>e.split(" ").map(u=>Q(u)),"wordLengths"),Ue=s((e,u,t)=>{let r=[...u],n=!1,D=Q(Fr(e[e.length-1]));for(let[i,o]of r.entries()){let l=Q(o);if(D+l<=t?e[e.length-1]+=o:(e.push(o),D=0),qe.has(o))n=!0;else if(n&&o==="m"){n=!1;continue}n||(D+=l,D===t&&i<r.length-1&&(e.push(""),D=0))}!D&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},"wrapWord"),Er=s(e=>{let u=e.split(" "),t=u.length;for(;t>0&&!(Q(u[t-1])>0);)t--;return t===u.length?e:u.slice(0,t).join(" ")+u.slice(t).join("")},"stringVisibleTrimSpacesRight"),br=s((e,u,t={})=>{if(t.trim!==!1&&e.trim()==="")return"";let r="",n="",D,i=gr(e),o=[""];for(let[l,a]of e.split(" ").entries()){t.trim!==!1&&(o[o.length-1]=o[o.length-1].trimLeft());let f=Q(o[o.length-1]);if(l!==0&&(f>=u&&(t.wordWrap===!1||t.trim===!1)&&(o.push(""),f=0),(f>0||t.trim===!1)&&(o[o.length-1]+=" ",f++)),t.hard&&i[l]>u){let C=u-f,y=1+Math.floor((i[l]-C-1)/u);Math.floor((i[l]-1)/u)<y&&o.push(""),Ue(o,a,u);continue}if(f+i[l]>u&&f>0&&i[l]>0){if(t.wordWrap===!1&&f<u){Ue(o,a,u);continue}o.push("")}if(f+i[l]>u&&t.wordWrap===!1){Ue(o,a,u);continue}o[o.length-1]+=a}t.trim!==!1&&(o=o.map(Er)),r=o.join(`
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
6
|
+
"use strict";
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
9
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
10
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
11
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/key.js
|
|
15
|
+
var require_key = __commonJS({
|
|
16
|
+
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/key.js"(exports2) {
|
|
17
|
+
"use strict";
|
|
18
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
19
|
+
exports2.isEnterKey = exports2.isNumberKey = exports2.isTabKey = exports2.isBackspaceKey = exports2.isSpaceKey = exports2.isDownKey = exports2.isUpKey = void 0;
|
|
20
|
+
var isUpKey = /* @__PURE__ */ __name((key, keybindings = []) => (
|
|
21
|
+
// The up key
|
|
22
|
+
key.name === "up" || // Vim keybinding: hjkl keys map to left/down/up/right
|
|
23
|
+
keybindings.includes("vim") && key.name === "k" || // Emacs keybinding: Ctrl+P means "previous" in Emacs navigation conventions
|
|
24
|
+
keybindings.includes("emacs") && key.ctrl && key.name === "p"
|
|
25
|
+
), "isUpKey");
|
|
26
|
+
exports2.isUpKey = isUpKey;
|
|
27
|
+
var isDownKey = /* @__PURE__ */ __name((key, keybindings = []) => (
|
|
28
|
+
// The down key
|
|
29
|
+
key.name === "down" || // Vim keybinding: hjkl keys map to left/down/up/right
|
|
30
|
+
keybindings.includes("vim") && key.name === "j" || // Emacs keybinding: Ctrl+N means "next" in Emacs navigation conventions
|
|
31
|
+
keybindings.includes("emacs") && key.ctrl && key.name === "n"
|
|
32
|
+
), "isDownKey");
|
|
33
|
+
exports2.isDownKey = isDownKey;
|
|
34
|
+
var isSpaceKey = /* @__PURE__ */ __name((key) => key.name === "space", "isSpaceKey");
|
|
35
|
+
exports2.isSpaceKey = isSpaceKey;
|
|
36
|
+
var isBackspaceKey = /* @__PURE__ */ __name((key) => key.name === "backspace", "isBackspaceKey");
|
|
37
|
+
exports2.isBackspaceKey = isBackspaceKey;
|
|
38
|
+
var isTabKey = /* @__PURE__ */ __name((key) => key.name === "tab", "isTabKey");
|
|
39
|
+
exports2.isTabKey = isTabKey;
|
|
40
|
+
var isNumberKey = /* @__PURE__ */ __name((key) => "1234567890".includes(key.name), "isNumberKey");
|
|
41
|
+
exports2.isNumberKey = isNumberKey;
|
|
42
|
+
var isEnterKey = /* @__PURE__ */ __name((key) => key.name === "enter" || key.name === "return", "isEnterKey");
|
|
43
|
+
exports2.isEnterKey = isEnterKey;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/errors.js
|
|
48
|
+
var require_errors = __commonJS({
|
|
49
|
+
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/errors.js"(exports2) {
|
|
50
|
+
"use strict";
|
|
51
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
52
|
+
exports2.ValidationError = exports2.HookError = exports2.ExitPromptError = exports2.CancelPromptError = exports2.AbortPromptError = void 0;
|
|
53
|
+
var AbortPromptError = class extends Error {
|
|
54
|
+
static {
|
|
55
|
+
__name(this, "AbortPromptError");
|
|
56
|
+
}
|
|
57
|
+
name = "AbortPromptError";
|
|
58
|
+
message = "Prompt was aborted";
|
|
59
|
+
constructor(options) {
|
|
60
|
+
super();
|
|
61
|
+
this.cause = options?.cause;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
exports2.AbortPromptError = AbortPromptError;
|
|
65
|
+
var CancelPromptError = class extends Error {
|
|
66
|
+
static {
|
|
67
|
+
__name(this, "CancelPromptError");
|
|
68
|
+
}
|
|
69
|
+
name = "CancelPromptError";
|
|
70
|
+
message = "Prompt was canceled";
|
|
71
|
+
};
|
|
72
|
+
exports2.CancelPromptError = CancelPromptError;
|
|
73
|
+
var ExitPromptError = class extends Error {
|
|
74
|
+
static {
|
|
75
|
+
__name(this, "ExitPromptError");
|
|
76
|
+
}
|
|
77
|
+
name = "ExitPromptError";
|
|
78
|
+
};
|
|
79
|
+
exports2.ExitPromptError = ExitPromptError;
|
|
80
|
+
var HookError = class extends Error {
|
|
81
|
+
static {
|
|
82
|
+
__name(this, "HookError");
|
|
83
|
+
}
|
|
84
|
+
name = "HookError";
|
|
85
|
+
};
|
|
86
|
+
exports2.HookError = HookError;
|
|
87
|
+
var ValidationError = class extends Error {
|
|
88
|
+
static {
|
|
89
|
+
__name(this, "ValidationError");
|
|
90
|
+
}
|
|
91
|
+
name = "ValidationError";
|
|
92
|
+
};
|
|
93
|
+
exports2.ValidationError = ValidationError;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/hook-engine.js
|
|
98
|
+
var require_hook_engine = __commonJS({
|
|
99
|
+
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/hook-engine.js"(exports2) {
|
|
100
|
+
"use strict";
|
|
101
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
102
|
+
exports2.effectScheduler = void 0;
|
|
103
|
+
exports2.withHooks = withHooks;
|
|
104
|
+
exports2.readline = readline;
|
|
105
|
+
exports2.withUpdates = withUpdates;
|
|
106
|
+
exports2.withPointer = withPointer;
|
|
107
|
+
exports2.handleChange = handleChange;
|
|
108
|
+
var node_async_hooks_1 = require("node:async_hooks");
|
|
109
|
+
var errors_ts_1 = require_errors();
|
|
110
|
+
var hookStorage = new node_async_hooks_1.AsyncLocalStorage();
|
|
111
|
+
function createStore(rl) {
|
|
112
|
+
const store = {
|
|
113
|
+
rl,
|
|
114
|
+
hooks: [],
|
|
115
|
+
hooksCleanup: [],
|
|
116
|
+
hooksEffect: [],
|
|
117
|
+
index: 0,
|
|
118
|
+
handleChange() {
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
return store;
|
|
122
|
+
}
|
|
123
|
+
__name(createStore, "createStore");
|
|
124
|
+
function withHooks(rl, cb) {
|
|
125
|
+
const store = createStore(rl);
|
|
126
|
+
return hookStorage.run(store, () => {
|
|
127
|
+
function cycle(render) {
|
|
128
|
+
store.handleChange = () => {
|
|
129
|
+
store.index = 0;
|
|
130
|
+
render();
|
|
131
|
+
};
|
|
132
|
+
store.handleChange();
|
|
133
|
+
}
|
|
134
|
+
__name(cycle, "cycle");
|
|
135
|
+
return cb(cycle);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
__name(withHooks, "withHooks");
|
|
139
|
+
function getStore() {
|
|
140
|
+
const store = hookStorage.getStore();
|
|
141
|
+
if (!store) {
|
|
142
|
+
throw new errors_ts_1.HookError("[Inquirer] Hook functions can only be called from within a prompt");
|
|
143
|
+
}
|
|
144
|
+
return store;
|
|
145
|
+
}
|
|
146
|
+
__name(getStore, "getStore");
|
|
147
|
+
function readline() {
|
|
148
|
+
return getStore().rl;
|
|
149
|
+
}
|
|
150
|
+
__name(readline, "readline");
|
|
151
|
+
function withUpdates(fn) {
|
|
152
|
+
const wrapped = /* @__PURE__ */ __name((...args) => {
|
|
153
|
+
const store = getStore();
|
|
154
|
+
let shouldUpdate = false;
|
|
155
|
+
const oldHandleChange = store.handleChange;
|
|
156
|
+
store.handleChange = () => {
|
|
157
|
+
shouldUpdate = true;
|
|
158
|
+
};
|
|
159
|
+
const returnValue = fn(...args);
|
|
160
|
+
if (shouldUpdate) {
|
|
161
|
+
oldHandleChange();
|
|
162
|
+
}
|
|
163
|
+
store.handleChange = oldHandleChange;
|
|
164
|
+
return returnValue;
|
|
165
|
+
}, "wrapped");
|
|
166
|
+
return node_async_hooks_1.AsyncResource.bind(wrapped);
|
|
167
|
+
}
|
|
168
|
+
__name(withUpdates, "withUpdates");
|
|
169
|
+
function withPointer(cb) {
|
|
170
|
+
const store = getStore();
|
|
171
|
+
const { index } = store;
|
|
172
|
+
const pointer = {
|
|
173
|
+
get() {
|
|
174
|
+
return store.hooks[index];
|
|
175
|
+
},
|
|
176
|
+
set(value) {
|
|
177
|
+
store.hooks[index] = value;
|
|
178
|
+
},
|
|
179
|
+
initialized: index in store.hooks
|
|
180
|
+
};
|
|
181
|
+
const returnValue = cb(pointer);
|
|
182
|
+
store.index++;
|
|
183
|
+
return returnValue;
|
|
184
|
+
}
|
|
185
|
+
__name(withPointer, "withPointer");
|
|
186
|
+
function handleChange() {
|
|
187
|
+
getStore().handleChange();
|
|
188
|
+
}
|
|
189
|
+
__name(handleChange, "handleChange");
|
|
190
|
+
exports2.effectScheduler = {
|
|
191
|
+
queue(cb) {
|
|
192
|
+
const store = getStore();
|
|
193
|
+
const { index } = store;
|
|
194
|
+
store.hooksEffect.push(() => {
|
|
195
|
+
store.hooksCleanup[index]?.();
|
|
196
|
+
const cleanFn = cb(readline());
|
|
197
|
+
if (cleanFn != null && typeof cleanFn !== "function") {
|
|
198
|
+
throw new errors_ts_1.ValidationError("useEffect return value must be a cleanup function or nothing.");
|
|
199
|
+
}
|
|
200
|
+
store.hooksCleanup[index] = cleanFn;
|
|
201
|
+
});
|
|
202
|
+
},
|
|
203
|
+
run() {
|
|
204
|
+
const store = getStore();
|
|
205
|
+
withUpdates(() => {
|
|
206
|
+
store.hooksEffect.forEach((effect) => {
|
|
207
|
+
effect();
|
|
208
|
+
});
|
|
209
|
+
store.hooksEffect.length = 0;
|
|
210
|
+
})();
|
|
211
|
+
},
|
|
212
|
+
clearAll() {
|
|
213
|
+
const store = getStore();
|
|
214
|
+
store.hooksCleanup.forEach((cleanFn) => {
|
|
215
|
+
cleanFn?.();
|
|
216
|
+
});
|
|
217
|
+
store.hooksEffect.length = 0;
|
|
218
|
+
store.hooksCleanup.length = 0;
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-state.js
|
|
225
|
+
var require_use_state = __commonJS({
|
|
226
|
+
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-state.js"(exports2) {
|
|
227
|
+
"use strict";
|
|
228
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
229
|
+
exports2.useState = useState;
|
|
230
|
+
var node_async_hooks_1 = require("node:async_hooks");
|
|
231
|
+
var hook_engine_ts_1 = require_hook_engine();
|
|
232
|
+
function useState(defaultValue) {
|
|
233
|
+
return (0, hook_engine_ts_1.withPointer)((pointer) => {
|
|
234
|
+
const setState = node_async_hooks_1.AsyncResource.bind(/* @__PURE__ */ __name(function setState2(newValue) {
|
|
235
|
+
if (pointer.get() !== newValue) {
|
|
236
|
+
pointer.set(newValue);
|
|
237
|
+
(0, hook_engine_ts_1.handleChange)();
|
|
238
|
+
}
|
|
239
|
+
}, "setState"));
|
|
240
|
+
if (pointer.initialized) {
|
|
241
|
+
return [pointer.get(), setState];
|
|
242
|
+
}
|
|
243
|
+
const value = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
244
|
+
pointer.set(value);
|
|
245
|
+
return [value, setState];
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
__name(useState, "useState");
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-effect.js
|
|
253
|
+
var require_use_effect = __commonJS({
|
|
254
|
+
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-effect.js"(exports2) {
|
|
255
|
+
"use strict";
|
|
256
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
257
|
+
exports2.useEffect = useEffect;
|
|
258
|
+
var hook_engine_ts_1 = require_hook_engine();
|
|
259
|
+
function useEffect(cb, depArray) {
|
|
260
|
+
(0, hook_engine_ts_1.withPointer)((pointer) => {
|
|
261
|
+
const oldDeps = pointer.get();
|
|
262
|
+
const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i) => !Object.is(dep, oldDeps[i]));
|
|
263
|
+
if (hasChanged) {
|
|
264
|
+
hook_engine_ts_1.effectScheduler.queue(cb);
|
|
265
|
+
}
|
|
266
|
+
pointer.set(depArray);
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
__name(useEffect, "useEffect");
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
// node_modules/.pnpm/yoctocolors-cjs@2.1.3/node_modules/yoctocolors-cjs/index.js
|
|
274
|
+
var require_yoctocolors_cjs = __commonJS({
|
|
275
|
+
"node_modules/.pnpm/yoctocolors-cjs@2.1.3/node_modules/yoctocolors-cjs/index.js"(exports2, module2) {
|
|
276
|
+
var tty = require("node:tty");
|
|
277
|
+
var hasColors = tty?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
278
|
+
var format = /* @__PURE__ */ __name((open, close) => {
|
|
279
|
+
if (!hasColors) {
|
|
280
|
+
return (input) => input;
|
|
281
|
+
}
|
|
282
|
+
const openCode = `\x1B[${open}m`;
|
|
283
|
+
const closeCode = `\x1B[${close}m`;
|
|
284
|
+
return (input) => {
|
|
285
|
+
const string = input + "";
|
|
286
|
+
let index = string.indexOf(closeCode);
|
|
287
|
+
if (index === -1) {
|
|
288
|
+
return openCode + string + closeCode;
|
|
289
|
+
}
|
|
290
|
+
let result = openCode;
|
|
291
|
+
let lastIndex = 0;
|
|
292
|
+
const reopenOnNestedClose = close === 22;
|
|
293
|
+
const replaceCode = (reopenOnNestedClose ? closeCode : "") + openCode;
|
|
294
|
+
while (index !== -1) {
|
|
295
|
+
result += string.slice(lastIndex, index) + replaceCode;
|
|
296
|
+
lastIndex = index + closeCode.length;
|
|
297
|
+
index = string.indexOf(closeCode, lastIndex);
|
|
298
|
+
}
|
|
299
|
+
result += string.slice(lastIndex) + closeCode;
|
|
300
|
+
return result;
|
|
301
|
+
};
|
|
302
|
+
}, "format");
|
|
303
|
+
var colors = {};
|
|
304
|
+
colors.reset = format(0, 0);
|
|
305
|
+
colors.bold = format(1, 22);
|
|
306
|
+
colors.dim = format(2, 22);
|
|
307
|
+
colors.italic = format(3, 23);
|
|
308
|
+
colors.underline = format(4, 24);
|
|
309
|
+
colors.overline = format(53, 55);
|
|
310
|
+
colors.inverse = format(7, 27);
|
|
311
|
+
colors.hidden = format(8, 28);
|
|
312
|
+
colors.strikethrough = format(9, 29);
|
|
313
|
+
colors.black = format(30, 39);
|
|
314
|
+
colors.red = format(31, 39);
|
|
315
|
+
colors.green = format(32, 39);
|
|
316
|
+
colors.yellow = format(33, 39);
|
|
317
|
+
colors.blue = format(34, 39);
|
|
318
|
+
colors.magenta = format(35, 39);
|
|
319
|
+
colors.cyan = format(36, 39);
|
|
320
|
+
colors.white = format(37, 39);
|
|
321
|
+
colors.gray = format(90, 39);
|
|
322
|
+
colors.bgBlack = format(40, 49);
|
|
323
|
+
colors.bgRed = format(41, 49);
|
|
324
|
+
colors.bgGreen = format(42, 49);
|
|
325
|
+
colors.bgYellow = format(43, 49);
|
|
326
|
+
colors.bgBlue = format(44, 49);
|
|
327
|
+
colors.bgMagenta = format(45, 49);
|
|
328
|
+
colors.bgCyan = format(46, 49);
|
|
329
|
+
colors.bgWhite = format(47, 49);
|
|
330
|
+
colors.bgGray = format(100, 49);
|
|
331
|
+
colors.redBright = format(91, 39);
|
|
332
|
+
colors.greenBright = format(92, 39);
|
|
333
|
+
colors.yellowBright = format(93, 39);
|
|
334
|
+
colors.blueBright = format(94, 39);
|
|
335
|
+
colors.magentaBright = format(95, 39);
|
|
336
|
+
colors.cyanBright = format(96, 39);
|
|
337
|
+
colors.whiteBright = format(97, 39);
|
|
338
|
+
colors.bgRedBright = format(101, 49);
|
|
339
|
+
colors.bgGreenBright = format(102, 49);
|
|
340
|
+
colors.bgYellowBright = format(103, 49);
|
|
341
|
+
colors.bgBlueBright = format(104, 49);
|
|
342
|
+
colors.bgMagentaBright = format(105, 49);
|
|
343
|
+
colors.bgCyanBright = format(106, 49);
|
|
344
|
+
colors.bgWhiteBright = format(107, 49);
|
|
345
|
+
module2.exports = colors;
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
|
|
349
|
+
// node_modules/.pnpm/@inquirer+figures@1.0.14/node_modules/@inquirer/figures/dist/commonjs/index.js
|
|
350
|
+
var require_commonjs = __commonJS({
|
|
351
|
+
"node_modules/.pnpm/@inquirer+figures@1.0.14/node_modules/@inquirer/figures/dist/commonjs/index.js"(exports2) {
|
|
352
|
+
"use strict";
|
|
353
|
+
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
354
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
355
|
+
};
|
|
356
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
357
|
+
exports2.replaceSymbols = exports2.fallbackSymbols = exports2.mainSymbols = void 0;
|
|
358
|
+
var node_process_1 = __importDefault(require("node:process"));
|
|
359
|
+
function isUnicodeSupported() {
|
|
360
|
+
if (node_process_1.default.platform !== "win32") {
|
|
361
|
+
return node_process_1.default.env["TERM"] !== "linux";
|
|
362
|
+
}
|
|
363
|
+
return Boolean(node_process_1.default.env["WT_SESSION"]) || // Windows Terminal
|
|
364
|
+
Boolean(node_process_1.default.env["TERMINUS_SUBLIME"]) || // Terminus (<0.2.27)
|
|
365
|
+
node_process_1.default.env["ConEmuTask"] === "{cmd::Cmder}" || // ConEmu and cmder
|
|
366
|
+
node_process_1.default.env["TERM_PROGRAM"] === "Terminus-Sublime" || node_process_1.default.env["TERM_PROGRAM"] === "vscode" || node_process_1.default.env["TERM"] === "xterm-256color" || node_process_1.default.env["TERM"] === "alacritty" || node_process_1.default.env["TERMINAL_EMULATOR"] === "JetBrains-JediTerm";
|
|
367
|
+
}
|
|
368
|
+
__name(isUnicodeSupported, "isUnicodeSupported");
|
|
369
|
+
var common = {
|
|
370
|
+
circleQuestionMark: "(?)",
|
|
371
|
+
questionMarkPrefix: "(?)",
|
|
372
|
+
square: "█",
|
|
373
|
+
squareDarkShade: "▓",
|
|
374
|
+
squareMediumShade: "▒",
|
|
375
|
+
squareLightShade: "░",
|
|
376
|
+
squareTop: "▀",
|
|
377
|
+
squareBottom: "▄",
|
|
378
|
+
squareLeft: "▌",
|
|
379
|
+
squareRight: "▐",
|
|
380
|
+
squareCenter: "■",
|
|
381
|
+
bullet: "●",
|
|
382
|
+
dot: "․",
|
|
383
|
+
ellipsis: "…",
|
|
384
|
+
pointerSmall: "›",
|
|
385
|
+
triangleUp: "▲",
|
|
386
|
+
triangleUpSmall: "▴",
|
|
387
|
+
triangleDown: "▼",
|
|
388
|
+
triangleDownSmall: "▾",
|
|
389
|
+
triangleLeftSmall: "◂",
|
|
390
|
+
triangleRightSmall: "▸",
|
|
391
|
+
home: "⌂",
|
|
392
|
+
heart: "♥",
|
|
393
|
+
musicNote: "♪",
|
|
394
|
+
musicNoteBeamed: "♫",
|
|
395
|
+
arrowUp: "↑",
|
|
396
|
+
arrowDown: "↓",
|
|
397
|
+
arrowLeft: "←",
|
|
398
|
+
arrowRight: "→",
|
|
399
|
+
arrowLeftRight: "↔",
|
|
400
|
+
arrowUpDown: "↕",
|
|
401
|
+
almostEqual: "≈",
|
|
402
|
+
notEqual: "≠",
|
|
403
|
+
lessOrEqual: "≤",
|
|
404
|
+
greaterOrEqual: "≥",
|
|
405
|
+
identical: "≡",
|
|
406
|
+
infinity: "∞",
|
|
407
|
+
subscriptZero: "₀",
|
|
408
|
+
subscriptOne: "₁",
|
|
409
|
+
subscriptTwo: "₂",
|
|
410
|
+
subscriptThree: "₃",
|
|
411
|
+
subscriptFour: "₄",
|
|
412
|
+
subscriptFive: "₅",
|
|
413
|
+
subscriptSix: "₆",
|
|
414
|
+
subscriptSeven: "₇",
|
|
415
|
+
subscriptEight: "₈",
|
|
416
|
+
subscriptNine: "₉",
|
|
417
|
+
oneHalf: "½",
|
|
418
|
+
oneThird: "⅓",
|
|
419
|
+
oneQuarter: "¼",
|
|
420
|
+
oneFifth: "⅕",
|
|
421
|
+
oneSixth: "⅙",
|
|
422
|
+
oneEighth: "⅛",
|
|
423
|
+
twoThirds: "⅔",
|
|
424
|
+
twoFifths: "⅖",
|
|
425
|
+
threeQuarters: "¾",
|
|
426
|
+
threeFifths: "⅗",
|
|
427
|
+
threeEighths: "⅜",
|
|
428
|
+
fourFifths: "⅘",
|
|
429
|
+
fiveSixths: "⅚",
|
|
430
|
+
fiveEighths: "⅝",
|
|
431
|
+
sevenEighths: "⅞",
|
|
432
|
+
line: "─",
|
|
433
|
+
lineBold: "━",
|
|
434
|
+
lineDouble: "═",
|
|
435
|
+
lineDashed0: "┄",
|
|
436
|
+
lineDashed1: "┅",
|
|
437
|
+
lineDashed2: "┈",
|
|
438
|
+
lineDashed3: "┉",
|
|
439
|
+
lineDashed4: "╌",
|
|
440
|
+
lineDashed5: "╍",
|
|
441
|
+
lineDashed6: "╴",
|
|
442
|
+
lineDashed7: "╶",
|
|
443
|
+
lineDashed8: "╸",
|
|
444
|
+
lineDashed9: "╺",
|
|
445
|
+
lineDashed10: "╼",
|
|
446
|
+
lineDashed11: "╾",
|
|
447
|
+
lineDashed12: "−",
|
|
448
|
+
lineDashed13: "–",
|
|
449
|
+
lineDashed14: "‐",
|
|
450
|
+
lineDashed15: "⁃",
|
|
451
|
+
lineVertical: "│",
|
|
452
|
+
lineVerticalBold: "┃",
|
|
453
|
+
lineVerticalDouble: "║",
|
|
454
|
+
lineVerticalDashed0: "┆",
|
|
455
|
+
lineVerticalDashed1: "┇",
|
|
456
|
+
lineVerticalDashed2: "┊",
|
|
457
|
+
lineVerticalDashed3: "┋",
|
|
458
|
+
lineVerticalDashed4: "╎",
|
|
459
|
+
lineVerticalDashed5: "╏",
|
|
460
|
+
lineVerticalDashed6: "╵",
|
|
461
|
+
lineVerticalDashed7: "╷",
|
|
462
|
+
lineVerticalDashed8: "╹",
|
|
463
|
+
lineVerticalDashed9: "╻",
|
|
464
|
+
lineVerticalDashed10: "╽",
|
|
465
|
+
lineVerticalDashed11: "╿",
|
|
466
|
+
lineDownLeft: "┐",
|
|
467
|
+
lineDownLeftArc: "╮",
|
|
468
|
+
lineDownBoldLeftBold: "┓",
|
|
469
|
+
lineDownBoldLeft: "┒",
|
|
470
|
+
lineDownLeftBold: "┑",
|
|
471
|
+
lineDownDoubleLeftDouble: "╗",
|
|
472
|
+
lineDownDoubleLeft: "╖",
|
|
473
|
+
lineDownLeftDouble: "╕",
|
|
474
|
+
lineDownRight: "┌",
|
|
475
|
+
lineDownRightArc: "╭",
|
|
476
|
+
lineDownBoldRightBold: "┏",
|
|
477
|
+
lineDownBoldRight: "┎",
|
|
478
|
+
lineDownRightBold: "┍",
|
|
479
|
+
lineDownDoubleRightDouble: "╔",
|
|
480
|
+
lineDownDoubleRight: "╓",
|
|
481
|
+
lineDownRightDouble: "╒",
|
|
482
|
+
lineUpLeft: "┘",
|
|
483
|
+
lineUpLeftArc: "╯",
|
|
484
|
+
lineUpBoldLeftBold: "┛",
|
|
485
|
+
lineUpBoldLeft: "┚",
|
|
486
|
+
lineUpLeftBold: "┙",
|
|
487
|
+
lineUpDoubleLeftDouble: "╝",
|
|
488
|
+
lineUpDoubleLeft: "╜",
|
|
489
|
+
lineUpLeftDouble: "╛",
|
|
490
|
+
lineUpRight: "└",
|
|
491
|
+
lineUpRightArc: "╰",
|
|
492
|
+
lineUpBoldRightBold: "┗",
|
|
493
|
+
lineUpBoldRight: "┖",
|
|
494
|
+
lineUpRightBold: "┕",
|
|
495
|
+
lineUpDoubleRightDouble: "╚",
|
|
496
|
+
lineUpDoubleRight: "╙",
|
|
497
|
+
lineUpRightDouble: "╘",
|
|
498
|
+
lineUpDownLeft: "┤",
|
|
499
|
+
lineUpBoldDownBoldLeftBold: "┫",
|
|
500
|
+
lineUpBoldDownBoldLeft: "┨",
|
|
501
|
+
lineUpDownLeftBold: "┥",
|
|
502
|
+
lineUpBoldDownLeftBold: "┩",
|
|
503
|
+
lineUpDownBoldLeftBold: "┪",
|
|
504
|
+
lineUpDownBoldLeft: "┧",
|
|
505
|
+
lineUpBoldDownLeft: "┦",
|
|
506
|
+
lineUpDoubleDownDoubleLeftDouble: "╣",
|
|
507
|
+
lineUpDoubleDownDoubleLeft: "╢",
|
|
508
|
+
lineUpDownLeftDouble: "╡",
|
|
509
|
+
lineUpDownRight: "├",
|
|
510
|
+
lineUpBoldDownBoldRightBold: "┣",
|
|
511
|
+
lineUpBoldDownBoldRight: "┠",
|
|
512
|
+
lineUpDownRightBold: "┝",
|
|
513
|
+
lineUpBoldDownRightBold: "┡",
|
|
514
|
+
lineUpDownBoldRightBold: "┢",
|
|
515
|
+
lineUpDownBoldRight: "┟",
|
|
516
|
+
lineUpBoldDownRight: "┞",
|
|
517
|
+
lineUpDoubleDownDoubleRightDouble: "╠",
|
|
518
|
+
lineUpDoubleDownDoubleRight: "╟",
|
|
519
|
+
lineUpDownRightDouble: "╞",
|
|
520
|
+
lineDownLeftRight: "┬",
|
|
521
|
+
lineDownBoldLeftBoldRightBold: "┳",
|
|
522
|
+
lineDownLeftBoldRightBold: "┯",
|
|
523
|
+
lineDownBoldLeftRight: "┰",
|
|
524
|
+
lineDownBoldLeftBoldRight: "┱",
|
|
525
|
+
lineDownBoldLeftRightBold: "┲",
|
|
526
|
+
lineDownLeftRightBold: "┮",
|
|
527
|
+
lineDownLeftBoldRight: "┭",
|
|
528
|
+
lineDownDoubleLeftDoubleRightDouble: "╦",
|
|
529
|
+
lineDownDoubleLeftRight: "╥",
|
|
530
|
+
lineDownLeftDoubleRightDouble: "╤",
|
|
531
|
+
lineUpLeftRight: "┴",
|
|
532
|
+
lineUpBoldLeftBoldRightBold: "┻",
|
|
533
|
+
lineUpLeftBoldRightBold: "┷",
|
|
534
|
+
lineUpBoldLeftRight: "┸",
|
|
535
|
+
lineUpBoldLeftBoldRight: "┹",
|
|
536
|
+
lineUpBoldLeftRightBold: "┺",
|
|
537
|
+
lineUpLeftRightBold: "┶",
|
|
538
|
+
lineUpLeftBoldRight: "┵",
|
|
539
|
+
lineUpDoubleLeftDoubleRightDouble: "╩",
|
|
540
|
+
lineUpDoubleLeftRight: "╨",
|
|
541
|
+
lineUpLeftDoubleRightDouble: "╧",
|
|
542
|
+
lineUpDownLeftRight: "┼",
|
|
543
|
+
lineUpBoldDownBoldLeftBoldRightBold: "╋",
|
|
544
|
+
lineUpDownBoldLeftBoldRightBold: "╈",
|
|
545
|
+
lineUpBoldDownLeftBoldRightBold: "╇",
|
|
546
|
+
lineUpBoldDownBoldLeftRightBold: "╊",
|
|
547
|
+
lineUpBoldDownBoldLeftBoldRight: "╉",
|
|
548
|
+
lineUpBoldDownLeftRight: "╀",
|
|
549
|
+
lineUpDownBoldLeftRight: "╁",
|
|
550
|
+
lineUpDownLeftBoldRight: "┽",
|
|
551
|
+
lineUpDownLeftRightBold: "┾",
|
|
552
|
+
lineUpBoldDownBoldLeftRight: "╂",
|
|
553
|
+
lineUpDownLeftBoldRightBold: "┿",
|
|
554
|
+
lineUpBoldDownLeftBoldRight: "╃",
|
|
555
|
+
lineUpBoldDownLeftRightBold: "╄",
|
|
556
|
+
lineUpDownBoldLeftBoldRight: "╅",
|
|
557
|
+
lineUpDownBoldLeftRightBold: "╆",
|
|
558
|
+
lineUpDoubleDownDoubleLeftDoubleRightDouble: "╬",
|
|
559
|
+
lineUpDoubleDownDoubleLeftRight: "╫",
|
|
560
|
+
lineUpDownLeftDoubleRightDouble: "╪",
|
|
561
|
+
lineCross: "╳",
|
|
562
|
+
lineBackslash: "╲",
|
|
563
|
+
lineSlash: "╱"
|
|
564
|
+
};
|
|
565
|
+
var specialMainSymbols = {
|
|
566
|
+
tick: "✔",
|
|
567
|
+
info: "ℹ",
|
|
568
|
+
warning: "⚠",
|
|
569
|
+
cross: "✘",
|
|
570
|
+
squareSmall: "◻",
|
|
571
|
+
squareSmallFilled: "◼",
|
|
572
|
+
circle: "◯",
|
|
573
|
+
circleFilled: "◉",
|
|
574
|
+
circleDotted: "◌",
|
|
575
|
+
circleDouble: "◎",
|
|
576
|
+
circleCircle: "ⓞ",
|
|
577
|
+
circleCross: "ⓧ",
|
|
578
|
+
circlePipe: "Ⓘ",
|
|
579
|
+
radioOn: "◉",
|
|
580
|
+
radioOff: "◯",
|
|
581
|
+
checkboxOn: "☒",
|
|
582
|
+
checkboxOff: "☐",
|
|
583
|
+
checkboxCircleOn: "ⓧ",
|
|
584
|
+
checkboxCircleOff: "Ⓘ",
|
|
585
|
+
pointer: "❯",
|
|
586
|
+
triangleUpOutline: "△",
|
|
587
|
+
triangleLeft: "◀",
|
|
588
|
+
triangleRight: "▶",
|
|
589
|
+
lozenge: "◆",
|
|
590
|
+
lozengeOutline: "◇",
|
|
591
|
+
hamburger: "☰",
|
|
592
|
+
smiley: "㋡",
|
|
593
|
+
mustache: "෴",
|
|
594
|
+
star: "★",
|
|
595
|
+
play: "▶",
|
|
596
|
+
nodejs: "⬢",
|
|
597
|
+
oneSeventh: "⅐",
|
|
598
|
+
oneNinth: "⅑",
|
|
599
|
+
oneTenth: "⅒"
|
|
600
|
+
};
|
|
601
|
+
var specialFallbackSymbols = {
|
|
602
|
+
tick: "√",
|
|
603
|
+
info: "i",
|
|
604
|
+
warning: "‼",
|
|
605
|
+
cross: "×",
|
|
606
|
+
squareSmall: "□",
|
|
607
|
+
squareSmallFilled: "■",
|
|
608
|
+
circle: "( )",
|
|
609
|
+
circleFilled: "(*)",
|
|
610
|
+
circleDotted: "( )",
|
|
611
|
+
circleDouble: "( )",
|
|
612
|
+
circleCircle: "(○)",
|
|
613
|
+
circleCross: "(×)",
|
|
614
|
+
circlePipe: "(│)",
|
|
615
|
+
radioOn: "(*)",
|
|
616
|
+
radioOff: "( )",
|
|
617
|
+
checkboxOn: "[×]",
|
|
618
|
+
checkboxOff: "[ ]",
|
|
619
|
+
checkboxCircleOn: "(×)",
|
|
620
|
+
checkboxCircleOff: "( )",
|
|
621
|
+
pointer: ">",
|
|
622
|
+
triangleUpOutline: "∆",
|
|
623
|
+
triangleLeft: "◄",
|
|
624
|
+
triangleRight: "►",
|
|
625
|
+
lozenge: "♦",
|
|
626
|
+
lozengeOutline: "◊",
|
|
627
|
+
hamburger: "≡",
|
|
628
|
+
smiley: "☺",
|
|
629
|
+
mustache: "┌─┐",
|
|
630
|
+
star: "✶",
|
|
631
|
+
play: "►",
|
|
632
|
+
nodejs: "♦",
|
|
633
|
+
oneSeventh: "1/7",
|
|
634
|
+
oneNinth: "1/9",
|
|
635
|
+
oneTenth: "1/10"
|
|
636
|
+
};
|
|
637
|
+
exports2.mainSymbols = { ...common, ...specialMainSymbols };
|
|
638
|
+
exports2.fallbackSymbols = {
|
|
639
|
+
...common,
|
|
640
|
+
...specialFallbackSymbols
|
|
641
|
+
};
|
|
642
|
+
var shouldUseMain = isUnicodeSupported();
|
|
643
|
+
var figures = shouldUseMain ? exports2.mainSymbols : exports2.fallbackSymbols;
|
|
644
|
+
exports2.default = figures;
|
|
645
|
+
var replacements = Object.entries(specialMainSymbols);
|
|
646
|
+
var replaceSymbols = /* @__PURE__ */ __name((string, { useFallback = !shouldUseMain } = {}) => {
|
|
647
|
+
if (useFallback) {
|
|
648
|
+
for (const [key, mainSymbol] of replacements) {
|
|
649
|
+
const fallbackSymbol = exports2.fallbackSymbols[key];
|
|
650
|
+
if (!fallbackSymbol) {
|
|
651
|
+
throw new Error(`Unable to find fallback for ${key}`);
|
|
652
|
+
}
|
|
653
|
+
string = string.replaceAll(mainSymbol, fallbackSymbol);
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
return string;
|
|
657
|
+
}, "replaceSymbols");
|
|
658
|
+
exports2.replaceSymbols = replaceSymbols;
|
|
659
|
+
}
|
|
660
|
+
});
|
|
661
|
+
|
|
662
|
+
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/theme.js
|
|
663
|
+
var require_theme = __commonJS({
|
|
664
|
+
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/theme.js"(exports2) {
|
|
665
|
+
"use strict";
|
|
666
|
+
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
667
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
668
|
+
};
|
|
669
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
670
|
+
exports2.defaultTheme = void 0;
|
|
671
|
+
var yoctocolors_cjs_1 = __importDefault(require_yoctocolors_cjs());
|
|
672
|
+
var figures_1 = __importDefault(require_commonjs());
|
|
673
|
+
exports2.defaultTheme = {
|
|
674
|
+
prefix: {
|
|
675
|
+
idle: yoctocolors_cjs_1.default.blue("?"),
|
|
676
|
+
// TODO: use figure
|
|
677
|
+
done: yoctocolors_cjs_1.default.green(figures_1.default.tick)
|
|
678
|
+
},
|
|
679
|
+
spinner: {
|
|
680
|
+
interval: 80,
|
|
681
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => yoctocolors_cjs_1.default.yellow(frame))
|
|
682
|
+
},
|
|
683
|
+
style: {
|
|
684
|
+
answer: yoctocolors_cjs_1.default.cyan,
|
|
685
|
+
message: yoctocolors_cjs_1.default.bold,
|
|
686
|
+
error: /* @__PURE__ */ __name((text) => yoctocolors_cjs_1.default.red(`> ${text}`), "error"),
|
|
687
|
+
defaultAnswer: /* @__PURE__ */ __name((text) => yoctocolors_cjs_1.default.dim(`(${text})`), "defaultAnswer"),
|
|
688
|
+
help: yoctocolors_cjs_1.default.dim,
|
|
689
|
+
highlight: yoctocolors_cjs_1.default.cyan,
|
|
690
|
+
key: /* @__PURE__ */ __name((text) => yoctocolors_cjs_1.default.cyan(yoctocolors_cjs_1.default.bold(`<${text}>`)), "key")
|
|
691
|
+
}
|
|
692
|
+
};
|
|
693
|
+
}
|
|
694
|
+
});
|
|
695
|
+
|
|
696
|
+
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/make-theme.js
|
|
697
|
+
var require_make_theme = __commonJS({
|
|
698
|
+
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/make-theme.js"(exports2) {
|
|
699
|
+
"use strict";
|
|
700
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
701
|
+
exports2.makeTheme = makeTheme;
|
|
702
|
+
var theme_ts_1 = require_theme();
|
|
703
|
+
function isPlainObject(value) {
|
|
704
|
+
if (typeof value !== "object" || value === null)
|
|
705
|
+
return false;
|
|
706
|
+
let proto = value;
|
|
707
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
|
708
|
+
proto = Object.getPrototypeOf(proto);
|
|
709
|
+
}
|
|
710
|
+
return Object.getPrototypeOf(value) === proto;
|
|
711
|
+
}
|
|
712
|
+
__name(isPlainObject, "isPlainObject");
|
|
713
|
+
function deepMerge(...objects) {
|
|
714
|
+
const output = {};
|
|
715
|
+
for (const obj of objects) {
|
|
716
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
717
|
+
const prevValue = output[key];
|
|
718
|
+
output[key] = isPlainObject(prevValue) && isPlainObject(value) ? deepMerge(prevValue, value) : value;
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
return output;
|
|
722
|
+
}
|
|
723
|
+
__name(deepMerge, "deepMerge");
|
|
724
|
+
function makeTheme(...themes) {
|
|
725
|
+
const themesToMerge = [
|
|
726
|
+
theme_ts_1.defaultTheme,
|
|
727
|
+
...themes.filter((theme) => theme != null)
|
|
728
|
+
];
|
|
729
|
+
return deepMerge(...themesToMerge);
|
|
730
|
+
}
|
|
731
|
+
__name(makeTheme, "makeTheme");
|
|
732
|
+
}
|
|
733
|
+
});
|
|
734
|
+
|
|
735
|
+
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-prefix.js
|
|
736
|
+
var require_use_prefix = __commonJS({
|
|
737
|
+
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-prefix.js"(exports2) {
|
|
738
|
+
"use strict";
|
|
739
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
740
|
+
exports2.usePrefix = usePrefix;
|
|
741
|
+
var use_state_ts_1 = require_use_state();
|
|
742
|
+
var use_effect_ts_1 = require_use_effect();
|
|
743
|
+
var make_theme_ts_1 = require_make_theme();
|
|
744
|
+
function usePrefix({ status = "idle", theme }) {
|
|
745
|
+
const [showLoader, setShowLoader] = (0, use_state_ts_1.useState)(false);
|
|
746
|
+
const [tick, setTick] = (0, use_state_ts_1.useState)(0);
|
|
747
|
+
const { prefix, spinner } = (0, make_theme_ts_1.makeTheme)(theme);
|
|
748
|
+
(0, use_effect_ts_1.useEffect)(() => {
|
|
749
|
+
if (status === "loading") {
|
|
750
|
+
let tickInterval;
|
|
751
|
+
let inc = -1;
|
|
752
|
+
const delayTimeout = setTimeout(() => {
|
|
753
|
+
setShowLoader(true);
|
|
754
|
+
tickInterval = setInterval(() => {
|
|
755
|
+
inc = inc + 1;
|
|
756
|
+
setTick(inc % spinner.frames.length);
|
|
757
|
+
}, spinner.interval);
|
|
758
|
+
}, 300);
|
|
759
|
+
return () => {
|
|
760
|
+
clearTimeout(delayTimeout);
|
|
761
|
+
clearInterval(tickInterval);
|
|
762
|
+
};
|
|
763
|
+
} else {
|
|
764
|
+
setShowLoader(false);
|
|
765
|
+
}
|
|
766
|
+
}, [status]);
|
|
767
|
+
if (showLoader) {
|
|
768
|
+
return spinner.frames[tick];
|
|
769
|
+
}
|
|
770
|
+
const iconName = status === "loading" ? "idle" : status;
|
|
771
|
+
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
772
|
+
}
|
|
773
|
+
__name(usePrefix, "usePrefix");
|
|
774
|
+
}
|
|
775
|
+
});
|
|
776
|
+
|
|
777
|
+
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-memo.js
|
|
778
|
+
var require_use_memo = __commonJS({
|
|
779
|
+
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-memo.js"(exports2) {
|
|
780
|
+
"use strict";
|
|
781
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
782
|
+
exports2.useMemo = useMemo;
|
|
783
|
+
var hook_engine_ts_1 = require_hook_engine();
|
|
784
|
+
function useMemo(fn, dependencies) {
|
|
785
|
+
return (0, hook_engine_ts_1.withPointer)((pointer) => {
|
|
786
|
+
const prev = pointer.get();
|
|
787
|
+
if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
|
|
788
|
+
const value = fn();
|
|
789
|
+
pointer.set({ value, dependencies });
|
|
790
|
+
return value;
|
|
791
|
+
}
|
|
792
|
+
return prev.value;
|
|
793
|
+
});
|
|
794
|
+
}
|
|
795
|
+
__name(useMemo, "useMemo");
|
|
796
|
+
}
|
|
797
|
+
});
|
|
798
|
+
|
|
799
|
+
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-ref.js
|
|
800
|
+
var require_use_ref = __commonJS({
|
|
801
|
+
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-ref.js"(exports2) {
|
|
802
|
+
"use strict";
|
|
803
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
804
|
+
exports2.useRef = useRef;
|
|
805
|
+
var use_state_ts_1 = require_use_state();
|
|
806
|
+
function useRef(val) {
|
|
807
|
+
return (0, use_state_ts_1.useState)({ current: val })[0];
|
|
808
|
+
}
|
|
809
|
+
__name(useRef, "useRef");
|
|
810
|
+
}
|
|
811
|
+
});
|
|
812
|
+
|
|
813
|
+
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-keypress.js
|
|
814
|
+
var require_use_keypress = __commonJS({
|
|
815
|
+
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/use-keypress.js"(exports2) {
|
|
816
|
+
"use strict";
|
|
817
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
818
|
+
exports2.useKeypress = useKeypress;
|
|
819
|
+
var use_ref_ts_1 = require_use_ref();
|
|
820
|
+
var use_effect_ts_1 = require_use_effect();
|
|
821
|
+
var hook_engine_ts_1 = require_hook_engine();
|
|
822
|
+
function useKeypress(userHandler) {
|
|
823
|
+
const signal = (0, use_ref_ts_1.useRef)(userHandler);
|
|
824
|
+
signal.current = userHandler;
|
|
825
|
+
(0, use_effect_ts_1.useEffect)((rl) => {
|
|
826
|
+
let ignore = false;
|
|
827
|
+
const handler = (0, hook_engine_ts_1.withUpdates)((_input, event) => {
|
|
828
|
+
if (ignore)
|
|
829
|
+
return;
|
|
830
|
+
void signal.current(event, rl);
|
|
831
|
+
});
|
|
832
|
+
rl.input.on("keypress", handler);
|
|
833
|
+
return () => {
|
|
834
|
+
ignore = true;
|
|
835
|
+
rl.input.removeListener("keypress", handler);
|
|
836
|
+
};
|
|
837
|
+
}, []);
|
|
838
|
+
}
|
|
839
|
+
__name(useKeypress, "useKeypress");
|
|
840
|
+
}
|
|
841
|
+
});
|
|
842
|
+
|
|
843
|
+
// node_modules/.pnpm/cli-width@4.1.0/node_modules/cli-width/index.js
|
|
844
|
+
var require_cli_width = __commonJS({
|
|
845
|
+
"node_modules/.pnpm/cli-width@4.1.0/node_modules/cli-width/index.js"(exports2, module2) {
|
|
846
|
+
"use strict";
|
|
847
|
+
module2.exports = cliWidth;
|
|
848
|
+
function normalizeOpts(options) {
|
|
849
|
+
const defaultOpts = {
|
|
850
|
+
defaultWidth: 0,
|
|
851
|
+
output: process.stdout,
|
|
852
|
+
tty: require("tty")
|
|
853
|
+
};
|
|
854
|
+
if (!options) {
|
|
855
|
+
return defaultOpts;
|
|
856
|
+
}
|
|
857
|
+
Object.keys(defaultOpts).forEach(function(key) {
|
|
858
|
+
if (!options[key]) {
|
|
859
|
+
options[key] = defaultOpts[key];
|
|
860
|
+
}
|
|
861
|
+
});
|
|
862
|
+
return options;
|
|
863
|
+
}
|
|
864
|
+
__name(normalizeOpts, "normalizeOpts");
|
|
865
|
+
function cliWidth(options) {
|
|
866
|
+
const opts = normalizeOpts(options);
|
|
867
|
+
if (opts.output.getWindowSize) {
|
|
868
|
+
return opts.output.getWindowSize()[0] || opts.defaultWidth;
|
|
869
|
+
}
|
|
870
|
+
if (opts.tty.getWindowSize) {
|
|
871
|
+
return opts.tty.getWindowSize()[1] || opts.defaultWidth;
|
|
872
|
+
}
|
|
873
|
+
if (opts.output.columns) {
|
|
874
|
+
return opts.output.columns;
|
|
875
|
+
}
|
|
876
|
+
if (process.env.CLI_WIDTH) {
|
|
877
|
+
const width = parseInt(process.env.CLI_WIDTH, 10);
|
|
878
|
+
if (!isNaN(width) && width !== 0) {
|
|
879
|
+
return width;
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
return opts.defaultWidth;
|
|
883
|
+
}
|
|
884
|
+
__name(cliWidth, "cliWidth");
|
|
885
|
+
}
|
|
886
|
+
});
|
|
887
|
+
|
|
888
|
+
// node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js
|
|
889
|
+
var require_ansi_regex = __commonJS({
|
|
890
|
+
"node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(exports2, module2) {
|
|
891
|
+
"use strict";
|
|
892
|
+
module2.exports = ({ onlyFirst = false } = {}) => {
|
|
893
|
+
const pattern = [
|
|
894
|
+
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
895
|
+
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
|
896
|
+
].join("|");
|
|
897
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
898
|
+
};
|
|
899
|
+
}
|
|
900
|
+
});
|
|
901
|
+
|
|
902
|
+
// node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js
|
|
903
|
+
var require_strip_ansi = __commonJS({
|
|
904
|
+
"node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(exports2, module2) {
|
|
905
|
+
"use strict";
|
|
906
|
+
var ansiRegex = require_ansi_regex();
|
|
907
|
+
module2.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string;
|
|
908
|
+
}
|
|
909
|
+
});
|
|
910
|
+
|
|
911
|
+
// node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js
|
|
912
|
+
var require_is_fullwidth_code_point = __commonJS({
|
|
913
|
+
"node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js"(exports2, module2) {
|
|
914
|
+
"use strict";
|
|
915
|
+
var isFullwidthCodePoint = /* @__PURE__ */ __name((codePoint) => {
|
|
916
|
+
if (Number.isNaN(codePoint)) {
|
|
917
|
+
return false;
|
|
918
|
+
}
|
|
919
|
+
if (codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo
|
|
920
|
+
codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET
|
|
921
|
+
codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET
|
|
922
|
+
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
|
923
|
+
11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
|
|
924
|
+
12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals
|
|
925
|
+
19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A
|
|
926
|
+
43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables
|
|
927
|
+
44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs
|
|
928
|
+
63744 <= codePoint && codePoint <= 64255 || // Vertical Forms
|
|
929
|
+
65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants
|
|
930
|
+
65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms
|
|
931
|
+
65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement
|
|
932
|
+
110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement
|
|
933
|
+
127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
|
934
|
+
131072 <= codePoint && codePoint <= 262141)) {
|
|
935
|
+
return true;
|
|
936
|
+
}
|
|
937
|
+
return false;
|
|
938
|
+
}, "isFullwidthCodePoint");
|
|
939
|
+
module2.exports = isFullwidthCodePoint;
|
|
940
|
+
module2.module.exports = isFullwidthCodePoint;
|
|
941
|
+
}
|
|
942
|
+
});
|
|
943
|
+
|
|
944
|
+
// node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js
|
|
945
|
+
var require_emoji_regex = __commonJS({
|
|
946
|
+
"node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js"(exports2, module2) {
|
|
947
|
+
"use strict";
|
|
948
|
+
module2.exports = function() {
|
|
949
|
+
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
950
|
+
};
|
|
951
|
+
}
|
|
952
|
+
});
|
|
953
|
+
|
|
954
|
+
// node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js
|
|
955
|
+
var require_string_width = __commonJS({
|
|
956
|
+
"node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(exports2, module2) {
|
|
957
|
+
"use strict";
|
|
958
|
+
var stripAnsi = require_strip_ansi();
|
|
959
|
+
var isFullwidthCodePoint = require_is_fullwidth_code_point();
|
|
960
|
+
var emojiRegex = require_emoji_regex();
|
|
961
|
+
var stringWidth = /* @__PURE__ */ __name((string) => {
|
|
962
|
+
if (typeof string !== "string" || string.length === 0) {
|
|
963
|
+
return 0;
|
|
964
|
+
}
|
|
965
|
+
string = stripAnsi(string);
|
|
966
|
+
if (string.length === 0) {
|
|
967
|
+
return 0;
|
|
968
|
+
}
|
|
969
|
+
string = string.replace(emojiRegex(), " ");
|
|
970
|
+
let width = 0;
|
|
971
|
+
for (let i = 0; i < string.length; i++) {
|
|
972
|
+
const code = string.codePointAt(i);
|
|
973
|
+
if (code <= 31 || code >= 127 && code <= 159) {
|
|
974
|
+
continue;
|
|
975
|
+
}
|
|
976
|
+
if (code >= 768 && code <= 879) {
|
|
977
|
+
continue;
|
|
978
|
+
}
|
|
979
|
+
if (code > 65535) {
|
|
980
|
+
i++;
|
|
981
|
+
}
|
|
982
|
+
width += isFullwidthCodePoint(code) ? 2 : 1;
|
|
983
|
+
}
|
|
984
|
+
return width;
|
|
985
|
+
}, "stringWidth");
|
|
986
|
+
module2.exports = stringWidth;
|
|
987
|
+
module2.module.exports = stringWidth;
|
|
988
|
+
}
|
|
989
|
+
});
|
|
990
|
+
|
|
991
|
+
// node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js
|
|
992
|
+
var require_color_name = __commonJS({
|
|
993
|
+
"node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"(exports2, module2) {
|
|
994
|
+
"use strict";
|
|
995
|
+
module2.exports = {
|
|
996
|
+
"aliceblue": [240, 248, 255],
|
|
997
|
+
"antiquewhite": [250, 235, 215],
|
|
998
|
+
"aqua": [0, 255, 255],
|
|
999
|
+
"aquamarine": [127, 255, 212],
|
|
1000
|
+
"azure": [240, 255, 255],
|
|
1001
|
+
"beige": [245, 245, 220],
|
|
1002
|
+
"bisque": [255, 228, 196],
|
|
1003
|
+
"black": [0, 0, 0],
|
|
1004
|
+
"blanchedalmond": [255, 235, 205],
|
|
1005
|
+
"blue": [0, 0, 255],
|
|
1006
|
+
"blueviolet": [138, 43, 226],
|
|
1007
|
+
"brown": [165, 42, 42],
|
|
1008
|
+
"burlywood": [222, 184, 135],
|
|
1009
|
+
"cadetblue": [95, 158, 160],
|
|
1010
|
+
"chartreuse": [127, 255, 0],
|
|
1011
|
+
"chocolate": [210, 105, 30],
|
|
1012
|
+
"coral": [255, 127, 80],
|
|
1013
|
+
"cornflowerblue": [100, 149, 237],
|
|
1014
|
+
"cornsilk": [255, 248, 220],
|
|
1015
|
+
"crimson": [220, 20, 60],
|
|
1016
|
+
"cyan": [0, 255, 255],
|
|
1017
|
+
"darkblue": [0, 0, 139],
|
|
1018
|
+
"darkcyan": [0, 139, 139],
|
|
1019
|
+
"darkgoldenrod": [184, 134, 11],
|
|
1020
|
+
"darkgray": [169, 169, 169],
|
|
1021
|
+
"darkgreen": [0, 100, 0],
|
|
1022
|
+
"darkgrey": [169, 169, 169],
|
|
1023
|
+
"darkkhaki": [189, 183, 107],
|
|
1024
|
+
"darkmagenta": [139, 0, 139],
|
|
1025
|
+
"darkolivegreen": [85, 107, 47],
|
|
1026
|
+
"darkorange": [255, 140, 0],
|
|
1027
|
+
"darkorchid": [153, 50, 204],
|
|
1028
|
+
"darkred": [139, 0, 0],
|
|
1029
|
+
"darksalmon": [233, 150, 122],
|
|
1030
|
+
"darkseagreen": [143, 188, 143],
|
|
1031
|
+
"darkslateblue": [72, 61, 139],
|
|
1032
|
+
"darkslategray": [47, 79, 79],
|
|
1033
|
+
"darkslategrey": [47, 79, 79],
|
|
1034
|
+
"darkturquoise": [0, 206, 209],
|
|
1035
|
+
"darkviolet": [148, 0, 211],
|
|
1036
|
+
"deeppink": [255, 20, 147],
|
|
1037
|
+
"deepskyblue": [0, 191, 255],
|
|
1038
|
+
"dimgray": [105, 105, 105],
|
|
1039
|
+
"dimgrey": [105, 105, 105],
|
|
1040
|
+
"dodgerblue": [30, 144, 255],
|
|
1041
|
+
"firebrick": [178, 34, 34],
|
|
1042
|
+
"floralwhite": [255, 250, 240],
|
|
1043
|
+
"forestgreen": [34, 139, 34],
|
|
1044
|
+
"fuchsia": [255, 0, 255],
|
|
1045
|
+
"gainsboro": [220, 220, 220],
|
|
1046
|
+
"ghostwhite": [248, 248, 255],
|
|
1047
|
+
"gold": [255, 215, 0],
|
|
1048
|
+
"goldenrod": [218, 165, 32],
|
|
1049
|
+
"gray": [128, 128, 128],
|
|
1050
|
+
"green": [0, 128, 0],
|
|
1051
|
+
"greenyellow": [173, 255, 47],
|
|
1052
|
+
"grey": [128, 128, 128],
|
|
1053
|
+
"honeydew": [240, 255, 240],
|
|
1054
|
+
"hotpink": [255, 105, 180],
|
|
1055
|
+
"indianred": [205, 92, 92],
|
|
1056
|
+
"indigo": [75, 0, 130],
|
|
1057
|
+
"ivory": [255, 255, 240],
|
|
1058
|
+
"khaki": [240, 230, 140],
|
|
1059
|
+
"lavender": [230, 230, 250],
|
|
1060
|
+
"lavenderblush": [255, 240, 245],
|
|
1061
|
+
"lawngreen": [124, 252, 0],
|
|
1062
|
+
"lemonchiffon": [255, 250, 205],
|
|
1063
|
+
"lightblue": [173, 216, 230],
|
|
1064
|
+
"lightcoral": [240, 128, 128],
|
|
1065
|
+
"lightcyan": [224, 255, 255],
|
|
1066
|
+
"lightgoldenrodyellow": [250, 250, 210],
|
|
1067
|
+
"lightgray": [211, 211, 211],
|
|
1068
|
+
"lightgreen": [144, 238, 144],
|
|
1069
|
+
"lightgrey": [211, 211, 211],
|
|
1070
|
+
"lightpink": [255, 182, 193],
|
|
1071
|
+
"lightsalmon": [255, 160, 122],
|
|
1072
|
+
"lightseagreen": [32, 178, 170],
|
|
1073
|
+
"lightskyblue": [135, 206, 250],
|
|
1074
|
+
"lightslategray": [119, 136, 153],
|
|
1075
|
+
"lightslategrey": [119, 136, 153],
|
|
1076
|
+
"lightsteelblue": [176, 196, 222],
|
|
1077
|
+
"lightyellow": [255, 255, 224],
|
|
1078
|
+
"lime": [0, 255, 0],
|
|
1079
|
+
"limegreen": [50, 205, 50],
|
|
1080
|
+
"linen": [250, 240, 230],
|
|
1081
|
+
"magenta": [255, 0, 255],
|
|
1082
|
+
"maroon": [128, 0, 0],
|
|
1083
|
+
"mediumaquamarine": [102, 205, 170],
|
|
1084
|
+
"mediumblue": [0, 0, 205],
|
|
1085
|
+
"mediumorchid": [186, 85, 211],
|
|
1086
|
+
"mediumpurple": [147, 112, 219],
|
|
1087
|
+
"mediumseagreen": [60, 179, 113],
|
|
1088
|
+
"mediumslateblue": [123, 104, 238],
|
|
1089
|
+
"mediumspringgreen": [0, 250, 154],
|
|
1090
|
+
"mediumturquoise": [72, 209, 204],
|
|
1091
|
+
"mediumvioletred": [199, 21, 133],
|
|
1092
|
+
"midnightblue": [25, 25, 112],
|
|
1093
|
+
"mintcream": [245, 255, 250],
|
|
1094
|
+
"mistyrose": [255, 228, 225],
|
|
1095
|
+
"moccasin": [255, 228, 181],
|
|
1096
|
+
"navajowhite": [255, 222, 173],
|
|
1097
|
+
"navy": [0, 0, 128],
|
|
1098
|
+
"oldlace": [253, 245, 230],
|
|
1099
|
+
"olive": [128, 128, 0],
|
|
1100
|
+
"olivedrab": [107, 142, 35],
|
|
1101
|
+
"orange": [255, 165, 0],
|
|
1102
|
+
"orangered": [255, 69, 0],
|
|
1103
|
+
"orchid": [218, 112, 214],
|
|
1104
|
+
"palegoldenrod": [238, 232, 170],
|
|
1105
|
+
"palegreen": [152, 251, 152],
|
|
1106
|
+
"paleturquoise": [175, 238, 238],
|
|
1107
|
+
"palevioletred": [219, 112, 147],
|
|
1108
|
+
"papayawhip": [255, 239, 213],
|
|
1109
|
+
"peachpuff": [255, 218, 185],
|
|
1110
|
+
"peru": [205, 133, 63],
|
|
1111
|
+
"pink": [255, 192, 203],
|
|
1112
|
+
"plum": [221, 160, 221],
|
|
1113
|
+
"powderblue": [176, 224, 230],
|
|
1114
|
+
"purple": [128, 0, 128],
|
|
1115
|
+
"rebeccapurple": [102, 51, 153],
|
|
1116
|
+
"red": [255, 0, 0],
|
|
1117
|
+
"rosybrown": [188, 143, 143],
|
|
1118
|
+
"royalblue": [65, 105, 225],
|
|
1119
|
+
"saddlebrown": [139, 69, 19],
|
|
1120
|
+
"salmon": [250, 128, 114],
|
|
1121
|
+
"sandybrown": [244, 164, 96],
|
|
1122
|
+
"seagreen": [46, 139, 87],
|
|
1123
|
+
"seashell": [255, 245, 238],
|
|
1124
|
+
"sienna": [160, 82, 45],
|
|
1125
|
+
"silver": [192, 192, 192],
|
|
1126
|
+
"skyblue": [135, 206, 235],
|
|
1127
|
+
"slateblue": [106, 90, 205],
|
|
1128
|
+
"slategray": [112, 128, 144],
|
|
1129
|
+
"slategrey": [112, 128, 144],
|
|
1130
|
+
"snow": [255, 250, 250],
|
|
1131
|
+
"springgreen": [0, 255, 127],
|
|
1132
|
+
"steelblue": [70, 130, 180],
|
|
1133
|
+
"tan": [210, 180, 140],
|
|
1134
|
+
"teal": [0, 128, 128],
|
|
1135
|
+
"thistle": [216, 191, 216],
|
|
1136
|
+
"tomato": [255, 99, 71],
|
|
1137
|
+
"turquoise": [64, 224, 208],
|
|
1138
|
+
"violet": [238, 130, 238],
|
|
1139
|
+
"wheat": [245, 222, 179],
|
|
1140
|
+
"white": [255, 255, 255],
|
|
1141
|
+
"whitesmoke": [245, 245, 245],
|
|
1142
|
+
"yellow": [255, 255, 0],
|
|
1143
|
+
"yellowgreen": [154, 205, 50]
|
|
1144
|
+
};
|
|
1145
|
+
}
|
|
1146
|
+
});
|
|
1147
|
+
|
|
1148
|
+
// node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js
|
|
1149
|
+
var require_conversions = __commonJS({
|
|
1150
|
+
"node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js"(exports2, module2) {
|
|
1151
|
+
var cssKeywords = require_color_name();
|
|
1152
|
+
var reverseKeywords = {};
|
|
1153
|
+
for (const key of Object.keys(cssKeywords)) {
|
|
1154
|
+
reverseKeywords[cssKeywords[key]] = key;
|
|
1155
|
+
}
|
|
1156
|
+
var convert = {
|
|
1157
|
+
rgb: { channels: 3, labels: "rgb" },
|
|
1158
|
+
hsl: { channels: 3, labels: "hsl" },
|
|
1159
|
+
hsv: { channels: 3, labels: "hsv" },
|
|
1160
|
+
hwb: { channels: 3, labels: "hwb" },
|
|
1161
|
+
cmyk: { channels: 4, labels: "cmyk" },
|
|
1162
|
+
xyz: { channels: 3, labels: "xyz" },
|
|
1163
|
+
lab: { channels: 3, labels: "lab" },
|
|
1164
|
+
lch: { channels: 3, labels: "lch" },
|
|
1165
|
+
hex: { channels: 1, labels: ["hex"] },
|
|
1166
|
+
keyword: { channels: 1, labels: ["keyword"] },
|
|
1167
|
+
ansi16: { channels: 1, labels: ["ansi16"] },
|
|
1168
|
+
ansi256: { channels: 1, labels: ["ansi256"] },
|
|
1169
|
+
hcg: { channels: 3, labels: ["h", "c", "g"] },
|
|
1170
|
+
apple: { channels: 3, labels: ["r16", "g16", "b16"] },
|
|
1171
|
+
gray: { channels: 1, labels: ["gray"] }
|
|
1172
|
+
};
|
|
1173
|
+
module2.exports = convert;
|
|
1174
|
+
for (const model of Object.keys(convert)) {
|
|
1175
|
+
if (!("channels" in convert[model])) {
|
|
1176
|
+
throw new Error("missing channels property: " + model);
|
|
1177
|
+
}
|
|
1178
|
+
if (!("labels" in convert[model])) {
|
|
1179
|
+
throw new Error("missing channel labels property: " + model);
|
|
1180
|
+
}
|
|
1181
|
+
if (convert[model].labels.length !== convert[model].channels) {
|
|
1182
|
+
throw new Error("channel and label counts mismatch: " + model);
|
|
1183
|
+
}
|
|
1184
|
+
const { channels, labels } = convert[model];
|
|
1185
|
+
delete convert[model].channels;
|
|
1186
|
+
delete convert[model].labels;
|
|
1187
|
+
Object.defineProperty(convert[model], "channels", { value: channels });
|
|
1188
|
+
Object.defineProperty(convert[model], "labels", { value: labels });
|
|
1189
|
+
}
|
|
1190
|
+
convert.rgb.hsl = function(rgb) {
|
|
1191
|
+
const r = rgb[0] / 255;
|
|
1192
|
+
const g = rgb[1] / 255;
|
|
1193
|
+
const b = rgb[2] / 255;
|
|
1194
|
+
const min = Math.min(r, g, b);
|
|
1195
|
+
const max = Math.max(r, g, b);
|
|
1196
|
+
const delta = max - min;
|
|
1197
|
+
let h;
|
|
1198
|
+
let s;
|
|
1199
|
+
if (max === min) {
|
|
1200
|
+
h = 0;
|
|
1201
|
+
} else if (r === max) {
|
|
1202
|
+
h = (g - b) / delta;
|
|
1203
|
+
} else if (g === max) {
|
|
1204
|
+
h = 2 + (b - r) / delta;
|
|
1205
|
+
} else if (b === max) {
|
|
1206
|
+
h = 4 + (r - g) / delta;
|
|
1207
|
+
}
|
|
1208
|
+
h = Math.min(h * 60, 360);
|
|
1209
|
+
if (h < 0) {
|
|
1210
|
+
h += 360;
|
|
1211
|
+
}
|
|
1212
|
+
const l = (min + max) / 2;
|
|
1213
|
+
if (max === min) {
|
|
1214
|
+
s = 0;
|
|
1215
|
+
} else if (l <= 0.5) {
|
|
1216
|
+
s = delta / (max + min);
|
|
1217
|
+
} else {
|
|
1218
|
+
s = delta / (2 - max - min);
|
|
1219
|
+
}
|
|
1220
|
+
return [h, s * 100, l * 100];
|
|
1221
|
+
};
|
|
1222
|
+
convert.rgb.hsv = function(rgb) {
|
|
1223
|
+
let rdif;
|
|
1224
|
+
let gdif;
|
|
1225
|
+
let bdif;
|
|
1226
|
+
let h;
|
|
1227
|
+
let s;
|
|
1228
|
+
const r = rgb[0] / 255;
|
|
1229
|
+
const g = rgb[1] / 255;
|
|
1230
|
+
const b = rgb[2] / 255;
|
|
1231
|
+
const v = Math.max(r, g, b);
|
|
1232
|
+
const diff = v - Math.min(r, g, b);
|
|
1233
|
+
const diffc = /* @__PURE__ */ __name(function(c) {
|
|
1234
|
+
return (v - c) / 6 / diff + 1 / 2;
|
|
1235
|
+
}, "diffc");
|
|
1236
|
+
if (diff === 0) {
|
|
1237
|
+
h = 0;
|
|
1238
|
+
s = 0;
|
|
1239
|
+
} else {
|
|
1240
|
+
s = diff / v;
|
|
1241
|
+
rdif = diffc(r);
|
|
1242
|
+
gdif = diffc(g);
|
|
1243
|
+
bdif = diffc(b);
|
|
1244
|
+
if (r === v) {
|
|
1245
|
+
h = bdif - gdif;
|
|
1246
|
+
} else if (g === v) {
|
|
1247
|
+
h = 1 / 3 + rdif - bdif;
|
|
1248
|
+
} else if (b === v) {
|
|
1249
|
+
h = 2 / 3 + gdif - rdif;
|
|
1250
|
+
}
|
|
1251
|
+
if (h < 0) {
|
|
1252
|
+
h += 1;
|
|
1253
|
+
} else if (h > 1) {
|
|
1254
|
+
h -= 1;
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
return [
|
|
1258
|
+
h * 360,
|
|
1259
|
+
s * 100,
|
|
1260
|
+
v * 100
|
|
1261
|
+
];
|
|
1262
|
+
};
|
|
1263
|
+
convert.rgb.hwb = function(rgb) {
|
|
1264
|
+
const r = rgb[0];
|
|
1265
|
+
const g = rgb[1];
|
|
1266
|
+
let b = rgb[2];
|
|
1267
|
+
const h = convert.rgb.hsl(rgb)[0];
|
|
1268
|
+
const w = 1 / 255 * Math.min(r, Math.min(g, b));
|
|
1269
|
+
b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
|
|
1270
|
+
return [h, w * 100, b * 100];
|
|
1271
|
+
};
|
|
1272
|
+
convert.rgb.cmyk = function(rgb) {
|
|
1273
|
+
const r = rgb[0] / 255;
|
|
1274
|
+
const g = rgb[1] / 255;
|
|
1275
|
+
const b = rgb[2] / 255;
|
|
1276
|
+
const k = Math.min(1 - r, 1 - g, 1 - b);
|
|
1277
|
+
const c = (1 - r - k) / (1 - k) || 0;
|
|
1278
|
+
const m = (1 - g - k) / (1 - k) || 0;
|
|
1279
|
+
const y = (1 - b - k) / (1 - k) || 0;
|
|
1280
|
+
return [c * 100, m * 100, y * 100, k * 100];
|
|
1281
|
+
};
|
|
1282
|
+
function comparativeDistance(x, y) {
|
|
1283
|
+
return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
|
|
1284
|
+
}
|
|
1285
|
+
__name(comparativeDistance, "comparativeDistance");
|
|
1286
|
+
convert.rgb.keyword = function(rgb) {
|
|
1287
|
+
const reversed = reverseKeywords[rgb];
|
|
1288
|
+
if (reversed) {
|
|
1289
|
+
return reversed;
|
|
1290
|
+
}
|
|
1291
|
+
let currentClosestDistance = Infinity;
|
|
1292
|
+
let currentClosestKeyword;
|
|
1293
|
+
for (const keyword of Object.keys(cssKeywords)) {
|
|
1294
|
+
const value = cssKeywords[keyword];
|
|
1295
|
+
const distance = comparativeDistance(rgb, value);
|
|
1296
|
+
if (distance < currentClosestDistance) {
|
|
1297
|
+
currentClosestDistance = distance;
|
|
1298
|
+
currentClosestKeyword = keyword;
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
return currentClosestKeyword;
|
|
1302
|
+
};
|
|
1303
|
+
convert.keyword.rgb = function(keyword) {
|
|
1304
|
+
return cssKeywords[keyword];
|
|
1305
|
+
};
|
|
1306
|
+
convert.rgb.xyz = function(rgb) {
|
|
1307
|
+
let r = rgb[0] / 255;
|
|
1308
|
+
let g = rgb[1] / 255;
|
|
1309
|
+
let b = rgb[2] / 255;
|
|
1310
|
+
r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
|
|
1311
|
+
g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
|
|
1312
|
+
b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
|
|
1313
|
+
const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
|
|
1314
|
+
const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
|
|
1315
|
+
const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
|
|
1316
|
+
return [x * 100, y * 100, z * 100];
|
|
1317
|
+
};
|
|
1318
|
+
convert.rgb.lab = function(rgb) {
|
|
1319
|
+
const xyz = convert.rgb.xyz(rgb);
|
|
1320
|
+
let x = xyz[0];
|
|
1321
|
+
let y = xyz[1];
|
|
1322
|
+
let z = xyz[2];
|
|
1323
|
+
x /= 95.047;
|
|
1324
|
+
y /= 100;
|
|
1325
|
+
z /= 108.883;
|
|
1326
|
+
x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
1327
|
+
y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
1328
|
+
z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
1329
|
+
const l = 116 * y - 16;
|
|
1330
|
+
const a = 500 * (x - y);
|
|
1331
|
+
const b = 200 * (y - z);
|
|
1332
|
+
return [l, a, b];
|
|
1333
|
+
};
|
|
1334
|
+
convert.hsl.rgb = function(hsl) {
|
|
1335
|
+
const h = hsl[0] / 360;
|
|
1336
|
+
const s = hsl[1] / 100;
|
|
1337
|
+
const l = hsl[2] / 100;
|
|
1338
|
+
let t2;
|
|
1339
|
+
let t3;
|
|
1340
|
+
let val;
|
|
1341
|
+
if (s === 0) {
|
|
1342
|
+
val = l * 255;
|
|
1343
|
+
return [val, val, val];
|
|
1344
|
+
}
|
|
1345
|
+
if (l < 0.5) {
|
|
1346
|
+
t2 = l * (1 + s);
|
|
1347
|
+
} else {
|
|
1348
|
+
t2 = l + s - l * s;
|
|
1349
|
+
}
|
|
1350
|
+
const t1 = 2 * l - t2;
|
|
1351
|
+
const rgb = [0, 0, 0];
|
|
1352
|
+
for (let i = 0; i < 3; i++) {
|
|
1353
|
+
t3 = h + 1 / 3 * -(i - 1);
|
|
1354
|
+
if (t3 < 0) {
|
|
1355
|
+
t3++;
|
|
1356
|
+
}
|
|
1357
|
+
if (t3 > 1) {
|
|
1358
|
+
t3--;
|
|
1359
|
+
}
|
|
1360
|
+
if (6 * t3 < 1) {
|
|
1361
|
+
val = t1 + (t2 - t1) * 6 * t3;
|
|
1362
|
+
} else if (2 * t3 < 1) {
|
|
1363
|
+
val = t2;
|
|
1364
|
+
} else if (3 * t3 < 2) {
|
|
1365
|
+
val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
|
|
1366
|
+
} else {
|
|
1367
|
+
val = t1;
|
|
1368
|
+
}
|
|
1369
|
+
rgb[i] = val * 255;
|
|
1370
|
+
}
|
|
1371
|
+
return rgb;
|
|
1372
|
+
};
|
|
1373
|
+
convert.hsl.hsv = function(hsl) {
|
|
1374
|
+
const h = hsl[0];
|
|
1375
|
+
let s = hsl[1] / 100;
|
|
1376
|
+
let l = hsl[2] / 100;
|
|
1377
|
+
let smin = s;
|
|
1378
|
+
const lmin = Math.max(l, 0.01);
|
|
1379
|
+
l *= 2;
|
|
1380
|
+
s *= l <= 1 ? l : 2 - l;
|
|
1381
|
+
smin *= lmin <= 1 ? lmin : 2 - lmin;
|
|
1382
|
+
const v = (l + s) / 2;
|
|
1383
|
+
const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
|
|
1384
|
+
return [h, sv * 100, v * 100];
|
|
1385
|
+
};
|
|
1386
|
+
convert.hsv.rgb = function(hsv) {
|
|
1387
|
+
const h = hsv[0] / 60;
|
|
1388
|
+
const s = hsv[1] / 100;
|
|
1389
|
+
let v = hsv[2] / 100;
|
|
1390
|
+
const hi = Math.floor(h) % 6;
|
|
1391
|
+
const f = h - Math.floor(h);
|
|
1392
|
+
const p = 255 * v * (1 - s);
|
|
1393
|
+
const q = 255 * v * (1 - s * f);
|
|
1394
|
+
const t = 255 * v * (1 - s * (1 - f));
|
|
1395
|
+
v *= 255;
|
|
1396
|
+
switch (hi) {
|
|
1397
|
+
case 0:
|
|
1398
|
+
return [v, t, p];
|
|
1399
|
+
case 1:
|
|
1400
|
+
return [q, v, p];
|
|
1401
|
+
case 2:
|
|
1402
|
+
return [p, v, t];
|
|
1403
|
+
case 3:
|
|
1404
|
+
return [p, q, v];
|
|
1405
|
+
case 4:
|
|
1406
|
+
return [t, p, v];
|
|
1407
|
+
case 5:
|
|
1408
|
+
return [v, p, q];
|
|
1409
|
+
}
|
|
1410
|
+
};
|
|
1411
|
+
convert.hsv.hsl = function(hsv) {
|
|
1412
|
+
const h = hsv[0];
|
|
1413
|
+
const s = hsv[1] / 100;
|
|
1414
|
+
const v = hsv[2] / 100;
|
|
1415
|
+
const vmin = Math.max(v, 0.01);
|
|
1416
|
+
let sl;
|
|
1417
|
+
let l;
|
|
1418
|
+
l = (2 - s) * v;
|
|
1419
|
+
const lmin = (2 - s) * vmin;
|
|
1420
|
+
sl = s * vmin;
|
|
1421
|
+
sl /= lmin <= 1 ? lmin : 2 - lmin;
|
|
1422
|
+
sl = sl || 0;
|
|
1423
|
+
l /= 2;
|
|
1424
|
+
return [h, sl * 100, l * 100];
|
|
1425
|
+
};
|
|
1426
|
+
convert.hwb.rgb = function(hwb) {
|
|
1427
|
+
const h = hwb[0] / 360;
|
|
1428
|
+
let wh = hwb[1] / 100;
|
|
1429
|
+
let bl = hwb[2] / 100;
|
|
1430
|
+
const ratio = wh + bl;
|
|
1431
|
+
let f;
|
|
1432
|
+
if (ratio > 1) {
|
|
1433
|
+
wh /= ratio;
|
|
1434
|
+
bl /= ratio;
|
|
1435
|
+
}
|
|
1436
|
+
const i = Math.floor(6 * h);
|
|
1437
|
+
const v = 1 - bl;
|
|
1438
|
+
f = 6 * h - i;
|
|
1439
|
+
if ((i & 1) !== 0) {
|
|
1440
|
+
f = 1 - f;
|
|
1441
|
+
}
|
|
1442
|
+
const n = wh + f * (v - wh);
|
|
1443
|
+
let r;
|
|
1444
|
+
let g;
|
|
1445
|
+
let b;
|
|
1446
|
+
switch (i) {
|
|
1447
|
+
default:
|
|
1448
|
+
case 6:
|
|
1449
|
+
case 0:
|
|
1450
|
+
r = v;
|
|
1451
|
+
g = n;
|
|
1452
|
+
b = wh;
|
|
1453
|
+
break;
|
|
1454
|
+
case 1:
|
|
1455
|
+
r = n;
|
|
1456
|
+
g = v;
|
|
1457
|
+
b = wh;
|
|
1458
|
+
break;
|
|
1459
|
+
case 2:
|
|
1460
|
+
r = wh;
|
|
1461
|
+
g = v;
|
|
1462
|
+
b = n;
|
|
1463
|
+
break;
|
|
1464
|
+
case 3:
|
|
1465
|
+
r = wh;
|
|
1466
|
+
g = n;
|
|
1467
|
+
b = v;
|
|
1468
|
+
break;
|
|
1469
|
+
case 4:
|
|
1470
|
+
r = n;
|
|
1471
|
+
g = wh;
|
|
1472
|
+
b = v;
|
|
1473
|
+
break;
|
|
1474
|
+
case 5:
|
|
1475
|
+
r = v;
|
|
1476
|
+
g = wh;
|
|
1477
|
+
b = n;
|
|
1478
|
+
break;
|
|
1479
|
+
}
|
|
1480
|
+
return [r * 255, g * 255, b * 255];
|
|
1481
|
+
};
|
|
1482
|
+
convert.cmyk.rgb = function(cmyk) {
|
|
1483
|
+
const c = cmyk[0] / 100;
|
|
1484
|
+
const m = cmyk[1] / 100;
|
|
1485
|
+
const y = cmyk[2] / 100;
|
|
1486
|
+
const k = cmyk[3] / 100;
|
|
1487
|
+
const r = 1 - Math.min(1, c * (1 - k) + k);
|
|
1488
|
+
const g = 1 - Math.min(1, m * (1 - k) + k);
|
|
1489
|
+
const b = 1 - Math.min(1, y * (1 - k) + k);
|
|
1490
|
+
return [r * 255, g * 255, b * 255];
|
|
1491
|
+
};
|
|
1492
|
+
convert.xyz.rgb = function(xyz) {
|
|
1493
|
+
const x = xyz[0] / 100;
|
|
1494
|
+
const y = xyz[1] / 100;
|
|
1495
|
+
const z = xyz[2] / 100;
|
|
1496
|
+
let r;
|
|
1497
|
+
let g;
|
|
1498
|
+
let b;
|
|
1499
|
+
r = x * 3.2406 + y * -1.5372 + z * -0.4986;
|
|
1500
|
+
g = x * -0.9689 + y * 1.8758 + z * 0.0415;
|
|
1501
|
+
b = x * 0.0557 + y * -0.204 + z * 1.057;
|
|
1502
|
+
r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92;
|
|
1503
|
+
g = g > 31308e-7 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92;
|
|
1504
|
+
b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92;
|
|
1505
|
+
r = Math.min(Math.max(0, r), 1);
|
|
1506
|
+
g = Math.min(Math.max(0, g), 1);
|
|
1507
|
+
b = Math.min(Math.max(0, b), 1);
|
|
1508
|
+
return [r * 255, g * 255, b * 255];
|
|
1509
|
+
};
|
|
1510
|
+
convert.xyz.lab = function(xyz) {
|
|
1511
|
+
let x = xyz[0];
|
|
1512
|
+
let y = xyz[1];
|
|
1513
|
+
let z = xyz[2];
|
|
1514
|
+
x /= 95.047;
|
|
1515
|
+
y /= 100;
|
|
1516
|
+
z /= 108.883;
|
|
1517
|
+
x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
1518
|
+
y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
1519
|
+
z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
1520
|
+
const l = 116 * y - 16;
|
|
1521
|
+
const a = 500 * (x - y);
|
|
1522
|
+
const b = 200 * (y - z);
|
|
1523
|
+
return [l, a, b];
|
|
1524
|
+
};
|
|
1525
|
+
convert.lab.xyz = function(lab) {
|
|
1526
|
+
const l = lab[0];
|
|
1527
|
+
const a = lab[1];
|
|
1528
|
+
const b = lab[2];
|
|
1529
|
+
let x;
|
|
1530
|
+
let y;
|
|
1531
|
+
let z;
|
|
1532
|
+
y = (l + 16) / 116;
|
|
1533
|
+
x = a / 500 + y;
|
|
1534
|
+
z = y - b / 200;
|
|
1535
|
+
const y2 = y ** 3;
|
|
1536
|
+
const x2 = x ** 3;
|
|
1537
|
+
const z2 = z ** 3;
|
|
1538
|
+
y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
|
|
1539
|
+
x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
|
|
1540
|
+
z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
|
|
1541
|
+
x *= 95.047;
|
|
1542
|
+
y *= 100;
|
|
1543
|
+
z *= 108.883;
|
|
1544
|
+
return [x, y, z];
|
|
1545
|
+
};
|
|
1546
|
+
convert.lab.lch = function(lab) {
|
|
1547
|
+
const l = lab[0];
|
|
1548
|
+
const a = lab[1];
|
|
1549
|
+
const b = lab[2];
|
|
1550
|
+
let h;
|
|
1551
|
+
const hr = Math.atan2(b, a);
|
|
1552
|
+
h = hr * 360 / 2 / Math.PI;
|
|
1553
|
+
if (h < 0) {
|
|
1554
|
+
h += 360;
|
|
1555
|
+
}
|
|
1556
|
+
const c = Math.sqrt(a * a + b * b);
|
|
1557
|
+
return [l, c, h];
|
|
1558
|
+
};
|
|
1559
|
+
convert.lch.lab = function(lch) {
|
|
1560
|
+
const l = lch[0];
|
|
1561
|
+
const c = lch[1];
|
|
1562
|
+
const h = lch[2];
|
|
1563
|
+
const hr = h / 360 * 2 * Math.PI;
|
|
1564
|
+
const a = c * Math.cos(hr);
|
|
1565
|
+
const b = c * Math.sin(hr);
|
|
1566
|
+
return [l, a, b];
|
|
1567
|
+
};
|
|
1568
|
+
convert.rgb.ansi16 = function(args, saturation = null) {
|
|
1569
|
+
const [r, g, b] = args;
|
|
1570
|
+
let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
|
|
1571
|
+
value = Math.round(value / 50);
|
|
1572
|
+
if (value === 0) {
|
|
1573
|
+
return 30;
|
|
1574
|
+
}
|
|
1575
|
+
let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
|
|
1576
|
+
if (value === 2) {
|
|
1577
|
+
ansi += 60;
|
|
1578
|
+
}
|
|
1579
|
+
return ansi;
|
|
1580
|
+
};
|
|
1581
|
+
convert.hsv.ansi16 = function(args) {
|
|
1582
|
+
return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
|
|
1583
|
+
};
|
|
1584
|
+
convert.rgb.ansi256 = function(args) {
|
|
1585
|
+
const r = args[0];
|
|
1586
|
+
const g = args[1];
|
|
1587
|
+
const b = args[2];
|
|
1588
|
+
if (r === g && g === b) {
|
|
1589
|
+
if (r < 8) {
|
|
1590
|
+
return 16;
|
|
1591
|
+
}
|
|
1592
|
+
if (r > 248) {
|
|
1593
|
+
return 231;
|
|
1594
|
+
}
|
|
1595
|
+
return Math.round((r - 8) / 247 * 24) + 232;
|
|
1596
|
+
}
|
|
1597
|
+
const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
|
|
1598
|
+
return ansi;
|
|
1599
|
+
};
|
|
1600
|
+
convert.ansi16.rgb = function(args) {
|
|
1601
|
+
let color = args % 10;
|
|
1602
|
+
if (color === 0 || color === 7) {
|
|
1603
|
+
if (args > 50) {
|
|
1604
|
+
color += 3.5;
|
|
1605
|
+
}
|
|
1606
|
+
color = color / 10.5 * 255;
|
|
1607
|
+
return [color, color, color];
|
|
1608
|
+
}
|
|
1609
|
+
const mult = (~~(args > 50) + 1) * 0.5;
|
|
1610
|
+
const r = (color & 1) * mult * 255;
|
|
1611
|
+
const g = (color >> 1 & 1) * mult * 255;
|
|
1612
|
+
const b = (color >> 2 & 1) * mult * 255;
|
|
1613
|
+
return [r, g, b];
|
|
1614
|
+
};
|
|
1615
|
+
convert.ansi256.rgb = function(args) {
|
|
1616
|
+
if (args >= 232) {
|
|
1617
|
+
const c = (args - 232) * 10 + 8;
|
|
1618
|
+
return [c, c, c];
|
|
1619
|
+
}
|
|
1620
|
+
args -= 16;
|
|
1621
|
+
let rem;
|
|
1622
|
+
const r = Math.floor(args / 36) / 5 * 255;
|
|
1623
|
+
const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
|
|
1624
|
+
const b = rem % 6 / 5 * 255;
|
|
1625
|
+
return [r, g, b];
|
|
1626
|
+
};
|
|
1627
|
+
convert.rgb.hex = function(args) {
|
|
1628
|
+
const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
|
|
1629
|
+
const string = integer.toString(16).toUpperCase();
|
|
1630
|
+
return "000000".substring(string.length) + string;
|
|
1631
|
+
};
|
|
1632
|
+
convert.hex.rgb = function(args) {
|
|
1633
|
+
const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
|
1634
|
+
if (!match) {
|
|
1635
|
+
return [0, 0, 0];
|
|
1636
|
+
}
|
|
1637
|
+
let colorString = match[0];
|
|
1638
|
+
if (match[0].length === 3) {
|
|
1639
|
+
colorString = colorString.split("").map((char) => {
|
|
1640
|
+
return char + char;
|
|
1641
|
+
}).join("");
|
|
1642
|
+
}
|
|
1643
|
+
const integer = parseInt(colorString, 16);
|
|
1644
|
+
const r = integer >> 16 & 255;
|
|
1645
|
+
const g = integer >> 8 & 255;
|
|
1646
|
+
const b = integer & 255;
|
|
1647
|
+
return [r, g, b];
|
|
1648
|
+
};
|
|
1649
|
+
convert.rgb.hcg = function(rgb) {
|
|
1650
|
+
const r = rgb[0] / 255;
|
|
1651
|
+
const g = rgb[1] / 255;
|
|
1652
|
+
const b = rgb[2] / 255;
|
|
1653
|
+
const max = Math.max(Math.max(r, g), b);
|
|
1654
|
+
const min = Math.min(Math.min(r, g), b);
|
|
1655
|
+
const chroma = max - min;
|
|
1656
|
+
let grayscale;
|
|
1657
|
+
let hue;
|
|
1658
|
+
if (chroma < 1) {
|
|
1659
|
+
grayscale = min / (1 - chroma);
|
|
1660
|
+
} else {
|
|
1661
|
+
grayscale = 0;
|
|
1662
|
+
}
|
|
1663
|
+
if (chroma <= 0) {
|
|
1664
|
+
hue = 0;
|
|
1665
|
+
} else if (max === r) {
|
|
1666
|
+
hue = (g - b) / chroma % 6;
|
|
1667
|
+
} else if (max === g) {
|
|
1668
|
+
hue = 2 + (b - r) / chroma;
|
|
1669
|
+
} else {
|
|
1670
|
+
hue = 4 + (r - g) / chroma;
|
|
1671
|
+
}
|
|
1672
|
+
hue /= 6;
|
|
1673
|
+
hue %= 1;
|
|
1674
|
+
return [hue * 360, chroma * 100, grayscale * 100];
|
|
1675
|
+
};
|
|
1676
|
+
convert.hsl.hcg = function(hsl) {
|
|
1677
|
+
const s = hsl[1] / 100;
|
|
1678
|
+
const l = hsl[2] / 100;
|
|
1679
|
+
const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l);
|
|
1680
|
+
let f = 0;
|
|
1681
|
+
if (c < 1) {
|
|
1682
|
+
f = (l - 0.5 * c) / (1 - c);
|
|
1683
|
+
}
|
|
1684
|
+
return [hsl[0], c * 100, f * 100];
|
|
1685
|
+
};
|
|
1686
|
+
convert.hsv.hcg = function(hsv) {
|
|
1687
|
+
const s = hsv[1] / 100;
|
|
1688
|
+
const v = hsv[2] / 100;
|
|
1689
|
+
const c = s * v;
|
|
1690
|
+
let f = 0;
|
|
1691
|
+
if (c < 1) {
|
|
1692
|
+
f = (v - c) / (1 - c);
|
|
1693
|
+
}
|
|
1694
|
+
return [hsv[0], c * 100, f * 100];
|
|
1695
|
+
};
|
|
1696
|
+
convert.hcg.rgb = function(hcg) {
|
|
1697
|
+
const h = hcg[0] / 360;
|
|
1698
|
+
const c = hcg[1] / 100;
|
|
1699
|
+
const g = hcg[2] / 100;
|
|
1700
|
+
if (c === 0) {
|
|
1701
|
+
return [g * 255, g * 255, g * 255];
|
|
1702
|
+
}
|
|
1703
|
+
const pure = [0, 0, 0];
|
|
1704
|
+
const hi = h % 1 * 6;
|
|
1705
|
+
const v = hi % 1;
|
|
1706
|
+
const w = 1 - v;
|
|
1707
|
+
let mg = 0;
|
|
1708
|
+
switch (Math.floor(hi)) {
|
|
1709
|
+
case 0:
|
|
1710
|
+
pure[0] = 1;
|
|
1711
|
+
pure[1] = v;
|
|
1712
|
+
pure[2] = 0;
|
|
1713
|
+
break;
|
|
1714
|
+
case 1:
|
|
1715
|
+
pure[0] = w;
|
|
1716
|
+
pure[1] = 1;
|
|
1717
|
+
pure[2] = 0;
|
|
1718
|
+
break;
|
|
1719
|
+
case 2:
|
|
1720
|
+
pure[0] = 0;
|
|
1721
|
+
pure[1] = 1;
|
|
1722
|
+
pure[2] = v;
|
|
1723
|
+
break;
|
|
1724
|
+
case 3:
|
|
1725
|
+
pure[0] = 0;
|
|
1726
|
+
pure[1] = w;
|
|
1727
|
+
pure[2] = 1;
|
|
1728
|
+
break;
|
|
1729
|
+
case 4:
|
|
1730
|
+
pure[0] = v;
|
|
1731
|
+
pure[1] = 0;
|
|
1732
|
+
pure[2] = 1;
|
|
1733
|
+
break;
|
|
1734
|
+
default:
|
|
1735
|
+
pure[0] = 1;
|
|
1736
|
+
pure[1] = 0;
|
|
1737
|
+
pure[2] = w;
|
|
1738
|
+
}
|
|
1739
|
+
mg = (1 - c) * g;
|
|
1740
|
+
return [
|
|
1741
|
+
(c * pure[0] + mg) * 255,
|
|
1742
|
+
(c * pure[1] + mg) * 255,
|
|
1743
|
+
(c * pure[2] + mg) * 255
|
|
1744
|
+
];
|
|
1745
|
+
};
|
|
1746
|
+
convert.hcg.hsv = function(hcg) {
|
|
1747
|
+
const c = hcg[1] / 100;
|
|
1748
|
+
const g = hcg[2] / 100;
|
|
1749
|
+
const v = c + g * (1 - c);
|
|
1750
|
+
let f = 0;
|
|
1751
|
+
if (v > 0) {
|
|
1752
|
+
f = c / v;
|
|
1753
|
+
}
|
|
1754
|
+
return [hcg[0], f * 100, v * 100];
|
|
1755
|
+
};
|
|
1756
|
+
convert.hcg.hsl = function(hcg) {
|
|
1757
|
+
const c = hcg[1] / 100;
|
|
1758
|
+
const g = hcg[2] / 100;
|
|
1759
|
+
const l = g * (1 - c) + 0.5 * c;
|
|
1760
|
+
let s = 0;
|
|
1761
|
+
if (l > 0 && l < 0.5) {
|
|
1762
|
+
s = c / (2 * l);
|
|
1763
|
+
} else if (l >= 0.5 && l < 1) {
|
|
1764
|
+
s = c / (2 * (1 - l));
|
|
1765
|
+
}
|
|
1766
|
+
return [hcg[0], s * 100, l * 100];
|
|
1767
|
+
};
|
|
1768
|
+
convert.hcg.hwb = function(hcg) {
|
|
1769
|
+
const c = hcg[1] / 100;
|
|
1770
|
+
const g = hcg[2] / 100;
|
|
1771
|
+
const v = c + g * (1 - c);
|
|
1772
|
+
return [hcg[0], (v - c) * 100, (1 - v) * 100];
|
|
1773
|
+
};
|
|
1774
|
+
convert.hwb.hcg = function(hwb) {
|
|
1775
|
+
const w = hwb[1] / 100;
|
|
1776
|
+
const b = hwb[2] / 100;
|
|
1777
|
+
const v = 1 - b;
|
|
1778
|
+
const c = v - w;
|
|
1779
|
+
let g = 0;
|
|
1780
|
+
if (c < 1) {
|
|
1781
|
+
g = (v - c) / (1 - c);
|
|
1782
|
+
}
|
|
1783
|
+
return [hwb[0], c * 100, g * 100];
|
|
1784
|
+
};
|
|
1785
|
+
convert.apple.rgb = function(apple) {
|
|
1786
|
+
return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
|
|
1787
|
+
};
|
|
1788
|
+
convert.rgb.apple = function(rgb) {
|
|
1789
|
+
return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
|
|
1790
|
+
};
|
|
1791
|
+
convert.gray.rgb = function(args) {
|
|
1792
|
+
return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
|
|
1793
|
+
};
|
|
1794
|
+
convert.gray.hsl = function(args) {
|
|
1795
|
+
return [0, 0, args[0]];
|
|
1796
|
+
};
|
|
1797
|
+
convert.gray.hsv = convert.gray.hsl;
|
|
1798
|
+
convert.gray.hwb = function(gray) {
|
|
1799
|
+
return [0, 100, gray[0]];
|
|
1800
|
+
};
|
|
1801
|
+
convert.gray.cmyk = function(gray) {
|
|
1802
|
+
return [0, 0, 0, gray[0]];
|
|
1803
|
+
};
|
|
1804
|
+
convert.gray.lab = function(gray) {
|
|
1805
|
+
return [gray[0], 0, 0];
|
|
1806
|
+
};
|
|
1807
|
+
convert.gray.hex = function(gray) {
|
|
1808
|
+
const val = Math.round(gray[0] / 100 * 255) & 255;
|
|
1809
|
+
const integer = (val << 16) + (val << 8) + val;
|
|
1810
|
+
const string = integer.toString(16).toUpperCase();
|
|
1811
|
+
return "000000".substring(string.length) + string;
|
|
1812
|
+
};
|
|
1813
|
+
convert.rgb.gray = function(rgb) {
|
|
1814
|
+
const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
|
|
1815
|
+
return [val / 255 * 100];
|
|
1816
|
+
};
|
|
1817
|
+
}
|
|
1818
|
+
});
|
|
1819
|
+
|
|
1820
|
+
// node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js
|
|
1821
|
+
var require_route = __commonJS({
|
|
1822
|
+
"node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js"(exports2, module2) {
|
|
1823
|
+
var conversions = require_conversions();
|
|
1824
|
+
function buildGraph() {
|
|
1825
|
+
const graph = {};
|
|
1826
|
+
const models = Object.keys(conversions);
|
|
1827
|
+
for (let len = models.length, i = 0; i < len; i++) {
|
|
1828
|
+
graph[models[i]] = {
|
|
1829
|
+
// http://jsperf.com/1-vs-infinity
|
|
1830
|
+
// micro-opt, but this is simple.
|
|
1831
|
+
distance: -1,
|
|
1832
|
+
parent: null
|
|
1833
|
+
};
|
|
1834
|
+
}
|
|
1835
|
+
return graph;
|
|
1836
|
+
}
|
|
1837
|
+
__name(buildGraph, "buildGraph");
|
|
1838
|
+
function deriveBFS(fromModel) {
|
|
1839
|
+
const graph = buildGraph();
|
|
1840
|
+
const queue = [fromModel];
|
|
1841
|
+
graph[fromModel].distance = 0;
|
|
1842
|
+
while (queue.length) {
|
|
1843
|
+
const current = queue.pop();
|
|
1844
|
+
const adjacents = Object.keys(conversions[current]);
|
|
1845
|
+
for (let len = adjacents.length, i = 0; i < len; i++) {
|
|
1846
|
+
const adjacent = adjacents[i];
|
|
1847
|
+
const node = graph[adjacent];
|
|
1848
|
+
if (node.distance === -1) {
|
|
1849
|
+
node.distance = graph[current].distance + 1;
|
|
1850
|
+
node.parent = current;
|
|
1851
|
+
queue.unshift(adjacent);
|
|
1852
|
+
}
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
return graph;
|
|
1856
|
+
}
|
|
1857
|
+
__name(deriveBFS, "deriveBFS");
|
|
1858
|
+
function link(from, to) {
|
|
1859
|
+
return function(args) {
|
|
1860
|
+
return to(from(args));
|
|
1861
|
+
};
|
|
1862
|
+
}
|
|
1863
|
+
__name(link, "link");
|
|
1864
|
+
function wrapConversion(toModel, graph) {
|
|
1865
|
+
const path = [graph[toModel].parent, toModel];
|
|
1866
|
+
let fn = conversions[graph[toModel].parent][toModel];
|
|
1867
|
+
let cur = graph[toModel].parent;
|
|
1868
|
+
while (graph[cur].parent) {
|
|
1869
|
+
path.unshift(graph[cur].parent);
|
|
1870
|
+
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
1871
|
+
cur = graph[cur].parent;
|
|
1872
|
+
}
|
|
1873
|
+
fn.conversion = path;
|
|
1874
|
+
return fn;
|
|
1875
|
+
}
|
|
1876
|
+
__name(wrapConversion, "wrapConversion");
|
|
1877
|
+
module2.exports = function(fromModel) {
|
|
1878
|
+
const graph = deriveBFS(fromModel);
|
|
1879
|
+
const conversion = {};
|
|
1880
|
+
const models = Object.keys(graph);
|
|
1881
|
+
for (let len = models.length, i = 0; i < len; i++) {
|
|
1882
|
+
const toModel = models[i];
|
|
1883
|
+
const node = graph[toModel];
|
|
1884
|
+
if (node.parent === null) {
|
|
1885
|
+
continue;
|
|
1886
|
+
}
|
|
1887
|
+
conversion[toModel] = wrapConversion(toModel, graph);
|
|
1888
|
+
}
|
|
1889
|
+
return conversion;
|
|
1890
|
+
};
|
|
1891
|
+
}
|
|
1892
|
+
});
|
|
1893
|
+
|
|
1894
|
+
// node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js
|
|
1895
|
+
var require_color_convert = __commonJS({
|
|
1896
|
+
"node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js"(exports2, module2) {
|
|
1897
|
+
var conversions = require_conversions();
|
|
1898
|
+
var route = require_route();
|
|
1899
|
+
var convert = {};
|
|
1900
|
+
var models = Object.keys(conversions);
|
|
1901
|
+
function wrapRaw(fn) {
|
|
1902
|
+
const wrappedFn = /* @__PURE__ */ __name(function(...args) {
|
|
1903
|
+
const arg0 = args[0];
|
|
1904
|
+
if (arg0 === void 0 || arg0 === null) {
|
|
1905
|
+
return arg0;
|
|
1906
|
+
}
|
|
1907
|
+
if (arg0.length > 1) {
|
|
1908
|
+
args = arg0;
|
|
1909
|
+
}
|
|
1910
|
+
return fn(args);
|
|
1911
|
+
}, "wrappedFn");
|
|
1912
|
+
if ("conversion" in fn) {
|
|
1913
|
+
wrappedFn.conversion = fn.conversion;
|
|
1914
|
+
}
|
|
1915
|
+
return wrappedFn;
|
|
1916
|
+
}
|
|
1917
|
+
__name(wrapRaw, "wrapRaw");
|
|
1918
|
+
function wrapRounded(fn) {
|
|
1919
|
+
const wrappedFn = /* @__PURE__ */ __name(function(...args) {
|
|
1920
|
+
const arg0 = args[0];
|
|
1921
|
+
if (arg0 === void 0 || arg0 === null) {
|
|
1922
|
+
return arg0;
|
|
1923
|
+
}
|
|
1924
|
+
if (arg0.length > 1) {
|
|
1925
|
+
args = arg0;
|
|
1926
|
+
}
|
|
1927
|
+
const result = fn(args);
|
|
1928
|
+
if (typeof result === "object") {
|
|
1929
|
+
for (let len = result.length, i = 0; i < len; i++) {
|
|
1930
|
+
result[i] = Math.round(result[i]);
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
return result;
|
|
1934
|
+
}, "wrappedFn");
|
|
1935
|
+
if ("conversion" in fn) {
|
|
1936
|
+
wrappedFn.conversion = fn.conversion;
|
|
1937
|
+
}
|
|
1938
|
+
return wrappedFn;
|
|
1939
|
+
}
|
|
1940
|
+
__name(wrapRounded, "wrapRounded");
|
|
1941
|
+
models.forEach((fromModel) => {
|
|
1942
|
+
convert[fromModel] = {};
|
|
1943
|
+
Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
|
|
1944
|
+
Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
|
|
1945
|
+
const routes = route(fromModel);
|
|
1946
|
+
const routeModels = Object.keys(routes);
|
|
1947
|
+
routeModels.forEach((toModel) => {
|
|
1948
|
+
const fn = routes[toModel];
|
|
1949
|
+
convert[fromModel][toModel] = wrapRounded(fn);
|
|
1950
|
+
convert[fromModel][toModel].raw = wrapRaw(fn);
|
|
1951
|
+
});
|
|
1952
|
+
});
|
|
1953
|
+
module2.exports = convert;
|
|
1954
|
+
}
|
|
1955
|
+
});
|
|
1956
|
+
|
|
1957
|
+
// node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js
|
|
1958
|
+
var require_ansi_styles = __commonJS({
|
|
1959
|
+
"node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js"(exports2, module2) {
|
|
1960
|
+
"use strict";
|
|
1961
|
+
var wrapAnsi16 = /* @__PURE__ */ __name((fn, offset) => (...args) => {
|
|
1962
|
+
const code = fn(...args);
|
|
1963
|
+
return `\x1B[${code + offset}m`;
|
|
1964
|
+
}, "wrapAnsi16");
|
|
1965
|
+
var wrapAnsi256 = /* @__PURE__ */ __name((fn, offset) => (...args) => {
|
|
1966
|
+
const code = fn(...args);
|
|
1967
|
+
return `\x1B[${38 + offset};5;${code}m`;
|
|
1968
|
+
}, "wrapAnsi256");
|
|
1969
|
+
var wrapAnsi16m = /* @__PURE__ */ __name((fn, offset) => (...args) => {
|
|
1970
|
+
const rgb = fn(...args);
|
|
1971
|
+
return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
|
|
1972
|
+
}, "wrapAnsi16m");
|
|
1973
|
+
var ansi2ansi = /* @__PURE__ */ __name((n) => n, "ansi2ansi");
|
|
1974
|
+
var rgb2rgb = /* @__PURE__ */ __name((r, g, b) => [r, g, b], "rgb2rgb");
|
|
1975
|
+
var setLazyProperty = /* @__PURE__ */ __name((object, property, get) => {
|
|
1976
|
+
Object.defineProperty(object, property, {
|
|
1977
|
+
get: /* @__PURE__ */ __name(() => {
|
|
1978
|
+
const value = get();
|
|
1979
|
+
Object.defineProperty(object, property, {
|
|
1980
|
+
value,
|
|
1981
|
+
enumerable: true,
|
|
1982
|
+
configurable: true
|
|
1983
|
+
});
|
|
1984
|
+
return value;
|
|
1985
|
+
}, "get"),
|
|
1986
|
+
enumerable: true,
|
|
1987
|
+
configurable: true
|
|
1988
|
+
});
|
|
1989
|
+
}, "setLazyProperty");
|
|
1990
|
+
var colorConvert;
|
|
1991
|
+
var makeDynamicStyles = /* @__PURE__ */ __name((wrap, targetSpace, identity, isBackground) => {
|
|
1992
|
+
if (colorConvert === void 0) {
|
|
1993
|
+
colorConvert = require_color_convert();
|
|
1994
|
+
}
|
|
1995
|
+
const offset = isBackground ? 10 : 0;
|
|
1996
|
+
const styles = {};
|
|
1997
|
+
for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
|
|
1998
|
+
const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
|
|
1999
|
+
if (sourceSpace === targetSpace) {
|
|
2000
|
+
styles[name] = wrap(identity, offset);
|
|
2001
|
+
} else if (typeof suite === "object") {
|
|
2002
|
+
styles[name] = wrap(suite[targetSpace], offset);
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
return styles;
|
|
2006
|
+
}, "makeDynamicStyles");
|
|
2007
|
+
function assembleStyles() {
|
|
2008
|
+
const codes = /* @__PURE__ */ new Map();
|
|
2009
|
+
const styles = {
|
|
2010
|
+
modifier: {
|
|
2011
|
+
reset: [0, 0],
|
|
2012
|
+
// 21 isn't widely supported and 22 does the same thing
|
|
2013
|
+
bold: [1, 22],
|
|
2014
|
+
dim: [2, 22],
|
|
2015
|
+
italic: [3, 23],
|
|
2016
|
+
underline: [4, 24],
|
|
2017
|
+
inverse: [7, 27],
|
|
2018
|
+
hidden: [8, 28],
|
|
2019
|
+
strikethrough: [9, 29]
|
|
2020
|
+
},
|
|
2021
|
+
color: {
|
|
2022
|
+
black: [30, 39],
|
|
2023
|
+
red: [31, 39],
|
|
2024
|
+
green: [32, 39],
|
|
2025
|
+
yellow: [33, 39],
|
|
2026
|
+
blue: [34, 39],
|
|
2027
|
+
magenta: [35, 39],
|
|
2028
|
+
cyan: [36, 39],
|
|
2029
|
+
white: [37, 39],
|
|
2030
|
+
// Bright color
|
|
2031
|
+
blackBright: [90, 39],
|
|
2032
|
+
redBright: [91, 39],
|
|
2033
|
+
greenBright: [92, 39],
|
|
2034
|
+
yellowBright: [93, 39],
|
|
2035
|
+
blueBright: [94, 39],
|
|
2036
|
+
magentaBright: [95, 39],
|
|
2037
|
+
cyanBright: [96, 39],
|
|
2038
|
+
whiteBright: [97, 39]
|
|
2039
|
+
},
|
|
2040
|
+
bgColor: {
|
|
2041
|
+
bgBlack: [40, 49],
|
|
2042
|
+
bgRed: [41, 49],
|
|
2043
|
+
bgGreen: [42, 49],
|
|
2044
|
+
bgYellow: [43, 49],
|
|
2045
|
+
bgBlue: [44, 49],
|
|
2046
|
+
bgMagenta: [45, 49],
|
|
2047
|
+
bgCyan: [46, 49],
|
|
2048
|
+
bgWhite: [47, 49],
|
|
2049
|
+
// Bright color
|
|
2050
|
+
bgBlackBright: [100, 49],
|
|
2051
|
+
bgRedBright: [101, 49],
|
|
2052
|
+
bgGreenBright: [102, 49],
|
|
2053
|
+
bgYellowBright: [103, 49],
|
|
2054
|
+
bgBlueBright: [104, 49],
|
|
2055
|
+
bgMagentaBright: [105, 49],
|
|
2056
|
+
bgCyanBright: [106, 49],
|
|
2057
|
+
bgWhiteBright: [107, 49]
|
|
2058
|
+
}
|
|
2059
|
+
};
|
|
2060
|
+
styles.color.gray = styles.color.blackBright;
|
|
2061
|
+
styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
|
|
2062
|
+
styles.color.grey = styles.color.blackBright;
|
|
2063
|
+
styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
|
|
2064
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
2065
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
2066
|
+
styles[styleName] = {
|
|
2067
|
+
open: `\x1B[${style[0]}m`,
|
|
2068
|
+
close: `\x1B[${style[1]}m`
|
|
2069
|
+
};
|
|
2070
|
+
group[styleName] = styles[styleName];
|
|
2071
|
+
codes.set(style[0], style[1]);
|
|
2072
|
+
}
|
|
2073
|
+
Object.defineProperty(styles, groupName, {
|
|
2074
|
+
value: group,
|
|
2075
|
+
enumerable: false
|
|
2076
|
+
});
|
|
2077
|
+
}
|
|
2078
|
+
Object.defineProperty(styles, "codes", {
|
|
2079
|
+
value: codes,
|
|
2080
|
+
enumerable: false
|
|
2081
|
+
});
|
|
2082
|
+
styles.color.close = "\x1B[39m";
|
|
2083
|
+
styles.bgColor.close = "\x1B[49m";
|
|
2084
|
+
setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
|
|
2085
|
+
setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
|
|
2086
|
+
setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
|
|
2087
|
+
setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
|
|
2088
|
+
setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
|
|
2089
|
+
setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
|
|
2090
|
+
return styles;
|
|
2091
|
+
}
|
|
2092
|
+
__name(assembleStyles, "assembleStyles");
|
|
2093
|
+
Object.defineProperty(module2, "exports", {
|
|
2094
|
+
enumerable: true,
|
|
2095
|
+
get: assembleStyles
|
|
2096
|
+
});
|
|
2097
|
+
}
|
|
2098
|
+
});
|
|
2099
|
+
|
|
2100
|
+
// node_modules/.pnpm/wrap-ansi@6.2.0/node_modules/wrap-ansi/index.js
|
|
2101
|
+
var require_wrap_ansi = __commonJS({
|
|
2102
|
+
"node_modules/.pnpm/wrap-ansi@6.2.0/node_modules/wrap-ansi/index.js"(exports2, module2) {
|
|
2103
|
+
"use strict";
|
|
2104
|
+
var stringWidth = require_string_width();
|
|
2105
|
+
var stripAnsi = require_strip_ansi();
|
|
2106
|
+
var ansiStyles = require_ansi_styles();
|
|
2107
|
+
var ESCAPES = /* @__PURE__ */ new Set([
|
|
2108
|
+
"\x1B",
|
|
2109
|
+
""
|
|
2110
|
+
]);
|
|
2111
|
+
var END_CODE = 39;
|
|
2112
|
+
var wrapAnsi = /* @__PURE__ */ __name((code) => `${ESCAPES.values().next().value}[${code}m`, "wrapAnsi");
|
|
2113
|
+
var wordLengths = /* @__PURE__ */ __name((string) => string.split(" ").map((character) => stringWidth(character)), "wordLengths");
|
|
2114
|
+
var wrapWord = /* @__PURE__ */ __name((rows, word, columns) => {
|
|
2115
|
+
const characters = [...word];
|
|
2116
|
+
let isInsideEscape = false;
|
|
2117
|
+
let visible = stringWidth(stripAnsi(rows[rows.length - 1]));
|
|
2118
|
+
for (const [index, character] of characters.entries()) {
|
|
2119
|
+
const characterLength = stringWidth(character);
|
|
2120
|
+
if (visible + characterLength <= columns) {
|
|
2121
|
+
rows[rows.length - 1] += character;
|
|
2122
|
+
} else {
|
|
2123
|
+
rows.push(character);
|
|
2124
|
+
visible = 0;
|
|
2125
|
+
}
|
|
2126
|
+
if (ESCAPES.has(character)) {
|
|
2127
|
+
isInsideEscape = true;
|
|
2128
|
+
} else if (isInsideEscape && character === "m") {
|
|
2129
|
+
isInsideEscape = false;
|
|
2130
|
+
continue;
|
|
2131
|
+
}
|
|
2132
|
+
if (isInsideEscape) {
|
|
2133
|
+
continue;
|
|
2134
|
+
}
|
|
2135
|
+
visible += characterLength;
|
|
2136
|
+
if (visible === columns && index < characters.length - 1) {
|
|
2137
|
+
rows.push("");
|
|
2138
|
+
visible = 0;
|
|
2139
|
+
}
|
|
2140
|
+
}
|
|
2141
|
+
if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) {
|
|
2142
|
+
rows[rows.length - 2] += rows.pop();
|
|
2143
|
+
}
|
|
2144
|
+
}, "wrapWord");
|
|
2145
|
+
var stringVisibleTrimSpacesRight = /* @__PURE__ */ __name((str) => {
|
|
2146
|
+
const words = str.split(" ");
|
|
2147
|
+
let last = words.length;
|
|
2148
|
+
while (last > 0) {
|
|
2149
|
+
if (stringWidth(words[last - 1]) > 0) {
|
|
2150
|
+
break;
|
|
2151
|
+
}
|
|
2152
|
+
last--;
|
|
2153
|
+
}
|
|
2154
|
+
if (last === words.length) {
|
|
2155
|
+
return str;
|
|
2156
|
+
}
|
|
2157
|
+
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
2158
|
+
}, "stringVisibleTrimSpacesRight");
|
|
2159
|
+
var exec = /* @__PURE__ */ __name((string, columns, options = {}) => {
|
|
2160
|
+
if (options.trim !== false && string.trim() === "") {
|
|
2161
|
+
return "";
|
|
2162
|
+
}
|
|
2163
|
+
let pre = "";
|
|
2164
|
+
let ret = "";
|
|
2165
|
+
let escapeCode;
|
|
2166
|
+
const lengths = wordLengths(string);
|
|
2167
|
+
let rows = [""];
|
|
2168
|
+
for (const [index, word] of string.split(" ").entries()) {
|
|
2169
|
+
if (options.trim !== false) {
|
|
2170
|
+
rows[rows.length - 1] = rows[rows.length - 1].trimLeft();
|
|
2171
|
+
}
|
|
2172
|
+
let rowLength = stringWidth(rows[rows.length - 1]);
|
|
2173
|
+
if (index !== 0) {
|
|
2174
|
+
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
2175
|
+
rows.push("");
|
|
2176
|
+
rowLength = 0;
|
|
2177
|
+
}
|
|
2178
|
+
if (rowLength > 0 || options.trim === false) {
|
|
2179
|
+
rows[rows.length - 1] += " ";
|
|
2180
|
+
rowLength++;
|
|
2181
|
+
}
|
|
2182
|
+
}
|
|
2183
|
+
if (options.hard && lengths[index] > columns) {
|
|
2184
|
+
const remainingColumns = columns - rowLength;
|
|
2185
|
+
const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
|
|
2186
|
+
const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
|
|
2187
|
+
if (breaksStartingNextLine < breaksStartingThisLine) {
|
|
2188
|
+
rows.push("");
|
|
2189
|
+
}
|
|
2190
|
+
wrapWord(rows, word, columns);
|
|
2191
|
+
continue;
|
|
2192
|
+
}
|
|
2193
|
+
if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
|
|
2194
|
+
if (options.wordWrap === false && rowLength < columns) {
|
|
2195
|
+
wrapWord(rows, word, columns);
|
|
2196
|
+
continue;
|
|
2197
|
+
}
|
|
2198
|
+
rows.push("");
|
|
2199
|
+
}
|
|
2200
|
+
if (rowLength + lengths[index] > columns && options.wordWrap === false) {
|
|
2201
|
+
wrapWord(rows, word, columns);
|
|
2202
|
+
continue;
|
|
2203
|
+
}
|
|
2204
|
+
rows[rows.length - 1] += word;
|
|
2205
|
+
}
|
|
2206
|
+
if (options.trim !== false) {
|
|
2207
|
+
rows = rows.map(stringVisibleTrimSpacesRight);
|
|
2208
|
+
}
|
|
2209
|
+
pre = rows.join("\n");
|
|
2210
|
+
for (const [index, character] of [...pre].entries()) {
|
|
2211
|
+
ret += character;
|
|
2212
|
+
if (ESCAPES.has(character)) {
|
|
2213
|
+
const code2 = parseFloat(/\d[^m]*/.exec(pre.slice(index, index + 4)));
|
|
2214
|
+
escapeCode = code2 === END_CODE ? null : code2;
|
|
2215
|
+
}
|
|
2216
|
+
const code = ansiStyles.codes.get(Number(escapeCode));
|
|
2217
|
+
if (escapeCode && code) {
|
|
2218
|
+
if (pre[index + 1] === "\n") {
|
|
2219
|
+
ret += wrapAnsi(code);
|
|
2220
|
+
} else if (character === "\n") {
|
|
2221
|
+
ret += wrapAnsi(escapeCode);
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
}
|
|
2225
|
+
return ret;
|
|
2226
|
+
}, "exec");
|
|
2227
|
+
module2.exports = (string, columns, options) => {
|
|
2228
|
+
return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
|
|
2229
|
+
};
|
|
2230
|
+
}
|
|
2231
|
+
});
|
|
2232
|
+
|
|
2233
|
+
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/utils.js
|
|
2234
|
+
var require_utils = __commonJS({
|
|
2235
|
+
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/utils.js"(exports2) {
|
|
2236
|
+
"use strict";
|
|
2237
|
+
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
2238
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
2239
|
+
};
|
|
2240
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2241
|
+
exports2.breakLines = breakLines;
|
|
2242
|
+
exports2.readlineWidth = readlineWidth;
|
|
2243
|
+
var cli_width_1 = __importDefault(require_cli_width());
|
|
2244
|
+
var wrap_ansi_1 = __importDefault(require_wrap_ansi());
|
|
2245
|
+
var hook_engine_ts_1 = require_hook_engine();
|
|
2246
|
+
function breakLines(content, width) {
|
|
2247
|
+
return content.split("\n").flatMap((line) => (0, wrap_ansi_1.default)(line, width, { trim: false, hard: true }).split("\n").map((str) => str.trimEnd())).join("\n");
|
|
2248
|
+
}
|
|
2249
|
+
__name(breakLines, "breakLines");
|
|
2250
|
+
function readlineWidth() {
|
|
2251
|
+
return (0, cli_width_1.default)({ defaultWidth: 80, output: (0, hook_engine_ts_1.readline)().output });
|
|
2252
|
+
}
|
|
2253
|
+
__name(readlineWidth, "readlineWidth");
|
|
2254
|
+
}
|
|
2255
|
+
});
|
|
2256
|
+
|
|
2257
|
+
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/pagination/use-pagination.js
|
|
2258
|
+
var require_use_pagination = __commonJS({
|
|
2259
|
+
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/pagination/use-pagination.js"(exports2) {
|
|
2260
|
+
"use strict";
|
|
2261
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2262
|
+
exports2.usePagination = usePagination;
|
|
2263
|
+
var use_ref_ts_1 = require_use_ref();
|
|
2264
|
+
var utils_ts_1 = require_utils();
|
|
2265
|
+
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
|
2266
|
+
const state = (0, use_ref_ts_1.useRef)({
|
|
2267
|
+
lastPointer: active,
|
|
2268
|
+
lastActive: void 0
|
|
2269
|
+
});
|
|
2270
|
+
const { lastPointer, lastActive } = state.current;
|
|
2271
|
+
const middle = Math.floor(pageSize / 2);
|
|
2272
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
|
2273
|
+
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
|
2274
|
+
let pointer = defaultPointerPosition;
|
|
2275
|
+
if (renderedLength > pageSize) {
|
|
2276
|
+
if (loop) {
|
|
2277
|
+
pointer = lastPointer;
|
|
2278
|
+
if (
|
|
2279
|
+
// First render, skip this logic.
|
|
2280
|
+
lastActive != null && // Only move the pointer down when the user moves down.
|
|
2281
|
+
lastActive < active && // Check user didn't move up across page boundary.
|
|
2282
|
+
active - lastActive < pageSize
|
|
2283
|
+
) {
|
|
2284
|
+
pointer = Math.min(
|
|
2285
|
+
// Furthest allowed position for the pointer is the middle of the list
|
|
2286
|
+
middle,
|
|
2287
|
+
Math.abs(active - lastActive) === 1 ? Math.min(
|
|
2288
|
+
// Move the pointer at most the height of the last active item.
|
|
2289
|
+
lastPointer + (renderedItems[lastActive]?.length ?? 0),
|
|
2290
|
+
// If the user moved by one item, move the pointer to the natural position of the active item as
|
|
2291
|
+
// long as it doesn't move the cursor up.
|
|
2292
|
+
Math.max(defaultPointerPosition, lastPointer)
|
|
2293
|
+
) : (
|
|
2294
|
+
// Otherwise, move the pointer down by the difference between the active and last active item.
|
|
2295
|
+
lastPointer + active - lastActive
|
|
2296
|
+
)
|
|
2297
|
+
);
|
|
2298
|
+
}
|
|
2299
|
+
} else {
|
|
2300
|
+
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
|
2301
|
+
pointer = spaceUnderActive < pageSize - middle ? (
|
|
2302
|
+
// If the active item is near the end of the list, progressively move the cursor towards the end.
|
|
2303
|
+
pageSize - spaceUnderActive
|
|
2304
|
+
) : (
|
|
2305
|
+
// Otherwise, progressively move the pointer to the middle of the list.
|
|
2306
|
+
Math.min(defaultPointerPosition, middle)
|
|
2307
|
+
);
|
|
2308
|
+
}
|
|
2309
|
+
}
|
|
2310
|
+
state.current.lastPointer = pointer;
|
|
2311
|
+
state.current.lastActive = active;
|
|
2312
|
+
return pointer;
|
|
2313
|
+
}
|
|
2314
|
+
__name(usePointerPosition, "usePointerPosition");
|
|
2315
|
+
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
2316
|
+
const width = (0, utils_ts_1.readlineWidth)();
|
|
2317
|
+
const bound = /* @__PURE__ */ __name((num) => (num % items.length + items.length) % items.length, "bound");
|
|
2318
|
+
const renderedItems = items.map((item, index) => {
|
|
2319
|
+
if (item == null)
|
|
2320
|
+
return [];
|
|
2321
|
+
return (0, utils_ts_1.breakLines)(renderItem({ item, index, isActive: index === active }), width).split("\n");
|
|
2322
|
+
});
|
|
2323
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
|
2324
|
+
const renderItemAtIndex = /* @__PURE__ */ __name((index) => renderedItems[index] ?? [], "renderItemAtIndex");
|
|
2325
|
+
const pointer = usePointerPosition({ active, renderedItems, pageSize, loop });
|
|
2326
|
+
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
|
2327
|
+
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
|
2328
|
+
const pageBuffer = Array.from({ length: pageSize });
|
|
2329
|
+
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
|
2330
|
+
const itemVisited = /* @__PURE__ */ new Set([active]);
|
|
2331
|
+
let bufferPointer = activeItemPosition + activeItem.length;
|
|
2332
|
+
let itemPointer = bound(active + 1);
|
|
2333
|
+
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
|
2334
|
+
const lines = renderItemAtIndex(itemPointer);
|
|
2335
|
+
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
|
2336
|
+
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
|
2337
|
+
itemVisited.add(itemPointer);
|
|
2338
|
+
bufferPointer += linesToAdd.length;
|
|
2339
|
+
itemPointer = bound(itemPointer + 1);
|
|
2340
|
+
}
|
|
2341
|
+
bufferPointer = activeItemPosition - 1;
|
|
2342
|
+
itemPointer = bound(active - 1);
|
|
2343
|
+
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
|
2344
|
+
const lines = renderItemAtIndex(itemPointer);
|
|
2345
|
+
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
|
2346
|
+
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
|
2347
|
+
itemVisited.add(itemPointer);
|
|
2348
|
+
bufferPointer -= linesToAdd.length;
|
|
2349
|
+
itemPointer = bound(itemPointer - 1);
|
|
2350
|
+
}
|
|
2351
|
+
return pageBuffer.filter((line) => typeof line === "string").join("\n");
|
|
2352
|
+
}
|
|
2353
|
+
__name(usePagination, "usePagination");
|
|
2354
|
+
}
|
|
2355
|
+
});
|
|
2356
|
+
|
|
2357
|
+
// node_modules/.pnpm/mute-stream@2.0.0/node_modules/mute-stream/lib/index.js
|
|
2358
|
+
var require_lib = __commonJS({
|
|
2359
|
+
"node_modules/.pnpm/mute-stream@2.0.0/node_modules/mute-stream/lib/index.js"(exports2, module2) {
|
|
2360
|
+
var Stream = require("stream");
|
|
2361
|
+
var MuteStream = class extends Stream {
|
|
2362
|
+
static {
|
|
2363
|
+
__name(this, "MuteStream");
|
|
2364
|
+
}
|
|
2365
|
+
#isTTY = null;
|
|
2366
|
+
constructor(opts = {}) {
|
|
2367
|
+
super(opts);
|
|
2368
|
+
this.writable = this.readable = true;
|
|
2369
|
+
this.muted = false;
|
|
2370
|
+
this.on("pipe", this._onpipe);
|
|
2371
|
+
this.replace = opts.replace;
|
|
2372
|
+
this._prompt = opts.prompt || null;
|
|
2373
|
+
this._hadControl = false;
|
|
2374
|
+
}
|
|
2375
|
+
#destSrc(key, def) {
|
|
2376
|
+
if (this._dest) {
|
|
2377
|
+
return this._dest[key];
|
|
2378
|
+
}
|
|
2379
|
+
if (this._src) {
|
|
2380
|
+
return this._src[key];
|
|
2381
|
+
}
|
|
2382
|
+
return def;
|
|
2383
|
+
}
|
|
2384
|
+
#proxy(method, ...args) {
|
|
2385
|
+
if (typeof this._dest?.[method] === "function") {
|
|
2386
|
+
this._dest[method](...args);
|
|
2387
|
+
}
|
|
2388
|
+
if (typeof this._src?.[method] === "function") {
|
|
2389
|
+
this._src[method](...args);
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
get isTTY() {
|
|
2393
|
+
if (this.#isTTY !== null) {
|
|
2394
|
+
return this.#isTTY;
|
|
2395
|
+
}
|
|
2396
|
+
return this.#destSrc("isTTY", false);
|
|
2397
|
+
}
|
|
2398
|
+
// basically just get replace the getter/setter with a regular value
|
|
2399
|
+
set isTTY(val) {
|
|
2400
|
+
this.#isTTY = val;
|
|
2401
|
+
}
|
|
2402
|
+
get rows() {
|
|
2403
|
+
return this.#destSrc("rows");
|
|
2404
|
+
}
|
|
2405
|
+
get columns() {
|
|
2406
|
+
return this.#destSrc("columns");
|
|
2407
|
+
}
|
|
2408
|
+
mute() {
|
|
2409
|
+
this.muted = true;
|
|
2410
|
+
}
|
|
2411
|
+
unmute() {
|
|
2412
|
+
this.muted = false;
|
|
2413
|
+
}
|
|
2414
|
+
_onpipe(src) {
|
|
2415
|
+
this._src = src;
|
|
2416
|
+
}
|
|
2417
|
+
pipe(dest, options) {
|
|
2418
|
+
this._dest = dest;
|
|
2419
|
+
return super.pipe(dest, options);
|
|
2420
|
+
}
|
|
2421
|
+
pause() {
|
|
2422
|
+
if (this._src) {
|
|
2423
|
+
return this._src.pause();
|
|
2424
|
+
}
|
|
2425
|
+
}
|
|
2426
|
+
resume() {
|
|
2427
|
+
if (this._src) {
|
|
2428
|
+
return this._src.resume();
|
|
2429
|
+
}
|
|
2430
|
+
}
|
|
2431
|
+
write(c) {
|
|
2432
|
+
if (this.muted) {
|
|
2433
|
+
if (!this.replace) {
|
|
2434
|
+
return true;
|
|
2435
|
+
}
|
|
2436
|
+
if (c.match(/^\u001b/)) {
|
|
2437
|
+
if (c.indexOf(this._prompt) === 0) {
|
|
2438
|
+
c = c.slice(this._prompt.length);
|
|
2439
|
+
c = c.replace(/./g, this.replace);
|
|
2440
|
+
c = this._prompt + c;
|
|
2441
|
+
}
|
|
2442
|
+
this._hadControl = true;
|
|
2443
|
+
return this.emit("data", c);
|
|
2444
|
+
} else {
|
|
2445
|
+
if (this._prompt && this._hadControl && c.indexOf(this._prompt) === 0) {
|
|
2446
|
+
this._hadControl = false;
|
|
2447
|
+
this.emit("data", this._prompt);
|
|
2448
|
+
c = c.slice(this._prompt.length);
|
|
2449
|
+
}
|
|
2450
|
+
c = c.toString().replace(/./g, this.replace);
|
|
2451
|
+
}
|
|
2452
|
+
}
|
|
2453
|
+
this.emit("data", c);
|
|
2454
|
+
}
|
|
2455
|
+
end(c) {
|
|
2456
|
+
if (this.muted) {
|
|
2457
|
+
if (c && this.replace) {
|
|
2458
|
+
c = c.toString().replace(/./g, this.replace);
|
|
2459
|
+
} else {
|
|
2460
|
+
c = null;
|
|
2461
|
+
}
|
|
2462
|
+
}
|
|
2463
|
+
if (c) {
|
|
2464
|
+
this.emit("data", c);
|
|
2465
|
+
}
|
|
2466
|
+
this.emit("end");
|
|
2467
|
+
}
|
|
2468
|
+
destroy(...args) {
|
|
2469
|
+
return this.#proxy("destroy", ...args);
|
|
2470
|
+
}
|
|
2471
|
+
destroySoon(...args) {
|
|
2472
|
+
return this.#proxy("destroySoon", ...args);
|
|
2473
|
+
}
|
|
2474
|
+
close(...args) {
|
|
2475
|
+
return this.#proxy("close", ...args);
|
|
2476
|
+
}
|
|
2477
|
+
};
|
|
2478
|
+
module2.exports = MuteStream;
|
|
2479
|
+
}
|
|
2480
|
+
});
|
|
2481
|
+
|
|
2482
|
+
// node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/cjs/signals.js
|
|
2483
|
+
var require_signals = __commonJS({
|
|
2484
|
+
"node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/cjs/signals.js"(exports2) {
|
|
2485
|
+
"use strict";
|
|
2486
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2487
|
+
exports2.signals = void 0;
|
|
2488
|
+
exports2.signals = [];
|
|
2489
|
+
exports2.signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
2490
|
+
if (process.platform !== "win32") {
|
|
2491
|
+
exports2.signals.push(
|
|
2492
|
+
"SIGALRM",
|
|
2493
|
+
"SIGABRT",
|
|
2494
|
+
"SIGVTALRM",
|
|
2495
|
+
"SIGXCPU",
|
|
2496
|
+
"SIGXFSZ",
|
|
2497
|
+
"SIGUSR2",
|
|
2498
|
+
"SIGTRAP",
|
|
2499
|
+
"SIGSYS",
|
|
2500
|
+
"SIGQUIT",
|
|
2501
|
+
"SIGIOT"
|
|
2502
|
+
// should detect profiler and enable/disable accordingly.
|
|
2503
|
+
// see #21
|
|
2504
|
+
// 'SIGPROF'
|
|
2505
|
+
);
|
|
2506
|
+
}
|
|
2507
|
+
if (process.platform === "linux") {
|
|
2508
|
+
exports2.signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
2509
|
+
}
|
|
2510
|
+
}
|
|
2511
|
+
});
|
|
2512
|
+
|
|
2513
|
+
// node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/cjs/index.js
|
|
2514
|
+
var require_cjs = __commonJS({
|
|
2515
|
+
"node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/cjs/index.js"(exports2) {
|
|
2516
|
+
"use strict";
|
|
2517
|
+
var _a;
|
|
2518
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2519
|
+
exports2.unload = exports2.load = exports2.onExit = exports2.signals = void 0;
|
|
2520
|
+
var signals_js_1 = require_signals();
|
|
2521
|
+
Object.defineProperty(exports2, "signals", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
2522
|
+
return signals_js_1.signals;
|
|
2523
|
+
}, "get") });
|
|
2524
|
+
var processOk = /* @__PURE__ */ __name((process3) => !!process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function", "processOk");
|
|
2525
|
+
var kExitEmitter = Symbol.for("signal-exit emitter");
|
|
2526
|
+
var global = globalThis;
|
|
2527
|
+
var ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
2528
|
+
var Emitter = class {
|
|
2529
|
+
static {
|
|
2530
|
+
__name(this, "Emitter");
|
|
2531
|
+
}
|
|
2532
|
+
emitted = {
|
|
2533
|
+
afterExit: false,
|
|
2534
|
+
exit: false
|
|
2535
|
+
};
|
|
2536
|
+
listeners = {
|
|
2537
|
+
afterExit: [],
|
|
2538
|
+
exit: []
|
|
2539
|
+
};
|
|
2540
|
+
count = 0;
|
|
2541
|
+
id = Math.random();
|
|
2542
|
+
constructor() {
|
|
2543
|
+
if (global[kExitEmitter]) {
|
|
2544
|
+
return global[kExitEmitter];
|
|
2545
|
+
}
|
|
2546
|
+
ObjectDefineProperty(global, kExitEmitter, {
|
|
2547
|
+
value: this,
|
|
2548
|
+
writable: false,
|
|
2549
|
+
enumerable: false,
|
|
2550
|
+
configurable: false
|
|
2551
|
+
});
|
|
2552
|
+
}
|
|
2553
|
+
on(ev, fn) {
|
|
2554
|
+
this.listeners[ev].push(fn);
|
|
2555
|
+
}
|
|
2556
|
+
removeListener(ev, fn) {
|
|
2557
|
+
const list = this.listeners[ev];
|
|
2558
|
+
const i = list.indexOf(fn);
|
|
2559
|
+
if (i === -1) {
|
|
2560
|
+
return;
|
|
2561
|
+
}
|
|
2562
|
+
if (i === 0 && list.length === 1) {
|
|
2563
|
+
list.length = 0;
|
|
2564
|
+
} else {
|
|
2565
|
+
list.splice(i, 1);
|
|
2566
|
+
}
|
|
2567
|
+
}
|
|
2568
|
+
emit(ev, code, signal) {
|
|
2569
|
+
if (this.emitted[ev]) {
|
|
2570
|
+
return false;
|
|
2571
|
+
}
|
|
2572
|
+
this.emitted[ev] = true;
|
|
2573
|
+
let ret = false;
|
|
2574
|
+
for (const fn of this.listeners[ev]) {
|
|
2575
|
+
ret = fn(code, signal) === true || ret;
|
|
2576
|
+
}
|
|
2577
|
+
if (ev === "exit") {
|
|
2578
|
+
ret = this.emit("afterExit", code, signal) || ret;
|
|
2579
|
+
}
|
|
2580
|
+
return ret;
|
|
2581
|
+
}
|
|
2582
|
+
};
|
|
2583
|
+
var SignalExitBase = class {
|
|
2584
|
+
static {
|
|
2585
|
+
__name(this, "SignalExitBase");
|
|
2586
|
+
}
|
|
2587
|
+
};
|
|
2588
|
+
var signalExitWrap = /* @__PURE__ */ __name((handler) => {
|
|
2589
|
+
return {
|
|
2590
|
+
onExit(cb, opts) {
|
|
2591
|
+
return handler.onExit(cb, opts);
|
|
2592
|
+
},
|
|
2593
|
+
load() {
|
|
2594
|
+
return handler.load();
|
|
2595
|
+
},
|
|
2596
|
+
unload() {
|
|
2597
|
+
return handler.unload();
|
|
2598
|
+
}
|
|
2599
|
+
};
|
|
2600
|
+
}, "signalExitWrap");
|
|
2601
|
+
var SignalExitFallback = class extends SignalExitBase {
|
|
2602
|
+
static {
|
|
2603
|
+
__name(this, "SignalExitFallback");
|
|
2604
|
+
}
|
|
2605
|
+
onExit() {
|
|
2606
|
+
return () => {
|
|
2607
|
+
};
|
|
2608
|
+
}
|
|
2609
|
+
load() {
|
|
2610
|
+
}
|
|
2611
|
+
unload() {
|
|
2612
|
+
}
|
|
2613
|
+
};
|
|
2614
|
+
var SignalExit = class extends SignalExitBase {
|
|
2615
|
+
static {
|
|
2616
|
+
__name(this, "SignalExit");
|
|
2617
|
+
}
|
|
2618
|
+
// "SIGHUP" throws an `ENOSYS` error on Windows,
|
|
2619
|
+
// so use a supported signal instead
|
|
2620
|
+
/* c8 ignore start */
|
|
2621
|
+
#hupSig = process2.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
2622
|
+
/* c8 ignore stop */
|
|
2623
|
+
#emitter = new Emitter();
|
|
2624
|
+
#process;
|
|
2625
|
+
#originalProcessEmit;
|
|
2626
|
+
#originalProcessReallyExit;
|
|
2627
|
+
#sigListeners = {};
|
|
2628
|
+
#loaded = false;
|
|
2629
|
+
constructor(process3) {
|
|
2630
|
+
super();
|
|
2631
|
+
this.#process = process3;
|
|
2632
|
+
this.#sigListeners = {};
|
|
2633
|
+
for (const sig of signals_js_1.signals) {
|
|
2634
|
+
this.#sigListeners[sig] = () => {
|
|
2635
|
+
const listeners = this.#process.listeners(sig);
|
|
2636
|
+
let { count } = this.#emitter;
|
|
2637
|
+
const p = process3;
|
|
2638
|
+
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
|
|
2639
|
+
count += p.__signal_exit_emitter__.count;
|
|
2640
|
+
}
|
|
2641
|
+
if (listeners.length === count) {
|
|
2642
|
+
this.unload();
|
|
2643
|
+
const ret = this.#emitter.emit("exit", null, sig);
|
|
2644
|
+
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
2645
|
+
if (!ret)
|
|
2646
|
+
process3.kill(process3.pid, s);
|
|
2647
|
+
}
|
|
2648
|
+
};
|
|
2649
|
+
}
|
|
2650
|
+
this.#originalProcessReallyExit = process3.reallyExit;
|
|
2651
|
+
this.#originalProcessEmit = process3.emit;
|
|
2652
|
+
}
|
|
2653
|
+
onExit(cb, opts) {
|
|
2654
|
+
if (!processOk(this.#process)) {
|
|
2655
|
+
return () => {
|
|
2656
|
+
};
|
|
2657
|
+
}
|
|
2658
|
+
if (this.#loaded === false) {
|
|
2659
|
+
this.load();
|
|
2660
|
+
}
|
|
2661
|
+
const ev = opts?.alwaysLast ? "afterExit" : "exit";
|
|
2662
|
+
this.#emitter.on(ev, cb);
|
|
2663
|
+
return () => {
|
|
2664
|
+
this.#emitter.removeListener(ev, cb);
|
|
2665
|
+
if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) {
|
|
2666
|
+
this.unload();
|
|
2667
|
+
}
|
|
2668
|
+
};
|
|
2669
|
+
}
|
|
2670
|
+
load() {
|
|
2671
|
+
if (this.#loaded) {
|
|
2672
|
+
return;
|
|
2673
|
+
}
|
|
2674
|
+
this.#loaded = true;
|
|
2675
|
+
this.#emitter.count += 1;
|
|
2676
|
+
for (const sig of signals_js_1.signals) {
|
|
2677
|
+
try {
|
|
2678
|
+
const fn = this.#sigListeners[sig];
|
|
2679
|
+
if (fn)
|
|
2680
|
+
this.#process.on(sig, fn);
|
|
2681
|
+
} catch (_) {
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
this.#process.emit = (ev, ...a) => {
|
|
2685
|
+
return this.#processEmit(ev, ...a);
|
|
2686
|
+
};
|
|
2687
|
+
this.#process.reallyExit = (code) => {
|
|
2688
|
+
return this.#processReallyExit(code);
|
|
2689
|
+
};
|
|
2690
|
+
}
|
|
2691
|
+
unload() {
|
|
2692
|
+
if (!this.#loaded) {
|
|
2693
|
+
return;
|
|
2694
|
+
}
|
|
2695
|
+
this.#loaded = false;
|
|
2696
|
+
signals_js_1.signals.forEach((sig) => {
|
|
2697
|
+
const listener = this.#sigListeners[sig];
|
|
2698
|
+
if (!listener) {
|
|
2699
|
+
throw new Error("Listener not defined for signal: " + sig);
|
|
2700
|
+
}
|
|
2701
|
+
try {
|
|
2702
|
+
this.#process.removeListener(sig, listener);
|
|
2703
|
+
} catch (_) {
|
|
2704
|
+
}
|
|
2705
|
+
});
|
|
2706
|
+
this.#process.emit = this.#originalProcessEmit;
|
|
2707
|
+
this.#process.reallyExit = this.#originalProcessReallyExit;
|
|
2708
|
+
this.#emitter.count -= 1;
|
|
2709
|
+
}
|
|
2710
|
+
#processReallyExit(code) {
|
|
2711
|
+
if (!processOk(this.#process)) {
|
|
2712
|
+
return 0;
|
|
2713
|
+
}
|
|
2714
|
+
this.#process.exitCode = code || 0;
|
|
2715
|
+
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
2716
|
+
return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
|
|
2717
|
+
}
|
|
2718
|
+
#processEmit(ev, ...args) {
|
|
2719
|
+
const og = this.#originalProcessEmit;
|
|
2720
|
+
if (ev === "exit" && processOk(this.#process)) {
|
|
2721
|
+
if (typeof args[0] === "number") {
|
|
2722
|
+
this.#process.exitCode = args[0];
|
|
2723
|
+
}
|
|
2724
|
+
const ret = og.call(this.#process, ev, ...args);
|
|
2725
|
+
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
2726
|
+
return ret;
|
|
2727
|
+
} else {
|
|
2728
|
+
return og.call(this.#process, ev, ...args);
|
|
2729
|
+
}
|
|
2730
|
+
}
|
|
2731
|
+
};
|
|
2732
|
+
var process2 = globalThis.process;
|
|
2733
|
+
_a = signalExitWrap(processOk(process2) ? new SignalExit(process2) : new SignalExitFallback()), /**
|
|
2734
|
+
* Called when the process is exiting, whether via signal, explicit
|
|
2735
|
+
* exit, or running out of stuff to do.
|
|
2736
|
+
*
|
|
2737
|
+
* If the global process object is not suitable for instrumentation,
|
|
2738
|
+
* then this will be a no-op.
|
|
2739
|
+
*
|
|
2740
|
+
* Returns a function that may be used to unload signal-exit.
|
|
2741
|
+
*/
|
|
2742
|
+
exports2.onExit = _a.onExit, /**
|
|
2743
|
+
* Load the listeners. Likely you never need to call this, unless
|
|
2744
|
+
* doing a rather deep integration with signal-exit functionality.
|
|
2745
|
+
* Mostly exposed for the benefit of testing.
|
|
2746
|
+
*
|
|
2747
|
+
* @internal
|
|
2748
|
+
*/
|
|
2749
|
+
exports2.load = _a.load, /**
|
|
2750
|
+
* Unload the listeners. Likely you never need to call this, unless
|
|
2751
|
+
* doing a rather deep integration with signal-exit functionality.
|
|
2752
|
+
* Mostly exposed for the benefit of testing.
|
|
2753
|
+
*
|
|
2754
|
+
* @internal
|
|
2755
|
+
*/
|
|
2756
|
+
exports2.unload = _a.unload;
|
|
2757
|
+
}
|
|
2758
|
+
});
|
|
2759
|
+
|
|
2760
|
+
// node_modules/.pnpm/@inquirer+ansi@1.0.1/node_modules/@inquirer/ansi/dist/commonjs/index.js
|
|
2761
|
+
var require_commonjs2 = __commonJS({
|
|
2762
|
+
"node_modules/.pnpm/@inquirer+ansi@1.0.1/node_modules/@inquirer/ansi/dist/commonjs/index.js"(exports2) {
|
|
2763
|
+
"use strict";
|
|
2764
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2765
|
+
exports2.eraseLines = exports2.cursorTo = exports2.cursorDown = exports2.cursorUp = exports2.cursorShow = exports2.cursorHide = exports2.cursorLeft = void 0;
|
|
2766
|
+
var ESC = "\x1B[";
|
|
2767
|
+
exports2.cursorLeft = ESC + "G";
|
|
2768
|
+
exports2.cursorHide = ESC + "?25l";
|
|
2769
|
+
exports2.cursorShow = ESC + "?25h";
|
|
2770
|
+
var cursorUp = /* @__PURE__ */ __name((rows = 1) => rows > 0 ? `${ESC}${rows}A` : "", "cursorUp");
|
|
2771
|
+
exports2.cursorUp = cursorUp;
|
|
2772
|
+
var cursorDown = /* @__PURE__ */ __name((rows = 1) => rows > 0 ? `${ESC}${rows}B` : "", "cursorDown");
|
|
2773
|
+
exports2.cursorDown = cursorDown;
|
|
2774
|
+
var cursorTo = /* @__PURE__ */ __name((x, y) => {
|
|
2775
|
+
if (typeof y === "number" && !Number.isNaN(y)) {
|
|
2776
|
+
return `${ESC}${y + 1};${x + 1}H`;
|
|
2777
|
+
}
|
|
2778
|
+
return `${ESC}${x + 1}G`;
|
|
2779
|
+
}, "cursorTo");
|
|
2780
|
+
exports2.cursorTo = cursorTo;
|
|
2781
|
+
var eraseLine = ESC + "2K";
|
|
2782
|
+
var eraseLines = /* @__PURE__ */ __name((lines) => lines > 0 ? (eraseLine + (0, exports2.cursorUp)(1)).repeat(lines - 1) + eraseLine + exports2.cursorLeft : "", "eraseLines");
|
|
2783
|
+
exports2.eraseLines = eraseLines;
|
|
2784
|
+
}
|
|
2785
|
+
});
|
|
2786
|
+
|
|
2787
|
+
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/screen-manager.js
|
|
2788
|
+
var require_screen_manager = __commonJS({
|
|
2789
|
+
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/screen-manager.js"(exports2) {
|
|
2790
|
+
"use strict";
|
|
2791
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2792
|
+
var node_util_1 = require("node:util");
|
|
2793
|
+
var utils_ts_1 = require_utils();
|
|
2794
|
+
var ansi_1 = require_commonjs2();
|
|
2795
|
+
var height = /* @__PURE__ */ __name((content) => content.split("\n").length, "height");
|
|
2796
|
+
var lastLine = /* @__PURE__ */ __name((content) => content.split("\n").pop() ?? "", "lastLine");
|
|
2797
|
+
var ScreenManager = class {
|
|
2798
|
+
static {
|
|
2799
|
+
__name(this, "ScreenManager");
|
|
2800
|
+
}
|
|
2801
|
+
// These variables are keeping information to allow correct prompt re-rendering
|
|
2802
|
+
height = 0;
|
|
2803
|
+
extraLinesUnderPrompt = 0;
|
|
2804
|
+
cursorPos;
|
|
2805
|
+
rl;
|
|
2806
|
+
constructor(rl) {
|
|
2807
|
+
this.rl = rl;
|
|
2808
|
+
this.cursorPos = rl.getCursorPos();
|
|
2809
|
+
}
|
|
2810
|
+
write(content) {
|
|
2811
|
+
this.rl.output.unmute();
|
|
2812
|
+
this.rl.output.write(content);
|
|
2813
|
+
this.rl.output.mute();
|
|
2814
|
+
}
|
|
2815
|
+
render(content, bottomContent = "") {
|
|
2816
|
+
const promptLine = lastLine(content);
|
|
2817
|
+
const rawPromptLine = (0, node_util_1.stripVTControlCharacters)(promptLine);
|
|
2818
|
+
let prompt = rawPromptLine;
|
|
2819
|
+
if (this.rl.line.length > 0) {
|
|
2820
|
+
prompt = prompt.slice(0, -this.rl.line.length);
|
|
2821
|
+
}
|
|
2822
|
+
this.rl.setPrompt(prompt);
|
|
2823
|
+
this.cursorPos = this.rl.getCursorPos();
|
|
2824
|
+
const width = (0, utils_ts_1.readlineWidth)();
|
|
2825
|
+
content = (0, utils_ts_1.breakLines)(content, width);
|
|
2826
|
+
bottomContent = (0, utils_ts_1.breakLines)(bottomContent, width);
|
|
2827
|
+
if (rawPromptLine.length % width === 0) {
|
|
2828
|
+
content += "\n";
|
|
2829
|
+
}
|
|
2830
|
+
let output = content + (bottomContent ? "\n" + bottomContent : "");
|
|
2831
|
+
const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
|
|
2832
|
+
const bottomContentHeight = promptLineUpDiff + (bottomContent ? height(bottomContent) : 0);
|
|
2833
|
+
if (bottomContentHeight > 0)
|
|
2834
|
+
output += (0, ansi_1.cursorUp)(bottomContentHeight);
|
|
2835
|
+
output += (0, ansi_1.cursorTo)(this.cursorPos.cols);
|
|
2836
|
+
this.write((0, ansi_1.cursorDown)(this.extraLinesUnderPrompt) + (0, ansi_1.eraseLines)(this.height) + output);
|
|
2837
|
+
this.extraLinesUnderPrompt = bottomContentHeight;
|
|
2838
|
+
this.height = height(output);
|
|
2839
|
+
}
|
|
2840
|
+
checkCursorPos() {
|
|
2841
|
+
const cursorPos = this.rl.getCursorPos();
|
|
2842
|
+
if (cursorPos.cols !== this.cursorPos.cols) {
|
|
2843
|
+
this.write((0, ansi_1.cursorTo)(cursorPos.cols));
|
|
2844
|
+
this.cursorPos = cursorPos;
|
|
2845
|
+
}
|
|
2846
|
+
}
|
|
2847
|
+
done({ clearContent }) {
|
|
2848
|
+
this.rl.setPrompt("");
|
|
2849
|
+
let output = (0, ansi_1.cursorDown)(this.extraLinesUnderPrompt);
|
|
2850
|
+
output += clearContent ? (0, ansi_1.eraseLines)(this.height) : "\n";
|
|
2851
|
+
output += ansi_1.cursorShow;
|
|
2852
|
+
this.write(output);
|
|
2853
|
+
this.rl.close();
|
|
2854
|
+
}
|
|
2855
|
+
};
|
|
2856
|
+
exports2.default = ScreenManager;
|
|
2857
|
+
}
|
|
2858
|
+
});
|
|
2859
|
+
|
|
2860
|
+
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/promise-polyfill.js
|
|
2861
|
+
var require_promise_polyfill = __commonJS({
|
|
2862
|
+
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/promise-polyfill.js"(exports2) {
|
|
2863
|
+
"use strict";
|
|
2864
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2865
|
+
exports2.PromisePolyfill = void 0;
|
|
2866
|
+
var PromisePolyfill = class extends Promise {
|
|
2867
|
+
static {
|
|
2868
|
+
__name(this, "PromisePolyfill");
|
|
2869
|
+
}
|
|
2870
|
+
// Available starting from Node 22
|
|
2871
|
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers
|
|
2872
|
+
static withResolver() {
|
|
2873
|
+
let resolve;
|
|
2874
|
+
let reject;
|
|
2875
|
+
const promise = new Promise((res, rej) => {
|
|
2876
|
+
resolve = res;
|
|
2877
|
+
reject = rej;
|
|
2878
|
+
});
|
|
2879
|
+
return { promise, resolve, reject };
|
|
2880
|
+
}
|
|
2881
|
+
};
|
|
2882
|
+
exports2.PromisePolyfill = PromisePolyfill;
|
|
2883
|
+
}
|
|
2884
|
+
});
|
|
2885
|
+
|
|
2886
|
+
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/create-prompt.js
|
|
2887
|
+
var require_create_prompt = __commonJS({
|
|
2888
|
+
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/create-prompt.js"(exports2) {
|
|
2889
|
+
"use strict";
|
|
2890
|
+
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
2891
|
+
if (k2 === void 0) k2 = k;
|
|
2892
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
2893
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
2894
|
+
desc = { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
2895
|
+
return m[k];
|
|
2896
|
+
}, "get") };
|
|
2897
|
+
}
|
|
2898
|
+
Object.defineProperty(o, k2, desc);
|
|
2899
|
+
}) : (function(o, m, k, k2) {
|
|
2900
|
+
if (k2 === void 0) k2 = k;
|
|
2901
|
+
o[k2] = m[k];
|
|
2902
|
+
}));
|
|
2903
|
+
var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
2904
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
2905
|
+
}) : function(o, v) {
|
|
2906
|
+
o["default"] = v;
|
|
2907
|
+
});
|
|
2908
|
+
var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
|
|
2909
|
+
var ownKeys = /* @__PURE__ */ __name(function(o) {
|
|
2910
|
+
ownKeys = Object.getOwnPropertyNames || function(o2) {
|
|
2911
|
+
var ar = [];
|
|
2912
|
+
for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k;
|
|
2913
|
+
return ar;
|
|
2914
|
+
};
|
|
2915
|
+
return ownKeys(o);
|
|
2916
|
+
}, "ownKeys");
|
|
2917
|
+
return function(mod) {
|
|
2918
|
+
if (mod && mod.__esModule) return mod;
|
|
2919
|
+
var result = {};
|
|
2920
|
+
if (mod != null) {
|
|
2921
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
2922
|
+
}
|
|
2923
|
+
__setModuleDefault(result, mod);
|
|
2924
|
+
return result;
|
|
2925
|
+
};
|
|
2926
|
+
})();
|
|
2927
|
+
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
2928
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
2929
|
+
};
|
|
2930
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2931
|
+
exports2.createPrompt = createPrompt;
|
|
2932
|
+
var readline = __importStar(require("node:readline"));
|
|
2933
|
+
var node_async_hooks_1 = require("node:async_hooks");
|
|
2934
|
+
var mute_stream_1 = __importDefault(require_lib());
|
|
2935
|
+
var signal_exit_1 = require_cjs();
|
|
2936
|
+
var screen_manager_ts_1 = __importDefault(require_screen_manager());
|
|
2937
|
+
var promise_polyfill_ts_1 = require_promise_polyfill();
|
|
2938
|
+
var hook_engine_ts_1 = require_hook_engine();
|
|
2939
|
+
var errors_ts_1 = require_errors();
|
|
2940
|
+
function getCallSites() {
|
|
2941
|
+
const _prepareStackTrace = Error.prepareStackTrace;
|
|
2942
|
+
let result = [];
|
|
2943
|
+
try {
|
|
2944
|
+
Error.prepareStackTrace = (_, callSites) => {
|
|
2945
|
+
const callSitesWithoutCurrent = callSites.slice(1);
|
|
2946
|
+
result = callSitesWithoutCurrent;
|
|
2947
|
+
return callSitesWithoutCurrent;
|
|
2948
|
+
};
|
|
2949
|
+
new Error().stack;
|
|
2950
|
+
} catch {
|
|
2951
|
+
return result;
|
|
2952
|
+
}
|
|
2953
|
+
Error.prepareStackTrace = _prepareStackTrace;
|
|
2954
|
+
return result;
|
|
2955
|
+
}
|
|
2956
|
+
__name(getCallSites, "getCallSites");
|
|
2957
|
+
function createPrompt(view) {
|
|
2958
|
+
const callSites = getCallSites();
|
|
2959
|
+
const prompt = /* @__PURE__ */ __name((config, context = {}) => {
|
|
2960
|
+
const { input = process.stdin, signal } = context;
|
|
2961
|
+
const cleanups = /* @__PURE__ */ new Set();
|
|
2962
|
+
const output = new mute_stream_1.default();
|
|
2963
|
+
output.pipe(context.output ?? process.stdout);
|
|
2964
|
+
const rl = readline.createInterface({
|
|
2965
|
+
terminal: true,
|
|
2966
|
+
input,
|
|
2967
|
+
output
|
|
2968
|
+
});
|
|
2969
|
+
const screen = new screen_manager_ts_1.default(rl);
|
|
2970
|
+
const { promise, resolve, reject } = promise_polyfill_ts_1.PromisePolyfill.withResolver();
|
|
2971
|
+
const cancel = /* @__PURE__ */ __name(() => reject(new errors_ts_1.CancelPromptError()), "cancel");
|
|
2972
|
+
if (signal) {
|
|
2973
|
+
const abort = /* @__PURE__ */ __name(() => reject(new errors_ts_1.AbortPromptError({ cause: signal.reason })), "abort");
|
|
2974
|
+
if (signal.aborted) {
|
|
2975
|
+
abort();
|
|
2976
|
+
return Object.assign(promise, { cancel });
|
|
2977
|
+
}
|
|
2978
|
+
signal.addEventListener("abort", abort);
|
|
2979
|
+
cleanups.add(() => signal.removeEventListener("abort", abort));
|
|
2980
|
+
}
|
|
2981
|
+
cleanups.add((0, signal_exit_1.onExit)((code, signal2) => {
|
|
2982
|
+
reject(new errors_ts_1.ExitPromptError(`User force closed the prompt with ${code} ${signal2}`));
|
|
2983
|
+
}));
|
|
2984
|
+
const sigint = /* @__PURE__ */ __name(() => reject(new errors_ts_1.ExitPromptError(`User force closed the prompt with SIGINT`)), "sigint");
|
|
2985
|
+
rl.on("SIGINT", sigint);
|
|
2986
|
+
cleanups.add(() => rl.removeListener("SIGINT", sigint));
|
|
2987
|
+
const checkCursorPos = /* @__PURE__ */ __name(() => screen.checkCursorPos(), "checkCursorPos");
|
|
2988
|
+
rl.input.on("keypress", checkCursorPos);
|
|
2989
|
+
cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
|
|
2990
|
+
return (0, hook_engine_ts_1.withHooks)(rl, (cycle) => {
|
|
2991
|
+
const hooksCleanup = node_async_hooks_1.AsyncResource.bind(() => hook_engine_ts_1.effectScheduler.clearAll());
|
|
2992
|
+
rl.on("close", hooksCleanup);
|
|
2993
|
+
cleanups.add(() => rl.removeListener("close", hooksCleanup));
|
|
2994
|
+
cycle(() => {
|
|
2995
|
+
try {
|
|
2996
|
+
const nextView = view(config, (value) => {
|
|
2997
|
+
setImmediate(() => resolve(value));
|
|
2998
|
+
});
|
|
2999
|
+
if (nextView === void 0) {
|
|
3000
|
+
const callerFilename = callSites[1]?.getFileName();
|
|
3001
|
+
throw new Error(`Prompt functions must return a string.
|
|
3002
|
+
at ${callerFilename}`);
|
|
3003
|
+
}
|
|
3004
|
+
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
|
3005
|
+
screen.render(content, bottomContent);
|
|
3006
|
+
hook_engine_ts_1.effectScheduler.run();
|
|
3007
|
+
} catch (error) {
|
|
3008
|
+
reject(error);
|
|
3009
|
+
}
|
|
3010
|
+
});
|
|
3011
|
+
return Object.assign(promise.then((answer) => {
|
|
3012
|
+
hook_engine_ts_1.effectScheduler.clearAll();
|
|
3013
|
+
return answer;
|
|
3014
|
+
}, (error) => {
|
|
3015
|
+
hook_engine_ts_1.effectScheduler.clearAll();
|
|
3016
|
+
throw error;
|
|
3017
|
+
}).finally(() => {
|
|
3018
|
+
cleanups.forEach((cleanup) => cleanup());
|
|
3019
|
+
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
|
3020
|
+
output.end();
|
|
3021
|
+
}).then(() => promise), { cancel });
|
|
3022
|
+
});
|
|
3023
|
+
}, "prompt");
|
|
3024
|
+
return prompt;
|
|
3025
|
+
}
|
|
3026
|
+
__name(createPrompt, "createPrompt");
|
|
3027
|
+
}
|
|
3028
|
+
});
|
|
3029
|
+
|
|
3030
|
+
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/Separator.js
|
|
3031
|
+
var require_Separator = __commonJS({
|
|
3032
|
+
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/lib/Separator.js"(exports2) {
|
|
3033
|
+
"use strict";
|
|
3034
|
+
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
3035
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
3036
|
+
};
|
|
3037
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
3038
|
+
exports2.Separator = void 0;
|
|
3039
|
+
var yoctocolors_cjs_1 = __importDefault(require_yoctocolors_cjs());
|
|
3040
|
+
var figures_1 = __importDefault(require_commonjs());
|
|
3041
|
+
var Separator = class {
|
|
3042
|
+
static {
|
|
3043
|
+
__name(this, "Separator");
|
|
3044
|
+
}
|
|
3045
|
+
separator = yoctocolors_cjs_1.default.dim(Array.from({ length: 15 }).join(figures_1.default.line));
|
|
3046
|
+
type = "separator";
|
|
3047
|
+
constructor(separator) {
|
|
3048
|
+
if (separator) {
|
|
3049
|
+
this.separator = separator;
|
|
3050
|
+
}
|
|
3051
|
+
}
|
|
3052
|
+
static isSeparator(choice) {
|
|
3053
|
+
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
|
3054
|
+
}
|
|
3055
|
+
};
|
|
3056
|
+
exports2.Separator = Separator;
|
|
3057
|
+
}
|
|
3058
|
+
});
|
|
3059
|
+
|
|
3060
|
+
// node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/index.js
|
|
3061
|
+
var require_commonjs3 = __commonJS({
|
|
3062
|
+
"node_modules/.pnpm/@inquirer+core@10.3.0_@types+node@24.9.2/node_modules/@inquirer/core/dist/commonjs/index.js"(exports2) {
|
|
3063
|
+
"use strict";
|
|
3064
|
+
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
3065
|
+
if (k2 === void 0) k2 = k;
|
|
3066
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
3067
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
3068
|
+
desc = { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
3069
|
+
return m[k];
|
|
3070
|
+
}, "get") };
|
|
3071
|
+
}
|
|
3072
|
+
Object.defineProperty(o, k2, desc);
|
|
3073
|
+
}) : (function(o, m, k, k2) {
|
|
3074
|
+
if (k2 === void 0) k2 = k;
|
|
3075
|
+
o[k2] = m[k];
|
|
3076
|
+
}));
|
|
3077
|
+
var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) {
|
|
3078
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p);
|
|
3079
|
+
};
|
|
3080
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
3081
|
+
exports2.Separator = exports2.createPrompt = exports2.usePagination = exports2.makeTheme = exports2.useKeypress = exports2.useRef = exports2.useMemo = exports2.useEffect = exports2.useState = exports2.usePrefix = exports2.isEnterKey = exports2.isNumberKey = exports2.isTabKey = exports2.isBackspaceKey = exports2.isSpaceKey = exports2.isDownKey = exports2.isUpKey = void 0;
|
|
3082
|
+
var key_ts_1 = require_key();
|
|
3083
|
+
Object.defineProperty(exports2, "isUpKey", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
3084
|
+
return key_ts_1.isUpKey;
|
|
3085
|
+
}, "get") });
|
|
3086
|
+
Object.defineProperty(exports2, "isDownKey", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
3087
|
+
return key_ts_1.isDownKey;
|
|
3088
|
+
}, "get") });
|
|
3089
|
+
Object.defineProperty(exports2, "isSpaceKey", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
3090
|
+
return key_ts_1.isSpaceKey;
|
|
3091
|
+
}, "get") });
|
|
3092
|
+
Object.defineProperty(exports2, "isBackspaceKey", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
3093
|
+
return key_ts_1.isBackspaceKey;
|
|
3094
|
+
}, "get") });
|
|
3095
|
+
Object.defineProperty(exports2, "isTabKey", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
3096
|
+
return key_ts_1.isTabKey;
|
|
3097
|
+
}, "get") });
|
|
3098
|
+
Object.defineProperty(exports2, "isNumberKey", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
3099
|
+
return key_ts_1.isNumberKey;
|
|
3100
|
+
}, "get") });
|
|
3101
|
+
Object.defineProperty(exports2, "isEnterKey", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
3102
|
+
return key_ts_1.isEnterKey;
|
|
3103
|
+
}, "get") });
|
|
3104
|
+
__exportStar(require_errors(), exports2);
|
|
3105
|
+
var use_prefix_ts_1 = require_use_prefix();
|
|
3106
|
+
Object.defineProperty(exports2, "usePrefix", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
3107
|
+
return use_prefix_ts_1.usePrefix;
|
|
3108
|
+
}, "get") });
|
|
3109
|
+
var use_state_ts_1 = require_use_state();
|
|
3110
|
+
Object.defineProperty(exports2, "useState", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
3111
|
+
return use_state_ts_1.useState;
|
|
3112
|
+
}, "get") });
|
|
3113
|
+
var use_effect_ts_1 = require_use_effect();
|
|
3114
|
+
Object.defineProperty(exports2, "useEffect", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
3115
|
+
return use_effect_ts_1.useEffect;
|
|
3116
|
+
}, "get") });
|
|
3117
|
+
var use_memo_ts_1 = require_use_memo();
|
|
3118
|
+
Object.defineProperty(exports2, "useMemo", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
3119
|
+
return use_memo_ts_1.useMemo;
|
|
3120
|
+
}, "get") });
|
|
3121
|
+
var use_ref_ts_1 = require_use_ref();
|
|
3122
|
+
Object.defineProperty(exports2, "useRef", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
3123
|
+
return use_ref_ts_1.useRef;
|
|
3124
|
+
}, "get") });
|
|
3125
|
+
var use_keypress_ts_1 = require_use_keypress();
|
|
3126
|
+
Object.defineProperty(exports2, "useKeypress", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
3127
|
+
return use_keypress_ts_1.useKeypress;
|
|
3128
|
+
}, "get") });
|
|
3129
|
+
var make_theme_ts_1 = require_make_theme();
|
|
3130
|
+
Object.defineProperty(exports2, "makeTheme", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
3131
|
+
return make_theme_ts_1.makeTheme;
|
|
3132
|
+
}, "get") });
|
|
3133
|
+
var use_pagination_ts_1 = require_use_pagination();
|
|
3134
|
+
Object.defineProperty(exports2, "usePagination", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
3135
|
+
return use_pagination_ts_1.usePagination;
|
|
3136
|
+
}, "get") });
|
|
3137
|
+
var create_prompt_ts_1 = require_create_prompt();
|
|
3138
|
+
Object.defineProperty(exports2, "createPrompt", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
3139
|
+
return create_prompt_ts_1.createPrompt;
|
|
3140
|
+
}, "get") });
|
|
3141
|
+
var Separator_ts_1 = require_Separator();
|
|
3142
|
+
Object.defineProperty(exports2, "Separator", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
3143
|
+
return Separator_ts_1.Separator;
|
|
3144
|
+
}, "get") });
|
|
3145
|
+
}
|
|
3146
|
+
});
|
|
3147
|
+
|
|
3148
|
+
// node_modules/.pnpm/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js
|
|
3149
|
+
var require_ansi_escapes = __commonJS({
|
|
3150
|
+
"node_modules/.pnpm/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js"(exports2, module2) {
|
|
3151
|
+
"use strict";
|
|
3152
|
+
var ansiEscapes = module2.exports;
|
|
3153
|
+
module2.module.exports = ansiEscapes;
|
|
3154
|
+
var ESC = "\x1B[";
|
|
3155
|
+
var OSC = "\x1B]";
|
|
3156
|
+
var BEL = "\x07";
|
|
3157
|
+
var SEP = ";";
|
|
3158
|
+
var isTerminalApp = process.env.TERM_PROGRAM === "Apple_Terminal";
|
|
3159
|
+
ansiEscapes.cursorTo = (x, y) => {
|
|
3160
|
+
if (typeof x !== "number") {
|
|
3161
|
+
throw new TypeError("The `x` argument is required");
|
|
3162
|
+
}
|
|
3163
|
+
if (typeof y !== "number") {
|
|
3164
|
+
return ESC + (x + 1) + "G";
|
|
3165
|
+
}
|
|
3166
|
+
return ESC + (y + 1) + ";" + (x + 1) + "H";
|
|
3167
|
+
};
|
|
3168
|
+
ansiEscapes.cursorMove = (x, y) => {
|
|
3169
|
+
if (typeof x !== "number") {
|
|
3170
|
+
throw new TypeError("The `x` argument is required");
|
|
3171
|
+
}
|
|
3172
|
+
let ret = "";
|
|
3173
|
+
if (x < 0) {
|
|
3174
|
+
ret += ESC + -x + "D";
|
|
3175
|
+
} else if (x > 0) {
|
|
3176
|
+
ret += ESC + x + "C";
|
|
3177
|
+
}
|
|
3178
|
+
if (y < 0) {
|
|
3179
|
+
ret += ESC + -y + "A";
|
|
3180
|
+
} else if (y > 0) {
|
|
3181
|
+
ret += ESC + y + "B";
|
|
3182
|
+
}
|
|
3183
|
+
return ret;
|
|
3184
|
+
};
|
|
3185
|
+
ansiEscapes.cursorUp = (count = 1) => ESC + count + "A";
|
|
3186
|
+
ansiEscapes.cursorDown = (count = 1) => ESC + count + "B";
|
|
3187
|
+
ansiEscapes.cursorForward = (count = 1) => ESC + count + "C";
|
|
3188
|
+
ansiEscapes.cursorBackward = (count = 1) => ESC + count + "D";
|
|
3189
|
+
ansiEscapes.cursorLeft = ESC + "G";
|
|
3190
|
+
ansiEscapes.cursorSavePosition = isTerminalApp ? "\x1B7" : ESC + "s";
|
|
3191
|
+
ansiEscapes.cursorRestorePosition = isTerminalApp ? "\x1B8" : ESC + "u";
|
|
3192
|
+
ansiEscapes.cursorGetPosition = ESC + "6n";
|
|
3193
|
+
ansiEscapes.cursorNextLine = ESC + "E";
|
|
3194
|
+
ansiEscapes.cursorPrevLine = ESC + "F";
|
|
3195
|
+
ansiEscapes.cursorHide = ESC + "?25l";
|
|
3196
|
+
ansiEscapes.cursorShow = ESC + "?25h";
|
|
3197
|
+
ansiEscapes.eraseLines = (count) => {
|
|
3198
|
+
let clear = "";
|
|
3199
|
+
for (let i = 0; i < count; i++) {
|
|
3200
|
+
clear += ansiEscapes.eraseLine + (i < count - 1 ? ansiEscapes.cursorUp() : "");
|
|
3201
|
+
}
|
|
3202
|
+
if (count) {
|
|
3203
|
+
clear += ansiEscapes.cursorLeft;
|
|
3204
|
+
}
|
|
3205
|
+
return clear;
|
|
3206
|
+
};
|
|
3207
|
+
ansiEscapes.eraseEndLine = ESC + "K";
|
|
3208
|
+
ansiEscapes.eraseStartLine = ESC + "1K";
|
|
3209
|
+
ansiEscapes.eraseLine = ESC + "2K";
|
|
3210
|
+
ansiEscapes.eraseDown = ESC + "J";
|
|
3211
|
+
ansiEscapes.eraseUp = ESC + "1J";
|
|
3212
|
+
ansiEscapes.eraseScreen = ESC + "2J";
|
|
3213
|
+
ansiEscapes.scrollUp = ESC + "S";
|
|
3214
|
+
ansiEscapes.scrollDown = ESC + "T";
|
|
3215
|
+
ansiEscapes.clearScreen = "\x1Bc";
|
|
3216
|
+
ansiEscapes.clearTerminal = process.platform === "win32" ? `${ansiEscapes.eraseScreen}${ESC}0f` : (
|
|
3217
|
+
// 1. Erases the screen (Only done in case `2` is not supported)
|
|
3218
|
+
// 2. Erases the whole screen including scrollback buffer
|
|
3219
|
+
// 3. Moves cursor to the top-left position
|
|
3220
|
+
// More info: https://www.real-world-systems.com/docs/ANSIcode.html
|
|
3221
|
+
`${ansiEscapes.eraseScreen}${ESC}3J${ESC}H`
|
|
3222
|
+
);
|
|
3223
|
+
ansiEscapes.beep = BEL;
|
|
3224
|
+
ansiEscapes.link = (text, url) => {
|
|
3225
|
+
return [
|
|
3226
|
+
OSC,
|
|
3227
|
+
"8",
|
|
3228
|
+
SEP,
|
|
3229
|
+
SEP,
|
|
3230
|
+
url,
|
|
3231
|
+
BEL,
|
|
3232
|
+
text,
|
|
3233
|
+
OSC,
|
|
3234
|
+
"8",
|
|
3235
|
+
SEP,
|
|
3236
|
+
SEP,
|
|
3237
|
+
BEL
|
|
3238
|
+
].join("");
|
|
3239
|
+
};
|
|
3240
|
+
ansiEscapes.image = (buffer, options = {}) => {
|
|
3241
|
+
let ret = `${OSC}1337;File=inline=1`;
|
|
3242
|
+
if (options.width) {
|
|
3243
|
+
ret += `;width=${options.width}`;
|
|
3244
|
+
}
|
|
3245
|
+
if (options.height) {
|
|
3246
|
+
ret += `;height=${options.height}`;
|
|
3247
|
+
}
|
|
3248
|
+
if (options.preserveAspectRatio === false) {
|
|
3249
|
+
ret += ";preserveAspectRatio=0";
|
|
3250
|
+
}
|
|
3251
|
+
return ret + ":" + buffer.toString("base64") + BEL;
|
|
3252
|
+
};
|
|
3253
|
+
ansiEscapes.iTerm = {
|
|
3254
|
+
setCwd: /* @__PURE__ */ __name((cwd = process.cwd()) => `${OSC}50;CurrentDir=${cwd}${BEL}`, "setCwd"),
|
|
3255
|
+
annotation: /* @__PURE__ */ __name((message, options = {}) => {
|
|
3256
|
+
let ret = `${OSC}1337;`;
|
|
3257
|
+
const hasX = typeof options.x !== "undefined";
|
|
3258
|
+
const hasY = typeof options.y !== "undefined";
|
|
3259
|
+
if ((hasX || hasY) && !(hasX && hasY && typeof options.length !== "undefined")) {
|
|
3260
|
+
throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");
|
|
3261
|
+
}
|
|
3262
|
+
message = message.replace(/\|/g, "");
|
|
3263
|
+
ret += options.isHidden ? "AddHiddenAnnotation=" : "AddAnnotation=";
|
|
3264
|
+
if (options.length > 0) {
|
|
3265
|
+
ret += (hasX ? [message, options.length, options.x, options.y] : [options.length, message]).join("|");
|
|
3266
|
+
} else {
|
|
3267
|
+
ret += message;
|
|
3268
|
+
}
|
|
3269
|
+
return ret + BEL;
|
|
3270
|
+
}, "annotation")
|
|
3271
|
+
};
|
|
3272
|
+
}
|
|
3273
|
+
});
|
|
3274
|
+
|
|
3275
|
+
// node_modules/.pnpm/@inquirer+password@4.0.18_@types+node@24.9.2/node_modules/@inquirer/password/dist/commonjs/index.js
|
|
3276
|
+
var require_commonjs4 = __commonJS({
|
|
3277
|
+
"node_modules/.pnpm/@inquirer+password@4.0.18_@types+node@24.9.2/node_modules/@inquirer/password/dist/commonjs/index.js"(exports2) {
|
|
3278
|
+
"use strict";
|
|
3279
|
+
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
3280
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
3281
|
+
};
|
|
3282
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
3283
|
+
var core_1 = require_commonjs3();
|
|
3284
|
+
var ansi_escapes_1 = __importDefault(require_ansi_escapes());
|
|
3285
|
+
exports2.default = (0, core_1.createPrompt)((config, done) => {
|
|
3286
|
+
const { validate = /* @__PURE__ */ __name(() => true, "validate") } = config;
|
|
3287
|
+
const theme = (0, core_1.makeTheme)(config.theme);
|
|
3288
|
+
const [status, setStatus] = (0, core_1.useState)("idle");
|
|
3289
|
+
const [errorMsg, setError] = (0, core_1.useState)();
|
|
3290
|
+
const [value, setValue] = (0, core_1.useState)("");
|
|
3291
|
+
const prefix = (0, core_1.usePrefix)({ status, theme });
|
|
3292
|
+
(0, core_1.useKeypress)(async (key, rl) => {
|
|
3293
|
+
if (status !== "idle") {
|
|
3294
|
+
return;
|
|
3295
|
+
}
|
|
3296
|
+
if ((0, core_1.isEnterKey)(key)) {
|
|
3297
|
+
const answer = value;
|
|
3298
|
+
setStatus("loading");
|
|
3299
|
+
const isValid = await validate(answer);
|
|
3300
|
+
if (isValid === true) {
|
|
3301
|
+
setValue(answer);
|
|
3302
|
+
setStatus("done");
|
|
3303
|
+
done(answer);
|
|
3304
|
+
} else {
|
|
3305
|
+
rl.write(value);
|
|
3306
|
+
setError(isValid || "You must provide a valid value");
|
|
3307
|
+
setStatus("idle");
|
|
3308
|
+
}
|
|
3309
|
+
} else {
|
|
3310
|
+
setValue(rl.line);
|
|
3311
|
+
setError(void 0);
|
|
3312
|
+
}
|
|
3313
|
+
});
|
|
3314
|
+
const message = theme.style.message(config.message, status);
|
|
3315
|
+
let formattedValue = "";
|
|
3316
|
+
let helpTip;
|
|
3317
|
+
if (config.mask) {
|
|
3318
|
+
const maskChar = typeof config.mask === "string" ? config.mask : "*";
|
|
3319
|
+
formattedValue = maskChar.repeat(value.length);
|
|
3320
|
+
} else if (status !== "done") {
|
|
3321
|
+
helpTip = `${theme.style.help("[input is masked]")}${ansi_escapes_1.default.cursorHide}`;
|
|
3322
|
+
}
|
|
3323
|
+
if (status === "done") {
|
|
3324
|
+
formattedValue = theme.style.answer(formattedValue);
|
|
3325
|
+
}
|
|
3326
|
+
let error = "";
|
|
3327
|
+
if (errorMsg) {
|
|
3328
|
+
error = theme.style.error(errorMsg);
|
|
3329
|
+
}
|
|
3330
|
+
return [[prefix, message, config.mask ? formattedValue : helpTip].join(" "), error];
|
|
3331
|
+
});
|
|
3332
|
+
}
|
|
3333
|
+
});
|
|
3334
|
+
|
|
3335
|
+
// src/external/@inquirer/password.js
|
|
3336
|
+
module.exports = require_commonjs4();
|