@sidgaikwad/orm-setup 2.0.0 → 2.1.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.
@@ -1 +1 @@
1
- {"version":3,"file":"prisma.d.ts","sourceRoot":"","sources":["../../src/generators/prisma.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,eAAe;IACvB,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC5C,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;CAC/D;AAED,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,IAAI,CAAC,CAef"}
1
+ {"version":3,"file":"prisma.d.ts","sourceRoot":"","sources":["../../src/generators/prisma.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,eAAe;IACvB,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC5C,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;CAC/D;AAED,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,IAAI,CAAC,CAmBf"}
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/generators/templates/schemas.ts"],"names":[],"mappings":"AAGA,KAAK,QAAQ,GAAG,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;AAClD,KAAK,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;AAMpE,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GACjB,MAAM,CAiKR;AAMD,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GACjB,MAAM,CAqLR;AAMD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAuF1D"}
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/generators/templates/schemas.ts"],"names":[],"mappings":"AAGA,KAAK,QAAQ,GAAG,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;AAClD,KAAK,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;AAMpE,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GACjB,MAAM,CAiKR;AAMD,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GACjB,MAAM,CAoLR;AAMD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAuF1D"}
package/dist/index.js CHANGED
@@ -1,53 +1,53 @@
1
1
  #!/usr/bin/env bun
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,`
2
+ import{createRequire as V2}from"node:module";var c2=Object.create;var{getPrototypeOf:q2,defineProperty:B1,getOwnPropertyNames:n2}=Object;var M2=Object.prototype.hasOwnProperty;var f=($,b,i)=>{i=$!=null?c2(q2($)):{};let y=b||!$||!$.__esModule?B1(i,"default",{value:$,enumerable:!0}):i;for(let G of n2($))if(!M2.call(y,G))B1(y,G,{get:()=>$[G],enumerable:!0});return y};var z=($,b)=>()=>(b||$((b={exports:{}}).exports,b),b.exports);var v=V2(import.meta.url);var K$=z((Yy,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"},U2={up:($=1)=>"\x1B[S".repeat($),down:($=1)=>"\x1B[T".repeat($)},m2={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:U2,erase:m2,beep:"\x07"}});var Y$=z((Ny,B$)=>{var i$=process||{},N1=i$.argv||[],b$=i$.env||{},R2=!(!!b$.NO_COLOR||N1.includes("--no-color"))&&(!!b$.FORCE_COLOR||N1.includes("--color")||i$.platform==="win32"||(i$.stdout||{}).isTTY&&b$.TERM!=="dumb"||!!b$.CI),L2=($,b,i=$)=>(y)=>{let G=""+y,S=G.indexOf(b,$.length);return~S?$+A2(G,b,i,S)+b:$+G+b},A2=($,b,i,y)=>{let G="",S=0;do G+=$.substring(S,y)+i,S=y+b.length,y=$.indexOf(b,S);while(~y);return G+$.substring(S)},j1=($=R2)=>{let b=$?L2:()=>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((jG,Nb)=>{Nb.exports=Yb;Yb.sync=Yi;var Kb=v("fs");function Bi($,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 y=0;y<i.length;y++){var G=i[y].toLowerCase();if(G&&$.substr(-G.length).toLowerCase()===G)return!0}return!1}function Bb($,b,i){if(!$.isSymbolicLink()&&!$.isFile())return!1;return Bi(b,i)}function Yb($,b,i){Kb.stat($,function(y,G){i(y,y?!1:Bb(G,$,b))})}function Yi($,b){return Bb(Kb.statSync($),$,b)}});var xb=z((vG,Ob)=>{Ob.exports=wb;wb.sync=Ni;var vb=v("fs");function wb($,b,i){vb.stat($,function(y,G){i(y,y?!1:_b(G,b))})}function Ni($,b){return _b(vb.statSync($),b)}function _b($,b){return $.isFile()&&ji($,b)}function ji($,b){var{mode:i,uid:y,gid:G}=$,S=b.uid!==void 0?b.uid:process.getuid&&process.getuid(),I=b.gid!==void 0?b.gid:process.getgid&&process.getgid(),c=parseInt("100",8),M=parseInt("010",8),n=parseInt("001",8),V=c|M,U=i&n||i&M&&G===I||i&c&&y===S||i&V&&S===0;return U}});var fb=z((_G,Pb)=>{var wG=v("fs"),M$;if(process.platform==="win32"||global.TESTING_WINDOWS)M$=jb();else M$=xb();Pb.exports=g$;g$.sync=vi;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(y,G){g$($,b||{},function(S,I){if(S)G(S);else y(I)})})}M$($,b||{},function(y,G){if(y){if(y.code==="EACCES"||b&&b.ignoreErrors)y=null,G=!1}i(y,G)})}function vi($,b){try{return M$.sync($,b||{})}catch(i){if(b&&b.ignoreErrors||i.code==="EACCES")return!1;else throw i}}});var gb=z((OG,ub)=>{var u=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",tb=v("path"),wi=u?";":":",hb=fb(),Eb=($)=>Object.assign(Error(`not found: ${$}`),{code:"ENOENT"}),Cb=($,b)=>{let i=b.colon||wi,y=$.match(/\//)||u&&$.match(/\\/)?[""]:[...u?[process.cwd()]:[],...(b.path||process.env.PATH||"").split(i)],G=u?b.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",S=u?G.split(i):[""];if(u){if($.indexOf(".")!==-1&&S[0]!=="")S.unshift("")}return{pathEnv:y,pathExt:S,pathExtExe:G}},kb=($,b,i)=>{if(typeof b==="function")i=b,b={};if(!b)b={};let{pathEnv:y,pathExt:G,pathExtExe:S}=Cb($,b),I=[],c=(n)=>new Promise((V,U)=>{if(n===y.length)return b.all&&I.length?V(I):U(Eb($));let m=y[n],T=/^".*"$/.test(m)?m.slice(1,-1):m,X=tb.join(T,$),j=!T&&/^\.[\\\/]/.test($)?$.slice(0,2)+X:X;V(M(j,n,0))}),M=(n,V,U)=>new Promise((m,T)=>{if(U===G.length)return m(c(V+1));let X=G[U];hb(n+X,{pathExt:S},(j,P)=>{if(!j&&P)if(b.all)I.push(n+X);else return m(n+X);return m(M(n,V,U+1))})});return i?c(0).then((n)=>i(null,n),i):c(0)},_i=($,b)=>{b=b||{};let{pathEnv:i,pathExt:y,pathExtExe:G}=Cb($,b),S=[];for(let I=0;I<i.length;I++){let c=i[I],M=/^".*"$/.test(c)?c.slice(1,-1):c,n=tb.join(M,$),V=!M&&/^\.[\\\/]/.test($)?$.slice(0,2)+n:n;for(let U=0;U<y.length;U++){let m=V+y[U];try{if(hb.sync(m,{pathExt:G}))if(b.all)S.push(m);else return m}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((xG,F$)=>{var Fb=($={})=>{let b=$.env||process.env;if(($.platform||process.platform)!=="win32")return"PATH";return Object.keys(b).reverse().find((y)=>y.toUpperCase()==="PATH")||"Path"};F$.exports=Fb;F$.exports.default=Fb});var ob=z((PG,rb)=>{var ab=v("path"),Oi=gb(),xi=lb();function db($,b){let i=$.options.env||process.env,y=process.cwd(),G=$.options.cwd!=null,S=G&&process.chdir!==void 0&&!process.chdir.disabled;if(S)try{process.chdir($.options.cwd)}catch(c){}let I;try{I=Oi.sync($.command,{path:i[xi({env:i})],pathExt:b?ab.delimiter:void 0})}catch(c){}finally{if(S)process.chdir(y)}if(I)I=ab.resolve(G?$.options.cwd:"",I);return I}function Pi($){return db($)||db($,!0)}rb.exports=Pi});var Db=z((hi,a$)=>{var l$=/([()\][%!^"`<>&|;, *?])/g;function fi($){return $=$.replace(l$,"^$1"),$}function ti($,b){if($=`${$}`,$=$.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),$=$.replace(/(?=(\\+?)?)\1$/,"$1$1"),$=`"${$}"`,$=$.replace(l$,"^$1"),b)$=$.replace(l$,"^$1");return $}hi.command=fi;hi.argument=ti});var sb=z((fG,pb)=>{pb.exports=/^#!(.*)/});var $0=z((tG,eb)=>{var ki=sb();eb.exports=($="")=>{let b=$.match(ki);if(!b)return null;let[i,y]=b[0].replace(/#! ?/,"").split(" "),G=i.split("/").pop();if(G==="env")return y;return y?`${G} ${y}`:G}});var i0=z((hG,b0)=>{var d$=v("fs"),ui=$0();function gi($){let i=Buffer.alloc(150),y;try{y=d$.openSync($,"r"),d$.readSync(y,i,0,150,0),d$.closeSync(y)}catch(G){}return ui(i.toString())}b0.exports=gi});var S0=z((EG,G0)=>{var Fi=v("path"),I0=ob(),y0=Db(),li=i0(),ai=process.platform==="win32",di=/\.(?:com|exe)$/i,ri=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function oi($){$.file=I0($);let b=$.file&&li($.file);if(b)return $.args.unshift($.file),$.command=b,I0($);return $.file}function Di($){if(!ai)return $;let b=oi($),i=!di.test(b);if($.options.forceShell||i){let y=ri.test(b);$.command=Fi.normalize($.command),$.command=y0.command($.command),$.args=$.args.map((S)=>y0.argument(S,y));let G=[$.command].concat($.args).join(" ");$.args=["/d","/s","/c",`"${G}"`],$.command=process.env.comspec||"cmd.exe",$.options.windowsVerbatimArguments=!0}return $}function pi($,b,i){if(b&&!Array.isArray(b))i=b,b=null;b=b?b.slice(0):[],i=Object.assign({},i);let y={command:$,args:b,options:i,file:void 0,original:{command:$,args:b}};return i.shell?y:Di(y)}G0.exports=pi});var n0=z((CG,q0)=>{var r$=process.platform==="win32";function o$($,b){return Object.assign(Error(`${b} ${$.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${b} ${$.command}`,path:$.command,spawnargs:$.args})}function si($,b){if(!r$)return;let i=$.emit;$.emit=function(y,G){if(y==="exit"){let S=c0(G,b);if(S)return i.call($,"error",S)}return i.apply($,arguments)}}function c0($,b){if(r$&&$===1&&!b.file)return o$(b.original,"spawn");return null}function ei($,b){if(r$&&$===1&&!b.file)return o$(b.original,"spawnSync");return null}q0.exports={hookChildProcess:si,verifyENOENT:c0,verifyENOENTSync:ei,notFoundError:o$}});var U0=z((kG,g)=>{var M0=v("child_process"),D$=S0(),p$=n0();function V0($,b,i){let y=D$($,b,i),G=M0.spawn(y.command,y.args,y.options);return p$.hookChildProcess(G,y),G}function $I($,b,i){let y=D$($,b,i),G=M0.spawnSync(y.command,y.args,y.options);return G.error=G.error||p$.verifyENOENTSync(G.status,y),G}g.exports=V0;g.exports.spawn=V0;g.exports.sync=$I;g.exports._parse=D$;g.exports._enoent=p$});var u0=z((aS,k0)=>{var{PassThrough:sI}=v("stream");k0.exports=function(){var $=[],b=new sI({objectMode:!0});return b.setMaxListeners(0),b.add=i,b.isEmpty=y,b.on("unpipe",G),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",G.bind(null,S)),S.once("error",b.emit.bind(b,"error")),S.pipe(b,{end:!1}),this}function y(){return $.length==0}function G(S){if($=$.filter(function(I){return I!==S}),!$.length&&b.readable)b.end()}}});var W=f(K$(),1),y$=f(Y$(),1);import{stdin as E1,stdout as C1}from"node:process";import*as _ from"node:readline";import v1 from"node:readline";import{WriteStream as H2}from"node:tty";function J2({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 Q2=J2();function k1($){if(typeof $!="string")throw TypeError(`Expected a \`string\`, got \`${typeof $}\``);return $.replace(Q2,"")}function u1($){return $&&$.__esModule&&Object.prototype.hasOwnProperty.call($,"default")?$.default:$}var g1={exports:{}};(function($){var b={};$.exports=b,b.eastAsianWidth=function(y){var G=y.charCodeAt(0),S=y.length==2?y.charCodeAt(1):0,I=G;return 55296<=G&&G<=56319&&56320<=S&&S<=57343&&(G&=1023,S&=1023,I=G<<10|S,I+=65536),I==12288||65281<=I&&I<=65376||65504<=I&&I<=65510?"F":I==8361||65377<=I&&I<=65470||65474<=I&&I<=65479||65482<=I&&I<=65487||65490<=I&&I<=65495||65498<=I&&I<=65500||65512<=I&&I<=65518?"H":4352<=I&&I<=4447||4515<=I&&I<=4519||4602<=I&&I<=4607||9001<=I&&I<=9002||11904<=I&&I<=11929||11931<=I&&I<=12019||12032<=I&&I<=12245||12272<=I&&I<=12283||12289<=I&&I<=12350||12353<=I&&I<=12438||12441<=I&&I<=12543||12549<=I&&I<=12589||12593<=I&&I<=12686||12688<=I&&I<=12730||12736<=I&&I<=12771||12784<=I&&I<=12830||12832<=I&&I<=12871||12880<=I&&I<=13054||13056<=I&&I<=19903||19968<=I&&I<=42124||42128<=I&&I<=42182||43360<=I&&I<=43388||44032<=I&&I<=55203||55216<=I&&I<=55238||55243<=I&&I<=55291||63744<=I&&I<=64255||65040<=I&&I<=65049||65072<=I&&I<=65106||65108<=I&&I<=65126||65128<=I&&I<=65131||110592<=I&&I<=110593||127488<=I&&I<=127490||127504<=I&&I<=127546||127552<=I&&I<=127560||127568<=I&&I<=127569||131072<=I&&I<=194367||177984<=I&&I<=196605||196608<=I&&I<=262141?"W":32<=I&&I<=126||162<=I&&I<=163||165<=I&&I<=166||I==172||I==175||10214<=I&&I<=10221||10629<=I&&I<=10630?"Na":I==161||I==164||167<=I&&I<=168||I==170||173<=I&&I<=174||176<=I&&I<=180||182<=I&&I<=186||188<=I&&I<=191||I==198||I==208||215<=I&&I<=216||222<=I&&I<=225||I==230||232<=I&&I<=234||236<=I&&I<=237||I==240||242<=I&&I<=243||247<=I&&I<=250||I==252||I==254||I==257||I==273||I==275||I==283||294<=I&&I<=295||I==299||305<=I&&I<=307||I==312||319<=I&&I<=322||I==324||328<=I&&I<=331||I==333||338<=I&&I<=339||358<=I&&I<=359||I==363||I==462||I==464||I==466||I==468||I==470||I==472||I==474||I==476||I==593||I==609||I==708||I==711||713<=I&&I<=715||I==717||I==720||728<=I&&I<=731||I==733||I==735||768<=I&&I<=879||913<=I&&I<=929||931<=I&&I<=937||945<=I&&I<=961||963<=I&&I<=969||I==1025||1040<=I&&I<=1103||I==1105||I==8208||8211<=I&&I<=8214||8216<=I&&I<=8217||8220<=I&&I<=8221||8224<=I&&I<=8226||8228<=I&&I<=8231||I==8240||8242<=I&&I<=8243||I==8245||I==8251||I==8254||I==8308||I==8319||8321<=I&&I<=8324||I==8364||I==8451||I==8453||I==8457||I==8467||I==8470||8481<=I&&I<=8482||I==8486||I==8491||8531<=I&&I<=8532||8539<=I&&I<=8542||8544<=I&&I<=8555||8560<=I&&I<=8569||I==8585||8592<=I&&I<=8601||8632<=I&&I<=8633||I==8658||I==8660||I==8679||I==8704||8706<=I&&I<=8707||8711<=I&&I<=8712||I==8715||I==8719||I==8721||I==8725||I==8730||8733<=I&&I<=8736||I==8739||I==8741||8743<=I&&I<=8748||I==8750||8756<=I&&I<=8759||8764<=I&&I<=8765||I==8776||I==8780||I==8786||8800<=I&&I<=8801||8804<=I&&I<=8807||8810<=I&&I<=8811||8814<=I&&I<=8815||8834<=I&&I<=8835||8838<=I&&I<=8839||I==8853||I==8857||I==8869||I==8895||I==8978||9312<=I&&I<=9449||9451<=I&&I<=9547||9552<=I&&I<=9587||9600<=I&&I<=9615||9618<=I&&I<=9621||9632<=I&&I<=9633||9635<=I&&I<=9641||9650<=I&&I<=9651||9654<=I&&I<=9655||9660<=I&&I<=9661||9664<=I&&I<=9665||9670<=I&&I<=9672||I==9675||9678<=I&&I<=9681||9698<=I&&I<=9701||I==9711||9733<=I&&I<=9734||I==9737||9742<=I&&I<=9743||9748<=I&&I<=9749||I==9756||I==9758||I==9792||I==9794||9824<=I&&I<=9825||9827<=I&&I<=9829||9831<=I&&I<=9834||9836<=I&&I<=9837||I==9839||9886<=I&&I<=9887||9918<=I&&I<=9919||9924<=I&&I<=9933||9935<=I&&I<=9953||I==9955||9960<=I&&I<=9983||I==10045||I==10071||10102<=I&&I<=10111||11093<=I&&I<=11097||12872<=I&&I<=12879||57344<=I&&I<=63743||65024<=I&&I<=65039||I==65533||127232<=I&&I<=127242||127248<=I&&I<=127277||127280<=I&&I<=127337||127344<=I&&I<=127386||917760<=I&&I<=917999||983040<=I&&I<=1048573||1048576<=I&&I<=1114109?"A":"N"},b.characterLength=function(y){var G=this.eastAsianWidth(y);return G=="F"||G=="W"||G=="A"?2:1};function i(y){return y.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}b.length=function(y){for(var G=i(y),S=0,I=0;I<G.length;I++)S=S+this.characterLength(G[I]);return S},b.slice=function(y,G,S){textLen=b.length(y),G=G||0,S=S||1,G<0&&(G=textLen+G),S<0&&(S=textLen+S);for(var I="",c=0,M=i(y),n=0;n<M.length;n++){var V=M[n],U=b.length(V);if(c>=G-(U==2?1:0))if(c+U<=S)I+=V;else break;c+=U}return I}})(g1);var T2=g1.exports,Z2=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,y=0;for(let G of $){let S=G.codePointAt(0);if(S<=31||S>=127&&S<=159||S>=768&&S<=879)continue;switch(Z2.eastAsianWidth(G)){case"F":case"W":y+=2;break;case"A":y+=i;break;default:y+=1}}return y}var N$=10,w1=($=0)=>(b)=>`\x1B[${b+$}m`,_1=($=0)=>(b)=>`\x1B[${38+$};5;${b}m`,O1=($=0)=>(b,i,y)=>`\x1B[${38+$};2;${b};${i};${y}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 W2=Object.keys(L.color),K2=Object.keys(L.bgColor);[...W2,...K2];function B2(){let $=new Map;for(let[b,i]of Object.entries(L)){for(let[y,G]of Object.entries(i))L[y]={open:`\x1B[${G[0]}m`,close:`\x1B[${G[1]}m`},i[y]=L[y],$.set(G[0],G[1]);Object.defineProperty(L,b,{value:i,enumerable:!1})}return Object.defineProperty(L,"codes",{value:$,enumerable:!1}),L.color.close="\x1B[39m",L.bgColor.close="\x1B[49m",L.color.ansi=w1(),L.color.ansi256=_1(),L.color.ansi16m=O1(),L.bgColor.ansi=w1(N$),L.bgColor.ansi256=_1(N$),L.bgColor.ansi16m=O1(N$),Object.defineProperties(L,{rgbToAnsi256:{value:(b,i,y)=>b===i&&i===y?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(y/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[y]=i;y.length===3&&(y=[...y].map((S)=>S+S).join(""));let G=Number.parseInt(y,16);return[G>>16&255,G>>8&255,G&255]},enumerable:!1},hexToAnsi256:{value:(b)=>L.rgbToAnsi256(...L.hexToRgb(b)),enumerable:!1},ansi256ToAnsi:{value:(b)=>{if(b<8)return 30+b;if(b<16)return 90+(b-8);let i,y,G;if(b>=232)i=((b-232)*10+8)/255,y=i,G=i;else{b-=16;let c=b%36;i=Math.floor(b/36)/5,y=Math.floor(c/6)/5,G=c%6/5}let S=Math.max(i,y,G)*2;if(S===0)return 30;let I=30+(Math.round(G)<<2|Math.round(y)<<1|Math.round(i));return S===2&&(I+=60),I},enumerable:!1},rgbToAnsi:{value:(b,i,y)=>L.ansi256ToAnsi(L.rgbToAnsi256(b,i,y)),enumerable:!1},hexToAnsi:{value:(b)=>L.ansi256ToAnsi(L.hexToAnsi256(b)),enumerable:!1}}),L}var Y2=B2(),G$=new Set(["\x1B","›"]),N2=39,v$="\x07",F1="[",j2="]",l1="m",w$=`${j2}8;;`,x1=($)=>`${G$.values().next().value}${F1}${$}${l1}`,P1=($)=>`${G$.values().next().value}${w$}${$}${v$}`,v2=($)=>$.split(" ").map((b)=>F(b)),j$=($,b,i)=>{let y=[...b],G=!1,S=!1,I=F(k1($[$.length-1]));for(let[c,M]of y.entries()){let n=F(M);if(I+n<=i?$[$.length-1]+=M:($.push(M),I=0),G$.has(M)&&(G=!0,S=y.slice(c+1).join("").startsWith(w$)),G){S?M===v$&&(G=!1,S=!1):M===l1&&(G=!1);continue}I+=n,I===i&&c<y.length-1&&($.push(""),I=0)}!I&&$[$.length-1].length>0&&$.length>1&&($[$.length-2]+=$.pop())},w2=($)=>{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("")},_2=($,b,i={})=>{if(i.trim!==!1&&$.trim()==="")return"";let y="",G,S,I=v2($),c=[""];for(let[n,V]of $.split(" ").entries()){i.trim!==!1&&(c[c.length-1]=c[c.length-1].trimStart());let U=F(c[c.length-1]);if(n!==0&&(U>=b&&(i.wordWrap===!1||i.trim===!1)&&(c.push(""),U=0),(U>0||i.trim===!1)&&(c[c.length-1]+=" ",U++)),i.hard&&I[n]>b){let m=b-U,T=1+Math.floor((I[n]-m-1)/b);Math.floor((I[n]-1)/b)<T&&c.push(""),j$(c,V,b);continue}if(U+I[n]>b&&U>0&&I[n]>0){if(i.wordWrap===!1&&U<b){j$(c,V,b);continue}c.push("")}if(U+I[n]>b&&i.wordWrap===!1){j$(c,V,b);continue}c[c.length-1]+=V}i.trim!==!1&&(c=c.map((n)=>w2(n)));let M=[...c.join(`
3
+ `)];for(let[n,V]of M.entries()){if(y+=V,G$.has(V)){let{groups:m}=new RegExp(`(?:\\${F1}(?<code>\\d+)m|\\${w$}(?<uri>.*)${v$})`).exec(M.slice(n).join(""))||{groups:{}};if(m.code!==void 0){let T=Number.parseFloat(m.code);G=T===N2?void 0:T}else m.uri!==void 0&&(S=m.uri.length===0?void 0:m.uri)}let U=Y2.codes.get(Number(G));M[n+1]===`
4
+ `?(S&&(y+=P1("")),G&&U&&(y+=x1(U))):V===`
5
+ `&&(G&&U&&(y+=x1(G)),S&&(y+=P1(S)))}return y};function f1($,b,i){return String($).normalize().replace(/\r\n/g,`
6
6
  `).split(`
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)}
7
+ `).map((y)=>_2(y,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
+ `),y=b.split(`
10
+ `),G=[];for(let S=0;S<Math.max(i.length,y.length);S++)i[S]!==y[S]&&G.push(S);return G}var a1=Symbol("clack:cancel");function w($){return $===a1}function I$($,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,...y},G=!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=y,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=$.bind(this),this._track=G,this.input=b,this.output=i}prompt(){let $=new H2(0);return $._write=(b,i,y)=>{this._track&&(this.value=this.rl.line.replace(/\t/g,""),this._cursor=this.rl.cursor,this.emit("value",this.value)),y()},this.input.pipe($),this.rl=v1.createInterface({input:this.input,output:$,tabSize:2,prompt:"",escapeCodeTimeout:50}),v1.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),I$(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),I$(this.input,!1),b(this.value)}),this.once("cancel",()=>{this.output.write(W.cursor.show),this.output.off("resize",this.render),I$(this.input,!1),b(a1)})})}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($)??[],y=[];for(let G of i)G.cb(...b),G.once&&y.push(()=>i.splice(i.indexOf(G),1));for(let G of y)G()}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
+ `),I$(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 y=$.split(`
13
+ `);this.output.write(y[i]),this._prevFrame=$,this.output.write(W.cursor.move(0,y.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 y=$.split(`
14
+ `).slice(i);this.output.write(y.join(`
15
+ `)),this._prevFrame=$;return}this.output.write(W.erase.down())}this.output.write($),this.state==="initial"&&(this.state="active"),this._prevFrame=$}}}class _$ 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),d1=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}${y$.default.inverse(y$.default.hidden("_"))}`;else{let b=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.valueWithCursor=`${b}${y$.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:y=!0}={}){let G=_.createInterface({input:$,output:b,prompt:"",tabSize:1});_.emitKeypressEvents($,G),$.isTTY&&$.setRawMode(!0);let S=(I,{name:c})=>{if(String(I)==="\x03"){y&&b.write(W.cursor.show),process.exit(0);return}if(!i)return;_.moveCursor(b,c==="return"?0:-1,c==="return"?-1:0,()=>{_.clearLine(b,1,()=>{$.once("keypress",S)})})};return y&&b.write(W.cursor.hide),$.once("keypress",S),()=>{$.off("keypress",S),y&&b.write(W.cursor.show),$.isTTY&&!u2&&$.setRawMode(!1),G.terminal=!1,G.close()}}var q=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(),Q=($,b)=>x$?$:b,F2=Q("◆","*"),o1=Q("■","x"),D1=Q("▲","x"),t$=Q("◇","o"),l2=Q("┌","T"),J=Q("│","|"),h=Q("└","—"),P$=Q("●",">"),f$=Q("○"," "),Cy=Q("◻","[•]"),ky=Q("◼","[+]"),uy=Q("◻","[ ]"),gy=Q("▪","•"),Fy=Q("─","-"),ly=Q("╮","+"),ay=Q("├","+"),dy=Q("╯","+"),a2=Q("●","•"),d2=Q("◆","*"),r2=Q("▲","!"),o2=Q("■","x"),h$=($)=>{switch($){case"initial":case"active":return q.default.cyan(F2);case"cancel":return q.default.red(o1);case"error":return q.default.yellow(D1);case"submit":return q.default.green(t$)}},p1=($)=>new O$({validate:$.validate,placeholder:$.placeholder,defaultValue:$.defaultValue,initialValue:$.initialValue,render(){let b=`${q.default.gray(J)}
16
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)}
17
+ `,i=$.placeholder?q.default.inverse($.placeholder[0])+q.default.dim($.placeholder.slice(1)):q.default.inverse(q.default.hidden("_")),y=this.value?this.valueWithCursor:i;switch(this.state){case"error":return`${b.trim()}
18
+ ${q.default.yellow(J)} ${y}
19
+ ${q.default.yellow(h)} ${q.default.yellow(this.error)}
20
+ `;case"submit":return`${b}${q.default.gray(J)} ${q.default.dim(this.value||$.placeholder)}`;case"cancel":return`${b}${q.default.gray(J)} ${q.default.strikethrough(q.default.dim(this.value??""))}${this.value?.trim()?`
21
+ `+q.default.gray(J):""}`;default:return`${b}${q.default.cyan(J)} ${y}
22
+ ${q.default.cyan(h)}
23
+ `}}}).prompt();var l=($)=>{let b=$.active??"Yes",i=$.inactive??"No";return new _$({active:b,inactive:i,initialValue:$.initialValue??!0,render(){let y=`${q.default.gray(J)}
24
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)}
25
+ `,G=this.value?b:i;switch(this.state){case"submit":return`${y}${q.default.gray(J)} ${q.default.dim(G)}`;case"cancel":return`${y}${q.default.gray(J)} ${q.default.strikethrough(q.default.dim(G))}
26
+ ${q.default.gray(J)}`;default:return`${y}${q.default.cyan(J)} ${this.value?`${q.default.green(P$)} ${b}`:`${q.default.dim(f$)} ${q.default.dim(b)}`} ${q.default.dim("/")} ${this.value?`${q.default.dim(f$)} ${q.default.dim(i)}`:`${q.default.green(P$)} ${i}`}
27
+ ${q.default.cyan(h)}
28
+ `}}}).prompt()},c$=($)=>{let b=(y,G)=>{let S=y.label??String(y.value);return G==="active"?`${q.default.green(P$)} ${S} ${y.hint?q.default.dim(`(${y.hint})`):""}`:G==="selected"?`${q.default.dim(S)}`:G==="cancelled"?`${q.default.strikethrough(q.default.dim(S))}`:`${q.default.dim(f$)} ${q.default.dim(S)}`},i=0;return new d1({options:$.options,initialValue:$.initialValue,render(){let y=`${q.default.gray(J)}
29
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(`
30
+ `;switch(this.state){case"submit":return`${y}${q.default.gray(J)} ${b(this.options[this.cursor],"selected")}`;case"cancel":return`${y}${q.default.gray(J)} ${b(this.options[this.cursor],"cancelled")}
31
+ ${q.default.gray(J)}`;default:{let G=$.maxItems===void 0?1/0:Math.max($.maxItems,5);this.cursor>=i+G-3?i=Math.max(Math.min(this.cursor-G+3,this.options.length-G),0):this.cursor<i+2&&(i=Math.max(this.cursor-2,0));let S=G<this.options.length&&i>0,I=G<this.options.length&&i+G<this.options.length;return`${y}${q.default.cyan(J)} ${this.options.slice(i,i+G).map((c,M,n)=>M===0&&S?q.default.dim("..."):M===n.length-1&&I?q.default.dim("..."):b(c,M+i===this.cursor?"active":"inactive")).join(`
32
+ ${q.default.cyan(J)} `)}
33
+ ${q.default.cyan(h)}
34
+ `}}}}).prompt()};var s1=($="")=>{process.stdout.write(`${q.default.gray(h)} ${q.default.red($)}
35
+
36
+ `)},e1=($="")=>{process.stdout.write(`${q.default.gray(l2)} ${$}
37
+ `)},$b=($="")=>{process.stdout.write(`${q.default.gray(J)}
38
+ ${q.default.gray(h)} ${$}
39
+
40
+ `)},Z={message:($="",{symbol:b=q.default.gray(J)}={})=>{let i=[`${q.default.gray(J)}`];if($){let[y,...G]=$.split(`
41
+ `);i.push(`${b} ${y}`,...G.map((S)=>`${q.default.gray(J)} ${S}`))}process.stdout.write(`${i.join(`
42
42
  `)}
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
43
+ `)},info:($)=>{Z.message($,{symbol:q.default.blue(a2)})},success:($)=>{Z.message($,{symbol:q.default.green(d2)})},step:($)=>{Z.message($,{symbol:q.default.green(t$)})},warn:($)=>{Z.message($,{symbol:q.default.yellow(r2)})},warning:($)=>{Z.warn($)},error:($)=>{Z.message($,{symbol:q.default.red(o2)})}},bb=()=>{let $=x$?["◒","◐","◓","◑"]:["•","o","O","0"],b=x$?80:120,i,y,G=!1,S="",I=(V="")=>{G=!0,i=r1(),S=V.replace(/\.+$/,""),process.stdout.write(`${q.default.gray(J)}
44
+ `);let U=0,m=0;y=setInterval(()=>{let T=q.default.magenta($[U]),X=".".repeat(Math.floor(m)).slice(0,3);process.stdout.write(t.cursor.move(-999,0)),process.stdout.write(t.erase.down(1)),process.stdout.write(`${T} ${S}${X}`),U=U+1<$.length?U+1:0,m=m<$.length?m+0.125:0},b)},c=(V="",U=0)=>{S=V??S,G=!1,clearInterval(y);let m=U===0?q.default.green(t$):U===1?q.default.red(o1):q.default.red(D1);process.stdout.write(t.cursor.move(-999,0)),process.stdout.write(t.erase.down(1)),process.stdout.write(`${m} ${S}
45
+ `),i()},M=(V="")=>{S=V??S},n=(V)=>{let U=V>1?"Something went wrong":"Canceled";G&&c(U,V)};return process.on("uncaughtExceptionMonitor",()=>n(2)),process.on("unhandledRejection",()=>n(2)),process.on("SIGINT",()=>n(1)),process.on("SIGTERM",()=>n(1)),process.on("exit",n),{start:I,stop:c,message:M}};var ib=($=0)=>(b)=>`\x1B[${b+$}m`,Ib=($=0)=>(b)=>`\x1B[${38+$};5;${b}m`,yb=($=0)=>(b,i,y)=>`\x1B[${38+$};2;${b};${i};${y}m`,A={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]}},Dy=Object.keys(A.modifier),D2=Object.keys(A.color),p2=Object.keys(A.bgColor),py=[...D2,...p2];function s2(){let $=new Map;for(let[b,i]of Object.entries(A)){for(let[y,G]of Object.entries(i))A[y]={open:`\x1B[${G[0]}m`,close:`\x1B[${G[1]}m`},i[y]=A[y],$.set(G[0],G[1]);Object.defineProperty(A,b,{value:i,enumerable:!1})}return Object.defineProperty(A,"codes",{value:$,enumerable:!1}),A.color.close="\x1B[39m",A.bgColor.close="\x1B[49m",A.color.ansi=ib(),A.color.ansi256=Ib(),A.color.ansi16m=yb(),A.bgColor.ansi=ib(10),A.bgColor.ansi256=Ib(10),A.bgColor.ansi16m=yb(10),Object.defineProperties(A,{rgbToAnsi256:{value(b,i,y){if(b===i&&i===y){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(y/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[y]=i;if(y.length===3)y=[...y].map((S)=>S+S).join("");let G=Number.parseInt(y,16);return[G>>16&255,G>>8&255,G&255]},enumerable:!1},hexToAnsi256:{value:(b)=>A.rgbToAnsi256(...A.hexToRgb(b)),enumerable:!1},ansi256ToAnsi:{value(b){if(b<8)return 30+b;if(b<16)return 90+(b-8);let i,y,G;if(b>=232)i=((b-232)*10+8)/255,y=i,G=i;else{b-=16;let c=b%36;i=Math.floor(b/36)/5,y=Math.floor(c/6)/5,G=c%6/5}let S=Math.max(i,y,G)*2;if(S===0)return 30;let I=30+(Math.round(G)<<2|Math.round(y)<<1|Math.round(i));if(S===2)I+=60;return I},enumerable:!1},rgbToAnsi:{value:(b,i,y)=>A.ansi256ToAnsi(A.rgbToAnsi256(b,i,y)),enumerable:!1},hexToAnsi:{value:(b)=>A.ansi256ToAnsi(A.hexToAnsi256(b)),enumerable:!1}}),A}var e2=s2(),N=e2;import E$ from"node:process";import $i from"node:os";import Gb from"node:tty";function B($,b=globalThis.Deno?globalThis.Deno.args:E$.argv){let i=$.startsWith("-")?"":$.length===1?"-":"--",y=b.indexOf(i+$),G=b.indexOf("--");return y!==-1&&(G===-1||y<G)}var{env:H}=E$,q$;if(B("no-color")||B("no-colors")||B("color=false")||B("color=never"))q$=0;else if(B("color")||B("colors")||B("color=true")||B("color=always"))q$=1;function bi(){if("FORCE_COLOR"in H){if(H.FORCE_COLOR==="true")return 1;if(H.FORCE_COLOR==="false")return 0;return H.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(H.FORCE_COLOR,10),3)}}function ii($){if($===0)return!1;return{level:$,hasBasic:!0,has256:$>=2,has16m:$>=3}}function Ii($,{streamIsTTY:b,sniffFlags:i=!0}={}){let y=bi();if(y!==void 0)q$=y;let G=i?q$:y;if(G===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 H&&"AGENT_NAME"in H)return 1;if($&&!b&&G===void 0)return 0;let S=G||0;if(H.TERM==="dumb")return S;if(E$.platform==="win32"){let I=$i.release().split(".");if(Number(I[0])>=10&&Number(I[2])>=10586)return Number(I[2])>=14931?3:2;return 1}if("CI"in H){if(["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((I)=>(I in H)))return 3;if(["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((I)=>(I in H))||H.CI_NAME==="codeship")return 1;return S}if("TEAMCITY_VERSION"in H)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(H.TEAMCITY_VERSION)?1:0;if(H.COLORTERM==="truecolor")return 3;if(H.TERM==="xterm-kitty")return 3;if(H.TERM==="xterm-ghostty")return 3;if(H.TERM==="wezterm")return 3;if("TERM_PROGRAM"in H){let I=Number.parseInt((H.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(H.TERM_PROGRAM){case"iTerm.app":return I>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(H.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(H.TERM))return 1;if("COLORTERM"in H)return 1;return S}function Sb($,b={}){let i=Ii($,{streamIsTTY:$&&$.isTTY,...b});return ii(i)}var yi={stdout:Sb({isTTY:Gb.isatty(1)}),stderr:Sb({isTTY:Gb.isatty(2)})},cb=yi;function qb($,b,i){let y=$.indexOf(b);if(y===-1)return $;let G=b.length,S=0,I="";do I+=$.slice(S,y)+b+i,S=y+G,y=$.indexOf(b,S);while(y!==-1);return I+=$.slice(S),I}function nb($,b,i,y){let G=0,S="";do{let I=$[y-1]==="\r";S+=$.slice(G,I?y-1:y)+b+(I?`\r
46
46
  `:`
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'
47
+ `)+i,G=y+1,y=$.indexOf(`
48
+ `,G)}while(y!==-1);return S+=$.slice(G),S}var{stdout:Mb,stderr:Vb}=cb,C$=Symbol("GENERATOR"),E=Symbol("STYLER"),a=Symbol("IS_EMPTY"),Ub=["ansi","ansi","ansi256","ansi16m"],C=Object.create(null),Gi=($,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=Mb?Mb.level:0;$.level=b.level===void 0?i:b.level};var Si=($)=>{let b=(...i)=>i.join(" ");return Gi(b,$),Object.setPrototypeOf(b,d.prototype),b};function d($){return Si($)}Object.setPrototypeOf(d.prototype,Function.prototype);for(let[$,b]of Object.entries(N))C[$]={get(){let i=n$(this,u$(b.open,b.close,this[E]),this[a]);return Object.defineProperty(this,$,{value:i}),i}};C.visible={get(){let $=n$(this,this[E],!0);return Object.defineProperty(this,"visible",{value:$}),$}};var k$=($,b,i,...y)=>{if($==="rgb"){if(b==="ansi16m")return N[i].ansi16m(...y);if(b==="ansi256")return N[i].ansi256(N.rgbToAnsi256(...y));return N[i].ansi(N.rgbToAnsi(...y))}if($==="hex")return k$("rgb",b,i,...N.hexToRgb(...y));return N[i][$](...y)},ci=["rgb","hex","ansi256"];for(let $ of ci){C[$]={get(){let{level:i}=this;return function(...y){let G=u$(k$($,Ub[i],"color",...y),N.color.close,this[E]);return n$(this,G,this[a])}}};let b="bg"+$[0].toUpperCase()+$.slice(1);C[b]={get(){let{level:i}=this;return function(...y){let G=u$(k$($,Ub[i],"bgColor",...y),N.bgColor.close,this[E]);return n$(this,G,this[a])}}}}var qi=Object.defineProperties(()=>{},{...C,level:{enumerable:!0,get(){return this[C$].level},set($){this[C$].level=$}}}),u$=($,b,i)=>{let y,G;if(i===void 0)y=$,G=b;else y=i.openAll+$,G=b+i.closeAll;return{open:$,close:b,openAll:y,closeAll:G,parent:i}},n$=($,b,i)=>{let y=(...G)=>ni(y,G.length===1?""+G[0]:G.join(" "));return Object.setPrototypeOf(y,qi),y[C$]=$,y[E]=b,y[a]=i,y},ni=($,b)=>{if($.level<=0||!b)return $[a]?"":b;let i=$[E];if(i===void 0)return b;let{openAll:y,closeAll:G}=i;if(b.includes("\x1B"))while(i!==void 0)b=qb(b,i.close,i.open),i=i.parent;let S=b.indexOf(`
49
+ `);if(S!==-1)b=nb(b,G,y,S);return y+b+G};Object.defineProperties(d.prototype,C);var Mi=d(),cG=d({level:Vb?Vb.level:0});var R=Mi;import{readFile as Vi,access as Ui}from"node:fs/promises";async function O($){try{return await Ui($),!0}catch{return!1}}async function mi(){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 Ri(){if(await O("src"))return"src";if(await O("app"))return"app";return null}async function Li(){let $=[".env",".env.local",".env.development"];for(let b of $)try{let y=(await Vi(b,"utf-8")).match(/DATABASE_URL=["']?([^"'\n]+)/);if(y){let G=y[1];return{type:G.includes("postgres")?"postgresql":G.includes("mysql")?"mysql":G.includes("sqlite")||G.includes(".db")?"sqlite":"unknown",url:G}}}catch{continue}return{type:"unknown",url:null}}async function Ai(){let $=["drizzle.config.ts","drizzle.config.js","drizzle/migrations"];for(let b of $)if(await O(b))return!0;return!1}async function mb(){let[$,b,i,y,G]=await Promise.all([O("tsconfig.json"),mi(),Ri(),Ai(),Li()]);return{hasTypescript:$,packageManager:b,srcDir:i,hasDrizzle:y,database:G}}async function Rb($){let b=await c$({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(w(b))process.exit(0);let i=b,y=await c$({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(w(y))process.exit(0);let G=y,S=await c$({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(w(S))process.exit(0);let I=S,c=!1;if(i==="drizzle"){let V=await l({message:"Include Drizzle Studio? (database GUI)",initialValue:!0});if(w(V))process.exit(0);c=V}let M=await l({message:"Use custom path for database client?",initialValue:!1});if(w(M))process.exit(0);let n;if(M){let V=await p1({message:"Enter path (e.g., src/lib/database)",placeholder:$.srcDir?`${$.srcDir}/lib/db`:"lib/db"});if(w(V))process.exit(0);n=V}return{orm:i,database:G,template:I,includeStudio:c,clientPath:n}}function Lb($,b){let i;if(b)i=b.replace(/\\/g,"/");else if($)i=`${$}/lib`;else i="lib";let y={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:",y.clientFile),console.log(" Schema file:",y.schemaFile),console.log(""),y}import{mkdir as Hi,writeFile as Ji}from"node:fs/promises";import{dirname as Qi,resolve as Ti}from"node:path";async function Zi($,b){try{let i=Ti(process.cwd(),$),y=Qi(i);await Hi(y,{recursive:!0}),await Ji(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 Zi(b,i)}function Ab($){if($==="postgresql")return`import { drizzle } from 'drizzle-orm/postgres-js'
51
51
  import postgres from 'postgres'
52
52
  import * as schema from './db/schema'
53
53
 
@@ -77,17 +77,17 @@ if (!process.env.DATABASE_URL) {
77
77
 
78
78
  const sqlite = new Database(process.env.DATABASE_URL)
79
79
  export const db = drizzle(sqlite, { schema })
80
- `}function Qb($,b,I){return`import { defineConfig } from 'drizzle-kit'
80
+ `}function Hb($,b,i){return`import { defineConfig } from 'drizzle-kit'
81
81
 
82
82
  export default defineConfig({
83
83
  schema: './${b}',
84
- out: './${I}',
84
+ out: './${i}',
85
85
  dialect: '${$==="postgresql"?"postgresql":$==="mysql"?"mysql":"sqlite"}',
86
86
  dbCredentials: {
87
87
  ${$==="sqlite"?"url: process.env.DATABASE_URL!":"url: process.env.DATABASE_URL!"},
88
88
  },
89
89
  })
90
- `}function Zb($){if($==="postgresql")return`import { drizzle } from 'drizzle-orm/postgres-js'
90
+ `}function Jb($){if($==="postgresql")return`import { drizzle } from 'drizzle-orm/postgres-js'
91
91
  import { migrate } from 'drizzle-orm/postgres-js/migrator'
92
92
  import postgres from 'postgres'
93
93
 
@@ -120,26 +120,26 @@ migrate(db, { migrationsFolder: './drizzle/migrations' })
120
120
  sqlite.close()
121
121
 
122
122
  console.log('✅ Migrations complete!')
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}
123
+ `}function Qb($,b){let i=b==="postgresql"?"pg-core":b==="mysql"?"mysql-core":"sqlite-core",y=b==="postgresql"?"pgTable":b==="mysql"?"mysqlTable":"sqliteTable",G=`import { ${y}, text, timestamp, integer, boolean } from 'drizzle-orm/${i}'`;if($==="empty")return`${G}
124
124
 
125
125
  // Define your schema here
126
126
  // Example:
127
- // export const users = ${G}('users', {
127
+ // export const users = ${y}('users', {
128
128
  // id: text('id').primaryKey().$defaultFn(() => crypto.randomUUID()),
129
129
  // email: text('email').notNull().unique(),
130
130
  // })
131
- `;let S=b==="sqlite"?"integer('id').primaryKey({ autoIncrement: true })":"text('id').primaryKey().$defaultFn(() => crypto.randomUUID())";if($==="starter")return`${i}
131
+ `;let S=b==="sqlite"?"integer('id').primaryKey({ autoIncrement: true })":"text('id').primaryKey().$defaultFn(() => crypto.randomUUID())";if($==="starter")return`${G}
132
132
 
133
- export const users = ${G}('users', {
133
+ export const users = ${y}('users', {
134
134
  id: ${S},
135
135
  email: text('email').notNull().unique(),
136
136
  name: text('name'),
137
137
  createdAt: timestamp('created_at').defaultNow().notNull(),
138
138
  updatedAt: timestamp('updated_at').defaultNow().notNull(),
139
139
  })
140
- `;if($==="blog")return`${i}
140
+ `;if($==="blog")return`${G}
141
141
 
142
- export const users = ${G}('users', {
142
+ export const users = ${y}('users', {
143
143
  id: ${S},
144
144
  email: text('email').notNull().unique(),
145
145
  name: text('name'),
@@ -147,7 +147,7 @@ export const users = ${G}('users', {
147
147
  updatedAt: timestamp('updated_at').defaultNow().notNull(),
148
148
  })
149
149
 
150
- export const posts = ${G}('posts', {
150
+ export const posts = ${y}('posts', {
151
151
  id: ${S},
152
152
  title: text('title').notNull(),
153
153
  slug: text('slug').notNull().unique(),
@@ -158,7 +158,7 @@ export const posts = ${G}('posts', {
158
158
  updatedAt: timestamp('updated_at').defaultNow().notNull(),
159
159
  })
160
160
 
161
- export const comments = ${G}('comments', {
161
+ export const comments = ${y}('comments', {
162
162
  id: ${S},
163
163
  content: text('content').notNull(),
164
164
  postId: text('post_id').notNull().references(() => posts.id, { onDelete: 'cascade' }),
@@ -166,23 +166,23 @@ export const comments = ${G}('comments', {
166
166
  createdAt: timestamp('created_at').defaultNow().notNull(),
167
167
  })
168
168
 
169
- export const categories = ${G}('categories', {
169
+ export const categories = ${y}('categories', {
170
170
  id: ${S},
171
171
  name: text('name').notNull().unique(),
172
172
  slug: text('slug').notNull().unique(),
173
173
  createdAt: timestamp('created_at').defaultNow().notNull(),
174
174
  })
175
- `;if($==="ecommerce")return`${i}
176
- import { json } from 'drizzle-orm/${I}'
175
+ `;if($==="ecommerce")return`${G}
176
+ import { json } from 'drizzle-orm/${i}'
177
177
 
178
- export const users = ${G}('users', {
178
+ export const users = ${y}('users', {
179
179
  id: ${S},
180
180
  email: text('email').notNull().unique(),
181
181
  name: text('name'),
182
182
  createdAt: timestamp('created_at').defaultNow().notNull(),
183
183
  })
184
184
 
185
- export const products = ${G}('products', {
185
+ export const products = ${y}('products', {
186
186
  id: ${S},
187
187
  name: text('name').notNull(),
188
188
  slug: text('slug').notNull().unique(),
@@ -193,7 +193,7 @@ export const products = ${G}('products', {
193
193
  createdAt: timestamp('created_at').defaultNow().notNull(),
194
194
  })
195
195
 
196
- export const orders = ${G}('orders', {
196
+ export const orders = ${y}('orders', {
197
197
  id: ${S},
198
198
  orderNumber: text('order_number').notNull().unique(),
199
199
  userId: text('user_id').notNull().references(() => users.id),
@@ -201,16 +201,16 @@ export const orders = ${G}('orders', {
201
201
  total: integer('total').notNull(),
202
202
  createdAt: timestamp('created_at').defaultNow().notNull(),
203
203
  })
204
- `;if($==="saas")return`${i}
204
+ `;if($==="saas")return`${G}
205
205
 
206
- export const users = ${G}('users', {
206
+ export const users = ${y}('users', {
207
207
  id: ${S},
208
208
  email: text('email').notNull().unique(),
209
209
  name: text('name'),
210
210
  createdAt: timestamp('created_at').defaultNow().notNull(),
211
211
  })
212
212
 
213
- export const organizations = ${G}('organizations', {
213
+ export const organizations = ${y}('organizations', {
214
214
  id: ${S},
215
215
  name: text('name').notNull(),
216
216
  slug: text('slug').notNull().unique(),
@@ -218,7 +218,7 @@ export const organizations = ${G}('organizations', {
218
218
  createdAt: timestamp('created_at').defaultNow().notNull(),
219
219
  })
220
220
 
221
- export const memberships = ${G}('memberships', {
221
+ export const memberships = ${y}('memberships', {
222
222
  id: ${S},
223
223
  userId: text('user_id').notNull().references(() => users.id, { onDelete: 'cascade' }),
224
224
  organizationId: text('organization_id').notNull().references(() => organizations.id, { onDelete: 'cascade' }),
@@ -226,7 +226,7 @@ export const memberships = ${G}('memberships', {
226
226
  createdAt: timestamp('created_at').defaultNow().notNull(),
227
227
  })
228
228
 
229
- export const subscriptions = ${G}('subscriptions', {
229
+ export const subscriptions = ${y}('subscriptions', {
230
230
  id: ${S},
231
231
  organizationId: text('organization_id').notNull().references(() => organizations.id, { onDelete: 'cascade' }),
232
232
  plan: text('plan').notNull(),
@@ -234,22 +234,21 @@ export const subscriptions = ${G}('subscriptions', {
234
234
  currentPeriodEnd: timestamp('current_period_end').notNull(),
235
235
  createdAt: timestamp('created_at').defaultNow().notNull(),
236
236
  })
237
- `;return i}function Tb($,b){let G=`datasource db {
237
+ `;return G}function Tb($,b){let y=`datasource db {
238
238
  provider = "${b==="postgresql"?"postgresql":b==="mysql"?"mysql":"sqlite"}"
239
- url = env("DATABASE_URL")
240
239
  }
241
240
 
242
241
  generator client {
243
242
  provider = "prisma-client-js"
244
243
  }
245
- `;if($==="empty")return`${G}
244
+ `;if($==="empty")return`${y}
246
245
  // Define your models here
247
246
  // Example:
248
247
  // model User {
249
248
  // id String @id @default(uuid())
250
249
  // email String @unique
251
250
  // }
252
- `;if($==="starter")return`${G}
251
+ `;if($==="starter")return`${y}
253
252
 
254
253
  model User {
255
254
  id String @id @default(uuid())
@@ -258,7 +257,7 @@ model User {
258
257
  createdAt DateTime @default(now())
259
258
  updatedAt DateTime @updatedAt
260
259
  }
261
- `;if($==="blog")return`${G}
260
+ `;if($==="blog")return`${y}
262
261
 
263
262
  model User {
264
263
  id String @id @default(uuid())
@@ -304,7 +303,7 @@ model Category {
304
303
  slug String @unique
305
304
  createdAt DateTime @default(now())
306
305
  }
307
- `;if($==="ecommerce")return`${G}
306
+ `;if($==="ecommerce")return`${y}
308
307
 
309
308
  model User {
310
309
  id String @id @default(uuid())
@@ -336,7 +335,7 @@ model Order {
336
335
 
337
336
  @@index([userId])
338
337
  }
339
- `;if($==="saas")return`${G}
338
+ `;if($==="saas")return`${y}
340
339
 
341
340
  model User {
342
341
  id String @id @default(uuid())
@@ -380,7 +379,7 @@ model Subscription {
380
379
 
381
380
  @@index([organizationId])
382
381
  }
383
- `;return G}function mb($){if($==="empty")return`import { Generated } from 'kysely'
382
+ `;return y}function Zb($){if($==="empty")return`import { Generated } from 'kysely'
384
383
 
385
384
  // Define your table interfaces here
386
385
  // Example:
@@ -450,7 +449,7 @@ export interface Database {
450
449
  }
451
450
  `;return`import { Generated } from 'kysely'
452
451
 
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'
452
+ export interface Database {}`}async function Xb($){let{paths:b,database:i,template:y}=$,G=[{path:b.schemaFile,content:Qb(y,i)},{path:b.clientFile,content:Ab(i)},{path:b.configFile,content:Hb(i,b.schemaFile,b.migrationsDir)},{path:b.migrateFile,content:Jb(i)}];await k(G)}async function zb($){let{paths:b,database:i,template:y}=$,G=[{path:"prisma/schema.prisma",content:Tb(y,i)},{path:b.clientFile.replace("/db.ts","/prisma.ts"),content:Xi()},{path:"prisma.config.ts",content:zi()}];await k(G)}function Xi(){return`import { PrismaClient } from '@prisma/client'
454
453
 
455
454
  const globalForPrisma = globalThis as unknown as {
456
455
  prisma: PrismaClient | undefined
@@ -461,7 +460,20 @@ export const prisma = globalForPrisma.prisma ?? new PrismaClient()
461
460
  if (process.env.NODE_ENV !== 'production') {
462
461
  globalForPrisma.prisma = prisma
463
462
  }
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'
463
+ `}function zi(){return`import 'dotenv/config'
464
+ import { defineConfig, env } from "prisma/config";
465
+
466
+ export default defineConfig({
467
+ schema: 'prisma/schema.prisma',
468
+ migrations: {
469
+ path: 'prisma/migrations',
470
+ seed: 'tsx prisma/seed.ts',
471
+ },
472
+ datasource: {
473
+ url: env("DATABASE_URL")
474
+ }
475
+ });
476
+ `}async function Wb($){let{paths:b,database:i,template:y}=$,G=[{path:b.schemaFile,content:Zb(y)},{path:b.clientFile,content:Wi(i)},{path:b.migrateFile,content:Ki(i)}];await k(G)}function Wi($){if($==="postgresql")return`import { Kysely, PostgresDialect } from 'kysely'
465
477
  import { Pool } from 'pg'
466
478
  import type { Database } from './db/schema'
467
479
 
@@ -500,7 +512,7 @@ const dialect = new SqliteDialect({
500
512
  })
501
513
 
502
514
  export const db = new Kysely<DatabaseType>({ dialect })
503
- `}function WI($){return`import { promises as fs } from 'fs'
515
+ `}function Ki($){return`import { promises as fs } from 'fs'
504
516
  import { Migrator, FileMigrationProvider } from 'kysely'
505
517
  import { db } from '../db'
506
518
  import * as path from 'path'
@@ -535,11 +547,11 @@ async function migrateToLatest() {
535
547
  }
536
548
 
537
549
  migrateToLatest()
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"?`
550
+ `}var b2=f(U0(),1);import{Buffer as Ay}from"node:buffer";import Hy from"node:path";import Z1 from"node:child_process";import X$ from"node:process";function s$($){let b=typeof $==="string"?`
539
551
  `:`
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();
552
+ `.charCodeAt(),i=typeof $==="string"?"\r":"\r".charCodeAt();if($[$.length-1]===b)$=$.slice(0,-1);if($[$.length-1]===i)$=$.slice(0,-1);return $}import U$ from"node:process";import r from"node:path";import{fileURLToPath as m0}from"node:url";function V$($={}){let{env:b=process.env,platform:i=process.platform}=$;if(i!=="win32")return"PATH";return Object.keys(b).reverse().find((y)=>y.toUpperCase()==="PATH")||"Path"}var bI=({cwd:$=U$.cwd(),path:b=U$.env[V$()],preferLocal:i=!0,execPath:y=U$.execPath,addExecPath:G=!0}={})=>{let S=$ instanceof URL?m0($):$,I=r.resolve(S),c=[];if(i)iI(c,I);if(G)II(c,y,I);return[...c,b].join(r.delimiter)},iI=($,b)=>{let i;while(i!==b)$.push(r.join(b,"node_modules/.bin")),i=b,b=r.resolve(b,"..")},II=($,b,i)=>{let y=b instanceof URL?m0(b):b;$.push(r.resolve(i,y,".."))},R0=({env:$=U$.env,...b}={})=>{$={...$};let i=V$({env:$});return b.path=$[i],$[i]=bI(b),$};var yI=($,b,i,y)=>{if(i==="length"||i==="prototype")return;if(i==="arguments"||i==="caller")return;let G=Object.getOwnPropertyDescriptor($,i),S=Object.getOwnPropertyDescriptor(b,i);if(!GI(G,S)&&y)return;Object.defineProperty($,i,S)},GI=function($,b){return $===void 0||$.configurable||$.writable===b.writable&&$.enumerable===b.enumerable&&$.configurable===b.configurable&&($.writable||$.value===b.value)},SI=($,b)=>{let i=Object.getPrototypeOf(b);if(i===Object.getPrototypeOf($))return;Object.setPrototypeOf($,i)},cI=($,b)=>`/* Wrapped ${$}*/
553
+ ${b}`,qI=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),nI=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),MI=($,b,i)=>{let y=i===""?"":`with ${i.trim()}() `,G=cI.bind(null,y,b.toString());Object.defineProperty(G,"name",nI),Object.defineProperty($,"toString",{...qI,value:G})};function e$($,b,{ignoreNonConfigurable:i=!1}={}){let{name:y}=$;for(let G of Reflect.ownKeys(b))yI($,b,G,i);return SI($,b),MI($,b,y),$}var m$=new WeakMap,L0=($,b={})=>{if(typeof $!=="function")throw TypeError("Expected a function");let i,y=0,G=$.displayName||$.name||"<anonymous>",S=function(...I){if(m$.set(S,++y),y===1)i=$.apply(this,I),$=null;else if(b.throw===!0)throw Error(`Function \`${G}\` can only be called once`);return i};return e$(S,$),m$.set(S,y),S};L0.callCount=($)=>{if(!m$.has($))throw Error(`The given function \`${$.name}\` is not wrapped by the \`onetime\` package`);return m$.get($)};var A0=L0;import TI from"node:process";import{constants as RI}from"node:os";var H0=()=>{let $=$1-J0+1;return Array.from({length:$},VI)},VI=($,b)=>({name:`SIGRT${b+1}`,number:J0+b,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),J0=34,$1=64;import{constants as UI}from"node:os";var Q0=[{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 $=H0();return[...Q0,...$].map(mI)},mI=({name:$,number:b,description:i,action:y,forced:G=!1,standard:S})=>{let{signals:{[$]:I}}=UI,c=I!==void 0;return{name:$,number:c?I:b,description:i,supported:c,action:y,forced:G,standard:S}};var LI=()=>{let $=b1();return Object.fromEntries($.map(AI))},AI=({name:$,number:b,description:i,supported:y,action:G,forced:S,standard:I})=>[$,{name:$,number:b,description:i,supported:y,action:G,forced:S,standard:I}],T0=LI(),HI=()=>{let $=b1(),b=$1+1,i=Array.from({length:b},(y,G)=>JI(G,$));return Object.assign({},...i)},JI=($,b)=>{let i=QI($,b);if(i===void 0)return{};let{name:y,description:G,supported:S,action:I,forced:c,standard:M}=i;return{[$]:{name:y,number:$,description:G,supported:S,action:I,forced:c,standard:M}}},QI=($,b)=>{let i=b.find(({name:y})=>RI.signals[y]===$);if(i!==void 0)return i;return b.find((y)=>y.number===$)},cS=HI();var ZI=({timedOut:$,timeout:b,errorCode:i,signal:y,signalDescription:G,exitCode:S,isCanceled:I})=>{if($)return`timed out after ${b} milliseconds`;if(I)return"was canceled";if(i!==void 0)return`failed with ${i}`;if(y!==void 0)return`was killed with ${y} (${G})`;if(S!==void 0)return`failed with exit code ${S}`;return"failed"},o=({stdout:$,stderr:b,all:i,error:y,signal:G,exitCode:S,command:I,escapedCommand:c,timedOut:M,isCanceled:n,killed:V,parsed:{options:{timeout:U,cwd:m=TI.cwd()}}})=>{S=S===null?void 0:S,G=G===null?void 0:G;let T=G===void 0?void 0:T0[G].description,X=y&&y.code,P=`Command ${ZI({timedOut:M,timeout:U,errorCode:X,signal:G,signalDescription:T,exitCode:S,isCanceled:n})}: ${I}`,s=Object.prototype.toString.call(y)==="[object Error]",e=s?`${P}
554
+ ${y.message}`:P,$$=[e,b,$].filter(Boolean).join(`
555
+ `);if(s)y.originalMessage=y.message,y.message=$$;else y=Error($$);if(y.shortMessage=e,y.command=I,y.escapedCommand=c,y.exitCode=S,y.signal=G,y.signalDescription=T,y.stdout=$,y.stderr=b,y.cwd=m,i!==void 0)y.all=i;if("bufferedData"in y)delete y.bufferedData;return y.failed=!0,y.timedOut=Boolean(M),y.isCanceled=n,y.killed=V&&!M,y};var R$=["stdin","stdout","stderr"],XI=($)=>R$.some((b)=>$[b]!==void 0),Z0=($)=>{if(!$)return;let{stdio:b}=$;if(b===void 0)return R$.map((y)=>$[y]);if(XI($))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${R$.map((y)=>`\`${y}\``).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,R$.length);return Array.from({length:i},(y,G)=>b[G])};import KI 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 L$=($)=>!!$&&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"),I1=globalThis,zI=Object.defineProperty.bind(Object);class X0{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(I1[i1])return I1[i1];zI(I1,i1,{value:this,writable:!1,enumerable:!1,configurable:!1})}on($,b){this.listeners[$].push(b)}removeListener($,b){let i=this.listeners[$],y=i.indexOf(b);if(y===-1)return;if(y===0&&i.length===1)i.length=0;else i.splice(y,1)}emit($,b,i){if(this.emitted[$])return!1;this.emitted[$]=!0;let y=!1;for(let G of this.listeners[$])y=G(b,i)===!0||y;if($==="exit")y=this.emit("afterExit",b,i)||y;return y}}class G1{}var WI=($)=>{return{onExit(b,i){return $.onExit(b,i)},load(){return $.load()},unload(){return $.unload()}}};class z0 extends G1{onExit(){return()=>{}}load(){}unload(){}}class W0 extends G1{#S=y1.platform==="win32"?"SIGINT":"SIGHUP";#b=new X0;#$;#y;#G;#I={};#i=!1;constructor($){super();this.#$=$,this.#I={};for(let b of x)this.#I[b]=()=>{let i=this.#$.listeners(b),{count:y}=this.#b,G=$;if(typeof G.__signal_exit_emitter__==="object"&&typeof G.__signal_exit_emitter__.count==="number")y+=G.__signal_exit_emitter__.count;if(i.length===y){this.unload();let S=this.#b.emit("exit",null,b),I=b==="SIGHUP"?this.#S:b;if(!S)$.kill($.pid,I)}};this.#G=$.reallyExit,this.#y=$.emit}onExit($,b){if(!L$(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.#I[$];if(b)this.#$.on($,b)}catch(b){}this.#$.emit=($,...b)=>{return this.#q($,...b)},this.#$.reallyExit=($)=>{return this.#c($)}}unload(){if(!this.#i)return;this.#i=!1,x.forEach(($)=>{let b=this.#I[$];if(!b)throw Error("Listener not defined for signal: "+$);try{this.#$.removeListener($,b)}catch(i){}}),this.#$.emit=this.#y,this.#$.reallyExit=this.#G,this.#b.count-=1}#c($){if(!L$(this.#$))return 0;return this.#$.exitCode=$||0,this.#b.emit("exit",this.#$.exitCode,null),this.#G.call(this.#$,this.#$.exitCode)}#q($,...b){let i=this.#y;if($==="exit"&&L$(this.#$)){if(typeof b[0]==="number")this.#$.exitCode=b[0];let y=i.call(this.#$,$,...b);return this.#b.emit("exit",this.#$.exitCode,null),y}else return i.call(this.#$,$,...b)}}var y1=globalThis.process,{onExit:K0,load:LS,unload:AS}=WI(L$(y1)?new W0(y1):new z0);var BI=5000,B0=($,b="SIGTERM",i={})=>{let y=$(b);return YI($,b,i,y),y},YI=($,b,i,y)=>{if(!NI(b,i,y))return;let G=vI(i),S=setTimeout(()=>{$("SIGKILL")},G);if(S.unref)S.unref()},NI=($,{forceKillAfterTimeout:b},i)=>jI($)&&b!==!1&&i,jI=($)=>$===KI.constants.signals.SIGTERM||typeof $==="string"&&$.toUpperCase()==="SIGTERM",vI=({forceKillAfterTimeout:$=!0})=>{if($===!0)return BI;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},wI=($,b,i)=>{$.kill(b),i(Object.assign(Error("Timed out"),{timedOut:!0,signal:b}))},N0=($,{timeout:b,killSignal:i="SIGTERM"},y)=>{if(b===0||b===void 0)return y;let G,S=new Promise((c,M)=>{G=setTimeout(()=>{wI($,i,M)},b)}),I=y.finally(()=>{clearTimeout(G)});return Promise.race([S,I])},j0=({timeout:$})=>{if($!==void 0&&(!Number.isFinite($)||$<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${$}\` (${typeof $})`)},v0=async($,{cleanup:b,detached:i},y)=>{if(!b||i)return y;let G=K0(()=>{$.kill()});return y.finally(()=>{G()})};import{createWriteStream as _I}from"node:fs";import{ChildProcess as OI}from"node:child_process";function A$($){return $!==null&&typeof $==="object"&&typeof $.pipe==="function"}function S1($){return A$($)&&$.writable!==!1&&typeof $._write==="function"&&typeof $._writableState==="object"}var xI=($)=>$ instanceof OI&&typeof $.then==="function",c1=($,b,i)=>{if(typeof i==="string")return $[b].pipe(_I(i)),$;if(S1(i))return $[b].pipe(i),$;if(!xI(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},w0=($)=>{if($.stdout!==null)$.pipeStdout=c1.bind(void 0,$,"stdout");if($.stderr!==null)$.pipeStderr=c1.bind(void 0,$,"stderr");if($.all!==void 0)$.pipeAll=c1.bind(void 0,$,"all")};import{createReadStream as eI,readFileSync as $y}from"node:fs";import{setTimeout as by}from"node:timers/promises";var D=async($,{init:b,convertChunk:i,getSize:y,truncateChunk:G,addChunk:S,getFinalChunk:I,finalize:c},{maxBuffer:M=Number.POSITIVE_INFINITY}={})=>{if(!fI($))throw Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");let n=b();n.length=0;try{for await(let V of $){let U=tI(V),m=i[U](V,n);x0({convertedChunk:m,state:n,getSize:y,truncateChunk:G,addChunk:S,maxBuffer:M})}return PI({state:n,convertChunk:i,getSize:y,truncateChunk:G,addChunk:S,getFinalChunk:I,maxBuffer:M}),c(n)}catch(V){throw V.bufferedData=c(n),V}},PI=({state:$,getSize:b,truncateChunk:i,addChunk:y,getFinalChunk:G,maxBuffer:S})=>{let I=G($);if(I!==void 0)x0({convertedChunk:I,state:$,getSize:b,truncateChunk:i,addChunk:y,maxBuffer:S})},x0=({convertedChunk:$,state:b,getSize:i,truncateChunk:y,addChunk:G,maxBuffer:S})=>{let I=i($),c=b.length+I;if(c<=S){_0($,b,G,c);return}let M=y($,S-b.length);if(M!==void 0)_0(M,b,G,S);throw new q1},_0=($,b,i,y)=>{b.contents=i($,b,y),b.length=y},fI=($)=>typeof $==="object"&&$!==null&&typeof $[Symbol.asyncIterator]==="function",tI=($)=>{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 q1 extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}var n1=($)=>$,M1=()=>{return},V1=({contents:$})=>$,H$=($)=>{throw Error(`Streams in object mode are not supported: ${String($)}`)},J$=($)=>$.length;async function U1($,b){return D($,aI,b)}var hI=()=>({contents:new ArrayBuffer(0)}),EI=($)=>CI.encode($),CI=new TextEncoder,P0=($)=>new Uint8Array($),f0=($)=>new Uint8Array($.buffer,$.byteOffset,$.byteLength),kI=($,b)=>$.slice(0,b),uI=($,{contents:b,length:i},y)=>{let G=E0()?FI(b,y):gI(b,y);return new Uint8Array(G).set($,i),G},gI=($,b)=>{if(b<=$.byteLength)return $;let i=new ArrayBuffer(h0(b));return new Uint8Array(i).set(new Uint8Array($),0),i},FI=($,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,lI=({contents:$,length:b})=>E0()?$:$.slice(0,b),E0=()=>("resize"in ArrayBuffer.prototype),aI={init:hI,convertChunk:{string:EI,buffer:P0,arrayBuffer:P0,dataView:f0,typedArray:f0,others:H$},getSize:J$,truncateChunk:kI,addChunk:uI,getFinalChunk:M1,finalize:lI};async function Q$($,b){if(!("Buffer"in globalThis))throw Error("getStreamAsBuffer() is only supported in Node.js");try{return C0(await U1($,b))}catch(i){if(i.bufferedData!==void 0)i.bufferedData=C0(i.bufferedData);throw i}}var C0=($)=>globalThis.Buffer.from($);async function m1($,b){return D($,pI,b)}var dI=()=>({contents:"",textDecoder:new TextDecoder}),T$=($,{textDecoder:b})=>b.decode($,{stream:!0}),rI=($,{contents:b})=>b+$,oI=($,b)=>$.slice(0,b),DI=({textDecoder:$})=>{let b=$.decode();return b===""?void 0:b},pI={init:dI,convertChunk:{string:n1,buffer:T$,arrayBuffer:T$,dataView:T$,typedArray:T$,others:H$},getSize:J$,truncateChunk:oI,addChunk:rI,getFinalChunk:DI,finalize:V1};var g0=f(u0(),1),F0=($)=>{if($!==void 0)throw TypeError("The `input` and `inputFile` options cannot be both set.")},iy=({input:$,inputFile:b})=>{if(typeof b!=="string")return $;return F0($),$y(b)},l0=($)=>{let b=iy($);if(A$(b))throw TypeError("The `input` option cannot be a stream in sync mode");return b},Iy=({input:$,inputFile:b})=>{if(typeof b!=="string")return $;return F0($),eI(b)},a0=($,b)=>{let i=Iy(b);if(i===void 0)return;if(A$(i))i.pipe($.stdin);else $.stdin.end(i)},d0=($,{all:b})=>{if(!b||!$.stdout&&!$.stderr)return;let i=g0.default();if($.stdout)i.add($.stdout);if($.stderr)i.add($.stderr);return i},R1=async($,b)=>{if(!$||b===void 0)return;await by(0),$.destroy();try{return await b}catch(i){return i.bufferedData}},L1=($,{encoding:b,buffer:i,maxBuffer:y})=>{if(!$||!i)return;if(b==="utf8"||b==="utf-8")return m1($,{maxBuffer:y});if(b===null||b==="buffer")return Q$($,{maxBuffer:y});return yy($,y,b)},yy=async($,b,i)=>{return(await Q$($,{maxBuffer:b})).toString(i)},r0=async({stdout:$,stderr:b,all:i},{encoding:y,buffer:G,maxBuffer:S},I)=>{let c=L1($,{encoding:y,buffer:G,maxBuffer:S}),M=L1(b,{encoding:y,buffer:G,maxBuffer:S}),n=L1(i,{encoding:y,buffer:G,maxBuffer:S*2});try{return await Promise.all([I,c,M,n])}catch(V){return Promise.all([{error:V,signal:V.signal,timedOut:V.timedOut},R1($,c),R1(b,M),R1(i,n)])}};var Gy=(async()=>{})().constructor.prototype,Sy=["then","catch","finally"].map(($)=>[$,Reflect.getOwnPropertyDescriptor(Gy,$)]),A1=($,b)=>{for(let[i,y]of Sy){let G=typeof b==="function"?(...S)=>Reflect.apply(y.value,b(),S):y.value.bind(b);Reflect.defineProperty($,i,{...y,value:G})}},o0=($)=>new Promise((b,i)=>{if($.on("exit",(y,G)=>{b({exitCode:y,signal:G})}),$.on("error",(y)=>{i(y)}),$.stdin)$.stdin.on("error",(y)=>{i(y)})});import{Buffer as cy}from"node:buffer";import{ChildProcess as qy}from"node:child_process";var s0=($,b=[])=>{if(!Array.isArray(b))return[$];return[$,...b]},ny=/^[\w.-]+$/,My=($)=>{if(typeof $!=="string"||ny.test($))return $;return`"${$.replaceAll('"',"\\\"")}"`},H1=($,b)=>s0($,b).join(" "),J1=($,b)=>s0($,b).map((i)=>My(i)).join(" "),Vy=/ +/g;var D0=($)=>{let b=typeof $;if(b==="string")return $;if(b==="number")return String($);if(b==="object"&&$!==null&&!($ instanceof qy)&&"stdout"in $){let i=typeof $.stdout;if(i==="string")return $.stdout;if(cy.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)],Uy=({templates:$,expressions:b,tokens:i,index:y,template:G})=>{let S=G??$.raw[y],I=S.split(Vy).filter(Boolean),c=p0(i,I,S.startsWith(" "));if(y===b.length)return c;let M=b[y],n=Array.isArray(M)?M.map((V)=>D0(V)):[D0(M)];return p0(c,n,S.endsWith(" "))},Q1=($,b)=>{let i=[];for(let[y,G]of $.entries())i=Uy({templates:$,expressions:b,tokens:i,index:y,template:G});return i};import{debuglog as my}from"node:util";import Ry from"node:process";var e0=my("execa").enabled,Z$=($,b)=>String($).padStart(b,"0"),Ly=()=>{let $=new Date;return`${Z$($.getHours(),2)}:${Z$($.getMinutes(),2)}:${Z$($.getSeconds(),2)}.${Z$($.getMilliseconds(),3)}`},T1=($,{verbose:b})=>{if(!b)return;Ry.stderr.write(`[${Ly()}] ${$}
556
+ `)};var Jy=1e8,Qy=({env:$,extendEnv:b,preferLocal:i,localDir:y,execPath:G})=>{let S=b?{...X$.env,...$}:$;if(i)return R0({env:S,cwd:y,execPath:G});return S},i2=($,b,i={})=>{let y=b2.default._parse($,b,i);if($=y.command,b=y.args,i=y.options,i={maxBuffer:Jy,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=Qy(i),i.stdio=Z0(i),X$.platform==="win32"&&Hy.basename($,".exe")==="cmd")b.unshift("/q");return{file:$,args:b,options:i,parsed:y}},p=($,b,i)=>{if(typeof b!=="string"&&!Ay.isBuffer(b))return i===void 0?void 0:"";if($.stripFinalNewline)return s$(b);return b};function z$($,b,i){let y=i2($,b,i),G=H1($,b),S=J1($,b);T1(S,y.options),j0(y.options);let I;try{I=Z1.spawn(y.file,y.args,y.options)}catch(T){let X=new Z1.ChildProcess,j=Promise.reject(o({error:T,stdout:"",stderr:"",all:"",command:G,escapedCommand:S,parsed:y,timedOut:!1,isCanceled:!1,killed:!1}));return A1(X,j),X}let c=o0(I),M=N0(I,y.options,c),n=v0(I,y.options,M),V={isCanceled:!1};I.kill=B0.bind(null,I.kill.bind(I)),I.cancel=Y0.bind(null,I,V);let m=A0(async()=>{let[{error:T,exitCode:X,signal:j,timedOut:P},s,e,$$]=await r0(I,y.options,n),X1=p(y.options,s),z1=p(y.options,e),W1=p(y.options,$$);if(T||X!==0||j!==null){let K1=o({error:T,exitCode:X,signal:j,stdout:X1,stderr:z1,all:W1,command:G,escapedCommand:S,parsed:y,timedOut:P,isCanceled:V.isCanceled||(y.options.signal?y.options.signal.aborted:!1),killed:I.killed});if(!y.options.reject)return K1;throw K1}return{command:G,escapedCommand:S,exitCode:0,stdout:X1,stderr:z1,all:W1,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return a0(I,y.options),I.all=d0(I,y.options),w0(I),A1(I,m),I}function Ty($,b,i){let y=i2($,b,i),G=H1($,b),S=J1($,b);T1(S,y.options);let I=l0(y.options),c;try{c=Z1.spawnSync(y.file,y.args,{...y.options,input:I})}catch(V){throw o({error:V,stdout:"",stderr:"",all:"",command:G,escapedCommand:S,parsed:y,timedOut:!1,isCanceled:!1,killed:!1})}let M=p(y.options,c.stdout,c.error),n=p(y.options,c.stderr,c.error);if(c.error||c.status!==0||c.signal!==null){let V=o({stdout:M,stderr:n,error:c.error,signal:c.signal,exitCode:c.status,command:G,escapedCommand:S,parsed:y,timedOut:c.error&&c.error.code==="ETIMEDOUT",isCanceled:!1,killed:c.signal!==null});if(!y.options.reject)return V;throw V}return{command:G,escapedCommand:S,exitCode:0,stdout:M,stderr:n,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}var Zy=({input:$,inputFile:b,stdio:i})=>$===void 0&&b===void 0&&i===void 0?{stdin:"inherit"}:{},$2=($={})=>({preferLocal:!0,...Zy($),...$});function I2($){function b(i,...y){if(!Array.isArray(i))return I2({...$,...i});let[G,...S]=Q1(i,y);return z$(G,S,$2($))}return b.sync=(i,...y)=>{if(!Array.isArray(i))throw TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");let[G,...S]=Q1(i,y);return Ty(G,S,$2($))},b}var Xc=I2();import{readFile as Xy,writeFile as zy}from"node:fs/promises";function y2($,b){if(b==="prisma")return"";switch($){case"postgresql":return b==="kysely"?"pg":"postgres";case"mysql":return"mysql2";case"sqlite":return"better-sqlite3"}}async function G2($,b,i,y){let G=[],S=[];switch(b){case"drizzle":G=["drizzle-orm",y2(i,b)],S=["drizzle-kit"];break;case"prisma":G=["@prisma/client"],S=["prisma"];break;case"kysely":G=["kysely",y2(i,b)],S=[];break}let I=$==="npm"?"install":"add",c=$==="npm"?"--save-dev":"-D";if(G.length>0)await z$($,[I,...G],{stdio:"inherit"});if(S.length>0)await z$($,[I,c,...S],{stdio:"inherit"})}async function S2($,b){let y=await Xy("package.json","utf-8"),G=JSON.parse(y),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}G.scripts={...G.scripts,...S},await zy("package.json",JSON.stringify(G,null,2)+`
557
+ `)}async function Wy(){console.clear(),e1(R.bold.blue("\uD83D\uDDC4️ ORM Setup CLI v1.0.0"));try{let $=bb();$.start("Analyzing your project...");let b=await mb();if($.stop("Project analyzed"),Z.info(`${R.green("✓")} ${b.hasTypescript?"TypeScript":"JavaScript"} project`),Z.info(`${R.green("✓")} Package manager: ${b.packageManager}`),b.srcDir)Z.info(`${R.green("✓")} Source directory: ${b.srcDir}/`);if(b.database.url)Z.info(`${R.green("✓")} Database: ${b.database.type} (from .env)`);else Z.warn(`${R.yellow("!")} No DATABASE_URL found in .env`);if(b.hasDrizzle){if(Z.warn(`${R.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 Rb(b),y=Lb(b.srcDir,i.clientPath);switch($.start("Installing dependencies..."),await G2(b.packageManager,i.orm,i.database,i.includeStudio),$.stop("Dependencies installed"),$.start("Generating files..."),i.orm){case"drizzle":await Xb({paths:y,database:i.database,template:i.template,typescript:b.hasTypescript});break;case"prisma":await zb({paths:y,database:i.database,template:i.template});break;case"kysely":await Wb({paths:y,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(R.green.bold(`✅ ${i.orm==="drizzle"?"Drizzle":i.orm==="prisma"?"Prisma":"Kysely"} ORM setup complete!`)),console.log(),Z.step("Import your database client:"),i.orm==="drizzle")console.log(R.cyan(" import { db } from '@/lib/db'"));else if(i.orm==="prisma")console.log(R.cyan(" import { prisma } from '@/lib/prisma'"));else console.log(R.cyan(" import { db } from '@/lib/db'"));if(console.log(),Z.step("Next steps:"),i.orm==="drizzle"){if(console.log(` ${R.gray("1.")} Add DATABASE_URL to .env`),console.log(` ${R.gray("2.")} Run: ${R.cyan("bun db:generate")} (create migration)`),console.log(` ${R.gray("3.")} Run: ${R.cyan("bun db:migrate")} (apply migration)`),i.includeStudio)console.log(` ${R.gray("4.")} Run: ${R.cyan("bun db:studio")} (open database GUI)`)}else if(i.orm==="prisma")console.log(` ${R.gray("1.")} Add DATABASE_URL to .env`),console.log(` ${R.gray("2.")} Run: ${R.cyan("bun db:generate")} (generate client)`),console.log(` ${R.gray("3.")} Run: ${R.cyan("bun db:migrate")} (create & apply migration)`),console.log(` ${R.gray("4.")} Run: ${R.cyan("bun db:studio")} (open Prisma Studio)`);else console.log(` ${R.gray("1.")} Add DATABASE_URL to .env`),console.log(` ${R.gray("2.")} Create migrations in migrations/ folder`),console.log(` ${R.gray("3.")} Run: ${R.cyan("bun db:migrate")} (apply migrations)`);console.log();let G=i.orm==="drizzle"?"https://orm.drizzle.team/docs":i.orm==="prisma"?"https://www.prisma.io/docs":"https://kysely.dev/docs";Z.info(`Documentation: ${R.cyan(G)}`)}catch($){if($ instanceof Error)Z.error(R.red(`Error: ${$.message}`));process.exit(1)}}Wy();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sidgaikwad/orm-setup",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Framework-agnostic CLI for setting up Drizzle, Prisma, or Kysely ORM with best practices",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",