@sidgaikwad/orm-setup 1.0.0 → 2.0.0
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/README.md +34 -0
- package/dist/generators/drizzle.d.ts +1 -1
- package/dist/generators/drizzle.d.ts.map +1 -1
- package/dist/generators/kysely.d.ts +1 -2
- package/dist/generators/kysely.d.ts.map +1 -1
- package/dist/generators/prisma.d.ts +1 -1
- package/dist/generators/prisma.d.ts.map +1 -1
- package/dist/generators/templates/schemas.d.ts +7 -0
- package/dist/generators/templates/schemas.d.ts.map +1 -0
- package/dist/index.js +367 -137
- package/dist/prompts.d.ts +4 -3
- package/dist/prompts.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,70 +1,53 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import{createRequire as QI}from"node:module";var JI=Object.create;var{getPrototypeOf:ZI,defineProperty:O1,getOwnPropertyNames:UI}=Object;var XI=Object.prototype.hasOwnProperty;var m=($,I,G)=>{G=$!=null?JI(ZI($)):{};let V=I||!$||!$.__esModule?O1(G,"default",{value:$,enumerable:!0}):G;for(let S of UI($))if(!XI.call(V,S))O1(V,S,{get:()=>$[S],enumerable:!0});return V};var j=($,I)=>()=>(I||$((I={exports:{}}).exports,I),I.exports);var w=QI(import.meta.url);var y$=j((m3,v1)=>{var z$={to($,I){if(!I)return`\x1B[${$+1}G`;return`\x1B[${I+1};${$+1}H`},move($,I){let G="";if($<0)G+=`\x1B[${-$}D`;else if($>0)G+=`\x1B[${$}C`;if(I<0)G+=`\x1B[${-I}A`;else if(I>0)G+=`\x1B[${I}B`;return G},up:($=1)=>`\x1B[${$}A`,down:($=1)=>`\x1B[${$}B`,forward:($=1)=>`\x1B[${$}C`,backward:($=1)=>`\x1B[${$}D`,nextLine:($=1)=>"\x1B[E".repeat($),prevLine:($=1)=>"\x1B[F".repeat($),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},WI={up:($=1)=>"\x1B[S".repeat($),down:($=1)=>"\x1B[T".repeat($)},YI={screen:"\x1B[2J",up:($=1)=>"\x1B[1J".repeat($),down:($=1)=>"\x1B[J".repeat($),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines($){let I="";for(let G=0;G<$;G++)I+=this.line+(G<$-1?z$.up():"");if($)I+=z$.left;return I}};v1.exports={cursor:z$,scroll:WI,erase:YI,beep:"\x07"}});var O$=j((h3,_$)=>{var G$=process||{},x1=G$.argv||[],I$=G$.env||{},LI=!(!!I$.NO_COLOR||x1.includes("--no-color"))&&(!!I$.FORCE_COLOR||x1.includes("--color")||G$.platform==="win32"||(G$.stdout||{}).isTTY&&I$.TERM!=="dumb"||!!I$.CI),RI=($,I,G=$)=>(V)=>{let S=""+V,M=S.indexOf(I,$.length);return~M?$+bI(S,I,G,M)+I:$+S+I},bI=($,I,G,V)=>{let S="",M=0;do S+=$.substring(M,V)+G,M=V+I.length,V=$.indexOf(I,M);while(~V);return S+$.substring(M)},w1=($=LI)=>{let I=$?RI:()=>String;return{isColorSupported:$,reset:I("\x1B[0m","\x1B[0m"),bold:I("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:I("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:I("\x1B[3m","\x1B[23m"),underline:I("\x1B[4m","\x1B[24m"),inverse:I("\x1B[7m","\x1B[27m"),hidden:I("\x1B[8m","\x1B[28m"),strikethrough:I("\x1B[9m","\x1B[29m"),black:I("\x1B[30m","\x1B[39m"),red:I("\x1B[31m","\x1B[39m"),green:I("\x1B[32m","\x1B[39m"),yellow:I("\x1B[33m","\x1B[39m"),blue:I("\x1B[34m","\x1B[39m"),magenta:I("\x1B[35m","\x1B[39m"),cyan:I("\x1B[36m","\x1B[39m"),white:I("\x1B[37m","\x1B[39m"),gray:I("\x1B[90m","\x1B[39m"),bgBlack:I("\x1B[40m","\x1B[49m"),bgRed:I("\x1B[41m","\x1B[49m"),bgGreen:I("\x1B[42m","\x1B[49m"),bgYellow:I("\x1B[43m","\x1B[49m"),bgBlue:I("\x1B[44m","\x1B[49m"),bgMagenta:I("\x1B[45m","\x1B[49m"),bgCyan:I("\x1B[46m","\x1B[49m"),bgWhite:I("\x1B[47m","\x1B[49m"),blackBright:I("\x1B[90m","\x1B[39m"),redBright:I("\x1B[91m","\x1B[39m"),greenBright:I("\x1B[92m","\x1B[39m"),yellowBright:I("\x1B[93m","\x1B[39m"),blueBright:I("\x1B[94m","\x1B[39m"),magentaBright:I("\x1B[95m","\x1B[39m"),cyanBright:I("\x1B[96m","\x1B[39m"),whiteBright:I("\x1B[97m","\x1B[39m"),bgBlackBright:I("\x1B[100m","\x1B[49m"),bgRedBright:I("\x1B[101m","\x1B[49m"),bgGreenBright:I("\x1B[102m","\x1B[49m"),bgYellowBright:I("\x1B[103m","\x1B[49m"),bgBlueBright:I("\x1B[104m","\x1B[49m"),bgMagentaBright:I("\x1B[105m","\x1B[49m"),bgCyanBright:I("\x1B[106m","\x1B[49m"),bgWhiteBright:I("\x1B[107m","\x1B[49m")}};_$.exports=w1();_$.exports.createColors=w1});var w0=j((m4,x0)=>{x0.exports=v0;v0.sync=mG;var _0=w("fs");function CG($,I){var G=I.pathExt!==void 0?I.pathExt:process.env.PATHEXT;if(!G)return!0;if(G=G.split(";"),G.indexOf("")!==-1)return!0;for(var V=0;V<G.length;V++){var S=G[V].toLowerCase();if(S&&$.substr(-S.length).toLowerCase()===S)return!0}return!1}function O0($,I,G){if(!$.isSymbolicLink()&&!$.isFile())return!1;return CG(I,G)}function v0($,I,G){_0.stat($,function(V,S){G(V,V?!1:O0(S,$,I))})}function mG($,I){return O0(_0.statSync($),$,I)}});var m0=j((h4,C0)=>{C0.exports=E0;E0.sync=hG;var P0=w("fs");function E0($,I,G){P0.stat($,function(V,S){G(V,V?!1:c0(S,I))})}function hG($,I){return c0(P0.statSync($),I)}function c0($,I){return $.isFile()&&kG($,I)}function kG($,I){var{mode:G,uid:V,gid:S}=$,M=I.uid!==void 0?I.uid:process.getuid&&process.getuid(),q=I.gid!==void 0?I.gid:process.getgid&&process.getgid(),H=parseInt("100",8),Z=parseInt("010",8),J=parseInt("001",8),X=H|Z,Q=G&J||G&Z&&S===q||G&H&&V===M||G&X&&M===0;return Q}});var k0=j((n4,h0)=>{var k4=w("fs"),U$;if(process.platform==="win32"||global.TESTING_WINDOWS)U$=w0();else U$=m0();h0.exports=D$;D$.sync=nG;function D$($,I,G){if(typeof I==="function")G=I,I={};if(!G){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(V,S){D$($,I||{},function(M,q){if(M)S(M);else V(q)})})}U$($,I||{},function(V,S){if(V){if(V.code==="EACCES"||I&&I.ignoreErrors)V=null,S=!1}G(V,S)})}function nG($,I){try{return U$.sync($,I||{})}catch(G){if(I&&I.ignoreErrors||G.code==="EACCES")return!1;else throw G}}});var D0=j((F4,i0)=>{var g=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",n0=w("path"),FG=g?";":":",F0=k0(),u0=($)=>Object.assign(Error(`not found: ${$}`),{code:"ENOENT"}),f0=($,I)=>{let G=I.colon||FG,V=$.match(/\//)||g&&$.match(/\\/)?[""]:[...g?[process.cwd()]:[],...(I.path||process.env.PATH||"").split(G)],S=g?I.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",M=g?S.split(G):[""];if(g){if($.indexOf(".")!==-1&&M[0]!=="")M.unshift("")}return{pathEnv:V,pathExt:M,pathExtExe:S}},g0=($,I,G)=>{if(typeof I==="function")G=I,I={};if(!I)I={};let{pathEnv:V,pathExt:S,pathExtExe:M}=f0($,I),q=[],H=(J)=>new Promise((X,Q)=>{if(J===V.length)return I.all&&q.length?X(q):Q(u0($));let W=V[J],A=/^".*"$/.test(W)?W.slice(1,-1):W,N=n0.join(A,$),x=!A&&/^\.[\\\/]/.test($)?$.slice(0,2)+N:N;X(Z(x,J,0))}),Z=(J,X,Q)=>new Promise((W,A)=>{if(Q===S.length)return W(H(X+1));let N=S[Q];F0(J+N,{pathExt:M},(x,C)=>{if(!x&&C)if(I.all)q.push(J+N);else return W(J+N);return W(Z(J,X,Q+1))})});return G?H(0).then((J)=>G(null,J),G):H(0)},uG=($,I)=>{I=I||{};let{pathEnv:G,pathExt:V,pathExtExe:S}=f0($,I),M=[];for(let q=0;q<G.length;q++){let H=G[q],Z=/^".*"$/.test(H)?H.slice(1,-1):H,J=n0.join(Z,$),X=!Z&&/^\.[\\\/]/.test($)?$.slice(0,2)+J:J;for(let Q=0;Q<V.length;Q++){let W=X+V[Q];try{if(F0.sync(W,{pathExt:S}))if(I.all)M.push(W);else return W}catch(A){}}}if(I.all&&M.length)return M;if(I.nothrow)return null;throw u0($)};i0.exports=g0;g0.sync=uG});var t0=j((u4,d$)=>{var d0=($={})=>{let I=$.env||process.env;if(($.platform||process.platform)!=="win32")return"PATH";return Object.keys(I).reverse().find((V)=>V.toUpperCase()==="PATH")||"Path"};d$.exports=d0;d$.exports.default=d0});var o0=j((f4,r0)=>{var l0=w("path"),fG=D0(),gG=t0();function p0($,I){let G=$.options.env||process.env,V=process.cwd(),S=$.options.cwd!=null,M=S&&process.chdir!==void 0&&!process.chdir.disabled;if(M)try{process.chdir($.options.cwd)}catch(H){}let q;try{q=fG.sync($.command,{path:G[gG({env:G})],pathExt:I?l0.delimiter:void 0})}catch(H){}finally{if(M)process.chdir(V)}if(q)q=l0.resolve(S?$.options.cwd:"",q);return q}function iG($){return p0($)||p0($,!0)}r0.exports=iG});var a0=j((tG,l$)=>{var t$=/([()\][%!^"`<>&|;, *?])/g;function DG($){return $=$.replace(t$,"^$1"),$}function dG($,I){if($=`${$}`,$=$.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),$=$.replace(/(?=(\\+?)?)\1$/,"$1$1"),$=`"${$}"`,$=$.replace(t$,"^$1"),I)$=$.replace(t$,"^$1");return $}tG.command=DG;tG.argument=dG});var e0=j((g4,s0)=>{s0.exports=/^#!(.*)/});var I2=j((i4,$2)=>{var rG=e0();$2.exports=($="")=>{let I=$.match(rG);if(!I)return null;let[G,V]=I[0].replace(/#! ?/,"").split(" "),S=G.split("/").pop();if(S==="env")return V;return V?`${S} ${V}`:S}});var q2=j((D4,G2)=>{var p$=w("fs"),oG=I2();function aG($){let G=Buffer.alloc(150),V;try{V=p$.openSync($,"r"),p$.readSync(V,G,0,150,0),p$.closeSync(V)}catch(S){}return oG(G.toString())}G2.exports=aG});var H2=j((d4,M2)=>{var sG=w("path"),V2=o0(),S2=a0(),eG=q2(),$9=process.platform==="win32",I9=/\.(?:com|exe)$/i,G9=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function q9($){$.file=V2($);let I=$.file&&eG($.file);if(I)return $.args.unshift($.file),$.command=I,V2($);return $.file}function V9($){if(!$9)return $;let I=q9($),G=!I9.test(I);if($.options.forceShell||G){let V=G9.test(I);$.command=sG.normalize($.command),$.command=S2.command($.command),$.args=$.args.map((M)=>S2.argument(M,V));let S=[$.command].concat($.args).join(" ");$.args=["/d","/s","/c",`"${S}"`],$.command=process.env.comspec||"cmd.exe",$.options.windowsVerbatimArguments=!0}return $}function S9($,I,G){if(I&&!Array.isArray(I))G=I,I=null;I=I?I.slice(0):[],G=Object.assign({},G);let V={command:$,args:I,options:G,file:void 0,original:{command:$,args:I}};return G.shell?V:V9(V)}M2.exports=S9});var U2=j((t4,Z2)=>{var r$=process.platform==="win32";function o$($,I){return Object.assign(Error(`${I} ${$.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${I} ${$.command}`,path:$.command,spawnargs:$.args})}function M9($,I){if(!r$)return;let G=$.emit;$.emit=function(V,S){if(V==="exit"){let M=J2(S,I);if(M)return G.call($,"error",M)}return G.apply($,arguments)}}function J2($,I){if(r$&&$===1&&!I.file)return o$(I.original,"spawn");return null}function H9($,I){if(r$&&$===1&&!I.file)return o$(I.original,"spawnSync");return null}Z2.exports={hookChildProcess:M9,verifyENOENT:J2,verifyENOENTSync:H9,notFoundError:o$}});var W2=j((l4,i)=>{var X2=w("child_process"),a$=H2(),s$=U2();function Q2($,I,G){let V=a$($,I,G),S=X2.spawn(V.command,V.args,V.options);return s$.hookChildProcess(S,V),S}function J9($,I,G){let V=a$($,I,G),S=X2.spawnSync(V.command,V.args,V.options);return S.error=S.error||s$.verifyENOENTSync(S.status,V),S}i.exports=Q2;i.exports.spawn=Q2;i.exports.sync=J9;i.exports._parse=a$;i.exports._enoent=s$});var i2=j((s5,g2)=>{var{PassThrough:M3}=w("stream");g2.exports=function(){var $=[],I=new M3({objectMode:!0});return I.setMaxListeners(0),I.add=G,I.isEmpty=V,I.on("unpipe",S),Array.prototype.slice.call(arguments).forEach(G),I;function G(M){if(Array.isArray(M))return M.forEach(G),this;return $.push(M),M.once("end",S.bind(null,M)),M.once("error",I.emit.bind(I,"error")),M.pipe(I,{end:!1}),this}function V(){return $.length==0}function S(M){if($=$.filter(function(q){return q!==M}),!$.length&&I.readable)I.end()}}});var z=m(y$(),1),V$=m(O$(),1);import{stdin as u1,stdout as f1}from"node:process";import*as P from"node:readline";import P1 from"node:readline";import{WriteStream as BI}from"node:tty";function KI({onlyFirst:$=!1}={}){let I=["[\\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(I,$?void 0:"g")}var AI=KI();function g1($){if(typeof $!="string")throw TypeError(`Expected a \`string\`, got \`${typeof $}\``);return $.replace(AI,"")}function i1($){return $&&$.__esModule&&Object.prototype.hasOwnProperty.call($,"default")?$.default:$}var D1={exports:{}};(function($){var I={};$.exports=I,I.eastAsianWidth=function(V){var S=V.charCodeAt(0),M=V.length==2?V.charCodeAt(1):0,q=S;return 55296<=S&&S<=56319&&56320<=M&&M<=57343&&(S&=1023,M&=1023,q=S<<10|M,q+=65536),q==12288||65281<=q&&q<=65376||65504<=q&&q<=65510?"F":q==8361||65377<=q&&q<=65470||65474<=q&&q<=65479||65482<=q&&q<=65487||65490<=q&&q<=65495||65498<=q&&q<=65500||65512<=q&&q<=65518?"H":4352<=q&&q<=4447||4515<=q&&q<=4519||4602<=q&&q<=4607||9001<=q&&q<=9002||11904<=q&&q<=11929||11931<=q&&q<=12019||12032<=q&&q<=12245||12272<=q&&q<=12283||12289<=q&&q<=12350||12353<=q&&q<=12438||12441<=q&&q<=12543||12549<=q&&q<=12589||12593<=q&&q<=12686||12688<=q&&q<=12730||12736<=q&&q<=12771||12784<=q&&q<=12830||12832<=q&&q<=12871||12880<=q&&q<=13054||13056<=q&&q<=19903||19968<=q&&q<=42124||42128<=q&&q<=42182||43360<=q&&q<=43388||44032<=q&&q<=55203||55216<=q&&q<=55238||55243<=q&&q<=55291||63744<=q&&q<=64255||65040<=q&&q<=65049||65072<=q&&q<=65106||65108<=q&&q<=65126||65128<=q&&q<=65131||110592<=q&&q<=110593||127488<=q&&q<=127490||127504<=q&&q<=127546||127552<=q&&q<=127560||127568<=q&&q<=127569||131072<=q&&q<=194367||177984<=q&&q<=196605||196608<=q&&q<=262141?"W":32<=q&&q<=126||162<=q&&q<=163||165<=q&&q<=166||q==172||q==175||10214<=q&&q<=10221||10629<=q&&q<=10630?"Na":q==161||q==164||167<=q&&q<=168||q==170||173<=q&&q<=174||176<=q&&q<=180||182<=q&&q<=186||188<=q&&q<=191||q==198||q==208||215<=q&&q<=216||222<=q&&q<=225||q==230||232<=q&&q<=234||236<=q&&q<=237||q==240||242<=q&&q<=243||247<=q&&q<=250||q==252||q==254||q==257||q==273||q==275||q==283||294<=q&&q<=295||q==299||305<=q&&q<=307||q==312||319<=q&&q<=322||q==324||328<=q&&q<=331||q==333||338<=q&&q<=339||358<=q&&q<=359||q==363||q==462||q==464||q==466||q==468||q==470||q==472||q==474||q==476||q==593||q==609||q==708||q==711||713<=q&&q<=715||q==717||q==720||728<=q&&q<=731||q==733||q==735||768<=q&&q<=879||913<=q&&q<=929||931<=q&&q<=937||945<=q&&q<=961||963<=q&&q<=969||q==1025||1040<=q&&q<=1103||q==1105||q==8208||8211<=q&&q<=8214||8216<=q&&q<=8217||8220<=q&&q<=8221||8224<=q&&q<=8226||8228<=q&&q<=8231||q==8240||8242<=q&&q<=8243||q==8245||q==8251||q==8254||q==8308||q==8319||8321<=q&&q<=8324||q==8364||q==8451||q==8453||q==8457||q==8467||q==8470||8481<=q&&q<=8482||q==8486||q==8491||8531<=q&&q<=8532||8539<=q&&q<=8542||8544<=q&&q<=8555||8560<=q&&q<=8569||q==8585||8592<=q&&q<=8601||8632<=q&&q<=8633||q==8658||q==8660||q==8679||q==8704||8706<=q&&q<=8707||8711<=q&&q<=8712||q==8715||q==8719||q==8721||q==8725||q==8730||8733<=q&&q<=8736||q==8739||q==8741||8743<=q&&q<=8748||q==8750||8756<=q&&q<=8759||8764<=q&&q<=8765||q==8776||q==8780||q==8786||8800<=q&&q<=8801||8804<=q&&q<=8807||8810<=q&&q<=8811||8814<=q&&q<=8815||8834<=q&&q<=8835||8838<=q&&q<=8839||q==8853||q==8857||q==8869||q==8895||q==8978||9312<=q&&q<=9449||9451<=q&&q<=9547||9552<=q&&q<=9587||9600<=q&&q<=9615||9618<=q&&q<=9621||9632<=q&&q<=9633||9635<=q&&q<=9641||9650<=q&&q<=9651||9654<=q&&q<=9655||9660<=q&&q<=9661||9664<=q&&q<=9665||9670<=q&&q<=9672||q==9675||9678<=q&&q<=9681||9698<=q&&q<=9701||q==9711||9733<=q&&q<=9734||q==9737||9742<=q&&q<=9743||9748<=q&&q<=9749||q==9756||q==9758||q==9792||q==9794||9824<=q&&q<=9825||9827<=q&&q<=9829||9831<=q&&q<=9834||9836<=q&&q<=9837||q==9839||9886<=q&&q<=9887||9918<=q&&q<=9919||9924<=q&&q<=9933||9935<=q&&q<=9953||q==9955||9960<=q&&q<=9983||q==10045||q==10071||10102<=q&&q<=10111||11093<=q&&q<=11097||12872<=q&&q<=12879||57344<=q&&q<=63743||65024<=q&&q<=65039||q==65533||127232<=q&&q<=127242||127248<=q&&q<=127277||127280<=q&&q<=127337||127344<=q&&q<=127386||917760<=q&&q<=917999||983040<=q&&q<=1048573||1048576<=q&&q<=1114109?"A":"N"},I.characterLength=function(V){var S=this.eastAsianWidth(V);return S=="F"||S=="W"||S=="A"?2:1};function G(V){return V.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}I.length=function(V){for(var S=G(V),M=0,q=0;q<S.length;q++)M=M+this.characterLength(S[q]);return M},I.slice=function(V,S,M){textLen=I.length(V),S=S||0,M=M||1,S<0&&(S=textLen+S),M<0&&(M=textLen+M);for(var q="",H=0,Z=G(V),J=0;J<Z.length;J++){var X=Z[J],Q=I.length(X);if(H>=S-(Q==2?1:0))if(H+Q<=M)q+=X;else break;H+=Q}return q}})(D1);var TI=D1.exports,NI=i1(TI),jI=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},zI=i1(jI);function D($,I={}){if(typeof $!="string"||$.length===0||(I={ambiguousIsNarrow:!0,...I},$=g1($),$.length===0))return 0;$=$.replace(zI()," ");let G=I.ambiguousIsNarrow?1:2,V=0;for(let S of $){let M=S.codePointAt(0);if(M<=31||M>=127&&M<=159||M>=768&&M<=879)continue;switch(NI.eastAsianWidth(S)){case"F":case"W":V+=2;break;case"A":V+=G;break;default:V+=1}}return V}var v$=10,E1=($=0)=>(I)=>`\x1B[${I+$}m`,c1=($=0)=>(I)=>`\x1B[${38+$};5;${I}m`,C1=($=0)=>(I,G,V)=>`\x1B[${38+$};2;${I};${G};${V}m`,L={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(L.modifier);var yI=Object.keys(L.color),_I=Object.keys(L.bgColor);[...yI,..._I];function OI(){let $=new Map;for(let[I,G]of Object.entries(L)){for(let[V,S]of Object.entries(G))L[V]={open:`\x1B[${S[0]}m`,close:`\x1B[${S[1]}m`},G[V]=L[V],$.set(S[0],S[1]);Object.defineProperty(L,I,{value:G,enumerable:!1})}return Object.defineProperty(L,"codes",{value:$,enumerable:!1}),L.color.close="\x1B[39m",L.bgColor.close="\x1B[49m",L.color.ansi=E1(),L.color.ansi256=c1(),L.color.ansi16m=C1(),L.bgColor.ansi=E1(v$),L.bgColor.ansi256=c1(v$),L.bgColor.ansi16m=C1(v$),Object.defineProperties(L,{rgbToAnsi256:{value:(I,G,V)=>I===G&&G===V?I<8?16:I>248?231:Math.round((I-8)/247*24)+232:16+36*Math.round(I/255*5)+6*Math.round(G/255*5)+Math.round(V/255*5),enumerable:!1},hexToRgb:{value:(I)=>{let G=/[a-f\d]{6}|[a-f\d]{3}/i.exec(I.toString(16));if(!G)return[0,0,0];let[V]=G;V.length===3&&(V=[...V].map((M)=>M+M).join(""));let S=Number.parseInt(V,16);return[S>>16&255,S>>8&255,S&255]},enumerable:!1},hexToAnsi256:{value:(I)=>L.rgbToAnsi256(...L.hexToRgb(I)),enumerable:!1},ansi256ToAnsi:{value:(I)=>{if(I<8)return 30+I;if(I<16)return 90+(I-8);let G,V,S;if(I>=232)G=((I-232)*10+8)/255,V=G,S=G;else{I-=16;let H=I%36;G=Math.floor(I/36)/5,V=Math.floor(H/6)/5,S=H%6/5}let M=Math.max(G,V,S)*2;if(M===0)return 30;let q=30+(Math.round(S)<<2|Math.round(V)<<1|Math.round(G));return M===2&&(q+=60),q},enumerable:!1},rgbToAnsi:{value:(I,G,V)=>L.ansi256ToAnsi(L.rgbToAnsi256(I,G,V)),enumerable:!1},hexToAnsi:{value:(I)=>L.ansi256ToAnsi(L.hexToAnsi256(I)),enumerable:!1}}),L}var vI=OI(),S$=new Set(["\x1B",""]),xI=39,w$="\x07",d1="[",wI="]",t1="m",P$=`${wI}8;;`,m1=($)=>`${S$.values().next().value}${d1}${$}${t1}`,h1=($)=>`${S$.values().next().value}${P$}${$}${w$}`,PI=($)=>$.split(" ").map((I)=>D(I)),x$=($,I,G)=>{let V=[...I],S=!1,M=!1,q=D(g1($[$.length-1]));for(let[H,Z]of V.entries()){let J=D(Z);if(q+J<=G?$[$.length-1]+=Z:($.push(Z),q=0),S$.has(Z)&&(S=!0,M=V.slice(H+1).join("").startsWith(P$)),S){M?Z===w$&&(S=!1,M=!1):Z===t1&&(S=!1);continue}q+=J,q===G&&H<V.length-1&&($.push(""),q=0)}!q&&$[$.length-1].length>0&&$.length>1&&($[$.length-2]+=$.pop())},EI=($)=>{let I=$.split(" "),G=I.length;for(;G>0&&!(D(I[G-1])>0);)G--;return G===I.length?$:I.slice(0,G).join(" ")+I.slice(G).join("")},cI=($,I,G={})=>{if(G.trim!==!1&&$.trim()==="")return"";let V="",S,M,q=PI($),H=[""];for(let[J,X]of $.split(" ").entries()){G.trim!==!1&&(H[H.length-1]=H[H.length-1].trimStart());let Q=D(H[H.length-1]);if(J!==0&&(Q>=I&&(G.wordWrap===!1||G.trim===!1)&&(H.push(""),Q=0),(Q>0||G.trim===!1)&&(H[H.length-1]+=" ",Q++)),G.hard&&q[J]>I){let W=I-Q,A=1+Math.floor((q[J]-W-1)/I);Math.floor((q[J]-1)/I)<A&&H.push(""),x$(H,X,I);continue}if(Q+q[J]>I&&Q>0&&q[J]>0){if(G.wordWrap===!1&&Q<I){x$(H,X,I);continue}H.push("")}if(Q+q[J]>I&&G.wordWrap===!1){x$(H,X,I);continue}H[H.length-1]+=X}G.trim!==!1&&(H=H.map((J)=>EI(J)));let Z=[...H.join(`
|
|
3
|
-
`)];for(let[
|
|
4
|
-
`?(
|
|
5
|
-
`&&(
|
|
2
|
+
import{createRequire as U2}from"node:module";var q2=Object.create;var{getPrototypeOf:c2,defineProperty:B1,getOwnPropertyNames:M2}=Object;var V2=Object.prototype.hasOwnProperty;var f=($,b,I)=>{I=$!=null?q2(c2($)):{};let G=b||!$||!$.__esModule?B1(I,"default",{value:$,enumerable:!0}):I;for(let i of M2($))if(!V2.call(G,i))B1(G,i,{get:()=>$[i],enumerable:!0});return G};var z=($,b)=>()=>(b||$((b={exports:{}}).exports,b),b.exports);var w=U2(import.meta.url);var K$=z((BG,Y1)=>{var W$={to($,b){if(!b)return`\x1B[${$+1}G`;return`\x1B[${b+1};${$+1}H`},move($,b){let I="";if($<0)I+=`\x1B[${-$}D`;else if($>0)I+=`\x1B[${$}C`;if(b<0)I+=`\x1B[${-b}A`;else if(b>0)I+=`\x1B[${b}B`;return I},up:($=1)=>`\x1B[${$}A`,down:($=1)=>`\x1B[${$}B`,forward:($=1)=>`\x1B[${$}C`,backward:($=1)=>`\x1B[${$}D`,nextLine:($=1)=>"\x1B[E".repeat($),prevLine:($=1)=>"\x1B[F".repeat($),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},n2={up:($=1)=>"\x1B[S".repeat($),down:($=1)=>"\x1B[T".repeat($)},R2={screen:"\x1B[2J",up:($=1)=>"\x1B[1J".repeat($),down:($=1)=>"\x1B[J".repeat($),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines($){let b="";for(let I=0;I<$;I++)b+=this.line+(I<$-1?W$.up():"");if($)b+=W$.left;return b}};Y1.exports={cursor:W$,scroll:n2,erase:R2,beep:"\x07"}});var Y$=z((YG,B$)=>{var I$=process||{},N1=I$.argv||[],b$=I$.env||{},L2=!(!!b$.NO_COLOR||N1.includes("--no-color"))&&(!!b$.FORCE_COLOR||N1.includes("--color")||I$.platform==="win32"||(I$.stdout||{}).isTTY&&b$.TERM!=="dumb"||!!b$.CI),H2=($,b,I=$)=>(G)=>{let i=""+G,S=i.indexOf(b,$.length);return~S?$+J2(i,b,I,S)+b:$+i+b},J2=($,b,I,G)=>{let i="",S=0;do i+=$.substring(S,G)+I,S=G+b.length,G=$.indexOf(b,S);while(~G);return i+$.substring(S)},j1=($=L2)=>{let b=$?H2:()=>String;return{isColorSupported:$,reset:b("\x1B[0m","\x1B[0m"),bold:b("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:b("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:b("\x1B[3m","\x1B[23m"),underline:b("\x1B[4m","\x1B[24m"),inverse:b("\x1B[7m","\x1B[27m"),hidden:b("\x1B[8m","\x1B[28m"),strikethrough:b("\x1B[9m","\x1B[29m"),black:b("\x1B[30m","\x1B[39m"),red:b("\x1B[31m","\x1B[39m"),green:b("\x1B[32m","\x1B[39m"),yellow:b("\x1B[33m","\x1B[39m"),blue:b("\x1B[34m","\x1B[39m"),magenta:b("\x1B[35m","\x1B[39m"),cyan:b("\x1B[36m","\x1B[39m"),white:b("\x1B[37m","\x1B[39m"),gray:b("\x1B[90m","\x1B[39m"),bgBlack:b("\x1B[40m","\x1B[49m"),bgRed:b("\x1B[41m","\x1B[49m"),bgGreen:b("\x1B[42m","\x1B[49m"),bgYellow:b("\x1B[43m","\x1B[49m"),bgBlue:b("\x1B[44m","\x1B[49m"),bgMagenta:b("\x1B[45m","\x1B[49m"),bgCyan:b("\x1B[46m","\x1B[49m"),bgWhite:b("\x1B[47m","\x1B[49m"),blackBright:b("\x1B[90m","\x1B[39m"),redBright:b("\x1B[91m","\x1B[39m"),greenBright:b("\x1B[92m","\x1B[39m"),yellowBright:b("\x1B[93m","\x1B[39m"),blueBright:b("\x1B[94m","\x1B[39m"),magentaBright:b("\x1B[95m","\x1B[39m"),cyanBright:b("\x1B[96m","\x1B[39m"),whiteBright:b("\x1B[97m","\x1B[39m"),bgBlackBright:b("\x1B[100m","\x1B[49m"),bgRedBright:b("\x1B[101m","\x1B[49m"),bgGreenBright:b("\x1B[102m","\x1B[49m"),bgYellowBright:b("\x1B[103m","\x1B[49m"),bgBlueBright:b("\x1B[104m","\x1B[49m"),bgMagentaBright:b("\x1B[105m","\x1B[49m"),bgCyanBright:b("\x1B[106m","\x1B[49m"),bgWhiteBright:b("\x1B[107m","\x1B[49m")}};B$.exports=j1();B$.exports.createColors=j1});var jb=z((Ni,Nb)=>{Nb.exports=Yb;Yb.sync=BI;var Kb=w("fs");function KI($,b){var I=b.pathExt!==void 0?b.pathExt:process.env.PATHEXT;if(!I)return!0;if(I=I.split(";"),I.indexOf("")!==-1)return!0;for(var G=0;G<I.length;G++){var i=I[G].toLowerCase();if(i&&$.substr(-i.length).toLowerCase()===i)return!0}return!1}function Bb($,b,I){if(!$.isSymbolicLink()&&!$.isFile())return!1;return KI(b,I)}function Yb($,b,I){Kb.stat($,function(G,i){I(G,G?!1:Bb(i,$,b))})}function BI($,b){return Bb(Kb.statSync($),$,b)}});var xb=z((ji,Ob)=>{Ob.exports=_b;_b.sync=YI;var wb=w("fs");function _b($,b,I){wb.stat($,function(G,i){I(G,G?!1:vb(i,b))})}function YI($,b){return vb(wb.statSync($),b)}function vb($,b){return $.isFile()&&NI($,b)}function NI($,b){var{mode:I,uid:G,gid:i}=$,S=b.uid!==void 0?b.uid:process.getuid&&process.getuid(),y=b.gid!==void 0?b.gid:process.getgid&&process.getgid(),q=parseInt("100",8),V=parseInt("010",8),M=parseInt("001",8),U=q|V,n=I&M||I&V&&i===y||I&q&&G===S||I&U&&S===0;return n}});var fb=z((_i,Pb)=>{var wi=w("fs"),V$;if(process.platform==="win32"||global.TESTING_WINDOWS)V$=jb();else V$=xb();Pb.exports=g$;g$.sync=jI;function g$($,b,I){if(typeof b==="function")I=b,b={};if(!I){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(G,i){g$($,b||{},function(S,y){if(S)i(S);else G(y)})})}V$($,b||{},function(G,i){if(G){if(G.code==="EACCES"||b&&b.ignoreErrors)G=null,i=!1}I(G,i)})}function jI($,b){try{return V$.sync($,b||{})}catch(I){if(b&&b.ignoreErrors||I.code==="EACCES")return!1;else throw I}}});var gb=z((vi,ub)=>{var u=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",tb=w("path"),wI=u?";":":",hb=fb(),Eb=($)=>Object.assign(Error(`not found: ${$}`),{code:"ENOENT"}),Cb=($,b)=>{let I=b.colon||wI,G=$.match(/\//)||u&&$.match(/\\/)?[""]:[...u?[process.cwd()]:[],...(b.path||process.env.PATH||"").split(I)],i=u?b.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",S=u?i.split(I):[""];if(u){if($.indexOf(".")!==-1&&S[0]!=="")S.unshift("")}return{pathEnv:G,pathExt:S,pathExtExe:i}},kb=($,b,I)=>{if(typeof b==="function")I=b,b={};if(!b)b={};let{pathEnv:G,pathExt:i,pathExtExe:S}=Cb($,b),y=[],q=(M)=>new Promise((U,n)=>{if(M===G.length)return b.all&&y.length?U(y):n(Eb($));let R=G[M],T=/^".*"$/.test(R)?R.slice(1,-1):R,X=tb.join(T,$),j=!T&&/^\.[\\\/]/.test($)?$.slice(0,2)+X:X;U(V(j,M,0))}),V=(M,U,n)=>new Promise((R,T)=>{if(n===i.length)return R(q(U+1));let X=i[n];hb(M+X,{pathExt:S},(j,P)=>{if(!j&&P)if(b.all)y.push(M+X);else return R(M+X);return R(V(M,U,n+1))})});return I?q(0).then((M)=>I(null,M),I):q(0)},_I=($,b)=>{b=b||{};let{pathEnv:I,pathExt:G,pathExtExe:i}=Cb($,b),S=[];for(let y=0;y<I.length;y++){let q=I[y],V=/^".*"$/.test(q)?q.slice(1,-1):q,M=tb.join(V,$),U=!V&&/^\.[\\\/]/.test($)?$.slice(0,2)+M:M;for(let n=0;n<G.length;n++){let R=U+G[n];try{if(hb.sync(R,{pathExt:i}))if(b.all)S.push(R);else return R}catch(T){}}}if(b.all&&S.length)return S;if(b.nothrow)return null;throw Eb($)};ub.exports=kb;kb.sync=_I});var lb=z((Oi,F$)=>{var Fb=($={})=>{let b=$.env||process.env;if(($.platform||process.platform)!=="win32")return"PATH";return Object.keys(b).reverse().find((G)=>G.toUpperCase()==="PATH")||"Path"};F$.exports=Fb;F$.exports.default=Fb});var Db=z((xi,rb)=>{var db=w("path"),vI=gb(),OI=lb();function ab($,b){let I=$.options.env||process.env,G=process.cwd(),i=$.options.cwd!=null,S=i&&process.chdir!==void 0&&!process.chdir.disabled;if(S)try{process.chdir($.options.cwd)}catch(q){}let y;try{y=vI.sync($.command,{path:I[OI({env:I})],pathExt:b?db.delimiter:void 0})}catch(q){}finally{if(S)process.chdir(G)}if(y)y=db.resolve(i?$.options.cwd:"",y);return y}function xI($){return ab($)||ab($,!0)}rb.exports=xI});var ob=z((tI,d$)=>{var l$=/([()\][%!^"`<>&|;, *?])/g;function PI($){return $=$.replace(l$,"^$1"),$}function fI($,b){if($=`${$}`,$=$.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),$=$.replace(/(?=(\\+?)?)\1$/,"$1$1"),$=`"${$}"`,$=$.replace(l$,"^$1"),b)$=$.replace(l$,"^$1");return $}tI.command=PI;tI.argument=fI});var sb=z((Pi,pb)=>{pb.exports=/^#!(.*)/});var $0=z((fi,eb)=>{var CI=sb();eb.exports=($="")=>{let b=$.match(CI);if(!b)return null;let[I,G]=b[0].replace(/#! ?/,"").split(" "),i=I.split("/").pop();if(i==="env")return G;return G?`${i} ${G}`:i}});var I0=z((ti,b0)=>{var a$=w("fs"),kI=$0();function uI($){let I=Buffer.alloc(150),G;try{G=a$.openSync($,"r"),a$.readSync(G,I,0,150,0),a$.closeSync(G)}catch(i){}return kI(I.toString())}b0.exports=uI});var S0=z((hi,i0)=>{var gI=w("path"),y0=Db(),G0=ob(),FI=I0(),lI=process.platform==="win32",dI=/\.(?:com|exe)$/i,aI=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function rI($){$.file=y0($);let b=$.file&&FI($.file);if(b)return $.args.unshift($.file),$.command=b,y0($);return $.file}function DI($){if(!lI)return $;let b=rI($),I=!dI.test(b);if($.options.forceShell||I){let G=aI.test(b);$.command=gI.normalize($.command),$.command=G0.command($.command),$.args=$.args.map((S)=>G0.argument(S,G));let i=[$.command].concat($.args).join(" ");$.args=["/d","/s","/c",`"${i}"`],$.command=process.env.comspec||"cmd.exe",$.options.windowsVerbatimArguments=!0}return $}function oI($,b,I){if(b&&!Array.isArray(b))I=b,b=null;b=b?b.slice(0):[],I=Object.assign({},I);let G={command:$,args:b,options:I,file:void 0,original:{command:$,args:b}};return I.shell?G:DI(G)}i0.exports=oI});var M0=z((Ei,c0)=>{var r$=process.platform==="win32";function D$($,b){return Object.assign(Error(`${b} ${$.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${b} ${$.command}`,path:$.command,spawnargs:$.args})}function pI($,b){if(!r$)return;let I=$.emit;$.emit=function(G,i){if(G==="exit"){let S=q0(i,b);if(S)return I.call($,"error",S)}return I.apply($,arguments)}}function q0($,b){if(r$&&$===1&&!b.file)return D$(b.original,"spawn");return null}function sI($,b){if(r$&&$===1&&!b.file)return D$(b.original,"spawnSync");return null}c0.exports={hookChildProcess:pI,verifyENOENT:q0,verifyENOENTSync:sI,notFoundError:D$}});var n0=z((Ci,g)=>{var V0=w("child_process"),o$=S0(),p$=M0();function U0($,b,I){let G=o$($,b,I),i=V0.spawn(G.command,G.args,G.options);return p$.hookChildProcess(i,G),i}function eI($,b,I){let G=o$($,b,I),i=V0.spawnSync(G.command,G.args,G.options);return i.error=i.error||p$.verifyENOENTSync(i.status,G),i}g.exports=U0;g.exports.spawn=U0;g.exports.sync=eI;g.exports._parse=o$;g.exports._enoent=p$});var u0=z((lS,k0)=>{var{PassThrough:py}=w("stream");k0.exports=function(){var $=[],b=new py({objectMode:!0});return b.setMaxListeners(0),b.add=I,b.isEmpty=G,b.on("unpipe",i),Array.prototype.slice.call(arguments).forEach(I),b;function I(S){if(Array.isArray(S))return S.forEach(I),this;return $.push(S),S.once("end",i.bind(null,S)),S.once("error",b.emit.bind(b,"error")),S.pipe(b,{end:!1}),this}function G(){return $.length==0}function i(S){if($=$.filter(function(y){return y!==S}),!$.length&&b.readable)b.end()}}});var W=f(K$(),1),G$=f(Y$(),1);import{stdin as E1,stdout as C1}from"node:process";import*as v from"node:readline";import w1 from"node:readline";import{WriteStream as Q2}from"node:tty";function Z2({onlyFirst:$=!1}={}){let b=["[\\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(b,$?void 0:"g")}var A2=Z2();function k1($){if(typeof $!="string")throw TypeError(`Expected a \`string\`, got \`${typeof $}\``);return $.replace(A2,"")}function u1($){return $&&$.__esModule&&Object.prototype.hasOwnProperty.call($,"default")?$.default:$}var g1={exports:{}};(function($){var b={};$.exports=b,b.eastAsianWidth=function(G){var i=G.charCodeAt(0),S=G.length==2?G.charCodeAt(1):0,y=i;return 55296<=i&&i<=56319&&56320<=S&&S<=57343&&(i&=1023,S&=1023,y=i<<10|S,y+=65536),y==12288||65281<=y&&y<=65376||65504<=y&&y<=65510?"F":y==8361||65377<=y&&y<=65470||65474<=y&&y<=65479||65482<=y&&y<=65487||65490<=y&&y<=65495||65498<=y&&y<=65500||65512<=y&&y<=65518?"H":4352<=y&&y<=4447||4515<=y&&y<=4519||4602<=y&&y<=4607||9001<=y&&y<=9002||11904<=y&&y<=11929||11931<=y&&y<=12019||12032<=y&&y<=12245||12272<=y&&y<=12283||12289<=y&&y<=12350||12353<=y&&y<=12438||12441<=y&&y<=12543||12549<=y&&y<=12589||12593<=y&&y<=12686||12688<=y&&y<=12730||12736<=y&&y<=12771||12784<=y&&y<=12830||12832<=y&&y<=12871||12880<=y&&y<=13054||13056<=y&&y<=19903||19968<=y&&y<=42124||42128<=y&&y<=42182||43360<=y&&y<=43388||44032<=y&&y<=55203||55216<=y&&y<=55238||55243<=y&&y<=55291||63744<=y&&y<=64255||65040<=y&&y<=65049||65072<=y&&y<=65106||65108<=y&&y<=65126||65128<=y&&y<=65131||110592<=y&&y<=110593||127488<=y&&y<=127490||127504<=y&&y<=127546||127552<=y&&y<=127560||127568<=y&&y<=127569||131072<=y&&y<=194367||177984<=y&&y<=196605||196608<=y&&y<=262141?"W":32<=y&&y<=126||162<=y&&y<=163||165<=y&&y<=166||y==172||y==175||10214<=y&&y<=10221||10629<=y&&y<=10630?"Na":y==161||y==164||167<=y&&y<=168||y==170||173<=y&&y<=174||176<=y&&y<=180||182<=y&&y<=186||188<=y&&y<=191||y==198||y==208||215<=y&&y<=216||222<=y&&y<=225||y==230||232<=y&&y<=234||236<=y&&y<=237||y==240||242<=y&&y<=243||247<=y&&y<=250||y==252||y==254||y==257||y==273||y==275||y==283||294<=y&&y<=295||y==299||305<=y&&y<=307||y==312||319<=y&&y<=322||y==324||328<=y&&y<=331||y==333||338<=y&&y<=339||358<=y&&y<=359||y==363||y==462||y==464||y==466||y==468||y==470||y==472||y==474||y==476||y==593||y==609||y==708||y==711||713<=y&&y<=715||y==717||y==720||728<=y&&y<=731||y==733||y==735||768<=y&&y<=879||913<=y&&y<=929||931<=y&&y<=937||945<=y&&y<=961||963<=y&&y<=969||y==1025||1040<=y&&y<=1103||y==1105||y==8208||8211<=y&&y<=8214||8216<=y&&y<=8217||8220<=y&&y<=8221||8224<=y&&y<=8226||8228<=y&&y<=8231||y==8240||8242<=y&&y<=8243||y==8245||y==8251||y==8254||y==8308||y==8319||8321<=y&&y<=8324||y==8364||y==8451||y==8453||y==8457||y==8467||y==8470||8481<=y&&y<=8482||y==8486||y==8491||8531<=y&&y<=8532||8539<=y&&y<=8542||8544<=y&&y<=8555||8560<=y&&y<=8569||y==8585||8592<=y&&y<=8601||8632<=y&&y<=8633||y==8658||y==8660||y==8679||y==8704||8706<=y&&y<=8707||8711<=y&&y<=8712||y==8715||y==8719||y==8721||y==8725||y==8730||8733<=y&&y<=8736||y==8739||y==8741||8743<=y&&y<=8748||y==8750||8756<=y&&y<=8759||8764<=y&&y<=8765||y==8776||y==8780||y==8786||8800<=y&&y<=8801||8804<=y&&y<=8807||8810<=y&&y<=8811||8814<=y&&y<=8815||8834<=y&&y<=8835||8838<=y&&y<=8839||y==8853||y==8857||y==8869||y==8895||y==8978||9312<=y&&y<=9449||9451<=y&&y<=9547||9552<=y&&y<=9587||9600<=y&&y<=9615||9618<=y&&y<=9621||9632<=y&&y<=9633||9635<=y&&y<=9641||9650<=y&&y<=9651||9654<=y&&y<=9655||9660<=y&&y<=9661||9664<=y&&y<=9665||9670<=y&&y<=9672||y==9675||9678<=y&&y<=9681||9698<=y&&y<=9701||y==9711||9733<=y&&y<=9734||y==9737||9742<=y&&y<=9743||9748<=y&&y<=9749||y==9756||y==9758||y==9792||y==9794||9824<=y&&y<=9825||9827<=y&&y<=9829||9831<=y&&y<=9834||9836<=y&&y<=9837||y==9839||9886<=y&&y<=9887||9918<=y&&y<=9919||9924<=y&&y<=9933||9935<=y&&y<=9953||y==9955||9960<=y&&y<=9983||y==10045||y==10071||10102<=y&&y<=10111||11093<=y&&y<=11097||12872<=y&&y<=12879||57344<=y&&y<=63743||65024<=y&&y<=65039||y==65533||127232<=y&&y<=127242||127248<=y&&y<=127277||127280<=y&&y<=127337||127344<=y&&y<=127386||917760<=y&&y<=917999||983040<=y&&y<=1048573||1048576<=y&&y<=1114109?"A":"N"},b.characterLength=function(G){var i=this.eastAsianWidth(G);return i=="F"||i=="W"||i=="A"?2:1};function I(G){return G.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}b.length=function(G){for(var i=I(G),S=0,y=0;y<i.length;y++)S=S+this.characterLength(i[y]);return S},b.slice=function(G,i,S){textLen=b.length(G),i=i||0,S=S||1,i<0&&(i=textLen+i),S<0&&(S=textLen+S);for(var y="",q=0,V=I(G),M=0;M<V.length;M++){var U=V[M],n=b.length(U);if(q>=i-(n==2?1:0))if(q+n<=S)y+=U;else break;q+=n}return y}})(g1);var T2=g1.exports,m2=u1(T2),X2=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},z2=u1(X2);function F($,b={}){if(typeof $!="string"||$.length===0||(b={ambiguousIsNarrow:!0,...b},$=k1($),$.length===0))return 0;$=$.replace(z2()," ");let I=b.ambiguousIsNarrow?1:2,G=0;for(let i of $){let S=i.codePointAt(0);if(S<=31||S>=127&&S<=159||S>=768&&S<=879)continue;switch(m2.eastAsianWidth(i)){case"F":case"W":G+=2;break;case"A":G+=I;break;default:G+=1}}return G}var N$=10,_1=($=0)=>(b)=>`\x1B[${b+$}m`,v1=($=0)=>(b)=>`\x1B[${38+$};5;${b}m`,O1=($=0)=>(b,I,G)=>`\x1B[${38+$};2;${b};${I};${G}m`,H={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(H.modifier);var W2=Object.keys(H.color),K2=Object.keys(H.bgColor);[...W2,...K2];function B2(){let $=new Map;for(let[b,I]of Object.entries(H)){for(let[G,i]of Object.entries(I))H[G]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},I[G]=H[G],$.set(i[0],i[1]);Object.defineProperty(H,b,{value:I,enumerable:!1})}return Object.defineProperty(H,"codes",{value:$,enumerable:!1}),H.color.close="\x1B[39m",H.bgColor.close="\x1B[49m",H.color.ansi=_1(),H.color.ansi256=v1(),H.color.ansi16m=O1(),H.bgColor.ansi=_1(N$),H.bgColor.ansi256=v1(N$),H.bgColor.ansi16m=O1(N$),Object.defineProperties(H,{rgbToAnsi256:{value:(b,I,G)=>b===I&&I===G?b<8?16:b>248?231:Math.round((b-8)/247*24)+232:16+36*Math.round(b/255*5)+6*Math.round(I/255*5)+Math.round(G/255*5),enumerable:!1},hexToRgb:{value:(b)=>{let I=/[a-f\d]{6}|[a-f\d]{3}/i.exec(b.toString(16));if(!I)return[0,0,0];let[G]=I;G.length===3&&(G=[...G].map((S)=>S+S).join(""));let i=Number.parseInt(G,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:(b)=>H.rgbToAnsi256(...H.hexToRgb(b)),enumerable:!1},ansi256ToAnsi:{value:(b)=>{if(b<8)return 30+b;if(b<16)return 90+(b-8);let I,G,i;if(b>=232)I=((b-232)*10+8)/255,G=I,i=I;else{b-=16;let q=b%36;I=Math.floor(b/36)/5,G=Math.floor(q/6)/5,i=q%6/5}let S=Math.max(I,G,i)*2;if(S===0)return 30;let y=30+(Math.round(i)<<2|Math.round(G)<<1|Math.round(I));return S===2&&(y+=60),y},enumerable:!1},rgbToAnsi:{value:(b,I,G)=>H.ansi256ToAnsi(H.rgbToAnsi256(b,I,G)),enumerable:!1},hexToAnsi:{value:(b)=>H.ansi256ToAnsi(H.hexToAnsi256(b)),enumerable:!1}}),H}var Y2=B2(),i$=new Set(["\x1B",""]),N2=39,w$="\x07",F1="[",j2="]",l1="m",_$=`${j2}8;;`,x1=($)=>`${i$.values().next().value}${F1}${$}${l1}`,P1=($)=>`${i$.values().next().value}${_$}${$}${w$}`,w2=($)=>$.split(" ").map((b)=>F(b)),j$=($,b,I)=>{let G=[...b],i=!1,S=!1,y=F(k1($[$.length-1]));for(let[q,V]of G.entries()){let M=F(V);if(y+M<=I?$[$.length-1]+=V:($.push(V),y=0),i$.has(V)&&(i=!0,S=G.slice(q+1).join("").startsWith(_$)),i){S?V===w$&&(i=!1,S=!1):V===l1&&(i=!1);continue}y+=M,y===I&&q<G.length-1&&($.push(""),y=0)}!y&&$[$.length-1].length>0&&$.length>1&&($[$.length-2]+=$.pop())},_2=($)=>{let b=$.split(" "),I=b.length;for(;I>0&&!(F(b[I-1])>0);)I--;return I===b.length?$:b.slice(0,I).join(" ")+b.slice(I).join("")},v2=($,b,I={})=>{if(I.trim!==!1&&$.trim()==="")return"";let G="",i,S,y=w2($),q=[""];for(let[M,U]of $.split(" ").entries()){I.trim!==!1&&(q[q.length-1]=q[q.length-1].trimStart());let n=F(q[q.length-1]);if(M!==0&&(n>=b&&(I.wordWrap===!1||I.trim===!1)&&(q.push(""),n=0),(n>0||I.trim===!1)&&(q[q.length-1]+=" ",n++)),I.hard&&y[M]>b){let R=b-n,T=1+Math.floor((y[M]-R-1)/b);Math.floor((y[M]-1)/b)<T&&q.push(""),j$(q,U,b);continue}if(n+y[M]>b&&n>0&&y[M]>0){if(I.wordWrap===!1&&n<b){j$(q,U,b);continue}q.push("")}if(n+y[M]>b&&I.wordWrap===!1){j$(q,U,b);continue}q[q.length-1]+=U}I.trim!==!1&&(q=q.map((M)=>_2(M)));let V=[...q.join(`
|
|
3
|
+
`)];for(let[M,U]of V.entries()){if(G+=U,i$.has(U)){let{groups:R}=new RegExp(`(?:\\${F1}(?<code>\\d+)m|\\${_$}(?<uri>.*)${w$})`).exec(V.slice(M).join(""))||{groups:{}};if(R.code!==void 0){let T=Number.parseFloat(R.code);i=T===N2?void 0:T}else R.uri!==void 0&&(S=R.uri.length===0?void 0:R.uri)}let n=Y2.codes.get(Number(i));V[M+1]===`
|
|
4
|
+
`?(S&&(G+=P1("")),i&&n&&(G+=x1(n))):U===`
|
|
5
|
+
`&&(i&&n&&(G+=x1(i)),S&&(G+=P1(S)))}return G};function f1($,b,I){return String($).normalize().replace(/\r\n/g,`
|
|
6
6
|
`).split(`
|
|
7
|
-
`).map((
|
|
8
|
-
`)}var
|
|
9
|
-
`),
|
|
10
|
-
`),
|
|
11
|
-
`),
|
|
12
|
-
`).length-1;this.output.write(
|
|
13
|
-
`);this.output.write(
|
|
14
|
-
`).slice(
|
|
15
|
-
`)),this._prevFrame=$;return}this.output.write(
|
|
16
|
-
${
|
|
17
|
-
`,
|
|
18
|
-
${
|
|
19
|
-
${
|
|
20
|
-
`;case"submit":return`${
|
|
21
|
-
`+
|
|
22
|
-
${
|
|
23
|
-
`}}}).prompt();var
|
|
24
|
-
${
|
|
25
|
-
`,
|
|
26
|
-
${
|
|
27
|
-
${
|
|
28
|
-
`}}}).prompt()},
|
|
29
|
-
${
|
|
30
|
-
`;switch(this.state){case"submit":return`${
|
|
31
|
-
${
|
|
32
|
-
${
|
|
33
|
-
${
|
|
34
|
-
`}}}}).prompt()};var
|
|
35
|
-
|
|
36
|
-
`)}
|
|
37
|
-
`)}
|
|
38
|
-
${
|
|
39
|
-
|
|
40
|
-
`)},
|
|
41
|
-
`);
|
|
7
|
+
`).map((G)=>v2(G,b,I)).join(`
|
|
8
|
+
`)}var O2=Object.defineProperty,x2=($,b,I)=>(b in $)?O2($,b,{enumerable:!0,configurable:!0,writable:!0,value:I}):$[b]=I,K=($,b,I)=>(x2($,typeof b!="symbol"?b+"":b,I),I);function P2($,b){if($===b)return;let I=$.split(`
|
|
9
|
+
`),G=b.split(`
|
|
10
|
+
`),i=[];for(let S=0;S<Math.max(I.length,G.length);S++)I[S]!==G[S]&&i.push(S);return i}var d1=Symbol("clack:cancel");function _($){return $===d1}function y$($,b){$.isTTY&&$.setRawMode(b)}var t1=new Map([["k","up"],["j","down"],["h","left"],["l","right"]]),f2=new Set(["up","down","left","right","space","enter"]);class S${constructor({render:$,input:b=E1,output:I=C1,...G},i=!0){K(this,"input"),K(this,"output"),K(this,"rl"),K(this,"opts"),K(this,"_track",!1),K(this,"_render"),K(this,"_cursor",0),K(this,"state","initial"),K(this,"value"),K(this,"error",""),K(this,"subscribers",new Map),K(this,"_prevFrame",""),this.opts=G,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=$.bind(this),this._track=i,this.input=b,this.output=I}prompt(){let $=new Q2(0);return $._write=(b,I,G)=>{this._track&&(this.value=this.rl.line.replace(/\t/g,""),this._cursor=this.rl.cursor,this.emit("value",this.value)),G()},this.input.pipe($),this.rl=w1.createInterface({input:this.input,output:$,tabSize:2,prompt:"",escapeCodeTimeout:50}),w1.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),y$(this.input,!0),this.output.on("resize",this.render),this.render(),new Promise((b,I)=>{this.once("submit",()=>{this.output.write(W.cursor.show),this.output.off("resize",this.render),y$(this.input,!1),b(this.value)}),this.once("cancel",()=>{this.output.write(W.cursor.show),this.output.off("resize",this.render),y$(this.input,!1),b(d1)})})}on($,b){let I=this.subscribers.get($)??[];I.push({cb:b}),this.subscribers.set($,I)}once($,b){let I=this.subscribers.get($)??[];I.push({cb:b,once:!0}),this.subscribers.set($,I)}emit($,...b){let I=this.subscribers.get($)??[],G=[];for(let i of I)i.cb(...b),i.once&&G.push(()=>I.splice(I.indexOf(i),1));for(let i of G)i()}unsubscribe(){this.subscribers.clear()}onKeypress($,b){if(this.state==="error"&&(this.state="active"),b?.name&&!this._track&&t1.has(b.name)&&this.emit("cursor",t1.get(b.name)),b?.name&&f2.has(b.name)&&this.emit("cursor",b.name),$&&($.toLowerCase()==="y"||$.toLowerCase()==="n")&&this.emit("confirm",$.toLowerCase()==="y"),$==="\t"&&this.opts.placeholder&&(this.value||(this.rl.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),$&&this.emit("key",$.toLowerCase()),b?.name==="return"){if(this.opts.validate){let I=this.opts.validate(this.value);I&&(this.error=I,this.state="error",this.rl.write(this.value))}this.state!=="error"&&(this.state="submit")}$==="\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
|
+
`),y$(this.input,!1),this.rl.close(),this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let $=f1(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
12
|
+
`).length-1;this.output.write(W.cursor.move(-999,$*-1))}render(){let $=f1(this._render(this)??"",process.stdout.columns,{hard:!0});if($!==this._prevFrame){if(this.state==="initial")this.output.write(W.cursor.hide);else{let b=P2(this._prevFrame,$);if(this.restoreCursor(),b&&b?.length===1){let I=b[0];this.output.write(W.cursor.move(0,I)),this.output.write(W.erase.lines(1));let G=$.split(`
|
|
13
|
+
`);this.output.write(G[I]),this._prevFrame=$,this.output.write(W.cursor.move(0,G.length-I-1));return}else if(b&&b?.length>1){let I=b[0];this.output.write(W.cursor.move(0,I)),this.output.write(W.erase.down());let G=$.split(`
|
|
14
|
+
`).slice(I);this.output.write(G.join(`
|
|
15
|
+
`)),this._prevFrame=$;return}this.output.write(W.erase.down())}this.output.write($),this.state==="initial"&&(this.state="active"),this._prevFrame=$}}}class v$ extends S${get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor($){super($,!1),this.value=!!$.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",(b)=>{this.output.write(W.cursor.move(0,-1)),this.value=b,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}}var t2=Object.defineProperty,h2=($,b,I)=>(b in $)?t2($,b,{enumerable:!0,configurable:!0,writable:!0,value:I}):$[b]=I,h1=($,b,I)=>(h2($,typeof b!="symbol"?b+"":b,I),I),a1=class extends S${constructor($){super($,!1),h1(this,"options"),h1(this,"cursor",0),this.options=$.options,this.cursor=this.options.findIndex(({value:b})=>b===$.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",(b)=>{switch(b){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 E2=Object.defineProperty,C2=($,b,I)=>(b in $)?E2($,b,{enumerable:!0,configurable:!0,writable:!0,value:I}):$[b]=I,k2=($,b,I)=>(C2($,typeof b!="symbol"?b+"":b,I),I);class O$ extends S${constructor($){super($),k2(this,"valueWithCursor",""),this.on("finalize",()=>{this.value||(this.value=$.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 b=this.value.slice(0,this.cursor),I=this.value.slice(this.cursor);this.valueWithCursor=`${b}${G$.default.inverse(I[0])}${I.slice(1)}`}})}get cursor(){return this._cursor}}var u2=globalThis.process.platform.startsWith("win");function r1({input:$=E1,output:b=C1,overwrite:I=!0,hideCursor:G=!0}={}){let i=v.createInterface({input:$,output:b,prompt:"",tabSize:1});v.emitKeypressEvents($,i),$.isTTY&&$.setRawMode(!0);let S=(y,{name:q})=>{if(String(y)==="\x03"){G&&b.write(W.cursor.show),process.exit(0);return}if(!I)return;v.moveCursor(b,q==="return"?0:-1,q==="return"?-1:0,()=>{v.clearLine(b,1,()=>{$.once("keypress",S)})})};return G&&b.write(W.cursor.hide),$.once("keypress",S),()=>{$.off("keypress",S),G&&b.write(W.cursor.show),$.isTTY&&!u2&&$.setRawMode(!1),i.terminal=!1,i.close()}}var c=f(Y$(),1),t=f(K$(),1);import Y from"node:process";function g2(){return Y.platform!=="win32"?Y.env.TERM!=="linux":Boolean(Y.env.CI)||Boolean(Y.env.WT_SESSION)||Boolean(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 x$=g2(),A=($,b)=>x$?$:b,F2=A("◆","*"),D1=A("■","x"),o1=A("▲","x"),t$=A("◇","o"),l2=A("┌","T"),Z=A("│","|"),h=A("└","—"),P$=A("●",">"),f$=A("○"," "),EG=A("◻","[•]"),CG=A("◼","[+]"),kG=A("◻","[ ]"),uG=A("▪","•"),gG=A("─","-"),FG=A("╮","+"),lG=A("├","+"),dG=A("╯","+"),d2=A("●","•"),a2=A("◆","*"),r2=A("▲","!"),D2=A("■","x"),h$=($)=>{switch($){case"initial":case"active":return c.default.cyan(F2);case"cancel":return c.default.red(D1);case"error":return c.default.yellow(o1);case"submit":return c.default.green(t$)}},p1=($)=>new O$({validate:$.validate,placeholder:$.placeholder,defaultValue:$.defaultValue,initialValue:$.initialValue,render(){let b=`${c.default.gray(Z)}
|
|
16
|
+
${h$(this.state)} ${$.message}
|
|
17
|
+
`,I=$.placeholder?c.default.inverse($.placeholder[0])+c.default.dim($.placeholder.slice(1)):c.default.inverse(c.default.hidden("_")),G=this.value?this.valueWithCursor:I;switch(this.state){case"error":return`${b.trim()}
|
|
18
|
+
${c.default.yellow(Z)} ${G}
|
|
19
|
+
${c.default.yellow(h)} ${c.default.yellow(this.error)}
|
|
20
|
+
`;case"submit":return`${b}${c.default.gray(Z)} ${c.default.dim(this.value||$.placeholder)}`;case"cancel":return`${b}${c.default.gray(Z)} ${c.default.strikethrough(c.default.dim(this.value??""))}${this.value?.trim()?`
|
|
21
|
+
`+c.default.gray(Z):""}`;default:return`${b}${c.default.cyan(Z)} ${G}
|
|
22
|
+
${c.default.cyan(h)}
|
|
23
|
+
`}}}).prompt();var l=($)=>{let b=$.active??"Yes",I=$.inactive??"No";return new v$({active:b,inactive:I,initialValue:$.initialValue??!0,render(){let G=`${c.default.gray(Z)}
|
|
24
|
+
${h$(this.state)} ${$.message}
|
|
25
|
+
`,i=this.value?b:I;switch(this.state){case"submit":return`${G}${c.default.gray(Z)} ${c.default.dim(i)}`;case"cancel":return`${G}${c.default.gray(Z)} ${c.default.strikethrough(c.default.dim(i))}
|
|
26
|
+
${c.default.gray(Z)}`;default:return`${G}${c.default.cyan(Z)} ${this.value?`${c.default.green(P$)} ${b}`:`${c.default.dim(f$)} ${c.default.dim(b)}`} ${c.default.dim("/")} ${this.value?`${c.default.dim(f$)} ${c.default.dim(I)}`:`${c.default.green(P$)} ${I}`}
|
|
27
|
+
${c.default.cyan(h)}
|
|
28
|
+
`}}}).prompt()},q$=($)=>{let b=(G,i)=>{let S=G.label??String(G.value);return i==="active"?`${c.default.green(P$)} ${S} ${G.hint?c.default.dim(`(${G.hint})`):""}`:i==="selected"?`${c.default.dim(S)}`:i==="cancelled"?`${c.default.strikethrough(c.default.dim(S))}`:`${c.default.dim(f$)} ${c.default.dim(S)}`},I=0;return new a1({options:$.options,initialValue:$.initialValue,render(){let G=`${c.default.gray(Z)}
|
|
29
|
+
${h$(this.state)} ${$.message}
|
|
30
|
+
`;switch(this.state){case"submit":return`${G}${c.default.gray(Z)} ${b(this.options[this.cursor],"selected")}`;case"cancel":return`${G}${c.default.gray(Z)} ${b(this.options[this.cursor],"cancelled")}
|
|
31
|
+
${c.default.gray(Z)}`;default:{let i=$.maxItems===void 0?1/0:Math.max($.maxItems,5);this.cursor>=I+i-3?I=Math.max(Math.min(this.cursor-i+3,this.options.length-i),0):this.cursor<I+2&&(I=Math.max(this.cursor-2,0));let S=i<this.options.length&&I>0,y=i<this.options.length&&I+i<this.options.length;return`${G}${c.default.cyan(Z)} ${this.options.slice(I,I+i).map((q,V,M)=>V===0&&S?c.default.dim("..."):V===M.length-1&&y?c.default.dim("..."):b(q,V+I===this.cursor?"active":"inactive")).join(`
|
|
32
|
+
${c.default.cyan(Z)} `)}
|
|
33
|
+
${c.default.cyan(h)}
|
|
34
|
+
`}}}}).prompt()};var s1=($="")=>{process.stdout.write(`${c.default.gray(h)} ${c.default.red($)}
|
|
35
|
+
|
|
36
|
+
`)},e1=($="")=>{process.stdout.write(`${c.default.gray(l2)} ${$}
|
|
37
|
+
`)},$b=($="")=>{process.stdout.write(`${c.default.gray(Z)}
|
|
38
|
+
${c.default.gray(h)} ${$}
|
|
39
|
+
|
|
40
|
+
`)},m={message:($="",{symbol:b=c.default.gray(Z)}={})=>{let I=[`${c.default.gray(Z)}`];if($){let[G,...i]=$.split(`
|
|
41
|
+
`);I.push(`${b} ${G}`,...i.map((S)=>`${c.default.gray(Z)} ${S}`))}process.stdout.write(`${I.join(`
|
|
42
42
|
`)}
|
|
43
|
-
`)},info:($)=>{
|
|
44
|
-
`);let
|
|
45
|
-
`),
|
|
43
|
+
`)},info:($)=>{m.message($,{symbol:c.default.blue(d2)})},success:($)=>{m.message($,{symbol:c.default.green(a2)})},step:($)=>{m.message($,{symbol:c.default.green(t$)})},warn:($)=>{m.message($,{symbol:c.default.yellow(r2)})},warning:($)=>{m.warn($)},error:($)=>{m.message($,{symbol:c.default.red(D2)})}},bb=()=>{let $=x$?["◒","◐","◓","◑"]:["•","o","O","0"],b=x$?80:120,I,G,i=!1,S="",y=(U="")=>{i=!0,I=r1(),S=U.replace(/\.+$/,""),process.stdout.write(`${c.default.gray(Z)}
|
|
44
|
+
`);let n=0,R=0;G=setInterval(()=>{let T=c.default.magenta($[n]),X=".".repeat(Math.floor(R)).slice(0,3);process.stdout.write(t.cursor.move(-999,0)),process.stdout.write(t.erase.down(1)),process.stdout.write(`${T} ${S}${X}`),n=n+1<$.length?n+1:0,R=R<$.length?R+0.125:0},b)},q=(U="",n=0)=>{S=U??S,i=!1,clearInterval(G);let R=n===0?c.default.green(t$):n===1?c.default.red(D1):c.default.red(o1);process.stdout.write(t.cursor.move(-999,0)),process.stdout.write(t.erase.down(1)),process.stdout.write(`${R} ${S}
|
|
45
|
+
`),I()},V=(U="")=>{S=U??S},M=(U)=>{let n=U>1?"Something went wrong":"Canceled";i&&q(n,U)};return process.on("uncaughtExceptionMonitor",()=>M(2)),process.on("unhandledRejection",()=>M(2)),process.on("SIGINT",()=>M(1)),process.on("SIGTERM",()=>M(1)),process.on("exit",M),{start:y,stop:q,message:V}};var Ib=($=0)=>(b)=>`\x1B[${b+$}m`,yb=($=0)=>(b)=>`\x1B[${38+$};5;${b}m`,Gb=($=0)=>(b,I,G)=>`\x1B[${38+$};2;${b};${I};${G}m`,J={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]}},DG=Object.keys(J.modifier),o2=Object.keys(J.color),p2=Object.keys(J.bgColor),oG=[...o2,...p2];function s2(){let $=new Map;for(let[b,I]of Object.entries(J)){for(let[G,i]of Object.entries(I))J[G]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},I[G]=J[G],$.set(i[0],i[1]);Object.defineProperty(J,b,{value:I,enumerable:!1})}return Object.defineProperty(J,"codes",{value:$,enumerable:!1}),J.color.close="\x1B[39m",J.bgColor.close="\x1B[49m",J.color.ansi=Ib(),J.color.ansi256=yb(),J.color.ansi16m=Gb(),J.bgColor.ansi=Ib(10),J.bgColor.ansi256=yb(10),J.bgColor.ansi16m=Gb(10),Object.defineProperties(J,{rgbToAnsi256:{value(b,I,G){if(b===I&&I===G){if(b<8)return 16;if(b>248)return 231;return Math.round((b-8)/247*24)+232}return 16+36*Math.round(b/255*5)+6*Math.round(I/255*5)+Math.round(G/255*5)},enumerable:!1},hexToRgb:{value(b){let I=/[a-f\d]{6}|[a-f\d]{3}/i.exec(b.toString(16));if(!I)return[0,0,0];let[G]=I;if(G.length===3)G=[...G].map((S)=>S+S).join("");let i=Number.parseInt(G,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:(b)=>J.rgbToAnsi256(...J.hexToRgb(b)),enumerable:!1},ansi256ToAnsi:{value(b){if(b<8)return 30+b;if(b<16)return 90+(b-8);let I,G,i;if(b>=232)I=((b-232)*10+8)/255,G=I,i=I;else{b-=16;let q=b%36;I=Math.floor(b/36)/5,G=Math.floor(q/6)/5,i=q%6/5}let S=Math.max(I,G,i)*2;if(S===0)return 30;let y=30+(Math.round(i)<<2|Math.round(G)<<1|Math.round(I));if(S===2)y+=60;return y},enumerable:!1},rgbToAnsi:{value:(b,I,G)=>J.ansi256ToAnsi(J.rgbToAnsi256(b,I,G)),enumerable:!1},hexToAnsi:{value:(b)=>J.ansi256ToAnsi(J.hexToAnsi256(b)),enumerable:!1}}),J}var e2=s2(),N=e2;import E$ from"node:process";import $I from"node:os";import ib from"node:tty";function B($,b=globalThis.Deno?globalThis.Deno.args:E$.argv){let I=$.startsWith("-")?"":$.length===1?"-":"--",G=b.indexOf(I+$),i=b.indexOf("--");return G!==-1&&(i===-1||G<i)}var{env:Q}=E$,c$;if(B("no-color")||B("no-colors")||B("color=false")||B("color=never"))c$=0;else if(B("color")||B("colors")||B("color=true")||B("color=always"))c$=1;function bI(){if("FORCE_COLOR"in Q){if(Q.FORCE_COLOR==="true")return 1;if(Q.FORCE_COLOR==="false")return 0;return Q.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Q.FORCE_COLOR,10),3)}}function II($){if($===0)return!1;return{level:$,hasBasic:!0,has256:$>=2,has16m:$>=3}}function yI($,{streamIsTTY:b,sniffFlags:I=!0}={}){let G=bI();if(G!==void 0)c$=G;let i=I?c$:G;if(i===0)return 0;if(I){if(B("color=16m")||B("color=full")||B("color=truecolor"))return 3;if(B("color=256"))return 2}if("TF_BUILD"in Q&&"AGENT_NAME"in Q)return 1;if($&&!b&&i===void 0)return 0;let S=i||0;if(Q.TERM==="dumb")return S;if(E$.platform==="win32"){let y=$I.release().split(".");if(Number(y[0])>=10&&Number(y[2])>=10586)return Number(y[2])>=14931?3:2;return 1}if("CI"in Q){if(["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((y)=>(y in Q)))return 3;if(["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((y)=>(y in Q))||Q.CI_NAME==="codeship")return 1;return S}if("TEAMCITY_VERSION"in Q)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Q.TEAMCITY_VERSION)?1:0;if(Q.COLORTERM==="truecolor")return 3;if(Q.TERM==="xterm-kitty")return 3;if(Q.TERM==="xterm-ghostty")return 3;if(Q.TERM==="wezterm")return 3;if("TERM_PROGRAM"in Q){let y=Number.parseInt((Q.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Q.TERM_PROGRAM){case"iTerm.app":return y>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(Q.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Q.TERM))return 1;if("COLORTERM"in Q)return 1;return S}function Sb($,b={}){let I=yI($,{streamIsTTY:$&&$.isTTY,...b});return II(I)}var GI={stdout:Sb({isTTY:ib.isatty(1)}),stderr:Sb({isTTY:ib.isatty(2)})},qb=GI;function cb($,b,I){let G=$.indexOf(b);if(G===-1)return $;let i=b.length,S=0,y="";do y+=$.slice(S,G)+b+I,S=G+i,G=$.indexOf(b,S);while(G!==-1);return y+=$.slice(S),y}function Mb($,b,I,G){let i=0,S="";do{let y=$[G-1]==="\r";S+=$.slice(i,y?G-1:G)+b+(y?`\r
|
|
46
46
|
`:`
|
|
47
|
-
`)+
|
|
48
|
-
`,
|
|
49
|
-
`);if(
|
|
50
|
-
\uD83D\uDD0D Debug - Resolved paths:`),console.log(" Base directory:",
|
|
51
|
-
|
|
52
|
-
// Define your schema here
|
|
53
|
-
// Example:
|
|
54
|
-
// export const users = ${V}('users', {
|
|
55
|
-
// id: integer('id').primaryKey(),
|
|
56
|
-
// email: text('email').notNull().unique(),
|
|
57
|
-
// })
|
|
58
|
-
`;return`${S}
|
|
59
|
-
|
|
60
|
-
export const users = ${V}('users', {
|
|
61
|
-
id: ${$==="sqlite"?"integer('id').primaryKey({ autoIncrement: true })":"text('id').primaryKey().$defaultFn(() => crypto.randomUUID())"},
|
|
62
|
-
email: text('email').notNull().unique(),
|
|
63
|
-
name: text('name'),
|
|
64
|
-
createdAt: timestamp('created_at').defaultNow().notNull(),
|
|
65
|
-
updatedAt: timestamp('updated_at').defaultNow().notNull(),
|
|
66
|
-
})
|
|
67
|
-
`}function B0($){if($==="postgresql")return`import { drizzle } from 'drizzle-orm/postgres-js'
|
|
47
|
+
`)+I,i=G+1,G=$.indexOf(`
|
|
48
|
+
`,i)}while(G!==-1);return S+=$.slice(i),S}var{stdout:Vb,stderr:Ub}=qb,C$=Symbol("GENERATOR"),E=Symbol("STYLER"),d=Symbol("IS_EMPTY"),nb=["ansi","ansi","ansi256","ansi16m"],C=Object.create(null),iI=($,b={})=>{if(b.level&&!(Number.isInteger(b.level)&&b.level>=0&&b.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let I=Vb?Vb.level:0;$.level=b.level===void 0?I:b.level};var SI=($)=>{let b=(...I)=>I.join(" ");return iI(b,$),Object.setPrototypeOf(b,a.prototype),b};function a($){return SI($)}Object.setPrototypeOf(a.prototype,Function.prototype);for(let[$,b]of Object.entries(N))C[$]={get(){let I=M$(this,u$(b.open,b.close,this[E]),this[d]);return Object.defineProperty(this,$,{value:I}),I}};C.visible={get(){let $=M$(this,this[E],!0);return Object.defineProperty(this,"visible",{value:$}),$}};var k$=($,b,I,...G)=>{if($==="rgb"){if(b==="ansi16m")return N[I].ansi16m(...G);if(b==="ansi256")return N[I].ansi256(N.rgbToAnsi256(...G));return N[I].ansi(N.rgbToAnsi(...G))}if($==="hex")return k$("rgb",b,I,...N.hexToRgb(...G));return N[I][$](...G)},qI=["rgb","hex","ansi256"];for(let $ of qI){C[$]={get(){let{level:I}=this;return function(...G){let i=u$(k$($,nb[I],"color",...G),N.color.close,this[E]);return M$(this,i,this[d])}}};let b="bg"+$[0].toUpperCase()+$.slice(1);C[b]={get(){let{level:I}=this;return function(...G){let i=u$(k$($,nb[I],"bgColor",...G),N.bgColor.close,this[E]);return M$(this,i,this[d])}}}}var cI=Object.defineProperties(()=>{},{...C,level:{enumerable:!0,get(){return this[C$].level},set($){this[C$].level=$}}}),u$=($,b,I)=>{let G,i;if(I===void 0)G=$,i=b;else G=I.openAll+$,i=b+I.closeAll;return{open:$,close:b,openAll:G,closeAll:i,parent:I}},M$=($,b,I)=>{let G=(...i)=>MI(G,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(G,cI),G[C$]=$,G[E]=b,G[d]=I,G},MI=($,b)=>{if($.level<=0||!b)return $[d]?"":b;let I=$[E];if(I===void 0)return b;let{openAll:G,closeAll:i}=I;if(b.includes("\x1B"))while(I!==void 0)b=cb(b,I.close,I.open),I=I.parent;let S=b.indexOf(`
|
|
49
|
+
`);if(S!==-1)b=Mb(b,i,G,S);return G+b+i};Object.defineProperties(a.prototype,C);var VI=a(),Si=a({level:Ub?Ub.level:0});var L=VI;import{readFile as UI,access as nI}from"node:fs/promises";async function O($){try{return await nI($),!0}catch{return!1}}async function RI(){if(await O("bun.lockb"))return"bun";if(await O("pnpm-lock.yaml"))return"pnpm";if(await O("yarn.lock"))return"yarn";return"npm"}async function LI(){if(await O("src"))return"src";if(await O("app"))return"app";return null}async function HI(){let $=[".env",".env.local",".env.development"];for(let b of $)try{let G=(await UI(b,"utf-8")).match(/DATABASE_URL=["']?([^"'\n]+)/);if(G){let i=G[1];return{type:i.includes("postgres")?"postgresql":i.includes("mysql")?"mysql":i.includes("sqlite")||i.includes(".db")?"sqlite":"unknown",url:i}}}catch{continue}return{type:"unknown",url:null}}async function JI(){let $=["drizzle.config.ts","drizzle.config.js","drizzle/migrations"];for(let b of $)if(await O(b))return!0;return!1}async function Rb(){let[$,b,I,G,i]=await Promise.all([O("tsconfig.json"),RI(),LI(),JI(),HI()]);return{hasTypescript:$,packageManager:b,srcDir:I,hasDrizzle:G,database:i}}async function Lb($){let b=await q$({message:"Select your ORM",options:[{value:"drizzle",label:"Drizzle",hint:"TypeScript-first, lightweight"},{value:"prisma",label:"Prisma",hint:"Most popular, great DX"},{value:"kysely",label:"Kysely",hint:"Type-safe SQL builder"}],initialValue:"drizzle"});if(_(b))process.exit(0);let I=b,G=await q$({message:"Select your database",options:[{value:"postgresql",label:"PostgreSQL",hint:"Recommended for production"},{value:"mysql",label:"MySQL/MariaDB",hint:"Popular choice"},{value:"sqlite",label:"SQLite",hint:"Great for development"}],initialValue:$.database.type!=="unknown"?$.database.type:"postgresql"});if(_(G))process.exit(0);let i=G,S=await q$({message:"Choose your schema template",options:[{value:"starter",label:"\uD83D\uDCE6 Starter",hint:"User table only"},{value:"blog",label:"\uD83D\uDE80 Blog",hint:"User, Post, Comment, Category"},{value:"ecommerce",label:"\uD83D\uDED2 E-commerce",hint:"User, Product, Order, Cart"},{value:"saas",label:"\uD83D\uDCBC SaaS",hint:"User, Organization, Subscription"},{value:"empty",label:"❌ Empty",hint:"No tables, start from scratch"}],initialValue:"starter"});if(_(S))process.exit(0);let y=S,q=!1;if(I==="drizzle"){let U=await l({message:"Include Drizzle Studio? (database GUI)",initialValue:!0});if(_(U))process.exit(0);q=U}let V=await l({message:"Use custom path for database client?",initialValue:!1});if(_(V))process.exit(0);let M;if(V){let U=await p1({message:"Enter path (e.g., src/lib/database)",placeholder:$.srcDir?`${$.srcDir}/lib/db`:"lib/db"});if(_(U))process.exit(0);M=U}return{orm:I,database:i,template:y,includeStudio:q,clientPath:M}}function Hb($,b){let I;if(b)I=b.replace(/\\/g,"/");else if($)I=`${$}/lib`;else I="lib";let G={clientDir:I,clientFile:`${I}/db.ts`,schemaDir:`${I}/db`,schemaFile:`${I}/db/schema.ts`,migrateFile:`${I}/db/migrate.ts`,configFile:"drizzle.config.ts",migrationsDir:"drizzle/migrations"};return console.log(`
|
|
50
|
+
\uD83D\uDD0D Debug - Resolved paths:`),console.log(" Base directory:",I),console.log(" Client file:",G.clientFile),console.log(" Schema file:",G.schemaFile),console.log(""),G}import{mkdir as QI,writeFile as ZI}from"node:fs/promises";import{dirname as AI,resolve as TI}from"node:path";async function mI($,b){try{let I=TI(process.cwd(),$),G=AI(I);await QI(G,{recursive:!0}),await ZI(I,b,"utf-8")}catch(I){if(I instanceof Error)throw Error(`Failed to write file ${$}: ${I.message}`);throw I}}async function k($){for(let{path:b,content:I}of $)await mI(b,I)}function Jb($){if($==="postgresql")return`import { drizzle } from 'drizzle-orm/postgres-js'
|
|
68
51
|
import postgres from 'postgres'
|
|
69
52
|
import * as schema from './db/schema'
|
|
70
53
|
|
|
@@ -94,17 +77,17 @@ if (!process.env.DATABASE_URL) {
|
|
|
94
77
|
|
|
95
78
|
const sqlite = new Database(process.env.DATABASE_URL)
|
|
96
79
|
export const db = drizzle(sqlite, { schema })
|
|
97
|
-
`}function
|
|
80
|
+
`}function Qb($,b,I){return`import { defineConfig } from 'drizzle-kit'
|
|
98
81
|
|
|
99
82
|
export default defineConfig({
|
|
100
|
-
schema: './${
|
|
101
|
-
out: './${
|
|
83
|
+
schema: './${b}',
|
|
84
|
+
out: './${I}',
|
|
102
85
|
dialect: '${$==="postgresql"?"postgresql":$==="mysql"?"mysql":"sqlite"}',
|
|
103
86
|
dbCredentials: {
|
|
104
87
|
${$==="sqlite"?"url: process.env.DATABASE_URL!":"url: process.env.DATABASE_URL!"},
|
|
105
88
|
},
|
|
106
89
|
})
|
|
107
|
-
`}function
|
|
90
|
+
`}function Zb($){if($==="postgresql")return`import { drizzle } from 'drizzle-orm/postgres-js'
|
|
108
91
|
import { migrate } from 'drizzle-orm/postgres-js/migrator'
|
|
109
92
|
import postgres from 'postgres'
|
|
110
93
|
|
|
@@ -137,22 +120,137 @@ migrate(db, { migrationsFolder: './drizzle/migrations' })
|
|
|
137
120
|
sqlite.close()
|
|
138
121
|
|
|
139
122
|
console.log('✅ Migrations complete!')
|
|
140
|
-
`}
|
|
141
|
-
|
|
123
|
+
`}function Ab($,b){let I=b==="postgresql"?"pg-core":b==="mysql"?"mysql-core":"sqlite-core",G=b==="postgresql"?"pgTable":b==="mysql"?"mysqlTable":"sqliteTable",i=`import { ${G}, text, timestamp, integer, boolean } from 'drizzle-orm/${I}'`;if($==="empty")return`${i}
|
|
124
|
+
|
|
125
|
+
// Define your schema here
|
|
126
|
+
// Example:
|
|
127
|
+
// export const users = ${G}('users', {
|
|
128
|
+
// id: text('id').primaryKey().$defaultFn(() => crypto.randomUUID()),
|
|
129
|
+
// email: text('email').notNull().unique(),
|
|
130
|
+
// })
|
|
131
|
+
`;let S=b==="sqlite"?"integer('id').primaryKey({ autoIncrement: true })":"text('id').primaryKey().$defaultFn(() => crypto.randomUUID())";if($==="starter")return`${i}
|
|
132
|
+
|
|
133
|
+
export const users = ${G}('users', {
|
|
134
|
+
id: ${S},
|
|
135
|
+
email: text('email').notNull().unique(),
|
|
136
|
+
name: text('name'),
|
|
137
|
+
createdAt: timestamp('created_at').defaultNow().notNull(),
|
|
138
|
+
updatedAt: timestamp('updated_at').defaultNow().notNull(),
|
|
139
|
+
})
|
|
140
|
+
`;if($==="blog")return`${i}
|
|
141
|
+
|
|
142
|
+
export const users = ${G}('users', {
|
|
143
|
+
id: ${S},
|
|
144
|
+
email: text('email').notNull().unique(),
|
|
145
|
+
name: text('name'),
|
|
146
|
+
createdAt: timestamp('created_at').defaultNow().notNull(),
|
|
147
|
+
updatedAt: timestamp('updated_at').defaultNow().notNull(),
|
|
148
|
+
})
|
|
149
|
+
|
|
150
|
+
export const posts = ${G}('posts', {
|
|
151
|
+
id: ${S},
|
|
152
|
+
title: text('title').notNull(),
|
|
153
|
+
slug: text('slug').notNull().unique(),
|
|
154
|
+
content: text('content'),
|
|
155
|
+
published: boolean('published').default(false),
|
|
156
|
+
authorId: text('author_id').notNull().references(() => users.id, { onDelete: 'cascade' }),
|
|
157
|
+
createdAt: timestamp('created_at').defaultNow().notNull(),
|
|
158
|
+
updatedAt: timestamp('updated_at').defaultNow().notNull(),
|
|
159
|
+
})
|
|
160
|
+
|
|
161
|
+
export const comments = ${G}('comments', {
|
|
162
|
+
id: ${S},
|
|
163
|
+
content: text('content').notNull(),
|
|
164
|
+
postId: text('post_id').notNull().references(() => posts.id, { onDelete: 'cascade' }),
|
|
165
|
+
authorId: text('author_id').notNull().references(() => users.id, { onDelete: 'cascade' }),
|
|
166
|
+
createdAt: timestamp('created_at').defaultNow().notNull(),
|
|
167
|
+
})
|
|
168
|
+
|
|
169
|
+
export const categories = ${G}('categories', {
|
|
170
|
+
id: ${S},
|
|
171
|
+
name: text('name').notNull().unique(),
|
|
172
|
+
slug: text('slug').notNull().unique(),
|
|
173
|
+
createdAt: timestamp('created_at').defaultNow().notNull(),
|
|
174
|
+
})
|
|
175
|
+
`;if($==="ecommerce")return`${i}
|
|
176
|
+
import { json } from 'drizzle-orm/${I}'
|
|
177
|
+
|
|
178
|
+
export const users = ${G}('users', {
|
|
179
|
+
id: ${S},
|
|
180
|
+
email: text('email').notNull().unique(),
|
|
181
|
+
name: text('name'),
|
|
182
|
+
createdAt: timestamp('created_at').defaultNow().notNull(),
|
|
183
|
+
})
|
|
184
|
+
|
|
185
|
+
export const products = ${G}('products', {
|
|
186
|
+
id: ${S},
|
|
187
|
+
name: text('name').notNull(),
|
|
188
|
+
slug: text('slug').notNull().unique(),
|
|
189
|
+
description: text('description'),
|
|
190
|
+
price: integer('price').notNull(), // in cents
|
|
191
|
+
inventory: integer('inventory').default(0),
|
|
192
|
+
images: json('images'),
|
|
193
|
+
createdAt: timestamp('created_at').defaultNow().notNull(),
|
|
194
|
+
})
|
|
195
|
+
|
|
196
|
+
export const orders = ${G}('orders', {
|
|
197
|
+
id: ${S},
|
|
198
|
+
orderNumber: text('order_number').notNull().unique(),
|
|
199
|
+
userId: text('user_id').notNull().references(() => users.id),
|
|
200
|
+
status: text('status').notNull().default('pending'),
|
|
201
|
+
total: integer('total').notNull(),
|
|
202
|
+
createdAt: timestamp('created_at').defaultNow().notNull(),
|
|
203
|
+
})
|
|
204
|
+
`;if($==="saas")return`${i}
|
|
205
|
+
|
|
206
|
+
export const users = ${G}('users', {
|
|
207
|
+
id: ${S},
|
|
208
|
+
email: text('email').notNull().unique(),
|
|
209
|
+
name: text('name'),
|
|
210
|
+
createdAt: timestamp('created_at').defaultNow().notNull(),
|
|
211
|
+
})
|
|
212
|
+
|
|
213
|
+
export const organizations = ${G}('organizations', {
|
|
214
|
+
id: ${S},
|
|
215
|
+
name: text('name').notNull(),
|
|
216
|
+
slug: text('slug').notNull().unique(),
|
|
217
|
+
plan: text('plan').default('free'),
|
|
218
|
+
createdAt: timestamp('created_at').defaultNow().notNull(),
|
|
219
|
+
})
|
|
220
|
+
|
|
221
|
+
export const memberships = ${G}('memberships', {
|
|
222
|
+
id: ${S},
|
|
223
|
+
userId: text('user_id').notNull().references(() => users.id, { onDelete: 'cascade' }),
|
|
224
|
+
organizationId: text('organization_id').notNull().references(() => organizations.id, { onDelete: 'cascade' }),
|
|
225
|
+
role: text('role').notNull().default('member'),
|
|
226
|
+
createdAt: timestamp('created_at').defaultNow().notNull(),
|
|
227
|
+
})
|
|
228
|
+
|
|
229
|
+
export const subscriptions = ${G}('subscriptions', {
|
|
230
|
+
id: ${S},
|
|
231
|
+
organizationId: text('organization_id').notNull().references(() => organizations.id, { onDelete: 'cascade' }),
|
|
232
|
+
plan: text('plan').notNull(),
|
|
233
|
+
status: text('status').notNull().default('active'),
|
|
234
|
+
currentPeriodEnd: timestamp('current_period_end').notNull(),
|
|
235
|
+
createdAt: timestamp('created_at').defaultNow().notNull(),
|
|
236
|
+
})
|
|
237
|
+
`;return i}function Tb($,b){let G=`datasource db {
|
|
238
|
+
provider = "${b==="postgresql"?"postgresql":b==="mysql"?"mysql":"sqlite"}"
|
|
142
239
|
url = env("DATABASE_URL")
|
|
143
240
|
}
|
|
144
241
|
|
|
145
242
|
generator client {
|
|
146
243
|
provider = "prisma-client-js"
|
|
147
244
|
}
|
|
148
|
-
`;if(
|
|
245
|
+
`;if($==="empty")return`${G}
|
|
149
246
|
// Define your models here
|
|
150
247
|
// Example:
|
|
151
248
|
// model User {
|
|
152
249
|
// id String @id @default(uuid())
|
|
153
250
|
// email String @unique
|
|
154
251
|
// }
|
|
155
|
-
`;return`${
|
|
252
|
+
`;if($==="starter")return`${G}
|
|
253
|
+
|
|
156
254
|
model User {
|
|
157
255
|
id String @id @default(uuid())
|
|
158
256
|
email String @unique
|
|
@@ -160,70 +258,210 @@ model User {
|
|
|
160
258
|
createdAt DateTime @default(now())
|
|
161
259
|
updatedAt DateTime @updatedAt
|
|
162
260
|
}
|
|
163
|
-
|
|
261
|
+
`;if($==="blog")return`${G}
|
|
164
262
|
|
|
165
|
-
|
|
166
|
-
|
|
263
|
+
model User {
|
|
264
|
+
id String @id @default(uuid())
|
|
265
|
+
email String @unique
|
|
266
|
+
name String?
|
|
267
|
+
posts Post[]
|
|
268
|
+
comments Comment[]
|
|
269
|
+
createdAt DateTime @default(now())
|
|
270
|
+
updatedAt DateTime @updatedAt
|
|
167
271
|
}
|
|
168
272
|
|
|
169
|
-
|
|
273
|
+
model Post {
|
|
274
|
+
id String @id @default(uuid())
|
|
275
|
+
title String
|
|
276
|
+
slug String @unique
|
|
277
|
+
content String?
|
|
278
|
+
published Boolean @default(false)
|
|
279
|
+
author User @relation(fields: [authorId], references: [id], onDelete: Cascade)
|
|
280
|
+
authorId String
|
|
281
|
+
comments Comment[]
|
|
282
|
+
createdAt DateTime @default(now())
|
|
283
|
+
updatedAt DateTime @updatedAt
|
|
284
|
+
|
|
285
|
+
@@index([authorId])
|
|
286
|
+
}
|
|
170
287
|
|
|
171
|
-
|
|
172
|
-
|
|
288
|
+
model Comment {
|
|
289
|
+
id String @id @default(uuid())
|
|
290
|
+
content String
|
|
291
|
+
post Post @relation(fields: [postId], references: [id], onDelete: Cascade)
|
|
292
|
+
postId String
|
|
293
|
+
author User @relation(fields: [authorId], references: [id], onDelete: Cascade)
|
|
294
|
+
authorId String
|
|
295
|
+
createdAt DateTime @default(now())
|
|
296
|
+
|
|
297
|
+
@@index([postId])
|
|
298
|
+
@@index([authorId])
|
|
173
299
|
}
|
|
174
|
-
`}function yG($,I){let G=I==="postgresql"?"pg-core":I==="mysql"?"mysql-core":"sqlite-core",V=I==="postgresql"?"pgTable":I==="mysql"?"mysqlTable":"sqliteTable",S=new Set(["text","timestamp"]);$.forEach((J)=>{J.fields.forEach((X)=>{let Q=j0(X);S.add(Q.split("(")[0])})});let M=`import { ${V}, ${Array.from(S).join(", ")} } from 'drizzle-orm/${G}'`,q=$.map((J)=>{let X=J.fields.map((Q)=>{return` ${Q.name}: ${_G(Q,I)},`}).join(`
|
|
175
|
-
`);return`export const ${J.name} = ${V}('${J.name}', {
|
|
176
|
-
${X}
|
|
177
|
-
})`}).join(`
|
|
178
300
|
|
|
179
|
-
|
|
301
|
+
model Category {
|
|
302
|
+
id String @id @default(uuid())
|
|
303
|
+
name String @unique
|
|
304
|
+
slug String @unique
|
|
305
|
+
createdAt DateTime @default(now())
|
|
306
|
+
}
|
|
307
|
+
`;if($==="ecommerce")return`${G}
|
|
180
308
|
|
|
181
|
-
|
|
309
|
+
model User {
|
|
310
|
+
id String @id @default(uuid())
|
|
311
|
+
email String @unique
|
|
312
|
+
name String?
|
|
313
|
+
orders Order[]
|
|
314
|
+
createdAt DateTime @default(now())
|
|
315
|
+
}
|
|
182
316
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
317
|
+
model Product {
|
|
318
|
+
id String @id @default(uuid())
|
|
319
|
+
name String
|
|
320
|
+
slug String @unique
|
|
321
|
+
description String?
|
|
322
|
+
price Int
|
|
323
|
+
inventory Int @default(0)
|
|
324
|
+
images Json?
|
|
325
|
+
createdAt DateTime @default(now())
|
|
326
|
+
}
|
|
190
327
|
|
|
191
|
-
|
|
328
|
+
model Order {
|
|
329
|
+
id String @id @default(uuid())
|
|
330
|
+
orderNumber String @unique
|
|
331
|
+
user User @relation(fields: [userId], references: [id])
|
|
332
|
+
userId String
|
|
333
|
+
status String @default("pending")
|
|
334
|
+
total Int
|
|
335
|
+
createdAt DateTime @default(now())
|
|
192
336
|
|
|
193
|
-
|
|
194
|
-
provider = "${I==="postgresql"?"postgresql":I==="mysql"?"mysql":"sqlite"}"
|
|
195
|
-
url = env("DATABASE_URL")
|
|
337
|
+
@@index([userId])
|
|
196
338
|
}
|
|
339
|
+
`;if($==="saas")return`${G}
|
|
197
340
|
|
|
198
|
-
|
|
199
|
-
|
|
341
|
+
model User {
|
|
342
|
+
id String @id @default(uuid())
|
|
343
|
+
email String @unique
|
|
344
|
+
name String?
|
|
345
|
+
memberships Membership[]
|
|
346
|
+
createdAt DateTime @default(now())
|
|
200
347
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
${V}`}function vG($){let I=$.name;I+=" ";let G=xG($);if(I+=G,!$.required&&!$.isPrimaryKey)I+="?";let V=[];if($.isPrimaryKey)if($.type==="uuid")V.push("@id @default(uuid())");else if($.isAutoIncrement)V.push("@id @default(autoincrement())");else V.push("@id");if($.unique&&!$.isPrimaryKey)V.push("@unique");if($.default!==void 0&&!$.isPrimaryKey)if($.default==="now")V.push("@default(now())");else if(typeof $.default==="string")V.push(`@default("${$.default}")`);else if(typeof $.default==="boolean")V.push(`@default(${$.default})`);else V.push(`@default(${$.default})`);if($.references){if(V.push(`@relation(fields: [${$.name}], references: [${$.references.field}]`),$.references.onDelete)V.push(`, onDelete: ${Z$($.references.onDelete)}`);V.push(")")}if(V.length>0)I+=" "+V.join(" ");return I}function xG($){switch($.type){case"uuid":return"String";case"string":return"String";case"text":return"String";case"number":return"Int";case"boolean":return"Boolean";case"date":return"DateTime";case"json":return"Json";default:return"String"}}function wG($,I){let V=$.map((M)=>{let q=M.fields.map((Z)=>{let J=PG(Z);if(Z.isPrimaryKey&&Z.isAutoIncrement)J=`Generated<${J}>`;if(!Z.required&&!Z.isPrimaryKey)J+=" | null";return` ${Z.name}: ${J}`}).join(`
|
|
211
|
-
`),H=Z$(M.displayName);return`export interface ${H}Table {
|
|
212
|
-
${q}
|
|
348
|
+
|
|
349
|
+
model Organization {
|
|
350
|
+
id String @id @default(uuid())
|
|
351
|
+
name String
|
|
352
|
+
slug String @unique
|
|
353
|
+
plan String @default("free")
|
|
354
|
+
memberships Membership[]
|
|
355
|
+
subscriptions Subscription[]
|
|
356
|
+
createdAt DateTime @default(now())
|
|
213
357
|
}
|
|
214
358
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
359
|
+
model Membership {
|
|
360
|
+
id String @id @default(uuid())
|
|
361
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
362
|
+
userId String
|
|
363
|
+
organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade)
|
|
364
|
+
organizationId String
|
|
365
|
+
role String @default("member")
|
|
366
|
+
createdAt DateTime @default(now())
|
|
367
|
+
|
|
368
|
+
@@index([userId])
|
|
369
|
+
@@index([organizationId])
|
|
370
|
+
}
|
|
218
371
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
372
|
+
model Subscription {
|
|
373
|
+
id String @id @default(uuid())
|
|
374
|
+
organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade)
|
|
375
|
+
organizationId String
|
|
376
|
+
plan String
|
|
377
|
+
status String @default("active")
|
|
378
|
+
currentPeriodEnd DateTime
|
|
379
|
+
createdAt DateTime @default(now())
|
|
223
380
|
|
|
224
|
-
|
|
381
|
+
@@index([organizationId])
|
|
382
|
+
}
|
|
383
|
+
`;return G}function mb($){if($==="empty")return`import { Generated } from 'kysely'
|
|
225
384
|
|
|
226
|
-
|
|
385
|
+
// Define your table interfaces here
|
|
386
|
+
// Example:
|
|
387
|
+
// export interface UsersTable {
|
|
388
|
+
// id: Generated<string>
|
|
389
|
+
// email: string
|
|
390
|
+
// name: string | null
|
|
391
|
+
// }
|
|
392
|
+
|
|
393
|
+
export interface Database {
|
|
394
|
+
// Add your tables here
|
|
395
|
+
}
|
|
396
|
+
`;if($==="starter")return`import { Generated } from 'kysely'
|
|
397
|
+
|
|
398
|
+
export interface UsersTable {
|
|
399
|
+
id: Generated<string>
|
|
400
|
+
email: string
|
|
401
|
+
name: string | null
|
|
402
|
+
created_at: Generated<Date>
|
|
403
|
+
updated_at: Generated<Date>
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
export interface Database {
|
|
407
|
+
users: UsersTable
|
|
408
|
+
}
|
|
409
|
+
`;if($==="blog")return`import { Generated } from 'kysely'
|
|
410
|
+
|
|
411
|
+
export interface UsersTable {
|
|
412
|
+
id: Generated<string>
|
|
413
|
+
email: string
|
|
414
|
+
name: string | null
|
|
415
|
+
created_at: Generated<Date>
|
|
416
|
+
updated_at: Generated<Date>
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
export interface PostsTable {
|
|
420
|
+
id: Generated<string>
|
|
421
|
+
title: string
|
|
422
|
+
slug: string
|
|
423
|
+
content: string | null
|
|
424
|
+
published: Generated<boolean>
|
|
425
|
+
author_id: string
|
|
426
|
+
created_at: Generated<Date>
|
|
427
|
+
updated_at: Generated<Date>
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
export interface CommentsTable {
|
|
431
|
+
id: Generated<string>
|
|
432
|
+
content: string
|
|
433
|
+
post_id: string
|
|
434
|
+
author_id: string
|
|
435
|
+
created_at: Generated<Date>
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
export interface CategoriesTable {
|
|
439
|
+
id: Generated<string>
|
|
440
|
+
name: string
|
|
441
|
+
slug: string
|
|
442
|
+
created_at: Generated<Date>
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
export interface Database {
|
|
446
|
+
users: UsersTable
|
|
447
|
+
posts: PostsTable
|
|
448
|
+
comments: CommentsTable
|
|
449
|
+
categories: CategoriesTable
|
|
450
|
+
}
|
|
451
|
+
`;return`import { Generated } from 'kysely'
|
|
452
|
+
|
|
453
|
+
export interface Database {}`}async function Xb($){let{paths:b,database:I,template:G}=$,i=[{path:b.schemaFile,content:Ab(G,I)},{path:b.clientFile,content:Jb(I)},{path:b.configFile,content:Qb(I,b.schemaFile,b.migrationsDir)},{path:b.migrateFile,content:Zb(I)}];await k(i)}async function zb($){let{paths:b,database:I,template:G}=$,i=[{path:"prisma/schema.prisma",content:Tb(G,I)},{path:b.clientFile.replace("/db.ts","/prisma.ts"),content:XI()}];await k(i)}function XI(){return`import { PrismaClient } from '@prisma/client'
|
|
454
|
+
|
|
455
|
+
const globalForPrisma = globalThis as unknown as {
|
|
456
|
+
prisma: PrismaClient | undefined
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
export const prisma = globalForPrisma.prisma ?? new PrismaClient()
|
|
460
|
+
|
|
461
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
462
|
+
globalForPrisma.prisma = prisma
|
|
463
|
+
}
|
|
464
|
+
`}async function Wb($){let{paths:b,database:I,template:G}=$,i=[{path:b.schemaFile,content:mb(G)},{path:b.clientFile,content:zI(I)},{path:b.migrateFile,content:WI(I)}];await k(i)}function zI($){if($==="postgresql")return`import { Kysely, PostgresDialect } from 'kysely'
|
|
227
465
|
import { Pool } from 'pg'
|
|
228
466
|
import type { Database } from './db/schema'
|
|
229
467
|
|
|
@@ -232,14 +470,10 @@ if (!process.env.DATABASE_URL) {
|
|
|
232
470
|
}
|
|
233
471
|
|
|
234
472
|
const dialect = new PostgresDialect({
|
|
235
|
-
pool: new Pool({
|
|
236
|
-
connectionString: process.env.DATABASE_URL,
|
|
237
|
-
}),
|
|
473
|
+
pool: new Pool({ connectionString: process.env.DATABASE_URL }),
|
|
238
474
|
})
|
|
239
475
|
|
|
240
|
-
export const db = new Kysely<Database>({
|
|
241
|
-
dialect,
|
|
242
|
-
})
|
|
476
|
+
export const db = new Kysely<Database>({ dialect })
|
|
243
477
|
`;if($==="mysql")return`import { Kysely, MysqlDialect } from 'kysely'
|
|
244
478
|
import { createPool } from 'mysql2'
|
|
245
479
|
import type { Database } from './db/schema'
|
|
@@ -252,9 +486,7 @@ const dialect = new MysqlDialect({
|
|
|
252
486
|
pool: createPool(process.env.DATABASE_URL),
|
|
253
487
|
})
|
|
254
488
|
|
|
255
|
-
export const db = new Kysely<Database>({
|
|
256
|
-
dialect,
|
|
257
|
-
})
|
|
489
|
+
export const db = new Kysely<Database>({ dialect })
|
|
258
490
|
`;return`import { Kysely, SqliteDialect } from 'kysely'
|
|
259
491
|
import Database from 'better-sqlite3'
|
|
260
492
|
import type { Database as DatabaseType } from './db/schema'
|
|
@@ -267,10 +499,8 @@ const dialect = new SqliteDialect({
|
|
|
267
499
|
database: new Database(process.env.DATABASE_URL),
|
|
268
500
|
})
|
|
269
501
|
|
|
270
|
-
export const db = new Kysely<DatabaseType>({
|
|
271
|
-
|
|
272
|
-
})
|
|
273
|
-
`}function cG($){return`import { promises as fs } from 'fs'
|
|
502
|
+
export const db = new Kysely<DatabaseType>({ dialect })
|
|
503
|
+
`}function WI($){return`import { promises as fs } from 'fs'
|
|
274
504
|
import { Migrator, FileMigrationProvider } from 'kysely'
|
|
275
505
|
import { db } from '../db'
|
|
276
506
|
import * as path from 'path'
|
|
@@ -305,11 +535,11 @@ async function migrateToLatest() {
|
|
|
305
535
|
}
|
|
306
536
|
|
|
307
537
|
migrateToLatest()
|
|
308
|
-
`}var
|
|
538
|
+
`}var b2=f(n0(),1);import{Buffer as HG}from"node:buffer";import JG from"node:path";import m1 from"node:child_process";import X$ from"node:process";function s$($){let b=typeof $==="string"?`
|
|
309
539
|
`:`
|
|
310
|
-
`.charCodeAt(),
|
|
311
|
-
${
|
|
312
|
-
${
|
|
313
|
-
`);if(s)V.originalMessage=V.message,V.message=$$;else V=Error($$);if(V.shortMessage=e,V.command=q,V.escapedCommand=H,V.exitCode=M,V.signal=S,V.signalDescription=A,V.stdout=$,V.stderr=I,V.cwd=W,G!==void 0)V.all=G;if("bufferedData"in V)delete V.bufferedData;return V.failed=!0,V.timedOut=Boolean(Z),V.isCanceled=J,V.killed=X&&!Z,V};var Y$=["stdin","stdout","stderr"],w9=($)=>Y$.some((I)=>$[I]!==void 0),N2=($)=>{if(!$)return;let{stdio:I}=$;if(I===void 0)return Y$.map((V)=>$[V]);if(w9($))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${Y$.map((V)=>`\`${V}\``).join(", ")}`);if(typeof I==="string")return I;if(!Array.isArray(I))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof I}\``);let G=Math.max(I.length,Y$.length);return Array.from({length:G},(V,S)=>I[S])};import c9 from"node:os";var c=[];c.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")c.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")c.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var L$=($)=>!!$&&typeof $==="object"&&typeof $.removeListener==="function"&&typeof $.emit==="function"&&typeof $.reallyExit==="function"&&typeof $.listeners==="function"&&typeof $.kill==="function"&&typeof $.pid==="number"&&typeof $.on==="function",q1=Symbol.for("signal-exit emitter"),V1=globalThis,P9=Object.defineProperty.bind(Object);class j2{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(V1[q1])return V1[q1];P9(V1,q1,{value:this,writable:!1,enumerable:!1,configurable:!1})}on($,I){this.listeners[$].push(I)}removeListener($,I){let G=this.listeners[$],V=G.indexOf(I);if(V===-1)return;if(V===0&&G.length===1)G.length=0;else G.splice(V,1)}emit($,I,G){if(this.emitted[$])return!1;this.emitted[$]=!0;let V=!1;for(let S of this.listeners[$])V=S(I,G)===!0||V;if($==="exit")V=this.emit("afterExit",I,G)||V;return V}}class M1{}var E9=($)=>{return{onExit(I,G){return $.onExit(I,G)},load(){return $.load()},unload(){return $.unload()}}};class z2 extends M1{onExit(){return()=>{}}load(){}unload(){}}class y2 extends M1{#M=S1.platform==="win32"?"SIGINT":"SIGHUP";#I=new j2;#$;#V;#S;#q={};#G=!1;constructor($){super();this.#$=$,this.#q={};for(let I of c)this.#q[I]=()=>{let G=this.#$.listeners(I),{count:V}=this.#I,S=$;if(typeof S.__signal_exit_emitter__==="object"&&typeof S.__signal_exit_emitter__.count==="number")V+=S.__signal_exit_emitter__.count;if(G.length===V){this.unload();let M=this.#I.emit("exit",null,I),q=I==="SIGHUP"?this.#M:I;if(!M)$.kill($.pid,q)}};this.#S=$.reallyExit,this.#V=$.emit}onExit($,I){if(!L$(this.#$))return()=>{};if(this.#G===!1)this.load();let G=I?.alwaysLast?"afterExit":"exit";return this.#I.on(G,$),()=>{if(this.#I.removeListener(G,$),this.#I.listeners.exit.length===0&&this.#I.listeners.afterExit.length===0)this.unload()}}load(){if(this.#G)return;this.#G=!0,this.#I.count+=1;for(let $ of c)try{let I=this.#q[$];if(I)this.#$.on($,I)}catch(I){}this.#$.emit=($,...I)=>{return this.#J($,...I)},this.#$.reallyExit=($)=>{return this.#H($)}}unload(){if(!this.#G)return;this.#G=!1,c.forEach(($)=>{let I=this.#q[$];if(!I)throw Error("Listener not defined for signal: "+$);try{this.#$.removeListener($,I)}catch(G){}}),this.#$.emit=this.#V,this.#$.reallyExit=this.#S,this.#I.count-=1}#H($){if(!L$(this.#$))return 0;return this.#$.exitCode=$||0,this.#I.emit("exit",this.#$.exitCode,null),this.#S.call(this.#$,this.#$.exitCode)}#J($,...I){let G=this.#V;if($==="exit"&&L$(this.#$)){if(typeof I[0]==="number")this.#$.exitCode=I[0];let V=G.call(this.#$,$,...I);return this.#I.emit("exit",this.#$.exitCode,null),V}else return G.call(this.#$,$,...I)}}var S1=globalThis.process,{onExit:_2,load:T5,unload:N5}=E9(L$(S1)?new y2(S1):new z2);var C9=5000,O2=($,I="SIGTERM",G={})=>{let V=$(I);return m9($,I,G,V),V},m9=($,I,G,V)=>{if(!h9(I,G,V))return;let S=n9(G),M=setTimeout(()=>{$("SIGKILL")},S);if(M.unref)M.unref()},h9=($,{forceKillAfterTimeout:I},G)=>k9($)&&I!==!1&&G,k9=($)=>$===c9.constants.signals.SIGTERM||typeof $==="string"&&$.toUpperCase()==="SIGTERM",n9=({forceKillAfterTimeout:$=!0})=>{if($===!0)return C9;if(!Number.isFinite($)||$<0)throw TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${$}\` (${typeof $})`);return $},v2=($,I)=>{if($.kill())I.isCanceled=!0},F9=($,I,G)=>{$.kill(I),G(Object.assign(Error("Timed out"),{timedOut:!0,signal:I}))},x2=($,{timeout:I,killSignal:G="SIGTERM"},V)=>{if(I===0||I===void 0)return V;let S,M=new Promise((H,Z)=>{S=setTimeout(()=>{F9($,G,Z)},I)}),q=V.finally(()=>{clearTimeout(S)});return Promise.race([M,q])},w2=({timeout:$})=>{if($!==void 0&&(!Number.isFinite($)||$<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${$}\` (${typeof $})`)},P2=async($,{cleanup:I,detached:G},V)=>{if(!I||G)return V;let S=_2(()=>{$.kill()});return V.finally(()=>{S()})};import{createWriteStream as u9}from"node:fs";import{ChildProcess as f9}from"node:child_process";function R$($){return $!==null&&typeof $==="object"&&typeof $.pipe==="function"}function H1($){return R$($)&&$.writable!==!1&&typeof $._write==="function"&&typeof $._writableState==="object"}var g9=($)=>$ instanceof f9&&typeof $.then==="function",J1=($,I,G)=>{if(typeof G==="string")return $[I].pipe(u9(G)),$;if(H1(G))return $[I].pipe(G),$;if(!g9(G))throw TypeError("The second argument must be a string, a stream or an Execa child process.");if(!H1(G.stdin))throw TypeError("The target child process's stdin must be available.");return $[I].pipe(G.stdin),G},E2=($)=>{if($.stdout!==null)$.pipeStdout=J1.bind(void 0,$,"stdout");if($.stderr!==null)$.pipeStderr=J1.bind(void 0,$,"stderr");if($.all!==void 0)$.pipeAll=J1.bind(void 0,$,"all")};import{createReadStream as H3,readFileSync as J3}from"node:fs";import{setTimeout as Z3}from"node:timers/promises";var o=async($,{init:I,convertChunk:G,getSize:V,truncateChunk:S,addChunk:M,getFinalChunk:q,finalize:H},{maxBuffer:Z=Number.POSITIVE_INFINITY}={})=>{if(!D9($))throw Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");let J=I();J.length=0;try{for await(let X of $){let Q=d9(X),W=G[Q](X,J);m2({convertedChunk:W,state:J,getSize:V,truncateChunk:S,addChunk:M,maxBuffer:Z})}return i9({state:J,convertChunk:G,getSize:V,truncateChunk:S,addChunk:M,getFinalChunk:q,maxBuffer:Z}),H(J)}catch(X){throw X.bufferedData=H(J),X}},i9=({state:$,getSize:I,truncateChunk:G,addChunk:V,getFinalChunk:S,maxBuffer:M})=>{let q=S($);if(q!==void 0)m2({convertedChunk:q,state:$,getSize:I,truncateChunk:G,addChunk:V,maxBuffer:M})},m2=({convertedChunk:$,state:I,getSize:G,truncateChunk:V,addChunk:S,maxBuffer:M})=>{let q=G($),H=I.length+q;if(H<=M){c2($,I,S,H);return}let Z=V($,M-I.length);if(Z!==void 0)c2(Z,I,S,M);throw new Z1},c2=($,I,G,V)=>{I.contents=G($,I,V),I.length=V},D9=($)=>typeof $==="object"&&$!==null&&typeof $[Symbol.asyncIterator]==="function",d9=($)=>{let I=typeof $;if(I==="string")return"string";if(I!=="object"||$===null)return"others";if(globalThis.Buffer?.isBuffer($))return"buffer";let G=C2.call($);if(G==="[object ArrayBuffer]")return"arrayBuffer";if(G==="[object DataView]")return"dataView";if(Number.isInteger($.byteLength)&&Number.isInteger($.byteOffset)&&C2.call($.buffer)==="[object ArrayBuffer]")return"typedArray";return"others"},{toString:C2}=Object.prototype;class Z1 extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}var U1=($)=>$,X1=()=>{return},Q1=({contents:$})=>$,b$=($)=>{throw Error(`Streams in object mode are not supported: ${String($)}`)},B$=($)=>$.length;async function W1($,I){return o($,$3,I)}var t9=()=>({contents:new ArrayBuffer(0)}),l9=($)=>p9.encode($),p9=new TextEncoder,h2=($)=>new Uint8Array($),k2=($)=>new Uint8Array($.buffer,$.byteOffset,$.byteLength),r9=($,I)=>$.slice(0,I),o9=($,{contents:I,length:G},V)=>{let S=u2()?s9(I,V):a9(I,V);return new Uint8Array(S).set($,G),S},a9=($,I)=>{if(I<=$.byteLength)return $;let G=new ArrayBuffer(F2(I));return new Uint8Array(G).set(new Uint8Array($),0),G},s9=($,I)=>{if(I<=$.maxByteLength)return $.resize(I),$;let G=new ArrayBuffer(I,{maxByteLength:F2(I)});return new Uint8Array(G).set(new Uint8Array($),0),G},F2=($)=>n2**Math.ceil(Math.log($)/Math.log(n2)),n2=2,e9=({contents:$,length:I})=>u2()?$:$.slice(0,I),u2=()=>("resize"in ArrayBuffer.prototype),$3={init:t9,convertChunk:{string:l9,buffer:h2,arrayBuffer:h2,dataView:k2,typedArray:k2,others:b$},getSize:B$,truncateChunk:r9,addChunk:o9,getFinalChunk:X1,finalize:e9};async function K$($,I){if(!("Buffer"in globalThis))throw Error("getStreamAsBuffer() is only supported in Node.js");try{return f2(await W1($,I))}catch(G){if(G.bufferedData!==void 0)G.bufferedData=f2(G.bufferedData);throw G}}var f2=($)=>globalThis.Buffer.from($);async function Y1($,I){return o($,S3,I)}var I3=()=>({contents:"",textDecoder:new TextDecoder}),A$=($,{textDecoder:I})=>I.decode($,{stream:!0}),G3=($,{contents:I})=>I+$,q3=($,I)=>$.slice(0,I),V3=({textDecoder:$})=>{let I=$.decode();return I===""?void 0:I},S3={init:I3,convertChunk:{string:U1,buffer:A$,arrayBuffer:A$,dataView:A$,typedArray:A$,others:b$},getSize:B$,truncateChunk:q3,addChunk:G3,getFinalChunk:V3,finalize:Q1};var D2=m(i2(),1),d2=($)=>{if($!==void 0)throw TypeError("The `input` and `inputFile` options cannot be both set.")},U3=({input:$,inputFile:I})=>{if(typeof I!=="string")return $;return d2($),J3(I)},t2=($)=>{let I=U3($);if(R$(I))throw TypeError("The `input` option cannot be a stream in sync mode");return I},X3=({input:$,inputFile:I})=>{if(typeof I!=="string")return $;return d2($),H3(I)},l2=($,I)=>{let G=X3(I);if(G===void 0)return;if(R$(G))G.pipe($.stdin);else $.stdin.end(G)},p2=($,{all:I})=>{if(!I||!$.stdout&&!$.stderr)return;let G=D2.default();if($.stdout)G.add($.stdout);if($.stderr)G.add($.stderr);return G},L1=async($,I)=>{if(!$||I===void 0)return;await Z3(0),$.destroy();try{return await I}catch(G){return G.bufferedData}},R1=($,{encoding:I,buffer:G,maxBuffer:V})=>{if(!$||!G)return;if(I==="utf8"||I==="utf-8")return Y1($,{maxBuffer:V});if(I===null||I==="buffer")return K$($,{maxBuffer:V});return Q3($,V,I)},Q3=async($,I,G)=>{return(await K$($,{maxBuffer:I})).toString(G)},r2=async({stdout:$,stderr:I,all:G},{encoding:V,buffer:S,maxBuffer:M},q)=>{let H=R1($,{encoding:V,buffer:S,maxBuffer:M}),Z=R1(I,{encoding:V,buffer:S,maxBuffer:M}),J=R1(G,{encoding:V,buffer:S,maxBuffer:M*2});try{return await Promise.all([q,H,Z,J])}catch(X){return Promise.all([{error:X,signal:X.signal,timedOut:X.timedOut},L1($,H),L1(I,Z),L1(G,J)])}};var W3=(async()=>{})().constructor.prototype,Y3=["then","catch","finally"].map(($)=>[$,Reflect.getOwnPropertyDescriptor(W3,$)]),b1=($,I)=>{for(let[G,V]of Y3){let S=typeof I==="function"?(...M)=>Reflect.apply(V.value,I(),M):V.value.bind(I);Reflect.defineProperty($,G,{...V,value:S})}},o2=($)=>new Promise((I,G)=>{if($.on("exit",(V,S)=>{I({exitCode:V,signal:S})}),$.on("error",(V)=>{G(V)}),$.stdin)$.stdin.on("error",(V)=>{G(V)})});import{Buffer as L3}from"node:buffer";import{ChildProcess as R3}from"node:child_process";var e2=($,I=[])=>{if(!Array.isArray(I))return[$];return[$,...I]},b3=/^[\w.-]+$/,B3=($)=>{if(typeof $!=="string"||b3.test($))return $;return`"${$.replaceAll('"',"\\\"")}"`},B1=($,I)=>e2($,I).join(" "),K1=($,I)=>e2($,I).map((G)=>B3(G)).join(" "),K3=/ +/g;var a2=($)=>{let I=typeof $;if(I==="string")return $;if(I==="number")return String($);if(I==="object"&&$!==null&&!($ instanceof R3)&&"stdout"in $){let G=typeof $.stdout;if(G==="string")return $.stdout;if(L3.isBuffer($.stdout))return $.stdout.toString();throw TypeError(`Unexpected "${G}" stdout in template expression`)}throw TypeError(`Unexpected "${I}" in template expression`)},s2=($,I,G)=>G||$.length===0||I.length===0?[...$,...I]:[...$.slice(0,-1),`${$.at(-1)}${I[0]}`,...I.slice(1)],A3=({templates:$,expressions:I,tokens:G,index:V,template:S})=>{let M=S??$.raw[V],q=M.split(K3).filter(Boolean),H=s2(G,q,M.startsWith(" "));if(V===I.length)return H;let Z=I[V],J=Array.isArray(Z)?Z.map((X)=>a2(X)):[a2(Z)];return s2(H,J,M.endsWith(" "))},A1=($,I)=>{let G=[];for(let[V,S]of $.entries())G=A3({templates:$,expressions:I,tokens:G,index:V,template:S});return G};import{debuglog as T3}from"node:util";import N3 from"node:process";var $I=T3("execa").enabled,T$=($,I)=>String($).padStart(I,"0"),j3=()=>{let $=new Date;return`${T$($.getHours(),2)}:${T$($.getMinutes(),2)}:${T$($.getSeconds(),2)}.${T$($.getMilliseconds(),3)}`},T1=($,{verbose:I})=>{if(!I)return;N3.stderr.write(`[${j3()}] ${$}
|
|
314
|
-
`)};var
|
|
315
|
-
`)}async function
|
|
540
|
+
`.charCodeAt(),I=typeof $==="string"?"\r":"\r".charCodeAt();if($[$.length-1]===b)$=$.slice(0,-1);if($[$.length-1]===I)$=$.slice(0,-1);return $}import n$ from"node:process";import r from"node:path";import{fileURLToPath as R0}from"node:url";function U$($={}){let{env:b=process.env,platform:I=process.platform}=$;if(I!=="win32")return"PATH";return Object.keys(b).reverse().find((G)=>G.toUpperCase()==="PATH")||"Path"}var $y=({cwd:$=n$.cwd(),path:b=n$.env[U$()],preferLocal:I=!0,execPath:G=n$.execPath,addExecPath:i=!0}={})=>{let S=$ instanceof URL?R0($):$,y=r.resolve(S),q=[];if(I)by(q,y);if(i)Iy(q,G,y);return[...q,b].join(r.delimiter)},by=($,b)=>{let I;while(I!==b)$.push(r.join(b,"node_modules/.bin")),I=b,b=r.resolve(b,"..")},Iy=($,b,I)=>{let G=b instanceof URL?R0(b):b;$.push(r.resolve(I,G,".."))},L0=({env:$=n$.env,...b}={})=>{$={...$};let I=U$({env:$});return b.path=$[I],$[I]=$y(b),$};var yy=($,b,I,G)=>{if(I==="length"||I==="prototype")return;if(I==="arguments"||I==="caller")return;let i=Object.getOwnPropertyDescriptor($,I),S=Object.getOwnPropertyDescriptor(b,I);if(!Gy(i,S)&&G)return;Object.defineProperty($,I,S)},Gy=function($,b){return $===void 0||$.configurable||$.writable===b.writable&&$.enumerable===b.enumerable&&$.configurable===b.configurable&&($.writable||$.value===b.value)},iy=($,b)=>{let I=Object.getPrototypeOf(b);if(I===Object.getPrototypeOf($))return;Object.setPrototypeOf($,I)},Sy=($,b)=>`/* Wrapped ${$}*/
|
|
541
|
+
${b}`,qy=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),cy=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),My=($,b,I)=>{let G=I===""?"":`with ${I.trim()}() `,i=Sy.bind(null,G,b.toString());Object.defineProperty(i,"name",cy),Object.defineProperty($,"toString",{...qy,value:i})};function e$($,b,{ignoreNonConfigurable:I=!1}={}){let{name:G}=$;for(let i of Reflect.ownKeys(b))yy($,b,i,I);return iy($,b),My($,b,G),$}var R$=new WeakMap,H0=($,b={})=>{if(typeof $!=="function")throw TypeError("Expected a function");let I,G=0,i=$.displayName||$.name||"<anonymous>",S=function(...y){if(R$.set(S,++G),G===1)I=$.apply(this,y),$=null;else if(b.throw===!0)throw Error(`Function \`${i}\` can only be called once`);return I};return e$(S,$),R$.set(S,G),S};H0.callCount=($)=>{if(!R$.has($))throw Error(`The given function \`${$.name}\` is not wrapped by the \`onetime\` package`);return R$.get($)};var J0=H0;import Ay from"node:process";import{constants as Ry}from"node:os";var Q0=()=>{let $=$1-Z0+1;return Array.from({length:$},Vy)},Vy=($,b)=>({name:`SIGRT${b+1}`,number:Z0+b,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Z0=34,$1=64;import{constants as Uy}from"node:os";var A0=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var b1=()=>{let $=Q0();return[...A0,...$].map(ny)},ny=({name:$,number:b,description:I,action:G,forced:i=!1,standard:S})=>{let{signals:{[$]:y}}=Uy,q=y!==void 0;return{name:$,number:q?y:b,description:I,supported:q,action:G,forced:i,standard:S}};var Ly=()=>{let $=b1();return Object.fromEntries($.map(Hy))},Hy=({name:$,number:b,description:I,supported:G,action:i,forced:S,standard:y})=>[$,{name:$,number:b,description:I,supported:G,action:i,forced:S,standard:y}],T0=Ly(),Jy=()=>{let $=b1(),b=$1+1,I=Array.from({length:b},(G,i)=>Qy(i,$));return Object.assign({},...I)},Qy=($,b)=>{let I=Zy($,b);if(I===void 0)return{};let{name:G,description:i,supported:S,action:y,forced:q,standard:V}=I;return{[$]:{name:G,number:$,description:i,supported:S,action:y,forced:q,standard:V}}},Zy=($,b)=>{let I=b.find(({name:G})=>Ry.signals[G]===$);if(I!==void 0)return I;return b.find((G)=>G.number===$)},SS=Jy();var Ty=({timedOut:$,timeout:b,errorCode:I,signal:G,signalDescription:i,exitCode:S,isCanceled:y})=>{if($)return`timed out after ${b} milliseconds`;if(y)return"was canceled";if(I!==void 0)return`failed with ${I}`;if(G!==void 0)return`was killed with ${G} (${i})`;if(S!==void 0)return`failed with exit code ${S}`;return"failed"},D=({stdout:$,stderr:b,all:I,error:G,signal:i,exitCode:S,command:y,escapedCommand:q,timedOut:V,isCanceled:M,killed:U,parsed:{options:{timeout:n,cwd:R=Ay.cwd()}}})=>{S=S===null?void 0:S,i=i===null?void 0:i;let T=i===void 0?void 0:T0[i].description,X=G&&G.code,P=`Command ${Ty({timedOut:V,timeout:n,errorCode:X,signal:i,signalDescription:T,exitCode:S,isCanceled:M})}: ${y}`,s=Object.prototype.toString.call(G)==="[object Error]",e=s?`${P}
|
|
542
|
+
${G.message}`:P,$$=[e,b,$].filter(Boolean).join(`
|
|
543
|
+
`);if(s)G.originalMessage=G.message,G.message=$$;else G=Error($$);if(G.shortMessage=e,G.command=y,G.escapedCommand=q,G.exitCode=S,G.signal=i,G.signalDescription=T,G.stdout=$,G.stderr=b,G.cwd=R,I!==void 0)G.all=I;if("bufferedData"in G)delete G.bufferedData;return G.failed=!0,G.timedOut=Boolean(V),G.isCanceled=M,G.killed=U&&!V,G};var L$=["stdin","stdout","stderr"],my=($)=>L$.some((b)=>$[b]!==void 0),m0=($)=>{if(!$)return;let{stdio:b}=$;if(b===void 0)return L$.map((G)=>$[G]);if(my($))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${L$.map((G)=>`\`${G}\``).join(", ")}`);if(typeof b==="string")return b;if(!Array.isArray(b))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof b}\``);let I=Math.max(b.length,L$.length);return Array.from({length:I},(G,i)=>b[i])};import Wy from"node:os";var x=[];x.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")x.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")x.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var H$=($)=>!!$&&typeof $==="object"&&typeof $.removeListener==="function"&&typeof $.emit==="function"&&typeof $.reallyExit==="function"&&typeof $.listeners==="function"&&typeof $.kill==="function"&&typeof $.pid==="number"&&typeof $.on==="function",I1=Symbol.for("signal-exit emitter"),y1=globalThis,Xy=Object.defineProperty.bind(Object);class X0{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(y1[I1])return y1[I1];Xy(y1,I1,{value:this,writable:!1,enumerable:!1,configurable:!1})}on($,b){this.listeners[$].push(b)}removeListener($,b){let I=this.listeners[$],G=I.indexOf(b);if(G===-1)return;if(G===0&&I.length===1)I.length=0;else I.splice(G,1)}emit($,b,I){if(this.emitted[$])return!1;this.emitted[$]=!0;let G=!1;for(let i of this.listeners[$])G=i(b,I)===!0||G;if($==="exit")G=this.emit("afterExit",b,I)||G;return G}}class i1{}var zy=($)=>{return{onExit(b,I){return $.onExit(b,I)},load(){return $.load()},unload(){return $.unload()}}};class z0 extends i1{onExit(){return()=>{}}load(){}unload(){}}class W0 extends i1{#S=G1.platform==="win32"?"SIGINT":"SIGHUP";#b=new X0;#$;#G;#i;#y={};#I=!1;constructor($){super();this.#$=$,this.#y={};for(let b of x)this.#y[b]=()=>{let I=this.#$.listeners(b),{count:G}=this.#b,i=$;if(typeof i.__signal_exit_emitter__==="object"&&typeof i.__signal_exit_emitter__.count==="number")G+=i.__signal_exit_emitter__.count;if(I.length===G){this.unload();let S=this.#b.emit("exit",null,b),y=b==="SIGHUP"?this.#S:b;if(!S)$.kill($.pid,y)}};this.#i=$.reallyExit,this.#G=$.emit}onExit($,b){if(!H$(this.#$))return()=>{};if(this.#I===!1)this.load();let I=b?.alwaysLast?"afterExit":"exit";return this.#b.on(I,$),()=>{if(this.#b.removeListener(I,$),this.#b.listeners.exit.length===0&&this.#b.listeners.afterExit.length===0)this.unload()}}load(){if(this.#I)return;this.#I=!0,this.#b.count+=1;for(let $ of x)try{let b=this.#y[$];if(b)this.#$.on($,b)}catch(b){}this.#$.emit=($,...b)=>{return this.#c($,...b)},this.#$.reallyExit=($)=>{return this.#q($)}}unload(){if(!this.#I)return;this.#I=!1,x.forEach(($)=>{let b=this.#y[$];if(!b)throw Error("Listener not defined for signal: "+$);try{this.#$.removeListener($,b)}catch(I){}}),this.#$.emit=this.#G,this.#$.reallyExit=this.#i,this.#b.count-=1}#q($){if(!H$(this.#$))return 0;return this.#$.exitCode=$||0,this.#b.emit("exit",this.#$.exitCode,null),this.#i.call(this.#$,this.#$.exitCode)}#c($,...b){let I=this.#G;if($==="exit"&&H$(this.#$)){if(typeof b[0]==="number")this.#$.exitCode=b[0];let G=I.call(this.#$,$,...b);return this.#b.emit("exit",this.#$.exitCode,null),G}else return I.call(this.#$,$,...b)}}var G1=globalThis.process,{onExit:K0,load:LS,unload:HS}=zy(H$(G1)?new W0(G1):new z0);var Ky=5000,B0=($,b="SIGTERM",I={})=>{let G=$(b);return By($,b,I,G),G},By=($,b,I,G)=>{if(!Yy(b,I,G))return;let i=jy(I),S=setTimeout(()=>{$("SIGKILL")},i);if(S.unref)S.unref()},Yy=($,{forceKillAfterTimeout:b},I)=>Ny($)&&b!==!1&&I,Ny=($)=>$===Wy.constants.signals.SIGTERM||typeof $==="string"&&$.toUpperCase()==="SIGTERM",jy=({forceKillAfterTimeout:$=!0})=>{if($===!0)return Ky;if(!Number.isFinite($)||$<0)throw TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${$}\` (${typeof $})`);return $},Y0=($,b)=>{if($.kill())b.isCanceled=!0},wy=($,b,I)=>{$.kill(b),I(Object.assign(Error("Timed out"),{timedOut:!0,signal:b}))},N0=($,{timeout:b,killSignal:I="SIGTERM"},G)=>{if(b===0||b===void 0)return G;let i,S=new Promise((q,V)=>{i=setTimeout(()=>{wy($,I,V)},b)}),y=G.finally(()=>{clearTimeout(i)});return Promise.race([S,y])},j0=({timeout:$})=>{if($!==void 0&&(!Number.isFinite($)||$<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${$}\` (${typeof $})`)},w0=async($,{cleanup:b,detached:I},G)=>{if(!b||I)return G;let i=K0(()=>{$.kill()});return G.finally(()=>{i()})};import{createWriteStream as _y}from"node:fs";import{ChildProcess as vy}from"node:child_process";function J$($){return $!==null&&typeof $==="object"&&typeof $.pipe==="function"}function S1($){return J$($)&&$.writable!==!1&&typeof $._write==="function"&&typeof $._writableState==="object"}var Oy=($)=>$ instanceof vy&&typeof $.then==="function",q1=($,b,I)=>{if(typeof I==="string")return $[b].pipe(_y(I)),$;if(S1(I))return $[b].pipe(I),$;if(!Oy(I))throw TypeError("The second argument must be a string, a stream or an Execa child process.");if(!S1(I.stdin))throw TypeError("The target child process's stdin must be available.");return $[b].pipe(I.stdin),I},_0=($)=>{if($.stdout!==null)$.pipeStdout=q1.bind(void 0,$,"stdout");if($.stderr!==null)$.pipeStderr=q1.bind(void 0,$,"stderr");if($.all!==void 0)$.pipeAll=q1.bind(void 0,$,"all")};import{createReadStream as sy,readFileSync as ey}from"node:fs";import{setTimeout as $G}from"node:timers/promises";var o=async($,{init:b,convertChunk:I,getSize:G,truncateChunk:i,addChunk:S,getFinalChunk:y,finalize:q},{maxBuffer:V=Number.POSITIVE_INFINITY}={})=>{if(!Py($))throw Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");let M=b();M.length=0;try{for await(let U of $){let n=fy(U),R=I[n](U,M);x0({convertedChunk:R,state:M,getSize:G,truncateChunk:i,addChunk:S,maxBuffer:V})}return xy({state:M,convertChunk:I,getSize:G,truncateChunk:i,addChunk:S,getFinalChunk:y,maxBuffer:V}),q(M)}catch(U){throw U.bufferedData=q(M),U}},xy=({state:$,getSize:b,truncateChunk:I,addChunk:G,getFinalChunk:i,maxBuffer:S})=>{let y=i($);if(y!==void 0)x0({convertedChunk:y,state:$,getSize:b,truncateChunk:I,addChunk:G,maxBuffer:S})},x0=({convertedChunk:$,state:b,getSize:I,truncateChunk:G,addChunk:i,maxBuffer:S})=>{let y=I($),q=b.length+y;if(q<=S){v0($,b,i,q);return}let V=G($,S-b.length);if(V!==void 0)v0(V,b,i,S);throw new c1},v0=($,b,I,G)=>{b.contents=I($,b,G),b.length=G},Py=($)=>typeof $==="object"&&$!==null&&typeof $[Symbol.asyncIterator]==="function",fy=($)=>{let b=typeof $;if(b==="string")return"string";if(b!=="object"||$===null)return"others";if(globalThis.Buffer?.isBuffer($))return"buffer";let I=O0.call($);if(I==="[object ArrayBuffer]")return"arrayBuffer";if(I==="[object DataView]")return"dataView";if(Number.isInteger($.byteLength)&&Number.isInteger($.byteOffset)&&O0.call($.buffer)==="[object ArrayBuffer]")return"typedArray";return"others"},{toString:O0}=Object.prototype;class c1 extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}var M1=($)=>$,V1=()=>{return},U1=({contents:$})=>$,Q$=($)=>{throw Error(`Streams in object mode are not supported: ${String($)}`)},Z$=($)=>$.length;async function n1($,b){return o($,ly,b)}var ty=()=>({contents:new ArrayBuffer(0)}),hy=($)=>Ey.encode($),Ey=new TextEncoder,P0=($)=>new Uint8Array($),f0=($)=>new Uint8Array($.buffer,$.byteOffset,$.byteLength),Cy=($,b)=>$.slice(0,b),ky=($,{contents:b,length:I},G)=>{let i=E0()?gy(b,G):uy(b,G);return new Uint8Array(i).set($,I),i},uy=($,b)=>{if(b<=$.byteLength)return $;let I=new ArrayBuffer(h0(b));return new Uint8Array(I).set(new Uint8Array($),0),I},gy=($,b)=>{if(b<=$.maxByteLength)return $.resize(b),$;let I=new ArrayBuffer(b,{maxByteLength:h0(b)});return new Uint8Array(I).set(new Uint8Array($),0),I},h0=($)=>t0**Math.ceil(Math.log($)/Math.log(t0)),t0=2,Fy=({contents:$,length:b})=>E0()?$:$.slice(0,b),E0=()=>("resize"in ArrayBuffer.prototype),ly={init:ty,convertChunk:{string:hy,buffer:P0,arrayBuffer:P0,dataView:f0,typedArray:f0,others:Q$},getSize:Z$,truncateChunk:Cy,addChunk:ky,getFinalChunk:V1,finalize:Fy};async function A$($,b){if(!("Buffer"in globalThis))throw Error("getStreamAsBuffer() is only supported in Node.js");try{return C0(await n1($,b))}catch(I){if(I.bufferedData!==void 0)I.bufferedData=C0(I.bufferedData);throw I}}var C0=($)=>globalThis.Buffer.from($);async function R1($,b){return o($,oy,b)}var dy=()=>({contents:"",textDecoder:new TextDecoder}),T$=($,{textDecoder:b})=>b.decode($,{stream:!0}),ay=($,{contents:b})=>b+$,ry=($,b)=>$.slice(0,b),Dy=({textDecoder:$})=>{let b=$.decode();return b===""?void 0:b},oy={init:dy,convertChunk:{string:M1,buffer:T$,arrayBuffer:T$,dataView:T$,typedArray:T$,others:Q$},getSize:Z$,truncateChunk:ry,addChunk:ay,getFinalChunk:Dy,finalize:U1};var g0=f(u0(),1),F0=($)=>{if($!==void 0)throw TypeError("The `input` and `inputFile` options cannot be both set.")},bG=({input:$,inputFile:b})=>{if(typeof b!=="string")return $;return F0($),ey(b)},l0=($)=>{let b=bG($);if(J$(b))throw TypeError("The `input` option cannot be a stream in sync mode");return b},IG=({input:$,inputFile:b})=>{if(typeof b!=="string")return $;return F0($),sy(b)},d0=($,b)=>{let I=IG(b);if(I===void 0)return;if(J$(I))I.pipe($.stdin);else $.stdin.end(I)},a0=($,{all:b})=>{if(!b||!$.stdout&&!$.stderr)return;let I=g0.default();if($.stdout)I.add($.stdout);if($.stderr)I.add($.stderr);return I},L1=async($,b)=>{if(!$||b===void 0)return;await $G(0),$.destroy();try{return await b}catch(I){return I.bufferedData}},H1=($,{encoding:b,buffer:I,maxBuffer:G})=>{if(!$||!I)return;if(b==="utf8"||b==="utf-8")return R1($,{maxBuffer:G});if(b===null||b==="buffer")return A$($,{maxBuffer:G});return yG($,G,b)},yG=async($,b,I)=>{return(await A$($,{maxBuffer:b})).toString(I)},r0=async({stdout:$,stderr:b,all:I},{encoding:G,buffer:i,maxBuffer:S},y)=>{let q=H1($,{encoding:G,buffer:i,maxBuffer:S}),V=H1(b,{encoding:G,buffer:i,maxBuffer:S}),M=H1(I,{encoding:G,buffer:i,maxBuffer:S*2});try{return await Promise.all([y,q,V,M])}catch(U){return Promise.all([{error:U,signal:U.signal,timedOut:U.timedOut},L1($,q),L1(b,V),L1(I,M)])}};var GG=(async()=>{})().constructor.prototype,iG=["then","catch","finally"].map(($)=>[$,Reflect.getOwnPropertyDescriptor(GG,$)]),J1=($,b)=>{for(let[I,G]of iG){let i=typeof b==="function"?(...S)=>Reflect.apply(G.value,b(),S):G.value.bind(b);Reflect.defineProperty($,I,{...G,value:i})}},D0=($)=>new Promise((b,I)=>{if($.on("exit",(G,i)=>{b({exitCode:G,signal:i})}),$.on("error",(G)=>{I(G)}),$.stdin)$.stdin.on("error",(G)=>{I(G)})});import{Buffer as SG}from"node:buffer";import{ChildProcess as qG}from"node:child_process";var s0=($,b=[])=>{if(!Array.isArray(b))return[$];return[$,...b]},cG=/^[\w.-]+$/,MG=($)=>{if(typeof $!=="string"||cG.test($))return $;return`"${$.replaceAll('"',"\\\"")}"`},Q1=($,b)=>s0($,b).join(" "),Z1=($,b)=>s0($,b).map((I)=>MG(I)).join(" "),VG=/ +/g;var o0=($)=>{let b=typeof $;if(b==="string")return $;if(b==="number")return String($);if(b==="object"&&$!==null&&!($ instanceof qG)&&"stdout"in $){let I=typeof $.stdout;if(I==="string")return $.stdout;if(SG.isBuffer($.stdout))return $.stdout.toString();throw TypeError(`Unexpected "${I}" stdout in template expression`)}throw TypeError(`Unexpected "${b}" in template expression`)},p0=($,b,I)=>I||$.length===0||b.length===0?[...$,...b]:[...$.slice(0,-1),`${$.at(-1)}${b[0]}`,...b.slice(1)],UG=({templates:$,expressions:b,tokens:I,index:G,template:i})=>{let S=i??$.raw[G],y=S.split(VG).filter(Boolean),q=p0(I,y,S.startsWith(" "));if(G===b.length)return q;let V=b[G],M=Array.isArray(V)?V.map((U)=>o0(U)):[o0(V)];return p0(q,M,S.endsWith(" "))},A1=($,b)=>{let I=[];for(let[G,i]of $.entries())I=UG({templates:$,expressions:b,tokens:I,index:G,template:i});return I};import{debuglog as nG}from"node:util";import RG from"node:process";var e0=nG("execa").enabled,m$=($,b)=>String($).padStart(b,"0"),LG=()=>{let $=new Date;return`${m$($.getHours(),2)}:${m$($.getMinutes(),2)}:${m$($.getSeconds(),2)}.${m$($.getMilliseconds(),3)}`},T1=($,{verbose:b})=>{if(!b)return;RG.stderr.write(`[${LG()}] ${$}
|
|
544
|
+
`)};var QG=1e8,ZG=({env:$,extendEnv:b,preferLocal:I,localDir:G,execPath:i})=>{let S=b?{...X$.env,...$}:$;if(I)return L0({env:S,cwd:G,execPath:i});return S},I2=($,b,I={})=>{let G=b2.default._parse($,b,I);if($=G.command,b=G.args,I=G.options,I={maxBuffer:QG,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:I.cwd||X$.cwd(),execPath:X$.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:e0,...I},I.env=ZG(I),I.stdio=m0(I),X$.platform==="win32"&&JG.basename($,".exe")==="cmd")b.unshift("/q");return{file:$,args:b,options:I,parsed:G}},p=($,b,I)=>{if(typeof b!=="string"&&!HG.isBuffer(b))return I===void 0?void 0:"";if($.stripFinalNewline)return s$(b);return b};function z$($,b,I){let G=I2($,b,I),i=Q1($,b),S=Z1($,b);T1(S,G.options),j0(G.options);let y;try{y=m1.spawn(G.file,G.args,G.options)}catch(T){let X=new m1.ChildProcess,j=Promise.reject(D({error:T,stdout:"",stderr:"",all:"",command:i,escapedCommand:S,parsed:G,timedOut:!1,isCanceled:!1,killed:!1}));return J1(X,j),X}let q=D0(y),V=N0(y,G.options,q),M=w0(y,G.options,V),U={isCanceled:!1};y.kill=B0.bind(null,y.kill.bind(y)),y.cancel=Y0.bind(null,y,U);let R=J0(async()=>{let[{error:T,exitCode:X,signal:j,timedOut:P},s,e,$$]=await r0(y,G.options,M),X1=p(G.options,s),z1=p(G.options,e),W1=p(G.options,$$);if(T||X!==0||j!==null){let K1=D({error:T,exitCode:X,signal:j,stdout:X1,stderr:z1,all:W1,command:i,escapedCommand:S,parsed:G,timedOut:P,isCanceled:U.isCanceled||(G.options.signal?G.options.signal.aborted:!1),killed:y.killed});if(!G.options.reject)return K1;throw K1}return{command:i,escapedCommand:S,exitCode:0,stdout:X1,stderr:z1,all:W1,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return d0(y,G.options),y.all=a0(y,G.options),_0(y),J1(y,R),y}function AG($,b,I){let G=I2($,b,I),i=Q1($,b),S=Z1($,b);T1(S,G.options);let y=l0(G.options),q;try{q=m1.spawnSync(G.file,G.args,{...G.options,input:y})}catch(U){throw D({error:U,stdout:"",stderr:"",all:"",command:i,escapedCommand:S,parsed:G,timedOut:!1,isCanceled:!1,killed:!1})}let V=p(G.options,q.stdout,q.error),M=p(G.options,q.stderr,q.error);if(q.error||q.status!==0||q.signal!==null){let U=D({stdout:V,stderr:M,error:q.error,signal:q.signal,exitCode:q.status,command:i,escapedCommand:S,parsed:G,timedOut:q.error&&q.error.code==="ETIMEDOUT",isCanceled:!1,killed:q.signal!==null});if(!G.options.reject)return U;throw U}return{command:i,escapedCommand:S,exitCode:0,stdout:V,stderr:M,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}var TG=({input:$,inputFile:b,stdio:I})=>$===void 0&&b===void 0&&I===void 0?{stdin:"inherit"}:{},$2=($={})=>({preferLocal:!0,...TG($),...$});function y2($){function b(I,...G){if(!Array.isArray(I))return y2({...$,...I});let[i,...S]=A1(I,G);return z$(i,S,$2($))}return b.sync=(I,...G)=>{if(!Array.isArray(I))throw TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");let[i,...S]=A1(I,G);return AG(i,S,$2($))},b}var m9=y2();import{readFile as mG,writeFile as XG}from"node:fs/promises";function G2($,b){if(b==="prisma")return"";switch($){case"postgresql":return b==="kysely"?"pg":"postgres";case"mysql":return"mysql2";case"sqlite":return"better-sqlite3"}}async function i2($,b,I,G){let i=[],S=[];switch(b){case"drizzle":i=["drizzle-orm",G2(I,b)],S=["drizzle-kit"];break;case"prisma":i=["@prisma/client"],S=["prisma"];break;case"kysely":i=["kysely",G2(I,b)],S=[];break}let y=$==="npm"?"install":"add",q=$==="npm"?"--save-dev":"-D";if(i.length>0)await z$($,[y,...i],{stdio:"inherit"});if(S.length>0)await z$($,[y,q,...S],{stdio:"inherit"})}async function S2($,b){let G=await mG("package.json","utf-8"),i=JSON.parse(G),S={};switch($){case"drizzle":S={"db:generate":"drizzle-kit generate","db:migrate":"drizzle-kit migrate","db:push":"drizzle-kit push","db:studio":"drizzle-kit studio"};break;case"prisma":S={"db:generate":"prisma generate","db:migrate":"prisma migrate dev","db:push":"prisma db push","db:studio":"prisma studio","db:seed":"prisma db seed"};break;case"kysely":S={"db:migrate":"bun src/lib/db/migrate.ts"};break}i.scripts={...i.scripts,...S},await XG("package.json",JSON.stringify(i,null,2)+`
|
|
545
|
+
`)}async function zG(){console.clear(),e1(L.bold.blue("\uD83D\uDDC4️ ORM Setup CLI v1.0.0"));try{let $=bb();$.start("Analyzing your project...");let b=await Rb();if($.stop("Project analyzed"),m.info(`${L.green("✓")} ${b.hasTypescript?"TypeScript":"JavaScript"} project`),m.info(`${L.green("✓")} Package manager: ${b.packageManager}`),b.srcDir)m.info(`${L.green("✓")} Source directory: ${b.srcDir}/`);if(b.database.url)m.info(`${L.green("✓")} Database: ${b.database.type} (from .env)`);else m.warn(`${L.yellow("!")} No DATABASE_URL found in .env`);if(b.hasDrizzle){if(m.warn(`${L.yellow("⚠")} Drizzle is already set up in this project`),!await l({message:"Continue anyway? (this may overwrite files)",initialValue:!1}))s1("Operation cancelled"),process.exit(0)}let I=await Lb(b),G=Hb(b.srcDir,I.clientPath);switch($.start("Installing dependencies..."),await i2(b.packageManager,I.orm,I.database,I.includeStudio),$.stop("Dependencies installed"),$.start("Generating files..."),I.orm){case"drizzle":await Xb({paths:G,database:I.database,template:I.template,typescript:b.hasTypescript});break;case"prisma":await zb({paths:G,database:I.database,template:I.template});break;case"kysely":await Wb({paths:G,database:I.database,template:I.template});break}if($.stop("Files generated"),$.start("Updating package.json..."),await S2(I.orm,I.database),$.stop("package.json updated"),$b(L.green.bold(`✅ ${I.orm==="drizzle"?"Drizzle":I.orm==="prisma"?"Prisma":"Kysely"} ORM setup complete!`)),console.log(),m.step("Import your database client:"),I.orm==="drizzle")console.log(L.cyan(" import { db } from '@/lib/db'"));else if(I.orm==="prisma")console.log(L.cyan(" import { prisma } from '@/lib/prisma'"));else console.log(L.cyan(" import { db } from '@/lib/db'"));if(console.log(),m.step("Next steps:"),I.orm==="drizzle"){if(console.log(` ${L.gray("1.")} Add DATABASE_URL to .env`),console.log(` ${L.gray("2.")} Run: ${L.cyan("bun db:generate")} (create migration)`),console.log(` ${L.gray("3.")} Run: ${L.cyan("bun db:migrate")} (apply migration)`),I.includeStudio)console.log(` ${L.gray("4.")} Run: ${L.cyan("bun db:studio")} (open database GUI)`)}else if(I.orm==="prisma")console.log(` ${L.gray("1.")} Add DATABASE_URL to .env`),console.log(` ${L.gray("2.")} Run: ${L.cyan("bun db:generate")} (generate client)`),console.log(` ${L.gray("3.")} Run: ${L.cyan("bun db:migrate")} (create & apply migration)`),console.log(` ${L.gray("4.")} Run: ${L.cyan("bun db:studio")} (open Prisma Studio)`);else console.log(` ${L.gray("1.")} Add DATABASE_URL to .env`),console.log(` ${L.gray("2.")} Create migrations in migrations/ folder`),console.log(` ${L.gray("3.")} Run: ${L.cyan("bun db:migrate")} (apply migrations)`);console.log();let i=I.orm==="drizzle"?"https://orm.drizzle.team/docs":I.orm==="prisma"?"https://www.prisma.io/docs":"https://kysely.dev/docs";m.info(`Documentation: ${L.cyan(i)}`)}catch($){if($ instanceof Error)m.error(L.red(`Error: ${$.message}`));process.exit(1)}}zG();
|