npm-check-updates
Version:
Find newer versions of dependencies than what your package.json allows
48 lines • 1.31 MB
JavaScript
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Be=require("node:path"),HF=require("node:readline"),or=require("node:events"),bt=require("node:fs"),Nt=require("node:os"),qr=require("node:util"),Ve=require("node:fs/promises"),Ft=require("node:url"),FC=require("node:child_process"),va=require("node:http"),Sm=require("node:https"),IC=require("node:assert"),Ea=require("node:buffer"),yr=require("node:stream"),cs=require("node:string_decoder"),LC=require("node:zlib"),zF=require("node:path/win32"),Am=require("node:dns"),Rm=require("node:crypto"),Sn=require("node:net"),ba=require("node:tls"),kC=require("node:tty"),GF=require("node:timers/promises"),WF=require("node:querystring"),Cm=require("node:process"),VF=require("node:stream/consumers"),YF=require("node:module");var $r=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ft(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function KF(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function s(){var i=!1;try{i=this instanceof s}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(n,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),n}var lu={},fu,sy;function vr(){if(sy)return fu;sy=1;let e,t,n,s,i=!0;typeof process<"u"&&({FORCE_COLOR:e,NODE_DISABLE_COLORS:t,NO_COLOR:n,TERM:s}=process.env||{},i=process.stdout&&process.stdout.isTTY);const r={enabled:!t&&n==null&&s!=="dumb"&&(e!=null&&e!=="0"||i),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 o(c,a){let f=0,h,d="",p="";for(;f<c.length;f++)h=c[f],d+=h.open,p+=h.close,~a.indexOf(h.close)&&(a=a.replace(h.rgx,h.close+h.open));return d+a+p}function l(c,a){let f={has:c,keys:a};return f.reset=r.reset.bind(f),f.bold=r.bold.bind(f),f.dim=r.dim.bind(f),f.italic=r.italic.bind(f),f.underline=r.underline.bind(f),f.inverse=r.inverse.bind(f),f.hidden=r.hidden.bind(f),f.strikethrough=r.strikethrough.bind(f),f.black=r.black.bind(f),f.red=r.red.bind(f),f.green=r.green.bind(f),f.yellow=r.yellow.bind(f),f.blue=r.blue.bind(f),f.magenta=r.magenta.bind(f),f.cyan=r.cyan.bind(f),f.white=r.white.bind(f),f.gray=r.gray.bind(f),f.grey=r.grey.bind(f),f.bgBlack=r.bgBlack.bind(f),f.bgRed=r.bgRed.bind(f),f.bgGreen=r.bgGreen.bind(f),f.bgYellow=r.bgYellow.bind(f),f.bgBlue=r.bgBlue.bind(f),f.bgMagenta=r.bgMagenta.bind(f),f.bgCyan=r.bgCyan.bind(f),f.bgWhite=r.bgWhite.bind(f),f}function u(c,a){let f={open:`\x1B[${c}m`,close:`\x1B[${a}m`,rgx:new RegExp(`\\x1b\\[${a}m`,"g")};return function(h){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(c)||(this.has.push(c),this.keys.push(f)),h===void 0?this:r.enabled?o(this.keys,h+""):h+""):h===void 0?l([c],[f]):r.enabled?o([f],h+""):h+""}}return fu=r,fu}var hu,oy;function ZF(){return oy||(oy=1,hu=(e,t)=>{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(t){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}}),hu}var du,ay;function Tm(){return ay||(ay=1,du=e=>{const t=["[\\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("|"),n=new RegExp(t,"g");return typeof e=="string"?e.replace(n,""):e}),du}var pu,uy;function Er(){if(uy)return pu;uy=1;const e="\x1B",t=`${e}[`,n="\x07",s={to(o,l){return l?`${t}${l+1};${o+1}H`:`${t}${o+1}G`},move(o,l){let u="";return o<0?u+=`${t}${-o}D`:o>0&&(u+=`${t}${o}C`),l<0?u+=`${t}${-l}A`:l>0&&(u+=`${t}${l}B`),u},up:(o=1)=>`${t}${o}A`,down:(o=1)=>`${t}${o}B`,forward:(o=1)=>`${t}${o}C`,backward:(o=1)=>`${t}${o}D`,nextLine:(o=1)=>`${t}E`.repeat(o),prevLine:(o=1)=>`${t}F`.repeat(o),left:`${t}G`,hide:`${t}?25l`,show:`${t}?25h`,save:`${e}7`,restore:`${e}8`},i={up:(o=1)=>`${t}S`.repeat(o),down:(o=1)=>`${t}T`.repeat(o)},r={screen:`${t}2J`,up:(o=1)=>`${t}1J`.repeat(o),down:(o=1)=>`${t}J`.repeat(o),line:`${t}2K`,lineEnd:`${t}K`,lineStart:`${t}1K`,lines(o){let l="";for(let u=0;u<o;u++)l+=this.line+(u<o-1?s.up():"");return o&&(l+=s.left),l}};return pu={cursor:s,scroll:i,erase:r,beep:n},pu}var gu,cy;function JF(){if(cy)return gu;cy=1;const e=Tm(),{erase:t,cursor:n}=Er(),s=i=>[...e(i)].length;return gu=function(i,r){if(!r)return t.line+n.to(0);let o=0;const l=i.split(/\r?\n/);for(let u of l)o+=1+Math.floor(Math.max(s(u)-1,0)/r);return t.lines(o)},gu}var mu,ly;function NC(){if(ly)return mu;ly=1;const e={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"},t={arrowUp:e.arrowUp,arrowDown:e.arrowDown,arrowLeft:e.arrowLeft,arrowRight:e.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};return mu=process.platform==="win32"?t:e,mu}var yu,fy;function XF(){if(fy)return yu;fy=1;const e=vr(),t=NC(),n=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}`}}),s=u=>n[u]||n.default,i=Object.freeze({aborted:e.red(t.cross),done:e.green(t.tick),exited:e.yellow(t.cross),default:e.cyan("?")});return yu={styles:n,render:s,symbols:i,symbol:(u,c,a)=>c?i.aborted:a?i.exited:u?i.done:i.default,delimiter:u=>e.gray(u?t.ellipsis:t.pointerSmall),item:(u,c)=>e.gray(u?c?t.pointerSmall:"+":t.line)},yu}var vu,hy;function QF(){if(hy)return vu;hy=1;const e=Tm();return vu=function(t,n){let s=String(e(t)||"").split(/\r?\n/);return n?s.map(i=>Math.ceil(i.length/n)).reduce((i,r)=>i+r):s.length},vu}var Eu,dy;function e2(){return dy||(dy=1,Eu=(e,t={})=>{const n=Number.isSafeInteger(parseInt(t.margin))?new Array(parseInt(t.margin)).fill(" ").join(""):t.margin||"",s=t.width;return(e||"").split(/\r?\n/g).map(i=>i.split(/\s+/g).reduce((r,o)=>(o.length+n.length>=s||r[r.length-1].length+o.length+1<s?r[r.length-1]+=` ${o}`:r.push(`${n}${o}`),r),[n]).join(`
`)).join(`
`)}),Eu}var bu,py;function t2(){return py||(py=1,bu=(e,t,n)=>{n=n||t;let s=Math.min(t-n,e-Math.floor(n/2));s<0&&(s=0);let i=Math.min(s+n,t);return{startIndex:s,endIndex:i}}),bu}var _u,gy;function Cr(){return gy||(gy=1,_u={action:ZF(),clear:JF(),style:XF(),strip:Tm(),figures:NC(),lines:QF(),wrap:e2(),entriesToDisplay:t2()}),_u}var wu,my;function Zr(){if(my)return wu;my=1;const e=HF,{action:t}=Cr(),n=or,{beep:s,cursor:i}=Er(),r=vr();class o extends n{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 c=e.createInterface({input:this.in,escapeCodeTimeout:50});e.emitKeypressEvents(this.in,c),this.in.isTTY&&this.in.setRawMode(!0);const a=(f,h)=>{let d=t(h,this.isSelect);d===!1?this._&&this._(f,h):typeof this[d]=="function"?this[d](h):this.bell()};this.close=()=>{this.out.write(i.show),this.in.removeListener("keypress",a),this.in.isTTY&&this.in.setRawMode(!1),c.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",a)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(s)}render(){this.onRender(r),this.firstRender&&(this.firstRender=!1)}}return wu=o,wu}var Du,yy;function r2(){if(yy)return Du;yy=1;const e=vr(),t=Zr(),{erase:n,cursor:s}=Er(),{style:i,clear:r,lines:o,figures:l}=Cr();class u extends t{constructor(a={}){super(a),this.transform=i.render(a.style),this.scale=this.transform.scale,this.msg=a.message,this.initial=a.initial||"",this.validator=a.validate||(()=>!0),this.value="",this.errorMsg=a.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=r("",this.out.columns),this.render()}set value(a){!a&&this.initial?(this.placeholder=!0,this.rendered=e.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(a)),this._value=a,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 a=await this.validator(this.value);typeof a=="string"&&(this.errorMsg=a,a=!1),this.error=!a}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(a){this.placeholder||(this.cursor=this.cursor+a,this.cursorOffset+=a)}_(a,f){let h=this.value.slice(0,this.cursor),d=this.value.slice(this.cursor);this.value=`${h}${a}${d}`,this.red=!1,this.cursor=this.placeholder?0:h.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let a=this.value.slice(0,this.cursor-1),f=this.value.slice(this.cursor);this.value=`${a}${f}`,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 a=this.value.slice(0,this.cursor),f=this.value.slice(this.cursor+1);this.value=`${a}${f}`,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(s.down(o(this.outputError,this.out.columns)-1)+r(this.outputError,this.out.columns)),this.out.write(r(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[i.symbol(this.done,this.aborted),e.bold(this.msg),i.delimiter(this.done),this.red?e.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
`).reduce((a,f,h)=>a+`
${h?" ":l.pointerSmall} ${e.red().italic(f)}`,"")),this.out.write(n.line+s.to(0)+this.outputText+s.save+this.outputError+s.restore+s.move(this.cursorOffset,0)))}}return Du=u,Du}var Su,vy;function n2(){if(vy)return Su;vy=1;const e=vr(),t=Zr(),{style:n,clear:s,figures:i,wrap:r,entriesToDisplay:o}=Cr(),{cursor:l}=Er();class u extends t{constructor(a={}){super(a),this.isSelect=!0,this.msg=a.message,this.hint=a.hint||"- Use arrow-keys. Return to submit.",this.warn=a.warn||"- This option is disabled",this.cursor=a.initial||0,this.choices=a.choices.map((f,h)=>(typeof f=="string"&&(f={title:f,value:h}),{title:f&&(f.title||f.value||f),value:f&&(f.value===void 0?h:f.value),description:f&&f.description,selected:f&&f.selected,disabled:f&&f.disabled})),this.optionsPerPage=a.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=s("",this.out.columns),this.render()}moveCursor(a){this.cursor=a,this.value=this.choices[a].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()}_(a,f){if(a===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(l.hide):this.out.write(s(this.outputText,this.out.columns)),super.render();let{startIndex:a,endIndex:f}=o(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[n.symbol(this.done,this.aborted),e.bold(this.msg),n.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=a;h<f;h++){let d,p,g="",m=this.choices[h];h===a&&a>0?p=i.arrowUp:h===f-1&&f<this.choices.length?p=i.arrowDown:p=" ",m.disabled?(d=this.cursor===h?e.gray().underline(m.title):e.strikethrough().gray(m.title),p=(this.cursor===h?e.bold().gray(i.pointer)+" ":" ")+p):(d=this.cursor===h?e.cyan().underline(m.title):m.title,p=(this.cursor===h?e.cyan(i.pointer)+" ":" ")+p,m.description&&this.cursor===h&&(g=` - ${m.description}`,(p.length+d.length+g.length>=this.out.columns||m.description.split(/\r?\n/).length>1)&&(g=`
`+r(m.description,{margin:3,width:this.out.columns})))),this.outputText+=`${p} ${d}${e.gray(g)}
`}}this.out.write(this.outputText)}}return Su=u,Su}var Au,Ey;function i2(){if(Ey)return Au;Ey=1;const e=vr(),t=Zr(),{style:n,clear:s}=Cr(),{cursor:i,erase:r}=Er();class o extends t{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,c){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(i.hide):this.out.write(s(this.outputText,this.out.columns)),super.render(),this.outputText=[n.symbol(this.done,this.aborted),e.bold(this.msg),n.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(r.line+i.to(0)+this.outputText))}}return Au=o,Au}var Ru,by;function jr(){if(by)return Ru;by=1;class e{constructor({token:n,date:s,parts:i,locales:r}){this.token=n,this.date=s||new Date,this.parts=i||[this],this.locales=r||{}}up(){}down(){}next(){const n=this.parts.indexOf(this);return this.parts.find((s,i)=>i>n&&s instanceof e)}setTo(n){}prev(){let n=[].concat(this.parts).reverse();const s=n.indexOf(this);return n.find((i,r)=>r>s&&i instanceof e)}toString(){return String(this.date)}}return Ru=e,Ru}var Cu,_y;function s2(){if(_y)return Cu;_y=1;const e=jr();class t extends e{constructor(s={}){super(s)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let s=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?s.toUpperCase():s}}return Cu=t,Cu}var Tu,wy;function o2(){if(wy)return Tu;wy=1;const e=jr(),t=s=>(s=s%10,s===1?"st":s===2?"nd":s===3?"rd":"th");class n extends e{constructor(i={}){super(i)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(i){this.date.setDate(parseInt(i.substr(-2)))}toString(){let i=this.date.getDate(),r=this.date.getDay();return this.token==="DD"?String(i).padStart(2,"0"):this.token==="Do"?i+t(i):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:i}}return Tu=n,Tu}var Ou,Dy;function a2(){if(Dy)return Ou;Dy=1;const e=jr();class t extends e{constructor(s={}){super(s)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(s){this.date.setHours(parseInt(s.substr(-2)))}toString(){let s=this.date.getHours();return/h/.test(this.token)&&(s=s%12||12),this.token.length>1?String(s).padStart(2,"0"):s}}return Ou=t,Ou}var xu,Sy;function u2(){if(Sy)return xu;Sy=1;const e=jr();class t extends e{constructor(s={}){super(s)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(s){this.date.setMilliseconds(parseInt(s.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}return xu=t,xu}var Fu,Ay;function c2(){if(Ay)return Fu;Ay=1;const e=jr();class t extends e{constructor(s={}){super(s)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(s){this.date.setMinutes(parseInt(s.substr(-2)))}toString(){let s=this.date.getMinutes();return this.token.length>1?String(s).padStart(2,"0"):s}}return Fu=t,Fu}var Iu,Ry;function l2(){if(Ry)return Iu;Ry=1;const e=jr();class t extends e{constructor(s={}){super(s)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(s){s=parseInt(s.substr(-2))-1,this.date.setMonth(s<0?0:s)}toString(){let s=this.date.getMonth(),i=this.token.length;return i===2?String(s+1).padStart(2,"0"):i===3?this.locales.monthsShort[s]:i===4?this.locales.months[s]:String(s+1)}}return Iu=t,Iu}var Lu,Cy;function f2(){if(Cy)return Lu;Cy=1;const e=jr();class t extends e{constructor(s={}){super(s)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(s){this.date.setSeconds(parseInt(s.substr(-2)))}toString(){let s=this.date.getSeconds();return this.token.length>1?String(s).padStart(2,"0"):s}}return Lu=t,Lu}var ku,Ty;function h2(){if(Ty)return ku;Ty=1;const e=jr();class t extends e{constructor(s={}){super(s)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(s){this.date.setFullYear(s.substr(-4))}toString(){let s=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?s.substr(-2):s}}return ku=t,ku}var Nu,Oy;function d2(){return Oy||(Oy=1,Nu={DatePart:jr(),Meridiem:s2(),Day:o2(),Hours:a2(),Milliseconds:u2(),Minutes:c2(),Month:l2(),Seconds:f2(),Year:h2()}),Nu}var Pu,xy;function p2(){if(xy)return Pu;xy=1;const e=vr(),t=Zr(),{style:n,clear:s,figures:i}=Cr(),{erase:r,cursor:o}=Er(),{DatePart:l,Meridiem:u,Day:c,Hours:a,Milliseconds:f,Minutes:h,Month:d,Seconds:p,Year:g}=d2(),m=/\\(.)|"((?:\\["\\]|[^"])+)"|(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:E})=>E.replace(/\\(.)/g,"$1"),2:E=>new c(E),3:E=>new d(E),4:E=>new g(E),5:E=>new u(E),6:E=>new a(E),7:E=>new h(E),8:E=>new p(E),9:E=>new f(E)},_={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 y extends t{constructor(b={}){super(b),this.msg=b.message,this.cursor=0,this.typed="",this.locales=Object.assign(_,b.locales),this._date=b.initial||new Date,this.errorMsg=b.error||"Please Enter A Valid Value",this.validator=b.validate||(()=>!0),this.mask=b.mask||"YYYY-MM-DD HH:mm:ss",this.clear=s("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(b){b&&this._date.setTime(b.getTime())}set mask(b){let w;for(this.parts=[];w=m.exec(b);){let C=w.shift(),T=w.findIndex(L=>L!=null);this.parts.push(T in v?v[T]({token:w[T]||C,date:this.date,parts:this.parts,locales:this.locales}):w[T]||C)}let S=this.parts.reduce((C,T)=>(typeof T=="string"&&typeof C[C.length-1]=="string"?C[C.length-1]+=T:C.push(T),C),[]);this.parts.splice(0),this.parts.push(...S),this.reset()}moveCursor(b){this.typed="",this.cursor=b,this.fire()}reset(){this.moveCursor(this.parts.findIndex(b=>b instanceof l)),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 b=await this.validator(this.value);typeof b=="string"&&(this.errorMsg=b,b=!1),this.error=!b}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 b=this.parts[this.cursor].prev();if(b==null)return this.bell();this.moveCursor(this.parts.indexOf(b)),this.render()}right(){let b=this.parts[this.cursor].next();if(b==null)return this.bell();this.moveCursor(this.parts.indexOf(b)),this.render()}next(){let b=this.parts[this.cursor].next();this.moveCursor(b?this.parts.indexOf(b):this.parts.findIndex(w=>w instanceof l)),this.render()}_(b){/\d/.test(b)&&(this.typed+=b,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(o.hide):this.out.write(s(this.outputText,this.out.columns)),super.render(),this.outputText=[n.symbol(this.done,this.aborted),e.bold(this.msg),n.delimiter(!1),this.parts.reduce((b,w,S)=>b.concat(S===this.cursor&&!this.done?e.cyan().underline(w.toString()):w),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
`).reduce((b,w,S)=>b+`
${S?" ":i.pointerSmall} ${e.red().italic(w)}`,"")),this.out.write(r.line+o.to(0)+this.outputText))}}return Pu=y,Pu}var $u,Fy;function g2(){if(Fy)return $u;Fy=1;const e=vr(),t=Zr(),{cursor:n,erase:s}=Er(),{style:i,figures:r,clear:o,lines:l}=Cr(),u=/[0-9]/,c=h=>h!==void 0,a=(h,d)=>{let p=Math.pow(10,d);return Math.round(h*p)/p};class f extends t{constructor(d={}){super(d),this.transform=i.render(d.style),this.msg=d.message,this.initial=c(d.initial)?d.initial:"",this.float=!!d.float,this.round=d.round||2,this.inc=d.increment||1,this.min=c(d.min)?d.min:-1/0,this.max=c(d.max)?d.max:1/0,this.errorMsg=d.error||"Please Enter A Valid Value",this.validator=d.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(d){!d&&d!==0?(this.placeholder=!0,this.rendered=e.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${a(d,this.round)}`),this._value=a(d,this.round)),this.fire()}get value(){return this._value}parse(d){return this.float?parseFloat(d):parseInt(d)}valid(d){return d==="-"||d==="."&&this.float||u.test(d)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let d=this.value;this.value=d!==""?d:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
`),this.close()}async validate(){let d=await this.validator(this.value);typeof d=="string"&&(this.errorMsg=d,d=!1),this.error=!d}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let d=this.value;this.value=d!==""?d: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 d=this.value.toString();if(d.length===0)return this.bell();this.value=this.parse(d=d.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()}_(d,p){if(!this.valid(d))return this.bell();const g=Date.now();if(g-this.lastHit>1e3&&(this.typed=""),this.typed+=d,this.lastHit=g,this.color="cyan",d===".")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(n.down(l(this.outputError,this.out.columns)-1)+o(this.outputError,this.out.columns)),this.out.write(o(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[i.symbol(this.done,this.aborted),e.bold(this.msg),i.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((d,p,g)=>d+`
${g?" ":r.pointerSmall} ${e.red().italic(p)}`,"")),this.out.write(s.line+n.to(0)+this.outputText+n.save+this.outputError+n.restore))}}return $u=f,$u}var Bu,Iy;function PC(){if(Iy)return Bu;Iy=1;const e=vr(),{cursor:t}=Er(),n=Zr(),{clear:s,figures:i,style:r,wrap:o,entriesToDisplay:l}=Cr();class u extends n{constructor(a={}){super(a),this.isSelect=!0,this.msg=a.message,this.cursorStart=a.choices.findIndex(f=>!f.heading),this.cursor=a.cursor||this.cursorStart,this.scrollIndex=a.cursor||0,this.hint=a.hint||"",this.warn=a.warn||"- This option is disabled -",this.minSelected=a.min,this.showMinError=!1,this.maxChoices=a.max,this.instructions=a.instructions,this.optionsPerPage=a.optionsPerPage||10,this.value=a.choices.map((f,h)=>(typeof f=="string"&&(f={title:f,value:h}),{title:f&&(f.title||f.value||f),description:f&&f.description,value:f&&(f.value===void 0?h:f.value),selected:f&&f.selected,disabled:f&&f.disabled,heading:f&&f.heading})),this.clear=s("",this.out.columns),a.overrideRender||this.render()}reset(){this.value.map(a=>!a.selected),this.cursor=this.cursorStart,this.fire(),this.render()}selected(){return this.value.filter(a=>a.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
`),this.close()}submit(){const a=this.value.filter(f=>f.selected);this.minSelected&&a.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(a=>a.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const a=this.value[this.cursor];if(a.selected)a.selected=!1,this.render();else{if(a.disabled||this.value.filter(f=>f.selected).length>=this.maxChoices)return this.bell();a.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();const a=!this.value[this.cursor].selected;this.value.filter(f=>!f.disabled&&!f.heading).forEach(f=>f.selected=a),this.render()}_(a,f){if(a===" ")this.handleSpaceToggle();else if(a==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
Instructions:
${i.arrowUp}/${i.arrowDown}: Highlight option
${i.arrowLeft}/${i.arrowRight}/[space]: Toggle selection
`+(this.maxChoices===void 0?` a: Toggle all
`:"")+" enter/return: Complete answer":""}renderOption(a,f,h,d){const p=(a===h?"❯ ":" ")+(f.selected?e.green(i.radioOn):i.radioOff)+" ";let g,m;if(f.disabled)g=a===h?e.gray(f.title):e.strikethrough().gray(f.title);else{if(f.heading)return g=f.title,g+e.gray(m||"");g=f.title,a===h&&f.description&&(m=` - ${f.description}`,(p.length+g.length+m.length>=this.out.columns||f.description.split(/\r?\n/).length>1)&&(m=`
`+o(f.description,{margin:p.length,width:this.out.columns})))}return p+g+e.gray(m||"")}paginateOptions(a){if(a.length===0)return e.red("No matches for this query.");let{startIndex:f,endIndex:h}=l(this.cursor,a.length,this.optionsPerPage),d,p=[];for(let g=f;g<h;g++)g===f&&f>0?d=i.arrowUp:g===h-1&&h<a.length?d=i.arrowDown:d=" ",p.push(this.renderOption(this.cursor,a[g],g,d));return`
`+p.join(`
`)}renderOptions(a){return this.done?"":this.paginateOptions(a)}renderDoneOrInstructions(){if(this.done)return"";const a=[e.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&a.push(e.yellow(this.warn)),a.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(t.hide),super.render();let a=[r.symbol(this.done,this.aborted),e.bold(this.msg),r.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(a+=e.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),a+=this.renderOptions(this.value),this.out.write(this.clear+a),this.clear=s(a,this.out.columns)}}return Bu=u,Bu}var Mu,Ly;function m2(){if(Ly)return Mu;Ly=1;const e=vr(),t=Zr(),{erase:n,cursor:s}=Er(),{style:i,clear:r,figures:o,wrap:l,entriesToDisplay:u}=Cr(),c=(d,p)=>d[p]&&(d[p].value||d[p].title||d[p]),a=(d,p)=>d[p]&&(d[p].title||d[p].value||d[p]),f=(d,p)=>{const g=d.findIndex(m=>m.value===p||m.title===p);return g>-1?g:void 0};class h extends t{constructor(p={}){super(p),this.msg=p.message,this.suggest=p.suggest,this.choices=p.choices,this.initial=typeof p.initial=="number"?p.initial:f(p.choices,p.initial),this.select=this.initial||p.cursor||0,this.i18n={noMatches:p.noMatches||"no matches found"},this.fallback=p.fallback||this.initial,this.clearFirst=p.clearFirst||!1,this.suggestions=[],this.input="",this.limit=p.limit||10,this.cursor=0,this.transform=i.render(p.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=r("",this.out.columns),this.complete(this.render),this.render()}set fallback(p){this._fb=Number.isSafeInteger(parseInt(p))?parseInt(p):p}get fallback(){let p;return typeof this._fb=="number"?p=this.choices[this._fb]:typeof this._fb=="string"&&(p={title:this._fb}),p||this._fb||{title:this.i18n.noMatches}}moveSelect(p){this.select=p,this.suggestions.length>0?this.value=c(this.suggestions,p):this.value=this.fallback.value,this.fire()}async complete(p){const g=this.completing=this.suggest(this.input,this.choices),m=await g;if(this.completing!==g)return;this.suggestions=m.map((_,y,E)=>({title:a(E,y),value:c(E,y),description:_.description})),this.completing=!1;const v=Math.max(m.length-1,0);this.moveSelect(Math.min(v,this.select)),p&&p()}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()}_(p,g){let m=this.input.slice(0,this.cursor),v=this.input.slice(this.cursor);this.input=`${m}${p}${v}`,this.cursor=m.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let p=this.input.slice(0,this.cursor-1),g=this.input.slice(this.cursor);this.input=`${p}${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 p=this.input.slice(0,this.cursor),g=this.input.slice(this.cursor+1);this.input=`${p}${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(p,g,m,v){let _,y=m?o.arrowUp:v?o.arrowDown:" ",E=g?e.cyan().underline(p.title):p.title;return y=(g?e.cyan(o.pointer)+" ":" ")+y,p.description&&(_=` - ${p.description}`,(y.length+E.length+_.length>=this.out.columns||p.description.split(/\r?\n/).length>1)&&(_=`
`+l(p.description,{margin:3,width:this.out.columns}))),y+" "+E+e.gray(_||"")}render(){if(this.closed)return;this.firstRender?this.out.write(s.hide):this.out.write(r(this.outputText,this.out.columns)),super.render();let{startIndex:p,endIndex:g}=u(this.select,this.choices.length,this.limit);if(this.outputText=[i.symbol(this.done,this.aborted,this.exited),e.bold(this.msg),i.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 m=this.suggestions.slice(p,g).map((v,_)=>this.renderOption(v,this.select===_+p,_===0&&p>0,_+p===g-1&&g<this.choices.length)).join(`
`);this.outputText+=`
`+(m||e.gray(this.fallback.title))}this.out.write(n.line+s.to(0)+this.outputText)}}return Mu=h,Mu}var qu,ky;function y2(){if(ky)return qu;ky=1;const e=vr(),{cursor:t}=Er(),n=PC(),{clear:s,style:i,figures:r}=Cr();class o extends n{constructor(u={}){u.overrideRender=!0,super(u),this.inputValue="",this.clear=s("",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(a=>this.inputValue?!!(typeof a.title=="string"&&a.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof a.value=="string"&&a.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);const c=this.filteredOptions.findIndex(a=>a===u);this.cursor=c<0?0:c,this.render()}handleSpaceToggle(){const u=this.filteredOptions[this.cursor];if(u.selected)u.selected=!1,this.render();else{if(u.disabled||this.value.filter(c=>c.selected).length>=this.maxChoices)return this.bell();u.selected=!0,this.render()}}handleInputChange(u){this.inputValue=this.inputValue+u,this.updateFilteredOptions()}_(u,c){u===" "?this.handleSpaceToggle():this.handleInputChange(u)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
Instructions:
${r.arrowUp}/${r.arrowDown}: Highlight option
${r.arrowLeft}/${r.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,c,a,f){const h=(c.selected?e.green(r.radioOn):r.radioOff)+" "+f+" ";let d;return c.disabled?d=u===a?e.gray().underline(c.title):e.strikethrough().gray(c.title):d=u===a?e.cyan().underline(c.title):c.title,h+d}renderDoneOrInstructions(){if(this.done)return this.value.filter(c=>c.selected).map(c=>c.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(t.hide),super.render();let u=[i.symbol(this.done,this.aborted),e.bold(this.msg),i.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=s(u,this.out.columns)}}return qu=o,qu}var ju,Ny;function v2(){if(Ny)return ju;Ny=1;const e=vr(),t=Zr(),{style:n,clear:s}=Cr(),{erase:i,cursor:r}=Er();class o extends t{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,c){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(r.hide):this.out.write(s(this.outputText,this.out.columns)),super.render();const u=this.aborted||this.done&&!this.value;this.outputText=[n.symbol(this.done,u),e.bold(this.msg),n.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(i.line+r.to(0)+this.outputText)}}return ju=o,ju}var Uu,Py;function E2(){return Py||(Py=1,Uu={TextPrompt:r2(),SelectPrompt:n2(),TogglePrompt:i2(),DatePrompt:p2(),NumberPrompt:g2(),MultiselectPrompt:PC(),AutocompletePrompt:m2(),AutocompleteMultiselectPrompt:y2(),ConfirmPrompt:v2()}),Uu}var $y;function b2(){return $y||($y=1,(function(e){const t=e,n=E2(),s=o=>o;function i(o,l,u={}){return new Promise((c,a)=>{const f=new n[o](l),h=u.onAbort||s,d=u.onSubmit||s,p=u.onExit||s;f.on("state",l.onState||s),f.on("submit",g=>c(d(g))),f.on("exit",g=>c(p(g))),f.on("abort",g=>a(h(g)))})}t.text=o=>i("TextPrompt",o),t.password=o=>(o.style="password",t.text(o)),t.invisible=o=>(o.style="invisible",t.text(o)),t.number=o=>i("NumberPrompt",o),t.date=o=>i("DatePrompt",o),t.confirm=o=>i("ConfirmPrompt",o),t.list=o=>{const l=o.separator||",";return i("TextPrompt",o,{onSubmit:u=>u.split(l).map(c=>c.trim())})},t.toggle=o=>i("TogglePrompt",o),t.select=o=>i("SelectPrompt",o),t.multiselect=o=>{o.choices=[].concat(o.choices||[]);const l=u=>u.filter(c=>c.selected).map(c=>c.value);return i("MultiselectPrompt",o,{onAbort:l,onSubmit:l})},t.autocompleteMultiselect=o=>{o.choices=[].concat(o.choices||[]);const l=u=>u.filter(c=>c.selected).map(c=>c.value);return i("AutocompleteMultiselectPrompt",o,{onAbort:l,onSubmit:l})};const r=(o,l)=>Promise.resolve(l.filter(u=>u.title.slice(0,o.length).toLowerCase()===o.toLowerCase()));t.autocomplete=o=>(o.suggest=o.suggest||r,o.choices=[].concat(o.choices||[]),i("AutocompletePrompt",o))})(lu)),lu}var Hu,By;function _2(){if(By)return Hu;By=1;const e=b2(),t=["suggest","format","onState","validate","onRender","type"],n=()=>{};async function s(l=[],{onSubmit:u=n,onCancel:c=n}={}){const a={},f=s._override||{};l=[].concat(l);let h,d,p,g,m,v;const _=async(y,E,b=!1)=>{if(!(!b&&y.validate&&y.validate(E)!==!0))return y.format?await y.format(E,a):E};for(d of l)if({name:g,type:m}=d,typeof m=="function"&&(m=await m(h,{...a},d),d.type=m),!!m){for(let y in d){if(t.includes(y))continue;let E=d[y];d[y]=typeof E=="function"?await E(h,{...a},v):E}if(v=d,typeof d.message!="string")throw new Error("prompt message is required");if({name:g,type:m}=d,e[m]===void 0)throw new Error(`prompt type (${m}) is not defined`);if(f[d.name]!==void 0&&(h=await _(d,f[d.name]),h!==void 0)){a[g]=h;continue}try{h=s._injected?i(s._injected,d.initial):await e[m](d),a[g]=h=await _(d,h,!0),p=await u(d,h,a)}catch{p=!await c(d,a)}if(p)return a}return a}function i(l,u){const c=l.shift();if(c instanceof Error)throw c;return c===void 0?u:c}function r(l){s._injected=(s._injected||[]).concat(l)}function o(l){s._override=Object.assign({},l)}return Hu=Object.assign(s,{prompt:s,prompts:e,inject:r,override:o}),Hu}var zu,My;function w2(){return My||(My=1,zu=_2()),zu}var D2=w2();const Qo=ft(D2),S2="npm-check-updates",A2="20.0.1",R2="Tomas Junnonen <tomas1@gmail.com>",C2="Apache-2.0",T2=["Raine Revere (https://github.com/raineorshine)","Imamuzzaki Abu Salam <imamuzzaki@gmail.com>"],O2="Find newer versions of dependencies than what your package.json allows",x2=["dependencies","npm","package.json","update","upgrade","versions"],F2={node:">=20.0.0",npm:">=8.12.1"},I2="build/index.js",L2="build/index.d.ts",k2={build:"rimraf build && npm run build:options && vite build","build:options":"vite-node src/scripts/build-options.ts","build:analyze":"rimraf build && npm run build:options && ANALYZER=true vite build",lint:"cross-env FORCE_COLOR=1 npm-run-all --parallel --aggregate-output lint:*","lint:lockfile":"lockfile-lint","lint:markdown":'markdownlint "**/*.md" --ignore "**/node_modules/**/*.md" --ignore build --config .markdownlint.js',"lint:src":"eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives",prepare:"src/scripts/install-hooks",prepublishOnly:"npm run build",prettier:"prettier . --check","prettier:fix":"prettier . --write",test:"npm run test:unit && npm run test:e2e","test:bun":"test/bun-install.sh && mocha test/bun","test:unit":"mocha test test/package-managers/*","test:e2e":"./test/e2e.sh",ncu:"node build/cli.js"},N2={"npm-check-updates":"build/cli.js",ncu:"build/cli.js"},P2={type:"git",url:"git+https://github.com/raineorshine/npm-check-updates.git"},$2="https://github.com/raineorshine/npm-check-updates",B2={url:"https://github.com/raineorshine/npm-check-updates/issues"},M2={"@yarnpkg/parsers":"3.0.3","@verdaccio/local-storage-legacy":{"@verdaccio/core":">=8.0.0-next-8.33"},"brace-expansion":">=5.0.5","diff@4":">=4.0.4","diff@6":">=8.0.3","diff@7":">=8.0.3","diff@8":">=8.0.3",eslint:"$eslint","@eslint/js":"$@eslint/js","eslint-plugin-n":"$eslint-plugin-n","eslint-plugin-promise":"$eslint-plugin-promise",flatted:">=3.4.2","glob@10":">=10.5.0","glob@11":">=11.1.0",handlebars:">=4.7.9",ip:"2.0.1",jsonparse:"github:ARitz-Cracker/jsonparse#patch-1",lodash:"$lodash","minimatch@3":">=3.1.3","minimatch@7":">=7.4.8","minimatch@9":">=9.0.7","minimatch@10":">=10.2.3","picomatch@2":">=2.3.2",qs:">=6.14.2",rollup:">=4.59.0","serialize-javascript":">=7.0.3","smol-toml":">=1.6.1"},q2={"@eslint/compat":"2.0.3","@eslint/js":"10.0.1","@streamparser/json":"^0.0.22","@trivago/prettier-plugin-sort-imports":"^6.0.2","@types/bun":"^1.3.11","@types/chai":"^4.3.19","@types/chai-as-promised":"7.1.8","@types/chai-string":"^1.4.5","@types/cli-table":"^0.3.4","@types/hosted-git-info":"^3.0.5","@types/ini":"^4.1.1","@types/js-yaml":"^4.0.9","@types/jsonlines":"^0.1.5","@types/lodash":"^4.17.24","@types/mocha":"^10.0.10","@types/node":"^25.5.0","@types/npm-registry-fetch":"^8.0.9","@types/parse-github-url":"^1.0.3","@types/picomatch":"^4.0.2","@types/progress":"^2.0.7","@types/prompts":"^2.4.9","@types/semver":"^7.7.1","@types/semver-utils":"^1.1.3","@types/sinon":"^21.0.0","@types/update-notifier":"^6.0.8","@typescript-eslint/eslint-plugin":"8.57.2","@typescript-eslint/parser":"8.57.2",camelcase:"^6.3.0",chai:"^4.3.10","chai-as-promised":"^7.1.2","chai-string":"^1.6.0",chalk:"^5.6.2","cli-table3":"^0.6.5",commander:"^14.0.3","cross-env":"^10.1.0",dequal:"^2.0.3",eslint:"10.1.0","eslint-config-prettier":"10.1.8","eslint-config-raine":"0.5.0","eslint-config-standard":"17.1.0","eslint-import-resolver-typescript":"4.4.4","eslint-plugin-import-x":"4.16.2","eslint-plugin-jsdoc":"61.7.1","eslint-plugin-n":"17.24.0","eslint-plugin-promise":"7.2.1","fast-glob":"^3.3.3","fast-memoize":"^2.5.2","find-up":"5.0.0","fp-and-or":"^1.0.2",globals:"17.4.0","hosted-git-info":"^9.0.2",ini:"^6.0.0","js-yaml":"^4.1.1","jsonc-parser":"^3.3.1",jsonlines:"^0.1.1","lockfile-lint":"^5.0.0",lodash:"^4.17.23","markdownlint-cli":"^0.48.0",mocha:"^11.7.5","npm-registry-fetch":"^19.1.1","npm-run-all":"^4.1.5","p-map":"^4.0.0","parse-github-url":"^1.0.4",picomatch:"^4.0.4",prettier:"^3.8.1",progress:"^2.0.3","prompts-ncu":"^3.0.2","rc-config-loader":"^4.1.4",rfdc:"^1.4.1",rimraf:"^6.1.3","rollup-plugin-node-externals":"^8.1.2",semver:"^7.7.4","semver-utils":"^1.1.4",should:"^13.2.3",sinon:"^21.0.3","source-map-support":"^0.5.21","spawn-please":"^3.0.0","strip-ansi":"^7.2.0","ts-node":"^10.9.2",typescript:"^5.9.2","typescript-json-schema":"^0.67.1",untildify:"^4.0.0","update-notifier":"^7.3.1",verdaccio:"6.3.2",vite:"^7.1.7","vite-bundle-analyzer":"^1.3.6","vite-node":"^5.3.0","vite-plugin-dts":"^4.5.4",yaml:"^2.8.3",yarn:"^1.22.22",zod:"^4.3.6"},j2=["build","!**/test/**"],U2={"check-leaks":!0,extension:["test.ts"],require:["source-map-support/register","ts-node/register"],timeout:6e4,"trace-deprecation":!0,"trace-warnings":!0,use_strict:!0},ea={name:S2,version:A2,author:R2,license:C2,contributors:T2,description:O2,keywords:x2,engines:F2,main:I2,types:L2,scripts:k2,bin:N2,repository:P2,homepage:$2,bugs:B2,overrides:M2,devDependencies:q2,files:j2,"lockfile-lint":{"allowed-schemes":["https:","git+ssh:"],"allowed-hosts":["npm","github.com"],"empty-hostname":!1,type:"npm ",path:"package-lock.json"},mocha:U2};var Gu,qy;function Om(){if(qy)return Gu;qy=1;let e=[],t=0;const n=(s,i)=>{t>=i&&e.push(s)};return n.WARN=1,n.INFO=2,n.DEBUG=3,n.reset=()=>{e=[]},n.setDebugLevel=s=>{t=s},n.warn=s=>n(s,n.WARN),n.info=s=>n(s,n.INFO),n.debug=s=>n(s,n.DEBUG),n.debugMessages=()=>e,Gu=n,Gu}var Ls={exports:{}},Wu,jy;function H2(){return jy||(jy=1,Wu=({onlyFirst:e=!1}={})=>{const t=["[\\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(t,e?void 0:"g")}),Wu}var Vu,Uy;function z2(){if(Uy)return Vu;Uy=1;const e=H2();return Vu=t=>typeof t=="string"?t.replace(e(),""):t,Vu}var ks={exports:{}},Hy;function $C(){if(Hy)return ks.exports;Hy=1;const e=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);return ks.exports=e,ks.exports.default=e,ks.exports}var Yu,zy;function G2(){return zy||(zy=1,Yu=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\uD