@prisma/cli-dev 0.15.0 → 0.16.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,3 +1,3 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{b as r}from"./chunk-J2PYT4A5.js";var e=" ".repeat(3);function a(t){return`${e}- ${t.map(n=>`${r(n.name)}`).join(`
2
+ import{b as r}from"./chunk-P5JORAQS.js";var e=" ".repeat(3);function a(t){return`${e}- ${t.map(n=>`${r(n.name)}`).join(`
3
3
  ${e}- `)}`}export{a};
@@ -24,8 +24,8 @@ ${t}`)}formatType(D,e,F){let t=aD[D.type]||ED[D.level]||"gray";if(e)return cD(t)
24
24
  `+t.join(`
25
25
  `):""),D.type==="trace"){let c=new Error("Trace: "+D.message);C+=this.formatStack(c.stack||"",c.message)}return n?`
26
26
  `+C+`
27
- `:C}};function R(u){return u.replace(/`([^`]+)`/gm,(D,e)=>l.cyan(e)).replace(/\s+_([^_]+)_\s+/gm,(D,e)=>` ${l.underline(e)} `)}function lD(u="white"){return l[u]||l.white}function cD(u="bgWhite"){return l[`bg${u[0].toUpperCase()}${u.slice(1)}`]||l.bgWhite}function fD(u={}){let D=BD();return process.env.CONSOLA_LEVEL&&(D=Number.parseInt(process.env.CONSOLA_LEVEL)??D),K({level:D,defaults:{level:D},stdout:process.stdout,stderr:process.stderr,prompt:(...F)=>import("./prompt-KJRFDAR5.js").then(t=>t.prompt(...F)),reporters:u.reporters||[u.fancy??!(Y||V)?new G:new I],...u})}function BD(){return Pu?B.debug:V?B.warn:B.info}var T=fD();import"tty";function AD(u){return Array.isArray(u)?u:u===void 0?[]:[u]}function H(u,D=""){let e=[];for(let F of u)for(let[t,r]of F.entries())e[t]=Math.max(e[t]||0,r.length);return u.map(F=>F.map((t,r)=>D+t[r===0?"padStart":"padEnd"](e[r])).join(" ")).join(`
27
+ `:C}};function R(u){return u.replace(/`([^`]+)`/gm,(D,e)=>l.cyan(e)).replace(/\s+_([^_]+)_\s+/gm,(D,e)=>` ${l.underline(e)} `)}function lD(u="white"){return l[u]||l.white}function cD(u="bgWhite"){return l[`bg${u[0].toUpperCase()}${u.slice(1)}`]||l.bgWhite}function fD(u={}){let D=BD();return process.env.CONSOLA_LEVEL&&(D=Number.parseInt(process.env.CONSOLA_LEVEL)??D),K({level:D,defaults:{level:D},stdout:process.stdout,stderr:process.stderr,prompt:(...F)=>import("./prompt-6R3LQ3NZ.js").then(t=>t.prompt(...F)),reporters:u.reporters||[u.fancy??!(Y||V)?new G:new I],...u})}function BD(){return Pu?B.debug:V?B.warn:B.info}var T=fD();import"tty";function AD(u){return Array.isArray(u)?u:u===void 0?[]:[u]}function H(u,D=""){let e=[];for(let F of u)for(let[t,r]of F.entries())e[t]=Math.max(e[t]||0,r.length);return u.map(F=>F.map((t,r)=>D+t[r===0?"padStart":"padEnd"](e[r])).join(" ")).join(`
28
28
  `)}function h(u){return typeof u=="function"?u():u}var L=class extends Error{constructor(D,e){super(D),this.code=e,this.name="CLIError"}},pD=/\d/,gD=["-","_","/","."];function hD(u=""){if(!pD.test(u))return u!==u.toLowerCase()}function iu(u,D){let e=D??gD,F=[];if(!u||typeof u!="string")return F;let t="",r,o;for(let n of u){let s=e.includes(n);if(s===!0){F.push(t),t="",r=void 0;continue}let a=hD(n);if(o===!1){if(r===!1&&a===!0){F.push(t),t=n,r=a;continue}if(r===!0&&a===!1&&t.length>1){let C=t.at(-1);F.push(t.slice(0,Math.max(0,t.length-1))),t=C+n,r=a;continue}}t+=n,r=a,o=s}return F.push(t),F}function dD(u){return u?u[0].toUpperCase()+u.slice(1):""}function mD(u){return u?u[0].toLowerCase()+u.slice(1):""}function _D(u,D){return u?(Array.isArray(u)?u:iu(u)).map(e=>dD(D?.normalize?e.toLowerCase():e)).join(""):""}function yD(u,D){return mD(_D(u||"",D))}function bD(u,D){return u?(Array.isArray(u)?u:iu(u)).map(e=>e.toLowerCase()).join(D??"-"):""}function q(u){return u==null?[]:Array.isArray(u)?u:[u]}function LD(u,D,e,F){let t,r=u[D],o=~F.string.indexOf(D)?e==null||e===!0?"":String(e):typeof e=="boolean"?e:~F.boolean.indexOf(D)?e==="false"?!1:e==="true"||(u._.push((t=+e,t*0===0?t:e)),!!e):(t=+e,t*0===0?t:e);u[D]=r==null?o:Array.isArray(r)?r.concat(o):[r,o]}function wD(u=[],D={}){let e,F,t,r,o,n={_:[]},s=0,a=0,C=0,A=u.length,g=D.alias!==void 0,i=D.unknown!==void 0,c=D.default!==void 0;if(D.alias=D.alias||{},D.string=q(D.string),D.boolean=q(D.boolean),g)for(e in D.alias)for(F=D.alias[e]=q(D.alias[e]),s=0;s<F.length;s++)(D.alias[F[s]]=F.concat(e)).splice(s,1);for(s=D.boolean.length;s-- >0;)for(F=D.alias[D.boolean[s]]||[],a=F.length;a-- >0;)D.boolean.push(F[a]);for(s=D.string.length;s-- >0;)for(F=D.alias[D.string[s]]||[],a=F.length;a-- >0;)D.string.push(F[a]);if(c){for(e in D.default)if(r=typeof D.default[e],F=D.alias[e]=D.alias[e]||[],D[r]!==void 0)for(D[r].push(e),s=0;s<F.length;s++)D[r].push(F[s])}let p=i?Object.keys(D.alias):[];for(s=0;s<A;s++){if(t=u[s],t==="--"){n._=n._.concat(u.slice(++s));break}for(a=0;a<t.length&&t.charCodeAt(a)===45;a++);if(a===0)n._.push(t);else if(t.substring(a,a+3)==="no-"){if(r=t.slice(Math.max(0,a+3)),i&&!~p.indexOf(r))return D.unknown(t);n[r]=!1}else{for(C=a+1;C<t.length&&t.charCodeAt(C)!==61;C++);for(r=t.substring(a,C),o=t.slice(Math.max(0,++C))||s+1===A||(""+u[s+1]).charCodeAt(0)===45||u[++s],F=a===2?[r]:r,C=0;C<F.length;C++){if(r=F[C],i&&!~p.indexOf(r))return D.unknown("-".repeat(a)+r);LD(n,r,C+1<F.length||o,D)}}}if(c)for(e in D.default)n[e]===void 0&&(n[e]=D.default[e]);if(g)for(e in n)for(F=D.alias[e]||[];F.length>0;)n[F.shift()]=n[e];return n}function TD(u,D){let e={boolean:[],string:[],mixed:[],alias:{},default:{}},F=au(D);for(let n of F)n.type!=="positional"&&(n.type==="string"?e.string.push(n.name):n.type==="boolean"&&e.boolean.push(n.name),n.default!==void 0&&(e.default[n.name]=n.default),n.alias&&(e.alias[n.name]=n.alias));let t=wD(u,e),[...r]=t._,o=new Proxy(t,{get(n,s){return n[s]??n[yD(s)]??n[bD(s)]}});for(let[,n]of F.entries())if(n.type==="positional"){let s=r.shift();if(s!==void 0)o[n.name]=s;else{if(n.default===void 0&&n.required!==!1)throw new L(`Missing required positional argument: ${n.name.toUpperCase()}`,"EARG");o[n.name]=n.default}}else if(n.required&&o[n.name]===void 0)throw new L(`Missing required argument: --${n.name}`,"EARG");return o}function au(u){let D=[];for(let[e,F]of Object.entries(u||{}))D.push({...F,name:e,alias:AD(F.alias)});return D}async function Eu(u,D){let e=await h(u.args||{}),F=TD(D.rawArgs,e),t={rawArgs:D.rawArgs,args:F,data:D.data,cmd:u};typeof u.setup=="function"&&await u.setup(t);let r;try{let o=await h(u.subCommands);if(o&&Object.keys(o).length>0){let n=D.rawArgs.findIndex(a=>!a.startsWith("-")),s=D.rawArgs[n];if(s){if(!o[s])throw new L(`Unknown command \`${s}\``,"E_UNKNOWN_COMMAND");let a=await h(o[s]);a&&await Eu(a,{rawArgs:D.rawArgs.slice(n+1)})}else if(!u.run)throw new L("No command specified.","E_NO_COMMAND")}typeof u.run=="function"&&(r=await u.run(t))}finally{typeof u.cleanup=="function"&&await u.cleanup(t)}return{result:r}}async function z(u,D,e){let F=await h(u.subCommands);if(F&&Object.keys(F).length>0){let t=D.findIndex(n=>!n.startsWith("-")),r=D[t],o=await h(F[r]);if(o)return z(o,D.slice(t+1),u)}return[u,e]}async function ID(u,D){try{T.log(await SD(u,D)+`
29
29
  `)}catch(e){T.error(e)}}async function SD(u,D){let e=await h(u.meta||{}),F=au(await h(u.args||{})),t=await h(D?.meta||{}),r=`${t.name?`${t.name} `:""}`+(e.name||process.argv[1]),o=[],n=[],s=[],a=[];for(let i of F)if(i.type==="positional"){let c=i.name.toUpperCase(),p=i.required!==!1&&i.default===void 0,m=i.default?`="${i.default}"`:"";n.push(["`"+c+m+"`",i.description||"",i.valueHint?`<${i.valueHint}>`:""]),a.push(p?`<${c}>`:`[${c}]`)}else{let c=i.required===!0&&i.default===void 0,p=(i.type==="boolean"&&i.default===!0?[...(i.alias||[]).map(m=>`--no-${m}`),`--no-${i.name}`].join(", "):[...(i.alias||[]).map(m=>`-${m}`),`--${i.name}`].join(", "))+(i.type==="string"&&(i.valueHint||i.default)?`=${i.valueHint?`<${i.valueHint}>`:`"${i.default||""}"`}`:"");o.push(["`"+p+(c?" (required)":"")+"`",i.description||""]),c&&a.push(p)}if(u.subCommands){let i=[],c=await h(u.subCommands);for(let[p,m]of Object.entries(c)){let Cu=await h(m),lu=await h(Cu?.meta);s.push([`\`${p}\``,lu?.description||""]),i.push(p)}a.push(i.join("|"))}let C=[],A=e.version||t.version;C.push(l.gray(`${e.description} (${r+(A?` v${A}`:"")})`),"");let g=o.length>0||n.length>0;return C.push(`${l.underline(l.bold("USAGE"))} \`${r}${g?" [OPTIONS]":""} ${a.join(" ")}\``,""),n.length>0&&(C.push(l.underline(l.bold("ARGUMENTS")),""),C.push(H(n," ")),C.push("")),o.length>0&&(C.push(l.underline(l.bold("OPTIONS")),""),C.push(H(o," ")),C.push("")),s.length>0&&(C.push(l.underline(l.bold("COMMANDS")),""),C.push(H(s," ")),C.push("",`Use \`${r} <command> --help\` for more information about a command.`)),C.filter(i=>typeof i=="string").join(`
30
30
  `)}async function De(u,D={}){let e=D.rawArgs||process.argv.slice(2),F=D.showUsage||ID;try{if(e.includes("--help")||e.includes("-h"))await F(...await z(u,e)),process.exit(0);else if(e.length===1&&e[0]==="--version"){let t=typeof u.meta=="function"?await u.meta():await u.meta;if(!t?.version)throw new L("No version specified","E_NO_VERSION");T.log(t.version)}else await Eu(u,{rawArgs:e})}catch(t){let r=t instanceof L;r||T.error(t,`
31
- `),r&&await F(...await z(u,e)),T.error(t.message),process.exit(1)}}var te={debug:{default:!1,description:"Enable debug logging. Defaults to `false`.",required:!1,type:"boolean"}};export{B as a,Su as b,W as c,T as d,De as e,te as f};
31
+ `),r&&await F(...await z(u,e)),T.error(t.message),process.exit(1)}}var te={debug:{default:!1,description:"Enable debug logging. Defaults to `false`.",required:!1,type:"boolean"}};export{B as a,Su as b,T as c,De as d,te as e};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{b as c}from"./chunk-4QNO2WQL.js";import{a as W,c as j}from"./chunk-M6TFCQLD.js";var K=W((Su,Y)=>{"use strict";var R={to(t,u){return u?`\x1B[${u+1};${t+1}H`:`\x1B[${t+1}G`},move(t,u){let e="";return t<0?e+=`\x1B[${-t}D`:t>0&&(e+=`\x1B[${t}C`),u<0?e+=`\x1B[${-u}A`:u>0&&(e+=`\x1B[${u}B`),e},up:(t=1)=>`\x1B[${t}A`,down:(t=1)=>`\x1B[${t}B`,forward:(t=1)=>`\x1B[${t}C`,backward:(t=1)=>`\x1B[${t}D`,nextLine:(t=1)=>"\x1B[E".repeat(t),prevLine:(t=1)=>"\x1B[F".repeat(t),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},OD={up:(t=1)=>"\x1B[S".repeat(t),down:(t=1)=>"\x1B[T".repeat(t)},yD={screen:"\x1B[2J",up:(t=1)=>"\x1B[1J".repeat(t),down:(t=1)=>"\x1B[J".repeat(t),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(t){let u="";for(let e=0;e<t;e++)u+=this.line+(e<t-1?R.up():"");return t&&(u+=R.left),u}};Y.exports={cursor:R,scroll:OD,erase:yD,beep:"\x07"}});var Z=W((Tu,L)=>{"use strict";var I=process||{},z=I.argv||[],x=I.env||{},RD=!(x.NO_COLOR||z.includes("--no-color"))&&(!!x.FORCE_COLOR||z.includes("--color")||I.platform==="win32"||(I.stdout||{}).isTTY&&x.TERM!=="dumb"||!!x.CI),LD=(t,u,e=t)=>s=>{let r=""+s,i=r.indexOf(u,t.length);return~i?t+$D(r,u,e,i)+u:t+r+u},$D=(t,u,e,s)=>{let r="",i=0;do r+=t.substring(i,s)+e,i=s+u.length,s=t.indexOf(u,i);while(~s);return r+t.substring(i)},H=(t=RD)=>{let u=t?LD:()=>String;return{isColorSupported:t,reset:u("\x1B[0m","\x1B[0m"),bold:u("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:u("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:u("\x1B[3m","\x1B[23m"),underline:u("\x1B[4m","\x1B[24m"),inverse:u("\x1B[7m","\x1B[27m"),hidden:u("\x1B[8m","\x1B[28m"),strikethrough:u("\x1B[9m","\x1B[29m"),black:u("\x1B[30m","\x1B[39m"),red:u("\x1B[31m","\x1B[39m"),green:u("\x1B[32m","\x1B[39m"),yellow:u("\x1B[33m","\x1B[39m"),blue:u("\x1B[34m","\x1B[39m"),magenta:u("\x1B[35m","\x1B[39m"),cyan:u("\x1B[36m","\x1B[39m"),white:u("\x1B[37m","\x1B[39m"),gray:u("\x1B[90m","\x1B[39m"),bgBlack:u("\x1B[40m","\x1B[49m"),bgRed:u("\x1B[41m","\x1B[49m"),bgGreen:u("\x1B[42m","\x1B[49m"),bgYellow:u("\x1B[43m","\x1B[49m"),bgBlue:u("\x1B[44m","\x1B[49m"),bgMagenta:u("\x1B[45m","\x1B[49m"),bgCyan:u("\x1B[46m","\x1B[49m"),bgWhite:u("\x1B[47m","\x1B[49m"),blackBright:u("\x1B[90m","\x1B[39m"),redBright:u("\x1B[91m","\x1B[39m"),greenBright:u("\x1B[92m","\x1B[39m"),yellowBright:u("\x1B[93m","\x1B[39m"),blueBright:u("\x1B[94m","\x1B[39m"),magentaBright:u("\x1B[95m","\x1B[39m"),cyanBright:u("\x1B[96m","\x1B[39m"),whiteBright:u("\x1B[97m","\x1B[39m"),bgBlackBright:u("\x1B[100m","\x1B[49m"),bgRedBright:u("\x1B[101m","\x1B[49m"),bgGreenBright:u("\x1B[102m","\x1B[49m"),bgYellowBright:u("\x1B[103m","\x1B[49m"),bgBlueBright:u("\x1B[104m","\x1B[49m"),bgMagentaBright:u("\x1B[105m","\x1B[49m"),bgCyanBright:u("\x1B[106m","\x1B[49m"),bgWhiteBright:u("\x1B[107m","\x1B[49m")}};L.exports=H();L.exports.createColors=H});var f=Object.create(null),A=t=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(t?f:globalThis),B=new Proxy(f,{get(t,u){return A()[u]??f[u]},has(t,u){let e=A();return u in e||u in f},set(t,u,e){let s=A(!0);return s[u]=e,!0},deleteProperty(t,u){if(!u)return!1;let e=A(!0);return delete e[u],!0},ownKeys(){let t=A(!0);return Object.keys(t)}}),lD=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",hD=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CLOUDFLARE_WORKERS","WORKERS_CI",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function cD(){if(globalThis.process?.env)for(let t of hD){let u=t[1]||t[0];if(globalThis.process?.env[u])return{name:t[0].toLowerCase(),...t[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}var U=cD(),Fu=U.name;function b(t){return t?t!=="false":!1}var y=globalThis.process?.platform||"",d=b(B.CI)||U.ci!==!1,v=b(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);var Cu=b(B.DEBUG),BD=lD==="test"||b(B.TEST);var ou=b(B.MINIMAL)||d||BD||!v,pD=/^win/i.test(y),nu=/^linux/i.test(y),Eu=/^darwin/i.test(y),au=!b(B.NO_COLOR)&&(b(B.FORCE_COLOR)||(v||pD)&&B.TERM!=="dumb"||d),bD=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null,lu=Number(bD?.split(".")[0])||null,AD=globalThis.process||Object.create(null),V={versions:{}},hu=new Proxy(AD,{get(t,u){if(u==="env")return B;if(u in t)return t[u];if(u in V)return V[u]}}),mD=globalThis.process?.release?.name==="node",gD=!!globalThis.Bun||!!globalThis.process?.versions?.bun,fD=!!globalThis.Deno,dD=!!globalThis.fastly,vD=!!globalThis.Netlify,xD=!!globalThis.EdgeRuntime,ID=globalThis.navigator?.userAgent==="Cloudflare-Workers",_D=[[vD,"netlify"],[xD,"edge-light"],[ID,"workerd"],[dD,"fastly"],[fD,"deno"],[gD,"bun"],[mD,"node"]];function wD(){let t=_D.find(u=>u[0]);if(t)return{name:t[1]}}var SD=wD(),cu=SD?.name||"";function bu(t){return c("cyan",t)}function Au(t){return c("magenta",t)}function mu(t){return c("yellow",t)}function gu(t){return c("white",t)}var vu=TD();function TD(t){return c("inverse",`${G()}prisma dev${t?` ${t}`:""}${G()}`)}function G(t=1){return t<1?"":c("hidden","_".repeat(t))}var _u=!d&&v;var l=j(K(),1),iD=j(Z(),1);import{stdin as PD,stdout as ND}from"process";import*as T from"readline";import J from"readline";import{Writable as kD}from"stream";function MD({onlyFirst:t=!1}={}){let u=["[\\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(u,t?void 0:"g")}var WD=MD();function FD(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(WD,"")}function CD(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var oD={exports:{}};(function(t){var u={};t.exports=u,u.eastAsianWidth=function(s){var r=s.charCodeAt(0),i=s.length==2?s.charCodeAt(1):0,D=r;return 55296<=r&&r<=56319&&56320<=i&&i<=57343&&(r&=1023,i&=1023,D=r<<10|i,D+=65536),D==12288||65281<=D&&D<=65376||65504<=D&&D<=65510?"F":D==8361||65377<=D&&D<=65470||65474<=D&&D<=65479||65482<=D&&D<=65487||65490<=D&&D<=65495||65498<=D&&D<=65500||65512<=D&&D<=65518?"H":4352<=D&&D<=4447||4515<=D&&D<=4519||4602<=D&&D<=4607||9001<=D&&D<=9002||11904<=D&&D<=11929||11931<=D&&D<=12019||12032<=D&&D<=12245||12272<=D&&D<=12283||12289<=D&&D<=12350||12353<=D&&D<=12438||12441<=D&&D<=12543||12549<=D&&D<=12589||12593<=D&&D<=12686||12688<=D&&D<=12730||12736<=D&&D<=12771||12784<=D&&D<=12830||12832<=D&&D<=12871||12880<=D&&D<=13054||13056<=D&&D<=19903||19968<=D&&D<=42124||42128<=D&&D<=42182||43360<=D&&D<=43388||44032<=D&&D<=55203||55216<=D&&D<=55238||55243<=D&&D<=55291||63744<=D&&D<=64255||65040<=D&&D<=65049||65072<=D&&D<=65106||65108<=D&&D<=65126||65128<=D&&D<=65131||110592<=D&&D<=110593||127488<=D&&D<=127490||127504<=D&&D<=127546||127552<=D&&D<=127560||127568<=D&&D<=127569||131072<=D&&D<=194367||177984<=D&&D<=196605||196608<=D&&D<=262141?"W":32<=D&&D<=126||162<=D&&D<=163||165<=D&&D<=166||D==172||D==175||10214<=D&&D<=10221||10629<=D&&D<=10630?"Na":D==161||D==164||167<=D&&D<=168||D==170||173<=D&&D<=174||176<=D&&D<=180||182<=D&&D<=186||188<=D&&D<=191||D==198||D==208||215<=D&&D<=216||222<=D&&D<=225||D==230||232<=D&&D<=234||236<=D&&D<=237||D==240||242<=D&&D<=243||247<=D&&D<=250||D==252||D==254||D==257||D==273||D==275||D==283||294<=D&&D<=295||D==299||305<=D&&D<=307||D==312||319<=D&&D<=322||D==324||328<=D&&D<=331||D==333||338<=D&&D<=339||358<=D&&D<=359||D==363||D==462||D==464||D==466||D==468||D==470||D==472||D==474||D==476||D==593||D==609||D==708||D==711||713<=D&&D<=715||D==717||D==720||728<=D&&D<=731||D==733||D==735||768<=D&&D<=879||913<=D&&D<=929||931<=D&&D<=937||945<=D&&D<=961||963<=D&&D<=969||D==1025||1040<=D&&D<=1103||D==1105||D==8208||8211<=D&&D<=8214||8216<=D&&D<=8217||8220<=D&&D<=8221||8224<=D&&D<=8226||8228<=D&&D<=8231||D==8240||8242<=D&&D<=8243||D==8245||D==8251||D==8254||D==8308||D==8319||8321<=D&&D<=8324||D==8364||D==8451||D==8453||D==8457||D==8467||D==8470||8481<=D&&D<=8482||D==8486||D==8491||8531<=D&&D<=8532||8539<=D&&D<=8542||8544<=D&&D<=8555||8560<=D&&D<=8569||D==8585||8592<=D&&D<=8601||8632<=D&&D<=8633||D==8658||D==8660||D==8679||D==8704||8706<=D&&D<=8707||8711<=D&&D<=8712||D==8715||D==8719||D==8721||D==8725||D==8730||8733<=D&&D<=8736||D==8739||D==8741||8743<=D&&D<=8748||D==8750||8756<=D&&D<=8759||8764<=D&&D<=8765||D==8776||D==8780||D==8786||8800<=D&&D<=8801||8804<=D&&D<=8807||8810<=D&&D<=8811||8814<=D&&D<=8815||8834<=D&&D<=8835||8838<=D&&D<=8839||D==8853||D==8857||D==8869||D==8895||D==8978||9312<=D&&D<=9449||9451<=D&&D<=9547||9552<=D&&D<=9587||9600<=D&&D<=9615||9618<=D&&D<=9621||9632<=D&&D<=9633||9635<=D&&D<=9641||9650<=D&&D<=9651||9654<=D&&D<=9655||9660<=D&&D<=9661||9664<=D&&D<=9665||9670<=D&&D<=9672||D==9675||9678<=D&&D<=9681||9698<=D&&D<=9701||D==9711||9733<=D&&D<=9734||D==9737||9742<=D&&D<=9743||9748<=D&&D<=9749||D==9756||D==9758||D==9792||D==9794||9824<=D&&D<=9825||9827<=D&&D<=9829||9831<=D&&D<=9834||9836<=D&&D<=9837||D==9839||9886<=D&&D<=9887||9918<=D&&D<=9919||9924<=D&&D<=9933||9935<=D&&D<=9953||D==9955||9960<=D&&D<=9983||D==10045||D==10071||10102<=D&&D<=10111||11093<=D&&D<=11097||12872<=D&&D<=12879||57344<=D&&D<=63743||65024<=D&&D<=65039||D==65533||127232<=D&&D<=127242||127248<=D&&D<=127277||127280<=D&&D<=127337||127344<=D&&D<=127386||917760<=D&&D<=917999||983040<=D&&D<=1048573||1048576<=D&&D<=1114109?"A":"N"},u.characterLength=function(s){var r=this.eastAsianWidth(s);return r=="F"||r=="W"||r=="A"?2:1};function e(s){return s.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}u.length=function(s){for(var r=e(s),i=0,D=0;D<r.length;D++)i=i+this.characterLength(r[D]);return i},u.slice=function(s,r,i){textLen=u.length(s),r=r||0,i=i||1,r<0&&(r=textLen+r),i<0&&(i=textLen+i);for(var D="",F=0,E=e(s),o=0;o<E.length;o++){var h=E[o],n=u.length(h);if(F>=r-(n==2?1:0))if(F+n<=i)D+=h;else break;F+=n}return D}})(oD);var jD=oD.exports,VD=CD(jD),UD=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},GD=CD(UD);function m(t,u={}){if(typeof t!="string"||t.length===0||(u={ambiguousIsNarrow:!0,...u},t=FD(t),t.length===0))return 0;t=t.replace(GD()," ");let e=u.ambiguousIsNarrow?1:2,s=0;for(let r of t){let i=r.codePointAt(0);if(!(i<=31||i>=127&&i<=159||i>=768&&i<=879))switch(VD.eastAsianWidth(r)){case"F":case"W":s+=2;break;case"A":s+=e;break;default:s+=1}}return s}var $=10,X=(t=0)=>u=>`\x1B[${u+t}m`,q=(t=0)=>u=>`\x1B[${38+t};5;${u}m`,Q=(t=0)=>(u,e,s)=>`\x1B[${38+t};2;${u};${e};${s}m`,C={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(C.modifier);var YD=Object.keys(C.color),KD=Object.keys(C.bgColor);[...YD,...KD];function zD(){let t=new Map;for(let[u,e]of Object.entries(C)){for(let[s,r]of Object.entries(e))C[s]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},e[s]=C[s],t.set(r[0],r[1]);Object.defineProperty(C,u,{value:e,enumerable:!1})}return Object.defineProperty(C,"codes",{value:t,enumerable:!1}),C.color.close="\x1B[39m",C.bgColor.close="\x1B[49m",C.color.ansi=X(),C.color.ansi256=q(),C.color.ansi16m=Q(),C.bgColor.ansi=X($),C.bgColor.ansi256=q($),C.bgColor.ansi16m=Q($),Object.defineProperties(C,{rgbToAnsi256:{value:(u,e,s)=>u===e&&e===s?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(e/255*5)+Math.round(s/255*5),enumerable:!1},hexToRgb:{value:u=>{let e=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!e)return[0,0,0];let[s]=e;s.length===3&&(s=[...s].map(i=>i+i).join(""));let r=Number.parseInt(s,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:u=>C.rgbToAnsi256(...C.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:u=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let e,s,r;if(u>=232)e=((u-232)*10+8)/255,s=e,r=e;else{u-=16;let F=u%36;e=Math.floor(u/36)/5,s=Math.floor(F/6)/5,r=F%6/5}let i=Math.max(e,s,r)*2;if(i===0)return 30;let D=30+(Math.round(r)<<2|Math.round(s)<<1|Math.round(e));return i===2&&(D+=60),D},enumerable:!1},rgbToAnsi:{value:(u,e,s)=>C.ansi256ToAnsi(C.rgbToAnsi256(u,e,s)),enumerable:!1},hexToAnsi:{value:u=>C.ansi256ToAnsi(C.hexToAnsi256(u)),enumerable:!1}}),C}var HD=zD(),O=new Set(["\x1B","\x9B"]),ZD=39,k="\x07",nD="[",JD="]",ED="m",M=`${JD}8;;`,DD=t=>`${O.values().next().value}${nD}${t}${ED}`,uD=t=>`${O.values().next().value}${M}${t}${k}`,XD=t=>t.split(" ").map(u=>m(u)),P=(t,u,e)=>{let s=[...u],r=!1,i=!1,D=m(FD(t[t.length-1]));for(let[F,E]of s.entries()){let o=m(E);if(D+o<=e?t[t.length-1]+=E:(t.push(E),D=0),O.has(E)&&(r=!0,i=s.slice(F+1).join("").startsWith(M)),r){i?E===k&&(r=!1,i=!1):E===ED&&(r=!1);continue}D+=o,D===e&&F<s.length-1&&(t.push(""),D=0)}!D&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},qD=t=>{let u=t.split(" "),e=u.length;for(;e>0&&!(m(u[e-1])>0);)e--;return e===u.length?t:u.slice(0,e).join(" ")+u.slice(e).join("")},QD=(t,u,e={})=>{if(e.trim!==!1&&t.trim()==="")return"";let s="",r,i,D=XD(t),F=[""];for(let[o,h]of t.split(" ").entries()){e.trim!==!1&&(F[F.length-1]=F[F.length-1].trimStart());let n=m(F[F.length-1]);if(o!==0&&(n>=u&&(e.wordWrap===!1||e.trim===!1)&&(F.push(""),n=0),(n>0||e.trim===!1)&&(F[F.length-1]+=" ",n++)),e.hard&&D[o]>u){let p=u-n,g=1+Math.floor((D[o]-p-1)/u);Math.floor((D[o]-1)/u)<g&&F.push(""),P(F,h,u);continue}if(n+D[o]>u&&n>0&&D[o]>0){if(e.wordWrap===!1&&n<u){P(F,h,u);continue}F.push("")}if(n+D[o]>u&&e.wordWrap===!1){P(F,h,u);continue}F[F.length-1]+=h}e.trim!==!1&&(F=F.map(o=>qD(o)));let E=[...F.join(`
2
+ import{b as c}from"./chunk-GZHQT2TW.js";import{a as W,c as j}from"./chunk-M6TFCQLD.js";var K=W((Su,Y)=>{"use strict";var R={to(t,u){return u?`\x1B[${u+1};${t+1}H`:`\x1B[${t+1}G`},move(t,u){let e="";return t<0?e+=`\x1B[${-t}D`:t>0&&(e+=`\x1B[${t}C`),u<0?e+=`\x1B[${-u}A`:u>0&&(e+=`\x1B[${u}B`),e},up:(t=1)=>`\x1B[${t}A`,down:(t=1)=>`\x1B[${t}B`,forward:(t=1)=>`\x1B[${t}C`,backward:(t=1)=>`\x1B[${t}D`,nextLine:(t=1)=>"\x1B[E".repeat(t),prevLine:(t=1)=>"\x1B[F".repeat(t),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},OD={up:(t=1)=>"\x1B[S".repeat(t),down:(t=1)=>"\x1B[T".repeat(t)},yD={screen:"\x1B[2J",up:(t=1)=>"\x1B[1J".repeat(t),down:(t=1)=>"\x1B[J".repeat(t),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(t){let u="";for(let e=0;e<t;e++)u+=this.line+(e<t-1?R.up():"");return t&&(u+=R.left),u}};Y.exports={cursor:R,scroll:OD,erase:yD,beep:"\x07"}});var Z=W((Tu,L)=>{"use strict";var I=process||{},z=I.argv||[],x=I.env||{},RD=!(x.NO_COLOR||z.includes("--no-color"))&&(!!x.FORCE_COLOR||z.includes("--color")||I.platform==="win32"||(I.stdout||{}).isTTY&&x.TERM!=="dumb"||!!x.CI),LD=(t,u,e=t)=>s=>{let r=""+s,i=r.indexOf(u,t.length);return~i?t+$D(r,u,e,i)+u:t+r+u},$D=(t,u,e,s)=>{let r="",i=0;do r+=t.substring(i,s)+e,i=s+u.length,s=t.indexOf(u,i);while(~s);return r+t.substring(i)},H=(t=RD)=>{let u=t?LD:()=>String;return{isColorSupported:t,reset:u("\x1B[0m","\x1B[0m"),bold:u("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:u("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:u("\x1B[3m","\x1B[23m"),underline:u("\x1B[4m","\x1B[24m"),inverse:u("\x1B[7m","\x1B[27m"),hidden:u("\x1B[8m","\x1B[28m"),strikethrough:u("\x1B[9m","\x1B[29m"),black:u("\x1B[30m","\x1B[39m"),red:u("\x1B[31m","\x1B[39m"),green:u("\x1B[32m","\x1B[39m"),yellow:u("\x1B[33m","\x1B[39m"),blue:u("\x1B[34m","\x1B[39m"),magenta:u("\x1B[35m","\x1B[39m"),cyan:u("\x1B[36m","\x1B[39m"),white:u("\x1B[37m","\x1B[39m"),gray:u("\x1B[90m","\x1B[39m"),bgBlack:u("\x1B[40m","\x1B[49m"),bgRed:u("\x1B[41m","\x1B[49m"),bgGreen:u("\x1B[42m","\x1B[49m"),bgYellow:u("\x1B[43m","\x1B[49m"),bgBlue:u("\x1B[44m","\x1B[49m"),bgMagenta:u("\x1B[45m","\x1B[49m"),bgCyan:u("\x1B[46m","\x1B[49m"),bgWhite:u("\x1B[47m","\x1B[49m"),blackBright:u("\x1B[90m","\x1B[39m"),redBright:u("\x1B[91m","\x1B[39m"),greenBright:u("\x1B[92m","\x1B[39m"),yellowBright:u("\x1B[93m","\x1B[39m"),blueBright:u("\x1B[94m","\x1B[39m"),magentaBright:u("\x1B[95m","\x1B[39m"),cyanBright:u("\x1B[96m","\x1B[39m"),whiteBright:u("\x1B[97m","\x1B[39m"),bgBlackBright:u("\x1B[100m","\x1B[49m"),bgRedBright:u("\x1B[101m","\x1B[49m"),bgGreenBright:u("\x1B[102m","\x1B[49m"),bgYellowBright:u("\x1B[103m","\x1B[49m"),bgBlueBright:u("\x1B[104m","\x1B[49m"),bgMagentaBright:u("\x1B[105m","\x1B[49m"),bgCyanBright:u("\x1B[106m","\x1B[49m"),bgWhiteBright:u("\x1B[107m","\x1B[49m")}};L.exports=H();L.exports.createColors=H});var f=Object.create(null),A=t=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(t?f:globalThis),B=new Proxy(f,{get(t,u){return A()[u]??f[u]},has(t,u){let e=A();return u in e||u in f},set(t,u,e){let s=A(!0);return s[u]=e,!0},deleteProperty(t,u){if(!u)return!1;let e=A(!0);return delete e[u],!0},ownKeys(){let t=A(!0);return Object.keys(t)}}),lD=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",hD=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CLOUDFLARE_WORKERS","WORKERS_CI",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function cD(){if(globalThis.process?.env)for(let t of hD){let u=t[1]||t[0];if(globalThis.process?.env[u])return{name:t[0].toLowerCase(),...t[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}var U=cD(),Fu=U.name;function b(t){return t?t!=="false":!1}var y=globalThis.process?.platform||"",d=b(B.CI)||U.ci!==!1,v=b(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);var Cu=b(B.DEBUG),BD=lD==="test"||b(B.TEST);var ou=b(B.MINIMAL)||d||BD||!v,pD=/^win/i.test(y),nu=/^linux/i.test(y),Eu=/^darwin/i.test(y),au=!b(B.NO_COLOR)&&(b(B.FORCE_COLOR)||(v||pD)&&B.TERM!=="dumb"||d),bD=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null,lu=Number(bD?.split(".")[0])||null,AD=globalThis.process||Object.create(null),V={versions:{}},hu=new Proxy(AD,{get(t,u){if(u==="env")return B;if(u in t)return t[u];if(u in V)return V[u]}}),mD=globalThis.process?.release?.name==="node",gD=!!globalThis.Bun||!!globalThis.process?.versions?.bun,fD=!!globalThis.Deno,dD=!!globalThis.fastly,vD=!!globalThis.Netlify,xD=!!globalThis.EdgeRuntime,ID=globalThis.navigator?.userAgent==="Cloudflare-Workers",_D=[[vD,"netlify"],[xD,"edge-light"],[ID,"workerd"],[dD,"fastly"],[fD,"deno"],[gD,"bun"],[mD,"node"]];function wD(){let t=_D.find(u=>u[0]);if(t)return{name:t[1]}}var SD=wD(),cu=SD?.name||"";function bu(t){return c("cyan",t)}function Au(t){return c("magenta",t)}function mu(t){return c("yellow",t)}function gu(t){return c("white",t)}var vu=TD();function TD(t){return c("inverse",`${G()}prisma dev${t?` ${t}`:""}${G()}`)}function G(t=1){return t<1?"":c("hidden","_".repeat(t))}var _u=!d&&v;var l=j(K(),1),iD=j(Z(),1);import{stdin as PD,stdout as ND}from"process";import*as T from"readline";import J from"readline";import{Writable as kD}from"stream";function MD({onlyFirst:t=!1}={}){let u=["[\\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(u,t?void 0:"g")}var WD=MD();function FD(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(WD,"")}function CD(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var oD={exports:{}};(function(t){var u={};t.exports=u,u.eastAsianWidth=function(s){var r=s.charCodeAt(0),i=s.length==2?s.charCodeAt(1):0,D=r;return 55296<=r&&r<=56319&&56320<=i&&i<=57343&&(r&=1023,i&=1023,D=r<<10|i,D+=65536),D==12288||65281<=D&&D<=65376||65504<=D&&D<=65510?"F":D==8361||65377<=D&&D<=65470||65474<=D&&D<=65479||65482<=D&&D<=65487||65490<=D&&D<=65495||65498<=D&&D<=65500||65512<=D&&D<=65518?"H":4352<=D&&D<=4447||4515<=D&&D<=4519||4602<=D&&D<=4607||9001<=D&&D<=9002||11904<=D&&D<=11929||11931<=D&&D<=12019||12032<=D&&D<=12245||12272<=D&&D<=12283||12289<=D&&D<=12350||12353<=D&&D<=12438||12441<=D&&D<=12543||12549<=D&&D<=12589||12593<=D&&D<=12686||12688<=D&&D<=12730||12736<=D&&D<=12771||12784<=D&&D<=12830||12832<=D&&D<=12871||12880<=D&&D<=13054||13056<=D&&D<=19903||19968<=D&&D<=42124||42128<=D&&D<=42182||43360<=D&&D<=43388||44032<=D&&D<=55203||55216<=D&&D<=55238||55243<=D&&D<=55291||63744<=D&&D<=64255||65040<=D&&D<=65049||65072<=D&&D<=65106||65108<=D&&D<=65126||65128<=D&&D<=65131||110592<=D&&D<=110593||127488<=D&&D<=127490||127504<=D&&D<=127546||127552<=D&&D<=127560||127568<=D&&D<=127569||131072<=D&&D<=194367||177984<=D&&D<=196605||196608<=D&&D<=262141?"W":32<=D&&D<=126||162<=D&&D<=163||165<=D&&D<=166||D==172||D==175||10214<=D&&D<=10221||10629<=D&&D<=10630?"Na":D==161||D==164||167<=D&&D<=168||D==170||173<=D&&D<=174||176<=D&&D<=180||182<=D&&D<=186||188<=D&&D<=191||D==198||D==208||215<=D&&D<=216||222<=D&&D<=225||D==230||232<=D&&D<=234||236<=D&&D<=237||D==240||242<=D&&D<=243||247<=D&&D<=250||D==252||D==254||D==257||D==273||D==275||D==283||294<=D&&D<=295||D==299||305<=D&&D<=307||D==312||319<=D&&D<=322||D==324||328<=D&&D<=331||D==333||338<=D&&D<=339||358<=D&&D<=359||D==363||D==462||D==464||D==466||D==468||D==470||D==472||D==474||D==476||D==593||D==609||D==708||D==711||713<=D&&D<=715||D==717||D==720||728<=D&&D<=731||D==733||D==735||768<=D&&D<=879||913<=D&&D<=929||931<=D&&D<=937||945<=D&&D<=961||963<=D&&D<=969||D==1025||1040<=D&&D<=1103||D==1105||D==8208||8211<=D&&D<=8214||8216<=D&&D<=8217||8220<=D&&D<=8221||8224<=D&&D<=8226||8228<=D&&D<=8231||D==8240||8242<=D&&D<=8243||D==8245||D==8251||D==8254||D==8308||D==8319||8321<=D&&D<=8324||D==8364||D==8451||D==8453||D==8457||D==8467||D==8470||8481<=D&&D<=8482||D==8486||D==8491||8531<=D&&D<=8532||8539<=D&&D<=8542||8544<=D&&D<=8555||8560<=D&&D<=8569||D==8585||8592<=D&&D<=8601||8632<=D&&D<=8633||D==8658||D==8660||D==8679||D==8704||8706<=D&&D<=8707||8711<=D&&D<=8712||D==8715||D==8719||D==8721||D==8725||D==8730||8733<=D&&D<=8736||D==8739||D==8741||8743<=D&&D<=8748||D==8750||8756<=D&&D<=8759||8764<=D&&D<=8765||D==8776||D==8780||D==8786||8800<=D&&D<=8801||8804<=D&&D<=8807||8810<=D&&D<=8811||8814<=D&&D<=8815||8834<=D&&D<=8835||8838<=D&&D<=8839||D==8853||D==8857||D==8869||D==8895||D==8978||9312<=D&&D<=9449||9451<=D&&D<=9547||9552<=D&&D<=9587||9600<=D&&D<=9615||9618<=D&&D<=9621||9632<=D&&D<=9633||9635<=D&&D<=9641||9650<=D&&D<=9651||9654<=D&&D<=9655||9660<=D&&D<=9661||9664<=D&&D<=9665||9670<=D&&D<=9672||D==9675||9678<=D&&D<=9681||9698<=D&&D<=9701||D==9711||9733<=D&&D<=9734||D==9737||9742<=D&&D<=9743||9748<=D&&D<=9749||D==9756||D==9758||D==9792||D==9794||9824<=D&&D<=9825||9827<=D&&D<=9829||9831<=D&&D<=9834||9836<=D&&D<=9837||D==9839||9886<=D&&D<=9887||9918<=D&&D<=9919||9924<=D&&D<=9933||9935<=D&&D<=9953||D==9955||9960<=D&&D<=9983||D==10045||D==10071||10102<=D&&D<=10111||11093<=D&&D<=11097||12872<=D&&D<=12879||57344<=D&&D<=63743||65024<=D&&D<=65039||D==65533||127232<=D&&D<=127242||127248<=D&&D<=127277||127280<=D&&D<=127337||127344<=D&&D<=127386||917760<=D&&D<=917999||983040<=D&&D<=1048573||1048576<=D&&D<=1114109?"A":"N"},u.characterLength=function(s){var r=this.eastAsianWidth(s);return r=="F"||r=="W"||r=="A"?2:1};function e(s){return s.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}u.length=function(s){for(var r=e(s),i=0,D=0;D<r.length;D++)i=i+this.characterLength(r[D]);return i},u.slice=function(s,r,i){textLen=u.length(s),r=r||0,i=i||1,r<0&&(r=textLen+r),i<0&&(i=textLen+i);for(var D="",F=0,E=e(s),o=0;o<E.length;o++){var h=E[o],n=u.length(h);if(F>=r-(n==2?1:0))if(F+n<=i)D+=h;else break;F+=n}return D}})(oD);var jD=oD.exports,VD=CD(jD),UD=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},GD=CD(UD);function m(t,u={}){if(typeof t!="string"||t.length===0||(u={ambiguousIsNarrow:!0,...u},t=FD(t),t.length===0))return 0;t=t.replace(GD()," ");let e=u.ambiguousIsNarrow?1:2,s=0;for(let r of t){let i=r.codePointAt(0);if(!(i<=31||i>=127&&i<=159||i>=768&&i<=879))switch(VD.eastAsianWidth(r)){case"F":case"W":s+=2;break;case"A":s+=e;break;default:s+=1}}return s}var $=10,X=(t=0)=>u=>`\x1B[${u+t}m`,q=(t=0)=>u=>`\x1B[${38+t};5;${u}m`,Q=(t=0)=>(u,e,s)=>`\x1B[${38+t};2;${u};${e};${s}m`,C={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(C.modifier);var YD=Object.keys(C.color),KD=Object.keys(C.bgColor);[...YD,...KD];function zD(){let t=new Map;for(let[u,e]of Object.entries(C)){for(let[s,r]of Object.entries(e))C[s]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},e[s]=C[s],t.set(r[0],r[1]);Object.defineProperty(C,u,{value:e,enumerable:!1})}return Object.defineProperty(C,"codes",{value:t,enumerable:!1}),C.color.close="\x1B[39m",C.bgColor.close="\x1B[49m",C.color.ansi=X(),C.color.ansi256=q(),C.color.ansi16m=Q(),C.bgColor.ansi=X($),C.bgColor.ansi256=q($),C.bgColor.ansi16m=Q($),Object.defineProperties(C,{rgbToAnsi256:{value:(u,e,s)=>u===e&&e===s?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(e/255*5)+Math.round(s/255*5),enumerable:!1},hexToRgb:{value:u=>{let e=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!e)return[0,0,0];let[s]=e;s.length===3&&(s=[...s].map(i=>i+i).join(""));let r=Number.parseInt(s,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:u=>C.rgbToAnsi256(...C.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:u=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let e,s,r;if(u>=232)e=((u-232)*10+8)/255,s=e,r=e;else{u-=16;let F=u%36;e=Math.floor(u/36)/5,s=Math.floor(F/6)/5,r=F%6/5}let i=Math.max(e,s,r)*2;if(i===0)return 30;let D=30+(Math.round(r)<<2|Math.round(s)<<1|Math.round(e));return i===2&&(D+=60),D},enumerable:!1},rgbToAnsi:{value:(u,e,s)=>C.ansi256ToAnsi(C.rgbToAnsi256(u,e,s)),enumerable:!1},hexToAnsi:{value:u=>C.ansi256ToAnsi(C.hexToAnsi256(u)),enumerable:!1}}),C}var HD=zD(),O=new Set(["\x1B","\x9B"]),ZD=39,k="\x07",nD="[",JD="]",ED="m",M=`${JD}8;;`,DD=t=>`${O.values().next().value}${nD}${t}${ED}`,uD=t=>`${O.values().next().value}${M}${t}${k}`,XD=t=>t.split(" ").map(u=>m(u)),P=(t,u,e)=>{let s=[...u],r=!1,i=!1,D=m(FD(t[t.length-1]));for(let[F,E]of s.entries()){let o=m(E);if(D+o<=e?t[t.length-1]+=E:(t.push(E),D=0),O.has(E)&&(r=!0,i=s.slice(F+1).join("").startsWith(M)),r){i?E===k&&(r=!1,i=!1):E===ED&&(r=!1);continue}D+=o,D===e&&F<s.length-1&&(t.push(""),D=0)}!D&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},qD=t=>{let u=t.split(" "),e=u.length;for(;e>0&&!(m(u[e-1])>0);)e--;return e===u.length?t:u.slice(0,e).join(" ")+u.slice(e).join("")},QD=(t,u,e={})=>{if(e.trim!==!1&&t.trim()==="")return"";let s="",r,i,D=XD(t),F=[""];for(let[o,h]of t.split(" ").entries()){e.trim!==!1&&(F[F.length-1]=F[F.length-1].trimStart());let n=m(F[F.length-1]);if(o!==0&&(n>=u&&(e.wordWrap===!1||e.trim===!1)&&(F.push(""),n=0),(n>0||e.trim===!1)&&(F[F.length-1]+=" ",n++)),e.hard&&D[o]>u){let p=u-n,g=1+Math.floor((D[o]-p-1)/u);Math.floor((D[o]-1)/u)<g&&F.push(""),P(F,h,u);continue}if(n+D[o]>u&&n>0&&D[o]>0){if(e.wordWrap===!1&&n<u){P(F,h,u);continue}F.push("")}if(n+D[o]>u&&e.wordWrap===!1){P(F,h,u);continue}F[F.length-1]+=h}e.trim!==!1&&(F=F.map(o=>qD(o)));let E=[...F.join(`
3
3
  `)];for(let[o,h]of E.entries()){if(s+=h,O.has(h)){let{groups:p}=new RegExp(`(?:\\${nD}(?<code>\\d+)m|\\${M}(?<uri>.*)${k})`).exec(E.slice(o).join(""))||{groups:{}};if(p.code!==void 0){let g=Number.parseFloat(p.code);r=g===ZD?void 0:g}else p.uri!==void 0&&(i=p.uri.length===0?void 0:p.uri)}let n=HD.codes.get(Number(r));E[o+1]===`
4
4
  `?(i&&(s+=uD("")),r&&n&&(s+=DD(n))):h===`
5
5
  `&&(r&&n&&(s+=DD(r)),i&&(s+=uD(i)))}return s};function tD(t,u,e){return String(t).normalize().replace(/\r\n/g,`
@@ -0,0 +1,26 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a as v,b as s,c as S,e as m,f as b,h as y,i as O,j as C}from"./chunk-P5JORAQS.js";import{b as f,c as d}from"./chunk-GZHQT2TW.js";import{b as M}from"./chunk-M6TFCQLD.js";import{fork as E}from"child_process";import{createRequire as _}from"module";import{ServerState as A}from"@prisma/dev/internal/state";var D=_(import.meta.url).resolve("@prisma/dev/internal/daemon");async function Qt(e){let t,o,a=new Promise((n,p)=>{t=n,o=p}),i=typeof e=="string"?e:e.name,c=E(D,[i],{detached:!0,stdio:"ignore"});c.once("error",n=>{d.error(n)}),c.once("message",n=>{let{type:p}=n;if(p==="error")return o(n.error);if(p==="started")return t(n.server);o(`Unknown message type: "${p}"`)});try{return await a}catch(n){if(typeof n=="string"&&n.includes("is already running")){if(typeof e!="string")return{...e.exports,name:i};let p=await A.fromServerDump({name:i});if(!p)throw new Error(`Failed to retrieve the status of the running server "${i}".`);return{...p.exports,name:i}}throw n}finally{c.disconnect(),c.unref(),c.removeAllListeners()}}import{setTimeout as Dt}from"timers/promises";import h from"process";import{stripVTControlCharacters as wt}from"util";var l={};M(l,{bgBlack:()=>rt,bgBlue:()=>st,bgBlueBright:()=>yt,bgCyan:()=>ct,bgCyanBright:()=>Tt,bgGray:()=>ht,bgGreen:()=>nt,bgGreenBright:()=>St,bgMagenta:()=>at,bgMagentaBright:()=>Pt,bgRed:()=>ot,bgRedBright:()=>xt,bgWhite:()=>pt,bgWhiteBright:()=>$t,bgYellow:()=>it,bgYellowBright:()=>bt,black:()=>Q,blue:()=>z,blueBright:()=>dt,bold:()=>U,cyan:()=>Z,cyanBright:()=>ft,dim:()=>H,gray:()=>et,green:()=>K,greenBright:()=>mt,hidden:()=>W,inverse:()=>V,italic:()=>k,magenta:()=>J,magentaBright:()=>gt,overline:()=>F,red:()=>j,redBright:()=>lt,reset:()=>L,strikethrough:()=>Y,underline:()=>q,white:()=>tt,whiteBright:()=>vt,yellow:()=>X,yellowBright:()=>ut});import G from"tty";var N=G?.WriteStream?.prototype?.hasColors?.()??!1,r=(e,t)=>{if(!N)return i=>i;let o=`\x1B[${e}m`,a=`\x1B[${t}m`;return i=>{let c=i+"",n=c.indexOf(a);if(n===-1)return o+c+a;let p=o,u=0,x=(t===22?a:"")+o;for(;n!==-1;)p+=c.slice(u,n)+x,u=n+a.length,n=c.indexOf(a,u);return p+=c.slice(u)+a,p}},L=r(0,0),U=r(1,22),H=r(2,22),k=r(3,23),q=r(4,24),F=r(53,55),V=r(7,27),W=r(8,28),Y=r(9,29),Q=r(30,39),j=r(31,39),K=r(32,39),X=r(33,39),z=r(34,39),J=r(35,39),Z=r(36,39),tt=r(37,39),et=r(90,39),rt=r(40,49),ot=r(41,49),nt=r(42,49),it=r(43,49),st=r(44,49),at=r(45,49),ct=r(46,49),pt=r(47,49),ht=r(100,49),lt=r(91,39),mt=r(92,39),ut=r(93,39),dt=r(94,39),gt=r(95,39),ft=r(96,39),vt=r(97,39),xt=r(101,49),St=r(102,49),bt=r(103,49),yt=r(104,49),Pt=r(105,49),Tt=r(106,49),$t=r(107,49);var g=h.platform!=="win32"||!!h.env.WT_SESSION||h.env.TERM_PROGRAM==="vscode",Rt=e=>!!(e.isTTY&&h.env.TERM!=="dumb"&&!("CI"in h.env)),Ot=l.blue(g?"\u2139":"i"),Ct=l.green(g?"\u2714":"\u221A"),Bt=l.yellow(g?"\u26A0":"\u203C"),It=l.red(g?"\u2716":"\xD7"),Mt={frames:g?["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]:["-","\\","|","/"],interval:80},P=class{#p;#h;#n=-1;#i;#r;#t;#s;#l=0;#o;#e;#d=0;#m=!1;constructor(t={}){let o=t.spinner??Mt;this.#p=o.frames,this.#h=o.interval,this.#r=t.text??"",this.#t=t.stream??h.stderr,this.#s=t.color??"cyan",this.#e=Rt(this.#t),this.#o=this.#b.bind(this)}start(t){return t&&(this.#r=t),this.isSpinning?this:(this.#m=!0,this.#f(),this.#c(),this.#x(),this.#e&&(this.#i=setInterval(()=>{this.#c()},this.#h)),this)}stop(t){return this.isSpinning?(this.#m=!1,this.#i&&(clearInterval(this.#i),this.#i=void 0),this.#v(),this.clear(),this.#S(),t&&this.#t.write(`${t}
3
+ `),this):this}#a(t,o){return this.stop(`${t} ${o??this.#r}`)}success(t){return this.#a(Ct,t)}error(t){return this.#a(It,t)}warning(t){return this.#a(Bt,t)}info(t){return this.#a(Ot,t)}get isSpinning(){return this.#m}get text(){return this.#r}set text(t){this.#r=t??"",this.#c()}get color(){return this.#s}set color(t){this.#s=t,this.#c()}clear(){if(!this.#e)return this;this.#t.cursorTo(0);for(let t=0;t<this.#l;t++)t>0&&this.#t.moveCursor(0,-1),this.#t.clearLine(1);return this.#l=0,this}#c(){let t=Date.now();(this.#n===-1||t-this.#d>=this.#h)&&(this.#n=++this.#n%this.#p.length,this.#d=t);let o=l[this.#s]??l.cyan,a=this.#p[this.#n],i=`${o(a)} ${this.#r}`;this.#e||(i+=`
4
+ `),this.clear(),this.#u(i),this.#e&&(this.#l=this.#g(i))}#u(t){this.#t.write(t)}#g(t){let o=this.#t.columns??80,a=wt(t).split(`
5
+ `),i=0;for(let c of a)i+=Math.max(1,Math.ceil(c.length/o));return i}#f(){this.#e&&this.#u("\x1B[?25l")}#v(){this.#e&&this.#u("\x1B[?25h")}#x(){h.once("SIGINT",this.#o),h.once("SIGTERM",this.#o)}#S(){h.off("SIGINT",this.#o),h.off("SIGTERM",this.#o)}#b(t){this.isSpinning&&this.stop();let o=t==="SIGINT"?130:t==="SIGTERM"?143:1;h.exit(o)}};function T(e){return new P(e)}var Et=[{value:"q",label:"quit"}],$=3;function B(e){let t=new C({debug:e?.debug,options:Et,render:_t,signal:e?.abortSignal});return{clearPrompt(){v.stdout.moveCursor(0,-$),v.stdout.cursorTo(0),v.stdout.clearScreenDown()},prompt:t,respond:async o=>{if(O(o)||o==="q")return await e?.onQuit?.();await e?.onOption?.[o]?.()}}}function _t(){return At()}function At(){let e="Press q to quit",t=`\u250C${"\u2500".repeat(e.length+2)}\u2510`,o=`\u2514${"\u2500".repeat(e.length+2)}\u2518`;return["",t,`\u2502 ${e} \u2502`,o].join(`
6
+ `)}function ue(e){let t=T();return{renderContent:Gt,renderIntro:()=>Lt(e,t),renderOutro:()=>Promise.resolve(Ut(e)),spinner:t}}async function Gt(e){let{abortSignal:t,debug:o,isClosed:a,onQuit:i,server:c,spinner:n}=e;if(n.success(Nt(c)),d.log(Ht(c)),!!y)for(;!a();){let{clearPrompt:p,prompt:u,respond:R}=B({abortSignal:t,debug:o,onQuit:i}),x=await u.prompt();p(),t.aborted||await R(x)}}function Nt(e){return` Your local Prisma Postgres server ${s(e.name)} is now running \u{1F44D}`}async function Lt(e,t){t.start(` Starting ${b} server ${s(e)}...${`
7
+ `.repeat($+3)}`),y&&await Dt(250)}function Ut(e){d.log(`\u{1F44B} Buh Bye!
8
+
9
+ Your ${b} server ${s(e)} has been closed successfully.
10
+ `)}function de(e){return`\u{1F50C} To connect to your local Prisma Postgres database via HTTP + Prisma ORM
11
+ use the following connection string:
12
+
13
+ ${qt("\u{1F4C4} .env:")}
14
+
15
+ ${w("DATABASE_URL",kt(e.ppg.url))}
16
+
17
+ \u2728 The ${s("api_key")} above does not contain any sensitive information.`}function Ht(e){return`
18
+ \u{1F50C} To connect with Prisma ORM use the following connection strings:
19
+
20
+ ${w("DATABASE_URL",I(e.database.prismaORMConnectionString))}
21
+ ${w("SHADOW_DATABASE_URL",I(e.shadowDatabase.prismaORMConnectionString))}
22
+
23
+ \u{1F418} You can also use the ${s("DATABASE_URL")} with the ${s("pg")} or ${s("postgres.js")} JavaScript drivers as well as your favorite DB gui.
24
+
25
+ For the best experience, set the maximum number of connections to ${s(10)}, connect timeout to ${s(0)} and
26
+ idle timeout to the smallest positive value supported.`}function ge(e){if(e.length===0)return"";let t=[...e].map(Number).sort();return t.length>1&&t.every((o,a)=>a===0||o===t[a-1]+1)?`${s(t[0])}-${s(t.at(-1))}`:e.map(s).join(", ")}function w(e,t){return`${s(e)}="${t}"`}function kt(e){return e=new URL(e),`${S(e.protocol)}//${s(e.hostname)}:${s(e.port)}${m(e.pathname)}${m(e.search)}`}function I(e){return e=new URL(e),`${S(e.protocol)}${m(`//${e.username}:${e.password}@`)}${s(e.hostname)}${m(":")}${s(e.port)}${m(e.pathname)}${m(e.search)}`}function qt(e){return f("italic",f("dim",f("green",`# ${e}`)))}export{Qt as a,ue as b,de as c,Ht as d,ge as e};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{d as o,h as a,k as c}from"./chunk-J2PYT4A5.js";import{b as r}from"./chunk-4QNO2WQL.js";async function T(e){let{confirmationText:t,debug:h}=e;return a?typeof await new c({debug:h,render(){switch(this.state){case"active":case"error":case"initial":{let s=`
2
+ import{d as o,h as a,k as c}from"./chunk-P5JORAQS.js";import{b as r}from"./chunk-GZHQT2TW.js";async function T(e){let{confirmationText:t,debug:h}=e;return a?typeof await new c({debug:h,render(){switch(this.state){case"active":case"error":case"initial":{let s=`
3
3
  \u{1F9F7} To confirm, type ${o(t)} and press ${r("inverse"," \u23CE ")}:`,l=this.value?.length<=t.length&&t.startsWith(this.value),i=!this.error&&u(this.value,t),n=t.charAt(this.cursor)?r("inverse",t.charAt(this.cursor)):this.valueWithCursor.charAt(this.cursor),m=r("dim",t.slice(this.valueWithCursor.length)),p=i?`${t}${r("reset",r("strikethrough",r("dim",this.value.slice(t.length))))}${n}`:`${this.value}${n}`;return`${s}
4
4
 
5
5
  ${r(i?"greenBright":l?"reset":"redBright",`${r("hidden","_")}> ${p}`)}${m}
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as x,b as N,e as I}from"./chunk-UU544OUK.js";import{a as l,b as f,f as E}from"./chunk-J2PYT4A5.js";import{a as C,d,e as P,f as R}from"./chunk-4QNO2WQL.js";import"./chunk-M6TFCQLD.js";import{startPrismaDevServer as B}from"@prisma/dev";function A(e){let t,r,o=new Promise((s,p)=>{t=s,r=p}),n=s=>{n=i=null,r(s),e?.onRejected?.(s),e?.onFulfilled?.()},i=s=>{i=n=null,t(s),e?.onResolved?.(s),e?.onFulfilled?.()};return{isFulfilled:()=>i===n,promise:o,reject:s=>n?.(s),resolve:s=>i?.(s)}}var T="0.15.0";var a={database:"db-port",server:"port",shadow_database:"shadow-db-port"},O={...R,[a.database]:{alias:"P",description:"Port number the database server will listen on.",required:!1,type:"string"},detach:{alias:"d",description:"Run the server in the background.",required:!1,type:"boolean"},name:{alias:"n",default:"default",description:"Name of the server. Helps keep state isolated between different projects. Defaults to `default`.",required:!1,type:"string"},[a.server]:{alias:"p",description:"Main port number the Prisma Dev server will listen on.",required:!1,type:"string"},[a.shadow_database]:{description:"Port number the shadow database server will listen on.",required:!1,type:"string"}},L=/^[a-zA-Z0-9-_]+$/;function k(e){let{[a.server]:t,[a.database]:r,[a.shadow_database]:o,debug:n,detach:i,name:s}=e.args,p=r?Number(r):void 0,c=t?Number(t):void 0,u=o?Number(o):void 0;return t&&Number.isNaN(c)?(console.error(`Invalid server port number provided. Please provide a valid port number in \`--${a.server}\`.`),process.exit(1)):r&&Number.isNaN(p)?(console.error(`Invalid database port number provided. Please provide a valid port number in \`--${a.database}\`.`),process.exit(1)):o&&Number.isNaN(u)?(console.error(`Invalid shadow database port number provided. Please provide a valid port number in \`--${a.shadow_database}\`.`),process.exit(1)):c!=null&&c===p?(console.error(`The server port and database port cannot be the same. Please provide different port numbers in \`--${a.server}\` and/or \`--${a.database}\`.`),process.exit(1)):p!=null&&p===u?(console.error(`The database port and shadow database port cannot be the same. Please provide different port numbers in \`--${a.database}\` and/or \`--${a.shadow_database}\`.`),process.exit(1)):c!=null&&c===u?(console.error(`The server port and shadow database port cannot be the same. Please provide different port numbers in \`--${a.server}\` and/or \`--${a.shadow_database}\`.`),process.exit(1)):L.test(s)?{databasePort:p,debug:n,detach:i,name:s,serverPort:c,shadowDatabasePort:u}:(console.error("Invalid name provided. The name can only contain letters, numbers, dashes, and underscores. Please provide a valid name in `--name`."),process.exit(1))}import{PortNotAvailableError as q,ServerAlreadyRunningError as H}from"@prisma/dev";async function v(e,t,r){if(e instanceof H)try{let n=await e.server;if(!n)return await v("Something went wrong, try again!",t,r);t.warning(` Skipped! \u{1F60C}
2
+ import{a as x,b as N,e as I}from"./chunk-RJHC3PIO.js";import{a as l,b as f,f as E}from"./chunk-P5JORAQS.js";import{a as C,c as d,d as P,e as R}from"./chunk-GZHQT2TW.js";import"./chunk-M6TFCQLD.js";import{startPrismaDevServer as B}from"@prisma/dev";function A(e){let t,r,o=new Promise((s,p)=>{t=s,r=p}),n=s=>{n=i=null,r(s),e?.onRejected?.(s),e?.onFulfilled?.()},i=s=>{i=n=null,t(s),e?.onResolved?.(s),e?.onFulfilled?.()};return{isFulfilled:()=>i===n,promise:o,reject:s=>n?.(s),resolve:s=>i?.(s)}}var T="0.16.0";var a={database:"db-port",server:"port",shadow_database:"shadow-db-port"},O={...R,[a.database]:{alias:"P",description:"Port number the database server will listen on.",required:!1,type:"string"},detach:{alias:"d",description:"Run the server in the background.",required:!1,type:"boolean"},name:{alias:"n",default:"default",description:"Name of the server. Helps keep state isolated between different projects. Defaults to `default`.",required:!1,type:"string"},[a.server]:{alias:"p",description:"Main port number the Prisma Dev server will listen on.",required:!1,type:"string"},[a.shadow_database]:{description:"Port number the shadow database server will listen on.",required:!1,type:"string"}},L=/^[a-zA-Z0-9-_]+$/;function k(e){let{[a.server]:t,[a.database]:r,[a.shadow_database]:o,debug:n,detach:i,name:s}=e.args,p=r?Number(r):void 0,c=t?Number(t):void 0,u=o?Number(o):void 0;return t&&Number.isNaN(c)?(console.error(`Invalid server port number provided. Please provide a valid port number in \`--${a.server}\`.`),process.exit(1)):r&&Number.isNaN(p)?(console.error(`Invalid database port number provided. Please provide a valid port number in \`--${a.database}\`.`),process.exit(1)):o&&Number.isNaN(u)?(console.error(`Invalid shadow database port number provided. Please provide a valid port number in \`--${a.shadow_database}\`.`),process.exit(1)):c!=null&&c===p?(console.error(`The server port and database port cannot be the same. Please provide different port numbers in \`--${a.server}\` and/or \`--${a.database}\`.`),process.exit(1)):p!=null&&p===u?(console.error(`The database port and shadow database port cannot be the same. Please provide different port numbers in \`--${a.database}\` and/or \`--${a.shadow_database}\`.`),process.exit(1)):c!=null&&c===u?(console.error(`The server port and shadow database port cannot be the same. Please provide different port numbers in \`--${a.server}\` and/or \`--${a.shadow_database}\`.`),process.exit(1)):L.test(s)?{databasePort:p,debug:n,detach:i,name:s,serverPort:c,shadowDatabasePort:u}:(console.error("Invalid name provided. The name can only contain letters, numbers, dashes, and underscores. Please provide a valid name in `--name`."),process.exit(1))}import{PortNotAvailableError as q,ServerAlreadyRunningError as H}from"@prisma/dev";async function v(e,t,r){if(e instanceof H)try{let n=await e.server;if(!n)return await v("Something went wrong, try again!",t,r);t.warning(` Skipped! \u{1F60C}
3
3
 
4
4
  Your ${E} server ${f(n.name)} is already running and listening on ports ${I([n.port,n.databasePort,n.shadowDatabasePort])}.
5
5
 
6
6
  To start a different server, use the ${`${f("-n")}/${f("--name")}`} flag with another name.
7
7
  `);return}catch(n){return await v(n,t,r)}let{args:o}=r;throw d.error(e instanceof q?`Prisma Dev Error: port number \`${e.port}\` is already in use. Please pass a different port number in the \`--${o.port===String(e.port)?"port":o.databasePort===String(e.port)?"database":"shadow_database"}\` option.`:e),l.exitCode||=1,e}function _(e){l.on?.("uncaughtException",t=>{if("code"in t&&t.code==="ECONNRESET"){e?.debug&&d.error("uncaught ECONNRESET");return}e?.onError?.(t)})}function M(e){let t={shutdownAlreadyStarted:!1};l.once?.("SIGINT",$("SIGINT",e,t)),l.once?.("SIGTERM",$("SIGTERM",e,t))}function $(e,t,r){let{debug:o,onFailure:n,onSuccess:i,server:s}=t;return()=>{if(r.shutdownAlreadyStarted){o&&d.debug(`Received ${e} signal, ignoring.`);return}r.shutdownAlreadyStarted=!0,o&&d.debug(`${e} signal receieved.`),o&&d.log(`
8
8
  Closing Prisma Dev...
9
- `),l.exitCode=e==="SIGINT"?130:143,s.close().then(()=>{o&&d.debug("Prisma Dev server closed."),e==="SIGINT"&&(l.exitCode=0),i()}).catch(n)}}var U={description:"Create and run a new server",name:"prisma dev",version:T},b="\v",h={args:O,meta:U,run:async e=>{let{subCommands:t}=e.cmd,r=t?e.rawArgs.find(m=>!m.startsWith("-")):void 0;if(r&&r!==b&&r in t)return;let{debug:o,detach:n,name:i,serverPort:s,...p}=k(e);if(n){let m=await x(i);return d.log(m.database.connectionString)}let{renderContent:c,renderIntro:u,renderOutro:G,spinner:g}=N(i);try{let m=await V({...p,debug:o,name:i,port:s,renderIntro:u}),w=new AbortController,{isFulfilled:D,promise:j,reject:S,resolve:y}=A({onFulfilled:()=>w.abort()});M({debug:o,onFailure:S,onSuccess:y,server:m}),_({debug:o,onError:S}),await c({abortSignal:w.signal,debug:o,isClosed:D,onQuit:async()=>{await m.close(),y()},server:m,spinner:g}),await j,await G(),l.exitCode||=0}catch(m){await v(m,g,e)}},setup(e){e.args.debug&&(d.level=C.debug),d.options.formatOptions.date=!1},subCommands:{[b]:{},ls:()=>import("./list-URPVLN6C.js").then(e=>e.ListCommand),rm:()=>import("./remove-54AFKCLH.js").then(e=>e.RemoveCommand),start:()=>import("./start-C3IGMSC4.js").then(e=>e.StartCommand),stop:()=>import("./stop-4EZFWMR7.js").then(e=>e.StopCommand)}};async function V(e){let{renderIntro:t,...r}=e,[,o]=await Promise.allSettled([e.renderIntro(),B({...r,persistenceMode:"stateful"})]);if(o.status==="rejected")throw o.reason;return o.value}async function we(e,t){let[r]=e;r==="-v"&&(e[0]="--version"),r&&!(r in h.subCommands)&&r!=="--help"&&r!=="-h"&&r!=="--version"&&r!=="-v"&&e.unshift(b),await P(h,{rawArgs:e})}export{we as run};
9
+ `),l.exitCode=e==="SIGINT"?130:143,s.close().then(()=>{o&&d.debug("Prisma Dev server closed."),e==="SIGINT"&&(l.exitCode=0),i()}).catch(n)}}var U={description:"Create and run a new server",name:"prisma dev",version:T},b="\v",h={args:O,meta:U,run:async e=>{let{subCommands:t}=e.cmd,r=t?e.rawArgs.find(m=>!m.startsWith("-")):void 0;if(r&&r!==b&&r in t)return;let{debug:o,detach:n,name:i,serverPort:s,...p}=k(e);if(n){let m=await x(i);return d.log(m.database.connectionString)}let{renderContent:c,renderIntro:u,renderOutro:G,spinner:g}=N(i);try{let m=await V({...p,debug:o,name:i,port:s,renderIntro:u}),w=new AbortController,{isFulfilled:D,promise:j,reject:S,resolve:y}=A({onFulfilled:()=>w.abort()});M({debug:o,onFailure:S,onSuccess:y,server:m}),_({debug:o,onError:S}),await c({abortSignal:w.signal,debug:o,isClosed:D,onQuit:async()=>{await m.close(),y()},server:m,spinner:g}),await j,await G(),l.exitCode||=0}catch(m){await v(m,g,e)}},setup(e){e.args.debug&&(d.level=C.debug),d.options.formatOptions.date=!1},subCommands:{[b]:{},ls:()=>import("./list-K27C36FV.js").then(e=>e.ListCommand),rm:()=>import("./remove-3XULX44O.js").then(e=>e.RemoveCommand),start:()=>import("./start-X2ZT2ZIP.js").then(e=>e.StartCommand),stop:()=>import("./stop-D7RWEVES.js").then(e=>e.StopCommand)}};async function V(e){let{renderIntro:t,...r}=e,[,o]=await Promise.allSettled([e.renderIntro(),B({...r,persistenceMode:"stateful"})]);if(o.status==="rejected")throw o.reason;return o.value}async function we(e,t){let[r]=e;r==="-v"&&(e[0]="--version"),r&&!(r in h.subCommands)&&r!=="--help"&&r!=="-h"&&r!=="--version"&&r!=="-v"&&e.unshift(b),await P(h,{rawArgs:e})}export{we as run};
@@ -0,0 +1,5 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{c as M,e as R}from"./chunk-GZHQT2TW.js";import"./chunk-M6TFCQLD.js";import{ServerState as Y}from"@prisma/dev/internal/state";function u(i,t=i){return`\x1B]8;;${i.toString()}\x07${t.toString()}\x1B]8;;\x07`}function B(i){return typeof i=="object"&&i!==null}function N(i){return B(i)&&typeof i.length=="number"}function G(i){return Array.isArray(i)?i:i===void 0?[]:N(i)||i instanceof Set?Array.from(i):[i]}var h=G;var $=new WeakMap,A=new WeakMap,W=class{constructor(t,e){this.value=t,A.set(this,e)}set value(t){$.set(this,t)}get value(){let t=$.get(this),e=A.get(this);return e.get&&(t=e.get(t)),t===void 0?t="":t=String(t),t}},p=W;var b=class{constructor(t,e){this.list=[],this.load(t,e)}load(t,e){for(let n of h(t)){let r=new Map(e.list.map(s=>[s,new p(n[s.name],s)]));this.list.push(r)}}},E=b;var x=class{constructor(t){this.left=t.left,this.right=t.right}length(){return this.left.length+this.right.length}},_=x;var T=new WeakMap,y=class{constructor(t={}){this.name=t.name,this.width=t.width,this.maxWidth=t.maxWidth,this.minWidth=t.minWidth,this.noWrap=t.noWrap,this.break=t.break,this.contentWrappable=t.contentWrappable,this.contentWidth=t.contentWidth,this.minContentWidth=t.minContentWidth,this.padding=t.padding||{left:" ",right:" "},this.generatedWidth=null}set padding(t){T.set(this,new _(t))}get padding(){return T.get(this)}get wrappedContentWidth(){return Math.max(this.generatedWidth-this.padding.length(),0)}isResizable(){return!this.isFixed()}isFixed(){return this.width!==void 0||this.noWrap||!this.contentWrappable}generateWidth(){this.generatedWidth=this.width||this.contentWidth+this.padding.length()}generateMinWidth(){this.minWidth=this.minContentWidth+this.padding.length()}},w=y;var k=new WeakMap,C=class i{constructor(t){this.list=[];for(let e of h(t))this.add(e)}totalWidth(){return this.list.length?this.list.map(t=>t.generatedWidth).reduce((t,e)=>t+e):0}totalFixedWidth(){return this.getFixed().map(t=>t.generatedWidth).reduce((t,e)=>t+e,0)}get(t){return this.list.find(e=>e.name===t)}getResizable(){return this.list.filter(t=>t.isResizable())}getFixed(){return this.list.filter(t=>t.isFixed())}add(t){let e=t instanceof w?t:new w(t);return this.list.push(e),e}get maxWidth(){k.get(this)}set maxWidth(t){k.set(this,t)}autoSize(){let t=k.get(this);for(let n of this.list)n.generateWidth(),n.generateMinWidth();for(let n of this.list)n.maxWidth!==void 0&&n.generatedWidth>n.maxWidth&&(n.generatedWidth=n.maxWidth),n.minWidth!==void 0&&n.generatedWidth<n.minWidth&&(n.generatedWidth=n.minWidth);let e={total:this.totalWidth(),view:t,diff:this.totalWidth()-t,totalFixed:this.totalFixedWidth(),totalResizable:Math.max(t-this.totalFixedWidth(),0)};if(e.diff>0){let n=this.getResizable();for(let o of n)o.generatedWidth=Math.floor(e.totalResizable/n.length);let r=this.list.filter(o=>o.generatedWidth>o.contentWidth),s=this.list.filter(o=>o.generatedWidth<o.contentWidth),a=0;for(let o of r){let d=o.generatedWidth;o.generateWidth(),a+=d-o.generatedWidth}for(let o of s)o.generatedWidth+=Math.floor(a/s.length)}return this}static getColumns(t){let e=new i;for(let n of h(t))for(let r in n){let s=e.get(r);s||(s=e.add({name:r,contentWidth:0,minContentWidth:0}))}return e}},z=C;var m={chunk:/[^\s-]+?-\b|\S+|\s+|\r\n?|\n/g,ansiEscapeSequence:/\u001b.*?m/g},f=Symbol("emptyLine"),S=class{constructor(t="",e={}){this._lines=String(t).split(/\r\n|\n/g),this.options={eol:`
3
+ `,width:30,...e}}lines(){return this._lines.map(j,this).map(t=>{let e=t.match(m.chunk);return e&&e.length?e:[f]}).map(t=>this.options.break?t.map(I,this):t).map(t=>t.flat()).map(t=>t.length===1&&t[0]===f?t:t.reduce((e,n)=>{let r=e[e.length-1];return L(n).length+L(r).length>this.options.width?e.push(n):e[e.length-1]+=n,e},[""])).flat().map(t=>t===f?"":j.call(this,t)).filter((t,e)=>t!==""||this._lines[e]===""||typeof this._lines[e]<"u"&&this._lines[e].match(/^\s*$/))}wrap(){return this.lines().join(this.options.eol)}toString(){return this.wrap()}static wrap(t,e){return new this(t,e).wrap()}static lines(t,e){return new this(t,e).lines()}static isWrappable(t=""){let e=String(t).match(m.chunk);return e?e.length>1:!1}static getChunks(t){return t.match(m.chunk)||[]}};function j(i){return this.options.noTrim?i:i.trim()}function L(i){return i.replace(m.ansiEscapeSequence,"")}function I(i){if(i===f)return i;if(L(i).length>this.options.width){let t=i.split(""),e,n=[];for(;(e=t.splice(0,this.options.width)).length;)n.push(e.join(""));return n}else return i}var c=S;var F=/\u001b.*?m/g;function g(i){return i.replace(F,"")}function U(i){return F.test(i)}function V(i){let t=i.map(e=>e.length);return Math.max(...t)}function H(i,t,e){let n=i.length-g(i).length;return i=i||"",(t.left||"")+i.padEnd(e-t.length()+n)+(t.right||"")}function O(i){return c.getChunks(i).reduce((e,n)=>Math.max(n.length,e),0)}function P(i){let e=i.reduce((n,r)=>{for(let s of Object.keys(r))n.includes(s)||n.push(s);return n},[]).filter(n=>!i.some(s=>{let a=s[n];return a!==void 0&&typeof a!="string"||typeof a=="string"&&/\S+/.test(a)}));return i.map(n=>{for(let r of e)delete n[r];return n})}function D(i={},t={}){let e=Object.assign({},i);return typeof e.padding=="object"?(e.padding.left===void 0&&(e.padding.left=t.padding.left),e.padding.right===void 0&&(e.padding.right=t.padding.right)):e.padding=t.padding,e.maxWidth===void 0&&(e.maxWidth=t.maxWidth),e.columns===void 0&&(e.columns=t.columns),e.eol===void 0&&(e.eol=t.eol),e}var v=class{constructor(t,e={}){let n={padding:{left:" ",right:" "},maxWidth:80,columns:[],eol:`
4
+ `};this.options=D(e,n),this.rows=null,this.columns=null,this.load(t)}load(t){let e=this.options;e.ignoreEmptyColumns&&(t=P(t)),this.columns=z.getColumns(t),this.columns.maxWidth=e.maxWidth;for(let n of this.columns.list)n.padding=e.padding,n.noWrap=e.noWrap,n.break=e.break,e.break&&(n.contentWrappable=!0);for(let n of e.columns){let r=this.columns.get(n.name);r&&(n.padding&&(r.padding.left=n.padding.left,r.padding.right=n.padding.right),r.width=n.width,r.maxWidth=n.maxWidth,r.minWidth=n.minWidth,r.noWrap=n.noWrap,r.break=n.break,n.break&&(r.contentWrappable=!0),r.get=n.get)}for(let n of h(t))for(let r in n){let s=this.columns.get(r),o=new p(n[r],s).value;U(o)&&(o=g(o)),o.length>s.contentWidth&&(s.contentWidth=o.length);let d=O(o);d>s.minContentWidth&&(s.minContentWidth=d),s.contentWrappable||(s.contentWrappable=c.isWrappable(o))}return this.columns.autoSize(),this.rows=new E(t,this.columns),this}getWrapped(){return this.columns.autoSize(),this.rows.list.map(t=>{let e=[];for(let[n,r]of t.entries())n.noWrap?e.push(r.value.split(/\r\n?|\n/)):e.push(c.lines(r.value,{width:n.wrappedContentWidth,break:n.break,noTrim:this.options.noTrim}));return e})}getLines(){let t=this.getWrapped(),e=[];return t.forEach(n=>{let r=V(n);for(let s=0;s<r;s++){let a=[];n.forEach(o=>{a.push(o[s]||"")}),e.push(a)}}),e}renderLines(){return this.getLines().map(e=>e.reduce((n,r,s)=>{let a=this.columns.list[s];return n+H(r,a.padding,a.generatedWidth)},""))}toString(){return this.renderLines().join(this.options.eol)+this.options.eol}},q=v;var J={...R},Q={description:"List available servers",name:"ls"},Et={args:J,meta:Q,run:async i=>{let t=await Y.scan({debug:i.args.debug}),e=new q([{name:l("name"),status:l("status"),urls:l("urls")},...t.map(n=>({name:n.name,status:n.status,urls:X(n)}))]);M.log(e.toString())}};function l(i){return`\x1B[1m${i}\x1B[0m`}function X(i){if(i.status!=="running")return"";let t=Z(i),e=tt(i),n=et(i);return[t?`${l("DATABASE_URL")}: ${t}`:null,e?`${l("TCP")}: ${e}`:null,n?`${l("Terminal")}: ${n}`:null].filter(Boolean).join(`
5
+ `)}function Z(i){let{url:t}=i.exports?.ppg||{};if(!t)return"";let e=new URL(t),n=e.searchParams.get("api_key");return e.searchParams.set("api_key",`${n.slice(0,4)}...${n.slice(-4)}`),u(t,e)}function tt(i){let{connectionString:t,prismaORMConnectionString:e}=i.exports?.database||{};if(!e&&!t)return"";let n=new URL(e||t);return u(n,`${n.protocol}//...@${n.host}/...`)}function et(i){let{connectionString:t,terminalCommand:e}=i.exports?.database||{};if(!t||!e)return"";let n=new URL(t);return u(e,`...psql -h ${n.hostname} -p ${n.port} ...`)}export{Et as ListCommand};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as d}from"./chunk-INDLQOR6.js";import{a as n}from"./chunk-OWI5VZV5.js";import{a as s,b as l,c as f,f as r}from"./chunk-J2PYT4A5.js";import{d as e,f as m}from"./chunk-4QNO2WQL.js";import"./chunk-M6TFCQLD.js";import{deleteServer as u,isServerRunning as c,ServerState as C}from"@prisma/dev/internal/state";var y={...m,force:{default:!1,description:"Stops any running servers before removing them. Default is `false`, which would fail the command if any server is running.",required:!1,type:"boolean"},name:{description:"Name(s)/pattern(s) of the server(s) to remove",required:!0,type:"positional",valueHint:"glob"}},S={description:"Remove servers",name:"rm"},E={args:y,meta:S,run:async i=>{let{debug:a,force:p,name:g}=i.args,v=g.split(","),o=await C.scan({debug:a,globs:v});if(o.length===0)return e.log(`\u26A0\uFE0F No ${r} servers found to remove.
2
+ import{a as d}from"./chunk-YSQIGPRI.js";import{a as n}from"./chunk-2HCX64E4.js";import{a as s,b as l,c as f,f as r}from"./chunk-P5JORAQS.js";import{c as e,e as m}from"./chunk-GZHQT2TW.js";import"./chunk-M6TFCQLD.js";import{deleteServer as u,isServerRunning as c,ServerState as C}from"@prisma/dev/internal/state";var y={...m,force:{default:!1,description:"Stops any running servers before removing them. Default is `false`, which would fail the command if any server is running.",required:!1,type:"boolean"},name:{description:"Name(s)/pattern(s) of the server(s) to remove",required:!0,type:"positional",valueHint:"glob"}},S={description:"Remove servers",name:"rm"},E={args:y,meta:S,run:async i=>{let{debug:a,force:p,name:g}=i.args,v=g.split(","),o=await C.scan({debug:a,globs:v});if(o.length===0)return e.log(`\u26A0\uFE0F No ${r} servers found to remove.
3
3
  `);if(!p&&o.some(c)){e.log(`\u{1F6AB} Some ${r} servers are currently running:
4
4
 
5
5
  ${n(o.filter(c))}
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as m,c as u,d,e as S}from"./chunk-UU544OUK.js";import{a as i}from"./chunk-OWI5VZV5.js";import{b as f,f as r,g as p,h as c}from"./chunk-J2PYT4A5.js";import{d as t,f as g}from"./chunk-4QNO2WQL.js";import"./chunk-M6TFCQLD.js";import{setTimeout as C}from"timers/promises";import{isServerRunning as $,ServerState as y}from"@prisma/dev/internal/state";var A={...g,name:{description:"Name(s)/pattern(s) of the server(s) to start",required:!0,type:"positional",valueHint:"glob"}},b={description:"Start one or more stopped servers",name:"start"},U={args:A,meta:b,run:async v=>{let{debug:T,name:h}=v.args,R=h.split(","),w=await y.scan({debug:T,globs:R}),s=[],a=[];for(let e of w)($(e)?a:s).push(e);if(a.length>0&&t.log(`\u{1F45F} The following ${r} servers are already running and won't be affected:
2
+ import{a as m,c as u,d,e as S}from"./chunk-RJHC3PIO.js";import{a as i}from"./chunk-2HCX64E4.js";import{b as f,f as r,g as p,h as c}from"./chunk-P5JORAQS.js";import{c as t,e as g}from"./chunk-GZHQT2TW.js";import"./chunk-M6TFCQLD.js";import{setTimeout as C}from"timers/promises";import{isServerRunning as $,ServerState as y}from"@prisma/dev/internal/state";var A={...g,name:{description:"Name(s)/pattern(s) of the server(s) to start",required:!0,type:"positional",valueHint:"glob"}},b={description:"Start one or more stopped servers",name:"start"},U={args:A,meta:b,run:async v=>{let{debug:T,name:h}=v.args,R=h.split(","),w=await y.scan({debug:T,globs:R}),s=[],a=[];for(let e of w)($(e)?a:s).push(e);if(a.length>0&&t.log(`\u{1F45F} The following ${r} servers are already running and won't be affected:
3
3
 
4
4
  ${i(a)}
5
5
  `),s.length===0)return t.log(`\u26A0\uFE0F No ${r} servers found to start.
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as m}from"./chunk-INDLQOR6.js";import{a}from"./chunk-OWI5VZV5.js";import{b as n,f as o}from"./chunk-J2PYT4A5.js";import{d as e,f as i}from"./chunk-4QNO2WQL.js";import"./chunk-M6TFCQLD.js";import{isServerRunning as c,killServer as d,ServerState as g}from"@prisma/dev/internal/state";var S={...i,name:{description:"Name(s)/pattern(s) of the server(s) to stop",required:!0,type:"positional",valueHint:"glob"}},u={description:"Stop servers",name:"stop"},h={args:S,meta:u,run:async p=>{let{debug:t,name:l}=p.args,f=l.split(","),s=(await g.scan({debug:t,globs:f})).filter(c);if(s.length===0)return e.log(`\u26A0\uFE0F No ${o} servers found to stop.
2
+ import{a as m}from"./chunk-YSQIGPRI.js";import{a}from"./chunk-2HCX64E4.js";import{b as n,f as o}from"./chunk-P5JORAQS.js";import{c as e,e as i}from"./chunk-GZHQT2TW.js";import"./chunk-M6TFCQLD.js";import{isServerRunning as c,killServer as d,ServerState as g}from"@prisma/dev/internal/state";var S={...i,name:{description:"Name(s)/pattern(s) of the server(s) to stop",required:!0,type:"positional",valueHint:"glob"}},u={description:"Stop servers",name:"stop"},h={args:S,meta:u,run:async p=>{let{debug:t,name:l}=p.args,f=l.split(","),s=(await g.scan({debug:t,globs:f})).filter(c);if(s.length===0)return e.log(`\u26A0\uFE0F No ${o} servers found to stop.
3
3
  `);if(e.log(`\u26B0\uFE0F Stopping the following ${o} servers:
4
4
 
5
5
  ${a(s)}`),!await m({confirmationText:"i will interrupt sessions",debug:t}))return;(await Promise.allSettled(s.map(async r=>{await d(r,t),e.log(`\u{1F480} Stopped ${o} server ${n(r.name)}.`)}))).some(r=>r.status==="rejected")&&(e.error(`Potentially failed to stop some ${o} servers.`),process.exitCode||=1),e.log("")}};export{h as StopCommand};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/cli-dev",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "Dev CLI for Prisma",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -43,18 +43,18 @@
43
43
  "typescript": "5.9.3",
44
44
  "vitest": "4.0.17",
45
45
  "yocto-spinner": "1.0.0",
46
- "common-stuff": "^0.0.0",
47
- "common-cli-utils": "^0.0.0"
46
+ "common-cli-utils": "^0.0.0",
47
+ "common-stuff": "^0.0.0"
48
48
  },
49
49
  "dependencies": {
50
- "@prisma/dev": "0.20.0"
50
+ "@prisma/dev": "0.21.0"
51
51
  },
52
52
  "scripts": {
53
53
  "build": "tsup",
54
54
  "check:exports": "attw . --pack --profile esm-only",
55
55
  "dev": "tsup --watch",
56
56
  "lint": "eslint --fix .",
57
- "test": "",
57
+ "test": "vitest run",
58
58
  "typecheck": "tsc --noEmit"
59
59
  }
60
60
  }
@@ -1,30 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as v,b as a,c as S,e as u,f as x,h as b,i as R,j as C}from"./chunk-J2PYT4A5.js";import{b as g,c as w,d as m}from"./chunk-4QNO2WQL.js";import{b as G}from"./chunk-M6TFCQLD.js";import{fork as L}from"child_process";import{createRequire as U}from"module";import{ServerState as _}from"@prisma/dev/internal/state";var N=U(import.meta.url).resolve("@prisma/dev/internal/daemon");async function jt(e){let t,o,c=new Promise((i,p)=>{t=i,o=p}),s=typeof e=="string"?e:e.name,n=L(N,[s],{detached:!0,stdio:"ignore"});n.once("error",i=>{m.error(i)}),n.once("message",i=>{let{type:p}=i;if(p==="error")return o(i.error);if(p==="started")return t(i.server);o(`Unknown message type: "${p}"`)});try{return await c}catch(i){if(typeof i=="string"&&i.includes("is already running")){if(typeof e!="string")return{...e.exports,name:s};let p=await _.fromServerDump({name:s});if(!p)throw new Error(`Failed to retrieve the status of the running server "${s}".`);return{...p.exports,name:s}}throw i}finally{n.disconnect(),n.unref(),n.removeAllListeners()}}import{setTimeout as _t}from"timers/promises";import l from"process";import{stripVTControlCharacters as Ot}from"util";var h={};G(h,{bgBlack:()=>st,bgBlue:()=>lt,bgBlueBright:()=>wt,bgCyan:()=>mt,bgCyanBright:()=>Ct,bgGray:()=>dt,bgGreen:()=>ct,bgGreenBright:()=>$t,bgMagenta:()=>ht,bgMagentaBright:()=>Rt,bgRed:()=>at,bgRedBright:()=>Pt,bgWhite:()=>ut,bgWhiteBright:()=>Bt,bgYellow:()=>pt,bgYellowBright:()=>Tt,black:()=>z,blue:()=>et,blueBright:()=>xt,bold:()=>W,cyan:()=>ot,cyanBright:()=>bt,dim:()=>Y,gray:()=>it,green:()=>Z,greenBright:()=>ft,hidden:()=>K,inverse:()=>j,italic:()=>q,magenta:()=>rt,magentaBright:()=>St,overline:()=>Q,red:()=>J,redBright:()=>gt,reset:()=>V,strikethrough:()=>X,underline:()=>F,white:()=>nt,whiteBright:()=>yt,yellow:()=>tt,yellowBright:()=>vt});import k from"tty";var H=k?.WriteStream?.prototype?.hasColors?.()??!1,r=(e,t)=>{if(!H)return s=>s;let o=`\x1B[${e}m`,c=`\x1B[${t}m`;return s=>{let n=s+"",i=n.indexOf(c);if(i===-1)return o+n+c;let p=o,d=0;for(;i!==-1;)p+=n.slice(d,i)+o,d=i+c.length,i=n.indexOf(c,d);return p+=n.slice(d)+c,p}},V=r(0,0),W=r(1,22),Y=r(2,22),q=r(3,23),F=r(4,24),Q=r(53,55),j=r(7,27),K=r(8,28),X=r(9,29),z=r(30,39),J=r(31,39),Z=r(32,39),tt=r(33,39),et=r(34,39),rt=r(35,39),ot=r(36,39),nt=r(37,39),it=r(90,39),st=r(40,49),at=r(41,49),ct=r(42,49),pt=r(43,49),lt=r(44,49),ht=r(45,49),mt=r(46,49),ut=r(47,49),dt=r(100,49),gt=r(91,39),ft=r(92,39),vt=r(93,39),xt=r(94,39),St=r(95,39),bt=r(96,39),yt=r(97,39),Pt=r(101,49),$t=r(102,49),Tt=r(103,49),wt=r(104,49),Rt=r(105,49),Ct=r(106,49),Bt=r(107,49);var f=l.platform!=="win32"||!!l.env.WT_SESSION||l.env.TERM_PROGRAM==="vscode",It=e=>!!(e.isTTY&&l.env.TERM!=="dumb"&&!("CI"in l.env)),Et=h.blue(f?"\u2139":"i"),At=h.green(f?"\u2714":"\u221A"),Mt=h.yellow(f?"\u26A0":"\u203C"),Dt=h.red(f?"\u2716":"\xD7"),Gt={frames:f?["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]:["-","\\","|","/"],interval:80},y=class{#p;#l;#n=-1;#i;#r;#t;#s;#h=0;#o;#e;#d=0;#m=!1;constructor(t={}){let o=t.spinner??Gt;this.#p=o.frames,this.#l=o.interval,this.#r=t.text??"",this.#t=t.stream??l.stderr,this.#s=t.color??"cyan",this.#e=It(this.#t),this.#o=this.#b.bind(this)}start(t){return t&&(this.#r=t),this.isSpinning?this:(this.#m=!0,this.#f(),this.#c(),this.#x(),this.#e&&(this.#i=setInterval(()=>{this.#c()},this.#l)),this)}stop(t){return this.isSpinning?(this.#m=!1,this.#i&&(clearInterval(this.#i),this.#i=void 0),this.#v(),this.clear(),this.#S(),t&&this.#t.write(`${t}
3
- `),this):this}#a(t,o){return this.stop(`${t} ${o??this.#r}`)}success(t){return this.#a(At,t)}error(t){return this.#a(Dt,t)}warning(t){return this.#a(Mt,t)}info(t){return this.#a(Et,t)}get isSpinning(){return this.#m}get text(){return this.#r}set text(t){this.#r=t??"",this.#c()}get color(){return this.#s}set color(t){this.#s=t,this.#c()}clear(){if(!this.#e)return this;this.#t.cursorTo(0);for(let t=0;t<this.#h;t++)t>0&&this.#t.moveCursor(0,-1),this.#t.clearLine(1);return this.#h=0,this}#c(){let t=Date.now();(this.#n===-1||t-this.#d>=this.#l)&&(this.#n=++this.#n%this.#p.length,this.#d=t);let o=h[this.#s]??h.cyan,c=this.#p[this.#n],s=`${o(c)} ${this.#r}`;this.#e||(s+=`
4
- `),this.clear(),this.#u(s),this.#e&&(this.#h=this.#g(s))}#u(t){this.#t.write(t)}#g(t){let o=this.#t.columns??80,c=Ot(t).split(`
5
- `),s=0;for(let n of c)s+=Math.max(1,Math.ceil(n.length/o));return s}#f(){this.#e&&this.#u("\x1B[?25l")}#v(){this.#e&&this.#u("\x1B[?25h")}#x(){l.once("SIGINT",this.#o),l.once("SIGTERM",this.#o)}#S(){l.off("SIGINT",this.#o),l.off("SIGTERM",this.#o)}#b(t){this.isSpinning&&this.stop();let o=t==="SIGINT"?130:t==="SIGTERM"?143:1;l.exit(o)}};function P(e){return new y(e)}var Lt=[{value:"h",label:"print http url"},{value:"t",label:"print tcp urls"},{value:"q",label:"quit"}],$=6;function B(e){let t=new C({debug:e?.debug,options:Lt,render:Ut,signal:e?.abortSignal});return{clearPrompt(){v.stdout.moveCursor(0,-$),v.stdout.cursorTo(0),v.stdout.clearScreenDown()},prompt:t,respond:async o=>{if(R(o)||o==="q")return await e?.onQuit?.();await e?.onOption?.[o]?.()}}}function Ut(){let e=`${this.options.map(t=>`${g("inverse",` ${t.value} `)} ${t.label}`).join(" ")}`;return w(e,{style:{borderColor:"blackBright",borderStyle:"solid"},title:" \u25B3 press a key \u25B3 "})}function ge(e){let t=P();return{renderContent:Nt,renderIntro:()=>kt(e,t),renderOutro:()=>Promise.resolve(Ht(e)),spinner:t}}async function Nt(e){let{abortSignal:t,debug:o,isClosed:c,onQuit:s,server:n,spinner:i}=e;if(i.success(` Great Success! \u{1F609}\u{1F44D}
6
-
7
- Your ${x} server ${a(n.name)} is ready and listening on ports ${Vt([new URL(n.http.url).port,new URL(n.database.connectionString).port,new URL(n.shadowDatabase.connectionString).port])}.`),!b){m.log(O(n)),m.log(I(n));return}for(;!c();){let{clearPrompt:p,prompt:d,respond:M}=B({abortSignal:t,debug:o,onOption:{h:()=>m.log(O(n)),t:()=>m.log(I(n))},onQuit:s}),D=await d.prompt();p(),t.aborted||await M(D)}}async function kt(e,t){t.start(` Starting ${x} server ${a(e)}...${`
8
- `.repeat($+3)}`),b&&await _t(250)}function Ht(e){m.log(`\u{1F44B} Buh Bye!
9
-
10
- Your ${x} server ${a(e)} has been closed successfully.
11
- `)}function O(e){return`\u{1F50C} To connect to your local Prisma Postgres database via HTTP + Prisma ORM
12
- use the following connection string:
13
-
14
- ${A("\u{1F4C4} .env:")}
15
-
16
- ${T("DATABASE_URL",Wt(e.ppg.url))}
17
-
18
- \u2728 The ${a("api_key")} above does not contain any sensitive information.`}function I(e){return`\u{1F50C} To connect to your local Prisma Postgres database via TCP + Prisma ORM
19
- use the following connection strings:
20
-
21
- ${A("\u{1F4C4} .env:")}
22
-
23
- ${T("DATABASE_URL",E(e.database.prismaORMConnectionString))}
24
-
25
- ${T("SHADOW_DATABASE_URL",E(e.shadowDatabase.prismaORMConnectionString))}
26
-
27
- \u{1F418} You can also use the TCP ${a("DATABASE_URL")} with the ${a("pg")} or ${a("postgres.js")} JavaScript drivers!
28
-
29
- Set the maximum number of connections to ${a(1)}, connect timeout to ${a(0)} and
30
- idle timeout to the smallest positive value supported.`}function Vt(e){if(e.length===0)return"";let t=[...e].map(Number).sort();return t.length>1&&t.every((o,c)=>c===0||o===t[c-1]+1)?`${a(t[0])}-${a(t.at(-1))}`:e.map(a).join(", ")}function T(e,t){return`${a(e)}="${t}"`}function Wt(e){return e=new URL(e),`${S(e.protocol)}//${a(e.hostname)}:${a(e.port)}${u(e.pathname)}${u(e.search)}`}function E(e){return e=new URL(e),`${S(e.protocol)}${u(`//${e.username}:${e.password}@`)}${a(e.hostname)}${u(":")}${a(e.port)}${u(e.pathname)}${u(e.search)}`}function A(e){return g("italic",g("dim",g("green",`# ${e}`)))}export{jt as a,ge as b,O as c,I as d,Vt as e};
@@ -1,5 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{d as v,f as M}from"./chunk-4QNO2WQL.js";import"./chunk-M6TFCQLD.js";import{ServerState as I}from"@prisma/dev/internal/state";function u(i,t=i){return`\x1B]8;;${i.toString()}\x07${t.toString()}\x1B]8;;\x07`}function q(i){return typeof i=="object"&&i!==null}function B(i){return q(i)&&typeof i.length=="number"}function G(i){return Array.isArray(i)?i:i===void 0?[]:B(i)||i instanceof Set?Array.from(i):[i]}var h=G;var R=new WeakMap,A=new WeakMap,g=class{constructor(t,e){this.value=t,A.set(this,e)}set value(t){R.set(this,t)}get value(){let t=R.get(this),e=A.get(this);return e.get&&(t=e.get(t)),t===void 0?t="":t=String(t),t}},p=g;var W=class{constructor(t,e){this.list=[],this.load(t,e)}load(t,e){for(let n of h(t)){let r=new Map(e.list.map(s=>[s,new p(n[s.name],s)]));this.list.push(r)}}},$=W;var x=class{constructor(t){this.left=t.left,this.right=t.right}length(){return this.left.length+this.right.length}},E=x;var T=new WeakMap,b=class{constructor(t={}){this.name=t.name,this.width=t.width,this.maxWidth=t.maxWidth,this.minWidth=t.minWidth,this.noWrap=t.noWrap,this.break=t.break,this.contentWrappable=t.contentWrappable,this.contentWidth=t.contentWidth,this.minContentWidth=t.minContentWidth,this.padding=t.padding||{left:" ",right:" "},this.generatedWidth=null}set padding(t){T.set(this,new E(t))}get padding(){return T.get(this)}get wrappedContentWidth(){return Math.max(this.generatedWidth-this.padding.length(),0)}isResizable(){return!this.isFixed()}isFixed(){return this.width!==void 0||this.noWrap||!this.contentWrappable}generateWidth(){this.generatedWidth=this.width||this.contentWidth+this.padding.length()}generateMinWidth(){this.minWidth=this.minContentWidth+this.padding.length()}},w=b;var y=new WeakMap,k=class i{constructor(t){this.list=[];for(let e of h(t))this.add(e)}totalWidth(){return this.list.length?this.list.map(t=>t.generatedWidth).reduce((t,e)=>t+e):0}totalFixedWidth(){return this.getFixed().map(t=>t.generatedWidth).reduce((t,e)=>t+e,0)}get(t){return this.list.find(e=>e.name===t)}getResizable(){return this.list.filter(t=>t.isResizable())}getFixed(){return this.list.filter(t=>t.isFixed())}add(t){let e=t instanceof w?t:new w(t);return this.list.push(e),e}get maxWidth(){y.get(this)}set maxWidth(t){y.set(this,t)}autoSize(){let t=y.get(this);for(let n of this.list)n.generateWidth(),n.generateMinWidth();for(let n of this.list)n.maxWidth!==void 0&&n.generatedWidth>n.maxWidth&&(n.generatedWidth=n.maxWidth),n.minWidth!==void 0&&n.generatedWidth<n.minWidth&&(n.generatedWidth=n.minWidth);let e={total:this.totalWidth(),view:t,diff:this.totalWidth()-t,totalFixed:this.totalFixedWidth(),totalResizable:Math.max(t-this.totalFixedWidth(),0)};if(e.diff>0){let n=this.getResizable();for(let o of n)o.generatedWidth=Math.floor(e.totalResizable/n.length);let r=this.list.filter(o=>o.generatedWidth>o.contentWidth),s=this.list.filter(o=>o.generatedWidth<o.contentWidth),a=0;for(let o of r){let c=o.generatedWidth;o.generateWidth(),a+=c-o.generatedWidth}for(let o of s)o.generatedWidth+=Math.floor(a/s.length)}return this}static getColumns(t){let e=new i;for(let n of h(t))for(let r in n){let s=e.get(r);s||(s=e.add({name:r,contentWidth:0,minContentWidth:0}))}return e}},z=k;var m={chunk:/[^\s-]+?-\b|\S+|\s+|\r\n?|\n/g,ansiEscapeSequence:/\u001b.*?m/g},C=class{constructor(t="",e={}){this._lines=String(t).split(/\r\n|\n/g),this.options={eol:`
3
- `,width:30,...e}}lines(){return this._lines.map(j,this).map(t=>t.match(m.chunk)||["~~empty~~"]).map(t=>this.options.break?t.map(N,this):t).map(t=>t.flat()).map(t=>t.reduce((e,n)=>{let r=e[e.length-1];return S(n).length+S(r).length>this.options.width?e.push(n):e[e.length-1]+=n,e},[""])).flat().map(j,this).filter(t=>t.trim()).map(t=>t.replace("~~empty~~",""))}wrap(){return this.lines().join(this.options.eol)}toString(){return this.wrap()}static wrap(t,e){return new this(t,e).wrap()}static lines(t,e){return new this(t,e).lines()}static isWrappable(t=""){let e=String(t).match(m.chunk);return e?e.length>1:!1}static getChunks(t){return t.match(m.chunk)||[]}};function j(i){return this.options.noTrim?i:i.trim()}function S(i){return i.replace(m.ansiEscapeSequence,"")}function N(i){if(S(i).length>this.options.width){let t=i.split(""),e,n=[];for(;(e=t.splice(0,this.options.width)).length;)n.push(e.join(""));return n}else return i}var d=C;var F=/\u001b.*?m/g;function f(i){return i.replace(F,"")}function U(i){return F.test(i)}function _(i){let t=i.map(e=>e.length);return Math.max(...t)}function V(i,t,e){let n=i.length-f(i).length;return i=i||"",(t.left||"")+i.padEnd(e-t.length()+n)+(t.right||"")}function H(i){return d.getChunks(i).reduce((e,n)=>Math.max(n.length,e),0)}function O(i){let e=i.reduce((n,r)=>{for(let s of Object.keys(r))n.includes(s)||n.push(s);return n},[]).filter(n=>!i.some(s=>{let a=s[n];return a!==void 0&&typeof a!="string"||typeof a=="string"&&/\S+/.test(a)}));return i.map(n=>{for(let r of e)delete n[r];return n})}function D(i={},t={}){let e=Object.assign({},i);return typeof e.padding=="object"?(e.padding.left===void 0&&(e.padding.left=t.padding.left),e.padding.right===void 0&&(e.padding.right=t.padding.right)):e.padding=t.padding,e.maxWidth===void 0&&(e.maxWidth=t.maxWidth),e.columns===void 0&&(e.columns=t.columns),e.eol===void 0&&(e.eol=t.eol),e}var L=class{constructor(t,e={}){let n={padding:{left:" ",right:" "},maxWidth:80,columns:[],eol:`
4
- `};this.options=D(e,n),this.rows=null,this.columns=null,this.load(t)}load(t){let e=this.options;e.ignoreEmptyColumns&&(t=O(t)),this.columns=z.getColumns(t),this.columns.maxWidth=e.maxWidth;for(let n of this.columns.list)n.padding=e.padding,n.noWrap=e.noWrap,n.break=e.break,e.break&&(n.contentWrappable=!0);for(let n of e.columns){let r=this.columns.get(n.name);r&&(n.padding&&(r.padding.left=n.padding.left,r.padding.right=n.padding.right),r.width=n.width,r.maxWidth=n.maxWidth,r.minWidth=n.minWidth,r.noWrap=n.noWrap,r.break=n.break,n.break&&(r.contentWrappable=!0),r.get=n.get)}for(let n of h(t))for(let r in n){let s=this.columns.get(r),o=new p(n[r],s).value;U(o)&&(o=f(o)),o.length>s.contentWidth&&(s.contentWidth=o.length);let c=H(o);c>s.minContentWidth&&(s.minContentWidth=c),s.contentWrappable||(s.contentWrappable=d.isWrappable(o))}return this.columns.autoSize(),this.rows=new $(t,this.columns),this}getWrapped(){return this.columns.autoSize(),this.rows.list.map(t=>{let e=[];for(let[n,r]of t.entries())n.noWrap?e.push(r.value.split(/\r\n?|\n/)):e.push(d.lines(r.value,{width:n.wrappedContentWidth,break:n.break,noTrim:this.options.noTrim}));return e})}getLines(){let t=this.getWrapped(),e=[];return t.forEach(n=>{let r=_(n);for(let s=0;s<r;s++){let a=[];n.forEach(o=>{a.push(o[s]||"")}),e.push(a)}}),e}renderLines(){return this.getLines().map(e=>e.reduce((n,r,s)=>{let a=this.columns.list[s];return n+V(r,a.padding,a.generatedWidth)},""))}toString(){return this.renderLines().join(this.options.eol)+this.options.eol}},P=L;var J={...M},Q={description:"List available servers",name:"ls"},$t={args:J,meta:Q,run:async i=>{let t=await I.scan({debug:i.args.debug}),e=new P([{name:l("name"),status:l("status"),urls:l("urls")},...t.map(n=>({name:n.name,status:n.status,urls:X(n)}))]);v.log(e.toString())}};function l(i){return`\x1B[1m${i}\x1B[0m`}function X(i){if(i.status!=="running")return"";let t=Y(i),e=Z(i),n=tt(i);return[t?`${l("DATABASE_URL")}: ${t}`:null,e?`${l("TCP")}: ${e}`:null,n?`${l("Terminal")}: ${n}`:null].filter(Boolean).join(`
5
- `)}function Y(i){let{url:t}=i.exports?.ppg||{};if(!t)return"";let e=new URL(t),n=e.searchParams.get("api_key");return e.searchParams.set("api_key",`${n.slice(0,4)}...${n.slice(-4)}`),u(t,e)}function Z(i){let{connectionString:t,prismaORMConnectionString:e}=i.exports?.database||{};if(!e&&!t)return"";let n=new URL(e||t);return u(n,`${n.protocol}//...@${n.host}/...`)}function tt(i){let{connectionString:t,terminalCommand:e}=i.exports?.database||{};if(!t||!e)return"";let n=new URL(t);return u(e,`...psql -h ${n.hostname} -p ${n.port} ...`)}export{$t as ListCommand};
File without changes