npm-check-updates
Version:
Find newer versions of dependencies than what your package.json allows
48 lines • 1.12 MB
JavaScript
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Te=require("node:path"),rx=require("node:readline"),qt=require("node:events"),cS=require("node:child_process"),at=require("node:fs"),Tt=require("node:os"),br=require("node:util"),He=require("node:fs/promises"),pt=require("node:url"),no=require("node:http"),Cp=require("node:https"),lS=require("node:assert"),Rp=require("node:buffer"),er=require("node:stream"),Dn=require("node:string_decoder"),fS=require("node:zlib"),hS=require("node:module"),xp=require("node:dns"),dS=require("node:crypto"),bi=require("node:net"),so=require("node:tls"),pS=require("node:tty"),ix=require("node:timers/promises"),nx=require("node:querystring"),sx=require("node:stream/consumers");var Nt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ox(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var r=e.default;if(typeof r=="function"){var o=function n(){return this instanceof n?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};o.prototype=r.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),o}var Uo={},Ho,z0;function tr(){if(z0)return Ho;z0=1;let e,r,o,n,a=!0;typeof process<"u"&&({FORCE_COLOR:e,NODE_DISABLE_COLORS:r,NO_COLOR:o,TERM:n}=process.env||{},a=process.stdout&&process.stdout.isTTY);const t={enabled:!r&&o==null&&n!=="dumb"&&(e!=null&&e!=="0"||a),reset:u(0,0),bold:u(1,22),dim:u(2,22),italic:u(3,23),underline:u(4,24),inverse:u(7,27),hidden:u(8,28),strikethrough:u(9,29),black:u(30,39),red:u(31,39),green:u(32,39),yellow:u(33,39),blue:u(34,39),magenta:u(35,39),cyan:u(36,39),white:u(37,39),gray:u(90,39),grey:u(90,39),bgBlack:u(40,49),bgRed:u(41,49),bgGreen:u(42,49),bgYellow:u(43,49),bgBlue:u(44,49),bgMagenta:u(45,49),bgCyan:u(46,49),bgWhite:u(47,49)};function s(f,l){let d=0,h,p="",m="";for(;d<f.length;d++)h=f[d],p+=h.open,m+=h.close,~l.indexOf(h.close)&&(l=l.replace(h.rgx,h.close+h.open));return p+l+m}function c(f,l){let d={has:f,keys:l};return d.reset=t.reset.bind(d),d.bold=t.bold.bind(d),d.dim=t.dim.bind(d),d.italic=t.italic.bind(d),d.underline=t.underline.bind(d),d.inverse=t.inverse.bind(d),d.hidden=t.hidden.bind(d),d.strikethrough=t.strikethrough.bind(d),d.black=t.black.bind(d),d.red=t.red.bind(d),d.green=t.green.bind(d),d.yellow=t.yellow.bind(d),d.blue=t.blue.bind(d),d.magenta=t.magenta.bind(d),d.cyan=t.cyan.bind(d),d.white=t.white.bind(d),d.gray=t.gray.bind(d),d.grey=t.grey.bind(d),d.bgBlack=t.bgBlack.bind(d),d.bgRed=t.bgRed.bind(d),d.bgGreen=t.bgGreen.bind(d),d.bgYellow=t.bgYellow.bind(d),d.bgBlue=t.bgBlue.bind(d),d.bgMagenta=t.bgMagenta.bind(d),d.bgCyan=t.bgCyan.bind(d),d.bgWhite=t.bgWhite.bind(d),d}function u(f,l){let d={open:`\x1B[${f}m`,close:`\x1B[${l}m`,rgx:new RegExp(`\\x1b\\[${l}m`,"g")};return function(h){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(f)||(this.has.push(f),this.keys.push(d)),h===void 0?this:t.enabled?s(this.keys,h+""):h+""):h===void 0?c([f],[d]):t.enabled?s([d],h+""):h+""}}return Ho=t,Ho}var Go,V0;function ax(){return V0||(V0=1,Go=(e,r)=>{if(!(e.meta&&e.name!=="escape")){if(e.ctrl){if(e.name==="a")return"first";if(e.name==="c"||e.name==="d")return"abort";if(e.name==="e")return"last";if(e.name==="g")return"reset"}if(r){if(e.name==="j")return"down";if(e.name==="k")return"up"}return e.name==="return"||e.name==="enter"?"submit":e.name==="backspace"?"delete":e.name==="delete"?"deleteForward":e.name==="abort"?"abort":e.name==="escape"?"exit":e.name==="tab"?"next":e.name==="pagedown"?"nextPage":e.name==="pageup"?"prevPage":e.name==="home"?"home":e.name==="end"?"end":e.name==="up"?"up":e.name==="down"?"down":e.name==="right"?"right":e.name==="left"?"left":!1}}),Go}var Wo,Y0;function Fp(){return Y0||(Y0=1,Wo=e=>{const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),o=new RegExp(r,"g");return typeof e=="string"?e.replace(o,""):e}),Wo}var zo,K0;function rr(){if(K0)return zo;K0=1;const e="\x1B",r=`${e}[`,o="\x07",n={to(s,c){return c?`${r}${c+1};${s+1}H`:`${r}${s+1}G`},move(s,c){let u="";return s<0?u+=`${r}${-s}D`:s>0&&(u+=`${r}${s}C`),c<0?u+=`${r}${-c}A`:c>0&&(u+=`${r}${c}B`),u},up:(s=1)=>`${r}${s}A`,down:(s=1)=>`${r}${s}B`,forward:(s=1)=>`${r}${s}C`,backward:(s=1)=>`${r}${s}D`,nextLine:(s=1)=>`${r}E`.repeat(s),prevLine:(s=1)=>`${r}F`.repeat(s),left:`${r}G`,hide:`${r}?25l`,show:`${r}?25h`,save:`${e}7`,restore:`${e}8`},a={up:(s=1)=>`${r}S`.repeat(s),down:(s=1)=>`${r}T`.repeat(s)},t={screen:`${r}2J`,up:(s=1)=>`${r}1J`.repeat(s),down:(s=1)=>`${r}J`.repeat(s),line:`${r}2K`,lineEnd:`${r}K`,lineStart:`${r}1K`,lines(s){let c="";for(let u=0;u<s;u++)c+=this.line+(u<s-1?n.up():"");return s&&(c+=n.left),c}};return zo={cursor:n,scroll:a,erase:t,beep:o},zo}var Vo,Z0;function ux(){if(Z0)return Vo;Z0=1;const e=Fp(),{erase:r,cursor:o}=rr(),n=a=>[...e(a)].length;return Vo=function(a,t){if(!t)return r.line+o.to(0);let s=0;const c=a.split(/\r?\n/);for(let u of c)s+=1+Math.floor(Math.max(n(u)-1,0)/t);return r.lines(s)},Vo}var Yo,X0;function gS(){if(X0)return Yo;X0=1;const e={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"},r={arrowUp:e.arrowUp,arrowDown:e.arrowDown,arrowLeft:e.arrowLeft,arrowRight:e.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};return Yo=process.platform==="win32"?r:e,Yo}var Ko,J0;function cx(){if(J0)return Ko;J0=1;const e=tr(),r=gS(),o=Object.freeze({password:{scale:1,render:u=>"*".repeat(u.length)},emoji:{scale:2,render:u=>"😃".repeat(u.length)},invisible:{scale:0,render:u=>""},default:{scale:1,render:u=>`${u}`}}),n=u=>o[u]||o.default,a=Object.freeze({aborted:e.red(r.cross),done:e.green(r.tick),exited:e.yellow(r.cross),default:e.cyan("?")});return Ko={styles:o,render:n,symbols:a,symbol:(u,f,l)=>f?a.aborted:l?a.exited:u?a.done:a.default,delimiter:u=>e.gray(u?r.ellipsis:r.pointerSmall),item:(u,f)=>e.gray(u?f?r.pointerSmall:"+":r.line)},Ko}var Zo,Q0;function lx(){if(Q0)return Zo;Q0=1;const e=Fp();return Zo=function(r,o){let n=String(e(r)||"").split(/\r?\n/);return o?n.map(a=>Math.ceil(a.length/o)).reduce((a,t)=>a+t):n.length},Zo}var Xo,eg;function fx(){return eg||(eg=1,Xo=(e,r={})=>{const o=Number.isSafeInteger(parseInt(r.margin))?new Array(parseInt(r.margin)).fill(" ").join(""):r.margin||"",n=r.width;return(e||"").split(/\r?\n/g).map(a=>a.split(/\s+/g).reduce((t,s)=>(s.length+o.length>=n||t[t.length-1].length+s.length+1<n?t[t.length-1]+=` ${s}`:t.push(`${o}${s}`),t),[o]).join(`
`)).join(`
`)}),Xo}var Jo,tg;function hx(){return tg||(tg=1,Jo=(e,r,o)=>{o=o||r;let n=Math.min(r-o,e-Math.floor(o/2));n<0&&(n=0);let a=Math.min(n+o,r);return{startIndex:n,endIndex:a}}),Jo}var Qo,rg;function ar(){return rg||(rg=1,Qo={action:ax(),clear:ux(),style:cx(),strip:Fp(),figures:gS(),lines:lx(),wrap:fx(),entriesToDisplay:hx()}),Qo}var ea,ig;function Tr(){if(ig)return ea;ig=1;const e=rx,{action:r}=ar(),o=qt,{beep:n,cursor:a}=rr(),t=tr();class s extends o{constructor(u={}){super(),this.firstRender=!0,this.in=u.stdin||process.stdin,this.out=u.stdout||process.stdout,this.onRender=(u.onRender||(()=>{})).bind(this);const f=e.createInterface({input:this.in,escapeCodeTimeout:50});e.emitKeypressEvents(this.in,f),this.in.isTTY&&this.in.setRawMode(!0);const l=(d,h)=>{let p=r(h,this.isSelect);p===!1?this._&&this._(d,h):typeof this[p]=="function"?this[p](h):this.bell()};this.close=()=>{this.out.write(a.show),this.in.removeListener("keypress",l),this.in.isTTY&&this.in.setRawMode(!1),f.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",l)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(n)}render(){this.onRender(t),this.firstRender&&(this.firstRender=!1)}}return ea=s,ea}var ta,ng;function dx(){if(ng)return ta;ng=1;const e=tr(),r=Tr(),{erase:o,cursor:n}=rr(),{style:a,clear:t,lines:s,figures:c}=ar();class u extends r{constructor(l={}){super(l),this.transform=a.render(l.style),this.scale=this.transform.scale,this.msg=l.message,this.initial=l.initial||"",this.validator=l.validate||(()=>!0),this.value="",this.errorMsg=l.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=t("",this.out.columns),this.render()}set value(l){!l&&this.initial?(this.placeholder=!0,this.rendered=e.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(l)),this._value=l,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
`),this.close()}async validate(){let l=await this.validator(this.value);typeof l=="string"&&(this.errorMsg=l,l=!1),this.error=!l}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=!0,this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
`),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(l){this.placeholder||(this.cursor=this.cursor+l,this.cursorOffset+=l)}_(l,d){let h=this.value.slice(0,this.cursor),p=this.value.slice(this.cursor);this.value=`${h}${l}${p}`,this.red=!1,this.cursor=this.placeholder?0:h.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let l=this.value.slice(0,this.cursor-1),d=this.value.slice(this.cursor);this.value=`${l}${d}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let l=this.value.slice(0,this.cursor),d=this.value.slice(this.cursor+1);this.value=`${l}${d}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(n.down(s(this.outputError,this.out.columns)-1)+t(this.outputError,this.out.columns)),this.out.write(t(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[a.symbol(this.done,this.aborted),e.bold(this.msg),a.delimiter(this.done),this.red?e.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
`).reduce((l,d,h)=>l+`
${h?" ":c.pointerSmall} ${e.red().italic(d)}`,"")),this.out.write(o.line+n.to(0)+this.outputText+n.save+this.outputError+n.restore+n.move(this.cursorOffset,0)))}}return ta=u,ta}var ra,sg;function px(){if(sg)return ra;sg=1;const e=tr(),r=Tr(),{style:o,clear:n,figures:a,wrap:t,entriesToDisplay:s}=ar(),{cursor:c}=rr();class u extends r{constructor(l={}){super(l),this.isSelect=!0,this.msg=l.message,this.hint=l.hint||"- Use arrow-keys. Return to submit.",this.warn=l.warn||"- This option is disabled",this.cursor=l.initial||0,this.choices=l.choices.map((d,h)=>(typeof d=="string"&&(d={title:d,value:h}),{title:d&&(d.title||d.value||d),value:d&&(d.value===void 0?h:d.value),description:d&&d.description,selected:d&&d.selected,disabled:d&&d.disabled})),this.optionsPerPage=l.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=n("",this.out.columns),this.render()}moveCursor(l){this.cursor=l,this.value=this.choices[l].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
`),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
`),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(l,d){if(l===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(c.hide):this.out.write(n(this.outputText,this.out.columns)),super.render();let{startIndex:l,endIndex:d}=s(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[o.symbol(this.done,this.aborted),e.bold(this.msg),o.delimiter(!1),this.done?this.selection.title:this.selection.disabled?e.yellow(this.warn):e.gray(this.hint)].join(" "),!this.done){this.outputText+=`
`;for(let h=l;h<d;h++){let p,m,g="",y=this.choices[h];h===l&&l>0?m=a.arrowUp:h===d-1&&d<this.choices.length?m=a.arrowDown:m=" ",y.disabled?(p=this.cursor===h?e.gray().underline(y.title):e.strikethrough().gray(y.title),m=(this.cursor===h?e.bold().gray(a.pointer)+" ":" ")+m):(p=this.cursor===h?e.cyan().underline(y.title):y.title,m=(this.cursor===h?e.cyan(a.pointer)+" ":" ")+m,y.description&&this.cursor===h&&(g=` - ${y.description}`,(m.length+p.length+g.length>=this.out.columns||y.description.split(/\r?\n/).length>1)&&(g=`
`+t(y.description,{margin:3,width:this.out.columns})))),this.outputText+=`${m} ${p}${e.gray(g)}
`}}this.out.write(this.outputText)}}return ra=u,ra}var ia,og;function gx(){if(og)return ia;og=1;const e=tr(),r=Tr(),{style:o,clear:n}=ar(),{cursor:a,erase:t}=rr();class s extends r{constructor(u={}){super(u),this.msg=u.message,this.value=!!u.initial,this.active=u.active||"on",this.inactive=u.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
`),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
`),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(u,f){if(u===" ")this.value=!this.value;else if(u==="1")this.value=!0;else if(u==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(a.hide):this.out.write(n(this.outputText,this.out.columns)),super.render(),this.outputText=[o.symbol(this.done,this.aborted),e.bold(this.msg),o.delimiter(this.done),this.value?this.inactive:e.cyan().underline(this.inactive),e.gray("/"),this.value?e.cyan().underline(this.active):this.active].join(" "),this.out.write(t.line+a.to(0)+this.outputText))}}return ia=s,ia}var na,ag;function Er(){if(ag)return na;ag=1;class e{constructor({token:o,date:n,parts:a,locales:t}){this.token=o,this.date=n||new Date,this.parts=a||[this],this.locales=t||{}}up(){}down(){}next(){const o=this.parts.indexOf(this);return this.parts.find((n,a)=>a>o&&n instanceof e)}setTo(o){}prev(){let o=[].concat(this.parts).reverse();const n=o.indexOf(this);return o.find((a,t)=>t>n&&a instanceof e)}toString(){return String(this.date)}}return na=e,na}var sa,ug;function mx(){if(ug)return sa;ug=1;const e=Er();class r extends e{constructor(n={}){super(n)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let n=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?n.toUpperCase():n}}return sa=r,sa}var oa,cg;function yx(){if(cg)return oa;cg=1;const e=Er(),r=n=>(n=n%10,n===1?"st":n===2?"nd":n===3?"rd":"th");class o extends e{constructor(a={}){super(a)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(a){this.date.setDate(parseInt(a.substr(-2)))}toString(){let a=this.date.getDate(),t=this.date.getDay();return this.token==="DD"?String(a).padStart(2,"0"):this.token==="Do"?a+r(a):this.token==="d"?t+1:this.token==="ddd"?this.locales.weekdaysShort[t]:this.token==="dddd"?this.locales.weekdays[t]:a}}return oa=o,oa}var aa,lg;function vx(){if(lg)return aa;lg=1;const e=Er();class r extends e{constructor(n={}){super(n)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(n){this.date.setHours(parseInt(n.substr(-2)))}toString(){let n=this.date.getHours();return/h/.test(this.token)&&(n=n%12||12),this.token.length>1?String(n).padStart(2,"0"):n}}return aa=r,aa}var ua,fg;function Dx(){if(fg)return ua;fg=1;const e=Er();class r extends e{constructor(n={}){super(n)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(n){this.date.setMilliseconds(parseInt(n.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}return ua=r,ua}var ca,hg;function bx(){if(hg)return ca;hg=1;const e=Er();class r extends e{constructor(n={}){super(n)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(n){this.date.setMinutes(parseInt(n.substr(-2)))}toString(){let n=this.date.getMinutes();return this.token.length>1?String(n).padStart(2,"0"):n}}return ca=r,ca}var la,dg;function Ex(){if(dg)return la;dg=1;const e=Er();class r extends e{constructor(n={}){super(n)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(n){n=parseInt(n.substr(-2))-1,this.date.setMonth(n<0?0:n)}toString(){let n=this.date.getMonth(),a=this.token.length;return a===2?String(n+1).padStart(2,"0"):a===3?this.locales.monthsShort[n]:a===4?this.locales.months[n]:String(n+1)}}return la=r,la}var fa,pg;function wx(){if(pg)return fa;pg=1;const e=Er();class r extends e{constructor(n={}){super(n)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(n){this.date.setSeconds(parseInt(n.substr(-2)))}toString(){let n=this.date.getSeconds();return this.token.length>1?String(n).padStart(2,"0"):n}}return fa=r,fa}var ha,gg;function _x(){if(gg)return ha;gg=1;const e=Er();class r extends e{constructor(n={}){super(n)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(n){this.date.setFullYear(n.substr(-4))}toString(){let n=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?n.substr(-2):n}}return ha=r,ha}var da,mg;function Sx(){return mg||(mg=1,da={DatePart:Er(),Meridiem:mx(),Day:yx(),Hours:vx(),Milliseconds:Dx(),Minutes:bx(),Month:Ex(),Seconds:wx(),Year:_x()}),da}var pa,yg;function Ax(){if(yg)return pa;yg=1;const e=tr(),r=Tr(),{style:o,clear:n,figures:a}=ar(),{erase:t,cursor:s}=rr(),{DatePart:c,Meridiem:u,Day:f,Hours:l,Milliseconds:d,Minutes:h,Month:p,Seconds:m,Year:g}=Sx(),y=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,v={1:({token:b})=>b.replace(/\\(.)/g,"$1"),2:b=>new f(b),3:b=>new p(b),4:b=>new g(b),5:b=>new u(b),6:b=>new l(b),7:b=>new h(b),8:b=>new m(b),9:b=>new d(b)},w={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class D extends r{constructor(E={}){super(E),this.msg=E.message,this.cursor=0,this.typed="",this.locales=Object.assign(w,E.locales),this._date=E.initial||new Date,this.errorMsg=E.error||"Please Enter A Valid Value",this.validator=E.validate||(()=>!0),this.mask=E.mask||"YYYY-MM-DD HH:mm:ss",this.clear=n("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(E){E&&this._date.setTime(E.getTime())}set mask(E){let A;for(this.parts=[];A=y.exec(E);){let F=A.shift(),T=A.findIndex(k=>k!=null);this.parts.push(T in v?v[T]({token:A[T]||F,date:this.date,parts:this.parts,locales:this.locales}):A[T]||F)}let C=this.parts.reduce((F,T)=>(typeof T=="string"&&typeof F[F.length-1]=="string"?F[F.length-1]+=T:F.push(T),F),[]);this.parts.splice(0),this.parts.push(...C),this.reset()}moveCursor(E){this.typed="",this.cursor=E,this.fire()}reset(){this.moveCursor(this.parts.findIndex(E=>E instanceof c)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
`),this.close()}async validate(){let E=await this.validator(this.value);typeof E=="string"&&(this.errorMsg=E,E=!1),this.error=!E}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
`),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let E=this.parts[this.cursor].prev();if(E==null)return this.bell();this.moveCursor(this.parts.indexOf(E)),this.render()}right(){let E=this.parts[this.cursor].next();if(E==null)return this.bell();this.moveCursor(this.parts.indexOf(E)),this.render()}next(){let E=this.parts[this.cursor].next();this.moveCursor(E?this.parts.indexOf(E):this.parts.findIndex(A=>A instanceof c)),this.render()}_(E){/\d/.test(E)&&(this.typed+=E,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(s.hide):this.out.write(n(this.outputText,this.out.columns)),super.render(),this.outputText=[o.symbol(this.done,this.aborted),e.bold(this.msg),o.delimiter(!1),this.parts.reduce((E,A,C)=>E.concat(C===this.cursor&&!this.done?e.cyan().underline(A.toString()):A),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
`).reduce((E,A,C)=>E+`
${C?" ":a.pointerSmall} ${e.red().italic(A)}`,"")),this.out.write(t.line+s.to(0)+this.outputText))}}return pa=D,pa}var ga,vg;function Cx(){if(vg)return ga;vg=1;const e=tr(),r=Tr(),{cursor:o,erase:n}=rr(),{style:a,figures:t,clear:s,lines:c}=ar(),u=/[0-9]/,f=h=>h!==void 0,l=(h,p)=>{let m=Math.pow(10,p);return Math.round(h*m)/m};class d extends r{constructor(p={}){super(p),this.transform=a.render(p.style),this.msg=p.message,this.initial=f(p.initial)?p.initial:"",this.float=!!p.float,this.round=p.round||2,this.inc=p.increment||1,this.min=f(p.min)?p.min:-1/0,this.max=f(p.max)?p.max:1/0,this.errorMsg=p.error||"Please Enter A Valid Value",this.validator=p.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(p){!p&&p!==0?(this.placeholder=!0,this.rendered=e.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${l(p,this.round)}`),this._value=l(p,this.round)),this.fire()}get value(){return this._value}parse(p){return this.float?parseFloat(p):parseInt(p)}valid(p){return p==="-"||p==="."&&this.float||u.test(p)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let p=this.value;this.value=p!==""?p:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
`),this.close()}async validate(){let p=await this.validator(this.value);typeof p=="string"&&(this.errorMsg=p,p=!1),this.error=!p}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let p=this.value;this.value=p!==""?p:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write(`
`),this.close()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let p=this.value.toString();if(p.length===0)return this.bell();this.value=this.parse(p=p.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(p,m){if(!this.valid(p))return this.bell();const g=Date.now();if(g-this.lastHit>1e3&&(this.typed=""),this.typed+=p,this.lastHit=g,this.color="cyan",p===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(o.down(c(this.outputError,this.out.columns)-1)+s(this.outputError,this.out.columns)),this.out.write(s(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[a.symbol(this.done,this.aborted),e.bold(this.msg),a.delimiter(this.done),!this.done||!this.done&&!this.placeholder?e[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
`).reduce((p,m,g)=>p+`
${g?" ":t.pointerSmall} ${e.red().italic(m)}`,"")),this.out.write(n.line+o.to(0)+this.outputText+o.save+this.outputError+o.restore))}}return ga=d,ga}var ma,Dg;function mS(){if(Dg)return ma;Dg=1;const e=tr(),{cursor:r}=rr(),o=Tr(),{clear:n,figures:a,style:t,wrap:s,entriesToDisplay:c}=ar();class u extends o{constructor(l={}){super(l),this.isSelect=!0,this.msg=l.message,this.cursorStart=l.choices.findIndex(d=>!d.heading),this.cursor=l.cursor||this.cursorStart,this.scrollIndex=l.cursor||0,this.hint=l.hint||"",this.warn=l.warn||"- This option is disabled -",this.minSelected=l.min,this.showMinError=!1,this.maxChoices=l.max,this.instructions=l.instructions,this.optionsPerPage=l.optionsPerPage||10,this.value=l.choices.map((d,h)=>(typeof d=="string"&&(d={title:d,value:h}),{title:d&&(d.title||d.value||d),description:d&&d.description,value:d&&(d.value===void 0?h:d.value),selected:d&&d.selected,disabled:d&&d.disabled,heading:d&&d.heading})),this.clear=n("",this.out.columns),l.overrideRender||this.render()}reset(){this.value.map(l=>!l.selected),this.cursor=this.cursorStart,this.fire(),this.render()}selected(){return this.value.filter(l=>l.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
`),this.close()}submit(){const l=this.value.filter(d=>d.selected);this.minSelected&&l.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
`),this.close())}first(){this.cursor=this.cursorStart,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.value[this.cursor].heading&&this.next(),this.render()}up(){this.cursor===this.cursorStart?this.cursor=this.value.length-1:this.cursor--,this.value[this.cursor].heading&&this.up(),this.render()}down(){this.cursor===this.value.length-1?this.cursor=this.cursorStart:this.cursor++,this.value[this.cursor].heading&&this.down(),this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(l=>l.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const l=this.value[this.cursor];if(l.selected)l.selected=!1,this.render();else{if(l.disabled||this.value.filter(d=>d.selected).length>=this.maxChoices)return this.bell();l.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();const l=!this.value[this.cursor].selected;this.value.filter(d=>!d.disabled&&!d.heading).forEach(d=>d.selected=l),this.render()}_(l,d){if(l===" ")this.handleSpaceToggle();else if(l==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
Instructions:
${a.arrowUp}/${a.arrowDown}: Highlight option
${a.arrowLeft}/${a.arrowRight}/[space]: Toggle selection
`+(this.maxChoices===void 0?` a: Toggle all
`:"")+" enter/return: Complete answer":""}renderOption(l,d,h,p){const m=(l===h?"❯ ":" ")+(d.selected?e.green(a.radioOn):a.radioOff)+" ";let g,y;if(d.disabled)g=l===h?e.gray(d.title):e.strikethrough().gray(d.title);else{if(d.heading)return g=d.title,g+e.gray(y||"");g=d.title,l===h&&d.description&&(y=` - ${d.description}`,(m.length+g.length+y.length>=this.out.columns||d.description.split(/\r?\n/).length>1)&&(y=`
`+s(d.description,{margin:m.length,width:this.out.columns})))}return m+g+e.gray(y||"")}paginateOptions(l){if(l.length===0)return e.red("No matches for this query.");let{startIndex:d,endIndex:h}=c(this.cursor,l.length,this.optionsPerPage),p,m=[];for(let g=d;g<h;g++)g===d&&d>0?p=a.arrowUp:g===h-1&&h<l.length?p=a.arrowDown:p=" ",m.push(this.renderOption(this.cursor,l[g],g,p));return`
`+m.join(`
`)}renderOptions(l){return this.done?"":this.paginateOptions(l)}renderDoneOrInstructions(){if(this.done)return"";const l=[e.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&l.push(e.yellow(this.warn)),l.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(r.hide),super.render();let l=[t.symbol(this.done,this.aborted),e.bold(this.msg),t.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(l+=e.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),l+=this.renderOptions(this.value),this.out.write(this.clear+l),this.clear=n(l,this.out.columns)}}return ma=u,ma}var ya,bg;function Rx(){if(bg)return ya;bg=1;const e=tr(),r=Tr(),{erase:o,cursor:n}=rr(),{style:a,clear:t,figures:s,wrap:c,entriesToDisplay:u}=ar(),f=(p,m)=>p[m]&&(p[m].value||p[m].title||p[m]),l=(p,m)=>p[m]&&(p[m].title||p[m].value||p[m]),d=(p,m)=>{const g=p.findIndex(y=>y.value===m||y.title===m);return g>-1?g:void 0};class h extends r{constructor(m={}){super(m),this.msg=m.message,this.suggest=m.suggest,this.choices=m.choices,this.initial=typeof m.initial=="number"?m.initial:d(m.choices,m.initial),this.select=this.initial||m.cursor||0,this.i18n={noMatches:m.noMatches||"no matches found"},this.fallback=m.fallback||this.initial,this.clearFirst=m.clearFirst||!1,this.suggestions=[],this.input="",this.limit=m.limit||10,this.cursor=0,this.transform=a.render(m.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=t("",this.out.columns),this.complete(this.render),this.render()}set fallback(m){this._fb=Number.isSafeInteger(parseInt(m))?parseInt(m):m}get fallback(){let m;return typeof this._fb=="number"?m=this.choices[this._fb]:typeof this._fb=="string"&&(m={title:this._fb}),m||this._fb||{title:this.i18n.noMatches}}moveSelect(m){this.select=m,this.suggestions.length>0?this.value=f(this.suggestions,m):this.value=this.fallback.value,this.fire()}async complete(m){const g=this.completing=this.suggest(this.input,this.choices),y=await g;if(this.completing!==g)return;this.suggestions=y.map((w,D,b)=>({title:l(b,D),value:f(b,D),description:w.description})),this.completing=!1;const v=Math.max(y.length-1,0);this.moveSelect(Math.min(v,this.select)),m&&m()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
`),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
`),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
`),this.close()}_(m,g){let y=this.input.slice(0,this.cursor),v=this.input.slice(this.cursor);this.input=`${y}${m}${v}`,this.cursor=y.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let m=this.input.slice(0,this.cursor-1),g=this.input.slice(this.cursor);this.input=`${m}${g}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let m=this.input.slice(0,this.cursor),g=this.input.slice(this.cursor+1);this.input=`${m}${g}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(m,g,y,v){let w,D=y?s.arrowUp:v?s.arrowDown:" ",b=g?e.cyan().underline(m.title):m.title;return D=(g?e.cyan(s.pointer)+" ":" ")+D,m.description&&(w=` - ${m.description}`,(D.length+b.length+w.length>=this.out.columns||m.description.split(/\r?\n/).length>1)&&(w=`
`+c(m.description,{margin:3,width:this.out.columns}))),D+" "+b+e.gray(w||"")}render(){if(this.closed)return;this.firstRender?this.out.write(n.hide):this.out.write(t(this.outputText,this.out.columns)),super.render();let{startIndex:m,endIndex:g}=u(this.select,this.choices.length,this.limit);if(this.outputText=[a.symbol(this.done,this.aborted,this.exited),e.bold(this.msg),a.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const y=this.suggestions.slice(m,g).map((v,w)=>this.renderOption(v,this.select===w+m,w===0&&m>0,w+m===g-1&&g<this.choices.length)).join(`
`);this.outputText+=`
`+(y||e.gray(this.fallback.title))}this.out.write(o.line+n.to(0)+this.outputText)}}return ya=h,ya}var va,Eg;function xx(){if(Eg)return va;Eg=1;const e=tr(),{cursor:r}=rr(),o=mS(),{clear:n,style:a,figures:t}=ar();class s extends o{constructor(u={}){u.overrideRender=!0,super(u),this.inputValue="",this.clear=n("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(u=>u.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){const u=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(l=>this.inputValue?!!(typeof l.title=="string"&&l.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof l.value=="string"&&l.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);const f=this.filteredOptions.findIndex(l=>l===u);this.cursor=f<0?0:f,this.render()}handleSpaceToggle(){const u=this.filteredOptions[this.cursor];if(u.selected)u.selected=!1,this.render();else{if(u.disabled||this.value.filter(f=>f.selected).length>=this.maxChoices)return this.bell();u.selected=!0,this.render()}}handleInputChange(u){this.inputValue=this.inputValue+u,this.updateFilteredOptions()}_(u,f){u===" "?this.handleSpaceToggle():this.handleInputChange(u)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
Instructions:
${t.arrowUp}/${t.arrowDown}: Highlight option
${t.arrowLeft}/${t.arrowRight}/[space]: Toggle selection
[a,b,c]/delete: Filter choices
enter/return: Complete answer
`:""}renderCurrentInput(){return`
Filtered results for: ${this.inputValue?this.inputValue:e.gray("Enter something to filter")}
`}renderOption(u,f,l,d){const h=(f.selected?e.green(t.radioOn):t.radioOff)+" "+d+" ";let p;return f.disabled?p=u===l?e.gray().underline(f.title):e.strikethrough().gray(f.title):p=u===l?e.cyan().underline(f.title):f.title,h+p}renderDoneOrInstructions(){if(this.done)return this.value.filter(f=>f.selected).map(f=>f.title).join(", ");const u=[e.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&u.push(e.yellow(this.warn)),u.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(r.hide),super.render();let u=[a.symbol(this.done,this.aborted),e.bold(this.msg),a.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(u+=e.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),u+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+u),this.clear=n(u,this.out.columns)}}return va=s,va}var Da,wg;function Fx(){if(wg)return Da;wg=1;const e=tr(),r=Tr(),{style:o,clear:n}=ar(),{erase:a,cursor:t}=rr();class s extends r{constructor(u={}){super(u),this.msg=u.message,this.value=u.initial,this.initialValue=!!u.initial,this.yesMsg=u.yes||"yes",this.yesOption=u.yesOption||"(Y/n)",this.noMsg=u.no||"no",this.noOption=u.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
`),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
`),this.close()}_(u,f){return u.toLowerCase()==="y"?(this.value=!0,this.submit()):u.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){if(this.closed)return;this.firstRender?this.out.write(t.hide):this.out.write(n(this.outputText,this.out.columns)),super.render();const u=this.aborted||this.done&&!this.value;this.outputText=[o.symbol(this.done,u),e.bold(this.msg),o.delimiter(this.done),this.done?this.value&&!this.aborted?this.yesMsg:this.noMsg:e.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(a.line+t.to(0)+this.outputText)}}return Da=s,Da}var ba,_g;function Tx(){return _g||(_g=1,ba={TextPrompt:dx(),SelectPrompt:px(),TogglePrompt:gx(),DatePrompt:Ax(),NumberPrompt:Cx(),MultiselectPrompt:mS(),AutocompletePrompt:Rx(),AutocompleteMultiselectPrompt:xx(),ConfirmPrompt:Fx()}),ba}var Sg;function Ox(){return Sg||(Sg=1,function(e){const r=e,o=Tx(),n=s=>s;function a(s,c,u={}){return new Promise((f,l)=>{const d=new o[s](c),h=u.onAbort||n,p=u.onSubmit||n,m=u.onExit||n;d.on("state",c.onState||n),d.on("submit",g=>f(p(g))),d.on("exit",g=>f(m(g))),d.on("abort",g=>l(h(g)))})}r.text=s=>a("TextPrompt",s),r.password=s=>(s.style="password",r.text(s)),r.invisible=s=>(s.style="invisible",r.text(s)),r.number=s=>a("NumberPrompt",s),r.date=s=>a("DatePrompt",s),r.confirm=s=>a("ConfirmPrompt",s),r.list=s=>{const c=s.separator||",";return a("TextPrompt",s,{onSubmit:u=>u.split(c).map(f=>f.trim())})},r.toggle=s=>a("TogglePrompt",s),r.select=s=>a("SelectPrompt",s),r.multiselect=s=>{s.choices=[].concat(s.choices||[]);const c=u=>u.filter(f=>f.selected).map(f=>f.value);return a("MultiselectPrompt",s,{onAbort:c,onSubmit:c})},r.autocompleteMultiselect=s=>{s.choices=[].concat(s.choices||[]);const c=u=>u.filter(f=>f.selected).map(f=>f.value);return a("AutocompleteMultiselectPrompt",s,{onAbort:c,onSubmit:c})};const t=(s,c)=>Promise.resolve(c.filter(u=>u.title.slice(0,s.length).toLowerCase()===s.toLowerCase()));r.autocomplete=s=>(s.suggest=s.suggest||t,s.choices=[].concat(s.choices||[]),a("AutocompletePrompt",s))}(Uo)),Uo}var Ea,Ag;function Ix(){if(Ag)return Ea;Ag=1;const e=Ox(),r=["suggest","format","onState","validate","onRender","type"],o=()=>{};async function n(c=[],{onSubmit:u=o,onCancel:f=o}={}){const l={},d=n._override||{};c=[].concat(c);let h,p,m,g,y,v;const w=async(D,b,E=!1)=>{if(!(!E&&D.validate&&D.validate(b)!==!0))return D.format?await D.format(b,l):b};for(p of c)if({name:g,type:y}=p,typeof y=="function"&&(y=await y(h,{...l},p),p.type=y),!!y){for(let D in p){if(r.includes(D))continue;let b=p[D];p[D]=typeof b=="function"?await b(h,{...l},v):b}if(v=p,typeof p.message!="string")throw new Error("prompt message is required");if({name:g,type:y}=p,e[y]===void 0)throw new Error(`prompt type (${y}) is not defined`);if(d[p.name]!==void 0&&(h=await w(p,d[p.name]),h!==void 0)){l[g]=h;continue}try{h=n._injected?a(n._injected,p.initial):await e[y](p),l[g]=h=await w(p,h,!0),m=await u(p,h,l)}catch{m=!await f(p,l)}if(m)return l}return l}function a(c,u){const f=c.shift();if(f instanceof Error)throw f;return f===void 0?u:f}function t(c){n._injected=(n._injected||[]).concat(c)}function s(c){n._override=Object.assign({},c)}return Ea=Object.assign(n,{prompt:n,prompts:e,inject:t,override:s}),Ea}var wa,Cg;function Bx(){return Cg||(Cg=1,wa=Ix()),wa}var kx=Bx();const zs=tt(kx);var Lr={exports:{}},_a,Rg;function $x(){if(Rg)return _a;Rg=1,_a=n,n.sync=a;var e=at;function r(t,s){var c=s.pathExt!==void 0?s.pathExt:process.env.PATHEXT;if(!c||(c=c.split(";"),c.indexOf("")!==-1))return!0;for(var u=0;u<c.length;u++){var f=c[u].toLowerCase();if(f&&t.substr(-f.length).toLowerCase()===f)return!0}return!1}function o(t,s,c){return!t.isSymbolicLink()&&!t.isFile()?!1:r(s,c)}function n(t,s,c){e.stat(t,function(u,f){c(u,u?!1:o(f,t,s))})}function a(t,s){return o(e.statSync(t),t,s)}return _a}var Sa,xg;function Px(){if(xg)return Sa;xg=1,Sa=r,r.sync=o;var e=at;function r(t,s,c){e.stat(t,function(u,f){c(u,u?!1:n(f,s))})}function o(t,s){return n(e.statSync(t),s)}function n(t,s){return t.isFile()&&a(t,s)}function a(t,s){var c=t.mode,u=t.uid,f=t.gid,l=s.uid!==void 0?s.uid:process.getuid&&process.getuid(),d=s.gid!==void 0?s.gid:process.getgid&&process.getgid(),h=parseInt("100",8),p=parseInt("010",8),m=parseInt("001",8),g=h|p,y=c&m||c&p&&f===d||c&h&&u===l||c&g&&l===0;return y}return Sa}var Aa,Fg;function Lx(){if(Fg)return Aa;Fg=1;var e;process.platform==="win32"||Nt.TESTING_WINDOWS?e=$x():e=Px(),Aa=r,r.sync=o;function r(n,a,t){if(typeof a=="function"&&(t=a,a={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(s,c){r(n,a||{},function(u,f){u?c(u):s(f)})})}e(n,a||{},function(s,c){s&&(s.code==="EACCES"||a&&a.ignoreErrors)&&(s=null,c=!1),t(s,c)})}function o(n,a){try{return e.sync(n,a||{})}catch(t){if(a&&a.ignoreErrors||t.code==="EACCES")return!1;throw t}}return Aa}var Ca,Tg;function Nx(){if(Tg)return Ca;Tg=1;const e=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",r=Te,o=e?";":":",n=Lx(),a=u=>Object.assign(new Error(`not found: ${u}`),{code:"ENOENT"}),t=(u,f)=>{const l=f.colon||o,d=u.match(/\//)||e&&u.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(f.path||process.env.PATH||"").split(l)],h=e?f.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",p=e?h.split(l):[""];return e&&u.indexOf(".")!==-1&&p[0]!==""&&p.unshift(""),{pathEnv:d,pathExt:p,pathExtExe:h}},s=(u,f,l)=>{typeof f=="function"&&(l=f,f={}),f||(f={});const{pathEnv:d,pathExt:h,pathExtExe:p}=t(u,f),m=[],g=v=>new Promise((w,D)=>{if(v===d.length)return f.all&&m.length?w(m):D(a(u));const b=d[v],E=/^".*"$/.test(b)?b.slice(1,-1):b,A=r.join(E,u),C=!E&&/^\.[\\\/]/.test(u)?u.slice(0,2)+A:A;w(y(C,v,0))}),y=(v,w,D)=>new Promise((b,E)=>{if(D===h.length)return b(g(w+1));const A=h[D];n(v+A,{pathExt:p},(C,F)=>{if(!C&&F)if(f.all)m.push(v+A);else return b(v+A);return b(y(v,w,D+1))})});return l?g(0).then(v=>l(null,v),l):g(0)},c=(u,f)=>{f=f||{};const{pathEnv:l,pathExt:d,pathExtExe:h}=t(u,f),p=[];for(let m=0;m<l.length;m++){const g=l[m],y=/^".*"$/.test(g)?g.slice(1,-1):g,v=r.join(y,u),w=!y&&/^\.[\\\/]/.test(u)?u.slice(0,2)+v:v;for(let D=0;D<d.length;D++){const b=w+d[D];try{if(n.sync(b,{pathExt:h}))if(f.all)p.push(b);else return b}catch{}}}if(f.all&&p.length)return p;if(f.nothrow)return null;throw a(u)};return Ca=s,s.sync=c,Ca}var jn={exports:{}},Og;function Mx(){if(Og)return jn.exports;Og=1;const e=(r={})=>{const o=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(o).reverse().find(a=>a.toUpperCase()==="PATH")||"Path"};return jn.exports=e,jn.exports.default=e,jn.exports}var Ra,Ig;function qx(){if(Ig)return Ra;Ig=1;const e=Te,r=Nx(),o=Mx();function n(t,s){const c=t.options.env||process.env,u=process.cwd(),f=t.options.cwd!=null,l=f&&process.chdir!==void 0&&!process.chdir.disabled;if(l)try{process.chdir(t.options.cwd)}catch{}let d;try{d=r.sync(t.command,{path:c[o({env:c})],pathExt:s?e.delimiter:void 0})}catch{}finally{l&&process.chdir(u)}return d&&(d=e.resolve(f?t.options.cwd:"",d)),d}function a(t){return n(t)||n(t,!0)}return Ra=a,Ra}var Un={},Bg;function jx(){if(Bg)return Un;Bg=1;const e=/([()\][%!^"`<>&|;, *?])/g;function r(n){return n=n.replace(e,"^$1"),n}function o(n,a){return n=`${n}`,n=n.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),n=n.replace(/(?=(\\+?)?)\1$/,"$1$1"),n=`"${n}"`,n=n.replace(e,"^$1"),a&&(n=n.replace(e,"^$1")),n}return Un.command=r,Un.argument=o,Un}var xa,kg;function Ux(){return kg||(kg=1,xa=/^#!(.*)/),xa}var Fa,$g;function Hx(){if($g)return Fa;$g=1;const e=Ux();return Fa=(r="")=>{const o=r.match(e);if(!o)return null;const[n,a]=o[0].replace(/#! ?/,"").split(" "),t=n.split("/").pop();return t==="env"?a:a?`${t} ${a}`:t},Fa}var Ta,Pg;function Gx(){if(Pg)return Ta;Pg=1;const e=at,r=Hx();function o(n){const t=Buffer.alloc(150);let s;try{s=e.openSync(n,"r"),e.readSync(s,t,0,150,0),e.closeSync(s)}catch{}return r(t.toString())}return Ta=o,Ta}var Oa,Lg;function Wx(){if(Lg)return Oa;Lg=1;const e=Te,r=qx(),o=jx(),n=Gx(),a=process.platform==="win32",t=/\.(?:com|exe)$/i,s=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function c(l){l.file=r(l);const d=l.file&&n(l.file);return d?(l.args.unshift(l.file),l.command=d,r(l)):l.file}function u(l){if(!a)return l;const d=c(l),h=!t.test(d);if(l.options.forceShell||h){const p=s.test(d);l.command=e.normalize(l.command),l.command=o.command(l.command),l.args=l.args.map(g=>o.argument(g,p));const m=[l.command].concat(l.args).join(" ");l.args=["/d","/s","/c",`"${m}"`],l.command=process.env.comspec||"cmd.exe",l.options.windowsVerbatimArguments=!0}return l}function f(l,d,h){d&&!Array.isArray(d)&&(h=d,d=null),d=d?d.slice(0):[],h=Object.assign({},h);const p={command:l,args:d,options:h,file:void 0,original:{command:l,args:d}};return h.shell?p:u(p)}return Oa=f,Oa}var Ia,Ng;function zx(){if(Ng)return Ia;Ng=1;const e=process.platform==="win32";function r(t,s){return Object.assign(new Error(`${s} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${s} ${t.command}`,path:t.command,spawnargs:t.args})}function o(t,s){if(!e)return;const c=t.emit;t.emit=function(u,f){if(u==="exit"){const l=n(f,s);if(l)return c.call(t,"error",l)}return c.apply(t,arguments)}}function n(t,s){return e&&t===1&&!s.file?r(s.original,"spawn"):null}function a(t,s){return e&&t===1&&!s.file?r(s.original,"spawnSync"):null}return Ia={hookChildProcess:o,verifyENOENT:n,verifyENOENTSync:a,notFoundError:r},Ia}var Mg;function Vx(){if(Mg)return Lr.exports;Mg=1;const e=cS,r=Wx(),o=zx();function n(t,s,c){const u=r(t,s,c),f=e.spawn(u.command,u.args,u.options);return o.hookChildProcess(f,u),f}function a(t,s,c){const u=r(t,s,c),f=e.spawnSync(u.command,u.args,u.options);return f.error=f.error||o.verifyENOENTSync(f.status,u),f}return Lr.exports=n,Lr.exports.spawn=n,Lr.exports.sync=a,Lr.exports._parse=r,Lr.exports._enoent=o,Lr.exports}var Ba,qg;function Yx(){if(qg)return Ba;qg=1;const e=Vx();return Ba=(o,n,a={},t={})=>{a.rejectOnError===void 0&&(a.rejectOnError=!0);let s="",c="";const u=e(o,n,t);return new Promise((f,l)=>{a.stdin!==void 0&&a.stdin!=null&&u.stdin.write(a.stdin),u.stdin.end(),u.stdout.on("data",d=>{s+=d,a.stdout&&a.stdout(d)}),u.stderr.on("data",d=>{c+=d,a.stderr&&a.stderr(d)}),a.rejectOnError&&u.addListener("error",l),u.on("close",d=>{d!==0&&a.rejectOnError?l(c):f({stdout:s,stderr:c})})})},Ba}var Kx=Yx();const Ft=tt(Kx),Zx="npm-check-updates",Xx="18.0.1",Jx="Tomas Junnonen <tomas1@gmail.com>",Qx="Apache-2.0",e2=["Raine Revere (https://github.com/raineorshine)","Imamuzzaki Abu Salam <imamuzzaki@gmail.com>"],t2="Find newer versions of dependencies than what your package.json allows",r2=["dependencies","npm","package.json","update","upgrade","versions"],i2={node:"^18.18.0 || >=20.0.0",npm:">=8.12.1"},n2="build/index.js",s2="build/index.d.ts",o2={build:"rimraf build && npm run build:options && vite build","build:options":"vite-no