rescript-relay
Version:
Use Relay with ReScript.
2 lines • 8.82 MB
JavaScript
#!/usr/bin/env node
(()=>{var pT={3803:(pT,xT,OT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});xT.createFileSystemAdapter=xT.FILE_SYSTEM_ADAPTER=void 0;const BE=OT(7147);xT.FILE_SYSTEM_ADAPTER={lstat:BE.lstat,stat:BE.stat,lstatSync:BE.lstatSync,statSync:BE.statSync,readdir:BE.readdir,readdirSync:BE.readdirSync};function createFileSystemAdapter(pT){if(pT===undefined){return xT.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},xT.FILE_SYSTEM_ADAPTER),pT)}xT.createFileSystemAdapter=createFileSystemAdapter},8838:(pT,xT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});xT.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const OT=process.versions.node.split(".");if(OT[0]===undefined||OT[1]===undefined){throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`)}const BE=Number.parseInt(OT[0],10);const LE=Number.parseInt(OT[1],10);const RE=10;const ME=10;const jE=BE>RE;const VE=BE===RE&&LE>=ME;xT.IS_SUPPORT_READDIR_WITH_FILE_TYPES=jE||VE},5667:(pT,xT,OT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});xT.Settings=xT.scandirSync=xT.scandir=void 0;const BE=OT(4507);const LE=OT(9560);const RE=OT(8662);xT.Settings=RE.default;function scandir(pT,xT,OT){if(typeof xT==="function"){BE.read(pT,getSettings(),xT);return}BE.read(pT,getSettings(xT),OT)}xT.scandir=scandir;function scandirSync(pT,xT){const OT=getSettings(xT);return LE.read(pT,OT)}xT.scandirSync=scandirSync;function getSettings(pT={}){if(pT instanceof RE.default){return pT}return new RE.default(pT)}},4507:(pT,xT,OT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});xT.readdir=xT.readdirWithFileTypes=xT.read=void 0;const BE=OT(109);const LE=OT(5288);const RE=OT(8838);const ME=OT(6297);const jE=OT(3847);function read(pT,xT,OT){if(!xT.stats&&RE.IS_SUPPORT_READDIR_WITH_FILE_TYPES){readdirWithFileTypes(pT,xT,OT);return}readdir(pT,xT,OT)}xT.read=read;function readdirWithFileTypes(pT,xT,OT){xT.fs.readdir(pT,{withFileTypes:true},((BE,RE)=>{if(BE!==null){callFailureCallback(OT,BE);return}const ME=RE.map((OT=>({dirent:OT,name:OT.name,path:jE.joinPathSegments(pT,OT.name,xT.pathSegmentSeparator)})));if(!xT.followSymbolicLinks){callSuccessCallback(OT,ME);return}const VE=ME.map((pT=>makeRplTaskEntry(pT,xT)));LE(VE,((pT,xT)=>{if(pT!==null){callFailureCallback(OT,pT);return}callSuccessCallback(OT,xT)}))}))}xT.readdirWithFileTypes=readdirWithFileTypes;function makeRplTaskEntry(pT,xT){return OT=>{if(!pT.dirent.isSymbolicLink()){OT(null,pT);return}xT.fs.stat(pT.path,((BE,LE)=>{if(BE!==null){if(xT.throwErrorOnBrokenSymbolicLink){OT(BE);return}OT(null,pT);return}pT.dirent=ME.fs.createDirentFromStats(pT.name,LE);OT(null,pT)}))}}function readdir(pT,xT,OT){xT.fs.readdir(pT,((RE,VE)=>{if(RE!==null){callFailureCallback(OT,RE);return}const UE=VE.map((OT=>{const LE=jE.joinPathSegments(pT,OT,xT.pathSegmentSeparator);return pT=>{BE.stat(LE,xT.fsStatSettings,((BE,RE)=>{if(BE!==null){pT(BE);return}const jE={name:OT,path:LE,dirent:ME.fs.createDirentFromStats(OT,RE)};if(xT.stats){jE.stats=RE}pT(null,jE)}))}}));LE(UE,((pT,xT)=>{if(pT!==null){callFailureCallback(OT,pT);return}callSuccessCallback(OT,xT)}))}))}xT.readdir=readdir;function callFailureCallback(pT,xT){pT(xT)}function callSuccessCallback(pT,xT){pT(null,xT)}},3847:(pT,xT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});xT.joinPathSegments=void 0;function joinPathSegments(pT,xT,OT){if(pT.endsWith(OT)){return pT+xT}return pT+OT+xT}xT.joinPathSegments=joinPathSegments},9560:(pT,xT,OT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});xT.readdir=xT.readdirWithFileTypes=xT.read=void 0;const BE=OT(109);const LE=OT(8838);const RE=OT(6297);const ME=OT(3847);function read(pT,xT){if(!xT.stats&&LE.IS_SUPPORT_READDIR_WITH_FILE_TYPES){return readdirWithFileTypes(pT,xT)}return readdir(pT,xT)}xT.read=read;function readdirWithFileTypes(pT,xT){const OT=xT.fs.readdirSync(pT,{withFileTypes:true});return OT.map((OT=>{const BE={dirent:OT,name:OT.name,path:ME.joinPathSegments(pT,OT.name,xT.pathSegmentSeparator)};if(BE.dirent.isSymbolicLink()&&xT.followSymbolicLinks){try{const pT=xT.fs.statSync(BE.path);BE.dirent=RE.fs.createDirentFromStats(BE.name,pT)}catch(pT){if(xT.throwErrorOnBrokenSymbolicLink){throw pT}}}return BE}))}xT.readdirWithFileTypes=readdirWithFileTypes;function readdir(pT,xT){const OT=xT.fs.readdirSync(pT);return OT.map((OT=>{const LE=ME.joinPathSegments(pT,OT,xT.pathSegmentSeparator);const jE=BE.statSync(LE,xT.fsStatSettings);const VE={name:OT,path:LE,dirent:RE.fs.createDirentFromStats(OT,jE)};if(xT.stats){VE.stats=jE}return VE}))}xT.readdir=readdir},8662:(pT,xT,OT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});const BE=OT(1017);const LE=OT(109);const RE=OT(3803);class Settings{constructor(pT={}){this._options=pT;this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,false);this.fs=RE.createFileSystemAdapter(this._options.fs);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,BE.sep);this.stats=this._getValue(this._options.stats,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true);this.fsStatSettings=new LE.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(pT,xT){return pT!==null&&pT!==void 0?pT:xT}}xT["default"]=Settings},883:(pT,xT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});xT.createDirentFromStats=void 0;class DirentFromStats{constructor(pT,xT){this.name=pT;this.isBlockDevice=xT.isBlockDevice.bind(xT);this.isCharacterDevice=xT.isCharacterDevice.bind(xT);this.isDirectory=xT.isDirectory.bind(xT);this.isFIFO=xT.isFIFO.bind(xT);this.isFile=xT.isFile.bind(xT);this.isSocket=xT.isSocket.bind(xT);this.isSymbolicLink=xT.isSymbolicLink.bind(xT)}}function createDirentFromStats(pT,xT){return new DirentFromStats(pT,xT)}xT.createDirentFromStats=createDirentFromStats},6297:(pT,xT,OT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});xT.fs=void 0;const BE=OT(883);xT.fs=BE},2987:(pT,xT,OT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});xT.createFileSystemAdapter=xT.FILE_SYSTEM_ADAPTER=void 0;const BE=OT(7147);xT.FILE_SYSTEM_ADAPTER={lstat:BE.lstat,stat:BE.stat,lstatSync:BE.lstatSync,statSync:BE.statSync};function createFileSystemAdapter(pT){if(pT===undefined){return xT.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},xT.FILE_SYSTEM_ADAPTER),pT)}xT.createFileSystemAdapter=createFileSystemAdapter},109:(pT,xT,OT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});xT.statSync=xT.stat=xT.Settings=void 0;const BE=OT(4147);const LE=OT(4527);const RE=OT(2410);xT.Settings=RE.default;function stat(pT,xT,OT){if(typeof xT==="function"){BE.read(pT,getSettings(),xT);return}BE.read(pT,getSettings(xT),OT)}xT.stat=stat;function statSync(pT,xT){const OT=getSettings(xT);return LE.read(pT,OT)}xT.statSync=statSync;function getSettings(pT={}){if(pT instanceof RE.default){return pT}return new RE.default(pT)}},4147:(pT,xT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});xT.read=void 0;function read(pT,xT,OT){xT.fs.lstat(pT,((BE,LE)=>{if(BE!==null){callFailureCallback(OT,BE);return}if(!LE.isSymbolicLink()||!xT.followSymbolicLink){callSuccessCallback(OT,LE);return}xT.fs.stat(pT,((pT,BE)=>{if(pT!==null){if(xT.throwErrorOnBrokenSymbolicLink){callFailureCallback(OT,pT);return}callSuccessCallback(OT,LE);return}if(xT.markSymbolicLink){BE.isSymbolicLink=()=>true}callSuccessCallback(OT,BE)}))}))}xT.read=read;function callFailureCallback(pT,xT){pT(xT)}function callSuccessCallback(pT,xT){pT(null,xT)}},4527:(pT,xT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});xT.read=void 0;function read(pT,xT){const OT=xT.fs.lstatSync(pT);if(!OT.isSymbolicLink()||!xT.followSymbolicLink){return OT}try{const OT=xT.fs.statSync(pT);if(xT.markSymbolicLink){OT.isSymbolicLink=()=>true}return OT}catch(pT){if(!xT.throwErrorOnBrokenSymbolicLink){return OT}throw pT}}xT.read=read},2410:(pT,xT,OT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});const BE=OT(2987);class Settings{constructor(pT={}){this._options=pT;this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,true);this.fs=BE.createFileSystemAdapter(this._options.fs);this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true)}_getValue(pT,xT){return pT!==null&&pT!==void 0?pT:xT}}xT["default"]=Settings},6026:(pT,xT,OT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});xT.Settings=xT.walkStream=xT.walkSync=xT.walk=void 0;const BE=OT(7523);const LE=OT(6737);const RE=OT(3068);const ME=OT(141);xT.Settings=ME.default;function walk(pT,xT,OT){if(typeof xT==="function"){new BE.default(pT,getSettings()).read(xT);return}new BE.default(pT,getSettings(xT)).read(OT)}xT.walk=walk;function walkSync(pT,xT){const OT=getSettings(xT);const BE=new RE.default(pT,OT);return BE.read()}xT.walkSync=walkSync;function walkStream(pT,xT){const OT=getSettings(xT);const BE=new LE.default(pT,OT);return BE.read()}xT.walkStream=walkStream;function getSettings(pT={}){if(pT instanceof ME.default){return pT}return new ME.default(pT)}},7523:(pT,xT,OT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});const BE=OT(5732);class AsyncProvider{constructor(pT,xT){this._root=pT;this._settings=xT;this._reader=new BE.default(this._root,this._settings);this._storage=new Set}read(pT){this._reader.onError((xT=>{callFailureCallback(pT,xT)}));this._reader.onEntry((pT=>{this._storage.add(pT)}));this._reader.onEnd((()=>{callSuccessCallback(pT,[...this._storage])}));this._reader.read()}}xT["default"]=AsyncProvider;function callFailureCallback(pT,xT){pT(xT)}function callSuccessCallback(pT,xT){pT(null,xT)}},6737:(pT,xT,OT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});const BE=OT(2781);const LE=OT(5732);class StreamProvider{constructor(pT,xT){this._root=pT;this._settings=xT;this._reader=new LE.default(this._root,this._settings);this._stream=new BE.Readable({objectMode:true,read:()=>{},destroy:()=>{if(!this._reader.isDestroyed){this._reader.destroy()}}})}read(){this._reader.onError((pT=>{this._stream.emit("error",pT)}));this._reader.onEntry((pT=>{this._stream.push(pT)}));this._reader.onEnd((()=>{this._stream.push(null)}));this._reader.read();return this._stream}}xT["default"]=StreamProvider},3068:(pT,xT,OT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});const BE=OT(3595);class SyncProvider{constructor(pT,xT){this._root=pT;this._settings=xT;this._reader=new BE.default(this._root,this._settings)}read(){return this._reader.read()}}xT["default"]=SyncProvider},5732:(pT,xT,OT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});const BE=OT(2361);const LE=OT(5667);const RE=OT(7340);const ME=OT(7988);const jE=OT(8311);class AsyncReader extends jE.default{constructor(pT,xT){super(pT,xT);this._settings=xT;this._scandir=LE.scandir;this._emitter=new BE.EventEmitter;this._queue=RE(this._worker.bind(this),this._settings.concurrency);this._isFatalError=false;this._isDestroyed=false;this._queue.drain=()=>{if(!this._isFatalError){this._emitter.emit("end")}}}read(){this._isFatalError=false;this._isDestroyed=false;setImmediate((()=>{this._pushToQueue(this._root,this._settings.basePath)}));return this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed){throw new Error("The reader is already destroyed")}this._isDestroyed=true;this._queue.killAndDrain()}onEntry(pT){this._emitter.on("entry",pT)}onError(pT){this._emitter.once("error",pT)}onEnd(pT){this._emitter.once("end",pT)}_pushToQueue(pT,xT){const OT={directory:pT,base:xT};this._queue.push(OT,(pT=>{if(pT!==null){this._handleError(pT)}}))}_worker(pT,xT){this._scandir(pT.directory,this._settings.fsScandirSettings,((OT,BE)=>{if(OT!==null){xT(OT,undefined);return}for(const xT of BE){this._handleEntry(xT,pT.base)}xT(null,undefined)}))}_handleError(pT){if(this._isDestroyed||!ME.isFatalError(this._settings,pT)){return}this._isFatalError=true;this._isDestroyed=true;this._emitter.emit("error",pT)}_handleEntry(pT,xT){if(this._isDestroyed||this._isFatalError){return}const OT=pT.path;if(xT!==undefined){pT.path=ME.joinPathSegments(xT,pT.name,this._settings.pathSegmentSeparator)}if(ME.isAppliedFilter(this._settings.entryFilter,pT)){this._emitEntry(pT)}if(pT.dirent.isDirectory()&&ME.isAppliedFilter(this._settings.deepFilter,pT)){this._pushToQueue(OT,pT.path)}}_emitEntry(pT){this._emitter.emit("entry",pT)}}xT["default"]=AsyncReader},7988:(pT,xT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});xT.joinPathSegments=xT.replacePathSegmentSeparator=xT.isAppliedFilter=xT.isFatalError=void 0;function isFatalError(pT,xT){if(pT.errorFilter===null){return true}return!pT.errorFilter(xT)}xT.isFatalError=isFatalError;function isAppliedFilter(pT,xT){return pT===null||pT(xT)}xT.isAppliedFilter=isAppliedFilter;function replacePathSegmentSeparator(pT,xT){return pT.split(/[/\\]/).join(xT)}xT.replacePathSegmentSeparator=replacePathSegmentSeparator;function joinPathSegments(pT,xT,OT){if(pT===""){return xT}if(pT.endsWith(OT)){return pT+xT}return pT+OT+xT}xT.joinPathSegments=joinPathSegments},8311:(pT,xT,OT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});const BE=OT(7988);class Reader{constructor(pT,xT){this._root=pT;this._settings=xT;this._root=BE.replacePathSegmentSeparator(pT,xT.pathSegmentSeparator)}}xT["default"]=Reader},3595:(pT,xT,OT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});const BE=OT(5667);const LE=OT(7988);const RE=OT(8311);class SyncReader extends RE.default{constructor(){super(...arguments);this._scandir=BE.scandirSync;this._storage=new Set;this._queue=new Set}read(){this._pushToQueue(this._root,this._settings.basePath);this._handleQueue();return[...this._storage]}_pushToQueue(pT,xT){this._queue.add({directory:pT,base:xT})}_handleQueue(){for(const pT of this._queue.values()){this._handleDirectory(pT.directory,pT.base)}}_handleDirectory(pT,xT){try{const OT=this._scandir(pT,this._settings.fsScandirSettings);for(const pT of OT){this._handleEntry(pT,xT)}}catch(pT){this._handleError(pT)}}_handleError(pT){if(!LE.isFatalError(this._settings,pT)){return}throw pT}_handleEntry(pT,xT){const OT=pT.path;if(xT!==undefined){pT.path=LE.joinPathSegments(xT,pT.name,this._settings.pathSegmentSeparator)}if(LE.isAppliedFilter(this._settings.entryFilter,pT)){this._pushToStorage(pT)}if(pT.dirent.isDirectory()&&LE.isAppliedFilter(this._settings.deepFilter,pT)){this._pushToQueue(OT,pT.path)}}_pushToStorage(pT){this._storage.add(pT)}}xT["default"]=SyncReader},141:(pT,xT,OT)=>{"use strict";Object.defineProperty(xT,"__esModule",{value:true});const BE=OT(1017);const LE=OT(5667);class Settings{constructor(pT={}){this._options=pT;this.basePath=this._getValue(this._options.basePath,undefined);this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY);this.deepFilter=this._getValue(this._options.deepFilter,null);this.entryFilter=this._getValue(this._options.entryFilter,null);this.errorFilter=this._getValue(this._options.errorFilter,null);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,BE.sep);this.fsScandirSettings=new LE.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(pT,xT){return pT!==null&&pT!==void 0?pT:xT}}xT["default"]=Settings},5063:pT=>{"use strict";pT.exports=({onlyFirst:pT=false}={})=>{const xT=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(xT,pT?undefined:"g")}},2068:(pT,xT,OT)=>{"use strict";pT=OT.nmd(pT);const wrapAnsi16=(pT,xT)=>(...OT)=>{const BE=pT(...OT);return`[${BE+xT}m`};const wrapAnsi256=(pT,xT)=>(...OT)=>{const BE=pT(...OT);return`[${38+xT};5;${BE}m`};const wrapAnsi16m=(pT,xT)=>(...OT)=>{const BE=pT(...OT);return`[${38+xT};2;${BE[0]};${BE[1]};${BE[2]}m`};const ansi2ansi=pT=>pT;const rgb2rgb=(pT,xT,OT)=>[pT,xT,OT];const setLazyProperty=(pT,xT,OT)=>{Object.defineProperty(pT,xT,{get:()=>{const BE=OT();Object.defineProperty(pT,xT,{value:BE,enumerable:true,configurable:true});return BE},enumerable:true,configurable:true})};let BE;const makeDynamicStyles=(pT,xT,LE,RE)=>{if(BE===undefined){BE=OT(6931)}const ME=RE?10:0;const jE={};for(const[OT,RE]of Object.entries(BE)){const BE=OT==="ansi16"?"ansi":OT;if(OT===xT){jE[BE]=pT(LE,ME)}else if(typeof RE==="object"){jE[BE]=pT(RE[xT],ME)}}return jE};function assembleStyles(){const pT=new Map;const xT={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]}};xT.color.gray=xT.color.blackBright;xT.bgColor.bgGray=xT.bgColor.bgBlackBright;xT.color.grey=xT.color.blackBright;xT.bgColor.bgGrey=xT.bgColor.bgBlackBright;for(const[OT,BE]of Object.entries(xT)){for(const[OT,LE]of Object.entries(BE)){xT[OT]={open:`[${LE[0]}m`,close:`[${LE[1]}m`};BE[OT]=xT[OT];pT.set(LE[0],LE[1])}Object.defineProperty(xT,OT,{value:BE,enumerable:false})}Object.defineProperty(xT,"codes",{value:pT,enumerable:false});xT.color.close="[39m";xT.bgColor.close="[49m";setLazyProperty(xT.color,"ansi",(()=>makeDynamicStyles(wrapAnsi16,"ansi16",ansi2ansi,false)));setLazyProperty(xT.color,"ansi256",(()=>makeDynamicStyles(wrapAnsi256,"ansi256",ansi2ansi,false)));setLazyProperty(xT.color,"ansi16m",(()=>makeDynamicStyles(wrapAnsi16m,"rgb",rgb2rgb,false)));setLazyProperty(xT.bgColor,"ansi",(()=>makeDynamicStyles(wrapAnsi16,"ansi16",ansi2ansi,true)));setLazyProperty(xT.bgColor,"ansi256",(()=>makeDynamicStyles(wrapAnsi256,"ansi256",ansi2ansi,true)));setLazyProperty(xT.bgColor,"ansi16m",(()=>makeDynamicStyles(wrapAnsi16m,"rgb",rgb2rgb,true)));return xT}Object.defineProperty(pT,"exports",{enumerable:true,get:assembleStyles})},3664:(pT,xT,OT)=>{"use strict";const{Buffer:BE}=OT(4300);const LE=Symbol.for("BufferList");function BufferList(pT){if(!(this instanceof BufferList)){return new BufferList(pT)}BufferList._init.call(this,pT)}BufferList._init=function _init(pT){Object.defineProperty(this,LE,{value:true});this._bufs=[];this.length=0;if(pT){this.append(pT)}};BufferList.prototype._new=function _new(pT){return new BufferList(pT)};BufferList.prototype._offset=function _offset(pT){if(pT===0){return[0,0]}let xT=0;for(let OT=0;OT<this._bufs.length;OT++){const BE=xT+this._bufs[OT].length;if(pT<BE||OT===this._bufs.length-1){return[OT,pT-xT]}xT=BE}};BufferList.prototype._reverseOffset=function(pT){const xT=pT[0];let OT=pT[1];for(let pT=0;pT<xT;pT++){OT+=this._bufs[pT].length}return OT};BufferList.prototype.get=function get(pT){if(pT>this.length||pT<0){return undefined}const xT=this._offset(pT);return this._bufs[xT[0]][xT[1]]};BufferList.prototype.slice=function slice(pT,xT){if(typeof pT==="number"&&pT<0){pT+=this.length}if(typeof xT==="number"&&xT<0){xT+=this.length}return this.copy(null,0,pT,xT)};BufferList.prototype.copy=function copy(pT,xT,OT,LE){if(typeof OT!=="number"||OT<0){OT=0}if(typeof LE!=="number"||LE>this.length){LE=this.length}if(OT>=this.length){return pT||BE.alloc(0)}if(LE<=0){return pT||BE.alloc(0)}const copy=!!pT;const RE=this._offset(OT);const ME=LE-OT;let jE=ME;let VE=copy&&xT||0;let UE=RE[1];if(OT===0&&LE===this.length){if(!copy){return this._bufs.length===1?this._bufs[0]:BE.concat(this._bufs,this.length)}for(let xT=0;xT<this._bufs.length;xT++){this._bufs[xT].copy(pT,VE);VE+=this._bufs[xT].length}return pT}if(jE<=this._bufs[RE[0]].length-UE){return copy?this._bufs[RE[0]].copy(pT,xT,UE,UE+jE):this._bufs[RE[0]].slice(UE,UE+jE)}if(!copy){pT=BE.allocUnsafe(ME)}for(let xT=RE[0];xT<this._bufs.length;xT++){const OT=this._bufs[xT].length-UE;if(jE>OT){this._bufs[xT].copy(pT,VE,UE);VE+=OT}else{this._bufs[xT].copy(pT,VE,UE,UE+jE);VE+=OT;break}jE-=OT;if(UE){UE=0}}if(pT.length>VE)return pT.slice(0,VE);return pT};BufferList.prototype.shallowSlice=function shallowSlice(pT,xT){pT=pT||0;xT=typeof xT!=="number"?this.length:xT;if(pT<0){pT+=this.length}if(xT<0){xT+=this.length}if(pT===xT){return this._new()}const OT=this._offset(pT);const BE=this._offset(xT);const LE=this._bufs.slice(OT[0],BE[0]+1);if(BE[1]===0){LE.pop()}else{LE[LE.length-1]=LE[LE.length-1].slice(0,BE[1])}if(OT[1]!==0){LE[0]=LE[0].slice(OT[1])}return this._new(LE)};BufferList.prototype.toString=function toString(pT,xT,OT){return this.slice(xT,OT).toString(pT)};BufferList.prototype.consume=function consume(pT){pT=Math.trunc(pT);if(Number.isNaN(pT)||pT<=0)return this;while(this._bufs.length){if(pT>=this._bufs[0].length){pT-=this._bufs[0].length;this.length-=this._bufs[0].length;this._bufs.shift()}else{this._bufs[0]=this._bufs[0].slice(pT);this.length-=pT;break}}return this};BufferList.prototype.duplicate=function duplicate(){const pT=this._new();for(let xT=0;xT<this._bufs.length;xT++){pT.append(this._bufs[xT])}return pT};BufferList.prototype.append=function append(pT){if(pT==null){return this}if(pT.buffer){this._appendBuffer(BE.from(pT.buffer,pT.byteOffset,pT.byteLength))}else if(Array.isArray(pT)){for(let xT=0;xT<pT.length;xT++){this.append(pT[xT])}}else if(this._isBufferList(pT)){for(let xT=0;xT<pT._bufs.length;xT++){this.append(pT._bufs[xT])}}else{if(typeof pT==="number"){pT=pT.toString()}this._appendBuffer(BE.from(pT))}return this};BufferList.prototype._appendBuffer=function appendBuffer(pT){this._bufs.push(pT);this.length+=pT.length};BufferList.prototype.indexOf=function(pT,xT,OT){if(OT===undefined&&typeof xT==="string"){OT=xT;xT=undefined}if(typeof pT==="function"||Array.isArray(pT)){throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.')}else if(typeof pT==="number"){pT=BE.from([pT])}else if(typeof pT==="string"){pT=BE.from(pT,OT)}else if(this._isBufferList(pT)){pT=pT.slice()}else if(Array.isArray(pT.buffer)){pT=BE.from(pT.buffer,pT.byteOffset,pT.byteLength)}else if(!BE.isBuffer(pT)){pT=BE.from(pT)}xT=Number(xT||0);if(isNaN(xT)){xT=0}if(xT<0){xT=this.length+xT}if(xT<0){xT=0}if(pT.length===0){return xT>this.length?this.length:xT}const LE=this._offset(xT);let RE=LE[0];let ME=LE[1];for(;RE<this._bufs.length;RE++){const xT=this._bufs[RE];while(ME<xT.length){const OT=xT.length-ME;if(OT>=pT.length){const OT=xT.indexOf(pT,ME);if(OT!==-1){return this._reverseOffset([RE,OT])}ME=xT.length-pT.length+1}else{const xT=this._reverseOffset([RE,ME]);if(this._match(xT,pT)){return xT}ME++}}ME=0}return-1};BufferList.prototype._match=function(pT,xT){if(this.length-pT<xT.length){return false}for(let OT=0;OT<xT.length;OT++){if(this.get(pT+OT)!==xT[OT]){return false}}return true};(function(){const pT={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(const xT in pT){(function(xT){if(pT[xT]===null){BufferList.prototype[xT]=function(pT,OT){return this.slice(pT,pT+OT)[xT](0,OT)}}else{BufferList.prototype[xT]=function(OT=0){return this.slice(OT,OT+pT[xT])[xT](0)}}})(xT)}})();BufferList.prototype._isBufferList=function _isBufferList(pT){return pT instanceof BufferList||BufferList.isBufferList(pT)};BufferList.isBufferList=function isBufferList(pT){return pT!=null&&pT[LE]};pT.exports=BufferList},336:(pT,xT,OT)=>{"use strict";const BE=OT(1642).Duplex;const LE=OT(4124);const RE=OT(3664);function BufferListStream(pT){if(!(this instanceof BufferListStream)){return new BufferListStream(pT)}if(typeof pT==="function"){this._callback=pT;const xT=function piper(pT){if(this._callback){this._callback(pT);this._callback=null}}.bind(this);this.on("pipe",(function onPipe(pT){pT.on("error",xT)}));this.on("unpipe",(function onUnpipe(pT){pT.removeListener("error",xT)}));pT=null}RE._init.call(this,pT);BE.call(this)}LE(BufferListStream,BE);Object.assign(BufferListStream.prototype,RE.prototype);BufferListStream.prototype._new=function _new(pT){return new BufferListStream(pT)};BufferListStream.prototype._write=function _write(pT,xT,OT){this._appendBuffer(pT);if(typeof OT==="function"){OT()}};BufferListStream.prototype._read=function _read(pT){if(!this.length){return this.push(null)}pT=Math.min(pT,this.length);this.push(this.slice(0,pT));this.consume(pT)};BufferListStream.prototype.end=function end(pT){BE.prototype.end.call(this,pT);if(this._callback){this._callback(null,this.slice());this._callback=null}};BufferListStream.prototype._destroy=function _destroy(pT,xT){this._bufs.length=0;this.length=0;xT(pT)};BufferListStream.prototype._isBufferList=function _isBufferList(pT){return pT instanceof BufferListStream||pT instanceof RE||BufferListStream.isBufferList(pT)};BufferListStream.isBufferList=RE.isBufferList;pT.exports=BufferListStream;pT.exports.BufferListStream=BufferListStream;pT.exports.BufferList=RE},610:(pT,xT,OT)=>{"use strict";const BE=OT(8750);const LE=OT(9434);const RE=OT(5873);const ME=OT(6477);const braces=(pT,xT={})=>{let OT=[];if(Array.isArray(pT)){for(const BE of pT){const pT=braces.create(BE,xT);if(Array.isArray(pT)){OT.push(...pT)}else{OT.push(pT)}}}else{OT=[].concat(braces.create(pT,xT))}if(xT&&xT.expand===true&&xT.nodupes===true){OT=[...new Set(OT)]}return OT};braces.parse=(pT,xT={})=>ME(pT,xT);braces.stringify=(pT,xT={})=>{if(typeof pT==="string"){return BE(braces.parse(pT,xT),xT)}return BE(pT,xT)};braces.compile=(pT,xT={})=>{if(typeof pT==="string"){pT=braces.parse(pT,xT)}return LE(pT,xT)};braces.expand=(pT,xT={})=>{if(typeof pT==="string"){pT=braces.parse(pT,xT)}let OT=RE(pT,xT);if(xT.noempty===true){OT=OT.filter(Boolean)}if(xT.nodupes===true){OT=[...new Set(OT)]}return OT};braces.create=(pT,xT={})=>{if(pT===""||pT.length<3){return[pT]}return xT.expand!==true?braces.compile(pT,xT):braces.expand(pT,xT)};pT.exports=braces},9434:(pT,xT,OT)=>{"use strict";const BE=OT(6330);const LE=OT(5207);const compile=(pT,xT={})=>{const walk=(pT,OT={})=>{const RE=LE.isInvalidBrace(OT);const ME=pT.invalid===true&&xT.escapeInvalid===true;const jE=RE===true||ME===true;const VE=xT.escapeInvalid===true?"\\":"";let UE="";if(pT.isOpen===true){return VE+pT.value}if(pT.isClose===true){console.log("node.isClose",VE,pT.value);return VE+pT.value}if(pT.type==="open"){return jE?VE+pT.value:"("}if(pT.type==="close"){return jE?VE+pT.value:")"}if(pT.type==="comma"){return pT.prev.type==="comma"?"":jE?pT.value:"|"}if(pT.value){return pT.value}if(pT.nodes&&pT.ranges>0){const OT=LE.reduce(pT.nodes);const RE=BE(...OT,{...xT,wrap:false,toRegex:true,strictZeros:true});if(RE.length!==0){return OT.length>1&&RE.length>1?`(${RE})`:RE}}if(pT.nodes){for(const xT of pT.nodes){UE+=walk(xT,pT)}}return UE};return walk(pT)};pT.exports=compile},8774:pT=>{"use strict";pT.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},5873:(pT,xT,OT)=>{"use strict";const BE=OT(6330);const LE=OT(8750);const RE=OT(5207);const append=(pT="",xT="",OT=false)=>{const BE=[];pT=[].concat(pT);xT=[].concat(xT);if(!xT.length)return pT;if(!pT.length){return OT?RE.flatten(xT).map((pT=>`{${pT}}`)):xT}for(const LE of pT){if(Array.isArray(LE)){for(const pT of LE){BE.push(append(pT,xT,OT))}}else{for(let pT of xT){if(OT===true&&typeof pT==="string")pT=`{${pT}}`;BE.push(Array.isArray(pT)?append(LE,pT,OT):LE+pT)}}}return RE.flatten(BE)};const expand=(pT,xT={})=>{const OT=xT.rangeLimit===undefined?1e3:xT.rangeLimit;const walk=(pT,ME={})=>{pT.queue=[];let jE=ME;let VE=ME.queue;while(jE.type!=="brace"&&jE.type!=="root"&&jE.parent){jE=jE.parent;VE=jE.queue}if(pT.invalid||pT.dollar){VE.push(append(VE.pop(),LE(pT,xT)));return}if(pT.type==="brace"&&pT.invalid!==true&&pT.nodes.length===2){VE.push(append(VE.pop(),["{}"]));return}if(pT.nodes&&pT.ranges>0){const ME=RE.reduce(pT.nodes);if(RE.exceedsLimit(...ME,xT.step,OT)){throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.")}let jE=BE(...ME,xT);if(jE.length===0){jE=LE(pT,xT)}VE.push(append(VE.pop(),jE));pT.nodes=[];return}const UE=RE.encloseBrace(pT);let JE=pT.queue;let qE=pT;while(qE.type!=="brace"&&qE.type!=="root"&&qE.parent){qE=qE.parent;JE=qE.queue}for(let xT=0;xT<pT.nodes.length;xT++){const OT=pT.nodes[xT];if(OT.type==="comma"&&pT.type==="brace"){if(xT===1)JE.push("");JE.push("");continue}if(OT.type==="close"){VE.push(append(VE.pop(),JE,UE));continue}if(OT.value&&OT.type!=="open"){JE.push(append(JE.pop(),OT.value));continue}if(OT.nodes){walk(OT,pT)}}return JE};return RE.flatten(walk(pT))};pT.exports=expand},6477:(pT,xT,OT)=>{"use strict";const BE=OT(8750);const{MAX_LENGTH:LE,CHAR_BACKSLASH:RE,CHAR_BACKTICK:ME,CHAR_COMMA:jE,CHAR_DOT:VE,CHAR_LEFT_PARENTHESES:UE,CHAR_RIGHT_PARENTHESES:JE,CHAR_LEFT_CURLY_BRACE:qE,CHAR_RIGHT_CURLY_BRACE:KE,CHAR_LEFT_SQUARE_BRACKET:zE,CHAR_RIGHT_SQUARE_BRACKET:$E,CHAR_DOUBLE_QUOTE:GE,CHAR_SINGLE_QUOTE:WE,CHAR_NO_BREAK_SPACE:YE,CHAR_ZERO_WIDTH_NOBREAK_SPACE:HE}=OT(8774);const parse=(pT,xT={})=>{if(typeof pT!=="string"){throw new TypeError("Expected a string")}const OT=xT||{};const XE=typeof OT.maxLength==="number"?Math.min(LE,OT.maxLength):LE;if(pT.length>XE){throw new SyntaxError(`Input length (${pT.length}), exceeds max characters (${XE})`)}const QE={type:"root",input:pT,nodes:[]};const ZE=[QE];let eC=QE;let tC=QE;let rC=0;const nC=pT.length;let iC=0;let aC=0;let oC;const advance=()=>pT[iC++];const push=pT=>{if(pT.type==="text"&&tC.type==="dot"){tC.type="text"}if(tC&&tC.type==="text"&&pT.type==="text"){tC.value+=pT.value;return}eC.nodes.push(pT);pT.parent=eC;pT.prev=tC;tC=pT;return pT};push({type:"bos"});while(iC<nC){eC=ZE[ZE.length-1];oC=advance();if(oC===HE||oC===YE){continue}if(oC===RE){push({type:"text",value:(xT.keepEscaping?oC:"")+advance()});continue}if(oC===$E){push({type:"text",value:"\\"+oC});continue}if(oC===zE){rC++;let pT;while(iC<nC&&(pT=advance())){oC+=pT;if(pT===zE){rC++;continue}if(pT===RE){oC+=advance();continue}if(pT===$E){rC--;if(rC===0){break}}}push({type:"text",value:oC});continue}if(oC===UE){eC=push({type:"paren",nodes:[]});ZE.push(eC);push({type:"text",value:oC});continue}if(oC===JE){if(eC.type!=="paren"){push({type:"text",value:oC});continue}eC=ZE.pop();push({type:"text",value:oC});eC=ZE[ZE.length-1];continue}if(oC===GE||oC===WE||oC===ME){const pT=oC;let OT;if(xT.keepQuotes!==true){oC=""}while(iC<nC&&(OT=advance())){if(OT===RE){oC+=OT+advance();continue}if(OT===pT){if(xT.keepQuotes===true)oC+=OT;break}oC+=OT}push({type:"text",value:oC});continue}if(oC===qE){aC++;const pT=tC.value&&tC.value.slice(-1)==="$"||eC.dollar===true;const xT={type:"brace",open:true,close:false,dollar:pT,depth:aC,commas:0,ranges:0,nodes:[]};eC=push(xT);ZE.push(eC);push({type:"open",value:oC});continue}if(oC===KE){if(eC.type!=="brace"){push({type:"text",value:oC});continue}const pT="close";eC=ZE.pop();eC.close=true;push({type:pT,value:oC});aC--;eC=ZE[ZE.length-1];continue}if(oC===jE&&aC>0){if(eC.ranges>0){eC.ranges=0;const pT=eC.nodes.shift();eC.nodes=[pT,{type:"text",value:BE(eC)}]}push({type:"comma",value:oC});eC.commas++;continue}if(oC===VE&&aC>0&&eC.commas===0){const pT=eC.nodes;if(aC===0||pT.length===0){push({type:"text",value:oC});continue}if(tC.type==="dot"){eC.range=[];tC.value+=oC;tC.type="range";if(eC.nodes.length!==3&&eC.nodes.length!==5){eC.invalid=true;eC.ranges=0;tC.type="text";continue}eC.ranges++;eC.args=[];continue}if(tC.type==="range"){pT.pop();const xT=pT[pT.length-1];xT.value+=tC.value+oC;tC=xT;eC.ranges--;continue}push({type:"dot",value:oC});continue}push({type:"text",value:oC})}do{eC=ZE.pop();if(eC.type!=="root"){eC.nodes.forEach((pT=>{if(!pT.nodes){if(pT.type==="open")pT.isOpen=true;if(pT.type==="close")pT.isClose=true;if(!pT.nodes)pT.type="text";pT.invalid=true}}));const pT=ZE[ZE.length-1];const xT=pT.nodes.indexOf(eC);pT.nodes.splice(xT,1,...eC.nodes)}}while(ZE.length>0);push({type:"eos"});return QE};pT.exports=parse},8750:(pT,xT,OT)=>{"use strict";const BE=OT(5207);pT.exports=(pT,xT={})=>{const stringify=(pT,OT={})=>{const LE=xT.escapeInvalid&&BE.isInvalidBrace(OT);const RE=pT.invalid===true&&xT.escapeInvalid===true;let ME="";if(pT.value){if((LE||RE)&&BE.isOpenOrClose(pT)){return"\\"+pT.value}return pT.value}if(pT.value){return pT.value}if(pT.nodes){for(const xT of pT.nodes){ME+=stringify(xT)}}return ME};return stringify(pT)}},5207:(pT,xT)=>{"use strict";xT.isInteger=pT=>{if(typeof pT==="number"){return Number.isInteger(pT)}if(typeof pT==="string"&&pT.trim()!==""){return Number.isInteger(Number(pT))}return false};xT.find=(pT,xT)=>pT.nodes.find((pT=>pT.type===xT));xT.exceedsLimit=(pT,OT,BE=1,LE)=>{if(LE===false)return false;if(!xT.isInteger(pT)||!xT.isInteger(OT))return false;return(Number(OT)-Number(pT))/Number(BE)>=LE};xT.escapeNode=(pT,xT=0,OT)=>{const BE=pT.nodes[xT];if(!BE)return;if(OT&&BE.type===OT||BE.type==="open"||BE.type==="close"){if(BE.escaped!==true){BE.value="\\"+BE.value;BE.escaped=true}}};xT.encloseBrace=pT=>{if(pT.type!=="brace")return false;if(pT.commas>>0+pT.ranges>>0===0){pT.invalid=true;return true}return false};xT.isInvalidBrace=pT=>{if(pT.type!=="brace")return false;if(pT.invalid===true||pT.dollar)return true;if(pT.commas>>0+pT.ranges>>0===0){pT.invalid=true;return true}if(pT.open!==true||pT.close!==true){pT.invalid=true;return true}return false};xT.isOpenOrClose=pT=>{if(pT.type==="open"||pT.type==="close"){return true}return pT.open===true||pT.close===true};xT.reduce=pT=>pT.reduce(((pT,xT)=>{if(xT.type==="text")pT.push(xT.value);if(xT.type==="range")xT.type="text";return pT}),[]);xT.flatten=(...pT)=>{const xT=[];const flat=pT=>{for(let OT=0;OT<pT.length;OT++){const BE=pT[OT];if(Array.isArray(BE)){flat(BE);continue}if(BE!==undefined){xT.push(BE)}}return xT};flat(pT);return xT}},5018:pT=>{"use strict";const callsites=()=>{const pT=Error.prepareStackTrace;Error.prepareStackTrace=(pT,xT)=>xT;const xT=(new Error).stack.slice(1);Error.prepareStackTrace=pT;return xT};pT.exports=callsites;pT.exports["default"]=callsites},8818:(pT,xT,OT)=>{"use strict";const BE=OT(2068);const{stdout:LE,stderr:RE}=OT(9318);const{stringReplaceAll:ME,stringEncaseCRLFWithFirstIndex:jE}=OT(2415);const{isArray:VE}=Array;const UE=["ansi","ansi","ansi256","ansi16m"];const JE=Object.create(null);const applyOptions=(pT,xT={})=>{if(xT.level&&!(Number.isInteger(xT.level)&&xT.level>=0&&xT.level<=3)){throw new Error("The `level` option should be an integer from 0 to 3")}const OT=LE?LE.level:0;pT.level=xT.level===undefined?OT:xT.level};class ChalkClass{constructor(pT){return chalkFactory(pT)}}const chalkFactory=pT=>{const xT={};applyOptions(xT,pT);xT.template=(...pT)=>chalkTag(xT.template,...pT);Object.setPrototypeOf(xT,Chalk.prototype);Object.setPrototypeOf(xT.template,xT);xT.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")};xT.template.Instance=ChalkClass;return xT.template};function Chalk(pT){return chalkFactory(pT)}for(const[pT,xT]of Object.entries(BE)){JE[pT]={get(){const OT=createBuilder(this,createStyler(xT.open,xT.close,this._styler),this._isEmpty);Object.defineProperty(this,pT,{value:OT});return OT}}}JE.visible={get(){const pT=createBuilder(this,this._styler,true);Object.defineProperty(this,"visible",{value:pT});return pT}};const qE=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const pT of qE){JE[pT]={get(){const{level:xT}=this;return function(...OT){const LE=createStyler(BE.color[UE[xT]][pT](...OT),BE.color.close,this._styler);return createBuilder(this,LE,this._isEmpty)}}}}for(const pT of qE){const xT="bg"+pT[0].toUpperCase()+pT.slice(1);JE[xT]={get(){const{level:xT}=this;return function(...OT){const LE=createStyler(BE.bgColor[UE[xT]][pT](...OT),BE.bgColor.close,this._styler);return createBuilder(this,LE,this._isEmpty)}}}}const KE=Object.defineProperties((()=>{}),{...JE,level:{enumerable:true,get(){return this._generator.level},set(pT){this._generator.level=pT}}});const createStyler=(pT,xT,OT)=>{let BE;let LE;if(OT===undefined){BE=pT;LE=xT}else{BE=OT.openAll+pT;LE=xT+OT.closeAll}return{open:pT,close:xT,openAll:BE,closeAll:LE,parent:OT}};const createBuilder=(pT,xT,OT)=>{const builder=(...pT)=>{if(VE(pT[0])&&VE(pT[0].raw)){return applyStyle(builder,chalkTag(builder,...pT))}return applyStyle(builder,pT.length===1?""+pT[0]:pT.join(" "))};Object.setPrototypeOf(builder,KE);builder._generator=pT;builder._styler=xT;builder._isEmpty=OT;return builder};const applyStyle=(pT,xT)=>{if(pT.level<=0||!xT){return pT._isEmpty?"":xT}let OT=pT._styler;if(OT===undefined){return xT}const{openAll:BE,closeAll:LE}=OT;if(xT.indexOf("")!==-1){while(OT!==undefined){xT=ME(xT,OT.close,OT.open);OT=OT.parent}}const RE=xT.indexOf("\n");if(RE!==-1){xT=jE(xT,LE,BE,RE)}return BE+xT+LE};let zE;const chalkTag=(pT,...xT)=>{const[BE]=xT;if(!VE(BE)||!VE(BE.raw)){return xT.join(" ")}const LE=xT.slice(1);const RE=[BE.raw[0]];for(let pT=1;pT<BE.length;pT++){RE.push(String(LE[pT-1]).replace(/[{}\\]/g,"\\$&"),String(BE.raw[pT]))}if(zE===undefined){zE=OT(500)}return zE(pT,RE.join(""))};Object.defineProperties(Chalk.prototype,JE);const $E=Chalk();$E.supportsColor=LE;$E.stderr=Chalk({level:RE?RE.level:0});$E.stderr.supportsColor=RE;pT.exports=$E},500:pT=>{"use strict";const xT=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;const OT=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;const BE=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;const LE=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;const RE=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function unescape(pT){const xT=pT[0]==="u";const OT=pT[1]==="{";if(xT&&!OT&&pT.length===5||pT[0]==="x"&&pT.length===3){return String.fromCharCode(parseInt(pT.slice(1),16))}if(xT&&OT){return String.fromCodePoint(parseInt(pT.slice(2,-1),16))}return RE.get(pT)||pT}function parseArguments(pT,xT){const OT=[];const RE=xT.trim().split(/\s*,\s*/g);let ME;for(const xT of RE){const RE=Number(xT);if(!Number.isNaN(RE)){OT.push(RE)}else if(ME=xT.match(BE)){OT.push(ME[2].replace(LE,((pT,xT,OT)=>xT?unescape(xT):OT)))}else{throw new Error(`Invalid Chalk template style argument: ${xT} (in style '${pT}')`)}}return OT}function parseStyle(pT){OT.lastIndex=0;const xT=[];let BE;while((BE=OT.exec(pT))!==null){const pT=BE[1];if(BE[2]){const OT=parseArguments(pT,BE[2]);xT.push([pT].concat(OT))}else{xT.push([pT])}}return xT}function buildStyle(pT,xT){const OT={};for(const pT of xT){for(const xT of pT.styles){OT[xT[0]]=pT.inverse?null:xT.slice(1)}}let BE=pT;for(const[pT,xT]of Object.entries(OT)){if(!Array.isArray(xT)){continue}if(!(pT in BE)){throw new Error(`Unknown Chalk style: ${pT}`)}BE=xT.length>0?BE[pT](...xT):BE[pT]}return BE}pT.exports=(pT,OT)=>{const BE=[];const LE=[];let RE=[];OT.replace(xT,((xT,OT,ME,jE,VE,UE)=>{if(OT){RE.push(unescape(OT))}else if(jE){const xT=RE.join("");RE=[];LE.push(BE.length===0?xT:buildStyle(pT,BE)(xT));BE.push({inverse:ME,styles:parseStyle(jE)})}else if(VE){if(BE.length===0){throw new Error("Found extraneous } in Chalk template literal")}LE.push(buildStyle(pT,BE)(RE.join("")));RE=[];BE.pop()}else{RE.push(UE)}}));LE.push(RE.join(""));if(BE.length>0){const pT=`Chalk template literal is missing ${BE.length} closing bracket${BE.length===1?"":"s"} (\`}\`)`;throw new Error(pT)}return LE.join("")}},2415:pT=>{"use strict";const stringReplaceAll=(pT,xT,OT)=>{let BE=pT.indexOf(xT);if(BE===-1){return pT}const LE=xT.length;let RE=0;let ME="";do{ME+=pT.substr(RE,BE-RE)+xT+OT;RE=BE+LE;BE=pT.indexOf(xT,RE)}while(BE!==-1);ME+=pT.substr(RE);return ME};const stringEncaseCRLFWithFirstIndex=(pT,xT,OT,BE)=>{let LE=0;let RE="";do{const ME=pT[BE-1]==="\r";RE+=pT.substr(LE,(ME?BE-1:BE)-LE)+xT+(ME?"\r\n":"\n")+OT;LE=BE+1;BE=pT.indexOf("\n",LE)}while(BE!==-1);RE+=pT.substr(LE);return RE};pT.exports={stringReplaceAll:stringReplaceAll,stringEncaseCRLFWithFirstIndex:stringEncaseCRLFWithFirstIndex}},9482:(pT,xT,OT)=>{"use strict";const BE=OT(5847);let LE=false;xT.show=(pT=process.stderr)=>{if(!pT.isTTY){return}LE=false;pT.write("[?25h")};xT.hide=(pT=process.stderr)=>{if(!pT.isTTY){return}BE();LE=true;pT.write("[?25l")};xT.toggle=(pT,OT)=>{if(pT!==undefined){LE=pT}if(LE){xT.show(OT)}else{xT.hide(OT)}}},2031:(pT,xT,OT)=>{"use strict";const BE=Object.assign({},OT(6374));const LE=Object.keys(BE);Object.defineProperty(BE,"random",{get(){const pT=Math.floor(Math.random()*LE.length);const xT=LE[pT];return BE[xT]}});pT.exports=BE;pT.exports["default"]=BE},8606:pT=>{var xT=function(){"use strict";function clone(pT,xT,OT,BE){var LE;if(typeof xT==="object"){OT=xT.depth;BE=xT.prototype;LE=xT.filter;xT=xT.circular}var RE=[];var ME=[];var jE=typeof Buffer!="undefined";if(typeof xT=="undefined")xT=true;if(typeof OT=="undefined")OT=Infinity;function _clone(pT,OT){if(pT===null)return null;if(OT==0)return pT;var LE;var VE;if(typeof pT!="object"){return pT}if(clone.__isArray(pT)){LE=[]}else if(clone.__isRegExp(pT)){LE=new RegExp(pT.source,__getRegExpFlags(pT));if(pT.lastIndex)LE.lastIndex=pT.lastIndex}else if(clone.__isDate(pT)){LE=new Date(pT.getTime())}else if(jE&&Buffer.isBuffer(pT)){if(Buffer.allocUnsafe){LE=Buffer.allocUnsafe(pT.length)}else{LE=new Buffer(pT.length)}pT.copy(LE);return LE}else{if(typeof BE=="undefined"){VE=Object.getPrototypeOf(pT);LE=Object.create(VE)}else{LE=Object.create(BE);VE=BE}}if(xT){var UE=RE.indexOf(pT);if(UE!=-1){return ME[UE]}RE.push(pT);ME.push(LE)}for(var JE in pT){var qE;if(VE){qE=Object.getOwnPropertyDescriptor(VE,JE)}if(qE&&qE.set==null){continue}LE[JE]=_clone(pT[JE],OT-1)}return LE}return _clone(pT,OT)}clone.clonePrototype=function clonePrototype(pT){if(pT===null)return null;var c=function(){};c.prototype=pT;return new c};function __objToStr(pT){return Object.prototype.toString.call(pT)}clone.__objToStr=__objToStr;function __isDate(pT){return typeof pT==="object"&&__objToStr(pT)==="[object Date]"}clone.__isDate=__isDate;function __isArray(pT){return typeof pT==="object"&&__objToStr(pT)==="[object Array]"}clone.__isArray=__isArray;function __isRegExp(pT){return typeof pT==="object"&&__objToStr(pT)==="[object RegExp]"}clone.__isRegExp=__isRegExp;function __getRegExpFlags(pT){var xT="";if(pT.global)xT+="g";if(pT.ignoreCase)xT+="i";if(pT.multiline)xT+="m";return xT}clone.__getRegExpFlags=__getRegExpFlags;return clone}();if(true&&pT.exports){pT.exports=xT}},7391:(pT,xT,OT)=>{const BE=OT(8510);const LE={};for(const pT of Object.keys(BE)){LE[BE[pT]]=pT}const RE={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"]}};pT.exports=RE;for(const pT of Object.keys(RE)){if(!("channels"in RE[pT])){throw new Error("missing channels property: "+pT)}if(!("labels"in RE[pT])){throw new Error("missing channel labels property: "+pT)}if(RE[pT].labels.length!==RE[pT].channels){throw new Error("channel and label counts mismatch: "+pT)}const{channels:xT,labels:OT}=RE[pT];delete RE[pT].channels;delete RE[pT].labels;Object.defineProperty(RE[pT],"channels",{value:xT});Object.defineProperty(RE[pT],"labels",{value:OT})}RE.rgb.hsl=function(pT){const xT=pT[0]/255;const OT=pT[1]/255;const BE=pT[2]/255;const LE=Math.min(xT,OT,BE);const RE=Math.max(xT,OT,BE);const ME=RE-LE;let jE;let VE;if(RE===LE){jE=0}else if(xT===RE){jE=(OT-BE)/ME}else if(OT===RE){jE=2+(BE-xT)/ME}else if(BE===RE){jE=4+(xT-OT)/ME}jE=Math.min(jE*60,360);if(jE<0){jE+=360}const UE=(LE+RE)/2;if(RE===LE){VE=0}else if(UE<=.5){VE=ME/(RE+LE)}else{VE=ME/(2-RE-LE)}return[jE,VE*100,UE*100]};RE.rgb.hsv=function(pT){let xT;let OT;let BE;let LE;let RE;const ME=pT[0]/255;const jE=pT[1]/255;const VE=pT[2]/255;const UE=Math.max(ME,jE,VE);const JE=UE-Math.min(ME,jE,VE);const diffc=function(pT){return(UE-pT)/6/JE+1/2};if(JE===0){LE=0;RE=0}else{RE=JE/UE;xT=diffc(ME);OT=diffc(jE);BE=diffc(VE);if(ME===UE){LE=BE-OT}else if(jE===UE){LE=1/3+xT-BE}else if(VE===UE){LE=2/3+OT-xT}if(LE<0){LE+=1}else if(LE>1){LE-=1}}return[LE*360,RE*100,UE*100]};RE.rgb.hwb=function(pT){const xT=pT[0];const OT=pT[1];let BE=pT[2];const LE=RE.rgb.hsl(pT)[0];const ME=1/255*Math.min(xT,Math.min(OT,BE));BE=1-1/255*Math.max(xT,Math.max(OT,BE));return[LE,ME*100,BE*100]};RE.rgb.cmyk=function(pT){const xT=pT[0]/255;const OT=pT[1]/255;const BE=pT[2]/255;const LE=Math.min(1-xT,1-OT,1-BE);const RE=(1-xT-LE)/(1-LE)||0;const ME=(1-OT-LE)/(1-LE)||0;const jE=(1-BE-LE)/(1-LE)||0;return[RE*100,ME*100,jE*100,LE*100]};function comparativeDistance(pT,xT){return(pT[0]-xT[0])**2+(pT[1]-xT[1])**2+(pT[2]-xT[2])**2}RE.rgb.keyword=function(pT){const xT=LE[pT];if(xT){return xT}let OT=Infinity;let RE;for(const xT of Object.keys(BE)){const LE=BE[xT];const ME=comparativeDistance(pT,LE);if(ME<OT){OT=ME;RE=xT}}return RE};RE.keyword.rgb=function(pT){return BE[pT]};RE.rgb.xyz=function(pT){let xT=pT[0]/255;let OT=pT[1]/255;let BE=pT[2]/255;xT=xT>.04045?((xT+.055)/1.055)**2.4:xT/12.92;OT=OT>.04045?((OT+.055)/1.055)**2.4:OT/12.92;BE=BE>.04045?((BE+.055)/1.055)**2.4:BE/12.92;const LE=xT*.4124+OT*.3576+BE*.1805;const RE=xT*.2126+OT*.7152+BE*.0722;const ME=xT*.0193+OT*.1192+BE*.9505;return[LE*100,RE*100,ME*100]};RE.rgb.lab=function(pT){const xT=RE.rgb.xyz(pT);let OT=xT[0];let BE=xT[1];let LE=xT[2];OT/=95.047;BE/=100;LE/=108.883;OT=OT>.008856?OT**(1/3):7.787*OT+16/116;BE=BE>.008856?BE**(1/3):7.787*BE+16/116;LE=LE>.008856?LE**(1/3):7.787*LE+16/116;const ME=116*BE-16;const jE=500*(OT-BE);const VE=200*(BE-LE);return[ME,jE,VE]};RE.hsl.rgb=function(pT){const xT=pT[0]/360;const OT=pT[1]/100;const BE=pT[2]/100;let LE;let RE;let ME;if(OT===0){ME=BE*255;return[ME,ME,ME]}if(BE<.5){LE=BE*(1+OT)}else{LE=BE+OT-BE*OT}const jE=2*BE-LE;const VE=[0,0,0];for(let pT=0;pT<3;pT++){RE=xT+1/3*-(pT-1);if(RE<0){RE++}if(RE>1){RE--}if(6*RE<1){ME=jE+(LE-jE)*6*RE}else if(2*RE<1){ME=LE}else if(3*RE<2){ME=jE+(LE-jE)*(2/3-RE)*6}else{ME=jE}VE[pT]=ME*255}return VE};RE.hsl.hsv=function(pT){const xT=pT[0];let OT=pT[1]/100;let BE=pT[2]/100;let LE=OT;const RE=Math.max(BE,.01);BE*=2;OT*=BE<=1?BE:2-BE;LE*=RE<=1?RE:2-RE;const ME=(BE+OT)/2;const jE=BE===0?2*LE/(RE+LE):2*OT/(BE+OT);return[xT,jE*100,ME*100]};RE.hsv.rgb=function(pT){const xT=pT[0]/60;const OT=pT[1]/100;let BE=pT[2]/100;const LE=Math.floor(xT)%6;const RE=xT-Math.floor(xT);const ME=255*BE*(1-OT);const jE=255*BE*(1-OT*RE);const VE=255*BE*(1-OT*(1-RE));BE*=255;switch(LE){case 0:return[BE,VE,ME];case 1:return[jE,BE,ME];case 2:return[ME,BE,VE];case 3:return[ME,jE,BE];case 4:return[VE,ME,BE];case 5:return[BE,ME,jE]}};RE.hsv.hsl=function(pT){const xT=pT[0];const OT=pT[1]/100;const BE=pT[2]/100;const LE=Math.max(BE,.01);let RE;let ME;ME=(2-OT)*BE;const jE=(2-OT)*LE;RE=OT*LE;RE/=jE<=1?jE:2-jE;RE=RE||0;ME/=2;return[xT,RE*100,ME*100]};RE.hwb.rgb=function(pT){const xT=pT[0]/360;let OT=pT[1]/100;let BE=pT[2]/100;const LE=OT+BE;let RE;if(LE>1){OT/=LE;BE/=LE}const ME=Math.floor(6*xT);const jE=1-BE;RE=6*xT-ME;if((ME&1)!==0){RE=1-RE}const VE=OT+RE*(jE-OT);let UE;let JE;let qE;switch(ME){default:case 6:case 0:UE=jE;JE=VE;qE=OT;break;case 1:UE=VE;JE=jE;qE=OT;break;case 2:UE=OT;JE=jE;qE=VE;break;case 3:UE=OT;JE=VE;qE=jE;break;case 4:UE=VE;JE=OT;qE=jE;break;case 5:UE=jE;JE=OT;qE=VE;break}return[UE*255,JE*255,qE*255]};RE.cmyk.rgb=function(pT){const xT=pT[0]/100;const OT=pT[1]/100;const BE=pT[2]/100;const LE=pT[3]/100;const RE=1-Math.min(1,xT*(1-LE)+LE);const ME=1-Math.min(1,OT*(1-LE)+LE);const jE=1-Math.min(1,BE*(1-LE)+LE);return[RE*255,ME*255,jE*255]};RE.xyz.rgb=function(pT){const xT=pT[0]/100;const OT=pT[1]/100;const BE=pT[2]/100;let LE;let RE;let ME;LE=xT*3.2406+OT*-1.5372+BE*-.4986;RE=xT*-.9689+OT*1.8758+BE*.0415;ME=xT*.0557+OT*-.204+BE*1.057;LE=LE>.0031308?1.055*LE**(1/2.4)-.055:LE*12.92;RE=RE>.0031308?1.055*RE**(1/2.4)-.055:RE*12.92;ME=ME>.0031308?1.055*ME**(1/2.4)-.055:ME*12.92;LE=Math.min(Math.max(0,LE),1);RE=Math.min(Math.max(0,RE),1);ME=Math.min(Math.max(0,ME),1