index.js
28.6 KB
module.exports=(()=>{var e={505:(e,t,n)=>{"use strict";var i=n(669);var r=n(604);var o=function errorEx(e,t){if(!e||e.constructor!==String){t=e||{};e=Error.name}var n=function ErrorEXError(i){if(!this){return new ErrorEXError(i)}i=i instanceof Error?i.message:i||this.message;Error.call(this,i);Error.captureStackTrace(this,n);this.name=e;Object.defineProperty(this,"message",{configurable:true,enumerable:false,get:function(){var e=i.split(/\r?\n/g);for(var n in t){if(!t.hasOwnProperty(n)){continue}var o=t[n];if("message"in o){e=o.message(this[n],e)||e;if(!r(e)){e=[e]}}}return e.join("\n")},set:function(e){i=e}});var o=null;var c=Object.getOwnPropertyDescriptor(this,"stack");var s=c.get;var a=c.value;delete c.value;delete c.writable;c.set=function(e){o=e};c.get=function(){var e=(o||(s?s.call(this):a)).split(/\r?\n+/g);if(!o){e[0]=this.name+": "+this.message}var n=1;for(var i in t){if(!t.hasOwnProperty(i)){continue}var r=t[i];if("line"in r){var c=r.line(this[i]);if(c){e.splice(n++,0," "+c)}}if("stack"in r){r.stack(this[i],e)}}return e.join("\n")};Object.defineProperty(this,"stack",c)};if(Object.setPrototypeOf){Object.setPrototypeOf(n.prototype,Error.prototype);Object.setPrototypeOf(n,Error)}else{i.inherits(n,Error)}return n};o.append=function(e,t){return{message:function(n,i){n=n||t;if(n){i[0]+=" "+e.replace("%s",n.toString())}return i}}};o.line=function(e,t){return{line:function(n){n=n||t;if(n){return e.replace("%s",n.toString())}return null}}};e.exports=o},691:e=>{"use strict";var t=/[|\\{}()[\]^$+*?.]/g;e.exports=function(e){if(typeof e!=="string"){throw new TypeError("Expected a string")}return e.replace(t,"\\$&")}},99:(e,t,n)=>{"use strict";const i=n(691);const r=process.platform;const o={tick:"✔",cross:"✖",star:"★",square:"▇",squareSmall:"◻",squareSmallFilled:"◼",play:"▶",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",circleQuestionMark:"?⃝",bullet:"●",dot:"․",line:"─",ellipsis:"…",pointer:"❯",pointerSmall:"›",info:"ℹ",warning:"⚠",hamburger:"☰",smiley:"㋡",mustache:"෴",heart:"♥",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",questionMarkPrefix:"?⃝",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneSeventh:"⅐",oneEighth:"⅛",oneNinth:"⅑",oneTenth:"⅒",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞"};const c={tick:"√",cross:"×",star:"*",square:"█",squareSmall:"[ ]",squareSmallFilled:"[█]",play:"►",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",circleQuestionMark:"(?)",bullet:"*",dot:".",line:"─",ellipsis:"...",pointer:">",pointerSmall:"»",info:"i",warning:"‼",hamburger:"≡",smiley:"☺",mustache:"┌─┐",heart:o.heart,arrowUp:o.arrowUp,arrowDown:o.arrowDown,arrowLeft:o.arrowLeft,arrowRight:o.arrowRight,radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",questionMarkPrefix:"?",oneHalf:"1/2",oneThird:"1/3",oneQuarter:"1/4",oneFifth:"1/5",oneSixth:"1/6",oneSeventh:"1/7",oneEighth:"1/8",oneNinth:"1/9",oneTenth:"1/10",twoThirds:"2/3",twoFifths:"2/5",threeQuarters:"3/4",threeFifths:"3/5",threeEighths:"3/8",fourFifths:"4/5",fiveSixths:"5/6",fiveEighths:"5/8",sevenEighths:"7/8"};if(r==="linux"){o.questionMarkPrefix="?"}const s=r==="win32"?c:o;const a=e=>{if(s===o){return e}Object.keys(o).forEach(t=>{if(o[t]===s[t]){return}e=e.replace(new RegExp(i(o[t]),"g"),s[t])});return e};e.exports=Object.assign(a,s)},356:e=>{"use strict";e.exports=clone;function clone(e){if(e===null||typeof e!=="object")return e;if(e instanceof Object)var t={__proto__:e.__proto__};else var t=Object.create(null);Object.getOwnPropertyNames(e).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}},758:(e,t,n)=>{var i=n(747);var r=n(263);var o=n(86);var c=n(356);var s=n(669);var a;var l;if(typeof Symbol==="function"&&typeof Symbol.for==="function"){a=Symbol.for("graceful-fs.queue");l=Symbol.for("graceful-fs.previous")}else{a="___graceful-fs.queue";l="___graceful-fs.previous"}function noop(){}function publishQueue(e,t){Object.defineProperty(e,a,{get:function(){return t}})}var f=noop;if(s.debuglog)f=s.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))f=function(){var e=s.format.apply(s,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: ");console.error(e)};if(!i[a]){var u=global[a]||[];publishQueue(i,u);i.close=function(e){function close(t,n){return e.call(i,t,function(e){if(!e){retry()}if(typeof n==="function")n.apply(this,arguments)})}Object.defineProperty(close,l,{value:e});return close}(i.close);i.closeSync=function(e){function closeSync(t){e.apply(i,arguments);retry()}Object.defineProperty(closeSync,l,{value:e});return closeSync}(i.closeSync);if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")){process.on("exit",function(){f(i[a]);n(357).equal(i[a].length,0)})}}if(!global[a]){publishQueue(global,i[a])}e.exports=patch(c(i));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!i.__patched){e.exports=patch(i);i.__patched=true}function patch(e){r(e);e.gracefulify=patch;e.createReadStream=createReadStream;e.createWriteStream=createWriteStream;var t=e.readFile;e.readFile=readFile;function readFile(e,n,i){if(typeof n==="function")i=n,n=null;return go$readFile(e,n,i);function go$readFile(e,n,i){return t(e,n,function(t){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))enqueue([go$readFile,[e,n,i]]);else{if(typeof i==="function")i.apply(this,arguments);retry()}})}}var n=e.writeFile;e.writeFile=writeFile;function writeFile(e,t,i,r){if(typeof i==="function")r=i,i=null;return go$writeFile(e,t,i,r);function go$writeFile(e,t,i,r){return n(e,t,i,function(n){if(n&&(n.code==="EMFILE"||n.code==="ENFILE"))enqueue([go$writeFile,[e,t,i,r]]);else{if(typeof r==="function")r.apply(this,arguments);retry()}})}}var i=e.appendFile;if(i)e.appendFile=appendFile;function appendFile(e,t,n,r){if(typeof n==="function")r=n,n=null;return go$appendFile(e,t,n,r);function go$appendFile(e,t,n,r){return i(e,t,n,function(i){if(i&&(i.code==="EMFILE"||i.code==="ENFILE"))enqueue([go$appendFile,[e,t,n,r]]);else{if(typeof r==="function")r.apply(this,arguments);retry()}})}}var c=e.readdir;e.readdir=readdir;function readdir(e,t,n){var i=[e];if(typeof t!=="function"){i.push(t)}else{n=t}i.push(go$readdir$cb);return go$readdir(i);function go$readdir$cb(e,t){if(t&&t.sort)t.sort();if(e&&(e.code==="EMFILE"||e.code==="ENFILE"))enqueue([go$readdir,[i]]);else{if(typeof n==="function")n.apply(this,arguments);retry()}}}function go$readdir(t){return c.apply(e,t)}if(process.version.substr(0,4)==="v0.8"){var s=o(e);ReadStream=s.ReadStream;WriteStream=s.WriteStream}var a=e.ReadStream;if(a){ReadStream.prototype=Object.create(a.prototype);ReadStream.prototype.open=ReadStream$open}var l=e.WriteStream;if(l){WriteStream.prototype=Object.create(l.prototype);WriteStream.prototype.open=WriteStream$open}Object.defineProperty(e,"ReadStream",{get:function(){return ReadStream},set:function(e){ReadStream=e},enumerable:true,configurable:true});Object.defineProperty(e,"WriteStream",{get:function(){return WriteStream},set:function(e){WriteStream=e},enumerable:true,configurable:true});var f=ReadStream;Object.defineProperty(e,"FileReadStream",{get:function(){return f},set:function(e){f=e},enumerable:true,configurable:true});var u=WriteStream;Object.defineProperty(e,"FileWriteStream",{get:function(){return u},set:function(e){u=e},enumerable:true,configurable:true});function ReadStream(e,t){if(this instanceof ReadStream)return a.apply(this,arguments),this;else return ReadStream.apply(Object.create(ReadStream.prototype),arguments)}function ReadStream$open(){var e=this;open(e.path,e.flags,e.mode,function(t,n){if(t){if(e.autoClose)e.destroy();e.emit("error",t)}else{e.fd=n;e.emit("open",n);e.read()}})}function WriteStream(e,t){if(this instanceof WriteStream)return l.apply(this,arguments),this;else return WriteStream.apply(Object.create(WriteStream.prototype),arguments)}function WriteStream$open(){var e=this;open(e.path,e.flags,e.mode,function(t,n){if(t){e.destroy();e.emit("error",t)}else{e.fd=n;e.emit("open",n)}})}function createReadStream(t,n){return new e.ReadStream(t,n)}function createWriteStream(t,n){return new e.WriteStream(t,n)}var h=e.open;e.open=open;function open(e,t,n,i){if(typeof n==="function")i=n,n=null;return go$open(e,t,n,i);function go$open(e,t,n,i){return h(e,t,n,function(r,o){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))enqueue([go$open,[e,t,n,i]]);else{if(typeof i==="function")i.apply(this,arguments);retry()}})}}return e}function enqueue(e){f("ENQUEUE",e[0].name,e[1]);i[a].push(e)}function retry(){var e=i[a].shift();if(e){f("RETRY",e[0].name,e[1]);e[0].apply(null,e[1])}}},86:(e,t,n)=>{var i=n(413).Stream;e.exports=legacy;function legacy(e){return{ReadStream:ReadStream,WriteStream:WriteStream};function ReadStream(t,n){if(!(this instanceof ReadStream))return new ReadStream(t,n);i.call(this);var r=this;this.path=t;this.fd=null;this.readable=true;this.paused=false;this.flags="r";this.mode=438;this.bufferSize=64*1024;n=n||{};var o=Object.keys(n);for(var c=0,s=o.length;c<s;c++){var a=o[c];this[a]=n[a]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==undefined){if("number"!==typeof this.start){throw TypeError("start must be a Number")}if(this.end===undefined){this.end=Infinity}else if("number"!==typeof this.end){throw TypeError("end must be a Number")}if(this.start>this.end){throw new Error("start must be <= end")}this.pos=this.start}if(this.fd!==null){process.nextTick(function(){r._read()});return}e.open(this.path,this.flags,this.mode,function(e,t){if(e){r.emit("error",e);r.readable=false;return}r.fd=t;r.emit("open",t);r._read()})}function WriteStream(t,n){if(!(this instanceof WriteStream))return new WriteStream(t,n);i.call(this);this.path=t;this.fd=null;this.writable=true;this.flags="w";this.encoding="binary";this.mode=438;this.bytesWritten=0;n=n||{};var r=Object.keys(n);for(var o=0,c=r.length;o<c;o++){var s=r[o];this[s]=n[s]}if(this.start!==undefined){if("number"!==typeof this.start){throw TypeError("start must be a Number")}if(this.start<0){throw new Error("start must be >= zero")}this.pos=this.start}this.busy=false;this._queue=[];if(this.fd===null){this._open=e.open;this._queue.push([this._open,this.path,this.flags,this.mode,undefined]);this.flush()}}}},263:(e,t,n)=>{var i=n(721);var r=process.cwd;var o=null;var c=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!o)o=r.call(process);return o};try{process.cwd()}catch(e){}var s=process.chdir;process.chdir=function(e){o=null;s.call(process,e)};e.exports=patch;function patch(e){if(i.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)){patchLchmod(e)}if(!e.lutimes){patchLutimes(e)}e.chown=chownFix(e.chown);e.fchown=chownFix(e.fchown);e.lchown=chownFix(e.lchown);e.chmod=chmodFix(e.chmod);e.fchmod=chmodFix(e.fchmod);e.lchmod=chmodFix(e.lchmod);e.chownSync=chownFixSync(e.chownSync);e.fchownSync=chownFixSync(e.fchownSync);e.lchownSync=chownFixSync(e.lchownSync);e.chmodSync=chmodFixSync(e.chmodSync);e.fchmodSync=chmodFixSync(e.fchmodSync);e.lchmodSync=chmodFixSync(e.lchmodSync);e.stat=statFix(e.stat);e.fstat=statFix(e.fstat);e.lstat=statFix(e.lstat);e.statSync=statFixSync(e.statSync);e.fstatSync=statFixSync(e.fstatSync);e.lstatSync=statFixSync(e.lstatSync);if(!e.lchmod){e.lchmod=function(e,t,n){if(n)process.nextTick(n)};e.lchmodSync=function(){}}if(!e.lchown){e.lchown=function(e,t,n,i){if(i)process.nextTick(i)};e.lchownSync=function(){}}if(c==="win32"){e.rename=function(t){return function(n,i,r){var o=Date.now();var c=0;t(n,i,function CB(s){if(s&&(s.code==="EACCES"||s.code==="EPERM")&&Date.now()-o<6e4){setTimeout(function(){e.stat(i,function(e,o){if(e&&e.code==="ENOENT")t(n,i,CB);else r(s)})},c);if(c<100)c+=10;return}if(r)r(s)})}}(e.rename)}e.read=function(t){function read(n,i,r,o,c,s){var a;if(s&&typeof s==="function"){var l=0;a=function(f,u,h){if(f&&f.code==="EAGAIN"&&l<10){l++;return t.call(e,n,i,r,o,c,a)}s.apply(this,arguments)}}return t.call(e,n,i,r,o,c,a)}read.__proto__=t;return read}(e.read);e.readSync=function(t){return function(n,i,r,o,c){var s=0;while(true){try{return t.call(e,n,i,r,o,c)}catch(e){if(e.code==="EAGAIN"&&s<10){s++;continue}throw e}}}}(e.readSync);function patchLchmod(e){e.lchmod=function(t,n,r){e.open(t,i.O_WRONLY|i.O_SYMLINK,n,function(t,i){if(t){if(r)r(t);return}e.fchmod(i,n,function(t){e.close(i,function(e){if(r)r(t||e)})})})};e.lchmodSync=function(t,n){var r=e.openSync(t,i.O_WRONLY|i.O_SYMLINK,n);var o=true;var c;try{c=e.fchmodSync(r,n);o=false}finally{if(o){try{e.closeSync(r)}catch(e){}}else{e.closeSync(r)}}return c}}function patchLutimes(e){if(i.hasOwnProperty("O_SYMLINK")){e.lutimes=function(t,n,r,o){e.open(t,i.O_SYMLINK,function(t,i){if(t){if(o)o(t);return}e.futimes(i,n,r,function(t){e.close(i,function(e){if(o)o(t||e)})})})};e.lutimesSync=function(t,n,r){var o=e.openSync(t,i.O_SYMLINK);var c;var s=true;try{c=e.futimesSync(o,n,r);s=false}finally{if(s){try{e.closeSync(o)}catch(e){}}else{e.closeSync(o)}}return c}}else{e.lutimes=function(e,t,n,i){if(i)process.nextTick(i)};e.lutimesSync=function(){}}}function chmodFix(t){if(!t)return t;return function(n,i,r){return t.call(e,n,i,function(e){if(chownErOk(e))e=null;if(r)r.apply(this,arguments)})}}function chmodFixSync(t){if(!t)return t;return function(n,i){try{return t.call(e,n,i)}catch(e){if(!chownErOk(e))throw e}}}function chownFix(t){if(!t)return t;return function(n,i,r,o){return t.call(e,n,i,r,function(e){if(chownErOk(e))e=null;if(o)o.apply(this,arguments)})}}function chownFixSync(t){if(!t)return t;return function(n,i,r){try{return t.call(e,n,i,r)}catch(e){if(!chownErOk(e))throw e}}}function statFix(t){if(!t)return t;return function(n,i,r){if(typeof i==="function"){r=i;i=null}function callback(e,t){if(t){if(t.uid<0)t.uid+=4294967296;if(t.gid<0)t.gid+=4294967296}if(r)r.apply(this,arguments)}return i?t.call(e,n,i,callback):t.call(e,n,callback)}}function statFixSync(t){if(!t)return t;return function(n,i){var r=i?t.call(e,n,i):t.call(e,n);if(r.uid<0)r.uid+=4294967296;if(r.gid<0)r.gid+=4294967296;return r}}function chownErOk(e){if(!e)return true;if(e.code==="ENOSYS")return true;var t=!process.getuid||process.getuid()!==0;if(t){if(e.code==="EINVAL"||e.code==="EPERM")return true}return false}}},604:e=>{"use strict";e.exports=function isArrayish(e){if(!e){return false}return e instanceof Array||Array.isArray(e)||e.length>=0&&e.splice instanceof Function}},586:e=>{"use strict";e.exports=parseJson;function parseJson(e,t,n){n=n||20;try{return JSON.parse(e,t)}catch(t){if(typeof e!=="string"){const t=Array.isArray(e)&&e.length===0;const n="Cannot parse "+(t?"an empty array":String(e));throw new TypeError(n)}const i=t.message.match(/^Unexpected token.*position\s+(\d+)/i);const r=i?+i[1]:t.message.match(/^Unexpected end of JSON.*/i)?e.length-1:null;if(r!=null){const i=r<=n?0:r-n;const o=r+n>=e.length?e.length:r+n;t.message+=` while parsing near '${i===0?"":"..."}${e.slice(i,o)}${o===e.length?"":"..."}'`}else{t.message+=` while parsing '${e.slice(0,n*2)}'`}throw t}}},347:(e,t,n)=>{"use strict";const i=n(622);const r=n(758);const o=n(551);const c=n(615);const s=n(990);const a=(e,t)=>c(o(e),i.relative(".",t));e.exports=(e=>s(r.readFile)(e,"utf8").then(t=>a(t,e)));e.exports.sync=(e=>a(r.readFileSync(e,"utf8"),e))},990:e=>{"use strict";const t=(e,t)=>(function(){const n=t.promiseModule;const i=new Array(arguments.length);for(let e=0;e<arguments.length;e++){i[e]=arguments[e]}return new n((n,r)=>{if(t.errorFirst){i.push(function(e,i){if(t.multiArgs){const t=new Array(arguments.length-1);for(let e=1;e<arguments.length;e++){t[e-1]=arguments[e]}if(e){t.unshift(e);r(t)}else{n(t)}}else if(e){r(e)}else{n(i)}})}else{i.push(function(e){if(t.multiArgs){const e=new Array(arguments.length-1);for(let t=0;t<arguments.length;t++){e[t]=arguments[t]}n(e)}else{n(e)}})}e.apply(this,i)})});e.exports=((e,n)=>{n=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:true,promiseModule:Promise},n);const i=e=>{const t=t=>typeof t==="string"?e===t:t.test(e);return n.include?n.include.some(t):!n.exclude.some(t)};let r;if(typeof e==="function"){r=function(){if(n.excludeMain){return e.apply(this,arguments)}return t(e,n).apply(this,arguments)}}else{r=Object.create(Object.getPrototypeOf(e))}for(const o in e){const c=e[o];r[o]=typeof c==="function"&&i(o)?t(c,n):c}return r})},615:(e,t,n)=>{"use strict";const i=n(505);const r=n(586);const o=i("JSONError",{fileName:i.append("in %s")});e.exports=((e,t,n)=>{if(typeof t==="string"){n=t;t=null}try{try{return JSON.parse(e,t)}catch(n){r(e,t);throw n}}catch(e){e.message=e.message.replace(/\n/g,"");const t=new o(e);if(n){t.fileName=n}throw t}})},978:(e,t,n)=>{"use strict";const i=n(747);e.exports=(e=>new Promise(t=>{i.access(e,e=>{t(!e)})}));e.exports.sync=(e=>{try{i.accessSync(e);return true}catch(e){return false}})},235:(e,t,n)=>{"use strict";const i=n(622);const r=n(428);const o=n(347);const c=new WeakMap;const s=e=>c.get(e);const a=e=>i.resolve(i.dirname(e),"..");const l=(e,t)=>{c.set(e,t);return e};const f=(e,t)=>{if(!e){return Promise.reject(new TypeError("Expected a namespace"))}t=t||{};return r("package.json",t.cwd?{cwd:t.cwd}:{}).then(n=>{if(!n){return l(Object.assign({},t.defaults),n)}return o(n).then(i=>{if(t.skipOnFalse&&i[e]===false){const i=Object.assign({},t,{cwd:a(n)});return f(e,i)}return l(Object.assign({},t.defaults,i[e]),n)})})};const u=(e,t)=>{if(!e){throw new TypeError("Expected a namespace")}t=t||{};const n=r.sync("package.json",t.cwd?{cwd:t.cwd}:{});if(!n){return l(Object.assign({},t.defaults),n)}const i=o.sync(n);if(t.skipOnFalse&&i[e]===false){const i=Object.assign({},t,{cwd:a(n)});return u(e,i)}return l(Object.assign({},t.defaults,i[e]),n)};e.exports=f;e.exports.filepath=s;e.exports.sync=u},428:(e,t,n)=>{"use strict";const i=n(622);const r=n(619);e.exports=((e,t)=>{t=t||{};const n=i.resolve(t.cwd||"");const o=i.parse(n).root;const c=[].concat(e);return new Promise(e=>{(function find(t){r(c,{cwd:t}).then(n=>{if(n){e(i.join(t,n))}else if(t===o){e(null)}else{find(i.dirname(t))}})})(n)})});e.exports.sync=((e,t)=>{t=t||{};let n=i.resolve(t.cwd||"");const o=i.parse(n).root;const c=[].concat(e);while(true){const e=r.sync(c,{cwd:n});if(e){return i.join(n,e)}else if(n===o){return null}n=i.dirname(n)}})},619:(e,t,n)=>{"use strict";const i=n(622);const r=n(978);const o=n(566);e.exports=((e,t)=>{t=Object.assign({cwd:process.cwd()},t);return o(e,e=>r(i.resolve(t.cwd,e)),t)});e.exports.sync=((e,t)=>{t=Object.assign({cwd:process.cwd()},t);for(const n of e){if(r.sync(i.resolve(t.cwd,n))){return n}}})},305:(e,t,n)=>{"use strict";const i=n(897);e.exports=(e=>{if(e<1){throw new TypeError("Expected `concurrency` to be a number from 1 and up")}const t=[];let n=0;const r=()=>{n--;if(t.length>0){t.shift()()}};return o=>new Promise((c,s)=>{const a=()=>{n++;i(o).then(e=>{c(e);r()},e=>{s(e);r()})};if(n<e){a()}else{t.push(a)}})})},566:(e,t,n)=>{"use strict";const i=n(305);class EndError extends Error{constructor(e){super();this.value=e}}const r=e=>Promise.all(e).then(e=>e[1]===true&&Promise.reject(new EndError(e[0])));e.exports=((e,t,n)=>{n=Object.assign({concurrency:Infinity,preserveOrder:true},n);const o=i(n.concurrency);const c=Array.from(e).map(e=>[e,o(()=>Promise.resolve(e).then(t))]);const s=i(n.preserveOrder?1:Infinity);return Promise.all(c.map(e=>s(()=>r(e)))).then(()=>{}).catch(e=>e instanceof EndError?e.value:Promise.reject(e))})},897:e=>{"use strict";e.exports=(e=>new Promise(t=>{t(e())}))},528:(e,t,n)=>{"use strict";const i=n(132);e.exports=Object.assign(new i,{Signale:i})},132:(e,t,n)=>{"use strict";const i=n(669);const r=n(622);const o=n(58);const c=n(808);const s=n(99);const a=n(235);const l=n(728);const f=n(881);const{green:u,grey:h,red:p,underline:d,yellow:y}=c;let g=false;const m=l.options.default;const _=l.name;class Signale{constructor(e={}){this._interactive=e.interactive||false;this._config=Object.assign(this.packageConfiguration,e.config);this._customTypes=Object.assign({},e.types);this._disabled=e.disabled||false;this._scopeName=e.scope||"";this._timers=e.timers||new Map;this._types=this._mergeTypes(f,this._customTypes);this._stream=e.stream||process.stdout;this._longestLabel=this._getLongestLabel();this._secrets=e.secrets||[];this._generalLogLevel=this._validateLogLevel(e.logLevel);Object.keys(this._types).forEach(e=>{this[e]=this._logger.bind(this,e)})}get _now(){return Date.now()}get scopeName(){return this._scopeName}get currentOptions(){return Object.assign({},{config:this._config,disabled:this._disabled,types:this._customTypes,interactive:this._interactive,timers:this._timers,stream:this._stream,secrets:this._secrets,logLevel:this._generalLogLevel})}get date(){return(new Date).toLocaleDateString()}get timestamp(){return(new Date).toLocaleTimeString()}get filename(){const e=Error.prepareStackTrace;Error.prepareStackTrace=((e,t)=>t);const{stack:t}=new Error;Error.prepareStackTrace=e;const n=t.map(e=>e.getFileName());const i=n.find(e=>{return e!==n[0]});return i?r.basename(i):"anonymous"}get packageConfiguration(){return a.sync(_,{defaults:m})}get _longestUnderlinedLabel(){return d(this._longestLabel)}get _logLevels(){return{info:0,timer:1,debug:2,warn:3,error:4}}set configuration(e){this._config=Object.assign(this.packageConfiguration,e)}_arrayify(e){return Array.isArray(e)?e:[e]}_timeSpan(e){return this._now-e}_getLongestLabel(){const{_types:e}=this;const t=Object.keys(e).map(t=>e[t].label);return t.reduce((e,t)=>e.length>t.length?e:t)}_validateLogLevel(e){return Object.keys(this._logLevels).includes(e)?e:"info"}_mergeTypes(e,t){const n=Object.assign({},e);Object.keys(t).forEach(e=>{n[e]=Object.assign({},n[e],t[e])});return n}_filterSecrets(e){const{_secrets:t}=this;if(t.length===0){return e}let n=e;t.forEach(e=>{n=n.replace(new RegExp(e,"g"),"[secure]")});return n}_formatStream(e){return this._arrayify(e)}_formatDate(){return`[${this.date}]`}_formatFilename(){return`[${this.filename}]`}_formatScopeName(){if(Array.isArray(this._scopeName)){const e=this._scopeName.filter(e=>e.length!==0);return`${e.map(e=>`[${e.trim()}]`).join(" ")}`}return`[${this._scopeName}]`}_formatTimestamp(){return`[${this.timestamp}]`}_formatMessage(e){return i.format(...this._arrayify(e))}_meta(){const e=[];if(this._config.displayDate){e.push(this._formatDate())}if(this._config.displayTimestamp){e.push(this._formatTimestamp())}if(this._config.displayFilename){e.push(this._formatFilename())}if(this._scopeName.length!==0&&this._config.displayScope){e.push(this._formatScopeName())}if(e.length!==0){e.push(`${s.pointerSmall}`);return e.map(e=>h(e))}return e}_hasAdditional({suffix:e,prefix:t},n){return e||t?"":this._formatMessage(n)}_buildSignale(e,...t){let[n,i]=[{},{}];if(t.length===1&&typeof t[0]==="object"&&t[0]!==null){if(t[0]instanceof Error){[n]=t}else{const[{prefix:e,message:r,suffix:o}]=t;i=Object.assign({},{suffix:o,prefix:e});n=r?this._formatMessage(r):this._hasAdditional(i,t)}}else{n=this._formatMessage(t)}const r=this._meta();if(i.prefix){if(this._config.underlinePrefix){r.push(d(i.prefix))}else{r.push(i.prefix)}}if(this._config.displayBadge&&e.badge){r.push(c[e.color](this._padEnd(e.badge,e.badge.length+1)))}if(this._config.displayLabel&&e.label){const t=this._config.uppercaseLabel?e.label.toUpperCase():e.label;if(this._config.underlineLabel){r.push(c[e.color](this._padEnd(d(t),this._longestUnderlinedLabel.length+1)))}else{r.push(c[e.color](this._padEnd(t,this._longestLabel.length+1)))}}if(n instanceof Error&&n.stack){const[e,...t]=n.stack.split("\n");if(this._config.underlineMessage){r.push(d(e))}else{r.push(e)}r.push(h(t.map(e=>e.replace(/^/,"\n")).join("")));return r.join(" ")}if(this._config.underlineMessage){r.push(d(n))}else{r.push(n)}if(i.suffix){if(this._config.underlineSuffix){r.push(d(i.suffix))}else{r.push(i.suffix)}}return r.join(" ")}_write(e,t){if(this._interactive&&e.isTTY&&g){o.moveCursor(e,0,-1);o.clearLine(e);o.cursorTo(e,0)}e.write(t+"\n");g=this._interactive}_log(e,t=this._stream,n){if(this.isEnabled()&&this._logLevels[n]>=this._logLevels[this._generalLogLevel]){this._formatStream(t).forEach(t=>{this._write(t,e)})}}_logger(e,...t){const{stream:n,logLevel:i}=this._types[e];const r=this._buildSignale(this._types[e],...t);this._log(this._filterSecrets(r),n,this._validateLogLevel(i))}_padEnd(e,t){e=String(e);t=parseInt(t,10)||0;if(e.length>=t){return e}if(String.prototype.padEnd){return e.padEnd(t)}t-=e.length;return e+" ".repeat(t)}addSecrets(e){if(!Array.isArray(e)){throw new TypeError("Argument must be an array.")}this._secrets.push(...e)}clearSecrets(){this._secrets=[]}config(e){this.configuration=e}disable(){this._disabled=true}enable(){this._disabled=false}isEnabled(){return!this._disabled}scope(...e){if(e.length===0){throw new Error("No scope name was defined.")}return new Signale(Object.assign(this.currentOptions,{scope:e}))}unscope(){this._scopeName=""}time(e){if(!e){e=`timer_${this._timers.size}`}this._timers.set(e,this._now);const t=this._meta();t.push(u(this._padEnd(this._types.start.badge,2)));if(this._config.underlineLabel){t.push(u(this._padEnd(d(e),this._longestUnderlinedLabel.length+1)))}else{t.push(u(this._padEnd(e,this._longestLabel.length+1)))}t.push("Initialized timer...");this._log(t.join(" "),this._stream,"timer");return e}timeEnd(e){if(!e&&this._timers.size){const t=e=>e.includes("timer_");e=[...this._timers.keys()].reduceRight((e,n)=>{return t(e)?e:t(n)?n:null})}if(this._timers.has(e)){const t=this._timeSpan(this._timers.get(e));this._timers.delete(e);const n=this._meta();n.push(p(this._padEnd(this._types.pause.badge,2)));if(this._config.underlineLabel){n.push(p(this._padEnd(d(e),this._longestUnderlinedLabel.length+1)))}else{n.push(p(this._padEnd(e,this._longestLabel.length+1)))}n.push("Timer run for:");n.push(y(t<1e3?t+"ms":(t/1e3).toFixed(2)+"s"));this._log(n.join(" "),this._stream,"timer");return{label:e,span:t}}}}e.exports=Signale},881:(e,t,n)=>{"use strict";const i=n(99);e.exports={error:{badge:i.cross,color:"red",label:"error",logLevel:"error"},fatal:{badge:i.cross,color:"red",label:"fatal",logLevel:"error"},fav:{badge:i("❤"),color:"magenta",label:"favorite",logLevel:"info"},info:{badge:i.info,color:"blue",label:"info",logLevel:"info"},star:{badge:i.star,color:"yellow",label:"star",logLevel:"info"},success:{badge:i.tick,color:"green",label:"success",logLevel:"info"},wait:{badge:i.ellipsis,color:"blue",label:"waiting",logLevel:"info"},warn:{badge:i.warning,color:"yellow",label:"warning",logLevel:"warn"},complete:{badge:i.checkboxOn,color:"cyan",label:"complete",logLevel:"info"},pending:{badge:i.checkboxOff,color:"magenta",label:"pending",logLevel:"info"},note:{badge:i.bullet,color:"blue",label:"note",logLevel:"info"},start:{badge:i.play,color:"green",label:"start",logLevel:"info"},pause:{badge:i.squareSmallFilled,color:"yellow",label:"pause",logLevel:"info"},debug:{badge:i("⬤"),color:"red",label:"debug",logLevel:"debug"},await:{badge:i.ellipsis,color:"blue",label:"awaiting",logLevel:"info"},watch:{badge:i.ellipsis,color:"yellow",label:"watching",logLevel:"info"},log:{badge:"",color:"",label:"",logLevel:"info"}}},551:e=>{"use strict";e.exports=(e=>{if(typeof e!=="string"){throw new TypeError("Expected a string, got "+typeof e)}if(e.charCodeAt(0)===65279){return e.slice(1)}return e})},728:e=>{"use strict";e.exports=JSON.parse('{"name":"signale","version":"1.4.0","description":"👋 Hackable console logger","license":"MIT","repository":"klaussinani/signale","author":{"name":"Klaus Sinani","email":"klaussinani@gmail.com","url":"https://klaussinani.github.io"},"maintainers":[{"name":"Mario Sinani","email":"mariosinani@protonmail.ch","url":"https://mariocfhq.github.io"}],"engines":{"node":">=6"},"files":["index.js","signale.js","types.js"],"keywords":["hackable","colorful","console","logger"],"scripts":{"test":"xo"},"dependencies":{"chalk":"^2.3.2","figures":"^2.0.0","pkg-conf":"^2.1.0"},"devDependencies":{"xo":"*"},"options":{"default":{"displayScope":true,"displayBadge":true,"displayDate":false,"displayFilename":false,"displayLabel":true,"displayTimestamp":false,"underlineLabel":true,"underlineMessage":false,"underlinePrefix":false,"underlineSuffix":false,"uppercaseLabel":false}},"xo":{"space":2}}')},808:e=>{"use strict";e.exports=require("@umijs/deps/compiled/chalk")},357:e=>{"use strict";e.exports=require("assert")},721:e=>{"use strict";e.exports=require("constants")},747:e=>{"use strict";e.exports=require("fs")},622:e=>{"use strict";e.exports=require("path")},58:e=>{"use strict";e.exports=require("readline")},413:e=>{"use strict";e.exports=require("stream")},669:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(n){if(t[n]){return t[n].exports}var i=t[n]={exports:{}};var r=true;try{e[n](i,i.exports,__nccwpck_require__);r=false}finally{if(r)delete t[n]}return i.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(528)})();