create-turbo 1.9.6 → 1.9.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/dist/cli.js +3 -3
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -114,7 +114,7 @@ ${s.message}`:S,m=[v,a,c].filter(Boolean).join(`
114
114
  ${r.workspaceData.globs.map(o=>` - "${o}"`).join(`
115
115
  `)}`))),c&&(Rn({workspace:{name:"root",paths:r.paths},project:r,to:t,logger:n,options:i}),n.workspaceHeader(),r.workspaceData.workspaces.forEach(o=>Rn({workspace:o,project:r,to:t,logger:n,options:i})))}async function BL(e){let{project:r,logger:t,options:n}=e,i=r.workspaceData.globs.length>0;t.mainStep(Pn({action:"remove",packageManager:"pnpm",project:r}));let c=kt({workspaceRoot:r.paths.root});if(r.paths.workspaceConfig&&i&&(t.subStep('removing "pnpm-workspace.yaml"'),n!=null&&n.dry||jt.default.rmSync(r.paths.workspaceConfig,{force:!0})),t.subStep(`removing "packageManager" field in ${r.name} root "package.json"`),delete c.packageManager,!(n!=null&&n.dry)){jt.default.writeJSONSync(r.paths.packageJson,c,{spaces:2});let a=[r.paths.nodeModules,...r.workspaceData.workspaces.map(o=>o.paths.nodeModules)];try{t.subStep('removing "node_modules"'),await Promise.all(a.map(o=>jt.default.rm(o,{recursive:!0,force:!0})))}catch{throw new at("Failed to remove node_modules",{type:"error_removing_node_modules"})}}}async function IL(e){let{project:r,logger:t,options:n}=e;t.subStep(`removing ${wi.default.relative(r.paths.root,r.paths.lockfile)}`),n!=null&&n.dry||jt.default.rmSync(r.paths.lockfile,{force:!0})}async function LL(e){let{project:r,logger:t,options:n}=e;if(r.packageManager!=="pnpm"&&(t.subStep(`converting ${wi.default.relative(r.paths.root,r.paths.lockfile)} to pnpm-lock.yaml`),!(n!=null&&n.dry)&&jt.default.existsSync(r.paths.lockfile)))try{await(0,SL.default)("pnpm",["import"],{stdio:"ignore",cwd:r.paths.root})}finally{jt.default.rmSync(r.paths.lockfile,{force:!0})}}var ML={detect:p8,read:FL,create:PL,remove:BL,clean:IL,convertLock:LL},NL=ML,Lr=We(require("fs-extra")),ho=We(require("path"));async function d8(e){let r=ho.default.join(e.workspaceRoot,"package-lock.json"),t=Xc({workspaceRoot:e.workspaceRoot});return Lr.default.existsSync(r)||t==="npm"}async function jL(e){if(!await d8(e))throw new at("Not an npm project",{type:"package_manager-unexpected"});let r=kt(e),{name:t,description:n}=xo(e);return{name:t,description:n,packageManager:"npm",paths:Zc({root:e.workspaceRoot,lockFile:"package-lock.json"}),workspaceData:{globs:r.workspaces||[],workspaces:Qc({workspaceGlobs:r.workspaces,...e})}}}async function $L(e){let{project:r,options:t,to:n,logger:i}=e,c=r.workspaceData.globs.length>0;i.mainStep(Pn({packageManager:"npm",action:"create",project:r}));let a=kt({workspaceRoot:r.paths.root});i.rootHeader(),i.rootStep(`adding "packageManager" field to ${ho.default.relative(r.paths.root,r.paths.packageJson)}`),a.packageManager=`${n.name}@${n.version}`,c?(i.rootStep(`adding "workspaces" field to ${ho.default.relative(r.paths.root,r.paths.packageJson)}`),a.workspaces=r.workspaceData.globs,t!=null&&t.dry||Lr.default.writeJSONSync(r.paths.packageJson,a,{spaces:2}),Rn({workspace:{name:"root",paths:r.paths},project:r,to:n,logger:i,options:t}),i.workspaceHeader(),r.workspaceData.workspaces.forEach(o=>Rn({workspace:o,project:r,to:n,logger:i,options:t}))):t!=null&&t.dry||Lr.default.writeJSONSync(r.paths.packageJson,a,{spaces:2})}async function HL(e){let{project:r,logger:t,options:n}=e,i=r.workspaceData.globs.length>0;t.mainStep(Pn({packageManager:"npm",action:"remove",project:r}));let c=kt({workspaceRoot:r.paths.root});if(i&&(t.subStep(`removing "workspaces" field in ${r.name} root "package.json"`),delete c.workspaces),t.subStep(`removing "packageManager" field in ${r.name} root "package.json"`),delete c.packageManager,!(n!=null&&n.dry)){Lr.default.writeJSONSync(r.paths.packageJson,c,{spaces:2});let a=[r.paths.nodeModules,...r.workspaceData.workspaces.map(o=>o.paths.nodeModules)];try{t.subStep('removing "node_modules"'),await Promise.all(a.map(o=>Lr.default.rm(o,{recursive:!0,force:!0})))}catch{throw new at("Failed to remove node_modules",{type:"error_removing_node_modules"})}}}async function qL(e){let{project:r,logger:t,options:n}=e;t.subStep(`removing ${ho.default.relative(r.paths.root,r.paths.lockfile)}`),n!=null&&n.dry||Lr.default.rmSync(r.paths.lockfile,{force:!0})}async function UL(e){let{project:r,options:t}=e;r.packageManager!=="npm"&&(t!=null&&t.dry||Lr.default.rmSync(r.paths.lockfile,{force:!0}))}var GL={detect:d8,read:jL,create:$L,remove:HL,clean:qL,convertLock:UL},zL=GL,Mr=We(require("fs-extra")),fo=We(require("path"));async function m8(e){let r=fo.default.join(e.workspaceRoot,"yarn.lock"),t=Xc({workspaceRoot:e.workspaceRoot});return Mr.default.existsSync(r)||t==="yarn"}async function WL(e){if(!await m8(e))throw new at("Not a yarn project",{type:"package_manager-unexpected"});let r=kt(e),{name:t,description:n}=xo(e);return{name:t,description:n,packageManager:"yarn",paths:Zc({root:e.workspaceRoot,lockFile:"yarn.lock"}),workspaceData:{globs:r.workspaces||[],workspaces:Qc({workspaceGlobs:r.workspaces,...e})}}}async function VL(e){let{project:r,to:t,logger:n,options:i}=e,c=r.workspaceData.globs.length>0;n.mainStep(Pn({packageManager:"yarn",action:"create",project:r}));let a=kt({workspaceRoot:r.paths.root});n.rootHeader(),n.rootStep(`adding "packageManager" field to ${fo.default.relative(r.paths.root,r.paths.packageJson)}`),a.packageManager=`${t.name}@${t.version}`,c?(n.rootStep(`adding "workspaces" field to ${fo.default.relative(r.paths.root,r.paths.packageJson)}`),a.workspaces=r.workspaceData.globs,i!=null&&i.dry||Mr.default.writeJSONSync(r.paths.packageJson,a,{spaces:2}),Rn({workspace:{name:"root",paths:r.paths},project:r,to:t,logger:n,options:i}),n.workspaceHeader(),r.workspaceData.workspaces.forEach(o=>Rn({workspace:o,project:r,to:t,logger:n,options:i}))):i!=null&&i.dry||Mr.default.writeJSONSync(r.paths.packageJson,a,{spaces:2})}async function YL(e){let{project:r,logger:t,options:n}=e,i=r.workspaceData.globs.length>0;t.mainStep(Pn({packageManager:"yarn",action:"remove",project:r}));let c=kt({workspaceRoot:r.paths.root});if(i&&(t.subStep(`removing "workspaces" field in ${r.name} root "package.json"`),delete c.workspaces),t.subStep(`removing "packageManager" field in ${r.name} root "package.json"`),delete c.packageManager,!(n!=null&&n.dry)){Mr.default.writeJSONSync(r.paths.packageJson,c,{spaces:2});let a=[r.paths.nodeModules,...r.workspaceData.workspaces.map(o=>o.paths.nodeModules)];try{t.subStep('removing "node_modules"'),await Promise.all(a.map(o=>Mr.default.rm(o,{recursive:!0,force:!0})))}catch{throw new at("Failed to remove node_modules",{type:"error_removing_node_modules"})}}}async function KL(e){let{project:r,logger:t,options:n}=e;t.subStep(`removing ${fo.default.relative(r.paths.root,r.paths.lockfile)}`),n!=null&&n.dry||Mr.default.rmSync(r.paths.lockfile,{force:!0})}async function XL(e){let{project:r,options:t}=e;r.packageManager!=="yarn"&&(t!=null&&t.dry||Mr.default.rmSync(r.paths.lockfile,{force:!0}))}var ZL={detect:m8,read:WL,create:VL,remove:YL,clean:KL,convertLock:XL},QL=ZL,JL={pnpm:NL,yarn:QL,npm:zL},Cn=JL;async function y8({root:e}){let{exists:r,absolute:t}=OL({directory:e});if(!r)throw new at(`Could not find directory at ${t}. Ensure the directory exists.`,{type:"invalid_directory"});for(let{detect:n,read:i}of Object.values(Cn))if(await n({workspaceRoot:t}))return i({workspaceRoot:t});throw new at("Could not determine package manager. Add `packageManager` to `package.json` or ensure a lockfile is present.",{type:"package_manager-unable_to_detect"})}var eM=We(require("chalk")),tM=We(Ga()),rM=We(py()),nM=require("semver"),xt=We(require("chalk")),iM=We(Cy()),En=2,g8=class{constructor({interactive:e,dry:r}={}){this.interactive=e!=null?e:!0,this.dry=r!=null?r:!1,this.step=1}logger(...e){this.interactive&&console.log(...e)}indented(e,...r){this.logger(" ".repeat(En*e),...r)}header(e){this.blankLine(),this.logger(xt.default.bold(e))}installerFrames(){let e=`${" ".repeat(En)} - ${this.dry?xt.default.yellow("SKIPPED | "):xt.default.green("OK | ")}`;return[`${e} `,`${e}> `,`${e}>> `,`${e}>>>`]}gradient(e){return(0,iM.default)("#0099F7","#F11712")(e.toString())}hero(){this.logger(xt.default.bold(this.gradient(`
116
116
  >>> TURBOREPO
