diff --git a/package.json b/package.json index 565756b37826234..5604072cf361425 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@zeit/next-typescript": "1.1.2-canary.0", "abort-controller": "3.0.0", "alex": "9.1.0", - "amphtml-validator": "1.0.33", + "amphtml-validator": "1.0.35", "async-sema": "3.0.1", "browserslist": "4.18.1", "cheerio": "0.22.0", diff --git a/packages/next/compiled/amphtml-validator/index.js b/packages/next/compiled/amphtml-validator/index.js index 27dd8c832ce353c..fee2d469cab90f3 100644 --- a/packages/next/compiled/amphtml-validator/index.js +++ b/packages/next/compiled/amphtml-validator/index.js @@ -1,4 +1,4 @@ -(()=>{var e={254:(e,t,r)=>{var n=r(361).EventEmitter;var o=r(81).spawn;var i=r(17);var s=i.dirname;var a=i.basename;var u=r(147);r(837).inherits(Command,n);t=e.exports=new Command;t.Command=Command;t.Option=Option;function Option(e,t){this.flags=e;this.required=~e.indexOf("<");this.optional=~e.indexOf("[");this.bool=!~e.indexOf("-no-");e=e.split(/[ ,|]+/);if(e.length>1&&!/^[[<]/.test(e[1]))this.short=e.shift();this.long=e.shift();this.description=t||""}Option.prototype.name=function(){return this.long.replace("--","").replace("no-","")};Option.prototype.attributeName=function(){return camelcase(this.name())};Option.prototype.is=function(e){return this.short===e||this.long===e};function Command(e){this.commands=[];this.options=[];this._execs={};this._allowUnknownOption=false;this._args=[];this._name=e||""}Command.prototype.command=function(e,t,r){if(typeof t==="object"&&t!==null){r=t;t=null}r=r||{};var n=e.split(/ +/);var o=new Command(n.shift());if(t){o.description(t);this.executables=true;this._execs[o._name]=true;if(r.isDefault)this.defaultExecutable=o._name}o._noHelp=!!r.noHelp;this.commands.push(o);o.parseExpectedArgs(n);o.parent=this;if(t)return this;return o};Command.prototype.arguments=function(e){return this.parseExpectedArgs(e.split(/ +/))};Command.prototype.addImplicitHelpCommand=function(){this.command("help [cmd]","display help for [cmd]")};Command.prototype.parseExpectedArgs=function(e){if(!e.length)return;var t=this;e.forEach((function(e){var r={required:false,name:"",variadic:false};switch(e[0]){case"<":r.required=true;r.name=e.slice(1,-1);break;case"[":r.name=e.slice(1,-1);break}if(r.name.length>3&&r.name.slice(-3)==="..."){r.variadic=true;r.name=r.name.slice(0,-3)}if(r.name){t._args.push(r)}}));return this};Command.prototype.action=function(e){var t=this;var listener=function(r,n){r=r||[];n=n||[];var o=t.parseOptions(n);outputHelpIfNecessary(t,o.unknown);if(o.unknown.length>0){t.unknownOption(o.unknown[0])}if(o.args.length)r=o.args.concat(r);t._args.forEach((function(e,n){if(e.required&&r[n]==null){t.missingArgument(e.name)}else if(e.variadic){if(n!==t._args.length-1){t.variadicArgNotLast(e.name)}r[n]=r.splice(n)}}));if(t._args.length){r[t._args.length]=t}else{r.push(t)}e.apply(t,r)};var r=this.parent||this;var n=r===this?"*":this._name;r.on("command:"+n,listener);if(this._alias)r.on("command:"+this._alias,listener);return this};Command.prototype.option=function(e,t,r,n){var o=this,i=new Option(e,t),s=i.name(),a=i.attributeName();if(typeof r!=="function"){if(r instanceof RegExp){var u=r;r=function(e,t){var r=u.exec(e);return r?r[0]:t}}else{n=r;r=null}}if(!i.bool||i.optional||i.required){if(!i.bool)n=true;if(n!==undefined){o[a]=n;i.defaultValue=n}}this.options.push(i);this.on("option:"+s,(function(e){if(e!==null&&r){e=r(e,o[a]===undefined?n:o[a])}if(typeof o[a]==="boolean"||typeof o[a]==="undefined"){if(e==null){o[a]=i.bool?n||true:false}else{o[a]=e}}else if(e!==null){o[a]=e}}));return this};Command.prototype.allowUnknownOption=function(e){this._allowUnknownOption=arguments.length===0||e;return this};Command.prototype.parse=function(e){if(this.executables)this.addImplicitHelpCommand();this.rawArgs=e;this._name=this._name||a(e[1],".js");if(this.executables&&e.length<3&&!this.defaultExecutable){e.push("--help")}var t=this.parseOptions(this.normalize(e.slice(2)));var r=this.args=t.args;var n=this.parseArgs(this.args,t.unknown);var o=n.args[0];var i=null;if(o){i=this.commands.filter((function(e){return e.alias()===o}))[0]}if(this._execs[o]&&typeof this._execs[o]!=="function"){return this.executeSubCommand(e,r,t.unknown)}else if(i){r[0]=i._name;return this.executeSubCommand(e,r,t.unknown)}else if(this.defaultExecutable){r.unshift(this.defaultExecutable);return this.executeSubCommand(e,r,t.unknown)}return n};Command.prototype.executeSubCommand=function(e,t,r){t=t.concat(r);if(!t.length)this.help();if(t[0]==="help"&&t.length===1)this.help();if(t[0]==="help"){t[0]=t[1];t[1]="--help"}var n=e[1];var l=a(n,".js")+"-"+t[0];var c,f=u.lstatSync(n).isSymbolicLink()?u.readlinkSync(n):n;if(f!==n&&f.charAt(0)!=="/"){f=i.join(s(n),f)}c=s(f);var p=i.join(c,l);var h=false;if(exists(p+".js")){l=p+".js";h=true}else if(exists(p)){l=p}t=t.slice(1);var m;if(process.platform!=="win32"){if(h){t.unshift(l);t=(process.execArgv||[]).concat(t);m=o(process.argv[0],t,{stdio:"inherit",customFds:[0,1,2]})}else{m=o(l,t,{stdio:"inherit",customFds:[0,1,2]})}}else{t.unshift(l);m=o(process.execPath,t,{stdio:"inherit"})}var d=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];d.forEach((function(e){process.on(e,(function(){if(m.killed===false&&m.exitCode===null){m.kill(e)}}))}));m.on("close",process.exit.bind(process));m.on("error",(function(e){if(e.code==="ENOENT"){console.error("\n %s(1) does not exist, try --help\n",l)}else if(e.code==="EACCES"){console.error("\n %s(1) not executable. try chmod or run with root\n",l)}process.exit(1)}));this.runningCommand=m};Command.prototype.normalize=function(e){var t=[],r,n,o;for(var i=0,s=e.length;i0){n=this.optionFor(e[i-1])}if(r==="--"){t=t.concat(e.slice(i));break}else if(n&&n.required){t.push(r)}else if(r.length>1&&r[0]==="-"&&r[1]!=="-"){r.slice(1).split("").forEach((function(e){t.push("-"+e)}))}else if(/^--/.test(r)&&~(o=r.indexOf("="))){t.push(r.slice(0,o),r.slice(o+1))}else{t.push(r)}}return t};Command.prototype.parseArgs=function(e,t){var r;if(e.length){r=e[0];if(this.listeners("command:"+r).length){this.emit("command:"+e.shift(),e,t)}else{this.emit("command:*",e)}}else{outputHelpIfNecessary(this,t);if(t.length>0){this.unknownOption(t[0])}}return this};Command.prototype.optionFor=function(e){for(var t=0,r=this.options.length;t1&&i[0]==="-"){s.push(i);if(a+1e){e=this.largestArgLength()}}if(this.commands&&this.commands.length){if(this.largestCommandLength()>e){e=this.largestCommandLength()}}return e};Command.prototype.optionHelp=function(){var e=this.padWidth();return this.options.map((function(t){return pad(t.flags,e)+" "+t.description+(t.bool&&t.defaultValue!==undefined?" (default: "+t.defaultValue+")":"")})).concat([pad("-h, --help",e)+" "+"output usage information"]).join("\n")};Command.prototype.commandHelp=function(){if(!this.commands.length)return"";var e=this.prepareCommands();var t=this.padWidth();return[" Commands:","",e.map((function(e){var r=e[1]?" "+e[1]:"";return(r?pad(e[0],t):e[0])+r})).join("\n").replace(/^/gm," "),""].join("\n")};Command.prototype.helpInformation=function(){var e=[];if(this._description){e=[" "+this._description,""];var t=this._argsDescription;if(t&&this._args.length){var r=this.padWidth();e.push(" Arguments:");e.push("");this._args.forEach((function(n){e.push(" "+pad(n.name,r)+" "+t[n.name])}));e.push("")}}var n=this._name;if(this._alias){n=n+"|"+this._alias}var o=[""," Usage: "+n+" "+this.usage(),""];var i=[];var s=this.commandHelp();if(s)i=[s];var a=[" Options:","",""+this.optionHelp().replace(/^/gm," "),""];return o.concat(e).concat(a).concat(i).join("\n")};Command.prototype.outputHelp=function(e){if(!e){e=function(e){return e}}process.stdout.write(e(this.helpInformation()));this.emit("--help")};Command.prototype.help=function(e){this.outputHelp(e);process.exit()};function camelcase(e){return e.split("-").reduce((function(e,t){return e+t[0].toUpperCase()+t.slice(1)}))}function pad(e,t){var r=Math.max(0,t-e.length);return e+Array(r+1).join(" ")}function outputHelpIfNecessary(e,t){t=t||[];for(var r=0;r":"["+t+"]"}function exists(e){try{if(u.statSync(e).isFile()){return true}}catch(e){return false}}},130:(e,t,r)=>{"use strict";var n=r(666);var o=[];e.exports=asap;function asap(e){var t;if(o.length){t=o.pop()}else{t=new RawTask}t.task=e;t.domain=process.domain;n(t)}function RawTask(){this.task=null;this.domain=null}RawTask.prototype.call=function(){if(this.domain){this.domain.enter()}var e=true;try{this.task.call();e=false;if(this.domain){this.domain.exit()}}finally{if(e){n.requestFlush()}this.task=null;this.domain=null;o.push(this)}}},666:(e,t,r)=>{"use strict";var n;var o=typeof setImmediate==="function";e.exports=rawAsap;function rawAsap(e){if(!i.length){requestFlush();s=true}i[i.length]=e}var i=[];var s=false;var a=0;var u=1024;function flush(){while(au){for(var t=0,r=i.length-a;t{var n={};e["exports"]=n;n.themes={};var o=r(837);var i=n.styles=r(537);var s=Object.defineProperties;var a=new RegExp(/[\r\n]+/g);n.supportsColor=r(863).supportsColor;if(typeof n.enabled==="undefined"){n.enabled=n.supportsColor()!==false}n.enable=function(){n.enabled=true};n.disable=function(){n.enabled=false};n.stripColors=n.strip=function(e){return(""+e).replace(/\x1B\[\d+m/g,"")};var u=n.stylize=function stylize(e,t){if(!n.enabled){return e+""}return i[t].open+e+i[t].close};var l=/[|\\{}()[\]^$+*?.]/g;var escapeStringRegexp=function(e){if(typeof e!=="string"){throw new TypeError("Expected a string")}return e.replace(l,"\\$&")};function build(e){var t=function builder(){return applyStyle.apply(builder,arguments)};t._styles=e;t.__proto__=f;return t}var c=function(){var e={};i.grey=i.gray;Object.keys(i).forEach((function(t){i[t].closeRe=new RegExp(escapeStringRegexp(i[t].close),"g");e[t]={get:function(){return build(this._styles.concat(t))}}}));return e}();var f=s((function colors(){}),c);function applyStyle(){var e=Array.prototype.slice.call(arguments);var t=e.map((function(e){if(e!==undefined&&e.constructor===String){return e}else{return o.inspect(e)}})).join(" ");if(!n.enabled||!t){return t}var r=t.indexOf("\n")!=-1;var s=this._styles;var u=s.length;while(u--){var l=i[s[u]];t=l.open+t.replace(l.closeRe,l.open)+l.close;if(r){t=t.replace(a,l.close+"\n"+l.open)}}return t}n.setTheme=function(e){if(typeof e==="string"){console.log("colors.setTheme now only accepts an object, not a string. "+"If you are trying to set a theme from a file, it is now your (the "+"caller's) responsibility to require the file. The old syntax "+"looked like colors.setTheme(__dirname + "+"'/../themes/generic-logging.js'); The new syntax looks like "+"colors.setTheme(require(__dirname + "+"'/../themes/generic-logging.js'));");return}for(var t in e){(function(t){n[t]=function(r){if(typeof e[t]==="object"){var o=r;for(var i in e[t]){o=n[e[t][i]](o)}return o}return n[e[t]](r)}})(t)}};function init(){var e={};Object.keys(c).forEach((function(t){e[t]={get:function(){return build([t])}}}));return e}var p=function sequencer(e,t){var r=t.split("");r=r.map(e);return r.join("")};n.trap=r(152);n.zalgo=r(565);n.maps={};n.maps.america=r(637);n.maps.zebra=r(590);n.maps.rainbow=r(297);n.maps.random=r(843);for(var h in n.maps){(function(e){n[e]=function(t){return p(n.maps[e],t)}})(h)}s(n,init())},152:e=>{e["exports"]=function runTheTrap(e,t){var r="";e=e||"Run the trap, drop the bass";e=e.split("");var n={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","۝","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};e.forEach((function(e){e=e.toLowerCase();var t=n[e]||[" "];var o=Math.floor(Math.random()*t.length);if(typeof n[e]!=="undefined"){r+=n[e][o]}else{r+=e}}));return r}},565:e=>{e["exports"]=function zalgo(e,t){e=e||" he is here ";var r={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]};var n=[].concat(r.up,r.down,r.mid);function randomNumber(e){var t=Math.floor(Math.random()*e);return t}function isChar(e){var t=false;n.filter((function(r){t=r===e}));return t}function heComes(e,t){var n="";var o;var i;t=t||{};t["up"]=typeof t["up"]!=="undefined"?t["up"]:true;t["mid"]=typeof t["mid"]!=="undefined"?t["mid"]:true;t["down"]=typeof t["down"]!=="undefined"?t["down"]:true;t["size"]=typeof t["size"]!=="undefined"?t["size"]:"maxi";e=e.split("");for(i in e){if(isChar(i)){continue}n=n+e[i];o={up:0,down:0,mid:0};switch(t.size){case"mini":o.up=randomNumber(8);o.mid=randomNumber(2);o.down=randomNumber(8);break;case"maxi":o.up=randomNumber(16)+3;o.mid=randomNumber(4)+1;o.down=randomNumber(64)+3;break;default:o.up=randomNumber(8)+1;o.mid=randomNumber(6)/2;o.down=randomNumber(8)+1;break}var s=["up","mid","down"];for(var a in s){var u=s[a];for(var l=0;l<=o[u];l++){if(t[u]){n=n+r[u][randomNumber(r[u].length)]}}}}return n}return heComes(e,t)}},637:(e,t,r)=>{var n=r(160);e["exports"]=function(){return function(e,t,r){if(e===" ")return e;switch(t%3){case 0:return n.red(e);case 1:return n.white(e);case 2:return n.blue(e)}}}()},297:(e,t,r)=>{var n=r(160);e["exports"]=function(){var e=["red","yellow","green","blue","magenta"];return function(t,r,o){if(t===" "){return t}else{return n[e[r++%e.length]](t)}}}()},843:(e,t,r)=>{var n=r(160);e["exports"]=function(){var e=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta"];return function(t,r,o){return t===" "?t:n[e[Math.round(Math.random()*(e.length-2))]](t)}}()},590:(e,t,r)=>{var n=r(160);e["exports"]=function(e,t,r){return t%2===0?e:n.inverse(e)}},537:e=>{var t={};e["exports"]=t;var r={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],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],grey:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(r).forEach((function(e){var n=r[e];var o=t[e]=[];o.open="["+n[0]+"m";o.close="["+n[1]+"m"}))},490:e=>{"use strict";e.exports=function(e,t){t=t||process.argv;var r=t.indexOf("--");var n=/^-{1,2}/.test(e)?"":"--";var o=t.indexOf(n+e);return o!==-1&&(r===-1?true:o{"use strict";var n=r(37);var o=r(490);var i=process.env;var s=void 0;if(o("no-color")||o("no-colors")||o("color=false")){s=false}else if(o("color")||o("colors")||o("color=true")||o("color=always")){s=true}if("FORCE_COLOR"in i){s=i.FORCE_COLOR.length===0||parseInt(i.FORCE_COLOR,10)!==0}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e){if(s===false){return 0}if(o("color=16m")||o("color=full")||o("color=truecolor")){return 3}if(o("color=256")){return 2}if(e&&!e.isTTY&&s!==true){return 0}var t=s?1:0;if(process.platform==="win32"){var r=n.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586){return Number(r[2])>=14931?3:2}return 1}if("CI"in i){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((function(e){return e in i}))||i.CI_NAME==="codeship"){return 1}return t}if("TEAMCITY_VERSION"in i){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0}if("TERM_PROGRAM"in i){var a=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(i.TERM)){return 2}if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)){return 1}if("COLORTERM"in i){return 1}if(i.TERM==="dumb"){return t}return t}function getSupportLevel(e){var t=supportsColor(e);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}},671:(e,t,r)=>{var n=r(160);e["exports"]=n},544:(e,t,r)=>{"use strict";e.exports=r(717)},594:(e,t,r)=>{"use strict";var n=r(666);function noop(){}var o=null;var i={};function getThen(e){try{return e.then}catch(e){o=e;return i}}function tryCallOne(e,t){try{return e(t)}catch(e){o=e;return i}}function tryCallTwo(e,t,r){try{e(t,r)}catch(e){o=e;return i}}e.exports=Promise;function Promise(e){if(typeof this!=="object"){throw new TypeError("Promises must be constructed via new")}if(typeof e!=="function"){throw new TypeError("Promise constructor's argument is not a function")}this._75=0;this._83=0;this._18=null;this._38=null;if(e===noop)return;doResolve(e,this)}Promise._47=null;Promise._71=null;Promise._44=noop;Promise.prototype.then=function(e,t){if(this.constructor!==Promise){return safeThen(this,e,t)}var r=new Promise(noop);handle(this,new Handler(e,t,r));return r};function safeThen(e,t,r){return new e.constructor((function(n,o){var i=new Promise(noop);i.then(n,o);handle(e,new Handler(t,r,i))}))}function handle(e,t){while(e._83===3){e=e._18}if(Promise._47){Promise._47(e)}if(e._83===0){if(e._75===0){e._75=1;e._38=t;return}if(e._75===1){e._75=2;e._38=[e._38,t];return}e._38.push(t);return}handleResolved(e,t)}function handleResolved(e,t){n((function(){var r=e._83===1?t.onFulfilled:t.onRejected;if(r===null){if(e._83===1){resolve(t.promise,e._18)}else{reject(t.promise,e._18)}return}var n=tryCallOne(r,e._18);if(n===i){reject(t.promise,o)}else{resolve(t.promise,n)}}))}function resolve(e,t){if(t===e){return reject(e,new TypeError("A promise cannot be resolved with itself."))}if(t&&(typeof t==="object"||typeof t==="function")){var r=getThen(t);if(r===i){return reject(e,o)}if(r===e.then&&t instanceof Promise){e._83=3;e._18=t;finale(e);return}else if(typeof r==="function"){doResolve(r.bind(t),e);return}}e._83=1;e._18=t;finale(e)}function reject(e,t){e._83=2;e._18=t;if(Promise._71){Promise._71(e,t)}finale(e)}function finale(e){if(e._75===1){handle(e,e._38);e._38=null}if(e._75===2){for(var t=0;t{"use strict";var n=r(594);e.exports=n;n.prototype.done=function(e,t){var r=arguments.length?this.then.apply(this,arguments):this;r.then(null,(function(e){setTimeout((function(){throw e}),0)}))}},889:(e,t,r)=>{"use strict";var n=r(594);e.exports=n;var o=valuePromise(true);var i=valuePromise(false);var s=valuePromise(null);var a=valuePromise(undefined);var u=valuePromise(0);var l=valuePromise("");function valuePromise(e){var t=new n(n._44);t._83=1;t._18=e;return t}n.resolve=function(e){if(e instanceof n)return e;if(e===null)return s;if(e===undefined)return a;if(e===true)return o;if(e===false)return i;if(e===0)return u;if(e==="")return l;if(typeof e==="object"||typeof e==="function"){try{var t=e.then;if(typeof t==="function"){return new n(t.bind(e))}}catch(e){return new n((function(t,r){r(e)}))}}return valuePromise(e)};n.all=function(e){var t=Array.prototype.slice.call(e);return new n((function(e,r){if(t.length===0)return e([]);var o=t.length;function res(i,s){if(s&&(typeof s==="object"||typeof s==="function")){if(s instanceof n&&s.then===n.prototype.then){while(s._83===3){s=s._18}if(s._83===1)return res(i,s._18);if(s._83===2)r(s._18);s.then((function(e){res(i,e)}),r);return}else{var a=s.then;if(typeof a==="function"){var u=new n(a.bind(s));u.then((function(e){res(i,e)}),r);return}}}t[i]=s;if(--o===0){e(t)}}for(var i=0;i{"use strict";var n=r(594);e.exports=n;n.prototype["finally"]=function(e){return this.then((function(t){return n.resolve(e()).then((function(){return t}))}),(function(t){return n.resolve(e()).then((function(){throw t}))}))}},717:(e,t,r)=>{"use strict";e.exports=r(594);r(188);r(409);r(889);r(445);r(959)},445:(e,t,r)=>{"use strict";var n=r(594);var o=r(130);e.exports=n;n.denodeify=function(e,t){if(typeof t==="number"&&t!==Infinity){return denodeifyWithCount(e,t)}else{return denodeifyWithoutCount(e)}};var i="function (err, res) {"+"if (err) { rj(err); } else { rs(res); }"+"}";function denodeifyWithCount(e,t){var r=[];for(var o=0;o "+t+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+i+";","var res;","switch (argLength) {",r.concat(["extra"]).map((function(e,t){return"case "+t+":"+"res = fn.call("+["self"].concat(r.slice(0,t)).concat("cb").join(",")+");"+"break;"})).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],s)(n,e)}n.nodeify=function(e){return function(){var t=Array.prototype.slice.call(arguments);var r=typeof t[t.length-1]==="function"?t.pop():null;var i=this;try{return e.apply(this,arguments).nodeify(r,i)}catch(e){if(r===null||typeof r=="undefined"){return new n((function(t,r){r(e)}))}else{o((function(){r.call(i,e)}))}}}};n.prototype.nodeify=function(e,t){if(typeof e!="function")return this;this.then((function(r){o((function(){e.call(t,null,r)}))}),(function(r){o((function(){e.call(t,r)}))}))}},959:(e,t,r)=>{"use strict";var n=r(594);e.exports=n;n.enableSynchronous=function(){n.prototype.isPending=function(){return this.getState()==0};n.prototype.isFulfilled=function(){return this.getState()==1};n.prototype.isRejected=function(){return this.getState()==2};n.prototype.getValue=function(){if(this._83===3){return this._18.getValue()}if(!this.isFulfilled()){throw new Error("Cannot get a value of an unfulfilled promise.")}return this._18};n.prototype.getReason=function(){if(this._83===3){return this._18.getReason()}if(!this.isRejected()){throw new Error("Cannot get a rejection reason of a non-rejected promise.")}return this._18};n.prototype.getState=function(){if(this._83===3){return this._18.getState()}if(this._83===-1||this._83===-2){return 0}return this._83}};n.disableSynchronous=function(){n.prototype.isPending=undefined;n.prototype.isFulfilled=undefined;n.prototype.isRejected=undefined;n.prototype.getValue=undefined;n.prototype.getReason=undefined;n.prototype.getState=undefined}},81:e=>{"use strict";e.exports=require("child_process")},639:e=>{"use strict";e.exports=require("domain")},361:e=>{"use strict";e.exports=require("events")},147:e=>{"use strict";e.exports=require("fs")},685:e=>{"use strict";e.exports=require("http")},687:e=>{"use strict";e.exports=require("https")},37:e=>{"use strict";e.exports=require("os")},17:e=>{"use strict";e.exports=require("path")},477:e=>{"use strict";e.exports=require("querystring")},310:e=>{"use strict";e.exports=require("url")},837:e=>{"use strict";e.exports=require("util")},144:e=>{"use strict";e.exports=require("vm")}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var o=t[r]={exports:{}};var i=true;try{e[r](o,o.exports,__nccwpck_require__);i=false}finally{if(i)delete t[r]}return o.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";var e=r; +(()=>{var e={130:(e,t,n)=>{"use strict";var r=n(666);var i=[];e.exports=asap;function asap(e){var t;if(i.length){t=i.pop()}else{t=new RawTask}t.task=e;t.domain=process.domain;r(t)}function RawTask(){this.task=null;this.domain=null}RawTask.prototype.call=function(){if(this.domain){this.domain.enter()}var e=true;try{this.task.call();e=false;if(this.domain){this.domain.exit()}}finally{if(e){r.requestFlush()}this.task=null;this.domain=null;i.push(this)}}},666:(e,t,n)=>{"use strict";var r;var i=typeof setImmediate==="function";e.exports=rawAsap;function rawAsap(e){if(!s.length){requestFlush();o=true}s[s.length]=e}var s=[];var o=false;var a=0;var l=1024;function flush(){while(al){for(var t=0,n=s.length-a;t{var r={};e["exports"]=r;r.themes={};var i=n(837);var s=r.styles=n(537);var o=Object.defineProperties;var a=new RegExp(/[\r\n]+/g);r.supportsColor=n(863).supportsColor;if(typeof r.enabled==="undefined"){r.enabled=r.supportsColor()!==false}r.enable=function(){r.enabled=true};r.disable=function(){r.enabled=false};r.stripColors=r.strip=function(e){return(""+e).replace(/\x1B\[\d+m/g,"")};var l=r.stylize=function stylize(e,t){if(!r.enabled){return e+""}var n=s[t];if(!n&&t in r){return r[t](e)}return n.open+e+n.close};var u=/[|\\{}()[\]^$+*?.]/g;var escapeStringRegexp=function(e){if(typeof e!=="string"){throw new TypeError("Expected a string")}return e.replace(u,"\\$&")};function build(e){var t=function builder(){return applyStyle.apply(builder,arguments)};t._styles=e;t.__proto__=h;return t}var c=function(){var e={};s.grey=s.gray;Object.keys(s).forEach((function(t){s[t].closeRe=new RegExp(escapeStringRegexp(s[t].close),"g");e[t]={get:function(){return build(this._styles.concat(t))}}}));return e}();var h=o((function colors(){}),c);function applyStyle(){var e=Array.prototype.slice.call(arguments);var t=e.map((function(e){if(e!=null&&e.constructor===String){return e}else{return i.inspect(e)}})).join(" ");if(!r.enabled||!t){return t}var n=t.indexOf("\n")!=-1;var o=this._styles;var l=o.length;while(l--){var u=s[o[l]];t=u.open+t.replace(u.closeRe,u.open)+u.close;if(n){t=t.replace(a,(function(e){return u.close+e+u.open}))}}return t}r.setTheme=function(e){if(typeof e==="string"){console.log("colors.setTheme now only accepts an object, not a string. "+"If you are trying to set a theme from a file, it is now your (the "+"caller's) responsibility to require the file. The old syntax "+"looked like colors.setTheme(__dirname + "+"'/../themes/generic-logging.js'); The new syntax looks like "+"colors.setTheme(require(__dirname + "+"'/../themes/generic-logging.js'));");return}for(var t in e){(function(t){r[t]=function(n){if(typeof e[t]==="object"){var i=n;for(var s in e[t]){i=r[e[t][s]](i)}return i}return r[e[t]](n)}})(t)}};function init(){var e={};Object.keys(c).forEach((function(t){e[t]={get:function(){return build([t])}}}));return e}var p=function sequencer(e,t){var n=t.split("");n=n.map(e);return n.join("")};r.trap=n(152);r.zalgo=n(565);r.maps={};r.maps.america=n(637)(r);r.maps.zebra=n(590)(r);r.maps.rainbow=n(297)(r);r.maps.random=n(843)(r);for(var f in r.maps){(function(e){r[e]=function(t){return p(r.maps[e],t)}})(f)}o(r,init())},152:e=>{e["exports"]=function runTheTrap(e,t){var n="";e=e||"Run the trap, drop the bass";e=e.split("");var r={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","۝","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};e.forEach((function(e){e=e.toLowerCase();var t=r[e]||[" "];var i=Math.floor(Math.random()*t.length);if(typeof r[e]!=="undefined"){n+=r[e][i]}else{n+=e}}));return n}},565:e=>{e["exports"]=function zalgo(e,t){e=e||" he is here ";var n={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]};var r=[].concat(n.up,n.down,n.mid);function randomNumber(e){var t=Math.floor(Math.random()*e);return t}function isChar(e){var t=false;r.filter((function(n){t=n===e}));return t}function heComes(e,t){var r="";var i;var s;t=t||{};t["up"]=typeof t["up"]!=="undefined"?t["up"]:true;t["mid"]=typeof t["mid"]!=="undefined"?t["mid"]:true;t["down"]=typeof t["down"]!=="undefined"?t["down"]:true;t["size"]=typeof t["size"]!=="undefined"?t["size"]:"maxi";e=e.split("");for(s in e){if(isChar(s)){continue}r=r+e[s];i={up:0,down:0,mid:0};switch(t.size){case"mini":i.up=randomNumber(8);i.mid=randomNumber(2);i.down=randomNumber(8);break;case"maxi":i.up=randomNumber(16)+3;i.mid=randomNumber(4)+1;i.down=randomNumber(64)+3;break;default:i.up=randomNumber(8)+1;i.mid=randomNumber(6)/2;i.down=randomNumber(8)+1;break}var o=["up","mid","down"];for(var a in o){var l=o[a];for(var u=0;u<=i[l];u++){if(t[l]){r=r+n[l][randomNumber(n[l].length)]}}}}return r}return heComes(e,t)}},637:e=>{e["exports"]=function(e){return function(t,n,r){if(t===" ")return t;switch(n%3){case 0:return e.red(t);case 1:return e.white(t);case 2:return e.blue(t)}}}},297:e=>{e["exports"]=function(e){var t=["red","yellow","green","blue","magenta"];return function(n,r,i){if(n===" "){return n}else{return e[t[r++%t.length]](n)}}}},843:e=>{e["exports"]=function(e){var t=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(n,r,i){return n===" "?n:e[t[Math.round(Math.random()*(t.length-2))]](n)}}},590:e=>{e["exports"]=function(e){return function(t,n,r){return n%2===0?t:e.inverse(t)}}},537:e=>{var t={};e["exports"]=t;var n={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],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],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(n).forEach((function(e){var r=n[e];var i=t[e]=[];i.open="["+r[0]+"m";i.close="["+r[1]+"m"}))},490:e=>{"use strict";e.exports=function(e,t){t=t||process.argv;var n=t.indexOf("--");var r=/^-{1,2}/.test(e)?"":"--";var i=t.indexOf(r+e);return i!==-1&&(n===-1?true:i{"use strict";var r=n(37);var i=n(490);var s=process.env;var o=void 0;if(i("no-color")||i("no-colors")||i("color=false")){o=false}else if(i("color")||i("colors")||i("color=true")||i("color=always")){o=true}if("FORCE_COLOR"in s){o=s.FORCE_COLOR.length===0||parseInt(s.FORCE_COLOR,10)!==0}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e){if(o===false){return 0}if(i("color=16m")||i("color=full")||i("color=truecolor")){return 3}if(i("color=256")){return 2}if(e&&!e.isTTY&&o!==true){return 0}var t=o?1:0;if(process.platform==="win32"){var n=r.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(n[0])>=10&&Number(n[2])>=10586){return Number(n[2])>=14931?3:2}return 1}if("CI"in s){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((function(e){return e in s}))||s.CI_NAME==="codeship"){return 1}return t}if("TEAMCITY_VERSION"in s){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0}if("TERM_PROGRAM"in s){var a=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(s.TERM)){return 2}if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)){return 1}if("COLORTERM"in s){return 1}if(s.TERM==="dumb"){return t}return t}function getSupportLevel(e){var t=supportsColor(e);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}},671:(e,t,n)=>{var r=n(160);e["exports"]=r},544:(e,t,n)=>{"use strict";e.exports=n(717)},594:(e,t,n)=>{"use strict";var r=n(666);function noop(){}var i=null;var s={};function getThen(e){try{return e.then}catch(e){i=e;return s}}function tryCallOne(e,t){try{return e(t)}catch(e){i=e;return s}}function tryCallTwo(e,t,n){try{e(t,n)}catch(e){i=e;return s}}e.exports=Promise;function Promise(e){if(typeof this!=="object"){throw new TypeError("Promises must be constructed via new")}if(typeof e!=="function"){throw new TypeError("Promise constructor's argument is not a function")}this._U=0;this._V=0;this._W=null;this._X=null;if(e===noop)return;doResolve(e,this)}Promise._Y=null;Promise._Z=null;Promise._0=noop;Promise.prototype.then=function(e,t){if(this.constructor!==Promise){return safeThen(this,e,t)}var n=new Promise(noop);handle(this,new Handler(e,t,n));return n};function safeThen(e,t,n){return new e.constructor((function(r,i){var s=new Promise(noop);s.then(r,i);handle(e,new Handler(t,n,s))}))}function handle(e,t){while(e._V===3){e=e._W}if(Promise._Y){Promise._Y(e)}if(e._V===0){if(e._U===0){e._U=1;e._X=t;return}if(e._U===1){e._U=2;e._X=[e._X,t];return}e._X.push(t);return}handleResolved(e,t)}function handleResolved(e,t){r((function(){var n=e._V===1?t.onFulfilled:t.onRejected;if(n===null){if(e._V===1){resolve(t.promise,e._W)}else{reject(t.promise,e._W)}return}var r=tryCallOne(n,e._W);if(r===s){reject(t.promise,i)}else{resolve(t.promise,r)}}))}function resolve(e,t){if(t===e){return reject(e,new TypeError("A promise cannot be resolved with itself."))}if(t&&(typeof t==="object"||typeof t==="function")){var n=getThen(t);if(n===s){return reject(e,i)}if(n===e.then&&t instanceof Promise){e._V=3;e._W=t;finale(e);return}else if(typeof n==="function"){doResolve(n.bind(t),e);return}}e._V=1;e._W=t;finale(e)}function reject(e,t){e._V=2;e._W=t;if(Promise._Z){Promise._Z(e,t)}finale(e)}function finale(e){if(e._U===1){handle(e,e._X);e._X=null}if(e._U===2){for(var t=0;t{"use strict";var r=n(594);e.exports=r;r.prototype.done=function(e,t){var n=arguments.length?this.then.apply(this,arguments):this;n.then(null,(function(e){setTimeout((function(){throw e}),0)}))}},889:(e,t,n)=>{"use strict";var r=n(594);e.exports=r;var i=valuePromise(true);var s=valuePromise(false);var o=valuePromise(null);var a=valuePromise(undefined);var l=valuePromise(0);var u=valuePromise("");function valuePromise(e){var t=new r(r._0);t._V=1;t._W=e;return t}r.resolve=function(e){if(e instanceof r)return e;if(e===null)return o;if(e===undefined)return a;if(e===true)return i;if(e===false)return s;if(e===0)return l;if(e==="")return u;if(typeof e==="object"||typeof e==="function"){try{var t=e.then;if(typeof t==="function"){return new r(t.bind(e))}}catch(e){return new r((function(t,n){n(e)}))}}return valuePromise(e)};var iterableToArray=function(e){if(typeof Array.from==="function"){iterableToArray=Array.from;return Array.from(e)}iterableToArray=function(e){return Array.prototype.slice.call(e)};return Array.prototype.slice.call(e)};r.all=function(e){var t=iterableToArray(e);return new r((function(e,n){if(t.length===0)return e([]);var i=t.length;function res(s,o){if(o&&(typeof o==="object"||typeof o==="function")){if(o instanceof r&&o.then===r.prototype.then){while(o._V===3){o=o._W}if(o._V===1)return res(s,o._W);if(o._V===2)n(o._W);o.then((function(e){res(s,e)}),n);return}else{var a=o.then;if(typeof a==="function"){var l=new r(a.bind(o));l.then((function(e){res(s,e)}),n);return}}}t[s]=o;if(--i===0){e(t)}}for(var s=0;s{"use strict";var r=n(594);e.exports=r;r.prototype.finally=function(e){return this.then((function(t){return r.resolve(e()).then((function(){return t}))}),(function(t){return r.resolve(e()).then((function(){throw t}))}))}},717:(e,t,n)=>{"use strict";e.exports=n(594);n(188);n(409);n(889);n(445);n(959)},445:(e,t,n)=>{"use strict";var r=n(594);var i=n(130);e.exports=r;r.denodeify=function(e,t){if(typeof t==="number"&&t!==Infinity){return denodeifyWithCount(e,t)}else{return denodeifyWithoutCount(e)}};var s="function (err, res) {"+"if (err) { rj(err); } else { rs(res); }"+"}";function denodeifyWithCount(e,t){var n=[];for(var i=0;i "+t+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+s+";","var res;","switch (argLength) {",n.concat(["extra"]).map((function(e,t){return"case "+t+":"+"res = fn.call("+["self"].concat(n.slice(0,t)).concat("cb").join(",")+");"+"break;"})).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],o)(r,e)}r.nodeify=function(e){return function(){var t=Array.prototype.slice.call(arguments);var n=typeof t[t.length-1]==="function"?t.pop():null;var s=this;try{return e.apply(this,arguments).nodeify(n,s)}catch(e){if(n===null||typeof n=="undefined"){return new r((function(t,n){n(e)}))}else{i((function(){n.call(s,e)}))}}}};r.prototype.nodeify=function(e,t){if(typeof e!="function")return this;this.then((function(n){i((function(){e.call(t,null,n)}))}),(function(n){i((function(){e.call(t,n)}))}))}},959:(e,t,n)=>{"use strict";var r=n(594);e.exports=r;r.enableSynchronous=function(){r.prototype.isPending=function(){return this.getState()==0};r.prototype.isFulfilled=function(){return this.getState()==1};r.prototype.isRejected=function(){return this.getState()==2};r.prototype.getValue=function(){if(this._V===3){return this._W.getValue()}if(!this.isFulfilled()){throw new Error("Cannot get a value of an unfulfilled promise.")}return this._W};r.prototype.getReason=function(){if(this._V===3){return this._W.getReason()}if(!this.isRejected()){throw new Error("Cannot get a rejection reason of a non-rejected promise.")}return this._W};r.prototype.getState=function(){if(this._V===3){return this._W.getState()}if(this._V===-1||this._V===-2){return 0}return this._V}};r.disableSynchronous=function(){r.prototype.isPending=undefined;r.prototype.isFulfilled=undefined;r.prototype.isRejected=undefined;r.prototype.getValue=undefined;r.prototype.getReason=undefined;r.prototype.getState=undefined}},81:e=>{"use strict";e.exports=require("child_process")},639:e=>{"use strict";e.exports=require("domain")},361:e=>{"use strict";e.exports=require("events")},147:e=>{"use strict";e.exports=require("fs")},685:e=>{"use strict";e.exports=require("http")},687:e=>{"use strict";e.exports=require("https")},37:e=>{"use strict";e.exports=require("os")},17:e=>{"use strict";e.exports=require("path")},477:e=>{"use strict";e.exports=require("querystring")},310:e=>{"use strict";e.exports=require("url")},837:e=>{"use strict";e.exports=require("util")},144:e=>{"use strict";e.exports=require("vm")},447:(e,t,n)=>{const r=n(361).EventEmitter;const i=n(81);const s=n(17);const o=n(147);class Help{constructor(){this.helpWidth=undefined;this.sortSubcommands=false;this.sortOptions=false}visibleCommands(e){const t=e.commands.filter((e=>!e._hidden));if(e._hasImplicitHelpCommand()){const n=e._helpCommandnameAndArgs.split(/ +/);const r=e.createCommand(n.shift()).helpOption(false);r.description(e._helpCommandDescription);r._parseExpectedArgs(n);t.push(r)}if(this.sortSubcommands){t.sort(((e,t)=>e.name().localeCompare(t.name())))}return t}visibleOptions(e){const t=e.options.filter((e=>!e.hidden));const n=e._hasHelpOption&&e._helpShortFlag&&!e._findOption(e._helpShortFlag);const r=e._hasHelpOption&&!e._findOption(e._helpLongFlag);if(n||r){let i;if(!n){i=e.createOption(e._helpLongFlag,e._helpDescription)}else if(!r){i=e.createOption(e._helpShortFlag,e._helpDescription)}else{i=e.createOption(e._helpFlags,e._helpDescription)}t.push(i)}if(this.sortOptions){const getSortKey=e=>e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"");t.sort(((e,t)=>getSortKey(e).localeCompare(getSortKey(t))))}return t}visibleArguments(e){if(e._argsDescription&&e._args.length){return e._args.map((t=>({term:t.name,description:e._argsDescription[t.name]||""})),0)}return[]}subcommandTerm(e){const t=e._args.map((e=>humanReadableArgName(e))).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce(((e,n)=>Math.max(e,t.subcommandTerm(n).length)),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce(((e,n)=>Math.max(e,t.optionTerm(n).length)),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce(((e,t)=>Math.max(e,t.term.length)),0)}commandUsage(e){let t=e._name;if(e._aliases[0]){t=t+"|"+e._aliases[0]}let n="";for(let t=e.parent;t;t=t.parent){n=t.name()+" "+n}return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.description()}optionDescription(e){if(e.negate){return e.description}const t=[];if(e.argChoices){t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`)}if(e.defaultValue!==undefined){t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}if(t.length>0){return`${e.description} (${t.join(", ")})`}return e.description}formatHelp(e,t){const n=t.padWidth(e,t);const r=t.helpWidth||80;const i=2;const s=2;function formatItem(e,o){if(o){const a=`${e.padEnd(n+s)}${o}`;return t.wrap(a,r-i,n+s)}return e}function formatList(e){return e.join("\n").replace(/^/gm," ".repeat(i))}let o=[`Usage: ${t.commandUsage(e)}`,""];const a=t.commandDescription(e);if(a.length>0){o=o.concat([a,""])}const l=t.visibleArguments(e).map((e=>formatItem(e.term,e.description)));if(l.length>0){o=o.concat(["Arguments:",formatList(l),""])}const u=t.visibleOptions(e).map((e=>formatItem(t.optionTerm(e),t.optionDescription(e))));if(u.length>0){o=o.concat(["Options:",formatList(u),""])}const c=t.visibleCommands(e).map((e=>formatItem(t.subcommandTerm(e),t.subcommandDescription(e))));if(c.length>0){o=o.concat(["Commands:",formatList(c),""])}return o.join("\n")}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,n,r=40){if(e.match(/[\n]\s+/))return e;const i=t-n;if(i{if(e.slice(-1)==="\n"){e=e.slice(0,e.length-1)}return(t>0?a:"")+e.trimRight()})).join("\n")}}class Option{constructor(e,t){this.flags=e;this.description=t||"";this.required=e.includes("<");this.optional=e.includes("[");this.variadic=/\w\.\.\.[>\]]$/.test(e);this.mandatory=false;const n=_parseOptionFlags(e);this.short=n.shortFlag;this.long=n.longFlag;this.negate=false;if(this.long){this.negate=this.long.startsWith("--no-")}this.defaultValue=undefined;this.defaultValueDescription=undefined;this.parseArg=undefined;this.hidden=false;this.argChoices=undefined}default(e,t){this.defaultValue=e;this.defaultValueDescription=t;return this}argParser(e){this.parseArg=e;return this}makeOptionMandatory(e=true){this.mandatory=!!e;return this}hideHelp(e=true){this.hidden=!!e;return this}_concatValue(e,t){if(t===this.defaultValue||!Array.isArray(t)){return[e]}return t.concat(e)}choices(e){this.argChoices=e;this.parseArg=(t,n)=>{if(!e.includes(t)){throw new InvalidOptionArgumentError(`Allowed choices are ${e.join(", ")}.`)}if(this.variadic){return this._concatValue(t,n)}return t};return this}name(){if(this.long){return this.long.replace(/^--/,"")}return this.short.replace(/^-/,"")}attributeName(){return camelcase(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}}class CommanderError extends Error{constructor(e,t,n){super(n);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name;this.code=t;this.exitCode=e;this.nestedError=undefined}}class InvalidOptionArgumentError extends CommanderError{constructor(e){super(1,"commander.invalidOptionArgument",e);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name}}class Command extends r{constructor(e){super();this.commands=[];this.options=[];this.parent=null;this._allowUnknownOption=false;this._allowExcessArguments=true;this._args=[];this.rawArgs=null;this._scriptPath=null;this._name=e||"";this._optionValues={};this._storeOptionsAsProperties=false;this._actionResults=[];this._actionHandler=null;this._executableHandler=false;this._executableFile=null;this._defaultCommandName=null;this._exitCallback=null;this._aliases=[];this._combineFlagAndOptionalValue=true;this._description="";this._argsDescription=undefined;this._enablePositionalOptions=false;this._passThroughOptions=false;this._outputConfiguration={writeOut:e=>process.stdout.write(e),writeErr:e=>process.stderr.write(e),getOutHelpWidth:()=>process.stdout.isTTY?process.stdout.columns:undefined,getErrHelpWidth:()=>process.stderr.isTTY?process.stderr.columns:undefined,outputError:(e,t)=>t(e)};this._hidden=false;this._hasHelpOption=true;this._helpFlags="-h, --help";this._helpDescription="display help for command";this._helpShortFlag="-h";this._helpLongFlag="--help";this._addImplicitHelpCommand=undefined;this._helpCommandName="help";this._helpCommandnameAndArgs="help [command]";this._helpCommandDescription="display help for command";this._helpConfiguration={}}command(e,t,n){let r=t;let i=n;if(typeof r==="object"&&r!==null){i=r;r=null}i=i||{};const s=e.split(/ +/);const o=this.createCommand(s.shift());if(r){o.description(r);o._executableHandler=true}if(i.isDefault)this._defaultCommandName=o._name;o._outputConfiguration=this._outputConfiguration;o._hidden=!!(i.noHelp||i.hidden);o._hasHelpOption=this._hasHelpOption;o._helpFlags=this._helpFlags;o._helpDescription=this._helpDescription;o._helpShortFlag=this._helpShortFlag;o._helpLongFlag=this._helpLongFlag;o._helpCommandName=this._helpCommandName;o._helpCommandnameAndArgs=this._helpCommandnameAndArgs;o._helpCommandDescription=this._helpCommandDescription;o._helpConfiguration=this._helpConfiguration;o._exitCallback=this._exitCallback;o._storeOptionsAsProperties=this._storeOptionsAsProperties;o._combineFlagAndOptionalValue=this._combineFlagAndOptionalValue;o._allowExcessArguments=this._allowExcessArguments;o._enablePositionalOptions=this._enablePositionalOptions;o._executableFile=i.executableFile||null;this.commands.push(o);o._parseExpectedArgs(s);o.parent=this;if(r)return this;return o}createCommand(e){return new Command(e)}createHelp(){return Object.assign(new Help,this.configureHelp())}configureHelp(e){if(e===undefined)return this._helpConfiguration;this._helpConfiguration=e;return this}configureOutput(e){if(e===undefined)return this._outputConfiguration;Object.assign(this._outputConfiguration,e);return this}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name");function checkExplicitNames(e){e.forEach((e=>{if(e._executableHandler&&!e._executableFile){throw new Error(`Must specify executableFile for deeply nested executable: ${e.name()}`)}checkExplicitNames(e.commands)}))}checkExplicitNames(e.commands);t=t||{};if(t.isDefault)this._defaultCommandName=e._name;if(t.noHelp||t.hidden)e._hidden=true;this.commands.push(e);e.parent=this;return this}arguments(e){return this._parseExpectedArgs(e.split(/ +/))}addHelpCommand(e,t){if(e===false){this._addImplicitHelpCommand=false}else{this._addImplicitHelpCommand=true;if(typeof e==="string"){this._helpCommandName=e.split(" ")[0];this._helpCommandnameAndArgs=e}this._helpCommandDescription=t||this._helpCommandDescription}return this}_hasImplicitHelpCommand(){if(this._addImplicitHelpCommand===undefined){return this.commands.length&&!this._actionHandler&&!this._findCommand("help")}return this._addImplicitHelpCommand}_parseExpectedArgs(e){if(!e.length)return;e.forEach((e=>{const t={required:false,name:"",variadic:false};switch(e[0]){case"<":t.required=true;t.name=e.slice(1,-1);break;case"[":t.name=e.slice(1,-1);break}if(t.name.length>3&&t.name.slice(-3)==="..."){t.variadic=true;t.name=t.name.slice(0,-3)}if(t.name){this._args.push(t)}}));this._args.forEach(((e,t)=>{if(e.variadic&&t{if(e.code!=="commander.executeSubCommandAsync"){throw e}else{}}}return this}_exit(e,t,n){if(this._exitCallback){this._exitCallback(new CommanderError(e,t,n))}process.exit(e)}action(e){const listener=t=>{const n=this._args.length;const r=t.slice(0,n);if(this._storeOptionsAsProperties){r[n]=this}else{r[n]=this.opts()}r.push(this);const i=e.apply(this,r);let s=this;while(s.parent){s=s.parent}s._actionResults.push(i)};this._actionHandler=listener;return this}createOption(e,t){return new Option(e,t)}addOption(e){const t=e.name();const n=e.attributeName();let r=e.defaultValue;if(e.negate||e.optional||e.required||typeof r==="boolean"){if(e.negate){const t=e.long.replace(/^--no-/,"--");r=this._findOption(t)?this._getOptionValue(n):true}if(r!==undefined){this._setOptionValue(n,r)}}this.options.push(e);this.on("option:"+t,(t=>{const i=this._getOptionValue(n);if(t!==null&&e.parseArg){try{t=e.parseArg(t,i===undefined?r:i)}catch(n){if(n.code==="commander.invalidOptionArgument"){const r=`error: option '${e.flags}' argument '${t}' is invalid. ${n.message}`;this._displayError(n.exitCode,n.code,r)}throw n}}else if(t!==null&&e.variadic){t=e._concatValue(t,i)}if(typeof i==="boolean"||typeof i==="undefined"){if(t==null){this._setOptionValue(n,e.negate?false:r||true)}else{this._setOptionValue(n,t)}}else if(t!==null){this._setOptionValue(n,e.negate?false:t)}}));return this}_optionEx(e,t,n,r,i){const s=this.createOption(t,n);s.makeOptionMandatory(!!e.mandatory);if(typeof r==="function"){s.default(i).argParser(r)}else if(r instanceof RegExp){const e=r;r=(t,n)=>{const r=e.exec(t);return r?r[0]:n};s.default(i).argParser(r)}else{s.default(r)}return this.addOption(s)}option(e,t,n,r){return this._optionEx({},e,t,n,r)}requiredOption(e,t,n,r){return this._optionEx({mandatory:true},e,t,n,r)}combineFlagAndOptionalValue(e=true){this._combineFlagAndOptionalValue=!!e;return this}allowUnknownOption(e=true){this._allowUnknownOption=!!e;return this}allowExcessArguments(e=true){this._allowExcessArguments=!!e;return this}enablePositionalOptions(e=true){this._enablePositionalOptions=!!e;return this}passThroughOptions(e=true){this._passThroughOptions=!!e;if(!!this.parent&&e&&!this.parent._enablePositionalOptions){throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)")}return this}storeOptionsAsProperties(e=true){this._storeOptionsAsProperties=!!e;if(this.options.length){throw new Error("call .storeOptionsAsProperties() before adding options")}return this}_setOptionValue(e,t){if(this._storeOptionsAsProperties){this[e]=t}else{this._optionValues[e]=t}}_getOptionValue(e){if(this._storeOptionsAsProperties){return this[e]}return this._optionValues[e]}parse(e,t){if(e!==undefined&&!Array.isArray(e)){throw new Error("first parameter to parse must be array or undefined")}t=t||{};if(e===undefined){e=process.argv;if(process.versions&&process.versions.electron){t.from="electron"}}this.rawArgs=e.slice();let n;switch(t.from){case undefined:case"node":this._scriptPath=e[1];n=e.slice(2);break;case"electron":if(process.defaultApp){this._scriptPath=e[1];n=e.slice(2)}else{n=e.slice(1)}break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}if(!this._scriptPath&&require.main){this._scriptPath=require.main.filename}this._name=this._name||this._scriptPath&&s.basename(this._scriptPath,s.extname(this._scriptPath));this._parseCommand([],n);return this}parseAsync(e,t){this.parse(e,t);return Promise.all(this._actionResults).then((()=>this))}_executeSubCommand(e,t){t=t.slice();let n=false;const r=[".js",".ts",".tsx",".mjs",".cjs"];this._checkForMissingMandatoryOptions();let a=this._scriptPath;if(!a&&require.main){a=require.main.filename}let l;try{const e=o.realpathSync(a);l=s.dirname(e)}catch(e){l="."}let u=s.basename(a,s.extname(a))+"-"+e._name;if(e._executableFile){u=e._executableFile}const c=s.join(l,u);if(o.existsSync(c)){u=c}else{r.forEach((e=>{if(o.existsSync(`${c}${e}`)){u=`${c}${e}`}}))}n=r.includes(s.extname(u));let h;if(process.platform!=="win32"){if(n){t.unshift(u);t=incrementNodeInspectorPort(process.execArgv).concat(t);h=i.spawn(process.argv[0],t,{stdio:"inherit"})}else{h=i.spawn(u,t,{stdio:"inherit"})}}else{t.unshift(u);t=incrementNodeInspectorPort(process.execArgv).concat(t);h=i.spawn(process.execPath,t,{stdio:"inherit"})}const p=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];p.forEach((e=>{process.on(e,(()=>{if(h.killed===false&&h.exitCode===null){h.kill(e)}}))}));const f=this._exitCallback;if(!f){h.on("close",process.exit.bind(process))}else{h.on("close",(()=>{f(new CommanderError(process.exitCode||0,"commander.executeSubCommandAsync","(close)"))}))}h.on("error",(t=>{if(t.code==="ENOENT"){const t=`'${u}' does not exist\n - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name`;throw new Error(t)}else if(t.code==="EACCES"){throw new Error(`'${u}' not executable`)}if(!f){process.exit(1)}else{const e=new CommanderError(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t;f(e)}}));this.runningCommand=h}_dispatchSubcommand(e,t,n){const r=this._findCommand(e);if(!r)this.help({error:true});if(r._executableHandler){this._executeSubCommand(r,t.concat(n))}else{r._parseCommand(t,n)}}_parseCommand(e,t){const n=this.parseOptions(t);e=e.concat(n.operands);t=n.unknown;this.args=e.concat(t);if(e&&this._findCommand(e[0])){this._dispatchSubcommand(e[0],e.slice(1),t)}else if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName){if(e.length===1){this.help()}else{this._dispatchSubcommand(e[1],[],[this._helpLongFlag])}}else if(this._defaultCommandName){outputHelpIfRequested(this,t);this._dispatchSubcommand(this._defaultCommandName,e,t)}else{if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName){this.help({error:true})}outputHelpIfRequested(this,n.unknown);this._checkForMissingMandatoryOptions();const checkForUnknownOptions=()=>{if(n.unknown.length>0){this.unknownOption(n.unknown[0])}};const r=`command:${this.name()}`;if(this._actionHandler){checkForUnknownOptions();const n=this.args.slice();this._args.forEach(((e,t)=>{if(e.required&&n[t]==null){this.missingArgument(e.name)}else if(e.variadic){n[t]=n.splice(t);n.length=Math.min(t+1,n.length)}}));if(n.length>this._args.length){this._excessArguments(n)}this._actionHandler(n);if(this.parent)this.parent.emit(r,e,t)}else if(this.parent&&this.parent.listenerCount(r)){checkForUnknownOptions();this.parent.emit(r,e,t)}else if(e.length){if(this._findCommand("*")){this._dispatchSubcommand("*",e,t)}else if(this.listenerCount("command:*")){this.emit("command:*",e,t)}else if(this.commands.length){this.unknownCommand()}else{checkForUnknownOptions()}}else if(this.commands.length){this.help({error:true})}else{checkForUnknownOptions()}}}_findCommand(e){if(!e)return undefined;return this.commands.find((t=>t._name===e||t._aliases.includes(e)))}_findOption(e){return this.options.find((t=>t.is(e)))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent){e.options.forEach((t=>{if(t.mandatory&&e._getOptionValue(t.attributeName())===undefined){e.missingMandatoryOptionValue(t)}}))}}parseOptions(e){const t=[];const n=[];let r=t;const i=e.slice();function maybeOption(e){return e.length>1&&e[0]==="-"}let s=null;while(i.length){const e=i.shift();if(e==="--"){if(r===n)r.push(e);r.push(...i);break}if(s&&!maybeOption(e)){this.emit(`option:${s.name()}`,e);continue}s=null;if(maybeOption(e)){const t=this._findOption(e);if(t){if(t.required){const e=i.shift();if(e===undefined)this.optionMissingArgument(t);this.emit(`option:${t.name()}`,e)}else if(t.optional){let e=null;if(i.length>0&&!maybeOption(i[0])){e=i.shift()}this.emit(`option:${t.name()}`,e)}else{this.emit(`option:${t.name()}`)}s=t.variadic?t:null;continue}}if(e.length>2&&e[0]==="-"&&e[1]!=="-"){const t=this._findOption(`-${e[1]}`);if(t){if(t.required||t.optional&&this._combineFlagAndOptionalValue){this.emit(`option:${t.name()}`,e.slice(2))}else{this.emit(`option:${t.name()}`);i.unshift(`-${e.slice(2)}`)}continue}}if(/^--[^=]+=/.test(e)){const t=e.indexOf("=");const n=this._findOption(e.slice(0,t));if(n&&(n.required||n.optional)){this.emit(`option:${n.name()}`,e.slice(t+1));continue}}if(maybeOption(e)){r=n}if((this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(e)){t.push(e);if(i.length>0)n.push(...i);break}else if(e===this._helpCommandName&&this._hasImplicitHelpCommand()){t.push(e);if(i.length>0)t.push(...i);break}else if(this._defaultCommandName){n.push(e);if(i.length>0)n.push(...i);break}}if(this._passThroughOptions){r.push(e);if(i.length>0)r.push(...i);break}r.push(e)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){const e={};const t=this.options.length;for(let n=0;n{this._outputConfiguration.writeOut(`${e}\n`);this._exit(0,"commander.version",e)}));return this}description(e,t){if(e===undefined&&t===undefined)return this._description;this._description=e;this._argsDescription=t;return this}alias(e){if(e===undefined)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler){t=this.commands[this.commands.length-1]}if(e===t._name)throw new Error("Command alias can't be the same as its name");t._aliases.push(e);return this}aliases(e){if(e===undefined)return this._aliases;e.forEach((e=>this.alias(e)));return this}usage(e){if(e===undefined){if(this._usage)return this._usage;const e=this._args.map((e=>humanReadableArgName(e)));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?e:[]).join(" ")}this._usage=e;return this}name(e){if(e===undefined)return this._name;this._name=e;return this}helpInformation(e){const t=this.createHelp();if(t.helpWidth===undefined){t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()}return t.formatHelp(this,t)}_getHelpContext(e){e=e||{};const t={error:!!e.error};let n;if(t.error){n=e=>this._outputConfiguration.writeErr(e)}else{n=e=>this._outputConfiguration.writeOut(e)}t.write=e.write||n;t.command=this;return t}outputHelp(e){let t;if(typeof e==="function"){t=e;e=undefined}const n=this._getHelpContext(e);const r=[];let i=this;while(i){r.push(i);i=i.parent}r.slice().reverse().forEach((e=>e.emit("beforeAllHelp",n)));this.emit("beforeHelp",n);let s=this.helpInformation(n);if(t){s=t(s);if(typeof s!=="string"&&!Buffer.isBuffer(s)){throw new Error("outputHelp callback must return a string or a Buffer")}}n.write(s);this.emit(this._helpLongFlag);this.emit("afterHelp",n);r.forEach((e=>e.emit("afterAllHelp",n)))}helpOption(e,t){if(typeof e==="boolean"){this._hasHelpOption=e;return this}this._helpFlags=e||this._helpFlags;this._helpDescription=t||this._helpDescription;const n=_parseOptionFlags(this._helpFlags);this._helpShortFlag=n.shortFlag;this._helpLongFlag=n.longFlag;return this}help(e){this.outputHelp(e);let t=process.exitCode||0;if(t===0&&e&&typeof e!=="function"&&e.error){t=1}this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){const n=["beforeAll","before","after","afterAll"];if(!n.includes(e)){throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${n.join("', '")}'`)}const r=`${e}Help`;this.on(r,(e=>{let n;if(typeof t==="function"){n=t({error:e.error,command:e.command})}else{n=t}if(n){e.write(`${n}\n`)}}));return this}}t=e.exports=new Command;t.program=t;t.Command=Command;t.Option=Option;t.CommanderError=CommanderError;t.InvalidOptionArgumentError=InvalidOptionArgumentError;t.Help=Help;function camelcase(e){return e.split("-").reduce(((e,t)=>e+t[0].toUpperCase()+t.slice(1)))}function outputHelpIfRequested(e,t){const n=e._hasHelpOption&&t.find((t=>t===e._helpLongFlag||t===e._helpShortFlag));if(n){e.outputHelp();e._exit(0,"commander.helpDisplayed","(outputHelp)")}}function humanReadableArgName(e){const t=e.name+(e.variadic===true?"...":"");return e.required?"<"+t+">":"["+t+"]"}function _parseOptionFlags(e){let t;let n;const r=e.split(/[ |,]+/);if(r.length>1&&!/^[[<]/.test(r[1]))t=r.shift();n=r.shift();if(!t&&/^-[^-]$/.test(n)){t=n;n=undefined}return{shortFlag:t,longFlag:n}}function incrementNodeInspectorPort(e){return e.map((e=>{if(!e.startsWith("--inspect")){return e}let t;let n="127.0.0.1";let r="9229";let i;if((i=e.match(/^(--inspect(-brk)?)$/))!==null){t=i[1]}else if((i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null){t=i[1];if(/^\d+$/.test(i[3])){r=i[3]}else{n=i[3]}}else if((i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null){t=i[1];n=i[3];r=i[4]}if(t&&r!=="0"){return`${t}=${n}:${parseInt(r)+1}`}return e}))}}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var i=t[n]={exports:{}};var s=true;try{e[n](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n={};(()=>{"use strict";var e=n; /** * @license * Copyright 2016 The AMP HTML Authors. All Rights Reserved. @@ -14,4 +14,4 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the license. - */const t=__nccwpck_require__(671);const n=__nccwpck_require__(147);const o=__nccwpck_require__(685);const i=__nccwpck_require__(687);const s=__nccwpck_require__(17);const a=__nccwpck_require__(254);const u=__nccwpck_require__(544);const l=__nccwpck_require__(477);const c=__nccwpck_require__(310);const f=__nccwpck_require__(837);const p=__nccwpck_require__(144);const h="amphtml-validator";function hasPrefix(e,t){return e.indexOf(t)==0}function isHttpOrHttpsUrl(e){return hasPrefix(e,"http://")||hasPrefix(e,"https://")}function readFromFile(e){return new u((function(t,r){n.readFile(e,"utf8",(function(e,n){if(e){r(e)}else{t(n.trim())}}))}))}function readFromReadable(e,t){return new u((function(r,n){const o=[];t.setEncoding("utf8");t.on("data",(function(e){o.push(e)}));t.on("end",(function(){r(o.join(""))}));t.on("error",(function(t){n(new Error("Could not read from "+e+" - "+t.message))}))}))}function readFromStdin(){return readFromReadable("stdin",process.stdin).then((function(e){process.stdin.resume();return e}))}function readFromUrl(e,t){return new u((function(r,n){const s=hasPrefix(e,"http://")?o:i;const a=s.request(e,(function(t){if(t.statusCode!==200){t.resume();n(new Error("Unable to fetch "+e+" - HTTP Status "+t.statusCode))}else{r(t)}}));a.setHeader("User-Agent",t);a.on("error",(function(t){n(new Error("Unable to fetch "+e+" - "+t.message))}));a.end()})).then(readFromReadable.bind(null,e))}function ValidationResult(){this.status="UNKNOWN";this.errors=[]}function ValidationError(){this.severity="UNKNOWN_SEVERITY";this.line=1;this.col=0;this.message="";this.specUrl=null;this.code="UNKNOWN_CODE";this.params=[]}function Validator(e){this.sandbox=p.createContext();try{new p.Script(e).runInContext(this.sandbox)}catch(e){throw new Error("Could not instantiate validator.js - "+e.message)}}Validator.prototype.validateString=function(e,t){const r=this.sandbox.amp.validator.validateString(e,t);const n=new ValidationResult;n.status=r.status;for(let e=0;e\n\n"+' Validates the files or urls provided as arguments. If "-" is\n'+" specified, reads from stdin instead.").option("--validator_js ","The Validator Javascript.\n"+" Latest published version by default, or\n"+" dist/validator_minified.js (built with build.py)\n"+" for development.","https://cdn.ampproject.org/v0/validator.js").option("--user-agent ","User agent string to use in requests.",h).option("--html_format ","The input format to be validated.\n"+" AMP by default.","AMP").option("--format ","How to format the output.\n"+' "color" displays errors/warnings/success in\n'+" red/orange/green.\n"+' "text" avoids color (e.g., useful in terminals not\n'+" supporting color).\n"+' "json" emits json corresponding to the ValidationResult\n'+" message in validator.proto.","color").parse(process.argv);if(a.args.length===0){a.outputHelp();process.exit(1)}if(a.html_format!=="AMP"&&a.html_format!=="AMP4ADS"&&a.html_format!=="AMP4EMAIL"){process.stderr.write('--html_format must be set to "AMP", "AMP4ADS", or "AMP4EMAIL".\n',(function(){process.exit(1)}))}if(a.format!=="color"&&a.format!=="text"&&a.format!=="json"){process.stderr.write('--format must be set to "color", "text", or "json".\n',(function(){process.exit(1)}))}const e=[];for(let t=0;te))}))}e.getInstance=getInstance;function newInstance(e){return new Validator(e)}e.newInstance=newInstance;function logValidationResult(e,n,r){if(n.status==="PASS"){process.stdout.write(e+": "+(r?t.green("PASS"):"PASS")+"\n")}for(let i=0;i\n\n"+' Validates the files or urls provided as arguments. If "-" is\n'+" specified, reads from stdin instead.").option("--validator_js ","The Validator Javascript.\n"+" Latest published version by default, or\n"+" dist/validator_minified.js (built with build.py)\n"+" for development.","https://cdn.ampproject.org/v0/validator_wasm.js").option("--user-agent ","User agent string to use in requests.",f).option("--html_format ","The input format to be validated.\n"+" AMP by default.","AMP").option("--format ","How to format the output.\n"+' "color" displays errors/warnings/success in\n'+" red/orange/green.\n"+' "text" avoids color (e.g., useful in terminals not\n'+" supporting color).\n"+' "json" emits json corresponding to the ValidationResult\n'+" message in validator.proto.","color").parse(process.argv);const e=a.opts();if(e.length===0){a.outputHelp();process.exit(1)}if(e.html_format!=="AMP"&&e.html_format!=="AMP4ADS"&&e.html_format!=="AMP4EMAIL"){process.stderr.write('--html_format must be set to "AMP", "AMP4ADS", or "AMP4EMAIL".\n',(function(){process.exit(1)}))}if(e.format!=="color"&&e.format!=="text"&&e.format!=="json"){process.stderr.write('--format must be set to "color", "text", or "json".\n',(function(){process.exit(1)}))}const n=[];for(let t=0;t=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" -amphtml-validator@1.0.33: - version "1.0.33" - resolved "https://registry.yarnpkg.com/amphtml-validator/-/amphtml-validator-1.0.33.tgz#ac2af219ba119f98280c33d538a7a1ae672de2be" - integrity sha512-NAamUl3flAku2DLc/OKEPpR2BQJBQTG+iW7HFeJDDvsZ0YwCmGsMAV97/HPaKAvUowzjA+79QjWr4z0Pscg+8g== +amphtml-validator@1.0.35: + version "1.0.35" + resolved "https://registry.yarnpkg.com/amphtml-validator/-/amphtml-validator-1.0.35.tgz#f4c50416ae1839bd27094509f1c6f37cd49c1f30" + integrity sha512-C67JzC5EI6pE2C0sAo/zuCp8ARDl1Vtt6/s0nr+3NuXDNOdkjclZUkaNAd/ZnsEvvYodkXZ6T/uww890IQh9dQ== dependencies: - colors "1.2.5" - commander "2.15.1" - promise "8.0.1" + colors "1.4.0" + commander "7.2.0" + promise "8.1.0" anser@1.4.9: version "1.4.9" @@ -6036,7 +6029,7 @@ arrify@^2.0.1: resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== -asap@^2.0.0, asap@~2.0.3: +asap@^2.0.0, asap@~2.0.3, asap@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" @@ -7417,11 +7410,7 @@ colorette@^1.2.1: resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== -colors@1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.2.5.tgz#89c7ad9a374bc030df8013241f68136ed8835afc" - -colors@^1.1.2: +colors@1.4.0, colors@^1.1.2: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== @@ -7444,14 +7433,15 @@ comma-separated-tokens@^1.0.0: resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz#632b80b6117867a158f1080ad498b2fbe7e3f5ea" integrity sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw== -commander@2.15.1: - version "2.15.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" - commander@2.20.0: version "2.20.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" +commander@7.2.0, commander@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== + commander@^2.20.0, commander@^2.9.0, commander@~2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -7465,11 +7455,6 @@ commander@^6.1.0, commander@^6.2.0: resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== -commander@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" - integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== - comment-json@3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/comment-json/-/comment-json-3.0.3.tgz#0cadacd6278602b57b8c51b1814dc5d311d228c4" @@ -16840,11 +16825,12 @@ promise.series@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/promise.series/-/promise.series-0.2.0.tgz#2cc7ebe959fc3a6619c04ab4dbdc9e452d864bbd" -promise@8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/promise/-/promise-8.0.1.tgz#e45d68b00a17647b6da711bf85ed6ed47208f450" +promise@8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/promise/-/promise-8.1.0.tgz#697c25c3dfe7435dd79fcd58c38a135888eaf05e" + integrity sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q== dependencies: - asap "~2.0.3" + asap "~2.0.6" promise@^7.1.1: version "7.3.1" @@ -20830,6 +20816,7 @@ webpack-bundle-analyzer@4.3.0: source-map "~0.6.1" "webpack-sources3@npm:webpack-sources@3.2.3", webpack-sources@^3.2.3: + name webpack-sources3 version "3.2.3" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==