@ahmadjavaiddev/aura 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +120 -120
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var Zr=Object.create;var{getPrototypeOf:Vr,defineProperty:ae,getOwnPropertyNames:Kr}=Object;var Xr=Object.prototype.hasOwnProperty;function Fr(r){return this[r]}var Qr,Dr,k=(r,t,o)=>{var i=r!=null&&typeof r==="object";if(i){var n=t?Qr??=new WeakMap:Dr??=new WeakMap,a=n.get(r);if(a)return a}o=r!=null?Zr(Vr(r)):{};let e=t||!r||!r.__esModule?ae(o,"default",{value:r,enumerable:!0}):o;for(let c of Kr(r))if(!Xr.call(e,c))ae(e,c,{get:Fr.bind(r,c),enumerable:!0});if(i)n.set(r,e);return e};var ce=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports);var W=ce(($t,me)=>{var j={to(r,t){if(!t)return`\x1B[${r+1}G`;return`\x1B[${t+1};${r+1}H`},move(r,t){let o="";if(r<0)o+=`\x1B[${-r}D`;else if(r>0)o+=`\x1B[${r}C`;if(t<0)o+=`\x1B[${-t}A`;else if(t>0)o+=`\x1B[${t}B`;return o},up:(r=1)=>`\x1B[${r}A`,down:(r=1)=>`\x1B[${r}B`,forward:(r=1)=>`\x1B[${r}C`,backward:(r=1)=>`\x1B[${r}D`,nextLine:(r=1)=>"\x1B[E".repeat(r),prevLine:(r=1)=>"\x1B[F".repeat(r),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},et={up:(r=1)=>"\x1B[S".repeat(r),down:(r=1)=>"\x1B[T".repeat(r)},rt={screen:"\x1B[2J",up:(r=1)=>"\x1B[1J".repeat(r),down:(r=1)=>"\x1B[J".repeat(r),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(r){let t="";for(let o=0;o<r;o++)t+=this.line+(o<r-1?j.up():"");if(r)t+=j.left;return t}};me.exports={cursor:j,scroll:et,erase:rt,beep:"\x07"}});var J=ce((qt,Y)=>{var B=process||{},le=B.argv||[],M=B.env||{},tt=!(!!M.NO_COLOR||le.includes("--no-color"))&&(!!M.FORCE_COLOR||le.includes("--color")||B.platform==="win32"||(B.stdout||{}).isTTY&&M.TERM!=="dumb"||!!M.CI),ot=(r,t,o=r)=>(i)=>{let n=""+i,a=n.indexOf(t,r.length);return~a?r+nt(n,t,o,a)+t:r+n+t},nt=(r,t,o,i)=>{let n="",a=0;do n+=r.substring(a,i)+o,a=i+t.length,i=r.indexOf(t,a);while(~i);return n+r.substring(a)},pe=(r=tt)=>{let t=r?ot:()=>String;return{isColorSupported:r,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Y.exports=pe();Y.exports.createColors=pe});var E=k(W(),1),z=k(J(),1);import{stdin as ye,stdout as Ie}from"node:process";import*as f from"node:readline";import de from"node:readline";import{WriteStream as it}from"node:tty";function st({onlyFirst:r=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(t,r?void 0:"g")}var at=st();function fe(r){if(typeof r!="string")throw TypeError(`Expected a \`string\`, got \`${typeof r}\``);return r.replace(at,"")}function _e(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Ae={exports:{}};(function(r){var t={};r.exports=t,t.eastAsianWidth=function(i){var n=i.charCodeAt(0),a=i.length==2?i.charCodeAt(1):0,e=n;return 55296<=n&&n<=56319&&56320<=a&&a<=57343&&(n&=1023,a&=1023,e=n<<10|a,e+=65536),e==12288||65281<=e&&e<=65376||65504<=e&&e<=65510?"F":e==8361||65377<=e&&e<=65470||65474<=e&&e<=65479||65482<=e&&e<=65487||65490<=e&&e<=65495||65498<=e&&e<=65500||65512<=e&&e<=65518?"H":4352<=e&&e<=4447||4515<=e&&e<=4519||4602<=e&&e<=4607||9001<=e&&e<=9002||11904<=e&&e<=11929||11931<=e&&e<=12019||12032<=e&&e<=12245||12272<=e&&e<=12283||12289<=e&&e<=12350||12353<=e&&e<=12438||12441<=e&&e<=12543||12549<=e&&e<=12589||12593<=e&&e<=12686||12688<=e&&e<=12730||12736<=e&&e<=12771||12784<=e&&e<=12830||12832<=e&&e<=12871||12880<=e&&e<=13054||13056<=e&&e<=19903||19968<=e&&e<=42124||42128<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||55216<=e&&e<=55238||55243<=e&&e<=55291||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65106||65108<=e&&e<=65126||65128<=e&&e<=65131||110592<=e&&e<=110593||127488<=e&&e<=127490||127504<=e&&e<=127546||127552<=e&&e<=127560||127568<=e&&e<=127569||131072<=e&&e<=194367||177984<=e&&e<=196605||196608<=e&&e<=262141?"W":32<=e&&e<=126||162<=e&&e<=163||165<=e&&e<=166||e==172||e==175||10214<=e&&e<=10221||10629<=e&&e<=10630?"Na":e==161||e==164||167<=e&&e<=168||e==170||173<=e&&e<=174||176<=e&&e<=180||182<=e&&e<=186||188<=e&&e<=191||e==198||e==208||215<=e&&e<=216||222<=e&&e<=225||e==230||232<=e&&e<=234||236<=e&&e<=237||e==240||242<=e&&e<=243||247<=e&&e<=250||e==252||e==254||e==257||e==273||e==275||e==283||294<=e&&e<=295||e==299||305<=e&&e<=307||e==312||319<=e&&e<=322||e==324||328<=e&&e<=331||e==333||338<=e&&e<=339||358<=e&&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||713<=e&&e<=715||e==717||e==720||728<=e&&e<=731||e==733||e==735||768<=e&&e<=879||913<=e&&e<=929||931<=e&&e<=937||945<=e&&e<=961||963<=e&&e<=969||e==1025||1040<=e&&e<=1103||e==1105||e==8208||8211<=e&&e<=8214||8216<=e&&e<=8217||8220<=e&&e<=8221||8224<=e&&e<=8226||8228<=e&&e<=8231||e==8240||8242<=e&&e<=8243||e==8245||e==8251||e==8254||e==8308||e==8319||8321<=e&&e<=8324||e==8364||e==8451||e==8453||e==8457||e==8467||e==8470||8481<=e&&e<=8482||e==8486||e==8491||8531<=e&&e<=8532||8539<=e&&e<=8542||8544<=e&&e<=8555||8560<=e&&e<=8569||e==8585||8592<=e&&e<=8601||8632<=e&&e<=8633||e==8658||e==8660||e==8679||e==8704||8706<=e&&e<=8707||8711<=e&&e<=8712||e==8715||e==8719||e==8721||e==8725||e==8730||8733<=e&&e<=8736||e==8739||e==8741||8743<=e&&e<=8748||e==8750||8756<=e&&e<=8759||8764<=e&&e<=8765||e==8776||e==8780||e==8786||8800<=e&&e<=8801||8804<=e&&e<=8807||8810<=e&&e<=8811||8814<=e&&e<=8815||8834<=e&&e<=8835||8838<=e&&e<=8839||e==8853||e==8857||e==8869||e==8895||e==8978||9312<=e&&e<=9449||9451<=e&&e<=9547||9552<=e&&e<=9587||9600<=e&&e<=9615||9618<=e&&e<=9621||9632<=e&&e<=9633||9635<=e&&e<=9641||9650<=e&&e<=9651||9654<=e&&e<=9655||9660<=e&&e<=9661||9664<=e&&e<=9665||9670<=e&&e<=9672||e==9675||9678<=e&&e<=9681||9698<=e&&e<=9701||e==9711||9733<=e&&e<=9734||e==9737||9742<=e&&e<=9743||9748<=e&&e<=9749||e==9756||e==9758||e==9792||e==9794||9824<=e&&e<=9825||9827<=e&&e<=9829||9831<=e&&e<=9834||9836<=e&&e<=9837||e==9839||9886<=e&&e<=9887||9918<=e&&e<=9919||9924<=e&&e<=9933||9935<=e&&e<=9953||e==9955||9960<=e&&e<=9983||e==10045||e==10071||10102<=e&&e<=10111||11093<=e&&e<=11097||12872<=e&&e<=12879||57344<=e&&e<=63743||65024<=e&&e<=65039||e==65533||127232<=e&&e<=127242||127248<=e&&e<=127277||127280<=e&&e<=127337||127344<=e&&e<=127386||917760<=e&&e<=917999||983040<=e&&e<=1048573||1048576<=e&&e<=1114109?"A":"N"},t.characterLength=function(i){var n=this.eastAsianWidth(i);return n=="F"||n=="W"||n=="A"?2:1};function o(i){return i.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(i){for(var n=o(i),a=0,e=0;e<n.length;e++)a=a+this.characterLength(n[e]);return a},t.slice=function(i,n,a){textLen=t.length(i),n=n||0,a=a||1,n<0&&(n=textLen+n),a<0&&(a=textLen+a);for(var e="",c=0,d=o(i),u=0;u<d.length;u++){var l=d[u],m=t.length(l);if(c>=n-(m==2?1:0))if(c+m<=a)e+=l;else break;c+=m}return e}})(Ae);var ct=Ae.exports,mt=_e(ct),lt=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},pt=_e(lt);function C(r,t={}){if(typeof r!="string"||r.length===0||(t={ambiguousIsNarrow:!0,...t},r=fe(r),r.length===0))return 0;r=r.replace(pt()," ");let o=t.ambiguousIsNarrow?1:2,i=0;for(let n of r){let a=n.codePointAt(0);if(a<=31||a>=127&&a<=159||a>=768&&a<=879)continue;switch(mt.eastAsianWidth(n)){case"F":case"W":i+=2;break;case"A":i+=o;break;default:i+=1}}return i}var Z=10,ue=(r=0)=>(t)=>`\x1B[${t+r}m`,be=(r=0)=>(t)=>`\x1B[${38+r};5;${t}m`,ge=(r=0)=>(t,o,i)=>`\x1B[${38+r};2;${t};${o};${i}m`,g={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(g.modifier);var dt=Object.keys(g.color),ut=Object.keys(g.bgColor);[...dt,...ut];function bt(){let r=new Map;for(let[t,o]of Object.entries(g)){for(let[i,n]of Object.entries(o))g[i]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},o[i]=g[i],r.set(n[0],n[1]);Object.defineProperty(g,t,{value:o,enumerable:!1})}return Object.defineProperty(g,"codes",{value:r,enumerable:!1}),g.color.close="\x1B[39m",g.bgColor.close="\x1B[49m",g.color.ansi=ue(),g.color.ansi256=be(),g.color.ansi16m=ge(),g.bgColor.ansi=ue(Z),g.bgColor.ansi256=be(Z),g.bgColor.ansi16m=ge(Z),Object.defineProperties(g,{rgbToAnsi256:{value:(t,o,i)=>t===o&&o===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(o/255*5)+Math.round(i/255*5),enumerable:!1},hexToRgb:{value:(t)=>{let o=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!o)return[0,0,0];let[i]=o;i.length===3&&(i=[...i].map((a)=>a+a).join(""));let n=Number.parseInt(i,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:(t)=>g.rgbToAnsi256(...g.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:(t)=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let o,i,n;if(t>=232)o=((t-232)*10+8)/255,i=o,n=o;else{t-=16;let c=t%36;o=Math.floor(t/36)/5,i=Math.floor(c/6)/5,n=c%6/5}let a=Math.max(o,i,n)*2;if(a===0)return 30;let e=30+(Math.round(n)<<2|Math.round(i)<<1|Math.round(o));return a===2&&(e+=60),e},enumerable:!1},rgbToAnsi:{value:(t,o,i)=>g.ansi256ToAnsi(g.rgbToAnsi256(t,o,i)),enumerable:!1},hexToAnsi:{value:(t)=>g.ansi256ToAnsi(g.hexToAnsi256(t)),enumerable:!1}}),g}var gt=bt(),H=new Set(["\x1B",""]),ht=39,K="\x07",Ne="[",xt="]",Oe="m",X=`${xt}8;;`,he=(r)=>`${H.values().next().value}${Ne}${r}${Oe}`,xe=(r)=>`${H.values().next().value}${X}${r}${K}`,Et=(r)=>r.split(" ").map((t)=>C(t)),V=(r,t,o)=>{let i=[...t],n=!1,a=!1,e=C(fe(r[r.length-1]));for(let[c,d]of i.entries()){let u=C(d);if(e+u<=o?r[r.length-1]+=d:(r.push(d),e=0),H.has(d)&&(n=!0,a=i.slice(c+1).join("").startsWith(X)),n){a?d===K&&(n=!1,a=!1):d===Oe&&(n=!1);continue}e+=u,e===o&&c<i.length-1&&(r.push(""),e=0)}!e&&r[r.length-1].length>0&&r.length>1&&(r[r.length-2]+=r.pop())},vt=(r)=>{let t=r.split(" "),o=t.length;for(;o>0&&!(C(t[o-1])>0);)o--;return o===t.length?r:t.slice(0,o).join(" ")+t.slice(o).join("")},St=(r,t,o={})=>{if(o.trim!==!1&&r.trim()==="")return"";let i="",n,a,e=Et(r),c=[""];for(let[u,l]of r.split(" ").entries()){o.trim!==!1&&(c[c.length-1]=c[c.length-1].trimStart());let m=C(c[c.length-1]);if(u!==0&&(m>=t&&(o.wordWrap===!1||o.trim===!1)&&(c.push(""),m=0),(m>0||o.trim===!1)&&(c[c.length-1]+=" ",m++)),o.hard&&e[u]>t){let p=t-m,x=1+Math.floor((e[u]-p-1)/t);Math.floor((e[u]-1)/t)<x&&c.push(""),V(c,l,t);continue}if(m+e[u]>t&&m>0&&e[u]>0){if(o.wordWrap===!1&&m<t){V(c,l,t);continue}c.push("")}if(m+e[u]>t&&o.wordWrap===!1){V(c,l,t);continue}c[c.length-1]+=l}o.trim!==!1&&(c=c.map((u)=>vt(u)));let d=[...c.join(`
|
|
3
|
-
`)];for(let[u,l]of d.entries()){if(i+=l,H.has(l)){let{groups:p}=new RegExp(`(?:\\${
|
|
2
|
+
var Zr=Object.create;var{getPrototypeOf:Vr,defineProperty:ae,getOwnPropertyNames:Kr}=Object;var Fr=Object.prototype.hasOwnProperty;function Xr(e){return this[e]}var Qr,Dr,k=(e,t,o)=>{var i=e!=null&&typeof e==="object";if(i){var n=t?Qr??=new WeakMap:Dr??=new WeakMap,a=n.get(e);if(a)return a}o=e!=null?Zr(Vr(e)):{};let r=t||!e||!e.__esModule?ae(o,"default",{value:e,enumerable:!0}):o;for(let c of Kr(e))if(!Fr.call(r,c))ae(r,c,{get:Xr.bind(e,c),enumerable:!0});if(i)n.set(e,r);return r};var ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var W=ce((Wt,me)=>{var j={to(e,t){if(!t)return`\x1B[${e+1}G`;return`\x1B[${t+1};${e+1}H`},move(e,t){let o="";if(e<0)o+=`\x1B[${-e}D`;else if(e>0)o+=`\x1B[${e}C`;if(t<0)o+=`\x1B[${-t}A`;else if(t>0)o+=`\x1B[${t}B`;return o},up:(e=1)=>`\x1B[${e}A`,down:(e=1)=>`\x1B[${e}B`,forward:(e=1)=>`\x1B[${e}C`,backward:(e=1)=>`\x1B[${e}D`,nextLine:(e=1)=>"\x1B[E".repeat(e),prevLine:(e=1)=>"\x1B[F".repeat(e),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},et={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},rt={screen:"\x1B[2J",up:(e=1)=>"\x1B[1J".repeat(e),down:(e=1)=>"\x1B[J".repeat(e),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(e){let t="";for(let o=0;o<e;o++)t+=this.line+(o<e-1?j.up():"");if(e)t+=j.left;return t}};me.exports={cursor:j,scroll:et,erase:rt,beep:"\x07"}});var J=ce((Yt,Y)=>{var B=process||{},le=B.argv||[],M=B.env||{},tt=!(!!M.NO_COLOR||le.includes("--no-color"))&&(!!M.FORCE_COLOR||le.includes("--color")||B.platform==="win32"||(B.stdout||{}).isTTY&&M.TERM!=="dumb"||!!M.CI),ot=(e,t,o=e)=>(i)=>{let n=""+i,a=n.indexOf(t,e.length);return~a?e+nt(n,t,o,a)+t:e+n+t},nt=(e,t,o,i)=>{let n="",a=0;do n+=e.substring(a,i)+o,a=i+t.length,i=e.indexOf(t,a);while(~i);return n+e.substring(a)},pe=(e=tt)=>{let t=e?ot:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Y.exports=pe();Y.exports.createColors=pe});var E=k(W(),1),G=k(J(),1);import{stdin as ye,stdout as Ie}from"node:process";import*as f from"node:readline";import de from"node:readline";import{WriteStream as it}from"node:tty";function st({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}var at=st();function fe(e){if(typeof e!="string")throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(at,"")}function _e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ne={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(i){var n=i.charCodeAt(0),a=i.length==2?i.charCodeAt(1):0,r=n;return 55296<=n&&n<=56319&&56320<=a&&a<=57343&&(n&=1023,a&=1023,r=n<<10|a,r+=65536),r==12288||65281<=r&&r<=65376||65504<=r&&r<=65510?"F":r==8361||65377<=r&&r<=65470||65474<=r&&r<=65479||65482<=r&&r<=65487||65490<=r&&r<=65495||65498<=r&&r<=65500||65512<=r&&r<=65518?"H":4352<=r&&r<=4447||4515<=r&&r<=4519||4602<=r&&r<=4607||9001<=r&&r<=9002||11904<=r&&r<=11929||11931<=r&&r<=12019||12032<=r&&r<=12245||12272<=r&&r<=12283||12289<=r&&r<=12350||12353<=r&&r<=12438||12441<=r&&r<=12543||12549<=r&&r<=12589||12593<=r&&r<=12686||12688<=r&&r<=12730||12736<=r&&r<=12771||12784<=r&&r<=12830||12832<=r&&r<=12871||12880<=r&&r<=13054||13056<=r&&r<=19903||19968<=r&&r<=42124||42128<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||55216<=r&&r<=55238||55243<=r&&r<=55291||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65106||65108<=r&&r<=65126||65128<=r&&r<=65131||110592<=r&&r<=110593||127488<=r&&r<=127490||127504<=r&&r<=127546||127552<=r&&r<=127560||127568<=r&&r<=127569||131072<=r&&r<=194367||177984<=r&&r<=196605||196608<=r&&r<=262141?"W":32<=r&&r<=126||162<=r&&r<=163||165<=r&&r<=166||r==172||r==175||10214<=r&&r<=10221||10629<=r&&r<=10630?"Na":r==161||r==164||167<=r&&r<=168||r==170||173<=r&&r<=174||176<=r&&r<=180||182<=r&&r<=186||188<=r&&r<=191||r==198||r==208||215<=r&&r<=216||222<=r&&r<=225||r==230||232<=r&&r<=234||236<=r&&r<=237||r==240||242<=r&&r<=243||247<=r&&r<=250||r==252||r==254||r==257||r==273||r==275||r==283||294<=r&&r<=295||r==299||305<=r&&r<=307||r==312||319<=r&&r<=322||r==324||328<=r&&r<=331||r==333||338<=r&&r<=339||358<=r&&r<=359||r==363||r==462||r==464||r==466||r==468||r==470||r==472||r==474||r==476||r==593||r==609||r==708||r==711||713<=r&&r<=715||r==717||r==720||728<=r&&r<=731||r==733||r==735||768<=r&&r<=879||913<=r&&r<=929||931<=r&&r<=937||945<=r&&r<=961||963<=r&&r<=969||r==1025||1040<=r&&r<=1103||r==1105||r==8208||8211<=r&&r<=8214||8216<=r&&r<=8217||8220<=r&&r<=8221||8224<=r&&r<=8226||8228<=r&&r<=8231||r==8240||8242<=r&&r<=8243||r==8245||r==8251||r==8254||r==8308||r==8319||8321<=r&&r<=8324||r==8364||r==8451||r==8453||r==8457||r==8467||r==8470||8481<=r&&r<=8482||r==8486||r==8491||8531<=r&&r<=8532||8539<=r&&r<=8542||8544<=r&&r<=8555||8560<=r&&r<=8569||r==8585||8592<=r&&r<=8601||8632<=r&&r<=8633||r==8658||r==8660||r==8679||r==8704||8706<=r&&r<=8707||8711<=r&&r<=8712||r==8715||r==8719||r==8721||r==8725||r==8730||8733<=r&&r<=8736||r==8739||r==8741||8743<=r&&r<=8748||r==8750||8756<=r&&r<=8759||8764<=r&&r<=8765||r==8776||r==8780||r==8786||8800<=r&&r<=8801||8804<=r&&r<=8807||8810<=r&&r<=8811||8814<=r&&r<=8815||8834<=r&&r<=8835||8838<=r&&r<=8839||r==8853||r==8857||r==8869||r==8895||r==8978||9312<=r&&r<=9449||9451<=r&&r<=9547||9552<=r&&r<=9587||9600<=r&&r<=9615||9618<=r&&r<=9621||9632<=r&&r<=9633||9635<=r&&r<=9641||9650<=r&&r<=9651||9654<=r&&r<=9655||9660<=r&&r<=9661||9664<=r&&r<=9665||9670<=r&&r<=9672||r==9675||9678<=r&&r<=9681||9698<=r&&r<=9701||r==9711||9733<=r&&r<=9734||r==9737||9742<=r&&r<=9743||9748<=r&&r<=9749||r==9756||r==9758||r==9792||r==9794||9824<=r&&r<=9825||9827<=r&&r<=9829||9831<=r&&r<=9834||9836<=r&&r<=9837||r==9839||9886<=r&&r<=9887||9918<=r&&r<=9919||9924<=r&&r<=9933||9935<=r&&r<=9953||r==9955||9960<=r&&r<=9983||r==10045||r==10071||10102<=r&&r<=10111||11093<=r&&r<=11097||12872<=r&&r<=12879||57344<=r&&r<=63743||65024<=r&&r<=65039||r==65533||127232<=r&&r<=127242||127248<=r&&r<=127277||127280<=r&&r<=127337||127344<=r&&r<=127386||917760<=r&&r<=917999||983040<=r&&r<=1048573||1048576<=r&&r<=1114109?"A":"N"},t.characterLength=function(i){var n=this.eastAsianWidth(i);return n=="F"||n=="W"||n=="A"?2:1};function o(i){return i.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(i){for(var n=o(i),a=0,r=0;r<n.length;r++)a=a+this.characterLength(n[r]);return a},t.slice=function(i,n,a){textLen=t.length(i),n=n||0,a=a||1,n<0&&(n=textLen+n),a<0&&(a=textLen+a);for(var r="",c=0,d=o(i),u=0;u<d.length;u++){var l=d[u],m=t.length(l);if(c>=n-(m==2?1:0))if(c+m<=a)r+=l;else break;c+=m}return r}})(Ne);var ct=Ne.exports,mt=_e(ct),lt=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},pt=_e(lt);function C(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=fe(e),e.length===0))return 0;e=e.replace(pt()," ");let o=t.ambiguousIsNarrow?1:2,i=0;for(let n of e){let a=n.codePointAt(0);if(a<=31||a>=127&&a<=159||a>=768&&a<=879)continue;switch(mt.eastAsianWidth(n)){case"F":case"W":i+=2;break;case"A":i+=o;break;default:i+=1}}return i}var Z=10,ue=(e=0)=>(t)=>`\x1B[${t+e}m`,be=(e=0)=>(t)=>`\x1B[${38+e};5;${t}m`,ge=(e=0)=>(t,o,i)=>`\x1B[${38+e};2;${t};${o};${i}m`,g={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(g.modifier);var dt=Object.keys(g.color),ut=Object.keys(g.bgColor);[...dt,...ut];function bt(){let e=new Map;for(let[t,o]of Object.entries(g)){for(let[i,n]of Object.entries(o))g[i]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},o[i]=g[i],e.set(n[0],n[1]);Object.defineProperty(g,t,{value:o,enumerable:!1})}return Object.defineProperty(g,"codes",{value:e,enumerable:!1}),g.color.close="\x1B[39m",g.bgColor.close="\x1B[49m",g.color.ansi=ue(),g.color.ansi256=be(),g.color.ansi16m=ge(),g.bgColor.ansi=ue(Z),g.bgColor.ansi256=be(Z),g.bgColor.ansi16m=ge(Z),Object.defineProperties(g,{rgbToAnsi256:{value:(t,o,i)=>t===o&&o===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(o/255*5)+Math.round(i/255*5),enumerable:!1},hexToRgb:{value:(t)=>{let o=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!o)return[0,0,0];let[i]=o;i.length===3&&(i=[...i].map((a)=>a+a).join(""));let n=Number.parseInt(i,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:(t)=>g.rgbToAnsi256(...g.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:(t)=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let o,i,n;if(t>=232)o=((t-232)*10+8)/255,i=o,n=o;else{t-=16;let c=t%36;o=Math.floor(t/36)/5,i=Math.floor(c/6)/5,n=c%6/5}let a=Math.max(o,i,n)*2;if(a===0)return 30;let r=30+(Math.round(n)<<2|Math.round(i)<<1|Math.round(o));return a===2&&(r+=60),r},enumerable:!1},rgbToAnsi:{value:(t,o,i)=>g.ansi256ToAnsi(g.rgbToAnsi256(t,o,i)),enumerable:!1},hexToAnsi:{value:(t)=>g.ansi256ToAnsi(g.hexToAnsi256(t)),enumerable:!1}}),g}var gt=bt(),H=new Set(["\x1B",""]),ht=39,K="\x07",Ae="[",xt="]",Oe="m",F=`${xt}8;;`,he=(e)=>`${H.values().next().value}${Ae}${e}${Oe}`,xe=(e)=>`${H.values().next().value}${F}${e}${K}`,Et=(e)=>e.split(" ").map((t)=>C(t)),V=(e,t,o)=>{let i=[...t],n=!1,a=!1,r=C(fe(e[e.length-1]));for(let[c,d]of i.entries()){let u=C(d);if(r+u<=o?e[e.length-1]+=d:(e.push(d),r=0),H.has(d)&&(n=!0,a=i.slice(c+1).join("").startsWith(F)),n){a?d===K&&(n=!1,a=!1):d===Oe&&(n=!1);continue}r+=u,r===o&&c<i.length-1&&(e.push(""),r=0)}!r&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},vt=(e)=>{let t=e.split(" "),o=t.length;for(;o>0&&!(C(t[o-1])>0);)o--;return o===t.length?e:t.slice(0,o).join(" ")+t.slice(o).join("")},Rt=(e,t,o={})=>{if(o.trim!==!1&&e.trim()==="")return"";let i="",n,a,r=Et(e),c=[""];for(let[u,l]of e.split(" ").entries()){o.trim!==!1&&(c[c.length-1]=c[c.length-1].trimStart());let m=C(c[c.length-1]);if(u!==0&&(m>=t&&(o.wordWrap===!1||o.trim===!1)&&(c.push(""),m=0),(m>0||o.trim===!1)&&(c[c.length-1]+=" ",m++)),o.hard&&r[u]>t){let p=t-m,x=1+Math.floor((r[u]-p-1)/t);Math.floor((r[u]-1)/t)<x&&c.push(""),V(c,l,t);continue}if(m+r[u]>t&&m>0&&r[u]>0){if(o.wordWrap===!1&&m<t){V(c,l,t);continue}c.push("")}if(m+r[u]>t&&o.wordWrap===!1){V(c,l,t);continue}c[c.length-1]+=l}o.trim!==!1&&(c=c.map((u)=>vt(u)));let d=[...c.join(`
|
|
3
|
+
`)];for(let[u,l]of d.entries()){if(i+=l,H.has(l)){let{groups:p}=new RegExp(`(?:\\${Ae}(?<code>\\d+)m|\\${F}(?<uri>.*)${K})`).exec(d.slice(u).join(""))||{groups:{}};if(p.code!==void 0){let x=Number.parseFloat(p.code);n=x===ht?void 0:x}else p.uri!==void 0&&(a=p.uri.length===0?void 0:p.uri)}let m=gt.codes.get(Number(n));d[u+1]===`
|
|
4
4
|
`?(a&&(i+=xe("")),n&&m&&(i+=he(m))):l===`
|
|
5
|
-
`&&(n&&m&&(i+=he(n)),a&&(i+=xe(a)))}return i};function Ee(
|
|
5
|
+
`&&(n&&m&&(i+=he(n)),a&&(i+=xe(a)))}return i};function Ee(e,t,o){return String(e).normalize().replace(/\r\n/g,`
|
|
6
6
|
`).split(`
|
|
7
|
-
`).map((i)=>
|
|
8
|
-
`)}var
|
|
7
|
+
`).map((i)=>Rt(i,t,o)).join(`
|
|
8
|
+
`)}var St=Object.defineProperty,yt=(e,t,o)=>(t in e)?St(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,R=(e,t,o)=>(yt(e,typeof t!="symbol"?t+"":t,o),o);function It(e,t){if(e===t)return;let o=e.split(`
|
|
9
9
|
`),i=t.split(`
|
|
10
|
-
`),n=[];for(let a=0;a<Math.max(o.length,i.length);a++)o[a]!==i[a]&&n.push(a);return n}var we=Symbol("clack:cancel");function O(
|
|
11
|
-
`),
|
|
12
|
-
`).length-1;this.output.write(E.cursor.move(-999,
|
|
13
|
-
`);this.output.write(i[o]),this._prevFrame=
|
|
10
|
+
`),n=[];for(let a=0;a<Math.max(o.length,i.length);a++)o[a]!==i[a]&&n.push(a);return n}var we=Symbol("clack:cancel");function O(e){return e===we}function z(e,t){e.isTTY&&e.setRawMode(t)}var ve=new Map([["k","up"],["j","down"],["h","left"],["l","right"]]),ft=new Set(["up","down","left","right","space","enter"]);class P{constructor({render:e,input:t=ye,output:o=Ie,...i},n=!0){R(this,"input"),R(this,"output"),R(this,"rl"),R(this,"opts"),R(this,"_track",!1),R(this,"_render"),R(this,"_cursor",0),R(this,"state","initial"),R(this,"value"),R(this,"error",""),R(this,"subscribers",new Map),R(this,"_prevFrame",""),this.opts=i,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=e.bind(this),this._track=n,this.input=t,this.output=o}prompt(){let e=new it(0);return e._write=(t,o,i)=>{this._track&&(this.value=this.rl.line.replace(/\t/g,""),this._cursor=this.rl.cursor,this.emit("value",this.value)),i()},this.input.pipe(e),this.rl=de.createInterface({input:this.input,output:e,tabSize:2,prompt:"",escapeCodeTimeout:50}),de.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),z(this.input,!0),this.output.on("resize",this.render),this.render(),new Promise((t,o)=>{this.once("submit",()=>{this.output.write(E.cursor.show),this.output.off("resize",this.render),z(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(E.cursor.show),this.output.off("resize",this.render),z(this.input,!1),t(we)})})}on(e,t){let o=this.subscribers.get(e)??[];o.push({cb:t}),this.subscribers.set(e,o)}once(e,t){let o=this.subscribers.get(e)??[];o.push({cb:t,once:!0}),this.subscribers.set(e,o)}emit(e,...t){let o=this.subscribers.get(e)??[],i=[];for(let n of o)n.cb(...t),n.once&&i.push(()=>o.splice(o.indexOf(n),1));for(let n of i)n()}unsubscribe(){this.subscribers.clear()}onKeypress(e,t){if(this.state==="error"&&(this.state="active"),t?.name&&!this._track&&ve.has(t.name)&&this.emit("cursor",ve.get(t.name)),t?.name&&ft.has(t.name)&&this.emit("cursor",t.name),e&&(e.toLowerCase()==="y"||e.toLowerCase()==="n")&&this.emit("confirm",e.toLowerCase()==="y"),e==="\t"&&this.opts.placeholder&&(this.value||(this.rl.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),e&&this.emit("key",e.toLowerCase()),t?.name==="return"){if(this.opts.validate){let o=this.opts.validate(this.value);o&&(this.error=o,this.state="error",this.rl.write(this.value))}this.state!=="error"&&(this.state="submit")}e==="\x03"&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
|
|
11
|
+
`),z(this.input,!1),this.rl.close(),this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=Ee(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
12
|
+
`).length-1;this.output.write(E.cursor.move(-999,e*-1))}render(){let e=Ee(this._render(this)??"",process.stdout.columns,{hard:!0});if(e!==this._prevFrame){if(this.state==="initial")this.output.write(E.cursor.hide);else{let t=It(this._prevFrame,e);if(this.restoreCursor(),t&&t?.length===1){let o=t[0];this.output.write(E.cursor.move(0,o)),this.output.write(E.erase.lines(1));let i=e.split(`
|
|
13
|
+
`);this.output.write(i[o]),this._prevFrame=e,this.output.write(E.cursor.move(0,i.length-o-1));return}else if(t&&t?.length>1){let o=t[0];this.output.write(E.cursor.move(0,o)),this.output.write(E.erase.down());let i=e.split(`
|
|
14
14
|
`).slice(o);this.output.write(i.join(`
|
|
15
|
-
`)),this._prevFrame=
|
|
16
|
-
${U(this.state)} ${
|
|
17
|
-
`,o=
|
|
15
|
+
`)),this._prevFrame=e;return}this.output.write(E.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}}class X extends P{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(e){super(e,!1),this.value=!!e.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",(t)=>{this.output.write(E.cursor.move(0,-1)),this.value=t,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}}var _t=Object.defineProperty,Nt=(e,t,o)=>(t in e)?_t(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Re=(e,t,o)=>(Nt(e,typeof t!="symbol"?t+"":t,o),o),Te=class extends P{constructor(e){super(e,!1),Re(this,"options"),Re(this,"cursor",0),this.options=e.options,this.value=[...e.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:t})=>t===e.cursorAt),0),this.on("key",(t)=>{t==="a"&&this.toggleAll()}),this.on("cursor",(t)=>{switch(t){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let e=this.value.length===this.options.length;this.value=e?[]:this.options.map((t)=>t.value)}toggleValue(){let e=this.value.includes(this._value);this.value=e?this.value.filter((t)=>t!==this._value):[...this.value,this._value]}};var At=Object.defineProperty,Ot=(e,t,o)=>(t in e)?At(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Se=(e,t,o)=>(Ot(e,typeof t!="symbol"?t+"":t,o),o),Ce=class extends P{constructor(e){super(e,!1),Se(this,"options"),Se(this,"cursor",0),this.options=e.options,this.cursor=this.options.findIndex(({value:t})=>t===e.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",(t)=>{switch(t){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}};var wt=Object.defineProperty,Tt=(e,t,o)=>(t in e)?wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Ct=(e,t,o)=>(Tt(e,typeof t!="symbol"?t+"":t,o),o);class Q extends P{constructor(e){super(e),Ct(this,"valueWithCursor",""),this.on("finalize",()=>{this.value||(this.value=e.defaultValue),this.valueWithCursor=this.value}),this.on("value",()=>{if(this.cursor>=this.value.length)this.valueWithCursor=`${this.value}${G.default.inverse(G.default.hidden("_"))}`;else{let t=this.value.slice(0,this.cursor),o=this.value.slice(this.cursor);this.valueWithCursor=`${t}${G.default.inverse(o[0])}${o.slice(1)}`}})}get cursor(){return this._cursor}}var Pt=globalThis.process.platform.startsWith("win");function Pe({input:e=ye,output:t=Ie,overwrite:o=!0,hideCursor:i=!0}={}){let n=f.createInterface({input:e,output:t,prompt:"",tabSize:1});f.emitKeypressEvents(e,n),e.isTTY&&e.setRawMode(!0);let a=(r,{name:c})=>{if(String(r)==="\x03"){i&&t.write(E.cursor.show),process.exit(0);return}if(!o)return;f.moveCursor(t,c==="return"?0:-1,c==="return"?-1:0,()=>{f.clearLine(t,1,()=>{e.once("keypress",a)})})};return i&&t.write(E.cursor.hide),e.once("keypress",a),()=>{e.off("keypress",a),i&&t.write(E.cursor.show),e.isTTY&&!Pt&&e.setRawMode(!1),n.terminal=!1,n.close()}}var s=k(J(),1),w=k(W(),1);import y from"node:process";function Lt(){return y.platform!=="win32"?y.env.TERM!=="linux":!!y.env.CI||!!y.env.WT_SESSION||!!y.env.TERMINUS_SUBLIME||y.env.ConEmuTask==="{cmd::Cmder}"||y.env.TERM_PROGRAM==="Terminus-Sublime"||y.env.TERM_PROGRAM==="vscode"||y.env.TERM==="xterm-256color"||y.env.TERM==="alacritty"||y.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var D=Lt(),h=(e,t)=>D?e:t,kt=h("◆","*"),ke=h("■","x"),Me=h("▲","x"),Be=h("◇","o"),Mt=h("┌","T"),b=h("│","|"),_=h("└","—"),ee=h("●",">"),re=h("○"," "),Bt=h("◻","[•]"),Le=h("◼","[+]"),zt=h("◻","[ ]"),oo=h("▪","•"),no=h("─","-"),io=h("╮","+"),so=h("├","+"),ao=h("╯","+"),co=h("●","•"),mo=h("◆","*"),lo=h("▲","!"),po=h("■","x"),U=(e)=>{switch(e){case"initial":case"active":return s.default.cyan(kt);case"cancel":return s.default.red(ke);case"error":return s.default.yellow(Me);case"submit":return s.default.green(Be)}},te=(e)=>{let{cursor:t,options:o,style:i}=e,n=e.maxItems??1/0,a=Math.max(process.stdout.rows-4,0),r=Math.min(a,Math.max(n,5)),c=0;t>=c+r-3?c=Math.max(Math.min(t-r+3,o.length-r),0):t<c+2&&(c=Math.max(t-2,0));let d=r<o.length&&c>0,u=r<o.length&&c+r<o.length;return o.slice(c,c+r).map((l,m,p)=>{let x=m===0&&d,v=m===p.length-1&&u;return x||v?s.default.dim("..."):i(l,m+c===t)})},ze=(e)=>new Q({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,render(){let t=`${s.default.gray(b)}
|
|
16
|
+
${U(this.state)} ${e.message}
|
|
17
|
+
`,o=e.placeholder?s.default.inverse(e.placeholder[0])+s.default.dim(e.placeholder.slice(1)):s.default.inverse(s.default.hidden("_")),i=this.value?this.valueWithCursor:o;switch(this.state){case"error":return`${t.trim()}
|
|
18
18
|
${s.default.yellow(b)} ${i}
|
|
19
19
|
${s.default.yellow(_)} ${s.default.yellow(this.error)}
|
|
20
|
-
`;case"submit":return`${t}${s.default.gray(b)} ${s.default.dim(this.value||
|
|
20
|
+
`;case"submit":return`${t}${s.default.gray(b)} ${s.default.dim(this.value||e.placeholder)}`;case"cancel":return`${t}${s.default.gray(b)} ${s.default.strikethrough(s.default.dim(this.value??""))}${this.value?.trim()?`
|
|
21
21
|
`+s.default.gray(b):""}`;default:return`${t}${s.default.cyan(b)} ${i}
|
|
22
22
|
${s.default.cyan(_)}
|
|
23
|
-
`}}}).prompt();var
|
|
24
|
-
${U(this.state)} ${
|
|
23
|
+
`}}}).prompt();var Ge=(e)=>{let t=e.active??"Yes",o=e.inactive??"No";return new X({active:t,inactive:o,initialValue:e.initialValue??!0,render(){let i=`${s.default.gray(b)}
|
|
24
|
+
${U(this.state)} ${e.message}
|
|
25
25
|
`,n=this.value?t:o;switch(this.state){case"submit":return`${i}${s.default.gray(b)} ${s.default.dim(n)}`;case"cancel":return`${i}${s.default.gray(b)} ${s.default.strikethrough(s.default.dim(n))}
|
|
26
26
|
${s.default.gray(b)}`;default:return`${i}${s.default.cyan(b)} ${this.value?`${s.default.green(ee)} ${t}`:`${s.default.dim(re)} ${s.default.dim(t)}`} ${s.default.dim("/")} ${this.value?`${s.default.dim(re)} ${s.default.dim(o)}`:`${s.default.green(ee)} ${o}`}
|
|
27
27
|
${s.default.cyan(_)}
|
|
28
|
-
`}}}).prompt()},
|
|
29
|
-
${U(this.state)} ${
|
|
28
|
+
`}}}).prompt()},S=(e)=>{let t=(o,i)=>{let n=o.label??String(o.value);switch(i){case"selected":return`${s.default.dim(n)}`;case"active":return`${s.default.green(ee)} ${n} ${o.hint?s.default.dim(`(${o.hint})`):""}`;case"cancelled":return`${s.default.strikethrough(s.default.dim(n))}`;default:return`${s.default.dim(re)} ${s.default.dim(n)}`}};return new Ce({options:e.options,initialValue:e.initialValue,render(){let o=`${s.default.gray(b)}
|
|
29
|
+
${U(this.state)} ${e.message}
|
|
30
30
|
`;switch(this.state){case"submit":return`${o}${s.default.gray(b)} ${t(this.options[this.cursor],"selected")}`;case"cancel":return`${o}${s.default.gray(b)} ${t(this.options[this.cursor],"cancelled")}
|
|
31
|
-
${s.default.gray(b)}`;default:return`${o}${s.default.cyan(b)} ${te({cursor:this.cursor,options:this.options,maxItems:
|
|
31
|
+
${s.default.gray(b)}`;default:return`${o}${s.default.cyan(b)} ${te({cursor:this.cursor,options:this.options,maxItems:e.maxItems,style:(i,n)=>t(i,n?"active":"inactive")}).join(`
|
|
32
32
|
${s.default.cyan(b)} `)}
|
|
33
33
|
${s.default.cyan(_)}
|
|
34
|
-
`}}}).prompt()};var He=(
|
|
34
|
+
`}}}).prompt()};var He=(e)=>{let t=(o,i)=>{let n=o.label??String(o.value);return i==="active"?`${s.default.cyan(Bt)} ${n} ${o.hint?s.default.dim(`(${o.hint})`):""}`:i==="selected"?`${s.default.green(Le)} ${s.default.dim(n)}`:i==="cancelled"?`${s.default.strikethrough(s.default.dim(n))}`:i==="active-selected"?`${s.default.green(Le)} ${n} ${o.hint?s.default.dim(`(${o.hint})`):""}`:i==="submitted"?`${s.default.dim(n)}`:`${s.default.dim(zt)} ${s.default.dim(n)}`};return new Te({options:e.options,initialValues:e.initialValues,required:e.required??!0,cursorAt:e.cursorAt,validate(o){if(this.required&&o.length===0)return`Please select at least one option.
|
|
35
35
|
${s.default.reset(s.default.dim(`Press ${s.default.gray(s.default.bgWhite(s.default.inverse(" space ")))} to select, ${s.default.gray(s.default.bgWhite(s.default.inverse(" enter ")))} to submit`))}`},render(){let o=`${s.default.gray(b)}
|
|
36
|
-
${U(this.state)} ${
|
|
37
|
-
`,i=(n,a)=>{let
|
|
36
|
+
${U(this.state)} ${e.message}
|
|
37
|
+
`,i=(n,a)=>{let r=this.value.includes(n.value);return a&&r?t(n,"active-selected"):r?t(n,"selected"):t(n,a?"active":"inactive")};switch(this.state){case"submit":return`${o}${s.default.gray(b)} ${this.options.filter(({value:n})=>this.value.includes(n)).map((n)=>t(n,"submitted")).join(s.default.dim(", "))||s.default.dim("none")}`;case"cancel":{let n=this.options.filter(({value:a})=>this.value.includes(a)).map((a)=>t(a,"cancelled")).join(s.default.dim(", "));return`${o}${s.default.gray(b)} ${n.trim()?`${n}
|
|
38
38
|
${s.default.gray(b)}`:""}`}case"error":{let n=this.error.split(`
|
|
39
|
-
`).map((a,
|
|
40
|
-
`);return o+s.default.yellow(b)+" "+te({options:this.options,cursor:this.cursor,maxItems:
|
|
39
|
+
`).map((a,r)=>r===0?`${s.default.yellow(_)} ${s.default.yellow(a)}`:` ${a}`).join(`
|
|
40
|
+
`);return o+s.default.yellow(b)+" "+te({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:i}).join(`
|
|
41
41
|
${s.default.yellow(b)} `)+`
|
|
42
42
|
`+n+`
|
|
43
|
-
`}default:return`${o}${s.default.cyan(b)} ${te({options:this.options,cursor:this.cursor,maxItems:
|
|
43
|
+
`}default:return`${o}${s.default.cyan(b)} ${te({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:i}).join(`
|
|
44
44
|
${s.default.cyan(b)} `)}
|
|
45
45
|
${s.default.cyan(_)}
|
|
46
|
-
`}}}).prompt()};var L=(
|
|
46
|
+
`}}}).prompt()};var L=(e="")=>{process.stdout.write(`${s.default.gray(_)} ${s.default.red(e)}
|
|
47
47
|
|
|
48
|
-
`)},oe=(
|
|
49
|
-
`)},ne=(
|
|
50
|
-
${s.default.gray(_)} ${
|
|
48
|
+
`)},oe=(e="")=>{process.stdout.write(`${s.default.gray(Mt)} ${e}
|
|
49
|
+
`)},ne=(e="")=>{process.stdout.write(`${s.default.gray(b)}
|
|
50
|
+
${s.default.gray(_)} ${e}
|
|
51
51
|
|
|
52
|
-
`)};var $=()=>{let
|
|
53
|
-
`);let v=0,
|
|
54
|
-
`),l(),o()};return{start:m,stop:p,message:(x="")=>{a=x??a}}};var Ue=async(
|
|
52
|
+
`)};var $=()=>{let e=D?["◒","◐","◓","◑"]:["•","o","O","0"],t=D?80:120,o,i,n=!1,a="",r=(x)=>{let v=x>1?"Something went wrong":"Canceled";n&&p(v,x)},c=()=>r(2),d=()=>r(1),u=()=>{process.on("uncaughtExceptionMonitor",c),process.on("unhandledRejection",c),process.on("SIGINT",d),process.on("SIGTERM",d),process.on("exit",r)},l=()=>{process.removeListener("uncaughtExceptionMonitor",c),process.removeListener("unhandledRejection",c),process.removeListener("SIGINT",d),process.removeListener("SIGTERM",d),process.removeListener("exit",r)},m=(x="")=>{n=!0,o=Pe(),a=x.replace(/\.+$/,""),process.stdout.write(`${s.default.gray(b)}
|
|
53
|
+
`);let v=0,A=0;u(),i=setInterval(()=>{let Yr=s.default.magenta(e[v]),Jr=".".repeat(Math.floor(A)).slice(0,3);process.stdout.write(w.cursor.move(-999,0)),process.stdout.write(w.erase.down(1)),process.stdout.write(`${Yr} ${a}${Jr}`),v=v+1<e.length?v+1:0,A=A<e.length?A+0.125:0},t)},p=(x="",v=0)=>{a=x??a,n=!1,clearInterval(i);let A=v===0?s.default.green(Be):v===1?s.default.red(ke):s.default.red(Me);process.stdout.write(w.cursor.move(-999,0)),process.stdout.write(w.erase.down(1)),process.stdout.write(`${A} ${a}
|
|
54
|
+
`),l(),o()};return{start:m,stop:p,message:(x="")=>{a=x??a}}};var Ue=async(e,t)=>{let o={},i=Object.keys(e);for(let n of i){let a=e[n],r=await a({results:o})?.catch((c)=>{throw c});if(typeof t?.onCancel=="function"&&O(r)){o[n]="canceled",t.onCancel({results:o});continue}o[n]=r}return o};async function $e(){let e=await Ue({caching:()=>S({message:"Select Caching strategy:",options:[{value:"none",label:"None"},{value:"memory",label:"In-memory (Local caching)"},{value:"redis",label:"Redis (Distributed caching)"}]}),logger:()=>S({message:"Select Logging strategy:",options:[{value:"none",label:"None"},{value:"console",label:"Console (Basic terminal logs)"},{value:"otel",label:"OpenTelemetry (Advanced logging + PostHog)"}]}),orm:()=>S({message:"Select a Database ORM:",options:[{value:"prisma",label:"Prisma (PostgreSQL + Typed schemas)"},{value:"drizzle",label:"Drizzle (PostgreSQL + Lightweight SQL)"},{value:"mongoose",label:"Mongoose (MongoDB)"},{value:"none",label:"None"}]}),auth:()=>S({message:"Select an Authentication provider:",options:[{value:"clerk",label:"Clerk (Hosted Auth)"},{value:"betterauth",label:"Better-Auth (Self-hosted)"},{value:"custom",label:"Custom JWT Middleware (Starter)"},{value:"none",label:"None"}]}),rateLimit:()=>S({message:"Select Rate Limiting strategy:",options:[{value:"none",label:"None"},{value:"basic",label:"Basic (Memory-based)"},{value:"redis",label:"Redis-based (Distributed)"}]}),inngest:()=>S({message:"Select Inngest support:",options:[{value:"none",label:"None"},{value:"basic",label:"Basic (Event-driven background functions)"}]}),email:()=>S({message:"Select an Email provider:",options:[{value:"resend",label:"Resend (Modern API)"},{value:"nodemailer",label:"Nodemailer (Traditional SMTP)"},{value:"none",label:"None"}]}),features:()=>He({message:"Extra features:",options:[{value:"pagination",label:"Pagination",hint:"Zod pagination helpers"}],required:!1}),formatter:()=>S({message:"Select a formatter/linter:",options:[{value:"biome",label:"Biome (Recommended: Fast formatter & linter)"},{value:"prettier",label:"Prettier + ESLint"},{value:"none",label:"None"}]}),docker:()=>Ge({message:"Would you like to include Docker support (Dockerfile, docker-compose)?",initialValue:!0}),ci:()=>S({message:"Select a CI/CD setup:",options:[{value:"github",label:"GitHub Actions (Basic CI)"},{value:"none",label:"None"}]})},{onCancel:()=>{L("Operation cancelled."),process.exit(0)}}),t=e.features;return{caching:e.caching,logger:e.logger,orm:e.orm,rateLimit:e.rateLimit,auth:e.auth,email:e.email,pagination:t.includes("pagination"),formatter:e.formatter,inngest:e.inngest,docker:e.docker,ci:e.ci}}import Hr from"fs/promises";import Ur from"path";var qe=`{
|
|
55
55
|
"compilerOptions": {
|
|
56
56
|
"lib": ["ESNext"],
|
|
57
57
|
"target": "ESNext",
|
|
@@ -193,59 +193,59 @@ export default tseslint.config(
|
|
|
193
193
|
ignores: ['generated/', 'dist/', 'out/', 'node_modules/']
|
|
194
194
|
}
|
|
195
195
|
);
|
|
196
|
-
`;function Ke(
|
|
196
|
+
`;function Ke(e,t){let o={cors:"^2.8.5",dotenv:"^16.4.5",express:"^5.0.0",helmet:"^7.1.0",zod:"^3.23.8"};if(t.caching==="redis"||t.rateLimit==="redis")o.redis="^4.7.0";if(t.logger==="otel")o["@opentelemetry/api-logs"]="^0.53.0",o["@opentelemetry/exporter-logs-otlp-http"]="^0.53.0",o["@opentelemetry/resources"]="^1.26.0",o["@opentelemetry/sdk-logs"]="^0.53.0";if(t.orm==="prisma")o["@prisma/adapter-pg"]="^7.4.2",o["@prisma/client"]="^7.4.2",o.pg="^8.20.0",o.prisma="^7.4.2";else if(t.orm==="drizzle")o["drizzle-orm"]="^0.33.0",o["drizzle-kit"]="^0.24.0",o.pg="^8.12.0";else if(t.orm==="mongoose")o.mongoose="^8.6.0";if(t.auth==="clerk")o["@clerk/express"]="^1.3.11";else if(t.auth==="betterauth")o["better-auth"]="^1.1.18";else if(t.auth==="custom")o.jsonwebtoken="^9.0.2";if(t.rateLimit!=="none")o["express-rate-limit"]="^7.4.0";if(t.email==="resend")o.resend="^3.5.0";else if(t.email==="nodemailer")o.nodemailer="^6.9.14";if(t.inngest!=="none")o.inngest="latest";let i={"@types/bun":"latest","@types/cors":"^2.8.19","@types/express":"^5.0.6","@types/node":"^22.0.0"};if(t.email==="nodemailer")i["@types/nodemailer"]="^6.4.15";if(t.auth==="custom")i["@types/jsonwebtoken"]="^9.0.7";if(t.orm==="prisma"||t.orm==="drizzle")i["@types/pg"]="^8.11.6";let n={dev:"bun run --watch src/app.ts"};if(t.orm==="prisma")n["db:generate"]="prisma generate";if(t.formatter==="biome")i["@biomejs/biome"]="1.8.3",n.format="biome format --write .",n.lint="biome check .";else if(t.formatter==="prettier")i.prettier="^3.3.3",i.eslint="^9.9.0",i["typescript-eslint"]="^8.0.1",n.format="prettier --write .",n.lint="eslint .";return JSON.stringify({name:e,module:"src/app.ts",type:"module",private:!0,scripts:n,devDependencies:i,peerDependencies:{typescript:"^5"},dependencies:o},null,2)}function Fe(e,t){let o=`PORT=8000
|
|
197
197
|
NODE_ENV=development
|
|
198
198
|
IS_DEV=true
|
|
199
|
-
`;if(
|
|
199
|
+
`;if(e.caching==="redis")o+=`CACHE_ENABLED=true
|
|
200
200
|
REDIS_URL=redis://localhost:6379
|
|
201
|
-
`;if(
|
|
201
|
+
`;if(e.logger==="otel")o+=`SERVICE_NAME=${t}
|
|
202
202
|
POSTHOG_URL=https://us.i.posthog.com/i/v1/logs
|
|
203
203
|
POSTHOG_API_KEY=your_key_here
|
|
204
|
-
`;if(
|
|
204
|
+
`;if(e.orm!=="none")if(e.orm==="mongoose")o+=`DATABASE_URL=mongodb://localhost:27017/my_db
|
|
205
205
|
`;else o+=`DATABASE_URL=postgresql://user:pass@localhost:5432/db?schema=public
|
|
206
206
|
DIRECT_URL=postgresql://user:pass@localhost:5432/db
|
|
207
|
-
`;else if(
|
|
208
|
-
`;if(
|
|
207
|
+
`;else if(e.auth==="betterauth")o+=`DATABASE_URL=postgresql://user:pass@localhost:5432/db?schema=public
|
|
208
|
+
`;if(e.auth==="betterauth")o+=`BETTER_AUTH_SECRET=super_secret_string
|
|
209
209
|
BETTER_AUTH_URL=http://localhost:8000
|
|
210
|
-
`;else if(
|
|
211
|
-
`;if(
|
|
212
|
-
`;else if(
|
|
210
|
+
`;else if(e.auth==="custom")o+=`JWT_SECRET=your_super_secret_jwt_key_here
|
|
211
|
+
`;if(e.email==="resend")o+=`RESEND_API_KEY=re_123456789
|
|
212
|
+
`;else if(e.email==="nodemailer")o+=`SMTP_HOST=smtp.mailtrap.io
|
|
213
213
|
SMTP_PORT=2525
|
|
214
214
|
SMTP_USER=user
|
|
215
215
|
SMTP_PASS=pass
|
|
216
|
-
`;if(
|
|
216
|
+
`;if(e.inngest!=="none")o+=`INNGEST_EVENT_KEY=your_event_key_here
|
|
217
217
|
INNGEST_SIGNING_KEY=your_signing_key_here
|
|
218
|
-
`;return o}function
|
|
218
|
+
`;return o}function Xe(e,t){return`export const env = {
|
|
219
219
|
IS_DEV: process.env.NODE_ENV !== "production",
|
|
220
220
|
NODE_ENV: process.env.NODE_ENV ?? "development",
|
|
221
221
|
PORT: Number(process.env.PORT) || 8000,
|
|
222
222
|
SERVICE_NAME: process.env.SERVICE_NAME ?? "${t}",
|
|
223
223
|
SERVICE_VERSION: process.env.npm_package_version ?? "1.0.0",
|
|
224
|
-
${
|
|
224
|
+
${e.caching==="redis"?` REDIS_URL: process.env.REDIS_URL,
|
|
225
225
|
IS_CACHE_ENABLED: process.env.CACHE_ENABLED === "true",`:""}
|
|
226
|
-
${
|
|
227
|
-
${
|
|
226
|
+
${e.caching==="memory"?" IS_CACHE_ENABLED: true,":""}
|
|
227
|
+
${e.logger==="otel"?` POSTHOG_API_KEY: process.env.POSTHOG_API_KEY,
|
|
228
228
|
POSTHOG_URL: process.env.POSTHOG_URL,`:""}
|
|
229
|
-
${
|
|
230
|
-
${
|
|
229
|
+
${e.orm!=="none"||e.auth==="betterauth"?" DATABASE_URL: process.env.DATABASE_URL,":""}
|
|
230
|
+
${e.auth==="clerk"?` CLERK_SECRET_KEY: process.env.CLERK_SECRET_KEY,
|
|
231
231
|
CLERK_PUBLISHABLE_KEY: process.env.CLERK_PUBLISHABLE_KEY,`:""}
|
|
232
|
-
${
|
|
232
|
+
${e.auth==="betterauth"?` BETTER_AUTH_SECRET: process.env.BETTER_AUTH_SECRET,
|
|
233
233
|
BETTER_AUTH_URL: process.env.BETTER_AUTH_URL,`:""}
|
|
234
|
-
${
|
|
235
|
-
${
|
|
236
|
-
${
|
|
234
|
+
${e.auth==="custom"?" JWT_SECRET: process.env.JWT_SECRET,":""}
|
|
235
|
+
${e.email==="resend"?" RESEND_API_KEY: process.env.RESEND_API_KEY,":""}
|
|
236
|
+
${e.email==="nodemailer"?` SMTP_HOST: process.env.SMTP_HOST,
|
|
237
237
|
SMTP_PORT: Number(process.env.SMTP_PORT) || 587,
|
|
238
238
|
SMTP_USER: process.env.SMTP_USER,
|
|
239
239
|
SMTP_PASS: process.env.SMTP_PASS,`:""}
|
|
240
|
-
${
|
|
240
|
+
${e.inngest!=="none"?` INNGEST_EVENT_KEY: process.env.INNGEST_EVENT_KEY,
|
|
241
241
|
INNGEST_SIGNING_KEY: process.env.INNGEST_SIGNING_KEY,`:""}
|
|
242
242
|
// [AURA_ENV_KEYS]
|
|
243
243
|
};
|
|
244
|
-
`}function Qe(
|
|
245
|
-
`),o=[...new Set(
|
|
246
|
-
`),i=[...new Set(
|
|
247
|
-
`),n=[...new Set(
|
|
248
|
-
`),a=[...new Set(
|
|
244
|
+
`}function Qe(e){let t=[...new Set(e.imports||[])].join(`
|
|
245
|
+
`),o=[...new Set(e.init||[])].map((r)=>` ${r}`).join(`
|
|
246
|
+
`),i=[...new Set(e.middleware||[])].map((r)=>` ${r}`).join(`
|
|
247
|
+
`),n=[...new Set(e.errorHandler||[])].map((r)=>` ${r}`).join(`
|
|
248
|
+
`),a=[...new Set(e.shutdown||[])].map((r)=>` ${r}`).join(`
|
|
249
249
|
`);return`${t}
|
|
250
250
|
// [AURA_IMPORTS]
|
|
251
251
|
|
|
@@ -271,9 +271,9 @@ init().catch(async (err) => {
|
|
|
271
271
|
console.error("server.bootstrap_failed", err);
|
|
272
272
|
process.exit(1);
|
|
273
273
|
});
|
|
274
|
-
`}function De(
|
|
274
|
+
`}function De(e){return`import { ZodError } from "zod";
|
|
275
275
|
import type { Request, Response, NextFunction } from "express";
|
|
276
|
-
${
|
|
276
|
+
${e.logger!=="none"?'import { logger } from "./logger";':""}
|
|
277
277
|
import { AppError } from "./app-error";
|
|
278
278
|
import type { ApiResponse } from "../base/define-route";
|
|
279
279
|
|
|
@@ -319,7 +319,7 @@ export function errorHandler(
|
|
|
319
319
|
|
|
320
320
|
res.status(500).json(response);
|
|
321
321
|
}
|
|
322
|
-
`}function er(
|
|
322
|
+
`}function er(e){return`import { z, type ZodType } from "zod";
|
|
323
323
|
|
|
324
324
|
export interface ApiResponse<T> {
|
|
325
325
|
success: boolean;
|
|
@@ -332,7 +332,7 @@ export interface ApiResponse<T> {
|
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
-
${
|
|
335
|
+
${e.auth!=="none"?`export interface AuthUser {
|
|
336
336
|
id: string;
|
|
337
337
|
roles: string[];
|
|
338
338
|
}`:""}
|
|
@@ -353,21 +353,21 @@ export interface RouteConfig<
|
|
|
353
353
|
params?: TParams;
|
|
354
354
|
};
|
|
355
355
|
output: TOutput;
|
|
356
|
-
${
|
|
356
|
+
${e.rateLimit!=="none"?` rateLimit?: {
|
|
357
357
|
enabled: boolean;
|
|
358
358
|
windowMs?: number;
|
|
359
359
|
max?: number;
|
|
360
360
|
};`:""}
|
|
361
|
-
${
|
|
361
|
+
${e.auth!=="none"?` auth?: {
|
|
362
362
|
required: boolean;
|
|
363
363
|
roles?: string[];
|
|
364
364
|
};`:""}
|
|
365
|
-
${
|
|
365
|
+
${e.caching!=="none"?` cache?: {
|
|
366
366
|
enabled: boolean;
|
|
367
367
|
ttl: number;
|
|
368
|
-
key: (ctx: { params: any; query: any${
|
|
368
|
+
key: (ctx: { params: any; query: any${e.auth!=="none"?"; user: any":""} }) => string;
|
|
369
369
|
};`:""}
|
|
370
|
-
${
|
|
370
|
+
${e.logger!=="none"?` logging?: {
|
|
371
371
|
enabled: boolean;
|
|
372
372
|
fields?: Array<keyof z.infer<TOutput>>;
|
|
373
373
|
redact?: Array<keyof z.infer<TOutput>>;
|
|
@@ -377,15 +377,15 @@ ${r.logger!=="none"?` logging?: {
|
|
|
377
377
|
body: TBody extends ZodType ? z.infer<TBody> : never;
|
|
378
378
|
query: TQuery extends ZodType ? z.infer<TQuery> : never;
|
|
379
379
|
params: TParams extends ZodType ? z.infer<TParams> : never;
|
|
380
|
-
${
|
|
381
|
-
${
|
|
380
|
+
${e.auth!=="none"?" user?: AuthUser;":""}
|
|
381
|
+
${e.logger!=="none"?" log: (attrs: Record<string, unknown>) => void;":""}
|
|
382
382
|
}) => Promise<z.infer<TOutput>>;
|
|
383
383
|
onRequest?: (ctx: {
|
|
384
384
|
body: TBody extends ZodType ? z.infer<TBody> : undefined;
|
|
385
385
|
query: TQuery extends ZodType ? z.infer<TQuery> : undefined;
|
|
386
386
|
params: TParams extends ZodType ? z.infer<TParams> : undefined;
|
|
387
|
-
${
|
|
388
|
-
${
|
|
387
|
+
${e.auth!=="none"?" user?: AuthUser;":""}
|
|
388
|
+
${e.logger!=="none"?" log: (attrs: Record<string, unknown>) => void;":""}
|
|
389
389
|
}) => Promise<void> | void;
|
|
390
390
|
}
|
|
391
391
|
|
|
@@ -397,17 +397,17 @@ export function defineRoute<
|
|
|
397
397
|
>(config: RouteConfig<TBody, TQuery, TParams, TOutput>) {
|
|
398
398
|
return config;
|
|
399
399
|
}
|
|
400
|
-
`}function rr(
|
|
400
|
+
`}function rr(e){return`import {
|
|
401
401
|
type Router,
|
|
402
402
|
type Request,
|
|
403
403
|
type Response,
|
|
404
404
|
type NextFunction,
|
|
405
405
|
} from "express";
|
|
406
|
-
${
|
|
406
|
+
${e.rateLimit!=="none"?'import rateLimit from "express-rate-limit";':""}
|
|
407
407
|
import type { RouteConfig, ApiResponse } from "./define-route";
|
|
408
|
-
${
|
|
409
|
-
${
|
|
410
|
-
${
|
|
408
|
+
${e.caching!=="none"?'import { getCacheOptions, setCacheOptions } from "../utils/cache";':""}
|
|
409
|
+
${e.caching!=="none"?'import { cache } from "../utils/cache";':""}
|
|
410
|
+
${e.auth!=="none"?'import { authMiddleware } from "../middlewares/auth";':""}
|
|
411
411
|
|
|
412
412
|
export function registerRoute(
|
|
413
413
|
router: Router,
|
|
@@ -415,7 +415,7 @@ export function registerRoute(
|
|
|
415
415
|
) {
|
|
416
416
|
const middlewares: any[] = [];
|
|
417
417
|
|
|
418
|
-
${
|
|
418
|
+
${e.rateLimit!=="none"?` if (route.rateLimit?.enabled) {
|
|
419
419
|
middlewares.push(
|
|
420
420
|
rateLimit({
|
|
421
421
|
windowMs: route.rateLimit.windowMs ?? 60_000,
|
|
@@ -426,7 +426,7 @@ ${r.rateLimit!=="none"?` if (route.rateLimit?.enabled) {
|
|
|
426
426
|
);
|
|
427
427
|
}`:""}
|
|
428
428
|
|
|
429
|
-
${
|
|
429
|
+
${e.auth!=="none"?` if (route.auth?.required) {
|
|
430
430
|
middlewares.push(authMiddleware(route.auth.roles));
|
|
431
431
|
}`:""}
|
|
432
432
|
|
|
@@ -435,8 +435,8 @@ ${r.auth!=="none"?` if (route.auth?.required) {
|
|
|
435
435
|
const body = route.input?.body ? route.input.body.parse(req.body) : undefined;
|
|
436
436
|
const query = route.input?.query ? route.input.query.parse(req.query) : undefined;
|
|
437
437
|
const params = route.input?.params ? route.input.params.parse(req.params) : undefined;
|
|
438
|
-
${
|
|
439
|
-
${
|
|
438
|
+
${e.auth!=="none"?" const user = (req as any).user;":""}
|
|
439
|
+
${e.logger!=="none"?` const log = (attrs: Record<string, unknown>) => Object.assign(req._log, attrs);
|
|
440
440
|
req._log.route = route.path;
|
|
441
441
|
|
|
442
442
|
if (route.logging && !route.logging.enabled) {
|
|
@@ -444,18 +444,18 @@ ${r.logger!=="none"?` const log = (attrs: Record<string, unknown>) => Objec
|
|
|
444
444
|
}`:""}
|
|
445
445
|
|
|
446
446
|
if (route.onRequest) {
|
|
447
|
-
await route.onRequest({ body, query, params${
|
|
447
|
+
await route.onRequest({ body, query, params${e.auth!=="none"?", user":""}${e.logger!=="none"?", log":""} });
|
|
448
448
|
}
|
|
449
449
|
|
|
450
|
-
${
|
|
451
|
-
const key = route.cache.key({ params, query${
|
|
450
|
+
${e.caching!=="none"?` if (route.cache?.enabled) {
|
|
451
|
+
const key = route.cache.key({ params, query${e.auth!=="none"?", user":""} });
|
|
452
452
|
const cached = await cache.get(key);
|
|
453
453
|
if (cached) {
|
|
454
454
|
return res.json({ success: true, data: cached, fromCache: true });
|
|
455
455
|
}
|
|
456
456
|
}`:""}
|
|
457
457
|
|
|
458
|
-
const result = await route.handler({ body, query, params${
|
|
458
|
+
const result = await route.handler({ body, query, params${e.auth!=="none"?", user":""}${e.logger!=="none"?", log":""} });
|
|
459
459
|
const validatedOutput = route.output.parse(result);
|
|
460
460
|
|
|
461
461
|
const response: ApiResponse<any> = {
|
|
@@ -476,23 +476,23 @@ ${r.caching!=="none"?` if (route.cache?.enabled) {
|
|
|
476
476
|
|
|
477
477
|
router[route.method](route.path, ...middlewares, handler);
|
|
478
478
|
}
|
|
479
|
-
`}function tr(
|
|
479
|
+
`}function tr(e){let t=`export { defineRoute } from "./define-route";
|
|
480
480
|
export { loadRoutes } from "./route-loader";
|
|
481
481
|
export { registerRoute } from "./route-registry";
|
|
482
482
|
export { errorHandler } from "../utils/error-handler";
|
|
483
483
|
export { AppError } from "../utils/app-error";
|
|
484
|
-
`;if(
|
|
484
|
+
`;if(e.caching!=="none")t+=`export { cache } from "../utils/cache";
|
|
485
485
|
export { cacheKeys } from "../utils/cache-keys";
|
|
486
|
-
`;if(
|
|
487
|
-
`;if(
|
|
488
|
-
`;else if(
|
|
489
|
-
`;else if(
|
|
490
|
-
`;if(
|
|
491
|
-
`;if(
|
|
492
|
-
`;if(
|
|
493
|
-
`;return t}function or(
|
|
486
|
+
`;if(e.logger!=="none")t+=`export { logger, gracefulShutdown } from "../utils/logger";
|
|
487
|
+
`;if(e.orm==="prisma")t+=`export { prisma } from "../config/prisma";
|
|
488
|
+
`;else if(e.orm==="drizzle")t+=`export { db } from "../config/drizzle";
|
|
489
|
+
`;else if(e.orm==="mongoose")t+=`export { connectDatabase } from "../config/mongoose";
|
|
490
|
+
`;if(e.auth!=="none")t+=`export { authMiddleware${e.auth==="betterauth"?", authHandler":""} } from "../middlewares/auth";
|
|
491
|
+
`;if(e.pagination)t+=`export { paginationInput, paginatedOutput, paginate } from "../utils/pagination";
|
|
492
|
+
`;if(e.email!=="none")t+=`export { sendEmail } from "../utils/email";
|
|
493
|
+
`;return t}function or(e){return`import { z } from "zod";
|
|
494
494
|
import { defineRoute } from "../base/define-route";
|
|
495
|
-
${
|
|
495
|
+
${e.caching==="redis"?'import { redisClient } from "../config/redis";':""}
|
|
496
496
|
import { env } from "../config/env";
|
|
497
497
|
|
|
498
498
|
const startedAt = Date.now();
|
|
@@ -504,10 +504,10 @@ export const healthRoute = defineRoute({
|
|
|
504
504
|
status: z.string(),
|
|
505
505
|
uptime_s: z.number(),
|
|
506
506
|
version: z.string(),
|
|
507
|
-
${
|
|
507
|
+
${e.caching==="redis"?' redis: z.enum(["connected", "disconnected", "disabled"]),':""}
|
|
508
508
|
}),
|
|
509
509
|
handler: async () => {
|
|
510
|
-
${
|
|
510
|
+
${e.caching==="redis"?` let redis: "connected" | "disconnected" | "disabled" = "disabled";
|
|
511
511
|
if (env.IS_CACHE_ENABLED) {
|
|
512
512
|
try {
|
|
513
513
|
await redisClient.ping();
|
|
@@ -521,11 +521,11 @@ ${r.caching==="redis"?` let redis: "connected" | "disconnected" | "disabled"
|
|
|
521
521
|
status: "ok",
|
|
522
522
|
uptime_s: Math.floor((Date.now() - startedAt) / 1000),
|
|
523
523
|
version: env.SERVICE_VERSION || "1.0.0",
|
|
524
|
-
${
|
|
524
|
+
${e.caching==="redis"?" redis,":""}
|
|
525
525
|
};
|
|
526
526
|
},
|
|
527
527
|
});
|
|
528
|
-
`}var nr={id:"core",getFiles:(
|
|
528
|
+
`}var nr={id:"core",getFiles:(e,t)=>{return[{path:"package.json",content:Ke(t,e)},{path:"tsconfig.json",content:qe},{path:".gitignore",content:je},{path:".env",content:Fe(e,t)},{path:"src/config/env.ts",content:Xe(e,t)},{path:"src/utils/app-error.ts",content:We},{path:"src/utils/error-handler.ts",content:De(e)},{path:"src/base/index.ts",content:tr(e)},{path:"src/base/define-route.ts",content:er(e)},{path:"src/base/route-loader.ts",content:Ye},{path:"src/base/route-registry.ts",content:rr(e)},{path:"src/routes/health-route.ts",content:or(e)}]},getSnippets:(e)=>{return{imports:['import express from "express";','import helmet from "helmet";','import cors from "cors";','import { loadRoutes, registerRoute, errorHandler } from "./base";','import { env } from "./config/env";'],init:["const app = express();","app.use(helmet());","app.use(cors());","app.use(express.json());"],middleware:["const router = express.Router();","const routes = await loadRoutes();","routes.forEach((route) => registerRoute(router, route));",'app.use("/api", router);'],errorHandler:["app.use(errorHandler);"]}}};var ir=`generator client {
|
|
529
529
|
provider = "prisma-client"
|
|
530
530
|
output = "../generated/prisma"
|
|
531
531
|
}
|
|
@@ -615,7 +615,7 @@ const userSchema = new mongoose.Schema(
|
|
|
615
615
|
);
|
|
616
616
|
|
|
617
617
|
export const User = mongoose.model("User", userSchema);
|
|
618
|
-
`;var ur={id:"orm",getFiles:(
|
|
618
|
+
`;var ur={id:"orm",getFiles:(e)=>{let t=[];if(e.orm==="prisma")t.push({path:"prisma/schema.prisma",content:ir},{path:"prisma.config.ts",content:sr},{path:"src/config/prisma.ts",content:ar});else if(e.orm==="drizzle")t.push({path:"drizzle.config.ts",content:cr},{path:"src/db/schema.ts",content:lr},{path:"src/config/drizzle.ts",content:mr});else if(e.orm==="mongoose")t.push({path:"src/config/mongoose.ts",content:pr},{path:"src/models/user.model.ts",content:dr});return t},getSnippets:(e)=>{if(e.orm==="none")return{};return{imports:[e.orm==="mongoose"?'import { connectDatabase } from "./config/mongoose";':null].filter(Boolean),init:[e.orm==="mongoose"?"await connectDatabase();":null].filter(Boolean)}},getDependencies:(e)=>{if(e.orm==="prisma")return{"@prisma/adapter-pg":"^7.4.2","@prisma/client":"^7.4.2",pg:"^8.20.0",prisma:"^7.4.2"};if(e.orm==="drizzle")return{"drizzle-orm":"^0.33.0","drizzle-kit":"^0.24.0",pg:"^8.12.0"};if(e.orm==="mongoose")return{mongoose:"^8.6.0"};return{}},getDevDependencies:(e)=>{if(e.orm==="prisma"||e.orm==="drizzle")return{"@types/pg":"^8.11.6"};return{}},getScripts:(e)=>{if(e.orm==="prisma")return{"db:generate":"prisma generate"};return{}}};var br=`import type { Request, Response, NextFunction } from "express";
|
|
619
619
|
import * as jwt from "jsonwebtoken";
|
|
620
620
|
import { env } from "../config/env";
|
|
621
621
|
import { AppError } from "../utils/app-error";
|
|
@@ -694,7 +694,7 @@ export const authMiddleware = (roles?: string[]) => {
|
|
|
694
694
|
}
|
|
695
695
|
};
|
|
696
696
|
};
|
|
697
|
-
`;var xr={id:"auth",getFiles:(
|
|
697
|
+
`;var xr={id:"auth",getFiles:(e)=>{let t=[];if(e.auth==="custom")t.push({path:"src/middlewares/auth.ts",content:br});else if(e.auth==="clerk")t.push({path:"src/middlewares/auth.ts",content:gr});else if(e.auth==="betterauth")t.push({path:"src/middlewares/auth.ts",content:hr});return t},getSnippets:(e)=>{if(e.auth==="none")return{};return{imports:[e.auth==="clerk"?'import { clerkMiddleware } from "@clerk/express";':null,e.auth==="betterauth"?'import { authHandler } from "./base";':null,'import { authMiddleware } from "./middlewares/auth";'].filter(Boolean),middleware:[e.auth==="clerk"?"app.use(clerkMiddleware());":null,e.auth==="betterauth"?'app.all(["/api/auth", "/api/auth/*path"], authHandler);':null].filter(Boolean)}},getDependencies:(e)=>{if(e.auth==="clerk")return{"@clerk/express":"^1.3.11"};if(e.auth==="betterauth")return{"better-auth":"^1.1.18"};if(e.auth==="custom")return{jsonwebtoken:"^9.0.2"};return{}},getDevDependencies:(e)=>{if(e.auth==="custom")return{"@types/jsonwebtoken":"^9.0.7"};return{}}};var Er=`import { createClient } from "redis";
|
|
698
698
|
import { env } from "./env";
|
|
699
699
|
|
|
700
700
|
export const redisClient = createClient({
|
|
@@ -749,7 +749,7 @@ export const cache = {
|
|
|
749
749
|
}
|
|
750
750
|
},
|
|
751
751
|
};
|
|
752
|
-
`,
|
|
752
|
+
`,Rr=`import { env } from "../config/env";
|
|
753
753
|
|
|
754
754
|
interface CacheOptions {
|
|
755
755
|
ttl: number;
|
|
@@ -792,12 +792,12 @@ export const cache = {
|
|
|
792
792
|
}
|
|
793
793
|
},
|
|
794
794
|
};
|
|
795
|
-
`,
|
|
795
|
+
`,Sr=`export const cacheKeys = {
|
|
796
796
|
users: {
|
|
797
797
|
detail: (id: string) => \`users:detail:\${id}\`,
|
|
798
798
|
},
|
|
799
799
|
};
|
|
800
|
-
`;var yr={id:"caching",getFiles:(
|
|
800
|
+
`;var yr={id:"caching",getFiles:(e)=>{let t=[];if(e.caching==="none")return t;if(t.push({path:"src/utils/cache-keys.ts",content:Sr}),e.caching==="redis")t.push({path:"src/config/redis.ts",content:Er}),t.push({path:"src/utils/cache.ts",content:vr});else if(e.caching==="memory")t.push({path:"src/utils/cache.ts",content:Rr});return t},getSnippets:(e)=>{if(e.caching==="none")return{};return{imports:[e.caching==="redis"?'import { connectRedis } from "./config/redis";':null].filter(Boolean),init:[e.caching==="redis"?"await connectRedis();":null].filter(Boolean),envTs:[e.caching==="redis"?" REDIS_URL: process.env.REDIS_URL":null,` IS_CACHE_ENABLED: ${e.caching==="memory"?"true":'process.env.CACHE_ENABLED === "true"'}`].filter(Boolean)}},getDependencies:(e)=>{return e.caching==="redis"?{redis:"^4.7.0"}:{}}};var Ir=`import { OTLPLogExporter } from "@opentelemetry/exporter-logs-otlp-http";
|
|
801
801
|
import { resourceFromAttributes } from "@opentelemetry/resources";
|
|
802
802
|
import {
|
|
803
803
|
LoggerProvider,
|
|
@@ -955,7 +955,7 @@ export function requestLogger(req: Request, res: Response, next: NextFunction) {
|
|
|
955
955
|
|
|
956
956
|
next();
|
|
957
957
|
}
|
|
958
|
-
`;var
|
|
958
|
+
`;var Nr={id:"logger",getFiles:(e)=>{let t=[];if(e.logger==="none")return t;if(e.logger==="otel")t.push({path:"src/utils/logger.ts",content:Ir});else t.push({path:"src/utils/logger.ts",content:fr});return t.push({path:"src/middlewares/request-logger.ts",content:_r}),t},getSnippets:(e)=>{if(e.logger==="none")return{};return{imports:['import { logger, gracefulShutdown } from "./base";','import { requestLogger } from "./middlewares/request-logger";'],middleware:["app.use(requestLogger);"],shutdown:['process.on("SIGTERM", () => gracefulShutdown("SIGTERM"));','process.on("SIGINT", () => gracefulShutdown("SIGINT"));']}},getDependencies:(e)=>{if(e.logger==="otel")return{"@opentelemetry/api-logs":"^0.53.0","@opentelemetry/exporter-logs-otlp-http":"^0.53.0","@opentelemetry/resources":"^1.26.0","@opentelemetry/sdk-logs":"^0.53.0"};return{}}};var Ar=`import { z, type ZodType } from "zod";
|
|
959
959
|
|
|
960
960
|
export const paginationInput = z.object({
|
|
961
961
|
page: z.coerce.number().int().min(1).default(1),
|
|
@@ -1079,7 +1079,7 @@ export const inngestRoute = defineRoute({
|
|
|
1079
1079
|
output: z.any(),
|
|
1080
1080
|
handler: serve({ client: inngest, functions }),
|
|
1081
1081
|
});
|
|
1082
|
-
`;var kr={id:"extra",getFiles:(
|
|
1082
|
+
`;var kr={id:"extra",getFiles:(e)=>{let t=[];if(e.pagination)t.push({path:"src/utils/pagination.ts",content:Ar});if(e.email==="resend")t.push({path:"src/utils/email.ts",content:Or});else if(e.email==="nodemailer")t.push({path:"src/utils/email.ts",content:wr});if(e.inngest!=="none")t.push({path:"src/inngest/client.ts",content:Tr},{path:"src/inngest/index.ts",content:Pr},{path:"src/inngest/functions/hello-world.ts",content:Cr},{path:"src/routes/inngest-route.ts",content:Lr});if(e.formatter==="biome")t.push({path:"biome.json",content:Je});else if(e.formatter==="prettier")t.push({path:".prettierrc",content:Ze},{path:"eslint.config.js",content:Ve});return t},getSnippets:(e)=>{let t={imports:[],middleware:[]};if(e.inngest!=="none")t.imports.push('import { inngestRoute } from "./routes/inngest-route";'),t.middleware.push("registerRoute(router, inngestRoute);");return t},getDependencies:(e)=>{let t={};if(e.email==="resend")t.resend="^3.5.0";if(e.email==="nodemailer")t.nodemailer="^6.9.14";if(e.inngest!=="none")t.inngest="latest";return t},getDevDependencies:(e)=>{if(e.email==="nodemailer")return{"@types/nodemailer":"^6.4.15"};return{}}};var Mr={id:"infrastructure",getFiles:(e)=>{let t=[];if(e.docker)t.push({path:"Dockerfile",content:`FROM oven/bun:latest as base
|
|
1083
1083
|
WORKDIR /usr/src/app
|
|
1084
1084
|
|
|
1085
1085
|
FROM base AS install
|
|
@@ -1107,13 +1107,13 @@ services:
|
|
|
1107
1107
|
- "8000:8000"
|
|
1108
1108
|
environment:
|
|
1109
1109
|
- NODE_ENV=development
|
|
1110
|
-
${
|
|
1111
|
-
${
|
|
1110
|
+
${e.orm!=="none"?" - DATABASE_URL=postgresql://user:password@db:5432/aura_db":""}
|
|
1111
|
+
${e.caching==="redis"?" - REDIS_URL=redis://redis:6379":""}
|
|
1112
1112
|
depends_on:
|
|
1113
|
-
${
|
|
1114
|
-
${
|
|
1113
|
+
${e.orm==="prisma"||e.orm==="drizzle"?" - db":""}
|
|
1114
|
+
${e.caching==="redis"?" - redis":""}
|
|
1115
1115
|
|
|
1116
|
-
${
|
|
1116
|
+
${e.orm==="prisma"||e.orm==="drizzle"?` db:
|
|
1117
1117
|
image: postgres:15-alpine
|
|
1118
1118
|
environment:
|
|
1119
1119
|
- POSTGRES_USER=user
|
|
@@ -1123,12 +1123,12 @@ ${r.orm==="prisma"||r.orm==="drizzle"?` db:
|
|
|
1123
1123
|
- "5432:5432"
|
|
1124
1124
|
`:""}
|
|
1125
1125
|
|
|
1126
|
-
${
|
|
1126
|
+
${e.caching==="redis"?` redis:
|
|
1127
1127
|
image: redis:7-alpine
|
|
1128
1128
|
ports:
|
|
1129
1129
|
- "6379:6379"
|
|
1130
1130
|
`:""}
|
|
1131
|
-
`});if(
|
|
1131
|
+
`});if(e.ci==="github")t.push({path:".github/workflows/ci.yml",content:`name: CI
|
|
1132
1132
|
|
|
1133
1133
|
on:
|
|
1134
1134
|
push:
|
|
@@ -1144,16 +1144,16 @@ jobs:
|
|
|
1144
1144
|
- uses: oven-sh/setup-bun@v1
|
|
1145
1145
|
- run: bun install
|
|
1146
1146
|
- run: bunx tsc --noEmit
|
|
1147
|
-
${
|
|
1148
|
-
`});return t}};var ie=[nr,ur,xr,yr,
|
|
1147
|
+
${e.formatter==="biome"?" - run: bun run lint":""}
|
|
1148
|
+
`});return t}};var ie=[nr,ur,xr,yr,Nr,kr,Mr];function Br(e){return ie.filter((t)=>{if(t.id==="core"||t.id==="extra")return!0;if(t.id==="infrastructure"&&(e.docker||e.ci!=="none"))return!0;if(t.id==="orm"&&e.orm!=="none")return!0;if(t.id==="auth"&&e.auth!=="none")return!0;if(t.id==="caching"&&e.caching!=="none")return!0;if(t.id==="logger"&&e.logger!=="none")return!0;return!1})}function zr(e,t){let o=Br(e),i=[];for(let n of o)i.push(...n.getFiles(e,t));return i}function Gr(e){let t=Br(e),o={imports:[],init:[],middleware:[],errorHandler:[],shutdown:[]};for(let i of t){let n=i.getSnippets?.(e);if(n){if(n.imports)o.imports.push(...n.imports);if(n.init)o.init.push(...n.init);if(n.middleware)o.middleware.push(...n.middleware);if(n.errorHandler)o.errorHandler.push(...n.errorHandler);if(n.shutdown)o.shutdown.push(...n.shutdown)}}return o}async function $r(e,t,o){let i=$();i.start("Scaffolding your project...");let n=zr(o,t),a=Gr(o);n.push({path:"src/app.ts",content:Qe(a)});for(let r of n){let c=Ur.join(e,r.path),d=Ur.dirname(c);await Hr.mkdir(d,{recursive:!0}),await Hr.writeFile(c,r.content)}return i.stop("Project generated successfully."),e}import se from"path";var qr={name:"@ahmadjavaiddev/aura",version:"0.0.3",type:"module",description:"Interactive CLI scaffolder to generate custom API structures",main:"./dist/index.js",bin:{aura:"dist/index.js"},files:["dist"],publishConfig:{access:"public"},scripts:{start:"bun run src/cli.ts",build:"bun build ./src/cli.ts --outfile ./dist/index.js --target node --bundle --minify",prepublishOnly:"bun run build"},dependencies:{"@clack/prompts":"^0.8.2"},devDependencies:{"@types/bun":"latest","@types/node":"^22.0.0",typescript:"^5.0.0"}};import I from"fs/promises";import N from"path";import{exec as Ht}from"child_process";import{promisify as Ut}from"util";var $t=Ut(Ht);async function jr(e,t,o){let i=$();i.start(`Injecting ${t} into your project...`);let n=ie.find((l)=>l.id===t);if(!n)throw Error(`Feature ${t} not found.`);let a=n.getFiles(o,N.basename(e));for(let l of a){let m=N.join(e,l.path),p=N.dirname(m);await I.mkdir(p,{recursive:!0}),await I.writeFile(m,l.content)}let r=n.getDependencies?.(o),c=n.getDevDependencies?.(o);if(r||c){let l=N.join(e,"package.json");try{let m=await I.readFile(l,"utf-8"),p=JSON.parse(m);if(r)p.dependencies={...p.dependencies,...r};if(c)p.devDependencies={...p.devDependencies,...c};await I.writeFile(l,JSON.stringify(p,null,2))}catch(m){console.warn("Could not update package.json, make sure it exists.")}}let d=N.join(e,"src","app.ts");try{let l=await I.readFile(d,"utf-8"),m=n.getSnippets?.(o);if(m){if(l=T(l,"// [AURA_IMPORTS]",m.imports?.join(`
|
|
1149
1149
|
`)),l=T(l,"// [AURA_INIT]",m.init?.map((p)=>` ${p}`).join(`
|
|
1150
1150
|
`)),l=T(l,"// [AURA_MIDDLEWARE]",m.middleware?.map((p)=>` ${p}`).join(`
|
|
1151
1151
|
`)),l=T(l,"// [AURA_ERROR_HANDLER]",m.errorHandler?.map((p)=>` ${p}`).join(`
|
|
1152
1152
|
`)),l=T(l,"// [AURA_SHUTDOWN]",m.shutdown?.map((p)=>` ${p}`).join(`
|
|
1153
|
-
`)),await I.writeFile(d,l),m.envTs&&m.envTs.length>0){let p=
|
|
1154
|
-
`)),await I.writeFile(p,x)}}}catch(l){console.warn("Could not inject snippets. Are you in a valid Aura project directory?")}let u=n.getEnvVars?.(o);if(u){let l=
|
|
1155
|
-
`+u)}catch(m){console.warn("Could not update .env file.")}}i.stop(`Successfully added ${t} to your project.`)}function T(
|
|
1156
|
-
${t}`);return
|
|
1153
|
+
`)),await I.writeFile(d,l),m.envTs&&m.envTs.length>0){let p=N.join(e,"src","config","env.ts"),x=await I.readFile(p,"utf-8");x=T(x,"// [AURA_ENV_KEYS]",m.envTs.map((v)=>` ${v},`).join(`
|
|
1154
|
+
`)),await I.writeFile(p,x)}}}catch(l){console.warn("Could not inject snippets. Are you in a valid Aura project directory?")}let u=n.getEnvVars?.(o);if(u){let l=N.join(e,".env");try{await I.appendFile(l,`
|
|
1155
|
+
`+u)}catch(m){console.warn("Could not update .env file.")}}if(r||c){i.message("Installing new dependencies via bun...");try{await $t("bun install",{cwd:e})}catch(l){console.warn("Failed to install dependencies automatically. Please run 'bun install' manually.")}}i.stop(`Successfully added ${t} to your project.`)}function T(e,t,o){if(!o||o.trim()==="")return e;if(e.includes(t))return e.replace(t,`${o}
|
|
1156
|
+
${t}`);return e}import Wr from"fs/promises";async function qt(){let e=process.argv.slice(2);if(e.includes("--version")||e.includes("-v"))console.log(`v${qr.version}`),process.exit(0);if(e.includes("--help")||e.includes("-h"))console.log(`
|
|
1157
1157
|
Usage: aura [project-name]
|
|
1158
1158
|
aura add [feature]
|
|
1159
1159
|
|
|
@@ -1165,7 +1165,7 @@ Examples:
|
|
|
1165
1165
|
npx @ahmadjavaiddev/aura my-new-app
|
|
1166
1166
|
aura .
|
|
1167
1167
|
aura add redis
|
|
1168
|
-
`),process.exit(0);if(
|
|
1168
|
+
`),process.exit(0);if(e[0]==="add"){let n=e[1];if(!n){let d=await S({message:"Select a feature to add to your project:",options:[{value:"redis",label:"Caching: Redis"},{value:"memory",label:"Caching: In-Memory"},{value:"prisma",label:"ORM: Prisma"},{value:"drizzle",label:"ORM: Drizzle"},{value:"mongoose",label:"ORM: Mongoose"},{value:"clerk",label:"Auth: Clerk"},{value:"betterauth",label:"Auth: Better-Auth"},{value:"custom-auth",label:"Auth: Custom JWT"},{value:"otel",label:"Logger: OpenTelemetry"},{value:"console",label:"Logger: Console"},{value:"resend",label:"Email: Resend"},{value:"nodemailer",label:"Email: Nodemailer"},{value:"pagination",label:"Extra: Pagination utils"},{value:"inngest",label:"Extra: Inngest (Background jobs)"},{value:"docker",label:"Infrastructure: Docker (Dockerfile + Compose)"},{value:"github-actions",label:"Infrastructure: GitHub Actions (CI)"}]});if(O(d))L("Operation cancelled."),process.exit(0);n=d}if(!await Wr.access(se.join(process.cwd(),"src/base/index.ts")).then(()=>!0).catch(()=>!1))console.error("This does not appear to be an Aura project. Cannot add features here."),process.exit(1);let r={caching:"none",logger:"none",orm:"none",rateLimit:"none",auth:"none",email:"none",pagination:!1,formatter:"none",inngest:"none",docker:!1,ci:"none"},c="";if(n==="redis")c="caching",r.caching="redis";else if(n==="memory")c="caching",r.caching="memory";else if(n==="prisma")c="orm",r.orm="prisma";else if(n==="drizzle")c="orm",r.orm="drizzle";else if(n==="mongoose")c="orm",r.orm="mongoose";else if(n==="clerk")c="auth",r.auth="clerk";else if(n==="betterauth")c="auth",r.auth="betterauth";else if(n==="custom-auth")c="auth",r.auth="custom";else if(n==="otel")c="logger",r.logger="otel";else if(n==="console")c="logger",r.logger="console";else if(n==="resend")c="extra",r.email="resend";else if(n==="nodemailer")c="extra",r.email="nodemailer";else if(n==="pagination")c="extra",r.pagination=!0;else if(n==="inngest")c="extra",r.inngest="basic";else if(n==="docker")c="infrastructure",r.docker=!0;else if(n==="github-actions")c="infrastructure",r.ci="github";else console.error(`Unknown feature: ${n}`),console.error("Available features: redis, memory, prisma, drizzle, mongoose, clerk, betterauth, custom-auth, otel, console, resend, nodemailer, pagination, inngest, docker, github-actions"),process.exit(1);oe(`\uD83D\uDE80 Adding ${n} to Aura project...`),await jr(process.cwd(),c,r),ne(`✨ ${n} added successfully! Remember to run 'bun install'.`),process.exit(0)}oe("\uD83D\uDE80 Welcome to Aura!");let t=e[0];if(!t){let n=await ze({message:"What is your project named?",placeholder:"my-api",validate:(a)=>{if(!a)return"Please enter a path.";return}});if(O(n))L("Operation cancelled."),process.exit(0);t=n}let o=await $e(),i=se.resolve(process.cwd(),t);await $r(i,t,o),ne(`✨ Project scaffolding complete!
|
|
1169
1169
|
|
|
1170
1170
|
Next steps:
|
|
1171
1171
|
cd ${t}
|
|
@@ -1174,4 +1174,4 @@ Next steps:
|
|
|
1174
1174
|
${o.orm!=="none"?`# Note: Make sure your ${o.orm} database is running`:""}
|
|
1175
1175
|
bun update
|
|
1176
1176
|
bun run dev
|
|
1177
|
-
`)}
|
|
1177
|
+
`)}qt().catch(console.error);
|