117
- `)))}info(...e){this.logger(...e)}mainStep(e){this.blankLine(),this.logger(`${this.step}. ${xt.default.underline(e)}`),this.step+=1}subStep(...e){this.logger(" ".repeat(En),"-",this.dry?xt.default.yellow("SKIPPED |"):xt.default.green("OK |"),...e)}subStepFailure(...e){this.logger(" ".repeat(En),"-",xt.default.red("ERROR |"),...e)}rootHeader(){this.blankLine(),this.indented(2,"Root:")}rootStep(...e){this.logger(" ".repeat(En*3),"-",this.dry?xt.default.yellow("SKIPPED |"):xt.default.green("OK |"),...e)}workspaceHeader(){this.blankLine(),this.indented(2,"Workspaces:")}workspaceStep(...e){this.logger(" ".repeat(En*3),"-",this.dry?xt.default.yellow("SKIPPED |"):xt.default.green("OK |"),...e)}blankLine(){this.logger()}error(...e){console.error(...e)}},Gy={npm:[{name:"npm",template:"npm",command:"npm",installArgs:["install"],version:"latest",executable:"npx",semver:"*",default:!0}],pnpm:[{name:"pnpm6",template:"pnpm",command:"pnpm",installArgs:["install"],version:"latest-6",executable:"pnpx",semver:"6.x"},{name:"pnpm",template:"pnpm",command:"pnpm",installArgs:["install"],version:"latest",executable:"pnpm dlx",semver:">=7",default:!0}],yarn:[{name:"yarn",template:"yarn",command:"yarn",installArgs:["install"],version:"1.x",executable:"npx",semver:"<2",default:!0},{name:"berry",template:"berry",command:"yarn",installArgs:["install","--no-immutable"],version:"stable",executable:"yarn dlx",semver:">=2"}]};function b8(e){let{version:r,name:t}=e;return r?Gy[t].find(n=>(0,nM.satisfies)(r,n.semver)):Gy[t].find(n=>n.default)}async function v8(e){let{to:r,logger:t,options:n}=e,i=t!=null?t:new g8(n),c=b8(r);if(!c)throw new at("Unsupported package manager version.",{type:"package_manager-unsupported_version"});if(i.subStep(`running "${c.command} ${c.installArgs}"`),!(n!=null&&n.dry)){let a;i!=null&&i.interactive&&(a=(0,rM.default)({text:"installing dependencies...",spinner:{frames:i.installerFrames()}}).start());try{await(0,tM.default)(c.command,c.installArgs,{cwd:e.project.paths.root}),a&&a.stop(),i.subStep("dependencies installed")}catch(o){throw i.subStepFailure("failed to install dependencies"),o}}}async function sM({project:e,to:r,logger:t,options:n}){if(t.header(`Converting project from ${e.packageManager} to ${r.name}.`),e.packageManager==r.name)throw new at("You are already using this package manager",{type:"package_manager-already_in_use"});await Cn[e.packageManager].remove({project:e,to:r,logger:t,options:n}),await Cn[r.name].create({project:e,to:r,logger:t,options:n}),t.mainStep("Installing dependencies"),n!=null&&n.skipInstall?t.subStep(eM.default.yellow("Skipping install")):(await Cn[r.name].convertLock({project:e,logger:t,options:n}),await v8({project:e,to:r,logger:t,options:n})),t.mainStep(`Cleaning up ${e.packageManager} workspaces`),await Cn[e.packageManager].clean({project:e,logger:t})}async function oM({root:e,to:r,options:t}){let n=new g8({...t,interactive:!1}),[i,c]=await Promise.all([y8({root:e}),dB()]);await sM({project:i,to:{name:r,version:c[r].version},logger:n,options:t})}});var ko=qe(require("chalk")),q8=require("commander");var hh=qe(require("chalk")),fh=qe(require("update-check"));var jr={name:"create-turbo",version:"1.9.6",description:"Create a new Turborepo",homepage:"https://turbo.build/repo",license:"MPL-2.0",repository:{type:"git",url:"https://github.com/vercel/turbo",directory:"packages/create-turbo"},bugs:{url:"https://github.com/vercel/turbo/issues"},bin:{"create-turbo":"dist/cli.js"},scripts:{build:"tsup",test:"jest",lint:"eslint src/**/*.ts","check-types":"tsc --noEmit"},dependencies:{chalk:"2.4.2",commander:"^10.0.0","fs-extra":"^10.1.0",inquirer:"^8.0.0",rimraf:"^3.0.2",semver:"^7.3.8","update-check":"^1.5.4"},devDependencies:{"@turbo/test-utils":"workspace:*","@turbo/tsconfig":"workspace:*","@turbo/utils":"workspace:*","@turbo/workspaces":"workspace:*","@types/fs-extra":"^9.0.13","@types/inquirer":"^7.3.1","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/rimraf":"^3.0.2","@types/semver":"^7.3.9",eslint:"^7.23.0",jest:"^27.4.3","ts-jest":"^27.1.1",tsup:"^6.7.0",typescript:"^4.5.5"},files:["dist"]};var Z8=(0,fh.default)(jr).catch(()=>null);async function Ri(){try{let e=await Z8;e!=null&&e.latest&&(console.log(),console.log(hh.default.yellow.bold("A new version of `create-turbo` is available!")),console.log()),process.exit()}catch{}}var Q8=Object.create,Ro=Object.defineProperty,J8=Object.getOwnPropertyDescriptor,e5=Object.getOwnPropertyNames,t5=Object.getPrototypeOf,r5=Object.prototype.hasOwnProperty,he=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(r,t)=>(typeof require!="undefined"?require:r)[t]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')}),n5=(e,r)=>()=>(e&&(r=e(e=0)),r),te=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),ph=(e,r)=>{for(var t in r)Ro(e,t,{get:r[t],enumerable:!0})},i5=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of e5(r))!r5.call(e,i)&&i!==t&&Ro(e,i,{get:()=>r[i],enumerable:!(n=J8(r,i))||n.enumerable});return e},Ne=(e,r,t)=>(t=e!=null?Q8(t5(e)):{},i5(r||!e||!e.__esModule?Ro(t,"default",{value:e,enumerable:!0}):t,e)),Z=n5(()=>{});var s5=te((e,r)=>{"use strict";Z();var t=(n,i)=>{for(let c of Reflect.ownKeys(i))Object.defineProperty(n,c,Object.getOwnPropertyDescriptor(i,c));return n};r.exports=t,r.exports.default=t}),Oi=te((e,r)=>{"use strict";Z();var t=s5(),n=new WeakMap,i=(c,a={})=>{if(typeof c!="function")throw new TypeError("Expected a function");let o,s=0,f=c.displayName||c.name||"<anonymous>",l=function(...h){if(n.set(l,++s),s===1)o=c.apply(this,h),c=null;else if(a.throw===!0)throw new Error(`Function \`${f}\` can only be called once`);return o};return t(l,c),n.set(l,s),l};r.exports=i,r.exports.default=i,r.exports.callCount=c=>{if(!n.has(c))throw new Error(`The given function \`${c.name}\` is not wrapped by the \`onetime\` package`);return n.get(c)}}),o5=te((e,r)=>{Z(),r.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],process.platform!=="win32"&&r.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),process.platform==="linux"&&r.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}),Ti=te((e,r)=>{Z();var t=global.process,n=function(g){return g&&typeof g=="object"&&typeof g.removeListener=="function"&&typeof g.emit=="function"&&typeof g.reallyExit=="function"&&typeof g.listeners=="function"&&typeof g.kill=="function"&&typeof g.pid=="number"&&typeof g.on=="function"};n(t)?(i=he("assert"),c=o5(),a=/^win/i.test(t.platform),o=he("events"),typeof o!="function"&&(o=o.EventEmitter),t.__signal_exit_emitter__?s=t.__signal_exit_emitter__:(s=t.__signal_exit_emitter__=new o,s.count=0,s.emitted={}),s.infinite||(s.setMaxListeners(1/0),s.infinite=!0),r.exports=function(g,S){if(!n(global.process))return function(){};i.equal(typeof g,"function","a callback must be provided for exit handler"),u===!1&&d();var E="exit";S&&S.alwaysLast&&(E="afterexit");var v=function(){s.removeListener(E,g),s.listeners("exit").length===0&&s.listeners("afterexit").length===0&&f()};return s.on(E,g),v},f=function(){!u||!n(global.process)||(u=!1,c.forEach(function(g){try{t.removeListener(g,h[g])}catch{}}),t.emit=b,t.reallyExit=p,s.count-=1)},r.exports.unload=f,l=function(g,S,E){s.emitted[g]||(s.emitted[g]=!0,s.emit(g,S,E))},h={},c.forEach(function(g){h[g]=function(){if(n(global.process)){var S=t.listeners(g);S.length===s.count&&(f(),l("exit",null,g),l("afterexit",null,g),a&&g==="SIGHUP"&&(g="SIGINT"),t.kill(t.pid,g))}}}),r.exports.signals=function(){return c},u=!1,d=function(){u||!n(global.process)||(u=!0,s.count+=1,c=c.filter(function(g){try{return t.on(g,h[g]),!0}catch{return!1}}),t.emit=_,t.reallyExit=y)},r.exports.load=d,p=t.reallyExit,y=function(g){!n(global.process)||(t.exitCode=g||0,l("exit",t.exitCode,null),l("afterexit",t.exitCode,null),p.call(t,t.exitCode))},b=t.emit,_=function(g,S){if(g==="exit"&&n(global.process)){S!==void 0&&(t.exitCode=S);var E=b.apply(this,arguments);return l("exit",t.exitCode,null),l("afterexit",t.exitCode,null),E}else return b.apply(this,arguments)}):r.exports=function(){return function(){}};var i,c,a,o,s,f,l,h,u,d,p,y,b,_});var a5=te((e,r)=>{"use strict";Z();var t=/[|\\{}()[\]^$+*?.]/g;r.exports=function(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(t,"\\$&")}}),u5=te((e,r)=>{"use strict";Z(),r.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}),dh=te((e,r)=>{Z();var t=u5(),n={};for(i in t)t.hasOwnProperty(i)&&(n[t[i]]=i);var i,c=r.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(s in c)if(c.hasOwnProperty(s)){if(!("channels"in c[s]))throw new Error("missing channels property: "+s);if(!("labels"in c[s]))throw new Error("missing channel labels property: "+s);if(c[s].labels.length!==c[s].channels)throw new Error("channel and label counts mismatch: "+s);a=c[s].channels,o=c[s].labels,delete c[s].channels,delete c[s].labels,Object.defineProperty(c[s],"channels",{value:a}),Object.defineProperty(c[s],"labels",{value:o})}var a,o,s;c.rgb.hsl=function(l){var h=l[0]/255,u=l[1]/255,d=l[2]/255,p=Math.min(h,u,d),y=Math.max(h,u,d),b=y-p,_,g,S;return y===p?_=0:h===y?_=(u-d)/b:u===y?_=2+(d-h)/b:d===y&&(_=4+(h-u)/b),_=Math.min(_*60,360),_<0&&(_+=360),S=(p+y)/2,y===p?g=0:S<=.5?g=b/(y+p):g=b/(2-y-p),[_,g*100,S*100]},c.rgb.hsv=function(l){var h,u,d,p,y,b=l[0]/255,_=l[1]/255,g=l[2]/255,S=Math.max(b,_,g),E=S-Math.min(b,_,g),v=function(m){return(S-m)/6/E+1/2};return E===0?p=y=0:(y=E/S,h=v(b),u=v(_),d=v(g),b===S?p=d-u:_===S?p=1/3+h-d:g===S&&(p=2/3+u-h),p<0?p+=1:p>1&&(p-=1)),[p*360,y*100,S*100]},c.rgb.hwb=function(l){var h=l[0],u=l[1],d=l[2],p=c.rgb.hsl(l)[0],y=1/255*Math.min(h,Math.min(u,d));return d=1-1/255*Math.max(h,Math.max(u,d)),[p,y*100,d*100]},c.rgb.cmyk=function(l){var h=l[0]/255,u=l[1]/255,d=l[2]/255,p,y,b,_;return _=Math.min(1-h,1-u,1-d),p=(1-h-_)/(1-_)||0,y=(1-u-_)/(1-_)||0,b=(1-d-_)/(1-_)||0,[p*100,y*100,b*100,_*100]};function f(l,h){return Math.pow(l[0]-h[0],2)+Math.pow(l[1]-h[1],2)+Math.pow(l[2]-h[2],2)}c.rgb.keyword=function(l){var h=n[l];if(h)return h;var u=1/0,d;for(var p in t)if(t.hasOwnProperty(p)){var y=t[p],b=f(l,y);b<u&&(u=b,d=p)}return d},c.keyword.rgb=function(l){return t[l]},c.rgb.xyz=function(l){var h=l[0]/255,u=l[1]/255,d=l[2]/255;h=h>.04045?Math.pow((h+.055)/1.055,2.4):h/12.92,u=u>.04045?Math.pow((u+.055)/1.055,2.4):u/12.92,d=d>.04045?Math.pow((d+.055)/1.055,2.4):d/12.92;var p=h*.4124+u*.3576+d*.1805,y=h*.2126+u*.7152+d*.0722,b=h*.0193+u*.1192+d*.9505;return[p*100,y*100,b*100]},c.rgb.lab=function(l){var h=c.rgb.xyz(l),u=h[0],d=h[1],p=h[2],y,b,_;return u/=95.047,d/=100,p/=108.883,u=u>.008856?Math.pow(u,1/3):7.787*u+16/116,d=d>.008856?Math.pow(d,1/3):7.787*d+16/116,p=p>.008856?Math.pow(p,1/3):7.787*p+16/116,y=116*d-16,b=500*(u-d),_=200*(d-p),[y,b,_]},c.hsl.rgb=function(l){var h=l[0]/360,u=l[1]/100,d=l[2]/100,p,y,b,_,g;if(u===0)return g=d*255,[g,g,g];d<.5?y=d*(1+u):y=d+u-d*u,p=2*d-y,_=[0,0,0];for(var S=0;S<3;S++)b=h+1/3*-(S-1),b<0&&b++,b>1&&b--,6*b<1?g=p+(y-p)*6*b:2*b<1?g=y:3*b<2?g=p+(y-p)*(2/3-b)*6:g=p,_[S]=g*255;return _},c.hsl.hsv=function(l){var h=l[0],u=l[1]/100,d=l[2]/100,p=u,y=Math.max(d,.01),b,_;return d*=2,u*=d<=1?d:2-d,p*=y<=1?y:2-y,_=(d+u)/2,b=d===0?2*p/(y+p):2*u/(d+u),[h,b*100,_*100]},c.hsv.rgb=function(l){var h=l[0]/60,u=l[1]/100,d=l[2]/100,p=Math.floor(h)%6,y=h-Math.floor(h),b=255*d*(1-u),_=255*d*(1-u*y),g=255*d*(1-u*(1-y));switch(d*=255,p){case 0:return[d,g,b];case 1:return[_,d,b];case 2:return[b,d,g];case 3:return[b,_,d];case 4:return[g,b,d];case 5:return[d,b,_]}},c.hsv.hsl=function(l){var h=l[0],u=l[1]/100,d=l[2]/100,p=Math.max(d,.01),y,b,_;return _=(2-u)*d,y=(2-u)*p,b=u*p,b/=y<=1?y:2-y,b=b||0,_/=2,[h,b*100,_*100]},c.hwb.rgb=function(l){var h=l[0]/360,u=l[1]/100,d=l[2]/100,p=u+d,y,b,_,g;p>1&&(u/=p,d/=p),y=Math.floor(6*h),b=1-d,_=6*h-y,y&1&&(_=1-_),g=u+_*(b-u);var S,E,v;switch(y){default:case 6:case 0:S=b,E=g,v=u;break;case 1:S=g,E=b,v=u;break;case 2:S=u,E=b,v=g;break;case 3:S=u,E=g,v=b;break;case 4:S=g,E=u,v=b;break;case 5:S=b,E=u,v=g;break}return[S*255,E*255,v*255]},c.cmyk.rgb=function(l){var h=l[0]/100,u=l[1]/100,d=l[2]/100,p=l[3]/100,y,b,_;return y=1-Math.min(1,h*(1-p)+p),b=1-Math.min(1,u*(1-p)+p),_=1-Math.min(1,d*(1-p)+p),[y*255,b*255,_*255]},c.xyz.rgb=function(l){var h=l[0]/100,u=l[1]/100,d=l[2]/100,p,y,b;return p=h*3.2406+u*-1.5372+d*-.4986,y=h*-.9689+u*1.8758+d*.0415,b=h*.0557+u*-.204+d*1.057,p=p>.0031308?1.055*Math.pow(p,1/2.4)-.055:p*12.92,y=y>.0031308?1.055*Math.pow(y,1/2.4)-.055:y*12.92,b=b>.0031308?1.055*Math.pow(b,1/2.4)-.055:b*12.92,p=Math.min(Math.max(0,p),1),y=Math.min(Math.max(0,y),1),b=Math.min(Math.max(0,b),1),[p*255,y*255,b*255]},c.xyz.lab=function(l){var h=l[0],u=l[1],d=l[2],p,y,b;return h/=95.047,u/=100,d/=108.883,h=h>.008856?Math.pow(h,1/3):7.787*h+16/116,u=u>.008856?Math.pow(u,1/3):7.787*u+16/116,d=d>.008856?Math.pow(d,1/3):7.787*d+16/116,p=116*u-16,y=500*(h-u),b=200*(u-d),[p,y,b]},c.lab.xyz=function(l){var h=l[0],u=l[1],d=l[2],p,y,b;y=(h+16)/116,p=u/500+y,b=y-d/200;var _=Math.pow(y,3),g=Math.pow(p,3),S=Math.pow(b,3);return y=_>.008856?_:(y-16/116)/7.787,p=g>.008856?g:(p-16/116)/7.787,b=S>.008856?S:(b-16/116)/7.787,p*=95.047,y*=100,b*=108.883,[p,y,b]},c.lab.lch=function(l){var h=l[0],u=l[1],d=l[2],p,y,b;return p=Math.atan2(d,u),y=p*360/2/Math.PI,y<0&&(y+=360),b=Math.sqrt(u*u+d*d),[h,b,y]},c.lch.lab=function(l){var h=l[0],u=l[1],d=l[2],p,y,b;return b=d/360*2*Math.PI,p=u*Math.cos(b),y=u*Math.sin(b),[h,p,y]},c.rgb.ansi16=function(l){var h=l[0],u=l[1],d=l[2],p=1 in arguments?arguments[1]:c.rgb.hsv(l)[2];if(p=Math.round(p/50),p===0)return 30;var y=30+(Math.round(d/255)<<2|Math.round(u/255)<<1|Math.round(h/255));return p===2&&(y+=60),y},c.hsv.ansi16=function(l){return c.rgb.ansi16(c.hsv.rgb(l),l[2])},c.rgb.ansi256=function(l){var h=l[0],u=l[1],d=l[2];if(h===u&&u===d)return h<8?16:h>248?231:Math.round((h-8)/247*24)+232;var p=16+36*Math.round(h/255*5)+6*Math.round(u/255*5)+Math.round(d/255*5);return p},c.ansi16.rgb=function(l){var h=l%10;if(h===0||h===7)return l>50&&(h+=3.5),h=h/10.5*255,[h,h,h];var u=(~~(l>50)+1)*.5,d=(h&1)*u*255,p=(h>>1&1)*u*255,y=(h>>2&1)*u*255;return[d,p,y]},c.ansi256.rgb=function(l){if(l>=232){var h=(l-232)*10+8;return[h,h,h]}l-=16;var u,d=Math.floor(l/36)/5*255,p=Math.floor((u=l%36)/6)/5*255,y=u%6/5*255;return[d,p,y]},c.rgb.hex=function(l){var h=((Math.round(l[0])&255)<<16)+((Math.round(l[1])&255)<<8)+(Math.round(l[2])&255),u=h.toString(16).toUpperCase();return"000000".substring(u.length)+u},c.hex.rgb=function(l){var h=l.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!h)return[0,0,0];var u=h[0];h[0].length===3&&(u=u.split("").map(function(_){return _+_}).join(""));var d=parseInt(u,16),p=d>>16&255,y=d>>8&255,b=d&255;return[p,y,b]},c.rgb.hcg=function(l){var h=l[0]/255,u=l[1]/255,d=l[2]/255,p=Math.max(Math.max(h,u),d),y=Math.min(Math.min(h,u),d),b=p-y,_,g;return b<1?_=y/(1-b):_=0,b<=0?g=0:p===h?g=(u-d)/b%6:p===u?g=2+(d-h)/b:g=4+(h-u)/b+4,g/=6,g%=1,[g*360,b*100,_*100]},c.hsl.hcg=function(l){var h=l[1]/100,u=l[2]/100,d=1,p=0;return u<.5?d=2*h*u:d=2*h*(1-u),d<1&&(p=(u-.5*d)/(1-d)),[l[0],d*100,p*100]},c.hsv.hcg=function(l){var h=l[1]/100,u=l[2]/100,d=h*u,p=0;return d<1&&(p=(u-d)/(1-d)),[l[0],d*100,p*100]},c.hcg.rgb=function(l){var h=l[0]/360,u=l[1]/100,d=l[2]/100;if(u===0)return[d*255,d*255,d*255];var p=[0,0,0],y=h%1*6,b=y%1,_=1-b,g=0;switch(Math.floor(y)){case 0:p[0]=1,p[1]=b,p[2]=0;break;case 1:p[0]=_,p[1]=1,p[2]=0;break;case 2:p[0]=0,p[1]=1,p[2]=b;break;case 3:p[0]=0,p[1]=_,p[2]=1;break;case 4:p[0]=b,p[1]=0,p[2]=1;break;default:p[0]=1,p[1]=0,p[2]=_}return g=(1-u)*d,[(u*p[0]+g)*255,(u*p[1]+g)*255,(u*p[2]+g)*255]},c.hcg.hsv=function(l){var h=l[1]/100,u=l[2]/100,d=h+u*(1-h),p=0;return d>0&&(p=h/d),[l[0],p*100,d*100]},c.hcg.hsl=function(l){var h=l[1]/100,u=l[2]/100,d=u*(1-h)+.5*h,p=0;return d>0&&d<.5?p=h/(2*d):d>=.5&&d<1&&(p=h/(2*(1-d))),[l[0],p*100,d*100]},c.hcg.hwb=function(l){var h=l[1]/100,u=l[2]/100,d=h+u*(1-h);return[l[0],(d-h)*100,(1-d)*100]},c.hwb.hcg=function(l){var h=l[1]/100,u=l[2]/100,d=1-u,p=d-h,y=0;return p<1&&(y=(d-p)/(1-p)),[l[0],p*100,y*100]},c.apple.rgb=function(l){return[l[0]/65535*255,l[1]/65535*255,l[2]/65535*255]},c.rgb.apple=function(l){return[l[0]/255*65535,l[1]/255*65535,l[2]/255*65535]},c.gray.rgb=function(l){return[l[0]/100*255,l[0]/100*255,l[0]/100*255]},c.gray.hsl=c.gray.hsv=function(l){return[0,0,l[0]]},c.gray.hwb=function(l){return[0,100,l[0]]},c.gray.cmyk=function(l){return[0,0,0,l[0]]},c.gray.lab=function(l){return[l[0],0,0]},c.gray.hex=function(l){var h=Math.round(l[0]/100*255)&255,u=(h<<16)+(h<<8)+h,d=u.toString(16).toUpperCase();return"000000".substring(d.length)+d},c.rgb.gray=function(l){var h=(l[0]+l[1]+l[2])/3;return[h/255*100]}}),l5=te((e,r)=>{Z();var t=dh();function n(){for(var o={},s=Object.keys(t),f=s.length,l=0;l<f;l++)o[s[l]]={distance:-1,parent:null};return o}function i(o){var s=n(),f=[o];for(s[o].distance=0;f.length;)for(var l=f.pop(),h=Object.keys(t[l]),u=h.length,d=0;d<u;d++){var p=h[d],y=s[p];y.distance===-1&&(y.distance=s[l].distance+1,y.parent=l,f.unshift(p))}return s}function c(o,s){return function(f){return s(o(f))}}function a(o,s){for(var f=[s[o].parent,o],l=t[s[o].parent][o],h=s[o].parent;s[h].parent;)f.unshift(s[h].parent),l=c(t[s[h].parent][h],l),h=s[h].parent;return l.conversion=f,l}r.exports=function(o){for(var s=i(o),f={},l=Object.keys(s),h=l.length,u=0;u<h;u++){var d=l[u],p=s[d];p.parent!==null&&(f[d]=a(d,s))}return f}}),c5=te((e,r)=>{Z();var t=dh(),n=l5(),i={},c=Object.keys(t);function a(s){var f=function(l){return l==null?l:(arguments.length>1&&(l=Array.prototype.slice.call(arguments)),s(l))};return"conversion"in s&&(f.conversion=s.conversion),f}function o(s){var f=function(l){if(l==null)return l;arguments.length>1&&(l=Array.prototype.slice.call(arguments));var h=s(l);if(typeof h=="object")for(var u=h.length,d=0;d<u;d++)h[d]=Math.round(h[d]);return h};return"conversion"in s&&(f.conversion=s.conversion),f}c.forEach(function(s){i[s]={},Object.defineProperty(i[s],"channels",{value:t[s].channels}),Object.defineProperty(i[s],"labels",{value:t[s].labels});var f=n(s),l=Object.keys(f);l.forEach(function(h){var u=f[h];i[s][h]=o(u),i[s][h].raw=a(u)})}),r.exports=i}),h5=te((e,r)=>{"use strict";Z();var t=c5(),n=(o,s)=>function(){return`\x1B[${o.apply(t,arguments)+s}m`},i=(o,s)=>function(){let f=o.apply(t,arguments);return`\x1B[${38+s};5;${f}m`},c=(o,s)=>function(){let f=o.apply(t,arguments);return`\x1B[${38+s};2;${f[0]};${f[1]};${f[2]}m`};function a(){let o=new Map,s={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],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],gray:[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],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};s.color.grey=s.color.gray;for(let h of Object.keys(s)){let u=s[h];for(let d of Object.keys(u)){let p=u[d];s[d]={open:`\x1B[${p[0]}m`,close:`\x1B[${p[1]}m`},u[d]=s[d],o.set(p[0],p[1])}Object.defineProperty(s,h,{value:u,enumerable:!1}),Object.defineProperty(s,"codes",{value:o,enumerable:!1})}let f=h=>h,l=(h,u,d)=>[h,u,d];s.color.close="\x1B[39m",s.bgColor.close="\x1B[49m",s.color.ansi={ansi:n(f,0)},s.color.ansi256={ansi256:i(f,0)},s.color.ansi16m={rgb:c(l,0)},s.bgColor.ansi={ansi:n(f,10)},s.bgColor.ansi256={ansi256:i(f,10)},s.bgColor.ansi16m={rgb:c(l,10)};for(let h of Object.keys(t)){if(typeof t[h]!="object")continue;let u=t[h];h==="ansi16"&&(h="ansi"),"ansi16"in u&&(s.color.ansi[h]=n(u.ansi16,0),s.bgColor.ansi[h]=n(u.ansi16,10)),"ansi256"in u&&(s.color.ansi256[h]=i(u.ansi256,0),s.bgColor.ansi256[h]=i(u.ansi256,10)),"rgb"in u&&(s.color.ansi16m[h]=c(u.rgb,0),s.bgColor.ansi16m[h]=c(u.rgb,10))}return s}Object.defineProperty(r,"exports",{enumerable:!0,get:a})}),f5=te((e,r)=>{"use strict";Z(),r.exports=(t,n)=>{n=n||process.argv;let i=t.startsWith("-")?"":t.length===1?"-":"--",c=n.indexOf(i+t),a=n.indexOf("--");return c!==-1&&(a===-1?!0:c<a)}}),p5=te((e,r)=>{"use strict";Z();var t=he("os"),n=f5(),i=process.env,c;n("no-color")||n("no-colors")||n("color=false")?c=!1:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(c=!0),"FORCE_COLOR"in i&&(c=i.FORCE_COLOR.length===0||parseInt(i.FORCE_COLOR,10)!==0);function a(f){return f===0?!1:{level:f,hasBasic:!0,has256:f>=2,has16m:f>=3}}function o(f){if(c===!1)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(f&&!f.isTTY&&c!==!0)return 0;let l=c?1:0;if(process.platform==="win32"){let h=t.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(h[0])>=10&&Number(h[2])>=10586?Number(h[2])>=14931?3:2:1}if("CI"in i)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(h=>h in i)||i.CI_NAME==="codeship"?1:l;if("TEAMCITY_VERSION"in i)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0;if(i.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in i){let h=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return h>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(i.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)||"COLORTERM"in i?1:(i.TERM,l)}function s(f){let l=o(f);return a(l)}r.exports={supportsColor:s,stdout:s(process.stdout),stderr:s(process.stderr)}}),d5=te((e,r)=>{"use strict";Z();var t=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,n=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,i=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,c=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,a=new Map([["n",`
117
+ `)))}info(...e){this.logger(...e)}mainStep(e){this.blankLine(),this.logger(`${this.step}. ${xt.default.underline(e)}`),this.step+=1}subStep(...e){this.logger(" ".repeat(En),"-",this.dry?xt.default.yellow("SKIPPED |"):xt.default.green("OK |"),...e)}subStepFailure(...e){this.logger(" ".repeat(En),"-",xt.default.red("ERROR |"),...e)}rootHeader(){this.blankLine(),this.indented(2,"Root:")}rootStep(...e){this.logger(" ".repeat(En*3),"-",this.dry?xt.default.yellow("SKIPPED |"):xt.default.green("OK |"),...e)}workspaceHeader(){this.blankLine(),this.indented(2,"Workspaces:")}workspaceStep(...e){this.logger(" ".repeat(En*3),"-",this.dry?xt.default.yellow("SKIPPED |"):xt.default.green("OK |"),...e)}blankLine(){this.logger()}error(...e){console.error(...e)}},Gy={npm:[{name:"npm",template:"npm",command:"npm",installArgs:["install"],version:"latest",executable:"npx",semver:"*",default:!0}],pnpm:[{name:"pnpm6",template:"pnpm",command:"pnpm",installArgs:["install"],version:"latest-6",executable:"pnpx",semver:"6.x"},{name:"pnpm",template:"pnpm",command:"pnpm",installArgs:["install","--fix-lockfile"],version:"latest",executable:"pnpm dlx",semver:">=7",default:!0}],yarn:[{name:"yarn",template:"yarn",command:"yarn",installArgs:["install"],version:"1.x",executable:"npx",semver:"<2",default:!0},{name:"berry",template:"berry",command:"yarn",installArgs:["install","--no-immutable"],version:"stable",executable:"yarn dlx",semver:">=2"}]};function b8(e){let{version:r,name:t}=e;return r?Gy[t].find(n=>(0,nM.satisfies)(r,n.semver)):Gy[t].find(n=>n.default)}async function v8(e){let{to:r,logger:t,options:n}=e,i=t!=null?t:new g8(n),c=b8(r);if(!c)throw new at("Unsupported package manager version.",{type:"package_manager-unsupported_version"});if(i.subStep(`running "${c.command} ${c.installArgs}"`),!(n!=null&&n.dry)){let a;i!=null&&i.interactive&&(a=(0,rM.default)({text:"installing dependencies...",spinner:{frames:i.installerFrames()}}).start());try{await(0,tM.default)(c.command,c.installArgs,{cwd:e.project.paths.root}),a&&a.stop(),i.subStep("dependencies installed")}catch(o){throw i.subStepFailure("failed to install dependencies"),o}}}async function sM({project:e,to:r,logger:t,options:n}){if(t.header(`Converting project from ${e.packageManager} to ${r.name}.`),e.packageManager==r.name)throw new at("You are already using this package manager",{type:"package_manager-already_in_use"});await Cn[e.packageManager].remove({project:e,to:r,logger:t,options:n}),await Cn[r.name].create({project:e,to:r,logger:t,options:n}),t.mainStep("Installing dependencies"),n!=null&&n.skipInstall?t.subStep(eM.default.yellow("Skipping install")):(await Cn[r.name].convertLock({project:e,logger:t,options:n}),await v8({project:e,to:r,logger:t,options:n})),t.mainStep(`Cleaning up ${e.packageManager} workspaces`),await Cn[e.packageManager].clean({project:e,logger:t})}async function oM({root:e,to:r,options:t}){let n=new g8({...t,interactive:!1}),[i,c]=await Promise.all([y8({root:e}),dB()]);await sM({project:i,to:{name:r,version:c[r].version},logger:n,options:t})}});var ko=qe(require("chalk")),q8=require("commander");var hh=qe(require("chalk")),fh=qe(require("update-check"));var jr={name:"create-turbo",version:"1.9.7",description:"Create a new Turborepo",homepage:"https://turbo.build/repo",license:"MPL-2.0",repository:{type:"git",url:"https://github.com/vercel/turbo",directory:"packages/create-turbo"},bugs:{url:"https://github.com/vercel/turbo/issues"},bin:{"create-turbo":"dist/cli.js"},scripts:{build:"tsup",test:"jest",lint:"eslint src/**/*.ts","check-types":"tsc --noEmit"},dependencies:{chalk:"2.4.2",commander:"^10.0.0","fs-extra":"^10.1.0",inquirer:"^8.0.0",rimraf:"^3.0.2",semver:"^7.3.8","update-check":"^1.5.4"},devDependencies:{"@turbo/test-utils":"workspace:*","@turbo/tsconfig":"workspace:*","@turbo/utils":"workspace:*","@turbo/workspaces":"workspace:*","@types/fs-extra":"^9.0.13","@types/inquirer":"^7.3.1","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/rimraf":"^3.0.2","@types/semver":"^7.3.9",eslint:"^7.23.0",jest:"^27.4.3","ts-jest":"^27.1.1",tsup:"^6.7.0",typescript:"^4.5.5"},files:["dist"]};var Z8=(0,fh.default)(jr).catch(()=>null);async function Ri(){try{let e=await Z8;e!=null&&e.latest&&(console.log(),console.log(hh.default.yellow.bold("A new version of `create-turbo` is available!")),console.log()),process.exit()}catch{}}var Q8=Object.create,Ro=Object.defineProperty,J8=Object.getOwnPropertyDescriptor,e5=Object.getOwnPropertyNames,t5=Object.getPrototypeOf,r5=Object.prototype.hasOwnProperty,he=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(r,t)=>(typeof require!="undefined"?require:r)[t]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')}),n5=(e,r)=>()=>(e&&(r=e(e=0)),r),te=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),ph=(e,r)=>{for(var t in r)Ro(e,t,{get:r[t],enumerable:!0})},i5=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of e5(r))!r5.call(e,i)&&i!==t&&Ro(e,i,{get:()=>r[i],enumerable:!(n=J8(r,i))||n.enumerable});return e},Ne=(e,r,t)=>(t=e!=null?Q8(t5(e)):{},i5(r||!e||!e.__esModule?Ro(t,"default",{value:e,enumerable:!0}):t,e)),Z=n5(()=>{});var s5=te((e,r)=>{"use strict";Z();var t=(n,i)=>{for(let c of Reflect.ownKeys(i))Object.defineProperty(n,c,Object.getOwnPropertyDescriptor(i,c));return n};r.exports=t,r.exports.default=t}),Oi=te((e,r)=>{"use strict";Z();var t=s5(),n=new WeakMap,i=(c,a={})=>{if(typeof c!="function")throw new TypeError("Expected a function");let o,s=0,f=c.displayName||c.name||"<anonymous>",l=function(...h){if(n.set(l,++s),s===1)o=c.apply(this,h),c=null;else if(a.throw===!0)throw new Error(`Function \`${f}\` can only be called once`);return o};return t(l,c),n.set(l,s),l};r.exports=i,r.exports.default=i,r.exports.callCount=c=>{if(!n.has(c))throw new Error(`The given function \`${c.name}\` is not wrapped by the \`onetime\` package`);return n.get(c)}}),o5=te((e,r)=>{Z(),r.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],process.platform!=="win32"&&r.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),process.platform==="linux"&&r.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}),Ti=te((e,r)=>{Z();var t=global.process,n=function(g){return g&&typeof g=="object"&&typeof g.removeListener=="function"&&typeof g.emit=="function"&&typeof g.reallyExit=="function"&&typeof g.listeners=="function"&&typeof g.kill=="function"&&typeof g.pid=="number"&&typeof g.on=="function"};n(t)?(i=he("assert"),c=o5(),a=/^win/i.test(t.platform),o=he("events"),typeof o!="function"&&(o=o.EventEmitter),t.__signal_exit_emitter__?s=t.__signal_exit_emitter__:(s=t.__signal_exit_emitter__=new o,s.count=0,s.emitted={}),s.infinite||(s.setMaxListeners(1/0),s.infinite=!0),r.exports=function(g,S){if(!n(global.process))return function(){};i.equal(typeof g,"function","a callback must be provided for exit handler"),u===!1&&d();var E="exit";S&&S.alwaysLast&&(E="afterexit");var v=function(){s.removeListener(E,g),s.listeners("exit").length===0&&s.listeners("afterexit").length===0&&f()};return s.on(E,g),v},f=function(){!u||!n(global.process)||(u=!1,c.forEach(function(g){try{t.removeListener(g,h[g])}catch{}}),t.emit=b,t.reallyExit=p,s.count-=1)},r.exports.unload=f,l=function(g,S,E){s.emitted[g]||(s.emitted[g]=!0,s.emit(g,S,E))},h={},c.forEach(function(g){h[g]=function(){if(n(global.process)){var S=t.listeners(g);S.length===s.count&&(f(),l("exit",null,g),l("afterexit",null,g),a&&g==="SIGHUP"&&(g="SIGINT"),t.kill(t.pid,g))}}}),r.exports.signals=function(){return c},u=!1,d=function(){u||!n(global.process)||(u=!0,s.count+=1,c=c.filter(function(g){try{return t.on(g,h[g]),!0}catch{return!1}}),t.emit=_,t.reallyExit=y)},r.exports.load=d,p=t.reallyExit,y=function(g){!n(global.process)||(t.exitCode=g||0,l("exit",t.exitCode,null),l("afterexit",t.exitCode,null),p.call(t,t.exitCode))},b=t.emit,_=function(g,S){if(g==="exit"&&n(global.process)){S!==void 0&&(t.exitCode=S);var E=b.apply(this,arguments);return l("exit",t.exitCode,null),l("afterexit",t.exitCode,null),E}else return b.apply(this,arguments)}):r.exports=function(){return function(){}};var i,c,a,o,s,f,l,h,u,d,p,y,b,_});var a5=te((e,r)=>{"use strict";Z();var t=/[|\\{}()[\]^$+*?.]/g;r.exports=function(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(t,"\\$&")}}),u5=te((e,r)=>{"use strict";Z(),r.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}),dh=te((e,r)=>{Z();var t=u5(),n={};for(i in t)t.hasOwnProperty(i)&&(n[t[i]]=i);var i,c=r.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(s in c)if(c.hasOwnProperty(s)){if(!("channels"in c[s]))throw new Error("missing channels property: "+s);if(!("labels"in c[s]))throw new Error("missing channel labels property: "+s);if(c[s].labels.length!==c[s].channels)throw new Error("channel and label counts mismatch: "+s);a=c[s].channels,o=c[s].labels,delete c[s].channels,delete c[s].labels,Object.defineProperty(c[s],"channels",{value:a}),Object.defineProperty(c[s],"labels",{value:o})}var a,o,s;c.rgb.hsl=function(l){var h=l[0]/255,u=l[1]/255,d=l[2]/255,p=Math.min(h,u,d),y=Math.max(h,u,d),b=y-p,_,g,S;return y===p?_=0:h===y?_=(u-d)/b:u===y?_=2+(d-h)/b:d===y&&(_=4+(h-u)/b),_=Math.min(_*60,360),_<0&&(_+=360),S=(p+y)/2,y===p?g=0:S<=.5?g=b/(y+p):g=b/(2-y-p),[_,g*100,S*100]},c.rgb.hsv=function(l){var h,u,d,p,y,b=l[0]/255,_=l[1]/255,g=l[2]/255,S=Math.max(b,_,g),E=S-Math.min(b,_,g),v=function(m){return(S-m)/6/E+1/2};return E===0?p=y=0:(y=E/S,h=v(b),u=v(_),d=v(g),b===S?p=d-u:_===S?p=1/3+h-d:g===S&&(p=2/3+u-h),p<0?p+=1:p>1&&(p-=1)),[p*360,y*100,S*100]},c.rgb.hwb=function(l){var h=l[0],u=l[1],d=l[2],p=c.rgb.hsl(l)[0],y=1/255*Math.min(h,Math.min(u,d));return d=1-1/255*Math.max(h,Math.max(u,d)),[p,y*100,d*100]},c.rgb.cmyk=function(l){var h=l[0]/255,u=l[1]/255,d=l[2]/255,p,y,b,_;return _=Math.min(1-h,1-u,1-d),p=(1-h-_)/(1-_)||0,y=(1-u-_)/(1-_)||0,b=(1-d-_)/(1-_)||0,[p*100,y*100,b*100,_*100]};function f(l,h){return Math.pow(l[0]-h[0],2)+Math.pow(l[1]-h[1],2)+Math.pow(l[2]-h[2],2)}c.rgb.keyword=function(l){var h=n[l];if(h)return h;var u=1/0,d;for(var p in t)if(t.hasOwnProperty(p)){var y=t[p],b=f(l,y);b<u&&(u=b,d=p)}return d},c.keyword.rgb=function(l){return t[l]},c.rgb.xyz=function(l){var h=l[0]/255,u=l[1]/255,d=l[2]/255;h=h>.04045?Math.pow((h+.055)/1.055,2.4):h/12.92,u=u>.04045?Math.pow((u+.055)/1.055,2.4):u/12.92,d=d>.04045?Math.pow((d+.055)/1.055,2.4):d/12.92;var p=h*.4124+u*.3576+d*.1805,y=h*.2126+u*.7152+d*.0722,b=h*.0193+u*.1192+d*.9505;return[p*100,y*100,b*100]},c.rgb.lab=function(l){var h=c.rgb.xyz(l),u=h[0],d=h[1],p=h[2],y,b,_;return u/=95.047,d/=100,p/=108.883,u=u>.008856?Math.pow(u,1/3):7.787*u+16/116,d=d>.008856?Math.pow(d,1/3):7.787*d+16/116,p=p>.008856?Math.pow(p,1/3):7.787*p+16/116,y=116*d-16,b=500*(u-d),_=200*(d-p),[y,b,_]},c.hsl.rgb=function(l){var h=l[0]/360,u=l[1]/100,d=l[2]/100,p,y,b,_,g;if(u===0)return g=d*255,[g,g,g];d<.5?y=d*(1+u):y=d+u-d*u,p=2*d-y,_=[0,0,0];for(var S=0;S<3;S++)b=h+1/3*-(S-1),b<0&&b++,b>1&&b--,6*b<1?g=p+(y-p)*6*b:2*b<1?g=y:3*b<2?g=p+(y-p)*(2/3-b)*6:g=p,_[S]=g*255;return _},c.hsl.hsv=function(l){var h=l[0],u=l[1]/100,d=l[2]/100,p=u,y=Math.max(d,.01),b,_;return d*=2,u*=d<=1?d:2-d,p*=y<=1?y:2-y,_=(d+u)/2,b=d===0?2*p/(y+p):2*u/(d+u),[h,b*100,_*100]},c.hsv.rgb=function(l){var h=l[0]/60,u=l[1]/100,d=l[2]/100,p=Math.floor(h)%6,y=h-Math.floor(h),b=255*d*(1-u),_=255*d*(1-u*y),g=255*d*(1-u*(1-y));switch(d*=255,p){case 0:return[d,g,b];case 1:return[_,d,b];case 2:return[b,d,g];case 3:return[b,_,d];case 4:return[g,b,d];case 5:return[d,b,_]}},c.hsv.hsl=function(l){var h=l[0],u=l[1]/100,d=l[2]/100,p=Math.max(d,.01),y,b,_;return _=(2-u)*d,y=(2-u)*p,b=u*p,b/=y<=1?y:2-y,b=b||0,_/=2,[h,b*100,_*100]},c.hwb.rgb=function(l){var h=l[0]/360,u=l[1]/100,d=l[2]/100,p=u+d,y,b,_,g;p>1&&(u/=p,d/=p),y=Math.floor(6*h),b=1-d,_=6*h-y,y&1&&(_=1-_),g=u+_*(b-u);var S,E,v;switch(y){default:case 6:case 0:S=b,E=g,v=u;break;case 1:S=g,E=b,v=u;break;case 2:S=u,E=b,v=g;break;case 3:S=u,E=g,v=b;break;case 4:S=g,E=u,v=b;break;case 5:S=b,E=u,v=g;break}return[S*255,E*255,v*255]},c.cmyk.rgb=function(l){var h=l[0]/100,u=l[1]/100,d=l[2]/100,p=l[3]/100,y,b,_;return y=1-Math.min(1,h*(1-p)+p),b=1-Math.min(1,u*(1-p)+p),_=1-Math.min(1,d*(1-p)+p),[y*255,b*255,_*255]},c.xyz.rgb=function(l){var h=l[0]/100,u=l[1]/100,d=l[2]/100,p,y,b;return p=h*3.2406+u*-1.5372+d*-.4986,y=h*-.9689+u*1.8758+d*.0415,b=h*.0557+u*-.204+d*1.057,p=p>.0031308?1.055*Math.pow(p,1/2.4)-.055:p*12.92,y=y>.0031308?1.055*Math.pow(y,1/2.4)-.055:y*12.92,b=b>.0031308?1.055*Math.pow(b,1/2.4)-.055:b*12.92,p=Math.min(Math.max(0,p),1),y=Math.min(Math.max(0,y),1),b=Math.min(Math.max(0,b),1),[p*255,y*255,b*255]},c.xyz.lab=function(l){var h=l[0],u=l[1],d=l[2],p,y,b;return h/=95.047,u/=100,d/=108.883,h=h>.008856?Math.pow(h,1/3):7.787*h+16/116,u=u>.008856?Math.pow(u,1/3):7.787*u+16/116,d=d>.008856?Math.pow(d,1/3):7.787*d+16/116,p=116*u-16,y=500*(h-u),b=200*(u-d),[p,y,b]},c.lab.xyz=function(l){var h=l[0],u=l[1],d=l[2],p,y,b;y=(h+16)/116,p=u/500+y,b=y-d/200;var _=Math.pow(y,3),g=Math.pow(p,3),S=Math.pow(b,3);return y=_>.008856?_:(y-16/116)/7.787,p=g>.008856?g:(p-16/116)/7.787,b=S>.008856?S:(b-16/116)/7.787,p*=95.047,y*=100,b*=108.883,[p,y,b]},c.lab.lch=function(l){var h=l[0],u=l[1],d=l[2],p,y,b;return p=Math.atan2(d,u),y=p*360/2/Math.PI,y<0&&(y+=360),b=Math.sqrt(u*u+d*d),[h,b,y]},c.lch.lab=function(l){var h=l[0],u=l[1],d=l[2],p,y,b;return b=d/360*2*Math.PI,p=u*Math.cos(b),y=u*Math.sin(b),[h,p,y]},c.rgb.ansi16=function(l){var h=l[0],u=l[1],d=l[2],p=1 in arguments?arguments[1]:c.rgb.hsv(l)[2];if(p=Math.round(p/50),p===0)return 30;var y=30+(Math.round(d/255)<<2|Math.round(u/255)<<1|Math.round(h/255));return p===2&&(y+=60),y},c.hsv.ansi16=function(l){return c.rgb.ansi16(c.hsv.rgb(l),l[2])},c.rgb.ansi256=function(l){var h=l[0],u=l[1],d=l[2];if(h===u&&u===d)return h<8?16:h>248?231:Math.round((h-8)/247*24)+232;var p=16+36*Math.round(h/255*5)+6*Math.round(u/255*5)+Math.round(d/255*5);return p},c.ansi16.rgb=function(l){var h=l%10;if(h===0||h===7)return l>50&&(h+=3.5),h=h/10.5*255,[h,h,h];var u=(~~(l>50)+1)*.5,d=(h&1)*u*255,p=(h>>1&1)*u*255,y=(h>>2&1)*u*255;return[d,p,y]},c.ansi256.rgb=function(l){if(l>=232){var h=(l-232)*10+8;return[h,h,h]}l-=16;var u,d=Math.floor(l/36)/5*255,p=Math.floor((u=l%36)/6)/5*255,y=u%6/5*255;return[d,p,y]},c.rgb.hex=function(l){var h=((Math.round(l[0])&255)<<16)+((Math.round(l[1])&255)<<8)+(Math.round(l[2])&255),u=h.toString(16).toUpperCase();return"000000".substring(u.length)+u},c.hex.rgb=function(l){var h=l.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!h)return[0,0,0];var u=h[0];h[0].length===3&&(u=u.split("").map(function(_){return _+_}).join(""));var d=parseInt(u,16),p=d>>16&255,y=d>>8&255,b=d&255;return[p,y,b]},c.rgb.hcg=function(l){var h=l[0]/255,u=l[1]/255,d=l[2]/255,p=Math.max(Math.max(h,u),d),y=Math.min(Math.min(h,u),d),b=p-y,_,g;return b<1?_=y/(1-b):_=0,b<=0?g=0:p===h?g=(u-d)/b%6:p===u?g=2+(d-h)/b:g=4+(h-u)/b+4,g/=6,g%=1,[g*360,b*100,_*100]},c.hsl.hcg=function(l){var h=l[1]/100,u=l[2]/100,d=1,p=0;return u<.5?d=2*h*u:d=2*h*(1-u),d<1&&(p=(u-.5*d)/(1-d)),[l[0],d*100,p*100]},c.hsv.hcg=function(l){var h=l[1]/100,u=l[2]/100,d=h*u,p=0;return d<1&&(p=(u-d)/(1-d)),[l[0],d*100,p*100]},c.hcg.rgb=function(l){var h=l[0]/360,u=l[1]/100,d=l[2]/100;if(u===0)return[d*255,d*255,d*255];var p=[0,0,0],y=h%1*6,b=y%1,_=1-b,g=0;switch(Math.floor(y)){case 0:p[0]=1,p[1]=b,p[2]=0;break;case 1:p[0]=_,p[1]=1,p[2]=0;break;case 2:p[0]=0,p[1]=1,p[2]=b;break;case 3:p[0]=0,p[1]=_,p[2]=1;break;case 4:p[0]=b,p[1]=0,p[2]=1;break;default:p[0]=1,p[1]=0,p[2]=_}return g=(1-u)*d,[(u*p[0]+g)*255,(u*p[1]+g)*255,(u*p[2]+g)*255]},c.hcg.hsv=function(l){var h=l[1]/100,u=l[2]/100,d=h+u*(1-h),p=0;return d>0&&(p=h/d),[l[0],p*100,d*100]},c.hcg.hsl=function(l){var h=l[1]/100,u=l[2]/100,d=u*(1-h)+.5*h,p=0;return d>0&&d<.5?p=h/(2*d):d>=.5&&d<1&&(p=h/(2*(1-d))),[l[0],p*100,d*100]},c.hcg.hwb=function(l){var h=l[1]/100,u=l[2]/100,d=h+u*(1-h);return[l[0],(d-h)*100,(1-d)*100]},c.hwb.hcg=function(l){var h=l[1]/100,u=l[2]/100,d=1-u,p=d-h,y=0;return p<1&&(y=(d-p)/(1-p)),[l[0],p*100,y*100]},c.apple.rgb=function(l){return[l[0]/65535*255,l[1]/65535*255,l[2]/65535*255]},c.rgb.apple=function(l){return[l[0]/255*65535,l[1]/255*65535,l[2]/255*65535]},c.gray.rgb=function(l){return[l[0]/100*255,l[0]/100*255,l[0]/100*255]},c.gray.hsl=c.gray.hsv=function(l){return[0,0,l[0]]},c.gray.hwb=function(l){return[0,100,l[0]]},c.gray.cmyk=function(l){return[0,0,0,l[0]]},c.gray.lab=function(l){return[l[0],0,0]},c.gray.hex=function(l){var h=Math.round(l[0]/100*255)&255,u=(h<<16)+(h<<8)+h,d=u.toString(16).toUpperCase();return"000000".substring(d.length)+d},c.rgb.gray=function(l){var h=(l[0]+l[1]+l[2])/3;return[h/255*100]}}),l5=te((e,r)=>{Z();var t=dh();function n(){for(var o={},s=Object.keys(t),f=s.length,l=0;l<f;l++)o[s[l]]={distance:-1,parent:null};return o}function i(o){var s=n(),f=[o];for(s[o].distance=0;f.length;)for(var l=f.pop(),h=Object.keys(t[l]),u=h.length,d=0;d<u;d++){var p=h[d],y=s[p];y.distance===-1&&(y.distance=s[l].distance+1,y.parent=l,f.unshift(p))}return s}function c(o,s){return function(f){return s(o(f))}}function a(o,s){for(var f=[s[o].parent,o],l=t[s[o].parent][o],h=s[o].parent;s[h].parent;)f.unshift(s[h].parent),l=c(t[s[h].parent][h],l),h=s[h].parent;return l.conversion=f,l}r.exports=function(o){for(var s=i(o),f={},l=Object.keys(s),h=l.length,u=0;u<h;u++){var d=l[u],p=s[d];p.parent!==null&&(f[d]=a(d,s))}return f}}),c5=te((e,r)=>{Z();var t=dh(),n=l5(),i={},c=Object.keys(t);function a(s){var f=function(l){return l==null?l:(arguments.length>1&&(l=Array.prototype.slice.call(arguments)),s(l))};return"conversion"in s&&(f.conversion=s.conversion),f}function o(s){var f=function(l){if(l==null)return l;arguments.length>1&&(l=Array.prototype.slice.call(arguments));var h=s(l);if(typeof h=="object")for(var u=h.length,d=0;d<u;d++)h[d]=Math.round(h[d]);return h};return"conversion"in s&&(f.conversion=s.conversion),f}c.forEach(function(s){i[s]={},Object.defineProperty(i[s],"channels",{value:t[s].channels}),Object.defineProperty(i[s],"labels",{value:t[s].labels});var f=n(s),l=Object.keys(f);l.forEach(function(h){var u=f[h];i[s][h]=o(u),i[s][h].raw=a(u)})}),r.exports=i}),h5=te((e,r)=>{"use strict";Z();var t=c5(),n=(o,s)=>function(){return`\x1B[${o.apply(t,arguments)+s}m`},i=(o,s)=>function(){let f=o.apply(t,arguments);return`\x1B[${38+s};5;${f}m`},c=(o,s)=>function(){let f=o.apply(t,arguments);return`\x1B[${38+s};2;${f[0]};${f[1]};${f[2]}m`};function a(){let o=new Map,s={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],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],gray:[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],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};s.color.grey=s.color.gray;for(let h of Object.keys(s)){let u=s[h];for(let d of Object.keys(u)){let p=u[d];s[d]={open:`\x1B[${p[0]}m`,close:`\x1B[${p[1]}m`},u[d]=s[d],o.set(p[0],p[1])}Object.defineProperty(s,h,{value:u,enumerable:!1}),Object.defineProperty(s,"codes",{value:o,enumerable:!1})}let f=h=>h,l=(h,u,d)=>[h,u,d];s.color.close="\x1B[39m",s.bgColor.close="\x1B[49m",s.color.ansi={ansi:n(f,0)},s.color.ansi256={ansi256:i(f,0)},s.color.ansi16m={rgb:c(l,0)},s.bgColor.ansi={ansi:n(f,10)},s.bgColor.ansi256={ansi256:i(f,10)},s.bgColor.ansi16m={rgb:c(l,10)};for(let h of Object.keys(t)){if(typeof t[h]!="object")continue;let u=t[h];h==="ansi16"&&(h="ansi"),"ansi16"in u&&(s.color.ansi[h]=n(u.ansi16,0),s.bgColor.ansi[h]=n(u.ansi16,10)),"ansi256"in u&&(s.color.ansi256[h]=i(u.ansi256,0),s.bgColor.ansi256[h]=i(u.ansi256,10)),"rgb"in u&&(s.color.ansi16m[h]=c(u.rgb,0),s.bgColor.ansi16m[h]=c(u.rgb,10))}return s}Object.defineProperty(r,"exports",{enumerable:!0,get:a})}),f5=te((e,r)=>{"use strict";Z(),r.exports=(t,n)=>{n=n||process.argv;let i=t.startsWith("-")?"":t.length===1?"-":"--",c=n.indexOf(i+t),a=n.indexOf("--");return c!==-1&&(a===-1?!0:c<a)}}),p5=te((e,r)=>{"use strict";Z();var t=he("os"),n=f5(),i=process.env,c;n("no-color")||n("no-colors")||n("color=false")?c=!1:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(c=!0),"FORCE_COLOR"in i&&(c=i.FORCE_COLOR.length===0||parseInt(i.FORCE_COLOR,10)!==0);function a(f){return f===0?!1:{level:f,hasBasic:!0,has256:f>=2,has16m:f>=3}}function o(f){if(c===!1)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(f&&!f.isTTY&&c!==!0)return 0;let l=c?1:0;if(process.platform==="win32"){let h=t.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(h[0])>=10&&Number(h[2])>=10586?Number(h[2])>=14931?3:2:1}if("CI"in i)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(h=>h in i)||i.CI_NAME==="codeship"?1:l;if("TEAMCITY_VERSION"in i)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0;if(i.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in i){let h=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return h>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(i.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)||"COLORTERM"in i?1:(i.TERM,l)}function s(f){let l=o(f);return a(l)}r.exports={supportsColor:s,stdout:s(process.stdout),stderr:s(process.stderr)}}),d5=te((e,r)=>{"use strict";Z();var t=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,n=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,i=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,c=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,a=new Map([["n",`
118
118
  `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function o(h){return h[0]==="u"&&h.length===5||h[0]==="x"&&h.length===3?String.fromCharCode(parseInt(h.slice(1),16)):a.get(h)||h}function s(h,u){let d=[],p=u.trim().split(/\s*,\s*/g),y;for(let b of p)if(!isNaN(b))d.push(Number(b));else if(y=b.match(i))d.push(y[2].replace(c,(_,g,S)=>g?o(g):S));else throw new Error(`Invalid Chalk template style argument: ${b} (in style '${h}')`);return d}function f(h){n.lastIndex=0;let u=[],d;for(;(d=n.exec(h))!==null;){let p=d[1];if(d[2]){let y=s(p,d[2]);u.push([p].concat(y))}else u.push([p])}return u}function l(h,u){let d={};for(let y of u)for(let b of y.styles)d[b[0]]=y.inverse?null:b.slice(1);let p=h;for(let y of Object.keys(d))if(Array.isArray(d[y])){if(!(y in p))throw new Error(`Unknown Chalk style: ${y}`);d[y].length>0?p=p[y].apply(p,d[y]):p=p[y]}return p}r.exports=(h,u)=>{let d=[],p=[],y=[];if(u.replace(t,(b,_,g,S,E,v)=>{if(_)y.push(o(_));else if(S){let m=y.join("");y=[],p.push(d.length===0?m:l(h,d)(m)),d.push({inverse:g,styles:f(S)})}else if(E){if(d.length===0)throw new Error("Found extraneous } in Chalk template literal");p.push(l(h,d)(y.join(""))),y=[],d.pop()}else y.push(v)}),p.push(y.join("")),d.length>0){let b=`Chalk template literal is missing ${d.length} closing bracket${d.length===1?"":"s"} (\`}\`)`;throw new Error(b)}return p.join("")}}),br=te((e,r)=>{"use strict";Z();var t=a5(),n=h5(),i=p5().stdout,c=d5(),a=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),o=["ansi","ansi","ansi256","ansi16m"],s=new Set(["gray"]),f=Object.create(null);function l(b,_){_=_||{};let g=i?i.level:0;b.level=_.level===void 0?g:_.level,b.enabled="enabled"in _?_.enabled:b.level>0}function h(b){if(!this||!(this instanceof h)||this.template){let _={};return l(_,b),_.template=function(){let g=[].slice.call(arguments);return y.apply(null,[_.template].concat(g))},Object.setPrototypeOf(_,h.prototype),Object.setPrototypeOf(_.template,_),_.template.constructor=h,_.template}l(this,b)}a&&(n.blue.open="\x1B[94m");for(let b of Object.keys(n))n[b].closeRe=new RegExp(t(n[b].close),"g"),f[b]={get(){let _=n[b];return d.call(this,this._styles?this._styles.concat(_):[_],this._empty,b)}};f.visible={get(){return d.call(this,this._styles||[],!0,"visible")}},n.color.closeRe=new RegExp(t(n.color.close),"g");for(let b of Object.keys(n.color.ansi))s.has(b)||(f[b]={get(){let _=this.level;return function(){let g={open:n.color[o[_]][b].apply(null,arguments),close:n.color.close,closeRe:n.color.closeRe};return d.call(this,this._styles?this._styles.concat(g):[g],this._empty,b)}}});n.bgColor.closeRe=new RegExp(t(n.bgColor.close),"g");for(let b of Object.keys(n.bgColor.ansi)){if(s.has(b))continue;let _="bg"+b[0].toUpperCase()+b.slice(1);f[_]={get(){let g=this.level;return function(){let S={open:n.bgColor[o[g]][b].apply(null,arguments),close:n.bgColor.close,closeRe:n.bgColor.closeRe};return d.call(this,this._styles?this._styles.concat(S):[S],this._empty,b)}}}}var u=Object.defineProperties(()=>{},f);function d(b,_,g){let S=function(){return p.apply(S,arguments)};S._styles=b,S._empty=_;let E=this;return Object.defineProperty(S,"level",{enumerable:!0,get(){return E.level},set(v){E.level=v}}),Object.defineProperty(S,"enabled",{enumerable:!0,get(){return E.enabled},set(v){E.enabled=v}}),S.hasGrey=this.hasGrey||g==="gray"||g==="grey",S.__proto__=u,S}function p(){let b=arguments,_=b.length,g=String(arguments[0]);if(_===0)return"";if(_>1)for(let E=1;E<_;E++)g+=" "+b[E];if(!this.enabled||this.level<=0||!g)return this._empty?"":g;let S=n.dim.open;a&&this.hasGrey&&(n.dim.open="");for(let E of this._styles.slice().reverse())g=E.open+g.replace(E.closeRe,E.open)+E.close,g=g.replace(/\r?\n/g,`${E.close}$&${E.open}`);return n.dim.open=S,g}function y(b,_){if(!Array.isArray(_))return[].slice.call(arguments,1).join(" ");let g=[].slice.call(arguments,2),S=[_.raw[0]];for(let E=1;E<_.length;E++)S.push(String(g[E-1]).replace(/[{}\\]/g,"\\$&")),S.push(String(_.raw[E]));return c(b,S.join(""))}Object.defineProperties(h.prototype,f),r.exports=h(),r.exports.supportsColor=i,r.exports.default=r.exports});var m5=te((e,r)=>{"use strict";Z(),r.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}),mh=te((e,r)=>{Z();var t=m5(),n={};for(let a of Object.keys(t))n[t[a]]=a;var i={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};r.exports=i;for(let a of Object.keys(i)){if(!("channels"in i[a]))throw new Error("missing channels property: "+a);if(!("labels"in i[a]))throw new Error("missing channel labels property: "+a);if(i[a].labels.length!==i[a].channels)throw new Error("channel and label counts mismatch: "+a);let{channels:o,labels:s}=i[a];delete i[a].channels,delete i[a].labels,Object.defineProperty(i[a],"channels",{value:o}),Object.defineProperty(i[a],"labels",{value:s})}i.rgb.hsl=function(a){let o=a[0]/255,s=a[1]/255,f=a[2]/255,l=Math.min(o,s,f),h=Math.max(o,s,f),u=h-l,d,p;h===l?d=0:o===h?d=(s-f)/u:s===h?d=2+(f-o)/u:f===h&&(d=4+(o-s)/u),d=Math.min(d*60,360),d<0&&(d+=360);let y=(l+h)/2;return h===l?p=0:y<=.5?p=u/(h+l):p=u/(2-h-l),[d,p*100,y*100]},i.rgb.hsv=function(a){let o,s,f,l,h,u=a[0]/255,d=a[1]/255,p=a[2]/255,y=Math.max(u,d,p),b=y-Math.min(u,d,p),_=function(g){return(y-g)/6/b+1/2};return b===0?(l=0,h=0):(h=b/y,o=_(u),s=_(d),f=_(p),u===y?l=f-s:d===y?l=1/3+o-f:p===y&&(l=2/3+s-o),l<0?l+=1:l>1&&(l-=1)),[l*360,h*100,y*100]},i.rgb.hwb=function(a){let o=a[0],s=a[1],f=a[2],l=i.rgb.hsl(a)[0],h=1/255*Math.min(o,Math.min(s,f));return f=1-1/255*Math.max(o,Math.max(s,f)),[l,h*100,f*100]},i.rgb.cmyk=function(a){let o=a[0]/255,s=a[1]/255,f=a[2]/255,l=Math.min(1-o,1-s,1-f),h=(1-o-l)/(1-l)||0,u=(1-s-l)/(1-l)||0,d=(1-f-l)/(1-l)||0;return[h*100,u*100,d*100,l*100]};function c(a,o){return(a[0]-o[0])**2+(a[1]-o[1])**2+(a[2]-o[2])**2}i.rgb.keyword=function(a){let o=n[a];if(o)return o;let s=1/0,f;for(let l of Object.keys(t)){let h=t[l],u=c(a,h);u<s&&(s=u,f=l)}return f},i.keyword.rgb=function(a){return t[a]},i.rgb.xyz=function(a){let o=a[0]/255,s=a[1]/255,f=a[2]/255;o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,s=s>.04045?((s+.055)/1.055)**2.4:s/12.92,f=f>.04045?((f+.055)/1.055)**2.4:f/12.92;let l=o*.4124+s*.3576+f*.1805,h=o*.2126+s*.7152+f*.0722,u=o*.0193+s*.1192+f*.9505;return[l*100,h*100,u*100]},i.rgb.lab=function(a){let o=i.rgb.xyz(a),s=o[0],f=o[1],l=o[2];s/=95.047,f/=100,l/=108.883,s=s>.008856?s**(1/3):7.787*s+16/116,f=f>.008856?f**(1/3):7.787*f+16/116,l=l>.008856?l**(1/3):7.787*l+16/116;let h=116*f-16,u=500*(s-f),d=200*(f-l);return[h,u,d]},i.hsl.rgb=function(a){let o=a[0]/360,s=a[1]/100,f=a[2]/100,l,h,u;if(s===0)return u=f*255,[u,u,u];f<.5?l=f*(1+s):l=f+s-f*s;let d=2*f-l,p=[0,0,0];for(let y=0;y<3;y++)h=o+1/3*-(y-1),h<0&&h++,h>1&&h--,6*h<1?u=d+(l-d)*6*h:2*h<1?u=l:3*h<2?u=d+(l-d)*(2/3-h)*6:u=d,p[y]=u*255;return p},i.hsl.hsv=function(a){let o=a[0],s=a[1]/100,f=a[2]/100,l=s,h=Math.max(f,.01);f*=2,s*=f<=1?f:2-f,l*=h<=1?h:2-h;let u=(f+s)/2,d=f===0?2*l/(h+l):2*s/(f+s);return[o,d*100,u*100]},i.hsv.rgb=function(a){let o=a[0]/60,s=a[1]/100,f=a[2]/100,l=Math.floor(o)%6,h=o-Math.floor(o),u=255*f*(1-s),d=255*f*(1-s*h),p=255*f*(1-s*(1-h));switch(f*=255,l){case 0:return[f,p,u];case 1:return[d,f,u];case 2:return[u,f,p];case 3:return[u,d,f];case 4:return[p,u,f];case 5:return[f,u,d]}},i.hsv.hsl=function(a){let o=a[0],s=a[1]/100,f=a[2]/100,l=Math.max(f,.01),h,u;u=(2-s)*f;let d=(2-s)*l;return h=s*l,h/=d<=1?d:2-d,h=h||0,u/=2,[o,h*100,u*100]},i.hwb.rgb=function(a){let o=a[0]/360,s=a[1]/100,f=a[2]/100,l=s+f,h;l>1&&(s/=l,f/=l);let u=Math.floor(6*o),d=1-f;h=6*o-u,u&1&&(h=1-h);let p=s+h*(d-s),y,b,_;switch(u){default:case 6:case 0:y=d,b=p,_=s;break;case 1:y=p,b=d,_=s;break;case 2:y=s,b=d,_=p;break;case 3:y=s,b=p,_=d;break;case 4:y=p,b=s,_=d;break;case 5:y=d,b=s,_=p;break}return[y*255,b*255,_*255]},i.cmyk.rgb=function(a){let o=a[0]/100,s=a[1]/100,f=a[2]/100,l=a[3]/100,h=1-Math.min(1,o*(1-l)+l),u=1-Math.min(1,s*(1-l)+l),d=1-Math.min(1,f*(1-l)+l);return[h*255,u*255,d*255]},i.xyz.rgb=function(a){let o=a[0]/100,s=a[1]/100,f=a[2]/100,l,h,u;return l=o*3.2406+s*-1.5372+f*-.4986,h=o*-.9689+s*1.8758+f*.0415,u=o*.0557+s*-.204+f*1.057,l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92,h=h>.0031308?1.055*h**(1/2.4)-.055:h*12.92,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,l=Math.min(Math.max(0,l),1),h=Math.min(Math.max(0,h),1),u=Math.min(Math.max(0,u),1),[l*255,h*255,u*255]},i.xyz.lab=function(a){let o=a[0],s=a[1],f=a[2];o/=95.047,s/=100,f/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,f=f>.008856?f**(1/3):7.787*f+16/116;let l=116*s-16,h=500*(o-s),u=200*(s-f);return[l,h,u]},i.lab.xyz=function(a){let o=a[0],s=a[1],f=a[2],l,h,u;h=(o+16)/116,l=s/500+h,u=h-f/200;let d=h**3,p=l**3,y=u**3;return h=d>.008856?d:(h-16/116)/7.787,l=p>.008856?p:(l-16/116)/7.787,u=y>.008856?y:(u-16/116)/7.787,l*=95.047,h*=100,u*=108.883,[l,h,u]},i.lab.lch=function(a){let o=a[0],s=a[1],f=a[2],l;l=Math.atan2(f,s)*360/2/Math.PI,l<0&&(l+=360);let h=Math.sqrt(s*s+f*f);return[o,h,l]},i.lch.lab=function(a){let o=a[0],s=a[1],f=a[2]/360*2*Math.PI,l=s*Math.cos(f),h=s*Math.sin(f);return[o,l,h]},i.rgb.ansi16=function(a,o=null){let[s,f,l]=a,h=o===null?i.rgb.hsv(a)[2]:o;if(h=Math.round(h/50),h===0)return 30;let u=30+(Math.round(l/255)<<2|Math.round(f/255)<<1|Math.round(s/255));return h===2&&(u+=60),u},i.hsv.ansi16=function(a){return i.rgb.ansi16(i.hsv.rgb(a),a[2])},i.rgb.ansi256=function(a){let o=a[0],s=a[1],f=a[2];return o===s&&s===f?o<8?16:o>248?231:Math.round((o-8)/247*24)+232:16+36*Math.round(o/255*5)+6*Math.round(s/255*5)+Math.round(f/255*5)},i.ansi16.rgb=function(a){let o=a%10;if(o===0||o===7)return a>50&&(o+=3.5),o=o/10.5*255,[o,o,o];let s=(~~(a>50)+1)*.5,f=(o&1)*s*255,l=(o>>1&1)*s*255,h=(o>>2&1)*s*255;return[f,l,h]},i.ansi256.rgb=function(a){if(a>=232){let h=(a-232)*10+8;return[h,h,h]}a-=16;let o,s=Math.floor(a/36)/5*255,f=Math.floor((o=a%36)/6)/5*255,l=o%6/5*255;return[s,f,l]},i.rgb.hex=function(a){let o=(((Math.round(a[0])&255)<<16)+((Math.round(a[1])&255)<<8)+(Math.round(a[2])&255)).toString(16).toUpperCase();return"000000".substring(o.length)+o},i.hex.rgb=function(a){let o=a.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!o)return[0,0,0];let s=o[0];o[0].length===3&&(s=s.split("").map(d=>d+d).join(""));let f=parseInt(s,16),l=f>>16&255,h=f>>8&255,u=f&255;return[l,h,u]},i.rgb.hcg=function(a){let o=a[0]/255,s=a[1]/255,f=a[2]/255,l=Math.max(Math.max(o,s),f),h=Math.min(Math.min(o,s),f),u=l-h,d,p;return u<1?d=h/(1-u):d=0,u<=0?p=0:l===o?p=(s-f)/u%6:l===s?p=2+(f-o)/u:p=4+(o-s)/u,p/=6,p%=1,[p*360,u*100,d*100]},i.hsl.hcg=function(a){let o=a[1]/100,s=a[2]/100,f=s<.5?2*o*s:2*o*(1-s),l=0;return f<1&&(l=(s-.5*f)/(1-f)),[a[0],f*100,l*100]},i.hsv.hcg=function(a){let o=a[1]/100,s=a[2]/100,f=o*s,l=0;return f<1&&(l=(s-f)/(1-f)),[a[0],f*100,l*100]},i.hcg.rgb=function(a){let o=a[0]/360,s=a[1]/100,f=a[2]/100;if(s===0)return[f*255,f*255,f*255];let l=[0,0,0],h=o%1*6,u=h%1,d=1-u,p=0;switch(Math.floor(h)){case 0:l[0]=1,l[1]=u,l[2]=0;break;case 1:l[0]=d,l[1]=1,l[2]=0;break;case 2:l[0]=0,l[1]=1,l[2]=u;break;case 3:l[0]=0,l[1]=d,l[2]=1;break;case 4:l[0]=u,l[1]=0,l[2]=1;break;default:l[0]=1,l[1]=0,l[2]=d}return p=(1-s)*f,[(s*l[0]+p)*255,(s*l[1]+p)*255,(s*l[2]+p)*255]},i.hcg.hsv=function(a){let o=a[1]/100,s=a[2]/100,f=o+s*(1-o),l=0;return f>0&&(l=o/f),[a[0],l*100,f*100]},i.hcg.hsl=function(a){let o=a[1]/100,s=a[2]/100*(1-o)+.5*o,f=0;return s>0&&s<.5?f=o/(2*s):s>=.5&&s<1&&(f=o/(2*(1-s))),[a[0],f*100,s*100]},i.hcg.hwb=function(a){let o=a[1]/100,s=a[2]/100,f=o+s*(1-o);return[a[0],(f-o)*100,(1-f)*100]},i.hwb.hcg=function(a){let o=a[1]/100,s=a[2]/100,f=1-s,l=f-o,h=0;return l<1&&(h=(f-l)/(1-l)),[a[0],l*100,h*100]},i.apple.rgb=function(a){return[a[0]/65535*255,a[1]/65535*255,a[2]/65535*255]},i.rgb.apple=function(a){return[a[0]/255*65535,a[1]/255*65535,a[2]/255*65535]},i.gray.rgb=function(a){return[a[0]/100*255,a[0]/100*255,a[0]/100*255]},i.gray.hsl=function(a){return[0,0,a[0]]},i.gray.hsv=i.gray.hsl,i.gray.hwb=function(a){return[0,100,a[0]]},i.gray.cmyk=function(a){return[0,0,0,a[0]]},i.gray.lab=function(a){return[a[0],0,0]},i.gray.hex=function(a){let o=Math.round(a[0]/100*255)&255,s=((o<<16)+(o<<8)+o).toString(16).toUpperCase();return"000000".substring(s.length)+s},i.rgb.gray=function(a){return[(a[0]+a[1]+a[2])/3/255*100]}}),y5=te((e,r)=>{Z();var t=mh();function n(){let o={},s=Object.keys(t);for(let f=s.length,l=0;l<f;l++)o[s[l]]={distance:-1,parent:null};return o}function i(o){let s=n(),f=[o];for(s[o].distance=0;f.length;){let l=f.pop(),h=Object.keys(t[l]);for(let u=h.length,d=0;d<u;d++){let p=h[d],y=s[p];y.distance===-1&&(y.distance=s[l].distance+1,y.parent=l,f.unshift(p))}}return s}function c(o,s){return function(f){return s(o(f))}}function a(o,s){let f=[s[o].parent,o],l=t[s[o].parent][o],h=s[o].parent;for(;s[h].parent;)f.unshift(s[h].parent),l=c(t[s[h].parent][h],l),h=s[h].parent;return l.conversion=f,l}r.exports=function(o){let s=i(o),f={},l=Object.keys(s);for(let h=l.length,u=0;u<h;u++){let d=l[u];s[d].parent!==null&&(f[d]=a(d,s))}return f}}),g5=te((e,r)=>{Z();var t=mh(),n=y5(),i={},c=Object.keys(t);function a(s){let f=function(...l){let h=l[0];return h==null?h:(h.length>1&&(l=h),s(l))};return"conversion"in s&&(f.conversion=s.conversion),f}function o(s){let f=function(...l){let h=l[0];if(h==null)return h;h.length>1&&(l=h);let u=s(l);if(typeof u=="object")for(let d=u.length,p=0;p<d;p++)u[p]=Math.round(u[p]);return u};return"conversion"in s&&(f.conversion=s.conversion),f}c.forEach(s=>{i[s]={},Object.defineProperty(i[s],"channels",{value:t[s].channels}),Object.defineProperty(i[s],"labels",{value:t[s].labels});let f=n(s);Object.keys(f).forEach(l=>{let h=f[l];i[s][l]=o(h),i[s][l].raw=a(h)})}),r.exports=i}),yh=te((e,r)=>{"use strict";Z();var t=(h,u)=>(...d)=>`\x1B[${h(...d)+u}m`,n=(h,u)=>(...d)=>{let p=h(...d);return`\x1B[${38+u};5;${p}m`},i=(h,u)=>(...d)=>{let p=h(...d);return`\x1B[${38+u};2;${p[0]};${p[1]};${p[2]}m`},c=h=>h,a=(h,u,d)=>[h,u,d],o=(h,u,d)=>{Object.defineProperty(h,u,{get:()=>{let p=d();return Object.defineProperty(h,u,{value:p,enumerable:!0,configurable:!0}),p},enumerable:!0,configurable:!0})},s,f=(h,u,d,p)=>{s===void 0&&(s=g5());let y=p?10:0,b={};for(let[_,g]of Object.entries(s)){let S=_==="ansi16"?"ansi":_;_===u?b[S]=h(d,y):typeof g=="object"&&(b[S]=h(g[u],y))}return b};function l(){let h=new Map,u={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],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],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],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};u.color.gray=u.color.blackBright,u.bgColor.bgGray=u.bgColor.bgBlackBright,u.color.grey=u.color.blackBright,u.bgColor.bgGrey=u.bgColor.bgBlackBright;for(let[d,p]of Object.entries(u)){for(let[y,b]of Object.entries(p))u[y]={open:`\x1B[${b[0]}m`,close:`\x1B[${b[1]}m`},p[y]=u[y],h.set(b[0],b[1]);Object.defineProperty(u,d,{value:p,enumerable:!1})}return Object.defineProperty(u,"codes",{value:h,enumerable:!1}),u.color.close="\x1B[39m",u.bgColor.close="\x1B[49m",o(u.color,"ansi",()=>f(t,"ansi16",c,!1)),o(u.color,"ansi256",()=>f(n,"ansi256",c,!1)),o(u.color,"ansi16m",()=>f(i,"rgb",a,!1)),o(u.bgColor,"ansi",()=>f(t,"ansi16",c,!0)),o(u.bgColor,"ansi256",()=>f(n,"ansi256",c,!0)),o(u.bgColor,"ansi16m",()=>f(i,"rgb",a,!0)),u}Object.defineProperty(r,"exports",{enumerable:!0,get:l})}),b5=te((e,r)=>{"use strict";Z(),r.exports=(t,n=process.argv)=>{let i=t.startsWith("-")?"":t.length===1?"-":"--",c=n.indexOf(i+t),a=n.indexOf("--");return c!==-1&&(a===-1||c<a)}}),gh=te((e,r)=>{"use strict";Z();var t=he("os"),n=he("tty"),i=b5(),{env:c}=process,a;i("no-color")||i("no-colors")||i("color=false")||i("color=never")?a=0:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(a=1),"FORCE_COLOR"in c&&(c.FORCE_COLOR==="true"?a=1:c.FORCE_COLOR==="false"?a=0:a=c.FORCE_COLOR.length===0?1:Math.min(parseInt(c.FORCE_COLOR,10),3));function o(l){return l===0?!1:{level:l,hasBasic:!0,has256:l>=2,has16m:l>=3}}function s(l,h){if(a===0)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(l&&!h&&a===void 0)return 0;let u=a||0;if(c.TERM==="dumb")return u;if(process.platform==="win32"){let d=t.release().split(".");return Number(d[0])>=10&&Number(d[2])>=10586?Number(d[2])>=14931?3:2:1}if("CI"in c)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(d=>d in c)||c.CI_NAME==="codeship"?1:u;if("TEAMCITY_VERSION"in c)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(c.TEAMCITY_VERSION)?1:0;if(c.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in c){let d=parseInt((c.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(c.TERM_PROGRAM){case"iTerm.app":return d>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(c.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(c.TERM)||"COLORTERM"in c?1:u}function f(l){let h=s(l,l&&l.isTTY);return o(h)}r.exports={supportsColor:f,stdout:o(s(!0,n.isatty(1))),stderr:o(s(!0,n.isatty(2)))}}),v5=te((e,r)=>{"use strict";Z();var t=(i,c,a)=>{let o=i.indexOf(c);if(o===-1)return i;let s=c.length,f=0,l="";do l+=i.substr(f,o-f)+c+a,f=o+s,o=i.indexOf(c,f);while(o!==-1);return l+=i.substr(f),l},n=(i,c,a,o)=>{let s=0,f="";do{let l=i[o-1]==="\r";f+=i.substr(s,(l?o-1:o)-s)+c+(l?`\r
119
119
  `:`
120
120
  `)+a,s=o+1,o=i.indexOf(`
@@ -143,9 +143,9 @@ GFS4: `),console.error(g)}),t[o]||(u=global[o]||[],l(t,u),t.close=function(g){fu
143
143
  see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001"),o.checkPaths(P,O,"copy",D,(M,L)=>{if(M)return k(M);let{srcStat:U,destStat:z}=L;o.checkParentPaths(P,U,O,"copy",se=>{if(se)return k(se);l(P,O,D,(I,N)=>{if(I)return k(I);if(!N)return k();f(z,P,O,D,k)})})})}function f(P,O,D,k,M){let L=n.dirname(D);c(L,(U,z)=>{if(U)return M(U);if(z)return h(P,O,D,k,M);i(L,se=>se?M(se):h(P,O,D,k,M))})}function l(P,O,D,k){if(!D.filter)return k(null,!0);Promise.resolve(D.filter(P,O)).then(M=>k(null,M),M=>k(M))}function h(P,O,D,k,M){(k.dereference?t.stat:t.lstat)(O,(L,U)=>L?M(L):U.isDirectory()?v(U,P,O,D,k,M):U.isFile()||U.isCharacterDevice()||U.isBlockDevice()?u(U,P,O,D,k,M):U.isSymbolicLink()?R(P,O,D,k,M):U.isSocket()?M(new Error(`Cannot copy a socket file: ${O}`)):U.isFIFO()?M(new Error(`Cannot copy a FIFO pipe: ${O}`)):M(new Error(`Unknown file: ${O}`)))}function u(P,O,D,k,M,L){return O?d(P,D,k,M,L):p(P,D,k,M,L)}function d(P,O,D,k,M){if(k.overwrite)t.unlink(D,L=>L?M(L):p(P,O,D,k,M));else return k.errorOnExist?M(new Error(`'${D}' already exists`)):M()}function p(P,O,D,k,M){t.copyFile(O,D,L=>L?M(L):k.preserveTimestamps?y(P.mode,O,D,M):S(D,P.mode,M))}function y(P,O,D,k){return b(P)?_(D,P,M=>M?k(M):g(P,O,D,k)):g(P,O,D,k)}function b(P){return(P&128)===0}function _(P,O,D){return S(P,O|128,D)}function g(P,O,D,k){E(O,D,M=>M?k(M):S(D,P,k))}function S(P,O,D){return t.chmod(P,O,D)}function E(P,O,D){t.stat(P,(k,M)=>k?D(k):a(O,M.atime,M.mtime,D))}function v(P,O,D,k,M,L){return O?w(D,k,M,L):m(P.mode,D,k,M,L)}function m(P,O,D,k,M){t.mkdir(D,L=>{if(L)return M(L);w(O,D,k,U=>U?M(U):S(D,P,M))})}function w(P,O,D,k){t.readdir(P,(M,L)=>M?k(M):x(L,P,O,D,k))}function x(P,O,D,k,M){let L=P.pop();return L?A(P,L,O,D,k,M):M()}function A(P,O,D,k,M,L){let U=n.join(D,O),z=n.join(k,O);l(U,z,M,(se,I)=>{if(se)return L(se);if(!I)return x(P,D,k,M,L);o.checkPaths(U,z,"copy",M,(N,F)=>{if(N)return L(N);let{destStat:V}=F;h(V,U,z,M,G=>G?L(G):x(P,D,k,M,L))})})}function R(P,O,D,k,M){t.readlink(O,(L,U)=>{if(L)return M(L);if(k.dereference&&(U=n.resolve(process.cwd(),U)),P)t.readlink(D,(z,se)=>z?z.code==="EINVAL"||z.code==="UNKNOWN"?t.symlink(U,D,M):M(z):(k.dereference&&(se=n.resolve(process.cwd(),se)),o.isSrcSubdir(U,se)?M(new Error(`Cannot copy '${U}' to a subdirectory of itself, '${se}'.`)):o.isSrcSubdir(se,U)?M(new Error(`Cannot overwrite '${se}' with '${U}'.`)):B(U,D,M)));else return t.symlink(U,D,M)})}function B(P,O,D){t.unlink(O,k=>k?D(k):t.symlink(P,O,D))}r.exports=s}),uv=te((e,r)=>{"use strict";Z();var t=Ie(),n=he("path"),i=Rt().mkdirsSync,c=Jh().utimesMillisSync,a=qr();function o(w,x,A){typeof A=="function"&&(A={filter:A}),A=A||{},A.clobber="clobber"in A?!!A.clobber:!0,A.overwrite="overwrite"in A?!!A.overwrite:A.clobber,A.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
144
144
 
145
145
  see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:R,destStat:B}=a.checkPathsSync(w,x,"copy",A);if(a.checkParentPathsSync(w,R,x,"copy"),A.filter&&!A.filter(w,x))return;let P=n.dirname(x);return t.existsSync(P)||i(P),s(B,w,x,A)}function s(w,x,A,R){let B=(R.dereference?t.statSync:t.lstatSync)(x);if(B.isDirectory())return _(B,w,x,A,R);if(B.isFile()||B.isCharacterDevice()||B.isBlockDevice())return f(B,w,x,A,R);if(B.isSymbolicLink())return v(w,x,A,R);throw B.isSocket()?new Error(`Cannot copy a socket file: ${x}`):B.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${x}`):new Error(`Unknown file: ${x}`)}function f(w,x,A,R,B){return x?l(w,A,R,B):h(w,A,R,B)}function l(w,x,A,R){if(R.overwrite)return t.unlinkSync(A),h(w,x,A,R);if(R.errorOnExist)throw new Error(`'${A}' already exists`)}function h(w,x,A,R){return t.copyFileSync(x,A),R.preserveTimestamps&&u(w.mode,x,A),y(A,w.mode)}function u(w,x,A){return d(w)&&p(A,w),b(x,A)}function d(w){return(w&128)===0}function p(w,x){return y(w,x|128)}function y(w,x){return t.chmodSync(w,x)}function b(w,x){let A=t.statSync(w);return c(x,A.atime,A.mtime)}function _(w,x,A,R,B){return x?S(A,R,B):g(w.mode,A,R,B)}function g(w,x,A,R){return t.mkdirSync(A),S(x,A,R),y(A,w)}function S(w,x,A){t.readdirSync(w).forEach(R=>E(R,w,x,A))}function E(w,x,A,R){let B=n.join(x,w),P=n.join(A,w);if(R.filter&&!R.filter(B,P))return;let{destStat:O}=a.checkPathsSync(B,P,"copy",R);return s(O,B,P,R)}function v(w,x,A,R){let B=t.readlinkSync(x);if(R.dereference&&(B=n.resolve(process.cwd(),B)),w){let P;try{P=t.readlinkSync(A)}catch(O){if(O.code==="EINVAL"||O.code==="UNKNOWN")return t.symlinkSync(B,A);throw O}if(R.dereference&&(P=n.resolve(process.cwd(),P)),a.isSrcSubdir(B,P))throw new Error(`Cannot copy '${B}' to a subdirectory of itself, '${P}'.`);if(a.isSrcSubdir(P,B))throw new Error(`Cannot overwrite '${P}' with '${B}'.`);return m(B,A)}else return t.symlinkSync(B,A)}function m(w,x){return t.unlinkSync(x),t.symlinkSync(w,x)}r.exports=o}),zo=te((e,r)=>{"use strict";Z();var t=mt().fromCallback;r.exports={copy:t(av()),copySync:uv()}}),Li=te((e,r)=>{"use strict";Z();var t=Ie(),n=mt().fromCallback;function i(a,o){t.rm(a,{recursive:!0,force:!0},o)}function c(a){t.rmSync(a,{recursive:!0,force:!0})}r.exports={remove:n(i),removeSync:c}}),lv=te((e,r)=>{"use strict";Z();var t=mt().fromPromise,n=Hr(),i=he("path"),c=Rt(),a=Li(),o=t(async function(f){let l;try{l=await n.readdir(f)}catch{return c.mkdirs(f)}return Promise.all(l.map(h=>a.remove(i.join(f,h))))});function s(f){let l;try{l=n.readdirSync(f)}catch{return c.mkdirsSync(f)}l.forEach(h=>{h=i.join(f,h),a.removeSync(h)})}r.exports={emptyDirSync:s,emptydirSync:s,emptyDir:o,emptydir:o}}),cv=te((e,r)=>{"use strict";Z();var t=mt().fromCallback,n=he("path"),i=Ie(),c=Rt();function a(s,f){function l(){i.writeFile(s,"",h=>{if(h)return f(h);f()})}i.stat(s,(h,u)=>{if(!h&&u.isFile())return f();let d=n.dirname(s);i.stat(d,(p,y)=>{if(p)return p.code==="ENOENT"?c.mkdirs(d,b=>{if(b)return f(b);l()}):f(p);y.isDirectory()?l():i.readdir(d,b=>{if(b)return f(b)})})})}function o(s){let f;try{f=i.statSync(s)}catch{}if(f&&f.isFile())return;let l=n.dirname(s);try{i.statSync(l).isDirectory()||i.readdirSync(l)}catch(h){if(h&&h.code==="ENOENT")c.mkdirsSync(l);else throw h}i.writeFileSync(s,"")}r.exports={createFile:t(a),createFileSync:o}}),hv=te((e,r)=>{"use strict";Z();var t=mt().fromCallback,n=he("path"),i=Ie(),c=Rt(),a=vr().pathExists,{areIdentical:o}=qr();function s(l,h,u){function d(p,y){i.link(p,y,b=>{if(b)return u(b);u(null)})}i.lstat(h,(p,y)=>{i.lstat(l,(b,_)=>{if(b)return b.message=b.message.replace("lstat","ensureLink"),u(b);if(y&&o(_,y))return u(null);let g=n.dirname(h);a(g,(S,E)=>{if(S)return u(S);if(E)return d(l,h);c.mkdirs(g,v=>{if(v)return u(v);d(l,h)})})})})}function f(l,h){let u;try{u=i.lstatSync(h)}catch{}try{let p=i.lstatSync(l);if(u&&o(p,u))return}catch(p){throw p.message=p.message.replace("lstat","ensureLink"),p}let d=n.dirname(h);return i.existsSync(d)||c.mkdirsSync(d),i.linkSync(l,h)}r.exports={createLink:t(s),createLinkSync:f}}),fv=te((e,r)=>{"use strict";Z();var t=he("path"),n=Ie(),i=vr().pathExists;function c(o,s,f){if(t.isAbsolute(o))return n.lstat(o,l=>l?(l.message=l.message.replace("lstat","ensureSymlink"),f(l)):f(null,{toCwd:o,toDst:o}));{let l=t.dirname(s),h=t.join(l,o);return i(h,(u,d)=>u?f(u):d?f(null,{toCwd:h,toDst:o}):n.lstat(o,p=>p?(p.message=p.message.replace("lstat","ensureSymlink"),f(p)):f(null,{toCwd:o,toDst:t.relative(l,o)})))}}function a(o,s){let f;if(t.isAbsolute(o)){if(f=n.existsSync(o),!f)throw new Error("absolute srcpath does not exist");return{toCwd:o,toDst:o}}else{let l=t.dirname(s),h=t.join(l,o);if(f=n.existsSync(h),f)return{toCwd:h,toDst:o};if(f=n.existsSync(o),!f)throw new Error("relative srcpath does not exist");return{toCwd:o,toDst:t.relative(l,o)}}}r.exports={symlinkPaths:c,symlinkPathsSync:a}}),pv=te((e,r)=>{"use strict";Z();var t=Ie();function n(c,a,o){if(o=typeof a=="function"?a:o,a=typeof a=="function"?!1:a,a)return o(null,a);t.lstat(c,(s,f)=>{if(s)return o(null,"file");a=f&&f.isDirectory()?"dir":"file",o(null,a)})}function i(c,a){let o;if(a)return a;try{o=t.lstatSync(c)}catch{return"file"}return o&&o.isDirectory()?"dir":"file"}r.exports={symlinkType:n,symlinkTypeSync:i}}),dv=te((e,r)=>{"use strict";Z();var t=mt().fromCallback,n=he("path"),i=Hr(),c=Rt(),a=c.mkdirs,o=c.mkdirsSync,s=fv(),f=s.symlinkPaths,l=s.symlinkPathsSync,h=pv(),u=h.symlinkType,d=h.symlinkTypeSync,p=vr().pathExists,{areIdentical:y}=qr();function b(S,E,v,m){m=typeof v=="function"?v:m,v=typeof v=="function"?!1:v,i.lstat(E,(w,x)=>{!w&&x.isSymbolicLink()?Promise.all([i.stat(S),i.stat(E)]).then(([A,R])=>{if(y(A,R))return m(null);_(S,E,v,m)}):_(S,E,v,m)})}function _(S,E,v,m){f(S,E,(w,x)=>{if(w)return m(w);S=x.toDst,u(x.toCwd,v,(A,R)=>{if(A)return m(A);let B=n.dirname(E);p(B,(P,O)=>{if(P)return m(P);if(O)return i.symlink(S,E,R,m);a(B,D=>{if(D)return m(D);i.symlink(S,E,R,m)})})})})}function g(S,E,v){let m;try{m=i.lstatSync(E)}catch{}if(m&&m.isSymbolicLink()){let A=i.statSync(S),R=i.statSync(E);if(y(A,R))return}let w=l(S,E);S=w.toDst,v=d(w.toCwd,v);let x=n.dirname(E);return i.existsSync(x)||o(x),i.symlinkSync(S,E,v)}r.exports={createSymlink:t(b),createSymlinkSync:g}}),mv=te((e,r)=>{"use strict";Z();var{createFile:t,createFileSync:n}=cv(),{createLink:i,createLinkSync:c}=hv(),{createSymlink:a,createSymlinkSync:o}=dv();r.exports={createFile:t,createFileSync:n,ensureFile:t,ensureFileSync:n,createLink:i,createLinkSync:c,ensureLink:i,ensureLinkSync:c,createSymlink:a,createSymlinkSync:o,ensureSymlink:a,ensureSymlinkSync:o}}),Wo=te((e,r)=>{Z();function t(i,{EOL:c=`
146
- `,finalEOL:a=!0,replacer:o=null,spaces:s}={}){let f=a?c:"";return JSON.stringify(i,o,s).replace(/\n/g,c)+f}function n(i){return Buffer.isBuffer(i)&&(i=i.toString("utf8")),i.replace(/^\uFEFF/,"")}r.exports={stringify:t,stripBom:n}}),yv=te((e,r)=>{Z();var t;try{t=Ie()}catch{t=he("fs")}var n=mt(),{stringify:i,stripBom:c}=Wo();async function a(d,p={}){typeof p=="string"&&(p={encoding:p});let y=p.fs||t,b="throws"in p?p.throws:!0,_=await n.fromCallback(y.readFile)(d,p);_=c(_);let g;try{g=JSON.parse(_,p?p.reviver:null)}catch(S){if(b)throw S.message=`${d}: ${S.message}`,S;return null}return g}var o=n.fromPromise(a);function s(d,p={}){typeof p=="string"&&(p={encoding:p});let y=p.fs||t,b="throws"in p?p.throws:!0;try{let _=y.readFileSync(d,p);return _=c(_),JSON.parse(_,p.reviver)}catch(_){if(b)throw _.message=`${d}: ${_.message}`,_;return null}}async function f(d,p,y={}){let b=y.fs||t,_=i(p,y);await n.fromCallback(b.writeFile)(d,_,y)}var l=n.fromPromise(f);function h(d,p,y={}){let b=y.fs||t,_=i(p,y);return b.writeFileSync(d,_,y)}var u={readFile:o,readFileSync:s,writeFile:l,writeFileSync:h};r.exports=u}),gv=te((e,r)=>{"use strict";Z();var t=yv();r.exports={readJson:t.readFile,readJsonSync:t.readFileSync,writeJson:t.writeFile,writeJsonSync:t.writeFileSync}}),Vo=te((e,r)=>{"use strict";Z();var t=mt().fromCallback,n=Ie(),i=he("path"),c=Rt(),a=vr().pathExists;function o(f,l,h,u){typeof h=="function"&&(u=h,h="utf8");let d=i.dirname(f);a(d,(p,y)=>{if(p)return u(p);if(y)return n.writeFile(f,l,h,u);c.mkdirs(d,b=>{if(b)return u(b);n.writeFile(f,l,h,u)})})}function s(f,...l){let h=i.dirname(f);if(n.existsSync(h))return n.writeFileSync(f,...l);c.mkdirsSync(h),n.writeFileSync(f,...l)}r.exports={outputFile:t(o),outputFileSync:s}}),bv=te((e,r)=>{"use strict";Z();var{stringify:t}=Wo(),{outputFile:n}=Vo();async function i(c,a,o={}){let s=t(a,o);await n(c,s,o)}r.exports=i}),vv=te((e,r)=>{"use strict";Z();var{stringify:t}=Wo(),{outputFileSync:n}=Vo();function i(c,a,o){let s=t(a,o);n(c,s,o)}r.exports=i}),_v=te((e,r)=>{"use strict";Z();var t=mt().fromPromise,n=gv();n.outputJson=t(bv()),n.outputJsonSync=vv(),n.outputJSON=n.outputJson,n.outputJSONSync=n.outputJsonSync,n.writeJSON=n.writeJson,n.writeJSONSync=n.writeJsonSync,n.readJSON=n.readJson,n.readJSONSync=n.readJsonSync,r.exports=n}),wv=te((e,r)=>{"use strict";Z();var t=Ie(),n=he("path"),i=zo().copy,c=Li().remove,a=Rt().mkdirp,o=vr().pathExists,s=qr();function f(p,y,b,_){typeof b=="function"&&(_=b,b={}),b=b||{};let g=b.overwrite||b.clobber||!1;s.checkPaths(p,y,"move",b,(S,E)=>{if(S)return _(S);let{srcStat:v,isChangingCase:m=!1}=E;s.checkParentPaths(p,v,y,"move",w=>{if(w)return _(w);if(l(y))return h(p,y,g,m,_);a(n.dirname(y),x=>x?_(x):h(p,y,g,m,_))})})}function l(p){let y=n.dirname(p);return n.parse(y).root===y}function h(p,y,b,_,g){if(_)return u(p,y,b,g);if(b)return c(y,S=>S?g(S):u(p,y,b,g));o(y,(S,E)=>S?g(S):E?g(new Error("dest already exists.")):u(p,y,b,g))}function u(p,y,b,_){t.rename(p,y,g=>g?g.code!=="EXDEV"?_(g):d(p,y,b,_):_())}function d(p,y,b,_){i(p,y,{overwrite:b,errorOnExist:!0,preserveTimestamps:!0},g=>g?_(g):c(p,_))}r.exports=f}),Ev=te((e,r)=>{"use strict";Z();var t=Ie(),n=he("path"),i=zo().copySync,c=Li().removeSync,a=Rt().mkdirpSync,o=qr();function s(d,p,y){y=y||{};let b=y.overwrite||y.clobber||!1,{srcStat:_,isChangingCase:g=!1}=o.checkPathsSync(d,p,"move",y);return o.checkParentPathsSync(d,_,p,"move"),f(p)||a(n.dirname(p)),l(d,p,b,g)}function f(d){let p=n.dirname(d);return n.parse(p).root===p}function l(d,p,y,b){if(b)return h(d,p,y);if(y)return c(p),h(d,p,y);if(t.existsSync(p))throw new Error("dest already exists.");return h(d,p,y)}function h(d,p,y){try{t.renameSync(d,p)}catch(b){if(b.code!=="EXDEV")throw b;return u(d,p,y)}}function u(d,p,y){return i(d,p,{overwrite:y,errorOnExist:!0,preserveTimestamps:!0}),c(d)}r.exports=s}),Sv=te((e,r)=>{"use strict";Z();var t=mt().fromCallback;r.exports={move:t(wv()),moveSync:Ev()}}),Jt=te((e,r)=>{"use strict";Z(),r.exports={...Hr(),...zo(),...lv(),...mv(),..._v(),...Rt(),...Sv(),...Vo(),...vr(),...Li()}});Z();var xv=Ne(Jt()),Av=[".DS_Store",".git",".gitattributes",".gitignore",".gitlab-ci.yml",".hg",".hgcheck",".hgignore",".idea",".npmignore",".travis.yml","LICENSE","Thumbs.db","docs","mkdocs.yml","npm-debug.log","yarn-debug.log","yarn-error.log","yarnrc.yml",".yarn"];function Hn(e){let r=xv.default.readdirSync(e).filter(t=>!Av.includes(t)).filter(t=>!/\.iml$/.test(t));return{isEmpty:r.length===0,conflicts:r}}Z();var Yo=Ne(Jt());async function Ko(e){try{return await Yo.default.access(e,(Yo.default.constants||Yo.default).W_OK),!0}catch{return!1}}var Ur=qe(require("path"),1),Cv=te((e,r)=>{Z();function t(n,i){typeof i=="boolean"&&(i={forever:i}),this._originalTimeouts=JSON.parse(JSON.stringify(n)),this._timeouts=n,this._options=i||{},this._maxRetryTime=i&&i.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}r.exports=t,t.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},t.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},t.prototype.retry=function(n){if(this._timeout&&clearTimeout(this._timeout),!n)return!1;var i=new Date().getTime();if(n&&i-this._operationStart>=this._maxRetryTime)return this._errors.push(n),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(n);var c=this._timeouts.shift();if(c===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),c=this._cachedTimeouts.slice(-1);else return!1;var a=this;return this._timer=setTimeout(function(){a._attempts++,a._operationTimeoutCb&&(a._timeout=setTimeout(function(){a._operationTimeoutCb(a._attempts)},a._operationTimeout),a._options.unref&&a._timeout.unref()),a._fn(a._attempts)},c),this._options.unref&&this._timer.unref(),!0},t.prototype.attempt=function(n,i){this._fn=n,i&&(i.timeout&&(this._operationTimeout=i.timeout),i.cb&&(this._operationTimeoutCb=i.cb));var c=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){c._operationTimeoutCb()},c._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},t.prototype.try=function(n){console.log("Using RetryOperation.try() is deprecated"),this.attempt(n)},t.prototype.start=function(n){console.log("Using RetryOperation.start() is deprecated"),this.attempt(n)},t.prototype.start=t.prototype.try,t.prototype.errors=function(){return this._errors},t.prototype.attempts=function(){return this._attempts},t.prototype.mainError=function(){if(this._errors.length===0)return null;for(var n={},i=null,c=0,a=0;a<this._errors.length;a++){var o=this._errors[a],s=o.message,f=(n[s]||0)+1;n[s]=f,f>=c&&(i=o,c=f)}return i}}),kv=te(e=>{Z();var r=Cv();e.operation=function(t){var n=e.timeouts(t);return new r(n,{forever:t&&(t.forever||t.retries===1/0),unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})},e.timeouts=function(t){if(t instanceof Array)return[].concat(t);var n={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var i in t)n[i]=t[i];if(n.minTimeout>n.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var c=[],a=0;a<n.retries;a++)c.push(this.createTimeout(a,n));return t&&t.forever&&!c.length&&c.push(this.createTimeout(a,n)),c.sort(function(o,s){return o-s}),c},e.createTimeout=function(t,n){var i=n.randomize?Math.random()+1:1,c=Math.round(i*Math.max(n.minTimeout,1)*Math.pow(n.factor,t));return c=Math.min(c,n.maxTimeout),c},e.wrap=function(t,n,i){if(n instanceof Array&&(i=n,n=null),!i){i=[];for(var c in t)typeof t[c]=="function"&&i.push(c)}for(var a=0;a<i.length;a++){var o=i[a],s=t[o];t[o]=function(f){var l=e.operation(n),h=Array.prototype.slice.call(arguments,1),u=h.pop();h.push(function(d){l.retry(d)||(d&&(arguments[0]=l.mainError()),u.apply(this,arguments))}),l.attempt(function(){f.apply(t,h)})}.bind(t,s),t[o].options=n}}}),Dv=te((e,r)=>{Z(),r.exports=kv()}),Rv=te((e,r)=>{Z();var t=Dv();function n(i,c){function a(o,s){var f=c||{},l;"randomize"in f||(f.randomize=!0),l=t.operation(f);function h(p){s(p||new Error("Aborted"))}function u(p,y){if(p.bail){h(p);return}l.retry(p)?f.onRetry&&f.onRetry(p,y):s(l.mainError())}function d(p){var y;try{y=i(h,p)}catch(b){u(b,p);return}Promise.resolve(y).then(o).catch(function(b){u(b,p)})}l.attempt(d)}return new Promise(a)}r.exports=n});Z();Z();var ef=Ne(Rv()),er=Ne(br()),Xo=Ne(Jt()),Ov=class extends Error{};async function Zo({appPath:e,example:r,isDefaultExample:t,examplePath:n}){let i,c;try{c=new URL(r)}catch(_){_.code!=="ERR_INVALID_URL"&&(Ct(_),process.exit(1))}c?(c.origin!=="https://github.com"&&(Ct(`Invalid URL: ${er.default.red(`"${r}"`)}. Only GitHub repositories are supported. Please use a GitHub URL and try again.`),process.exit(1)),i=await $o(c,n),i||(Ct(`Unable to fetch repository information from: ${er.default.red(`"${r}"`)}. Please fix the URL and try again.`),process.exit(1)),await Ho(i)||(Ct(`Could not locate the repository for ${er.default.red(`"${r}"`)}. Please check that the repository exists and try again.`),process.exit(1))):await qo(r)||(Ct(`Could not locate an example named ${er.default.red(`"${r}"`)}. It could be due to the following:
146
+ `,finalEOL:a=!0,replacer:o=null,spaces:s}={}){let f=a?c:"";return JSON.stringify(i,o,s).replace(/\n/g,c)+f}function n(i){return Buffer.isBuffer(i)&&(i=i.toString("utf8")),i.replace(/^\uFEFF/,"")}r.exports={stringify:t,stripBom:n}}),yv=te((e,r)=>{Z();var t;try{t=Ie()}catch{t=he("fs")}var n=mt(),{stringify:i,stripBom:c}=Wo();async function a(d,p={}){typeof p=="string"&&(p={encoding:p});let y=p.fs||t,b="throws"in p?p.throws:!0,_=await n.fromCallback(y.readFile)(d,p);_=c(_);let g;try{g=JSON.parse(_,p?p.reviver:null)}catch(S){if(b)throw S.message=`${d}: ${S.message}`,S;return null}return g}var o=n.fromPromise(a);function s(d,p={}){typeof p=="string"&&(p={encoding:p});let y=p.fs||t,b="throws"in p?p.throws:!0;try{let _=y.readFileSync(d,p);return _=c(_),JSON.parse(_,p.reviver)}catch(_){if(b)throw _.message=`${d}: ${_.message}`,_;return null}}async function f(d,p,y={}){let b=y.fs||t,_=i(p,y);await n.fromCallback(b.writeFile)(d,_,y)}var l=n.fromPromise(f);function h(d,p,y={}){let b=y.fs||t,_=i(p,y);return b.writeFileSync(d,_,y)}var u={readFile:o,readFileSync:s,writeFile:l,writeFileSync:h};r.exports=u}),gv=te((e,r)=>{"use strict";Z();var t=yv();r.exports={readJson:t.readFile,readJsonSync:t.readFileSync,writeJson:t.writeFile,writeJsonSync:t.writeFileSync}}),Vo=te((e,r)=>{"use strict";Z();var t=mt().fromCallback,n=Ie(),i=he("path"),c=Rt(),a=vr().pathExists;function o(f,l,h,u){typeof h=="function"&&(u=h,h="utf8");let d=i.dirname(f);a(d,(p,y)=>{if(p)return u(p);if(y)return n.writeFile(f,l,h,u);c.mkdirs(d,b=>{if(b)return u(b);n.writeFile(f,l,h,u)})})}function s(f,...l){let h=i.dirname(f);if(n.existsSync(h))return n.writeFileSync(f,...l);c.mkdirsSync(h),n.writeFileSync(f,...l)}r.exports={outputFile:t(o),outputFileSync:s}}),bv=te((e,r)=>{"use strict";Z();var{stringify:t}=Wo(),{outputFile:n}=Vo();async function i(c,a,o={}){let s=t(a,o);await n(c,s,o)}r.exports=i}),vv=te((e,r)=>{"use strict";Z();var{stringify:t}=Wo(),{outputFileSync:n}=Vo();function i(c,a,o){let s=t(a,o);n(c,s,o)}r.exports=i}),_v=te((e,r)=>{"use strict";Z();var t=mt().fromPromise,n=gv();n.outputJson=t(bv()),n.outputJsonSync=vv(),n.outputJSON=n.outputJson,n.outputJSONSync=n.outputJsonSync,n.writeJSON=n.writeJson,n.writeJSONSync=n.writeJsonSync,n.readJSON=n.readJson,n.readJSONSync=n.readJsonSync,r.exports=n}),wv=te((e,r)=>{"use strict";Z();var t=Ie(),n=he("path"),i=zo().copy,c=Li().remove,a=Rt().mkdirp,o=vr().pathExists,s=qr();function f(p,y,b,_){typeof b=="function"&&(_=b,b={}),b=b||{};let g=b.overwrite||b.clobber||!1;s.checkPaths(p,y,"move",b,(S,E)=>{if(S)return _(S);let{srcStat:v,isChangingCase:m=!1}=E;s.checkParentPaths(p,v,y,"move",w=>{if(w)return _(w);if(l(y))return h(p,y,g,m,_);a(n.dirname(y),x=>x?_(x):h(p,y,g,m,_))})})}function l(p){let y=n.dirname(p);return n.parse(y).root===y}function h(p,y,b,_,g){if(_)return u(p,y,b,g);if(b)return c(y,S=>S?g(S):u(p,y,b,g));o(y,(S,E)=>S?g(S):E?g(new Error("dest already exists.")):u(p,y,b,g))}function u(p,y,b,_){t.rename(p,y,g=>g?g.code!=="EXDEV"?_(g):d(p,y,b,_):_())}function d(p,y,b,_){i(p,y,{overwrite:b,errorOnExist:!0,preserveTimestamps:!0},g=>g?_(g):c(p,_))}r.exports=f}),Ev=te((e,r)=>{"use strict";Z();var t=Ie(),n=he("path"),i=zo().copySync,c=Li().removeSync,a=Rt().mkdirpSync,o=qr();function s(d,p,y){y=y||{};let b=y.overwrite||y.clobber||!1,{srcStat:_,isChangingCase:g=!1}=o.checkPathsSync(d,p,"move",y);return o.checkParentPathsSync(d,_,p,"move"),f(p)||a(n.dirname(p)),l(d,p,b,g)}function f(d){let p=n.dirname(d);return n.parse(p).root===p}function l(d,p,y,b){if(b)return h(d,p,y);if(y)return c(p),h(d,p,y);if(t.existsSync(p))throw new Error("dest already exists.");return h(d,p,y)}function h(d,p,y){try{t.renameSync(d,p)}catch(b){if(b.code!=="EXDEV")throw b;return u(d,p,y)}}function u(d,p,y){return i(d,p,{overwrite:y,errorOnExist:!0,preserveTimestamps:!0}),c(d)}r.exports=s}),Sv=te((e,r)=>{"use strict";Z();var t=mt().fromCallback;r.exports={move:t(wv()),moveSync:Ev()}}),Jt=te((e,r)=>{"use strict";Z(),r.exports={...Hr(),...zo(),...lv(),...mv(),..._v(),...Rt(),...Sv(),...Vo(),...vr(),...Li()}});Z();var xv=Ne(Jt()),Av=[".DS_Store",".git",".gitattributes",".gitignore",".gitlab-ci.yml",".hg",".hgcheck",".hgignore",".idea",".npmignore",".travis.yml","LICENSE","Thumbs.db","docs","mkdocs.yml","npm-debug.log","yarn-debug.log","yarn-error.log","yarnrc.yml",".yarn"];function Hn(e){let r=xv.default.readdirSync(e).filter(t=>!Av.includes(t)).filter(t=>!/\.iml$/.test(t));return{isEmpty:r.length===0,conflicts:r}}Z();var Yo=Ne(Jt());async function Ko(e){try{return await Yo.default.access(e,(Yo.default.constants||Yo.default).W_OK),!0}catch{return!1}}var Ur=qe(require("path"),1),Cv=te((e,r)=>{Z();function t(n,i){typeof i=="boolean"&&(i={forever:i}),this._originalTimeouts=JSON.parse(JSON.stringify(n)),this._timeouts=n,this._options=i||{},this._maxRetryTime=i&&i.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}r.exports=t,t.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},t.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},t.prototype.retry=function(n){if(this._timeout&&clearTimeout(this._timeout),!n)return!1;var i=new Date().getTime();if(n&&i-this._operationStart>=this._maxRetryTime)return this._errors.push(n),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(n);var c=this._timeouts.shift();if(c===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),c=this._cachedTimeouts.slice(-1);else return!1;var a=this;return this._timer=setTimeout(function(){a._attempts++,a._operationTimeoutCb&&(a._timeout=setTimeout(function(){a._operationTimeoutCb(a._attempts)},a._operationTimeout),a._options.unref&&a._timeout.unref()),a._fn(a._attempts)},c),this._options.unref&&this._timer.unref(),!0},t.prototype.attempt=function(n,i){this._fn=n,i&&(i.timeout&&(this._operationTimeout=i.timeout),i.cb&&(this._operationTimeoutCb=i.cb));var c=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){c._operationTimeoutCb()},c._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},t.prototype.try=function(n){console.log("Using RetryOperation.try() is deprecated"),this.attempt(n)},t.prototype.start=function(n){console.log("Using RetryOperation.start() is deprecated"),this.attempt(n)},t.prototype.start=t.prototype.try,t.prototype.errors=function(){return this._errors},t.prototype.attempts=function(){return this._attempts},t.prototype.mainError=function(){if(this._errors.length===0)return null;for(var n={},i=null,c=0,a=0;a<this._errors.length;a++){var o=this._errors[a],s=o.message,f=(n[s]||0)+1;n[s]=f,f>=c&&(i=o,c=f)}return i}}),kv=te(e=>{Z();var r=Cv();e.operation=function(t){var n=e.timeouts(t);return new r(n,{forever:t&&(t.forever||t.retries===1/0),unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})},e.timeouts=function(t){if(t instanceof Array)return[].concat(t);var n={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var i in t)n[i]=t[i];if(n.minTimeout>n.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var c=[],a=0;a<n.retries;a++)c.push(this.createTimeout(a,n));return t&&t.forever&&!c.length&&c.push(this.createTimeout(a,n)),c.sort(function(o,s){return o-s}),c},e.createTimeout=function(t,n){var i=n.randomize?Math.random()+1:1,c=Math.round(i*Math.max(n.minTimeout,1)*Math.pow(n.factor,t));return c=Math.min(c,n.maxTimeout),c},e.wrap=function(t,n,i){if(n instanceof Array&&(i=n,n=null),!i){i=[];for(var c in t)typeof t[c]=="function"&&i.push(c)}for(var a=0;a<i.length;a++){var o=i[a],s=t[o];t[o]=function(f){var l=e.operation(n),h=Array.prototype.slice.call(arguments,1),u=h.pop();h.push(function(d){l.retry(d)||(d&&(arguments[0]=l.mainError()),u.apply(this,arguments))}),l.attempt(function(){f.apply(t,h)})}.bind(t,s),t[o].options=n}}}),Dv=te((e,r)=>{Z(),r.exports=kv()}),Rv=te((e,r)=>{Z();var t=Dv();function n(i,c){function a(o,s){var f=c||{},l;"randomize"in f||(f.randomize=!0),l=t.operation(f);function h(p){s(p||new Error("Aborted"))}function u(p,y){if(p.bail){h(p);return}l.retry(p)?f.onRetry&&f.onRetry(p,y):s(l.mainError())}function d(p){var y;try{y=i(h,p)}catch(b){u(b,p);return}Promise.resolve(y).then(o).catch(function(b){u(b,p)})}l.attempt(d)}return new Promise(a)}r.exports=n});Z();Z();var ef=Ne(Rv()),er=Ne(br()),Xo=Ne(Jt()),Ov=class extends Error{};async function Zo({appPath:e,example:r,isDefaultExample:t,examplePath:n}){let i,c;if(t)i={username:"vercel",name:"turbo",branch:"main",filePath:"examples/basic"};else{try{c=new URL(r)}catch(_){_.code!=="ERR_INVALID_URL"&&(Ct(_),process.exit(1))}c?(c.origin!=="https://github.com"&&(Ct(`Invalid URL: ${er.default.red(`"${r}"`)}. Only GitHub repositories are supported. Please use a GitHub URL and try again.`),process.exit(1)),i=await $o(c,n),i||(Ct(`Unable to fetch repository information from: ${er.default.red(`"${r}"`)}. Please fix the URL and try again.`),process.exit(1)),await Ho(i)||(Ct(`Could not locate the repository for ${er.default.red(`"${r}"`)}. Please check that the repository exists and try again.`),process.exit(1))):await qo(r)||(Ct(`Could not locate an example named ${er.default.red(`"${r}"`)}. It could be due to the following:
147
147
  `,`1. Your spelling of example ${er.default.red(`"${r}"`)} might be incorrect.
148
- `,"2. You might not be connected to the internet or you are behind a proxy."),process.exit(1));let a=Ur.default.resolve(e);await Ko(Ur.default.dirname(a))||(Ct("The application path is not writable, please check folder permissions and try again."),Ct("It is likely you do not have write permissions for this folder."),process.exit(1));let o=Ur.default.basename(a);try{await Xo.default.mkdir(a,{recursive:!0})}catch(_){Ct("Unable to create project directory"),console.error(_),process.exit(1)}let{isEmpty:s,conflicts:f}=Hn(a);s||(Ct(`${er.default.dim(a)} has ${f.length} conflicting ${f.length===1?"file":"files"} - please try a different location`),process.exit(1));let l=process.cwd();process.chdir(a);let h=Oo("Downloading files...");try{i?(console.log(`
148
+ `,"2. You might not be connected to the internet or you are behind a proxy."),process.exit(1))}let a=Ur.default.resolve(e);await Ko(Ur.default.dirname(a))||(Ct("The application path is not writable, please check folder permissions and try again."),Ct("It is likely you do not have write permissions for this folder."),process.exit(1));let o=Ur.default.basename(a);try{await Xo.default.mkdir(a,{recursive:!0})}catch(_){Ct("Unable to create project directory"),console.error(_),process.exit(1)}let{isEmpty:s,conflicts:f}=Hn(a);s||(Ct(`${er.default.dim(a)} has ${f.length} conflicting ${f.length===1?"file":"files"} - please try a different location`),process.exit(1));let l=process.cwd();process.chdir(a);let h=Oo("Downloading files...");try{i?(console.log(`
149
149
  Downloading files from repo ${er.default.cyan(r)}. This might take a moment.`),console.log(),h.start(),await(0,ef.default)(()=>Uo(a,i),{retries:3})):(console.log(`
150
150
  Downloading files${t?"":` for example ${er.default.cyan(r)}`}. This might take a moment.`),console.log(),h.start(),await(0,ef.default)(()=>Go(a,r),{retries:3}))}catch(_){let g=function(S){return typeof S=="object"&&S!==null&&typeof S.message=="string"};var u=g;throw new Ov(g(_)?_.message:_+"")}finally{h.stop()}let d=Ur.default.join(a,"package.json"),p=Xo.default.existsSync(d),y=[];if(p){let _;try{_=Xo.default.readJsonSync(d)}catch{}_&&y.push(...Object.keys(_.scripts||{}))}let b=e;return Ur.default.join(l,o)===e&&(b=o),{cdPath:b,hasPackageJson:p,availableScripts:y,repoInfo:i}}var nf=qe(require("os"),1),Tv=te((e,r)=>{Z(),r.exports=c,c.sync=a;var t=he("fs");function n(o,s){var f=s.pathExt!==void 0?s.pathExt:process.env.PATHEXT;if(!f||(f=f.split(";"),f.indexOf("")!==-1))return!0;for(var l=0;l<f.length;l++){var h=f[l].toLowerCase();if(h&&o.substr(-h.length).toLowerCase()===h)return!0}return!1}function i(o,s,f){return!o.isSymbolicLink()&&!o.isFile()?!1:n(s,f)}function c(o,s,f){t.stat(o,function(l,h){f(l,l?!1:i(h,o,s))})}function a(o,s){return i(t.statSync(o),o,s)}}),Fv=te((e,r)=>{Z(),r.exports=n,n.sync=i;var t=he("fs");function n(o,s,f){t.stat(o,function(l,h){f(l,l?!1:c(h,s))})}function i(o,s){return c(t.statSync(o),s)}function c(o,s){return o.isFile()&&a(o,s)}function a(o,s){var f=o.mode,l=o.uid,h=o.gid,u=s.uid!==void 0?s.uid:process.getuid&&process.getuid(),d=s.gid!==void 0?s.gid:process.getgid&&process.getgid(),p=parseInt("100",8),y=parseInt("010",8),b=parseInt("001",8),_=p|y,g=f&b||f&y&&h===d||f&p&&l===u||f&_&&u===0;return g}}),Pv=te((e,r)=>{Z();var t=he("fs"),n;process.platform==="win32"||global.TESTING_WINDOWS?n=Tv():n=Fv(),r.exports=i,i.sync=c;function i(a,o,s){if(typeof o=="function"&&(s=o,o={}),!s){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(f,l){i(a,o||{},function(h,u){h?l(h):f(u)})})}n(a,o||{},function(f,l){f&&(f.code==="EACCES"||o&&o.ignoreErrors)&&(f=null,l=!1),s(f,l)})}function c(a,o){try{return n.sync(a,o||{})}catch(s){if(o&&o.ignoreErrors||s.code==="EACCES")return!1;throw s}}}),Bv=te((e,r)=>{Z();var t=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",n=he("path"),i=t?";":":",c=Pv(),a=l=>Object.assign(new Error(`not found: ${l}`),{code:"ENOENT"}),o=(l,h)=>{let u=h.colon||i,d=l.match(/\//)||t&&l.match(/\\/)?[""]:[...t?[process.cwd()]:[],...(h.path||process.env.PATH||"").split(u)],p=t?h.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",y=t?p.split(u):[""];return t&&l.indexOf(".")!==-1&&y[0]!==""&&y.unshift(""),{pathEnv:d,pathExt:y,pathExtExe:p}},s=(l,h,u)=>{typeof h=="function"&&(u=h,h={}),h||(h={});let{pathEnv:d,pathExt:p,pathExtExe:y}=o(l,h),b=[],_=S=>new Promise((E,v)=>{if(S===d.length)return h.all&&b.length?E(b):v(a(l));let m=d[S],w=/^".*"$/.test(m)?m.slice(1,-1):m,x=n.join(w,l),A=!w&&/^\.[\\\/]/.test(l)?l.slice(0,2)+x:x;E(g(A,S,0))}),g=(S,E,v)=>new Promise((m,w)=>{if(v===p.length)return m(_(E+1));let x=p[v];c(S+x,{pathExt:y},(A,R)=>{if(!A&&R)if(h.all)b.push(S+x);else return m(S+x);return m(g(S,E,v+1))})});return u?_(0).then(S=>u(null,S),u):_(0)},f=(l,h)=>{h=h||{};let{pathEnv:u,pathExt:d,pathExtExe:p}=o(l,h),y=[];for(let b=0;b<u.length;b++){let _=u[b],g=/^".*"$/.test(_)?_.slice(1,-1):_,S=n.join(g,l),E=!g&&/^\.[\\\/]/.test(l)?l.slice(0,2)+S:S;for(let v=0;v<d.length;v++){let m=E+d[v];try{if(c.sync(m,{pathExt:p}))if(h.all)y.push(m);else return m}catch{}}}if(h.all&&y.length)return y;if(h.nothrow)return null;throw a(l)};r.exports=s,s.sync=f}),tf=te((e,r)=>{"use strict";Z();var t=(n={})=>{let i=n.env||process.env;return(n.platform||process.platform)!=="win32"?"PATH":Object.keys(i).reverse().find(c=>c.toUpperCase()==="PATH")||"Path"};r.exports=t,r.exports.default=t}),Iv=te((e,r)=>{"use strict";Z();var t=he("path"),n=Bv(),i=tf();function c(o,s){let f=o.options.env||process.env,l=process.cwd(),h=o.options.cwd!=null,u=h&&process.chdir!==void 0&&!process.chdir.disabled;if(u)try{process.chdir(o.options.cwd)}catch{}let d;try{d=n.sync(o.command,{path:f[i({env:f})],pathExt:s?t.delimiter:void 0})}catch{}finally{u&&process.chdir(l)}return d&&(d=t.resolve(h?o.options.cwd:"",d)),d}function a(o){return c(o)||c(o,!0)}r.exports=a}),Lv=te((e,r)=>{"use strict";Z();var t=/([()\][%!^"`<>&|;, *?])/g;function n(c){return c=c.replace(t,"^$1"),c}function i(c,a){return c=`${c}`,c=c.replace(/(\\*)"/g,'$1$1\\"'),c=c.replace(/(\\*)$/,"$1$1"),c=`"${c}"`,c=c.replace(t,"^$1"),a&&(c=c.replace(t,"^$1")),c}r.exports.command=n,r.exports.argument=i}),Mv=te((e,r)=>{"use strict";Z(),r.exports=/^#!(.*)/}),Nv=te((e,r)=>{"use strict";Z();var t=Mv();r.exports=(n="")=>{let i=n.match(t);if(!i)return null;let[c,a]=i[0].replace(/#! ?/,"").split(" "),o=c.split("/").pop();return o==="env"?a:a?`${o} ${a}`:o}}),jv=te((e,r)=>{"use strict";Z();var t=he("fs"),n=Nv();function i(c){let a=Buffer.alloc(150),o;try{o=t.openSync(c,"r"),t.readSync(o,a,0,150,0),t.closeSync(o)}catch{}return n(a.toString())}r.exports=i}),$v=te((e,r)=>{"use strict";Z();var t=he("path"),n=Iv(),i=Lv(),c=jv(),a=process.platform==="win32",o=/\.(?:com|exe)$/i,s=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function f(u){u.file=n(u);let d=u.file&&c(u.file);return d?(u.args.unshift(u.file),u.command=d,n(u)):u.file}function l(u){if(!a)return u;let d=f(u),p=!o.test(d);if(u.options.forceShell||p){let y=s.test(d);u.command=t.normalize(u.command),u.command=i.command(u.command),u.args=u.args.map(_=>i.argument(_,y));let b=[u.command].concat(u.args).join(" ");u.args=["/d","/s","/c",`"${b}"`],u.command=process.env.comspec||"cmd.exe",u.options.windowsVerbatimArguments=!0}return u}function h(u,d,p){d&&!Array.isArray(d)&&(p=d,d=null),d=d?d.slice(0):[],p=Object.assign({},p);let y={command:u,args:d,options:p,file:void 0,original:{command:u,args:d}};return p.shell?y:l(y)}r.exports=h}),Hv=te((e,r)=>{"use strict";Z();var t=process.platform==="win32";function n(o,s){return Object.assign(new Error(`${s} ${o.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${s} ${o.command}`,path:o.command,spawnargs:o.args})}function i(o,s){if(!t)return;let f=o.emit;o.emit=function(l,h){if(l==="exit"){let u=c(h,s,"spawn");if(u)return f.call(o,"error",u)}return f.apply(o,arguments)}}function c(o,s){return t&&o===1&&!s.file?n(s.original,"spawn"):null}function a(o,s){return t&&o===1&&!s.file?n(s.original,"spawnSync"):null}r.exports={hookChildProcess:i,verifyENOENT:c,verifyENOENTSync:a,notFoundError:n}}),qv=te((e,r)=>{"use strict";Z();var t=he("child_process"),n=$v(),i=Hv();function c(o,s,f){let l=n(o,s,f),h=t.spawn(l.command,l.args,l.options);return i.hookChildProcess(h,l),h}function a(o,s,f){let l=n(o,s,f),h=t.spawnSync(l.command,l.args,l.options);return h.error=h.error||i.verifyENOENTSync(h.status,l),h}r.exports=c,r.exports.spawn=c,r.exports.sync=a,r.exports._parse=n,r.exports._enoent=i}),Uv=te((e,r)=>{"use strict";Z(),r.exports=t=>{let n=typeof t=="string"?`
151
151
  `:`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-turbo",
3
- "version": "1.9.6",
3
+ "version": "1.9.7",
4
4
  "description": "Create a new Turborepo",
5
5
  "homepage": "https://turbo.build/repo",
6
6
  "license": "MPL-2.0",
@@ -28,7 +28,7 @@
28
28
  "@turbo/test-utils": "0.0.0",
29
29
  "@turbo/tsconfig": "0.0.0",
30
30
  "@turbo/utils": "0.0.0",
31
- "@turbo/workspaces": "1.9.6",
31
+ "@turbo/workspaces": "1.9.7",
32
32
  "@types/fs-extra": "^9.0.13",
33
33
  "@types/inquirer": "^7.3.1",
34
34
  "@types/jest": "^27.4.0",