@clack/prompts
Advanced tools
+13
-0
| # @clack/prompts | ||
| ## 1.0.0-alpha.6 | ||
| ### Minor Changes | ||
| - 8409f2c: feat: add styleFrame option for spinner | ||
| ### Patch Changes | ||
| - aea4573: Clamp scrolling windows to 5 rows. | ||
| - b103ad3: Allow disabled options in multi-select and select prompts. | ||
| - Updated dependencies [b103ad3] | ||
| - @clack/core@1.0.0-alpha.6 | ||
| ## 1.0.0-alpha.5 | ||
@@ -4,0 +17,0 @@ |
+16
-1
@@ -60,2 +60,9 @@ import { State, AutocompletePrompt } from '@clack/core'; | ||
| hint?: string; | ||
| /** | ||
| * Whether this option is disabled. | ||
| * Disabled options are visible but cannot be selected. | ||
| * | ||
| * By default, options are not disabled. | ||
| */ | ||
| disabled?: boolean; | ||
| } : { | ||
@@ -77,2 +84,9 @@ /** | ||
| hint?: string; | ||
| /** | ||
| * Whether this option is disabled. | ||
| * Disabled options are visible but cannot be selected. | ||
| * | ||
| * By default, options are not disabled. | ||
| */ | ||
| disabled?: boolean; | ||
| }; | ||
@@ -263,2 +277,3 @@ interface SelectOptions<Value> extends CommonOptions { | ||
| delay?: number; | ||
| styleFrame?: (frame: string) => string; | ||
| } | ||
@@ -271,3 +286,3 @@ interface SpinnerResult { | ||
| } | ||
| declare const spinner: ({ indicator, onCancel, output, cancelMessage, errorMessage, frames, delay, signal, }?: SpinnerOptions) => SpinnerResult; | ||
| declare const spinner: ({ indicator, onCancel, output, cancelMessage, errorMessage, frames, delay, signal, ...opts }?: SpinnerOptions) => SpinnerResult; | ||
@@ -274,0 +289,0 @@ interface ProgressOptions extends SpinnerOptions { |
+103
-103
@@ -1,123 +0,123 @@ | ||
| import{getColumns as H,getRows as Je,AutocompletePrompt as ye,ConfirmPrompt as Xe,isCancel as Ye,GroupMultiSelectPrompt as ze,MultiSelectPrompt as Ze,PasswordPrompt as Qe,block as et,settings as Ee,SelectPrompt as tt,SelectKeyPrompt as st,TextPrompt as rt}from"@clack/core";export{isCancel,settings,updateSettings}from"@clack/core";import t from"picocolors";import N from"node:process";import{readdirSync as it,existsSync as nt,lstatSync as ve}from"node:fs";import{dirname as Ae,join as at}from"node:path";import{cursor as Ce,erase as Ie}from"sisteransi";import{stripVTControlCharacters as se}from"node:util";function ot(){return N.platform!=="win32"?N.env.TERM!=="linux":!!N.env.CI||!!N.env.WT_SESSION||!!N.env.TERMINUS_SUBLIME||N.env.ConEmuTask==="{cmd::Cmder}"||N.env.TERM_PROGRAM==="Terminus-Sublime"||N.env.TERM_PROGRAM==="vscode"||N.env.TERM==="xterm-256color"||N.env.TERM==="alacritty"||N.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}const J=ot(),re=()=>process.env.CI==="true",Se=e=>e.isTTY===!0,S=(e,r)=>J?e:r,we=S("\u25C6","*"),ie=S("\u25A0","x"),ne=S("\u25B2","x"),W=S("\u25C7","o"),ae=S("\u250C","T"),c=S("\u2502","|"),b=S("\u2514","\u2014"),Be=S("\u2510","T"),xe=S("\u2518","\u2014"),U=S("\u25CF",">"),K=S("\u25CB"," "),X=S("\u25FB","[\u2022]"),P=S("\u25FC","[+]"),Y=S("\u25FB","[ ]"),be=S("\u25AA","\u2022"),z=S("\u2500","-"),oe=S("\u256E","+"),_e=S("\u251C","+"),le=S("\u256F","+"),De=S("\u2570","+"),Te=S("\u256D","+"),ue=S("\u25CF","\u2022"),ce=S("\u25C6","*"),$e=S("\u25B2","!"),de=S("\u25A0","x"),L=e=>{switch(e){case"initial":case"active":return t.cyan(we);case"cancel":return t.red(ie);case"error":return t.yellow(ne);case"submit":return t.green(W)}},lt=e=>e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109,ut=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,ct=e=>e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141,he=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,Z=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Q=/\t{1,1000}/y,me=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,ee=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,$t=/\p{M}+/gu,dt={limit:1/0,ellipsis:""},Re=(e,r={},s={})=>{const i=r.limit??1/0,n=r.ellipsis??"",o=r?.ellipsisWidth??(n?Re(n,dt,s).width:0),u=s.ansiWidth??0,l=s.controlWidth??0,a=s.tabWidth??8,m=s.ambiguousWidth??1,E=s.emojiWidth??2,y=s.fullWidthWidth??2,F=s.regularWidth??1,p=s.wideWidth??2;let h=0,d=0,$=e.length,g=0,f=!1,v=$,w=Math.max(0,i-o),B=0,x=0,A=0,C=0;e:for(;;){if(x>B||d>=$&&d>h){const _=e.slice(B,x)||e.slice(h,d);g=0;for(const D of _.replaceAll($t,"")){const I=D.codePointAt(0)||0;if(ut(I)?C=y:ct(I)?C=p:m!==F&<(I)?C=m:C=F,A+C>w&&(v=Math.min(v,Math.max(B,h)+g)),A+C>i){f=!0;break e}g+=D.length,A+=C}B=x=0}if(d>=$)break;if(ee.lastIndex=d,ee.test(e)){if(g=ee.lastIndex-d,C=g*F,A+C>w&&(v=Math.min(v,d+Math.floor((w-A)/F))),A+C>i){f=!0;break}A+=C,B=h,x=d,d=h=ee.lastIndex;continue}if(he.lastIndex=d,he.test(e)){if(A+u>w&&(v=Math.min(v,d)),A+u>i){f=!0;break}A+=u,B=h,x=d,d=h=he.lastIndex;continue}if(Z.lastIndex=d,Z.test(e)){if(g=Z.lastIndex-d,C=g*l,A+C>w&&(v=Math.min(v,d+Math.floor((w-A)/l))),A+C>i){f=!0;break}A+=C,B=h,x=d,d=h=Z.lastIndex;continue}if(Q.lastIndex=d,Q.test(e)){if(g=Q.lastIndex-d,C=g*a,A+C>w&&(v=Math.min(v,d+Math.floor((w-A)/a))),A+C>i){f=!0;break}A+=C,B=h,x=d,d=h=Q.lastIndex;continue}if(me.lastIndex=d,me.test(e)){if(A+E>w&&(v=Math.min(v,d)),A+E>i){f=!0;break}A+=E,B=h,x=d,d=h=me.lastIndex;continue}d+=1}return{width:f?w:A,index:f?v:$,truncated:f,ellipsed:f&&i>=o}},ht={limit:1/0,ellipsis:"",ellipsisWidth:0},M=(e,r={})=>Re(e,ht,r).width,te="\x1B",Me="\x9B",mt=39,pe="\x07",Oe="[",pt="]",Ne="m",ge=`${pt}8;;`,Le=new RegExp(`(?:\\${Oe}(?<code>\\d+)m|\\${ge}(?<uri>.*)${pe})`,"y"),gt=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},We=e=>`${te}${Oe}${e}${Ne}`,Pe=e=>`${te}${ge}${e}${pe}`,ft=e=>e.map(r=>M(r)),fe=(e,r,s)=>{const i=r[Symbol.iterator]();let n=!1,o=!1,u=e.at(-1),l=u===void 0?0:M(u),a=i.next(),m=i.next(),E=0;for(;!a.done;){const y=a.value,F=M(y);l+F<=s?e[e.length-1]+=y:(e.push(y),l=0),(y===te||y===Me)&&(n=!0,o=r.startsWith(ge,E+1)),n?o?y===pe&&(n=!1,o=!1):y===Ne&&(n=!1):(l+=F,l===s&&!m.done&&(e.push(""),l=0)),a=m,m=i.next(),E+=y.length}u=e.at(-1),!l&&u!==void 0&&u.length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Ft=e=>{const r=e.split(" ");let s=r.length;for(;s>0&&!(M(r[s-1])>0);)s--;return s===r.length?e:r.slice(0,s).join(" ")+r.slice(s).join("")},yt=(e,r,s={})=>{if(s.trim!==!1&&e.trim()==="")return"";let i="",n,o;const u=e.split(" "),l=ft(u);let a=[""];for(const[h,d]of u.entries()){s.trim!==!1&&(a[a.length-1]=(a.at(-1)??"").trimStart());let $=M(a.at(-1)??"");if(h!==0&&($>=r&&(s.wordWrap===!1||s.trim===!1)&&(a.push(""),$=0),($>0||s.trim===!1)&&(a[a.length-1]+=" ",$++)),s.hard&&l[h]>r){const g=r-$,f=1+Math.floor((l[h]-g-1)/r);Math.floor((l[h]-1)/r)<f&&a.push(""),fe(a,d,r);continue}if($+l[h]>r&&$>0&&l[h]>0){if(s.wordWrap===!1&&$<r){fe(a,d,r);continue}a.push("")}if($+l[h]>r&&s.wordWrap===!1){fe(a,d,r);continue}a[a.length-1]+=d}s.trim!==!1&&(a=a.map(h=>Ft(h)));const m=a.join(` | ||
| `),E=m[Symbol.iterator]();let y=E.next(),F=E.next(),p=0;for(;!y.done;){const h=y.value,d=F.value;if(i+=h,h===te||h===Me){Le.lastIndex=p+1;const f=Le.exec(m)?.groups;if(f?.code!==void 0){const v=Number.parseFloat(f.code);n=v===mt?void 0:v}else f?.uri!==void 0&&(o=f.uri.length===0?void 0:f.uri)}const $=n?gt(n):void 0;d===` | ||
| `?(o&&(i+=Pe("")),n&&$&&(i+=We($))):h===` | ||
| `&&(n&&$&&(i+=We(n)),o&&(i+=Pe(o))),p+=h.length,y=F,F=E.next()}return i};function k(e,r,s){return String(e).normalize().replaceAll(`\r | ||
| import{getColumns as q,getRows as Ye,AutocompletePrompt as ve,ConfirmPrompt as ze,isCancel as Ze,GroupMultiSelectPrompt as Qe,MultiSelectPrompt as et,PasswordPrompt as tt,block as st,settings as Ae,SelectPrompt as rt,SelectKeyPrompt as it,TextPrompt as nt}from"@clack/core";export{isCancel,settings,updateSettings}from"@clack/core";import t from"picocolors";import N from"node:process";import{readdirSync as at,existsSync as ot,lstatSync as Ce}from"node:fs";import{dirname as Ie,join as lt}from"node:path";import{cursor as Se,erase as we}from"sisteransi";import{stripVTControlCharacters as ie}from"node:util";function ut(){return N.platform!=="win32"?N.env.TERM!=="linux":!!N.env.CI||!!N.env.WT_SESSION||!!N.env.TERMINUS_SUBLIME||N.env.ConEmuTask==="{cmd::Cmder}"||N.env.TERM_PROGRAM==="Terminus-Sublime"||N.env.TERM_PROGRAM==="vscode"||N.env.TERM==="xterm-256color"||N.env.TERM==="alacritty"||N.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}const z=ut(),ne=()=>process.env.CI==="true",Be=e=>e.isTTY===!0,I=(e,i)=>z?e:i,be=I("\u25C6","*"),ae=I("\u25A0","x"),oe=I("\u25B2","x"),W=I("\u25C7","o"),le=I("\u250C","T"),d=I("\u2502","|"),x=I("\u2514","\u2014"),xe=I("\u2510","T"),_e=I("\u2518","\u2014"),J=I("\u25CF",">"),H=I("\u25CB"," "),Z=I("\u25FB","[\u2022]"),j=I("\u25FC","[+]"),X=I("\u25FB","[ ]"),De=I("\u25AA","\u2022"),Q=I("\u2500","-"),ue=I("\u256E","+"),Te=I("\u251C","+"),ce=I("\u256F","+"),Me=I("\u2570","+"),Re=I("\u256D","+"),de=I("\u25CF","\u2022"),$e=I("\u25C6","*"),he=I("\u25B2","!"),me=I("\u25A0","x"),L=e=>{switch(e){case"initial":case"active":return t.cyan(be);case"cancel":return t.red(ae);case"error":return t.yellow(oe);case"submit":return t.green(W)}},ct=e=>e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109,dt=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,$t=e=>e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141,pe=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,ee=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,te=/\t{1,1000}/y,ge=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,se=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,ht=/\p{M}+/gu,mt={limit:1/0,ellipsis:""},Oe=(e,i={},s={})=>{const r=i.limit??1/0,n=i.ellipsis??"",o=i?.ellipsisWidth??(n?Oe(n,mt,s).width:0),l=s.ansiWidth??0,u=s.controlWidth??0,a=s.tabWidth??8,h=s.ambiguousWidth??1,y=s.emojiWidth??2,E=s.fullWidthWidth??2,f=s.regularWidth??1,F=s.wideWidth??2;let c=0,m=0,$=e.length,p=0,g=!1,v=$,S=Math.max(0,r-o),w=0,b=0,A=0,C=0;e:for(;;){if(b>w||m>=$&&m>c){const _=e.slice(w,b)||e.slice(c,m);p=0;for(const D of _.replaceAll(ht,"")){const T=D.codePointAt(0)||0;if(dt(T)?C=E:$t(T)?C=F:h!==f&&ct(T)?C=h:C=f,A+C>S&&(v=Math.min(v,Math.max(w,c)+p)),A+C>r){g=!0;break e}p+=D.length,A+=C}w=b=0}if(m>=$)break;if(se.lastIndex=m,se.test(e)){if(p=se.lastIndex-m,C=p*f,A+C>S&&(v=Math.min(v,m+Math.floor((S-A)/f))),A+C>r){g=!0;break}A+=C,w=c,b=m,m=c=se.lastIndex;continue}if(pe.lastIndex=m,pe.test(e)){if(A+l>S&&(v=Math.min(v,m)),A+l>r){g=!0;break}A+=l,w=c,b=m,m=c=pe.lastIndex;continue}if(ee.lastIndex=m,ee.test(e)){if(p=ee.lastIndex-m,C=p*u,A+C>S&&(v=Math.min(v,m+Math.floor((S-A)/u))),A+C>r){g=!0;break}A+=C,w=c,b=m,m=c=ee.lastIndex;continue}if(te.lastIndex=m,te.test(e)){if(p=te.lastIndex-m,C=p*a,A+C>S&&(v=Math.min(v,m+Math.floor((S-A)/a))),A+C>r){g=!0;break}A+=C,w=c,b=m,m=c=te.lastIndex;continue}if(ge.lastIndex=m,ge.test(e)){if(A+y>S&&(v=Math.min(v,m)),A+y>r){g=!0;break}A+=y,w=c,b=m,m=c=ge.lastIndex;continue}m+=1}return{width:g?S:A,index:g?v:$,truncated:g,ellipsed:g&&r>=o}},pt={limit:1/0,ellipsis:"",ellipsisWidth:0},M=(e,i={})=>Oe(e,pt,i).width,re="\x1B",Ne="\x9B",gt=39,fe="\x07",Pe="[",ft="]",Le="m",Fe=`${ft}8;;`,We=new RegExp(`(?:\\${Pe}(?<code>\\d+)m|\\${Fe}(?<uri>.*)${fe})`,"y"),Ft=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},je=e=>`${re}${Pe}${e}${Le}`,Ve=e=>`${re}${Fe}${e}${fe}`,yt=e=>e.map(i=>M(i)),ye=(e,i,s)=>{const r=i[Symbol.iterator]();let n=!1,o=!1,l=e.at(-1),u=l===void 0?0:M(l),a=r.next(),h=r.next(),y=0;for(;!a.done;){const E=a.value,f=M(E);u+f<=s?e[e.length-1]+=E:(e.push(E),u=0),(E===re||E===Ne)&&(n=!0,o=i.startsWith(Fe,y+1)),n?o?E===fe&&(n=!1,o=!1):E===Le&&(n=!1):(u+=f,u===s&&!h.done&&(e.push(""),u=0)),a=h,h=r.next(),y+=E.length}l=e.at(-1),!u&&l!==void 0&&l.length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Et=e=>{const i=e.split(" ");let s=i.length;for(;s>0&&!(M(i[s-1])>0);)s--;return s===i.length?e:i.slice(0,s).join(" ")+i.slice(s).join("")},vt=(e,i,s={})=>{if(s.trim!==!1&&e.trim()==="")return"";let r="",n,o;const l=e.split(" "),u=yt(l);let a=[""];for(const[c,m]of l.entries()){s.trim!==!1&&(a[a.length-1]=(a.at(-1)??"").trimStart());let $=M(a.at(-1)??"");if(c!==0&&($>=i&&(s.wordWrap===!1||s.trim===!1)&&(a.push(""),$=0),($>0||s.trim===!1)&&(a[a.length-1]+=" ",$++)),s.hard&&u[c]>i){const p=i-$,g=1+Math.floor((u[c]-p-1)/i);Math.floor((u[c]-1)/i)<g&&a.push(""),ye(a,m,i);continue}if($+u[c]>i&&$>0&&u[c]>0){if(s.wordWrap===!1&&$<i){ye(a,m,i);continue}a.push("")}if($+u[c]>i&&s.wordWrap===!1){ye(a,m,i);continue}a[a.length-1]+=m}s.trim!==!1&&(a=a.map(c=>Et(c)));const h=a.join(` | ||
| `),y=h[Symbol.iterator]();let E=y.next(),f=y.next(),F=0;for(;!E.done;){const c=E.value,m=f.value;if(r+=c,c===re||c===Ne){We.lastIndex=F+1;const g=We.exec(h)?.groups;if(g?.code!==void 0){const v=Number.parseFloat(g.code);n=v===gt?void 0:v}else g?.uri!==void 0&&(o=g.uri.length===0?void 0:g.uri)}const $=n?Ft(n):void 0;m===` | ||
| `?(o&&(r+=Ve("")),n&&$&&(r+=je($))):c===` | ||
| `&&(n&&$&&(r+=je(n)),o&&(r+=Ve(o))),F+=c.length,E=f,f=y.next()}return r};function U(e,i,s){return String(e).normalize().replaceAll(`\r | ||
| `,` | ||
| `).split(` | ||
| `).map(i=>yt(i,r,s)).join(` | ||
| `)}const Et=(e,r,s,i,n)=>{let o=r,u=0;for(let l=s;l<i;l++){const a=e[l];if(o=o-a.length,u++,o<=n)break}return{lineCount:o,removals:u}},G=e=>{const{cursor:r,options:s,style:i}=e,n=e.output??process.stdout,o=H(n),u=e.columnPadding??0,l=e.rowPadding??4,a=o-u,m=Je(n),E=t.dim("..."),y=e.maxItems??Number.POSITIVE_INFINITY,F=Math.max(m-l,0),p=Math.max(y,5);let h=0;r>=p-3&&(h=Math.max(Math.min(r-p+3,s.length-p),0));let d=p<s.length&&h>0,$=p<s.length&&h+p<s.length;const g=Math.min(h+p,s.length),f=[];let v=0;d&&v++,$&&v++;const w=h+(d?1:0),B=g-($?1:0);for(let A=w;A<B;A++){const C=k(i(s[A],A===r),a).split(` | ||
| `);f.push(C),v+=C.length}if(v>F){let A=0,C=0,_=v;const D=r-w,I=(T,R)=>Et(f,_,T,R,F);d?({lineCount:_,removals:A}=I(0,D),_>F&&({lineCount:_,removals:C}=I(D+1,f.length))):({lineCount:_,removals:C}=I(D+1,f.length),_>F&&({lineCount:_,removals:A}=I(0,D))),A>0&&(d=!0,f.splice(0,A)),C>0&&($=!0,f.splice(f.length-C,C))}const x=[];d&&x.push(E);for(const A of f)for(const C of A)x.push(C);return $&&x.push(E),x};function je(e){return e.label??String(e.value??"")}function Ve(e,r){if(!e)return!0;const s=(r.label??String(r.value??"")).toLowerCase(),i=(r.hint??"").toLowerCase(),n=String(r.value).toLowerCase(),o=e.toLowerCase();return s.includes(o)||i.includes(o)||n.includes(o)}function vt(e,r){const s=[];for(const i of r)e.includes(i.value)&&s.push(i);return s}const ke=e=>new ye({options:e.options,initialValue:e.initialValue?[e.initialValue]:void 0,initialUserInput:e.initialUserInput,filter:(r,s)=>Ve(r,s),signal:e.signal,input:e.input,output:e.output,validate:e.validate,render(){const r=[`${t.gray(c)}`,`${L(this.state)} ${e.message}`],s=this.userInput,i=String(this.value??""),n=this.options,o=e.placeholder,u=i===""&&o!==void 0;switch(this.state){case"submit":{const l=vt(this.selectedValues,n),a=l.length>0?` ${t.dim(l.map(je).join(", "))}`:"";return`${r.join(` | ||
| `).map(r=>vt(r,i,s)).join(` | ||
| `)}const At=(e,i,s,r,n)=>{let o=i,l=0;for(let u=s;u<r;u++){const a=e[u];if(o=o-a.length,l++,o<=n)break}return{lineCount:o,removals:l}},K=e=>{const{cursor:i,options:s,style:r}=e,n=e.output??process.stdout,o=q(n),l=e.columnPadding??0,u=e.rowPadding??4,a=o-l,h=Ye(n),y=t.dim("..."),E=e.maxItems??Number.POSITIVE_INFINITY,f=Math.max(h-u,0),F=Math.max(Math.min(E,f),5);let c=0;i>=F-3&&(c=Math.max(Math.min(i-F+3,s.length-F),0));let m=F<s.length&&c>0,$=F<s.length&&c+F<s.length;const p=Math.min(c+F,s.length),g=[];let v=0;m&&v++,$&&v++;const S=c+(m?1:0),w=p-($?1:0);for(let A=S;A<w;A++){const C=U(r(s[A],A===i),a,{hard:!0,trim:!1}).split(` | ||
| `);g.push(C),v+=C.length}if(v>f){let A=0,C=0,_=v;const D=i-S,T=(k,B)=>At(g,_,k,B,f);m?({lineCount:_,removals:A}=T(0,D),_>f&&({lineCount:_,removals:C}=T(D+1,g.length))):({lineCount:_,removals:C}=T(D+1,g.length),_>f&&({lineCount:_,removals:A}=T(0,D))),A>0&&(m=!0,g.splice(0,A)),C>0&&($=!0,g.splice(g.length-C,C))}const b=[];m&&b.push(y);for(const A of g)for(const C of A)b.push(C);return $&&b.push(y),b};function ke(e){return e.label??String(e.value??"")}function Ge(e,i){if(!e)return!0;const s=(i.label??String(i.value??"")).toLowerCase(),r=(i.hint??"").toLowerCase(),n=String(i.value).toLowerCase(),o=e.toLowerCase();return s.includes(o)||r.includes(o)||n.includes(o)}function Ct(e,i){const s=[];for(const r of i)e.includes(r.value)&&s.push(r);return s}const He=e=>new ve({options:e.options,initialValue:e.initialValue?[e.initialValue]:void 0,initialUserInput:e.initialUserInput,filter:(i,s)=>Ge(i,s),signal:e.signal,input:e.input,output:e.output,validate:e.validate,render(){const i=[`${t.gray(d)}`,`${L(this.state)} ${e.message}`],s=this.userInput,r=String(this.value??""),n=this.options,o=e.placeholder,l=r===""&&o!==void 0;switch(this.state){case"submit":{const u=Ct(this.selectedValues,n),a=u.length>0?` ${t.dim(u.map(ke).join(", "))}`:"";return`${i.join(` | ||
| `)} | ||
| ${t.gray(c)}${a}`}case"cancel":{const l=s?` ${t.strikethrough(t.dim(s))}`:"";return`${r.join(` | ||
| ${t.gray(d)}${a}`}case"cancel":{const u=s?` ${t.strikethrough(t.dim(s))}`:"";return`${i.join(` | ||
| `)} | ||
| ${t.gray(c)}${l}`}default:{let l="";if(this.isNavigating||u){const h=u?o:s;l=h!==""?` ${t.dim(h)}`:""}else l=` ${this.userInputWithCursor}`;const a=this.filteredOptions.length!==n.length?t.dim(` (${this.filteredOptions.length} match${this.filteredOptions.length===1?"":"es"})`):"",m=this.filteredOptions.length===0&&s?[`${t.cyan(c)} ${t.yellow("No matches found")}`]:[],E=this.state==="error"?[`${t.yellow(c)} ${t.yellow(this.error)}`]:[];r.push(`${t.cyan(c)}`,`${t.cyan(c)} ${t.dim("Search:")}${l}${a}`,...m,...E);const y=[`${t.dim("\u2191/\u2193")} to select`,`${t.dim("Enter:")} confirm`,`${t.dim("Type:")} to search`],F=[`${t.cyan(c)} ${t.dim(y.join(" \u2022 "))}`,`${t.cyan(b)}`],p=this.filteredOptions.length===0?[]:G({cursor:this.cursor,options:this.filteredOptions,columnPadding:3,rowPadding:r.length+F.length,style:(h,d)=>{const $=je(h),g=h.hint&&h.value===this.focusedValue?t.dim(` (${h.hint})`):"";return d?`${t.green(U)} ${$}${g}`:`${t.dim(K)} ${t.dim($)}${g}`},maxItems:e.maxItems,output:e.output});return[...r,...p.map(h=>`${t.cyan(c)} ${h}`),...F].join(` | ||
| `)}}}}).prompt(),At=e=>{const r=(i,n,o,u)=>{const l=o.includes(i.value),a=i.label??String(i.value??""),m=i.hint&&u!==void 0&&i.value===u?t.dim(` (${i.hint})`):"",E=l?t.green(P):t.dim(Y);return n?`${E} ${a}${m}`:`${E} ${t.dim(a)}`},s=new ye({options:e.options,multiple:!0,filter:(i,n)=>Ve(i,n),validate:()=>{if(e.required&&s.selectedValues.length===0)return"Please select at least one item"},initialValue:e.initialValues,signal:e.signal,input:e.input,output:e.output,render(){const i=`${t.gray(c)} | ||
| ${t.gray(d)}${u}`}default:{let u="";if(this.isNavigating||l){const c=l?o:s;u=c!==""?` ${t.dim(c)}`:""}else u=` ${this.userInputWithCursor}`;const a=this.filteredOptions.length!==n.length?t.dim(` (${this.filteredOptions.length} match${this.filteredOptions.length===1?"":"es"})`):"",h=this.filteredOptions.length===0&&s?[`${t.cyan(d)} ${t.yellow("No matches found")}`]:[],y=this.state==="error"?[`${t.yellow(d)} ${t.yellow(this.error)}`]:[];i.push(`${t.cyan(d)}`,`${t.cyan(d)} ${t.dim("Search:")}${u}${a}`,...h,...y);const E=[`${t.dim("\u2191/\u2193")} to select`,`${t.dim("Enter:")} confirm`,`${t.dim("Type:")} to search`],f=[`${t.cyan(d)} ${t.dim(E.join(" \u2022 "))}`,`${t.cyan(x)}`],F=this.filteredOptions.length===0?[]:K({cursor:this.cursor,options:this.filteredOptions,columnPadding:3,rowPadding:i.length+f.length,style:(c,m)=>{const $=ke(c),p=c.hint&&c.value===this.focusedValue?t.dim(` (${c.hint})`):"";return m?`${t.green(J)} ${$}${p}`:`${t.dim(H)} ${t.dim($)}${p}`},maxItems:e.maxItems,output:e.output});return[...i,...F.map(c=>`${t.cyan(d)} ${c}`),...f].join(` | ||
| `)}}}}).prompt(),It=e=>{const i=(r,n,o,l)=>{const u=o.includes(r.value),a=r.label??String(r.value??""),h=r.hint&&l!==void 0&&r.value===l?t.dim(` (${r.hint})`):"",y=u?t.green(j):t.dim(X);return n?`${y} ${a}${h}`:`${y} ${t.dim(a)}`},s=new ve({options:e.options,multiple:!0,filter:(r,n)=>Ge(r,n),validate:()=>{if(e.required&&s.selectedValues.length===0)return"Please select at least one item"},initialValue:e.initialValues,signal:e.signal,input:e.input,output:e.output,render(){const r=`${t.gray(d)} | ||
| ${L(this.state)} ${e.message} | ||
| `,n=this.userInput,o=e.placeholder,u=n===""&&o!==void 0,l=this.isNavigating||u?t.dim(u?o:n):this.userInputWithCursor,a=this.options,m=this.filteredOptions.length!==a.length?t.dim(` (${this.filteredOptions.length} match${this.filteredOptions.length===1?"":"es"})`):"";switch(this.state){case"submit":return`${i}${t.gray(c)} ${t.dim(`${this.selectedValues.length} items selected`)}`;case"cancel":return`${i}${t.gray(c)} ${t.strikethrough(t.dim(n))}`;default:{const E=[`${t.dim("\u2191/\u2193")} to navigate`,`${t.dim(this.isNavigating?"Space/Tab:":"Tab:")} select`,`${t.dim("Enter:")} confirm`,`${t.dim("Type:")} to search`],y=this.filteredOptions.length===0&&n?[`${t.cyan(c)} ${t.yellow("No matches found")}`]:[],F=this.state==="error"?[`${t.cyan(c)} ${t.yellow(this.error)}`]:[],p=G({cursor:this.cursor,options:this.filteredOptions,style:(h,d)=>r(h,d,this.selectedValues,this.focusedValue),maxItems:e.maxItems,output:e.output});return[i,`${t.cyan(c)} ${t.dim("Search:")} ${l}${m}`,...y,...F,...p.map(h=>`${t.cyan(c)} ${h}`),`${t.cyan(c)} ${t.dim(E.join(" \u2022 "))}`,`${t.cyan(b)}`].join(` | ||
| `)}}}});return s.prompt()},Ct=[Te,oe,De,le],It=[ae,Be,b,xe];function Ge(e,r,s,i){let n=s,o=s;return i==="center"?n=Math.floor((r-e)/2):i==="right"&&(n=r-e-s),o=r-n-e,[n,o]}const St=e=>e,wt=(e="",r="",s)=>{const i=s?.output??process.stdout,n=H(i),o=2,u=s?.titlePadding??1,l=s?.contentPadding??2,a=s?.width===void 0||s.width==="auto"?1:Math.min(1,s.width),m=s?.includePrefix?`${c} `:"",E=s?.formatBorder??St,y=(s?.rounded?Ct:It).map(E),F=E(z),p=E(c),h=M(m),d=M(r),$=n-h;let g=Math.floor(n*a)-h;if(s?.width==="auto"){const _=e.split(` | ||
| `);let D=d+u*2;for(const T of _){const R=M(T)+l*2;R>D&&(D=R)}const I=D+o;I<g&&(g=I)}g%2!==0&&(g<$?g++:g--);const f=g-o,v=f-u*2,w=d>v?`${r.slice(0,v-3)}...`:r,[B,x]=Ge(M(w),f,u,s?.titleAlign),A=k(e,f-l*2,{hard:!0,trim:!1});i.write(`${m}${y[0]}${F.repeat(B)}${w}${F.repeat(x)}${y[1]} | ||
| `,n=this.userInput,o=e.placeholder,l=n===""&&o!==void 0,u=this.isNavigating||l?t.dim(l?o:n):this.userInputWithCursor,a=this.options,h=this.filteredOptions.length!==a.length?t.dim(` (${this.filteredOptions.length} match${this.filteredOptions.length===1?"":"es"})`):"";switch(this.state){case"submit":return`${r}${t.gray(d)} ${t.dim(`${this.selectedValues.length} items selected`)}`;case"cancel":return`${r}${t.gray(d)} ${t.strikethrough(t.dim(n))}`;default:{const y=[`${t.dim("\u2191/\u2193")} to navigate`,`${t.dim(this.isNavigating?"Space/Tab:":"Tab:")} select`,`${t.dim("Enter:")} confirm`,`${t.dim("Type:")} to search`],E=this.filteredOptions.length===0&&n?[`${t.cyan(d)} ${t.yellow("No matches found")}`]:[],f=this.state==="error"?[`${t.cyan(d)} ${t.yellow(this.error)}`]:[],F=K({cursor:this.cursor,options:this.filteredOptions,style:(c,m)=>i(c,m,this.selectedValues,this.focusedValue),maxItems:e.maxItems,output:e.output});return[r,`${t.cyan(d)} ${t.dim("Search:")} ${u}${h}`,...E,...f,...F.map(c=>`${t.cyan(d)} ${c}`),`${t.cyan(d)} ${t.dim(y.join(" \u2022 "))}`,`${t.cyan(x)}`].join(` | ||
| `)}}}});return s.prompt()},St=[Re,ue,Me,ce],wt=[le,xe,x,_e];function Ue(e,i,s,r){let n=s,o=s;return r==="center"?n=Math.floor((i-e)/2):r==="right"&&(n=i-e-s),o=i-n-e,[n,o]}const Bt=e=>e,bt=(e="",i="",s)=>{const r=s?.output??process.stdout,n=q(r),o=2,l=s?.titlePadding??1,u=s?.contentPadding??2,a=s?.width===void 0||s.width==="auto"?1:Math.min(1,s.width),h=s?.includePrefix?`${d} `:"",y=s?.formatBorder??Bt,E=(s?.rounded?St:wt).map(y),f=y(Q),F=y(d),c=M(h),m=M(i),$=n-c;let p=Math.floor(n*a)-c;if(s?.width==="auto"){const _=e.split(` | ||
| `);let D=m+l*2;for(const k of _){const B=M(k)+u*2;B>D&&(D=B)}const T=D+o;T<p&&(p=T)}p%2!==0&&(p<$?p++:p--);const g=p-o,v=g-l*2,S=m>v?`${i.slice(0,v-3)}...`:i,[w,b]=Ue(M(S),g,l,s?.titleAlign),A=U(e,g-u*2,{hard:!0,trim:!1});r.write(`${h}${E[0]}${f.repeat(w)}${S}${f.repeat(b)}${E[1]} | ||
| `);const C=A.split(` | ||
| `);for(const _ of C){const[D,I]=Ge(M(_),f,l,s?.contentAlign);i.write(`${m}${p}${" ".repeat(D)}${_}${" ".repeat(I)}${p} | ||
| `)}i.write(`${m}${y[2]}${F.repeat(f)}${y[3]} | ||
| `)},Bt=e=>{const r=e.active??"Yes",s=e.inactive??"No";return new Xe({active:r,inactive:s,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue??!0,render(){const i=`${t.gray(c)} | ||
| `);for(const _ of C){const[D,T]=Ue(M(_),g,u,s?.contentAlign);r.write(`${h}${F}${" ".repeat(D)}${_}${" ".repeat(T)}${F} | ||
| `)}r.write(`${h}${E[2]}${f.repeat(g)}${E[3]} | ||
| `)},xt=e=>{const i=e.active??"Yes",s=e.inactive??"No";return new ze({active:i,inactive:s,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue??!0,render(){const r=`${t.gray(d)} | ||
| ${L(this.state)} ${e.message} | ||
| `,n=this.value?r:s;switch(this.state){case"submit":return`${i}${t.gray(c)} ${t.dim(n)}`;case"cancel":return`${i}${t.gray(c)} ${t.strikethrough(t.dim(n))} | ||
| ${t.gray(c)}`;default:return`${i}${t.cyan(c)} ${this.value?`${t.green(U)} ${r}`:`${t.dim(K)} ${t.dim(r)}`} ${t.dim("/")} ${this.value?`${t.dim(K)} ${t.dim(s)}`:`${t.green(U)} ${s}`} | ||
| ${t.cyan(b)} | ||
| `}}}).prompt()},xt=async(e,r)=>{const s={},i=Object.keys(e);for(const n of i){const o=e[n],u=await o({results:s})?.catch(l=>{throw l});if(typeof r?.onCancel=="function"&&Ye(u)){s[n]="canceled",r.onCancel({results:s});continue}s[n]=u}return s},bt=e=>{const{selectableGroups:r=!0,groupSpacing:s=0}=e,i=(o,u,l=[])=>{const a=o.label??String(o.value),m=typeof o.group=="string",E=m&&(l[l.indexOf(o)+1]??{group:!0}),y=m&&E&&E.group===!0,F=m?r?`${y?b:c} `:" ":"";let p="";if(s>0&&!m){const d=` | ||
| ${t.cyan(c)}`;p=`${d.repeat(s-1)}${d} `}if(u==="active")return`${p}${t.dim(F)}${t.cyan(X)} ${a}${o.hint?` ${t.dim(`(${o.hint})`)}`:""}`;if(u==="group-active")return`${p}${F}${t.cyan(X)} ${t.dim(a)}`;if(u==="group-active-selected")return`${p}${F}${t.green(P)} ${t.dim(a)}`;if(u==="selected"){const d=m||r?t.green(P):"";return`${p}${t.dim(F)}${d} ${t.dim(a)}${o.hint?` ${t.dim(`(${o.hint})`)}`:""}`}if(u==="cancelled")return`${t.strikethrough(t.dim(a))}`;if(u==="active-selected")return`${p}${t.dim(F)}${t.green(P)} ${a}${o.hint?` ${t.dim(`(${o.hint})`)}`:""}`;if(u==="submitted")return`${t.dim(a)}`;const h=m||r?t.dim(Y):"";return`${p}${t.dim(F)}${h} ${t.dim(a)}`},n=e.required??!0;return new ze({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValues:e.initialValues,required:n,cursorAt:e.cursorAt,selectableGroups:r,validate(o){if(n&&(o===void 0||o.length===0))return`Please select at least one option. | ||
| ${t.reset(t.dim(`Press ${t.gray(t.bgWhite(t.inverse(" space ")))} to select, ${t.gray(t.bgWhite(t.inverse(" enter ")))} to submit`))}`},render(){const o=`${t.gray(c)} | ||
| `,n=this.value?i:s;switch(this.state){case"submit":return`${r}${t.gray(d)} ${t.dim(n)}`;case"cancel":return`${r}${t.gray(d)} ${t.strikethrough(t.dim(n))} | ||
| ${t.gray(d)}`;default:return`${r}${t.cyan(d)} ${this.value?`${t.green(J)} ${i}`:`${t.dim(H)} ${t.dim(i)}`} ${t.dim("/")} ${this.value?`${t.dim(H)} ${t.dim(s)}`:`${t.green(J)} ${s}`} | ||
| ${t.cyan(x)} | ||
| `}}}).prompt()},_t=async(e,i)=>{const s={},r=Object.keys(e);for(const n of r){const o=e[n],l=await o({results:s})?.catch(u=>{throw u});if(typeof i?.onCancel=="function"&&Ze(l)){s[n]="canceled",i.onCancel({results:s});continue}s[n]=l}return s},Dt=e=>{const{selectableGroups:i=!0,groupSpacing:s=0}=e,r=(o,l,u=[])=>{const a=o.label??String(o.value),h=typeof o.group=="string",y=h&&(u[u.indexOf(o)+1]??{group:!0}),E=h&&y&&y.group===!0,f=h?i?`${E?x:d} `:" ":"";let F="";if(s>0&&!h){const m=` | ||
| ${t.cyan(d)}`;F=`${m.repeat(s-1)}${m} `}if(l==="active")return`${F}${t.dim(f)}${t.cyan(Z)} ${a}${o.hint?` ${t.dim(`(${o.hint})`)}`:""}`;if(l==="group-active")return`${F}${f}${t.cyan(Z)} ${t.dim(a)}`;if(l==="group-active-selected")return`${F}${f}${t.green(j)} ${t.dim(a)}`;if(l==="selected"){const m=h||i?t.green(j):"";return`${F}${t.dim(f)}${m} ${t.dim(a)}${o.hint?` ${t.dim(`(${o.hint})`)}`:""}`}if(l==="cancelled")return`${t.strikethrough(t.dim(a))}`;if(l==="active-selected")return`${F}${t.dim(f)}${t.green(j)} ${a}${o.hint?` ${t.dim(`(${o.hint})`)}`:""}`;if(l==="submitted")return`${t.dim(a)}`;const c=h||i?t.dim(X):"";return`${F}${t.dim(f)}${c} ${t.dim(a)}`},n=e.required??!0;return new Qe({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValues:e.initialValues,required:n,cursorAt:e.cursorAt,selectableGroups:i,validate(o){if(n&&(o===void 0||o.length===0))return`Please select at least one option. | ||
| ${t.reset(t.dim(`Press ${t.gray(t.bgWhite(t.inverse(" space ")))} to select, ${t.gray(t.bgWhite(t.inverse(" enter ")))} to submit`))}`},render(){const o=`${t.gray(d)} | ||
| ${L(this.state)} ${e.message} | ||
| `,u=this.value??[];switch(this.state){case"submit":{const l=this.options.filter(({value:m})=>u.includes(m)).map(m=>i(m,"submitted")),a=l.length===0?"":` ${l.join(t.dim(", "))}`;return`${o}${t.gray(c)}${a}`}case"cancel":{const l=this.options.filter(({value:a})=>u.includes(a)).map(a=>i(a,"cancelled")).join(t.dim(", "));return`${o}${t.gray(c)} ${l.trim()?`${l} | ||
| ${t.gray(c)}`:""}`}case"error":{const l=this.error.split(` | ||
| `).map((a,m)=>m===0?`${t.yellow(b)} ${t.yellow(a)}`:` ${a}`).join(` | ||
| `);return`${o}${t.yellow(c)} ${this.options.map((a,m,E)=>{const y=u.includes(a.value)||a.group===!0&&this.isGroupSelected(`${a.value}`),F=m===this.cursor;return!F&&typeof a.group=="string"&&this.options[this.cursor].value===a.group?i(a,y?"group-active-selected":"group-active",E):F&&y?i(a,"active-selected",E):y?i(a,"selected",E):i(a,F?"active":"inactive",E)}).join(` | ||
| ${t.yellow(c)} `)} | ||
| ${l} | ||
| `}default:{const l=this.options.map((m,E,y)=>{const F=u.includes(m.value)||m.group===!0&&this.isGroupSelected(`${m.value}`),p=E===this.cursor,h=!p&&typeof m.group=="string"&&this.options[this.cursor].value===m.group;let d="";return h?d=i(m,F?"group-active-selected":"group-active",y):p&&F?d=i(m,"active-selected",y):F?d=i(m,"selected",y):d=i(m,p?"active":"inactive",y),`${E!==0&&!d.startsWith(` | ||
| `)?" ":""}${d}`}).join(` | ||
| ${t.cyan(c)}`),a=l.startsWith(` | ||
| `)?"":" ";return`${o}${t.cyan(c)}${a}${l} | ||
| ${t.cyan(b)} | ||
| `}}}}).prompt()},O={message:(e=[],{symbol:r=t.gray(c),secondarySymbol:s=t.gray(c),output:i=process.stdout,spacing:n=1}={})=>{const o=[];for(let l=0;l<n;l++)o.push(`${s}`);const u=Array.isArray(e)?e:e.split(` | ||
| `);if(u.length>0){const[l,...a]=u;l.length>0?o.push(`${r} ${l}`):o.push(r);for(const m of a)m.length>0?o.push(`${s} ${m}`):o.push(s)}i.write(`${o.join(` | ||
| `,l=this.value??[];switch(this.state){case"submit":{const u=this.options.filter(({value:h})=>l.includes(h)).map(h=>r(h,"submitted")),a=u.length===0?"":` ${u.join(t.dim(", "))}`;return`${o}${t.gray(d)}${a}`}case"cancel":{const u=this.options.filter(({value:a})=>l.includes(a)).map(a=>r(a,"cancelled")).join(t.dim(", "));return`${o}${t.gray(d)} ${u.trim()?`${u} | ||
| ${t.gray(d)}`:""}`}case"error":{const u=this.error.split(` | ||
| `).map((a,h)=>h===0?`${t.yellow(x)} ${t.yellow(a)}`:` ${a}`).join(` | ||
| `);return`${o}${t.yellow(d)} ${this.options.map((a,h,y)=>{const E=l.includes(a.value)||a.group===!0&&this.isGroupSelected(`${a.value}`),f=h===this.cursor;return!f&&typeof a.group=="string"&&this.options[this.cursor].value===a.group?r(a,E?"group-active-selected":"group-active",y):f&&E?r(a,"active-selected",y):E?r(a,"selected",y):r(a,f?"active":"inactive",y)}).join(` | ||
| ${t.yellow(d)} `)} | ||
| ${u} | ||
| `}default:{const u=this.options.map((h,y,E)=>{const f=l.includes(h.value)||h.group===!0&&this.isGroupSelected(`${h.value}`),F=y===this.cursor,c=!F&&typeof h.group=="string"&&this.options[this.cursor].value===h.group;let m="";return c?m=r(h,f?"group-active-selected":"group-active",E):F&&f?m=r(h,"active-selected",E):f?m=r(h,"selected",E):m=r(h,F?"active":"inactive",E),`${y!==0&&!m.startsWith(` | ||
| `)?" ":""}${m}`}).join(` | ||
| ${t.cyan(d)}`),a=u.startsWith(` | ||
| `)?"":" ";return`${o}${t.cyan(d)}${a}${u} | ||
| ${t.cyan(x)} | ||
| `}}}}).prompt()},R={message:(e=[],{symbol:i=t.gray(d),secondarySymbol:s=t.gray(d),output:r=process.stdout,spacing:n=1}={})=>{const o=[];for(let u=0;u<n;u++)o.push(`${s}`);const l=Array.isArray(e)?e:e.split(` | ||
| `);if(l.length>0){const[u,...a]=l;u.length>0?o.push(`${i} ${u}`):o.push(i);for(const h of a)h.length>0?o.push(`${s} ${h}`):o.push(s)}r.write(`${o.join(` | ||
| `)} | ||
| `)},info:(e,r)=>{O.message(e,{...r,symbol:t.blue(ue)})},success:(e,r)=>{O.message(e,{...r,symbol:t.green(ce)})},step:(e,r)=>{O.message(e,{...r,symbol:t.green(W)})},warn:(e,r)=>{O.message(e,{...r,symbol:t.yellow($e)})},warning:(e,r)=>{O.warn(e,r)},error:(e,r)=>{O.message(e,{...r,symbol:t.red(de)})}},_t=(e="",r)=>{(r?.output??process.stdout).write(`${t.gray(b)} ${t.red(e)} | ||
| `)},info:(e,i)=>{R.message(e,{...i,symbol:t.blue(de)})},success:(e,i)=>{R.message(e,{...i,symbol:t.green($e)})},step:(e,i)=>{R.message(e,{...i,symbol:t.green(W)})},warn:(e,i)=>{R.message(e,{...i,symbol:t.yellow(he)})},warning:(e,i)=>{R.warn(e,i)},error:(e,i)=>{R.message(e,{...i,symbol:t.red(me)})}},Tt=(e="",i)=>{(i?.output??process.stdout).write(`${t.gray(x)} ${t.red(e)} | ||
| `)},Dt=(e="",r)=>{(r?.output??process.stdout).write(`${t.gray(ae)} ${e} | ||
| `)},Tt=(e="",r)=>{(r?.output??process.stdout).write(`${t.gray(c)} | ||
| ${t.gray(b)} ${e} | ||
| `)},Mt=(e="",i)=>{(i?.output??process.stdout).write(`${t.gray(le)} ${e} | ||
| `)},Rt=(e="",i)=>{(i?.output??process.stdout).write(`${t.gray(d)} | ||
| ${t.gray(x)} ${e} | ||
| `)},Rt=e=>{const r=(i,n)=>{const o=i.label??String(i.value);return n==="active"?`${t.cyan(X)} ${o}${i.hint?` ${t.dim(`(${i.hint})`)}`:""}`:n==="selected"?`${t.green(P)} ${t.dim(o)}${i.hint?` ${t.dim(`(${i.hint})`)}`:""}`:n==="cancelled"?`${t.strikethrough(t.dim(o))}`:n==="active-selected"?`${t.green(P)} ${o}${i.hint?` ${t.dim(`(${i.hint})`)}`:""}`:n==="submitted"?`${t.dim(o)}`:`${t.dim(Y)} ${t.dim(o)}`},s=e.required??!0;return new Ze({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValues:e.initialValues,required:s,cursorAt:e.cursorAt,validate(i){if(s&&(i===void 0||i.length===0))return`Please select at least one option. | ||
| ${t.reset(t.dim(`Press ${t.gray(t.bgWhite(t.inverse(" space ")))} to select, ${t.gray(t.bgWhite(t.inverse(" enter ")))} to submit`))}`},render(){const i=`${t.gray(c)} | ||
| `)},Ot=e=>{const i=(r,n)=>{const o=r.label??String(r.value);return n==="disabled"?`${t.gray(X)} ${t.gray(o)}${r.hint?` ${t.dim(`(${r.hint??"disabled"})`)}`:""}`:n==="active"?`${t.cyan(Z)} ${o}${r.hint?` ${t.dim(`(${r.hint})`)}`:""}`:n==="selected"?`${t.green(j)} ${t.dim(o)}${r.hint?` ${t.dim(`(${r.hint})`)}`:""}`:n==="cancelled"?`${t.strikethrough(t.dim(o))}`:n==="active-selected"?`${t.green(j)} ${o}${r.hint?` ${t.dim(`(${r.hint})`)}`:""}`:n==="submitted"?`${t.dim(o)}`:`${t.dim(X)} ${t.dim(o)}`},s=e.required??!0;return new et({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValues:e.initialValues,required:s,cursorAt:e.cursorAt,validate(r){if(s&&(r===void 0||r.length===0))return`Please select at least one option. | ||
| ${t.reset(t.dim(`Press ${t.gray(t.bgWhite(t.inverse(" space ")))} to select, ${t.gray(t.bgWhite(t.inverse(" enter ")))} to submit`))}`},render(){const r=`${t.gray(d)} | ||
| ${L(this.state)} ${e.message} | ||
| `,n=this.value??[],o=(u,l)=>{const a=n.includes(u.value);return l&&a?r(u,"active-selected"):a?r(u,"selected"):r(u,l?"active":"inactive")};switch(this.state){case"submit":return`${i}${t.gray(c)} ${this.options.filter(({value:u})=>n.includes(u)).map(u=>r(u,"submitted")).join(t.dim(", "))||t.dim("none")}`;case"cancel":{const u=this.options.filter(({value:l})=>n.includes(l)).map(l=>r(l,"cancelled")).join(t.dim(", "));return`${i}${t.gray(c)}${u.trim()?` ${u} | ||
| ${t.gray(c)}`:""}`}case"error":{const u=this.error.split(` | ||
| `).map((l,a)=>a===0?`${t.yellow(b)} ${t.yellow(l)}`:` ${l}`).join(` | ||
| `);return`${i+t.yellow(c)} ${G({output:e.output,options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:o}).join(` | ||
| ${t.yellow(c)} `)} | ||
| `,n=this.value??[],o=(l,u)=>{if(l.disabled)return i(l,"disabled");const a=n.includes(l.value);return u&&a?i(l,"active-selected"):a?i(l,"selected"):i(l,u?"active":"inactive")};switch(this.state){case"submit":return`${r}${t.gray(d)} ${this.options.filter(({value:l})=>n.includes(l)).map(l=>i(l,"submitted")).join(t.dim(", "))||t.dim("none")}`;case"cancel":{const l=this.options.filter(({value:u})=>n.includes(u)).map(u=>i(u,"cancelled")).join(t.dim(", "));return`${r}${t.gray(d)}${l.trim()?` ${l} | ||
| ${t.gray(d)}`:""}`}case"error":{const l=`${t.yellow(d)} `,u=this.error.split(` | ||
| `).map((a,h)=>h===0?`${t.yellow(x)} ${t.yellow(a)}`:` ${a}`).join(` | ||
| `);return`${r}${l}${K({output:e.output,options:this.options,cursor:this.cursor,maxItems:e.maxItems,columnPadding:l.length,style:o}).join(` | ||
| ${l}`)} | ||
| ${u} | ||
| `}default:return`${i}${t.cyan(c)} ${G({output:e.output,options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:o}).join(` | ||
| ${t.cyan(c)} `)} | ||
| ${t.cyan(b)} | ||
| `}}}).prompt()},Mt=e=>t.dim(e),Ot=(e,r,s)=>{const i={hard:!0,trim:!1},n=k(e,r,i).split(` | ||
| `),o=n.reduce((a,m)=>Math.max(M(m),a),0),u=n.map(s).reduce((a,m)=>Math.max(M(m),a),0),l=r-(u-o);return k(e,l,i)},Nt=(e="",r="",s)=>{const i=s?.output??N.stdout,n=s?.format??Mt,o=["",...Ot(e,H(i)-6,n).split(` | ||
| `).map(n),""],u=M(r),l=Math.max(o.reduce((m,E)=>{const y=M(E);return y>m?y:m},0),u)+2,a=o.map(m=>`${t.gray(c)} ${m}${" ".repeat(l-M(m))}${t.gray(c)}`).join(` | ||
| `);i.write(`${t.gray(c)} | ||
| ${t.green(W)} ${t.reset(r)} ${t.gray(z.repeat(Math.max(l-u-1,1))+oe)} | ||
| `}default:{const l=`${t.cyan(d)} `;return`${r}${l}${K({output:e.output,options:this.options,cursor:this.cursor,maxItems:e.maxItems,columnPadding:l.length,style:o}).join(` | ||
| ${l}`)} | ||
| ${t.cyan(x)} | ||
| `}}}}).prompt()},Nt=e=>t.dim(e),Pt=(e,i,s)=>{const r={hard:!0,trim:!1},n=U(e,i,r).split(` | ||
| `),o=n.reduce((a,h)=>Math.max(M(h),a),0),l=n.map(s).reduce((a,h)=>Math.max(M(h),a),0),u=i-(l-o);return U(e,u,r)},Lt=(e="",i="",s)=>{const r=s?.output??N.stdout,n=s?.format??Nt,o=["",...Pt(e,q(r)-6,n).split(` | ||
| `).map(n),""],l=M(i),u=Math.max(o.reduce((h,y)=>{const E=M(y);return E>h?E:h},0),l)+2,a=o.map(h=>`${t.gray(d)} ${h}${" ".repeat(u-M(h))}${t.gray(d)}`).join(` | ||
| `);r.write(`${t.gray(d)} | ||
| ${t.green(W)} ${t.reset(i)} ${t.gray(Q.repeat(Math.max(u-l-1,1))+ue)} | ||
| ${a} | ||
| ${t.gray(_e+z.repeat(l+2)+le)} | ||
| `)},Lt=e=>new Qe({validate:e.validate,mask:e.mask??be,signal:e.signal,input:e.input,output:e.output,render(){const r=`${t.gray(c)} | ||
| ${t.gray(Te+Q.repeat(u+2)+ce)} | ||
| `)},Wt=e=>new tt({validate:e.validate,mask:e.mask??De,signal:e.signal,input:e.input,output:e.output,render(){const i=`${t.gray(d)} | ||
| ${L(this.state)} ${e.message} | ||
| `,s=this.userInputWithCursor,i=this.masked;switch(this.state){case"error":{const n=i?` ${i}`:"";return e.clearOnError&&this.clear(),`${r.trim()} | ||
| ${t.yellow(c)}${n} | ||
| ${t.yellow(b)} ${t.yellow(this.error)} | ||
| `}case"submit":{const n=i?` ${t.dim(i)}`:"";return`${r}${t.gray(c)}${n}`}case"cancel":{const n=i?` ${t.strikethrough(t.dim(i))}`:"";return`${r}${t.gray(c)}${n}${i?` | ||
| ${t.gray(c)}`:""}`}default:return`${r}${t.cyan(c)} ${s} | ||
| ${t.cyan(b)} | ||
| `}}}).prompt(),Wt=e=>{const r=e.validate;return ke({...e,initialUserInput:e.initialValue??e.root??process.cwd(),maxItems:5,validate(s){if(!Array.isArray(s)){if(!s)return"Please select a path";if(r)return r(s)}},options(){const s=this.userInput;if(s==="")return[];try{let i;return nt(s)?ve(s).isDirectory()?i=s:i=Ae(s):i=Ae(s),it(i).map(n=>{const o=at(i,n),u=ve(o);return{name:n,path:o,isDirectory:u.isDirectory()}}).filter(({path:n,isDirectory:o})=>n.startsWith(s)&&(e.directory||!o)).map(n=>({value:n.path}))}catch{return[]}}})},Fe=({indicator:e="dots",onCancel:r,output:s=process.stdout,cancelMessage:i,errorMessage:n,frames:o=J?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],delay:u=J?80:120,signal:l}={})=>{const a=re();let m,E,y=!1,F=!1,p="",h,d=performance.now();const $=H(s),g=I=>{const T=I>1?n??Ee.messages.error:i??Ee.messages.cancel;F=I===1,y&&(D(T,I),F&&typeof r=="function"&&r())},f=()=>g(2),v=()=>g(1),w=()=>{process.on("uncaughtExceptionMonitor",f),process.on("unhandledRejection",f),process.on("SIGINT",v),process.on("SIGTERM",v),process.on("exit",g),l&&l.addEventListener("abort",v)},B=()=>{process.removeListener("uncaughtExceptionMonitor",f),process.removeListener("unhandledRejection",f),process.removeListener("SIGINT",v),process.removeListener("SIGTERM",v),process.removeListener("exit",g),l&&l.removeEventListener("abort",v)},x=()=>{if(h===void 0)return;a&&s.write(` | ||
| `);const I=k(h,$,{hard:!0,trim:!1}).split(` | ||
| `);I.length>1&&s.write(Ce.up(I.length-1)),s.write(Ce.to(0)),s.write(Ie.down())},A=I=>I.replace(/\.+$/,""),C=I=>{const T=(performance.now()-I)/1e3,R=Math.floor(T/60),V=Math.floor(T%60);return R>0?`[${R}m ${V}s]`:`[${V}s]`},_=(I="")=>{y=!0,m=et({output:s}),p=A(I),d=performance.now(),s.write(`${t.gray(c)} | ||
| `);let T=0,R=0;w(),E=setInterval(()=>{if(a&&p===h)return;x(),h=p;const V=t.magenta(o[T]);let q;if(a)q=`${V} ${p}...`;else if(e==="timer")q=`${V} ${p} ${C(d)}`;else{const qe=".".repeat(Math.floor(R)).slice(0,3);q=`${V} ${p}${qe}`}const Ke=k(q,$,{hard:!0,trim:!1});s.write(Ke),T=T+1<o.length?T+1:0,R=R<4?R+.125:0},u)},D=(I="",T=0)=>{if(!y)return;y=!1,clearInterval(E),x();const R=T===0?t.green(W):T===1?t.red(ie):t.red(ne);p=I??p,e==="timer"?s.write(`${R} ${p} ${C(d)} | ||
| `):s.write(`${R} ${p} | ||
| `),B(),m()};return{start:_,stop:D,message:(I="")=>{p=A(I??p)},get isCancelled(){return F}}},He={light:S("\u2500","-"),heavy:S("\u2501","="),block:S("\u2588","#")};function Pt({style:e="heavy",max:r=100,size:s=40,...i}={}){const n=Fe(i);let o=0,u="";const l=Math.max(1,r),a=Math.max(1,s),m=p=>{switch(p){case"initial":case"active":return t.magenta;case"error":case"cancel":return t.red;case"submit":return t.green;default:return t.magenta}},E=(p,h)=>{const d=Math.floor(o/l*a);return`${m(p)(He[e].repeat(d))}${t.dim(He[e].repeat(a-d))} ${h}`},y=(p="")=>{u=p,n.start(E("initial",p))},F=(p=1,h)=>{o=Math.min(l,p+o),n.message(E("active",h??u)),u=h??u};return{start:y,stop:n.stop,advance:F,isCancelled:n.isCancelled,message:p=>F(0,p)}}const jt=e=>{const r=(s,i)=>{const n=s.label??String(s.value);switch(i){case"selected":return`${t.dim(n)}`;case"active":return`${t.green(U)} ${n}${s.hint?` ${t.dim(`(${s.hint})`)}`:""}`;case"cancelled":return`${t.strikethrough(t.dim(n))}`;default:return`${t.dim(K)} ${t.dim(n)}`}};return new tt({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue,render(){const s=`${t.gray(c)} | ||
| `,s=this.userInputWithCursor,r=this.masked;switch(this.state){case"error":{const n=r?` ${r}`:"";return e.clearOnError&&this.clear(),`${i.trim()} | ||
| ${t.yellow(d)}${n} | ||
| ${t.yellow(x)} ${t.yellow(this.error)} | ||
| `}case"submit":{const n=r?` ${t.dim(r)}`:"";return`${i}${t.gray(d)}${n}`}case"cancel":{const n=r?` ${t.strikethrough(t.dim(r))}`:"";return`${i}${t.gray(d)}${n}${r?` | ||
| ${t.gray(d)}`:""}`}default:return`${i}${t.cyan(d)} ${s} | ||
| ${t.cyan(x)} | ||
| `}}}).prompt(),jt=e=>{const i=e.validate;return He({...e,initialUserInput:e.initialValue??e.root??process.cwd(),maxItems:5,validate(s){if(!Array.isArray(s)){if(!s)return"Please select a path";if(i)return i(s)}},options(){const s=this.userInput;if(s==="")return[];try{let r;return ot(s)?Ce(s).isDirectory()?r=s:r=Ie(s):r=Ie(s),at(r).map(n=>{const o=lt(r,n),l=Ce(o);return{name:n,path:o,isDirectory:l.isDirectory()}}).filter(({path:n,isDirectory:o})=>n.startsWith(s)&&(e.directory||!o)).map(n=>({value:n.path}))}catch{return[]}}})},Vt=t.magenta,Ee=({indicator:e="dots",onCancel:i,output:s=process.stdout,cancelMessage:r,errorMessage:n,frames:o=z?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],delay:l=z?80:120,signal:u,...a}={})=>{const h=ne();let y,E,f=!1,F=!1,c="",m,$=performance.now();const p=q(s),g=a?.styleFrame??Vt,v=B=>{const O=B>1?n??Ae.messages.error:r??Ae.messages.cancel;F=B===1,f&&(k(O,B),F&&typeof i=="function"&&i())},S=()=>v(2),w=()=>v(1),b=()=>{process.on("uncaughtExceptionMonitor",S),process.on("unhandledRejection",S),process.on("SIGINT",w),process.on("SIGTERM",w),process.on("exit",v),u&&u.addEventListener("abort",w)},A=()=>{process.removeListener("uncaughtExceptionMonitor",S),process.removeListener("unhandledRejection",S),process.removeListener("SIGINT",w),process.removeListener("SIGTERM",w),process.removeListener("exit",v),u&&u.removeEventListener("abort",w)},C=()=>{if(m===void 0)return;h&&s.write(` | ||
| `);const B=U(m,p,{hard:!0,trim:!1}).split(` | ||
| `);B.length>1&&s.write(Se.up(B.length-1)),s.write(Se.to(0)),s.write(we.down())},_=B=>B.replace(/\.+$/,""),D=B=>{const O=(performance.now()-B)/1e3,P=Math.floor(O/60),G=Math.floor(O%60);return P>0?`[${P}m ${G}s]`:`[${G}s]`},T=(B="")=>{f=!0,y=st({output:s}),c=_(B),$=performance.now(),s.write(`${t.gray(d)} | ||
| `);let O=0,P=0;b(),E=setInterval(()=>{if(h&&c===m)return;C(),m=c;const G=g(o[O]);let Y;if(h)Y=`${G} ${c}...`;else if(e==="timer")Y=`${G} ${c} ${D($)}`;else{const Xe=".".repeat(Math.floor(P)).slice(0,3);Y=`${G} ${c}${Xe}`}const Je=U(Y,p,{hard:!0,trim:!1});s.write(Je),O=O+1<o.length?O+1:0,P=P<4?P+.125:0},l)},k=(B="",O=0)=>{if(!f)return;f=!1,clearInterval(E),C();const P=O===0?t.green(W):O===1?t.red(ae):t.red(oe);c=B??c,e==="timer"?s.write(`${P} ${c} ${D($)} | ||
| `):s.write(`${P} ${c} | ||
| `),A(),y()};return{start:T,stop:k,message:(B="")=>{c=_(B??c)},get isCancelled(){return F}}},Ke={light:I("\u2500","-"),heavy:I("\u2501","="),block:I("\u2588","#")};function kt({style:e="heavy",max:i=100,size:s=40,...r}={}){const n=Ee(r);let o=0,l="";const u=Math.max(1,i),a=Math.max(1,s),h=F=>{switch(F){case"initial":case"active":return t.magenta;case"error":case"cancel":return t.red;case"submit":return t.green;default:return t.magenta}},y=(F,c)=>{const m=Math.floor(o/u*a);return`${h(F)(Ke[e].repeat(m))}${t.dim(Ke[e].repeat(a-m))} ${c}`},E=(F="")=>{l=F,n.start(y("initial",F))},f=(F=1,c)=>{o=Math.min(u,F+o),n.message(y("active",c??l)),l=c??l};return{start:E,stop:n.stop,advance:f,isCancelled:n.isCancelled,message:F=>f(0,F)}}const Gt=e=>{const i=(s,r)=>{const n=s.label??String(s.value);switch(r){case"disabled":return`${t.gray(H)} ${t.gray(n)}${s.hint?` ${t.dim(`(${s.hint??"disabled"})`)}`:""}`;case"selected":return`${t.dim(n)}`;case"active":return`${t.green(J)} ${n}${s.hint?` ${t.dim(`(${s.hint})`)}`:""}`;case"cancelled":return`${t.strikethrough(t.dim(n))}`;default:return`${t.dim(H)} ${t.dim(n)}`}};return new rt({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue,render(){const s=`${t.gray(d)} | ||
| ${L(this.state)} ${e.message} | ||
| `;switch(this.state){case"submit":return`${s}${t.gray(c)} ${r(this.options[this.cursor],"selected")}`;case"cancel":return`${s}${t.gray(c)} ${r(this.options[this.cursor],"cancelled")} | ||
| ${t.gray(c)}`;default:return`${s}${t.cyan(c)} ${G({output:e.output,cursor:this.cursor,options:this.options,maxItems:e.maxItems,style:(i,n)=>r(i,n?"active":"inactive")}).join(` | ||
| ${t.cyan(c)} `)} | ||
| ${t.cyan(b)} | ||
| `}}}).prompt()},Vt=e=>{const r=(s,i="inactive")=>{const n=s.label??String(s.value);return i==="selected"?`${t.dim(n)}`:i==="cancelled"?`${t.strikethrough(t.dim(n))}`:i==="active"?`${t.bgCyan(t.gray(` ${s.value} `))} ${n} ${s.hint?t.dim(`(${s.hint})`):""}`:`${t.gray(t.bgWhite(t.inverse(` ${s.value} `)))} ${n} ${s.hint?t.dim(`(${s.hint})`):""}`};return new st({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue,render(){const s=`${t.gray(c)} | ||
| `;switch(this.state){case"submit":return`${s}${t.gray(d)} ${i(this.options[this.cursor],"selected")}`;case"cancel":return`${s}${t.gray(d)} ${i(this.options[this.cursor],"cancelled")} | ||
| ${t.gray(d)}`;default:{const r=`${t.cyan(d)} `;return`${s}${r}${K({output:e.output,cursor:this.cursor,options:this.options,maxItems:e.maxItems,columnPadding:r.length,style:(n,o)=>i(n,n.disabled?"disabled":o?"active":"inactive")}).join(` | ||
| ${r}`)} | ||
| ${t.cyan(x)} | ||
| `}}}}).prompt()},Ht=e=>{const i=(s,r="inactive")=>{const n=s.label??String(s.value);return r==="selected"?`${t.dim(n)}`:r==="cancelled"?`${t.strikethrough(t.dim(n))}`:r==="active"?`${t.bgCyan(t.gray(` ${s.value} `))} ${n} ${s.hint?t.dim(`(${s.hint})`):""}`:`${t.gray(t.bgWhite(t.inverse(` ${s.value} `)))} ${n} ${s.hint?t.dim(`(${s.hint})`):""}`};return new it({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue,render(){const s=`${t.gray(d)} | ||
| ${L(this.state)} ${e.message} | ||
| `;switch(this.state){case"submit":return`${s}${t.gray(c)} ${r(this.options.find(i=>i.value===this.value)??e.options[0],"selected")}`;case"cancel":return`${s}${t.gray(c)} ${r(this.options[0],"cancelled")} | ||
| ${t.gray(c)}`;default:return`${s}${t.cyan(c)} ${this.options.map((i,n)=>r(i,n===this.cursor?"active":"inactive")).join(` | ||
| ${t.cyan(c)} `)} | ||
| ${t.cyan(b)} | ||
| `}}}).prompt()},Ue=`${t.gray(c)} `,j={message:async(e,{symbol:r=t.gray(c)}={})=>{process.stdout.write(`${t.gray(c)} | ||
| ${r} `);let s=3;for await(let i of e){i=i.replace(/\n/g,` | ||
| ${Ue}`),i.includes(` | ||
| `)&&(s=3+se(i.slice(i.lastIndexOf(` | ||
| `))).length);const n=se(i).length;s+n<process.stdout.columns?(s+=n,process.stdout.write(i)):(process.stdout.write(` | ||
| ${Ue}${i.trimStart()}`),s=3+se(i.trimStart()).length)}process.stdout.write(` | ||
| `)},info:e=>j.message(e,{symbol:t.blue(ue)}),success:e=>j.message(e,{symbol:t.green(ce)}),step:e=>j.message(e,{symbol:t.green(W)}),warn:e=>j.message(e,{symbol:t.yellow($e)}),warning:e=>j.warn(e),error:e=>j.message(e,{symbol:t.red(de)})},kt=async(e,r)=>{for(const s of e){if(s.enabled===!1)continue;const i=Fe(r);i.start(s.title);const n=await s.task(i.message);i.stop(n||s.title)}},Gt=e=>{const r=e.output??process.stdout,s=H(r),i=t.gray(c),n=e.spacing??1,o=3,u=e.retainLog===!0,l=!re()&&Se(r);r.write(`${i} | ||
| `),r.write(`${t.green(W)} ${e.title} | ||
| `);for(let $=0;$<n;$++)r.write(`${i} | ||
| `);const a=[{value:"",full:""}];let m=!1;const E=$=>{if(a.length===0)return;let g=0;$&&(g+=n+2);for(const f of a){const{value:v,result:w}=f;let B=w?.message??v;if(B.length===0)continue;w===void 0&&f.header!==void 0&&f.header!==""&&(B+=` | ||
| ${f.header}`);const x=B.split(` | ||
| `).reduce((A,C)=>C===""?A+1:A+Math.ceil((C.length+o)/s),0);g+=x}g>0&&(g+=1,r.write(Ie.lines(g)))},y=($,g,f)=>{const v=f?`${$.full} | ||
| ${$.value}`:$.value;$.header!==void 0&&$.header!==""&&O.message($.header.split(` | ||
| `).map(t.bold),{output:r,secondarySymbol:i,symbol:i,spacing:0}),O.message(v.split(` | ||
| `).map(t.dim),{output:r,secondarySymbol:i,symbol:i,spacing:g??n})},F=()=>{for(const $ of a){const{header:g,value:f,full:v}=$;(g===void 0||g.length===0)&&f.length===0||y($,void 0,u===!0&&v.length>0)}},p=($,g,f)=>{if(E(!1),(f?.raw!==!0||!m)&&$.value!==""&&($.value+=` | ||
| `),$.value+=g,m=f?.raw===!0,e.limit!==void 0){const v=$.value.split(` | ||
| `),w=v.length-e.limit;if(w>0){const B=v.splice(0,w);u&&($.full+=($.full===""?"":` | ||
| `)+B.join(` | ||
| `;switch(this.state){case"submit":return`${s}${t.gray(d)} ${i(this.options.find(r=>r.value===this.value)??e.options[0],"selected")}`;case"cancel":return`${s}${t.gray(d)} ${i(this.options[0],"cancelled")} | ||
| ${t.gray(d)}`;default:return`${s}${t.cyan(d)} ${this.options.map((r,n)=>i(r,n===this.cursor?"active":"inactive")).join(` | ||
| ${t.cyan(d)} `)} | ||
| ${t.cyan(x)} | ||
| `}}}).prompt()},qe=`${t.gray(d)} `,V={message:async(e,{symbol:i=t.gray(d)}={})=>{process.stdout.write(`${t.gray(d)} | ||
| ${i} `);let s=3;for await(let r of e){r=r.replace(/\n/g,` | ||
| ${qe}`),r.includes(` | ||
| `)&&(s=3+ie(r.slice(r.lastIndexOf(` | ||
| `))).length);const n=ie(r).length;s+n<process.stdout.columns?(s+=n,process.stdout.write(r)):(process.stdout.write(` | ||
| ${qe}${r.trimStart()}`),s=3+ie(r.trimStart()).length)}process.stdout.write(` | ||
| `)},info:e=>V.message(e,{symbol:t.blue(de)}),success:e=>V.message(e,{symbol:t.green($e)}),step:e=>V.message(e,{symbol:t.green(W)}),warn:e=>V.message(e,{symbol:t.yellow(he)}),warning:e=>V.warn(e),error:e=>V.message(e,{symbol:t.red(me)})},Ut=async(e,i)=>{for(const s of e){if(s.enabled===!1)continue;const r=Ee(i);r.start(s.title);const n=await s.task(r.message);r.stop(n||s.title)}},Kt=e=>{const i=e.output??process.stdout,s=q(i),r=t.gray(d),n=e.spacing??1,o=3,l=e.retainLog===!0,u=!ne()&&Be(i);i.write(`${r} | ||
| `),i.write(`${t.green(W)} ${e.title} | ||
| `);for(let $=0;$<n;$++)i.write(`${r} | ||
| `);const a=[{value:"",full:""}];let h=!1;const y=$=>{if(a.length===0)return;let p=0;$&&(p+=n+2);for(const g of a){const{value:v,result:S}=g;let w=S?.message??v;if(w.length===0)continue;S===void 0&&g.header!==void 0&&g.header!==""&&(w+=` | ||
| ${g.header}`);const b=w.split(` | ||
| `).reduce((A,C)=>C===""?A+1:A+Math.ceil((C.length+o)/s),0);p+=b}p>0&&(p+=1,i.write(we.lines(p)))},E=($,p,g)=>{const v=g?`${$.full} | ||
| ${$.value}`:$.value;$.header!==void 0&&$.header!==""&&R.message($.header.split(` | ||
| `).map(t.bold),{output:i,secondarySymbol:r,symbol:r,spacing:0}),R.message(v.split(` | ||
| `).map(t.dim),{output:i,secondarySymbol:r,symbol:r,spacing:p??n})},f=()=>{for(const $ of a){const{header:p,value:g,full:v}=$;(p===void 0||p.length===0)&&g.length===0||E($,void 0,l===!0&&v.length>0)}},F=($,p,g)=>{if(y(!1),(g?.raw!==!0||!h)&&$.value!==""&&($.value+=` | ||
| `),$.value+=p,h=g?.raw===!0,e.limit!==void 0){const v=$.value.split(` | ||
| `),S=v.length-e.limit;if(S>0){const w=v.splice(0,S);l&&($.full+=($.full===""?"":` | ||
| `)+w.join(` | ||
| `))}$.value=v.join(` | ||
| `)}l&&h()},h=()=>{for(const $ of a)$.result?$.result.status==="error"?O.error($.result.message,{output:r,secondarySymbol:i,spacing:0}):O.success($.result.message,{output:r,secondarySymbol:i,spacing:0}):$.value!==""&&y($,0)},d=($,g)=>{E(!1),$.result=g,l&&h()};return{message($,g){p(a[0],$,g)},group($){const g={header:$,value:"",full:""};return a.push(g),{message(f,v){p(g,f,v)},error(f){d(g,{status:"error",message:f})},success(f){d(g,{status:"success",message:f})}}},error($,g){E(!0),O.error($,{output:r,secondarySymbol:i,spacing:1}),g?.showLog!==!1&&F(),a.splice(1,a.length-1),a[0].value="",a[0].full=""},success($,g){E(!0),O.success($,{output:r,secondarySymbol:i,spacing:1}),g?.showLog===!0&&F(),a.splice(1,a.length-1),a[0].value="",a[0].full=""}}},Ht=e=>new rt({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,output:e.output,signal:e.signal,input:e.input,render(){const r=`${t.gray(c)} | ||
| `)}u&&c()},c=()=>{for(const $ of a)$.result?$.result.status==="error"?R.error($.result.message,{output:i,secondarySymbol:r,spacing:0}):R.success($.result.message,{output:i,secondarySymbol:r,spacing:0}):$.value!==""&&E($,0)},m=($,p)=>{y(!1),$.result=p,u&&c()};return{message($,p){F(a[0],$,p)},group($){const p={header:$,value:"",full:""};return a.push(p),{message(g,v){F(p,g,v)},error(g){m(p,{status:"error",message:g})},success(g){m(p,{status:"success",message:g})}}},error($,p){y(!0),R.error($,{output:i,secondarySymbol:r,spacing:1}),p?.showLog!==!1&&f(),a.splice(1,a.length-1),a[0].value="",a[0].full=""},success($,p){y(!0),R.success($,{output:i,secondarySymbol:r,spacing:1}),p?.showLog===!0&&f(),a.splice(1,a.length-1),a[0].value="",a[0].full=""}}},qt=e=>new nt({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,output:e.output,signal:e.signal,input:e.input,render(){const i=`${t.gray(d)} | ||
| ${L(this.state)} ${e.message} | ||
| `,s=e.placeholder?t.inverse(e.placeholder[0])+t.dim(e.placeholder.slice(1)):t.inverse(t.hidden("_")),i=this.userInput?this.userInputWithCursor:s,n=this.value??"";switch(this.state){case"error":{const o=this.error?` ${t.yellow(this.error)}`:"";return`${r.trim()} | ||
| ${t.yellow(c)} ${i} | ||
| ${t.yellow(b)}${o} | ||
| `}case"submit":{const o=n?` ${t.dim(n)}`:"";return`${r}${t.gray(c)}${o}`}case"cancel":{const o=n?` ${t.strikethrough(t.dim(n))}`:"";return`${r}${t.gray(c)}${o}${n.trim()?` | ||
| ${t.gray(c)}`:""}`}default:return`${r}${t.cyan(c)} ${i} | ||
| ${t.cyan(b)} | ||
| `}}}).prompt();export{c as S_BAR,b as S_BAR_END,xe as S_BAR_END_RIGHT,z as S_BAR_H,ae as S_BAR_START,Be as S_BAR_START_RIGHT,X as S_CHECKBOX_ACTIVE,Y as S_CHECKBOX_INACTIVE,P as S_CHECKBOX_SELECTED,_e as S_CONNECT_LEFT,De as S_CORNER_BOTTOM_LEFT,le as S_CORNER_BOTTOM_RIGHT,Te as S_CORNER_TOP_LEFT,oe as S_CORNER_TOP_RIGHT,de as S_ERROR,ue as S_INFO,be as S_PASSWORD_MASK,U as S_RADIO_ACTIVE,K as S_RADIO_INACTIVE,we as S_STEP_ACTIVE,ie as S_STEP_CANCEL,ne as S_STEP_ERROR,W as S_STEP_SUBMIT,ce as S_SUCCESS,$e as S_WARN,ke as autocomplete,At as autocompleteMultiselect,wt as box,_t as cancel,Bt as confirm,xt as group,bt as groupMultiselect,Dt as intro,re as isCI,Se as isTTY,G as limitOptions,O as log,Rt as multiselect,Nt as note,Tt as outro,Lt as password,Wt as path,Pt as progress,jt as select,Vt as selectKey,Fe as spinner,j as stream,L as symbol,Gt as taskLog,kt as tasks,Ht as text,J as unicode,S as unicodeOr}; | ||
| `,s=e.placeholder?t.inverse(e.placeholder[0])+t.dim(e.placeholder.slice(1)):t.inverse(t.hidden("_")),r=this.userInput?this.userInputWithCursor:s,n=this.value??"";switch(this.state){case"error":{const o=this.error?` ${t.yellow(this.error)}`:"";return`${i.trim()} | ||
| ${t.yellow(d)} ${r} | ||
| ${t.yellow(x)}${o} | ||
| `}case"submit":{const o=n?` ${t.dim(n)}`:"";return`${i}${t.gray(d)}${o}`}case"cancel":{const o=n?` ${t.strikethrough(t.dim(n))}`:"";return`${i}${t.gray(d)}${o}${n.trim()?` | ||
| ${t.gray(d)}`:""}`}default:return`${i}${t.cyan(d)} ${r} | ||
| ${t.cyan(x)} | ||
| `}}}).prompt();export{d as S_BAR,x as S_BAR_END,_e as S_BAR_END_RIGHT,Q as S_BAR_H,le as S_BAR_START,xe as S_BAR_START_RIGHT,Z as S_CHECKBOX_ACTIVE,X as S_CHECKBOX_INACTIVE,j as S_CHECKBOX_SELECTED,Te as S_CONNECT_LEFT,Me as S_CORNER_BOTTOM_LEFT,ce as S_CORNER_BOTTOM_RIGHT,Re as S_CORNER_TOP_LEFT,ue as S_CORNER_TOP_RIGHT,me as S_ERROR,de as S_INFO,De as S_PASSWORD_MASK,J as S_RADIO_ACTIVE,H as S_RADIO_INACTIVE,be as S_STEP_ACTIVE,ae as S_STEP_CANCEL,oe as S_STEP_ERROR,W as S_STEP_SUBMIT,$e as S_SUCCESS,he as S_WARN,He as autocomplete,It as autocompleteMultiselect,bt as box,Tt as cancel,xt as confirm,_t as group,Dt as groupMultiselect,Mt as intro,ne as isCI,Be as isTTY,K as limitOptions,R as log,Ot as multiselect,Lt as note,Rt as outro,Wt as password,jt as path,kt as progress,Gt as select,Ht as selectKey,Ee as spinner,V as stream,L as symbol,Kt as taskLog,Ut as tasks,qt as text,z as unicode,I as unicodeOr}; | ||
| //# sourceMappingURL=index.mjs.map |
+3
-3
| { | ||
| "name": "@clack/prompts", | ||
| "version": "1.0.0-alpha.5", | ||
| "version": "1.0.0-alpha.6", | ||
| "type": "module", | ||
@@ -52,3 +52,3 @@ "main": "./dist/index.mjs", | ||
| "sisteransi": "^1.0.5", | ||
| "@clack/core": "1.0.0-alpha.5" | ||
| "@clack/core": "1.0.0-alpha.6" | ||
| }, | ||
@@ -65,4 +65,4 @@ "devDependencies": { | ||
| "build": "unbuild", | ||
| "test": "FORCE_COLOR=1 vitest run" | ||
| "test": "vitest run" | ||
| } | ||
| } |
+2
-2
@@ -89,3 +89,3 @@ # `@clack/prompts` | ||
| { value: 'ts', label: 'TypeScript' }, | ||
| { value: 'js', label: 'JavaScript' }, | ||
| { value: 'js', label: 'JavaScript', disabled: true }, | ||
| { value: 'coffee', label: 'CoffeeScript', hint: 'oh no' }, | ||
@@ -107,3 +107,3 @@ ], | ||
| { value: 'eslint', label: 'ESLint', hint: 'recommended' }, | ||
| { value: 'prettier', label: 'Prettier' }, | ||
| { value: 'prettier', label: 'Prettier', disabled: true }, | ||
| { value: 'gh-action', label: 'GitHub Action' }, | ||
@@ -110,0 +110,0 @@ ], |
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
222555
1.47%+ Added
- Removed
Updated