@storybook/core-server 7.6.19 → 7.6.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -26,7 +26,7 @@ import { storyNameFromExport, toId } from '@storybook/csf';
26
26
  import { analyze } from '@storybook/docs-mdx';
27
27
  import prompts from 'prompts';
28
28
  import compression from 'compression';
29
- import ip from 'ip';
29
+ import os, { platform } from 'os';
30
30
  import detectFreePort from 'detect-port';
31
31
  import http2, { Agent, ServerResponse } from 'http';
32
32
  import https, { Agent as Agent$1 } from 'https';
@@ -46,7 +46,6 @@ import net, { isIP } from 'net';
46
46
  import semver6, { satisfies, gt } from 'semver';
47
47
  import deprecate6 from 'util-deprecate';
48
48
  import sort from 'semver/functions/sort';
49
- import os, { platform } from 'os';
50
49
  import EventEmitter$1, { EventEmitter, errorMonitor } from 'events';
51
50
  import process3 from 'process';
52
51
  import crypto2 from 'crypto';
@@ -64,13 +63,13 @@ var require_ansi_regex=__commonJS({"../../node_modules/ansi-regex/index.js"(expo
64
63
  `).map(line=>exec(line,columns,options)).join(`
65
64
  `);}});var require_boxen=__commonJS({"../../node_modules/boxen/index.js"(exports,module){var stringWidth=require_string_width(),chalk12=__require("chalk"),widestLine=require_widest_line(),cliBoxes=require_cli_boxes(),camelCase=require_camelcase(),ansiAlign=require_ansi_align(),wrapAnsi=require_wrap_ansi(),NL=`
66
65
  `,PAD=" ",terminalColumns=()=>{let{env,stdout,stderr}=process;return stdout&&stdout.columns?stdout.columns:stderr&&stderr.columns?stderr.columns:env.COLUMNS?Number.parseInt(env.COLUMNS,10):80},getObject=detail=>typeof detail=="number"?{top:detail,right:detail*3,bottom:detail,left:detail*3}:{top:0,right:0,bottom:0,left:0,...detail},getBorderChars=borderStyle=>{let sides=["topLeft","topRight","bottomRight","bottomLeft","vertical","horizontal"],chararacters;if(typeof borderStyle=="string"){if(chararacters=cliBoxes[borderStyle],!chararacters)throw new TypeError(`Invalid border style: ${borderStyle}`)}else {for(let side of sides)if(!borderStyle[side]||typeof borderStyle[side]!="string")throw new TypeError(`Invalid border style: ${side}`);chararacters=borderStyle;}return chararacters},makeTitle=(text,horizontal,alignement)=>{let title="",textWidth=stringWidth(text);switch(alignement){case"left":title=text+horizontal.slice(textWidth);break;case"right":title=horizontal.slice(textWidth)+text;break;default:horizontal=horizontal.slice(textWidth),horizontal.length%2===1?(horizontal=horizontal.slice(Math.floor(horizontal.length/2)),title=horizontal.slice(1)+text+horizontal):(horizontal=horizontal.slice(horizontal.length/2),title=horizontal+text+horizontal);break}return title},makeContentText=(text,padding,columns,align)=>{text=ansiAlign(text,{align});let lines=text.split(NL),textWidth=widestLine(text),max=columns-padding.left-padding.right;if(textWidth>max){let newLines=[];for(let line of lines){let createdLines=wrapAnsi(line,max,{hard:!0}),alignedLinesArray=ansiAlign(createdLines,{align}).split(`
67
- `),longestLength=Math.max(...alignedLinesArray.map(s=>stringWidth(s)));for(let alignedLine of alignedLinesArray){let paddedLine;switch(align){case"center":paddedLine=PAD.repeat((max-longestLength)/2)+alignedLine;break;case"right":paddedLine=PAD.repeat(max-longestLength)+alignedLine;break;default:paddedLine=alignedLine;break}newLines.push(paddedLine);}}lines=newLines;}align==="center"&&textWidth<max?lines=lines.map(line=>PAD.repeat((max-textWidth)/2)+line):align==="right"&&textWidth<max&&(lines=lines.map(line=>PAD.repeat(max-textWidth)+line));let paddingLeft=PAD.repeat(padding.left),paddingRight=PAD.repeat(padding.right);return lines=lines.map(line=>paddingLeft+line+paddingRight),lines=lines.map(line=>{if(columns-stringWidth(line)>0)switch(align){case"center":return line+PAD.repeat(columns-stringWidth(line));case"right":return line+PAD.repeat(columns-stringWidth(line));default:return line+PAD.repeat(columns-stringWidth(line))}return line}),padding.top>0&&(lines=new Array(padding.top).fill(PAD.repeat(columns)).concat(lines)),padding.bottom>0&&(lines=lines.concat(new Array(padding.bottom).fill(PAD.repeat(columns)))),lines.join(NL)},isHex=color=>color.match(/^#(?:[0-f]{3}){1,2}$/i),isColorValid=color=>typeof color=="string"&&(chalk12[color]||isHex(color)),getColorFn=color=>isHex(color)?chalk12.hex(color):chalk12[color],getBGColorFn=color=>isHex(color)?chalk12.bgHex(color):chalk12[camelCase(["bg",color])];module.exports=(text,options)=>{options={padding:0,borderStyle:"single",dimBorder:!1,textAlignment:"left",float:"left",titleAlignment:"left",...options},options.align&&(options.textAlignment=options.align);let BORDERS_WIDTH=2;if(options.borderColor&&!isColorValid(options.borderColor))throw new Error(`${options.borderColor} is not a valid borderColor`);if(options.backgroundColor&&!isColorValid(options.backgroundColor))throw new Error(`${options.backgroundColor} is not a valid backgroundColor`);let chars=getBorderChars(options.borderStyle),padding=getObject(options.padding),margin=getObject(options.margin),colorizeBorder=border=>{let newBorder=options.borderColor?getColorFn(options.borderColor)(border):border;return options.dimBorder?chalk12.dim(newBorder):newBorder},colorizeContent=content=>options.backgroundColor?getBGColorFn(options.backgroundColor)(content):content,columns=terminalColumns(),contentWidth=widestLine(wrapAnsi(text,columns-BORDERS_WIDTH,{hard:!0,trim:!1}))+padding.left+padding.right,title=options.title&&options.title.slice(0,columns-4-margin.left-margin.right);if(title&&(title=` ${title} `,stringWidth(title)>contentWidth&&(contentWidth=stringWidth(title))),margin.left&&margin.right&&contentWidth+BORDERS_WIDTH+margin.left+margin.right>columns){let multiplier=(columns-contentWidth-BORDERS_WIDTH)/(margin.left+margin.right);margin.left=Math.max(0,Math.floor(margin.left*multiplier)),margin.right=Math.max(0,Math.floor(margin.right*multiplier));}contentWidth=Math.min(contentWidth,columns-BORDERS_WIDTH-margin.left-margin.right),text=makeContentText(text,padding,contentWidth,options.textAlignment);let marginLeft=PAD.repeat(margin.left);if(options.float==="center"){let marginWidth=Math.max((columns-contentWidth-BORDERS_WIDTH)/2,0);marginLeft=PAD.repeat(marginWidth);}else if(options.float==="right"){let marginWidth=Math.max(columns-contentWidth-margin.right-BORDERS_WIDTH,0);marginLeft=PAD.repeat(marginWidth);}let horizontal=chars.horizontal.repeat(contentWidth),top=colorizeBorder(NL.repeat(margin.top)+marginLeft+chars.topLeft+(title?makeTitle(title,horizontal,options.titleAlignment):horizontal)+chars.topRight),bottom=colorizeBorder(marginLeft+chars.bottomLeft+horizontal+chars.bottomRight+NL.repeat(margin.bottom)),side=colorizeBorder(chars.vertical),LINE_SEPARATOR=contentWidth+BORDERS_WIDTH+margin.left>=columns?"":NL,middle=text.split(NL).map(line=>marginLeft+side+colorizeContent(line)+side).join(LINE_SEPARATOR);return top+LINE_SEPARATOR+middle+LINE_SEPARATOR+bottom};module.exports._borderStyles=cliBoxes;}});var require_crypto_random_string=__commonJS({"../../node_modules/crypto-random-string/index.js"(exports,module){var crypto3=__require("crypto");module.exports=length=>{if(!Number.isFinite(length))throw new TypeError("Expected a finite number");return crypto3.randomBytes(Math.ceil(length/2)).toString("hex").slice(0,length)};}});var require_unique_string=__commonJS({"../../node_modules/unique-string/index.js"(exports,module){var cryptoRandomString=require_crypto_random_string();module.exports=()=>cryptoRandomString(32);}});var require_temp_dir=__commonJS({"../../node_modules/temp-dir/index.js"(exports,module){var fs8=__require("fs"),os2=__require("os"),tempDirectorySymbol=Symbol.for("__RESOLVED_TEMP_DIRECTORY__");global[tempDirectorySymbol]||Object.defineProperty(global,tempDirectorySymbol,{value:fs8.realpathSync(os2.tmpdir())});module.exports=global[tempDirectorySymbol];}});var require_is_stream=__commonJS({"../../node_modules/is-stream/index.js"(exports,module){var isStream=stream2=>stream2!==null&&typeof stream2=="object"&&typeof stream2.pipe=="function";isStream.writable=stream2=>isStream(stream2)&&stream2.writable!==!1&&typeof stream2._write=="function"&&typeof stream2._writableState=="object";isStream.readable=stream2=>isStream(stream2)&&stream2.readable!==!1&&typeof stream2._read=="function"&&typeof stream2._readableState=="object";isStream.duplex=stream2=>isStream.writable(stream2)&&isStream.readable(stream2);isStream.transform=stream2=>isStream.duplex(stream2)&&typeof stream2._transform=="function";module.exports=isStream;}});var require_is_extglob=__commonJS({"../../node_modules/is-extglob/index.js"(exports,module){module.exports=function(str){if(typeof str!="string"||str==="")return !1;for(var match;match=/(\\).|([@?!+*]\(.*\))/g.exec(str);){if(match[2])return !0;str=str.slice(match.index+match[0].length);}return !1};}});var require_is_glob=__commonJS({"../../node_modules/is-glob/index.js"(exports,module){var isExtglob=require_is_extglob(),chars={"{":"}","(":")","[":"]"},strictCheck=function(str){if(str[0]==="!")return !0;for(var index=0,pipeIndex=-2,closeSquareIndex=-2,closeCurlyIndex=-2,closeParenIndex=-2,backSlashIndex=-2;index<str.length;){if(str[index]==="*"||str[index+1]==="?"&&/[\].+)]/.test(str[index])||closeSquareIndex!==-1&&str[index]==="["&&str[index+1]!=="]"&&(closeSquareIndex<index&&(closeSquareIndex=str.indexOf("]",index)),closeSquareIndex>index&&(backSlashIndex===-1||backSlashIndex>closeSquareIndex||(backSlashIndex=str.indexOf("\\",index),backSlashIndex===-1||backSlashIndex>closeSquareIndex)))||closeCurlyIndex!==-1&&str[index]==="{"&&str[index+1]!=="}"&&(closeCurlyIndex=str.indexOf("}",index),closeCurlyIndex>index&&(backSlashIndex=str.indexOf("\\",index),backSlashIndex===-1||backSlashIndex>closeCurlyIndex))||closeParenIndex!==-1&&str[index]==="("&&str[index+1]==="?"&&/[:!=]/.test(str[index+2])&&str[index+3]!==")"&&(closeParenIndex=str.indexOf(")",index),closeParenIndex>index&&(backSlashIndex=str.indexOf("\\",index),backSlashIndex===-1||backSlashIndex>closeParenIndex))||pipeIndex!==-1&&str[index]==="("&&str[index+1]!=="|"&&(pipeIndex<index&&(pipeIndex=str.indexOf("|",index)),pipeIndex!==-1&&str[pipeIndex+1]!==")"&&(closeParenIndex=str.indexOf(")",pipeIndex),closeParenIndex>pipeIndex&&(backSlashIndex=str.indexOf("\\",pipeIndex),backSlashIndex===-1||backSlashIndex>closeParenIndex))))return !0;if(str[index]==="\\"){var open2=str[index+1];index+=2;var close=chars[open2];if(close){var n=str.indexOf(close,index);n!==-1&&(index=n+1);}if(str[index]==="!")return !0}else index++;}return !1},relaxedCheck=function(str){if(str[0]==="!")return !0;for(var index=0;index<str.length;){if(/[*?{}()[\]]/.test(str[index]))return !0;if(str[index]==="\\"){var open2=str[index+1];index+=2;var close=chars[open2];if(close){var n=str.indexOf(close,index);n!==-1&&(index=n+1);}if(str[index]==="!")return !0}else index++;}return !1};module.exports=function(str,options){if(typeof str!="string"||str==="")return !1;if(isExtglob(str))return !0;var check=strictCheck;return options&&options.strict===!1&&(check=relaxedCheck),check(str)};}});var require_slash=__commonJS({"../../node_modules/del/node_modules/slash/index.js"(exports,module){module.exports=path13=>{let isExtendedLengthPath=/^\\\\\?\\/.test(path13),hasNonAscii=/[^\u0000-\u0080]+/.test(path13);return isExtendedLengthPath||hasNonAscii?path13:path13.replace(/\\/g,"/")};}});var require_polyfills=__commonJS({"../../node_modules/graceful-fs/polyfills.js"(exports,module){var constants=__require("constants"),origCwd=process.cwd,cwd=null,platform2=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return cwd||(cwd=origCwd.call(process)),cwd};try{process.cwd();}catch{}typeof process.chdir=="function"&&(chdir=process.chdir,process.chdir=function(d){cwd=null,chdir.call(process,d);},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,chdir));var chdir;module.exports=patch;function patch(fs8){constants.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&patchLchmod(fs8),fs8.lutimes||patchLutimes(fs8),fs8.chown=chownFix(fs8.chown),fs8.fchown=chownFix(fs8.fchown),fs8.lchown=chownFix(fs8.lchown),fs8.chmod=chmodFix(fs8.chmod),fs8.fchmod=chmodFix(fs8.fchmod),fs8.lchmod=chmodFix(fs8.lchmod),fs8.chownSync=chownFixSync(fs8.chownSync),fs8.fchownSync=chownFixSync(fs8.fchownSync),fs8.lchownSync=chownFixSync(fs8.lchownSync),fs8.chmodSync=chmodFixSync(fs8.chmodSync),fs8.fchmodSync=chmodFixSync(fs8.fchmodSync),fs8.lchmodSync=chmodFixSync(fs8.lchmodSync),fs8.stat=statFix(fs8.stat),fs8.fstat=statFix(fs8.fstat),fs8.lstat=statFix(fs8.lstat),fs8.statSync=statFixSync(fs8.statSync),fs8.fstatSync=statFixSync(fs8.fstatSync),fs8.lstatSync=statFixSync(fs8.lstatSync),fs8.chmod&&!fs8.lchmod&&(fs8.lchmod=function(path13,mode,cb){cb&&process.nextTick(cb);},fs8.lchmodSync=function(){}),fs8.chown&&!fs8.lchown&&(fs8.lchown=function(path13,uid,gid,cb){cb&&process.nextTick(cb);},fs8.lchownSync=function(){}),platform2==="win32"&&(fs8.rename=typeof fs8.rename!="function"?fs8.rename:function(fs$rename){function rename(from,to,cb){var start=Date.now(),backoff=0;fs$rename(from,to,function CB(er){if(er&&(er.code==="EACCES"||er.code==="EPERM"||er.code==="EBUSY")&&Date.now()-start<6e4){setTimeout(function(){fs8.stat(to,function(stater,st){stater&&stater.code==="ENOENT"?fs$rename(from,to,CB):cb(er);});},backoff),backoff<100&&(backoff+=10);return}cb&&cb(er);});}return Object.setPrototypeOf&&Object.setPrototypeOf(rename,fs$rename),rename}(fs8.rename)),fs8.read=typeof fs8.read!="function"?fs8.read:function(fs$read){function read(fd,buffer,offset,length,position,callback_){var callback;if(callback_&&typeof callback_=="function"){var eagCounter=0;callback=function(er,_,__){if(er&&er.code==="EAGAIN"&&eagCounter<10)return eagCounter++,fs$read.call(fs8,fd,buffer,offset,length,position,callback);callback_.apply(this,arguments);};}return fs$read.call(fs8,fd,buffer,offset,length,position,callback)}return Object.setPrototypeOf&&Object.setPrototypeOf(read,fs$read),read}(fs8.read),fs8.readSync=typeof fs8.readSync!="function"?fs8.readSync:function(fs$readSync){return function(fd,buffer,offset,length,position){for(var eagCounter=0;;)try{return fs$readSync.call(fs8,fd,buffer,offset,length,position)}catch(er){if(er.code==="EAGAIN"&&eagCounter<10){eagCounter++;continue}throw er}}}(fs8.readSync);function patchLchmod(fs9){fs9.lchmod=function(path13,mode,callback){fs9.open(path13,constants.O_WRONLY|constants.O_SYMLINK,mode,function(err,fd){if(err){callback&&callback(err);return}fs9.fchmod(fd,mode,function(err2){fs9.close(fd,function(err22){callback&&callback(err2||err22);});});});},fs9.lchmodSync=function(path13,mode){var fd=fs9.openSync(path13,constants.O_WRONLY|constants.O_SYMLINK,mode),threw=!0,ret;try{ret=fs9.fchmodSync(fd,mode),threw=!1;}finally{if(threw)try{fs9.closeSync(fd);}catch{}else fs9.closeSync(fd);}return ret};}function patchLutimes(fs9){constants.hasOwnProperty("O_SYMLINK")&&fs9.futimes?(fs9.lutimes=function(path13,at,mt,cb){fs9.open(path13,constants.O_SYMLINK,function(er,fd){if(er){cb&&cb(er);return}fs9.futimes(fd,at,mt,function(er2){fs9.close(fd,function(er22){cb&&cb(er2||er22);});});});},fs9.lutimesSync=function(path13,at,mt){var fd=fs9.openSync(path13,constants.O_SYMLINK),ret,threw=!0;try{ret=fs9.futimesSync(fd,at,mt),threw=!1;}finally{if(threw)try{fs9.closeSync(fd);}catch{}else fs9.closeSync(fd);}return ret}):fs9.futimes&&(fs9.lutimes=function(_a,_b,_c,cb){cb&&process.nextTick(cb);},fs9.lutimesSync=function(){});}function chmodFix(orig){return orig&&function(target,mode,cb){return orig.call(fs8,target,mode,function(er){chownErOk(er)&&(er=null),cb&&cb.apply(this,arguments);})}}function chmodFixSync(orig){return orig&&function(target,mode){try{return orig.call(fs8,target,mode)}catch(er){if(!chownErOk(er))throw er}}}function chownFix(orig){return orig&&function(target,uid,gid,cb){return orig.call(fs8,target,uid,gid,function(er){chownErOk(er)&&(er=null),cb&&cb.apply(this,arguments);})}}function chownFixSync(orig){return orig&&function(target,uid,gid){try{return orig.call(fs8,target,uid,gid)}catch(er){if(!chownErOk(er))throw er}}}function statFix(orig){return orig&&function(target,options,cb){typeof options=="function"&&(cb=options,options=null);function callback(er,stats){stats&&(stats.uid<0&&(stats.uid+=4294967296),stats.gid<0&&(stats.gid+=4294967296)),cb&&cb.apply(this,arguments);}return options?orig.call(fs8,target,options,callback):orig.call(fs8,target,callback)}}function statFixSync(orig){return orig&&function(target,options){var stats=options?orig.call(fs8,target,options):orig.call(fs8,target);return stats&&(stats.uid<0&&(stats.uid+=4294967296),stats.gid<0&&(stats.gid+=4294967296)),stats}}function chownErOk(er){if(!er||er.code==="ENOSYS")return !0;var nonroot=!process.getuid||process.getuid()!==0;return !!(nonroot&&(er.code==="EINVAL"||er.code==="EPERM"))}}}});var require_legacy_streams=__commonJS({"../../node_modules/graceful-fs/legacy-streams.js"(exports,module){var Stream3=__require("stream").Stream;module.exports=legacy;function legacy(fs8){return {ReadStream,WriteStream};function ReadStream(path13,options){if(!(this instanceof ReadStream))return new ReadStream(path13,options);Stream3.call(this);var self2=this;this.path=path13,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,options=options||{};for(var keys=Object.keys(options),index=0,length=keys.length;index<length;index++){var key=keys[index];this[key]=options[key];}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")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(){self2._read();});return}fs8.open(this.path,this.flags,this.mode,function(err,fd){if(err){self2.emit("error",err),self2.readable=!1;return}self2.fd=fd,self2.emit("open",fd),self2._read();});}function WriteStream(path13,options){if(!(this instanceof WriteStream))return new WriteStream(path13,options);Stream3.call(this),this.path=path13,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,options=options||{};for(var keys=Object.keys(options),index=0,length=keys.length;index<length;index++){var key=keys[index];this[key]=options[key];}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start;}this.busy=!1,this._queue=[],this.fd===null&&(this._open=fs8.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush());}}}});var require_clone=__commonJS({"../../node_modules/graceful-fs/clone.js"(exports,module){module.exports=clone2;var getPrototypeOf=Object.getPrototypeOf||function(obj){return obj.__proto__};function clone2(obj){if(obj===null||typeof obj!="object")return obj;if(obj instanceof Object)var copy2={__proto__:getPrototypeOf(obj)};else var copy2=Object.create(null);return Object.getOwnPropertyNames(obj).forEach(function(key){Object.defineProperty(copy2,key,Object.getOwnPropertyDescriptor(obj,key));}),copy2}}});var require_graceful_fs=__commonJS({"../../node_modules/graceful-fs/graceful-fs.js"(exports,module){var fs8=__require("fs"),polyfills=require_polyfills(),legacy=require_legacy_streams(),clone2=require_clone(),util=__require("util"),gracefulQueue,previousSymbol;typeof Symbol=="function"&&typeof Symbol.for=="function"?(gracefulQueue=Symbol.for("graceful-fs.queue"),previousSymbol=Symbol.for("graceful-fs.previous")):(gracefulQueue="___graceful-fs.queue",previousSymbol="___graceful-fs.previous");function noop3(){}function publishQueue(context,queue2){Object.defineProperty(context,gracefulQueue,{get:function(){return queue2}});}var debug=noop3;util.debuglog?debug=util.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(debug=function(){var m=util.format.apply(util,arguments);m="GFS4: "+m.split(/\n/).join(`
66
+ `),longestLength=Math.max(...alignedLinesArray.map(s=>stringWidth(s)));for(let alignedLine of alignedLinesArray){let paddedLine;switch(align){case"center":paddedLine=PAD.repeat((max-longestLength)/2)+alignedLine;break;case"right":paddedLine=PAD.repeat(max-longestLength)+alignedLine;break;default:paddedLine=alignedLine;break}newLines.push(paddedLine);}}lines=newLines;}align==="center"&&textWidth<max?lines=lines.map(line=>PAD.repeat((max-textWidth)/2)+line):align==="right"&&textWidth<max&&(lines=lines.map(line=>PAD.repeat(max-textWidth)+line));let paddingLeft=PAD.repeat(padding.left),paddingRight=PAD.repeat(padding.right);return lines=lines.map(line=>paddingLeft+line+paddingRight),lines=lines.map(line=>{if(columns-stringWidth(line)>0)switch(align){case"center":return line+PAD.repeat(columns-stringWidth(line));case"right":return line+PAD.repeat(columns-stringWidth(line));default:return line+PAD.repeat(columns-stringWidth(line))}return line}),padding.top>0&&(lines=new Array(padding.top).fill(PAD.repeat(columns)).concat(lines)),padding.bottom>0&&(lines=lines.concat(new Array(padding.bottom).fill(PAD.repeat(columns)))),lines.join(NL)},isHex=color=>color.match(/^#(?:[0-f]{3}){1,2}$/i),isColorValid=color=>typeof color=="string"&&(chalk12[color]||isHex(color)),getColorFn=color=>isHex(color)?chalk12.hex(color):chalk12[color],getBGColorFn=color=>isHex(color)?chalk12.bgHex(color):chalk12[camelCase(["bg",color])];module.exports=(text,options)=>{options={padding:0,borderStyle:"single",dimBorder:!1,textAlignment:"left",float:"left",titleAlignment:"left",...options},options.align&&(options.textAlignment=options.align);let BORDERS_WIDTH=2;if(options.borderColor&&!isColorValid(options.borderColor))throw new Error(`${options.borderColor} is not a valid borderColor`);if(options.backgroundColor&&!isColorValid(options.backgroundColor))throw new Error(`${options.backgroundColor} is not a valid backgroundColor`);let chars=getBorderChars(options.borderStyle),padding=getObject(options.padding),margin=getObject(options.margin),colorizeBorder=border=>{let newBorder=options.borderColor?getColorFn(options.borderColor)(border):border;return options.dimBorder?chalk12.dim(newBorder):newBorder},colorizeContent=content=>options.backgroundColor?getBGColorFn(options.backgroundColor)(content):content,columns=terminalColumns(),contentWidth=widestLine(wrapAnsi(text,columns-BORDERS_WIDTH,{hard:!0,trim:!1}))+padding.left+padding.right,title=options.title&&options.title.slice(0,columns-4-margin.left-margin.right);if(title&&(title=` ${title} `,stringWidth(title)>contentWidth&&(contentWidth=stringWidth(title))),margin.left&&margin.right&&contentWidth+BORDERS_WIDTH+margin.left+margin.right>columns){let multiplier=(columns-contentWidth-BORDERS_WIDTH)/(margin.left+margin.right);margin.left=Math.max(0,Math.floor(margin.left*multiplier)),margin.right=Math.max(0,Math.floor(margin.right*multiplier));}contentWidth=Math.min(contentWidth,columns-BORDERS_WIDTH-margin.left-margin.right),text=makeContentText(text,padding,contentWidth,options.textAlignment);let marginLeft=PAD.repeat(margin.left);if(options.float==="center"){let marginWidth=Math.max((columns-contentWidth-BORDERS_WIDTH)/2,0);marginLeft=PAD.repeat(marginWidth);}else if(options.float==="right"){let marginWidth=Math.max(columns-contentWidth-margin.right-BORDERS_WIDTH,0);marginLeft=PAD.repeat(marginWidth);}let horizontal=chars.horizontal.repeat(contentWidth),top=colorizeBorder(NL.repeat(margin.top)+marginLeft+chars.topLeft+(title?makeTitle(title,horizontal,options.titleAlignment):horizontal)+chars.topRight),bottom=colorizeBorder(marginLeft+chars.bottomLeft+horizontal+chars.bottomRight+NL.repeat(margin.bottom)),side=colorizeBorder(chars.vertical),LINE_SEPARATOR=contentWidth+BORDERS_WIDTH+margin.left>=columns?"":NL,middle=text.split(NL).map(line=>marginLeft+side+colorizeContent(line)+side).join(LINE_SEPARATOR);return top+LINE_SEPARATOR+middle+LINE_SEPARATOR+bottom};module.exports._borderStyles=cliBoxes;}});var require_crypto_random_string=__commonJS({"../../node_modules/crypto-random-string/index.js"(exports,module){var crypto3=__require("crypto");module.exports=length=>{if(!Number.isFinite(length))throw new TypeError("Expected a finite number");return crypto3.randomBytes(Math.ceil(length/2)).toString("hex").slice(0,length)};}});var require_unique_string=__commonJS({"../../node_modules/unique-string/index.js"(exports,module){var cryptoRandomString=require_crypto_random_string();module.exports=()=>cryptoRandomString(32);}});var require_temp_dir=__commonJS({"../../node_modules/temp-dir/index.js"(exports,module){var fs8=__require("fs"),os3=__require("os"),tempDirectorySymbol=Symbol.for("__RESOLVED_TEMP_DIRECTORY__");global[tempDirectorySymbol]||Object.defineProperty(global,tempDirectorySymbol,{value:fs8.realpathSync(os3.tmpdir())});module.exports=global[tempDirectorySymbol];}});var require_is_stream=__commonJS({"../../node_modules/is-stream/index.js"(exports,module){var isStream=stream2=>stream2!==null&&typeof stream2=="object"&&typeof stream2.pipe=="function";isStream.writable=stream2=>isStream(stream2)&&stream2.writable!==!1&&typeof stream2._write=="function"&&typeof stream2._writableState=="object";isStream.readable=stream2=>isStream(stream2)&&stream2.readable!==!1&&typeof stream2._read=="function"&&typeof stream2._readableState=="object";isStream.duplex=stream2=>isStream.writable(stream2)&&isStream.readable(stream2);isStream.transform=stream2=>isStream.duplex(stream2)&&typeof stream2._transform=="function";module.exports=isStream;}});var require_is_extglob=__commonJS({"../../node_modules/is-extglob/index.js"(exports,module){module.exports=function(str){if(typeof str!="string"||str==="")return !1;for(var match;match=/(\\).|([@?!+*]\(.*\))/g.exec(str);){if(match[2])return !0;str=str.slice(match.index+match[0].length);}return !1};}});var require_is_glob=__commonJS({"../../node_modules/is-glob/index.js"(exports,module){var isExtglob=require_is_extglob(),chars={"{":"}","(":")","[":"]"},strictCheck=function(str){if(str[0]==="!")return !0;for(var index=0,pipeIndex=-2,closeSquareIndex=-2,closeCurlyIndex=-2,closeParenIndex=-2,backSlashIndex=-2;index<str.length;){if(str[index]==="*"||str[index+1]==="?"&&/[\].+)]/.test(str[index])||closeSquareIndex!==-1&&str[index]==="["&&str[index+1]!=="]"&&(closeSquareIndex<index&&(closeSquareIndex=str.indexOf("]",index)),closeSquareIndex>index&&(backSlashIndex===-1||backSlashIndex>closeSquareIndex||(backSlashIndex=str.indexOf("\\",index),backSlashIndex===-1||backSlashIndex>closeSquareIndex)))||closeCurlyIndex!==-1&&str[index]==="{"&&str[index+1]!=="}"&&(closeCurlyIndex=str.indexOf("}",index),closeCurlyIndex>index&&(backSlashIndex=str.indexOf("\\",index),backSlashIndex===-1||backSlashIndex>closeCurlyIndex))||closeParenIndex!==-1&&str[index]==="("&&str[index+1]==="?"&&/[:!=]/.test(str[index+2])&&str[index+3]!==")"&&(closeParenIndex=str.indexOf(")",index),closeParenIndex>index&&(backSlashIndex=str.indexOf("\\",index),backSlashIndex===-1||backSlashIndex>closeParenIndex))||pipeIndex!==-1&&str[index]==="("&&str[index+1]!=="|"&&(pipeIndex<index&&(pipeIndex=str.indexOf("|",index)),pipeIndex!==-1&&str[pipeIndex+1]!==")"&&(closeParenIndex=str.indexOf(")",pipeIndex),closeParenIndex>pipeIndex&&(backSlashIndex=str.indexOf("\\",pipeIndex),backSlashIndex===-1||backSlashIndex>closeParenIndex))))return !0;if(str[index]==="\\"){var open2=str[index+1];index+=2;var close=chars[open2];if(close){var n=str.indexOf(close,index);n!==-1&&(index=n+1);}if(str[index]==="!")return !0}else index++;}return !1},relaxedCheck=function(str){if(str[0]==="!")return !0;for(var index=0;index<str.length;){if(/[*?{}()[\]]/.test(str[index]))return !0;if(str[index]==="\\"){var open2=str[index+1];index+=2;var close=chars[open2];if(close){var n=str.indexOf(close,index);n!==-1&&(index=n+1);}if(str[index]==="!")return !0}else index++;}return !1};module.exports=function(str,options){if(typeof str!="string"||str==="")return !1;if(isExtglob(str))return !0;var check=strictCheck;return options&&options.strict===!1&&(check=relaxedCheck),check(str)};}});var require_slash=__commonJS({"../../node_modules/del/node_modules/slash/index.js"(exports,module){module.exports=path13=>{let isExtendedLengthPath=/^\\\\\?\\/.test(path13),hasNonAscii=/[^\u0000-\u0080]+/.test(path13);return isExtendedLengthPath||hasNonAscii?path13:path13.replace(/\\/g,"/")};}});var require_polyfills=__commonJS({"../../node_modules/graceful-fs/polyfills.js"(exports,module){var constants=__require("constants"),origCwd=process.cwd,cwd=null,platform2=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return cwd||(cwd=origCwd.call(process)),cwd};try{process.cwd();}catch{}typeof process.chdir=="function"&&(chdir=process.chdir,process.chdir=function(d){cwd=null,chdir.call(process,d);},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,chdir));var chdir;module.exports=patch;function patch(fs8){constants.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&patchLchmod(fs8),fs8.lutimes||patchLutimes(fs8),fs8.chown=chownFix(fs8.chown),fs8.fchown=chownFix(fs8.fchown),fs8.lchown=chownFix(fs8.lchown),fs8.chmod=chmodFix(fs8.chmod),fs8.fchmod=chmodFix(fs8.fchmod),fs8.lchmod=chmodFix(fs8.lchmod),fs8.chownSync=chownFixSync(fs8.chownSync),fs8.fchownSync=chownFixSync(fs8.fchownSync),fs8.lchownSync=chownFixSync(fs8.lchownSync),fs8.chmodSync=chmodFixSync(fs8.chmodSync),fs8.fchmodSync=chmodFixSync(fs8.fchmodSync),fs8.lchmodSync=chmodFixSync(fs8.lchmodSync),fs8.stat=statFix(fs8.stat),fs8.fstat=statFix(fs8.fstat),fs8.lstat=statFix(fs8.lstat),fs8.statSync=statFixSync(fs8.statSync),fs8.fstatSync=statFixSync(fs8.fstatSync),fs8.lstatSync=statFixSync(fs8.lstatSync),fs8.chmod&&!fs8.lchmod&&(fs8.lchmod=function(path13,mode,cb){cb&&process.nextTick(cb);},fs8.lchmodSync=function(){}),fs8.chown&&!fs8.lchown&&(fs8.lchown=function(path13,uid,gid,cb){cb&&process.nextTick(cb);},fs8.lchownSync=function(){}),platform2==="win32"&&(fs8.rename=typeof fs8.rename!="function"?fs8.rename:function(fs$rename){function rename(from,to,cb){var start=Date.now(),backoff=0;fs$rename(from,to,function CB(er){if(er&&(er.code==="EACCES"||er.code==="EPERM"||er.code==="EBUSY")&&Date.now()-start<6e4){setTimeout(function(){fs8.stat(to,function(stater,st){stater&&stater.code==="ENOENT"?fs$rename(from,to,CB):cb(er);});},backoff),backoff<100&&(backoff+=10);return}cb&&cb(er);});}return Object.setPrototypeOf&&Object.setPrototypeOf(rename,fs$rename),rename}(fs8.rename)),fs8.read=typeof fs8.read!="function"?fs8.read:function(fs$read){function read(fd,buffer,offset,length,position,callback_){var callback;if(callback_&&typeof callback_=="function"){var eagCounter=0;callback=function(er,_,__){if(er&&er.code==="EAGAIN"&&eagCounter<10)return eagCounter++,fs$read.call(fs8,fd,buffer,offset,length,position,callback);callback_.apply(this,arguments);};}return fs$read.call(fs8,fd,buffer,offset,length,position,callback)}return Object.setPrototypeOf&&Object.setPrototypeOf(read,fs$read),read}(fs8.read),fs8.readSync=typeof fs8.readSync!="function"?fs8.readSync:function(fs$readSync){return function(fd,buffer,offset,length,position){for(var eagCounter=0;;)try{return fs$readSync.call(fs8,fd,buffer,offset,length,position)}catch(er){if(er.code==="EAGAIN"&&eagCounter<10){eagCounter++;continue}throw er}}}(fs8.readSync);function patchLchmod(fs9){fs9.lchmod=function(path13,mode,callback){fs9.open(path13,constants.O_WRONLY|constants.O_SYMLINK,mode,function(err,fd){if(err){callback&&callback(err);return}fs9.fchmod(fd,mode,function(err2){fs9.close(fd,function(err22){callback&&callback(err2||err22);});});});},fs9.lchmodSync=function(path13,mode){var fd=fs9.openSync(path13,constants.O_WRONLY|constants.O_SYMLINK,mode),threw=!0,ret;try{ret=fs9.fchmodSync(fd,mode),threw=!1;}finally{if(threw)try{fs9.closeSync(fd);}catch{}else fs9.closeSync(fd);}return ret};}function patchLutimes(fs9){constants.hasOwnProperty("O_SYMLINK")&&fs9.futimes?(fs9.lutimes=function(path13,at,mt,cb){fs9.open(path13,constants.O_SYMLINK,function(er,fd){if(er){cb&&cb(er);return}fs9.futimes(fd,at,mt,function(er2){fs9.close(fd,function(er22){cb&&cb(er2||er22);});});});},fs9.lutimesSync=function(path13,at,mt){var fd=fs9.openSync(path13,constants.O_SYMLINK),ret,threw=!0;try{ret=fs9.futimesSync(fd,at,mt),threw=!1;}finally{if(threw)try{fs9.closeSync(fd);}catch{}else fs9.closeSync(fd);}return ret}):fs9.futimes&&(fs9.lutimes=function(_a,_b,_c,cb){cb&&process.nextTick(cb);},fs9.lutimesSync=function(){});}function chmodFix(orig){return orig&&function(target,mode,cb){return orig.call(fs8,target,mode,function(er){chownErOk(er)&&(er=null),cb&&cb.apply(this,arguments);})}}function chmodFixSync(orig){return orig&&function(target,mode){try{return orig.call(fs8,target,mode)}catch(er){if(!chownErOk(er))throw er}}}function chownFix(orig){return orig&&function(target,uid,gid,cb){return orig.call(fs8,target,uid,gid,function(er){chownErOk(er)&&(er=null),cb&&cb.apply(this,arguments);})}}function chownFixSync(orig){return orig&&function(target,uid,gid){try{return orig.call(fs8,target,uid,gid)}catch(er){if(!chownErOk(er))throw er}}}function statFix(orig){return orig&&function(target,options,cb){typeof options=="function"&&(cb=options,options=null);function callback(er,stats){stats&&(stats.uid<0&&(stats.uid+=4294967296),stats.gid<0&&(stats.gid+=4294967296)),cb&&cb.apply(this,arguments);}return options?orig.call(fs8,target,options,callback):orig.call(fs8,target,callback)}}function statFixSync(orig){return orig&&function(target,options){var stats=options?orig.call(fs8,target,options):orig.call(fs8,target);return stats&&(stats.uid<0&&(stats.uid+=4294967296),stats.gid<0&&(stats.gid+=4294967296)),stats}}function chownErOk(er){if(!er||er.code==="ENOSYS")return !0;var nonroot=!process.getuid||process.getuid()!==0;return !!(nonroot&&(er.code==="EINVAL"||er.code==="EPERM"))}}}});var require_legacy_streams=__commonJS({"../../node_modules/graceful-fs/legacy-streams.js"(exports,module){var Stream3=__require("stream").Stream;module.exports=legacy;function legacy(fs8){return {ReadStream,WriteStream};function ReadStream(path13,options){if(!(this instanceof ReadStream))return new ReadStream(path13,options);Stream3.call(this);var self2=this;this.path=path13,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,options=options||{};for(var keys=Object.keys(options),index=0,length=keys.length;index<length;index++){var key=keys[index];this[key]=options[key];}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")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(){self2._read();});return}fs8.open(this.path,this.flags,this.mode,function(err,fd){if(err){self2.emit("error",err),self2.readable=!1;return}self2.fd=fd,self2.emit("open",fd),self2._read();});}function WriteStream(path13,options){if(!(this instanceof WriteStream))return new WriteStream(path13,options);Stream3.call(this),this.path=path13,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,options=options||{};for(var keys=Object.keys(options),index=0,length=keys.length;index<length;index++){var key=keys[index];this[key]=options[key];}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start;}this.busy=!1,this._queue=[],this.fd===null&&(this._open=fs8.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush());}}}});var require_clone=__commonJS({"../../node_modules/graceful-fs/clone.js"(exports,module){module.exports=clone2;var getPrototypeOf=Object.getPrototypeOf||function(obj){return obj.__proto__};function clone2(obj){if(obj===null||typeof obj!="object")return obj;if(obj instanceof Object)var copy2={__proto__:getPrototypeOf(obj)};else var copy2=Object.create(null);return Object.getOwnPropertyNames(obj).forEach(function(key){Object.defineProperty(copy2,key,Object.getOwnPropertyDescriptor(obj,key));}),copy2}}});var require_graceful_fs=__commonJS({"../../node_modules/graceful-fs/graceful-fs.js"(exports,module){var fs8=__require("fs"),polyfills=require_polyfills(),legacy=require_legacy_streams(),clone2=require_clone(),util=__require("util"),gracefulQueue,previousSymbol;typeof Symbol=="function"&&typeof Symbol.for=="function"?(gracefulQueue=Symbol.for("graceful-fs.queue"),previousSymbol=Symbol.for("graceful-fs.previous")):(gracefulQueue="___graceful-fs.queue",previousSymbol="___graceful-fs.previous");function noop3(){}function publishQueue(context,queue2){Object.defineProperty(context,gracefulQueue,{get:function(){return queue2}});}var debug=noop3;util.debuglog?debug=util.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(debug=function(){var m=util.format.apply(util,arguments);m="GFS4: "+m.split(/\n/).join(`
68
67
  GFS4: `),console.error(m);});fs8[gracefulQueue]||(queue=global[gracefulQueue]||[],publishQueue(fs8,queue),fs8.close=function(fs$close){function close(fd,cb){return fs$close.call(fs8,fd,function(err){err||resetQueue(),typeof cb=="function"&&cb.apply(this,arguments);})}return Object.defineProperty(close,previousSymbol,{value:fs$close}),close}(fs8.close),fs8.closeSync=function(fs$closeSync){function closeSync(fd){fs$closeSync.apply(fs8,arguments),resetQueue();}return Object.defineProperty(closeSync,previousSymbol,{value:fs$closeSync}),closeSync}(fs8.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){debug(fs8[gracefulQueue]),__require("assert").equal(fs8[gracefulQueue].length,0);}));var queue;global[gracefulQueue]||publishQueue(global,fs8[gracefulQueue]);module.exports=patch(clone2(fs8));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!fs8.__patched&&(module.exports=patch(fs8),fs8.__patched=!0);function patch(fs9){polyfills(fs9),fs9.gracefulify=patch,fs9.createReadStream=createReadStream,fs9.createWriteStream=createWriteStream2;var fs$readFile=fs9.readFile;fs9.readFile=readFile5;function readFile5(path13,options,cb){return typeof options=="function"&&(cb=options,options=null),go$readFile(path13,options,cb);function go$readFile(path14,options2,cb2,startTime){return fs$readFile(path14,options2,function(err){err&&(err.code==="EMFILE"||err.code==="ENFILE")?enqueue([go$readFile,[path14,options2,cb2],err,startTime||Date.now(),Date.now()]):typeof cb2=="function"&&cb2.apply(this,arguments);})}}var fs$writeFile=fs9.writeFile;fs9.writeFile=writeFile3;function writeFile3(path13,data,options,cb){return typeof options=="function"&&(cb=options,options=null),go$writeFile(path13,data,options,cb);function go$writeFile(path14,data2,options2,cb2,startTime){return fs$writeFile(path14,data2,options2,function(err){err&&(err.code==="EMFILE"||err.code==="ENFILE")?enqueue([go$writeFile,[path14,data2,options2,cb2],err,startTime||Date.now(),Date.now()]):typeof cb2=="function"&&cb2.apply(this,arguments);})}}var fs$appendFile=fs9.appendFile;fs$appendFile&&(fs9.appendFile=appendFile);function appendFile(path13,data,options,cb){return typeof options=="function"&&(cb=options,options=null),go$appendFile(path13,data,options,cb);function go$appendFile(path14,data2,options2,cb2,startTime){return fs$appendFile(path14,data2,options2,function(err){err&&(err.code==="EMFILE"||err.code==="ENFILE")?enqueue([go$appendFile,[path14,data2,options2,cb2],err,startTime||Date.now(),Date.now()]):typeof cb2=="function"&&cb2.apply(this,arguments);})}}var fs$copyFile=fs9.copyFile;fs$copyFile&&(fs9.copyFile=copyFile);function copyFile(src,dest,flags,cb){return typeof flags=="function"&&(cb=flags,flags=0),go$copyFile(src,dest,flags,cb);function go$copyFile(src2,dest2,flags2,cb2,startTime){return fs$copyFile(src2,dest2,flags2,function(err){err&&(err.code==="EMFILE"||err.code==="ENFILE")?enqueue([go$copyFile,[src2,dest2,flags2,cb2],err,startTime||Date.now(),Date.now()]):typeof cb2=="function"&&cb2.apply(this,arguments);})}}var fs$readdir=fs9.readdir;fs9.readdir=readdir;var noReaddirOptionVersions=/^v[0-5]\./;function readdir(path13,options,cb){typeof options=="function"&&(cb=options,options=null);var go$readdir=noReaddirOptionVersions.test(process.version)?function(path14,options2,cb2,startTime){return fs$readdir(path14,fs$readdirCallback(path14,options2,cb2,startTime))}:function(path14,options2,cb2,startTime){return fs$readdir(path14,options2,fs$readdirCallback(path14,options2,cb2,startTime))};return go$readdir(path13,options,cb);function fs$readdirCallback(path14,options2,cb2,startTime){return function(err,files){err&&(err.code==="EMFILE"||err.code==="ENFILE")?enqueue([go$readdir,[path14,options2,cb2],err,startTime||Date.now(),Date.now()]):(files&&files.sort&&files.sort(),typeof cb2=="function"&&cb2.call(this,err,files));}}}if(process.version.substr(0,4)==="v0.8"){var legStreams=legacy(fs9);ReadStream=legStreams.ReadStream,WriteStream=legStreams.WriteStream;}var fs$ReadStream=fs9.ReadStream;fs$ReadStream&&(ReadStream.prototype=Object.create(fs$ReadStream.prototype),ReadStream.prototype.open=ReadStream$open);var fs$WriteStream=fs9.WriteStream;fs$WriteStream&&(WriteStream.prototype=Object.create(fs$WriteStream.prototype),WriteStream.prototype.open=WriteStream$open),Object.defineProperty(fs9,"ReadStream",{get:function(){return ReadStream},set:function(val){ReadStream=val;},enumerable:!0,configurable:!0}),Object.defineProperty(fs9,"WriteStream",{get:function(){return WriteStream},set:function(val){WriteStream=val;},enumerable:!0,configurable:!0});var FileReadStream=ReadStream;Object.defineProperty(fs9,"FileReadStream",{get:function(){return FileReadStream},set:function(val){FileReadStream=val;},enumerable:!0,configurable:!0});var FileWriteStream=WriteStream;Object.defineProperty(fs9,"FileWriteStream",{get:function(){return FileWriteStream},set:function(val){FileWriteStream=val;},enumerable:!0,configurable:!0});function ReadStream(path13,options){return this instanceof ReadStream?(fs$ReadStream.apply(this,arguments),this):ReadStream.apply(Object.create(ReadStream.prototype),arguments)}function ReadStream$open(){var that=this;open2(that.path,that.flags,that.mode,function(err,fd){err?(that.autoClose&&that.destroy(),that.emit("error",err)):(that.fd=fd,that.emit("open",fd),that.read());});}function WriteStream(path13,options){return this instanceof WriteStream?(fs$WriteStream.apply(this,arguments),this):WriteStream.apply(Object.create(WriteStream.prototype),arguments)}function WriteStream$open(){var that=this;open2(that.path,that.flags,that.mode,function(err,fd){err?(that.destroy(),that.emit("error",err)):(that.fd=fd,that.emit("open",fd));});}function createReadStream(path13,options){return new fs9.ReadStream(path13,options)}function createWriteStream2(path13,options){return new fs9.WriteStream(path13,options)}var fs$open=fs9.open;fs9.open=open2;function open2(path13,flags,mode,cb){return typeof mode=="function"&&(cb=mode,mode=null),go$open(path13,flags,mode,cb);function go$open(path14,flags2,mode2,cb2,startTime){return fs$open(path14,flags2,mode2,function(err,fd){err&&(err.code==="EMFILE"||err.code==="ENFILE")?enqueue([go$open,[path14,flags2,mode2,cb2],err,startTime||Date.now(),Date.now()]):typeof cb2=="function"&&cb2.apply(this,arguments);})}}return fs9}function enqueue(elem){debug("ENQUEUE",elem[0].name,elem[1]),fs8[gracefulQueue].push(elem),retry();}var retryTimer;function resetQueue(){for(var now=Date.now(),i=0;i<fs8[gracefulQueue].length;++i)fs8[gracefulQueue][i].length>2&&(fs8[gracefulQueue][i][3]=now,fs8[gracefulQueue][i][4]=now);retry();}function retry(){if(clearTimeout(retryTimer),retryTimer=void 0,fs8[gracefulQueue].length!==0){var elem=fs8[gracefulQueue].shift(),fn=elem[0],args=elem[1],err=elem[2],startTime=elem[3],lastTime=elem[4];if(startTime===void 0)debug("RETRY",fn.name,args),fn.apply(null,args);else if(Date.now()-startTime>=6e4){debug("TIMEOUT",fn.name,args);var cb=args.pop();typeof cb=="function"&&cb.call(null,err);}else {var sinceAttempt=Date.now()-lastTime,sinceStart=Math.max(lastTime-startTime,1),desiredDelay=Math.min(sinceStart*1.2,100);sinceAttempt>=desiredDelay?(debug("RETRY",fn.name,args),fn.apply(null,args.concat([startTime]))):fs8[gracefulQueue].push(elem);}retryTimer===void 0&&(retryTimer=setTimeout(retry,0));}}}});var require_is_path_cwd=__commonJS({"../../node_modules/is-path-cwd/index.js"(exports,module){var path13=__require("path");module.exports=path_=>{let cwd=process.cwd();return path_=path13.resolve(path_),process.platform==="win32"&&(cwd=cwd.toLowerCase(),path_=path_.toLowerCase()),path_===cwd};}});var require_is_path_inside=__commonJS({"../../node_modules/is-path-inside/index.js"(exports,module){var path13=__require("path");module.exports=(childPath,parentPath)=>{let relation=path13.relative(parentPath,childPath);return !!(relation&&relation!==".."&&!relation.startsWith(`..${path13.sep}`)&&relation!==path13.resolve(childPath))};}});var require_old=__commonJS({"../../node_modules/fs.realpath/old.js"(exports){var pathModule=__require("path"),isWindows=process.platform==="win32",fs8=__require("fs"),DEBUG=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function rethrow(){var callback;if(DEBUG){var backtrace=new Error;callback=debugCallback;}else callback=missingCallback;return callback;function debugCallback(err){err&&(backtrace.message=err.message,err=backtrace,missingCallback(err));}function missingCallback(err){if(err){if(process.throwDeprecation)throw err;if(!process.noDeprecation){var msg="fs: missing callback "+(err.stack||err.message);process.traceDeprecation?console.trace(msg):console.error(msg);}}}}function maybeCallback(cb){return typeof cb=="function"?cb:rethrow()}pathModule.normalize;isWindows?nextPartRe=/(.*?)(?:[\/\\]+|$)/g:nextPartRe=/(.*?)(?:[\/]+|$)/g;var nextPartRe;isWindows?splitRootRe=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/:splitRootRe=/^[\/]*/;var splitRootRe;exports.realpathSync=function(p,cache3){if(p=pathModule.resolve(p),cache3&&Object.prototype.hasOwnProperty.call(cache3,p))return cache3[p];var original=p,seenLinks={},knownHard={},pos,current,base,previous;start();function start(){var m=splitRootRe.exec(p);pos=m[0].length,current=m[0],base=m[0],previous="",isWindows&&!knownHard[base]&&(fs8.lstatSync(base),knownHard[base]=!0);}for(;pos<p.length;){nextPartRe.lastIndex=pos;var result=nextPartRe.exec(p);if(previous=current,current+=result[0],base=previous+result[1],pos=nextPartRe.lastIndex,!(knownHard[base]||cache3&&cache3[base]===base)){var resolvedLink;if(cache3&&Object.prototype.hasOwnProperty.call(cache3,base))resolvedLink=cache3[base];else {var stat=fs8.lstatSync(base);if(!stat.isSymbolicLink()){knownHard[base]=!0,cache3&&(cache3[base]=base);continue}var linkTarget=null;if(!isWindows){var id=stat.dev.toString(32)+":"+stat.ino.toString(32);seenLinks.hasOwnProperty(id)&&(linkTarget=seenLinks[id]);}linkTarget===null&&(fs8.statSync(base),linkTarget=fs8.readlinkSync(base)),resolvedLink=pathModule.resolve(previous,linkTarget),cache3&&(cache3[base]=resolvedLink),isWindows||(seenLinks[id]=linkTarget);}p=pathModule.resolve(resolvedLink,p.slice(pos)),start();}}return cache3&&(cache3[original]=p),p};exports.realpath=function(p,cache3,cb){if(typeof cb!="function"&&(cb=maybeCallback(cache3),cache3=null),p=pathModule.resolve(p),cache3&&Object.prototype.hasOwnProperty.call(cache3,p))return process.nextTick(cb.bind(null,null,cache3[p]));var original=p,seenLinks={},knownHard={},pos,current,base,previous;start();function start(){var m=splitRootRe.exec(p);pos=m[0].length,current=m[0],base=m[0],previous="",isWindows&&!knownHard[base]?fs8.lstat(base,function(err){if(err)return cb(err);knownHard[base]=!0,LOOP();}):process.nextTick(LOOP);}function LOOP(){if(pos>=p.length)return cache3&&(cache3[original]=p),cb(null,p);nextPartRe.lastIndex=pos;var result=nextPartRe.exec(p);return previous=current,current+=result[0],base=previous+result[1],pos=nextPartRe.lastIndex,knownHard[base]||cache3&&cache3[base]===base?process.nextTick(LOOP):cache3&&Object.prototype.hasOwnProperty.call(cache3,base)?gotResolvedLink(cache3[base]):fs8.lstat(base,gotStat)}function gotStat(err,stat){if(err)return cb(err);if(!stat.isSymbolicLink())return knownHard[base]=!0,cache3&&(cache3[base]=base),process.nextTick(LOOP);if(!isWindows){var id=stat.dev.toString(32)+":"+stat.ino.toString(32);if(seenLinks.hasOwnProperty(id))return gotTarget(null,seenLinks[id],base)}fs8.stat(base,function(err2){if(err2)return cb(err2);fs8.readlink(base,function(err3,target){isWindows||(seenLinks[id]=target),gotTarget(err3,target);});});}function gotTarget(err,target,base2){if(err)return cb(err);var resolvedLink=pathModule.resolve(previous,target);cache3&&(cache3[base2]=resolvedLink),gotResolvedLink(resolvedLink);}function gotResolvedLink(resolvedLink){p=pathModule.resolve(resolvedLink,p.slice(pos)),start();}};}});var require_fs=__commonJS({"../../node_modules/fs.realpath/index.js"(exports,module){module.exports=realpath;realpath.realpath=realpath;realpath.sync=realpathSync;realpath.realpathSync=realpathSync;realpath.monkeypatch=monkeypatch;realpath.unmonkeypatch=unmonkeypatch;var fs8=__require("fs"),origRealpath=fs8.realpath,origRealpathSync=fs8.realpathSync,version=process.version,ok=/^v[0-5]\./.test(version),old=require_old();function newError(er){return er&&er.syscall==="realpath"&&(er.code==="ELOOP"||er.code==="ENOMEM"||er.code==="ENAMETOOLONG")}function realpath(p,cache3,cb){if(ok)return origRealpath(p,cache3,cb);typeof cache3=="function"&&(cb=cache3,cache3=null),origRealpath(p,cache3,function(er,result){newError(er)?old.realpath(p,cache3,cb):cb(er,result);});}function realpathSync(p,cache3){if(ok)return origRealpathSync(p,cache3);try{return origRealpathSync(p,cache3)}catch(er){if(newError(er))return old.realpathSync(p,cache3);throw er}}function monkeypatch(){fs8.realpath=realpath,fs8.realpathSync=realpathSync;}function unmonkeypatch(){fs8.realpath=origRealpath,fs8.realpathSync=origRealpathSync;}}});var require_concat_map=__commonJS({"../../node_modules/concat-map/index.js"(exports,module){module.exports=function(xs,fn){for(var res=[],i=0;i<xs.length;i++){var x=fn(xs[i],i);isArray(x)?res.push.apply(res,x):res.push(x);}return res};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"};}});var require_balanced_match=__commonJS({"../../node_modules/balanced-match/index.js"(exports,module){module.exports=balanced;function balanced(a,b,str){a instanceof RegExp&&(a=maybeMatch(a,str)),b instanceof RegExp&&(b=maybeMatch(b,str));var r=range(a,b,str);return r&&{start:r[0],end:r[1],pre:str.slice(0,r[0]),body:str.slice(r[0]+a.length,r[1]),post:str.slice(r[1]+b.length)}}function maybeMatch(reg,str){var m=str.match(reg);return m?m[0]:null}balanced.range=range;function range(a,b,str){var begs,beg,left,right,result,ai=str.indexOf(a),bi=str.indexOf(b,ai+1),i=ai;if(ai>=0&&bi>0){if(a===b)return [ai,bi];for(begs=[],left=str.length;i>=0&&!result;)i==ai?(begs.push(i),ai=str.indexOf(a,i+1)):begs.length==1?result=[begs.pop(),bi]:(beg=begs.pop(),beg<left&&(left=beg,right=bi),bi=str.indexOf(b,i+1)),i=ai<bi&&ai>=0?ai:bi;begs.length&&(result=[left,right]);}return result}}});var require_brace_expansion=__commonJS({"../../node_modules/brace-expansion/index.js"(exports,module){var concatMap=require_concat_map(),balanced=require_balanced_match();module.exports=expandTop;var escSlash="\0SLASH"+Math.random()+"\0",escOpen="\0OPEN"+Math.random()+"\0",escClose="\0CLOSE"+Math.random()+"\0",escComma="\0COMMA"+Math.random()+"\0",escPeriod="\0PERIOD"+Math.random()+"\0";function numeric(str){return parseInt(str,10)==str?parseInt(str,10):str.charCodeAt(0)}function escapeBraces(str){return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod)}function unescapeBraces(str){return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".")}function parseCommaParts(str){if(!str)return [""];var parts=[],m=balanced("{","}",str);if(!m)return str.split(",");var pre=m.pre,body=m.body,post=m.post,p=pre.split(",");p[p.length-1]+="{"+body+"}";var postParts=parseCommaParts(post);return post.length&&(p[p.length-1]+=postParts.shift(),p.push.apply(p,postParts)),parts.push.apply(parts,p),parts}function expandTop(str){return str?(str.substr(0,2)==="{}"&&(str="\\{\\}"+str.substr(2)),expand(escapeBraces(str),!0).map(unescapeBraces)):[]}function embrace(str){return "{"+str+"}"}function isPadded(el){return /^-?0\d/.test(el)}function lte(i,y){return i<=y}function gte(i,y){return i>=y}function expand(str,isTop){var expansions=[],m=balanced("{","}",str);if(!m||/\$$/.test(m.pre))return [str];var isNumericSequence=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body),isAlphaSequence=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body),isSequence=isNumericSequence||isAlphaSequence,isOptions=m.body.indexOf(",")>=0;if(!isSequence&&!isOptions)return m.post.match(/,.*\}/)?(str=m.pre+"{"+m.body+escClose+m.post,expand(str)):[str];var n;if(isSequence)n=m.body.split(/\.\./);else if(n=parseCommaParts(m.body),n.length===1&&(n=expand(n[0],!1).map(embrace),n.length===1)){var post=m.post.length?expand(m.post,!1):[""];return post.map(function(p){return m.pre+n[0]+p})}var pre=m.pre,post=m.post.length?expand(m.post,!1):[""],N;if(isSequence){var x=numeric(n[0]),y=numeric(n[1]),width=Math.max(n[0].length,n[1].length),incr=n.length==3?Math.abs(numeric(n[2])):1,test=lte,reverse=y<x;reverse&&(incr*=-1,test=gte);var pad=n.some(isPadded);N=[];for(var i=x;test(i,y);i+=incr){var c;if(isAlphaSequence)c=String.fromCharCode(i),c==="\\"&&(c="");else if(c=String(i),pad){var need=width-c.length;if(need>0){var z=new Array(need+1).join("0");i<0?c="-"+z+c.slice(1):c=z+c;}}N.push(c);}}else N=concatMap(n,function(el){return expand(el,!1)});for(var j=0;j<N.length;j++)for(var k=0;k<post.length;k++){var expansion=pre+N[j]+post[k];(!isTop||isSequence||expansion)&&expansions.push(expansion);}return expansions}}});var require_minimatch=__commonJS({"../../node_modules/minimatch/minimatch.js"(exports,module){module.exports=minimatch;minimatch.Minimatch=Minimatch;var path13=function(){try{return __require("path")}catch{}}()||{sep:"/"};minimatch.sep=path13.sep;var GLOBSTAR=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={},expand=require_brace_expansion(),plTypes={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},qmark="[^/]",star=qmark+"*?",twoStarDot="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",twoStarNoDot="(?:(?!(?:\\/|^)\\.).)*?",reSpecials=charSet("().*{}+?[]^$\\!");function charSet(s){return s.split("").reduce(function(set,c){return set[c]=!0,set},{})}var slashSplit=/\/+/;minimatch.filter=filter;function filter(pattern,options){return options=options||{},function(p,i,list){return minimatch(p,pattern,options)}}function ext(a,b){b=b||{};var t={};return Object.keys(a).forEach(function(k){t[k]=a[k];}),Object.keys(b).forEach(function(k){t[k]=b[k];}),t}minimatch.defaults=function(def){if(!def||typeof def!="object"||!Object.keys(def).length)return minimatch;var orig=minimatch,m=function(p,pattern,options){return orig(p,pattern,ext(def,options))};return m.Minimatch=function(pattern,options){return new orig.Minimatch(pattern,ext(def,options))},m.Minimatch.defaults=function(options){return orig.defaults(ext(def,options)).Minimatch},m.filter=function(pattern,options){return orig.filter(pattern,ext(def,options))},m.defaults=function(options){return orig.defaults(ext(def,options))},m.makeRe=function(pattern,options){return orig.makeRe(pattern,ext(def,options))},m.braceExpand=function(pattern,options){return orig.braceExpand(pattern,ext(def,options))},m.match=function(list,pattern,options){return orig.match(list,pattern,ext(def,options))},m};Minimatch.defaults=function(def){return minimatch.defaults(def).Minimatch};function minimatch(p,pattern,options){return assertValidPattern(pattern),options||(options={}),!options.nocomment&&pattern.charAt(0)==="#"?!1:new Minimatch(pattern,options).match(p)}function Minimatch(pattern,options){if(!(this instanceof Minimatch))return new Minimatch(pattern,options);assertValidPattern(pattern),options||(options={}),pattern=pattern.trim(),!options.allowWindowsEscape&&path13.sep!=="/"&&(pattern=pattern.split(path13.sep).join("/")),this.options=options,this.set=[],this.pattern=pattern,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!options.partial,this.make();}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){var pattern=this.pattern,options=this.options;if(!options.nocomment&&pattern.charAt(0)==="#"){this.comment=!0;return}if(!pattern){this.empty=!0;return}this.parseNegate();var set=this.globSet=this.braceExpand();options.debug&&(this.debug=function(){console.error.apply(console,arguments);}),this.debug(this.pattern,set),set=this.globParts=set.map(function(s){return s.split(slashSplit)}),this.debug(this.pattern,set),set=set.map(function(s,si,set2){return s.map(this.parse,this)},this),this.debug(this.pattern,set),set=set.filter(function(s){return s.indexOf(!1)===-1}),this.debug(this.pattern,set),this.set=set;}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var pattern=this.pattern,negate=!1,options=this.options,negateOffset=0;if(!options.nonegate){for(var i=0,l=pattern.length;i<l&&pattern.charAt(i)==="!";i++)negate=!negate,negateOffset++;negateOffset&&(this.pattern=pattern.substr(negateOffset)),this.negate=negate;}}minimatch.braceExpand=function(pattern,options){return braceExpand(pattern,options)};Minimatch.prototype.braceExpand=braceExpand;function braceExpand(pattern,options){return options||(this instanceof Minimatch?options=this.options:options={}),pattern=typeof pattern>"u"?this.pattern:pattern,assertValidPattern(pattern),options.nobrace||!/\{(?:(?!\{).)*\}/.test(pattern)?[pattern]:expand(pattern)}var MAX_PATTERN_LENGTH=1024*64,assertValidPattern=function(pattern){if(typeof pattern!="string")throw new TypeError("invalid pattern");if(pattern.length>MAX_PATTERN_LENGTH)throw new TypeError("pattern is too long")};Minimatch.prototype.parse=parse2;var SUBPARSE={};function parse2(pattern,isSub){assertValidPattern(pattern);var options=this.options;if(pattern==="**")if(options.noglobstar)pattern="*";else return GLOBSTAR;if(pattern==="")return "";var re="",hasMagic=!!options.nocase,escaping=!1,patternListStack=[],negativeLists=[],stateChar,inClass=!1,reClassStart=-1,classStart=-1,patternStart=pattern.charAt(0)==="."?"":options.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",self2=this;function clearStateChar(){if(stateChar){switch(stateChar){case"*":re+=star,hasMagic=!0;break;case"?":re+=qmark,hasMagic=!0;break;default:re+="\\"+stateChar;break}self2.debug("clearStateChar %j %j",stateChar,re),stateChar=!1;}}for(var i=0,len=pattern.length,c;i<len&&(c=pattern.charAt(i));i++){if(this.debug("%s %s %s %j",pattern,i,re,c),escaping&&reSpecials[c]){re+="\\"+c,escaping=!1;continue}switch(c){case"/":return !1;case"\\":clearStateChar(),escaping=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",pattern,i,re,c),inClass){this.debug(" in class"),c==="!"&&i===classStart+1&&(c="^"),re+=c;continue}self2.debug("call clearStateChar %j",stateChar),clearStateChar(),stateChar=c,options.noext&&clearStateChar();continue;case"(":if(inClass){re+="(";continue}if(!stateChar){re+="\\(";continue}patternListStack.push({type:stateChar,start:i-1,reStart:re.length,open:plTypes[stateChar].open,close:plTypes[stateChar].close}),re+=stateChar==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",stateChar,re),stateChar=!1;continue;case")":if(inClass||!patternListStack.length){re+="\\)";continue}clearStateChar(),hasMagic=!0;var pl=patternListStack.pop();re+=pl.close,pl.type==="!"&&negativeLists.push(pl),pl.reEnd=re.length;continue;case"|":if(inClass||!patternListStack.length||escaping){re+="\\|",escaping=!1;continue}clearStateChar(),re+="|";continue;case"[":if(clearStateChar(),inClass){re+="\\"+c;continue}inClass=!0,classStart=i,reClassStart=re.length,re+=c;continue;case"]":if(i===classStart+1||!inClass){re+="\\"+c,escaping=!1;continue}var cs=pattern.substring(classStart+1,i);try{RegExp("["+cs+"]");}catch{var sp=this.parse(cs,SUBPARSE);re=re.substr(0,reClassStart)+"\\["+sp[0]+"\\]",hasMagic=hasMagic||sp[1],inClass=!1;continue}hasMagic=!0,inClass=!1,re+=c;continue;default:clearStateChar(),escaping?escaping=!1:reSpecials[c]&&!(c==="^"&&inClass)&&(re+="\\"),re+=c;}}for(inClass&&(cs=pattern.substr(classStart+1),sp=this.parse(cs,SUBPARSE),re=re.substr(0,reClassStart)+"\\["+sp[0],hasMagic=hasMagic||sp[1]),pl=patternListStack.pop();pl;pl=patternListStack.pop()){var tail=re.slice(pl.reStart+pl.open.length);this.debug("setting tail",re,pl),tail=tail.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(_,$1,$2){return $2||($2="\\"),$1+$1+$2+"|"}),this.debug(`tail=%j
69
68
  %s`,tail,tail,pl,re);var t=pl.type==="*"?star:pl.type==="?"?qmark:"\\"+pl.type;hasMagic=!0,re=re.slice(0,pl.reStart)+t+"\\("+tail;}clearStateChar(),escaping&&(re+="\\\\");var addPatternStart=!1;switch(re.charAt(0)){case"[":case".":case"(":addPatternStart=!0;}for(var n=negativeLists.length-1;n>-1;n--){var nl=negativeLists[n],nlBefore=re.slice(0,nl.reStart),nlFirst=re.slice(nl.reStart,nl.reEnd-8),nlLast=re.slice(nl.reEnd-8,nl.reEnd),nlAfter=re.slice(nl.reEnd);nlLast+=nlAfter;var openParensBefore=nlBefore.split("(").length-1,cleanAfter=nlAfter;for(i=0;i<openParensBefore;i++)cleanAfter=cleanAfter.replace(/\)[+*?]?/,"");nlAfter=cleanAfter;var dollar="";nlAfter===""&&isSub!==SUBPARSE&&(dollar="$");var newRe=nlBefore+nlFirst+nlAfter+dollar+nlLast;re=newRe;}if(re!==""&&hasMagic&&(re="(?=.)"+re),addPatternStart&&(re=patternStart+re),isSub===SUBPARSE)return [re,hasMagic];if(!hasMagic)return globUnescape(pattern);var flags=options.nocase?"i":"";try{var regExp=new RegExp("^"+re+"$",flags);}catch{return new RegExp("$.")}return regExp._glob=pattern,regExp._src=re,regExp}minimatch.makeRe=function(pattern,options){return new Minimatch(pattern,options||{}).makeRe()};Minimatch.prototype.makeRe=makeRe;function makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;var set=this.set;if(!set.length)return this.regexp=!1,this.regexp;var options=this.options,twoStar=options.noglobstar?star:options.dot?twoStarDot:twoStarNoDot,flags=options.nocase?"i":"",re=set.map(function(pattern){return pattern.map(function(p){return p===GLOBSTAR?twoStar:typeof p=="string"?regExpEscape(p):p._src}).join("\\/")}).join("|");re="^(?:"+re+")$",this.negate&&(re="^(?!"+re+").*$");try{this.regexp=new RegExp(re,flags);}catch{this.regexp=!1;}return this.regexp}minimatch.match=function(list,pattern,options){options=options||{};var mm=new Minimatch(pattern,options);return list=list.filter(function(f){return mm.match(f)}),mm.options.nonull&&!list.length&&list.push(pattern),list};Minimatch.prototype.match=function(f,partial){if(typeof partial>"u"&&(partial=this.partial),this.debug("match",f,this.pattern),this.comment)return !1;if(this.empty)return f==="";if(f==="/"&&partial)return !0;var options=this.options;path13.sep!=="/"&&(f=f.split(path13.sep).join("/")),f=f.split(slashSplit),this.debug(this.pattern,"split",f);var set=this.set;this.debug(this.pattern,"set",set);var filename,i;for(i=f.length-1;i>=0&&(filename=f[i],!filename);i--);for(i=0;i<set.length;i++){var pattern=set[i],file=f;options.matchBase&&pattern.length===1&&(file=[filename]);var hit=this.matchOne(file,pattern,partial);if(hit)return options.flipNegate?!0:!this.negate}return options.flipNegate?!1:this.negate};Minimatch.prototype.matchOne=function(file,pattern,partial){var options=this.options;this.debug("matchOne",{this:this,file,pattern}),this.debug("matchOne",file.length,pattern.length);for(var fi=0,pi=0,fl=file.length,pl=pattern.length;fi<fl&&pi<pl;fi++,pi++){this.debug("matchOne loop");var p=pattern[pi],f=file[fi];if(this.debug(pattern,p,f),p===!1)return !1;if(p===GLOBSTAR){this.debug("GLOBSTAR",[pattern,p,f]);var fr=fi,pr=pi+1;if(pr===pl){for(this.debug("** at the end");fi<fl;fi++)if(file[fi]==="."||file[fi]===".."||!options.dot&&file[fi].charAt(0)===".")return !1;return !0}for(;fr<fl;){var swallowee=file[fr];if(this.debug(`
70
69
  globstar while`,file,fr,pattern,pr,swallowee),this.matchOne(file.slice(fr),pattern.slice(pr),partial))return this.debug("globstar found match!",fr,fl,swallowee),!0;if(swallowee==="."||swallowee===".."||!options.dot&&swallowee.charAt(0)==="."){this.debug("dot detected!",file,fr,pattern,pr);break}this.debug("globstar swallow a segment, and continue"),fr++;}return !!(partial&&(this.debug(`
71
70
  >>> no match, partial?`,file,fr,pattern,pr),fr===fl))}var hit;if(typeof p=="string"?(hit=f===p,this.debug("string match",p,f,hit)):(hit=f.match(p),this.debug("pattern match",p,f,hit)),!hit)return !1}if(fi===fl&&pi===pl)return !0;if(fi===fl)return partial;if(pi===pl)return fi===fl-1&&file[fi]==="";throw new Error("wtf?")};function globUnescape(s){return s.replace(/\\(.)/g,"$1")}function regExpEscape(s){return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}}});var require_inherits_browser=__commonJS({"../../node_modules/inherits/inherits_browser.js"(exports,module){typeof Object.create=="function"?module.exports=function(ctor,superCtor){superCtor&&(ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}}));}:module.exports=function(ctor,superCtor){if(superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor;}};}});var require_inherits=__commonJS({"../../node_modules/inherits/inherits.js"(exports,module){try{if(util=__require("util"),typeof util.inherits!="function")throw "";module.exports=util.inherits;}catch{module.exports=require_inherits_browser();}var util;}});var require_path_is_absolute=__commonJS({"../../node_modules/path-is-absolute/index.js"(exports,module){function posix(path13){return path13.charAt(0)==="/"}function win32(path13){var splitDeviceRe=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,result=splitDeviceRe.exec(path13),device=result[1]||"",isUnc=!!(device&&device.charAt(1)!==":");return !!(result[2]||isUnc)}module.exports=process.platform==="win32"?win32:posix;module.exports.posix=posix;module.exports.win32=win32;}});var require_common=__commonJS({"../../node_modules/rimraf/node_modules/glob/common.js"(exports){exports.setopts=setopts;exports.ownProp=ownProp;exports.makeAbs=makeAbs;exports.finish=finish;exports.mark=mark;exports.isIgnored=isIgnored;exports.childrenIgnored=childrenIgnored;function ownProp(obj,field){return Object.prototype.hasOwnProperty.call(obj,field)}var fs8=__require("fs"),path13=__require("path"),minimatch=require_minimatch(),isAbsolute3=require_path_is_absolute(),Minimatch=minimatch.Minimatch;function alphasort(a,b){return a.localeCompare(b,"en")}function setupIgnores(self2,options){self2.ignore=options.ignore||[],Array.isArray(self2.ignore)||(self2.ignore=[self2.ignore]),self2.ignore.length&&(self2.ignore=self2.ignore.map(ignoreMap));}function ignoreMap(pattern){var gmatcher=null;if(pattern.slice(-3)==="/**"){var gpattern=pattern.replace(/(\/\*\*)+$/,"");gmatcher=new Minimatch(gpattern,{dot:!0});}return {matcher:new Minimatch(pattern,{dot:!0}),gmatcher}}function setopts(self2,pattern,options){if(options||(options={}),options.matchBase&&pattern.indexOf("/")===-1){if(options.noglobstar)throw new Error("base matching requires globstar");pattern="**/"+pattern;}self2.silent=!!options.silent,self2.pattern=pattern,self2.strict=options.strict!==!1,self2.realpath=!!options.realpath,self2.realpathCache=options.realpathCache||Object.create(null),self2.follow=!!options.follow,self2.dot=!!options.dot,self2.mark=!!options.mark,self2.nodir=!!options.nodir,self2.nodir&&(self2.mark=!0),self2.sync=!!options.sync,self2.nounique=!!options.nounique,self2.nonull=!!options.nonull,self2.nosort=!!options.nosort,self2.nocase=!!options.nocase,self2.stat=!!options.stat,self2.noprocess=!!options.noprocess,self2.absolute=!!options.absolute,self2.fs=options.fs||fs8,self2.maxLength=options.maxLength||1/0,self2.cache=options.cache||Object.create(null),self2.statCache=options.statCache||Object.create(null),self2.symlinks=options.symlinks||Object.create(null),setupIgnores(self2,options),self2.changedCwd=!1;var cwd=process.cwd();ownProp(options,"cwd")?(self2.cwd=path13.resolve(options.cwd),self2.changedCwd=self2.cwd!==cwd):self2.cwd=cwd,self2.root=options.root||path13.resolve(self2.cwd,"/"),self2.root=path13.resolve(self2.root),process.platform==="win32"&&(self2.root=self2.root.replace(/\\/g,"/")),self2.cwdAbs=isAbsolute3(self2.cwd)?self2.cwd:makeAbs(self2,self2.cwd),process.platform==="win32"&&(self2.cwdAbs=self2.cwdAbs.replace(/\\/g,"/")),self2.nomount=!!options.nomount,options.nonegate=!0,options.nocomment=!0,options.allowWindowsEscape=!1,self2.minimatch=new Minimatch(pattern,options),self2.options=self2.minimatch.options;}function finish(self2){for(var nou=self2.nounique,all2=nou?[]:Object.create(null),i=0,l=self2.matches.length;i<l;i++){var matches=self2.matches[i];if(!matches||Object.keys(matches).length===0){if(self2.nonull){var literal=self2.minimatch.globSet[i];nou?all2.push(literal):all2[literal]=!0;}}else {var m=Object.keys(matches);nou?all2.push.apply(all2,m):m.forEach(function(m2){all2[m2]=!0;});}}if(nou||(all2=Object.keys(all2)),self2.nosort||(all2=all2.sort(alphasort)),self2.mark){for(var i=0;i<all2.length;i++)all2[i]=self2._mark(all2[i]);self2.nodir&&(all2=all2.filter(function(e){var notDir=!/\/$/.test(e),c=self2.cache[e]||self2.cache[makeAbs(self2,e)];return notDir&&c&&(notDir=c!=="DIR"&&!Array.isArray(c)),notDir}));}self2.ignore.length&&(all2=all2.filter(function(m2){return !isIgnored(self2,m2)})),self2.found=all2;}function mark(self2,p){var abs=makeAbs(self2,p),c=self2.cache[abs],m=p;if(c){var isDir=c==="DIR"||Array.isArray(c),slash2=p.slice(-1)==="/";if(isDir&&!slash2?m+="/":!isDir&&slash2&&(m=m.slice(0,-1)),m!==p){var mabs=makeAbs(self2,m);self2.statCache[mabs]=self2.statCache[abs],self2.cache[mabs]=self2.cache[abs];}}return m}function makeAbs(self2,f){var abs=f;return f.charAt(0)==="/"?abs=path13.join(self2.root,f):isAbsolute3(f)||f===""?abs=f:self2.changedCwd?abs=path13.resolve(self2.cwd,f):abs=path13.resolve(f),process.platform==="win32"&&(abs=abs.replace(/\\/g,"/")),abs}function isIgnored(self2,path14){return self2.ignore.length?self2.ignore.some(function(item){return item.matcher.match(path14)||!!(item.gmatcher&&item.gmatcher.match(path14))}):!1}function childrenIgnored(self2,path14){return self2.ignore.length?self2.ignore.some(function(item){return !!(item.gmatcher&&item.gmatcher.match(path14))}):!1}}});var require_sync=__commonJS({"../../node_modules/rimraf/node_modules/glob/sync.js"(exports,module){module.exports=globSync;globSync.GlobSync=GlobSync;var rp=require_fs(),minimatch=require_minimatch();minimatch.Minimatch;require_glob().Glob;__require("util");var path13=__require("path"),assert2=__require("assert"),isAbsolute3=require_path_is_absolute(),common=require_common(),setopts=common.setopts,ownProp=common.ownProp,childrenIgnored=common.childrenIgnored,isIgnored=common.isIgnored;function globSync(pattern,options){if(typeof options=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
72
71
  See: https://github.com/isaacs/node-glob/issues/167`);return new GlobSync(pattern,options).found}function GlobSync(pattern,options){if(!pattern)throw new Error("must provide pattern");if(typeof options=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
73
- See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof GlobSync))return new GlobSync(pattern,options);if(setopts(this,pattern,options),this.noprocess)return this;var n=this.minimatch.set.length;this.matches=new Array(n);for(var i=0;i<n;i++)this._process(this.minimatch.set[i],i,!1);this._finish();}GlobSync.prototype._finish=function(){if(assert2.ok(this instanceof GlobSync),this.realpath){var self2=this;this.matches.forEach(function(matchset,index){var set=self2.matches[index]=Object.create(null);for(var p in matchset)try{p=self2._makeAbs(p);var real=rp.realpathSync(p,self2.realpathCache);set[real]=!0;}catch(er){if(er.syscall==="stat")set[self2._makeAbs(p)]=!0;else throw er}});}common.finish(this);};GlobSync.prototype._process=function(pattern,index,inGlobStar){assert2.ok(this instanceof GlobSync);for(var n=0;typeof pattern[n]=="string";)n++;var prefix;switch(n){case pattern.length:this._processSimple(pattern.join("/"),index);return;case 0:prefix=null;break;default:prefix=pattern.slice(0,n).join("/");break}var remain=pattern.slice(n),read;prefix===null?read=".":((isAbsolute3(prefix)||isAbsolute3(pattern.map(function(p){return typeof p=="string"?p:"[*]"}).join("/")))&&(!prefix||!isAbsolute3(prefix))&&(prefix="/"+prefix),read=prefix);var abs=this._makeAbs(read);if(!childrenIgnored(this,read)){var isGlobStar=remain[0]===minimatch.GLOBSTAR;isGlobStar?this._processGlobStar(prefix,read,abs,remain,index,inGlobStar):this._processReaddir(prefix,read,abs,remain,index,inGlobStar);}};GlobSync.prototype._processReaddir=function(prefix,read,abs,remain,index,inGlobStar){var entries2=this._readdir(abs,inGlobStar);if(entries2){for(var pn=remain[0],negate=!!this.minimatch.negate,rawGlob=pn._glob,dotOk=this.dot||rawGlob.charAt(0)===".",matchedEntries=[],i=0;i<entries2.length;i++){var e=entries2[i];if(e.charAt(0)!=="."||dotOk){var m;negate&&!prefix?m=!e.match(pn):m=e.match(pn),m&&matchedEntries.push(e);}}var len=matchedEntries.length;if(len!==0){if(remain.length===1&&!this.mark&&!this.stat){this.matches[index]||(this.matches[index]=Object.create(null));for(var i=0;i<len;i++){var e=matchedEntries[i];prefix&&(prefix.slice(-1)!=="/"?e=prefix+"/"+e:e=prefix+e),e.charAt(0)==="/"&&!this.nomount&&(e=path13.join(this.root,e)),this._emitMatch(index,e);}return}remain.shift();for(var i=0;i<len;i++){var e=matchedEntries[i],newPattern;prefix?newPattern=[prefix,e]:newPattern=[e],this._process(newPattern.concat(remain),index,inGlobStar);}}}};GlobSync.prototype._emitMatch=function(index,e){if(!isIgnored(this,e)){var abs=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=abs),!this.matches[index][e]){if(this.nodir){var c=this.cache[abs];if(c==="DIR"||Array.isArray(c))return}this.matches[index][e]=!0,this.stat&&this._stat(e);}}};GlobSync.prototype._readdirInGlobStar=function(abs){if(this.follow)return this._readdir(abs,!1);var entries2,lstat;try{lstat=this.fs.lstatSync(abs);}catch(er){if(er.code==="ENOENT")return null}var isSym=lstat&&lstat.isSymbolicLink();return this.symlinks[abs]=isSym,!isSym&&lstat&&!lstat.isDirectory()?this.cache[abs]="FILE":entries2=this._readdir(abs,!1),entries2};GlobSync.prototype._readdir=function(abs,inGlobStar){if(inGlobStar&&!ownProp(this.symlinks,abs))return this._readdirInGlobStar(abs);if(ownProp(this.cache,abs)){var c=this.cache[abs];if(!c||c==="FILE")return null;if(Array.isArray(c))return c}try{return this._readdirEntries(abs,this.fs.readdirSync(abs))}catch(er){return this._readdirError(abs,er),null}};GlobSync.prototype._readdirEntries=function(abs,entries2){if(!this.mark&&!this.stat)for(var i=0;i<entries2.length;i++){var e=entries2[i];abs==="/"?e=abs+e:e=abs+"/"+e,this.cache[e]=!0;}return this.cache[abs]=entries2,entries2};GlobSync.prototype._readdirError=function(f,er){switch(er.code){case"ENOTSUP":case"ENOTDIR":var abs=this._makeAbs(f);if(this.cache[abs]="FILE",abs===this.cwdAbs){var error=new Error(er.code+" invalid cwd "+this.cwd);throw error.path=this.cwd,error.code=er.code,error}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(f)]=!1;break;default:if(this.cache[this._makeAbs(f)]=!1,this.strict)throw er;this.silent||console.error("glob error",er);break}};GlobSync.prototype._processGlobStar=function(prefix,read,abs,remain,index,inGlobStar){var entries2=this._readdir(abs,inGlobStar);if(entries2){var remainWithoutGlobStar=remain.slice(1),gspref=prefix?[prefix]:[],noGlobStar=gspref.concat(remainWithoutGlobStar);this._process(noGlobStar,index,!1);var len=entries2.length,isSym=this.symlinks[abs];if(!(isSym&&inGlobStar))for(var i=0;i<len;i++){var e=entries2[i];if(!(e.charAt(0)==="."&&!this.dot)){var instead=gspref.concat(entries2[i],remainWithoutGlobStar);this._process(instead,index,!0);var below=gspref.concat(entries2[i],remain);this._process(below,index,!0);}}}};GlobSync.prototype._processSimple=function(prefix,index){var exists=this._stat(prefix);if(this.matches[index]||(this.matches[index]=Object.create(null)),!!exists){if(prefix&&isAbsolute3(prefix)&&!this.nomount){var trail=/[\/\\]$/.test(prefix);prefix.charAt(0)==="/"?prefix=path13.join(this.root,prefix):(prefix=path13.resolve(this.root,prefix),trail&&(prefix+="/"));}process.platform==="win32"&&(prefix=prefix.replace(/\\/g,"/")),this._emitMatch(index,prefix);}};GlobSync.prototype._stat=function(f){var abs=this._makeAbs(f),needDir=f.slice(-1)==="/";if(f.length>this.maxLength)return !1;if(!this.stat&&ownProp(this.cache,abs)){var c=this.cache[abs];if(Array.isArray(c)&&(c="DIR"),!needDir||c==="DIR")return c;if(needDir&&c==="FILE")return !1}var stat=this.statCache[abs];if(!stat){var lstat;try{lstat=this.fs.lstatSync(abs);}catch(er){if(er&&(er.code==="ENOENT"||er.code==="ENOTDIR"))return this.statCache[abs]=!1,!1}if(lstat&&lstat.isSymbolicLink())try{stat=this.fs.statSync(abs);}catch{stat=lstat;}else stat=lstat;}this.statCache[abs]=stat;var c=!0;return stat&&(c=stat.isDirectory()?"DIR":"FILE"),this.cache[abs]=this.cache[abs]||c,needDir&&c==="FILE"?!1:c};GlobSync.prototype._mark=function(p){return common.mark(this,p)};GlobSync.prototype._makeAbs=function(f){return common.makeAbs(this,f)};}});var require_wrappy=__commonJS({"../../node_modules/wrappy/wrappy.js"(exports,module){module.exports=wrappy;function wrappy(fn,cb){if(fn&&cb)return wrappy(fn)(cb);if(typeof fn!="function")throw new TypeError("need wrapper function");return Object.keys(fn).forEach(function(k){wrapper[k]=fn[k];}),wrapper;function wrapper(){for(var args=new Array(arguments.length),i=0;i<args.length;i++)args[i]=arguments[i];var ret=fn.apply(this,args),cb2=args[args.length-1];return typeof ret=="function"&&ret!==cb2&&Object.keys(cb2).forEach(function(k){ret[k]=cb2[k];}),ret}}}});var require_once=__commonJS({"../../node_modules/once/once.js"(exports,module){var wrappy=require_wrappy();module.exports=wrappy(once2);module.exports.strict=wrappy(onceStrict);once2.proto=once2(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once2(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:!0});});function once2(fn){var f=function(){return f.called?f.value:(f.called=!0,f.value=fn.apply(this,arguments))};return f.called=!1,f}function onceStrict(fn){var f=function(){if(f.called)throw new Error(f.onceError);return f.called=!0,f.value=fn.apply(this,arguments)},name=fn.name||"Function wrapped with `once`";return f.onceError=name+" shouldn't be called more than once",f.called=!1,f}}});var require_inflight=__commonJS({"../../node_modules/inflight/inflight.js"(exports,module){var wrappy=require_wrappy(),reqs=Object.create(null),once2=require_once();module.exports=wrappy(inflight);function inflight(key,cb){return reqs[key]?(reqs[key].push(cb),null):(reqs[key]=[cb],makeres(key))}function makeres(key){return once2(function RES(){var cbs=reqs[key],len=cbs.length,args=slice(arguments);try{for(var i=0;i<len;i++)cbs[i].apply(null,args);}finally{cbs.length>len?(cbs.splice(0,len),process.nextTick(function(){RES.apply(null,args);})):delete reqs[key];}})}function slice(args){for(var length=args.length,array=[],i=0;i<length;i++)array[i]=args[i];return array}}});var require_glob=__commonJS({"../../node_modules/rimraf/node_modules/glob/glob.js"(exports,module){module.exports=glob3;var rp=require_fs(),minimatch=require_minimatch();minimatch.Minimatch;var inherits=require_inherits(),EE=__require("events").EventEmitter,path13=__require("path"),assert2=__require("assert"),isAbsolute3=require_path_is_absolute(),globSync=require_sync(),common=require_common(),setopts=common.setopts,ownProp=common.ownProp,inflight=require_inflight();__require("util");var childrenIgnored=common.childrenIgnored,isIgnored=common.isIgnored,once2=require_once();function glob3(pattern,options,cb){if(typeof options=="function"&&(cb=options,options={}),options||(options={}),options.sync){if(cb)throw new TypeError("callback provided to sync glob");return globSync(pattern,options)}return new Glob(pattern,options,cb)}glob3.sync=globSync;var GlobSync=glob3.GlobSync=globSync.GlobSync;glob3.glob=glob3;function extend(origin,add){if(add===null||typeof add!="object")return origin;for(var keys=Object.keys(add),i=keys.length;i--;)origin[keys[i]]=add[keys[i]];return origin}glob3.hasMagic=function(pattern,options_){var options=extend({},options_);options.noprocess=!0;var g=new Glob(pattern,options),set=g.minimatch.set;if(!pattern)return !1;if(set.length>1)return !0;for(var j=0;j<set[0].length;j++)if(typeof set[0][j]!="string")return !0;return !1};glob3.Glob=Glob;inherits(Glob,EE);function Glob(pattern,options,cb){if(typeof options=="function"&&(cb=options,options=null),options&&options.sync){if(cb)throw new TypeError("callback provided to sync glob");return new GlobSync(pattern,options)}if(!(this instanceof Glob))return new Glob(pattern,options,cb);setopts(this,pattern,options),this._didRealPath=!1;var n=this.minimatch.set.length;this.matches=new Array(n),typeof cb=="function"&&(cb=once2(cb),this.on("error",cb),this.on("end",function(matches){cb(null,matches);}));var self2=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(n===0)return done();for(var sync=!0,i=0;i<n;i++)this._process(this.minimatch.set[i],i,!1,done);sync=!1;function done(){--self2._processing,self2._processing<=0&&(sync?process.nextTick(function(){self2._finish();}):self2._finish());}}Glob.prototype._finish=function(){if(assert2(this instanceof Glob),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();common.finish(this),this.emit("end",this.found);}};Glob.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var n=this.matches.length;if(n===0)return this._finish();for(var self2=this,i=0;i<this.matches.length;i++)this._realpathSet(i,next);function next(){--n===0&&self2._finish();}};Glob.prototype._realpathSet=function(index,cb){var matchset=this.matches[index];if(!matchset)return cb();var found=Object.keys(matchset),self2=this,n=found.length;if(n===0)return cb();var set=this.matches[index]=Object.create(null);found.forEach(function(p,i){p=self2._makeAbs(p),rp.realpath(p,self2.realpathCache,function(er,real){er?er.syscall==="stat"?set[p]=!0:self2.emit("error",er):set[real]=!0,--n===0&&(self2.matches[index]=set,cb());});});};Glob.prototype._mark=function(p){return common.mark(this,p)};Glob.prototype._makeAbs=function(f){return common.makeAbs(this,f)};Glob.prototype.abort=function(){this.aborted=!0,this.emit("abort");};Glob.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"));};Glob.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var eq=this._emitQueue.slice(0);this._emitQueue.length=0;for(var i=0;i<eq.length;i++){var e=eq[i];this._emitMatch(e[0],e[1]);}}if(this._processQueue.length){var pq=this._processQueue.slice(0);this._processQueue.length=0;for(var i=0;i<pq.length;i++){var p=pq[i];this._processing--,this._process(p[0],p[1],p[2],p[3]);}}}};Glob.prototype._process=function(pattern,index,inGlobStar,cb){if(assert2(this instanceof Glob),assert2(typeof cb=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([pattern,index,inGlobStar,cb]);return}for(var n=0;typeof pattern[n]=="string";)n++;var prefix;switch(n){case pattern.length:this._processSimple(pattern.join("/"),index,cb);return;case 0:prefix=null;break;default:prefix=pattern.slice(0,n).join("/");break}var remain=pattern.slice(n),read;prefix===null?read=".":((isAbsolute3(prefix)||isAbsolute3(pattern.map(function(p){return typeof p=="string"?p:"[*]"}).join("/")))&&(!prefix||!isAbsolute3(prefix))&&(prefix="/"+prefix),read=prefix);var abs=this._makeAbs(read);if(childrenIgnored(this,read))return cb();var isGlobStar=remain[0]===minimatch.GLOBSTAR;isGlobStar?this._processGlobStar(prefix,read,abs,remain,index,inGlobStar,cb):this._processReaddir(prefix,read,abs,remain,index,inGlobStar,cb);}};Glob.prototype._processReaddir=function(prefix,read,abs,remain,index,inGlobStar,cb){var self2=this;this._readdir(abs,inGlobStar,function(er,entries2){return self2._processReaddir2(prefix,read,abs,remain,index,inGlobStar,entries2,cb)});};Glob.prototype._processReaddir2=function(prefix,read,abs,remain,index,inGlobStar,entries2,cb){if(!entries2)return cb();for(var pn=remain[0],negate=!!this.minimatch.negate,rawGlob=pn._glob,dotOk=this.dot||rawGlob.charAt(0)===".",matchedEntries=[],i=0;i<entries2.length;i++){var e=entries2[i];if(e.charAt(0)!=="."||dotOk){var m;negate&&!prefix?m=!e.match(pn):m=e.match(pn),m&&matchedEntries.push(e);}}var len=matchedEntries.length;if(len===0)return cb();if(remain.length===1&&!this.mark&&!this.stat){this.matches[index]||(this.matches[index]=Object.create(null));for(var i=0;i<len;i++){var e=matchedEntries[i];prefix&&(prefix!=="/"?e=prefix+"/"+e:e=prefix+e),e.charAt(0)==="/"&&!this.nomount&&(e=path13.join(this.root,e)),this._emitMatch(index,e);}return cb()}remain.shift();for(var i=0;i<len;i++){var e=matchedEntries[i];prefix&&(prefix!=="/"?e=prefix+"/"+e:e=prefix+e),this._process([e].concat(remain),index,inGlobStar,cb);}cb();};Glob.prototype._emitMatch=function(index,e){if(!this.aborted&&!isIgnored(this,e)){if(this.paused){this._emitQueue.push([index,e]);return}var abs=isAbsolute3(e)?e:this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=abs),!this.matches[index][e]){if(this.nodir){var c=this.cache[abs];if(c==="DIR"||Array.isArray(c))return}this.matches[index][e]=!0;var st=this.statCache[abs];st&&this.emit("stat",e,st),this.emit("match",e);}}};Glob.prototype._readdirInGlobStar=function(abs,cb){if(this.aborted)return;if(this.follow)return this._readdir(abs,!1,cb);var lstatkey="lstat\0"+abs,self2=this,lstatcb=inflight(lstatkey,lstatcb_);lstatcb&&self2.fs.lstat(abs,lstatcb);function lstatcb_(er,lstat){if(er&&er.code==="ENOENT")return cb();var isSym=lstat&&lstat.isSymbolicLink();self2.symlinks[abs]=isSym,!isSym&&lstat&&!lstat.isDirectory()?(self2.cache[abs]="FILE",cb()):self2._readdir(abs,!1,cb);}};Glob.prototype._readdir=function(abs,inGlobStar,cb){if(!this.aborted&&(cb=inflight("readdir\0"+abs+"\0"+inGlobStar,cb),!!cb)){if(inGlobStar&&!ownProp(this.symlinks,abs))return this._readdirInGlobStar(abs,cb);if(ownProp(this.cache,abs)){var c=this.cache[abs];if(!c||c==="FILE")return cb();if(Array.isArray(c))return cb(null,c)}var self2=this;self2.fs.readdir(abs,readdirCb(this,abs,cb));}};function readdirCb(self2,abs,cb){return function(er,entries2){er?self2._readdirError(abs,er,cb):self2._readdirEntries(abs,entries2,cb);}}Glob.prototype._readdirEntries=function(abs,entries2,cb){if(!this.aborted){if(!this.mark&&!this.stat)for(var i=0;i<entries2.length;i++){var e=entries2[i];abs==="/"?e=abs+e:e=abs+"/"+e,this.cache[e]=!0;}return this.cache[abs]=entries2,cb(null,entries2)}};Glob.prototype._readdirError=function(f,er,cb){if(!this.aborted){switch(er.code){case"ENOTSUP":case"ENOTDIR":var abs=this._makeAbs(f);if(this.cache[abs]="FILE",abs===this.cwdAbs){var error=new Error(er.code+" invalid cwd "+this.cwd);error.path=this.cwd,error.code=er.code,this.emit("error",error),this.abort();}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(f)]=!1;break;default:this.cache[this._makeAbs(f)]=!1,this.strict&&(this.emit("error",er),this.abort()),this.silent||console.error("glob error",er);break}return cb()}};Glob.prototype._processGlobStar=function(prefix,read,abs,remain,index,inGlobStar,cb){var self2=this;this._readdir(abs,inGlobStar,function(er,entries2){self2._processGlobStar2(prefix,read,abs,remain,index,inGlobStar,entries2,cb);});};Glob.prototype._processGlobStar2=function(prefix,read,abs,remain,index,inGlobStar,entries2,cb){if(!entries2)return cb();var remainWithoutGlobStar=remain.slice(1),gspref=prefix?[prefix]:[],noGlobStar=gspref.concat(remainWithoutGlobStar);this._process(noGlobStar,index,!1,cb);var isSym=this.symlinks[abs],len=entries2.length;if(isSym&&inGlobStar)return cb();for(var i=0;i<len;i++){var e=entries2[i];if(!(e.charAt(0)==="."&&!this.dot)){var instead=gspref.concat(entries2[i],remainWithoutGlobStar);this._process(instead,index,!0,cb);var below=gspref.concat(entries2[i],remain);this._process(below,index,!0,cb);}}cb();};Glob.prototype._processSimple=function(prefix,index,cb){var self2=this;this._stat(prefix,function(er,exists){self2._processSimple2(prefix,index,er,exists,cb);});};Glob.prototype._processSimple2=function(prefix,index,er,exists,cb){if(this.matches[index]||(this.matches[index]=Object.create(null)),!exists)return cb();if(prefix&&isAbsolute3(prefix)&&!this.nomount){var trail=/[\/\\]$/.test(prefix);prefix.charAt(0)==="/"?prefix=path13.join(this.root,prefix):(prefix=path13.resolve(this.root,prefix),trail&&(prefix+="/"));}process.platform==="win32"&&(prefix=prefix.replace(/\\/g,"/")),this._emitMatch(index,prefix),cb();};Glob.prototype._stat=function(f,cb){var abs=this._makeAbs(f),needDir=f.slice(-1)==="/";if(f.length>this.maxLength)return cb();if(!this.stat&&ownProp(this.cache,abs)){var c=this.cache[abs];if(Array.isArray(c)&&(c="DIR"),!needDir||c==="DIR")return cb(null,c);if(needDir&&c==="FILE")return cb()}var stat=this.statCache[abs];if(stat!==void 0){if(stat===!1)return cb(null,stat);var type=stat.isDirectory()?"DIR":"FILE";return needDir&&type==="FILE"?cb():cb(null,type,stat)}var self2=this,statcb=inflight("stat\0"+abs,lstatcb_);statcb&&self2.fs.lstat(abs,statcb);function lstatcb_(er,lstat){if(lstat&&lstat.isSymbolicLink())return self2.fs.stat(abs,function(er2,stat2){er2?self2._stat2(f,abs,null,lstat,cb):self2._stat2(f,abs,er2,stat2,cb);});self2._stat2(f,abs,er,lstat,cb);}};Glob.prototype._stat2=function(f,abs,er,stat,cb){if(er&&(er.code==="ENOENT"||er.code==="ENOTDIR"))return this.statCache[abs]=!1,cb();var needDir=f.slice(-1)==="/";if(this.statCache[abs]=stat,abs.slice(-1)==="/"&&stat&&!stat.isDirectory())return cb(null,!1,stat);var c=!0;return stat&&(c=stat.isDirectory()?"DIR":"FILE"),this.cache[abs]=this.cache[abs]||c,needDir&&c==="FILE"?cb():cb(null,c,stat)};}});var require_rimraf=__commonJS({"../../node_modules/rimraf/rimraf.js"(exports,module){var assert2=__require("assert"),path13=__require("path"),fs8=__require("fs"),glob3;try{glob3=require_glob();}catch{}var defaultGlobOpts={nosort:!0,silent:!0},timeout=0,isWindows=process.platform==="win32",defaults2=options=>{if(["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(m=>{options[m]=options[m]||fs8[m],m=m+"Sync",options[m]=options[m]||fs8[m];}),options.maxBusyTries=options.maxBusyTries||3,options.emfileWait=options.emfileWait||1e3,options.glob===!1&&(options.disableGlob=!0),options.disableGlob!==!0&&glob3===void 0)throw Error("glob dependency not found, set `options.disableGlob = true` if intentional");options.disableGlob=options.disableGlob||!1,options.glob=options.glob||defaultGlobOpts;},rimraf=(p,options,cb)=>{typeof options=="function"&&(cb=options,options={}),assert2(p,"rimraf: missing path"),assert2.equal(typeof p,"string","rimraf: path should be a string"),assert2.equal(typeof cb,"function","rimraf: callback function required"),assert2(options,"rimraf: invalid options argument provided"),assert2.equal(typeof options,"object","rimraf: options should be object"),defaults2(options);let busyTries=0,errState=null,n=0,next=er=>{errState=errState||er,--n===0&&cb(errState);},afterGlob=(er,results)=>{if(er)return cb(er);if(n=results.length,n===0)return cb();results.forEach(p2=>{let CB=er2=>{if(er2){if((er2.code==="EBUSY"||er2.code==="ENOTEMPTY"||er2.code==="EPERM")&&busyTries<options.maxBusyTries)return busyTries++,setTimeout(()=>rimraf_(p2,options,CB),busyTries*100);if(er2.code==="EMFILE"&&timeout<options.emfileWait)return setTimeout(()=>rimraf_(p2,options,CB),timeout++);er2.code==="ENOENT"&&(er2=null);}timeout=0,next(er2);};rimraf_(p2,options,CB);});};if(options.disableGlob||!glob3.hasMagic(p))return afterGlob(null,[p]);options.lstat(p,(er,stat)=>{if(!er)return afterGlob(null,[p]);glob3(p,options.glob,afterGlob);});},rimraf_=(p,options,cb)=>{assert2(p),assert2(options),assert2(typeof cb=="function"),options.lstat(p,(er,st)=>{if(er&&er.code==="ENOENT")return cb(null);if(er&&er.code==="EPERM"&&isWindows&&fixWinEPERM(p,options,er,cb),st&&st.isDirectory())return rmdir(p,options,er,cb);options.unlink(p,er2=>{if(er2){if(er2.code==="ENOENT")return cb(null);if(er2.code==="EPERM")return isWindows?fixWinEPERM(p,options,er2,cb):rmdir(p,options,er2,cb);if(er2.code==="EISDIR")return rmdir(p,options,er2,cb)}return cb(er2)});});},fixWinEPERM=(p,options,er,cb)=>{assert2(p),assert2(options),assert2(typeof cb=="function"),options.chmod(p,438,er2=>{er2?cb(er2.code==="ENOENT"?null:er):options.stat(p,(er3,stats)=>{er3?cb(er3.code==="ENOENT"?null:er):stats.isDirectory()?rmdir(p,options,er,cb):options.unlink(p,cb);});});},fixWinEPERMSync=(p,options,er)=>{assert2(p),assert2(options);try{options.chmodSync(p,438);}catch(er2){if(er2.code==="ENOENT")return;throw er}let stats;try{stats=options.statSync(p);}catch(er3){if(er3.code==="ENOENT")return;throw er}stats.isDirectory()?rmdirSync(p,options,er):options.unlinkSync(p);},rmdir=(p,options,originalEr,cb)=>{assert2(p),assert2(options),assert2(typeof cb=="function"),options.rmdir(p,er=>{er&&(er.code==="ENOTEMPTY"||er.code==="EEXIST"||er.code==="EPERM")?rmkids(p,options,cb):er&&er.code==="ENOTDIR"?cb(originalEr):cb(er);});},rmkids=(p,options,cb)=>{assert2(p),assert2(options),assert2(typeof cb=="function"),options.readdir(p,(er,files)=>{if(er)return cb(er);let n=files.length;if(n===0)return options.rmdir(p,cb);let errState;files.forEach(f=>{rimraf(path13.join(p,f),options,er2=>{if(!errState){if(er2)return cb(errState=er2);--n===0&&options.rmdir(p,cb);}});});});},rimrafSync=(p,options)=>{options=options||{},defaults2(options),assert2(p,"rimraf: missing path"),assert2.equal(typeof p,"string","rimraf: path should be a string"),assert2(options,"rimraf: missing options"),assert2.equal(typeof options,"object","rimraf: options should be object");let results;if(options.disableGlob||!glob3.hasMagic(p))results=[p];else try{options.lstatSync(p),results=[p];}catch{results=glob3.sync(p,options.glob);}if(results.length)for(let i=0;i<results.length;i++){let p2=results[i],st;try{st=options.lstatSync(p2);}catch(er){if(er.code==="ENOENT")return;er.code==="EPERM"&&isWindows&&fixWinEPERMSync(p2,options,er);}try{st&&st.isDirectory()?rmdirSync(p2,options,null):options.unlinkSync(p2);}catch(er){if(er.code==="ENOENT")return;if(er.code==="EPERM")return isWindows?fixWinEPERMSync(p2,options,er):rmdirSync(p2,options,er);if(er.code!=="EISDIR")throw er;rmdirSync(p2,options,er);}}},rmdirSync=(p,options,originalEr)=>{assert2(p),assert2(options);try{options.rmdirSync(p);}catch(er){if(er.code==="ENOENT")return;if(er.code==="ENOTDIR")throw originalEr;(er.code==="ENOTEMPTY"||er.code==="EEXIST"||er.code==="EPERM")&&rmkidsSync(p,options);}},rmkidsSync=(p,options)=>{assert2(p),assert2(options),options.readdirSync(p).forEach(f=>rimrafSync(path13.join(p,f),options));let retries=isWindows?100:1,i=0;do{let threw=!0;try{let ret=options.rmdirSync(p,options);return threw=!1,ret}finally{if(++i<retries&&threw)continue}}while(!0)};module.exports=rimraf;rimraf.sync=rimrafSync;}});var require_indent_string=__commonJS({"../../node_modules/indent-string/index.js"(exports,module){module.exports=(string,count=1,options)=>{if(options={indent:" ",includeEmptyLines:!1,...options},typeof string!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof string}\``);if(typeof count!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof count}\``);if(typeof options.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\``);if(count===0)return string;let regex=options.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return string.replace(regex,options.indent.repeat(count))};}});var require_clean_stack=__commonJS({"../../node_modules/clean-stack/index.js"(exports,module){var os2=__require("os"),extractPathRegex=/\s+at.*(?:\(|\s)(.*)\)?/,pathRegex=/^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/,homeDir=typeof os2.homedir>"u"?"":os2.homedir();module.exports=(stack,options)=>(options=Object.assign({pretty:!1},options),stack.replace(/\\/g,"/").split(`
72
+ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof GlobSync))return new GlobSync(pattern,options);if(setopts(this,pattern,options),this.noprocess)return this;var n=this.minimatch.set.length;this.matches=new Array(n);for(var i=0;i<n;i++)this._process(this.minimatch.set[i],i,!1);this._finish();}GlobSync.prototype._finish=function(){if(assert2.ok(this instanceof GlobSync),this.realpath){var self2=this;this.matches.forEach(function(matchset,index){var set=self2.matches[index]=Object.create(null);for(var p in matchset)try{p=self2._makeAbs(p);var real=rp.realpathSync(p,self2.realpathCache);set[real]=!0;}catch(er){if(er.syscall==="stat")set[self2._makeAbs(p)]=!0;else throw er}});}common.finish(this);};GlobSync.prototype._process=function(pattern,index,inGlobStar){assert2.ok(this instanceof GlobSync);for(var n=0;typeof pattern[n]=="string";)n++;var prefix;switch(n){case pattern.length:this._processSimple(pattern.join("/"),index);return;case 0:prefix=null;break;default:prefix=pattern.slice(0,n).join("/");break}var remain=pattern.slice(n),read;prefix===null?read=".":((isAbsolute3(prefix)||isAbsolute3(pattern.map(function(p){return typeof p=="string"?p:"[*]"}).join("/")))&&(!prefix||!isAbsolute3(prefix))&&(prefix="/"+prefix),read=prefix);var abs=this._makeAbs(read);if(!childrenIgnored(this,read)){var isGlobStar=remain[0]===minimatch.GLOBSTAR;isGlobStar?this._processGlobStar(prefix,read,abs,remain,index,inGlobStar):this._processReaddir(prefix,read,abs,remain,index,inGlobStar);}};GlobSync.prototype._processReaddir=function(prefix,read,abs,remain,index,inGlobStar){var entries2=this._readdir(abs,inGlobStar);if(entries2){for(var pn=remain[0],negate=!!this.minimatch.negate,rawGlob=pn._glob,dotOk=this.dot||rawGlob.charAt(0)===".",matchedEntries=[],i=0;i<entries2.length;i++){var e=entries2[i];if(e.charAt(0)!=="."||dotOk){var m;negate&&!prefix?m=!e.match(pn):m=e.match(pn),m&&matchedEntries.push(e);}}var len=matchedEntries.length;if(len!==0){if(remain.length===1&&!this.mark&&!this.stat){this.matches[index]||(this.matches[index]=Object.create(null));for(var i=0;i<len;i++){var e=matchedEntries[i];prefix&&(prefix.slice(-1)!=="/"?e=prefix+"/"+e:e=prefix+e),e.charAt(0)==="/"&&!this.nomount&&(e=path13.join(this.root,e)),this._emitMatch(index,e);}return}remain.shift();for(var i=0;i<len;i++){var e=matchedEntries[i],newPattern;prefix?newPattern=[prefix,e]:newPattern=[e],this._process(newPattern.concat(remain),index,inGlobStar);}}}};GlobSync.prototype._emitMatch=function(index,e){if(!isIgnored(this,e)){var abs=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=abs),!this.matches[index][e]){if(this.nodir){var c=this.cache[abs];if(c==="DIR"||Array.isArray(c))return}this.matches[index][e]=!0,this.stat&&this._stat(e);}}};GlobSync.prototype._readdirInGlobStar=function(abs){if(this.follow)return this._readdir(abs,!1);var entries2,lstat;try{lstat=this.fs.lstatSync(abs);}catch(er){if(er.code==="ENOENT")return null}var isSym=lstat&&lstat.isSymbolicLink();return this.symlinks[abs]=isSym,!isSym&&lstat&&!lstat.isDirectory()?this.cache[abs]="FILE":entries2=this._readdir(abs,!1),entries2};GlobSync.prototype._readdir=function(abs,inGlobStar){if(inGlobStar&&!ownProp(this.symlinks,abs))return this._readdirInGlobStar(abs);if(ownProp(this.cache,abs)){var c=this.cache[abs];if(!c||c==="FILE")return null;if(Array.isArray(c))return c}try{return this._readdirEntries(abs,this.fs.readdirSync(abs))}catch(er){return this._readdirError(abs,er),null}};GlobSync.prototype._readdirEntries=function(abs,entries2){if(!this.mark&&!this.stat)for(var i=0;i<entries2.length;i++){var e=entries2[i];abs==="/"?e=abs+e:e=abs+"/"+e,this.cache[e]=!0;}return this.cache[abs]=entries2,entries2};GlobSync.prototype._readdirError=function(f,er){switch(er.code){case"ENOTSUP":case"ENOTDIR":var abs=this._makeAbs(f);if(this.cache[abs]="FILE",abs===this.cwdAbs){var error=new Error(er.code+" invalid cwd "+this.cwd);throw error.path=this.cwd,error.code=er.code,error}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(f)]=!1;break;default:if(this.cache[this._makeAbs(f)]=!1,this.strict)throw er;this.silent||console.error("glob error",er);break}};GlobSync.prototype._processGlobStar=function(prefix,read,abs,remain,index,inGlobStar){var entries2=this._readdir(abs,inGlobStar);if(entries2){var remainWithoutGlobStar=remain.slice(1),gspref=prefix?[prefix]:[],noGlobStar=gspref.concat(remainWithoutGlobStar);this._process(noGlobStar,index,!1);var len=entries2.length,isSym=this.symlinks[abs];if(!(isSym&&inGlobStar))for(var i=0;i<len;i++){var e=entries2[i];if(!(e.charAt(0)==="."&&!this.dot)){var instead=gspref.concat(entries2[i],remainWithoutGlobStar);this._process(instead,index,!0);var below=gspref.concat(entries2[i],remain);this._process(below,index,!0);}}}};GlobSync.prototype._processSimple=function(prefix,index){var exists=this._stat(prefix);if(this.matches[index]||(this.matches[index]=Object.create(null)),!!exists){if(prefix&&isAbsolute3(prefix)&&!this.nomount){var trail=/[\/\\]$/.test(prefix);prefix.charAt(0)==="/"?prefix=path13.join(this.root,prefix):(prefix=path13.resolve(this.root,prefix),trail&&(prefix+="/"));}process.platform==="win32"&&(prefix=prefix.replace(/\\/g,"/")),this._emitMatch(index,prefix);}};GlobSync.prototype._stat=function(f){var abs=this._makeAbs(f),needDir=f.slice(-1)==="/";if(f.length>this.maxLength)return !1;if(!this.stat&&ownProp(this.cache,abs)){var c=this.cache[abs];if(Array.isArray(c)&&(c="DIR"),!needDir||c==="DIR")return c;if(needDir&&c==="FILE")return !1}var stat=this.statCache[abs];if(!stat){var lstat;try{lstat=this.fs.lstatSync(abs);}catch(er){if(er&&(er.code==="ENOENT"||er.code==="ENOTDIR"))return this.statCache[abs]=!1,!1}if(lstat&&lstat.isSymbolicLink())try{stat=this.fs.statSync(abs);}catch{stat=lstat;}else stat=lstat;}this.statCache[abs]=stat;var c=!0;return stat&&(c=stat.isDirectory()?"DIR":"FILE"),this.cache[abs]=this.cache[abs]||c,needDir&&c==="FILE"?!1:c};GlobSync.prototype._mark=function(p){return common.mark(this,p)};GlobSync.prototype._makeAbs=function(f){return common.makeAbs(this,f)};}});var require_wrappy=__commonJS({"../../node_modules/wrappy/wrappy.js"(exports,module){module.exports=wrappy;function wrappy(fn,cb){if(fn&&cb)return wrappy(fn)(cb);if(typeof fn!="function")throw new TypeError("need wrapper function");return Object.keys(fn).forEach(function(k){wrapper[k]=fn[k];}),wrapper;function wrapper(){for(var args=new Array(arguments.length),i=0;i<args.length;i++)args[i]=arguments[i];var ret=fn.apply(this,args),cb2=args[args.length-1];return typeof ret=="function"&&ret!==cb2&&Object.keys(cb2).forEach(function(k){ret[k]=cb2[k];}),ret}}}});var require_once=__commonJS({"../../node_modules/once/once.js"(exports,module){var wrappy=require_wrappy();module.exports=wrappy(once2);module.exports.strict=wrappy(onceStrict);once2.proto=once2(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once2(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:!0});});function once2(fn){var f=function(){return f.called?f.value:(f.called=!0,f.value=fn.apply(this,arguments))};return f.called=!1,f}function onceStrict(fn){var f=function(){if(f.called)throw new Error(f.onceError);return f.called=!0,f.value=fn.apply(this,arguments)},name=fn.name||"Function wrapped with `once`";return f.onceError=name+" shouldn't be called more than once",f.called=!1,f}}});var require_inflight=__commonJS({"../../node_modules/inflight/inflight.js"(exports,module){var wrappy=require_wrappy(),reqs=Object.create(null),once2=require_once();module.exports=wrappy(inflight);function inflight(key,cb){return reqs[key]?(reqs[key].push(cb),null):(reqs[key]=[cb],makeres(key))}function makeres(key){return once2(function RES(){var cbs=reqs[key],len=cbs.length,args=slice(arguments);try{for(var i=0;i<len;i++)cbs[i].apply(null,args);}finally{cbs.length>len?(cbs.splice(0,len),process.nextTick(function(){RES.apply(null,args);})):delete reqs[key];}})}function slice(args){for(var length=args.length,array=[],i=0;i<length;i++)array[i]=args[i];return array}}});var require_glob=__commonJS({"../../node_modules/rimraf/node_modules/glob/glob.js"(exports,module){module.exports=glob3;var rp=require_fs(),minimatch=require_minimatch();minimatch.Minimatch;var inherits=require_inherits(),EE=__require("events").EventEmitter,path13=__require("path"),assert2=__require("assert"),isAbsolute3=require_path_is_absolute(),globSync=require_sync(),common=require_common(),setopts=common.setopts,ownProp=common.ownProp,inflight=require_inflight();__require("util");var childrenIgnored=common.childrenIgnored,isIgnored=common.isIgnored,once2=require_once();function glob3(pattern,options,cb){if(typeof options=="function"&&(cb=options,options={}),options||(options={}),options.sync){if(cb)throw new TypeError("callback provided to sync glob");return globSync(pattern,options)}return new Glob(pattern,options,cb)}glob3.sync=globSync;var GlobSync=glob3.GlobSync=globSync.GlobSync;glob3.glob=glob3;function extend(origin,add){if(add===null||typeof add!="object")return origin;for(var keys=Object.keys(add),i=keys.length;i--;)origin[keys[i]]=add[keys[i]];return origin}glob3.hasMagic=function(pattern,options_){var options=extend({},options_);options.noprocess=!0;var g=new Glob(pattern,options),set=g.minimatch.set;if(!pattern)return !1;if(set.length>1)return !0;for(var j=0;j<set[0].length;j++)if(typeof set[0][j]!="string")return !0;return !1};glob3.Glob=Glob;inherits(Glob,EE);function Glob(pattern,options,cb){if(typeof options=="function"&&(cb=options,options=null),options&&options.sync){if(cb)throw new TypeError("callback provided to sync glob");return new GlobSync(pattern,options)}if(!(this instanceof Glob))return new Glob(pattern,options,cb);setopts(this,pattern,options),this._didRealPath=!1;var n=this.minimatch.set.length;this.matches=new Array(n),typeof cb=="function"&&(cb=once2(cb),this.on("error",cb),this.on("end",function(matches){cb(null,matches);}));var self2=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(n===0)return done();for(var sync=!0,i=0;i<n;i++)this._process(this.minimatch.set[i],i,!1,done);sync=!1;function done(){--self2._processing,self2._processing<=0&&(sync?process.nextTick(function(){self2._finish();}):self2._finish());}}Glob.prototype._finish=function(){if(assert2(this instanceof Glob),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();common.finish(this),this.emit("end",this.found);}};Glob.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var n=this.matches.length;if(n===0)return this._finish();for(var self2=this,i=0;i<this.matches.length;i++)this._realpathSet(i,next);function next(){--n===0&&self2._finish();}};Glob.prototype._realpathSet=function(index,cb){var matchset=this.matches[index];if(!matchset)return cb();var found=Object.keys(matchset),self2=this,n=found.length;if(n===0)return cb();var set=this.matches[index]=Object.create(null);found.forEach(function(p,i){p=self2._makeAbs(p),rp.realpath(p,self2.realpathCache,function(er,real){er?er.syscall==="stat"?set[p]=!0:self2.emit("error",er):set[real]=!0,--n===0&&(self2.matches[index]=set,cb());});});};Glob.prototype._mark=function(p){return common.mark(this,p)};Glob.prototype._makeAbs=function(f){return common.makeAbs(this,f)};Glob.prototype.abort=function(){this.aborted=!0,this.emit("abort");};Glob.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"));};Glob.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var eq=this._emitQueue.slice(0);this._emitQueue.length=0;for(var i=0;i<eq.length;i++){var e=eq[i];this._emitMatch(e[0],e[1]);}}if(this._processQueue.length){var pq=this._processQueue.slice(0);this._processQueue.length=0;for(var i=0;i<pq.length;i++){var p=pq[i];this._processing--,this._process(p[0],p[1],p[2],p[3]);}}}};Glob.prototype._process=function(pattern,index,inGlobStar,cb){if(assert2(this instanceof Glob),assert2(typeof cb=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([pattern,index,inGlobStar,cb]);return}for(var n=0;typeof pattern[n]=="string";)n++;var prefix;switch(n){case pattern.length:this._processSimple(pattern.join("/"),index,cb);return;case 0:prefix=null;break;default:prefix=pattern.slice(0,n).join("/");break}var remain=pattern.slice(n),read;prefix===null?read=".":((isAbsolute3(prefix)||isAbsolute3(pattern.map(function(p){return typeof p=="string"?p:"[*]"}).join("/")))&&(!prefix||!isAbsolute3(prefix))&&(prefix="/"+prefix),read=prefix);var abs=this._makeAbs(read);if(childrenIgnored(this,read))return cb();var isGlobStar=remain[0]===minimatch.GLOBSTAR;isGlobStar?this._processGlobStar(prefix,read,abs,remain,index,inGlobStar,cb):this._processReaddir(prefix,read,abs,remain,index,inGlobStar,cb);}};Glob.prototype._processReaddir=function(prefix,read,abs,remain,index,inGlobStar,cb){var self2=this;this._readdir(abs,inGlobStar,function(er,entries2){return self2._processReaddir2(prefix,read,abs,remain,index,inGlobStar,entries2,cb)});};Glob.prototype._processReaddir2=function(prefix,read,abs,remain,index,inGlobStar,entries2,cb){if(!entries2)return cb();for(var pn=remain[0],negate=!!this.minimatch.negate,rawGlob=pn._glob,dotOk=this.dot||rawGlob.charAt(0)===".",matchedEntries=[],i=0;i<entries2.length;i++){var e=entries2[i];if(e.charAt(0)!=="."||dotOk){var m;negate&&!prefix?m=!e.match(pn):m=e.match(pn),m&&matchedEntries.push(e);}}var len=matchedEntries.length;if(len===0)return cb();if(remain.length===1&&!this.mark&&!this.stat){this.matches[index]||(this.matches[index]=Object.create(null));for(var i=0;i<len;i++){var e=matchedEntries[i];prefix&&(prefix!=="/"?e=prefix+"/"+e:e=prefix+e),e.charAt(0)==="/"&&!this.nomount&&(e=path13.join(this.root,e)),this._emitMatch(index,e);}return cb()}remain.shift();for(var i=0;i<len;i++){var e=matchedEntries[i];prefix&&(prefix!=="/"?e=prefix+"/"+e:e=prefix+e),this._process([e].concat(remain),index,inGlobStar,cb);}cb();};Glob.prototype._emitMatch=function(index,e){if(!this.aborted&&!isIgnored(this,e)){if(this.paused){this._emitQueue.push([index,e]);return}var abs=isAbsolute3(e)?e:this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=abs),!this.matches[index][e]){if(this.nodir){var c=this.cache[abs];if(c==="DIR"||Array.isArray(c))return}this.matches[index][e]=!0;var st=this.statCache[abs];st&&this.emit("stat",e,st),this.emit("match",e);}}};Glob.prototype._readdirInGlobStar=function(abs,cb){if(this.aborted)return;if(this.follow)return this._readdir(abs,!1,cb);var lstatkey="lstat\0"+abs,self2=this,lstatcb=inflight(lstatkey,lstatcb_);lstatcb&&self2.fs.lstat(abs,lstatcb);function lstatcb_(er,lstat){if(er&&er.code==="ENOENT")return cb();var isSym=lstat&&lstat.isSymbolicLink();self2.symlinks[abs]=isSym,!isSym&&lstat&&!lstat.isDirectory()?(self2.cache[abs]="FILE",cb()):self2._readdir(abs,!1,cb);}};Glob.prototype._readdir=function(abs,inGlobStar,cb){if(!this.aborted&&(cb=inflight("readdir\0"+abs+"\0"+inGlobStar,cb),!!cb)){if(inGlobStar&&!ownProp(this.symlinks,abs))return this._readdirInGlobStar(abs,cb);if(ownProp(this.cache,abs)){var c=this.cache[abs];if(!c||c==="FILE")return cb();if(Array.isArray(c))return cb(null,c)}var self2=this;self2.fs.readdir(abs,readdirCb(this,abs,cb));}};function readdirCb(self2,abs,cb){return function(er,entries2){er?self2._readdirError(abs,er,cb):self2._readdirEntries(abs,entries2,cb);}}Glob.prototype._readdirEntries=function(abs,entries2,cb){if(!this.aborted){if(!this.mark&&!this.stat)for(var i=0;i<entries2.length;i++){var e=entries2[i];abs==="/"?e=abs+e:e=abs+"/"+e,this.cache[e]=!0;}return this.cache[abs]=entries2,cb(null,entries2)}};Glob.prototype._readdirError=function(f,er,cb){if(!this.aborted){switch(er.code){case"ENOTSUP":case"ENOTDIR":var abs=this._makeAbs(f);if(this.cache[abs]="FILE",abs===this.cwdAbs){var error=new Error(er.code+" invalid cwd "+this.cwd);error.path=this.cwd,error.code=er.code,this.emit("error",error),this.abort();}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(f)]=!1;break;default:this.cache[this._makeAbs(f)]=!1,this.strict&&(this.emit("error",er),this.abort()),this.silent||console.error("glob error",er);break}return cb()}};Glob.prototype._processGlobStar=function(prefix,read,abs,remain,index,inGlobStar,cb){var self2=this;this._readdir(abs,inGlobStar,function(er,entries2){self2._processGlobStar2(prefix,read,abs,remain,index,inGlobStar,entries2,cb);});};Glob.prototype._processGlobStar2=function(prefix,read,abs,remain,index,inGlobStar,entries2,cb){if(!entries2)return cb();var remainWithoutGlobStar=remain.slice(1),gspref=prefix?[prefix]:[],noGlobStar=gspref.concat(remainWithoutGlobStar);this._process(noGlobStar,index,!1,cb);var isSym=this.symlinks[abs],len=entries2.length;if(isSym&&inGlobStar)return cb();for(var i=0;i<len;i++){var e=entries2[i];if(!(e.charAt(0)==="."&&!this.dot)){var instead=gspref.concat(entries2[i],remainWithoutGlobStar);this._process(instead,index,!0,cb);var below=gspref.concat(entries2[i],remain);this._process(below,index,!0,cb);}}cb();};Glob.prototype._processSimple=function(prefix,index,cb){var self2=this;this._stat(prefix,function(er,exists){self2._processSimple2(prefix,index,er,exists,cb);});};Glob.prototype._processSimple2=function(prefix,index,er,exists,cb){if(this.matches[index]||(this.matches[index]=Object.create(null)),!exists)return cb();if(prefix&&isAbsolute3(prefix)&&!this.nomount){var trail=/[\/\\]$/.test(prefix);prefix.charAt(0)==="/"?prefix=path13.join(this.root,prefix):(prefix=path13.resolve(this.root,prefix),trail&&(prefix+="/"));}process.platform==="win32"&&(prefix=prefix.replace(/\\/g,"/")),this._emitMatch(index,prefix),cb();};Glob.prototype._stat=function(f,cb){var abs=this._makeAbs(f),needDir=f.slice(-1)==="/";if(f.length>this.maxLength)return cb();if(!this.stat&&ownProp(this.cache,abs)){var c=this.cache[abs];if(Array.isArray(c)&&(c="DIR"),!needDir||c==="DIR")return cb(null,c);if(needDir&&c==="FILE")return cb()}var stat=this.statCache[abs];if(stat!==void 0){if(stat===!1)return cb(null,stat);var type=stat.isDirectory()?"DIR":"FILE";return needDir&&type==="FILE"?cb():cb(null,type,stat)}var self2=this,statcb=inflight("stat\0"+abs,lstatcb_);statcb&&self2.fs.lstat(abs,statcb);function lstatcb_(er,lstat){if(lstat&&lstat.isSymbolicLink())return self2.fs.stat(abs,function(er2,stat2){er2?self2._stat2(f,abs,null,lstat,cb):self2._stat2(f,abs,er2,stat2,cb);});self2._stat2(f,abs,er,lstat,cb);}};Glob.prototype._stat2=function(f,abs,er,stat,cb){if(er&&(er.code==="ENOENT"||er.code==="ENOTDIR"))return this.statCache[abs]=!1,cb();var needDir=f.slice(-1)==="/";if(this.statCache[abs]=stat,abs.slice(-1)==="/"&&stat&&!stat.isDirectory())return cb(null,!1,stat);var c=!0;return stat&&(c=stat.isDirectory()?"DIR":"FILE"),this.cache[abs]=this.cache[abs]||c,needDir&&c==="FILE"?cb():cb(null,c,stat)};}});var require_rimraf=__commonJS({"../../node_modules/rimraf/rimraf.js"(exports,module){var assert2=__require("assert"),path13=__require("path"),fs8=__require("fs"),glob3;try{glob3=require_glob();}catch{}var defaultGlobOpts={nosort:!0,silent:!0},timeout=0,isWindows=process.platform==="win32",defaults2=options=>{if(["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(m=>{options[m]=options[m]||fs8[m],m=m+"Sync",options[m]=options[m]||fs8[m];}),options.maxBusyTries=options.maxBusyTries||3,options.emfileWait=options.emfileWait||1e3,options.glob===!1&&(options.disableGlob=!0),options.disableGlob!==!0&&glob3===void 0)throw Error("glob dependency not found, set `options.disableGlob = true` if intentional");options.disableGlob=options.disableGlob||!1,options.glob=options.glob||defaultGlobOpts;},rimraf=(p,options,cb)=>{typeof options=="function"&&(cb=options,options={}),assert2(p,"rimraf: missing path"),assert2.equal(typeof p,"string","rimraf: path should be a string"),assert2.equal(typeof cb,"function","rimraf: callback function required"),assert2(options,"rimraf: invalid options argument provided"),assert2.equal(typeof options,"object","rimraf: options should be object"),defaults2(options);let busyTries=0,errState=null,n=0,next=er=>{errState=errState||er,--n===0&&cb(errState);},afterGlob=(er,results)=>{if(er)return cb(er);if(n=results.length,n===0)return cb();results.forEach(p2=>{let CB=er2=>{if(er2){if((er2.code==="EBUSY"||er2.code==="ENOTEMPTY"||er2.code==="EPERM")&&busyTries<options.maxBusyTries)return busyTries++,setTimeout(()=>rimraf_(p2,options,CB),busyTries*100);if(er2.code==="EMFILE"&&timeout<options.emfileWait)return setTimeout(()=>rimraf_(p2,options,CB),timeout++);er2.code==="ENOENT"&&(er2=null);}timeout=0,next(er2);};rimraf_(p2,options,CB);});};if(options.disableGlob||!glob3.hasMagic(p))return afterGlob(null,[p]);options.lstat(p,(er,stat)=>{if(!er)return afterGlob(null,[p]);glob3(p,options.glob,afterGlob);});},rimraf_=(p,options,cb)=>{assert2(p),assert2(options),assert2(typeof cb=="function"),options.lstat(p,(er,st)=>{if(er&&er.code==="ENOENT")return cb(null);if(er&&er.code==="EPERM"&&isWindows&&fixWinEPERM(p,options,er,cb),st&&st.isDirectory())return rmdir(p,options,er,cb);options.unlink(p,er2=>{if(er2){if(er2.code==="ENOENT")return cb(null);if(er2.code==="EPERM")return isWindows?fixWinEPERM(p,options,er2,cb):rmdir(p,options,er2,cb);if(er2.code==="EISDIR")return rmdir(p,options,er2,cb)}return cb(er2)});});},fixWinEPERM=(p,options,er,cb)=>{assert2(p),assert2(options),assert2(typeof cb=="function"),options.chmod(p,438,er2=>{er2?cb(er2.code==="ENOENT"?null:er):options.stat(p,(er3,stats)=>{er3?cb(er3.code==="ENOENT"?null:er):stats.isDirectory()?rmdir(p,options,er,cb):options.unlink(p,cb);});});},fixWinEPERMSync=(p,options,er)=>{assert2(p),assert2(options);try{options.chmodSync(p,438);}catch(er2){if(er2.code==="ENOENT")return;throw er}let stats;try{stats=options.statSync(p);}catch(er3){if(er3.code==="ENOENT")return;throw er}stats.isDirectory()?rmdirSync(p,options,er):options.unlinkSync(p);},rmdir=(p,options,originalEr,cb)=>{assert2(p),assert2(options),assert2(typeof cb=="function"),options.rmdir(p,er=>{er&&(er.code==="ENOTEMPTY"||er.code==="EEXIST"||er.code==="EPERM")?rmkids(p,options,cb):er&&er.code==="ENOTDIR"?cb(originalEr):cb(er);});},rmkids=(p,options,cb)=>{assert2(p),assert2(options),assert2(typeof cb=="function"),options.readdir(p,(er,files)=>{if(er)return cb(er);let n=files.length;if(n===0)return options.rmdir(p,cb);let errState;files.forEach(f=>{rimraf(path13.join(p,f),options,er2=>{if(!errState){if(er2)return cb(errState=er2);--n===0&&options.rmdir(p,cb);}});});});},rimrafSync=(p,options)=>{options=options||{},defaults2(options),assert2(p,"rimraf: missing path"),assert2.equal(typeof p,"string","rimraf: path should be a string"),assert2(options,"rimraf: missing options"),assert2.equal(typeof options,"object","rimraf: options should be object");let results;if(options.disableGlob||!glob3.hasMagic(p))results=[p];else try{options.lstatSync(p),results=[p];}catch{results=glob3.sync(p,options.glob);}if(results.length)for(let i=0;i<results.length;i++){let p2=results[i],st;try{st=options.lstatSync(p2);}catch(er){if(er.code==="ENOENT")return;er.code==="EPERM"&&isWindows&&fixWinEPERMSync(p2,options,er);}try{st&&st.isDirectory()?rmdirSync(p2,options,null):options.unlinkSync(p2);}catch(er){if(er.code==="ENOENT")return;if(er.code==="EPERM")return isWindows?fixWinEPERMSync(p2,options,er):rmdirSync(p2,options,er);if(er.code!=="EISDIR")throw er;rmdirSync(p2,options,er);}}},rmdirSync=(p,options,originalEr)=>{assert2(p),assert2(options);try{options.rmdirSync(p);}catch(er){if(er.code==="ENOENT")return;if(er.code==="ENOTDIR")throw originalEr;(er.code==="ENOTEMPTY"||er.code==="EEXIST"||er.code==="EPERM")&&rmkidsSync(p,options);}},rmkidsSync=(p,options)=>{assert2(p),assert2(options),options.readdirSync(p).forEach(f=>rimrafSync(path13.join(p,f),options));let retries=isWindows?100:1,i=0;do{let threw=!0;try{let ret=options.rmdirSync(p,options);return threw=!1,ret}finally{if(++i<retries&&threw)continue}}while(!0)};module.exports=rimraf;rimraf.sync=rimrafSync;}});var require_indent_string=__commonJS({"../../node_modules/indent-string/index.js"(exports,module){module.exports=(string,count=1,options)=>{if(options={indent:" ",includeEmptyLines:!1,...options},typeof string!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof string}\``);if(typeof count!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof count}\``);if(typeof options.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\``);if(count===0)return string;let regex=options.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return string.replace(regex,options.indent.repeat(count))};}});var require_clean_stack=__commonJS({"../../node_modules/clean-stack/index.js"(exports,module){var os3=__require("os"),extractPathRegex=/\s+at.*(?:\(|\s)(.*)\)?/,pathRegex=/^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/,homeDir=typeof os3.homedir>"u"?"":os3.homedir();module.exports=(stack,options)=>(options=Object.assign({pretty:!1},options),stack.replace(/\\/g,"/").split(`
74
73
  `).filter(line=>{let pathMatches=line.match(extractPathRegex);if(pathMatches===null||!pathMatches[1])return !0;let match=pathMatches[1];return match.includes(".app/Contents/Resources/electron.asar")||match.includes(".app/Contents/Resources/default_app.asar")?!1:!pathRegex.test(match)}).filter(line=>line.trim()!=="").map(line=>options.pretty?line.replace(extractPathRegex,(m,p1)=>m.replace(p1,p1.replace(homeDir,"~"))):line).join(`
75
74
  `));}});var require_aggregate_error=__commonJS({"../../node_modules/aggregate-error/index.js"(exports,module){var indentString=require_indent_string(),cleanStack=require_clean_stack(),cleanInternalStack=stack=>stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,""),AggregateError=class extends Error{constructor(errors){if(!Array.isArray(errors))throw new TypeError(`Expected input to be an Array, got ${typeof errors}`);errors=[...errors].map(error=>error instanceof Error?error:error!==null&&typeof error=="object"?Object.assign(new Error(error.message),error):new Error(error));let message=errors.map(error=>typeof error.stack=="string"?cleanInternalStack(cleanStack(error.stack)):String(error)).join(`
76
75
  `);message=`
@@ -78,12 +77,12 @@ See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof GlobS
78
77
  `:`
79
78
  `.charCodeAt(),CR=typeof input=="string"?"\r":"\r".charCodeAt();return input[input.length-1]===LF&&(input=input.slice(0,input.length-1)),input[input.length-1]===CR&&(input=input.slice(0,input.length-1)),input};}});var require_npm_run_path=__commonJS({"../../node_modules/npm-run-path/index.js"(exports,module){var path13=__require("path"),pathKey=require_path_key(),npmRunPath=options=>{options={cwd:process.cwd(),path:process.env[pathKey()],execPath:process.execPath,...options};let previous,cwdPath=path13.resolve(options.cwd),result=[];for(;previous!==cwdPath;)result.push(path13.join(cwdPath,"node_modules/.bin")),previous=cwdPath,cwdPath=path13.resolve(cwdPath,"..");let execPathDir=path13.resolve(options.cwd,options.execPath,"..");return result.push(execPathDir),result.concat(options.path).join(path13.delimiter)};module.exports=npmRunPath;module.exports.default=npmRunPath;module.exports.env=options=>{options={env:process.env,...options};let env={...options.env},path14=pathKey({env});return options.path=env[path14],env[path14]=module.exports(options),env};}});var require_mimic_fn=__commonJS({"../../node_modules/mimic-fn/index.js"(exports,module){var mimicFn=(to,from)=>{for(let prop of Reflect.ownKeys(from))Object.defineProperty(to,prop,Object.getOwnPropertyDescriptor(from,prop));return to};module.exports=mimicFn;module.exports.default=mimicFn;}});var require_onetime=__commonJS({"../../node_modules/onetime/index.js"(exports,module){var mimicFn=require_mimic_fn(),calledFunctions=new WeakMap,onetime=(function_,options={})=>{if(typeof function_!="function")throw new TypeError("Expected a function");let returnValue,callCount=0,functionName=function_.displayName||function_.name||"<anonymous>",onetime2=function(...arguments_){if(calledFunctions.set(onetime2,++callCount),callCount===1)returnValue=function_.apply(this,arguments_),function_=null;else if(options.throw===!0)throw new Error(`Function \`${functionName}\` can only be called once`);return returnValue};return mimicFn(onetime2,function_),calledFunctions.set(onetime2,callCount),onetime2};module.exports=onetime;module.exports.default=onetime;module.exports.callCount=function_=>{if(!calledFunctions.has(function_))throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);return calledFunctions.get(function_)};}});var require_core=__commonJS({"../../node_modules/execa/node_modules/human-signals/build/src/core.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.SIGNALS=void 0;var SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];exports.SIGNALS=SIGNALS;}});var require_realtime=__commonJS({"../../node_modules/execa/node_modules/human-signals/build/src/realtime.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.SIGRTMAX=exports.getRealtimeSignals=void 0;var getRealtimeSignals=function(){let length=SIGRTMAX-SIGRTMIN+1;return Array.from({length},getRealtimeSignal)};exports.getRealtimeSignals=getRealtimeSignals;var getRealtimeSignal=function(value,index){return {name:`SIGRT${index+1}`,number:SIGRTMIN+index,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},SIGRTMIN=34,SIGRTMAX=64;exports.SIGRTMAX=SIGRTMAX;}});var require_signals=__commonJS({"../../node_modules/execa/node_modules/human-signals/build/src/signals.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.getSignals=void 0;var _os=__require("os"),_core=require_core(),_realtime=require_realtime(),getSignals=function(){let realtimeSignals=(0, _realtime.getRealtimeSignals)();return [..._core.SIGNALS,...realtimeSignals].map(normalizeSignal)};exports.getSignals=getSignals;var normalizeSignal=function({name,number:defaultNumber,description,action,forced=!1,standard}){let{signals:{[name]:constantSignal}}=_os.constants,supported=constantSignal!==void 0;return {name,number:supported?constantSignal:defaultNumber,description,supported,action,forced,standard}};}});var require_main=__commonJS({"../../node_modules/execa/node_modules/human-signals/build/src/main.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.signalsByNumber=exports.signalsByName=void 0;var _os=__require("os"),_signals=require_signals(),_realtime=require_realtime(),getSignalsByName=function(){return (0, _signals.getSignals)().reduce(getSignalByName,{})},getSignalByName=function(signalByNameMemo,{name,number,description,supported,action,forced,standard}){return {...signalByNameMemo,[name]:{name,number,description,supported,action,forced,standard}}},signalsByName=getSignalsByName();exports.signalsByName=signalsByName;var getSignalsByNumber=function(){let signals=(0, _signals.getSignals)(),length=_realtime.SIGRTMAX+1,signalsA=Array.from({length},(value,number)=>getSignalByNumber(number,signals));return Object.assign({},...signalsA)},getSignalByNumber=function(number,signals){let signal=findSignalByNumber(number,signals);if(signal===void 0)return {};let{name,description,supported,action,forced,standard}=signal;return {[number]:{name,number,description,supported,action,forced,standard}}},findSignalByNumber=function(number,signals){let signal=signals.find(({name})=>_os.constants.signals[name]===number);return signal!==void 0?signal:signals.find(signalA=>signalA.number===number)},signalsByNumber=getSignalsByNumber();exports.signalsByNumber=signalsByNumber;}});var require_error=__commonJS({"../../node_modules/execa/lib/error.js"(exports,module){var{signalsByName}=require_main(),getErrorPrefix=({timedOut:timedOut2,timeout,errorCode,signal,signalDescription,exitCode,isCanceled})=>timedOut2?`timed out after ${timeout} milliseconds`:isCanceled?"was canceled":errorCode!==void 0?`failed with ${errorCode}`:signal!==void 0?`was killed with ${signal} (${signalDescription})`:exitCode!==void 0?`failed with exit code ${exitCode}`:"failed",makeError=({stdout,stderr,all:all2,error,signal,exitCode,command,escapedCommand,timedOut:timedOut2,isCanceled,killed,parsed:{options:{timeout}}})=>{exitCode=exitCode===null?void 0:exitCode,signal=signal===null?void 0:signal;let signalDescription=signal===void 0?void 0:signalsByName[signal].description,errorCode=error&&error.code,execaMessage=`Command ${getErrorPrefix({timedOut:timedOut2,timeout,errorCode,signal,signalDescription,exitCode,isCanceled})}: ${command}`,isError=Object.prototype.toString.call(error)==="[object Error]",shortMessage=isError?`${execaMessage}
80
79
  ${error.message}`:execaMessage,message=[shortMessage,stderr,stdout].filter(Boolean).join(`
81
- `);return isError?(error.originalMessage=error.message,error.message=message):error=new Error(message),error.shortMessage=shortMessage,error.command=command,error.escapedCommand=escapedCommand,error.exitCode=exitCode,error.signal=signal,error.signalDescription=signalDescription,error.stdout=stdout,error.stderr=stderr,all2!==void 0&&(error.all=all2),"bufferedData"in error&&delete error.bufferedData,error.failed=!0,error.timedOut=!!timedOut2,error.isCanceled=isCanceled,error.killed=killed&&!timedOut2,error};module.exports=makeError;}});var require_stdio=__commonJS({"../../node_modules/execa/lib/stdio.js"(exports,module){var aliases2=["stdin","stdout","stderr"],hasAlias=options=>aliases2.some(alias=>options[alias]!==void 0),normalizeStdio=options=>{if(!options)return;let{stdio}=options;if(stdio===void 0)return aliases2.map(alias=>options[alias]);if(hasAlias(options))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases2.map(alias=>`\`${alias}\``).join(", ")}`);if(typeof stdio=="string")return stdio;if(!Array.isArray(stdio))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);let length=Math.max(stdio.length,aliases2.length);return Array.from({length},(value,index)=>stdio[index])};module.exports=normalizeStdio;module.exports.node=options=>{let stdio=normalizeStdio(options);return stdio==="ipc"?"ipc":stdio===void 0||typeof stdio=="string"?[stdio,stdio,stdio,"ipc"]:stdio.includes("ipc")?stdio:[...stdio,"ipc"]};}});var require_signals2=__commonJS({"../../node_modules/signal-exit/signals.js"(exports,module){module.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&module.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&module.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");}});var require_signal_exit=__commonJS({"../../node_modules/signal-exit/index.js"(exports,module){var process4=global.process,processOk=function(process5){return process5&&typeof process5=="object"&&typeof process5.removeListener=="function"&&typeof process5.emit=="function"&&typeof process5.reallyExit=="function"&&typeof process5.listeners=="function"&&typeof process5.kill=="function"&&typeof process5.pid=="number"&&typeof process5.on=="function"};processOk(process4)?(assert2=__require("assert"),signals=require_signals2(),isWin=/^win/i.test(process4.platform),EE=__require("events"),typeof EE!="function"&&(EE=EE.EventEmitter),process4.__signal_exit_emitter__?emitter=process4.__signal_exit_emitter__:(emitter=process4.__signal_exit_emitter__=new EE,emitter.count=0,emitter.emitted={}),emitter.infinite||(emitter.setMaxListeners(1/0),emitter.infinite=!0),module.exports=function(cb,opts){if(!processOk(global.process))return function(){};assert2.equal(typeof cb,"function","a callback must be provided for exit handler"),loaded===!1&&load();var ev="exit";opts&&opts.alwaysLast&&(ev="afterexit");var remove2=function(){emitter.removeListener(ev,cb),emitter.listeners("exit").length===0&&emitter.listeners("afterexit").length===0&&unload();};return emitter.on(ev,cb),remove2},unload=function(){!loaded||!processOk(global.process)||(loaded=!1,signals.forEach(function(sig){try{process4.removeListener(sig,sigListeners[sig]);}catch{}}),process4.emit=originalProcessEmit,process4.reallyExit=originalProcessReallyExit,emitter.count-=1);},module.exports.unload=unload,emit=function(event,code,signal){emitter.emitted[event]||(emitter.emitted[event]=!0,emitter.emit(event,code,signal));},sigListeners={},signals.forEach(function(sig){sigListeners[sig]=function(){if(processOk(global.process)){var listeners=process4.listeners(sig);listeners.length===emitter.count&&(unload(),emit("exit",null,sig),emit("afterexit",null,sig),isWin&&sig==="SIGHUP"&&(sig="SIGINT"),process4.kill(process4.pid,sig));}};}),module.exports.signals=function(){return signals},loaded=!1,load=function(){loaded||!processOk(global.process)||(loaded=!0,emitter.count+=1,signals=signals.filter(function(sig){try{return process4.on(sig,sigListeners[sig]),!0}catch{return !1}}),process4.emit=processEmit,process4.reallyExit=processReallyExit);},module.exports.load=load,originalProcessReallyExit=process4.reallyExit,processReallyExit=function(code){processOk(global.process)&&(process4.exitCode=code||0,emit("exit",process4.exitCode,null),emit("afterexit",process4.exitCode,null),originalProcessReallyExit.call(process4,process4.exitCode));},originalProcessEmit=process4.emit,processEmit=function(ev,arg){if(ev==="exit"&&processOk(global.process)){arg!==void 0&&(process4.exitCode=arg);var ret=originalProcessEmit.apply(this,arguments);return emit("exit",process4.exitCode,null),emit("afterexit",process4.exitCode,null),ret}else return originalProcessEmit.apply(this,arguments)}):module.exports=function(){return function(){}};var assert2,signals,isWin,EE,emitter,unload,emit,sigListeners,loaded,load,originalProcessReallyExit,processReallyExit,originalProcessEmit,processEmit;}});var require_kill=__commonJS({"../../node_modules/execa/lib/kill.js"(exports,module){var os2=__require("os"),onExit=require_signal_exit(),DEFAULT_FORCE_KILL_TIMEOUT=1e3*5,spawnedKill=(kill,signal="SIGTERM",options={})=>{let killResult=kill(signal);return setKillTimeout(kill,signal,options,killResult),killResult},setKillTimeout=(kill,signal,options,killResult)=>{if(!shouldForceKill(signal,options,killResult))return;let timeout=getForceKillAfterTimeout(options),t=setTimeout(()=>{kill("SIGKILL");},timeout);t.unref&&t.unref();},shouldForceKill=(signal,{forceKillAfterTimeout},killResult)=>isSigterm(signal)&&forceKillAfterTimeout!==!1&&killResult,isSigterm=signal=>signal===os2.constants.signals.SIGTERM||typeof signal=="string"&&signal.toUpperCase()==="SIGTERM",getForceKillAfterTimeout=({forceKillAfterTimeout=!0})=>{if(forceKillAfterTimeout===!0)return DEFAULT_FORCE_KILL_TIMEOUT;if(!Number.isFinite(forceKillAfterTimeout)||forceKillAfterTimeout<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`);return forceKillAfterTimeout},spawnedCancel=(spawned,context)=>{spawned.kill()&&(context.isCanceled=!0);},timeoutKill=(spawned,signal,reject)=>{spawned.kill(signal),reject(Object.assign(new Error("Timed out"),{timedOut:!0,signal}));},setupTimeout=(spawned,{timeout,killSignal="SIGTERM"},spawnedPromise)=>{if(timeout===0||timeout===void 0)return spawnedPromise;let timeoutId,timeoutPromise=new Promise((resolve3,reject)=>{timeoutId=setTimeout(()=>{timeoutKill(spawned,killSignal,reject);},timeout);}),safeSpawnedPromise=spawnedPromise.finally(()=>{clearTimeout(timeoutId);});return Promise.race([timeoutPromise,safeSpawnedPromise])},validateTimeout=({timeout})=>{if(timeout!==void 0&&(!Number.isFinite(timeout)||timeout<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`)},setExitHandler=async(spawned,{cleanup,detached},timedPromise)=>{if(!cleanup||detached)return timedPromise;let removeExitHandler=onExit(()=>{spawned.kill();});return timedPromise.finally(()=>{removeExitHandler();})};module.exports={spawnedKill,spawnedCancel,setupTimeout,validateTimeout,setExitHandler};}});var require_buffer_stream=__commonJS({"../../node_modules/execa/node_modules/get-stream/buffer-stream.js"(exports,module){var{PassThrough:PassThroughStream2}=__require("stream");module.exports=options=>{options={...options};let{array}=options,{encoding}=options,isBuffer=encoding==="buffer",objectMode=!1;array?objectMode=!(encoding||isBuffer):encoding=encoding||"utf8",isBuffer&&(encoding=null);let stream2=new PassThroughStream2({objectMode});encoding&&stream2.setEncoding(encoding);let length=0,chunks=[];return stream2.on("data",chunk=>{chunks.push(chunk),objectMode?length=chunks.length:length+=chunk.length;}),stream2.getBufferedValue=()=>array?chunks:isBuffer?Buffer.concat(chunks,length):chunks.join(""),stream2.getBufferedLength=()=>length,stream2};}});var require_get_stream=__commonJS({"../../node_modules/execa/node_modules/get-stream/index.js"(exports,module){var{constants:BufferConstants}=__require("buffer"),stream2=__require("stream"),{promisify:promisify4}=__require("util"),bufferStream=require_buffer_stream(),streamPipelinePromisified=promisify4(stream2.pipeline),MaxBufferError=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError";}};async function getStream(inputStream,options){if(!inputStream)throw new Error("Expected a stream");options={maxBuffer:1/0,...options};let{maxBuffer}=options,stream3=bufferStream(options);return await new Promise((resolve3,reject)=>{let rejectPromise=error=>{error&&stream3.getBufferedLength()<=BufferConstants.MAX_LENGTH&&(error.bufferedData=stream3.getBufferedValue()),reject(error);};(async()=>{try{await streamPipelinePromisified(inputStream,stream3),resolve3();}catch(error){rejectPromise(error);}})(),stream3.on("data",()=>{stream3.getBufferedLength()>maxBuffer&&rejectPromise(new MaxBufferError);});}),stream3.getBufferedValue()}module.exports=getStream;module.exports.buffer=(stream3,options)=>getStream(stream3,{...options,encoding:"buffer"});module.exports.array=(stream3,options)=>getStream(stream3,{...options,array:!0});module.exports.MaxBufferError=MaxBufferError;}});var require_merge_stream=__commonJS({"../../node_modules/merge-stream/index.js"(exports,module){var{PassThrough:PassThrough3}=__require("stream");module.exports=function(){var sources=[],output=new PassThrough3({objectMode:!0});return output.setMaxListeners(0),output.add=add,output.isEmpty=isEmpty,output.on("unpipe",remove2),Array.prototype.slice.call(arguments).forEach(add),output;function add(source){return Array.isArray(source)?(source.forEach(add),this):(sources.push(source),source.once("end",remove2.bind(null,source)),source.once("error",output.emit.bind(output,"error")),source.pipe(output,{end:!1}),this)}function isEmpty(){return sources.length==0}function remove2(source){sources=sources.filter(function(it){return it!==source}),!sources.length&&output.readable&&output.end();}};}});var require_stream=__commonJS({"../../node_modules/execa/lib/stream.js"(exports,module){var isStream=require_is_stream(),getStream=require_get_stream(),mergeStream=require_merge_stream(),handleInput=(spawned,input)=>{input===void 0||spawned.stdin===void 0||(isStream(input)?input.pipe(spawned.stdin):spawned.stdin.end(input));},makeAllStream=(spawned,{all:all2})=>{if(!all2||!spawned.stdout&&!spawned.stderr)return;let mixed=mergeStream();return spawned.stdout&&mixed.add(spawned.stdout),spawned.stderr&&mixed.add(spawned.stderr),mixed},getBufferedData=async(stream2,streamPromise)=>{if(stream2){stream2.destroy();try{return await streamPromise}catch(error){return error.bufferedData}}},getStreamPromise=(stream2,{encoding,buffer,maxBuffer})=>{if(!(!stream2||!buffer))return encoding?getStream(stream2,{encoding,maxBuffer}):getStream.buffer(stream2,{maxBuffer})},getSpawnedResult=async({stdout,stderr,all:all2},{encoding,buffer,maxBuffer},processDone)=>{let stdoutPromise=getStreamPromise(stdout,{encoding,buffer,maxBuffer}),stderrPromise=getStreamPromise(stderr,{encoding,buffer,maxBuffer}),allPromise=getStreamPromise(all2,{encoding,buffer,maxBuffer:maxBuffer*2});try{return await Promise.all([processDone,stdoutPromise,stderrPromise,allPromise])}catch(error){return Promise.all([{error,signal:error.signal,timedOut:error.timedOut},getBufferedData(stdout,stdoutPromise),getBufferedData(stderr,stderrPromise),getBufferedData(all2,allPromise)])}},validateInputSync=({input})=>{if(isStream(input))throw new TypeError("The `input` option cannot be a stream in sync mode")};module.exports={handleInput,makeAllStream,getSpawnedResult,validateInputSync};}});var require_promise=__commonJS({"../../node_modules/execa/lib/promise.js"(exports,module){var nativePromisePrototype=(async()=>{})().constructor.prototype,descriptors=["then","catch","finally"].map(property=>[property,Reflect.getOwnPropertyDescriptor(nativePromisePrototype,property)]),mergePromise=(spawned,promise)=>{for(let[property,descriptor]of descriptors){let value=typeof promise=="function"?(...args)=>Reflect.apply(descriptor.value,promise(),args):descriptor.value.bind(promise);Reflect.defineProperty(spawned,property,{...descriptor,value});}return spawned},getSpawnedPromise=spawned=>new Promise((resolve3,reject)=>{spawned.on("exit",(exitCode,signal)=>{resolve3({exitCode,signal});}),spawned.on("error",error=>{reject(error);}),spawned.stdin&&spawned.stdin.on("error",error=>{reject(error);});});module.exports={mergePromise,getSpawnedPromise};}});var require_command=__commonJS({"../../node_modules/execa/lib/command.js"(exports,module){var normalizeArgs=(file,args=[])=>Array.isArray(args)?[file,...args]:[file],NO_ESCAPE_REGEXP=/^[\w.-]+$/,DOUBLE_QUOTES_REGEXP=/"/g,escapeArg=arg=>typeof arg!="string"||NO_ESCAPE_REGEXP.test(arg)?arg:`"${arg.replace(DOUBLE_QUOTES_REGEXP,'\\"')}"`,joinCommand=(file,args)=>normalizeArgs(file,args).join(" "),getEscapedCommand=(file,args)=>normalizeArgs(file,args).map(arg=>escapeArg(arg)).join(" "),SPACES_REGEXP=/ +/g,parseCommand=command=>{let tokens=[];for(let token of command.trim().split(SPACES_REGEXP)){let previousToken=tokens[tokens.length-1];previousToken&&previousToken.endsWith("\\")?tokens[tokens.length-1]=`${previousToken.slice(0,-1)} ${token}`:tokens.push(token);}return tokens};module.exports={joinCommand,getEscapedCommand,parseCommand};}});var require_execa=__commonJS({"../../node_modules/execa/index.js"(exports,module){var path13=__require("path"),childProcess=__require("child_process"),crossSpawn=require_cross_spawn(),stripFinalNewline=require_strip_final_newline(),npmRunPath=require_npm_run_path(),onetime=require_onetime(),makeError=require_error(),normalizeStdio=require_stdio(),{spawnedKill,spawnedCancel,setupTimeout,validateTimeout,setExitHandler}=require_kill(),{handleInput,getSpawnedResult,makeAllStream,validateInputSync}=require_stream(),{mergePromise,getSpawnedPromise}=require_promise(),{joinCommand,parseCommand,getEscapedCommand}=require_command(),DEFAULT_MAX_BUFFER=1e3*1e3*100,getEnv=({env:envOption,extendEnv,preferLocal,localDir,execPath})=>{let env=extendEnv?{...process.env,...envOption}:envOption;return preferLocal?npmRunPath.env({env,cwd:localDir,execPath}):env},handleArguments=(file,args,options={})=>{let parsed=crossSpawn._parse(file,args,options);return file=parsed.command,args=parsed.args,options=parsed.options,options={maxBuffer:DEFAULT_MAX_BUFFER,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:options.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...options},options.env=getEnv(options),options.stdio=normalizeStdio(options),process.platform==="win32"&&path13.basename(file,".exe")==="cmd"&&args.unshift("/q"),{file,args,options,parsed}},handleOutput=(options,value,error)=>typeof value!="string"&&!Buffer.isBuffer(value)?error===void 0?void 0:"":options.stripFinalNewline?stripFinalNewline(value):value,execa=(file,args,options)=>{let parsed=handleArguments(file,args,options),command=joinCommand(file,args),escapedCommand=getEscapedCommand(file,args);validateTimeout(parsed.options);let spawned;try{spawned=childProcess.spawn(parsed.file,parsed.args,parsed.options);}catch(error){let dummySpawned=new childProcess.ChildProcess,errorPromise=Promise.reject(makeError({error,stdout:"",stderr:"",all:"",command,escapedCommand,parsed,timedOut:!1,isCanceled:!1,killed:!1}));return mergePromise(dummySpawned,errorPromise)}let spawnedPromise=getSpawnedPromise(spawned),timedPromise=setupTimeout(spawned,parsed.options,spawnedPromise),processDone=setExitHandler(spawned,parsed.options,timedPromise),context={isCanceled:!1};spawned.kill=spawnedKill.bind(null,spawned.kill.bind(spawned)),spawned.cancel=spawnedCancel.bind(null,spawned,context);let handlePromiseOnce=onetime(async()=>{let[{error,exitCode,signal,timedOut:timedOut2},stdoutResult,stderrResult,allResult]=await getSpawnedResult(spawned,parsed.options,processDone),stdout=handleOutput(parsed.options,stdoutResult),stderr=handleOutput(parsed.options,stderrResult),all2=handleOutput(parsed.options,allResult);if(error||exitCode!==0||signal!==null){let returnedError=makeError({error,exitCode,signal,stdout,stderr,all:all2,command,escapedCommand,parsed,timedOut:timedOut2,isCanceled:context.isCanceled,killed:spawned.killed});if(!parsed.options.reject)return returnedError;throw returnedError}return {command,escapedCommand,exitCode:0,stdout,stderr,all:all2,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return handleInput(spawned,parsed.options.input),spawned.all=makeAllStream(spawned,parsed.options),mergePromise(spawned,handlePromiseOnce)};module.exports=execa;module.exports.sync=(file,args,options)=>{let parsed=handleArguments(file,args,options),command=joinCommand(file,args),escapedCommand=getEscapedCommand(file,args);validateInputSync(parsed.options);let result;try{result=childProcess.spawnSync(parsed.file,parsed.args,parsed.options);}catch(error){throw makeError({error,stdout:"",stderr:"",all:"",command,escapedCommand,parsed,timedOut:!1,isCanceled:!1,killed:!1})}let stdout=handleOutput(parsed.options,result.stdout,result.error),stderr=handleOutput(parsed.options,result.stderr,result.error);if(result.error||result.status!==0||result.signal!==null){let error=makeError({stdout,stderr,error:result.error,signal:result.signal,exitCode:result.status,command,escapedCommand,parsed,timedOut:result.error&&result.error.code==="ETIMEDOUT",isCanceled:!1,killed:result.signal!==null});if(!parsed.options.reject)return error;throw error}return {command,escapedCommand,exitCode:0,stdout,stderr,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}};module.exports.command=(command,options)=>{let[file,...args]=parseCommand(command);return execa(file,args,options)};module.exports.commandSync=(command,options)=>{let[file,...args]=parseCommand(command);return execa.sync(file,args,options)};module.exports.node=(scriptPath,args,options={})=>{args&&!Array.isArray(args)&&typeof args=="object"&&(options=args,args=[]);let stdio=normalizeStdio.node(options),defaultExecArgv=process.execArgv.filter(arg=>!arg.startsWith("--inspect")),{nodePath=process.execPath,nodeOptions=defaultExecArgv}=options;return execa(nodePath,[...nodeOptions,scriptPath,...Array.isArray(args)?args:[]],{...options,stdin:void 0,stdout:void 0,stderr:void 0,stdio,shell:!1})};}});var require_strip_json_comments=__commonJS({"../../node_modules/strip-json-comments/index.js"(exports,module){var singleComment=Symbol("singleComment"),multiComment=Symbol("multiComment"),stripWithoutWhitespace=()=>"",stripWithWhitespace=(string,start,end)=>string.slice(start,end).replace(/\S/g," "),isEscaped=(jsonString,quotePosition)=>{let index=quotePosition-1,backslashCount=0;for(;jsonString[index]==="\\";)index-=1,backslashCount+=1;return !!(backslashCount%2)};module.exports=(jsonString,options={})=>{if(typeof jsonString!="string")throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof jsonString}\``);let strip=options.whitespace===!1?stripWithoutWhitespace:stripWithWhitespace,insideString=!1,insideComment=!1,offset=0,result="";for(let i=0;i<jsonString.length;i++){let currentCharacter=jsonString[i],nextCharacter=jsonString[i+1];if(!insideComment&&currentCharacter==='"'&&(isEscaped(jsonString,i)||(insideString=!insideString)),!insideString){if(!insideComment&&currentCharacter+nextCharacter==="//")result+=jsonString.slice(offset,i),offset=i,insideComment=singleComment,i++;else if(insideComment===singleComment&&currentCharacter+nextCharacter===`\r
80
+ `);return isError?(error.originalMessage=error.message,error.message=message):error=new Error(message),error.shortMessage=shortMessage,error.command=command,error.escapedCommand=escapedCommand,error.exitCode=exitCode,error.signal=signal,error.signalDescription=signalDescription,error.stdout=stdout,error.stderr=stderr,all2!==void 0&&(error.all=all2),"bufferedData"in error&&delete error.bufferedData,error.failed=!0,error.timedOut=!!timedOut2,error.isCanceled=isCanceled,error.killed=killed&&!timedOut2,error};module.exports=makeError;}});var require_stdio=__commonJS({"../../node_modules/execa/lib/stdio.js"(exports,module){var aliases2=["stdin","stdout","stderr"],hasAlias=options=>aliases2.some(alias=>options[alias]!==void 0),normalizeStdio=options=>{if(!options)return;let{stdio}=options;if(stdio===void 0)return aliases2.map(alias=>options[alias]);if(hasAlias(options))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases2.map(alias=>`\`${alias}\``).join(", ")}`);if(typeof stdio=="string")return stdio;if(!Array.isArray(stdio))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);let length=Math.max(stdio.length,aliases2.length);return Array.from({length},(value,index)=>stdio[index])};module.exports=normalizeStdio;module.exports.node=options=>{let stdio=normalizeStdio(options);return stdio==="ipc"?"ipc":stdio===void 0||typeof stdio=="string"?[stdio,stdio,stdio,"ipc"]:stdio.includes("ipc")?stdio:[...stdio,"ipc"]};}});var require_signals2=__commonJS({"../../node_modules/signal-exit/signals.js"(exports,module){module.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&module.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&module.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");}});var require_signal_exit=__commonJS({"../../node_modules/signal-exit/index.js"(exports,module){var process4=global.process,processOk=function(process5){return process5&&typeof process5=="object"&&typeof process5.removeListener=="function"&&typeof process5.emit=="function"&&typeof process5.reallyExit=="function"&&typeof process5.listeners=="function"&&typeof process5.kill=="function"&&typeof process5.pid=="number"&&typeof process5.on=="function"};processOk(process4)?(assert2=__require("assert"),signals=require_signals2(),isWin=/^win/i.test(process4.platform),EE=__require("events"),typeof EE!="function"&&(EE=EE.EventEmitter),process4.__signal_exit_emitter__?emitter=process4.__signal_exit_emitter__:(emitter=process4.__signal_exit_emitter__=new EE,emitter.count=0,emitter.emitted={}),emitter.infinite||(emitter.setMaxListeners(1/0),emitter.infinite=!0),module.exports=function(cb,opts){if(!processOk(global.process))return function(){};assert2.equal(typeof cb,"function","a callback must be provided for exit handler"),loaded===!1&&load();var ev="exit";opts&&opts.alwaysLast&&(ev="afterexit");var remove2=function(){emitter.removeListener(ev,cb),emitter.listeners("exit").length===0&&emitter.listeners("afterexit").length===0&&unload();};return emitter.on(ev,cb),remove2},unload=function(){!loaded||!processOk(global.process)||(loaded=!1,signals.forEach(function(sig){try{process4.removeListener(sig,sigListeners[sig]);}catch{}}),process4.emit=originalProcessEmit,process4.reallyExit=originalProcessReallyExit,emitter.count-=1);},module.exports.unload=unload,emit=function(event,code,signal){emitter.emitted[event]||(emitter.emitted[event]=!0,emitter.emit(event,code,signal));},sigListeners={},signals.forEach(function(sig){sigListeners[sig]=function(){if(processOk(global.process)){var listeners=process4.listeners(sig);listeners.length===emitter.count&&(unload(),emit("exit",null,sig),emit("afterexit",null,sig),isWin&&sig==="SIGHUP"&&(sig="SIGINT"),process4.kill(process4.pid,sig));}};}),module.exports.signals=function(){return signals},loaded=!1,load=function(){loaded||!processOk(global.process)||(loaded=!0,emitter.count+=1,signals=signals.filter(function(sig){try{return process4.on(sig,sigListeners[sig]),!0}catch{return !1}}),process4.emit=processEmit,process4.reallyExit=processReallyExit);},module.exports.load=load,originalProcessReallyExit=process4.reallyExit,processReallyExit=function(code){processOk(global.process)&&(process4.exitCode=code||0,emit("exit",process4.exitCode,null),emit("afterexit",process4.exitCode,null),originalProcessReallyExit.call(process4,process4.exitCode));},originalProcessEmit=process4.emit,processEmit=function(ev,arg){if(ev==="exit"&&processOk(global.process)){arg!==void 0&&(process4.exitCode=arg);var ret=originalProcessEmit.apply(this,arguments);return emit("exit",process4.exitCode,null),emit("afterexit",process4.exitCode,null),ret}else return originalProcessEmit.apply(this,arguments)}):module.exports=function(){return function(){}};var assert2,signals,isWin,EE,emitter,unload,emit,sigListeners,loaded,load,originalProcessReallyExit,processReallyExit,originalProcessEmit,processEmit;}});var require_kill=__commonJS({"../../node_modules/execa/lib/kill.js"(exports,module){var os3=__require("os"),onExit=require_signal_exit(),DEFAULT_FORCE_KILL_TIMEOUT=1e3*5,spawnedKill=(kill,signal="SIGTERM",options={})=>{let killResult=kill(signal);return setKillTimeout(kill,signal,options,killResult),killResult},setKillTimeout=(kill,signal,options,killResult)=>{if(!shouldForceKill(signal,options,killResult))return;let timeout=getForceKillAfterTimeout(options),t=setTimeout(()=>{kill("SIGKILL");},timeout);t.unref&&t.unref();},shouldForceKill=(signal,{forceKillAfterTimeout},killResult)=>isSigterm(signal)&&forceKillAfterTimeout!==!1&&killResult,isSigterm=signal=>signal===os3.constants.signals.SIGTERM||typeof signal=="string"&&signal.toUpperCase()==="SIGTERM",getForceKillAfterTimeout=({forceKillAfterTimeout=!0})=>{if(forceKillAfterTimeout===!0)return DEFAULT_FORCE_KILL_TIMEOUT;if(!Number.isFinite(forceKillAfterTimeout)||forceKillAfterTimeout<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`);return forceKillAfterTimeout},spawnedCancel=(spawned,context)=>{spawned.kill()&&(context.isCanceled=!0);},timeoutKill=(spawned,signal,reject)=>{spawned.kill(signal),reject(Object.assign(new Error("Timed out"),{timedOut:!0,signal}));},setupTimeout=(spawned,{timeout,killSignal="SIGTERM"},spawnedPromise)=>{if(timeout===0||timeout===void 0)return spawnedPromise;let timeoutId,timeoutPromise=new Promise((resolve3,reject)=>{timeoutId=setTimeout(()=>{timeoutKill(spawned,killSignal,reject);},timeout);}),safeSpawnedPromise=spawnedPromise.finally(()=>{clearTimeout(timeoutId);});return Promise.race([timeoutPromise,safeSpawnedPromise])},validateTimeout=({timeout})=>{if(timeout!==void 0&&(!Number.isFinite(timeout)||timeout<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`)},setExitHandler=async(spawned,{cleanup,detached},timedPromise)=>{if(!cleanup||detached)return timedPromise;let removeExitHandler=onExit(()=>{spawned.kill();});return timedPromise.finally(()=>{removeExitHandler();})};module.exports={spawnedKill,spawnedCancel,setupTimeout,validateTimeout,setExitHandler};}});var require_buffer_stream=__commonJS({"../../node_modules/execa/node_modules/get-stream/buffer-stream.js"(exports,module){var{PassThrough:PassThroughStream2}=__require("stream");module.exports=options=>{options={...options};let{array}=options,{encoding}=options,isBuffer=encoding==="buffer",objectMode=!1;array?objectMode=!(encoding||isBuffer):encoding=encoding||"utf8",isBuffer&&(encoding=null);let stream2=new PassThroughStream2({objectMode});encoding&&stream2.setEncoding(encoding);let length=0,chunks=[];return stream2.on("data",chunk=>{chunks.push(chunk),objectMode?length=chunks.length:length+=chunk.length;}),stream2.getBufferedValue=()=>array?chunks:isBuffer?Buffer.concat(chunks,length):chunks.join(""),stream2.getBufferedLength=()=>length,stream2};}});var require_get_stream=__commonJS({"../../node_modules/execa/node_modules/get-stream/index.js"(exports,module){var{constants:BufferConstants}=__require("buffer"),stream2=__require("stream"),{promisify:promisify4}=__require("util"),bufferStream=require_buffer_stream(),streamPipelinePromisified=promisify4(stream2.pipeline),MaxBufferError=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError";}};async function getStream(inputStream,options){if(!inputStream)throw new Error("Expected a stream");options={maxBuffer:1/0,...options};let{maxBuffer}=options,stream3=bufferStream(options);return await new Promise((resolve3,reject)=>{let rejectPromise=error=>{error&&stream3.getBufferedLength()<=BufferConstants.MAX_LENGTH&&(error.bufferedData=stream3.getBufferedValue()),reject(error);};(async()=>{try{await streamPipelinePromisified(inputStream,stream3),resolve3();}catch(error){rejectPromise(error);}})(),stream3.on("data",()=>{stream3.getBufferedLength()>maxBuffer&&rejectPromise(new MaxBufferError);});}),stream3.getBufferedValue()}module.exports=getStream;module.exports.buffer=(stream3,options)=>getStream(stream3,{...options,encoding:"buffer"});module.exports.array=(stream3,options)=>getStream(stream3,{...options,array:!0});module.exports.MaxBufferError=MaxBufferError;}});var require_merge_stream=__commonJS({"../../node_modules/merge-stream/index.js"(exports,module){var{PassThrough:PassThrough3}=__require("stream");module.exports=function(){var sources=[],output=new PassThrough3({objectMode:!0});return output.setMaxListeners(0),output.add=add,output.isEmpty=isEmpty,output.on("unpipe",remove2),Array.prototype.slice.call(arguments).forEach(add),output;function add(source){return Array.isArray(source)?(source.forEach(add),this):(sources.push(source),source.once("end",remove2.bind(null,source)),source.once("error",output.emit.bind(output,"error")),source.pipe(output,{end:!1}),this)}function isEmpty(){return sources.length==0}function remove2(source){sources=sources.filter(function(it){return it!==source}),!sources.length&&output.readable&&output.end();}};}});var require_stream=__commonJS({"../../node_modules/execa/lib/stream.js"(exports,module){var isStream=require_is_stream(),getStream=require_get_stream(),mergeStream=require_merge_stream(),handleInput=(spawned,input)=>{input===void 0||spawned.stdin===void 0||(isStream(input)?input.pipe(spawned.stdin):spawned.stdin.end(input));},makeAllStream=(spawned,{all:all2})=>{if(!all2||!spawned.stdout&&!spawned.stderr)return;let mixed=mergeStream();return spawned.stdout&&mixed.add(spawned.stdout),spawned.stderr&&mixed.add(spawned.stderr),mixed},getBufferedData=async(stream2,streamPromise)=>{if(stream2){stream2.destroy();try{return await streamPromise}catch(error){return error.bufferedData}}},getStreamPromise=(stream2,{encoding,buffer,maxBuffer})=>{if(!(!stream2||!buffer))return encoding?getStream(stream2,{encoding,maxBuffer}):getStream.buffer(stream2,{maxBuffer})},getSpawnedResult=async({stdout,stderr,all:all2},{encoding,buffer,maxBuffer},processDone)=>{let stdoutPromise=getStreamPromise(stdout,{encoding,buffer,maxBuffer}),stderrPromise=getStreamPromise(stderr,{encoding,buffer,maxBuffer}),allPromise=getStreamPromise(all2,{encoding,buffer,maxBuffer:maxBuffer*2});try{return await Promise.all([processDone,stdoutPromise,stderrPromise,allPromise])}catch(error){return Promise.all([{error,signal:error.signal,timedOut:error.timedOut},getBufferedData(stdout,stdoutPromise),getBufferedData(stderr,stderrPromise),getBufferedData(all2,allPromise)])}},validateInputSync=({input})=>{if(isStream(input))throw new TypeError("The `input` option cannot be a stream in sync mode")};module.exports={handleInput,makeAllStream,getSpawnedResult,validateInputSync};}});var require_promise=__commonJS({"../../node_modules/execa/lib/promise.js"(exports,module){var nativePromisePrototype=(async()=>{})().constructor.prototype,descriptors=["then","catch","finally"].map(property=>[property,Reflect.getOwnPropertyDescriptor(nativePromisePrototype,property)]),mergePromise=(spawned,promise)=>{for(let[property,descriptor]of descriptors){let value=typeof promise=="function"?(...args)=>Reflect.apply(descriptor.value,promise(),args):descriptor.value.bind(promise);Reflect.defineProperty(spawned,property,{...descriptor,value});}return spawned},getSpawnedPromise=spawned=>new Promise((resolve3,reject)=>{spawned.on("exit",(exitCode,signal)=>{resolve3({exitCode,signal});}),spawned.on("error",error=>{reject(error);}),spawned.stdin&&spawned.stdin.on("error",error=>{reject(error);});});module.exports={mergePromise,getSpawnedPromise};}});var require_command=__commonJS({"../../node_modules/execa/lib/command.js"(exports,module){var normalizeArgs=(file,args=[])=>Array.isArray(args)?[file,...args]:[file],NO_ESCAPE_REGEXP=/^[\w.-]+$/,DOUBLE_QUOTES_REGEXP=/"/g,escapeArg=arg=>typeof arg!="string"||NO_ESCAPE_REGEXP.test(arg)?arg:`"${arg.replace(DOUBLE_QUOTES_REGEXP,'\\"')}"`,joinCommand=(file,args)=>normalizeArgs(file,args).join(" "),getEscapedCommand=(file,args)=>normalizeArgs(file,args).map(arg=>escapeArg(arg)).join(" "),SPACES_REGEXP=/ +/g,parseCommand=command=>{let tokens=[];for(let token of command.trim().split(SPACES_REGEXP)){let previousToken=tokens[tokens.length-1];previousToken&&previousToken.endsWith("\\")?tokens[tokens.length-1]=`${previousToken.slice(0,-1)} ${token}`:tokens.push(token);}return tokens};module.exports={joinCommand,getEscapedCommand,parseCommand};}});var require_execa=__commonJS({"../../node_modules/execa/index.js"(exports,module){var path13=__require("path"),childProcess=__require("child_process"),crossSpawn=require_cross_spawn(),stripFinalNewline=require_strip_final_newline(),npmRunPath=require_npm_run_path(),onetime=require_onetime(),makeError=require_error(),normalizeStdio=require_stdio(),{spawnedKill,spawnedCancel,setupTimeout,validateTimeout,setExitHandler}=require_kill(),{handleInput,getSpawnedResult,makeAllStream,validateInputSync}=require_stream(),{mergePromise,getSpawnedPromise}=require_promise(),{joinCommand,parseCommand,getEscapedCommand}=require_command(),DEFAULT_MAX_BUFFER=1e3*1e3*100,getEnv=({env:envOption,extendEnv,preferLocal,localDir,execPath})=>{let env=extendEnv?{...process.env,...envOption}:envOption;return preferLocal?npmRunPath.env({env,cwd:localDir,execPath}):env},handleArguments=(file,args,options={})=>{let parsed=crossSpawn._parse(file,args,options);return file=parsed.command,args=parsed.args,options=parsed.options,options={maxBuffer:DEFAULT_MAX_BUFFER,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:options.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...options},options.env=getEnv(options),options.stdio=normalizeStdio(options),process.platform==="win32"&&path13.basename(file,".exe")==="cmd"&&args.unshift("/q"),{file,args,options,parsed}},handleOutput=(options,value,error)=>typeof value!="string"&&!Buffer.isBuffer(value)?error===void 0?void 0:"":options.stripFinalNewline?stripFinalNewline(value):value,execa=(file,args,options)=>{let parsed=handleArguments(file,args,options),command=joinCommand(file,args),escapedCommand=getEscapedCommand(file,args);validateTimeout(parsed.options);let spawned;try{spawned=childProcess.spawn(parsed.file,parsed.args,parsed.options);}catch(error){let dummySpawned=new childProcess.ChildProcess,errorPromise=Promise.reject(makeError({error,stdout:"",stderr:"",all:"",command,escapedCommand,parsed,timedOut:!1,isCanceled:!1,killed:!1}));return mergePromise(dummySpawned,errorPromise)}let spawnedPromise=getSpawnedPromise(spawned),timedPromise=setupTimeout(spawned,parsed.options,spawnedPromise),processDone=setExitHandler(spawned,parsed.options,timedPromise),context={isCanceled:!1};spawned.kill=spawnedKill.bind(null,spawned.kill.bind(spawned)),spawned.cancel=spawnedCancel.bind(null,spawned,context);let handlePromiseOnce=onetime(async()=>{let[{error,exitCode,signal,timedOut:timedOut2},stdoutResult,stderrResult,allResult]=await getSpawnedResult(spawned,parsed.options,processDone),stdout=handleOutput(parsed.options,stdoutResult),stderr=handleOutput(parsed.options,stderrResult),all2=handleOutput(parsed.options,allResult);if(error||exitCode!==0||signal!==null){let returnedError=makeError({error,exitCode,signal,stdout,stderr,all:all2,command,escapedCommand,parsed,timedOut:timedOut2,isCanceled:context.isCanceled,killed:spawned.killed});if(!parsed.options.reject)return returnedError;throw returnedError}return {command,escapedCommand,exitCode:0,stdout,stderr,all:all2,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return handleInput(spawned,parsed.options.input),spawned.all=makeAllStream(spawned,parsed.options),mergePromise(spawned,handlePromiseOnce)};module.exports=execa;module.exports.sync=(file,args,options)=>{let parsed=handleArguments(file,args,options),command=joinCommand(file,args),escapedCommand=getEscapedCommand(file,args);validateInputSync(parsed.options);let result;try{result=childProcess.spawnSync(parsed.file,parsed.args,parsed.options);}catch(error){throw makeError({error,stdout:"",stderr:"",all:"",command,escapedCommand,parsed,timedOut:!1,isCanceled:!1,killed:!1})}let stdout=handleOutput(parsed.options,result.stdout,result.error),stderr=handleOutput(parsed.options,result.stderr,result.error);if(result.error||result.status!==0||result.signal!==null){let error=makeError({stdout,stderr,error:result.error,signal:result.signal,exitCode:result.status,command,escapedCommand,parsed,timedOut:result.error&&result.error.code==="ETIMEDOUT",isCanceled:!1,killed:result.signal!==null});if(!parsed.options.reject)return error;throw error}return {command,escapedCommand,exitCode:0,stdout,stderr,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}};module.exports.command=(command,options)=>{let[file,...args]=parseCommand(command);return execa(file,args,options)};module.exports.commandSync=(command,options)=>{let[file,...args]=parseCommand(command);return execa.sync(file,args,options)};module.exports.node=(scriptPath,args,options={})=>{args&&!Array.isArray(args)&&typeof args=="object"&&(options=args,args=[]);let stdio=normalizeStdio.node(options),defaultExecArgv=process.execArgv.filter(arg=>!arg.startsWith("--inspect")),{nodePath=process.execPath,nodeOptions=defaultExecArgv}=options;return execa(nodePath,[...nodeOptions,scriptPath,...Array.isArray(args)?args:[]],{...options,stdin:void 0,stdout:void 0,stderr:void 0,stdio,shell:!1})};}});var require_strip_json_comments=__commonJS({"../../node_modules/strip-json-comments/index.js"(exports,module){var singleComment=Symbol("singleComment"),multiComment=Symbol("multiComment"),stripWithoutWhitespace=()=>"",stripWithWhitespace=(string,start,end)=>string.slice(start,end).replace(/\S/g," "),isEscaped=(jsonString,quotePosition)=>{let index=quotePosition-1,backslashCount=0;for(;jsonString[index]==="\\";)index-=1,backslashCount+=1;return !!(backslashCount%2)};module.exports=(jsonString,options={})=>{if(typeof jsonString!="string")throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof jsonString}\``);let strip=options.whitespace===!1?stripWithoutWhitespace:stripWithWhitespace,insideString=!1,insideComment=!1,offset=0,result="";for(let i=0;i<jsonString.length;i++){let currentCharacter=jsonString[i],nextCharacter=jsonString[i+1];if(!insideComment&&currentCharacter==='"'&&(isEscaped(jsonString,i)||(insideString=!insideString)),!insideString){if(!insideComment&&currentCharacter+nextCharacter==="//")result+=jsonString.slice(offset,i),offset=i,insideComment=singleComment,i++;else if(insideComment===singleComment&&currentCharacter+nextCharacter===`\r
82
81
  `){i++,insideComment=!1,result+=strip(jsonString,offset,i),offset=i;continue}else if(insideComment===singleComment&&currentCharacter===`
83
82
  `)insideComment=!1,result+=strip(jsonString,offset,i),offset=i;else if(!insideComment&&currentCharacter+nextCharacter==="/*"){result+=jsonString.slice(offset,i),offset=i,insideComment=multiComment,i++;continue}else if(insideComment===multiComment&&currentCharacter+nextCharacter==="*/"){i++,insideComment=!1,result+=strip(jsonString,offset,i+1),offset=i+1;continue}}}return result+(insideComment?strip(jsonString.slice(offset)):jsonString.slice(offset))};}});var require_end_of_stream=__commonJS({"../../node_modules/end-of-stream/index.js"(exports,module){var once2=require_once(),noop3=function(){},isRequest3=function(stream2){return stream2.setHeader&&typeof stream2.abort=="function"},isChildProcess=function(stream2){return stream2.stdio&&Array.isArray(stream2.stdio)&&stream2.stdio.length===3},eos=function(stream2,opts,callback){if(typeof opts=="function")return eos(stream2,null,opts);opts||(opts={}),callback=once2(callback||noop3);var ws=stream2._writableState,rs=stream2._readableState,readable=opts.readable||opts.readable!==!1&&stream2.readable,writable=opts.writable||opts.writable!==!1&&stream2.writable,cancelled=!1,onlegacyfinish=function(){stream2.writable||onfinish();},onfinish=function(){writable=!1,readable||callback.call(stream2);},onend=function(){readable=!1,writable||callback.call(stream2);},onexit=function(exitCode){callback.call(stream2,exitCode?new Error("exited with error code: "+exitCode):null);},onerror=function(err){callback.call(stream2,err);},onclose=function(){process.nextTick(onclosenexttick);},onclosenexttick=function(){if(!cancelled){if(readable&&!(rs&&rs.ended&&!rs.destroyed))return callback.call(stream2,new Error("premature close"));if(writable&&!(ws&&ws.ended&&!ws.destroyed))return callback.call(stream2,new Error("premature close"))}},onrequest=function(){stream2.req.on("finish",onfinish);};return isRequest3(stream2)?(stream2.on("complete",onfinish),stream2.on("abort",onclose),stream2.req?onrequest():stream2.on("request",onrequest)):writable&&!ws&&(stream2.on("end",onlegacyfinish),stream2.on("close",onlegacyfinish)),isChildProcess(stream2)&&stream2.on("exit",onexit),stream2.on("end",onend),stream2.on("finish",onfinish),opts.error!==!1&&stream2.on("error",onerror),stream2.on("close",onclose),function(){cancelled=!0,stream2.removeListener("complete",onfinish),stream2.removeListener("abort",onclose),stream2.removeListener("request",onrequest),stream2.req&&stream2.req.removeListener("finish",onfinish),stream2.removeListener("end",onlegacyfinish),stream2.removeListener("close",onlegacyfinish),stream2.removeListener("finish",onfinish),stream2.removeListener("exit",onexit),stream2.removeListener("end",onend),stream2.removeListener("error",onerror),stream2.removeListener("close",onclose);}};module.exports=eos;}});var require_pump=__commonJS({"../../node_modules/pump/index.js"(exports,module){var once2=require_once(),eos=require_end_of_stream(),fs8=__require("fs"),noop3=function(){},ancient=/^v?\.0/.test(process.version),isFn=function(fn){return typeof fn=="function"},isFS=function(stream2){return !ancient||!fs8?!1:(stream2 instanceof(fs8.ReadStream||noop3)||stream2 instanceof(fs8.WriteStream||noop3))&&isFn(stream2.close)},isRequest3=function(stream2){return stream2.setHeader&&isFn(stream2.abort)},destroyer=function(stream2,reading,writing,callback){callback=once2(callback);var closed=!1;stream2.on("close",function(){closed=!0;}),eos(stream2,{readable:reading,writable:writing},function(err){if(err)return callback(err);closed=!0,callback();});var destroyed=!1;return function(err){if(!closed&&!destroyed){if(destroyed=!0,isFS(stream2))return stream2.close(noop3);if(isRequest3(stream2))return stream2.abort();if(isFn(stream2.destroy))return stream2.destroy();callback(err||new Error("stream was destroyed"));}}},call=function(fn){fn();},pipe2=function(from,to){return from.pipe(to)},pump2=function(){var streams=Array.prototype.slice.call(arguments),callback=isFn(streams[streams.length-1]||noop3)&&streams.pop()||noop3;if(Array.isArray(streams[0])&&(streams=streams[0]),streams.length<2)throw new Error("pump requires two streams per minimum");var error,destroys=streams.map(function(stream2,i){var reading=i<streams.length-1,writing=i>0;return destroyer(stream2,reading,writing,function(err){error||(error=err),err&&destroys.forEach(call),!reading&&(destroys.forEach(call),callback(error));})});return streams.reduce(pipe2)};module.exports=pump2;}});var require_chownr=__commonJS({"../../node_modules/tar-fs/node_modules/chownr/chownr.js"(exports,module){var fs8=__require("fs"),path13=__require("path"),LCHOWN=fs8.lchown?"lchown":"chown",LCHOWNSYNC=fs8.lchownSync?"lchownSync":"chownSync",needEISDIRHandled=fs8.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),lchownSync=(path14,uid,gid)=>{try{return fs8[LCHOWNSYNC](path14,uid,gid)}catch(er){if(er.code!=="ENOENT")throw er}},chownSync=(path14,uid,gid)=>{try{return fs8.chownSync(path14,uid,gid)}catch(er){if(er.code!=="ENOENT")throw er}},handleEISDIR=needEISDIRHandled?(path14,uid,gid,cb)=>er=>{!er||er.code!=="EISDIR"?cb(er):fs8.chown(path14,uid,gid,cb);}:(_,__,___,cb)=>cb,handleEISDirSync=needEISDIRHandled?(path14,uid,gid)=>{try{return lchownSync(path14,uid,gid)}catch(er){if(er.code!=="EISDIR")throw er;chownSync(path14,uid,gid);}}:(path14,uid,gid)=>lchownSync(path14,uid,gid),nodeVersion=process.version,readdir=(path14,options,cb)=>fs8.readdir(path14,options,cb),readdirSync=(path14,options)=>fs8.readdirSync(path14,options);/^v4\./.test(nodeVersion)&&(readdir=(path14,options,cb)=>fs8.readdir(path14,cb));var chown=(cpath,uid,gid,cb)=>{fs8[LCHOWN](cpath,uid,gid,handleEISDIR(cpath,uid,gid,er=>{cb(er&&er.code!=="ENOENT"?er:null);}));},chownrKid=(p,child,uid,gid,cb)=>{if(typeof child=="string")return fs8.lstat(path13.resolve(p,child),(er,stats)=>{if(er)return cb(er.code!=="ENOENT"?er:null);stats.name=child,chownrKid(p,stats,uid,gid,cb);});if(child.isDirectory())chownr(path13.resolve(p,child.name),uid,gid,er=>{if(er)return cb(er);let cpath=path13.resolve(p,child.name);chown(cpath,uid,gid,cb);});else {let cpath=path13.resolve(p,child.name);chown(cpath,uid,gid,cb);}},chownr=(p,uid,gid,cb)=>{readdir(p,{withFileTypes:!0},(er,children)=>{if(er){if(er.code==="ENOENT")return cb();if(er.code!=="ENOTDIR"&&er.code!=="ENOTSUP")return cb(er)}if(er||!children.length)return chown(p,uid,gid,cb);let len=children.length,errState=null,then=er2=>{if(!errState){if(er2)return cb(errState=er2);if(--len===0)return chown(p,uid,gid,cb)}};children.forEach(child=>chownrKid(p,child,uid,gid,then));});},chownrKidSync=(p,child,uid,gid)=>{if(typeof child=="string")try{let stats=fs8.lstatSync(path13.resolve(p,child));stats.name=child,child=stats;}catch(er){if(er.code==="ENOENT")return;throw er}child.isDirectory()&&chownrSync(path13.resolve(p,child.name),uid,gid),handleEISDirSync(path13.resolve(p,child.name),uid,gid);},chownrSync=(p,uid,gid)=>{let children;try{children=readdirSync(p,{withFileTypes:!0});}catch(er){if(er.code==="ENOENT")return;if(er.code==="ENOTDIR"||er.code==="ENOTSUP")return handleEISDirSync(p,uid,gid);throw er}return children&&children.length&&children.forEach(child=>chownrKidSync(p,child,uid,gid)),handleEISDirSync(p,uid,gid)};module.exports=chownr;chownr.sync=chownrSync;}});var require_stream2=__commonJS({"../../node_modules/readable-stream/lib/internal/streams/stream.js"(exports,module){module.exports=__require("stream");}});var require_buffer_list=__commonJS({"../../node_modules/readable-stream/lib/internal/streams/buffer_list.js"(exports,module){function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols);}return keys}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target}function _defineProperty(obj,key,value){return key=_toPropertyKey(key),key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key=="symbol"?key:String(key)}function _toPrimitive(input,hint){if(typeof input!="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==void 0){var res=prim.call(input,hint||"default");if(typeof res!="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return (hint==="string"?String:Number)(input)}var _require=__require("buffer"),Buffer4=_require.Buffer,_require2=__require("util"),inspect2=_require2.inspect,custom=inspect2&&inspect2.custom||"inspect";function copyBuffer(src,target,offset){Buffer4.prototype.copy.call(src,target,offset);}module.exports=function(){function BufferList(){_classCallCheck(this,BufferList),this.head=null,this.tail=null,this.length=0;}return _createClass(BufferList,[{key:"push",value:function(v){var entry={data:v,next:null};this.length>0?this.tail.next=entry:this.head=entry,this.tail=entry,++this.length;}},{key:"unshift",value:function(v){var entry={data:v,next:this.head};this.length===0&&(this.tail=entry),this.head=entry,++this.length;}},{key:"shift",value:function(){if(this.length!==0){var ret=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,ret}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0;}},{key:"join",value:function(s){if(this.length===0)return "";for(var p=this.head,ret=""+p.data;p=p.next;)ret+=s+p.data;return ret}},{key:"concat",value:function(n){if(this.length===0)return Buffer4.alloc(0);for(var ret=Buffer4.allocUnsafe(n>>>0),p=this.head,i=0;p;)copyBuffer(p.data,ret,i),i+=p.data.length,p=p.next;return ret}},{key:"consume",value:function(n,hasStrings){var ret;return n<this.head.data.length?(ret=this.head.data.slice(0,n),this.head.data=this.head.data.slice(n)):n===this.head.data.length?ret=this.shift():ret=hasStrings?this._getString(n):this._getBuffer(n),ret}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(n){var p=this.head,c=1,ret=p.data;for(n-=ret.length;p=p.next;){var str=p.data,nb=n>str.length?str.length:n;if(nb===str.length?ret+=str:ret+=str.slice(0,n),n-=nb,n===0){nb===str.length?(++c,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=str.slice(nb));break}++c;}return this.length-=c,ret}},{key:"_getBuffer",value:function(n){var ret=Buffer4.allocUnsafe(n),p=this.head,c=1;for(p.data.copy(ret),n-=p.data.length;p=p.next;){var buf=p.data,nb=n>buf.length?buf.length:n;if(buf.copy(ret,ret.length-n,0,nb),n-=nb,n===0){nb===buf.length?(++c,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=buf.slice(nb));break}++c;}return this.length-=c,ret}},{key:custom,value:function(_,options){return inspect2(this,_objectSpread(_objectSpread({},options),{},{depth:0,customInspect:!1}))}}]),BufferList}();}});var require_destroy=__commonJS({"../../node_modules/readable-stream/lib/internal/streams/destroy.js"(exports,module){function destroy(err,cb){var _this=this,readableDestroyed=this._readableState&&this._readableState.destroyed,writableDestroyed=this._writableState&&this._writableState.destroyed;return readableDestroyed||writableDestroyed?(cb?cb(err):err&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(emitErrorNT,this,err)):process.nextTick(emitErrorNT,this,err)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(err||null,function(err2){!cb&&err2?_this._writableState?_this._writableState.errorEmitted?process.nextTick(emitCloseNT,_this):(_this._writableState.errorEmitted=!0,process.nextTick(emitErrorAndCloseNT,_this,err2)):process.nextTick(emitErrorAndCloseNT,_this,err2):cb?(process.nextTick(emitCloseNT,_this),cb(err2)):process.nextTick(emitCloseNT,_this);}),this)}function emitErrorAndCloseNT(self2,err){emitErrorNT(self2,err),emitCloseNT(self2);}function emitCloseNT(self2){self2._writableState&&!self2._writableState.emitClose||self2._readableState&&!self2._readableState.emitClose||self2.emit("close");}function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1);}function emitErrorNT(self2,err){self2.emit("error",err);}function errorOrDestroy(stream2,err){var rState=stream2._readableState,wState=stream2._writableState;rState&&rState.autoDestroy||wState&&wState.autoDestroy?stream2.destroy(err):stream2.emit("error",err);}module.exports={destroy,undestroy,errorOrDestroy};}});var require_errors=__commonJS({"../../node_modules/readable-stream/errors.js"(exports,module){var codes={};function createErrorType(code,message,Base){Base||(Base=Error);function getMessage(arg1,arg2,arg3){return typeof message=="string"?message:message(arg1,arg2,arg3)}class NodeError extends Base{constructor(arg1,arg2,arg3){super(getMessage(arg1,arg2,arg3));}}NodeError.prototype.name=Base.name,NodeError.prototype.code=code,codes[code]=NodeError;}function oneOf(expected,thing){if(Array.isArray(expected)){let len=expected.length;return expected=expected.map(i=>String(i)),len>2?`one of ${thing} ${expected.slice(0,len-1).join(", ")}, or `+expected[len-1]:len===2?`one of ${thing} ${expected[0]} or ${expected[1]}`:`of ${thing} ${expected[0]}`}else return `of ${thing} ${String(expected)}`}function startsWith(str,search,pos){return str.substr(!pos||pos<0?0:+pos,search.length)===search}function endsWith(str,search,this_len){return (this_len===void 0||this_len>str.length)&&(this_len=str.length),str.substring(this_len-search.length,this_len)===search}function includes(str,search,start){return typeof start!="number"&&(start=0),start+search.length>str.length?!1:str.indexOf(search,start)!==-1}createErrorType("ERR_INVALID_OPT_VALUE",function(name,value){return 'The value "'+value+'" is invalid for option "'+name+'"'},TypeError);createErrorType("ERR_INVALID_ARG_TYPE",function(name,expected,actual){let determiner;typeof expected=="string"&&startsWith(expected,"not ")?(determiner="must not be",expected=expected.replace(/^not /,"")):determiner="must be";let msg;if(endsWith(name," argument"))msg=`The ${name} ${determiner} ${oneOf(expected,"type")}`;else {let type=includes(name,".")?"property":"argument";msg=`The "${name}" ${type} ${determiner} ${oneOf(expected,"type")}`;}return msg+=`. Received type ${typeof actual}`,msg},TypeError);createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");createErrorType("ERR_METHOD_NOT_IMPLEMENTED",function(name){return "The "+name+" method is not implemented"});createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close");createErrorType("ERR_STREAM_DESTROYED",function(name){return "Cannot call "+name+" after a stream was destroyed"});createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times");createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end");createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);createErrorType("ERR_UNKNOWN_ENCODING",function(arg){return "Unknown encoding: "+arg},TypeError);createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");module.exports.codes=codes;}});var require_state=__commonJS({"../../node_modules/readable-stream/lib/internal/streams/state.js"(exports,module){var ERR_INVALID_OPT_VALUE=require_errors().codes.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(options,isDuplex,duplexKey){return options.highWaterMark!=null?options.highWaterMark:isDuplex?options[duplexKey]:null}function getHighWaterMark(state,options,duplexKey,isDuplex){var hwm=highWaterMarkFrom(options,isDuplex,duplexKey);if(hwm!=null){if(!(isFinite(hwm)&&Math.floor(hwm)===hwm)||hwm<0){var name=isDuplex?duplexKey:"highWaterMark";throw new ERR_INVALID_OPT_VALUE(name,hwm)}return Math.floor(hwm)}return state.objectMode?16:16*1024}module.exports={getHighWaterMark};}});var require_stream_writable=__commonJS({"../../node_modules/readable-stream/lib/_stream_writable.js"(exports,module){module.exports=Writable;function CorkedRequest(state){var _this=this;this.next=null,this.entry=null,this.finish=function(){onCorkedFinish(_this,state);};}var Duplex2;Writable.WritableState=WritableState;var internalUtil={deprecate:__require("util-deprecate")},Stream3=require_stream2(),Buffer4=__require("buffer").Buffer,OurUint8Array=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer4.from(chunk)}function _isUint8Array(obj){return Buffer4.isBuffer(obj)||obj instanceof OurUint8Array}var destroyImpl=require_destroy(),_require=require_state(),getHighWaterMark=_require.getHighWaterMark,_require$codes=require_errors().codes,ERR_INVALID_ARG_TYPE=_require$codes.ERR_INVALID_ARG_TYPE,ERR_METHOD_NOT_IMPLEMENTED=_require$codes.ERR_METHOD_NOT_IMPLEMENTED,ERR_MULTIPLE_CALLBACK=_require$codes.ERR_MULTIPLE_CALLBACK,ERR_STREAM_CANNOT_PIPE=_require$codes.ERR_STREAM_CANNOT_PIPE,ERR_STREAM_DESTROYED=_require$codes.ERR_STREAM_DESTROYED,ERR_STREAM_NULL_VALUES=_require$codes.ERR_STREAM_NULL_VALUES,ERR_STREAM_WRITE_AFTER_END=_require$codes.ERR_STREAM_WRITE_AFTER_END,ERR_UNKNOWN_ENCODING=_require$codes.ERR_UNKNOWN_ENCODING,errorOrDestroy=destroyImpl.errorOrDestroy;require_inherits()(Writable,Stream3);function nop(){}function WritableState(options,stream2,isDuplex){Duplex2=Duplex2||require_stream_duplex(),options=options||{},typeof isDuplex!="boolean"&&(isDuplex=stream2 instanceof Duplex2),this.objectMode=!!options.objectMode,isDuplex&&(this.objectMode=this.objectMode||!!options.writableObjectMode),this.highWaterMark=getHighWaterMark(this,options,"writableHighWaterMark",isDuplex),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var noDecode=options.decodeStrings===!1;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream2,er);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=options.emitClose!==!1,this.autoDestroy=!!options.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this);}WritableState.prototype.getBuffer=function(){for(var current=this.bufferedRequest,out=[];current;)out.push(current),current=current.next;return out};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch{}})();var realHasInstance;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(object){return realHasInstance.call(this,object)?!0:this!==Writable?!1:object&&object._writableState instanceof WritableState}})):realHasInstance=function(object){return object instanceof this};function Writable(options){Duplex2=Duplex2||require_stream_duplex();var isDuplex=this instanceof Duplex2;if(!isDuplex&&!realHasInstance.call(Writable,this))return new Writable(options);this._writableState=new WritableState(options,this,isDuplex),this.writable=!0,options&&(typeof options.write=="function"&&(this._write=options.write),typeof options.writev=="function"&&(this._writev=options.writev),typeof options.destroy=="function"&&(this._destroy=options.destroy),typeof options.final=="function"&&(this._final=options.final)),Stream3.call(this);}Writable.prototype.pipe=function(){errorOrDestroy(this,new ERR_STREAM_CANNOT_PIPE);};function writeAfterEnd(stream2,cb){var er=new ERR_STREAM_WRITE_AFTER_END;errorOrDestroy(stream2,er),process.nextTick(cb,er);}function validChunk(stream2,state,chunk,cb){var er;return chunk===null?er=new ERR_STREAM_NULL_VALUES:typeof chunk!="string"&&!state.objectMode&&(er=new ERR_INVALID_ARG_TYPE("chunk",["string","Buffer"],chunk)),er?(errorOrDestroy(stream2,er),process.nextTick(cb,er),!1):!0}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1,isBuf=!state.objectMode&&_isUint8Array(chunk);return isBuf&&!Buffer4.isBuffer(chunk)&&(chunk=_uint8ArrayToBuffer(chunk)),typeof encoding=="function"&&(cb=encoding,encoding=null),isBuf?encoding="buffer":encoding||(encoding=state.defaultEncoding),typeof cb!="function"&&(cb=nop),state.ending?writeAfterEnd(this,cb):(isBuf||validChunk(this,state,chunk,cb))&&(state.pendingcb++,ret=writeOrBuffer(this,state,isBuf,chunk,encoding,cb)),ret};Writable.prototype.cork=function(){this._writableState.corked++;};Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,!state.writing&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest&&clearBuffer(this,state));};Writable.prototype.setDefaultEncoding=function(encoding){if(typeof encoding=="string"&&(encoding=encoding.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new ERR_UNKNOWN_ENCODING(encoding);return this._writableState.defaultEncoding=encoding,this};Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function decodeChunk(state,chunk,encoding){return !state.objectMode&&state.decodeStrings!==!1&&typeof chunk=="string"&&(chunk=Buffer4.from(chunk,encoding)),chunk}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function writeOrBuffer(stream2,state,isBuf,chunk,encoding,cb){if(!isBuf){var newChunk=decodeChunk(state,chunk,encoding);chunk!==newChunk&&(isBuf=!0,encoding="buffer",chunk=newChunk);}var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(ret||(state.needDrain=!0),state.writing||state.corked){var last=state.lastBufferedRequest;state.lastBufferedRequest={chunk,encoding,isBuf,callback:cb,next:null},last?last.next=state.lastBufferedRequest:state.bufferedRequest=state.lastBufferedRequest,state.bufferedRequestCount+=1;}else doWrite(stream2,state,!1,len,chunk,encoding,cb);return ret}function doWrite(stream2,state,writev,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,state.destroyed?state.onwrite(new ERR_STREAM_DESTROYED("write")):writev?stream2._writev(chunk,state.onwrite):stream2._write(chunk,encoding,state.onwrite),state.sync=!1;}function onwriteError(stream2,state,sync,er,cb){--state.pendingcb,sync?(process.nextTick(cb,er),process.nextTick(finishMaybe,stream2,state),stream2._writableState.errorEmitted=!0,errorOrDestroy(stream2,er)):(cb(er),stream2._writableState.errorEmitted=!0,errorOrDestroy(stream2,er),finishMaybe(stream2,state));}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0;}function onwrite(stream2,er){var state=stream2._writableState,sync=state.sync,cb=state.writecb;if(typeof cb!="function")throw new ERR_MULTIPLE_CALLBACK;if(onwriteStateUpdate(state),er)onwriteError(stream2,state,sync,er,cb);else {var finished=needFinish(state)||stream2.destroyed;!finished&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest&&clearBuffer(stream2,state),sync?process.nextTick(afterWrite,stream2,state,finished,cb):afterWrite(stream2,state,finished,cb);}}function afterWrite(stream2,state,finished,cb){finished||onwriteDrain(stream2,state),state.pendingcb--,cb(),finishMaybe(stream2,state);}function onwriteDrain(stream2,state){state.length===0&&state.needDrain&&(state.needDrain=!1,stream2.emit("drain"));}function clearBuffer(stream2,state){state.bufferProcessing=!0;var entry=state.bufferedRequest;if(stream2._writev&&entry&&entry.next){var l=state.bufferedRequestCount,buffer=new Array(l),holder=state.corkedRequestsFree;holder.entry=entry;for(var count=0,allBuffers=!0;entry;)buffer[count]=entry,entry.isBuf||(allBuffers=!1),entry=entry.next,count+=1;buffer.allBuffers=allBuffers,doWrite(stream2,state,!0,state.length,buffer,"",holder.finish),state.pendingcb++,state.lastBufferedRequest=null,holder.next?(state.corkedRequestsFree=holder.next,holder.next=null):state.corkedRequestsFree=new CorkedRequest(state),state.bufferedRequestCount=0;}else {for(;entry;){var chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback,len=state.objectMode?1:chunk.length;if(doWrite(stream2,state,!1,len,chunk,encoding,cb),entry=entry.next,state.bufferedRequestCount--,state.writing)break}entry===null&&(state.lastBufferedRequest=null);}state.bufferedRequest=entry,state.bufferProcessing=!1;}Writable.prototype._write=function(chunk,encoding,cb){cb(new ERR_METHOD_NOT_IMPLEMENTED("_write()"));};Writable.prototype._writev=null;Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;return typeof chunk=="function"?(cb=chunk,chunk=null,encoding=null):typeof encoding=="function"&&(cb=encoding,encoding=null),chunk!=null&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||endWritable(this,state,cb),this};Object.defineProperty(Writable.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function needFinish(state){return state.ending&&state.length===0&&state.bufferedRequest===null&&!state.finished&&!state.writing}function callFinal(stream2,state){stream2._final(function(err){state.pendingcb--,err&&errorOrDestroy(stream2,err),state.prefinished=!0,stream2.emit("prefinish"),finishMaybe(stream2,state);});}function prefinish(stream2,state){!state.prefinished&&!state.finalCalled&&(typeof stream2._final=="function"&&!state.destroyed?(state.pendingcb++,state.finalCalled=!0,process.nextTick(callFinal,stream2,state)):(state.prefinished=!0,stream2.emit("prefinish")));}function finishMaybe(stream2,state){var need=needFinish(state);if(need&&(prefinish(stream2,state),state.pendingcb===0&&(state.finished=!0,stream2.emit("finish"),state.autoDestroy))){var rState=stream2._readableState;(!rState||rState.autoDestroy&&rState.endEmitted)&&stream2.destroy();}return need}function endWritable(stream2,state,cb){state.ending=!0,finishMaybe(stream2,state),cb&&(state.finished?process.nextTick(cb):stream2.once("finish",cb)),state.ended=!0,stream2.writable=!1;}function onCorkedFinish(corkReq,state,err){var entry=corkReq.entry;for(corkReq.entry=null;entry;){var cb=entry.callback;state.pendingcb--,cb(err),entry=entry.next;}state.corkedRequestsFree.next=corkReq;}Object.defineProperty(Writable.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(value){this._writableState&&(this._writableState.destroyed=value);}});Writable.prototype.destroy=destroyImpl.destroy;Writable.prototype._undestroy=destroyImpl.undestroy;Writable.prototype._destroy=function(err,cb){cb(err);};}});var require_stream_duplex=__commonJS({"../../node_modules/readable-stream/lib/_stream_duplex.js"(exports,module){var objectKeys=Object.keys||function(obj){var keys2=[];for(var key in obj)keys2.push(key);return keys2};module.exports=Duplex2;var Readable=require_stream_readable(),Writable=require_stream_writable();require_inherits()(Duplex2,Readable);for(keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++)method=keys[v],Duplex2.prototype[method]||(Duplex2.prototype[method]=Writable.prototype[method]);var keys,method,v;function Duplex2(options){if(!(this instanceof Duplex2))return new Duplex2(options);Readable.call(this,options),Writable.call(this,options),this.allowHalfOpen=!0,options&&(options.readable===!1&&(this.readable=!1),options.writable===!1&&(this.writable=!1),options.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",onend)));}Object.defineProperty(Duplex2.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Duplex2.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Duplex2.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function onend(){this._writableState.ended||process.nextTick(onEndNT,this);}function onEndNT(self2){self2.end();}Object.defineProperty(Duplex2.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(value){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=value,this._writableState.destroyed=value);}});}});var require_safe_buffer=__commonJS({"../../node_modules/safe-buffer/index.js"(exports,module){var buffer=__require("buffer"),Buffer4=buffer.Buffer;function copyProps(src,dst){for(var key in src)dst[key]=src[key];}Buffer4.from&&Buffer4.alloc&&Buffer4.allocUnsafe&&Buffer4.allocUnsafeSlow?module.exports=buffer:(copyProps(buffer,exports),exports.Buffer=SafeBuffer);function SafeBuffer(arg,encodingOrOffset,length){return Buffer4(arg,encodingOrOffset,length)}SafeBuffer.prototype=Object.create(Buffer4.prototype);copyProps(Buffer4,SafeBuffer);SafeBuffer.from=function(arg,encodingOrOffset,length){if(typeof arg=="number")throw new TypeError("Argument must not be a number");return Buffer4(arg,encodingOrOffset,length)};SafeBuffer.alloc=function(size,fill,encoding){if(typeof size!="number")throw new TypeError("Argument must be a number");var buf=Buffer4(size);return fill!==void 0?typeof encoding=="string"?buf.fill(fill,encoding):buf.fill(fill):buf.fill(0),buf};SafeBuffer.allocUnsafe=function(size){if(typeof size!="number")throw new TypeError("Argument must be a number");return Buffer4(size)};SafeBuffer.allocUnsafeSlow=function(size){if(typeof size!="number")throw new TypeError("Argument must be a number");return buffer.SlowBuffer(size)};}});var require_string_decoder=__commonJS({"../../node_modules/string_decoder/lib/string_decoder.js"(exports){var Buffer4=require_safe_buffer().Buffer,isEncoding=Buffer4.isEncoding||function(encoding){switch(encoding=""+encoding,encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return !0;default:return !1}};function _normalizeEncoding(enc){if(!enc)return "utf8";for(var retried;;)switch(enc){case"utf8":case"utf-8":return "utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return "utf16le";case"latin1":case"binary":return "latin1";case"base64":case"ascii":case"hex":return enc;default:if(retried)return;enc=(""+enc).toLowerCase(),retried=!0;}}function normalizeEncoding(enc){var nenc=_normalizeEncoding(enc);if(typeof nenc!="string"&&(Buffer4.isEncoding===isEncoding||!isEncoding(enc)))throw new Error("Unknown encoding: "+enc);return nenc||enc}exports.StringDecoder=StringDecoder;function StringDecoder(encoding){this.encoding=normalizeEncoding(encoding);var nb;switch(this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,nb=4;break;case"utf8":this.fillLast=utf8FillLast,nb=4;break;case"base64":this.text=base64Text,this.end=base64End,nb=3;break;default:this.write=simpleWrite,this.end=simpleEnd;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Buffer4.allocUnsafe(nb);}StringDecoder.prototype.write=function(buf){if(buf.length===0)return "";var r,i;if(this.lastNeed){if(r=this.fillLast(buf),r===void 0)return "";i=this.lastNeed,this.lastNeed=0;}else i=0;return i<buf.length?r?r+this.text(buf,i):this.text(buf,i):r||""};StringDecoder.prototype.end=utf8End;StringDecoder.prototype.text=utf8Text;StringDecoder.prototype.fillLast=function(buf){if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,buf.length),this.lastNeed-=buf.length;};function utf8CheckByte(byte){return byte<=127?0:byte>>5===6?2:byte>>4===14?3:byte>>3===30?4:byte>>6===2?-1:-2}function utf8CheckIncomplete(self2,buf,i){var j=buf.length-1;if(j<i)return 0;var nb=utf8CheckByte(buf[j]);return nb>=0?(nb>0&&(self2.lastNeed=nb-1),nb):--j<i||nb===-2?0:(nb=utf8CheckByte(buf[j]),nb>=0?(nb>0&&(self2.lastNeed=nb-2),nb):--j<i||nb===-2?0:(nb=utf8CheckByte(buf[j]),nb>=0?(nb>0&&(nb===2?nb=0:self2.lastNeed=nb-3),nb):0))}function utf8CheckExtraBytes(self2,buf,p){if((buf[0]&192)!==128)return self2.lastNeed=0,"\uFFFD";if(self2.lastNeed>1&&buf.length>1){if((buf[1]&192)!==128)return self2.lastNeed=1,"\uFFFD";if(self2.lastNeed>2&&buf.length>2&&(buf[2]&192)!==128)return self2.lastNeed=2,"\uFFFD"}}function utf8FillLast(buf){var p=this.lastTotal-this.lastNeed,r=utf8CheckExtraBytes(this,buf);if(r!==void 0)return r;if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,p,0,buf.length),this.lastNeed-=buf.length;}function utf8Text(buf,i){var total=utf8CheckIncomplete(this,buf,i);if(!this.lastNeed)return buf.toString("utf8",i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);return buf.copy(this.lastChar,0,end),buf.toString("utf8",i,end)}function utf8End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+"\uFFFD":r}function utf16Text(buf,i){if((buf.length-i)%2===0){var r=buf.toString("utf16le",i);if(r){var c=r.charCodeAt(r.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=buf[buf.length-1],buf.toString("utf16le",i,buf.length-1)}function utf16End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,end)}return r}function base64Text(buf,i){var n=(buf.length-i)%3;return n===0?buf.toString("base64",i):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=buf[buf.length-1]:(this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1]),buf.toString("base64",i,buf.length-n))}function base64End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function simpleWrite(buf){return buf.toString(this.encoding)}function simpleEnd(buf){return buf&&buf.length?this.write(buf):""}}});var require_end_of_stream2=__commonJS({"../../node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports,module){var ERR_STREAM_PREMATURE_CLOSE=require_errors().codes.ERR_STREAM_PREMATURE_CLOSE;function once2(callback){var called=!1;return function(){if(!called){called=!0;for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];callback.apply(this,args);}}}function noop3(){}function isRequest3(stream2){return stream2.setHeader&&typeof stream2.abort=="function"}function eos(stream2,opts,callback){if(typeof opts=="function")return eos(stream2,null,opts);opts||(opts={}),callback=once2(callback||noop3);var readable=opts.readable||opts.readable!==!1&&stream2.readable,writable=opts.writable||opts.writable!==!1&&stream2.writable,onlegacyfinish=function(){stream2.writable||onfinish();},writableEnded=stream2._writableState&&stream2._writableState.finished,onfinish=function(){writable=!1,writableEnded=!0,readable||callback.call(stream2);},readableEnded=stream2._readableState&&stream2._readableState.endEmitted,onend=function(){readable=!1,readableEnded=!0,writable||callback.call(stream2);},onerror=function(err){callback.call(stream2,err);},onclose=function(){var err;if(readable&&!readableEnded)return (!stream2._readableState||!stream2._readableState.ended)&&(err=new ERR_STREAM_PREMATURE_CLOSE),callback.call(stream2,err);if(writable&&!writableEnded)return (!stream2._writableState||!stream2._writableState.ended)&&(err=new ERR_STREAM_PREMATURE_CLOSE),callback.call(stream2,err)},onrequest=function(){stream2.req.on("finish",onfinish);};return isRequest3(stream2)?(stream2.on("complete",onfinish),stream2.on("abort",onclose),stream2.req?onrequest():stream2.on("request",onrequest)):writable&&!stream2._writableState&&(stream2.on("end",onlegacyfinish),stream2.on("close",onlegacyfinish)),stream2.on("end",onend),stream2.on("finish",onfinish),opts.error!==!1&&stream2.on("error",onerror),stream2.on("close",onclose),function(){stream2.removeListener("complete",onfinish),stream2.removeListener("abort",onclose),stream2.removeListener("request",onrequest),stream2.req&&stream2.req.removeListener("finish",onfinish),stream2.removeListener("end",onlegacyfinish),stream2.removeListener("close",onlegacyfinish),stream2.removeListener("finish",onfinish),stream2.removeListener("end",onend),stream2.removeListener("error",onerror),stream2.removeListener("close",onclose);}}module.exports=eos;}});var require_async_iterator=__commonJS({"../../node_modules/readable-stream/lib/internal/streams/async_iterator.js"(exports,module){var _Object$setPrototypeO;function _defineProperty(obj,key,value){return key=_toPropertyKey(key),key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key=="symbol"?key:String(key)}function _toPrimitive(input,hint){if(typeof input!="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==void 0){var res=prim.call(input,hint||"default");if(typeof res!="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return (hint==="string"?String:Number)(input)}var finished=require_end_of_stream2(),kLastResolve=Symbol("lastResolve"),kLastReject=Symbol("lastReject"),kError=Symbol("error"),kEnded=Symbol("ended"),kLastPromise=Symbol("lastPromise"),kHandlePromise=Symbol("handlePromise"),kStream=Symbol("stream");function createIterResult(value,done){return {value,done}}function readAndResolve(iter){var resolve3=iter[kLastResolve];if(resolve3!==null){var data=iter[kStream].read();data!==null&&(iter[kLastPromise]=null,iter[kLastResolve]=null,iter[kLastReject]=null,resolve3(createIterResult(data,!1)));}}function onReadable(iter){process.nextTick(readAndResolve,iter);}function wrapForNext(lastPromise,iter){return function(resolve3,reject){lastPromise.then(function(){if(iter[kEnded]){resolve3(createIterResult(void 0,!0));return}iter[kHandlePromise](resolve3,reject);},reject);}}var AsyncIteratorPrototype=Object.getPrototypeOf(function(){}),ReadableStreamAsyncIteratorPrototype=Object.setPrototypeOf((_Object$setPrototypeO={get stream(){return this[kStream]},next:function(){var _this=this,error=this[kError];if(error!==null)return Promise.reject(error);if(this[kEnded])return Promise.resolve(createIterResult(void 0,!0));if(this[kStream].destroyed)return new Promise(function(resolve3,reject){process.nextTick(function(){_this[kError]?reject(_this[kError]):resolve3(createIterResult(void 0,!0));});});var lastPromise=this[kLastPromise],promise;if(lastPromise)promise=new Promise(wrapForNext(lastPromise,this));else {var data=this[kStream].read();if(data!==null)return Promise.resolve(createIterResult(data,!1));promise=new Promise(this[kHandlePromise]);}return this[kLastPromise]=promise,promise}},_defineProperty(_Object$setPrototypeO,Symbol.asyncIterator,function(){return this}),_defineProperty(_Object$setPrototypeO,"return",function(){var _this2=this;return new Promise(function(resolve3,reject){_this2[kStream].destroy(null,function(err){if(err){reject(err);return}resolve3(createIterResult(void 0,!0));});})}),_Object$setPrototypeO),AsyncIteratorPrototype),createReadableStreamAsyncIterator=function(stream2){var _Object$create,iterator=Object.create(ReadableStreamAsyncIteratorPrototype,(_Object$create={},_defineProperty(_Object$create,kStream,{value:stream2,writable:!0}),_defineProperty(_Object$create,kLastResolve,{value:null,writable:!0}),_defineProperty(_Object$create,kLastReject,{value:null,writable:!0}),_defineProperty(_Object$create,kError,{value:null,writable:!0}),_defineProperty(_Object$create,kEnded,{value:stream2._readableState.endEmitted,writable:!0}),_defineProperty(_Object$create,kHandlePromise,{value:function(resolve3,reject){var data=iterator[kStream].read();data?(iterator[kLastPromise]=null,iterator[kLastResolve]=null,iterator[kLastReject]=null,resolve3(createIterResult(data,!1))):(iterator[kLastResolve]=resolve3,iterator[kLastReject]=reject);},writable:!0}),_Object$create));return iterator[kLastPromise]=null,finished(stream2,function(err){if(err&&err.code!=="ERR_STREAM_PREMATURE_CLOSE"){var reject=iterator[kLastReject];reject!==null&&(iterator[kLastPromise]=null,iterator[kLastResolve]=null,iterator[kLastReject]=null,reject(err)),iterator[kError]=err;return}var resolve3=iterator[kLastResolve];resolve3!==null&&(iterator[kLastPromise]=null,iterator[kLastResolve]=null,iterator[kLastReject]=null,resolve3(createIterResult(void 0,!0))),iterator[kEnded]=!0;}),stream2.on("readable",onReadable.bind(null,iterator)),iterator};module.exports=createReadableStreamAsyncIterator;}});var require_from=__commonJS({"../../node_modules/readable-stream/lib/internal/streams/from.js"(exports,module){function asyncGeneratorStep(gen,resolve3,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value;}catch(error){reject(error);return}info.done?resolve3(value):Promise.resolve(value).then(_next,_throw);}function _asyncToGenerator(fn){return function(){var self2=this,args=arguments;return new Promise(function(resolve3,reject){var gen=fn.apply(self2,args);function _next(value){asyncGeneratorStep(gen,resolve3,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve3,reject,_next,_throw,"throw",err);}_next(void 0);})}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols);}return keys}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target}function _defineProperty(obj,key,value){return key=_toPropertyKey(key),key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key=="symbol"?key:String(key)}function _toPrimitive(input,hint){if(typeof input!="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==void 0){var res=prim.call(input,hint||"default");if(typeof res!="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return (hint==="string"?String:Number)(input)}var ERR_INVALID_ARG_TYPE=require_errors().codes.ERR_INVALID_ARG_TYPE;function from(Readable,iterable,opts){var iterator;if(iterable&&typeof iterable.next=="function")iterator=iterable;else if(iterable&&iterable[Symbol.asyncIterator])iterator=iterable[Symbol.asyncIterator]();else if(iterable&&iterable[Symbol.iterator])iterator=iterable[Symbol.iterator]();else throw new ERR_INVALID_ARG_TYPE("iterable",["Iterable"],iterable);var readable=new Readable(_objectSpread({objectMode:!0},opts)),reading=!1;readable._read=function(){reading||(reading=!0,next());};function next(){return _next2.apply(this,arguments)}function _next2(){return _next2=_asyncToGenerator(function*(){try{var _yield$iterator$next=yield iterator.next(),value=_yield$iterator$next.value,done=_yield$iterator$next.done;done?readable.push(null):readable.push(yield value)?next():reading=!1;}catch(err){readable.destroy(err);}}),_next2.apply(this,arguments)}return readable}module.exports=from;}});var require_stream_readable=__commonJS({"../../node_modules/readable-stream/lib/_stream_readable.js"(exports,module){module.exports=Readable;var Duplex2;Readable.ReadableState=ReadableState;__require("events").EventEmitter;var EElistenerCount=function(emitter,type){return emitter.listeners(type).length},Stream3=require_stream2(),Buffer4=__require("buffer").Buffer,OurUint8Array=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer4.from(chunk)}function _isUint8Array(obj){return Buffer4.isBuffer(obj)||obj instanceof OurUint8Array}var debugUtil=__require("util"),debug;debugUtil&&debugUtil.debuglog?debug=debugUtil.debuglog("stream"):debug=function(){};var BufferList=require_buffer_list(),destroyImpl=require_destroy(),_require=require_state(),getHighWaterMark=_require.getHighWaterMark,_require$codes=require_errors().codes,ERR_INVALID_ARG_TYPE=_require$codes.ERR_INVALID_ARG_TYPE,ERR_STREAM_PUSH_AFTER_EOF=_require$codes.ERR_STREAM_PUSH_AFTER_EOF,ERR_METHOD_NOT_IMPLEMENTED=_require$codes.ERR_METHOD_NOT_IMPLEMENTED,ERR_STREAM_UNSHIFT_AFTER_END_EVENT=_require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,StringDecoder,createReadableStreamAsyncIterator,from;require_inherits()(Readable,Stream3);var errorOrDestroy=destroyImpl.errorOrDestroy,kProxyEvents=["error","close","destroy","pause","resume"];function prependListener(emitter,event,fn){if(typeof emitter.prependListener=="function")return emitter.prependListener(event,fn);!emitter._events||!emitter._events[event]?emitter.on(event,fn):Array.isArray(emitter._events[event])?emitter._events[event].unshift(fn):emitter._events[event]=[fn,emitter._events[event]];}function ReadableState(options,stream2,isDuplex){Duplex2=Duplex2||require_stream_duplex(),options=options||{},typeof isDuplex!="boolean"&&(isDuplex=stream2 instanceof Duplex2),this.objectMode=!!options.objectMode,isDuplex&&(this.objectMode=this.objectMode||!!options.readableObjectMode),this.highWaterMark=getHighWaterMark(this,options,"readableHighWaterMark",isDuplex),this.buffer=new BufferList,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=options.emitClose!==!1,this.autoDestroy=!!options.autoDestroy,this.destroyed=!1,this.defaultEncoding=options.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=require_string_decoder().StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding);}function Readable(options){if(Duplex2=Duplex2||require_stream_duplex(),!(this instanceof Readable))return new Readable(options);var isDuplex=this instanceof Duplex2;this._readableState=new ReadableState(options,this,isDuplex),this.readable=!0,options&&(typeof options.read=="function"&&(this._read=options.read),typeof options.destroy=="function"&&(this._destroy=options.destroy)),Stream3.call(this);}Object.defineProperty(Readable.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(value){this._readableState&&(this._readableState.destroyed=value);}});Readable.prototype.destroy=destroyImpl.destroy;Readable.prototype._undestroy=destroyImpl.undestroy;Readable.prototype._destroy=function(err,cb){cb(err);};Readable.prototype.push=function(chunk,encoding){var state=this._readableState,skipChunkCheck;return state.objectMode?skipChunkCheck=!0:typeof chunk=="string"&&(encoding=encoding||state.defaultEncoding,encoding!==state.encoding&&(chunk=Buffer4.from(chunk,encoding),encoding=""),skipChunkCheck=!0),readableAddChunk(this,chunk,encoding,!1,skipChunkCheck)};Readable.prototype.unshift=function(chunk){return readableAddChunk(this,chunk,null,!0,!1)};function readableAddChunk(stream2,chunk,encoding,addToFront,skipChunkCheck){debug("readableAddChunk",chunk);var state=stream2._readableState;if(chunk===null)state.reading=!1,onEofChunk(stream2,state);else {var er;if(skipChunkCheck||(er=chunkInvalid(state,chunk)),er)errorOrDestroy(stream2,er);else if(state.objectMode||chunk&&chunk.length>0)if(typeof chunk!="string"&&!state.objectMode&&Object.getPrototypeOf(chunk)!==Buffer4.prototype&&(chunk=_uint8ArrayToBuffer(chunk)),addToFront)state.endEmitted?errorOrDestroy(stream2,new ERR_STREAM_UNSHIFT_AFTER_END_EVENT):addChunk(stream2,state,chunk,!0);else if(state.ended)errorOrDestroy(stream2,new ERR_STREAM_PUSH_AFTER_EOF);else {if(state.destroyed)return !1;state.reading=!1,state.decoder&&!encoding?(chunk=state.decoder.write(chunk),state.objectMode||chunk.length!==0?addChunk(stream2,state,chunk,!1):maybeReadMore(stream2,state)):addChunk(stream2,state,chunk,!1);}else addToFront||(state.reading=!1,maybeReadMore(stream2,state));}return !state.ended&&(state.length<state.highWaterMark||state.length===0)}function addChunk(stream2,state,chunk,addToFront){state.flowing&&state.length===0&&!state.sync?(state.awaitDrain=0,stream2.emit("data",chunk)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream2)),maybeReadMore(stream2,state);}function chunkInvalid(state,chunk){var er;return !_isUint8Array(chunk)&&typeof chunk!="string"&&chunk!==void 0&&!state.objectMode&&(er=new ERR_INVALID_ARG_TYPE("chunk",["string","Buffer","Uint8Array"],chunk)),er}Readable.prototype.isPaused=function(){return this._readableState.flowing===!1};Readable.prototype.setEncoding=function(enc){StringDecoder||(StringDecoder=require_string_decoder().StringDecoder);var decoder=new StringDecoder(enc);this._readableState.decoder=decoder,this._readableState.encoding=this._readableState.decoder.encoding;for(var p=this._readableState.buffer.head,content="";p!==null;)content+=decoder.write(p.data),p=p.next;return this._readableState.buffer.clear(),content!==""&&this._readableState.buffer.push(content),this._readableState.length=content.length,this};var MAX_HWM=1073741824;function computeNewHighWaterMark(n){return n>=MAX_HWM?n=MAX_HWM:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}function howMuchToRead(n,state){return n<=0||state.length===0&&state.ended?0:state.objectMode?1:n!==n?state.flowing&&state.length?state.buffer.head.data.length:state.length:(n>state.highWaterMark&&(state.highWaterMark=computeNewHighWaterMark(n)),n<=state.length?n:state.ended?state.length:(state.needReadable=!0,0))}Readable.prototype.read=function(n){debug("read",n),n=parseInt(n,10);var state=this._readableState,nOrig=n;if(n!==0&&(state.emittedReadable=!1),n===0&&state.needReadable&&((state.highWaterMark!==0?state.length>=state.highWaterMark:state.length>0)||state.ended))return debug("read: emitReadable",state.length,state.ended),state.length===0&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),n===0&&state.ended)return state.length===0&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(state.length===0||state.length-n<state.highWaterMark)&&(doRead=!0,debug("length less than watermark",doRead)),state.ended||state.reading?(doRead=!1,debug("reading or ended",doRead)):doRead&&(debug("do read"),state.reading=!0,state.sync=!0,state.length===0&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1,state.reading||(n=howMuchToRead(nOrig,state)));var ret;return n>0?ret=fromList(n,state):ret=null,ret===null?(state.needReadable=state.length<=state.highWaterMark,n=0):(state.length-=n,state.awaitDrain=0),state.length===0&&(state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&endReadable(this)),ret!==null&&this.emit("data",ret),ret};function onEofChunk(stream2,state){if(debug("onEofChunk"),!state.ended){if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length);}state.ended=!0,state.sync?emitReadable(stream2):(state.needReadable=!1,state.emittedReadable||(state.emittedReadable=!0,emitReadable_(stream2)));}}function emitReadable(stream2){var state=stream2._readableState;debug("emitReadable",state.needReadable,state.emittedReadable),state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,process.nextTick(emitReadable_,stream2));}function emitReadable_(stream2){var state=stream2._readableState;debug("emitReadable_",state.destroyed,state.length,state.ended),!state.destroyed&&(state.length||state.ended)&&(stream2.emit("readable"),state.emittedReadable=!1),state.needReadable=!state.flowing&&!state.ended&&state.length<=state.highWaterMark,flow(stream2);}function maybeReadMore(stream2,state){state.readingMore||(state.readingMore=!0,process.nextTick(maybeReadMore_,stream2,state));}function maybeReadMore_(stream2,state){for(;!state.reading&&!state.ended&&(state.length<state.highWaterMark||state.flowing&&state.length===0);){var len=state.length;if(debug("maybeReadMore read 0"),stream2.read(0),len===state.length)break}state.readingMore=!1;}Readable.prototype._read=function(n){errorOrDestroy(this,new ERR_METHOD_NOT_IMPLEMENTED("_read()"));};Readable.prototype.pipe=function(dest,pipeOpts){var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest);break}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:unpipe;state.endEmitted?process.nextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);function onunpipe(readable,unpipeInfo){debug("onunpipe"),readable===src&&unpipeInfo&&unpipeInfo.hasUnpiped===!1&&(unpipeInfo.hasUnpiped=!0,cleanup());}function onend(){debug("onend"),dest.end();}var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=!1;function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",unpipe),src.removeListener("data",ondata),cleanedUp=!0,state.awaitDrain&&(!dest._writableState||dest._writableState.needDrain)&&ondrain();}src.on("data",ondata);function ondata(chunk){debug("ondata");var ret=dest.write(chunk);debug("dest.write",ret),ret===!1&&((state.pipesCount===1&&state.pipes===dest||state.pipesCount>1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp&&(debug("false write response, pause",state.awaitDrain),state.awaitDrain++),src.pause());}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),EElistenerCount(dest,"error")===0&&errorOrDestroy(dest,er);}prependListener(dest,"error",onerror);function onclose(){dest.removeListener("finish",onfinish),unpipe();}dest.once("close",onclose);function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe();}dest.once("finish",onfinish);function unpipe(){debug("unpipe"),src.unpipe(dest);}return dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest};function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,state.awaitDrain===0&&EElistenerCount(src,"data")&&(state.flowing=!0,flow(src));}}Readable.prototype.unpipe=function(dest){var state=this._readableState,unpipeInfo={hasUnpiped:!1};if(state.pipesCount===0)return this;if(state.pipesCount===1)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this,unpipeInfo),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;i<len;i++)dests[i].emit("unpipe",this,{hasUnpiped:!1});return this}var index=indexOf(state.pipes,dest);return index===-1?this:(state.pipes.splice(index,1),state.pipesCount-=1,state.pipesCount===1&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this,unpipeInfo),this)};Readable.prototype.on=function(ev,fn){var res=Stream3.prototype.on.call(this,ev,fn),state=this._readableState;return ev==="data"?(state.readableListening=this.listenerCount("readable")>0,state.flowing!==!1&&this.resume()):ev==="readable"&&!state.endEmitted&&!state.readableListening&&(state.readableListening=state.needReadable=!0,state.flowing=!1,state.emittedReadable=!1,debug("on readable",state.length,state.reading),state.length?emitReadable(this):state.reading||process.nextTick(nReadingNextTick,this)),res};Readable.prototype.addListener=Readable.prototype.on;Readable.prototype.removeListener=function(ev,fn){var res=Stream3.prototype.removeListener.call(this,ev,fn);return ev==="readable"&&process.nextTick(updateReadableListening,this),res};Readable.prototype.removeAllListeners=function(ev){var res=Stream3.prototype.removeAllListeners.apply(this,arguments);return (ev==="readable"||ev===void 0)&&process.nextTick(updateReadableListening,this),res};function updateReadableListening(self2){var state=self2._readableState;state.readableListening=self2.listenerCount("readable")>0,state.resumeScheduled&&!state.paused?state.flowing=!0:self2.listenerCount("data")>0&&self2.resume();}function nReadingNextTick(self2){debug("readable nexttick read 0"),self2.read(0);}Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!state.readableListening,resume(this,state)),state.paused=!1,this};function resume(stream2,state){state.resumeScheduled||(state.resumeScheduled=!0,process.nextTick(resume_,stream2,state));}function resume_(stream2,state){debug("resume",state.reading),state.reading||stream2.read(0),state.resumeScheduled=!1,stream2.emit("resume"),flow(stream2),state.flowing&&!state.reading&&stream2.read(0);}Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function flow(stream2){var state=stream2._readableState;for(debug("flow",state.flowing);state.flowing&&stream2.read()!==null;);}Readable.prototype.wrap=function(stream2){var _this=this,state=this._readableState,paused=!1;stream2.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&_this.push(chunk);}_this.push(null);}),stream2.on("data",function(chunk){if(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),!(state.objectMode&&chunk==null)&&!(!state.objectMode&&(!chunk||!chunk.length))){var ret=_this.push(chunk);ret||(paused=!0,stream2.pause());}});for(var i in stream2)this[i]===void 0&&typeof stream2[i]=="function"&&(this[i]=function(method){return function(){return stream2[method].apply(stream2,arguments)}}(i));for(var n=0;n<kProxyEvents.length;n++)stream2.on(kProxyEvents[n],this.emit.bind(this,kProxyEvents[n]));return this._read=function(n2){debug("wrapped _read",n2),paused&&(paused=!1,stream2.resume());},this};typeof Symbol=="function"&&(Readable.prototype[Symbol.asyncIterator]=function(){return createReadableStreamAsyncIterator===void 0&&(createReadableStreamAsyncIterator=require_async_iterator()),createReadableStreamAsyncIterator(this)});Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Readable.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Readable.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(state){this._readableState&&(this._readableState.flowing=state);}});Readable._fromList=fromList;Object.defineProperty(Readable.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function fromList(n,state){if(state.length===0)return null;var ret;return state.objectMode?ret=state.buffer.shift():!n||n>=state.length?(state.decoder?ret=state.buffer.join(""):state.buffer.length===1?ret=state.buffer.first():ret=state.buffer.concat(state.length),state.buffer.clear()):ret=state.buffer.consume(n,state.decoder),ret}function endReadable(stream2){var state=stream2._readableState;debug("endReadable",state.endEmitted),state.endEmitted||(state.ended=!0,process.nextTick(endReadableNT,state,stream2));}function endReadableNT(state,stream2){if(debug("endReadableNT",state.endEmitted,state.length),!state.endEmitted&&state.length===0&&(state.endEmitted=!0,stream2.readable=!1,stream2.emit("end"),state.autoDestroy)){var wState=stream2._writableState;(!wState||wState.autoDestroy&&wState.finished)&&stream2.destroy();}}typeof Symbol=="function"&&(Readable.from=function(iterable,opts){return from===void 0&&(from=require_from()),from(Readable,iterable,opts)});function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return -1}}});var require_stream_transform=__commonJS({"../../node_modules/readable-stream/lib/_stream_transform.js"(exports,module){module.exports=Transform;var _require$codes=require_errors().codes,ERR_METHOD_NOT_IMPLEMENTED=_require$codes.ERR_METHOD_NOT_IMPLEMENTED,ERR_MULTIPLE_CALLBACK=_require$codes.ERR_MULTIPLE_CALLBACK,ERR_TRANSFORM_ALREADY_TRANSFORMING=_require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,ERR_TRANSFORM_WITH_LENGTH_0=_require$codes.ERR_TRANSFORM_WITH_LENGTH_0,Duplex2=require_stream_duplex();require_inherits()(Transform,Duplex2);function afterTransform(er,data){var ts=this._transformState;ts.transforming=!1;var cb=ts.writecb;if(cb===null)return this.emit("error",new ERR_MULTIPLE_CALLBACK);ts.writechunk=null,ts.writecb=null,data!=null&&this.push(data),cb(er);var rs=this._readableState;rs.reading=!1,(rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark);}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex2.call(this,options),this._transformState={afterTransform:afterTransform.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,options&&(typeof options.transform=="function"&&(this._transform=options.transform),typeof options.flush=="function"&&(this._flush=options.flush)),this.on("prefinish",prefinish);}function prefinish(){var _this=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(er,data){done(_this,er,data);}):done(this,null,null);}Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex2.prototype.push.call(this,chunk,encoding)};Transform.prototype._transform=function(chunk,encoding,cb){cb(new ERR_METHOD_NOT_IMPLEMENTED("_transform()"));};Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark);}};Transform.prototype._read=function(n){var ts=this._transformState;ts.writechunk!==null&&!ts.transforming?(ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)):ts.needTransform=!0;};Transform.prototype._destroy=function(err,cb){Duplex2.prototype._destroy.call(this,err,function(err2){cb(err2);});};function done(stream2,er,data){if(er)return stream2.emit("error",er);if(data!=null&&stream2.push(data),stream2._writableState.length)throw new ERR_TRANSFORM_WITH_LENGTH_0;if(stream2._transformState.transforming)throw new ERR_TRANSFORM_ALREADY_TRANSFORMING;return stream2.push(null)}}});var require_stream_passthrough=__commonJS({"../../node_modules/readable-stream/lib/_stream_passthrough.js"(exports,module){module.exports=PassThrough3;var Transform=require_stream_transform();require_inherits()(PassThrough3,Transform);function PassThrough3(options){if(!(this instanceof PassThrough3))return new PassThrough3(options);Transform.call(this,options);}PassThrough3.prototype._transform=function(chunk,encoding,cb){cb(null,chunk);};}});var require_pipeline=__commonJS({"../../node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports,module){var eos;function once2(callback){var called=!1;return function(){called||(called=!0,callback.apply(void 0,arguments));}}var _require$codes=require_errors().codes,ERR_MISSING_ARGS=_require$codes.ERR_MISSING_ARGS,ERR_STREAM_DESTROYED=_require$codes.ERR_STREAM_DESTROYED;function noop3(err){if(err)throw err}function isRequest3(stream2){return stream2.setHeader&&typeof stream2.abort=="function"}function destroyer(stream2,reading,writing,callback){callback=once2(callback);var closed=!1;stream2.on("close",function(){closed=!0;}),eos===void 0&&(eos=require_end_of_stream2()),eos(stream2,{readable:reading,writable:writing},function(err){if(err)return callback(err);closed=!0,callback();});var destroyed=!1;return function(err){if(!closed&&!destroyed){if(destroyed=!0,isRequest3(stream2))return stream2.abort();if(typeof stream2.destroy=="function")return stream2.destroy();callback(err||new ERR_STREAM_DESTROYED("pipe"));}}}function call(fn){fn();}function pipe2(from,to){return from.pipe(to)}function popCallback(streams){return !streams.length||typeof streams[streams.length-1]!="function"?noop3:streams.pop()}function pipeline2(){for(var _len=arguments.length,streams=new Array(_len),_key=0;_key<_len;_key++)streams[_key]=arguments[_key];var callback=popCallback(streams);if(Array.isArray(streams[0])&&(streams=streams[0]),streams.length<2)throw new ERR_MISSING_ARGS("streams");var error,destroys=streams.map(function(stream2,i){var reading=i<streams.length-1,writing=i>0;return destroyer(stream2,reading,writing,function(err){error||(error=err),err&&destroys.forEach(call),!reading&&(destroys.forEach(call),callback(error));})});return streams.reduce(pipe2)}module.exports=pipeline2;}});var require_readable=__commonJS({"../../node_modules/readable-stream/readable.js"(exports,module){var Stream3=__require("stream");process.env.READABLE_STREAM==="disable"&&Stream3?(module.exports=Stream3.Readable,Object.assign(module.exports,Stream3),module.exports.Stream=Stream3):(exports=module.exports=require_stream_readable(),exports.Stream=Stream3||exports,exports.Readable=exports,exports.Writable=require_stream_writable(),exports.Duplex=require_stream_duplex(),exports.Transform=require_stream_transform(),exports.PassThrough=require_stream_passthrough(),exports.finished=require_end_of_stream2(),exports.pipeline=require_pipeline());}});var require_BufferList=__commonJS({"../../node_modules/bl/BufferList.js"(exports,module){var{Buffer:Buffer4}=__require("buffer"),symbol=Symbol.for("BufferList");function BufferList(buf){if(!(this instanceof BufferList))return new BufferList(buf);BufferList._init.call(this,buf);}BufferList._init=function(buf){Object.defineProperty(this,symbol,{value:!0}),this._bufs=[],this.length=0,buf&&this.append(buf);};BufferList.prototype._new=function(buf){return new BufferList(buf)};BufferList.prototype._offset=function(offset){if(offset===0)return [0,0];let tot=0;for(let i=0;i<this._bufs.length;i++){let _t=tot+this._bufs[i].length;if(offset<_t||i===this._bufs.length-1)return [i,offset-tot];tot=_t;}};BufferList.prototype._reverseOffset=function(blOffset){let bufferId=blOffset[0],offset=blOffset[1];for(let i=0;i<bufferId;i++)offset+=this._bufs[i].length;return offset};BufferList.prototype.get=function(index){if(index>this.length||index<0)return;let offset=this._offset(index);return this._bufs[offset[0]][offset[1]]};BufferList.prototype.slice=function(start,end){return typeof start=="number"&&start<0&&(start+=this.length),typeof end=="number"&&end<0&&(end+=this.length),this.copy(null,0,start,end)};BufferList.prototype.copy=function(dst,dstStart,srcStart,srcEnd){if((typeof srcStart!="number"||srcStart<0)&&(srcStart=0),(typeof srcEnd!="number"||srcEnd>this.length)&&(srcEnd=this.length),srcStart>=this.length||srcEnd<=0)return dst||Buffer4.alloc(0);let copy3=!!dst,off=this._offset(srcStart),len=srcEnd-srcStart,bytes=len,bufoff=copy3&&dstStart||0,start=off[1];if(srcStart===0&&srcEnd===this.length){if(!copy3)return this._bufs.length===1?this._bufs[0]:Buffer4.concat(this._bufs,this.length);for(let i=0;i<this._bufs.length;i++)this._bufs[i].copy(dst,bufoff),bufoff+=this._bufs[i].length;return dst}if(bytes<=this._bufs[off[0]].length-start)return copy3?this._bufs[off[0]].copy(dst,dstStart,start,start+bytes):this._bufs[off[0]].slice(start,start+bytes);copy3||(dst=Buffer4.allocUnsafe(len));for(let i=off[0];i<this._bufs.length;i++){let l=this._bufs[i].length-start;if(bytes>l)this._bufs[i].copy(dst,bufoff,start),bufoff+=l;else {this._bufs[i].copy(dst,bufoff,start,start+bytes),bufoff+=l;break}bytes-=l,start&&(start=0);}return dst.length>bufoff?dst.slice(0,bufoff):dst};BufferList.prototype.shallowSlice=function(start,end){if(start=start||0,end=typeof end!="number"?this.length:end,start<0&&(start+=this.length),end<0&&(end+=this.length),start===end)return this._new();let startOffset=this._offset(start),endOffset=this._offset(end),buffers=this._bufs.slice(startOffset[0],endOffset[0]+1);return endOffset[1]===0?buffers.pop():buffers[buffers.length-1]=buffers[buffers.length-1].slice(0,endOffset[1]),startOffset[1]!==0&&(buffers[0]=buffers[0].slice(startOffset[1])),this._new(buffers)};BufferList.prototype.toString=function(encoding,start,end){return this.slice(start,end).toString(encoding)};BufferList.prototype.consume=function(bytes){if(bytes=Math.trunc(bytes),Number.isNaN(bytes)||bytes<=0)return this;for(;this._bufs.length;)if(bytes>=this._bufs[0].length)bytes-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else {this._bufs[0]=this._bufs[0].slice(bytes),this.length-=bytes;break}return this};BufferList.prototype.duplicate=function(){let copy2=this._new();for(let i=0;i<this._bufs.length;i++)copy2.append(this._bufs[i]);return copy2};BufferList.prototype.append=function(buf){if(buf==null)return this;if(buf.buffer)this._appendBuffer(Buffer4.from(buf.buffer,buf.byteOffset,buf.byteLength));else if(Array.isArray(buf))for(let i=0;i<buf.length;i++)this.append(buf[i]);else if(this._isBufferList(buf))for(let i=0;i<buf._bufs.length;i++)this.append(buf._bufs[i]);else typeof buf=="number"&&(buf=buf.toString()),this._appendBuffer(Buffer4.from(buf));return this};BufferList.prototype._appendBuffer=function(buf){this._bufs.push(buf),this.length+=buf.length;};BufferList.prototype.indexOf=function(search,offset,encoding){if(encoding===void 0&&typeof offset=="string"&&(encoding=offset,offset=void 0),typeof search=="function"||Array.isArray(search))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof search=="number"?search=Buffer4.from([search]):typeof search=="string"?search=Buffer4.from(search,encoding):this._isBufferList(search)?search=search.slice():Array.isArray(search.buffer)?search=Buffer4.from(search.buffer,search.byteOffset,search.byteLength):Buffer4.isBuffer(search)||(search=Buffer4.from(search)),offset=Number(offset||0),isNaN(offset)&&(offset=0),offset<0&&(offset=this.length+offset),offset<0&&(offset=0),search.length===0)return offset>this.length?this.length:offset;let blOffset=this._offset(offset),blIndex=blOffset[0],buffOffset=blOffset[1];for(;blIndex<this._bufs.length;blIndex++){let buff=this._bufs[blIndex];for(;buffOffset<buff.length;)if(buff.length-buffOffset>=search.length){let nativeSearchResult=buff.indexOf(search,buffOffset);if(nativeSearchResult!==-1)return this._reverseOffset([blIndex,nativeSearchResult]);buffOffset=buff.length-search.length+1;}else {let revOffset=this._reverseOffset([blIndex,buffOffset]);if(this._match(revOffset,search))return revOffset;buffOffset++;}buffOffset=0;}return -1};BufferList.prototype._match=function(offset,search){if(this.length-offset<search.length)return !1;for(let searchOffset=0;searchOffset<search.length;searchOffset++)if(this.get(offset+searchOffset)!==search[searchOffset])return !1;return !0};(function(){let methods={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let m in methods)(function(m2){methods[m2]===null?BufferList.prototype[m2]=function(offset,byteLength){return this.slice(offset,offset+byteLength)[m2](0,byteLength)}:BufferList.prototype[m2]=function(offset=0){return this.slice(offset,offset+methods[m2])[m2](0)};})(m);})();BufferList.prototype._isBufferList=function(b){return b instanceof BufferList||BufferList.isBufferList(b)};BufferList.isBufferList=function(b){return b!=null&&b[symbol]};module.exports=BufferList;}});var require_bl=__commonJS({"../../node_modules/bl/bl.js"(exports,module){var DuplexStream=require_readable().Duplex,inherits=require_inherits(),BufferList=require_BufferList();function BufferListStream(callback){if(!(this instanceof BufferListStream))return new BufferListStream(callback);if(typeof callback=="function"){this._callback=callback;let piper=(function(err){this._callback&&(this._callback(err),this._callback=null);}).bind(this);this.on("pipe",function(src){src.on("error",piper);}),this.on("unpipe",function(src){src.removeListener("error",piper);}),callback=null;}BufferList._init.call(this,callback),DuplexStream.call(this);}inherits(BufferListStream,DuplexStream);Object.assign(BufferListStream.prototype,BufferList.prototype);BufferListStream.prototype._new=function(callback){return new BufferListStream(callback)};BufferListStream.prototype._write=function(buf,encoding,callback){this._appendBuffer(buf),typeof callback=="function"&&callback();};BufferListStream.prototype._read=function(size){if(!this.length)return this.push(null);size=Math.min(size,this.length),this.push(this.slice(0,size)),this.consume(size);};BufferListStream.prototype.end=function(chunk){DuplexStream.prototype.end.call(this,chunk),this._callback&&(this._callback(null,this.slice()),this._callback=null);};BufferListStream.prototype._destroy=function(err,cb){this._bufs.length=0,this.length=0,cb(err);};BufferListStream.prototype._isBufferList=function(b){return b instanceof BufferListStream||b instanceof BufferList||BufferListStream.isBufferList(b)};BufferListStream.isBufferList=BufferList.isBufferList;module.exports=BufferListStream;module.exports.BufferListStream=BufferListStream;module.exports.BufferList=BufferList;}});var require_headers=__commonJS({"../../node_modules/tar-stream/headers.js"(exports){var alloc=Buffer.alloc,ZEROS="0000000000000000000",SEVENS="7777777777777777777",ZERO_OFFSET="0".charCodeAt(0),USTAR_MAGIC=Buffer.from("ustar\0","binary"),USTAR_VER=Buffer.from("00","binary"),GNU_MAGIC=Buffer.from("ustar ","binary"),GNU_VER=Buffer.from(" \0","binary"),MASK=parseInt("7777",8),MAGIC_OFFSET=257,VERSION_OFFSET=263,clamp=function(index,len,defaultValue){return typeof index!="number"?defaultValue:(index=~~index,index>=len?len:index>=0||(index+=len,index>=0)?index:0)},toType=function(flag){switch(flag){case 0:return "file";case 1:return "link";case 2:return "symlink";case 3:return "character-device";case 4:return "block-device";case 5:return "directory";case 6:return "fifo";case 7:return "contiguous-file";case 72:return "pax-header";case 55:return "pax-global-header";case 27:return "gnu-long-link-path";case 28:case 30:return "gnu-long-path"}return null},toTypeflag=function(flag){switch(flag){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},indexOf=function(block,num,offset,end){for(;offset<end;offset++)if(block[offset]===num)return offset;return end},cksum=function(block){for(var sum=256,i=0;i<148;i++)sum+=block[i];for(var j=156;j<512;j++)sum+=block[j];return sum},encodeOct=function(val,n){return val=val.toString(8),val.length>n?SEVENS.slice(0,n)+" ":ZEROS.slice(0,n-val.length)+val+" "};function parse256(buf){var positive;if(buf[0]===128)positive=!0;else if(buf[0]===255)positive=!1;else return null;for(var tuple=[],i=buf.length-1;i>0;i--){var byte=buf[i];positive?tuple.push(byte):tuple.push(255-byte);}var sum=0,l=tuple.length;for(i=0;i<l;i++)sum+=tuple[i]*Math.pow(256,i);return positive?sum:-1*sum}var decodeOct=function(val,offset,length){if(val=val.slice(offset,offset+length),offset=0,val[offset]&128)return parse256(val);for(;offset<val.length&&val[offset]===32;)offset++;for(var end=clamp(indexOf(val,32,offset,val.length),val.length,val.length);offset<end&&val[offset]===0;)offset++;return end===offset?0:parseInt(val.slice(offset,end).toString(),8)},decodeStr=function(val,offset,length,encoding){return val.slice(offset,indexOf(val,0,offset,offset+length)).toString(encoding)},addLength=function(str){var len=Buffer.byteLength(str),digits=Math.floor(Math.log(len)/Math.log(10))+1;return len+digits>=Math.pow(10,digits)&&digits++,len+digits+str};exports.decodeLongPath=function(buf,encoding){return decodeStr(buf,0,buf.length,encoding)};exports.encodePax=function(opts){var result="";opts.name&&(result+=addLength(" path="+opts.name+`
84
83
  `)),opts.linkname&&(result+=addLength(" linkpath="+opts.linkname+`
85
84
  `));var pax=opts.pax;if(pax)for(var key in pax)result+=addLength(" "+key+"="+pax[key]+`
86
- `);return Buffer.from(result)};exports.decodePax=function(buf){for(var result={};buf.length;){for(var i=0;i<buf.length&&buf[i]!==32;)i++;var len=parseInt(buf.slice(0,i).toString(),10);if(!len)return result;var b=buf.slice(i+1,len-1).toString(),keyIndex=b.indexOf("=");if(keyIndex===-1)return result;result[b.slice(0,keyIndex)]=b.slice(keyIndex+1),buf=buf.slice(len);}return result};exports.encode=function(opts){var buf=alloc(512),name=opts.name,prefix="";if(opts.typeflag===5&&name[name.length-1]!=="/"&&(name+="/"),Buffer.byteLength(name)!==name.length)return null;for(;Buffer.byteLength(name)>100;){var i=name.indexOf("/");if(i===-1)return null;prefix+=prefix?"/"+name.slice(0,i):name.slice(0,i),name=name.slice(i+1);}return Buffer.byteLength(name)>100||Buffer.byteLength(prefix)>155||opts.linkname&&Buffer.byteLength(opts.linkname)>100?null:(buf.write(name),buf.write(encodeOct(opts.mode&MASK,6),100),buf.write(encodeOct(opts.uid,6),108),buf.write(encodeOct(opts.gid,6),116),buf.write(encodeOct(opts.size,11),124),buf.write(encodeOct(opts.mtime.getTime()/1e3|0,11),136),buf[156]=ZERO_OFFSET+toTypeflag(opts.type),opts.linkname&&buf.write(opts.linkname,157),USTAR_MAGIC.copy(buf,MAGIC_OFFSET),USTAR_VER.copy(buf,VERSION_OFFSET),opts.uname&&buf.write(opts.uname,265),opts.gname&&buf.write(opts.gname,297),buf.write(encodeOct(opts.devmajor||0,6),329),buf.write(encodeOct(opts.devminor||0,6),337),prefix&&buf.write(prefix,345),buf.write(encodeOct(cksum(buf),6),148),buf)};exports.decode=function(buf,filenameEncoding,allowUnknownFormat){var typeflag=buf[156]===0?0:buf[156]-ZERO_OFFSET,name=decodeStr(buf,0,100,filenameEncoding),mode=decodeOct(buf,100,8),uid=decodeOct(buf,108,8),gid=decodeOct(buf,116,8),size=decodeOct(buf,124,12),mtime=decodeOct(buf,136,12),type=toType(typeflag),linkname=buf[157]===0?null:decodeStr(buf,157,100,filenameEncoding),uname=decodeStr(buf,265,32),gname=decodeStr(buf,297,32),devmajor=decodeOct(buf,329,8),devminor=decodeOct(buf,337,8),c=cksum(buf);if(c===8*32)return null;if(c!==decodeOct(buf,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(USTAR_MAGIC.compare(buf,MAGIC_OFFSET,MAGIC_OFFSET+6)===0)buf[345]&&(name=decodeStr(buf,345,155,filenameEncoding)+"/"+name);else if(!(GNU_MAGIC.compare(buf,MAGIC_OFFSET,MAGIC_OFFSET+6)===0&&GNU_VER.compare(buf,VERSION_OFFSET,VERSION_OFFSET+2)===0)){if(!allowUnknownFormat)throw new Error("Invalid tar header: unknown format.")}return typeflag===0&&name&&name[name.length-1]==="/"&&(typeflag=5),{name,mode,uid,gid,size,mtime:new Date(1e3*mtime),type,linkname,uname,gname,devmajor,devminor}};}});var require_extract=__commonJS({"../../node_modules/tar-stream/extract.js"(exports,module){var util=__require("util"),bl=require_bl(),headers=require_headers(),Writable=require_readable().Writable,PassThrough3=require_readable().PassThrough,noop3=function(){},overflow=function(size){return size&=511,size&&512-size},emptyStream=function(self2,offset){var s=new Source(self2,offset);return s.end(),s},mixinPax=function(header,pax){return pax.path&&(header.name=pax.path),pax.linkpath&&(header.linkname=pax.linkpath),pax.size&&(header.size=parseInt(pax.size,10)),header.pax=pax,header},Source=function(self2,offset){this._parent=self2,this.offset=offset,PassThrough3.call(this,{autoDestroy:!1});};util.inherits(Source,PassThrough3);Source.prototype.destroy=function(err){this._parent.destroy(err);};var Extract=function(opts){if(!(this instanceof Extract))return new Extract(opts);Writable.call(this,opts),opts=opts||{},this._offset=0,this._buffer=bl(),this._missing=0,this._partial=!1,this._onparse=noop3,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var self2=this,b=self2._buffer,oncontinue=function(){self2._continue();},onunlock=function(err){if(self2._locked=!1,err)return self2.destroy(err);self2._stream||oncontinue();},onstreamend=function(){self2._stream=null;var drain=overflow(self2._header.size);drain?self2._parse(drain,ondrain):self2._parse(512,onheader),self2._locked||oncontinue();},ondrain=function(){self2._buffer.consume(overflow(self2._header.size)),self2._parse(512,onheader),oncontinue();},onpaxglobalheader=function(){var size=self2._header.size;self2._paxGlobal=headers.decodePax(b.slice(0,size)),b.consume(size),onstreamend();},onpaxheader=function(){var size=self2._header.size;self2._pax=headers.decodePax(b.slice(0,size)),self2._paxGlobal&&(self2._pax=Object.assign({},self2._paxGlobal,self2._pax)),b.consume(size),onstreamend();},ongnulongpath=function(){var size=self2._header.size;this._gnuLongPath=headers.decodeLongPath(b.slice(0,size),opts.filenameEncoding),b.consume(size),onstreamend();},ongnulonglinkpath=function(){var size=self2._header.size;this._gnuLongLinkPath=headers.decodeLongPath(b.slice(0,size),opts.filenameEncoding),b.consume(size),onstreamend();},onheader=function(){var offset=self2._offset,header;try{header=self2._header=headers.decode(b.slice(0,512),opts.filenameEncoding,opts.allowUnknownFormat);}catch(err){self2.emit("error",err);}if(b.consume(512),!header){self2._parse(512,onheader),oncontinue();return}if(header.type==="gnu-long-path"){self2._parse(header.size,ongnulongpath),oncontinue();return}if(header.type==="gnu-long-link-path"){self2._parse(header.size,ongnulonglinkpath),oncontinue();return}if(header.type==="pax-global-header"){self2._parse(header.size,onpaxglobalheader),oncontinue();return}if(header.type==="pax-header"){self2._parse(header.size,onpaxheader),oncontinue();return}if(self2._gnuLongPath&&(header.name=self2._gnuLongPath,self2._gnuLongPath=null),self2._gnuLongLinkPath&&(header.linkname=self2._gnuLongLinkPath,self2._gnuLongLinkPath=null),self2._pax&&(self2._header=header=mixinPax(header,self2._pax),self2._pax=null),self2._locked=!0,!header.size||header.type==="directory"){self2._parse(512,onheader),self2.emit("entry",header,emptyStream(self2,offset),onunlock);return}self2._stream=new Source(self2,offset),self2.emit("entry",header,self2._stream,onunlock),self2._parse(header.size,onstreamend),oncontinue();};this._onheader=onheader,this._parse(512,onheader);};util.inherits(Extract,Writable);Extract.prototype.destroy=function(err){this._destroyed||(this._destroyed=!0,err&&this.emit("error",err),this.emit("close"),this._stream&&this._stream.emit("close"));};Extract.prototype._parse=function(size,onparse){this._destroyed||(this._offset+=size,this._missing=size,onparse===this._onheader&&(this._partial=!1),this._onparse=onparse);};Extract.prototype._continue=function(){if(!this._destroyed){var cb=this._cb;this._cb=noop3,this._overflow?this._write(this._overflow,void 0,cb):cb();}};Extract.prototype._write=function(data,enc,cb){if(!this._destroyed){var s=this._stream,b=this._buffer,missing=this._missing;if(data.length&&(this._partial=!0),data.length<missing)return this._missing-=data.length,this._overflow=null,s?s.write(data,cb):(b.append(data),cb());this._cb=cb,this._missing=0;var overflow2=null;data.length>missing&&(overflow2=data.slice(missing),data=data.slice(0,missing)),s?s.end(data):b.append(data),this._overflow=overflow2,this._onparse();}};Extract.prototype._final=function(cb){if(this._partial)return this.destroy(new Error("Unexpected end of data"));cb();};module.exports=Extract;}});var require_fs_constants=__commonJS({"../../node_modules/fs-constants/index.js"(exports,module){module.exports=__require("fs").constants||__require("constants");}});var require_pack=__commonJS({"../../node_modules/tar-stream/pack.js"(exports,module){var constants=require_fs_constants(),eos=require_end_of_stream(),inherits=require_inherits(),alloc=Buffer.alloc,Readable=require_readable().Readable,Writable=require_readable().Writable,StringDecoder=__require("string_decoder").StringDecoder,headers=require_headers(),DMODE=parseInt("755",8),FMODE=parseInt("644",8),END_OF_TAR=alloc(1024),noop3=function(){},overflow=function(self2,size){size&=511,size&&self2.push(END_OF_TAR.slice(0,512-size));};function modeToType(mode){switch(mode&constants.S_IFMT){case constants.S_IFBLK:return "block-device";case constants.S_IFCHR:return "character-device";case constants.S_IFDIR:return "directory";case constants.S_IFIFO:return "fifo";case constants.S_IFLNK:return "symlink"}return "file"}var Sink=function(to){Writable.call(this),this.written=0,this._to=to,this._destroyed=!1;};inherits(Sink,Writable);Sink.prototype._write=function(data,enc,cb){if(this.written+=data.length,this._to.push(data))return cb();this._to._drain=cb;};Sink.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"));};var LinkSink=function(){Writable.call(this),this.linkname="",this._decoder=new StringDecoder("utf-8"),this._destroyed=!1;};inherits(LinkSink,Writable);LinkSink.prototype._write=function(data,enc,cb){this.linkname+=this._decoder.write(data),cb();};LinkSink.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"));};var Void=function(){Writable.call(this),this._destroyed=!1;};inherits(Void,Writable);Void.prototype._write=function(data,enc,cb){cb(new Error("No body allowed for this entry"));};Void.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"));};var Pack=function(opts){if(!(this instanceof Pack))return new Pack(opts);Readable.call(this,opts),this._drain=noop3,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null;};inherits(Pack,Readable);Pack.prototype.entry=function(header,buffer,callback){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof buffer=="function"&&(callback=buffer,buffer=null),callback||(callback=noop3);var self2=this;if((!header.size||header.type==="symlink")&&(header.size=0),header.type||(header.type=modeToType(header.mode)),header.mode||(header.mode=header.type==="directory"?DMODE:FMODE),header.uid||(header.uid=0),header.gid||(header.gid=0),header.mtime||(header.mtime=new Date),typeof buffer=="string"&&(buffer=Buffer.from(buffer)),Buffer.isBuffer(buffer)){header.size=buffer.length,this._encode(header);var ok=this.push(buffer);return overflow(self2,header.size),ok?process.nextTick(callback):this._drain=callback,new Void}if(header.type==="symlink"&&!header.linkname){var linkSink=new LinkSink;return eos(linkSink,function(err){if(err)return self2.destroy(),callback(err);header.linkname=linkSink.linkname,self2._encode(header),callback();}),linkSink}if(this._encode(header),header.type!=="file"&&header.type!=="contiguous-file")return process.nextTick(callback),new Void;var sink=new Sink(this);return this._stream=sink,eos(sink,function(err){if(self2._stream=null,err)return self2.destroy(),callback(err);if(sink.written!==header.size)return self2.destroy(),callback(new Error("size mismatch"));overflow(self2,header.size),self2._finalizing&&self2.finalize(),callback();}),sink}};Pack.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(END_OF_TAR),this.push(null));};Pack.prototype.destroy=function(err){this._destroyed||(this._destroyed=!0,err&&this.emit("error",err),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy());};Pack.prototype._encode=function(header){if(!header.pax){var buf=headers.encode(header);if(buf){this.push(buf);return}}this._encodePax(header);};Pack.prototype._encodePax=function(header){var paxHeader=headers.encodePax({name:header.name,linkname:header.linkname,pax:header.pax}),newHeader={name:"PaxHeader",mode:header.mode,uid:header.uid,gid:header.gid,size:paxHeader.length,mtime:header.mtime,type:"pax-header",linkname:header.linkname&&"PaxHeader",uname:header.uname,gname:header.gname,devmajor:header.devmajor,devminor:header.devminor};this.push(headers.encode(newHeader)),this.push(paxHeader),overflow(this,paxHeader.length),newHeader.size=header.size,newHeader.type=header.type,this.push(headers.encode(newHeader));};Pack.prototype._read=function(n){var drain=this._drain;this._drain=noop3,drain();};module.exports=Pack;}});var require_tar_stream=__commonJS({"../../node_modules/tar-stream/index.js"(exports){exports.extract=require_extract();exports.pack=require_pack();}});var require_mkdirp_classic=__commonJS({"../../node_modules/mkdirp-classic/index.js"(exports,module){var path13=__require("path"),fs8=__require("fs"),_0777=parseInt("0777",8);module.exports=mkdirP.mkdirp=mkdirP.mkdirP=mkdirP;function mkdirP(p,opts,f,made){typeof opts=="function"?(f=opts,opts={}):(!opts||typeof opts!="object")&&(opts={mode:opts});var mode=opts.mode,xfs=opts.fs||fs8;mode===void 0&&(mode=_0777&~process.umask()),made||(made=null);var cb=f||function(){};p=path13.resolve(p),xfs.mkdir(p,mode,function(er){if(!er)return made=made||p,cb(null,made);switch(er.code){case"ENOENT":mkdirP(path13.dirname(p),opts,function(er2,made2){er2?cb(er2,made2):mkdirP(p,opts,cb,made2);});break;default:xfs.stat(p,function(er2,stat){er2||!stat.isDirectory()?cb(er,made):cb(null,made);});break}});}mkdirP.sync=function sync(p,opts,made){(!opts||typeof opts!="object")&&(opts={mode:opts});var mode=opts.mode,xfs=opts.fs||fs8;mode===void 0&&(mode=_0777&~process.umask()),made||(made=null),p=path13.resolve(p);try{xfs.mkdirSync(p,mode),made=made||p;}catch(err0){switch(err0.code){case"ENOENT":made=sync(path13.dirname(p),opts,made),sync(p,opts,made);break;default:var stat;try{stat=xfs.statSync(p);}catch{throw err0}if(!stat.isDirectory())throw err0;break}}return made};}});var require_tar_fs=__commonJS({"../../node_modules/tar-fs/index.js"(exports){var chownr=require_chownr(),tar=require_tar_stream(),pump2=require_pump(),mkdirp=require_mkdirp_classic(),fs8=__require("fs"),path13=__require("path"),os2=__require("os"),win32=os2.platform()==="win32",noop3=function(){},echo=function(name){return name},normalize=win32?function(name){return name.replace(/\\/g,"/").replace(/[:?<>|]/g,"_")}:echo,statAll=function(fs9,stat,cwd,ignore,entries2,sort2){var queue=entries2||["."];return function(callback){if(!queue.length)return callback();var next=queue.shift(),nextAbs=path13.join(cwd,next);stat.call(fs9,nextAbs,function(err,stat2){if(err)return callback(err);if(!stat2.isDirectory())return callback(null,next,stat2);fs9.readdir(nextAbs,function(err2,files){if(err2)return callback(err2);sort2&&files.sort();for(var i=0;i<files.length;i++)ignore(path13.join(cwd,next,files[i]))||queue.push(path13.join(next,files[i]));callback(null,next,stat2);});});}},strip=function(map,level){return function(header){header.name=header.name.split("/").slice(level).join("/");var linkname=header.linkname;return linkname&&(header.type==="link"||path13.isAbsolute(linkname))&&(header.linkname=linkname.split("/").slice(level).join("/")),map(header)}};exports.pack=function(cwd,opts){cwd||(cwd="."),opts||(opts={});var xfs=opts.fs||fs8,ignore=opts.ignore||opts.filter||noop3,map=opts.map||noop3,mapStream=opts.mapStream||echo,statNext=statAll(xfs,opts.dereference?xfs.stat:xfs.lstat,cwd,ignore,opts.entries,opts.sort),strict=opts.strict!==!1,umask=typeof opts.umask=="number"?~opts.umask:~processUmask(),dmode=typeof opts.dmode=="number"?opts.dmode:0,fmode=typeof opts.fmode=="number"?opts.fmode:0,pack=opts.pack||tar.pack(),finish=opts.finish||noop3;opts.strip&&(map=strip(map,opts.strip)),opts.readable&&(dmode|=parseInt(555,8),fmode|=parseInt(444,8)),opts.writable&&(dmode|=parseInt(333,8),fmode|=parseInt(222,8));var onsymlink=function(filename,header){xfs.readlink(path13.join(cwd,filename),function(err,linkname){if(err)return pack.destroy(err);header.linkname=normalize(linkname),pack.entry(header,onnextentry);});},onstat=function(err,filename,stat){if(err)return pack.destroy(err);if(!filename)return opts.finalize!==!1&&pack.finalize(),finish(pack);if(stat.isSocket())return onnextentry();var header={name:normalize(filename),mode:(stat.mode|(stat.isDirectory()?dmode:fmode))&umask,mtime:stat.mtime,size:stat.size,type:"file",uid:stat.uid,gid:stat.gid};if(stat.isDirectory())return header.size=0,header.type="directory",header=map(header)||header,pack.entry(header,onnextentry);if(stat.isSymbolicLink())return header.size=0,header.type="symlink",header=map(header)||header,onsymlink(filename,header);if(header=map(header)||header,!stat.isFile())return strict?pack.destroy(new Error("unsupported type for "+filename)):onnextentry();var entry=pack.entry(header,onnextentry);if(entry){var rs=mapStream(xfs.createReadStream(path13.join(cwd,filename),{start:0,end:header.size>0?header.size-1:header.size}),header);rs.on("error",function(err2){entry.destroy(err2);}),pump2(rs,entry);}},onnextentry=function(err){if(err)return pack.destroy(err);statNext(onstat);};return onnextentry(),pack};var head=function(list){return list.length?list[list.length-1]:null},processGetuid=function(){return process.getuid?process.getuid():-1},processUmask=function(){return process.umask?process.umask():0};exports.extract=function(cwd,opts){cwd||(cwd="."),opts||(opts={});var xfs=opts.fs||fs8,ignore=opts.ignore||opts.filter||noop3,map=opts.map||noop3,mapStream=opts.mapStream||echo,own=opts.chown!==!1&&!win32&&processGetuid()===0,extract2=opts.extract||tar.extract(),stack=[],now=new Date,umask=typeof opts.umask=="number"?~opts.umask:~processUmask(),dmode=typeof opts.dmode=="number"?opts.dmode:0,fmode=typeof opts.fmode=="number"?opts.fmode:0,strict=opts.strict!==!1;opts.strip&&(map=strip(map,opts.strip)),opts.readable&&(dmode|=parseInt(555,8),fmode|=parseInt(444,8)),opts.writable&&(dmode|=parseInt(333,8),fmode|=parseInt(222,8));var utimesParent=function(name,cb){for(var top;(top=head(stack))&&name.slice(0,top[0].length)!==top[0];)stack.pop();if(!top)return cb();xfs.utimes(top[0],now,top[1],cb);},utimes=function(name,header,cb){if(opts.utimes===!1)return cb();if(header.type==="directory")return xfs.utimes(name,now,header.mtime,cb);if(header.type==="symlink")return utimesParent(name,cb);xfs.utimes(name,now,header.mtime,function(err){if(err)return cb(err);utimesParent(name,cb);});},chperm=function(name,header,cb){var link=header.type==="symlink",chmod=link?xfs.lchmod:xfs.chmod,chown=link?xfs.lchown:xfs.chown;if(!chmod)return cb();var mode=(header.mode|(header.type==="directory"?dmode:fmode))&umask;chown&&own?chown.call(xfs,name,header.uid,header.gid,onchown):onchown(null);function onchown(err){if(err)return cb(err);if(!chmod)return cb();chmod.call(xfs,name,mode,cb);}};return extract2.on("entry",function(header,stream2,next){header=map(header)||header,header.name=normalize(header.name);var name=path13.join(cwd,path13.join("/",header.name));if(ignore(name,header))return stream2.resume(),next();var stat=function(err){if(err)return next(err);utimes(name,header,function(err2){if(err2)return next(err2);if(win32)return next();chperm(name,header,next);});},onsymlink=function(){if(win32)return next();xfs.unlink(name,function(){xfs.symlink(header.linkname,name,stat);});},onlink=function(){if(win32)return next();xfs.unlink(name,function(){var srcpath=path13.join(cwd,path13.join("/",header.linkname));xfs.link(srcpath,name,function(err){if(err&&err.code==="EPERM"&&opts.hardlinkAsFilesFallback)return stream2=xfs.createReadStream(srcpath),onfile();stat(err);});});},onfile=function(){var ws=xfs.createWriteStream(name),rs=mapStream(stream2,header);ws.on("error",function(err){rs.destroy(err);}),pump2(rs,ws,function(err){if(err)return next(err);ws.on("close",stat);});};if(header.type==="directory")return stack.push([name,header.mtime]),mkdirfix(name,{fs:xfs,own,uid:header.uid,gid:header.gid},stat);var dir=path13.dirname(name);validate(xfs,dir,path13.join(cwd,"."),function(err,valid){if(err)return next(err);if(!valid)return next(new Error(dir+" is not a valid path"));mkdirfix(dir,{fs:xfs,own,uid:header.uid,gid:header.gid},function(err2){if(err2)return next(err2);switch(header.type){case"file":return onfile();case"link":return onlink();case"symlink":return onsymlink()}if(strict)return next(new Error("unsupported type for "+name+" ("+header.type+")"));stream2.resume(),next();});});}),opts.finish&&extract2.on("finish",opts.finish),extract2};function validate(fs9,name,root,cb){if(name===root)return cb(null,!0);fs9.lstat(name,function(err,st){if(err&&err.code!=="ENOENT")return cb(err);if(err||st.isDirectory())return validate(fs9,path13.join(name,".."),root,cb);cb(null,!1);});}function mkdirfix(name,opts,cb){mkdirp(name,{fs:opts.fs},function(err,made){!err&&made&&opts.own?chownr(made,opts.uid,opts.gid,cb):cb(err);});}}});var require_process_nextick_args=__commonJS({"../../node_modules/process-nextick-args/index.js"(exports,module){typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?module.exports={nextTick}:module.exports=process;function nextTick(fn,arg1,arg2,arg3){if(typeof fn!="function")throw new TypeError('"callback" argument must be a function');var len=arguments.length,args,i;switch(len){case 0:case 1:return process.nextTick(fn);case 2:return process.nextTick(function(){fn.call(null,arg1);});case 3:return process.nextTick(function(){fn.call(null,arg1,arg2);});case 4:return process.nextTick(function(){fn.call(null,arg1,arg2,arg3);});default:for(args=new Array(len-1),i=0;i<args.length;)args[i++]=arguments[i];return process.nextTick(function(){fn.apply(null,args);})}}}});var require_isarray=__commonJS({"../../node_modules/peek-stream/node_modules/isarray/index.js"(exports,module){var toString2={}.toString;module.exports=Array.isArray||function(arr){return toString2.call(arr)=="[object Array]"};}});var require_stream3=__commonJS({"../../node_modules/peek-stream/node_modules/readable-stream/lib/internal/streams/stream.js"(exports,module){module.exports=__require("stream");}});var require_safe_buffer2=__commonJS({"../../node_modules/peek-stream/node_modules/safe-buffer/index.js"(exports,module){var buffer=__require("buffer"),Buffer4=buffer.Buffer;function copyProps(src,dst){for(var key in src)dst[key]=src[key];}Buffer4.from&&Buffer4.alloc&&Buffer4.allocUnsafe&&Buffer4.allocUnsafeSlow?module.exports=buffer:(copyProps(buffer,exports),exports.Buffer=SafeBuffer);function SafeBuffer(arg,encodingOrOffset,length){return Buffer4(arg,encodingOrOffset,length)}copyProps(Buffer4,SafeBuffer);SafeBuffer.from=function(arg,encodingOrOffset,length){if(typeof arg=="number")throw new TypeError("Argument must not be a number");return Buffer4(arg,encodingOrOffset,length)};SafeBuffer.alloc=function(size,fill,encoding){if(typeof size!="number")throw new TypeError("Argument must be a number");var buf=Buffer4(size);return fill!==void 0?typeof encoding=="string"?buf.fill(fill,encoding):buf.fill(fill):buf.fill(0),buf};SafeBuffer.allocUnsafe=function(size){if(typeof size!="number")throw new TypeError("Argument must be a number");return Buffer4(size)};SafeBuffer.allocUnsafeSlow=function(size){if(typeof size!="number")throw new TypeError("Argument must be a number");return buffer.SlowBuffer(size)};}});var require_util=__commonJS({"../../node_modules/core-util-is/lib/util.js"(exports){function isArray(arg){return Array.isArray?Array.isArray(arg):objectToString(arg)==="[object Array]"}exports.isArray=isArray;function isBoolean(arg){return typeof arg=="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg=="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg=="string"}exports.isString=isString;function isSymbol(arg){return typeof arg=="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg=="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return objectToString(e)==="[object Error]"||e instanceof Error}exports.isError=isError;function isFunction2(arg){return typeof arg=="function"}exports.isFunction=isFunction2;function isPrimitive(arg){return arg===null||typeof arg=="boolean"||typeof arg=="number"||typeof arg=="string"||typeof arg=="symbol"||typeof arg>"u"}exports.isPrimitive=isPrimitive;exports.isBuffer=__require("buffer").Buffer.isBuffer;function objectToString(o){return Object.prototype.toString.call(o)}}});var require_BufferList2=__commonJS({"../../node_modules/peek-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js"(exports,module){function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}var Buffer4=require_safe_buffer2().Buffer,util=__require("util");function copyBuffer(src,target,offset){src.copy(target,offset);}module.exports=function(){function BufferList(){_classCallCheck(this,BufferList),this.head=null,this.tail=null,this.length=0;}return BufferList.prototype.push=function(v){var entry={data:v,next:null};this.length>0?this.tail.next=entry:this.head=entry,this.tail=entry,++this.length;},BufferList.prototype.unshift=function(v){var entry={data:v,next:this.head};this.length===0&&(this.tail=entry),this.head=entry,++this.length;},BufferList.prototype.shift=function(){if(this.length!==0){var ret=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,ret}},BufferList.prototype.clear=function(){this.head=this.tail=null,this.length=0;},BufferList.prototype.join=function(s){if(this.length===0)return "";for(var p=this.head,ret=""+p.data;p=p.next;)ret+=s+p.data;return ret},BufferList.prototype.concat=function(n){if(this.length===0)return Buffer4.alloc(0);for(var ret=Buffer4.allocUnsafe(n>>>0),p=this.head,i=0;p;)copyBuffer(p.data,ret,i),i+=p.data.length,p=p.next;return ret},BufferList}();util&&util.inspect&&util.inspect.custom&&(module.exports.prototype[util.inspect.custom]=function(){var obj=util.inspect({length:this.length});return this.constructor.name+" "+obj});}});var require_destroy2=__commonJS({"../../node_modules/peek-stream/node_modules/readable-stream/lib/internal/streams/destroy.js"(exports,module){var pna=require_process_nextick_args();function destroy(err,cb){var _this=this,readableDestroyed=this._readableState&&this._readableState.destroyed,writableDestroyed=this._writableState&&this._writableState.destroyed;return readableDestroyed||writableDestroyed?(cb?cb(err):err&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,pna.nextTick(emitErrorNT,this,err)):pna.nextTick(emitErrorNT,this,err)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(err||null,function(err2){!cb&&err2?_this._writableState?_this._writableState.errorEmitted||(_this._writableState.errorEmitted=!0,pna.nextTick(emitErrorNT,_this,err2)):pna.nextTick(emitErrorNT,_this,err2):cb&&cb(err2);}),this)}function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1);}function emitErrorNT(self2,err){self2.emit("error",err);}module.exports={destroy,undestroy};}});var require_stream_writable2=__commonJS({"../../node_modules/peek-stream/node_modules/readable-stream/lib/_stream_writable.js"(exports,module){var pna=require_process_nextick_args();module.exports=Writable;function CorkedRequest(state){var _this=this;this.next=null,this.entry=null,this.finish=function(){onCorkedFinish(_this,state);};}var asyncWrite=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:pna.nextTick,Duplex2;Writable.WritableState=WritableState;var util=Object.create(require_util());util.inherits=require_inherits();var internalUtil={deprecate:__require("util-deprecate")},Stream3=require_stream3(),Buffer4=require_safe_buffer2().Buffer,OurUint8Array=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer4.from(chunk)}function _isUint8Array(obj){return Buffer4.isBuffer(obj)||obj instanceof OurUint8Array}var destroyImpl=require_destroy2();util.inherits(Writable,Stream3);function nop(){}function WritableState(options,stream2){Duplex2=Duplex2||require_stream_duplex2(),options=options||{};var isDuplex=stream2 instanceof Duplex2;this.objectMode=!!options.objectMode,isDuplex&&(this.objectMode=this.objectMode||!!options.writableObjectMode);var hwm=options.highWaterMark,writableHwm=options.writableHighWaterMark,defaultHwm=this.objectMode?16:16*1024;hwm||hwm===0?this.highWaterMark=hwm:isDuplex&&(writableHwm||writableHwm===0)?this.highWaterMark=writableHwm:this.highWaterMark=defaultHwm,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var noDecode=options.decodeStrings===!1;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream2,er);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this);}WritableState.prototype.getBuffer=function(){for(var current=this.bufferedRequest,out=[];current;)out.push(current),current=current.next;return out};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch{}})();var realHasInstance;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(object){return realHasInstance.call(this,object)?!0:this!==Writable?!1:object&&object._writableState instanceof WritableState}})):realHasInstance=function(object){return object instanceof this};function Writable(options){if(Duplex2=Duplex2||require_stream_duplex2(),!realHasInstance.call(Writable,this)&&!(this instanceof Duplex2))return new Writable(options);this._writableState=new WritableState(options,this),this.writable=!0,options&&(typeof options.write=="function"&&(this._write=options.write),typeof options.writev=="function"&&(this._writev=options.writev),typeof options.destroy=="function"&&(this._destroy=options.destroy),typeof options.final=="function"&&(this._final=options.final)),Stream3.call(this);}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"));};function writeAfterEnd(stream2,cb){var er=new Error("write after end");stream2.emit("error",er),pna.nextTick(cb,er);}function validChunk(stream2,state,chunk,cb){var valid=!0,er=!1;return chunk===null?er=new TypeError("May not write null values to stream"):typeof chunk!="string"&&chunk!==void 0&&!state.objectMode&&(er=new TypeError("Invalid non-string/buffer chunk")),er&&(stream2.emit("error",er),pna.nextTick(cb,er),valid=!1),valid}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1,isBuf=!state.objectMode&&_isUint8Array(chunk);return isBuf&&!Buffer4.isBuffer(chunk)&&(chunk=_uint8ArrayToBuffer(chunk)),typeof encoding=="function"&&(cb=encoding,encoding=null),isBuf?encoding="buffer":encoding||(encoding=state.defaultEncoding),typeof cb!="function"&&(cb=nop),state.ended?writeAfterEnd(this,cb):(isBuf||validChunk(this,state,chunk,cb))&&(state.pendingcb++,ret=writeOrBuffer(this,state,isBuf,chunk,encoding,cb)),ret};Writable.prototype.cork=function(){var state=this._writableState;state.corked++;};Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,!state.writing&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest&&clearBuffer(this,state));};Writable.prototype.setDefaultEncoding=function(encoding){if(typeof encoding=="string"&&(encoding=encoding.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);return this._writableState.defaultEncoding=encoding,this};function decodeChunk(state,chunk,encoding){return !state.objectMode&&state.decodeStrings!==!1&&typeof chunk=="string"&&(chunk=Buffer4.from(chunk,encoding)),chunk}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function writeOrBuffer(stream2,state,isBuf,chunk,encoding,cb){if(!isBuf){var newChunk=decodeChunk(state,chunk,encoding);chunk!==newChunk&&(isBuf=!0,encoding="buffer",chunk=newChunk);}var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(ret||(state.needDrain=!0),state.writing||state.corked){var last=state.lastBufferedRequest;state.lastBufferedRequest={chunk,encoding,isBuf,callback:cb,next:null},last?last.next=state.lastBufferedRequest:state.bufferedRequest=state.lastBufferedRequest,state.bufferedRequestCount+=1;}else doWrite(stream2,state,!1,len,chunk,encoding,cb);return ret}function doWrite(stream2,state,writev,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,writev?stream2._writev(chunk,state.onwrite):stream2._write(chunk,encoding,state.onwrite),state.sync=!1;}function onwriteError(stream2,state,sync,er,cb){--state.pendingcb,sync?(pna.nextTick(cb,er),pna.nextTick(finishMaybe,stream2,state),stream2._writableState.errorEmitted=!0,stream2.emit("error",er)):(cb(er),stream2._writableState.errorEmitted=!0,stream2.emit("error",er),finishMaybe(stream2,state));}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0;}function onwrite(stream2,er){var state=stream2._writableState,sync=state.sync,cb=state.writecb;if(onwriteStateUpdate(state),er)onwriteError(stream2,state,sync,er,cb);else {var finished=needFinish(state);!finished&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest&&clearBuffer(stream2,state),sync?asyncWrite(afterWrite,stream2,state,finished,cb):afterWrite(stream2,state,finished,cb);}}function afterWrite(stream2,state,finished,cb){finished||onwriteDrain(stream2,state),state.pendingcb--,cb(),finishMaybe(stream2,state);}function onwriteDrain(stream2,state){state.length===0&&state.needDrain&&(state.needDrain=!1,stream2.emit("drain"));}function clearBuffer(stream2,state){state.bufferProcessing=!0;var entry=state.bufferedRequest;if(stream2._writev&&entry&&entry.next){var l=state.bufferedRequestCount,buffer=new Array(l),holder=state.corkedRequestsFree;holder.entry=entry;for(var count=0,allBuffers=!0;entry;)buffer[count]=entry,entry.isBuf||(allBuffers=!1),entry=entry.next,count+=1;buffer.allBuffers=allBuffers,doWrite(stream2,state,!0,state.length,buffer,"",holder.finish),state.pendingcb++,state.lastBufferedRequest=null,holder.next?(state.corkedRequestsFree=holder.next,holder.next=null):state.corkedRequestsFree=new CorkedRequest(state),state.bufferedRequestCount=0;}else {for(;entry;){var chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback,len=state.objectMode?1:chunk.length;if(doWrite(stream2,state,!1,len,chunk,encoding,cb),entry=entry.next,state.bufferedRequestCount--,state.writing)break}entry===null&&(state.lastBufferedRequest=null);}state.bufferedRequest=entry,state.bufferProcessing=!1;}Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("_write() is not implemented"));};Writable.prototype._writev=null;Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;typeof chunk=="function"?(cb=chunk,chunk=null,encoding=null):typeof encoding=="function"&&(cb=encoding,encoding=null),chunk!=null&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||endWritable(this,state,cb);};function needFinish(state){return state.ending&&state.length===0&&state.bufferedRequest===null&&!state.finished&&!state.writing}function callFinal(stream2,state){stream2._final(function(err){state.pendingcb--,err&&stream2.emit("error",err),state.prefinished=!0,stream2.emit("prefinish"),finishMaybe(stream2,state);});}function prefinish(stream2,state){!state.prefinished&&!state.finalCalled&&(typeof stream2._final=="function"?(state.pendingcb++,state.finalCalled=!0,pna.nextTick(callFinal,stream2,state)):(state.prefinished=!0,stream2.emit("prefinish")));}function finishMaybe(stream2,state){var need=needFinish(state);return need&&(prefinish(stream2,state),state.pendingcb===0&&(state.finished=!0,stream2.emit("finish"))),need}function endWritable(stream2,state,cb){state.ending=!0,finishMaybe(stream2,state),cb&&(state.finished?pna.nextTick(cb):stream2.once("finish",cb)),state.ended=!0,stream2.writable=!1;}function onCorkedFinish(corkReq,state,err){var entry=corkReq.entry;for(corkReq.entry=null;entry;){var cb=entry.callback;state.pendingcb--,cb(err),entry=entry.next;}state.corkedRequestsFree.next=corkReq;}Object.defineProperty(Writable.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(value){this._writableState&&(this._writableState.destroyed=value);}});Writable.prototype.destroy=destroyImpl.destroy;Writable.prototype._undestroy=destroyImpl.undestroy;Writable.prototype._destroy=function(err,cb){this.end(),cb(err);};}});var require_stream_duplex2=__commonJS({"../../node_modules/peek-stream/node_modules/readable-stream/lib/_stream_duplex.js"(exports,module){var pna=require_process_nextick_args(),objectKeys=Object.keys||function(obj){var keys2=[];for(var key in obj)keys2.push(key);return keys2};module.exports=Duplex2;var util=Object.create(require_util());util.inherits=require_inherits();var Readable=require_stream_readable2(),Writable=require_stream_writable2();util.inherits(Duplex2,Readable);for(keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++)method=keys[v],Duplex2.prototype[method]||(Duplex2.prototype[method]=Writable.prototype[method]);var keys,method,v;function Duplex2(options){if(!(this instanceof Duplex2))return new Duplex2(options);Readable.call(this,options),Writable.call(this,options),options&&options.readable===!1&&(this.readable=!1),options&&options.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,options&&options.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",onend);}Object.defineProperty(Duplex2.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function onend(){this.allowHalfOpen||this._writableState.ended||pna.nextTick(onEndNT,this);}function onEndNT(self2){self2.end();}Object.defineProperty(Duplex2.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(value){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=value,this._writableState.destroyed=value);}});Duplex2.prototype._destroy=function(err,cb){this.push(null),this.end(),pna.nextTick(cb,err);};}});var require_string_decoder2=__commonJS({"../../node_modules/peek-stream/node_modules/string_decoder/lib/string_decoder.js"(exports){var Buffer4=require_safe_buffer2().Buffer,isEncoding=Buffer4.isEncoding||function(encoding){switch(encoding=""+encoding,encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return !0;default:return !1}};function _normalizeEncoding(enc){if(!enc)return "utf8";for(var retried;;)switch(enc){case"utf8":case"utf-8":return "utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return "utf16le";case"latin1":case"binary":return "latin1";case"base64":case"ascii":case"hex":return enc;default:if(retried)return;enc=(""+enc).toLowerCase(),retried=!0;}}function normalizeEncoding(enc){var nenc=_normalizeEncoding(enc);if(typeof nenc!="string"&&(Buffer4.isEncoding===isEncoding||!isEncoding(enc)))throw new Error("Unknown encoding: "+enc);return nenc||enc}exports.StringDecoder=StringDecoder;function StringDecoder(encoding){this.encoding=normalizeEncoding(encoding);var nb;switch(this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,nb=4;break;case"utf8":this.fillLast=utf8FillLast,nb=4;break;case"base64":this.text=base64Text,this.end=base64End,nb=3;break;default:this.write=simpleWrite,this.end=simpleEnd;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Buffer4.allocUnsafe(nb);}StringDecoder.prototype.write=function(buf){if(buf.length===0)return "";var r,i;if(this.lastNeed){if(r=this.fillLast(buf),r===void 0)return "";i=this.lastNeed,this.lastNeed=0;}else i=0;return i<buf.length?r?r+this.text(buf,i):this.text(buf,i):r||""};StringDecoder.prototype.end=utf8End;StringDecoder.prototype.text=utf8Text;StringDecoder.prototype.fillLast=function(buf){if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,buf.length),this.lastNeed-=buf.length;};function utf8CheckByte(byte){return byte<=127?0:byte>>5===6?2:byte>>4===14?3:byte>>3===30?4:byte>>6===2?-1:-2}function utf8CheckIncomplete(self2,buf,i){var j=buf.length-1;if(j<i)return 0;var nb=utf8CheckByte(buf[j]);return nb>=0?(nb>0&&(self2.lastNeed=nb-1),nb):--j<i||nb===-2?0:(nb=utf8CheckByte(buf[j]),nb>=0?(nb>0&&(self2.lastNeed=nb-2),nb):--j<i||nb===-2?0:(nb=utf8CheckByte(buf[j]),nb>=0?(nb>0&&(nb===2?nb=0:self2.lastNeed=nb-3),nb):0))}function utf8CheckExtraBytes(self2,buf,p){if((buf[0]&192)!==128)return self2.lastNeed=0,"\uFFFD";if(self2.lastNeed>1&&buf.length>1){if((buf[1]&192)!==128)return self2.lastNeed=1,"\uFFFD";if(self2.lastNeed>2&&buf.length>2&&(buf[2]&192)!==128)return self2.lastNeed=2,"\uFFFD"}}function utf8FillLast(buf){var p=this.lastTotal-this.lastNeed,r=utf8CheckExtraBytes(this,buf);if(r!==void 0)return r;if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,p,0,buf.length),this.lastNeed-=buf.length;}function utf8Text(buf,i){var total=utf8CheckIncomplete(this,buf,i);if(!this.lastNeed)return buf.toString("utf8",i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);return buf.copy(this.lastChar,0,end),buf.toString("utf8",i,end)}function utf8End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+"\uFFFD":r}function utf16Text(buf,i){if((buf.length-i)%2===0){var r=buf.toString("utf16le",i);if(r){var c=r.charCodeAt(r.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=buf[buf.length-1],buf.toString("utf16le",i,buf.length-1)}function utf16End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,end)}return r}function base64Text(buf,i){var n=(buf.length-i)%3;return n===0?buf.toString("base64",i):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=buf[buf.length-1]:(this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1]),buf.toString("base64",i,buf.length-n))}function base64End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function simpleWrite(buf){return buf.toString(this.encoding)}function simpleEnd(buf){return buf&&buf.length?this.write(buf):""}}});var require_stream_readable2=__commonJS({"../../node_modules/peek-stream/node_modules/readable-stream/lib/_stream_readable.js"(exports,module){var pna=require_process_nextick_args();module.exports=Readable;var isArray=require_isarray(),Duplex2;Readable.ReadableState=ReadableState;__require("events").EventEmitter;var EElistenerCount=function(emitter,type){return emitter.listeners(type).length},Stream3=require_stream3(),Buffer4=require_safe_buffer2().Buffer,OurUint8Array=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer4.from(chunk)}function _isUint8Array(obj){return Buffer4.isBuffer(obj)||obj instanceof OurUint8Array}var util=Object.create(require_util());util.inherits=require_inherits();var debugUtil=__require("util"),debug=void 0;debugUtil&&debugUtil.debuglog?debug=debugUtil.debuglog("stream"):debug=function(){};var BufferList=require_BufferList2(),destroyImpl=require_destroy2(),StringDecoder;util.inherits(Readable,Stream3);var kProxyEvents=["error","close","destroy","pause","resume"];function prependListener(emitter,event,fn){if(typeof emitter.prependListener=="function")return emitter.prependListener(event,fn);!emitter._events||!emitter._events[event]?emitter.on(event,fn):isArray(emitter._events[event])?emitter._events[event].unshift(fn):emitter._events[event]=[fn,emitter._events[event]];}function ReadableState(options,stream2){Duplex2=Duplex2||require_stream_duplex2(),options=options||{};var isDuplex=stream2 instanceof Duplex2;this.objectMode=!!options.objectMode,isDuplex&&(this.objectMode=this.objectMode||!!options.readableObjectMode);var hwm=options.highWaterMark,readableHwm=options.readableHighWaterMark,defaultHwm=this.objectMode?16:16*1024;hwm||hwm===0?this.highWaterMark=hwm:isDuplex&&(readableHwm||readableHwm===0)?this.highWaterMark=readableHwm:this.highWaterMark=defaultHwm,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new BufferList,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=options.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=require_string_decoder2().StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding);}function Readable(options){if(Duplex2=Duplex2||require_stream_duplex2(),!(this instanceof Readable))return new Readable(options);this._readableState=new ReadableState(options,this),this.readable=!0,options&&(typeof options.read=="function"&&(this._read=options.read),typeof options.destroy=="function"&&(this._destroy=options.destroy)),Stream3.call(this);}Object.defineProperty(Readable.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(value){this._readableState&&(this._readableState.destroyed=value);}});Readable.prototype.destroy=destroyImpl.destroy;Readable.prototype._undestroy=destroyImpl.undestroy;Readable.prototype._destroy=function(err,cb){this.push(null),cb(err);};Readable.prototype.push=function(chunk,encoding){var state=this._readableState,skipChunkCheck;return state.objectMode?skipChunkCheck=!0:typeof chunk=="string"&&(encoding=encoding||state.defaultEncoding,encoding!==state.encoding&&(chunk=Buffer4.from(chunk,encoding),encoding=""),skipChunkCheck=!0),readableAddChunk(this,chunk,encoding,!1,skipChunkCheck)};Readable.prototype.unshift=function(chunk){return readableAddChunk(this,chunk,null,!0,!1)};function readableAddChunk(stream2,chunk,encoding,addToFront,skipChunkCheck){var state=stream2._readableState;if(chunk===null)state.reading=!1,onEofChunk(stream2,state);else {var er;skipChunkCheck||(er=chunkInvalid(state,chunk)),er?stream2.emit("error",er):state.objectMode||chunk&&chunk.length>0?(typeof chunk!="string"&&!state.objectMode&&Object.getPrototypeOf(chunk)!==Buffer4.prototype&&(chunk=_uint8ArrayToBuffer(chunk)),addToFront?state.endEmitted?stream2.emit("error",new Error("stream.unshift() after end event")):addChunk(stream2,state,chunk,!0):state.ended?stream2.emit("error",new Error("stream.push() after EOF")):(state.reading=!1,state.decoder&&!encoding?(chunk=state.decoder.write(chunk),state.objectMode||chunk.length!==0?addChunk(stream2,state,chunk,!1):maybeReadMore(stream2,state)):addChunk(stream2,state,chunk,!1))):addToFront||(state.reading=!1);}return needMoreData(state)}function addChunk(stream2,state,chunk,addToFront){state.flowing&&state.length===0&&!state.sync?(stream2.emit("data",chunk),stream2.read(0)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream2)),maybeReadMore(stream2,state);}function chunkInvalid(state,chunk){var er;return !_isUint8Array(chunk)&&typeof chunk!="string"&&chunk!==void 0&&!state.objectMode&&(er=new TypeError("Invalid non-string/buffer chunk")),er}function needMoreData(state){return !state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0)}Readable.prototype.isPaused=function(){return this._readableState.flowing===!1};Readable.prototype.setEncoding=function(enc){return StringDecoder||(StringDecoder=require_string_decoder2().StringDecoder),this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc,this};var MAX_HWM=8388608;function computeNewHighWaterMark(n){return n>=MAX_HWM?n=MAX_HWM:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}function howMuchToRead(n,state){return n<=0||state.length===0&&state.ended?0:state.objectMode?1:n!==n?state.flowing&&state.length?state.buffer.head.data.length:state.length:(n>state.highWaterMark&&(state.highWaterMark=computeNewHighWaterMark(n)),n<=state.length?n:state.ended?state.length:(state.needReadable=!0,0))}Readable.prototype.read=function(n){debug("read",n),n=parseInt(n,10);var state=this._readableState,nOrig=n;if(n!==0&&(state.emittedReadable=!1),n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return debug("read: emitReadable",state.length,state.ended),state.length===0&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),n===0&&state.ended)return state.length===0&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(state.length===0||state.length-n<state.highWaterMark)&&(doRead=!0,debug("length less than watermark",doRead)),state.ended||state.reading?(doRead=!1,debug("reading or ended",doRead)):doRead&&(debug("do read"),state.reading=!0,state.sync=!0,state.length===0&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1,state.reading||(n=howMuchToRead(nOrig,state)));var ret;return n>0?ret=fromList(n,state):ret=null,ret===null?(state.needReadable=!0,n=0):state.length-=n,state.length===0&&(state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&endReadable(this)),ret!==null&&this.emit("data",ret),ret};function onEofChunk(stream2,state){if(!state.ended){if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length);}state.ended=!0,emitReadable(stream2);}}function emitReadable(stream2){var state=stream2._readableState;state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync?pna.nextTick(emitReadable_,stream2):emitReadable_(stream2));}function emitReadable_(stream2){debug("emit readable"),stream2.emit("readable"),flow(stream2);}function maybeReadMore(stream2,state){state.readingMore||(state.readingMore=!0,pna.nextTick(maybeReadMore_,stream2,state));}function maybeReadMore_(stream2,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark&&(debug("maybeReadMore read 0"),stream2.read(0),len!==state.length);)len=state.length;state.readingMore=!1;}Readable.prototype._read=function(n){this.emit("error",new Error("_read() is not implemented"));};Readable.prototype.pipe=function(dest,pipeOpts){var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest);break}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:unpipe;state.endEmitted?pna.nextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);function onunpipe(readable,unpipeInfo){debug("onunpipe"),readable===src&&unpipeInfo&&unpipeInfo.hasUnpiped===!1&&(unpipeInfo.hasUnpiped=!0,cleanup());}function onend(){debug("onend"),dest.end();}var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=!1;function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",unpipe),src.removeListener("data",ondata),cleanedUp=!0,state.awaitDrain&&(!dest._writableState||dest._writableState.needDrain)&&ondrain();}var increasedAwaitDrain=!1;src.on("data",ondata);function ondata(chunk){debug("ondata"),increasedAwaitDrain=!1;var ret=dest.write(chunk);ret===!1&&!increasedAwaitDrain&&((state.pipesCount===1&&state.pipes===dest||state.pipesCount>1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp&&(debug("false write response, pause",state.awaitDrain),state.awaitDrain++,increasedAwaitDrain=!0),src.pause());}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),EElistenerCount(dest,"error")===0&&dest.emit("error",er);}prependListener(dest,"error",onerror);function onclose(){dest.removeListener("finish",onfinish),unpipe();}dest.once("close",onclose);function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe();}dest.once("finish",onfinish);function unpipe(){debug("unpipe"),src.unpipe(dest);}return dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest};function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,state.awaitDrain===0&&EElistenerCount(src,"data")&&(state.flowing=!0,flow(src));}}Readable.prototype.unpipe=function(dest){var state=this._readableState,unpipeInfo={hasUnpiped:!1};if(state.pipesCount===0)return this;if(state.pipesCount===1)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this,unpipeInfo),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;i<len;i++)dests[i].emit("unpipe",this,{hasUnpiped:!1});return this}var index=indexOf(state.pipes,dest);return index===-1?this:(state.pipes.splice(index,1),state.pipesCount-=1,state.pipesCount===1&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this,unpipeInfo),this)};Readable.prototype.on=function(ev,fn){var res=Stream3.prototype.on.call(this,ev,fn);if(ev==="data")this._readableState.flowing!==!1&&this.resume();else if(ev==="readable"){var state=this._readableState;!state.endEmitted&&!state.readableListening&&(state.readableListening=state.needReadable=!0,state.emittedReadable=!1,state.reading?state.length&&emitReadable(this):pna.nextTick(nReadingNextTick,this));}return res};Readable.prototype.addListener=Readable.prototype.on;function nReadingNextTick(self2){debug("readable nexttick read 0"),self2.read(0);}Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!0,resume(this,state)),this};function resume(stream2,state){state.resumeScheduled||(state.resumeScheduled=!0,pna.nextTick(resume_,stream2,state));}function resume_(stream2,state){state.reading||(debug("resume read 0"),stream2.read(0)),state.resumeScheduled=!1,state.awaitDrain=0,stream2.emit("resume"),flow(stream2),state.flowing&&!state.reading&&stream2.read(0);}Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function flow(stream2){var state=stream2._readableState;for(debug("flow",state.flowing);state.flowing&&stream2.read()!==null;);}Readable.prototype.wrap=function(stream2){var _this=this,state=this._readableState,paused=!1;stream2.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&_this.push(chunk);}_this.push(null);}),stream2.on("data",function(chunk){if(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),!(state.objectMode&&chunk==null)&&!(!state.objectMode&&(!chunk||!chunk.length))){var ret=_this.push(chunk);ret||(paused=!0,stream2.pause());}});for(var i in stream2)this[i]===void 0&&typeof stream2[i]=="function"&&(this[i]=function(method){return function(){return stream2[method].apply(stream2,arguments)}}(i));for(var n=0;n<kProxyEvents.length;n++)stream2.on(kProxyEvents[n],this.emit.bind(this,kProxyEvents[n]));return this._read=function(n2){debug("wrapped _read",n2),paused&&(paused=!1,stream2.resume());},this};Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Readable._fromList=fromList;function fromList(n,state){if(state.length===0)return null;var ret;return state.objectMode?ret=state.buffer.shift():!n||n>=state.length?(state.decoder?ret=state.buffer.join(""):state.buffer.length===1?ret=state.buffer.head.data:ret=state.buffer.concat(state.length),state.buffer.clear()):ret=fromListPartial(n,state.buffer,state.decoder),ret}function fromListPartial(n,list,hasStrings){var ret;return n<list.head.data.length?(ret=list.head.data.slice(0,n),list.head.data=list.head.data.slice(n)):n===list.head.data.length?ret=list.shift():ret=hasStrings?copyFromBufferString(n,list):copyFromBuffer(n,list),ret}function copyFromBufferString(n,list){var p=list.head,c=1,ret=p.data;for(n-=ret.length;p=p.next;){var str=p.data,nb=n>str.length?str.length:n;if(nb===str.length?ret+=str:ret+=str.slice(0,n),n-=nb,n===0){nb===str.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=str.slice(nb));break}++c;}return list.length-=c,ret}function copyFromBuffer(n,list){var ret=Buffer4.allocUnsafe(n),p=list.head,c=1;for(p.data.copy(ret),n-=p.data.length;p=p.next;){var buf=p.data,nb=n>buf.length?buf.length:n;if(buf.copy(ret,ret.length-n,0,nb),n-=nb,n===0){nb===buf.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=buf.slice(nb));break}++c;}return list.length-=c,ret}function endReadable(stream2){var state=stream2._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');state.endEmitted||(state.ended=!0,pna.nextTick(endReadableNT,state,stream2));}function endReadableNT(state,stream2){!state.endEmitted&&state.length===0&&(state.endEmitted=!0,stream2.readable=!1,stream2.emit("end"));}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return -1}}});var require_stream_transform2=__commonJS({"../../node_modules/peek-stream/node_modules/readable-stream/lib/_stream_transform.js"(exports,module){module.exports=Transform;var Duplex2=require_stream_duplex2(),util=Object.create(require_util());util.inherits=require_inherits();util.inherits(Transform,Duplex2);function afterTransform(er,data){var ts=this._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return this.emit("error",new Error("write callback called multiple times"));ts.writechunk=null,ts.writecb=null,data!=null&&this.push(data),cb(er);var rs=this._readableState;rs.reading=!1,(rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark);}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex2.call(this,options),this._transformState={afterTransform:afterTransform.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,options&&(typeof options.transform=="function"&&(this._transform=options.transform),typeof options.flush=="function"&&(this._flush=options.flush)),this.on("prefinish",prefinish);}function prefinish(){var _this=this;typeof this._flush=="function"?this._flush(function(er,data){done(_this,er,data);}):done(this,null,null);}Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex2.prototype.push.call(this,chunk,encoding)};Transform.prototype._transform=function(chunk,encoding,cb){throw new Error("_transform() is not implemented")};Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark);}};Transform.prototype._read=function(n){var ts=this._transformState;ts.writechunk!==null&&ts.writecb&&!ts.transforming?(ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)):ts.needTransform=!0;};Transform.prototype._destroy=function(err,cb){var _this2=this;Duplex2.prototype._destroy.call(this,err,function(err2){cb(err2),_this2.emit("close");});};function done(stream2,er,data){if(er)return stream2.emit("error",er);if(data!=null&&stream2.push(data),stream2._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(stream2._transformState.transforming)throw new Error("Calling transform done when still transforming");return stream2.push(null)}}});var require_stream_passthrough2=__commonJS({"../../node_modules/peek-stream/node_modules/readable-stream/lib/_stream_passthrough.js"(exports,module){module.exports=PassThrough3;var Transform=require_stream_transform2(),util=Object.create(require_util());util.inherits=require_inherits();util.inherits(PassThrough3,Transform);function PassThrough3(options){if(!(this instanceof PassThrough3))return new PassThrough3(options);Transform.call(this,options);}PassThrough3.prototype._transform=function(chunk,encoding,cb){cb(null,chunk);};}});var require_readable2=__commonJS({"../../node_modules/peek-stream/node_modules/readable-stream/readable.js"(exports,module){var Stream3=__require("stream");process.env.READABLE_STREAM==="disable"&&Stream3?(module.exports=Stream3,exports=module.exports=Stream3.Readable,exports.Readable=Stream3.Readable,exports.Writable=Stream3.Writable,exports.Duplex=Stream3.Duplex,exports.Transform=Stream3.Transform,exports.PassThrough=Stream3.PassThrough,exports.Stream=Stream3):(exports=module.exports=require_stream_readable2(),exports.Stream=Stream3||exports,exports.Readable=exports,exports.Writable=require_stream_writable2(),exports.Duplex=require_stream_duplex2(),exports.Transform=require_stream_transform2(),exports.PassThrough=require_stream_passthrough2());}});var require_stream_shift=__commonJS({"../../node_modules/stream-shift/index.js"(exports,module){module.exports=shift;function shift(stream2){var rs=stream2._readableState;return rs?rs.objectMode||typeof stream2._duplexState=="number"?stream2.read():stream2.read(getStateLength(rs)):null}function getStateLength(state){return state.buffer.length?state.buffer.head?state.buffer.head.data.length:state.buffer[0].length:state.length}}});var require_duplexify=__commonJS({"../../node_modules/peek-stream/node_modules/duplexify/index.js"(exports,module){var stream2=require_readable2(),eos=require_end_of_stream(),inherits=require_inherits(),shift=require_stream_shift(),SIGNAL_FLUSH=Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from([0]):new Buffer([0]),onuncork=function(self2,fn){self2._corked?self2.once("uncork",fn):fn();},autoDestroy=function(self2,err){self2._autoDestroy&&self2.destroy(err);},destroyer=function(self2,end2){return function(err){err?autoDestroy(self2,err.message==="premature close"?null:err):end2&&!self2._ended&&self2.end();}},end=function(ws,fn){if(!ws||ws._writableState&&ws._writableState.finished)return fn();if(ws._writableState)return ws.end(fn);ws.end(),fn();},toStreams2=function(rs){return new stream2.Readable({objectMode:!0,highWaterMark:16}).wrap(rs)},Duplexify=function(writable,readable,opts){if(!(this instanceof Duplexify))return new Duplexify(writable,readable,opts);stream2.Duplex.call(this,opts),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!opts||opts.autoDestroy!==!1,this._forwardDestroy=!opts||opts.destroy!==!1,this._forwardEnd=!opts||opts.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,writable&&this.setWritable(writable),readable&&this.setReadable(readable);};inherits(Duplexify,stream2.Duplex);Duplexify.obj=function(writable,readable,opts){return opts||(opts={}),opts.objectMode=!0,opts.highWaterMark=16,new Duplexify(writable,readable,opts)};Duplexify.prototype.cork=function(){++this._corked===1&&this.emit("cork");};Duplexify.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork");};Duplexify.prototype.setWritable=function(writable){if(this._unwrite&&this._unwrite(),this.destroyed){writable&&writable.destroy&&writable.destroy();return}if(writable===null||writable===!1){this.end();return}var self2=this,unend=eos(writable,{writable:!0,readable:!1},destroyer(this,this._forwardEnd)),ondrain=function(){var ondrain2=self2._ondrain;self2._ondrain=null,ondrain2&&ondrain2();},clear=function(){self2._writable.removeListener("drain",ondrain),unend();};this._unwrite&&process.nextTick(ondrain),this._writable=writable,this._writable.on("drain",ondrain),this._unwrite=clear,this.uncork();};Duplexify.prototype.setReadable=function(readable){if(this._unread&&this._unread(),this.destroyed){readable&&readable.destroy&&readable.destroy();return}if(readable===null||readable===!1){this.push(null),this.resume();return}var self2=this,unend=eos(readable,{writable:!1,readable:!0},destroyer(this)),onreadable=function(){self2._forward();},onend=function(){self2.push(null);},clear=function(){self2._readable2.removeListener("readable",onreadable),self2._readable2.removeListener("end",onend),unend();};this._drained=!0,this._readable=readable,this._readable2=readable._readableState?readable:toStreams2(readable),this._readable2.on("readable",onreadable),this._readable2.on("end",onend),this._unread=clear,this._forward();};Duplexify.prototype._read=function(){this._drained=!0,this._forward();};Duplexify.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var data;this._drained&&(data=shift(this._readable2))!==null;)this.destroyed||(this._drained=this.push(data));this._forwarding=!1;}};Duplexify.prototype.destroy=function(err){if(!this.destroyed){this.destroyed=!0;var self2=this;process.nextTick(function(){self2._destroy(err);});}};Duplexify.prototype._destroy=function(err){if(err){var ondrain=this._ondrain;this._ondrain=null,ondrain?ondrain(err):this.emit("error",err);}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close");};Duplexify.prototype._write=function(data,enc,cb){if(this.destroyed)return cb();if(this._corked)return onuncork(this,this._write.bind(this,data,enc,cb));if(data===SIGNAL_FLUSH)return this._finish(cb);if(!this._writable)return cb();this._writable.write(data)===!1?this._ondrain=cb:cb();};Duplexify.prototype._finish=function(cb){var self2=this;this.emit("preend"),onuncork(this,function(){end(self2._forwardEnd&&self2._writable,function(){self2._writableState.prefinished===!1&&(self2._writableState.prefinished=!0),self2.emit("prefinish"),onuncork(self2,cb);});});};Duplexify.prototype.end=function(data,enc,cb){return typeof data=="function"?this.end(null,null,data):typeof enc=="function"?this.end(data,null,enc):(this._ended=!0,data&&this.write(data),this._writableState.ending||this.write(SIGNAL_FLUSH),stream2.Writable.prototype.end.call(this,cb))};module.exports=Duplexify;}});var require_isarray2=__commonJS({"../../node_modules/through2/node_modules/isarray/index.js"(exports,module){var toString2={}.toString;module.exports=Array.isArray||function(arr){return toString2.call(arr)=="[object Array]"};}});var require_stream4=__commonJS({"../../node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream.js"(exports,module){module.exports=__require("stream");}});var require_safe_buffer3=__commonJS({"../../node_modules/through2/node_modules/safe-buffer/index.js"(exports,module){var buffer=__require("buffer"),Buffer4=buffer.Buffer;function copyProps(src,dst){for(var key in src)dst[key]=src[key];}Buffer4.from&&Buffer4.alloc&&Buffer4.allocUnsafe&&Buffer4.allocUnsafeSlow?module.exports=buffer:(copyProps(buffer,exports),exports.Buffer=SafeBuffer);function SafeBuffer(arg,encodingOrOffset,length){return Buffer4(arg,encodingOrOffset,length)}copyProps(Buffer4,SafeBuffer);SafeBuffer.from=function(arg,encodingOrOffset,length){if(typeof arg=="number")throw new TypeError("Argument must not be a number");return Buffer4(arg,encodingOrOffset,length)};SafeBuffer.alloc=function(size,fill,encoding){if(typeof size!="number")throw new TypeError("Argument must be a number");var buf=Buffer4(size);return fill!==void 0?typeof encoding=="string"?buf.fill(fill,encoding):buf.fill(fill):buf.fill(0),buf};SafeBuffer.allocUnsafe=function(size){if(typeof size!="number")throw new TypeError("Argument must be a number");return Buffer4(size)};SafeBuffer.allocUnsafeSlow=function(size){if(typeof size!="number")throw new TypeError("Argument must be a number");return buffer.SlowBuffer(size)};}});var require_BufferList3=__commonJS({"../../node_modules/through2/node_modules/readable-stream/lib/internal/streams/BufferList.js"(exports,module){function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}var Buffer4=require_safe_buffer3().Buffer,util=__require("util");function copyBuffer(src,target,offset){src.copy(target,offset);}module.exports=function(){function BufferList(){_classCallCheck(this,BufferList),this.head=null,this.tail=null,this.length=0;}return BufferList.prototype.push=function(v){var entry={data:v,next:null};this.length>0?this.tail.next=entry:this.head=entry,this.tail=entry,++this.length;},BufferList.prototype.unshift=function(v){var entry={data:v,next:this.head};this.length===0&&(this.tail=entry),this.head=entry,++this.length;},BufferList.prototype.shift=function(){if(this.length!==0){var ret=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,ret}},BufferList.prototype.clear=function(){this.head=this.tail=null,this.length=0;},BufferList.prototype.join=function(s){if(this.length===0)return "";for(var p=this.head,ret=""+p.data;p=p.next;)ret+=s+p.data;return ret},BufferList.prototype.concat=function(n){if(this.length===0)return Buffer4.alloc(0);for(var ret=Buffer4.allocUnsafe(n>>>0),p=this.head,i=0;p;)copyBuffer(p.data,ret,i),i+=p.data.length,p=p.next;return ret},BufferList}();util&&util.inspect&&util.inspect.custom&&(module.exports.prototype[util.inspect.custom]=function(){var obj=util.inspect({length:this.length});return this.constructor.name+" "+obj});}});var require_destroy3=__commonJS({"../../node_modules/through2/node_modules/readable-stream/lib/internal/streams/destroy.js"(exports,module){var pna=require_process_nextick_args();function destroy(err,cb){var _this=this,readableDestroyed=this._readableState&&this._readableState.destroyed,writableDestroyed=this._writableState&&this._writableState.destroyed;return readableDestroyed||writableDestroyed?(cb?cb(err):err&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,pna.nextTick(emitErrorNT,this,err)):pna.nextTick(emitErrorNT,this,err)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(err||null,function(err2){!cb&&err2?_this._writableState?_this._writableState.errorEmitted||(_this._writableState.errorEmitted=!0,pna.nextTick(emitErrorNT,_this,err2)):pna.nextTick(emitErrorNT,_this,err2):cb&&cb(err2);}),this)}function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1);}function emitErrorNT(self2,err){self2.emit("error",err);}module.exports={destroy,undestroy};}});var require_stream_writable3=__commonJS({"../../node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js"(exports,module){var pna=require_process_nextick_args();module.exports=Writable;function CorkedRequest(state){var _this=this;this.next=null,this.entry=null,this.finish=function(){onCorkedFinish(_this,state);};}var asyncWrite=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:pna.nextTick,Duplex2;Writable.WritableState=WritableState;var util=Object.create(require_util());util.inherits=require_inherits();var internalUtil={deprecate:__require("util-deprecate")},Stream3=require_stream4(),Buffer4=require_safe_buffer3().Buffer,OurUint8Array=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer4.from(chunk)}function _isUint8Array(obj){return Buffer4.isBuffer(obj)||obj instanceof OurUint8Array}var destroyImpl=require_destroy3();util.inherits(Writable,Stream3);function nop(){}function WritableState(options,stream2){Duplex2=Duplex2||require_stream_duplex3(),options=options||{};var isDuplex=stream2 instanceof Duplex2;this.objectMode=!!options.objectMode,isDuplex&&(this.objectMode=this.objectMode||!!options.writableObjectMode);var hwm=options.highWaterMark,writableHwm=options.writableHighWaterMark,defaultHwm=this.objectMode?16:16*1024;hwm||hwm===0?this.highWaterMark=hwm:isDuplex&&(writableHwm||writableHwm===0)?this.highWaterMark=writableHwm:this.highWaterMark=defaultHwm,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var noDecode=options.decodeStrings===!1;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream2,er);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this);}WritableState.prototype.getBuffer=function(){for(var current=this.bufferedRequest,out=[];current;)out.push(current),current=current.next;return out};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch{}})();var realHasInstance;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(object){return realHasInstance.call(this,object)?!0:this!==Writable?!1:object&&object._writableState instanceof WritableState}})):realHasInstance=function(object){return object instanceof this};function Writable(options){if(Duplex2=Duplex2||require_stream_duplex3(),!realHasInstance.call(Writable,this)&&!(this instanceof Duplex2))return new Writable(options);this._writableState=new WritableState(options,this),this.writable=!0,options&&(typeof options.write=="function"&&(this._write=options.write),typeof options.writev=="function"&&(this._writev=options.writev),typeof options.destroy=="function"&&(this._destroy=options.destroy),typeof options.final=="function"&&(this._final=options.final)),Stream3.call(this);}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"));};function writeAfterEnd(stream2,cb){var er=new Error("write after end");stream2.emit("error",er),pna.nextTick(cb,er);}function validChunk(stream2,state,chunk,cb){var valid=!0,er=!1;return chunk===null?er=new TypeError("May not write null values to stream"):typeof chunk!="string"&&chunk!==void 0&&!state.objectMode&&(er=new TypeError("Invalid non-string/buffer chunk")),er&&(stream2.emit("error",er),pna.nextTick(cb,er),valid=!1),valid}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1,isBuf=!state.objectMode&&_isUint8Array(chunk);return isBuf&&!Buffer4.isBuffer(chunk)&&(chunk=_uint8ArrayToBuffer(chunk)),typeof encoding=="function"&&(cb=encoding,encoding=null),isBuf?encoding="buffer":encoding||(encoding=state.defaultEncoding),typeof cb!="function"&&(cb=nop),state.ended?writeAfterEnd(this,cb):(isBuf||validChunk(this,state,chunk,cb))&&(state.pendingcb++,ret=writeOrBuffer(this,state,isBuf,chunk,encoding,cb)),ret};Writable.prototype.cork=function(){var state=this._writableState;state.corked++;};Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,!state.writing&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest&&clearBuffer(this,state));};Writable.prototype.setDefaultEncoding=function(encoding){if(typeof encoding=="string"&&(encoding=encoding.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);return this._writableState.defaultEncoding=encoding,this};function decodeChunk(state,chunk,encoding){return !state.objectMode&&state.decodeStrings!==!1&&typeof chunk=="string"&&(chunk=Buffer4.from(chunk,encoding)),chunk}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function writeOrBuffer(stream2,state,isBuf,chunk,encoding,cb){if(!isBuf){var newChunk=decodeChunk(state,chunk,encoding);chunk!==newChunk&&(isBuf=!0,encoding="buffer",chunk=newChunk);}var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(ret||(state.needDrain=!0),state.writing||state.corked){var last=state.lastBufferedRequest;state.lastBufferedRequest={chunk,encoding,isBuf,callback:cb,next:null},last?last.next=state.lastBufferedRequest:state.bufferedRequest=state.lastBufferedRequest,state.bufferedRequestCount+=1;}else doWrite(stream2,state,!1,len,chunk,encoding,cb);return ret}function doWrite(stream2,state,writev,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,writev?stream2._writev(chunk,state.onwrite):stream2._write(chunk,encoding,state.onwrite),state.sync=!1;}function onwriteError(stream2,state,sync,er,cb){--state.pendingcb,sync?(pna.nextTick(cb,er),pna.nextTick(finishMaybe,stream2,state),stream2._writableState.errorEmitted=!0,stream2.emit("error",er)):(cb(er),stream2._writableState.errorEmitted=!0,stream2.emit("error",er),finishMaybe(stream2,state));}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0;}function onwrite(stream2,er){var state=stream2._writableState,sync=state.sync,cb=state.writecb;if(onwriteStateUpdate(state),er)onwriteError(stream2,state,sync,er,cb);else {var finished=needFinish(state);!finished&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest&&clearBuffer(stream2,state),sync?asyncWrite(afterWrite,stream2,state,finished,cb):afterWrite(stream2,state,finished,cb);}}function afterWrite(stream2,state,finished,cb){finished||onwriteDrain(stream2,state),state.pendingcb--,cb(),finishMaybe(stream2,state);}function onwriteDrain(stream2,state){state.length===0&&state.needDrain&&(state.needDrain=!1,stream2.emit("drain"));}function clearBuffer(stream2,state){state.bufferProcessing=!0;var entry=state.bufferedRequest;if(stream2._writev&&entry&&entry.next){var l=state.bufferedRequestCount,buffer=new Array(l),holder=state.corkedRequestsFree;holder.entry=entry;for(var count=0,allBuffers=!0;entry;)buffer[count]=entry,entry.isBuf||(allBuffers=!1),entry=entry.next,count+=1;buffer.allBuffers=allBuffers,doWrite(stream2,state,!0,state.length,buffer,"",holder.finish),state.pendingcb++,state.lastBufferedRequest=null,holder.next?(state.corkedRequestsFree=holder.next,holder.next=null):state.corkedRequestsFree=new CorkedRequest(state),state.bufferedRequestCount=0;}else {for(;entry;){var chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback,len=state.objectMode?1:chunk.length;if(doWrite(stream2,state,!1,len,chunk,encoding,cb),entry=entry.next,state.bufferedRequestCount--,state.writing)break}entry===null&&(state.lastBufferedRequest=null);}state.bufferedRequest=entry,state.bufferProcessing=!1;}Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("_write() is not implemented"));};Writable.prototype._writev=null;Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;typeof chunk=="function"?(cb=chunk,chunk=null,encoding=null):typeof encoding=="function"&&(cb=encoding,encoding=null),chunk!=null&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||endWritable(this,state,cb);};function needFinish(state){return state.ending&&state.length===0&&state.bufferedRequest===null&&!state.finished&&!state.writing}function callFinal(stream2,state){stream2._final(function(err){state.pendingcb--,err&&stream2.emit("error",err),state.prefinished=!0,stream2.emit("prefinish"),finishMaybe(stream2,state);});}function prefinish(stream2,state){!state.prefinished&&!state.finalCalled&&(typeof stream2._final=="function"?(state.pendingcb++,state.finalCalled=!0,pna.nextTick(callFinal,stream2,state)):(state.prefinished=!0,stream2.emit("prefinish")));}function finishMaybe(stream2,state){var need=needFinish(state);return need&&(prefinish(stream2,state),state.pendingcb===0&&(state.finished=!0,stream2.emit("finish"))),need}function endWritable(stream2,state,cb){state.ending=!0,finishMaybe(stream2,state),cb&&(state.finished?pna.nextTick(cb):stream2.once("finish",cb)),state.ended=!0,stream2.writable=!1;}function onCorkedFinish(corkReq,state,err){var entry=corkReq.entry;for(corkReq.entry=null;entry;){var cb=entry.callback;state.pendingcb--,cb(err),entry=entry.next;}state.corkedRequestsFree.next=corkReq;}Object.defineProperty(Writable.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(value){this._writableState&&(this._writableState.destroyed=value);}});Writable.prototype.destroy=destroyImpl.destroy;Writable.prototype._undestroy=destroyImpl.undestroy;Writable.prototype._destroy=function(err,cb){this.end(),cb(err);};}});var require_stream_duplex3=__commonJS({"../../node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js"(exports,module){var pna=require_process_nextick_args(),objectKeys=Object.keys||function(obj){var keys2=[];for(var key in obj)keys2.push(key);return keys2};module.exports=Duplex2;var util=Object.create(require_util());util.inherits=require_inherits();var Readable=require_stream_readable3(),Writable=require_stream_writable3();util.inherits(Duplex2,Readable);for(keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++)method=keys[v],Duplex2.prototype[method]||(Duplex2.prototype[method]=Writable.prototype[method]);var keys,method,v;function Duplex2(options){if(!(this instanceof Duplex2))return new Duplex2(options);Readable.call(this,options),Writable.call(this,options),options&&options.readable===!1&&(this.readable=!1),options&&options.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,options&&options.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",onend);}Object.defineProperty(Duplex2.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function onend(){this.allowHalfOpen||this._writableState.ended||pna.nextTick(onEndNT,this);}function onEndNT(self2){self2.end();}Object.defineProperty(Duplex2.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(value){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=value,this._writableState.destroyed=value);}});Duplex2.prototype._destroy=function(err,cb){this.push(null),this.end(),pna.nextTick(cb,err);};}});var require_string_decoder3=__commonJS({"../../node_modules/through2/node_modules/string_decoder/lib/string_decoder.js"(exports){var Buffer4=require_safe_buffer3().Buffer,isEncoding=Buffer4.isEncoding||function(encoding){switch(encoding=""+encoding,encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return !0;default:return !1}};function _normalizeEncoding(enc){if(!enc)return "utf8";for(var retried;;)switch(enc){case"utf8":case"utf-8":return "utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return "utf16le";case"latin1":case"binary":return "latin1";case"base64":case"ascii":case"hex":return enc;default:if(retried)return;enc=(""+enc).toLowerCase(),retried=!0;}}function normalizeEncoding(enc){var nenc=_normalizeEncoding(enc);if(typeof nenc!="string"&&(Buffer4.isEncoding===isEncoding||!isEncoding(enc)))throw new Error("Unknown encoding: "+enc);return nenc||enc}exports.StringDecoder=StringDecoder;function StringDecoder(encoding){this.encoding=normalizeEncoding(encoding);var nb;switch(this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,nb=4;break;case"utf8":this.fillLast=utf8FillLast,nb=4;break;case"base64":this.text=base64Text,this.end=base64End,nb=3;break;default:this.write=simpleWrite,this.end=simpleEnd;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Buffer4.allocUnsafe(nb);}StringDecoder.prototype.write=function(buf){if(buf.length===0)return "";var r,i;if(this.lastNeed){if(r=this.fillLast(buf),r===void 0)return "";i=this.lastNeed,this.lastNeed=0;}else i=0;return i<buf.length?r?r+this.text(buf,i):this.text(buf,i):r||""};StringDecoder.prototype.end=utf8End;StringDecoder.prototype.text=utf8Text;StringDecoder.prototype.fillLast=function(buf){if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,buf.length),this.lastNeed-=buf.length;};function utf8CheckByte(byte){return byte<=127?0:byte>>5===6?2:byte>>4===14?3:byte>>3===30?4:byte>>6===2?-1:-2}function utf8CheckIncomplete(self2,buf,i){var j=buf.length-1;if(j<i)return 0;var nb=utf8CheckByte(buf[j]);return nb>=0?(nb>0&&(self2.lastNeed=nb-1),nb):--j<i||nb===-2?0:(nb=utf8CheckByte(buf[j]),nb>=0?(nb>0&&(self2.lastNeed=nb-2),nb):--j<i||nb===-2?0:(nb=utf8CheckByte(buf[j]),nb>=0?(nb>0&&(nb===2?nb=0:self2.lastNeed=nb-3),nb):0))}function utf8CheckExtraBytes(self2,buf,p){if((buf[0]&192)!==128)return self2.lastNeed=0,"\uFFFD";if(self2.lastNeed>1&&buf.length>1){if((buf[1]&192)!==128)return self2.lastNeed=1,"\uFFFD";if(self2.lastNeed>2&&buf.length>2&&(buf[2]&192)!==128)return self2.lastNeed=2,"\uFFFD"}}function utf8FillLast(buf){var p=this.lastTotal-this.lastNeed,r=utf8CheckExtraBytes(this,buf);if(r!==void 0)return r;if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,p,0,buf.length),this.lastNeed-=buf.length;}function utf8Text(buf,i){var total=utf8CheckIncomplete(this,buf,i);if(!this.lastNeed)return buf.toString("utf8",i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);return buf.copy(this.lastChar,0,end),buf.toString("utf8",i,end)}function utf8End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+"\uFFFD":r}function utf16Text(buf,i){if((buf.length-i)%2===0){var r=buf.toString("utf16le",i);if(r){var c=r.charCodeAt(r.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=buf[buf.length-1],buf.toString("utf16le",i,buf.length-1)}function utf16End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,end)}return r}function base64Text(buf,i){var n=(buf.length-i)%3;return n===0?buf.toString("base64",i):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=buf[buf.length-1]:(this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1]),buf.toString("base64",i,buf.length-n))}function base64End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function simpleWrite(buf){return buf.toString(this.encoding)}function simpleEnd(buf){return buf&&buf.length?this.write(buf):""}}});var require_stream_readable3=__commonJS({"../../node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js"(exports,module){var pna=require_process_nextick_args();module.exports=Readable;var isArray=require_isarray2(),Duplex2;Readable.ReadableState=ReadableState;__require("events").EventEmitter;var EElistenerCount=function(emitter,type){return emitter.listeners(type).length},Stream3=require_stream4(),Buffer4=require_safe_buffer3().Buffer,OurUint8Array=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer4.from(chunk)}function _isUint8Array(obj){return Buffer4.isBuffer(obj)||obj instanceof OurUint8Array}var util=Object.create(require_util());util.inherits=require_inherits();var debugUtil=__require("util"),debug=void 0;debugUtil&&debugUtil.debuglog?debug=debugUtil.debuglog("stream"):debug=function(){};var BufferList=require_BufferList3(),destroyImpl=require_destroy3(),StringDecoder;util.inherits(Readable,Stream3);var kProxyEvents=["error","close","destroy","pause","resume"];function prependListener(emitter,event,fn){if(typeof emitter.prependListener=="function")return emitter.prependListener(event,fn);!emitter._events||!emitter._events[event]?emitter.on(event,fn):isArray(emitter._events[event])?emitter._events[event].unshift(fn):emitter._events[event]=[fn,emitter._events[event]];}function ReadableState(options,stream2){Duplex2=Duplex2||require_stream_duplex3(),options=options||{};var isDuplex=stream2 instanceof Duplex2;this.objectMode=!!options.objectMode,isDuplex&&(this.objectMode=this.objectMode||!!options.readableObjectMode);var hwm=options.highWaterMark,readableHwm=options.readableHighWaterMark,defaultHwm=this.objectMode?16:16*1024;hwm||hwm===0?this.highWaterMark=hwm:isDuplex&&(readableHwm||readableHwm===0)?this.highWaterMark=readableHwm:this.highWaterMark=defaultHwm,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new BufferList,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=options.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=require_string_decoder3().StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding);}function Readable(options){if(Duplex2=Duplex2||require_stream_duplex3(),!(this instanceof Readable))return new Readable(options);this._readableState=new ReadableState(options,this),this.readable=!0,options&&(typeof options.read=="function"&&(this._read=options.read),typeof options.destroy=="function"&&(this._destroy=options.destroy)),Stream3.call(this);}Object.defineProperty(Readable.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(value){this._readableState&&(this._readableState.destroyed=value);}});Readable.prototype.destroy=destroyImpl.destroy;Readable.prototype._undestroy=destroyImpl.undestroy;Readable.prototype._destroy=function(err,cb){this.push(null),cb(err);};Readable.prototype.push=function(chunk,encoding){var state=this._readableState,skipChunkCheck;return state.objectMode?skipChunkCheck=!0:typeof chunk=="string"&&(encoding=encoding||state.defaultEncoding,encoding!==state.encoding&&(chunk=Buffer4.from(chunk,encoding),encoding=""),skipChunkCheck=!0),readableAddChunk(this,chunk,encoding,!1,skipChunkCheck)};Readable.prototype.unshift=function(chunk){return readableAddChunk(this,chunk,null,!0,!1)};function readableAddChunk(stream2,chunk,encoding,addToFront,skipChunkCheck){var state=stream2._readableState;if(chunk===null)state.reading=!1,onEofChunk(stream2,state);else {var er;skipChunkCheck||(er=chunkInvalid(state,chunk)),er?stream2.emit("error",er):state.objectMode||chunk&&chunk.length>0?(typeof chunk!="string"&&!state.objectMode&&Object.getPrototypeOf(chunk)!==Buffer4.prototype&&(chunk=_uint8ArrayToBuffer(chunk)),addToFront?state.endEmitted?stream2.emit("error",new Error("stream.unshift() after end event")):addChunk(stream2,state,chunk,!0):state.ended?stream2.emit("error",new Error("stream.push() after EOF")):(state.reading=!1,state.decoder&&!encoding?(chunk=state.decoder.write(chunk),state.objectMode||chunk.length!==0?addChunk(stream2,state,chunk,!1):maybeReadMore(stream2,state)):addChunk(stream2,state,chunk,!1))):addToFront||(state.reading=!1);}return needMoreData(state)}function addChunk(stream2,state,chunk,addToFront){state.flowing&&state.length===0&&!state.sync?(stream2.emit("data",chunk),stream2.read(0)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream2)),maybeReadMore(stream2,state);}function chunkInvalid(state,chunk){var er;return !_isUint8Array(chunk)&&typeof chunk!="string"&&chunk!==void 0&&!state.objectMode&&(er=new TypeError("Invalid non-string/buffer chunk")),er}function needMoreData(state){return !state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0)}Readable.prototype.isPaused=function(){return this._readableState.flowing===!1};Readable.prototype.setEncoding=function(enc){return StringDecoder||(StringDecoder=require_string_decoder3().StringDecoder),this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc,this};var MAX_HWM=8388608;function computeNewHighWaterMark(n){return n>=MAX_HWM?n=MAX_HWM:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}function howMuchToRead(n,state){return n<=0||state.length===0&&state.ended?0:state.objectMode?1:n!==n?state.flowing&&state.length?state.buffer.head.data.length:state.length:(n>state.highWaterMark&&(state.highWaterMark=computeNewHighWaterMark(n)),n<=state.length?n:state.ended?state.length:(state.needReadable=!0,0))}Readable.prototype.read=function(n){debug("read",n),n=parseInt(n,10);var state=this._readableState,nOrig=n;if(n!==0&&(state.emittedReadable=!1),n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return debug("read: emitReadable",state.length,state.ended),state.length===0&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),n===0&&state.ended)return state.length===0&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(state.length===0||state.length-n<state.highWaterMark)&&(doRead=!0,debug("length less than watermark",doRead)),state.ended||state.reading?(doRead=!1,debug("reading or ended",doRead)):doRead&&(debug("do read"),state.reading=!0,state.sync=!0,state.length===0&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1,state.reading||(n=howMuchToRead(nOrig,state)));var ret;return n>0?ret=fromList(n,state):ret=null,ret===null?(state.needReadable=!0,n=0):state.length-=n,state.length===0&&(state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&endReadable(this)),ret!==null&&this.emit("data",ret),ret};function onEofChunk(stream2,state){if(!state.ended){if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length);}state.ended=!0,emitReadable(stream2);}}function emitReadable(stream2){var state=stream2._readableState;state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync?pna.nextTick(emitReadable_,stream2):emitReadable_(stream2));}function emitReadable_(stream2){debug("emit readable"),stream2.emit("readable"),flow(stream2);}function maybeReadMore(stream2,state){state.readingMore||(state.readingMore=!0,pna.nextTick(maybeReadMore_,stream2,state));}function maybeReadMore_(stream2,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark&&(debug("maybeReadMore read 0"),stream2.read(0),len!==state.length);)len=state.length;state.readingMore=!1;}Readable.prototype._read=function(n){this.emit("error",new Error("_read() is not implemented"));};Readable.prototype.pipe=function(dest,pipeOpts){var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest);break}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:unpipe;state.endEmitted?pna.nextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);function onunpipe(readable,unpipeInfo){debug("onunpipe"),readable===src&&unpipeInfo&&unpipeInfo.hasUnpiped===!1&&(unpipeInfo.hasUnpiped=!0,cleanup());}function onend(){debug("onend"),dest.end();}var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=!1;function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",unpipe),src.removeListener("data",ondata),cleanedUp=!0,state.awaitDrain&&(!dest._writableState||dest._writableState.needDrain)&&ondrain();}var increasedAwaitDrain=!1;src.on("data",ondata);function ondata(chunk){debug("ondata"),increasedAwaitDrain=!1;var ret=dest.write(chunk);ret===!1&&!increasedAwaitDrain&&((state.pipesCount===1&&state.pipes===dest||state.pipesCount>1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp&&(debug("false write response, pause",state.awaitDrain),state.awaitDrain++,increasedAwaitDrain=!0),src.pause());}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),EElistenerCount(dest,"error")===0&&dest.emit("error",er);}prependListener(dest,"error",onerror);function onclose(){dest.removeListener("finish",onfinish),unpipe();}dest.once("close",onclose);function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe();}dest.once("finish",onfinish);function unpipe(){debug("unpipe"),src.unpipe(dest);}return dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest};function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,state.awaitDrain===0&&EElistenerCount(src,"data")&&(state.flowing=!0,flow(src));}}Readable.prototype.unpipe=function(dest){var state=this._readableState,unpipeInfo={hasUnpiped:!1};if(state.pipesCount===0)return this;if(state.pipesCount===1)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this,unpipeInfo),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;i<len;i++)dests[i].emit("unpipe",this,{hasUnpiped:!1});return this}var index=indexOf(state.pipes,dest);return index===-1?this:(state.pipes.splice(index,1),state.pipesCount-=1,state.pipesCount===1&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this,unpipeInfo),this)};Readable.prototype.on=function(ev,fn){var res=Stream3.prototype.on.call(this,ev,fn);if(ev==="data")this._readableState.flowing!==!1&&this.resume();else if(ev==="readable"){var state=this._readableState;!state.endEmitted&&!state.readableListening&&(state.readableListening=state.needReadable=!0,state.emittedReadable=!1,state.reading?state.length&&emitReadable(this):pna.nextTick(nReadingNextTick,this));}return res};Readable.prototype.addListener=Readable.prototype.on;function nReadingNextTick(self2){debug("readable nexttick read 0"),self2.read(0);}Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!0,resume(this,state)),this};function resume(stream2,state){state.resumeScheduled||(state.resumeScheduled=!0,pna.nextTick(resume_,stream2,state));}function resume_(stream2,state){state.reading||(debug("resume read 0"),stream2.read(0)),state.resumeScheduled=!1,state.awaitDrain=0,stream2.emit("resume"),flow(stream2),state.flowing&&!state.reading&&stream2.read(0);}Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function flow(stream2){var state=stream2._readableState;for(debug("flow",state.flowing);state.flowing&&stream2.read()!==null;);}Readable.prototype.wrap=function(stream2){var _this=this,state=this._readableState,paused=!1;stream2.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&_this.push(chunk);}_this.push(null);}),stream2.on("data",function(chunk){if(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),!(state.objectMode&&chunk==null)&&!(!state.objectMode&&(!chunk||!chunk.length))){var ret=_this.push(chunk);ret||(paused=!0,stream2.pause());}});for(var i in stream2)this[i]===void 0&&typeof stream2[i]=="function"&&(this[i]=function(method){return function(){return stream2[method].apply(stream2,arguments)}}(i));for(var n=0;n<kProxyEvents.length;n++)stream2.on(kProxyEvents[n],this.emit.bind(this,kProxyEvents[n]));return this._read=function(n2){debug("wrapped _read",n2),paused&&(paused=!1,stream2.resume());},this};Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Readable._fromList=fromList;function fromList(n,state){if(state.length===0)return null;var ret;return state.objectMode?ret=state.buffer.shift():!n||n>=state.length?(state.decoder?ret=state.buffer.join(""):state.buffer.length===1?ret=state.buffer.head.data:ret=state.buffer.concat(state.length),state.buffer.clear()):ret=fromListPartial(n,state.buffer,state.decoder),ret}function fromListPartial(n,list,hasStrings){var ret;return n<list.head.data.length?(ret=list.head.data.slice(0,n),list.head.data=list.head.data.slice(n)):n===list.head.data.length?ret=list.shift():ret=hasStrings?copyFromBufferString(n,list):copyFromBuffer(n,list),ret}function copyFromBufferString(n,list){var p=list.head,c=1,ret=p.data;for(n-=ret.length;p=p.next;){var str=p.data,nb=n>str.length?str.length:n;if(nb===str.length?ret+=str:ret+=str.slice(0,n),n-=nb,n===0){nb===str.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=str.slice(nb));break}++c;}return list.length-=c,ret}function copyFromBuffer(n,list){var ret=Buffer4.allocUnsafe(n),p=list.head,c=1;for(p.data.copy(ret),n-=p.data.length;p=p.next;){var buf=p.data,nb=n>buf.length?buf.length:n;if(buf.copy(ret,ret.length-n,0,nb),n-=nb,n===0){nb===buf.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=buf.slice(nb));break}++c;}return list.length-=c,ret}function endReadable(stream2){var state=stream2._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');state.endEmitted||(state.ended=!0,pna.nextTick(endReadableNT,state,stream2));}function endReadableNT(state,stream2){!state.endEmitted&&state.length===0&&(state.endEmitted=!0,stream2.readable=!1,stream2.emit("end"));}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return -1}}});var require_stream_transform3=__commonJS({"../../node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js"(exports,module){module.exports=Transform;var Duplex2=require_stream_duplex3(),util=Object.create(require_util());util.inherits=require_inherits();util.inherits(Transform,Duplex2);function afterTransform(er,data){var ts=this._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return this.emit("error",new Error("write callback called multiple times"));ts.writechunk=null,ts.writecb=null,data!=null&&this.push(data),cb(er);var rs=this._readableState;rs.reading=!1,(rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark);}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex2.call(this,options),this._transformState={afterTransform:afterTransform.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,options&&(typeof options.transform=="function"&&(this._transform=options.transform),typeof options.flush=="function"&&(this._flush=options.flush)),this.on("prefinish",prefinish);}function prefinish(){var _this=this;typeof this._flush=="function"?this._flush(function(er,data){done(_this,er,data);}):done(this,null,null);}Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex2.prototype.push.call(this,chunk,encoding)};Transform.prototype._transform=function(chunk,encoding,cb){throw new Error("_transform() is not implemented")};Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark);}};Transform.prototype._read=function(n){var ts=this._transformState;ts.writechunk!==null&&ts.writecb&&!ts.transforming?(ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)):ts.needTransform=!0;};Transform.prototype._destroy=function(err,cb){var _this2=this;Duplex2.prototype._destroy.call(this,err,function(err2){cb(err2),_this2.emit("close");});};function done(stream2,er,data){if(er)return stream2.emit("error",er);if(data!=null&&stream2.push(data),stream2._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(stream2._transformState.transforming)throw new Error("Calling transform done when still transforming");return stream2.push(null)}}});var require_stream_passthrough3=__commonJS({"../../node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js"(exports,module){module.exports=PassThrough3;var Transform=require_stream_transform3(),util=Object.create(require_util());util.inherits=require_inherits();util.inherits(PassThrough3,Transform);function PassThrough3(options){if(!(this instanceof PassThrough3))return new PassThrough3(options);Transform.call(this,options);}PassThrough3.prototype._transform=function(chunk,encoding,cb){cb(null,chunk);};}});var require_readable3=__commonJS({"../../node_modules/through2/node_modules/readable-stream/readable.js"(exports,module){var Stream3=__require("stream");process.env.READABLE_STREAM==="disable"&&Stream3?(module.exports=Stream3,exports=module.exports=Stream3.Readable,exports.Readable=Stream3.Readable,exports.Writable=Stream3.Writable,exports.Duplex=Stream3.Duplex,exports.Transform=Stream3.Transform,exports.PassThrough=Stream3.PassThrough,exports.Stream=Stream3):(exports=module.exports=require_stream_readable3(),exports.Stream=Stream3||exports,exports.Readable=exports,exports.Writable=require_stream_writable3(),exports.Duplex=require_stream_duplex3(),exports.Transform=require_stream_transform3(),exports.PassThrough=require_stream_passthrough3());}});var require_immutable=__commonJS({"../../node_modules/xtend/immutable.js"(exports,module){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){for(var target={},i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source)hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target}}});var require_through2=__commonJS({"../../node_modules/through2/through2.js"(exports,module){var Transform=require_readable3().Transform,inherits=__require("util").inherits,xtend=require_immutable();function DestroyableTransform(opts){Transform.call(this,opts),this._destroyed=!1;}inherits(DestroyableTransform,Transform);DestroyableTransform.prototype.destroy=function(err){if(!this._destroyed){this._destroyed=!0;var self2=this;process.nextTick(function(){err&&self2.emit("error",err),self2.emit("close");});}};function noop3(chunk,enc,callback){callback(null,chunk);}function through2(construct){return function(options,transform,flush){return typeof options=="function"&&(flush=transform,transform=options,options={}),typeof transform!="function"&&(transform=noop3),typeof flush!="function"&&(flush=null),construct(options,transform,flush)}}module.exports=through2(function(options,transform,flush){var t2=new DestroyableTransform(options);return t2._transform=transform,flush&&(t2._flush=flush),t2});module.exports.ctor=through2(function(options,transform,flush){function Through2(override){if(!(this instanceof Through2))return new Through2(override);this.options=xtend(options,override),DestroyableTransform.call(this,this.options);}return inherits(Through2,DestroyableTransform),Through2.prototype._transform=transform,flush&&(Through2.prototype._flush=flush),Through2});module.exports.obj=through2(function(options,transform,flush){var t2=new DestroyableTransform(xtend({objectMode:!0,highWaterMark:16},options));return t2._transform=transform,flush&&(t2._flush=flush),t2});}});var require_buffer_from=__commonJS({"../../node_modules/buffer-from/index.js"(exports,module){var toString2=Object.prototype.toString,isModern=typeof Buffer<"u"&&typeof Buffer.alloc=="function"&&typeof Buffer.allocUnsafe=="function"&&typeof Buffer.from=="function";function isArrayBuffer(input){return toString2.call(input).slice(8,-1)==="ArrayBuffer"}function fromArrayBuffer(obj,byteOffset,length){byteOffset>>>=0;var maxLength=obj.byteLength-byteOffset;if(maxLength<0)throw new RangeError("'offset' is out of bounds");if(length===void 0)length=maxLength;else if(length>>>=0,length>maxLength)throw new RangeError("'length' is out of bounds");return isModern?Buffer.from(obj.slice(byteOffset,byteOffset+length)):new Buffer(new Uint8Array(obj.slice(byteOffset,byteOffset+length)))}function fromString(string,encoding){if((typeof encoding!="string"||encoding==="")&&(encoding="utf8"),!Buffer.isEncoding(encoding))throw new TypeError('"encoding" must be a valid string encoding');return isModern?Buffer.from(string,encoding):new Buffer(string,encoding)}function bufferFrom(value,encodingOrOffset,length){if(typeof value=="number")throw new TypeError('"value" argument must not be a number');return isArrayBuffer(value)?fromArrayBuffer(value,encodingOrOffset,length):typeof value=="string"?fromString(value,encodingOrOffset):isModern?Buffer.from(value):new Buffer(value)}module.exports=bufferFrom;}});var require_peek_stream=__commonJS({"../../node_modules/peek-stream/index.js"(exports,module){var duplexify=require_duplexify(),through=require_through2(),bufferFrom=require_buffer_from(),isObject=function(data){return !Buffer.isBuffer(data)&&typeof data!="string"},peek=function(opts,onpeek){if(typeof opts=="number"&&(opts={maxBuffer:opts}),typeof opts=="function")return peek(null,opts);opts||(opts={});var maxBuffer=typeof opts.maxBuffer=="number"?opts.maxBuffer:65535,strict=opts.strict,newline=opts.newline!==!1,buffer=[],bufferSize=0,dup=duplexify.obj(),peeker=through.obj({highWaterMark:1},function(data,enc,cb){if(isObject(data))return ready(data,null,cb);if(Buffer.isBuffer(data)||(data=bufferFrom(data)),newline){var nl=Array.prototype.indexOf.call(data,10);if(nl>0&&data[nl-1]===13&&nl--,nl>-1)return buffer.push(data.slice(0,nl)),ready(Buffer.concat(buffer),data.slice(nl),cb)}if(buffer.push(data),bufferSize+=data.length,bufferSize<maxBuffer)return cb();if(strict)return cb(new Error("No newline found"));ready(Buffer.concat(buffer),null,cb);}),onpreend=function(){if(strict)return dup.destroy(new Error("No newline found"));dup.cork(),ready(Buffer.concat(buffer),null,function(err){if(err)return dup.destroy(err);dup.uncork();});},ready=function(data,overflow,cb){dup.removeListener("preend",onpreend),onpeek(data,function(err,parser){if(err)return cb(err);dup.setWritable(parser),dup.setReadable(parser),data&&parser.write(data),overflow&&parser.write(overflow),overflow=buffer=peeker=null,cb();});};return dup.on("preend",onpreend),dup.setWritable(peeker),dup};module.exports=peek;}});var require_pump2=__commonJS({"../../node_modules/pumpify/node_modules/pump/index.js"(exports,module){var once2=require_once(),eos=require_end_of_stream(),fs8=__require("fs"),noop3=function(){},ancient=/^v?\.0/.test(process.version),isFn=function(fn){return typeof fn=="function"},isFS=function(stream2){return !ancient||!fs8?!1:(stream2 instanceof(fs8.ReadStream||noop3)||stream2 instanceof(fs8.WriteStream||noop3))&&isFn(stream2.close)},isRequest3=function(stream2){return stream2.setHeader&&isFn(stream2.abort)},destroyer=function(stream2,reading,writing,callback){callback=once2(callback);var closed=!1;stream2.on("close",function(){closed=!0;}),eos(stream2,{readable:reading,writable:writing},function(err){if(err)return callback(err);closed=!0,callback();});var destroyed=!1;return function(err){if(!closed&&!destroyed){if(destroyed=!0,isFS(stream2))return stream2.close(noop3);if(isRequest3(stream2))return stream2.abort();if(isFn(stream2.destroy))return stream2.destroy();callback(err||new Error("stream was destroyed"));}}},call=function(fn){fn();},pipe2=function(from,to){return from.pipe(to)},pump2=function(){var streams=Array.prototype.slice.call(arguments),callback=isFn(streams[streams.length-1]||noop3)&&streams.pop()||noop3;if(Array.isArray(streams[0])&&(streams=streams[0]),streams.length<2)throw new Error("pump requires two streams per minimum");var error,destroys=streams.map(function(stream2,i){var reading=i<streams.length-1,writing=i>0;return destroyer(stream2,reading,writing,function(err){error||(error=err),err&&destroys.forEach(call),!reading&&(destroys.forEach(call),callback(error));})});streams.reduce(pipe2);};module.exports=pump2;}});var require_isarray3=__commonJS({"../../node_modules/pumpify/node_modules/isarray/index.js"(exports,module){var toString2={}.toString;module.exports=Array.isArray||function(arr){return toString2.call(arr)=="[object Array]"};}});var require_stream5=__commonJS({"../../node_modules/pumpify/node_modules/readable-stream/lib/internal/streams/stream.js"(exports,module){module.exports=__require("stream");}});var require_safe_buffer4=__commonJS({"../../node_modules/pumpify/node_modules/safe-buffer/index.js"(exports,module){var buffer=__require("buffer"),Buffer4=buffer.Buffer;function copyProps(src,dst){for(var key in src)dst[key]=src[key];}Buffer4.from&&Buffer4.alloc&&Buffer4.allocUnsafe&&Buffer4.allocUnsafeSlow?module.exports=buffer:(copyProps(buffer,exports),exports.Buffer=SafeBuffer);function SafeBuffer(arg,encodingOrOffset,length){return Buffer4(arg,encodingOrOffset,length)}copyProps(Buffer4,SafeBuffer);SafeBuffer.from=function(arg,encodingOrOffset,length){if(typeof arg=="number")throw new TypeError("Argument must not be a number");return Buffer4(arg,encodingOrOffset,length)};SafeBuffer.alloc=function(size,fill,encoding){if(typeof size!="number")throw new TypeError("Argument must be a number");var buf=Buffer4(size);return fill!==void 0?typeof encoding=="string"?buf.fill(fill,encoding):buf.fill(fill):buf.fill(0),buf};SafeBuffer.allocUnsafe=function(size){if(typeof size!="number")throw new TypeError("Argument must be a number");return Buffer4(size)};SafeBuffer.allocUnsafeSlow=function(size){if(typeof size!="number")throw new TypeError("Argument must be a number");return buffer.SlowBuffer(size)};}});var require_BufferList4=__commonJS({"../../node_modules/pumpify/node_modules/readable-stream/lib/internal/streams/BufferList.js"(exports,module){function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}var Buffer4=require_safe_buffer4().Buffer,util=__require("util");function copyBuffer(src,target,offset){src.copy(target,offset);}module.exports=function(){function BufferList(){_classCallCheck(this,BufferList),this.head=null,this.tail=null,this.length=0;}return BufferList.prototype.push=function(v){var entry={data:v,next:null};this.length>0?this.tail.next=entry:this.head=entry,this.tail=entry,++this.length;},BufferList.prototype.unshift=function(v){var entry={data:v,next:this.head};this.length===0&&(this.tail=entry),this.head=entry,++this.length;},BufferList.prototype.shift=function(){if(this.length!==0){var ret=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,ret}},BufferList.prototype.clear=function(){this.head=this.tail=null,this.length=0;},BufferList.prototype.join=function(s){if(this.length===0)return "";for(var p=this.head,ret=""+p.data;p=p.next;)ret+=s+p.data;return ret},BufferList.prototype.concat=function(n){if(this.length===0)return Buffer4.alloc(0);for(var ret=Buffer4.allocUnsafe(n>>>0),p=this.head,i=0;p;)copyBuffer(p.data,ret,i),i+=p.data.length,p=p.next;return ret},BufferList}();util&&util.inspect&&util.inspect.custom&&(module.exports.prototype[util.inspect.custom]=function(){var obj=util.inspect({length:this.length});return this.constructor.name+" "+obj});}});var require_destroy4=__commonJS({"../../node_modules/pumpify/node_modules/readable-stream/lib/internal/streams/destroy.js"(exports,module){var pna=require_process_nextick_args();function destroy(err,cb){var _this=this,readableDestroyed=this._readableState&&this._readableState.destroyed,writableDestroyed=this._writableState&&this._writableState.destroyed;return readableDestroyed||writableDestroyed?(cb?cb(err):err&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,pna.nextTick(emitErrorNT,this,err)):pna.nextTick(emitErrorNT,this,err)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(err||null,function(err2){!cb&&err2?_this._writableState?_this._writableState.errorEmitted||(_this._writableState.errorEmitted=!0,pna.nextTick(emitErrorNT,_this,err2)):pna.nextTick(emitErrorNT,_this,err2):cb&&cb(err2);}),this)}function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1);}function emitErrorNT(self2,err){self2.emit("error",err);}module.exports={destroy,undestroy};}});var require_stream_writable4=__commonJS({"../../node_modules/pumpify/node_modules/readable-stream/lib/_stream_writable.js"(exports,module){var pna=require_process_nextick_args();module.exports=Writable;function CorkedRequest(state){var _this=this;this.next=null,this.entry=null,this.finish=function(){onCorkedFinish(_this,state);};}var asyncWrite=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:pna.nextTick,Duplex2;Writable.WritableState=WritableState;var util=Object.create(require_util());util.inherits=require_inherits();var internalUtil={deprecate:__require("util-deprecate")},Stream3=require_stream5(),Buffer4=require_safe_buffer4().Buffer,OurUint8Array=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer4.from(chunk)}function _isUint8Array(obj){return Buffer4.isBuffer(obj)||obj instanceof OurUint8Array}var destroyImpl=require_destroy4();util.inherits(Writable,Stream3);function nop(){}function WritableState(options,stream2){Duplex2=Duplex2||require_stream_duplex4(),options=options||{};var isDuplex=stream2 instanceof Duplex2;this.objectMode=!!options.objectMode,isDuplex&&(this.objectMode=this.objectMode||!!options.writableObjectMode);var hwm=options.highWaterMark,writableHwm=options.writableHighWaterMark,defaultHwm=this.objectMode?16:16*1024;hwm||hwm===0?this.highWaterMark=hwm:isDuplex&&(writableHwm||writableHwm===0)?this.highWaterMark=writableHwm:this.highWaterMark=defaultHwm,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var noDecode=options.decodeStrings===!1;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream2,er);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this);}WritableState.prototype.getBuffer=function(){for(var current=this.bufferedRequest,out=[];current;)out.push(current),current=current.next;return out};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch{}})();var realHasInstance;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(object){return realHasInstance.call(this,object)?!0:this!==Writable?!1:object&&object._writableState instanceof WritableState}})):realHasInstance=function(object){return object instanceof this};function Writable(options){if(Duplex2=Duplex2||require_stream_duplex4(),!realHasInstance.call(Writable,this)&&!(this instanceof Duplex2))return new Writable(options);this._writableState=new WritableState(options,this),this.writable=!0,options&&(typeof options.write=="function"&&(this._write=options.write),typeof options.writev=="function"&&(this._writev=options.writev),typeof options.destroy=="function"&&(this._destroy=options.destroy),typeof options.final=="function"&&(this._final=options.final)),Stream3.call(this);}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"));};function writeAfterEnd(stream2,cb){var er=new Error("write after end");stream2.emit("error",er),pna.nextTick(cb,er);}function validChunk(stream2,state,chunk,cb){var valid=!0,er=!1;return chunk===null?er=new TypeError("May not write null values to stream"):typeof chunk!="string"&&chunk!==void 0&&!state.objectMode&&(er=new TypeError("Invalid non-string/buffer chunk")),er&&(stream2.emit("error",er),pna.nextTick(cb,er),valid=!1),valid}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1,isBuf=!state.objectMode&&_isUint8Array(chunk);return isBuf&&!Buffer4.isBuffer(chunk)&&(chunk=_uint8ArrayToBuffer(chunk)),typeof encoding=="function"&&(cb=encoding,encoding=null),isBuf?encoding="buffer":encoding||(encoding=state.defaultEncoding),typeof cb!="function"&&(cb=nop),state.ended?writeAfterEnd(this,cb):(isBuf||validChunk(this,state,chunk,cb))&&(state.pendingcb++,ret=writeOrBuffer(this,state,isBuf,chunk,encoding,cb)),ret};Writable.prototype.cork=function(){var state=this._writableState;state.corked++;};Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,!state.writing&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest&&clearBuffer(this,state));};Writable.prototype.setDefaultEncoding=function(encoding){if(typeof encoding=="string"&&(encoding=encoding.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);return this._writableState.defaultEncoding=encoding,this};function decodeChunk(state,chunk,encoding){return !state.objectMode&&state.decodeStrings!==!1&&typeof chunk=="string"&&(chunk=Buffer4.from(chunk,encoding)),chunk}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function writeOrBuffer(stream2,state,isBuf,chunk,encoding,cb){if(!isBuf){var newChunk=decodeChunk(state,chunk,encoding);chunk!==newChunk&&(isBuf=!0,encoding="buffer",chunk=newChunk);}var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(ret||(state.needDrain=!0),state.writing||state.corked){var last=state.lastBufferedRequest;state.lastBufferedRequest={chunk,encoding,isBuf,callback:cb,next:null},last?last.next=state.lastBufferedRequest:state.bufferedRequest=state.lastBufferedRequest,state.bufferedRequestCount+=1;}else doWrite(stream2,state,!1,len,chunk,encoding,cb);return ret}function doWrite(stream2,state,writev,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,writev?stream2._writev(chunk,state.onwrite):stream2._write(chunk,encoding,state.onwrite),state.sync=!1;}function onwriteError(stream2,state,sync,er,cb){--state.pendingcb,sync?(pna.nextTick(cb,er),pna.nextTick(finishMaybe,stream2,state),stream2._writableState.errorEmitted=!0,stream2.emit("error",er)):(cb(er),stream2._writableState.errorEmitted=!0,stream2.emit("error",er),finishMaybe(stream2,state));}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0;}function onwrite(stream2,er){var state=stream2._writableState,sync=state.sync,cb=state.writecb;if(onwriteStateUpdate(state),er)onwriteError(stream2,state,sync,er,cb);else {var finished=needFinish(state);!finished&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest&&clearBuffer(stream2,state),sync?asyncWrite(afterWrite,stream2,state,finished,cb):afterWrite(stream2,state,finished,cb);}}function afterWrite(stream2,state,finished,cb){finished||onwriteDrain(stream2,state),state.pendingcb--,cb(),finishMaybe(stream2,state);}function onwriteDrain(stream2,state){state.length===0&&state.needDrain&&(state.needDrain=!1,stream2.emit("drain"));}function clearBuffer(stream2,state){state.bufferProcessing=!0;var entry=state.bufferedRequest;if(stream2._writev&&entry&&entry.next){var l=state.bufferedRequestCount,buffer=new Array(l),holder=state.corkedRequestsFree;holder.entry=entry;for(var count=0,allBuffers=!0;entry;)buffer[count]=entry,entry.isBuf||(allBuffers=!1),entry=entry.next,count+=1;buffer.allBuffers=allBuffers,doWrite(stream2,state,!0,state.length,buffer,"",holder.finish),state.pendingcb++,state.lastBufferedRequest=null,holder.next?(state.corkedRequestsFree=holder.next,holder.next=null):state.corkedRequestsFree=new CorkedRequest(state),state.bufferedRequestCount=0;}else {for(;entry;){var chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback,len=state.objectMode?1:chunk.length;if(doWrite(stream2,state,!1,len,chunk,encoding,cb),entry=entry.next,state.bufferedRequestCount--,state.writing)break}entry===null&&(state.lastBufferedRequest=null);}state.bufferedRequest=entry,state.bufferProcessing=!1;}Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("_write() is not implemented"));};Writable.prototype._writev=null;Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;typeof chunk=="function"?(cb=chunk,chunk=null,encoding=null):typeof encoding=="function"&&(cb=encoding,encoding=null),chunk!=null&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||endWritable(this,state,cb);};function needFinish(state){return state.ending&&state.length===0&&state.bufferedRequest===null&&!state.finished&&!state.writing}function callFinal(stream2,state){stream2._final(function(err){state.pendingcb--,err&&stream2.emit("error",err),state.prefinished=!0,stream2.emit("prefinish"),finishMaybe(stream2,state);});}function prefinish(stream2,state){!state.prefinished&&!state.finalCalled&&(typeof stream2._final=="function"?(state.pendingcb++,state.finalCalled=!0,pna.nextTick(callFinal,stream2,state)):(state.prefinished=!0,stream2.emit("prefinish")));}function finishMaybe(stream2,state){var need=needFinish(state);return need&&(prefinish(stream2,state),state.pendingcb===0&&(state.finished=!0,stream2.emit("finish"))),need}function endWritable(stream2,state,cb){state.ending=!0,finishMaybe(stream2,state),cb&&(state.finished?pna.nextTick(cb):stream2.once("finish",cb)),state.ended=!0,stream2.writable=!1;}function onCorkedFinish(corkReq,state,err){var entry=corkReq.entry;for(corkReq.entry=null;entry;){var cb=entry.callback;state.pendingcb--,cb(err),entry=entry.next;}state.corkedRequestsFree.next=corkReq;}Object.defineProperty(Writable.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(value){this._writableState&&(this._writableState.destroyed=value);}});Writable.prototype.destroy=destroyImpl.destroy;Writable.prototype._undestroy=destroyImpl.undestroy;Writable.prototype._destroy=function(err,cb){this.end(),cb(err);};}});var require_stream_duplex4=__commonJS({"../../node_modules/pumpify/node_modules/readable-stream/lib/_stream_duplex.js"(exports,module){var pna=require_process_nextick_args(),objectKeys=Object.keys||function(obj){var keys2=[];for(var key in obj)keys2.push(key);return keys2};module.exports=Duplex2;var util=Object.create(require_util());util.inherits=require_inherits();var Readable=require_stream_readable4(),Writable=require_stream_writable4();util.inherits(Duplex2,Readable);for(keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++)method=keys[v],Duplex2.prototype[method]||(Duplex2.prototype[method]=Writable.prototype[method]);var keys,method,v;function Duplex2(options){if(!(this instanceof Duplex2))return new Duplex2(options);Readable.call(this,options),Writable.call(this,options),options&&options.readable===!1&&(this.readable=!1),options&&options.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,options&&options.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",onend);}Object.defineProperty(Duplex2.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function onend(){this.allowHalfOpen||this._writableState.ended||pna.nextTick(onEndNT,this);}function onEndNT(self2){self2.end();}Object.defineProperty(Duplex2.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(value){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=value,this._writableState.destroyed=value);}});Duplex2.prototype._destroy=function(err,cb){this.push(null),this.end(),pna.nextTick(cb,err);};}});var require_string_decoder4=__commonJS({"../../node_modules/pumpify/node_modules/string_decoder/lib/string_decoder.js"(exports){var Buffer4=require_safe_buffer4().Buffer,isEncoding=Buffer4.isEncoding||function(encoding){switch(encoding=""+encoding,encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return !0;default:return !1}};function _normalizeEncoding(enc){if(!enc)return "utf8";for(var retried;;)switch(enc){case"utf8":case"utf-8":return "utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return "utf16le";case"latin1":case"binary":return "latin1";case"base64":case"ascii":case"hex":return enc;default:if(retried)return;enc=(""+enc).toLowerCase(),retried=!0;}}function normalizeEncoding(enc){var nenc=_normalizeEncoding(enc);if(typeof nenc!="string"&&(Buffer4.isEncoding===isEncoding||!isEncoding(enc)))throw new Error("Unknown encoding: "+enc);return nenc||enc}exports.StringDecoder=StringDecoder;function StringDecoder(encoding){this.encoding=normalizeEncoding(encoding);var nb;switch(this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,nb=4;break;case"utf8":this.fillLast=utf8FillLast,nb=4;break;case"base64":this.text=base64Text,this.end=base64End,nb=3;break;default:this.write=simpleWrite,this.end=simpleEnd;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Buffer4.allocUnsafe(nb);}StringDecoder.prototype.write=function(buf){if(buf.length===0)return "";var r,i;if(this.lastNeed){if(r=this.fillLast(buf),r===void 0)return "";i=this.lastNeed,this.lastNeed=0;}else i=0;return i<buf.length?r?r+this.text(buf,i):this.text(buf,i):r||""};StringDecoder.prototype.end=utf8End;StringDecoder.prototype.text=utf8Text;StringDecoder.prototype.fillLast=function(buf){if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,buf.length),this.lastNeed-=buf.length;};function utf8CheckByte(byte){return byte<=127?0:byte>>5===6?2:byte>>4===14?3:byte>>3===30?4:byte>>6===2?-1:-2}function utf8CheckIncomplete(self2,buf,i){var j=buf.length-1;if(j<i)return 0;var nb=utf8CheckByte(buf[j]);return nb>=0?(nb>0&&(self2.lastNeed=nb-1),nb):--j<i||nb===-2?0:(nb=utf8CheckByte(buf[j]),nb>=0?(nb>0&&(self2.lastNeed=nb-2),nb):--j<i||nb===-2?0:(nb=utf8CheckByte(buf[j]),nb>=0?(nb>0&&(nb===2?nb=0:self2.lastNeed=nb-3),nb):0))}function utf8CheckExtraBytes(self2,buf,p){if((buf[0]&192)!==128)return self2.lastNeed=0,"\uFFFD";if(self2.lastNeed>1&&buf.length>1){if((buf[1]&192)!==128)return self2.lastNeed=1,"\uFFFD";if(self2.lastNeed>2&&buf.length>2&&(buf[2]&192)!==128)return self2.lastNeed=2,"\uFFFD"}}function utf8FillLast(buf){var p=this.lastTotal-this.lastNeed,r=utf8CheckExtraBytes(this,buf);if(r!==void 0)return r;if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,p,0,buf.length),this.lastNeed-=buf.length;}function utf8Text(buf,i){var total=utf8CheckIncomplete(this,buf,i);if(!this.lastNeed)return buf.toString("utf8",i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);return buf.copy(this.lastChar,0,end),buf.toString("utf8",i,end)}function utf8End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+"\uFFFD":r}function utf16Text(buf,i){if((buf.length-i)%2===0){var r=buf.toString("utf16le",i);if(r){var c=r.charCodeAt(r.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=buf[buf.length-1],buf.toString("utf16le",i,buf.length-1)}function utf16End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,end)}return r}function base64Text(buf,i){var n=(buf.length-i)%3;return n===0?buf.toString("base64",i):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=buf[buf.length-1]:(this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1]),buf.toString("base64",i,buf.length-n))}function base64End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function simpleWrite(buf){return buf.toString(this.encoding)}function simpleEnd(buf){return buf&&buf.length?this.write(buf):""}}});var require_stream_readable4=__commonJS({"../../node_modules/pumpify/node_modules/readable-stream/lib/_stream_readable.js"(exports,module){var pna=require_process_nextick_args();module.exports=Readable;var isArray=require_isarray3(),Duplex2;Readable.ReadableState=ReadableState;__require("events").EventEmitter;var EElistenerCount=function(emitter,type){return emitter.listeners(type).length},Stream3=require_stream5(),Buffer4=require_safe_buffer4().Buffer,OurUint8Array=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer4.from(chunk)}function _isUint8Array(obj){return Buffer4.isBuffer(obj)||obj instanceof OurUint8Array}var util=Object.create(require_util());util.inherits=require_inherits();var debugUtil=__require("util"),debug=void 0;debugUtil&&debugUtil.debuglog?debug=debugUtil.debuglog("stream"):debug=function(){};var BufferList=require_BufferList4(),destroyImpl=require_destroy4(),StringDecoder;util.inherits(Readable,Stream3);var kProxyEvents=["error","close","destroy","pause","resume"];function prependListener(emitter,event,fn){if(typeof emitter.prependListener=="function")return emitter.prependListener(event,fn);!emitter._events||!emitter._events[event]?emitter.on(event,fn):isArray(emitter._events[event])?emitter._events[event].unshift(fn):emitter._events[event]=[fn,emitter._events[event]];}function ReadableState(options,stream2){Duplex2=Duplex2||require_stream_duplex4(),options=options||{};var isDuplex=stream2 instanceof Duplex2;this.objectMode=!!options.objectMode,isDuplex&&(this.objectMode=this.objectMode||!!options.readableObjectMode);var hwm=options.highWaterMark,readableHwm=options.readableHighWaterMark,defaultHwm=this.objectMode?16:16*1024;hwm||hwm===0?this.highWaterMark=hwm:isDuplex&&(readableHwm||readableHwm===0)?this.highWaterMark=readableHwm:this.highWaterMark=defaultHwm,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new BufferList,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=options.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=require_string_decoder4().StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding);}function Readable(options){if(Duplex2=Duplex2||require_stream_duplex4(),!(this instanceof Readable))return new Readable(options);this._readableState=new ReadableState(options,this),this.readable=!0,options&&(typeof options.read=="function"&&(this._read=options.read),typeof options.destroy=="function"&&(this._destroy=options.destroy)),Stream3.call(this);}Object.defineProperty(Readable.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(value){this._readableState&&(this._readableState.destroyed=value);}});Readable.prototype.destroy=destroyImpl.destroy;Readable.prototype._undestroy=destroyImpl.undestroy;Readable.prototype._destroy=function(err,cb){this.push(null),cb(err);};Readable.prototype.push=function(chunk,encoding){var state=this._readableState,skipChunkCheck;return state.objectMode?skipChunkCheck=!0:typeof chunk=="string"&&(encoding=encoding||state.defaultEncoding,encoding!==state.encoding&&(chunk=Buffer4.from(chunk,encoding),encoding=""),skipChunkCheck=!0),readableAddChunk(this,chunk,encoding,!1,skipChunkCheck)};Readable.prototype.unshift=function(chunk){return readableAddChunk(this,chunk,null,!0,!1)};function readableAddChunk(stream2,chunk,encoding,addToFront,skipChunkCheck){var state=stream2._readableState;if(chunk===null)state.reading=!1,onEofChunk(stream2,state);else {var er;skipChunkCheck||(er=chunkInvalid(state,chunk)),er?stream2.emit("error",er):state.objectMode||chunk&&chunk.length>0?(typeof chunk!="string"&&!state.objectMode&&Object.getPrototypeOf(chunk)!==Buffer4.prototype&&(chunk=_uint8ArrayToBuffer(chunk)),addToFront?state.endEmitted?stream2.emit("error",new Error("stream.unshift() after end event")):addChunk(stream2,state,chunk,!0):state.ended?stream2.emit("error",new Error("stream.push() after EOF")):(state.reading=!1,state.decoder&&!encoding?(chunk=state.decoder.write(chunk),state.objectMode||chunk.length!==0?addChunk(stream2,state,chunk,!1):maybeReadMore(stream2,state)):addChunk(stream2,state,chunk,!1))):addToFront||(state.reading=!1);}return needMoreData(state)}function addChunk(stream2,state,chunk,addToFront){state.flowing&&state.length===0&&!state.sync?(stream2.emit("data",chunk),stream2.read(0)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream2)),maybeReadMore(stream2,state);}function chunkInvalid(state,chunk){var er;return !_isUint8Array(chunk)&&typeof chunk!="string"&&chunk!==void 0&&!state.objectMode&&(er=new TypeError("Invalid non-string/buffer chunk")),er}function needMoreData(state){return !state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0)}Readable.prototype.isPaused=function(){return this._readableState.flowing===!1};Readable.prototype.setEncoding=function(enc){return StringDecoder||(StringDecoder=require_string_decoder4().StringDecoder),this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc,this};var MAX_HWM=8388608;function computeNewHighWaterMark(n){return n>=MAX_HWM?n=MAX_HWM:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}function howMuchToRead(n,state){return n<=0||state.length===0&&state.ended?0:state.objectMode?1:n!==n?state.flowing&&state.length?state.buffer.head.data.length:state.length:(n>state.highWaterMark&&(state.highWaterMark=computeNewHighWaterMark(n)),n<=state.length?n:state.ended?state.length:(state.needReadable=!0,0))}Readable.prototype.read=function(n){debug("read",n),n=parseInt(n,10);var state=this._readableState,nOrig=n;if(n!==0&&(state.emittedReadable=!1),n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return debug("read: emitReadable",state.length,state.ended),state.length===0&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),n===0&&state.ended)return state.length===0&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(state.length===0||state.length-n<state.highWaterMark)&&(doRead=!0,debug("length less than watermark",doRead)),state.ended||state.reading?(doRead=!1,debug("reading or ended",doRead)):doRead&&(debug("do read"),state.reading=!0,state.sync=!0,state.length===0&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1,state.reading||(n=howMuchToRead(nOrig,state)));var ret;return n>0?ret=fromList(n,state):ret=null,ret===null?(state.needReadable=!0,n=0):state.length-=n,state.length===0&&(state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&endReadable(this)),ret!==null&&this.emit("data",ret),ret};function onEofChunk(stream2,state){if(!state.ended){if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length);}state.ended=!0,emitReadable(stream2);}}function emitReadable(stream2){var state=stream2._readableState;state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync?pna.nextTick(emitReadable_,stream2):emitReadable_(stream2));}function emitReadable_(stream2){debug("emit readable"),stream2.emit("readable"),flow(stream2);}function maybeReadMore(stream2,state){state.readingMore||(state.readingMore=!0,pna.nextTick(maybeReadMore_,stream2,state));}function maybeReadMore_(stream2,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark&&(debug("maybeReadMore read 0"),stream2.read(0),len!==state.length);)len=state.length;state.readingMore=!1;}Readable.prototype._read=function(n){this.emit("error",new Error("_read() is not implemented"));};Readable.prototype.pipe=function(dest,pipeOpts){var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest);break}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:unpipe;state.endEmitted?pna.nextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);function onunpipe(readable,unpipeInfo){debug("onunpipe"),readable===src&&unpipeInfo&&unpipeInfo.hasUnpiped===!1&&(unpipeInfo.hasUnpiped=!0,cleanup());}function onend(){debug("onend"),dest.end();}var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=!1;function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",unpipe),src.removeListener("data",ondata),cleanedUp=!0,state.awaitDrain&&(!dest._writableState||dest._writableState.needDrain)&&ondrain();}var increasedAwaitDrain=!1;src.on("data",ondata);function ondata(chunk){debug("ondata"),increasedAwaitDrain=!1;var ret=dest.write(chunk);ret===!1&&!increasedAwaitDrain&&((state.pipesCount===1&&state.pipes===dest||state.pipesCount>1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp&&(debug("false write response, pause",state.awaitDrain),state.awaitDrain++,increasedAwaitDrain=!0),src.pause());}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),EElistenerCount(dest,"error")===0&&dest.emit("error",er);}prependListener(dest,"error",onerror);function onclose(){dest.removeListener("finish",onfinish),unpipe();}dest.once("close",onclose);function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe();}dest.once("finish",onfinish);function unpipe(){debug("unpipe"),src.unpipe(dest);}return dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest};function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,state.awaitDrain===0&&EElistenerCount(src,"data")&&(state.flowing=!0,flow(src));}}Readable.prototype.unpipe=function(dest){var state=this._readableState,unpipeInfo={hasUnpiped:!1};if(state.pipesCount===0)return this;if(state.pipesCount===1)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this,unpipeInfo),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;i<len;i++)dests[i].emit("unpipe",this,{hasUnpiped:!1});return this}var index=indexOf(state.pipes,dest);return index===-1?this:(state.pipes.splice(index,1),state.pipesCount-=1,state.pipesCount===1&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this,unpipeInfo),this)};Readable.prototype.on=function(ev,fn){var res=Stream3.prototype.on.call(this,ev,fn);if(ev==="data")this._readableState.flowing!==!1&&this.resume();else if(ev==="readable"){var state=this._readableState;!state.endEmitted&&!state.readableListening&&(state.readableListening=state.needReadable=!0,state.emittedReadable=!1,state.reading?state.length&&emitReadable(this):pna.nextTick(nReadingNextTick,this));}return res};Readable.prototype.addListener=Readable.prototype.on;function nReadingNextTick(self2){debug("readable nexttick read 0"),self2.read(0);}Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!0,resume(this,state)),this};function resume(stream2,state){state.resumeScheduled||(state.resumeScheduled=!0,pna.nextTick(resume_,stream2,state));}function resume_(stream2,state){state.reading||(debug("resume read 0"),stream2.read(0)),state.resumeScheduled=!1,state.awaitDrain=0,stream2.emit("resume"),flow(stream2),state.flowing&&!state.reading&&stream2.read(0);}Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function flow(stream2){var state=stream2._readableState;for(debug("flow",state.flowing);state.flowing&&stream2.read()!==null;);}Readable.prototype.wrap=function(stream2){var _this=this,state=this._readableState,paused=!1;stream2.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&_this.push(chunk);}_this.push(null);}),stream2.on("data",function(chunk){if(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),!(state.objectMode&&chunk==null)&&!(!state.objectMode&&(!chunk||!chunk.length))){var ret=_this.push(chunk);ret||(paused=!0,stream2.pause());}});for(var i in stream2)this[i]===void 0&&typeof stream2[i]=="function"&&(this[i]=function(method){return function(){return stream2[method].apply(stream2,arguments)}}(i));for(var n=0;n<kProxyEvents.length;n++)stream2.on(kProxyEvents[n],this.emit.bind(this,kProxyEvents[n]));return this._read=function(n2){debug("wrapped _read",n2),paused&&(paused=!1,stream2.resume());},this};Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Readable._fromList=fromList;function fromList(n,state){if(state.length===0)return null;var ret;return state.objectMode?ret=state.buffer.shift():!n||n>=state.length?(state.decoder?ret=state.buffer.join(""):state.buffer.length===1?ret=state.buffer.head.data:ret=state.buffer.concat(state.length),state.buffer.clear()):ret=fromListPartial(n,state.buffer,state.decoder),ret}function fromListPartial(n,list,hasStrings){var ret;return n<list.head.data.length?(ret=list.head.data.slice(0,n),list.head.data=list.head.data.slice(n)):n===list.head.data.length?ret=list.shift():ret=hasStrings?copyFromBufferString(n,list):copyFromBuffer(n,list),ret}function copyFromBufferString(n,list){var p=list.head,c=1,ret=p.data;for(n-=ret.length;p=p.next;){var str=p.data,nb=n>str.length?str.length:n;if(nb===str.length?ret+=str:ret+=str.slice(0,n),n-=nb,n===0){nb===str.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=str.slice(nb));break}++c;}return list.length-=c,ret}function copyFromBuffer(n,list){var ret=Buffer4.allocUnsafe(n),p=list.head,c=1;for(p.data.copy(ret),n-=p.data.length;p=p.next;){var buf=p.data,nb=n>buf.length?buf.length:n;if(buf.copy(ret,ret.length-n,0,nb),n-=nb,n===0){nb===buf.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=buf.slice(nb));break}++c;}return list.length-=c,ret}function endReadable(stream2){var state=stream2._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');state.endEmitted||(state.ended=!0,pna.nextTick(endReadableNT,state,stream2));}function endReadableNT(state,stream2){!state.endEmitted&&state.length===0&&(state.endEmitted=!0,stream2.readable=!1,stream2.emit("end"));}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return -1}}});var require_stream_transform4=__commonJS({"../../node_modules/pumpify/node_modules/readable-stream/lib/_stream_transform.js"(exports,module){module.exports=Transform;var Duplex2=require_stream_duplex4(),util=Object.create(require_util());util.inherits=require_inherits();util.inherits(Transform,Duplex2);function afterTransform(er,data){var ts=this._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return this.emit("error",new Error("write callback called multiple times"));ts.writechunk=null,ts.writecb=null,data!=null&&this.push(data),cb(er);var rs=this._readableState;rs.reading=!1,(rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark);}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex2.call(this,options),this._transformState={afterTransform:afterTransform.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,options&&(typeof options.transform=="function"&&(this._transform=options.transform),typeof options.flush=="function"&&(this._flush=options.flush)),this.on("prefinish",prefinish);}function prefinish(){var _this=this;typeof this._flush=="function"?this._flush(function(er,data){done(_this,er,data);}):done(this,null,null);}Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex2.prototype.push.call(this,chunk,encoding)};Transform.prototype._transform=function(chunk,encoding,cb){throw new Error("_transform() is not implemented")};Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark);}};Transform.prototype._read=function(n){var ts=this._transformState;ts.writechunk!==null&&ts.writecb&&!ts.transforming?(ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)):ts.needTransform=!0;};Transform.prototype._destroy=function(err,cb){var _this2=this;Duplex2.prototype._destroy.call(this,err,function(err2){cb(err2),_this2.emit("close");});};function done(stream2,er,data){if(er)return stream2.emit("error",er);if(data!=null&&stream2.push(data),stream2._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(stream2._transformState.transforming)throw new Error("Calling transform done when still transforming");return stream2.push(null)}}});var require_stream_passthrough4=__commonJS({"../../node_modules/pumpify/node_modules/readable-stream/lib/_stream_passthrough.js"(exports,module){module.exports=PassThrough3;var Transform=require_stream_transform4(),util=Object.create(require_util());util.inherits=require_inherits();util.inherits(PassThrough3,Transform);function PassThrough3(options){if(!(this instanceof PassThrough3))return new PassThrough3(options);Transform.call(this,options);}PassThrough3.prototype._transform=function(chunk,encoding,cb){cb(null,chunk);};}});var require_readable4=__commonJS({"../../node_modules/pumpify/node_modules/readable-stream/readable.js"(exports,module){var Stream3=__require("stream");process.env.READABLE_STREAM==="disable"&&Stream3?(module.exports=Stream3,exports=module.exports=Stream3.Readable,exports.Readable=Stream3.Readable,exports.Writable=Stream3.Writable,exports.Duplex=Stream3.Duplex,exports.Transform=Stream3.Transform,exports.PassThrough=Stream3.PassThrough,exports.Stream=Stream3):(exports=module.exports=require_stream_readable4(),exports.Stream=Stream3||exports,exports.Readable=exports,exports.Writable=require_stream_writable4(),exports.Duplex=require_stream_duplex4(),exports.Transform=require_stream_transform4(),exports.PassThrough=require_stream_passthrough4());}});var require_duplexify2=__commonJS({"../../node_modules/pumpify/node_modules/duplexify/index.js"(exports,module){var stream2=require_readable4(),eos=require_end_of_stream(),inherits=require_inherits(),shift=require_stream_shift(),SIGNAL_FLUSH=Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from([0]):new Buffer([0]),onuncork=function(self2,fn){self2._corked?self2.once("uncork",fn):fn();},autoDestroy=function(self2,err){self2._autoDestroy&&self2.destroy(err);},destroyer=function(self2,end2){return function(err){err?autoDestroy(self2,err.message==="premature close"?null:err):end2&&!self2._ended&&self2.end();}},end=function(ws,fn){if(!ws||ws._writableState&&ws._writableState.finished)return fn();if(ws._writableState)return ws.end(fn);ws.end(),fn();},toStreams2=function(rs){return new stream2.Readable({objectMode:!0,highWaterMark:16}).wrap(rs)},Duplexify=function(writable,readable,opts){if(!(this instanceof Duplexify))return new Duplexify(writable,readable,opts);stream2.Duplex.call(this,opts),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!opts||opts.autoDestroy!==!1,this._forwardDestroy=!opts||opts.destroy!==!1,this._forwardEnd=!opts||opts.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,writable&&this.setWritable(writable),readable&&this.setReadable(readable);};inherits(Duplexify,stream2.Duplex);Duplexify.obj=function(writable,readable,opts){return opts||(opts={}),opts.objectMode=!0,opts.highWaterMark=16,new Duplexify(writable,readable,opts)};Duplexify.prototype.cork=function(){++this._corked===1&&this.emit("cork");};Duplexify.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork");};Duplexify.prototype.setWritable=function(writable){if(this._unwrite&&this._unwrite(),this.destroyed){writable&&writable.destroy&&writable.destroy();return}if(writable===null||writable===!1){this.end();return}var self2=this,unend=eos(writable,{writable:!0,readable:!1},destroyer(this,this._forwardEnd)),ondrain=function(){var ondrain2=self2._ondrain;self2._ondrain=null,ondrain2&&ondrain2();},clear=function(){self2._writable.removeListener("drain",ondrain),unend();};this._unwrite&&process.nextTick(ondrain),this._writable=writable,this._writable.on("drain",ondrain),this._unwrite=clear,this.uncork();};Duplexify.prototype.setReadable=function(readable){if(this._unread&&this._unread(),this.destroyed){readable&&readable.destroy&&readable.destroy();return}if(readable===null||readable===!1){this.push(null),this.resume();return}var self2=this,unend=eos(readable,{writable:!1,readable:!0},destroyer(this)),onreadable=function(){self2._forward();},onend=function(){self2.push(null);},clear=function(){self2._readable2.removeListener("readable",onreadable),self2._readable2.removeListener("end",onend),unend();};this._drained=!0,this._readable=readable,this._readable2=readable._readableState?readable:toStreams2(readable),this._readable2.on("readable",onreadable),this._readable2.on("end",onend),this._unread=clear,this._forward();};Duplexify.prototype._read=function(){this._drained=!0,this._forward();};Duplexify.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var data;this._drained&&(data=shift(this._readable2))!==null;)this.destroyed||(this._drained=this.push(data));this._forwarding=!1;}};Duplexify.prototype.destroy=function(err){if(!this.destroyed){this.destroyed=!0;var self2=this;process.nextTick(function(){self2._destroy(err);});}};Duplexify.prototype._destroy=function(err){if(err){var ondrain=this._ondrain;this._ondrain=null,ondrain?ondrain(err):this.emit("error",err);}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close");};Duplexify.prototype._write=function(data,enc,cb){if(this.destroyed)return cb();if(this._corked)return onuncork(this,this._write.bind(this,data,enc,cb));if(data===SIGNAL_FLUSH)return this._finish(cb);if(!this._writable)return cb();this._writable.write(data)===!1?this._ondrain=cb:cb();};Duplexify.prototype._finish=function(cb){var self2=this;this.emit("preend"),onuncork(this,function(){end(self2._forwardEnd&&self2._writable,function(){self2._writableState.prefinished===!1&&(self2._writableState.prefinished=!0),self2.emit("prefinish"),onuncork(self2,cb);});});};Duplexify.prototype.end=function(data,enc,cb){return typeof data=="function"?this.end(null,null,data):typeof enc=="function"?this.end(data,null,enc):(this._ended=!0,data&&this.write(data),this._writableState.ending||this.write(SIGNAL_FLUSH),stream2.Writable.prototype.end.call(this,cb))};module.exports=Duplexify;}});var require_pumpify=__commonJS({"../../node_modules/pumpify/index.js"(exports,module){var pump2=require_pump2(),inherits=require_inherits(),Duplexify=require_duplexify2(),toArray=function(args){return args.length?Array.isArray(args[0])?args[0]:Array.prototype.slice.call(args):[]},define2=function(opts){var Pumpify=function(){var streams=toArray(arguments);if(!(this instanceof Pumpify))return new Pumpify(streams);Duplexify.call(this,null,null,opts),streams.length&&this.setPipeline(streams);};return inherits(Pumpify,Duplexify),Pumpify.prototype.setPipeline=function(){var streams=toArray(arguments),self2=this,ended=!1,w=streams[0],r=streams[streams.length-1];r=r.readable?r:null,w=w.writable?w:null;var onclose=function(){streams[0].emit("error",new Error("stream was destroyed"));};if(this.on("close",onclose),this.on("prefinish",function(){ended||self2.cork();}),pump2(streams,function(err){if(self2.removeListener("close",onclose),err)return self2.destroy(err.message==="premature close"?null:err);ended=!0,self2._autoDestroy===!1&&(self2._autoDestroy=!0),self2.uncork();}),this.destroyed)return onclose();this.setWritable(w),this.setReadable(r);},Pumpify};module.exports=define2({autoDestroy:!1,destroy:!1});module.exports.obj=define2({autoDestroy:!1,destroy:!1,objectMode:!0,highWaterMark:16});module.exports.ctor=define2;}});var require_is_gzip=__commonJS({"../../node_modules/is-gzip/index.js"(exports,module){module.exports=function(buf){return !buf||buf.length<3?!1:buf[0]===31&&buf[1]===139&&buf[2]===8};}});var require_is_deflate=__commonJS({"../../node_modules/is-deflate/index.js"(exports,module){module.exports=function(buf){return !buf||buf.length<2?!1:buf[0]===120&&(buf[1]===1||buf[1]===156||buf[1]===218)};}});var require_gunzip_maybe=__commonJS({"../../node_modules/gunzip-maybe/index.js"(exports,module){var zlib2=__require("zlib"),peek=require_peek_stream(),through=require_through2(),pumpify=require_pumpify(),isGzip=require_is_gzip(),isDeflate=require_is_deflate(),isCompressed=function(data){return isGzip(data)?1:isDeflate(data)?2:0},gunzip=function(maxRecursion){return maxRecursion===void 0&&(maxRecursion=3),peek({newline:!1,maxBuffer:10},function(data,swap){if(maxRecursion<0)return swap(new Error("Maximum recursion reached"));switch(isCompressed(data)){case 1:swap(null,pumpify(zlib2.createGunzip(),gunzip(maxRecursion-1)));break;case 2:swap(null,pumpify(zlib2.createInflate(),gunzip(maxRecursion-1)));break;default:swap(null,through());}})};module.exports=gunzip;}});var require_lib=__commonJS({"../../node_modules/get-npm-tarball-url/lib/index.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});function default_1(pkgName,pkgVersion,opts){let registry;opts?.registry?registry=opts.registry.endsWith("/")?opts.registry:`${opts.registry}/`:registry="https://registry.npmjs.org/";let scopelessName=getScopelessName(pkgName);return `${registry}${pkgName}/-/${scopelessName}-${removeBuildMetadataFromVersion(pkgVersion)}.tgz`}exports.default=default_1;function removeBuildMetadataFromVersion(version){let plusPos=version.indexOf("+");return plusPos===-1?version:version.substring(0,plusPos)}function getScopelessName(name){return name[0]!=="@"?name:name.split("/")[1]}}});var tslib_es6_exports={};__export(tslib_es6_exports,{__assign:()=>__assign,__asyncDelegator:()=>__asyncDelegator,__asyncGenerator:()=>__asyncGenerator,__asyncValues:()=>__asyncValues,__await:()=>__await,__awaiter:()=>__awaiter,__classPrivateFieldGet:()=>__classPrivateFieldGet2,__classPrivateFieldSet:()=>__classPrivateFieldSet2,__createBinding:()=>__createBinding,__decorate:()=>__decorate,__exportStar:()=>__exportStar,__extends:()=>__extends,__generator:()=>__generator,__importDefault:()=>__importDefault,__importStar:()=>__importStar,__makeTemplateObject:()=>__makeTemplateObject,__metadata:()=>__metadata,__param:()=>__param,__read:()=>__read,__rest:()=>__rest,__spread:()=>__spread,__spreadArrays:()=>__spreadArrays,__values:()=>__values});function __extends(d,b){extendStatics(d,b);function __(){this.constructor=d;}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __);}function __rest(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t}function __decorate(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r}function __param(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex);}}function __metadata(metadataKey,metadataValue){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(metadataKey,metadataValue)}function __awaiter(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve3){resolve3(value);})}return new(P||(P=Promise))(function(resolve3,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator.throw(value));}catch(e){reject(e);}}function step(result){result.done?resolve3(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());})}function __generator(thisArg,body){var _={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},f,y,t,g;return g={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw new TypeError("Generator is already executing.");for(;_;)try{if(f=1,y&&(t=op[0]&2?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[op[0]&2,t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(t=_.trys,!(t=t.length>0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(op[0]===6&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_);}catch(e){op=[6,e],y=0;}finally{f=t=0;}if(op[0]&5)throw op[1];return {value:op[0]?op[1]:void 0,done:!0}}}function __createBinding(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k];}function __exportStar(m,exports){for(var p in m)p!=="default"&&!exports.hasOwnProperty(p)&&(exports[p]=m[p]);}function __values(o){var s=typeof Symbol=="function"&&Symbol.iterator,m=s&&o[s],i=0;if(m)return m.call(o);if(o&&typeof o.length=="number")return {next:function(){return o&&i>=o.length&&(o=void 0),{value:o&&o[i++],done:!o}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(o,n){var m=typeof Symbol=="function"&&o[Symbol.iterator];if(!m)return o;var i=m.call(o),r,ar=[],e;try{for(;(n===void 0||n-- >0)&&!(r=i.next()).done;)ar.push(r.value);}catch(error){e={error};}finally{try{r&&!r.done&&(m=i.return)&&m.call(i);}finally{if(e)throw e.error}}return ar}function __spread(){for(var ar=[],i=0;i<arguments.length;i++)ar=ar.concat(__read(arguments[i]));return ar}function __spreadArrays(){for(var s=0,i=0,il=arguments.length;i<il;i++)s+=arguments[i].length;for(var r=Array(s),k=0,i=0;i<il;i++)for(var a=arguments[i],j=0,jl=a.length;j<jl;j++,k++)r[k]=a[j];return r}function __await(v){return this instanceof __await?(this.v=v,this):new __await(v)}function __asyncGenerator(thisArg,_arguments,generator){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var g=generator.apply(thisArg,_arguments||[]),i,q=[];return i={},verb("next"),verb("throw"),verb("return"),i[Symbol.asyncIterator]=function(){return this},i;function verb(n){g[n]&&(i[n]=function(v){return new Promise(function(a,b){q.push([n,v,a,b])>1||resume(n,v);})});}function resume(n,v){try{step(g[n](v));}catch(e){settle(q[0][3],e);}}function step(r){r.value instanceof __await?Promise.resolve(r.value.v).then(fulfill,reject):settle(q[0][2],r);}function fulfill(value){resume("next",value);}function reject(value){resume("throw",value);}function settle(f,v){f(v),q.shift(),q.length&&resume(q[0][0],q[0][1]);}}function __asyncDelegator(o){var i,p;return i={},verb("next"),verb("throw",function(e){throw e}),verb("return"),i[Symbol.iterator]=function(){return this},i;function verb(n,f){i[n]=o[n]?function(v){return (p=!p)?{value:__await(o[n](v)),done:n==="return"}:f?f(v):v}:f;}}function __asyncValues(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var m=o[Symbol.asyncIterator],i;return m?m.call(o):(o=typeof __values=="function"?__values(o):o[Symbol.iterator](),i={},verb("next"),verb("throw"),verb("return"),i[Symbol.asyncIterator]=function(){return this},i);function verb(n){i[n]=o[n]&&function(v){return new Promise(function(resolve3,reject){v=o[n](v),settle(resolve3,reject,v.done,v.value);})};}function settle(resolve3,reject,d,v){Promise.resolve(v).then(function(v2){resolve3({value:v2,done:d});},reject);}}function __makeTemplateObject(cooked,raw){return Object.defineProperty?Object.defineProperty(cooked,"raw",{value:raw}):cooked.raw=raw,cooked}function __importStar(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)Object.hasOwnProperty.call(mod,k)&&(result[k]=mod[k]);return result.default=mod,result}function __importDefault(mod){return mod&&mod.__esModule?mod:{default:mod}}function __classPrivateFieldGet2(receiver,privateMap){if(!privateMap.has(receiver))throw new TypeError("attempted to get private field on non-instance");return privateMap.get(receiver)}function __classPrivateFieldSet2(receiver,privateMap,value){if(!privateMap.has(receiver))throw new TypeError("attempted to set private field on non-instance");return privateMap.set(receiver,value),value}var extendStatics,__assign,init_tslib_es6=__esm({"../../node_modules/@yarnpkg/fslib/node_modules/tslib/tslib.es6.js"(){extendStatics=function(d,b){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d2,b2){d2.__proto__=b2;}||function(d2,b2){for(var p in b2)b2.hasOwnProperty(p)&&(d2[p]=b2[p]);},extendStatics(d,b)};__assign=function(){return __assign=Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p]);}return t},__assign.apply(this,arguments)};}});var require_constants=__commonJS({"../../node_modules/@yarnpkg/fslib/lib/constants.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.SAFE_TIME=exports.S_IFLNK=exports.S_IFREG=exports.S_IFDIR=exports.S_IFMT=void 0;exports.S_IFMT=61440;exports.S_IFDIR=16384;exports.S_IFREG=32768;exports.S_IFLNK=40960;exports.SAFE_TIME=456789e3;}});var require_statUtils=__commonJS({"../../node_modules/@yarnpkg/fslib/lib/statUtils.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.areStatsEqual=exports.convertToBigIntStats=exports.clearStats=exports.makeEmptyStats=exports.makeDefaultStats=exports.BigIntStatsEntry=exports.StatEntry=exports.DirEntry=exports.DEFAULT_MODE=void 0;var tslib_1=(init_tslib_es6(),__toCommonJS(tslib_es6_exports)),nodeUtils=tslib_1.__importStar(__require("util")),constants_1=require_constants();exports.DEFAULT_MODE=constants_1.S_IFREG|420;var DirEntry=class{constructor(){this.name="",this.mode=0;}isBlockDevice(){return !1}isCharacterDevice(){return !1}isDirectory(){return (this.mode&constants_1.S_IFMT)===constants_1.S_IFDIR}isFIFO(){return !1}isFile(){return (this.mode&constants_1.S_IFMT)===constants_1.S_IFREG}isSocket(){return !1}isSymbolicLink(){return (this.mode&constants_1.S_IFMT)===constants_1.S_IFLNK}};exports.DirEntry=DirEntry;var StatEntry=class{constructor(){this.uid=0,this.gid=0,this.size=0,this.blksize=0,this.atimeMs=0,this.mtimeMs=0,this.ctimeMs=0,this.birthtimeMs=0,this.atime=new Date(0),this.mtime=new Date(0),this.ctime=new Date(0),this.birthtime=new Date(0),this.dev=0,this.ino=0,this.mode=exports.DEFAULT_MODE,this.nlink=1,this.rdev=0,this.blocks=1;}isBlockDevice(){return !1}isCharacterDevice(){return !1}isDirectory(){return (this.mode&constants_1.S_IFMT)===constants_1.S_IFDIR}isFIFO(){return !1}isFile(){return (this.mode&constants_1.S_IFMT)===constants_1.S_IFREG}isSocket(){return !1}isSymbolicLink(){return (this.mode&constants_1.S_IFMT)===constants_1.S_IFLNK}};exports.StatEntry=StatEntry;var BigIntStatsEntry=class{constructor(){this.uid=BigInt(0),this.gid=BigInt(0),this.size=BigInt(0),this.blksize=BigInt(0),this.atimeMs=BigInt(0),this.mtimeMs=BigInt(0),this.ctimeMs=BigInt(0),this.birthtimeMs=BigInt(0),this.atimeNs=BigInt(0),this.mtimeNs=BigInt(0),this.ctimeNs=BigInt(0),this.birthtimeNs=BigInt(0),this.atime=new Date(0),this.mtime=new Date(0),this.ctime=new Date(0),this.birthtime=new Date(0),this.dev=BigInt(0),this.ino=BigInt(0),this.mode=BigInt(exports.DEFAULT_MODE),this.nlink=BigInt(1),this.rdev=BigInt(0),this.blocks=BigInt(1);}isBlockDevice(){return !1}isCharacterDevice(){return !1}isDirectory(){return (this.mode&BigInt(constants_1.S_IFMT))===BigInt(constants_1.S_IFDIR)}isFIFO(){return !1}isFile(){return (this.mode&BigInt(constants_1.S_IFMT))===BigInt(constants_1.S_IFREG)}isSocket(){return !1}isSymbolicLink(){return (this.mode&BigInt(constants_1.S_IFMT))===BigInt(constants_1.S_IFLNK)}};exports.BigIntStatsEntry=BigIntStatsEntry;function makeDefaultStats(){return new StatEntry}exports.makeDefaultStats=makeDefaultStats;function makeEmptyStats(){return clearStats(makeDefaultStats())}exports.makeEmptyStats=makeEmptyStats;function clearStats(stats){for(let key in stats)if(Object.prototype.hasOwnProperty.call(stats,key)){let element=stats[key];typeof element=="number"?stats[key]=0:typeof element=="bigint"?stats[key]=BigInt(0):nodeUtils.types.isDate(element)&&(stats[key]=new Date(0));}return stats}exports.clearStats=clearStats;function convertToBigIntStats(stats){let bigintStats=new BigIntStatsEntry;for(let key in stats)if(Object.prototype.hasOwnProperty.call(stats,key)){let element=stats[key];typeof element=="number"?bigintStats[key]=BigInt(element):nodeUtils.types.isDate(element)&&(bigintStats[key]=new Date(element));}return bigintStats.atimeNs=bigintStats.atimeMs*BigInt(1e6),bigintStats.mtimeNs=bigintStats.mtimeMs*BigInt(1e6),bigintStats.ctimeNs=bigintStats.ctimeMs*BigInt(1e6),bigintStats.birthtimeNs=bigintStats.birthtimeMs*BigInt(1e6),bigintStats}exports.convertToBigIntStats=convertToBigIntStats;function areStatsEqual(a,b){if(a.atimeMs!==b.atimeMs||a.birthtimeMs!==b.birthtimeMs||a.blksize!==b.blksize||a.blocks!==b.blocks||a.ctimeMs!==b.ctimeMs||a.dev!==b.dev||a.gid!==b.gid||a.ino!==b.ino||a.isBlockDevice()!==b.isBlockDevice()||a.isCharacterDevice()!==b.isCharacterDevice()||a.isDirectory()!==b.isDirectory()||a.isFIFO()!==b.isFIFO()||a.isFile()!==b.isFile()||a.isSocket()!==b.isSocket()||a.isSymbolicLink()!==b.isSymbolicLink()||a.mode!==b.mode||a.mtimeMs!==b.mtimeMs||a.nlink!==b.nlink||a.rdev!==b.rdev||a.size!==b.size||a.uid!==b.uid)return !1;let aN=a,bN=b;return !(aN.atimeNs!==bN.atimeNs||aN.mtimeNs!==bN.mtimeNs||aN.ctimeNs!==bN.ctimeNs||aN.birthtimeNs!==bN.birthtimeNs)}exports.areStatsEqual=areStatsEqual;}});var require_path=__commonJS({"../../node_modules/@yarnpkg/fslib/lib/path.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.toFilename=exports.convertPath=exports.ppath=exports.npath=exports.Filename=exports.PortablePath=void 0;var tslib_1=(init_tslib_es6(),__toCommonJS(tslib_es6_exports)),path_1=tslib_1.__importDefault(__require("path")),PathType;(function(PathType2){PathType2[PathType2.File=0]="File",PathType2[PathType2.Portable=1]="Portable",PathType2[PathType2.Native=2]="Native";})(PathType||(PathType={}));exports.PortablePath={root:"/",dot:".",parent:".."};exports.Filename={nodeModules:"node_modules",manifest:"package.json",lockfile:"yarn.lock",virtual:"__virtual__",pnpJs:".pnp.js",pnpCjs:".pnp.cjs",rc:".yarnrc.yml"};exports.npath=Object.create(path_1.default);exports.ppath=Object.create(path_1.default.posix);exports.npath.cwd=()=>process.cwd();exports.ppath.cwd=()=>toPortablePath(process.cwd());exports.ppath.resolve=(...segments)=>segments.length>0&&exports.ppath.isAbsolute(segments[0])?path_1.default.posix.resolve(...segments):path_1.default.posix.resolve(exports.ppath.cwd(),...segments);var contains=function(pathUtils,from,to){return from=pathUtils.normalize(from),to=pathUtils.normalize(to),from===to?".":(from.endsWith(pathUtils.sep)||(from=from+pathUtils.sep),to.startsWith(from)?to.slice(from.length):null)};exports.npath.fromPortablePath=fromPortablePath;exports.npath.toPortablePath=toPortablePath;exports.npath.contains=(from,to)=>contains(exports.npath,from,to);exports.ppath.contains=(from,to)=>contains(exports.ppath,from,to);var WINDOWS_PATH_REGEXP=/^([a-zA-Z]:.*)$/,UNC_WINDOWS_PATH_REGEXP=/^\/\/(\.\/)?(.*)$/,PORTABLE_PATH_REGEXP=/^\/([a-zA-Z]:.*)$/,UNC_PORTABLE_PATH_REGEXP=/^\/unc\/(\.dot\/)?(.*)$/;function fromPortablePath(p){if(process.platform!=="win32")return p;let portablePathMatch,uncPortablePathMatch;if(portablePathMatch=p.match(PORTABLE_PATH_REGEXP))p=portablePathMatch[1];else if(uncPortablePathMatch=p.match(UNC_PORTABLE_PATH_REGEXP))p=`\\\\${uncPortablePathMatch[1]?".\\":""}${uncPortablePathMatch[2]}`;else return p;return p.replace(/\//g,"\\")}function toPortablePath(p){if(process.platform!=="win32")return p;p=p.replace(/\\/g,"/");let windowsPathMatch,uncWindowsPathMatch;return (windowsPathMatch=p.match(WINDOWS_PATH_REGEXP))?p=`/${windowsPathMatch[1]}`:(uncWindowsPathMatch=p.match(UNC_WINDOWS_PATH_REGEXP))&&(p=`/unc/${uncWindowsPathMatch[1]?".dot/":""}${uncWindowsPathMatch[2]}`),p}function convertPath(targetPathUtils,sourcePath){return targetPathUtils===exports.npath?fromPortablePath(sourcePath):toPortablePath(sourcePath)}exports.convertPath=convertPath;function toFilename(filename){if(exports.npath.parse(filename).dir!==""||exports.ppath.parse(filename).dir!=="")throw new Error(`Invalid filename: "${filename}"`);return filename}exports.toFilename=toFilename;}});var require_copyPromise=__commonJS({"../../node_modules/@yarnpkg/fslib/lib/algorithms/copyPromise.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.copyPromise=exports.LinkStrategy=void 0;var tslib_1=(init_tslib_es6(),__toCommonJS(tslib_es6_exports)),fs_1=tslib_1.__importDefault(__require("fs")),constants=tslib_1.__importStar(require_constants()),path_1=require_path(),defaultTime=new Date(constants.SAFE_TIME*1e3),LinkStrategy;(function(LinkStrategy2){LinkStrategy2.Allow="allow",LinkStrategy2.ReadOnly="readOnly";})(LinkStrategy=exports.LinkStrategy||(exports.LinkStrategy={}));async function copyPromise(destinationFs,destination,sourceFs,source,opts){let normalizedDestination=destinationFs.pathUtils.normalize(destination),normalizedSource=sourceFs.pathUtils.normalize(source),prelayout=[],postlayout=[],{atime,mtime}=opts.stableTime?{atime:defaultTime,mtime:defaultTime}:await sourceFs.lstatPromise(normalizedSource);await destinationFs.mkdirpPromise(destinationFs.pathUtils.dirname(destination),{utimes:[atime,mtime]});let updateTime=typeof destinationFs.lutimesPromise=="function"?destinationFs.lutimesPromise.bind(destinationFs):destinationFs.utimesPromise.bind(destinationFs);await copyImpl(prelayout,postlayout,updateTime,destinationFs,normalizedDestination,sourceFs,normalizedSource,{...opts,didParentExist:!0});for(let operation of prelayout)await operation();await Promise.all(postlayout.map(operation=>operation()));}exports.copyPromise=copyPromise;async function copyImpl(prelayout,postlayout,updateTime,destinationFs,destination,sourceFs,source,opts){var _a,_b;let destinationStat=opts.didParentExist?await maybeLStat(destinationFs,destination):null,sourceStat=await sourceFs.lstatPromise(source),{atime,mtime}=opts.stableTime?{atime:defaultTime,mtime:defaultTime}:sourceStat,updated;switch(!0){case sourceStat.isDirectory():updated=await copyFolder(prelayout,postlayout,updateTime,destinationFs,destination,destinationStat,sourceFs,source,sourceStat,opts);break;case sourceStat.isFile():updated=await copyFile(prelayout,postlayout,updateTime,destinationFs,destination,destinationStat,sourceFs,source,sourceStat,opts);break;case sourceStat.isSymbolicLink():updated=await copySymlink(prelayout,postlayout,updateTime,destinationFs,destination,destinationStat,sourceFs,source,sourceStat,opts);break;default:throw new Error(`Unsupported file type (${sourceStat.mode})`)}return (updated||((_a=destinationStat?.mtime)===null||_a===void 0?void 0:_a.getTime())!==mtime.getTime()||((_b=destinationStat?.atime)===null||_b===void 0?void 0:_b.getTime())!==atime.getTime())&&(postlayout.push(()=>updateTime(destination,atime,mtime)),updated=!0),(destinationStat===null||(destinationStat.mode&511)!==(sourceStat.mode&511))&&(postlayout.push(()=>destinationFs.chmodPromise(destination,sourceStat.mode&511)),updated=!0),updated}async function maybeLStat(baseFs,p){try{return await baseFs.lstatPromise(p)}catch{return null}}async function copyFolder(prelayout,postlayout,updateTime,destinationFs,destination,destinationStat,sourceFs,source,sourceStat,opts){if(destinationStat!==null&&!destinationStat.isDirectory())if(opts.overwrite)prelayout.push(async()=>destinationFs.removePromise(destination)),destinationStat=null;else return !1;let updated=!1;destinationStat===null&&(prelayout.push(async()=>{try{await destinationFs.mkdirPromise(destination,{mode:sourceStat.mode});}catch(err){if(err.code!=="EEXIST")throw err}}),updated=!0);let entries2=await sourceFs.readdirPromise(source),nextOpts=opts.didParentExist&&!destinationStat?{...opts,didParentExist:!1}:opts;if(opts.stableSort)for(let entry of entries2.sort())await copyImpl(prelayout,postlayout,updateTime,destinationFs,destinationFs.pathUtils.join(destination,entry),sourceFs,sourceFs.pathUtils.join(source,entry),nextOpts)&&(updated=!0);else (await Promise.all(entries2.map(async entry=>{await copyImpl(prelayout,postlayout,updateTime,destinationFs,destinationFs.pathUtils.join(destination,entry),sourceFs,sourceFs.pathUtils.join(source,entry),nextOpts);}))).some(status=>status)&&(updated=!0);return updated}var isCloneSupportedCache=new WeakMap;function makeLinkOperation(opFs,destination,source,sourceStat,linkStrategy){return async()=>{await opFs.linkPromise(source,destination),linkStrategy===LinkStrategy.ReadOnly&&(sourceStat.mode&=-147,await opFs.chmodPromise(destination,sourceStat.mode));}}function makeCloneLinkOperation(opFs,destination,source,sourceStat,linkStrategy){let isCloneSupported=isCloneSupportedCache.get(opFs);return typeof isCloneSupported>"u"?async()=>{try{await opFs.copyFilePromise(source,destination,fs_1.default.constants.COPYFILE_FICLONE_FORCE),isCloneSupportedCache.set(opFs,!0);}catch(err){if(err.code==="ENOSYS"||err.code==="ENOTSUP")isCloneSupportedCache.set(opFs,!1),await makeLinkOperation(opFs,destination,source,sourceStat,linkStrategy)();else throw err}}:isCloneSupported?async()=>opFs.copyFilePromise(source,destination,fs_1.default.constants.COPYFILE_FICLONE_FORCE):makeLinkOperation(opFs,destination,source,sourceStat,linkStrategy)}async function copyFile(prelayout,postlayout,updateTime,destinationFs,destination,destinationStat,sourceFs,source,sourceStat,opts){var _a;if(destinationStat!==null)if(opts.overwrite)prelayout.push(async()=>destinationFs.removePromise(destination)),destinationStat=null;else return !1;let linkStrategy=(_a=opts.linkStrategy)!==null&&_a!==void 0?_a:null,op=destinationFs===sourceFs?linkStrategy!==null?makeCloneLinkOperation(destinationFs,destination,source,sourceStat,linkStrategy):async()=>destinationFs.copyFilePromise(source,destination,fs_1.default.constants.COPYFILE_FICLONE):linkStrategy!==null?makeLinkOperation(destinationFs,destination,source,sourceStat,linkStrategy):async()=>destinationFs.writeFilePromise(destination,await sourceFs.readFilePromise(source));return prelayout.push(async()=>op()),!0}async function copySymlink(prelayout,postlayout,updateTime,destinationFs,destination,destinationStat,sourceFs,source,sourceStat,opts){if(destinationStat!==null)if(opts.overwrite)prelayout.push(async()=>destinationFs.removePromise(destination)),destinationStat=null;else return !1;return prelayout.push(async()=>{await destinationFs.symlinkPromise((0, path_1.convertPath)(destinationFs.pathUtils,await sourceFs.readlinkPromise(source)),destination);}),!0}}});var require_errors3=__commonJS({"../../node_modules/@yarnpkg/fslib/lib/errors.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.LibzipError=exports.ERR_DIR_CLOSED=exports.EOPNOTSUPP=exports.ENOTEMPTY=exports.EROFS=exports.EEXIST=exports.EISDIR=exports.ENOTDIR=exports.ENOENT=exports.EBADF=exports.EINVAL=exports.ENOSYS=exports.EBUSY=void 0;function makeError(code,message){return Object.assign(new Error(`${code}: ${message}`),{code})}function EBUSY(message){return makeError("EBUSY",message)}exports.EBUSY=EBUSY;function ENOSYS(message,reason){return makeError("ENOSYS",`${message}, ${reason}`)}exports.ENOSYS=ENOSYS;function EINVAL(reason){return makeError("EINVAL",`invalid argument, ${reason}`)}exports.EINVAL=EINVAL;function EBADF(reason){return makeError("EBADF",`bad file descriptor, ${reason}`)}exports.EBADF=EBADF;function ENOENT(reason){return makeError("ENOENT",`no such file or directory, ${reason}`)}exports.ENOENT=ENOENT;function ENOTDIR(reason){return makeError("ENOTDIR",`not a directory, ${reason}`)}exports.ENOTDIR=ENOTDIR;function EISDIR(reason){return makeError("EISDIR",`illegal operation on a directory, ${reason}`)}exports.EISDIR=EISDIR;function EEXIST(reason){return makeError("EEXIST",`file already exists, ${reason}`)}exports.EEXIST=EEXIST;function EROFS(reason){return makeError("EROFS",`read-only filesystem, ${reason}`)}exports.EROFS=EROFS;function ENOTEMPTY(reason){return makeError("ENOTEMPTY",`directory not empty, ${reason}`)}exports.ENOTEMPTY=ENOTEMPTY;function EOPNOTSUPP(reason){return makeError("EOPNOTSUPP",`operation not supported, ${reason}`)}exports.EOPNOTSUPP=EOPNOTSUPP;function ERR_DIR_CLOSED(){return makeError("ERR_DIR_CLOSED","Directory handle was closed")}exports.ERR_DIR_CLOSED=ERR_DIR_CLOSED;var LibzipError=class extends Error{constructor(message,code){super(message),this.name="Libzip Error",this.code=code;}};exports.LibzipError=LibzipError;}});var require_opendir=__commonJS({"../../node_modules/@yarnpkg/fslib/lib/algorithms/opendir.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.opendir=exports.CustomDir=void 0;var tslib_1=(init_tslib_es6(),__toCommonJS(tslib_es6_exports)),errors=tslib_1.__importStar(require_errors3()),CustomDir=class{constructor(path13,nextDirent,opts={}){this.path=path13,this.nextDirent=nextDirent,this.opts=opts,this.closed=!1;}throwIfClosed(){if(this.closed)throw errors.ERR_DIR_CLOSED()}async*[Symbol.asyncIterator](){try{let dirent;for(;(dirent=await this.read())!==null;)yield dirent;}finally{await this.close();}}read(cb){let dirent=this.readSync();return typeof cb<"u"?cb(null,dirent):Promise.resolve(dirent)}readSync(){return this.throwIfClosed(),this.nextDirent()}close(cb){return this.closeSync(),typeof cb<"u"?cb(null):Promise.resolve()}closeSync(){var _a,_b;this.throwIfClosed(),(_b=(_a=this.opts).onClose)===null||_b===void 0||_b.call(_a),this.closed=!0;}};exports.CustomDir=CustomDir;function opendir(fakeFs,path13,entries2,opts){let nextDirent=()=>{let filename=entries2.shift();return typeof filename>"u"?null:Object.assign(fakeFs.statSync(fakeFs.pathUtils.join(path13,filename)),{name:filename})};return new CustomDir(path13,nextDirent,opts)}exports.opendir=opendir;}});var require_FakeFS=__commonJS({"../../node_modules/@yarnpkg/fslib/lib/FakeFS.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.normalizeLineEndings=exports.BasePortableFakeFS=exports.FakeFS=void 0;var os_1=__require("os"),copyPromise_1=require_copyPromise(),path_1=require_path(),FakeFS=class{constructor(pathUtils){this.pathUtils=pathUtils;}async*genTraversePromise(init2,{stableSort=!1}={}){let stack=[init2];for(;stack.length>0;){let p=stack.shift();if((await this.lstatPromise(p)).isDirectory()){let entries2=await this.readdirPromise(p);if(stableSort)for(let entry2 of entries2.sort())stack.push(this.pathUtils.join(p,entry2));else throw new Error("Not supported")}else yield p;}}async removePromise(p,{recursive=!0,maxRetries=5}={}){let stat;try{stat=await this.lstatPromise(p);}catch(error){if(error.code==="ENOENT")return;throw error}if(stat.isDirectory()){if(recursive){let entries2=await this.readdirPromise(p);await Promise.all(entries2.map(entry=>this.removePromise(this.pathUtils.resolve(p,entry))));}for(let t=0;t<=maxRetries;t++)try{await this.rmdirPromise(p);break}catch(error){if(error.code!=="EBUSY"&&error.code!=="ENOTEMPTY")throw error;t<maxRetries&&await new Promise(resolve3=>setTimeout(resolve3,t*100));}}else await this.unlinkPromise(p);}removeSync(p,{recursive=!0}={}){let stat;try{stat=this.lstatSync(p);}catch(error){if(error.code==="ENOENT")return;throw error}if(stat.isDirectory()){if(recursive)for(let entry of this.readdirSync(p))this.removeSync(this.pathUtils.resolve(p,entry));this.rmdirSync(p);}else this.unlinkSync(p);}async mkdirpPromise(p,{chmod,utimes}={}){if(p=this.resolve(p),p===this.pathUtils.dirname(p))return;let parts=p.split(this.pathUtils.sep),createdDirectory;for(let u=2;u<=parts.length;++u){let subPath=parts.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(subPath)){try{await this.mkdirPromise(subPath);}catch(error){if(error.code==="EEXIST")continue;throw error}if(createdDirectory??(createdDirectory=subPath),chmod!=null&&await this.chmodPromise(subPath,chmod),utimes!=null)await this.utimesPromise(subPath,utimes[0],utimes[1]);else {let parentStat=await this.statPromise(this.pathUtils.dirname(subPath));await this.utimesPromise(subPath,parentStat.atime,parentStat.mtime);}}}return createdDirectory}mkdirpSync(p,{chmod,utimes}={}){if(p=this.resolve(p),p===this.pathUtils.dirname(p))return;let parts=p.split(this.pathUtils.sep),createdDirectory;for(let u=2;u<=parts.length;++u){let subPath=parts.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(subPath)){try{this.mkdirSync(subPath);}catch(error){if(error.code==="EEXIST")continue;throw error}if(createdDirectory??(createdDirectory=subPath),chmod!=null&&this.chmodSync(subPath,chmod),utimes!=null)this.utimesSync(subPath,utimes[0],utimes[1]);else {let parentStat=this.statSync(this.pathUtils.dirname(subPath));this.utimesSync(subPath,parentStat.atime,parentStat.mtime);}}}return createdDirectory}async copyPromise(destination,source,{baseFs=this,overwrite=!0,stableSort=!1,stableTime=!1,linkStrategy=null}={}){return await(0, copyPromise_1.copyPromise)(this,destination,baseFs,source,{overwrite,stableSort,stableTime,linkStrategy})}copySync(destination,source,{baseFs=this,overwrite=!0}={}){let stat=baseFs.lstatSync(source),exists=this.existsSync(destination);if(stat.isDirectory()){this.mkdirpSync(destination);let directoryListing=baseFs.readdirSync(source);for(let entry of directoryListing)this.copySync(this.pathUtils.join(destination,entry),baseFs.pathUtils.join(source,entry),{baseFs,overwrite});}else if(stat.isFile()){if(!exists||overwrite){exists&&this.removeSync(destination);let content=baseFs.readFileSync(source);this.writeFileSync(destination,content);}}else if(stat.isSymbolicLink()){if(!exists||overwrite){exists&&this.removeSync(destination);let target=baseFs.readlinkSync(source);this.symlinkSync((0, path_1.convertPath)(this.pathUtils,target),destination);}}else throw new Error(`Unsupported file type (file: ${source}, mode: 0o${stat.mode.toString(8).padStart(6,"0")})`);let mode=stat.mode&511;this.chmodSync(destination,mode);}async changeFilePromise(p,content,opts={}){return Buffer.isBuffer(content)?this.changeFileBufferPromise(p,content,opts):this.changeFileTextPromise(p,content,opts)}async changeFileBufferPromise(p,content,{mode}={}){let current=Buffer.alloc(0);try{current=await this.readFilePromise(p);}catch{}Buffer.compare(current,content)!==0&&await this.writeFilePromise(p,content,{mode});}async changeFileTextPromise(p,content,{automaticNewlines,mode}={}){let current="";try{current=await this.readFilePromise(p,"utf8");}catch{}let normalizedContent=automaticNewlines?normalizeLineEndings(current,content):content;current!==normalizedContent&&await this.writeFilePromise(p,normalizedContent,{mode});}changeFileSync(p,content,opts={}){return Buffer.isBuffer(content)?this.changeFileBufferSync(p,content,opts):this.changeFileTextSync(p,content,opts)}changeFileBufferSync(p,content,{mode}={}){let current=Buffer.alloc(0);try{current=this.readFileSync(p);}catch{}Buffer.compare(current,content)!==0&&this.writeFileSync(p,content,{mode});}changeFileTextSync(p,content,{automaticNewlines=!1,mode}={}){let current="";try{current=this.readFileSync(p,"utf8");}catch{}let normalizedContent=automaticNewlines?normalizeLineEndings(current,content):content;current!==normalizedContent&&this.writeFileSync(p,normalizedContent,{mode});}async movePromise(fromP,toP){try{await this.renamePromise(fromP,toP);}catch(error){if(error.code==="EXDEV")await this.copyPromise(toP,fromP),await this.removePromise(fromP);else throw error}}moveSync(fromP,toP){try{this.renameSync(fromP,toP);}catch(error){if(error.code==="EXDEV")this.copySync(toP,fromP),this.removeSync(fromP);else throw error}}async lockPromise(affectedPath,callback){let lockPath=`${affectedPath}.flock`,interval=1e3/60,startTime=Date.now(),fd=null,isAlive=async()=>{let pid;try{[pid]=await this.readJsonPromise(lockPath);}catch{return Date.now()-startTime<500}try{return process.kill(pid,0),!0}catch{return !1}};for(;fd===null;)try{fd=await this.openPromise(lockPath,"wx");}catch(error){if(error.code==="EEXIST"){if(!await isAlive())try{await this.unlinkPromise(lockPath);continue}catch{}if(Date.now()-startTime<60*1e3)await new Promise(resolve3=>setTimeout(resolve3,interval));else throw new Error(`Couldn't acquire a lock in a reasonable time (via ${lockPath})`)}else throw error}await this.writePromise(fd,JSON.stringify([process.pid]));try{return await callback()}finally{try{await this.closePromise(fd),await this.unlinkPromise(lockPath);}catch{}}}async readJsonPromise(p){let content=await this.readFilePromise(p,"utf8");try{return JSON.parse(content)}catch(error){throw error.message+=` (in ${p})`,error}}readJsonSync(p){let content=this.readFileSync(p,"utf8");try{return JSON.parse(content)}catch(error){throw error.message+=` (in ${p})`,error}}async writeJsonPromise(p,data){return await this.writeFilePromise(p,`${JSON.stringify(data,null,2)}
85
+ `);return Buffer.from(result)};exports.decodePax=function(buf){for(var result={};buf.length;){for(var i=0;i<buf.length&&buf[i]!==32;)i++;var len=parseInt(buf.slice(0,i).toString(),10);if(!len)return result;var b=buf.slice(i+1,len-1).toString(),keyIndex=b.indexOf("=");if(keyIndex===-1)return result;result[b.slice(0,keyIndex)]=b.slice(keyIndex+1),buf=buf.slice(len);}return result};exports.encode=function(opts){var buf=alloc(512),name=opts.name,prefix="";if(opts.typeflag===5&&name[name.length-1]!=="/"&&(name+="/"),Buffer.byteLength(name)!==name.length)return null;for(;Buffer.byteLength(name)>100;){var i=name.indexOf("/");if(i===-1)return null;prefix+=prefix?"/"+name.slice(0,i):name.slice(0,i),name=name.slice(i+1);}return Buffer.byteLength(name)>100||Buffer.byteLength(prefix)>155||opts.linkname&&Buffer.byteLength(opts.linkname)>100?null:(buf.write(name),buf.write(encodeOct(opts.mode&MASK,6),100),buf.write(encodeOct(opts.uid,6),108),buf.write(encodeOct(opts.gid,6),116),buf.write(encodeOct(opts.size,11),124),buf.write(encodeOct(opts.mtime.getTime()/1e3|0,11),136),buf[156]=ZERO_OFFSET+toTypeflag(opts.type),opts.linkname&&buf.write(opts.linkname,157),USTAR_MAGIC.copy(buf,MAGIC_OFFSET),USTAR_VER.copy(buf,VERSION_OFFSET),opts.uname&&buf.write(opts.uname,265),opts.gname&&buf.write(opts.gname,297),buf.write(encodeOct(opts.devmajor||0,6),329),buf.write(encodeOct(opts.devminor||0,6),337),prefix&&buf.write(prefix,345),buf.write(encodeOct(cksum(buf),6),148),buf)};exports.decode=function(buf,filenameEncoding,allowUnknownFormat){var typeflag=buf[156]===0?0:buf[156]-ZERO_OFFSET,name=decodeStr(buf,0,100,filenameEncoding),mode=decodeOct(buf,100,8),uid=decodeOct(buf,108,8),gid=decodeOct(buf,116,8),size=decodeOct(buf,124,12),mtime=decodeOct(buf,136,12),type=toType(typeflag),linkname=buf[157]===0?null:decodeStr(buf,157,100,filenameEncoding),uname=decodeStr(buf,265,32),gname=decodeStr(buf,297,32),devmajor=decodeOct(buf,329,8),devminor=decodeOct(buf,337,8),c=cksum(buf);if(c===8*32)return null;if(c!==decodeOct(buf,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(USTAR_MAGIC.compare(buf,MAGIC_OFFSET,MAGIC_OFFSET+6)===0)buf[345]&&(name=decodeStr(buf,345,155,filenameEncoding)+"/"+name);else if(!(GNU_MAGIC.compare(buf,MAGIC_OFFSET,MAGIC_OFFSET+6)===0&&GNU_VER.compare(buf,VERSION_OFFSET,VERSION_OFFSET+2)===0)){if(!allowUnknownFormat)throw new Error("Invalid tar header: unknown format.")}return typeflag===0&&name&&name[name.length-1]==="/"&&(typeflag=5),{name,mode,uid,gid,size,mtime:new Date(1e3*mtime),type,linkname,uname,gname,devmajor,devminor}};}});var require_extract=__commonJS({"../../node_modules/tar-stream/extract.js"(exports,module){var util=__require("util"),bl=require_bl(),headers=require_headers(),Writable=require_readable().Writable,PassThrough3=require_readable().PassThrough,noop3=function(){},overflow=function(size){return size&=511,size&&512-size},emptyStream=function(self2,offset){var s=new Source(self2,offset);return s.end(),s},mixinPax=function(header,pax){return pax.path&&(header.name=pax.path),pax.linkpath&&(header.linkname=pax.linkpath),pax.size&&(header.size=parseInt(pax.size,10)),header.pax=pax,header},Source=function(self2,offset){this._parent=self2,this.offset=offset,PassThrough3.call(this,{autoDestroy:!1});};util.inherits(Source,PassThrough3);Source.prototype.destroy=function(err){this._parent.destroy(err);};var Extract=function(opts){if(!(this instanceof Extract))return new Extract(opts);Writable.call(this,opts),opts=opts||{},this._offset=0,this._buffer=bl(),this._missing=0,this._partial=!1,this._onparse=noop3,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var self2=this,b=self2._buffer,oncontinue=function(){self2._continue();},onunlock=function(err){if(self2._locked=!1,err)return self2.destroy(err);self2._stream||oncontinue();},onstreamend=function(){self2._stream=null;var drain=overflow(self2._header.size);drain?self2._parse(drain,ondrain):self2._parse(512,onheader),self2._locked||oncontinue();},ondrain=function(){self2._buffer.consume(overflow(self2._header.size)),self2._parse(512,onheader),oncontinue();},onpaxglobalheader=function(){var size=self2._header.size;self2._paxGlobal=headers.decodePax(b.slice(0,size)),b.consume(size),onstreamend();},onpaxheader=function(){var size=self2._header.size;self2._pax=headers.decodePax(b.slice(0,size)),self2._paxGlobal&&(self2._pax=Object.assign({},self2._paxGlobal,self2._pax)),b.consume(size),onstreamend();},ongnulongpath=function(){var size=self2._header.size;this._gnuLongPath=headers.decodeLongPath(b.slice(0,size),opts.filenameEncoding),b.consume(size),onstreamend();},ongnulonglinkpath=function(){var size=self2._header.size;this._gnuLongLinkPath=headers.decodeLongPath(b.slice(0,size),opts.filenameEncoding),b.consume(size),onstreamend();},onheader=function(){var offset=self2._offset,header;try{header=self2._header=headers.decode(b.slice(0,512),opts.filenameEncoding,opts.allowUnknownFormat);}catch(err){self2.emit("error",err);}if(b.consume(512),!header){self2._parse(512,onheader),oncontinue();return}if(header.type==="gnu-long-path"){self2._parse(header.size,ongnulongpath),oncontinue();return}if(header.type==="gnu-long-link-path"){self2._parse(header.size,ongnulonglinkpath),oncontinue();return}if(header.type==="pax-global-header"){self2._parse(header.size,onpaxglobalheader),oncontinue();return}if(header.type==="pax-header"){self2._parse(header.size,onpaxheader),oncontinue();return}if(self2._gnuLongPath&&(header.name=self2._gnuLongPath,self2._gnuLongPath=null),self2._gnuLongLinkPath&&(header.linkname=self2._gnuLongLinkPath,self2._gnuLongLinkPath=null),self2._pax&&(self2._header=header=mixinPax(header,self2._pax),self2._pax=null),self2._locked=!0,!header.size||header.type==="directory"){self2._parse(512,onheader),self2.emit("entry",header,emptyStream(self2,offset),onunlock);return}self2._stream=new Source(self2,offset),self2.emit("entry",header,self2._stream,onunlock),self2._parse(header.size,onstreamend),oncontinue();};this._onheader=onheader,this._parse(512,onheader);};util.inherits(Extract,Writable);Extract.prototype.destroy=function(err){this._destroyed||(this._destroyed=!0,err&&this.emit("error",err),this.emit("close"),this._stream&&this._stream.emit("close"));};Extract.prototype._parse=function(size,onparse){this._destroyed||(this._offset+=size,this._missing=size,onparse===this._onheader&&(this._partial=!1),this._onparse=onparse);};Extract.prototype._continue=function(){if(!this._destroyed){var cb=this._cb;this._cb=noop3,this._overflow?this._write(this._overflow,void 0,cb):cb();}};Extract.prototype._write=function(data,enc,cb){if(!this._destroyed){var s=this._stream,b=this._buffer,missing=this._missing;if(data.length&&(this._partial=!0),data.length<missing)return this._missing-=data.length,this._overflow=null,s?s.write(data,cb):(b.append(data),cb());this._cb=cb,this._missing=0;var overflow2=null;data.length>missing&&(overflow2=data.slice(missing),data=data.slice(0,missing)),s?s.end(data):b.append(data),this._overflow=overflow2,this._onparse();}};Extract.prototype._final=function(cb){if(this._partial)return this.destroy(new Error("Unexpected end of data"));cb();};module.exports=Extract;}});var require_fs_constants=__commonJS({"../../node_modules/fs-constants/index.js"(exports,module){module.exports=__require("fs").constants||__require("constants");}});var require_pack=__commonJS({"../../node_modules/tar-stream/pack.js"(exports,module){var constants=require_fs_constants(),eos=require_end_of_stream(),inherits=require_inherits(),alloc=Buffer.alloc,Readable=require_readable().Readable,Writable=require_readable().Writable,StringDecoder=__require("string_decoder").StringDecoder,headers=require_headers(),DMODE=parseInt("755",8),FMODE=parseInt("644",8),END_OF_TAR=alloc(1024),noop3=function(){},overflow=function(self2,size){size&=511,size&&self2.push(END_OF_TAR.slice(0,512-size));};function modeToType(mode){switch(mode&constants.S_IFMT){case constants.S_IFBLK:return "block-device";case constants.S_IFCHR:return "character-device";case constants.S_IFDIR:return "directory";case constants.S_IFIFO:return "fifo";case constants.S_IFLNK:return "symlink"}return "file"}var Sink=function(to){Writable.call(this),this.written=0,this._to=to,this._destroyed=!1;};inherits(Sink,Writable);Sink.prototype._write=function(data,enc,cb){if(this.written+=data.length,this._to.push(data))return cb();this._to._drain=cb;};Sink.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"));};var LinkSink=function(){Writable.call(this),this.linkname="",this._decoder=new StringDecoder("utf-8"),this._destroyed=!1;};inherits(LinkSink,Writable);LinkSink.prototype._write=function(data,enc,cb){this.linkname+=this._decoder.write(data),cb();};LinkSink.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"));};var Void=function(){Writable.call(this),this._destroyed=!1;};inherits(Void,Writable);Void.prototype._write=function(data,enc,cb){cb(new Error("No body allowed for this entry"));};Void.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"));};var Pack=function(opts){if(!(this instanceof Pack))return new Pack(opts);Readable.call(this,opts),this._drain=noop3,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null;};inherits(Pack,Readable);Pack.prototype.entry=function(header,buffer,callback){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof buffer=="function"&&(callback=buffer,buffer=null),callback||(callback=noop3);var self2=this;if((!header.size||header.type==="symlink")&&(header.size=0),header.type||(header.type=modeToType(header.mode)),header.mode||(header.mode=header.type==="directory"?DMODE:FMODE),header.uid||(header.uid=0),header.gid||(header.gid=0),header.mtime||(header.mtime=new Date),typeof buffer=="string"&&(buffer=Buffer.from(buffer)),Buffer.isBuffer(buffer)){header.size=buffer.length,this._encode(header);var ok=this.push(buffer);return overflow(self2,header.size),ok?process.nextTick(callback):this._drain=callback,new Void}if(header.type==="symlink"&&!header.linkname){var linkSink=new LinkSink;return eos(linkSink,function(err){if(err)return self2.destroy(),callback(err);header.linkname=linkSink.linkname,self2._encode(header),callback();}),linkSink}if(this._encode(header),header.type!=="file"&&header.type!=="contiguous-file")return process.nextTick(callback),new Void;var sink=new Sink(this);return this._stream=sink,eos(sink,function(err){if(self2._stream=null,err)return self2.destroy(),callback(err);if(sink.written!==header.size)return self2.destroy(),callback(new Error("size mismatch"));overflow(self2,header.size),self2._finalizing&&self2.finalize(),callback();}),sink}};Pack.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(END_OF_TAR),this.push(null));};Pack.prototype.destroy=function(err){this._destroyed||(this._destroyed=!0,err&&this.emit("error",err),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy());};Pack.prototype._encode=function(header){if(!header.pax){var buf=headers.encode(header);if(buf){this.push(buf);return}}this._encodePax(header);};Pack.prototype._encodePax=function(header){var paxHeader=headers.encodePax({name:header.name,linkname:header.linkname,pax:header.pax}),newHeader={name:"PaxHeader",mode:header.mode,uid:header.uid,gid:header.gid,size:paxHeader.length,mtime:header.mtime,type:"pax-header",linkname:header.linkname&&"PaxHeader",uname:header.uname,gname:header.gname,devmajor:header.devmajor,devminor:header.devminor};this.push(headers.encode(newHeader)),this.push(paxHeader),overflow(this,paxHeader.length),newHeader.size=header.size,newHeader.type=header.type,this.push(headers.encode(newHeader));};Pack.prototype._read=function(n){var drain=this._drain;this._drain=noop3,drain();};module.exports=Pack;}});var require_tar_stream=__commonJS({"../../node_modules/tar-stream/index.js"(exports){exports.extract=require_extract();exports.pack=require_pack();}});var require_mkdirp_classic=__commonJS({"../../node_modules/mkdirp-classic/index.js"(exports,module){var path13=__require("path"),fs8=__require("fs"),_0777=parseInt("0777",8);module.exports=mkdirP.mkdirp=mkdirP.mkdirP=mkdirP;function mkdirP(p,opts,f,made){typeof opts=="function"?(f=opts,opts={}):(!opts||typeof opts!="object")&&(opts={mode:opts});var mode=opts.mode,xfs=opts.fs||fs8;mode===void 0&&(mode=_0777&~process.umask()),made||(made=null);var cb=f||function(){};p=path13.resolve(p),xfs.mkdir(p,mode,function(er){if(!er)return made=made||p,cb(null,made);switch(er.code){case"ENOENT":mkdirP(path13.dirname(p),opts,function(er2,made2){er2?cb(er2,made2):mkdirP(p,opts,cb,made2);});break;default:xfs.stat(p,function(er2,stat){er2||!stat.isDirectory()?cb(er,made):cb(null,made);});break}});}mkdirP.sync=function sync(p,opts,made){(!opts||typeof opts!="object")&&(opts={mode:opts});var mode=opts.mode,xfs=opts.fs||fs8;mode===void 0&&(mode=_0777&~process.umask()),made||(made=null),p=path13.resolve(p);try{xfs.mkdirSync(p,mode),made=made||p;}catch(err0){switch(err0.code){case"ENOENT":made=sync(path13.dirname(p),opts,made),sync(p,opts,made);break;default:var stat;try{stat=xfs.statSync(p);}catch{throw err0}if(!stat.isDirectory())throw err0;break}}return made};}});var require_tar_fs=__commonJS({"../../node_modules/tar-fs/index.js"(exports){var chownr=require_chownr(),tar=require_tar_stream(),pump2=require_pump(),mkdirp=require_mkdirp_classic(),fs8=__require("fs"),path13=__require("path"),os3=__require("os"),win32=os3.platform()==="win32",noop3=function(){},echo=function(name){return name},normalize=win32?function(name){return name.replace(/\\/g,"/").replace(/[:?<>|]/g,"_")}:echo,statAll=function(fs9,stat,cwd,ignore,entries2,sort2){var queue=entries2||["."];return function(callback){if(!queue.length)return callback();var next=queue.shift(),nextAbs=path13.join(cwd,next);stat.call(fs9,nextAbs,function(err,stat2){if(err)return callback(err);if(!stat2.isDirectory())return callback(null,next,stat2);fs9.readdir(nextAbs,function(err2,files){if(err2)return callback(err2);sort2&&files.sort();for(var i=0;i<files.length;i++)ignore(path13.join(cwd,next,files[i]))||queue.push(path13.join(next,files[i]));callback(null,next,stat2);});});}},strip=function(map,level){return function(header){header.name=header.name.split("/").slice(level).join("/");var linkname=header.linkname;return linkname&&(header.type==="link"||path13.isAbsolute(linkname))&&(header.linkname=linkname.split("/").slice(level).join("/")),map(header)}};exports.pack=function(cwd,opts){cwd||(cwd="."),opts||(opts={});var xfs=opts.fs||fs8,ignore=opts.ignore||opts.filter||noop3,map=opts.map||noop3,mapStream=opts.mapStream||echo,statNext=statAll(xfs,opts.dereference?xfs.stat:xfs.lstat,cwd,ignore,opts.entries,opts.sort),strict=opts.strict!==!1,umask=typeof opts.umask=="number"?~opts.umask:~processUmask(),dmode=typeof opts.dmode=="number"?opts.dmode:0,fmode=typeof opts.fmode=="number"?opts.fmode:0,pack=opts.pack||tar.pack(),finish=opts.finish||noop3;opts.strip&&(map=strip(map,opts.strip)),opts.readable&&(dmode|=parseInt(555,8),fmode|=parseInt(444,8)),opts.writable&&(dmode|=parseInt(333,8),fmode|=parseInt(222,8));var onsymlink=function(filename,header){xfs.readlink(path13.join(cwd,filename),function(err,linkname){if(err)return pack.destroy(err);header.linkname=normalize(linkname),pack.entry(header,onnextentry);});},onstat=function(err,filename,stat){if(err)return pack.destroy(err);if(!filename)return opts.finalize!==!1&&pack.finalize(),finish(pack);if(stat.isSocket())return onnextentry();var header={name:normalize(filename),mode:(stat.mode|(stat.isDirectory()?dmode:fmode))&umask,mtime:stat.mtime,size:stat.size,type:"file",uid:stat.uid,gid:stat.gid};if(stat.isDirectory())return header.size=0,header.type="directory",header=map(header)||header,pack.entry(header,onnextentry);if(stat.isSymbolicLink())return header.size=0,header.type="symlink",header=map(header)||header,onsymlink(filename,header);if(header=map(header)||header,!stat.isFile())return strict?pack.destroy(new Error("unsupported type for "+filename)):onnextentry();var entry=pack.entry(header,onnextentry);if(entry){var rs=mapStream(xfs.createReadStream(path13.join(cwd,filename),{start:0,end:header.size>0?header.size-1:header.size}),header);rs.on("error",function(err2){entry.destroy(err2);}),pump2(rs,entry);}},onnextentry=function(err){if(err)return pack.destroy(err);statNext(onstat);};return onnextentry(),pack};var head=function(list){return list.length?list[list.length-1]:null},processGetuid=function(){return process.getuid?process.getuid():-1},processUmask=function(){return process.umask?process.umask():0};exports.extract=function(cwd,opts){cwd||(cwd="."),opts||(opts={});var xfs=opts.fs||fs8,ignore=opts.ignore||opts.filter||noop3,map=opts.map||noop3,mapStream=opts.mapStream||echo,own=opts.chown!==!1&&!win32&&processGetuid()===0,extract2=opts.extract||tar.extract(),stack=[],now=new Date,umask=typeof opts.umask=="number"?~opts.umask:~processUmask(),dmode=typeof opts.dmode=="number"?opts.dmode:0,fmode=typeof opts.fmode=="number"?opts.fmode:0,strict=opts.strict!==!1;opts.strip&&(map=strip(map,opts.strip)),opts.readable&&(dmode|=parseInt(555,8),fmode|=parseInt(444,8)),opts.writable&&(dmode|=parseInt(333,8),fmode|=parseInt(222,8));var utimesParent=function(name,cb){for(var top;(top=head(stack))&&name.slice(0,top[0].length)!==top[0];)stack.pop();if(!top)return cb();xfs.utimes(top[0],now,top[1],cb);},utimes=function(name,header,cb){if(opts.utimes===!1)return cb();if(header.type==="directory")return xfs.utimes(name,now,header.mtime,cb);if(header.type==="symlink")return utimesParent(name,cb);xfs.utimes(name,now,header.mtime,function(err){if(err)return cb(err);utimesParent(name,cb);});},chperm=function(name,header,cb){var link=header.type==="symlink",chmod=link?xfs.lchmod:xfs.chmod,chown=link?xfs.lchown:xfs.chown;if(!chmod)return cb();var mode=(header.mode|(header.type==="directory"?dmode:fmode))&umask;chown&&own?chown.call(xfs,name,header.uid,header.gid,onchown):onchown(null);function onchown(err){if(err)return cb(err);if(!chmod)return cb();chmod.call(xfs,name,mode,cb);}};return extract2.on("entry",function(header,stream2,next){header=map(header)||header,header.name=normalize(header.name);var name=path13.join(cwd,path13.join("/",header.name));if(ignore(name,header))return stream2.resume(),next();var stat=function(err){if(err)return next(err);utimes(name,header,function(err2){if(err2)return next(err2);if(win32)return next();chperm(name,header,next);});},onsymlink=function(){if(win32)return next();xfs.unlink(name,function(){xfs.symlink(header.linkname,name,stat);});},onlink=function(){if(win32)return next();xfs.unlink(name,function(){var srcpath=path13.join(cwd,path13.join("/",header.linkname));xfs.link(srcpath,name,function(err){if(err&&err.code==="EPERM"&&opts.hardlinkAsFilesFallback)return stream2=xfs.createReadStream(srcpath),onfile();stat(err);});});},onfile=function(){var ws=xfs.createWriteStream(name),rs=mapStream(stream2,header);ws.on("error",function(err){rs.destroy(err);}),pump2(rs,ws,function(err){if(err)return next(err);ws.on("close",stat);});};if(header.type==="directory")return stack.push([name,header.mtime]),mkdirfix(name,{fs:xfs,own,uid:header.uid,gid:header.gid},stat);var dir=path13.dirname(name);validate(xfs,dir,path13.join(cwd,"."),function(err,valid){if(err)return next(err);if(!valid)return next(new Error(dir+" is not a valid path"));mkdirfix(dir,{fs:xfs,own,uid:header.uid,gid:header.gid},function(err2){if(err2)return next(err2);switch(header.type){case"file":return onfile();case"link":return onlink();case"symlink":return onsymlink()}if(strict)return next(new Error("unsupported type for "+name+" ("+header.type+")"));stream2.resume(),next();});});}),opts.finish&&extract2.on("finish",opts.finish),extract2};function validate(fs9,name,root,cb){if(name===root)return cb(null,!0);fs9.lstat(name,function(err,st){if(err&&err.code!=="ENOENT")return cb(err);if(err||st.isDirectory())return validate(fs9,path13.join(name,".."),root,cb);cb(null,!1);});}function mkdirfix(name,opts,cb){mkdirp(name,{fs:opts.fs},function(err,made){!err&&made&&opts.own?chownr(made,opts.uid,opts.gid,cb):cb(err);});}}});var require_process_nextick_args=__commonJS({"../../node_modules/process-nextick-args/index.js"(exports,module){typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?module.exports={nextTick}:module.exports=process;function nextTick(fn,arg1,arg2,arg3){if(typeof fn!="function")throw new TypeError('"callback" argument must be a function');var len=arguments.length,args,i;switch(len){case 0:case 1:return process.nextTick(fn);case 2:return process.nextTick(function(){fn.call(null,arg1);});case 3:return process.nextTick(function(){fn.call(null,arg1,arg2);});case 4:return process.nextTick(function(){fn.call(null,arg1,arg2,arg3);});default:for(args=new Array(len-1),i=0;i<args.length;)args[i++]=arguments[i];return process.nextTick(function(){fn.apply(null,args);})}}}});var require_isarray=__commonJS({"../../node_modules/peek-stream/node_modules/isarray/index.js"(exports,module){var toString2={}.toString;module.exports=Array.isArray||function(arr){return toString2.call(arr)=="[object Array]"};}});var require_stream3=__commonJS({"../../node_modules/peek-stream/node_modules/readable-stream/lib/internal/streams/stream.js"(exports,module){module.exports=__require("stream");}});var require_safe_buffer2=__commonJS({"../../node_modules/peek-stream/node_modules/safe-buffer/index.js"(exports,module){var buffer=__require("buffer"),Buffer4=buffer.Buffer;function copyProps(src,dst){for(var key in src)dst[key]=src[key];}Buffer4.from&&Buffer4.alloc&&Buffer4.allocUnsafe&&Buffer4.allocUnsafeSlow?module.exports=buffer:(copyProps(buffer,exports),exports.Buffer=SafeBuffer);function SafeBuffer(arg,encodingOrOffset,length){return Buffer4(arg,encodingOrOffset,length)}copyProps(Buffer4,SafeBuffer);SafeBuffer.from=function(arg,encodingOrOffset,length){if(typeof arg=="number")throw new TypeError("Argument must not be a number");return Buffer4(arg,encodingOrOffset,length)};SafeBuffer.alloc=function(size,fill,encoding){if(typeof size!="number")throw new TypeError("Argument must be a number");var buf=Buffer4(size);return fill!==void 0?typeof encoding=="string"?buf.fill(fill,encoding):buf.fill(fill):buf.fill(0),buf};SafeBuffer.allocUnsafe=function(size){if(typeof size!="number")throw new TypeError("Argument must be a number");return Buffer4(size)};SafeBuffer.allocUnsafeSlow=function(size){if(typeof size!="number")throw new TypeError("Argument must be a number");return buffer.SlowBuffer(size)};}});var require_util=__commonJS({"../../node_modules/core-util-is/lib/util.js"(exports){function isArray(arg){return Array.isArray?Array.isArray(arg):objectToString(arg)==="[object Array]"}exports.isArray=isArray;function isBoolean(arg){return typeof arg=="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg=="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg=="string"}exports.isString=isString;function isSymbol(arg){return typeof arg=="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg=="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return objectToString(e)==="[object Error]"||e instanceof Error}exports.isError=isError;function isFunction2(arg){return typeof arg=="function"}exports.isFunction=isFunction2;function isPrimitive(arg){return arg===null||typeof arg=="boolean"||typeof arg=="number"||typeof arg=="string"||typeof arg=="symbol"||typeof arg>"u"}exports.isPrimitive=isPrimitive;exports.isBuffer=__require("buffer").Buffer.isBuffer;function objectToString(o){return Object.prototype.toString.call(o)}}});var require_BufferList2=__commonJS({"../../node_modules/peek-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js"(exports,module){function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}var Buffer4=require_safe_buffer2().Buffer,util=__require("util");function copyBuffer(src,target,offset){src.copy(target,offset);}module.exports=function(){function BufferList(){_classCallCheck(this,BufferList),this.head=null,this.tail=null,this.length=0;}return BufferList.prototype.push=function(v){var entry={data:v,next:null};this.length>0?this.tail.next=entry:this.head=entry,this.tail=entry,++this.length;},BufferList.prototype.unshift=function(v){var entry={data:v,next:this.head};this.length===0&&(this.tail=entry),this.head=entry,++this.length;},BufferList.prototype.shift=function(){if(this.length!==0){var ret=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,ret}},BufferList.prototype.clear=function(){this.head=this.tail=null,this.length=0;},BufferList.prototype.join=function(s){if(this.length===0)return "";for(var p=this.head,ret=""+p.data;p=p.next;)ret+=s+p.data;return ret},BufferList.prototype.concat=function(n){if(this.length===0)return Buffer4.alloc(0);for(var ret=Buffer4.allocUnsafe(n>>>0),p=this.head,i=0;p;)copyBuffer(p.data,ret,i),i+=p.data.length,p=p.next;return ret},BufferList}();util&&util.inspect&&util.inspect.custom&&(module.exports.prototype[util.inspect.custom]=function(){var obj=util.inspect({length:this.length});return this.constructor.name+" "+obj});}});var require_destroy2=__commonJS({"../../node_modules/peek-stream/node_modules/readable-stream/lib/internal/streams/destroy.js"(exports,module){var pna=require_process_nextick_args();function destroy(err,cb){var _this=this,readableDestroyed=this._readableState&&this._readableState.destroyed,writableDestroyed=this._writableState&&this._writableState.destroyed;return readableDestroyed||writableDestroyed?(cb?cb(err):err&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,pna.nextTick(emitErrorNT,this,err)):pna.nextTick(emitErrorNT,this,err)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(err||null,function(err2){!cb&&err2?_this._writableState?_this._writableState.errorEmitted||(_this._writableState.errorEmitted=!0,pna.nextTick(emitErrorNT,_this,err2)):pna.nextTick(emitErrorNT,_this,err2):cb&&cb(err2);}),this)}function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1);}function emitErrorNT(self2,err){self2.emit("error",err);}module.exports={destroy,undestroy};}});var require_stream_writable2=__commonJS({"../../node_modules/peek-stream/node_modules/readable-stream/lib/_stream_writable.js"(exports,module){var pna=require_process_nextick_args();module.exports=Writable;function CorkedRequest(state){var _this=this;this.next=null,this.entry=null,this.finish=function(){onCorkedFinish(_this,state);};}var asyncWrite=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:pna.nextTick,Duplex2;Writable.WritableState=WritableState;var util=Object.create(require_util());util.inherits=require_inherits();var internalUtil={deprecate:__require("util-deprecate")},Stream3=require_stream3(),Buffer4=require_safe_buffer2().Buffer,OurUint8Array=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer4.from(chunk)}function _isUint8Array(obj){return Buffer4.isBuffer(obj)||obj instanceof OurUint8Array}var destroyImpl=require_destroy2();util.inherits(Writable,Stream3);function nop(){}function WritableState(options,stream2){Duplex2=Duplex2||require_stream_duplex2(),options=options||{};var isDuplex=stream2 instanceof Duplex2;this.objectMode=!!options.objectMode,isDuplex&&(this.objectMode=this.objectMode||!!options.writableObjectMode);var hwm=options.highWaterMark,writableHwm=options.writableHighWaterMark,defaultHwm=this.objectMode?16:16*1024;hwm||hwm===0?this.highWaterMark=hwm:isDuplex&&(writableHwm||writableHwm===0)?this.highWaterMark=writableHwm:this.highWaterMark=defaultHwm,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var noDecode=options.decodeStrings===!1;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream2,er);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this);}WritableState.prototype.getBuffer=function(){for(var current=this.bufferedRequest,out=[];current;)out.push(current),current=current.next;return out};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch{}})();var realHasInstance;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(object){return realHasInstance.call(this,object)?!0:this!==Writable?!1:object&&object._writableState instanceof WritableState}})):realHasInstance=function(object){return object instanceof this};function Writable(options){if(Duplex2=Duplex2||require_stream_duplex2(),!realHasInstance.call(Writable,this)&&!(this instanceof Duplex2))return new Writable(options);this._writableState=new WritableState(options,this),this.writable=!0,options&&(typeof options.write=="function"&&(this._write=options.write),typeof options.writev=="function"&&(this._writev=options.writev),typeof options.destroy=="function"&&(this._destroy=options.destroy),typeof options.final=="function"&&(this._final=options.final)),Stream3.call(this);}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"));};function writeAfterEnd(stream2,cb){var er=new Error("write after end");stream2.emit("error",er),pna.nextTick(cb,er);}function validChunk(stream2,state,chunk,cb){var valid=!0,er=!1;return chunk===null?er=new TypeError("May not write null values to stream"):typeof chunk!="string"&&chunk!==void 0&&!state.objectMode&&(er=new TypeError("Invalid non-string/buffer chunk")),er&&(stream2.emit("error",er),pna.nextTick(cb,er),valid=!1),valid}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1,isBuf=!state.objectMode&&_isUint8Array(chunk);return isBuf&&!Buffer4.isBuffer(chunk)&&(chunk=_uint8ArrayToBuffer(chunk)),typeof encoding=="function"&&(cb=encoding,encoding=null),isBuf?encoding="buffer":encoding||(encoding=state.defaultEncoding),typeof cb!="function"&&(cb=nop),state.ended?writeAfterEnd(this,cb):(isBuf||validChunk(this,state,chunk,cb))&&(state.pendingcb++,ret=writeOrBuffer(this,state,isBuf,chunk,encoding,cb)),ret};Writable.prototype.cork=function(){var state=this._writableState;state.corked++;};Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,!state.writing&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest&&clearBuffer(this,state));};Writable.prototype.setDefaultEncoding=function(encoding){if(typeof encoding=="string"&&(encoding=encoding.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);return this._writableState.defaultEncoding=encoding,this};function decodeChunk(state,chunk,encoding){return !state.objectMode&&state.decodeStrings!==!1&&typeof chunk=="string"&&(chunk=Buffer4.from(chunk,encoding)),chunk}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function writeOrBuffer(stream2,state,isBuf,chunk,encoding,cb){if(!isBuf){var newChunk=decodeChunk(state,chunk,encoding);chunk!==newChunk&&(isBuf=!0,encoding="buffer",chunk=newChunk);}var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(ret||(state.needDrain=!0),state.writing||state.corked){var last=state.lastBufferedRequest;state.lastBufferedRequest={chunk,encoding,isBuf,callback:cb,next:null},last?last.next=state.lastBufferedRequest:state.bufferedRequest=state.lastBufferedRequest,state.bufferedRequestCount+=1;}else doWrite(stream2,state,!1,len,chunk,encoding,cb);return ret}function doWrite(stream2,state,writev,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,writev?stream2._writev(chunk,state.onwrite):stream2._write(chunk,encoding,state.onwrite),state.sync=!1;}function onwriteError(stream2,state,sync,er,cb){--state.pendingcb,sync?(pna.nextTick(cb,er),pna.nextTick(finishMaybe,stream2,state),stream2._writableState.errorEmitted=!0,stream2.emit("error",er)):(cb(er),stream2._writableState.errorEmitted=!0,stream2.emit("error",er),finishMaybe(stream2,state));}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0;}function onwrite(stream2,er){var state=stream2._writableState,sync=state.sync,cb=state.writecb;if(onwriteStateUpdate(state),er)onwriteError(stream2,state,sync,er,cb);else {var finished=needFinish(state);!finished&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest&&clearBuffer(stream2,state),sync?asyncWrite(afterWrite,stream2,state,finished,cb):afterWrite(stream2,state,finished,cb);}}function afterWrite(stream2,state,finished,cb){finished||onwriteDrain(stream2,state),state.pendingcb--,cb(),finishMaybe(stream2,state);}function onwriteDrain(stream2,state){state.length===0&&state.needDrain&&(state.needDrain=!1,stream2.emit("drain"));}function clearBuffer(stream2,state){state.bufferProcessing=!0;var entry=state.bufferedRequest;if(stream2._writev&&entry&&entry.next){var l=state.bufferedRequestCount,buffer=new Array(l),holder=state.corkedRequestsFree;holder.entry=entry;for(var count=0,allBuffers=!0;entry;)buffer[count]=entry,entry.isBuf||(allBuffers=!1),entry=entry.next,count+=1;buffer.allBuffers=allBuffers,doWrite(stream2,state,!0,state.length,buffer,"",holder.finish),state.pendingcb++,state.lastBufferedRequest=null,holder.next?(state.corkedRequestsFree=holder.next,holder.next=null):state.corkedRequestsFree=new CorkedRequest(state),state.bufferedRequestCount=0;}else {for(;entry;){var chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback,len=state.objectMode?1:chunk.length;if(doWrite(stream2,state,!1,len,chunk,encoding,cb),entry=entry.next,state.bufferedRequestCount--,state.writing)break}entry===null&&(state.lastBufferedRequest=null);}state.bufferedRequest=entry,state.bufferProcessing=!1;}Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("_write() is not implemented"));};Writable.prototype._writev=null;Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;typeof chunk=="function"?(cb=chunk,chunk=null,encoding=null):typeof encoding=="function"&&(cb=encoding,encoding=null),chunk!=null&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||endWritable(this,state,cb);};function needFinish(state){return state.ending&&state.length===0&&state.bufferedRequest===null&&!state.finished&&!state.writing}function callFinal(stream2,state){stream2._final(function(err){state.pendingcb--,err&&stream2.emit("error",err),state.prefinished=!0,stream2.emit("prefinish"),finishMaybe(stream2,state);});}function prefinish(stream2,state){!state.prefinished&&!state.finalCalled&&(typeof stream2._final=="function"?(state.pendingcb++,state.finalCalled=!0,pna.nextTick(callFinal,stream2,state)):(state.prefinished=!0,stream2.emit("prefinish")));}function finishMaybe(stream2,state){var need=needFinish(state);return need&&(prefinish(stream2,state),state.pendingcb===0&&(state.finished=!0,stream2.emit("finish"))),need}function endWritable(stream2,state,cb){state.ending=!0,finishMaybe(stream2,state),cb&&(state.finished?pna.nextTick(cb):stream2.once("finish",cb)),state.ended=!0,stream2.writable=!1;}function onCorkedFinish(corkReq,state,err){var entry=corkReq.entry;for(corkReq.entry=null;entry;){var cb=entry.callback;state.pendingcb--,cb(err),entry=entry.next;}state.corkedRequestsFree.next=corkReq;}Object.defineProperty(Writable.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(value){this._writableState&&(this._writableState.destroyed=value);}});Writable.prototype.destroy=destroyImpl.destroy;Writable.prototype._undestroy=destroyImpl.undestroy;Writable.prototype._destroy=function(err,cb){this.end(),cb(err);};}});var require_stream_duplex2=__commonJS({"../../node_modules/peek-stream/node_modules/readable-stream/lib/_stream_duplex.js"(exports,module){var pna=require_process_nextick_args(),objectKeys=Object.keys||function(obj){var keys2=[];for(var key in obj)keys2.push(key);return keys2};module.exports=Duplex2;var util=Object.create(require_util());util.inherits=require_inherits();var Readable=require_stream_readable2(),Writable=require_stream_writable2();util.inherits(Duplex2,Readable);for(keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++)method=keys[v],Duplex2.prototype[method]||(Duplex2.prototype[method]=Writable.prototype[method]);var keys,method,v;function Duplex2(options){if(!(this instanceof Duplex2))return new Duplex2(options);Readable.call(this,options),Writable.call(this,options),options&&options.readable===!1&&(this.readable=!1),options&&options.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,options&&options.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",onend);}Object.defineProperty(Duplex2.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function onend(){this.allowHalfOpen||this._writableState.ended||pna.nextTick(onEndNT,this);}function onEndNT(self2){self2.end();}Object.defineProperty(Duplex2.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(value){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=value,this._writableState.destroyed=value);}});Duplex2.prototype._destroy=function(err,cb){this.push(null),this.end(),pna.nextTick(cb,err);};}});var require_string_decoder2=__commonJS({"../../node_modules/peek-stream/node_modules/string_decoder/lib/string_decoder.js"(exports){var Buffer4=require_safe_buffer2().Buffer,isEncoding=Buffer4.isEncoding||function(encoding){switch(encoding=""+encoding,encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return !0;default:return !1}};function _normalizeEncoding(enc){if(!enc)return "utf8";for(var retried;;)switch(enc){case"utf8":case"utf-8":return "utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return "utf16le";case"latin1":case"binary":return "latin1";case"base64":case"ascii":case"hex":return enc;default:if(retried)return;enc=(""+enc).toLowerCase(),retried=!0;}}function normalizeEncoding(enc){var nenc=_normalizeEncoding(enc);if(typeof nenc!="string"&&(Buffer4.isEncoding===isEncoding||!isEncoding(enc)))throw new Error("Unknown encoding: "+enc);return nenc||enc}exports.StringDecoder=StringDecoder;function StringDecoder(encoding){this.encoding=normalizeEncoding(encoding);var nb;switch(this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,nb=4;break;case"utf8":this.fillLast=utf8FillLast,nb=4;break;case"base64":this.text=base64Text,this.end=base64End,nb=3;break;default:this.write=simpleWrite,this.end=simpleEnd;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Buffer4.allocUnsafe(nb);}StringDecoder.prototype.write=function(buf){if(buf.length===0)return "";var r,i;if(this.lastNeed){if(r=this.fillLast(buf),r===void 0)return "";i=this.lastNeed,this.lastNeed=0;}else i=0;return i<buf.length?r?r+this.text(buf,i):this.text(buf,i):r||""};StringDecoder.prototype.end=utf8End;StringDecoder.prototype.text=utf8Text;StringDecoder.prototype.fillLast=function(buf){if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,buf.length),this.lastNeed-=buf.length;};function utf8CheckByte(byte){return byte<=127?0:byte>>5===6?2:byte>>4===14?3:byte>>3===30?4:byte>>6===2?-1:-2}function utf8CheckIncomplete(self2,buf,i){var j=buf.length-1;if(j<i)return 0;var nb=utf8CheckByte(buf[j]);return nb>=0?(nb>0&&(self2.lastNeed=nb-1),nb):--j<i||nb===-2?0:(nb=utf8CheckByte(buf[j]),nb>=0?(nb>0&&(self2.lastNeed=nb-2),nb):--j<i||nb===-2?0:(nb=utf8CheckByte(buf[j]),nb>=0?(nb>0&&(nb===2?nb=0:self2.lastNeed=nb-3),nb):0))}function utf8CheckExtraBytes(self2,buf,p){if((buf[0]&192)!==128)return self2.lastNeed=0,"\uFFFD";if(self2.lastNeed>1&&buf.length>1){if((buf[1]&192)!==128)return self2.lastNeed=1,"\uFFFD";if(self2.lastNeed>2&&buf.length>2&&(buf[2]&192)!==128)return self2.lastNeed=2,"\uFFFD"}}function utf8FillLast(buf){var p=this.lastTotal-this.lastNeed,r=utf8CheckExtraBytes(this,buf);if(r!==void 0)return r;if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,p,0,buf.length),this.lastNeed-=buf.length;}function utf8Text(buf,i){var total=utf8CheckIncomplete(this,buf,i);if(!this.lastNeed)return buf.toString("utf8",i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);return buf.copy(this.lastChar,0,end),buf.toString("utf8",i,end)}function utf8End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+"\uFFFD":r}function utf16Text(buf,i){if((buf.length-i)%2===0){var r=buf.toString("utf16le",i);if(r){var c=r.charCodeAt(r.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=buf[buf.length-1],buf.toString("utf16le",i,buf.length-1)}function utf16End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,end)}return r}function base64Text(buf,i){var n=(buf.length-i)%3;return n===0?buf.toString("base64",i):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=buf[buf.length-1]:(this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1]),buf.toString("base64",i,buf.length-n))}function base64End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function simpleWrite(buf){return buf.toString(this.encoding)}function simpleEnd(buf){return buf&&buf.length?this.write(buf):""}}});var require_stream_readable2=__commonJS({"../../node_modules/peek-stream/node_modules/readable-stream/lib/_stream_readable.js"(exports,module){var pna=require_process_nextick_args();module.exports=Readable;var isArray=require_isarray(),Duplex2;Readable.ReadableState=ReadableState;__require("events").EventEmitter;var EElistenerCount=function(emitter,type){return emitter.listeners(type).length},Stream3=require_stream3(),Buffer4=require_safe_buffer2().Buffer,OurUint8Array=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer4.from(chunk)}function _isUint8Array(obj){return Buffer4.isBuffer(obj)||obj instanceof OurUint8Array}var util=Object.create(require_util());util.inherits=require_inherits();var debugUtil=__require("util"),debug=void 0;debugUtil&&debugUtil.debuglog?debug=debugUtil.debuglog("stream"):debug=function(){};var BufferList=require_BufferList2(),destroyImpl=require_destroy2(),StringDecoder;util.inherits(Readable,Stream3);var kProxyEvents=["error","close","destroy","pause","resume"];function prependListener(emitter,event,fn){if(typeof emitter.prependListener=="function")return emitter.prependListener(event,fn);!emitter._events||!emitter._events[event]?emitter.on(event,fn):isArray(emitter._events[event])?emitter._events[event].unshift(fn):emitter._events[event]=[fn,emitter._events[event]];}function ReadableState(options,stream2){Duplex2=Duplex2||require_stream_duplex2(),options=options||{};var isDuplex=stream2 instanceof Duplex2;this.objectMode=!!options.objectMode,isDuplex&&(this.objectMode=this.objectMode||!!options.readableObjectMode);var hwm=options.highWaterMark,readableHwm=options.readableHighWaterMark,defaultHwm=this.objectMode?16:16*1024;hwm||hwm===0?this.highWaterMark=hwm:isDuplex&&(readableHwm||readableHwm===0)?this.highWaterMark=readableHwm:this.highWaterMark=defaultHwm,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new BufferList,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=options.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=require_string_decoder2().StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding);}function Readable(options){if(Duplex2=Duplex2||require_stream_duplex2(),!(this instanceof Readable))return new Readable(options);this._readableState=new ReadableState(options,this),this.readable=!0,options&&(typeof options.read=="function"&&(this._read=options.read),typeof options.destroy=="function"&&(this._destroy=options.destroy)),Stream3.call(this);}Object.defineProperty(Readable.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(value){this._readableState&&(this._readableState.destroyed=value);}});Readable.prototype.destroy=destroyImpl.destroy;Readable.prototype._undestroy=destroyImpl.undestroy;Readable.prototype._destroy=function(err,cb){this.push(null),cb(err);};Readable.prototype.push=function(chunk,encoding){var state=this._readableState,skipChunkCheck;return state.objectMode?skipChunkCheck=!0:typeof chunk=="string"&&(encoding=encoding||state.defaultEncoding,encoding!==state.encoding&&(chunk=Buffer4.from(chunk,encoding),encoding=""),skipChunkCheck=!0),readableAddChunk(this,chunk,encoding,!1,skipChunkCheck)};Readable.prototype.unshift=function(chunk){return readableAddChunk(this,chunk,null,!0,!1)};function readableAddChunk(stream2,chunk,encoding,addToFront,skipChunkCheck){var state=stream2._readableState;if(chunk===null)state.reading=!1,onEofChunk(stream2,state);else {var er;skipChunkCheck||(er=chunkInvalid(state,chunk)),er?stream2.emit("error",er):state.objectMode||chunk&&chunk.length>0?(typeof chunk!="string"&&!state.objectMode&&Object.getPrototypeOf(chunk)!==Buffer4.prototype&&(chunk=_uint8ArrayToBuffer(chunk)),addToFront?state.endEmitted?stream2.emit("error",new Error("stream.unshift() after end event")):addChunk(stream2,state,chunk,!0):state.ended?stream2.emit("error",new Error("stream.push() after EOF")):(state.reading=!1,state.decoder&&!encoding?(chunk=state.decoder.write(chunk),state.objectMode||chunk.length!==0?addChunk(stream2,state,chunk,!1):maybeReadMore(stream2,state)):addChunk(stream2,state,chunk,!1))):addToFront||(state.reading=!1);}return needMoreData(state)}function addChunk(stream2,state,chunk,addToFront){state.flowing&&state.length===0&&!state.sync?(stream2.emit("data",chunk),stream2.read(0)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream2)),maybeReadMore(stream2,state);}function chunkInvalid(state,chunk){var er;return !_isUint8Array(chunk)&&typeof chunk!="string"&&chunk!==void 0&&!state.objectMode&&(er=new TypeError("Invalid non-string/buffer chunk")),er}function needMoreData(state){return !state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0)}Readable.prototype.isPaused=function(){return this._readableState.flowing===!1};Readable.prototype.setEncoding=function(enc){return StringDecoder||(StringDecoder=require_string_decoder2().StringDecoder),this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc,this};var MAX_HWM=8388608;function computeNewHighWaterMark(n){return n>=MAX_HWM?n=MAX_HWM:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}function howMuchToRead(n,state){return n<=0||state.length===0&&state.ended?0:state.objectMode?1:n!==n?state.flowing&&state.length?state.buffer.head.data.length:state.length:(n>state.highWaterMark&&(state.highWaterMark=computeNewHighWaterMark(n)),n<=state.length?n:state.ended?state.length:(state.needReadable=!0,0))}Readable.prototype.read=function(n){debug("read",n),n=parseInt(n,10);var state=this._readableState,nOrig=n;if(n!==0&&(state.emittedReadable=!1),n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return debug("read: emitReadable",state.length,state.ended),state.length===0&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),n===0&&state.ended)return state.length===0&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(state.length===0||state.length-n<state.highWaterMark)&&(doRead=!0,debug("length less than watermark",doRead)),state.ended||state.reading?(doRead=!1,debug("reading or ended",doRead)):doRead&&(debug("do read"),state.reading=!0,state.sync=!0,state.length===0&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1,state.reading||(n=howMuchToRead(nOrig,state)));var ret;return n>0?ret=fromList(n,state):ret=null,ret===null?(state.needReadable=!0,n=0):state.length-=n,state.length===0&&(state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&endReadable(this)),ret!==null&&this.emit("data",ret),ret};function onEofChunk(stream2,state){if(!state.ended){if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length);}state.ended=!0,emitReadable(stream2);}}function emitReadable(stream2){var state=stream2._readableState;state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync?pna.nextTick(emitReadable_,stream2):emitReadable_(stream2));}function emitReadable_(stream2){debug("emit readable"),stream2.emit("readable"),flow(stream2);}function maybeReadMore(stream2,state){state.readingMore||(state.readingMore=!0,pna.nextTick(maybeReadMore_,stream2,state));}function maybeReadMore_(stream2,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark&&(debug("maybeReadMore read 0"),stream2.read(0),len!==state.length);)len=state.length;state.readingMore=!1;}Readable.prototype._read=function(n){this.emit("error",new Error("_read() is not implemented"));};Readable.prototype.pipe=function(dest,pipeOpts){var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest);break}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:unpipe;state.endEmitted?pna.nextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);function onunpipe(readable,unpipeInfo){debug("onunpipe"),readable===src&&unpipeInfo&&unpipeInfo.hasUnpiped===!1&&(unpipeInfo.hasUnpiped=!0,cleanup());}function onend(){debug("onend"),dest.end();}var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=!1;function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",unpipe),src.removeListener("data",ondata),cleanedUp=!0,state.awaitDrain&&(!dest._writableState||dest._writableState.needDrain)&&ondrain();}var increasedAwaitDrain=!1;src.on("data",ondata);function ondata(chunk){debug("ondata"),increasedAwaitDrain=!1;var ret=dest.write(chunk);ret===!1&&!increasedAwaitDrain&&((state.pipesCount===1&&state.pipes===dest||state.pipesCount>1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp&&(debug("false write response, pause",state.awaitDrain),state.awaitDrain++,increasedAwaitDrain=!0),src.pause());}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),EElistenerCount(dest,"error")===0&&dest.emit("error",er);}prependListener(dest,"error",onerror);function onclose(){dest.removeListener("finish",onfinish),unpipe();}dest.once("close",onclose);function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe();}dest.once("finish",onfinish);function unpipe(){debug("unpipe"),src.unpipe(dest);}return dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest};function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,state.awaitDrain===0&&EElistenerCount(src,"data")&&(state.flowing=!0,flow(src));}}Readable.prototype.unpipe=function(dest){var state=this._readableState,unpipeInfo={hasUnpiped:!1};if(state.pipesCount===0)return this;if(state.pipesCount===1)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this,unpipeInfo),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;i<len;i++)dests[i].emit("unpipe",this,{hasUnpiped:!1});return this}var index=indexOf(state.pipes,dest);return index===-1?this:(state.pipes.splice(index,1),state.pipesCount-=1,state.pipesCount===1&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this,unpipeInfo),this)};Readable.prototype.on=function(ev,fn){var res=Stream3.prototype.on.call(this,ev,fn);if(ev==="data")this._readableState.flowing!==!1&&this.resume();else if(ev==="readable"){var state=this._readableState;!state.endEmitted&&!state.readableListening&&(state.readableListening=state.needReadable=!0,state.emittedReadable=!1,state.reading?state.length&&emitReadable(this):pna.nextTick(nReadingNextTick,this));}return res};Readable.prototype.addListener=Readable.prototype.on;function nReadingNextTick(self2){debug("readable nexttick read 0"),self2.read(0);}Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!0,resume(this,state)),this};function resume(stream2,state){state.resumeScheduled||(state.resumeScheduled=!0,pna.nextTick(resume_,stream2,state));}function resume_(stream2,state){state.reading||(debug("resume read 0"),stream2.read(0)),state.resumeScheduled=!1,state.awaitDrain=0,stream2.emit("resume"),flow(stream2),state.flowing&&!state.reading&&stream2.read(0);}Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function flow(stream2){var state=stream2._readableState;for(debug("flow",state.flowing);state.flowing&&stream2.read()!==null;);}Readable.prototype.wrap=function(stream2){var _this=this,state=this._readableState,paused=!1;stream2.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&_this.push(chunk);}_this.push(null);}),stream2.on("data",function(chunk){if(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),!(state.objectMode&&chunk==null)&&!(!state.objectMode&&(!chunk||!chunk.length))){var ret=_this.push(chunk);ret||(paused=!0,stream2.pause());}});for(var i in stream2)this[i]===void 0&&typeof stream2[i]=="function"&&(this[i]=function(method){return function(){return stream2[method].apply(stream2,arguments)}}(i));for(var n=0;n<kProxyEvents.length;n++)stream2.on(kProxyEvents[n],this.emit.bind(this,kProxyEvents[n]));return this._read=function(n2){debug("wrapped _read",n2),paused&&(paused=!1,stream2.resume());},this};Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Readable._fromList=fromList;function fromList(n,state){if(state.length===0)return null;var ret;return state.objectMode?ret=state.buffer.shift():!n||n>=state.length?(state.decoder?ret=state.buffer.join(""):state.buffer.length===1?ret=state.buffer.head.data:ret=state.buffer.concat(state.length),state.buffer.clear()):ret=fromListPartial(n,state.buffer,state.decoder),ret}function fromListPartial(n,list,hasStrings){var ret;return n<list.head.data.length?(ret=list.head.data.slice(0,n),list.head.data=list.head.data.slice(n)):n===list.head.data.length?ret=list.shift():ret=hasStrings?copyFromBufferString(n,list):copyFromBuffer(n,list),ret}function copyFromBufferString(n,list){var p=list.head,c=1,ret=p.data;for(n-=ret.length;p=p.next;){var str=p.data,nb=n>str.length?str.length:n;if(nb===str.length?ret+=str:ret+=str.slice(0,n),n-=nb,n===0){nb===str.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=str.slice(nb));break}++c;}return list.length-=c,ret}function copyFromBuffer(n,list){var ret=Buffer4.allocUnsafe(n),p=list.head,c=1;for(p.data.copy(ret),n-=p.data.length;p=p.next;){var buf=p.data,nb=n>buf.length?buf.length:n;if(buf.copy(ret,ret.length-n,0,nb),n-=nb,n===0){nb===buf.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=buf.slice(nb));break}++c;}return list.length-=c,ret}function endReadable(stream2){var state=stream2._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');state.endEmitted||(state.ended=!0,pna.nextTick(endReadableNT,state,stream2));}function endReadableNT(state,stream2){!state.endEmitted&&state.length===0&&(state.endEmitted=!0,stream2.readable=!1,stream2.emit("end"));}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return -1}}});var require_stream_transform2=__commonJS({"../../node_modules/peek-stream/node_modules/readable-stream/lib/_stream_transform.js"(exports,module){module.exports=Transform;var Duplex2=require_stream_duplex2(),util=Object.create(require_util());util.inherits=require_inherits();util.inherits(Transform,Duplex2);function afterTransform(er,data){var ts=this._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return this.emit("error",new Error("write callback called multiple times"));ts.writechunk=null,ts.writecb=null,data!=null&&this.push(data),cb(er);var rs=this._readableState;rs.reading=!1,(rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark);}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex2.call(this,options),this._transformState={afterTransform:afterTransform.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,options&&(typeof options.transform=="function"&&(this._transform=options.transform),typeof options.flush=="function"&&(this._flush=options.flush)),this.on("prefinish",prefinish);}function prefinish(){var _this=this;typeof this._flush=="function"?this._flush(function(er,data){done(_this,er,data);}):done(this,null,null);}Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex2.prototype.push.call(this,chunk,encoding)};Transform.prototype._transform=function(chunk,encoding,cb){throw new Error("_transform() is not implemented")};Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark);}};Transform.prototype._read=function(n){var ts=this._transformState;ts.writechunk!==null&&ts.writecb&&!ts.transforming?(ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)):ts.needTransform=!0;};Transform.prototype._destroy=function(err,cb){var _this2=this;Duplex2.prototype._destroy.call(this,err,function(err2){cb(err2),_this2.emit("close");});};function done(stream2,er,data){if(er)return stream2.emit("error",er);if(data!=null&&stream2.push(data),stream2._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(stream2._transformState.transforming)throw new Error("Calling transform done when still transforming");return stream2.push(null)}}});var require_stream_passthrough2=__commonJS({"../../node_modules/peek-stream/node_modules/readable-stream/lib/_stream_passthrough.js"(exports,module){module.exports=PassThrough3;var Transform=require_stream_transform2(),util=Object.create(require_util());util.inherits=require_inherits();util.inherits(PassThrough3,Transform);function PassThrough3(options){if(!(this instanceof PassThrough3))return new PassThrough3(options);Transform.call(this,options);}PassThrough3.prototype._transform=function(chunk,encoding,cb){cb(null,chunk);};}});var require_readable2=__commonJS({"../../node_modules/peek-stream/node_modules/readable-stream/readable.js"(exports,module){var Stream3=__require("stream");process.env.READABLE_STREAM==="disable"&&Stream3?(module.exports=Stream3,exports=module.exports=Stream3.Readable,exports.Readable=Stream3.Readable,exports.Writable=Stream3.Writable,exports.Duplex=Stream3.Duplex,exports.Transform=Stream3.Transform,exports.PassThrough=Stream3.PassThrough,exports.Stream=Stream3):(exports=module.exports=require_stream_readable2(),exports.Stream=Stream3||exports,exports.Readable=exports,exports.Writable=require_stream_writable2(),exports.Duplex=require_stream_duplex2(),exports.Transform=require_stream_transform2(),exports.PassThrough=require_stream_passthrough2());}});var require_stream_shift=__commonJS({"../../node_modules/stream-shift/index.js"(exports,module){module.exports=shift;function shift(stream2){var rs=stream2._readableState;return rs?rs.objectMode||typeof stream2._duplexState=="number"?stream2.read():stream2.read(getStateLength(rs)):null}function getStateLength(state){return state.buffer.length?state.buffer.head?state.buffer.head.data.length:state.buffer[0].length:state.length}}});var require_duplexify=__commonJS({"../../node_modules/peek-stream/node_modules/duplexify/index.js"(exports,module){var stream2=require_readable2(),eos=require_end_of_stream(),inherits=require_inherits(),shift=require_stream_shift(),SIGNAL_FLUSH=Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from([0]):new Buffer([0]),onuncork=function(self2,fn){self2._corked?self2.once("uncork",fn):fn();},autoDestroy=function(self2,err){self2._autoDestroy&&self2.destroy(err);},destroyer=function(self2,end2){return function(err){err?autoDestroy(self2,err.message==="premature close"?null:err):end2&&!self2._ended&&self2.end();}},end=function(ws,fn){if(!ws||ws._writableState&&ws._writableState.finished)return fn();if(ws._writableState)return ws.end(fn);ws.end(),fn();},toStreams2=function(rs){return new stream2.Readable({objectMode:!0,highWaterMark:16}).wrap(rs)},Duplexify=function(writable,readable,opts){if(!(this instanceof Duplexify))return new Duplexify(writable,readable,opts);stream2.Duplex.call(this,opts),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!opts||opts.autoDestroy!==!1,this._forwardDestroy=!opts||opts.destroy!==!1,this._forwardEnd=!opts||opts.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,writable&&this.setWritable(writable),readable&&this.setReadable(readable);};inherits(Duplexify,stream2.Duplex);Duplexify.obj=function(writable,readable,opts){return opts||(opts={}),opts.objectMode=!0,opts.highWaterMark=16,new Duplexify(writable,readable,opts)};Duplexify.prototype.cork=function(){++this._corked===1&&this.emit("cork");};Duplexify.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork");};Duplexify.prototype.setWritable=function(writable){if(this._unwrite&&this._unwrite(),this.destroyed){writable&&writable.destroy&&writable.destroy();return}if(writable===null||writable===!1){this.end();return}var self2=this,unend=eos(writable,{writable:!0,readable:!1},destroyer(this,this._forwardEnd)),ondrain=function(){var ondrain2=self2._ondrain;self2._ondrain=null,ondrain2&&ondrain2();},clear=function(){self2._writable.removeListener("drain",ondrain),unend();};this._unwrite&&process.nextTick(ondrain),this._writable=writable,this._writable.on("drain",ondrain),this._unwrite=clear,this.uncork();};Duplexify.prototype.setReadable=function(readable){if(this._unread&&this._unread(),this.destroyed){readable&&readable.destroy&&readable.destroy();return}if(readable===null||readable===!1){this.push(null),this.resume();return}var self2=this,unend=eos(readable,{writable:!1,readable:!0},destroyer(this)),onreadable=function(){self2._forward();},onend=function(){self2.push(null);},clear=function(){self2._readable2.removeListener("readable",onreadable),self2._readable2.removeListener("end",onend),unend();};this._drained=!0,this._readable=readable,this._readable2=readable._readableState?readable:toStreams2(readable),this._readable2.on("readable",onreadable),this._readable2.on("end",onend),this._unread=clear,this._forward();};Duplexify.prototype._read=function(){this._drained=!0,this._forward();};Duplexify.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var data;this._drained&&(data=shift(this._readable2))!==null;)this.destroyed||(this._drained=this.push(data));this._forwarding=!1;}};Duplexify.prototype.destroy=function(err){if(!this.destroyed){this.destroyed=!0;var self2=this;process.nextTick(function(){self2._destroy(err);});}};Duplexify.prototype._destroy=function(err){if(err){var ondrain=this._ondrain;this._ondrain=null,ondrain?ondrain(err):this.emit("error",err);}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close");};Duplexify.prototype._write=function(data,enc,cb){if(this.destroyed)return cb();if(this._corked)return onuncork(this,this._write.bind(this,data,enc,cb));if(data===SIGNAL_FLUSH)return this._finish(cb);if(!this._writable)return cb();this._writable.write(data)===!1?this._ondrain=cb:cb();};Duplexify.prototype._finish=function(cb){var self2=this;this.emit("preend"),onuncork(this,function(){end(self2._forwardEnd&&self2._writable,function(){self2._writableState.prefinished===!1&&(self2._writableState.prefinished=!0),self2.emit("prefinish"),onuncork(self2,cb);});});};Duplexify.prototype.end=function(data,enc,cb){return typeof data=="function"?this.end(null,null,data):typeof enc=="function"?this.end(data,null,enc):(this._ended=!0,data&&this.write(data),this._writableState.ending||this.write(SIGNAL_FLUSH),stream2.Writable.prototype.end.call(this,cb))};module.exports=Duplexify;}});var require_isarray2=__commonJS({"../../node_modules/through2/node_modules/isarray/index.js"(exports,module){var toString2={}.toString;module.exports=Array.isArray||function(arr){return toString2.call(arr)=="[object Array]"};}});var require_stream4=__commonJS({"../../node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream.js"(exports,module){module.exports=__require("stream");}});var require_safe_buffer3=__commonJS({"../../node_modules/through2/node_modules/safe-buffer/index.js"(exports,module){var buffer=__require("buffer"),Buffer4=buffer.Buffer;function copyProps(src,dst){for(var key in src)dst[key]=src[key];}Buffer4.from&&Buffer4.alloc&&Buffer4.allocUnsafe&&Buffer4.allocUnsafeSlow?module.exports=buffer:(copyProps(buffer,exports),exports.Buffer=SafeBuffer);function SafeBuffer(arg,encodingOrOffset,length){return Buffer4(arg,encodingOrOffset,length)}copyProps(Buffer4,SafeBuffer);SafeBuffer.from=function(arg,encodingOrOffset,length){if(typeof arg=="number")throw new TypeError("Argument must not be a number");return Buffer4(arg,encodingOrOffset,length)};SafeBuffer.alloc=function(size,fill,encoding){if(typeof size!="number")throw new TypeError("Argument must be a number");var buf=Buffer4(size);return fill!==void 0?typeof encoding=="string"?buf.fill(fill,encoding):buf.fill(fill):buf.fill(0),buf};SafeBuffer.allocUnsafe=function(size){if(typeof size!="number")throw new TypeError("Argument must be a number");return Buffer4(size)};SafeBuffer.allocUnsafeSlow=function(size){if(typeof size!="number")throw new TypeError("Argument must be a number");return buffer.SlowBuffer(size)};}});var require_BufferList3=__commonJS({"../../node_modules/through2/node_modules/readable-stream/lib/internal/streams/BufferList.js"(exports,module){function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}var Buffer4=require_safe_buffer3().Buffer,util=__require("util");function copyBuffer(src,target,offset){src.copy(target,offset);}module.exports=function(){function BufferList(){_classCallCheck(this,BufferList),this.head=null,this.tail=null,this.length=0;}return BufferList.prototype.push=function(v){var entry={data:v,next:null};this.length>0?this.tail.next=entry:this.head=entry,this.tail=entry,++this.length;},BufferList.prototype.unshift=function(v){var entry={data:v,next:this.head};this.length===0&&(this.tail=entry),this.head=entry,++this.length;},BufferList.prototype.shift=function(){if(this.length!==0){var ret=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,ret}},BufferList.prototype.clear=function(){this.head=this.tail=null,this.length=0;},BufferList.prototype.join=function(s){if(this.length===0)return "";for(var p=this.head,ret=""+p.data;p=p.next;)ret+=s+p.data;return ret},BufferList.prototype.concat=function(n){if(this.length===0)return Buffer4.alloc(0);for(var ret=Buffer4.allocUnsafe(n>>>0),p=this.head,i=0;p;)copyBuffer(p.data,ret,i),i+=p.data.length,p=p.next;return ret},BufferList}();util&&util.inspect&&util.inspect.custom&&(module.exports.prototype[util.inspect.custom]=function(){var obj=util.inspect({length:this.length});return this.constructor.name+" "+obj});}});var require_destroy3=__commonJS({"../../node_modules/through2/node_modules/readable-stream/lib/internal/streams/destroy.js"(exports,module){var pna=require_process_nextick_args();function destroy(err,cb){var _this=this,readableDestroyed=this._readableState&&this._readableState.destroyed,writableDestroyed=this._writableState&&this._writableState.destroyed;return readableDestroyed||writableDestroyed?(cb?cb(err):err&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,pna.nextTick(emitErrorNT,this,err)):pna.nextTick(emitErrorNT,this,err)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(err||null,function(err2){!cb&&err2?_this._writableState?_this._writableState.errorEmitted||(_this._writableState.errorEmitted=!0,pna.nextTick(emitErrorNT,_this,err2)):pna.nextTick(emitErrorNT,_this,err2):cb&&cb(err2);}),this)}function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1);}function emitErrorNT(self2,err){self2.emit("error",err);}module.exports={destroy,undestroy};}});var require_stream_writable3=__commonJS({"../../node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js"(exports,module){var pna=require_process_nextick_args();module.exports=Writable;function CorkedRequest(state){var _this=this;this.next=null,this.entry=null,this.finish=function(){onCorkedFinish(_this,state);};}var asyncWrite=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:pna.nextTick,Duplex2;Writable.WritableState=WritableState;var util=Object.create(require_util());util.inherits=require_inherits();var internalUtil={deprecate:__require("util-deprecate")},Stream3=require_stream4(),Buffer4=require_safe_buffer3().Buffer,OurUint8Array=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer4.from(chunk)}function _isUint8Array(obj){return Buffer4.isBuffer(obj)||obj instanceof OurUint8Array}var destroyImpl=require_destroy3();util.inherits(Writable,Stream3);function nop(){}function WritableState(options,stream2){Duplex2=Duplex2||require_stream_duplex3(),options=options||{};var isDuplex=stream2 instanceof Duplex2;this.objectMode=!!options.objectMode,isDuplex&&(this.objectMode=this.objectMode||!!options.writableObjectMode);var hwm=options.highWaterMark,writableHwm=options.writableHighWaterMark,defaultHwm=this.objectMode?16:16*1024;hwm||hwm===0?this.highWaterMark=hwm:isDuplex&&(writableHwm||writableHwm===0)?this.highWaterMark=writableHwm:this.highWaterMark=defaultHwm,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var noDecode=options.decodeStrings===!1;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream2,er);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this);}WritableState.prototype.getBuffer=function(){for(var current=this.bufferedRequest,out=[];current;)out.push(current),current=current.next;return out};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch{}})();var realHasInstance;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(object){return realHasInstance.call(this,object)?!0:this!==Writable?!1:object&&object._writableState instanceof WritableState}})):realHasInstance=function(object){return object instanceof this};function Writable(options){if(Duplex2=Duplex2||require_stream_duplex3(),!realHasInstance.call(Writable,this)&&!(this instanceof Duplex2))return new Writable(options);this._writableState=new WritableState(options,this),this.writable=!0,options&&(typeof options.write=="function"&&(this._write=options.write),typeof options.writev=="function"&&(this._writev=options.writev),typeof options.destroy=="function"&&(this._destroy=options.destroy),typeof options.final=="function"&&(this._final=options.final)),Stream3.call(this);}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"));};function writeAfterEnd(stream2,cb){var er=new Error("write after end");stream2.emit("error",er),pna.nextTick(cb,er);}function validChunk(stream2,state,chunk,cb){var valid=!0,er=!1;return chunk===null?er=new TypeError("May not write null values to stream"):typeof chunk!="string"&&chunk!==void 0&&!state.objectMode&&(er=new TypeError("Invalid non-string/buffer chunk")),er&&(stream2.emit("error",er),pna.nextTick(cb,er),valid=!1),valid}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1,isBuf=!state.objectMode&&_isUint8Array(chunk);return isBuf&&!Buffer4.isBuffer(chunk)&&(chunk=_uint8ArrayToBuffer(chunk)),typeof encoding=="function"&&(cb=encoding,encoding=null),isBuf?encoding="buffer":encoding||(encoding=state.defaultEncoding),typeof cb!="function"&&(cb=nop),state.ended?writeAfterEnd(this,cb):(isBuf||validChunk(this,state,chunk,cb))&&(state.pendingcb++,ret=writeOrBuffer(this,state,isBuf,chunk,encoding,cb)),ret};Writable.prototype.cork=function(){var state=this._writableState;state.corked++;};Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,!state.writing&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest&&clearBuffer(this,state));};Writable.prototype.setDefaultEncoding=function(encoding){if(typeof encoding=="string"&&(encoding=encoding.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);return this._writableState.defaultEncoding=encoding,this};function decodeChunk(state,chunk,encoding){return !state.objectMode&&state.decodeStrings!==!1&&typeof chunk=="string"&&(chunk=Buffer4.from(chunk,encoding)),chunk}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function writeOrBuffer(stream2,state,isBuf,chunk,encoding,cb){if(!isBuf){var newChunk=decodeChunk(state,chunk,encoding);chunk!==newChunk&&(isBuf=!0,encoding="buffer",chunk=newChunk);}var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(ret||(state.needDrain=!0),state.writing||state.corked){var last=state.lastBufferedRequest;state.lastBufferedRequest={chunk,encoding,isBuf,callback:cb,next:null},last?last.next=state.lastBufferedRequest:state.bufferedRequest=state.lastBufferedRequest,state.bufferedRequestCount+=1;}else doWrite(stream2,state,!1,len,chunk,encoding,cb);return ret}function doWrite(stream2,state,writev,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,writev?stream2._writev(chunk,state.onwrite):stream2._write(chunk,encoding,state.onwrite),state.sync=!1;}function onwriteError(stream2,state,sync,er,cb){--state.pendingcb,sync?(pna.nextTick(cb,er),pna.nextTick(finishMaybe,stream2,state),stream2._writableState.errorEmitted=!0,stream2.emit("error",er)):(cb(er),stream2._writableState.errorEmitted=!0,stream2.emit("error",er),finishMaybe(stream2,state));}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0;}function onwrite(stream2,er){var state=stream2._writableState,sync=state.sync,cb=state.writecb;if(onwriteStateUpdate(state),er)onwriteError(stream2,state,sync,er,cb);else {var finished=needFinish(state);!finished&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest&&clearBuffer(stream2,state),sync?asyncWrite(afterWrite,stream2,state,finished,cb):afterWrite(stream2,state,finished,cb);}}function afterWrite(stream2,state,finished,cb){finished||onwriteDrain(stream2,state),state.pendingcb--,cb(),finishMaybe(stream2,state);}function onwriteDrain(stream2,state){state.length===0&&state.needDrain&&(state.needDrain=!1,stream2.emit("drain"));}function clearBuffer(stream2,state){state.bufferProcessing=!0;var entry=state.bufferedRequest;if(stream2._writev&&entry&&entry.next){var l=state.bufferedRequestCount,buffer=new Array(l),holder=state.corkedRequestsFree;holder.entry=entry;for(var count=0,allBuffers=!0;entry;)buffer[count]=entry,entry.isBuf||(allBuffers=!1),entry=entry.next,count+=1;buffer.allBuffers=allBuffers,doWrite(stream2,state,!0,state.length,buffer,"",holder.finish),state.pendingcb++,state.lastBufferedRequest=null,holder.next?(state.corkedRequestsFree=holder.next,holder.next=null):state.corkedRequestsFree=new CorkedRequest(state),state.bufferedRequestCount=0;}else {for(;entry;){var chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback,len=state.objectMode?1:chunk.length;if(doWrite(stream2,state,!1,len,chunk,encoding,cb),entry=entry.next,state.bufferedRequestCount--,state.writing)break}entry===null&&(state.lastBufferedRequest=null);}state.bufferedRequest=entry,state.bufferProcessing=!1;}Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("_write() is not implemented"));};Writable.prototype._writev=null;Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;typeof chunk=="function"?(cb=chunk,chunk=null,encoding=null):typeof encoding=="function"&&(cb=encoding,encoding=null),chunk!=null&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||endWritable(this,state,cb);};function needFinish(state){return state.ending&&state.length===0&&state.bufferedRequest===null&&!state.finished&&!state.writing}function callFinal(stream2,state){stream2._final(function(err){state.pendingcb--,err&&stream2.emit("error",err),state.prefinished=!0,stream2.emit("prefinish"),finishMaybe(stream2,state);});}function prefinish(stream2,state){!state.prefinished&&!state.finalCalled&&(typeof stream2._final=="function"?(state.pendingcb++,state.finalCalled=!0,pna.nextTick(callFinal,stream2,state)):(state.prefinished=!0,stream2.emit("prefinish")));}function finishMaybe(stream2,state){var need=needFinish(state);return need&&(prefinish(stream2,state),state.pendingcb===0&&(state.finished=!0,stream2.emit("finish"))),need}function endWritable(stream2,state,cb){state.ending=!0,finishMaybe(stream2,state),cb&&(state.finished?pna.nextTick(cb):stream2.once("finish",cb)),state.ended=!0,stream2.writable=!1;}function onCorkedFinish(corkReq,state,err){var entry=corkReq.entry;for(corkReq.entry=null;entry;){var cb=entry.callback;state.pendingcb--,cb(err),entry=entry.next;}state.corkedRequestsFree.next=corkReq;}Object.defineProperty(Writable.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(value){this._writableState&&(this._writableState.destroyed=value);}});Writable.prototype.destroy=destroyImpl.destroy;Writable.prototype._undestroy=destroyImpl.undestroy;Writable.prototype._destroy=function(err,cb){this.end(),cb(err);};}});var require_stream_duplex3=__commonJS({"../../node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js"(exports,module){var pna=require_process_nextick_args(),objectKeys=Object.keys||function(obj){var keys2=[];for(var key in obj)keys2.push(key);return keys2};module.exports=Duplex2;var util=Object.create(require_util());util.inherits=require_inherits();var Readable=require_stream_readable3(),Writable=require_stream_writable3();util.inherits(Duplex2,Readable);for(keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++)method=keys[v],Duplex2.prototype[method]||(Duplex2.prototype[method]=Writable.prototype[method]);var keys,method,v;function Duplex2(options){if(!(this instanceof Duplex2))return new Duplex2(options);Readable.call(this,options),Writable.call(this,options),options&&options.readable===!1&&(this.readable=!1),options&&options.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,options&&options.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",onend);}Object.defineProperty(Duplex2.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function onend(){this.allowHalfOpen||this._writableState.ended||pna.nextTick(onEndNT,this);}function onEndNT(self2){self2.end();}Object.defineProperty(Duplex2.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(value){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=value,this._writableState.destroyed=value);}});Duplex2.prototype._destroy=function(err,cb){this.push(null),this.end(),pna.nextTick(cb,err);};}});var require_string_decoder3=__commonJS({"../../node_modules/through2/node_modules/string_decoder/lib/string_decoder.js"(exports){var Buffer4=require_safe_buffer3().Buffer,isEncoding=Buffer4.isEncoding||function(encoding){switch(encoding=""+encoding,encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return !0;default:return !1}};function _normalizeEncoding(enc){if(!enc)return "utf8";for(var retried;;)switch(enc){case"utf8":case"utf-8":return "utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return "utf16le";case"latin1":case"binary":return "latin1";case"base64":case"ascii":case"hex":return enc;default:if(retried)return;enc=(""+enc).toLowerCase(),retried=!0;}}function normalizeEncoding(enc){var nenc=_normalizeEncoding(enc);if(typeof nenc!="string"&&(Buffer4.isEncoding===isEncoding||!isEncoding(enc)))throw new Error("Unknown encoding: "+enc);return nenc||enc}exports.StringDecoder=StringDecoder;function StringDecoder(encoding){this.encoding=normalizeEncoding(encoding);var nb;switch(this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,nb=4;break;case"utf8":this.fillLast=utf8FillLast,nb=4;break;case"base64":this.text=base64Text,this.end=base64End,nb=3;break;default:this.write=simpleWrite,this.end=simpleEnd;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Buffer4.allocUnsafe(nb);}StringDecoder.prototype.write=function(buf){if(buf.length===0)return "";var r,i;if(this.lastNeed){if(r=this.fillLast(buf),r===void 0)return "";i=this.lastNeed,this.lastNeed=0;}else i=0;return i<buf.length?r?r+this.text(buf,i):this.text(buf,i):r||""};StringDecoder.prototype.end=utf8End;StringDecoder.prototype.text=utf8Text;StringDecoder.prototype.fillLast=function(buf){if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,buf.length),this.lastNeed-=buf.length;};function utf8CheckByte(byte){return byte<=127?0:byte>>5===6?2:byte>>4===14?3:byte>>3===30?4:byte>>6===2?-1:-2}function utf8CheckIncomplete(self2,buf,i){var j=buf.length-1;if(j<i)return 0;var nb=utf8CheckByte(buf[j]);return nb>=0?(nb>0&&(self2.lastNeed=nb-1),nb):--j<i||nb===-2?0:(nb=utf8CheckByte(buf[j]),nb>=0?(nb>0&&(self2.lastNeed=nb-2),nb):--j<i||nb===-2?0:(nb=utf8CheckByte(buf[j]),nb>=0?(nb>0&&(nb===2?nb=0:self2.lastNeed=nb-3),nb):0))}function utf8CheckExtraBytes(self2,buf,p){if((buf[0]&192)!==128)return self2.lastNeed=0,"\uFFFD";if(self2.lastNeed>1&&buf.length>1){if((buf[1]&192)!==128)return self2.lastNeed=1,"\uFFFD";if(self2.lastNeed>2&&buf.length>2&&(buf[2]&192)!==128)return self2.lastNeed=2,"\uFFFD"}}function utf8FillLast(buf){var p=this.lastTotal-this.lastNeed,r=utf8CheckExtraBytes(this,buf);if(r!==void 0)return r;if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,p,0,buf.length),this.lastNeed-=buf.length;}function utf8Text(buf,i){var total=utf8CheckIncomplete(this,buf,i);if(!this.lastNeed)return buf.toString("utf8",i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);return buf.copy(this.lastChar,0,end),buf.toString("utf8",i,end)}function utf8End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+"\uFFFD":r}function utf16Text(buf,i){if((buf.length-i)%2===0){var r=buf.toString("utf16le",i);if(r){var c=r.charCodeAt(r.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=buf[buf.length-1],buf.toString("utf16le",i,buf.length-1)}function utf16End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,end)}return r}function base64Text(buf,i){var n=(buf.length-i)%3;return n===0?buf.toString("base64",i):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=buf[buf.length-1]:(this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1]),buf.toString("base64",i,buf.length-n))}function base64End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function simpleWrite(buf){return buf.toString(this.encoding)}function simpleEnd(buf){return buf&&buf.length?this.write(buf):""}}});var require_stream_readable3=__commonJS({"../../node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js"(exports,module){var pna=require_process_nextick_args();module.exports=Readable;var isArray=require_isarray2(),Duplex2;Readable.ReadableState=ReadableState;__require("events").EventEmitter;var EElistenerCount=function(emitter,type){return emitter.listeners(type).length},Stream3=require_stream4(),Buffer4=require_safe_buffer3().Buffer,OurUint8Array=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer4.from(chunk)}function _isUint8Array(obj){return Buffer4.isBuffer(obj)||obj instanceof OurUint8Array}var util=Object.create(require_util());util.inherits=require_inherits();var debugUtil=__require("util"),debug=void 0;debugUtil&&debugUtil.debuglog?debug=debugUtil.debuglog("stream"):debug=function(){};var BufferList=require_BufferList3(),destroyImpl=require_destroy3(),StringDecoder;util.inherits(Readable,Stream3);var kProxyEvents=["error","close","destroy","pause","resume"];function prependListener(emitter,event,fn){if(typeof emitter.prependListener=="function")return emitter.prependListener(event,fn);!emitter._events||!emitter._events[event]?emitter.on(event,fn):isArray(emitter._events[event])?emitter._events[event].unshift(fn):emitter._events[event]=[fn,emitter._events[event]];}function ReadableState(options,stream2){Duplex2=Duplex2||require_stream_duplex3(),options=options||{};var isDuplex=stream2 instanceof Duplex2;this.objectMode=!!options.objectMode,isDuplex&&(this.objectMode=this.objectMode||!!options.readableObjectMode);var hwm=options.highWaterMark,readableHwm=options.readableHighWaterMark,defaultHwm=this.objectMode?16:16*1024;hwm||hwm===0?this.highWaterMark=hwm:isDuplex&&(readableHwm||readableHwm===0)?this.highWaterMark=readableHwm:this.highWaterMark=defaultHwm,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new BufferList,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=options.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=require_string_decoder3().StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding);}function Readable(options){if(Duplex2=Duplex2||require_stream_duplex3(),!(this instanceof Readable))return new Readable(options);this._readableState=new ReadableState(options,this),this.readable=!0,options&&(typeof options.read=="function"&&(this._read=options.read),typeof options.destroy=="function"&&(this._destroy=options.destroy)),Stream3.call(this);}Object.defineProperty(Readable.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(value){this._readableState&&(this._readableState.destroyed=value);}});Readable.prototype.destroy=destroyImpl.destroy;Readable.prototype._undestroy=destroyImpl.undestroy;Readable.prototype._destroy=function(err,cb){this.push(null),cb(err);};Readable.prototype.push=function(chunk,encoding){var state=this._readableState,skipChunkCheck;return state.objectMode?skipChunkCheck=!0:typeof chunk=="string"&&(encoding=encoding||state.defaultEncoding,encoding!==state.encoding&&(chunk=Buffer4.from(chunk,encoding),encoding=""),skipChunkCheck=!0),readableAddChunk(this,chunk,encoding,!1,skipChunkCheck)};Readable.prototype.unshift=function(chunk){return readableAddChunk(this,chunk,null,!0,!1)};function readableAddChunk(stream2,chunk,encoding,addToFront,skipChunkCheck){var state=stream2._readableState;if(chunk===null)state.reading=!1,onEofChunk(stream2,state);else {var er;skipChunkCheck||(er=chunkInvalid(state,chunk)),er?stream2.emit("error",er):state.objectMode||chunk&&chunk.length>0?(typeof chunk!="string"&&!state.objectMode&&Object.getPrototypeOf(chunk)!==Buffer4.prototype&&(chunk=_uint8ArrayToBuffer(chunk)),addToFront?state.endEmitted?stream2.emit("error",new Error("stream.unshift() after end event")):addChunk(stream2,state,chunk,!0):state.ended?stream2.emit("error",new Error("stream.push() after EOF")):(state.reading=!1,state.decoder&&!encoding?(chunk=state.decoder.write(chunk),state.objectMode||chunk.length!==0?addChunk(stream2,state,chunk,!1):maybeReadMore(stream2,state)):addChunk(stream2,state,chunk,!1))):addToFront||(state.reading=!1);}return needMoreData(state)}function addChunk(stream2,state,chunk,addToFront){state.flowing&&state.length===0&&!state.sync?(stream2.emit("data",chunk),stream2.read(0)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream2)),maybeReadMore(stream2,state);}function chunkInvalid(state,chunk){var er;return !_isUint8Array(chunk)&&typeof chunk!="string"&&chunk!==void 0&&!state.objectMode&&(er=new TypeError("Invalid non-string/buffer chunk")),er}function needMoreData(state){return !state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0)}Readable.prototype.isPaused=function(){return this._readableState.flowing===!1};Readable.prototype.setEncoding=function(enc){return StringDecoder||(StringDecoder=require_string_decoder3().StringDecoder),this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc,this};var MAX_HWM=8388608;function computeNewHighWaterMark(n){return n>=MAX_HWM?n=MAX_HWM:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}function howMuchToRead(n,state){return n<=0||state.length===0&&state.ended?0:state.objectMode?1:n!==n?state.flowing&&state.length?state.buffer.head.data.length:state.length:(n>state.highWaterMark&&(state.highWaterMark=computeNewHighWaterMark(n)),n<=state.length?n:state.ended?state.length:(state.needReadable=!0,0))}Readable.prototype.read=function(n){debug("read",n),n=parseInt(n,10);var state=this._readableState,nOrig=n;if(n!==0&&(state.emittedReadable=!1),n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return debug("read: emitReadable",state.length,state.ended),state.length===0&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),n===0&&state.ended)return state.length===0&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(state.length===0||state.length-n<state.highWaterMark)&&(doRead=!0,debug("length less than watermark",doRead)),state.ended||state.reading?(doRead=!1,debug("reading or ended",doRead)):doRead&&(debug("do read"),state.reading=!0,state.sync=!0,state.length===0&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1,state.reading||(n=howMuchToRead(nOrig,state)));var ret;return n>0?ret=fromList(n,state):ret=null,ret===null?(state.needReadable=!0,n=0):state.length-=n,state.length===0&&(state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&endReadable(this)),ret!==null&&this.emit("data",ret),ret};function onEofChunk(stream2,state){if(!state.ended){if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length);}state.ended=!0,emitReadable(stream2);}}function emitReadable(stream2){var state=stream2._readableState;state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync?pna.nextTick(emitReadable_,stream2):emitReadable_(stream2));}function emitReadable_(stream2){debug("emit readable"),stream2.emit("readable"),flow(stream2);}function maybeReadMore(stream2,state){state.readingMore||(state.readingMore=!0,pna.nextTick(maybeReadMore_,stream2,state));}function maybeReadMore_(stream2,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark&&(debug("maybeReadMore read 0"),stream2.read(0),len!==state.length);)len=state.length;state.readingMore=!1;}Readable.prototype._read=function(n){this.emit("error",new Error("_read() is not implemented"));};Readable.prototype.pipe=function(dest,pipeOpts){var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest);break}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:unpipe;state.endEmitted?pna.nextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);function onunpipe(readable,unpipeInfo){debug("onunpipe"),readable===src&&unpipeInfo&&unpipeInfo.hasUnpiped===!1&&(unpipeInfo.hasUnpiped=!0,cleanup());}function onend(){debug("onend"),dest.end();}var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=!1;function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",unpipe),src.removeListener("data",ondata),cleanedUp=!0,state.awaitDrain&&(!dest._writableState||dest._writableState.needDrain)&&ondrain();}var increasedAwaitDrain=!1;src.on("data",ondata);function ondata(chunk){debug("ondata"),increasedAwaitDrain=!1;var ret=dest.write(chunk);ret===!1&&!increasedAwaitDrain&&((state.pipesCount===1&&state.pipes===dest||state.pipesCount>1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp&&(debug("false write response, pause",state.awaitDrain),state.awaitDrain++,increasedAwaitDrain=!0),src.pause());}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),EElistenerCount(dest,"error")===0&&dest.emit("error",er);}prependListener(dest,"error",onerror);function onclose(){dest.removeListener("finish",onfinish),unpipe();}dest.once("close",onclose);function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe();}dest.once("finish",onfinish);function unpipe(){debug("unpipe"),src.unpipe(dest);}return dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest};function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,state.awaitDrain===0&&EElistenerCount(src,"data")&&(state.flowing=!0,flow(src));}}Readable.prototype.unpipe=function(dest){var state=this._readableState,unpipeInfo={hasUnpiped:!1};if(state.pipesCount===0)return this;if(state.pipesCount===1)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this,unpipeInfo),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;i<len;i++)dests[i].emit("unpipe",this,{hasUnpiped:!1});return this}var index=indexOf(state.pipes,dest);return index===-1?this:(state.pipes.splice(index,1),state.pipesCount-=1,state.pipesCount===1&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this,unpipeInfo),this)};Readable.prototype.on=function(ev,fn){var res=Stream3.prototype.on.call(this,ev,fn);if(ev==="data")this._readableState.flowing!==!1&&this.resume();else if(ev==="readable"){var state=this._readableState;!state.endEmitted&&!state.readableListening&&(state.readableListening=state.needReadable=!0,state.emittedReadable=!1,state.reading?state.length&&emitReadable(this):pna.nextTick(nReadingNextTick,this));}return res};Readable.prototype.addListener=Readable.prototype.on;function nReadingNextTick(self2){debug("readable nexttick read 0"),self2.read(0);}Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!0,resume(this,state)),this};function resume(stream2,state){state.resumeScheduled||(state.resumeScheduled=!0,pna.nextTick(resume_,stream2,state));}function resume_(stream2,state){state.reading||(debug("resume read 0"),stream2.read(0)),state.resumeScheduled=!1,state.awaitDrain=0,stream2.emit("resume"),flow(stream2),state.flowing&&!state.reading&&stream2.read(0);}Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function flow(stream2){var state=stream2._readableState;for(debug("flow",state.flowing);state.flowing&&stream2.read()!==null;);}Readable.prototype.wrap=function(stream2){var _this=this,state=this._readableState,paused=!1;stream2.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&_this.push(chunk);}_this.push(null);}),stream2.on("data",function(chunk){if(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),!(state.objectMode&&chunk==null)&&!(!state.objectMode&&(!chunk||!chunk.length))){var ret=_this.push(chunk);ret||(paused=!0,stream2.pause());}});for(var i in stream2)this[i]===void 0&&typeof stream2[i]=="function"&&(this[i]=function(method){return function(){return stream2[method].apply(stream2,arguments)}}(i));for(var n=0;n<kProxyEvents.length;n++)stream2.on(kProxyEvents[n],this.emit.bind(this,kProxyEvents[n]));return this._read=function(n2){debug("wrapped _read",n2),paused&&(paused=!1,stream2.resume());},this};Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Readable._fromList=fromList;function fromList(n,state){if(state.length===0)return null;var ret;return state.objectMode?ret=state.buffer.shift():!n||n>=state.length?(state.decoder?ret=state.buffer.join(""):state.buffer.length===1?ret=state.buffer.head.data:ret=state.buffer.concat(state.length),state.buffer.clear()):ret=fromListPartial(n,state.buffer,state.decoder),ret}function fromListPartial(n,list,hasStrings){var ret;return n<list.head.data.length?(ret=list.head.data.slice(0,n),list.head.data=list.head.data.slice(n)):n===list.head.data.length?ret=list.shift():ret=hasStrings?copyFromBufferString(n,list):copyFromBuffer(n,list),ret}function copyFromBufferString(n,list){var p=list.head,c=1,ret=p.data;for(n-=ret.length;p=p.next;){var str=p.data,nb=n>str.length?str.length:n;if(nb===str.length?ret+=str:ret+=str.slice(0,n),n-=nb,n===0){nb===str.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=str.slice(nb));break}++c;}return list.length-=c,ret}function copyFromBuffer(n,list){var ret=Buffer4.allocUnsafe(n),p=list.head,c=1;for(p.data.copy(ret),n-=p.data.length;p=p.next;){var buf=p.data,nb=n>buf.length?buf.length:n;if(buf.copy(ret,ret.length-n,0,nb),n-=nb,n===0){nb===buf.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=buf.slice(nb));break}++c;}return list.length-=c,ret}function endReadable(stream2){var state=stream2._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');state.endEmitted||(state.ended=!0,pna.nextTick(endReadableNT,state,stream2));}function endReadableNT(state,stream2){!state.endEmitted&&state.length===0&&(state.endEmitted=!0,stream2.readable=!1,stream2.emit("end"));}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return -1}}});var require_stream_transform3=__commonJS({"../../node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js"(exports,module){module.exports=Transform;var Duplex2=require_stream_duplex3(),util=Object.create(require_util());util.inherits=require_inherits();util.inherits(Transform,Duplex2);function afterTransform(er,data){var ts=this._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return this.emit("error",new Error("write callback called multiple times"));ts.writechunk=null,ts.writecb=null,data!=null&&this.push(data),cb(er);var rs=this._readableState;rs.reading=!1,(rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark);}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex2.call(this,options),this._transformState={afterTransform:afterTransform.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,options&&(typeof options.transform=="function"&&(this._transform=options.transform),typeof options.flush=="function"&&(this._flush=options.flush)),this.on("prefinish",prefinish);}function prefinish(){var _this=this;typeof this._flush=="function"?this._flush(function(er,data){done(_this,er,data);}):done(this,null,null);}Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex2.prototype.push.call(this,chunk,encoding)};Transform.prototype._transform=function(chunk,encoding,cb){throw new Error("_transform() is not implemented")};Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark);}};Transform.prototype._read=function(n){var ts=this._transformState;ts.writechunk!==null&&ts.writecb&&!ts.transforming?(ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)):ts.needTransform=!0;};Transform.prototype._destroy=function(err,cb){var _this2=this;Duplex2.prototype._destroy.call(this,err,function(err2){cb(err2),_this2.emit("close");});};function done(stream2,er,data){if(er)return stream2.emit("error",er);if(data!=null&&stream2.push(data),stream2._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(stream2._transformState.transforming)throw new Error("Calling transform done when still transforming");return stream2.push(null)}}});var require_stream_passthrough3=__commonJS({"../../node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js"(exports,module){module.exports=PassThrough3;var Transform=require_stream_transform3(),util=Object.create(require_util());util.inherits=require_inherits();util.inherits(PassThrough3,Transform);function PassThrough3(options){if(!(this instanceof PassThrough3))return new PassThrough3(options);Transform.call(this,options);}PassThrough3.prototype._transform=function(chunk,encoding,cb){cb(null,chunk);};}});var require_readable3=__commonJS({"../../node_modules/through2/node_modules/readable-stream/readable.js"(exports,module){var Stream3=__require("stream");process.env.READABLE_STREAM==="disable"&&Stream3?(module.exports=Stream3,exports=module.exports=Stream3.Readable,exports.Readable=Stream3.Readable,exports.Writable=Stream3.Writable,exports.Duplex=Stream3.Duplex,exports.Transform=Stream3.Transform,exports.PassThrough=Stream3.PassThrough,exports.Stream=Stream3):(exports=module.exports=require_stream_readable3(),exports.Stream=Stream3||exports,exports.Readable=exports,exports.Writable=require_stream_writable3(),exports.Duplex=require_stream_duplex3(),exports.Transform=require_stream_transform3(),exports.PassThrough=require_stream_passthrough3());}});var require_immutable=__commonJS({"../../node_modules/xtend/immutable.js"(exports,module){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){for(var target={},i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source)hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target}}});var require_through2=__commonJS({"../../node_modules/through2/through2.js"(exports,module){var Transform=require_readable3().Transform,inherits=__require("util").inherits,xtend=require_immutable();function DestroyableTransform(opts){Transform.call(this,opts),this._destroyed=!1;}inherits(DestroyableTransform,Transform);DestroyableTransform.prototype.destroy=function(err){if(!this._destroyed){this._destroyed=!0;var self2=this;process.nextTick(function(){err&&self2.emit("error",err),self2.emit("close");});}};function noop3(chunk,enc,callback){callback(null,chunk);}function through2(construct){return function(options,transform,flush){return typeof options=="function"&&(flush=transform,transform=options,options={}),typeof transform!="function"&&(transform=noop3),typeof flush!="function"&&(flush=null),construct(options,transform,flush)}}module.exports=through2(function(options,transform,flush){var t2=new DestroyableTransform(options);return t2._transform=transform,flush&&(t2._flush=flush),t2});module.exports.ctor=through2(function(options,transform,flush){function Through2(override){if(!(this instanceof Through2))return new Through2(override);this.options=xtend(options,override),DestroyableTransform.call(this,this.options);}return inherits(Through2,DestroyableTransform),Through2.prototype._transform=transform,flush&&(Through2.prototype._flush=flush),Through2});module.exports.obj=through2(function(options,transform,flush){var t2=new DestroyableTransform(xtend({objectMode:!0,highWaterMark:16},options));return t2._transform=transform,flush&&(t2._flush=flush),t2});}});var require_buffer_from=__commonJS({"../../node_modules/buffer-from/index.js"(exports,module){var toString2=Object.prototype.toString,isModern=typeof Buffer<"u"&&typeof Buffer.alloc=="function"&&typeof Buffer.allocUnsafe=="function"&&typeof Buffer.from=="function";function isArrayBuffer(input){return toString2.call(input).slice(8,-1)==="ArrayBuffer"}function fromArrayBuffer(obj,byteOffset,length){byteOffset>>>=0;var maxLength=obj.byteLength-byteOffset;if(maxLength<0)throw new RangeError("'offset' is out of bounds");if(length===void 0)length=maxLength;else if(length>>>=0,length>maxLength)throw new RangeError("'length' is out of bounds");return isModern?Buffer.from(obj.slice(byteOffset,byteOffset+length)):new Buffer(new Uint8Array(obj.slice(byteOffset,byteOffset+length)))}function fromString(string,encoding){if((typeof encoding!="string"||encoding==="")&&(encoding="utf8"),!Buffer.isEncoding(encoding))throw new TypeError('"encoding" must be a valid string encoding');return isModern?Buffer.from(string,encoding):new Buffer(string,encoding)}function bufferFrom(value,encodingOrOffset,length){if(typeof value=="number")throw new TypeError('"value" argument must not be a number');return isArrayBuffer(value)?fromArrayBuffer(value,encodingOrOffset,length):typeof value=="string"?fromString(value,encodingOrOffset):isModern?Buffer.from(value):new Buffer(value)}module.exports=bufferFrom;}});var require_peek_stream=__commonJS({"../../node_modules/peek-stream/index.js"(exports,module){var duplexify=require_duplexify(),through=require_through2(),bufferFrom=require_buffer_from(),isObject=function(data){return !Buffer.isBuffer(data)&&typeof data!="string"},peek=function(opts,onpeek){if(typeof opts=="number"&&(opts={maxBuffer:opts}),typeof opts=="function")return peek(null,opts);opts||(opts={});var maxBuffer=typeof opts.maxBuffer=="number"?opts.maxBuffer:65535,strict=opts.strict,newline=opts.newline!==!1,buffer=[],bufferSize=0,dup=duplexify.obj(),peeker=through.obj({highWaterMark:1},function(data,enc,cb){if(isObject(data))return ready(data,null,cb);if(Buffer.isBuffer(data)||(data=bufferFrom(data)),newline){var nl=Array.prototype.indexOf.call(data,10);if(nl>0&&data[nl-1]===13&&nl--,nl>-1)return buffer.push(data.slice(0,nl)),ready(Buffer.concat(buffer),data.slice(nl),cb)}if(buffer.push(data),bufferSize+=data.length,bufferSize<maxBuffer)return cb();if(strict)return cb(new Error("No newline found"));ready(Buffer.concat(buffer),null,cb);}),onpreend=function(){if(strict)return dup.destroy(new Error("No newline found"));dup.cork(),ready(Buffer.concat(buffer),null,function(err){if(err)return dup.destroy(err);dup.uncork();});},ready=function(data,overflow,cb){dup.removeListener("preend",onpreend),onpeek(data,function(err,parser){if(err)return cb(err);dup.setWritable(parser),dup.setReadable(parser),data&&parser.write(data),overflow&&parser.write(overflow),overflow=buffer=peeker=null,cb();});};return dup.on("preend",onpreend),dup.setWritable(peeker),dup};module.exports=peek;}});var require_pump2=__commonJS({"../../node_modules/pumpify/node_modules/pump/index.js"(exports,module){var once2=require_once(),eos=require_end_of_stream(),fs8=__require("fs"),noop3=function(){},ancient=/^v?\.0/.test(process.version),isFn=function(fn){return typeof fn=="function"},isFS=function(stream2){return !ancient||!fs8?!1:(stream2 instanceof(fs8.ReadStream||noop3)||stream2 instanceof(fs8.WriteStream||noop3))&&isFn(stream2.close)},isRequest3=function(stream2){return stream2.setHeader&&isFn(stream2.abort)},destroyer=function(stream2,reading,writing,callback){callback=once2(callback);var closed=!1;stream2.on("close",function(){closed=!0;}),eos(stream2,{readable:reading,writable:writing},function(err){if(err)return callback(err);closed=!0,callback();});var destroyed=!1;return function(err){if(!closed&&!destroyed){if(destroyed=!0,isFS(stream2))return stream2.close(noop3);if(isRequest3(stream2))return stream2.abort();if(isFn(stream2.destroy))return stream2.destroy();callback(err||new Error("stream was destroyed"));}}},call=function(fn){fn();},pipe2=function(from,to){return from.pipe(to)},pump2=function(){var streams=Array.prototype.slice.call(arguments),callback=isFn(streams[streams.length-1]||noop3)&&streams.pop()||noop3;if(Array.isArray(streams[0])&&(streams=streams[0]),streams.length<2)throw new Error("pump requires two streams per minimum");var error,destroys=streams.map(function(stream2,i){var reading=i<streams.length-1,writing=i>0;return destroyer(stream2,reading,writing,function(err){error||(error=err),err&&destroys.forEach(call),!reading&&(destroys.forEach(call),callback(error));})});streams.reduce(pipe2);};module.exports=pump2;}});var require_isarray3=__commonJS({"../../node_modules/pumpify/node_modules/isarray/index.js"(exports,module){var toString2={}.toString;module.exports=Array.isArray||function(arr){return toString2.call(arr)=="[object Array]"};}});var require_stream5=__commonJS({"../../node_modules/pumpify/node_modules/readable-stream/lib/internal/streams/stream.js"(exports,module){module.exports=__require("stream");}});var require_safe_buffer4=__commonJS({"../../node_modules/pumpify/node_modules/safe-buffer/index.js"(exports,module){var buffer=__require("buffer"),Buffer4=buffer.Buffer;function copyProps(src,dst){for(var key in src)dst[key]=src[key];}Buffer4.from&&Buffer4.alloc&&Buffer4.allocUnsafe&&Buffer4.allocUnsafeSlow?module.exports=buffer:(copyProps(buffer,exports),exports.Buffer=SafeBuffer);function SafeBuffer(arg,encodingOrOffset,length){return Buffer4(arg,encodingOrOffset,length)}copyProps(Buffer4,SafeBuffer);SafeBuffer.from=function(arg,encodingOrOffset,length){if(typeof arg=="number")throw new TypeError("Argument must not be a number");return Buffer4(arg,encodingOrOffset,length)};SafeBuffer.alloc=function(size,fill,encoding){if(typeof size!="number")throw new TypeError("Argument must be a number");var buf=Buffer4(size);return fill!==void 0?typeof encoding=="string"?buf.fill(fill,encoding):buf.fill(fill):buf.fill(0),buf};SafeBuffer.allocUnsafe=function(size){if(typeof size!="number")throw new TypeError("Argument must be a number");return Buffer4(size)};SafeBuffer.allocUnsafeSlow=function(size){if(typeof size!="number")throw new TypeError("Argument must be a number");return buffer.SlowBuffer(size)};}});var require_BufferList4=__commonJS({"../../node_modules/pumpify/node_modules/readable-stream/lib/internal/streams/BufferList.js"(exports,module){function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}var Buffer4=require_safe_buffer4().Buffer,util=__require("util");function copyBuffer(src,target,offset){src.copy(target,offset);}module.exports=function(){function BufferList(){_classCallCheck(this,BufferList),this.head=null,this.tail=null,this.length=0;}return BufferList.prototype.push=function(v){var entry={data:v,next:null};this.length>0?this.tail.next=entry:this.head=entry,this.tail=entry,++this.length;},BufferList.prototype.unshift=function(v){var entry={data:v,next:this.head};this.length===0&&(this.tail=entry),this.head=entry,++this.length;},BufferList.prototype.shift=function(){if(this.length!==0){var ret=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,ret}},BufferList.prototype.clear=function(){this.head=this.tail=null,this.length=0;},BufferList.prototype.join=function(s){if(this.length===0)return "";for(var p=this.head,ret=""+p.data;p=p.next;)ret+=s+p.data;return ret},BufferList.prototype.concat=function(n){if(this.length===0)return Buffer4.alloc(0);for(var ret=Buffer4.allocUnsafe(n>>>0),p=this.head,i=0;p;)copyBuffer(p.data,ret,i),i+=p.data.length,p=p.next;return ret},BufferList}();util&&util.inspect&&util.inspect.custom&&(module.exports.prototype[util.inspect.custom]=function(){var obj=util.inspect({length:this.length});return this.constructor.name+" "+obj});}});var require_destroy4=__commonJS({"../../node_modules/pumpify/node_modules/readable-stream/lib/internal/streams/destroy.js"(exports,module){var pna=require_process_nextick_args();function destroy(err,cb){var _this=this,readableDestroyed=this._readableState&&this._readableState.destroyed,writableDestroyed=this._writableState&&this._writableState.destroyed;return readableDestroyed||writableDestroyed?(cb?cb(err):err&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,pna.nextTick(emitErrorNT,this,err)):pna.nextTick(emitErrorNT,this,err)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(err||null,function(err2){!cb&&err2?_this._writableState?_this._writableState.errorEmitted||(_this._writableState.errorEmitted=!0,pna.nextTick(emitErrorNT,_this,err2)):pna.nextTick(emitErrorNT,_this,err2):cb&&cb(err2);}),this)}function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1);}function emitErrorNT(self2,err){self2.emit("error",err);}module.exports={destroy,undestroy};}});var require_stream_writable4=__commonJS({"../../node_modules/pumpify/node_modules/readable-stream/lib/_stream_writable.js"(exports,module){var pna=require_process_nextick_args();module.exports=Writable;function CorkedRequest(state){var _this=this;this.next=null,this.entry=null,this.finish=function(){onCorkedFinish(_this,state);};}var asyncWrite=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:pna.nextTick,Duplex2;Writable.WritableState=WritableState;var util=Object.create(require_util());util.inherits=require_inherits();var internalUtil={deprecate:__require("util-deprecate")},Stream3=require_stream5(),Buffer4=require_safe_buffer4().Buffer,OurUint8Array=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer4.from(chunk)}function _isUint8Array(obj){return Buffer4.isBuffer(obj)||obj instanceof OurUint8Array}var destroyImpl=require_destroy4();util.inherits(Writable,Stream3);function nop(){}function WritableState(options,stream2){Duplex2=Duplex2||require_stream_duplex4(),options=options||{};var isDuplex=stream2 instanceof Duplex2;this.objectMode=!!options.objectMode,isDuplex&&(this.objectMode=this.objectMode||!!options.writableObjectMode);var hwm=options.highWaterMark,writableHwm=options.writableHighWaterMark,defaultHwm=this.objectMode?16:16*1024;hwm||hwm===0?this.highWaterMark=hwm:isDuplex&&(writableHwm||writableHwm===0)?this.highWaterMark=writableHwm:this.highWaterMark=defaultHwm,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var noDecode=options.decodeStrings===!1;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream2,er);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this);}WritableState.prototype.getBuffer=function(){for(var current=this.bufferedRequest,out=[];current;)out.push(current),current=current.next;return out};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch{}})();var realHasInstance;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(object){return realHasInstance.call(this,object)?!0:this!==Writable?!1:object&&object._writableState instanceof WritableState}})):realHasInstance=function(object){return object instanceof this};function Writable(options){if(Duplex2=Duplex2||require_stream_duplex4(),!realHasInstance.call(Writable,this)&&!(this instanceof Duplex2))return new Writable(options);this._writableState=new WritableState(options,this),this.writable=!0,options&&(typeof options.write=="function"&&(this._write=options.write),typeof options.writev=="function"&&(this._writev=options.writev),typeof options.destroy=="function"&&(this._destroy=options.destroy),typeof options.final=="function"&&(this._final=options.final)),Stream3.call(this);}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"));};function writeAfterEnd(stream2,cb){var er=new Error("write after end");stream2.emit("error",er),pna.nextTick(cb,er);}function validChunk(stream2,state,chunk,cb){var valid=!0,er=!1;return chunk===null?er=new TypeError("May not write null values to stream"):typeof chunk!="string"&&chunk!==void 0&&!state.objectMode&&(er=new TypeError("Invalid non-string/buffer chunk")),er&&(stream2.emit("error",er),pna.nextTick(cb,er),valid=!1),valid}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1,isBuf=!state.objectMode&&_isUint8Array(chunk);return isBuf&&!Buffer4.isBuffer(chunk)&&(chunk=_uint8ArrayToBuffer(chunk)),typeof encoding=="function"&&(cb=encoding,encoding=null),isBuf?encoding="buffer":encoding||(encoding=state.defaultEncoding),typeof cb!="function"&&(cb=nop),state.ended?writeAfterEnd(this,cb):(isBuf||validChunk(this,state,chunk,cb))&&(state.pendingcb++,ret=writeOrBuffer(this,state,isBuf,chunk,encoding,cb)),ret};Writable.prototype.cork=function(){var state=this._writableState;state.corked++;};Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,!state.writing&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest&&clearBuffer(this,state));};Writable.prototype.setDefaultEncoding=function(encoding){if(typeof encoding=="string"&&(encoding=encoding.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);return this._writableState.defaultEncoding=encoding,this};function decodeChunk(state,chunk,encoding){return !state.objectMode&&state.decodeStrings!==!1&&typeof chunk=="string"&&(chunk=Buffer4.from(chunk,encoding)),chunk}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function writeOrBuffer(stream2,state,isBuf,chunk,encoding,cb){if(!isBuf){var newChunk=decodeChunk(state,chunk,encoding);chunk!==newChunk&&(isBuf=!0,encoding="buffer",chunk=newChunk);}var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(ret||(state.needDrain=!0),state.writing||state.corked){var last=state.lastBufferedRequest;state.lastBufferedRequest={chunk,encoding,isBuf,callback:cb,next:null},last?last.next=state.lastBufferedRequest:state.bufferedRequest=state.lastBufferedRequest,state.bufferedRequestCount+=1;}else doWrite(stream2,state,!1,len,chunk,encoding,cb);return ret}function doWrite(stream2,state,writev,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,writev?stream2._writev(chunk,state.onwrite):stream2._write(chunk,encoding,state.onwrite),state.sync=!1;}function onwriteError(stream2,state,sync,er,cb){--state.pendingcb,sync?(pna.nextTick(cb,er),pna.nextTick(finishMaybe,stream2,state),stream2._writableState.errorEmitted=!0,stream2.emit("error",er)):(cb(er),stream2._writableState.errorEmitted=!0,stream2.emit("error",er),finishMaybe(stream2,state));}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0;}function onwrite(stream2,er){var state=stream2._writableState,sync=state.sync,cb=state.writecb;if(onwriteStateUpdate(state),er)onwriteError(stream2,state,sync,er,cb);else {var finished=needFinish(state);!finished&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest&&clearBuffer(stream2,state),sync?asyncWrite(afterWrite,stream2,state,finished,cb):afterWrite(stream2,state,finished,cb);}}function afterWrite(stream2,state,finished,cb){finished||onwriteDrain(stream2,state),state.pendingcb--,cb(),finishMaybe(stream2,state);}function onwriteDrain(stream2,state){state.length===0&&state.needDrain&&(state.needDrain=!1,stream2.emit("drain"));}function clearBuffer(stream2,state){state.bufferProcessing=!0;var entry=state.bufferedRequest;if(stream2._writev&&entry&&entry.next){var l=state.bufferedRequestCount,buffer=new Array(l),holder=state.corkedRequestsFree;holder.entry=entry;for(var count=0,allBuffers=!0;entry;)buffer[count]=entry,entry.isBuf||(allBuffers=!1),entry=entry.next,count+=1;buffer.allBuffers=allBuffers,doWrite(stream2,state,!0,state.length,buffer,"",holder.finish),state.pendingcb++,state.lastBufferedRequest=null,holder.next?(state.corkedRequestsFree=holder.next,holder.next=null):state.corkedRequestsFree=new CorkedRequest(state),state.bufferedRequestCount=0;}else {for(;entry;){var chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback,len=state.objectMode?1:chunk.length;if(doWrite(stream2,state,!1,len,chunk,encoding,cb),entry=entry.next,state.bufferedRequestCount--,state.writing)break}entry===null&&(state.lastBufferedRequest=null);}state.bufferedRequest=entry,state.bufferProcessing=!1;}Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("_write() is not implemented"));};Writable.prototype._writev=null;Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;typeof chunk=="function"?(cb=chunk,chunk=null,encoding=null):typeof encoding=="function"&&(cb=encoding,encoding=null),chunk!=null&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||endWritable(this,state,cb);};function needFinish(state){return state.ending&&state.length===0&&state.bufferedRequest===null&&!state.finished&&!state.writing}function callFinal(stream2,state){stream2._final(function(err){state.pendingcb--,err&&stream2.emit("error",err),state.prefinished=!0,stream2.emit("prefinish"),finishMaybe(stream2,state);});}function prefinish(stream2,state){!state.prefinished&&!state.finalCalled&&(typeof stream2._final=="function"?(state.pendingcb++,state.finalCalled=!0,pna.nextTick(callFinal,stream2,state)):(state.prefinished=!0,stream2.emit("prefinish")));}function finishMaybe(stream2,state){var need=needFinish(state);return need&&(prefinish(stream2,state),state.pendingcb===0&&(state.finished=!0,stream2.emit("finish"))),need}function endWritable(stream2,state,cb){state.ending=!0,finishMaybe(stream2,state),cb&&(state.finished?pna.nextTick(cb):stream2.once("finish",cb)),state.ended=!0,stream2.writable=!1;}function onCorkedFinish(corkReq,state,err){var entry=corkReq.entry;for(corkReq.entry=null;entry;){var cb=entry.callback;state.pendingcb--,cb(err),entry=entry.next;}state.corkedRequestsFree.next=corkReq;}Object.defineProperty(Writable.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(value){this._writableState&&(this._writableState.destroyed=value);}});Writable.prototype.destroy=destroyImpl.destroy;Writable.prototype._undestroy=destroyImpl.undestroy;Writable.prototype._destroy=function(err,cb){this.end(),cb(err);};}});var require_stream_duplex4=__commonJS({"../../node_modules/pumpify/node_modules/readable-stream/lib/_stream_duplex.js"(exports,module){var pna=require_process_nextick_args(),objectKeys=Object.keys||function(obj){var keys2=[];for(var key in obj)keys2.push(key);return keys2};module.exports=Duplex2;var util=Object.create(require_util());util.inherits=require_inherits();var Readable=require_stream_readable4(),Writable=require_stream_writable4();util.inherits(Duplex2,Readable);for(keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++)method=keys[v],Duplex2.prototype[method]||(Duplex2.prototype[method]=Writable.prototype[method]);var keys,method,v;function Duplex2(options){if(!(this instanceof Duplex2))return new Duplex2(options);Readable.call(this,options),Writable.call(this,options),options&&options.readable===!1&&(this.readable=!1),options&&options.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,options&&options.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",onend);}Object.defineProperty(Duplex2.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function onend(){this.allowHalfOpen||this._writableState.ended||pna.nextTick(onEndNT,this);}function onEndNT(self2){self2.end();}Object.defineProperty(Duplex2.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(value){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=value,this._writableState.destroyed=value);}});Duplex2.prototype._destroy=function(err,cb){this.push(null),this.end(),pna.nextTick(cb,err);};}});var require_string_decoder4=__commonJS({"../../node_modules/pumpify/node_modules/string_decoder/lib/string_decoder.js"(exports){var Buffer4=require_safe_buffer4().Buffer,isEncoding=Buffer4.isEncoding||function(encoding){switch(encoding=""+encoding,encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return !0;default:return !1}};function _normalizeEncoding(enc){if(!enc)return "utf8";for(var retried;;)switch(enc){case"utf8":case"utf-8":return "utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return "utf16le";case"latin1":case"binary":return "latin1";case"base64":case"ascii":case"hex":return enc;default:if(retried)return;enc=(""+enc).toLowerCase(),retried=!0;}}function normalizeEncoding(enc){var nenc=_normalizeEncoding(enc);if(typeof nenc!="string"&&(Buffer4.isEncoding===isEncoding||!isEncoding(enc)))throw new Error("Unknown encoding: "+enc);return nenc||enc}exports.StringDecoder=StringDecoder;function StringDecoder(encoding){this.encoding=normalizeEncoding(encoding);var nb;switch(this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,nb=4;break;case"utf8":this.fillLast=utf8FillLast,nb=4;break;case"base64":this.text=base64Text,this.end=base64End,nb=3;break;default:this.write=simpleWrite,this.end=simpleEnd;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Buffer4.allocUnsafe(nb);}StringDecoder.prototype.write=function(buf){if(buf.length===0)return "";var r,i;if(this.lastNeed){if(r=this.fillLast(buf),r===void 0)return "";i=this.lastNeed,this.lastNeed=0;}else i=0;return i<buf.length?r?r+this.text(buf,i):this.text(buf,i):r||""};StringDecoder.prototype.end=utf8End;StringDecoder.prototype.text=utf8Text;StringDecoder.prototype.fillLast=function(buf){if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,buf.length),this.lastNeed-=buf.length;};function utf8CheckByte(byte){return byte<=127?0:byte>>5===6?2:byte>>4===14?3:byte>>3===30?4:byte>>6===2?-1:-2}function utf8CheckIncomplete(self2,buf,i){var j=buf.length-1;if(j<i)return 0;var nb=utf8CheckByte(buf[j]);return nb>=0?(nb>0&&(self2.lastNeed=nb-1),nb):--j<i||nb===-2?0:(nb=utf8CheckByte(buf[j]),nb>=0?(nb>0&&(self2.lastNeed=nb-2),nb):--j<i||nb===-2?0:(nb=utf8CheckByte(buf[j]),nb>=0?(nb>0&&(nb===2?nb=0:self2.lastNeed=nb-3),nb):0))}function utf8CheckExtraBytes(self2,buf,p){if((buf[0]&192)!==128)return self2.lastNeed=0,"\uFFFD";if(self2.lastNeed>1&&buf.length>1){if((buf[1]&192)!==128)return self2.lastNeed=1,"\uFFFD";if(self2.lastNeed>2&&buf.length>2&&(buf[2]&192)!==128)return self2.lastNeed=2,"\uFFFD"}}function utf8FillLast(buf){var p=this.lastTotal-this.lastNeed,r=utf8CheckExtraBytes(this,buf);if(r!==void 0)return r;if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,p,0,buf.length),this.lastNeed-=buf.length;}function utf8Text(buf,i){var total=utf8CheckIncomplete(this,buf,i);if(!this.lastNeed)return buf.toString("utf8",i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);return buf.copy(this.lastChar,0,end),buf.toString("utf8",i,end)}function utf8End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+"\uFFFD":r}function utf16Text(buf,i){if((buf.length-i)%2===0){var r=buf.toString("utf16le",i);if(r){var c=r.charCodeAt(r.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=buf[buf.length-1],buf.toString("utf16le",i,buf.length-1)}function utf16End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,end)}return r}function base64Text(buf,i){var n=(buf.length-i)%3;return n===0?buf.toString("base64",i):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=buf[buf.length-1]:(this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1]),buf.toString("base64",i,buf.length-n))}function base64End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function simpleWrite(buf){return buf.toString(this.encoding)}function simpleEnd(buf){return buf&&buf.length?this.write(buf):""}}});var require_stream_readable4=__commonJS({"../../node_modules/pumpify/node_modules/readable-stream/lib/_stream_readable.js"(exports,module){var pna=require_process_nextick_args();module.exports=Readable;var isArray=require_isarray3(),Duplex2;Readable.ReadableState=ReadableState;__require("events").EventEmitter;var EElistenerCount=function(emitter,type){return emitter.listeners(type).length},Stream3=require_stream5(),Buffer4=require_safe_buffer4().Buffer,OurUint8Array=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer4.from(chunk)}function _isUint8Array(obj){return Buffer4.isBuffer(obj)||obj instanceof OurUint8Array}var util=Object.create(require_util());util.inherits=require_inherits();var debugUtil=__require("util"),debug=void 0;debugUtil&&debugUtil.debuglog?debug=debugUtil.debuglog("stream"):debug=function(){};var BufferList=require_BufferList4(),destroyImpl=require_destroy4(),StringDecoder;util.inherits(Readable,Stream3);var kProxyEvents=["error","close","destroy","pause","resume"];function prependListener(emitter,event,fn){if(typeof emitter.prependListener=="function")return emitter.prependListener(event,fn);!emitter._events||!emitter._events[event]?emitter.on(event,fn):isArray(emitter._events[event])?emitter._events[event].unshift(fn):emitter._events[event]=[fn,emitter._events[event]];}function ReadableState(options,stream2){Duplex2=Duplex2||require_stream_duplex4(),options=options||{};var isDuplex=stream2 instanceof Duplex2;this.objectMode=!!options.objectMode,isDuplex&&(this.objectMode=this.objectMode||!!options.readableObjectMode);var hwm=options.highWaterMark,readableHwm=options.readableHighWaterMark,defaultHwm=this.objectMode?16:16*1024;hwm||hwm===0?this.highWaterMark=hwm:isDuplex&&(readableHwm||readableHwm===0)?this.highWaterMark=readableHwm:this.highWaterMark=defaultHwm,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new BufferList,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=options.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=require_string_decoder4().StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding);}function Readable(options){if(Duplex2=Duplex2||require_stream_duplex4(),!(this instanceof Readable))return new Readable(options);this._readableState=new ReadableState(options,this),this.readable=!0,options&&(typeof options.read=="function"&&(this._read=options.read),typeof options.destroy=="function"&&(this._destroy=options.destroy)),Stream3.call(this);}Object.defineProperty(Readable.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(value){this._readableState&&(this._readableState.destroyed=value);}});Readable.prototype.destroy=destroyImpl.destroy;Readable.prototype._undestroy=destroyImpl.undestroy;Readable.prototype._destroy=function(err,cb){this.push(null),cb(err);};Readable.prototype.push=function(chunk,encoding){var state=this._readableState,skipChunkCheck;return state.objectMode?skipChunkCheck=!0:typeof chunk=="string"&&(encoding=encoding||state.defaultEncoding,encoding!==state.encoding&&(chunk=Buffer4.from(chunk,encoding),encoding=""),skipChunkCheck=!0),readableAddChunk(this,chunk,encoding,!1,skipChunkCheck)};Readable.prototype.unshift=function(chunk){return readableAddChunk(this,chunk,null,!0,!1)};function readableAddChunk(stream2,chunk,encoding,addToFront,skipChunkCheck){var state=stream2._readableState;if(chunk===null)state.reading=!1,onEofChunk(stream2,state);else {var er;skipChunkCheck||(er=chunkInvalid(state,chunk)),er?stream2.emit("error",er):state.objectMode||chunk&&chunk.length>0?(typeof chunk!="string"&&!state.objectMode&&Object.getPrototypeOf(chunk)!==Buffer4.prototype&&(chunk=_uint8ArrayToBuffer(chunk)),addToFront?state.endEmitted?stream2.emit("error",new Error("stream.unshift() after end event")):addChunk(stream2,state,chunk,!0):state.ended?stream2.emit("error",new Error("stream.push() after EOF")):(state.reading=!1,state.decoder&&!encoding?(chunk=state.decoder.write(chunk),state.objectMode||chunk.length!==0?addChunk(stream2,state,chunk,!1):maybeReadMore(stream2,state)):addChunk(stream2,state,chunk,!1))):addToFront||(state.reading=!1);}return needMoreData(state)}function addChunk(stream2,state,chunk,addToFront){state.flowing&&state.length===0&&!state.sync?(stream2.emit("data",chunk),stream2.read(0)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream2)),maybeReadMore(stream2,state);}function chunkInvalid(state,chunk){var er;return !_isUint8Array(chunk)&&typeof chunk!="string"&&chunk!==void 0&&!state.objectMode&&(er=new TypeError("Invalid non-string/buffer chunk")),er}function needMoreData(state){return !state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0)}Readable.prototype.isPaused=function(){return this._readableState.flowing===!1};Readable.prototype.setEncoding=function(enc){return StringDecoder||(StringDecoder=require_string_decoder4().StringDecoder),this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc,this};var MAX_HWM=8388608;function computeNewHighWaterMark(n){return n>=MAX_HWM?n=MAX_HWM:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}function howMuchToRead(n,state){return n<=0||state.length===0&&state.ended?0:state.objectMode?1:n!==n?state.flowing&&state.length?state.buffer.head.data.length:state.length:(n>state.highWaterMark&&(state.highWaterMark=computeNewHighWaterMark(n)),n<=state.length?n:state.ended?state.length:(state.needReadable=!0,0))}Readable.prototype.read=function(n){debug("read",n),n=parseInt(n,10);var state=this._readableState,nOrig=n;if(n!==0&&(state.emittedReadable=!1),n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return debug("read: emitReadable",state.length,state.ended),state.length===0&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),n===0&&state.ended)return state.length===0&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(state.length===0||state.length-n<state.highWaterMark)&&(doRead=!0,debug("length less than watermark",doRead)),state.ended||state.reading?(doRead=!1,debug("reading or ended",doRead)):doRead&&(debug("do read"),state.reading=!0,state.sync=!0,state.length===0&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1,state.reading||(n=howMuchToRead(nOrig,state)));var ret;return n>0?ret=fromList(n,state):ret=null,ret===null?(state.needReadable=!0,n=0):state.length-=n,state.length===0&&(state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&endReadable(this)),ret!==null&&this.emit("data",ret),ret};function onEofChunk(stream2,state){if(!state.ended){if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length);}state.ended=!0,emitReadable(stream2);}}function emitReadable(stream2){var state=stream2._readableState;state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync?pna.nextTick(emitReadable_,stream2):emitReadable_(stream2));}function emitReadable_(stream2){debug("emit readable"),stream2.emit("readable"),flow(stream2);}function maybeReadMore(stream2,state){state.readingMore||(state.readingMore=!0,pna.nextTick(maybeReadMore_,stream2,state));}function maybeReadMore_(stream2,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark&&(debug("maybeReadMore read 0"),stream2.read(0),len!==state.length);)len=state.length;state.readingMore=!1;}Readable.prototype._read=function(n){this.emit("error",new Error("_read() is not implemented"));};Readable.prototype.pipe=function(dest,pipeOpts){var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest);break}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:unpipe;state.endEmitted?pna.nextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);function onunpipe(readable,unpipeInfo){debug("onunpipe"),readable===src&&unpipeInfo&&unpipeInfo.hasUnpiped===!1&&(unpipeInfo.hasUnpiped=!0,cleanup());}function onend(){debug("onend"),dest.end();}var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=!1;function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",unpipe),src.removeListener("data",ondata),cleanedUp=!0,state.awaitDrain&&(!dest._writableState||dest._writableState.needDrain)&&ondrain();}var increasedAwaitDrain=!1;src.on("data",ondata);function ondata(chunk){debug("ondata"),increasedAwaitDrain=!1;var ret=dest.write(chunk);ret===!1&&!increasedAwaitDrain&&((state.pipesCount===1&&state.pipes===dest||state.pipesCount>1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp&&(debug("false write response, pause",state.awaitDrain),state.awaitDrain++,increasedAwaitDrain=!0),src.pause());}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),EElistenerCount(dest,"error")===0&&dest.emit("error",er);}prependListener(dest,"error",onerror);function onclose(){dest.removeListener("finish",onfinish),unpipe();}dest.once("close",onclose);function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe();}dest.once("finish",onfinish);function unpipe(){debug("unpipe"),src.unpipe(dest);}return dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest};function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,state.awaitDrain===0&&EElistenerCount(src,"data")&&(state.flowing=!0,flow(src));}}Readable.prototype.unpipe=function(dest){var state=this._readableState,unpipeInfo={hasUnpiped:!1};if(state.pipesCount===0)return this;if(state.pipesCount===1)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this,unpipeInfo),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;i<len;i++)dests[i].emit("unpipe",this,{hasUnpiped:!1});return this}var index=indexOf(state.pipes,dest);return index===-1?this:(state.pipes.splice(index,1),state.pipesCount-=1,state.pipesCount===1&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this,unpipeInfo),this)};Readable.prototype.on=function(ev,fn){var res=Stream3.prototype.on.call(this,ev,fn);if(ev==="data")this._readableState.flowing!==!1&&this.resume();else if(ev==="readable"){var state=this._readableState;!state.endEmitted&&!state.readableListening&&(state.readableListening=state.needReadable=!0,state.emittedReadable=!1,state.reading?state.length&&emitReadable(this):pna.nextTick(nReadingNextTick,this));}return res};Readable.prototype.addListener=Readable.prototype.on;function nReadingNextTick(self2){debug("readable nexttick read 0"),self2.read(0);}Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!0,resume(this,state)),this};function resume(stream2,state){state.resumeScheduled||(state.resumeScheduled=!0,pna.nextTick(resume_,stream2,state));}function resume_(stream2,state){state.reading||(debug("resume read 0"),stream2.read(0)),state.resumeScheduled=!1,state.awaitDrain=0,stream2.emit("resume"),flow(stream2),state.flowing&&!state.reading&&stream2.read(0);}Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function flow(stream2){var state=stream2._readableState;for(debug("flow",state.flowing);state.flowing&&stream2.read()!==null;);}Readable.prototype.wrap=function(stream2){var _this=this,state=this._readableState,paused=!1;stream2.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&_this.push(chunk);}_this.push(null);}),stream2.on("data",function(chunk){if(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),!(state.objectMode&&chunk==null)&&!(!state.objectMode&&(!chunk||!chunk.length))){var ret=_this.push(chunk);ret||(paused=!0,stream2.pause());}});for(var i in stream2)this[i]===void 0&&typeof stream2[i]=="function"&&(this[i]=function(method){return function(){return stream2[method].apply(stream2,arguments)}}(i));for(var n=0;n<kProxyEvents.length;n++)stream2.on(kProxyEvents[n],this.emit.bind(this,kProxyEvents[n]));return this._read=function(n2){debug("wrapped _read",n2),paused&&(paused=!1,stream2.resume());},this};Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Readable._fromList=fromList;function fromList(n,state){if(state.length===0)return null;var ret;return state.objectMode?ret=state.buffer.shift():!n||n>=state.length?(state.decoder?ret=state.buffer.join(""):state.buffer.length===1?ret=state.buffer.head.data:ret=state.buffer.concat(state.length),state.buffer.clear()):ret=fromListPartial(n,state.buffer,state.decoder),ret}function fromListPartial(n,list,hasStrings){var ret;return n<list.head.data.length?(ret=list.head.data.slice(0,n),list.head.data=list.head.data.slice(n)):n===list.head.data.length?ret=list.shift():ret=hasStrings?copyFromBufferString(n,list):copyFromBuffer(n,list),ret}function copyFromBufferString(n,list){var p=list.head,c=1,ret=p.data;for(n-=ret.length;p=p.next;){var str=p.data,nb=n>str.length?str.length:n;if(nb===str.length?ret+=str:ret+=str.slice(0,n),n-=nb,n===0){nb===str.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=str.slice(nb));break}++c;}return list.length-=c,ret}function copyFromBuffer(n,list){var ret=Buffer4.allocUnsafe(n),p=list.head,c=1;for(p.data.copy(ret),n-=p.data.length;p=p.next;){var buf=p.data,nb=n>buf.length?buf.length:n;if(buf.copy(ret,ret.length-n,0,nb),n-=nb,n===0){nb===buf.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=buf.slice(nb));break}++c;}return list.length-=c,ret}function endReadable(stream2){var state=stream2._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');state.endEmitted||(state.ended=!0,pna.nextTick(endReadableNT,state,stream2));}function endReadableNT(state,stream2){!state.endEmitted&&state.length===0&&(state.endEmitted=!0,stream2.readable=!1,stream2.emit("end"));}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return -1}}});var require_stream_transform4=__commonJS({"../../node_modules/pumpify/node_modules/readable-stream/lib/_stream_transform.js"(exports,module){module.exports=Transform;var Duplex2=require_stream_duplex4(),util=Object.create(require_util());util.inherits=require_inherits();util.inherits(Transform,Duplex2);function afterTransform(er,data){var ts=this._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return this.emit("error",new Error("write callback called multiple times"));ts.writechunk=null,ts.writecb=null,data!=null&&this.push(data),cb(er);var rs=this._readableState;rs.reading=!1,(rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark);}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex2.call(this,options),this._transformState={afterTransform:afterTransform.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,options&&(typeof options.transform=="function"&&(this._transform=options.transform),typeof options.flush=="function"&&(this._flush=options.flush)),this.on("prefinish",prefinish);}function prefinish(){var _this=this;typeof this._flush=="function"?this._flush(function(er,data){done(_this,er,data);}):done(this,null,null);}Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex2.prototype.push.call(this,chunk,encoding)};Transform.prototype._transform=function(chunk,encoding,cb){throw new Error("_transform() is not implemented")};Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark);}};Transform.prototype._read=function(n){var ts=this._transformState;ts.writechunk!==null&&ts.writecb&&!ts.transforming?(ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)):ts.needTransform=!0;};Transform.prototype._destroy=function(err,cb){var _this2=this;Duplex2.prototype._destroy.call(this,err,function(err2){cb(err2),_this2.emit("close");});};function done(stream2,er,data){if(er)return stream2.emit("error",er);if(data!=null&&stream2.push(data),stream2._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(stream2._transformState.transforming)throw new Error("Calling transform done when still transforming");return stream2.push(null)}}});var require_stream_passthrough4=__commonJS({"../../node_modules/pumpify/node_modules/readable-stream/lib/_stream_passthrough.js"(exports,module){module.exports=PassThrough3;var Transform=require_stream_transform4(),util=Object.create(require_util());util.inherits=require_inherits();util.inherits(PassThrough3,Transform);function PassThrough3(options){if(!(this instanceof PassThrough3))return new PassThrough3(options);Transform.call(this,options);}PassThrough3.prototype._transform=function(chunk,encoding,cb){cb(null,chunk);};}});var require_readable4=__commonJS({"../../node_modules/pumpify/node_modules/readable-stream/readable.js"(exports,module){var Stream3=__require("stream");process.env.READABLE_STREAM==="disable"&&Stream3?(module.exports=Stream3,exports=module.exports=Stream3.Readable,exports.Readable=Stream3.Readable,exports.Writable=Stream3.Writable,exports.Duplex=Stream3.Duplex,exports.Transform=Stream3.Transform,exports.PassThrough=Stream3.PassThrough,exports.Stream=Stream3):(exports=module.exports=require_stream_readable4(),exports.Stream=Stream3||exports,exports.Readable=exports,exports.Writable=require_stream_writable4(),exports.Duplex=require_stream_duplex4(),exports.Transform=require_stream_transform4(),exports.PassThrough=require_stream_passthrough4());}});var require_duplexify2=__commonJS({"../../node_modules/pumpify/node_modules/duplexify/index.js"(exports,module){var stream2=require_readable4(),eos=require_end_of_stream(),inherits=require_inherits(),shift=require_stream_shift(),SIGNAL_FLUSH=Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from([0]):new Buffer([0]),onuncork=function(self2,fn){self2._corked?self2.once("uncork",fn):fn();},autoDestroy=function(self2,err){self2._autoDestroy&&self2.destroy(err);},destroyer=function(self2,end2){return function(err){err?autoDestroy(self2,err.message==="premature close"?null:err):end2&&!self2._ended&&self2.end();}},end=function(ws,fn){if(!ws||ws._writableState&&ws._writableState.finished)return fn();if(ws._writableState)return ws.end(fn);ws.end(),fn();},toStreams2=function(rs){return new stream2.Readable({objectMode:!0,highWaterMark:16}).wrap(rs)},Duplexify=function(writable,readable,opts){if(!(this instanceof Duplexify))return new Duplexify(writable,readable,opts);stream2.Duplex.call(this,opts),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!opts||opts.autoDestroy!==!1,this._forwardDestroy=!opts||opts.destroy!==!1,this._forwardEnd=!opts||opts.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,writable&&this.setWritable(writable),readable&&this.setReadable(readable);};inherits(Duplexify,stream2.Duplex);Duplexify.obj=function(writable,readable,opts){return opts||(opts={}),opts.objectMode=!0,opts.highWaterMark=16,new Duplexify(writable,readable,opts)};Duplexify.prototype.cork=function(){++this._corked===1&&this.emit("cork");};Duplexify.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork");};Duplexify.prototype.setWritable=function(writable){if(this._unwrite&&this._unwrite(),this.destroyed){writable&&writable.destroy&&writable.destroy();return}if(writable===null||writable===!1){this.end();return}var self2=this,unend=eos(writable,{writable:!0,readable:!1},destroyer(this,this._forwardEnd)),ondrain=function(){var ondrain2=self2._ondrain;self2._ondrain=null,ondrain2&&ondrain2();},clear=function(){self2._writable.removeListener("drain",ondrain),unend();};this._unwrite&&process.nextTick(ondrain),this._writable=writable,this._writable.on("drain",ondrain),this._unwrite=clear,this.uncork();};Duplexify.prototype.setReadable=function(readable){if(this._unread&&this._unread(),this.destroyed){readable&&readable.destroy&&readable.destroy();return}if(readable===null||readable===!1){this.push(null),this.resume();return}var self2=this,unend=eos(readable,{writable:!1,readable:!0},destroyer(this)),onreadable=function(){self2._forward();},onend=function(){self2.push(null);},clear=function(){self2._readable2.removeListener("readable",onreadable),self2._readable2.removeListener("end",onend),unend();};this._drained=!0,this._readable=readable,this._readable2=readable._readableState?readable:toStreams2(readable),this._readable2.on("readable",onreadable),this._readable2.on("end",onend),this._unread=clear,this._forward();};Duplexify.prototype._read=function(){this._drained=!0,this._forward();};Duplexify.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var data;this._drained&&(data=shift(this._readable2))!==null;)this.destroyed||(this._drained=this.push(data));this._forwarding=!1;}};Duplexify.prototype.destroy=function(err){if(!this.destroyed){this.destroyed=!0;var self2=this;process.nextTick(function(){self2._destroy(err);});}};Duplexify.prototype._destroy=function(err){if(err){var ondrain=this._ondrain;this._ondrain=null,ondrain?ondrain(err):this.emit("error",err);}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close");};Duplexify.prototype._write=function(data,enc,cb){if(this.destroyed)return cb();if(this._corked)return onuncork(this,this._write.bind(this,data,enc,cb));if(data===SIGNAL_FLUSH)return this._finish(cb);if(!this._writable)return cb();this._writable.write(data)===!1?this._ondrain=cb:cb();};Duplexify.prototype._finish=function(cb){var self2=this;this.emit("preend"),onuncork(this,function(){end(self2._forwardEnd&&self2._writable,function(){self2._writableState.prefinished===!1&&(self2._writableState.prefinished=!0),self2.emit("prefinish"),onuncork(self2,cb);});});};Duplexify.prototype.end=function(data,enc,cb){return typeof data=="function"?this.end(null,null,data):typeof enc=="function"?this.end(data,null,enc):(this._ended=!0,data&&this.write(data),this._writableState.ending||this.write(SIGNAL_FLUSH),stream2.Writable.prototype.end.call(this,cb))};module.exports=Duplexify;}});var require_pumpify=__commonJS({"../../node_modules/pumpify/index.js"(exports,module){var pump2=require_pump2(),inherits=require_inherits(),Duplexify=require_duplexify2(),toArray=function(args){return args.length?Array.isArray(args[0])?args[0]:Array.prototype.slice.call(args):[]},define2=function(opts){var Pumpify=function(){var streams=toArray(arguments);if(!(this instanceof Pumpify))return new Pumpify(streams);Duplexify.call(this,null,null,opts),streams.length&&this.setPipeline(streams);};return inherits(Pumpify,Duplexify),Pumpify.prototype.setPipeline=function(){var streams=toArray(arguments),self2=this,ended=!1,w=streams[0],r=streams[streams.length-1];r=r.readable?r:null,w=w.writable?w:null;var onclose=function(){streams[0].emit("error",new Error("stream was destroyed"));};if(this.on("close",onclose),this.on("prefinish",function(){ended||self2.cork();}),pump2(streams,function(err){if(self2.removeListener("close",onclose),err)return self2.destroy(err.message==="premature close"?null:err);ended=!0,self2._autoDestroy===!1&&(self2._autoDestroy=!0),self2.uncork();}),this.destroyed)return onclose();this.setWritable(w),this.setReadable(r);},Pumpify};module.exports=define2({autoDestroy:!1,destroy:!1});module.exports.obj=define2({autoDestroy:!1,destroy:!1,objectMode:!0,highWaterMark:16});module.exports.ctor=define2;}});var require_is_gzip=__commonJS({"../../node_modules/is-gzip/index.js"(exports,module){module.exports=function(buf){return !buf||buf.length<3?!1:buf[0]===31&&buf[1]===139&&buf[2]===8};}});var require_is_deflate=__commonJS({"../../node_modules/is-deflate/index.js"(exports,module){module.exports=function(buf){return !buf||buf.length<2?!1:buf[0]===120&&(buf[1]===1||buf[1]===156||buf[1]===218)};}});var require_gunzip_maybe=__commonJS({"../../node_modules/gunzip-maybe/index.js"(exports,module){var zlib2=__require("zlib"),peek=require_peek_stream(),through=require_through2(),pumpify=require_pumpify(),isGzip=require_is_gzip(),isDeflate=require_is_deflate(),isCompressed=function(data){return isGzip(data)?1:isDeflate(data)?2:0},gunzip=function(maxRecursion){return maxRecursion===void 0&&(maxRecursion=3),peek({newline:!1,maxBuffer:10},function(data,swap){if(maxRecursion<0)return swap(new Error("Maximum recursion reached"));switch(isCompressed(data)){case 1:swap(null,pumpify(zlib2.createGunzip(),gunzip(maxRecursion-1)));break;case 2:swap(null,pumpify(zlib2.createInflate(),gunzip(maxRecursion-1)));break;default:swap(null,through());}})};module.exports=gunzip;}});var require_lib=__commonJS({"../../node_modules/get-npm-tarball-url/lib/index.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});function default_1(pkgName,pkgVersion,opts){let registry;opts?.registry?registry=opts.registry.endsWith("/")?opts.registry:`${opts.registry}/`:registry="https://registry.npmjs.org/";let scopelessName=getScopelessName(pkgName);return `${registry}${pkgName}/-/${scopelessName}-${removeBuildMetadataFromVersion(pkgVersion)}.tgz`}exports.default=default_1;function removeBuildMetadataFromVersion(version){let plusPos=version.indexOf("+");return plusPos===-1?version:version.substring(0,plusPos)}function getScopelessName(name){return name[0]!=="@"?name:name.split("/")[1]}}});var tslib_es6_exports={};__export(tslib_es6_exports,{__assign:()=>__assign,__asyncDelegator:()=>__asyncDelegator,__asyncGenerator:()=>__asyncGenerator,__asyncValues:()=>__asyncValues,__await:()=>__await,__awaiter:()=>__awaiter,__classPrivateFieldGet:()=>__classPrivateFieldGet2,__classPrivateFieldSet:()=>__classPrivateFieldSet2,__createBinding:()=>__createBinding,__decorate:()=>__decorate,__exportStar:()=>__exportStar,__extends:()=>__extends,__generator:()=>__generator,__importDefault:()=>__importDefault,__importStar:()=>__importStar,__makeTemplateObject:()=>__makeTemplateObject,__metadata:()=>__metadata,__param:()=>__param,__read:()=>__read,__rest:()=>__rest,__spread:()=>__spread,__spreadArrays:()=>__spreadArrays,__values:()=>__values});function __extends(d,b){extendStatics(d,b);function __(){this.constructor=d;}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __);}function __rest(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t}function __decorate(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r}function __param(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex);}}function __metadata(metadataKey,metadataValue){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(metadataKey,metadataValue)}function __awaiter(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve3){resolve3(value);})}return new(P||(P=Promise))(function(resolve3,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator.throw(value));}catch(e){reject(e);}}function step(result){result.done?resolve3(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());})}function __generator(thisArg,body){var _={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},f,y,t,g;return g={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw new TypeError("Generator is already executing.");for(;_;)try{if(f=1,y&&(t=op[0]&2?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[op[0]&2,t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(t=_.trys,!(t=t.length>0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(op[0]===6&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_);}catch(e){op=[6,e],y=0;}finally{f=t=0;}if(op[0]&5)throw op[1];return {value:op[0]?op[1]:void 0,done:!0}}}function __createBinding(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k];}function __exportStar(m,exports){for(var p in m)p!=="default"&&!exports.hasOwnProperty(p)&&(exports[p]=m[p]);}function __values(o){var s=typeof Symbol=="function"&&Symbol.iterator,m=s&&o[s],i=0;if(m)return m.call(o);if(o&&typeof o.length=="number")return {next:function(){return o&&i>=o.length&&(o=void 0),{value:o&&o[i++],done:!o}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(o,n){var m=typeof Symbol=="function"&&o[Symbol.iterator];if(!m)return o;var i=m.call(o),r,ar=[],e;try{for(;(n===void 0||n-- >0)&&!(r=i.next()).done;)ar.push(r.value);}catch(error){e={error};}finally{try{r&&!r.done&&(m=i.return)&&m.call(i);}finally{if(e)throw e.error}}return ar}function __spread(){for(var ar=[],i=0;i<arguments.length;i++)ar=ar.concat(__read(arguments[i]));return ar}function __spreadArrays(){for(var s=0,i=0,il=arguments.length;i<il;i++)s+=arguments[i].length;for(var r=Array(s),k=0,i=0;i<il;i++)for(var a=arguments[i],j=0,jl=a.length;j<jl;j++,k++)r[k]=a[j];return r}function __await(v){return this instanceof __await?(this.v=v,this):new __await(v)}function __asyncGenerator(thisArg,_arguments,generator){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var g=generator.apply(thisArg,_arguments||[]),i,q=[];return i={},verb("next"),verb("throw"),verb("return"),i[Symbol.asyncIterator]=function(){return this},i;function verb(n){g[n]&&(i[n]=function(v){return new Promise(function(a,b){q.push([n,v,a,b])>1||resume(n,v);})});}function resume(n,v){try{step(g[n](v));}catch(e){settle(q[0][3],e);}}function step(r){r.value instanceof __await?Promise.resolve(r.value.v).then(fulfill,reject):settle(q[0][2],r);}function fulfill(value){resume("next",value);}function reject(value){resume("throw",value);}function settle(f,v){f(v),q.shift(),q.length&&resume(q[0][0],q[0][1]);}}function __asyncDelegator(o){var i,p;return i={},verb("next"),verb("throw",function(e){throw e}),verb("return"),i[Symbol.iterator]=function(){return this},i;function verb(n,f){i[n]=o[n]?function(v){return (p=!p)?{value:__await(o[n](v)),done:n==="return"}:f?f(v):v}:f;}}function __asyncValues(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var m=o[Symbol.asyncIterator],i;return m?m.call(o):(o=typeof __values=="function"?__values(o):o[Symbol.iterator](),i={},verb("next"),verb("throw"),verb("return"),i[Symbol.asyncIterator]=function(){return this},i);function verb(n){i[n]=o[n]&&function(v){return new Promise(function(resolve3,reject){v=o[n](v),settle(resolve3,reject,v.done,v.value);})};}function settle(resolve3,reject,d,v){Promise.resolve(v).then(function(v2){resolve3({value:v2,done:d});},reject);}}function __makeTemplateObject(cooked,raw){return Object.defineProperty?Object.defineProperty(cooked,"raw",{value:raw}):cooked.raw=raw,cooked}function __importStar(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)Object.hasOwnProperty.call(mod,k)&&(result[k]=mod[k]);return result.default=mod,result}function __importDefault(mod){return mod&&mod.__esModule?mod:{default:mod}}function __classPrivateFieldGet2(receiver,privateMap){if(!privateMap.has(receiver))throw new TypeError("attempted to get private field on non-instance");return privateMap.get(receiver)}function __classPrivateFieldSet2(receiver,privateMap,value){if(!privateMap.has(receiver))throw new TypeError("attempted to set private field on non-instance");return privateMap.set(receiver,value),value}var extendStatics,__assign,init_tslib_es6=__esm({"../../node_modules/@yarnpkg/fslib/node_modules/tslib/tslib.es6.js"(){extendStatics=function(d,b){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d2,b2){d2.__proto__=b2;}||function(d2,b2){for(var p in b2)b2.hasOwnProperty(p)&&(d2[p]=b2[p]);},extendStatics(d,b)};__assign=function(){return __assign=Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p]);}return t},__assign.apply(this,arguments)};}});var require_constants=__commonJS({"../../node_modules/@yarnpkg/fslib/lib/constants.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.SAFE_TIME=exports.S_IFLNK=exports.S_IFREG=exports.S_IFDIR=exports.S_IFMT=void 0;exports.S_IFMT=61440;exports.S_IFDIR=16384;exports.S_IFREG=32768;exports.S_IFLNK=40960;exports.SAFE_TIME=456789e3;}});var require_statUtils=__commonJS({"../../node_modules/@yarnpkg/fslib/lib/statUtils.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.areStatsEqual=exports.convertToBigIntStats=exports.clearStats=exports.makeEmptyStats=exports.makeDefaultStats=exports.BigIntStatsEntry=exports.StatEntry=exports.DirEntry=exports.DEFAULT_MODE=void 0;var tslib_1=(init_tslib_es6(),__toCommonJS(tslib_es6_exports)),nodeUtils=tslib_1.__importStar(__require("util")),constants_1=require_constants();exports.DEFAULT_MODE=constants_1.S_IFREG|420;var DirEntry=class{constructor(){this.name="",this.mode=0;}isBlockDevice(){return !1}isCharacterDevice(){return !1}isDirectory(){return (this.mode&constants_1.S_IFMT)===constants_1.S_IFDIR}isFIFO(){return !1}isFile(){return (this.mode&constants_1.S_IFMT)===constants_1.S_IFREG}isSocket(){return !1}isSymbolicLink(){return (this.mode&constants_1.S_IFMT)===constants_1.S_IFLNK}};exports.DirEntry=DirEntry;var StatEntry=class{constructor(){this.uid=0,this.gid=0,this.size=0,this.blksize=0,this.atimeMs=0,this.mtimeMs=0,this.ctimeMs=0,this.birthtimeMs=0,this.atime=new Date(0),this.mtime=new Date(0),this.ctime=new Date(0),this.birthtime=new Date(0),this.dev=0,this.ino=0,this.mode=exports.DEFAULT_MODE,this.nlink=1,this.rdev=0,this.blocks=1;}isBlockDevice(){return !1}isCharacterDevice(){return !1}isDirectory(){return (this.mode&constants_1.S_IFMT)===constants_1.S_IFDIR}isFIFO(){return !1}isFile(){return (this.mode&constants_1.S_IFMT)===constants_1.S_IFREG}isSocket(){return !1}isSymbolicLink(){return (this.mode&constants_1.S_IFMT)===constants_1.S_IFLNK}};exports.StatEntry=StatEntry;var BigIntStatsEntry=class{constructor(){this.uid=BigInt(0),this.gid=BigInt(0),this.size=BigInt(0),this.blksize=BigInt(0),this.atimeMs=BigInt(0),this.mtimeMs=BigInt(0),this.ctimeMs=BigInt(0),this.birthtimeMs=BigInt(0),this.atimeNs=BigInt(0),this.mtimeNs=BigInt(0),this.ctimeNs=BigInt(0),this.birthtimeNs=BigInt(0),this.atime=new Date(0),this.mtime=new Date(0),this.ctime=new Date(0),this.birthtime=new Date(0),this.dev=BigInt(0),this.ino=BigInt(0),this.mode=BigInt(exports.DEFAULT_MODE),this.nlink=BigInt(1),this.rdev=BigInt(0),this.blocks=BigInt(1);}isBlockDevice(){return !1}isCharacterDevice(){return !1}isDirectory(){return (this.mode&BigInt(constants_1.S_IFMT))===BigInt(constants_1.S_IFDIR)}isFIFO(){return !1}isFile(){return (this.mode&BigInt(constants_1.S_IFMT))===BigInt(constants_1.S_IFREG)}isSocket(){return !1}isSymbolicLink(){return (this.mode&BigInt(constants_1.S_IFMT))===BigInt(constants_1.S_IFLNK)}};exports.BigIntStatsEntry=BigIntStatsEntry;function makeDefaultStats(){return new StatEntry}exports.makeDefaultStats=makeDefaultStats;function makeEmptyStats(){return clearStats(makeDefaultStats())}exports.makeEmptyStats=makeEmptyStats;function clearStats(stats){for(let key in stats)if(Object.prototype.hasOwnProperty.call(stats,key)){let element=stats[key];typeof element=="number"?stats[key]=0:typeof element=="bigint"?stats[key]=BigInt(0):nodeUtils.types.isDate(element)&&(stats[key]=new Date(0));}return stats}exports.clearStats=clearStats;function convertToBigIntStats(stats){let bigintStats=new BigIntStatsEntry;for(let key in stats)if(Object.prototype.hasOwnProperty.call(stats,key)){let element=stats[key];typeof element=="number"?bigintStats[key]=BigInt(element):nodeUtils.types.isDate(element)&&(bigintStats[key]=new Date(element));}return bigintStats.atimeNs=bigintStats.atimeMs*BigInt(1e6),bigintStats.mtimeNs=bigintStats.mtimeMs*BigInt(1e6),bigintStats.ctimeNs=bigintStats.ctimeMs*BigInt(1e6),bigintStats.birthtimeNs=bigintStats.birthtimeMs*BigInt(1e6),bigintStats}exports.convertToBigIntStats=convertToBigIntStats;function areStatsEqual(a,b){if(a.atimeMs!==b.atimeMs||a.birthtimeMs!==b.birthtimeMs||a.blksize!==b.blksize||a.blocks!==b.blocks||a.ctimeMs!==b.ctimeMs||a.dev!==b.dev||a.gid!==b.gid||a.ino!==b.ino||a.isBlockDevice()!==b.isBlockDevice()||a.isCharacterDevice()!==b.isCharacterDevice()||a.isDirectory()!==b.isDirectory()||a.isFIFO()!==b.isFIFO()||a.isFile()!==b.isFile()||a.isSocket()!==b.isSocket()||a.isSymbolicLink()!==b.isSymbolicLink()||a.mode!==b.mode||a.mtimeMs!==b.mtimeMs||a.nlink!==b.nlink||a.rdev!==b.rdev||a.size!==b.size||a.uid!==b.uid)return !1;let aN=a,bN=b;return !(aN.atimeNs!==bN.atimeNs||aN.mtimeNs!==bN.mtimeNs||aN.ctimeNs!==bN.ctimeNs||aN.birthtimeNs!==bN.birthtimeNs)}exports.areStatsEqual=areStatsEqual;}});var require_path=__commonJS({"../../node_modules/@yarnpkg/fslib/lib/path.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.toFilename=exports.convertPath=exports.ppath=exports.npath=exports.Filename=exports.PortablePath=void 0;var tslib_1=(init_tslib_es6(),__toCommonJS(tslib_es6_exports)),path_1=tslib_1.__importDefault(__require("path")),PathType;(function(PathType2){PathType2[PathType2.File=0]="File",PathType2[PathType2.Portable=1]="Portable",PathType2[PathType2.Native=2]="Native";})(PathType||(PathType={}));exports.PortablePath={root:"/",dot:".",parent:".."};exports.Filename={nodeModules:"node_modules",manifest:"package.json",lockfile:"yarn.lock",virtual:"__virtual__",pnpJs:".pnp.js",pnpCjs:".pnp.cjs",rc:".yarnrc.yml"};exports.npath=Object.create(path_1.default);exports.ppath=Object.create(path_1.default.posix);exports.npath.cwd=()=>process.cwd();exports.ppath.cwd=()=>toPortablePath(process.cwd());exports.ppath.resolve=(...segments)=>segments.length>0&&exports.ppath.isAbsolute(segments[0])?path_1.default.posix.resolve(...segments):path_1.default.posix.resolve(exports.ppath.cwd(),...segments);var contains=function(pathUtils,from,to){return from=pathUtils.normalize(from),to=pathUtils.normalize(to),from===to?".":(from.endsWith(pathUtils.sep)||(from=from+pathUtils.sep),to.startsWith(from)?to.slice(from.length):null)};exports.npath.fromPortablePath=fromPortablePath;exports.npath.toPortablePath=toPortablePath;exports.npath.contains=(from,to)=>contains(exports.npath,from,to);exports.ppath.contains=(from,to)=>contains(exports.ppath,from,to);var WINDOWS_PATH_REGEXP=/^([a-zA-Z]:.*)$/,UNC_WINDOWS_PATH_REGEXP=/^\/\/(\.\/)?(.*)$/,PORTABLE_PATH_REGEXP=/^\/([a-zA-Z]:.*)$/,UNC_PORTABLE_PATH_REGEXP=/^\/unc\/(\.dot\/)?(.*)$/;function fromPortablePath(p){if(process.platform!=="win32")return p;let portablePathMatch,uncPortablePathMatch;if(portablePathMatch=p.match(PORTABLE_PATH_REGEXP))p=portablePathMatch[1];else if(uncPortablePathMatch=p.match(UNC_PORTABLE_PATH_REGEXP))p=`\\\\${uncPortablePathMatch[1]?".\\":""}${uncPortablePathMatch[2]}`;else return p;return p.replace(/\//g,"\\")}function toPortablePath(p){if(process.platform!=="win32")return p;p=p.replace(/\\/g,"/");let windowsPathMatch,uncWindowsPathMatch;return (windowsPathMatch=p.match(WINDOWS_PATH_REGEXP))?p=`/${windowsPathMatch[1]}`:(uncWindowsPathMatch=p.match(UNC_WINDOWS_PATH_REGEXP))&&(p=`/unc/${uncWindowsPathMatch[1]?".dot/":""}${uncWindowsPathMatch[2]}`),p}function convertPath(targetPathUtils,sourcePath){return targetPathUtils===exports.npath?fromPortablePath(sourcePath):toPortablePath(sourcePath)}exports.convertPath=convertPath;function toFilename(filename){if(exports.npath.parse(filename).dir!==""||exports.ppath.parse(filename).dir!=="")throw new Error(`Invalid filename: "${filename}"`);return filename}exports.toFilename=toFilename;}});var require_copyPromise=__commonJS({"../../node_modules/@yarnpkg/fslib/lib/algorithms/copyPromise.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.copyPromise=exports.LinkStrategy=void 0;var tslib_1=(init_tslib_es6(),__toCommonJS(tslib_es6_exports)),fs_1=tslib_1.__importDefault(__require("fs")),constants=tslib_1.__importStar(require_constants()),path_1=require_path(),defaultTime=new Date(constants.SAFE_TIME*1e3),LinkStrategy;(function(LinkStrategy2){LinkStrategy2.Allow="allow",LinkStrategy2.ReadOnly="readOnly";})(LinkStrategy=exports.LinkStrategy||(exports.LinkStrategy={}));async function copyPromise(destinationFs,destination,sourceFs,source,opts){let normalizedDestination=destinationFs.pathUtils.normalize(destination),normalizedSource=sourceFs.pathUtils.normalize(source),prelayout=[],postlayout=[],{atime,mtime}=opts.stableTime?{atime:defaultTime,mtime:defaultTime}:await sourceFs.lstatPromise(normalizedSource);await destinationFs.mkdirpPromise(destinationFs.pathUtils.dirname(destination),{utimes:[atime,mtime]});let updateTime=typeof destinationFs.lutimesPromise=="function"?destinationFs.lutimesPromise.bind(destinationFs):destinationFs.utimesPromise.bind(destinationFs);await copyImpl(prelayout,postlayout,updateTime,destinationFs,normalizedDestination,sourceFs,normalizedSource,{...opts,didParentExist:!0});for(let operation of prelayout)await operation();await Promise.all(postlayout.map(operation=>operation()));}exports.copyPromise=copyPromise;async function copyImpl(prelayout,postlayout,updateTime,destinationFs,destination,sourceFs,source,opts){var _a,_b;let destinationStat=opts.didParentExist?await maybeLStat(destinationFs,destination):null,sourceStat=await sourceFs.lstatPromise(source),{atime,mtime}=opts.stableTime?{atime:defaultTime,mtime:defaultTime}:sourceStat,updated;switch(!0){case sourceStat.isDirectory():updated=await copyFolder(prelayout,postlayout,updateTime,destinationFs,destination,destinationStat,sourceFs,source,sourceStat,opts);break;case sourceStat.isFile():updated=await copyFile(prelayout,postlayout,updateTime,destinationFs,destination,destinationStat,sourceFs,source,sourceStat,opts);break;case sourceStat.isSymbolicLink():updated=await copySymlink(prelayout,postlayout,updateTime,destinationFs,destination,destinationStat,sourceFs,source,sourceStat,opts);break;default:throw new Error(`Unsupported file type (${sourceStat.mode})`)}return (updated||((_a=destinationStat?.mtime)===null||_a===void 0?void 0:_a.getTime())!==mtime.getTime()||((_b=destinationStat?.atime)===null||_b===void 0?void 0:_b.getTime())!==atime.getTime())&&(postlayout.push(()=>updateTime(destination,atime,mtime)),updated=!0),(destinationStat===null||(destinationStat.mode&511)!==(sourceStat.mode&511))&&(postlayout.push(()=>destinationFs.chmodPromise(destination,sourceStat.mode&511)),updated=!0),updated}async function maybeLStat(baseFs,p){try{return await baseFs.lstatPromise(p)}catch{return null}}async function copyFolder(prelayout,postlayout,updateTime,destinationFs,destination,destinationStat,sourceFs,source,sourceStat,opts){if(destinationStat!==null&&!destinationStat.isDirectory())if(opts.overwrite)prelayout.push(async()=>destinationFs.removePromise(destination)),destinationStat=null;else return !1;let updated=!1;destinationStat===null&&(prelayout.push(async()=>{try{await destinationFs.mkdirPromise(destination,{mode:sourceStat.mode});}catch(err){if(err.code!=="EEXIST")throw err}}),updated=!0);let entries2=await sourceFs.readdirPromise(source),nextOpts=opts.didParentExist&&!destinationStat?{...opts,didParentExist:!1}:opts;if(opts.stableSort)for(let entry of entries2.sort())await copyImpl(prelayout,postlayout,updateTime,destinationFs,destinationFs.pathUtils.join(destination,entry),sourceFs,sourceFs.pathUtils.join(source,entry),nextOpts)&&(updated=!0);else (await Promise.all(entries2.map(async entry=>{await copyImpl(prelayout,postlayout,updateTime,destinationFs,destinationFs.pathUtils.join(destination,entry),sourceFs,sourceFs.pathUtils.join(source,entry),nextOpts);}))).some(status=>status)&&(updated=!0);return updated}var isCloneSupportedCache=new WeakMap;function makeLinkOperation(opFs,destination,source,sourceStat,linkStrategy){return async()=>{await opFs.linkPromise(source,destination),linkStrategy===LinkStrategy.ReadOnly&&(sourceStat.mode&=-147,await opFs.chmodPromise(destination,sourceStat.mode));}}function makeCloneLinkOperation(opFs,destination,source,sourceStat,linkStrategy){let isCloneSupported=isCloneSupportedCache.get(opFs);return typeof isCloneSupported>"u"?async()=>{try{await opFs.copyFilePromise(source,destination,fs_1.default.constants.COPYFILE_FICLONE_FORCE),isCloneSupportedCache.set(opFs,!0);}catch(err){if(err.code==="ENOSYS"||err.code==="ENOTSUP")isCloneSupportedCache.set(opFs,!1),await makeLinkOperation(opFs,destination,source,sourceStat,linkStrategy)();else throw err}}:isCloneSupported?async()=>opFs.copyFilePromise(source,destination,fs_1.default.constants.COPYFILE_FICLONE_FORCE):makeLinkOperation(opFs,destination,source,sourceStat,linkStrategy)}async function copyFile(prelayout,postlayout,updateTime,destinationFs,destination,destinationStat,sourceFs,source,sourceStat,opts){var _a;if(destinationStat!==null)if(opts.overwrite)prelayout.push(async()=>destinationFs.removePromise(destination)),destinationStat=null;else return !1;let linkStrategy=(_a=opts.linkStrategy)!==null&&_a!==void 0?_a:null,op=destinationFs===sourceFs?linkStrategy!==null?makeCloneLinkOperation(destinationFs,destination,source,sourceStat,linkStrategy):async()=>destinationFs.copyFilePromise(source,destination,fs_1.default.constants.COPYFILE_FICLONE):linkStrategy!==null?makeLinkOperation(destinationFs,destination,source,sourceStat,linkStrategy):async()=>destinationFs.writeFilePromise(destination,await sourceFs.readFilePromise(source));return prelayout.push(async()=>op()),!0}async function copySymlink(prelayout,postlayout,updateTime,destinationFs,destination,destinationStat,sourceFs,source,sourceStat,opts){if(destinationStat!==null)if(opts.overwrite)prelayout.push(async()=>destinationFs.removePromise(destination)),destinationStat=null;else return !1;return prelayout.push(async()=>{await destinationFs.symlinkPromise((0, path_1.convertPath)(destinationFs.pathUtils,await sourceFs.readlinkPromise(source)),destination);}),!0}}});var require_errors3=__commonJS({"../../node_modules/@yarnpkg/fslib/lib/errors.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.LibzipError=exports.ERR_DIR_CLOSED=exports.EOPNOTSUPP=exports.ENOTEMPTY=exports.EROFS=exports.EEXIST=exports.EISDIR=exports.ENOTDIR=exports.ENOENT=exports.EBADF=exports.EINVAL=exports.ENOSYS=exports.EBUSY=void 0;function makeError(code,message){return Object.assign(new Error(`${code}: ${message}`),{code})}function EBUSY(message){return makeError("EBUSY",message)}exports.EBUSY=EBUSY;function ENOSYS(message,reason){return makeError("ENOSYS",`${message}, ${reason}`)}exports.ENOSYS=ENOSYS;function EINVAL(reason){return makeError("EINVAL",`invalid argument, ${reason}`)}exports.EINVAL=EINVAL;function EBADF(reason){return makeError("EBADF",`bad file descriptor, ${reason}`)}exports.EBADF=EBADF;function ENOENT(reason){return makeError("ENOENT",`no such file or directory, ${reason}`)}exports.ENOENT=ENOENT;function ENOTDIR(reason){return makeError("ENOTDIR",`not a directory, ${reason}`)}exports.ENOTDIR=ENOTDIR;function EISDIR(reason){return makeError("EISDIR",`illegal operation on a directory, ${reason}`)}exports.EISDIR=EISDIR;function EEXIST(reason){return makeError("EEXIST",`file already exists, ${reason}`)}exports.EEXIST=EEXIST;function EROFS(reason){return makeError("EROFS",`read-only filesystem, ${reason}`)}exports.EROFS=EROFS;function ENOTEMPTY(reason){return makeError("ENOTEMPTY",`directory not empty, ${reason}`)}exports.ENOTEMPTY=ENOTEMPTY;function EOPNOTSUPP(reason){return makeError("EOPNOTSUPP",`operation not supported, ${reason}`)}exports.EOPNOTSUPP=EOPNOTSUPP;function ERR_DIR_CLOSED(){return makeError("ERR_DIR_CLOSED","Directory handle was closed")}exports.ERR_DIR_CLOSED=ERR_DIR_CLOSED;var LibzipError=class extends Error{constructor(message,code){super(message),this.name="Libzip Error",this.code=code;}};exports.LibzipError=LibzipError;}});var require_opendir=__commonJS({"../../node_modules/@yarnpkg/fslib/lib/algorithms/opendir.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.opendir=exports.CustomDir=void 0;var tslib_1=(init_tslib_es6(),__toCommonJS(tslib_es6_exports)),errors=tslib_1.__importStar(require_errors3()),CustomDir=class{constructor(path13,nextDirent,opts={}){this.path=path13,this.nextDirent=nextDirent,this.opts=opts,this.closed=!1;}throwIfClosed(){if(this.closed)throw errors.ERR_DIR_CLOSED()}async*[Symbol.asyncIterator](){try{let dirent;for(;(dirent=await this.read())!==null;)yield dirent;}finally{await this.close();}}read(cb){let dirent=this.readSync();return typeof cb<"u"?cb(null,dirent):Promise.resolve(dirent)}readSync(){return this.throwIfClosed(),this.nextDirent()}close(cb){return this.closeSync(),typeof cb<"u"?cb(null):Promise.resolve()}closeSync(){var _a,_b;this.throwIfClosed(),(_b=(_a=this.opts).onClose)===null||_b===void 0||_b.call(_a),this.closed=!0;}};exports.CustomDir=CustomDir;function opendir(fakeFs,path13,entries2,opts){let nextDirent=()=>{let filename=entries2.shift();return typeof filename>"u"?null:Object.assign(fakeFs.statSync(fakeFs.pathUtils.join(path13,filename)),{name:filename})};return new CustomDir(path13,nextDirent,opts)}exports.opendir=opendir;}});var require_FakeFS=__commonJS({"../../node_modules/@yarnpkg/fslib/lib/FakeFS.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.normalizeLineEndings=exports.BasePortableFakeFS=exports.FakeFS=void 0;var os_1=__require("os"),copyPromise_1=require_copyPromise(),path_1=require_path(),FakeFS=class{constructor(pathUtils){this.pathUtils=pathUtils;}async*genTraversePromise(init2,{stableSort=!1}={}){let stack=[init2];for(;stack.length>0;){let p=stack.shift();if((await this.lstatPromise(p)).isDirectory()){let entries2=await this.readdirPromise(p);if(stableSort)for(let entry2 of entries2.sort())stack.push(this.pathUtils.join(p,entry2));else throw new Error("Not supported")}else yield p;}}async removePromise(p,{recursive=!0,maxRetries=5}={}){let stat;try{stat=await this.lstatPromise(p);}catch(error){if(error.code==="ENOENT")return;throw error}if(stat.isDirectory()){if(recursive){let entries2=await this.readdirPromise(p);await Promise.all(entries2.map(entry=>this.removePromise(this.pathUtils.resolve(p,entry))));}for(let t=0;t<=maxRetries;t++)try{await this.rmdirPromise(p);break}catch(error){if(error.code!=="EBUSY"&&error.code!=="ENOTEMPTY")throw error;t<maxRetries&&await new Promise(resolve3=>setTimeout(resolve3,t*100));}}else await this.unlinkPromise(p);}removeSync(p,{recursive=!0}={}){let stat;try{stat=this.lstatSync(p);}catch(error){if(error.code==="ENOENT")return;throw error}if(stat.isDirectory()){if(recursive)for(let entry of this.readdirSync(p))this.removeSync(this.pathUtils.resolve(p,entry));this.rmdirSync(p);}else this.unlinkSync(p);}async mkdirpPromise(p,{chmod,utimes}={}){if(p=this.resolve(p),p===this.pathUtils.dirname(p))return;let parts=p.split(this.pathUtils.sep),createdDirectory;for(let u=2;u<=parts.length;++u){let subPath=parts.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(subPath)){try{await this.mkdirPromise(subPath);}catch(error){if(error.code==="EEXIST")continue;throw error}if(createdDirectory??(createdDirectory=subPath),chmod!=null&&await this.chmodPromise(subPath,chmod),utimes!=null)await this.utimesPromise(subPath,utimes[0],utimes[1]);else {let parentStat=await this.statPromise(this.pathUtils.dirname(subPath));await this.utimesPromise(subPath,parentStat.atime,parentStat.mtime);}}}return createdDirectory}mkdirpSync(p,{chmod,utimes}={}){if(p=this.resolve(p),p===this.pathUtils.dirname(p))return;let parts=p.split(this.pathUtils.sep),createdDirectory;for(let u=2;u<=parts.length;++u){let subPath=parts.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(subPath)){try{this.mkdirSync(subPath);}catch(error){if(error.code==="EEXIST")continue;throw error}if(createdDirectory??(createdDirectory=subPath),chmod!=null&&this.chmodSync(subPath,chmod),utimes!=null)this.utimesSync(subPath,utimes[0],utimes[1]);else {let parentStat=this.statSync(this.pathUtils.dirname(subPath));this.utimesSync(subPath,parentStat.atime,parentStat.mtime);}}}return createdDirectory}async copyPromise(destination,source,{baseFs=this,overwrite=!0,stableSort=!1,stableTime=!1,linkStrategy=null}={}){return await(0, copyPromise_1.copyPromise)(this,destination,baseFs,source,{overwrite,stableSort,stableTime,linkStrategy})}copySync(destination,source,{baseFs=this,overwrite=!0}={}){let stat=baseFs.lstatSync(source),exists=this.existsSync(destination);if(stat.isDirectory()){this.mkdirpSync(destination);let directoryListing=baseFs.readdirSync(source);for(let entry of directoryListing)this.copySync(this.pathUtils.join(destination,entry),baseFs.pathUtils.join(source,entry),{baseFs,overwrite});}else if(stat.isFile()){if(!exists||overwrite){exists&&this.removeSync(destination);let content=baseFs.readFileSync(source);this.writeFileSync(destination,content);}}else if(stat.isSymbolicLink()){if(!exists||overwrite){exists&&this.removeSync(destination);let target=baseFs.readlinkSync(source);this.symlinkSync((0, path_1.convertPath)(this.pathUtils,target),destination);}}else throw new Error(`Unsupported file type (file: ${source}, mode: 0o${stat.mode.toString(8).padStart(6,"0")})`);let mode=stat.mode&511;this.chmodSync(destination,mode);}async changeFilePromise(p,content,opts={}){return Buffer.isBuffer(content)?this.changeFileBufferPromise(p,content,opts):this.changeFileTextPromise(p,content,opts)}async changeFileBufferPromise(p,content,{mode}={}){let current=Buffer.alloc(0);try{current=await this.readFilePromise(p);}catch{}Buffer.compare(current,content)!==0&&await this.writeFilePromise(p,content,{mode});}async changeFileTextPromise(p,content,{automaticNewlines,mode}={}){let current="";try{current=await this.readFilePromise(p,"utf8");}catch{}let normalizedContent=automaticNewlines?normalizeLineEndings(current,content):content;current!==normalizedContent&&await this.writeFilePromise(p,normalizedContent,{mode});}changeFileSync(p,content,opts={}){return Buffer.isBuffer(content)?this.changeFileBufferSync(p,content,opts):this.changeFileTextSync(p,content,opts)}changeFileBufferSync(p,content,{mode}={}){let current=Buffer.alloc(0);try{current=this.readFileSync(p);}catch{}Buffer.compare(current,content)!==0&&this.writeFileSync(p,content,{mode});}changeFileTextSync(p,content,{automaticNewlines=!1,mode}={}){let current="";try{current=this.readFileSync(p,"utf8");}catch{}let normalizedContent=automaticNewlines?normalizeLineEndings(current,content):content;current!==normalizedContent&&this.writeFileSync(p,normalizedContent,{mode});}async movePromise(fromP,toP){try{await this.renamePromise(fromP,toP);}catch(error){if(error.code==="EXDEV")await this.copyPromise(toP,fromP),await this.removePromise(fromP);else throw error}}moveSync(fromP,toP){try{this.renameSync(fromP,toP);}catch(error){if(error.code==="EXDEV")this.copySync(toP,fromP),this.removeSync(fromP);else throw error}}async lockPromise(affectedPath,callback){let lockPath=`${affectedPath}.flock`,interval=1e3/60,startTime=Date.now(),fd=null,isAlive=async()=>{let pid;try{[pid]=await this.readJsonPromise(lockPath);}catch{return Date.now()-startTime<500}try{return process.kill(pid,0),!0}catch{return !1}};for(;fd===null;)try{fd=await this.openPromise(lockPath,"wx");}catch(error){if(error.code==="EEXIST"){if(!await isAlive())try{await this.unlinkPromise(lockPath);continue}catch{}if(Date.now()-startTime<60*1e3)await new Promise(resolve3=>setTimeout(resolve3,interval));else throw new Error(`Couldn't acquire a lock in a reasonable time (via ${lockPath})`)}else throw error}await this.writePromise(fd,JSON.stringify([process.pid]));try{return await callback()}finally{try{await this.closePromise(fd),await this.unlinkPromise(lockPath);}catch{}}}async readJsonPromise(p){let content=await this.readFilePromise(p,"utf8");try{return JSON.parse(content)}catch(error){throw error.message+=` (in ${p})`,error}}readJsonSync(p){let content=this.readFileSync(p,"utf8");try{return JSON.parse(content)}catch(error){throw error.message+=` (in ${p})`,error}}async writeJsonPromise(p,data){return await this.writeFilePromise(p,`${JSON.stringify(data,null,2)}
87
86
  `)}writeJsonSync(p,data){return this.writeFileSync(p,`${JSON.stringify(data,null,2)}
88
87
  `)}async preserveTimePromise(p,cb){let stat=await this.lstatPromise(p),result=await cb();typeof result<"u"&&(p=result),this.lutimesPromise?await this.lutimesPromise(p,stat.atime,stat.mtime):stat.isSymbolicLink()||await this.utimesPromise(p,stat.atime,stat.mtime);}async preserveTimeSync(p,cb){let stat=this.lstatSync(p),result=cb();typeof result<"u"&&(p=result),this.lutimesSync?this.lutimesSync(p,stat.atime,stat.mtime):stat.isSymbolicLink()||this.utimesSync(p,stat.atime,stat.mtime);}};exports.FakeFS=FakeFS;var BasePortableFakeFS=class extends FakeFS{constructor(){super(path_1.ppath);}};exports.BasePortableFakeFS=BasePortableFakeFS;function getEndOfLine(content){let matches=content.match(/\r?\n/g);if(matches===null)return os_1.EOL;let crlf=matches.filter(nl=>nl===`\r
89
88
  `).length,lf=matches.length-crlf;return crlf>lf?`\r
@@ -101,7 +100,7 @@ ${this.indexingErrors.map(err=>`- ${err}`).join(`
101
100
  - If so, is it a CSF file (\`.stories.*\`)?
102
101
  - If so, is it matched by the \`stories\` glob in \`main.js\`?
103
102
  - If so, has the file successfully loaded in Storybook and are its stories visible?`);}dependencies.forEach(dep=>{dep.dependents.push(absolutePath);});let title=csfEntry?.title||userOrAutoTitleFromSpecifier(importPath,specifier,result.title);invariant(title,"makeTitle created an undefined title. This happens when a specifier's doesn't have any matches in its fileName");let defaultName=this.options.docs.defaultName??"Docs",name=result.name||(csfEntry?autoName(importPath,csfEntry.importPath,defaultName):defaultName);return {id:toId(csfEntry?.metaId||title,name),title,name,importPath,storiesImports:sortedDependencies.map(dep=>dep.entries[0].importPath),type:"docs",tags:[...result.tags||[],csfEntry?"attached-mdx":"unattached-mdx","docs"]}}catch(err){throw err&&err.source?.match(/mdast-util-mdx-jsx/g)&&logger.warn(`\u{1F4A1} This seems to be an MDX2 syntax error. Please refer to the MDX section in the following resource for assistance on how to fix this: ${chalk7.yellow("https://storybook.js.org/migration-guides/7.0")}`),err}}chooseDuplicate(firstEntry,secondEntry){if(firstEntry.importPath===secondEntry.importPath)return firstEntry;let firstIsBetter=!0;(secondEntry.type==="story"||isMdxEntry(secondEntry)&&firstEntry.type==="docs"&&!isMdxEntry(firstEntry))&&(firstIsBetter=!1);let betterEntry=firstIsBetter?firstEntry:secondEntry,worseEntry=firstIsBetter?secondEntry:firstEntry,changeDocsName='Use `<Meta of={} name="Other Name">` to distinguish them.';if(worseEntry.type==="story")throw new IndexingError(`Duplicate stories with id: ${firstEntry.id}`,[firstEntry.importPath,secondEntry.importPath]);if(betterEntry.type==="story"){let worseDescriptor=isMdxEntry(worseEntry)?"component docs page":"automatically generated docs page";throw betterEntry.name===this.options.docs.defaultName?new IndexingError(`You have a story for ${betterEntry.title} with the same name as your default docs entry name (${betterEntry.name}), so the docs page is being dropped. Consider changing the story name.`,[firstEntry.importPath,secondEntry.importPath]):new IndexingError(`You have a story for ${betterEntry.title} with the same name as your ${worseDescriptor} (${worseEntry.name}), so the docs page is being dropped. ${changeDocsName}`,[firstEntry.importPath,secondEntry.importPath])}else if(isMdxEntry(betterEntry)){if(isMdxEntry(worseEntry))throw new IndexingError(`You have two component docs pages with the same name ${betterEntry.title}:${betterEntry.name}. ${changeDocsName}`,[firstEntry.importPath,secondEntry.importPath]);if(worseEntry.tags?.includes(AUTODOCS_TAG)&&this.options.docs.autodocs!==!0)throw new IndexingError(`You created a component docs page for '${worseEntry.title}', but also tagged the CSF file with '${AUTODOCS_TAG}'. This is probably a mistake.`,[betterEntry.importPath,worseEntry.importPath])}else return {...betterEntry,storiesImports:[...betterEntry.storiesImports,worseEntry.importPath,...worseEntry.storiesImports]};return betterEntry}async sortStories(entries2){let sortableStories=Object.values(entries2);if(this.options.storyStoreV7){let storySortParameter=await this.getStorySortParameter(),fileNameOrder=this.storyFileNames();sortStoriesV7(sortableStories,storySortParameter,fileNameOrder);}return sortableStories.reduce((acc,item)=>(acc[item.id]=item,acc),{})}async getIndex(){if(this.lastIndex)return this.lastIndex;if(this.lastError)throw this.lastError;let storiesList=await this.ensureExtracted();try{let errorEntries=storiesList.filter(entry=>entry.type==="error");if(errorEntries.length)throw new MultipleIndexingError(errorEntries.map(entry=>entry.err));let duplicateErrors=[],indexEntries={};if(storiesList.forEach(entry=>{try{let existing=indexEntries[entry.id];existing?indexEntries[entry.id]=this.chooseDuplicate(existing,entry):indexEntries[entry.id]=entry;}catch(err){err instanceof IndexingError&&duplicateErrors.push(err);}}),duplicateErrors.length)throw new MultipleIndexingError(duplicateErrors);let sorted=await this.sortStories(indexEntries),compat=sorted;if(this.options.storiesV2Compatibility){let titleToStoryCount=Object.values(sorted).reduce((acc,story)=>(acc[story.title]=(acc[story.title]||0)+1,acc),{});compat=Object.entries(sorted).reduce((acc,entry)=>{let[id,story]=entry;return story.type==="docs"||(acc[id]={...story,kind:story.title,story:story.name,parameters:{__id:story.id,docsOnly:titleToStoryCount[story.title]===1&&story.name==="Page",fileName:story.importPath}}),acc},{});}return this.lastIndex={v:4,entries:compat},this.lastIndex}catch(err){throw this.lastError=err==null||err instanceof Error?err:void 0,invariant(this.lastError),logger.warn(`\u{1F6A8} ${this.lastError.toString()}`),this.lastError}}invalidate(specifier,importPath,removed){let absolutePath=slash(path5.resolve(this.options.workingDir,importPath)),cache3=this.specifierToCache.get(specifier);invariant(cache3,`specifier does not have a matching cache entry in specifierToCache: ${JSON.stringify(specifier)}`);let cacheEntry=cache3[absolutePath];if(cacheEntry&&cacheEntry.type==="stories"){let{dependents}=cacheEntry,invalidated=new Set;this.specifierToCache.forEach(otherCache=>{dependents.forEach(dep=>{otherCache[dep]&&(invalidated.add(dep),otherCache[dep]=!1);});});}if(removed){if(cacheEntry&&cacheEntry.type==="docs"){let absoluteImports=cacheEntry.storiesImports.map(p=>path5.resolve(this.options.workingDir,p));this.findDependencies(absoluteImports).forEach(dep=>dep.dependents.splice(dep.dependents.indexOf(absolutePath),1));}delete cache3[absolutePath];}else cache3[absolutePath]=!1;this.lastIndex=null,this.lastError=null;}async getStorySortParameter(){let previewFile=["js","jsx","ts","tsx","mjs","cjs"].map(ext=>path5.join(this.options.configDir,`preview.${ext}`)).find(fname=>fs4.existsSync(fname)),storySortParameter;if(previewFile){let previewCode=(await fs4.readFile(previewFile,"utf-8")).toString();storySortParameter=await getStorySortParameter(previewCode);}return storySortParameter}storyFileNames(){return Array.from(this.specifierToCache.values()).flatMap(r=>Object.keys(r))}};var PAGE_REGEX=/(page|screen)/i,isPageStory=storyId=>PAGE_REGEX.test(storyId),isCLIExampleEntry=entry=>["example-introduction--docs","configure-your-project--docs","example-button--docs","example-button--primary","example-button--secondary","example-button--large","example-button--small","example-header--docs","example-header--logged-in","example-header--logged-out","example-page--logged-in","example-page--logged-out"].includes(entry.id),isAnyExampleEntry=entry=>entry.id.startsWith("example-button--")||entry.id.startsWith("example-header--")||entry.id.startsWith("example-page--");function summarizeIndex(storyIndex){let storyCount=0,componentTitles=new Set,exampleStoryCount=0,onboardingStoryCount=0,onboardingDocsCount=0,exampleDocsCount=0,pageStoryCount=0,playStoryCount=0,autodocsCount=0,storiesMdxCount=0,mdxCount=0;Object.values(storyIndex.entries).forEach(entry=>{isCLIExampleEntry(entry)?(entry.type==="story"&&(exampleStoryCount+=1),entry.type==="docs"&&(exampleDocsCount+=1)):isAnyExampleEntry(entry)?(entry.type==="story"&&(onboardingStoryCount+=1),entry.type==="docs"&&(onboardingDocsCount+=1)):entry.type==="story"?(storyCount+=1,componentTitles.add(entry.title),isPageStory(entry.title)&&(pageStoryCount+=1),entry.tags?.includes(PLAY_FN_TAG)&&(playStoryCount+=1)):entry.type==="docs"&&(isMdxEntry(entry)?mdxCount+=1:entry.tags?.includes(STORIES_MDX_TAG)?storiesMdxCount+=1:entry.tags?.includes(AUTODOCS_TAG)&&(autodocsCount+=1));});let componentCount=componentTitles.size;return {storyCount,componentCount,pageStoryCount,playStoryCount,autodocsCount,storiesMdxCount,mdxCount,exampleStoryCount,exampleDocsCount,onboardingStoryCount,onboardingDocsCount,version:storyIndex.v}}async function buildOrThrow(callback){try{return await callback()}catch(err){let builderErrors=err.errors;throw builderErrors&&builderErrors.find(er=>er.text?.includes("No matching export"))?new NoMatchingExportError(err):err}}async function buildStaticStandalone(options){if(options.configType="PRODUCTION",options.outputDir==="")throw new Error("Won't remove current directory. Check your outputDir!");if(options.staticDir?.includes("/"))throw new Error("Won't copy root directory. Check your staticDirs!");if(options.outputDir=isAbsolute(options.outputDir)?options.outputDir:join(process.cwd(),options.outputDir),options.configDir=resolve(options.configDir),logger.info(chalk7`=> Cleaning outputDir: {cyan ${options.outputDir.replace(process.cwd(),"")}}`),options.outputDir==="/")throw new Error("Won't remove directory '/'. Check your outputDir!");await emptyDir(options.outputDir),await ensureDir(options.outputDir);let config=await loadMainConfig(options),{framework}=config,corePresets=[],frameworkName=typeof framework=="string"?framework:framework?.name;frameworkName?corePresets.push(join(frameworkName,"preset")):options.ignorePreview||logger.warn(`you have not specified a framework in your ${options.configDir}/main.js`),logger.info("=> Loading presets");let presets=await loadAllPresets({corePresets:[__require.resolve("@storybook/core-server/dist/presets/common-preset"),...corePresets],overridePresets:[__require.resolve("@storybook/core-server/dist/presets/common-override-preset")],isCritical:!0,...options}),{renderer}=await presets.apply("core",{}),build2=await presets.apply("build",{}),[previewBuilder,managerBuilder]=await getBuilders({...options,presets,build:build2}),resolvedRenderer=renderer?resolveAddonName(options.configDir,renderer,options):void 0;presets=await loadAllPresets({corePresets:[__require.resolve("@storybook/core-server/dist/presets/common-preset"),...managerBuilder.corePresets||[],...previewBuilder.corePresets||[],...resolvedRenderer?[resolvedRenderer]:[],...corePresets,__require.resolve("@storybook/core-server/dist/presets/babel-cache-preset")],overridePresets:[...previewBuilder.overridePresets||[],__require.resolve("@storybook/core-server/dist/presets/common-override-preset")],...options,build:build2});let[features,core,staticDirs,indexers,deprecatedStoryIndexers,stories,docsOptions]=await Promise.all([presets.apply("features"),presets.apply("core"),presets.apply("staticDirs"),presets.apply("experimental_indexers",[]),presets.apply("storyIndexers",[]),presets.apply("stories"),presets.apply("docs",{})]);features?.storyStoreV7===!1&&deprecate$1(dedent2`storyStoreV6 is deprecated, please migrate to storyStoreV7 instead.
104
- - Refer to the migration guide at https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#storystorev6-and-storiesof-is-deprecated`);let fullOptions={...options,presets,features,build:build2};if(options.staticDir&&!isEqual(staticDirs,defaultStaticDirs))throw new ConflictingStaticDirConfigError;let effects=[];global$1.FEATURES=features,await buildOrThrow(async()=>managerBuilder.build({startTime:process.hrtime(),options:fullOptions})),staticDirs&&effects.push(copyAllStaticFilesRelativeToMain(staticDirs,options.outputDir,options.configDir)),options.staticDir&&effects.push(copyAllStaticFiles(options.staticDir,options.outputDir));let coreServerPublicDir=join(dirname(__require.resolve("@storybook/core-server/package.json")),"public");effects.push(copy(coreServerPublicDir,options.outputDir));let initializedStoryIndexGenerator=Promise.resolve(void 0);if((features?.buildStoriesJson||features?.storyStoreV7)&&!options.ignorePreview){let workingDir=process.cwd(),directories={configDir:options.configDir,workingDir},normalizedStories=normalizeStories(stories,directories),generator=new StoryIndexGenerator(normalizedStories,{...directories,storyIndexers:deprecatedStoryIndexers,indexers,docs:docsOptions,storiesV2Compatibility:!features?.storyStoreV7,storyStoreV7:!!features?.storyStoreV7,build:build2});initializedStoryIndexGenerator=generator.initialize().then(()=>generator),effects.push(extractStoriesJson(join(options.outputDir,"stories.json"),initializedStoryIndexGenerator,convertToIndexV3)),effects.push(extractStoriesJson(join(options.outputDir,"index.json"),initializedStoryIndexGenerator));}core?.disableProjectJson||effects.push(extractStorybookMetadata(join(options.outputDir,"project.json"),options.configDir)),options.debugWebpack&&logConfig("Preview webpack config",await previewBuilder.getConfig(fullOptions)),options.ignorePreview?logger.info("=> Not building preview"):logger.info("=> Building preview..");let startTime=process.hrtime();await Promise.all([...options.ignorePreview?[]:[previewBuilder.build({startTime,options:fullOptions}).then(async previewStats=>{if(logger.trace({message:"=> Preview built",time:process.hrtime(startTime)}),options.webpackStatsJson){let target=options.webpackStatsJson===!0?options.outputDir:options.webpackStatsJson;await outputStats(target,previewStats);}}).catch(error=>{throw logger.error("=> Failed to build the preview"),process.exitCode=1,error})],...effects]),core?.disableTelemetry||effects.push(initializedStoryIndexGenerator.then(async generator=>{let storyIndex=await generator?.getIndex(),payload={precedingUpgrade:await getPrecedingUpgrade()};storyIndex&&Object.assign(payload,{storyIndex:summarizeIndex(storyIndex)}),await telemetry("build",payload,{configDir:options.configDir});})),logger.info(`=> Output directory: ${options.outputDir}`);}var fileExists=basename3=>[".js",".cjs"].reduce((found,ext)=>{let filename=`${basename3}${ext}`;return !found&&fs6.existsSync(filename)?filename:found},"");function getMiddleware(configDir){let middlewarePath=fileExists(path5.resolve(configDir,"middleware"));if(middlewarePath){let middlewareModule=__require(middlewarePath);return middlewareModule.__esModule&&(middlewareModule=middlewareModule.default),middlewareModule}return ()=>{}}function getServerAddresses(port,host,proto,initialPath){let address=new URL(`${proto}://localhost:${port}/`),networkAddress=new URL(`${proto}://${host||ip.address()}:${port}/`);if(initialPath){let searchParams=`?path=${decodeURIComponent(initialPath.startsWith("/")?initialPath:`/${initialPath}`)}`;address.search=searchParams,networkAddress.search=searchParams;}return {address:address.href,networkAddress:networkAddress.href}}var getServerPort=port=>detectFreePort(port).catch(error=>{logger.error(error),process.exit(-1);}),getServerChannelUrl=(port,{https:https4})=>`${https4?"wss":"ws"}://localhost:${port}/storybook-server-channel`;async function getServer(app,options){if(!options.https)return http2.createServer(app);options.sslCert||(logger.error("Error: --ssl-cert is required with --https"),process.exit(-1)),options.sslKey||(logger.error("Error: --ssl-key is required with --https"),process.exit(-1));let sslOptions={ca:await Promise.all((options.sslCa||[]).map(ca=>readFile(ca,"utf-8"))),cert:await readFile(options.sslCert,"utf-8"),key:await readFile(options.sslKey,"utf-8")};return https.createServer(sslOptions,app)}var ServerChannelTransport=class{constructor(server){this.socket=new WebSocketServer({noServer:!0}),server.on("upgrade",(request,socket,head)=>{request.url==="/storybook-server-channel"&&this.socket.handleUpgrade(request,socket,head,ws=>{this.socket.emit("connection",ws,request);});}),this.socket.on("connection",wss=>{wss.on("message",raw=>{let data=raw.toString(),event=typeof data=="string"&&isJSON(data)?parse(data,{allowFunction:!1,allowClass:!1}):data;this.handler?.(event);});});}setHandler(handler){this.handler=handler;}send(event){let data=stringify(event,{maxDepth:15,allowFunction:!1,allowClass:!1});Array.from(this.socket.clients).filter(c=>c.readyState===WebSocket.OPEN).forEach(client=>client.send(data));}};function getServerChannel(server){let transports=[new ServerChannelTransport(server)];return new Channel({transports,async:!0})}function openInBrowser(address){let browserEnvVar=process.env.BROWSER,userBrowserIsChrome=browserEnvVar==="chrome"||browserEnvVar==="chromium"||browserEnvVar==="brave"||browserEnvVar==="com.brave.browser",openOptions=browserEnvVar?{app:{name:browserEnvVar}}:{};getDefaultBrowser(async(err,res)=>{try{res&&(res.isChrome||res.isChromium||res.identity==="com.brave.browser"||userBrowserIsChrome)?await betterOpn(address):await open(address,openOptions);}catch{logger.error(dedent`
103
+ - Refer to the migration guide at https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#storystorev6-and-storiesof-is-deprecated`);let fullOptions={...options,presets,features,build:build2};if(options.staticDir&&!isEqual(staticDirs,defaultStaticDirs))throw new ConflictingStaticDirConfigError;let effects=[];global$1.FEATURES=features,await buildOrThrow(async()=>managerBuilder.build({startTime:process.hrtime(),options:fullOptions})),staticDirs&&effects.push(copyAllStaticFilesRelativeToMain(staticDirs,options.outputDir,options.configDir)),options.staticDir&&effects.push(copyAllStaticFiles(options.staticDir,options.outputDir));let coreServerPublicDir=join(dirname(__require.resolve("@storybook/core-server/package.json")),"public");effects.push(copy(coreServerPublicDir,options.outputDir));let initializedStoryIndexGenerator=Promise.resolve(void 0);if((features?.buildStoriesJson||features?.storyStoreV7)&&!options.ignorePreview){let workingDir=process.cwd(),directories={configDir:options.configDir,workingDir},normalizedStories=normalizeStories(stories,directories),generator=new StoryIndexGenerator(normalizedStories,{...directories,storyIndexers:deprecatedStoryIndexers,indexers,docs:docsOptions,storiesV2Compatibility:!features?.storyStoreV7,storyStoreV7:!!features?.storyStoreV7,build:build2});initializedStoryIndexGenerator=generator.initialize().then(()=>generator),effects.push(extractStoriesJson(join(options.outputDir,"stories.json"),initializedStoryIndexGenerator,convertToIndexV3)),effects.push(extractStoriesJson(join(options.outputDir,"index.json"),initializedStoryIndexGenerator));}core?.disableProjectJson||effects.push(extractStorybookMetadata(join(options.outputDir,"project.json"),options.configDir)),options.debugWebpack&&logConfig("Preview webpack config",await previewBuilder.getConfig(fullOptions)),options.ignorePreview?logger.info("=> Not building preview"):logger.info("=> Building preview..");let startTime=process.hrtime();await Promise.all([...options.ignorePreview?[]:[previewBuilder.build({startTime,options:fullOptions}).then(async previewStats=>{if(logger.trace({message:"=> Preview built",time:process.hrtime(startTime)}),options.webpackStatsJson){let target=options.webpackStatsJson===!0?options.outputDir:options.webpackStatsJson;await outputStats(target,previewStats);}}).catch(error=>{throw logger.error("=> Failed to build the preview"),process.exitCode=1,error})],...effects]),core?.disableTelemetry||effects.push(initializedStoryIndexGenerator.then(async generator=>{let storyIndex=await generator?.getIndex(),payload={precedingUpgrade:await getPrecedingUpgrade()};storyIndex&&Object.assign(payload,{storyIndex:summarizeIndex(storyIndex)}),await telemetry("build",payload,{configDir:options.configDir});})),logger.info(`=> Output directory: ${options.outputDir}`);}var fileExists=basename3=>[".js",".cjs"].reduce((found,ext)=>{let filename=`${basename3}${ext}`;return !found&&fs6.existsSync(filename)?filename:found},"");function getMiddleware(configDir){let middlewarePath=fileExists(path5.resolve(configDir,"middleware"));if(middlewarePath){let middlewareModule=__require(middlewarePath);return middlewareModule.__esModule&&(middlewareModule=middlewareModule.default),middlewareModule}return ()=>{}}function getServerAddresses(port,host,proto,initialPath){let address=new URL(`${proto}://localhost:${port}/`),networkAddress=new URL(`${proto}://${host||getLocalIp()}:${port}/`);if(initialPath){let searchParams=`?path=${decodeURIComponent(initialPath.startsWith("/")?initialPath:`/${initialPath}`)}`;address.search=searchParams,networkAddress.search=searchParams;}return {address:address.href,networkAddress:networkAddress.href}}var getServerPort=port=>detectFreePort(port).catch(error=>{logger.error(error),process.exit(-1);}),getServerChannelUrl=(port,{https:https4})=>`${https4?"wss":"ws"}://localhost:${port}/storybook-server-channel`,getLocalIp=()=>{let allFilteredIps=Object.values(os.networkInterfaces()).flat().filter(ip=>ip&&ip.family==="IPv4"&&!ip.internal);return allFilteredIps.length?allFilteredIps[0]?.address:"0.0.0.0"};async function getServer(app,options){if(!options.https)return http2.createServer(app);options.sslCert||(logger.error("Error: --ssl-cert is required with --https"),process.exit(-1)),options.sslKey||(logger.error("Error: --ssl-key is required with --https"),process.exit(-1));let sslOptions={ca:await Promise.all((options.sslCa||[]).map(ca=>readFile(ca,"utf-8"))),cert:await readFile(options.sslCert,"utf-8"),key:await readFile(options.sslKey,"utf-8")};return https.createServer(sslOptions,app)}var ServerChannelTransport=class{constructor(server){this.socket=new WebSocketServer({noServer:!0}),server.on("upgrade",(request,socket,head)=>{request.url==="/storybook-server-channel"&&this.socket.handleUpgrade(request,socket,head,ws=>{this.socket.emit("connection",ws,request);});}),this.socket.on("connection",wss=>{wss.on("message",raw=>{let data=raw.toString(),event=typeof data=="string"&&isJSON(data)?parse(data,{allowFunction:!1,allowClass:!1}):data;this.handler?.(event);});});}setHandler(handler){this.handler=handler;}send(event){let data=stringify(event,{maxDepth:15,allowFunction:!1,allowClass:!1});Array.from(this.socket.clients).filter(c=>c.readyState===WebSocket.OPEN).forEach(client=>client.send(data));}};function getServerChannel(server){let transports=[new ServerChannelTransport(server)];return new Channel({transports,async:!0})}function openInBrowser(address){let browserEnvVar=process.env.BROWSER,userBrowserIsChrome=browserEnvVar==="chrome"||browserEnvVar==="chromium"||browserEnvVar==="brave"||browserEnvVar==="com.brave.browser",openOptions=browserEnvVar?{app:{name:browserEnvVar}}:{};getDefaultBrowser(async(err,res)=>{try{res&&(res.isChrome||res.isChromium||res.identity==="com.brave.browser"||userBrowserIsChrome)?await betterOpn(address):await open(address,openOptions);}catch{logger.error(dedent`
105
104
  Could not open ${address} inside a browser. If you're running this command inside a
106
105
  docker container or on a CI, you need to pass the '--ci' flag to prevent opening a
107
106
  browser by default.
@@ -129,7 +128,7 @@ ${updateMessage}`:""}
129
128
  `||match===`
130
129
  `&&str[i-1]!=="\r"?`\r
131
130
  `:match),getType=value=>Object.prototype.toString.call(value).slice(8,-1).toLowerCase();function isPlainObject(value){if(getType(value)!=="object")return !1;let pp=Object.getPrototypeOf(value);return pp==null?!0:(pp.constructor&&pp.constructor.toString())===Object.toString()}function getProperty(target,prop){if(typeof prop=="string"){for(let[name,value]of Object.entries(target))if(prop.toLowerCase()===name.toLowerCase())return value}}var proxyHeaders=object=>new Proxy(object,{get:(target,prop)=>getProperty(target,prop),has:(target,prop)=>getProperty(target,prop)!==void 0}),isFormData=value=>!!(value&&isFunction(value.constructor)&&value[Symbol.toStringTag]==="FormData"&&isFunction(value.append)&&isFunction(value.getAll)&&isFunction(value.entries)&&isFunction(value[Symbol.iterator])),escapeName=name=>String(name).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22"),isFile=value=>!!(value&&typeof value=="object"&&isFunction(value.constructor)&&value[Symbol.toStringTag]==="File"&&isFunction(value.stream)&&value.name!=null),__classPrivateFieldSet=function(receiver,state,value,kind,f){if(kind==="m")throw new TypeError("Private method is not writable");if(kind==="a"&&!f)throw new TypeError("Private accessor was defined without a setter");if(typeof state=="function"?receiver!==state||!f:!state.has(receiver))throw new TypeError("Cannot write private member to an object whose class did not declare it");return kind==="a"?f.call(receiver,value):f?f.value=value:state.set(receiver,value),value},__classPrivateFieldGet=function(receiver,state,kind,f){if(kind==="a"&&!f)throw new TypeError("Private accessor was defined without a getter");if(typeof state=="function"?receiver!==state||!f:!state.has(receiver))throw new TypeError("Cannot read private member from an object whose class did not declare it");return kind==="m"?f:kind==="a"?f.call(receiver):f?f.value:state.get(receiver)},_FormDataEncoder_instances,_FormDataEncoder_CRLF,_FormDataEncoder_CRLF_BYTES,_FormDataEncoder_CRLF_BYTES_LENGTH,_FormDataEncoder_DASHES,_FormDataEncoder_encoder,_FormDataEncoder_footer,_FormDataEncoder_form,_FormDataEncoder_options,_FormDataEncoder_getFieldHeader,_FormDataEncoder_getContentLength,defaultOptions={enableAdditionalHeaders:!1},readonlyProp={writable:!1,configurable:!1},FormDataEncoder=class{constructor(form,boundaryOrOptions,options){if(_FormDataEncoder_instances.add(this),_FormDataEncoder_CRLF.set(this,`\r
132
- `),_FormDataEncoder_CRLF_BYTES.set(this,void 0),_FormDataEncoder_CRLF_BYTES_LENGTH.set(this,void 0),_FormDataEncoder_DASHES.set(this,"-".repeat(2)),_FormDataEncoder_encoder.set(this,new TextEncoder),_FormDataEncoder_footer.set(this,void 0),_FormDataEncoder_form.set(this,void 0),_FormDataEncoder_options.set(this,void 0),!isFormData(form))throw new TypeError("Expected first argument to be a FormData instance.");let boundary;if(isPlainObject(boundaryOrOptions)?options=boundaryOrOptions:boundary=boundaryOrOptions,boundary||(boundary=createBoundary()),typeof boundary!="string")throw new TypeError("Expected boundary argument to be a string.");if(options&&!isPlainObject(options))throw new TypeError("Expected options argument to be an object.");__classPrivateFieldSet(this,_FormDataEncoder_form,Array.from(form.entries()),"f"),__classPrivateFieldSet(this,_FormDataEncoder_options,{...defaultOptions,...options},"f"),__classPrivateFieldSet(this,_FormDataEncoder_CRLF_BYTES,__classPrivateFieldGet(this,_FormDataEncoder_encoder,"f").encode(__classPrivateFieldGet(this,_FormDataEncoder_CRLF,"f")),"f"),__classPrivateFieldSet(this,_FormDataEncoder_CRLF_BYTES_LENGTH,__classPrivateFieldGet(this,_FormDataEncoder_CRLF_BYTES,"f").byteLength,"f"),this.boundary=`form-data-boundary-${boundary}`,this.contentType=`multipart/form-data; boundary=${this.boundary}`,__classPrivateFieldSet(this,_FormDataEncoder_footer,__classPrivateFieldGet(this,_FormDataEncoder_encoder,"f").encode(`${__classPrivateFieldGet(this,_FormDataEncoder_DASHES,"f")}${this.boundary}${__classPrivateFieldGet(this,_FormDataEncoder_DASHES,"f")}${__classPrivateFieldGet(this,_FormDataEncoder_CRLF,"f").repeat(2)}`),"f");let headers={"Content-Type":this.contentType},contentLength=__classPrivateFieldGet(this,_FormDataEncoder_instances,"m",_FormDataEncoder_getContentLength).call(this);contentLength&&(this.contentLength=contentLength,headers["Content-Length"]=contentLength),this.headers=proxyHeaders(Object.freeze(headers)),Object.defineProperties(this,{boundary:readonlyProp,contentType:readonlyProp,contentLength:readonlyProp,headers:readonlyProp});}getContentLength(){return this.contentLength==null?void 0:Number(this.contentLength)}*values(){for(let[name,raw]of __classPrivateFieldGet(this,_FormDataEncoder_form,"f")){let value=isFile(raw)?raw:__classPrivateFieldGet(this,_FormDataEncoder_encoder,"f").encode(normalizeValue(raw));yield __classPrivateFieldGet(this,_FormDataEncoder_instances,"m",_FormDataEncoder_getFieldHeader).call(this,name,value),yield value,yield __classPrivateFieldGet(this,_FormDataEncoder_CRLF_BYTES,"f");}yield __classPrivateFieldGet(this,_FormDataEncoder_footer,"f");}async*encode(){for(let part of this.values())isFile(part)?yield*getStreamIterator(part.stream()):yield part;}[(_FormDataEncoder_CRLF=new WeakMap,_FormDataEncoder_CRLF_BYTES=new WeakMap,_FormDataEncoder_CRLF_BYTES_LENGTH=new WeakMap,_FormDataEncoder_DASHES=new WeakMap,_FormDataEncoder_encoder=new WeakMap,_FormDataEncoder_footer=new WeakMap,_FormDataEncoder_form=new WeakMap,_FormDataEncoder_options=new WeakMap,_FormDataEncoder_instances=new WeakSet,_FormDataEncoder_getFieldHeader=function(name,value){let header="";header+=`${__classPrivateFieldGet(this,_FormDataEncoder_DASHES,"f")}${this.boundary}${__classPrivateFieldGet(this,_FormDataEncoder_CRLF,"f")}`,header+=`Content-Disposition: form-data; name="${escapeName(name)}"`,isFile(value)&&(header+=`; filename="${escapeName(value.name)}"${__classPrivateFieldGet(this,_FormDataEncoder_CRLF,"f")}`,header+=`Content-Type: ${value.type||"application/octet-stream"}`);let size=isFile(value)?value.size:value.byteLength;return __classPrivateFieldGet(this,_FormDataEncoder_options,"f").enableAdditionalHeaders===!0&&size!=null&&!isNaN(size)&&(header+=`${__classPrivateFieldGet(this,_FormDataEncoder_CRLF,"f")}Content-Length: ${isFile(value)?value.size:value.byteLength}`),__classPrivateFieldGet(this,_FormDataEncoder_encoder,"f").encode(`${header}${__classPrivateFieldGet(this,_FormDataEncoder_CRLF,"f").repeat(2)}`)},_FormDataEncoder_getContentLength=function(){let length=0;for(let[name,raw]of __classPrivateFieldGet(this,_FormDataEncoder_form,"f")){let value=isFile(raw)?raw:__classPrivateFieldGet(this,_FormDataEncoder_encoder,"f").encode(normalizeValue(raw)),size=isFile(value)?value.size:value.byteLength;if(size==null||isNaN(size))return;length+=__classPrivateFieldGet(this,_FormDataEncoder_instances,"m",_FormDataEncoder_getFieldHeader).call(this,name,value).byteLength,length+=size,length+=__classPrivateFieldGet(this,_FormDataEncoder_CRLF_BYTES_LENGTH,"f");}return String(length+__classPrivateFieldGet(this,_FormDataEncoder_footer,"f").byteLength)},Symbol.iterator)](){return this.values()}[Symbol.asyncIterator](){return this.encode()}};function isFormData2(body){return dist_default2.nodeStream(body)&&dist_default2.function_(body.getBoundary)}async function getBodySize(body,headers){if(headers&&"content-length"in headers)return Number(headers["content-length"]);if(!body)return 0;if(dist_default2.string(body))return Buffer$1.byteLength(body);if(dist_default2.buffer(body))return body.length;if(isFormData2(body))return promisify(body.getLength.bind(body))()}function proxyEvents(from,to,events){let eventFunctions={};for(let event of events){let eventFunction=(...args)=>{to.emit(event,...args);};eventFunctions[event]=eventFunction,from.on(event,eventFunction);}return ()=>{for(let[event,eventFunction]of Object.entries(eventFunctions))from.off(event,eventFunction);}}function unhandle(){let handlers=[];return {once(origin,event,fn){origin.once(event,fn),handlers.push({origin,event,fn});},unhandleAll(){for(let handler of handlers){let{origin,event,fn}=handler;origin.removeListener(event,fn);}handlers.length=0;}}}var reentry=Symbol("reentry"),noop=()=>{},TimeoutError2=class extends Error{constructor(threshold,event){super(`Timeout awaiting '${event}' for ${threshold}ms`),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:event}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.code="ETIMEDOUT";}};function timedOut(request,delays,options){if(reentry in request)return noop;request[reentry]=!0;let cancelers=[],{once:once2,unhandleAll}=unhandle(),addTimeout=(delay2,callback,event)=>{var _a;let timeout=setTimeout(callback,delay2,delay2,event);(_a=timeout.unref)==null||_a.call(timeout);let cancel=()=>{clearTimeout(timeout);};return cancelers.push(cancel),cancel},{host,hostname}=options,timeoutHandler=(delay2,event)=>{request.destroy(new TimeoutError2(delay2,event));},cancelTimeouts=()=>{for(let cancel of cancelers)cancel();unhandleAll();};if(request.once("error",error=>{if(cancelTimeouts(),request.listenerCount("error")===0)throw error}),typeof delays.request<"u"){let cancelTimeout=addTimeout(delays.request,timeoutHandler,"request");once2(request,"response",response=>{once2(response,"end",cancelTimeout);});}if(typeof delays.socket<"u"){let{socket}=delays,socketTimeoutHandler=()=>{timeoutHandler(socket,"socket");};request.setTimeout(socket,socketTimeoutHandler),cancelers.push(()=>{request.removeListener("timeout",socketTimeoutHandler);});}let hasLookup=typeof delays.lookup<"u",hasConnect=typeof delays.connect<"u",hasSecureConnect=typeof delays.secureConnect<"u",hasSend=typeof delays.send<"u";return (hasLookup||hasConnect||hasSecureConnect||hasSend)&&once2(request,"socket",socket=>{let{socketPath}=request;if(socket.connecting){let hasPath=!!(socketPath??net.isIP(hostname??host??"")!==0);if(hasLookup&&!hasPath&&typeof socket.address().address>"u"){let cancelTimeout=addTimeout(delays.lookup,timeoutHandler,"lookup");once2(socket,"lookup",cancelTimeout);}if(hasConnect){let timeConnect=()=>addTimeout(delays.connect,timeoutHandler,"connect");hasPath?once2(socket,"connect",timeConnect()):once2(socket,"lookup",error=>{error===null&&once2(socket,"connect",timeConnect());});}hasSecureConnect&&options.protocol==="https:"&&once2(socket,"connect",()=>{let cancelTimeout=addTimeout(delays.secureConnect,timeoutHandler,"secureConnect");once2(socket,"secureConnect",cancelTimeout);});}if(hasSend){let timeRequest=()=>addTimeout(delays.send,timeoutHandler,"send");socket.connecting?once2(socket,"connect",()=>{once2(request,"upload-complete",timeRequest());}):once2(request,"upload-complete",timeRequest());}}),typeof delays.response<"u"&&once2(request,"upload-complete",()=>{let cancelTimeout=addTimeout(delays.response,timeoutHandler,"response");once2(request,"response",cancelTimeout);}),typeof delays.read<"u"&&once2(request,"response",response=>{let cancelTimeout=addTimeout(delays.read,timeoutHandler,"read");once2(response,"end",cancelTimeout);}),cancelTimeouts}function urlToOptions(url){url=url;let options={protocol:url.protocol,hostname:dist_default2.string(url.hostname)&&url.hostname.startsWith("[")?url.hostname.slice(1,-1):url.hostname,host:url.host,hash:url.hash,search:url.search,pathname:url.pathname,href:url.href,path:`${url.pathname||""}${url.search||""}`};return dist_default2.string(url.port)&&url.port.length>0&&(options.port=Number(url.port)),(url.username||url.password)&&(options.auth=`${url.username||""}:${url.password||""}`),options}var WeakableMap=class{constructor(){Object.defineProperty(this,"weakMap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"map",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.weakMap=new WeakMap,this.map=new Map;}set(key,value){typeof key=="object"?this.weakMap.set(key,value):this.map.set(key,value);}get(key){return typeof key=="object"?this.weakMap.get(key):this.map.get(key)}has(key){return typeof key=="object"?this.weakMap.has(key):this.map.has(key)}},calculateRetryDelay=({attemptCount,retryOptions,error,retryAfter,computedValue})=>{if(error.name==="RetryError")return 1;if(attemptCount>retryOptions.limit)return 0;let hasMethod=retryOptions.methods.includes(error.options.method),hasErrorCode=retryOptions.errorCodes.includes(error.code),hasStatusCode=error.response&&retryOptions.statusCodes.includes(error.response.statusCode);if(!hasMethod||!hasErrorCode&&!hasStatusCode)return 0;if(error.response){if(retryAfter)return retryAfter>computedValue?0:retryAfter;if(error.response.statusCode===413)return 0}let noise=Math.random()*retryOptions.noise;return Math.min(2**(attemptCount-1)*1e3,retryOptions.backoffLimit)+noise},calculate_retry_delay_default=calculateRetryDelay,{Resolver:AsyncResolver}=promises,kCacheableLookupCreateConnection=Symbol("cacheableLookupCreateConnection"),kCacheableLookupInstance=Symbol("cacheableLookupInstance"),kExpires=Symbol("expires"),supportsALL=typeof ALL=="number",verifyAgent=agent2=>{if(!(agent2&&typeof agent2.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},map4to6=entries2=>{for(let entry of entries2)entry.family!==6&&(entry.address=`::ffff:${entry.address}`,entry.family=6);},getIfaceInfo=()=>{let has4=!1,has6=!1;for(let device of Object.values(os.networkInterfaces()))for(let iface of device)if(!iface.internal&&(iface.family==="IPv6"?has6=!0:has4=!0,has4&&has6))return {has4,has6};return {has4,has6}},isIterable=map=>Symbol.iterator in map,ignoreNoResultErrors=dnsPromise=>dnsPromise.catch(error=>{if(error.code==="ENODATA"||error.code==="ENOTFOUND"||error.code==="ENOENT")return [];throw error}),ttl={ttl:!0},all={all:!0},all4={all:!0,family:4},all6={all:!0,family:6},CacheableLookup=class{constructor({cache:cache3=new Map,maxTtl=1/0,fallbackDuration=3600,errorTtl=.15,resolver=new AsyncResolver,lookup: lookup$1=lookup}={}){if(this.maxTtl=maxTtl,this.errorTtl=errorTtl,this._cache=cache3,this._resolver=resolver,this._dnsLookup=lookup$1&&promisify(lookup$1),this.stats={cache:0,query:0},this._resolver instanceof AsyncResolver?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=promisify(this._resolver.resolve4.bind(this._resolver)),this._resolve6=promisify(this._resolver.resolve6.bind(this._resolver))),this._iface=getIfaceInfo(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,this.fallbackDuration=fallbackDuration,fallbackDuration>0){let interval=setInterval(()=>{this._hostnamesToFallback.clear();},fallbackDuration*1e3);interval.unref&&interval.unref(),this._fallbackInterval=interval;}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this);}set servers(servers){this.clear(),this._resolver.setServers(servers);}get servers(){return this._resolver.getServers()}lookup(hostname,options,callback){if(typeof options=="function"?(callback=options,options={}):typeof options=="number"&&(options={family:options}),!callback)throw new Error("Callback must be a function.");this.lookupAsync(hostname,options).then(result=>{options.all?callback(null,result):callback(null,result.address,result.family,result.expires,result.ttl,result.source);},callback);}async lookupAsync(hostname,options={}){typeof options=="number"&&(options={family:options});let cached=await this.query(hostname);if(options.family===6){let filtered=cached.filter(entry=>entry.family===6);options.hints&V4MAPPED&&(supportsALL&&options.hints&ALL||filtered.length===0)?map4to6(cached):cached=filtered;}else options.family===4&&(cached=cached.filter(entry=>entry.family===4));if(options.hints&ADDRCONFIG){let{_iface}=this;cached=cached.filter(entry=>entry.family===6?_iface.has6:_iface.has4);}if(cached.length===0){let error=new Error(`cacheableLookup ENOTFOUND ${hostname}`);throw error.code="ENOTFOUND",error.hostname=hostname,error}return options.all?cached:cached[0]}async query(hostname){let source="cache",cached=await this._cache.get(hostname);if(cached&&this.stats.cache++,!cached){let pending=this._pending[hostname];if(pending)this.stats.cache++,cached=await pending;else {source="query";let newPromise=this.queryAndCache(hostname);this._pending[hostname]=newPromise,this.stats.query++;try{cached=await newPromise;}finally{delete this._pending[hostname];}}}return cached=cached.map(entry=>({...entry,source})),cached}async _resolve(hostname){let[A,AAAA]=await Promise.all([ignoreNoResultErrors(this._resolve4(hostname,ttl)),ignoreNoResultErrors(this._resolve6(hostname,ttl))]),aTtl=0,aaaaTtl=0,cacheTtl=0,now=Date.now();for(let entry of A)entry.family=4,entry.expires=now+entry.ttl*1e3,aTtl=Math.max(aTtl,entry.ttl);for(let entry of AAAA)entry.family=6,entry.expires=now+entry.ttl*1e3,aaaaTtl=Math.max(aaaaTtl,entry.ttl);return A.length>0?AAAA.length>0?cacheTtl=Math.min(aTtl,aaaaTtl):cacheTtl=aTtl:cacheTtl=aaaaTtl,{entries:[...A,...AAAA],cacheTtl}}async _lookup(hostname){try{let[A,AAAA]=await Promise.all([ignoreNoResultErrors(this._dnsLookup(hostname,all4)),ignoreNoResultErrors(this._dnsLookup(hostname,all6))]);return {entries:[...A,...AAAA],cacheTtl:0}}catch{return {entries:[],cacheTtl:0}}}async _set(hostname,data,cacheTtl){if(this.maxTtl>0&&cacheTtl>0){cacheTtl=Math.min(cacheTtl,this.maxTtl)*1e3,data[kExpires]=Date.now()+cacheTtl;try{await this._cache.set(hostname,data,cacheTtl);}catch(error){this.lookupAsync=async()=>{let cacheError=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw cacheError.cause=error,cacheError};}isIterable(this._cache)&&this._tick(cacheTtl);}}async queryAndCache(hostname){if(this._hostnamesToFallback.has(hostname))return this._dnsLookup(hostname,all);let query=await this._resolve(hostname);query.entries.length===0&&this._dnsLookup&&(query=await this._lookup(hostname),query.entries.length!==0&&this.fallbackDuration>0&&this._hostnamesToFallback.add(hostname));let cacheTtl=query.entries.length===0?this.errorTtl:query.cacheTtl;return await this._set(hostname,query.entries,cacheTtl),query.entries}_tick(ms){let nextRemovalTime=this._nextRemovalTime;(!nextRemovalTime||ms<nextRemovalTime)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=ms,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let nextExpiry=1/0,now=Date.now();for(let[hostname,entries2]of this._cache){let expires=entries2[kExpires];now>=expires?this._cache.delete(hostname):expires<nextExpiry&&(nextExpiry=expires);}nextExpiry!==1/0&&this._tick(nextExpiry-now);},ms),this._removalTimeout.unref&&this._removalTimeout.unref());}install(agent2){if(verifyAgent(agent2),kCacheableLookupCreateConnection in agent2)throw new Error("CacheableLookup has been already installed");agent2[kCacheableLookupCreateConnection]=agent2.createConnection,agent2[kCacheableLookupInstance]=this,agent2.createConnection=(options,callback)=>("lookup"in options||(options.lookup=this.lookup),agent2[kCacheableLookupCreateConnection](options,callback));}uninstall(agent2){if(verifyAgent(agent2),agent2[kCacheableLookupCreateConnection]){if(agent2[kCacheableLookupInstance]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");agent2.createConnection=agent2[kCacheableLookupCreateConnection],delete agent2[kCacheableLookupCreateConnection],delete agent2[kCacheableLookupInstance];}}updateInterfaceInfo(){let{_iface}=this;this._iface=getIfaceInfo(),(_iface.has4&&!this._iface.has4||_iface.has6&&!this._iface.has6)&&this._cache.clear();}clear(hostname){if(hostname){this._cache.delete(hostname);return}this._cache.clear();}},import_http2_wrapper=__toESM2(require_source2(),1);function parseLinkHeader(link){let parsed=[],items=link.split(",");for(let item of items){let[rawUriReference,...rawLinkParameters]=item.split(";"),trimmedUriReference=rawUriReference.trim();if(trimmedUriReference[0]!=="<"||trimmedUriReference[trimmedUriReference.length-1]!==">")throw new Error(`Invalid format of the Link header reference: ${trimmedUriReference}`);let reference=trimmedUriReference.slice(1,-1),parameters={};if(rawLinkParameters.length===0)throw new Error(`Unexpected end of Link header parameters: ${rawLinkParameters.join(";")}`);for(let rawParameter of rawLinkParameters){let trimmedRawParameter=rawParameter.trim(),center=trimmedRawParameter.indexOf("=");if(center===-1)throw new Error(`Failed to parse Link header: ${link}`);let name=trimmedRawParameter.slice(0,center).trim(),value=trimmedRawParameter.slice(center+1).trim();parameters[name]=value;}parsed.push({reference,parameters});}return parsed}var[major,minor]=process3.versions.node.split(".").map(Number);function validateSearchParameters(searchParameters){for(let key in searchParameters){let value=searchParameters[key];assert.any([dist_default2.string,dist_default2.number,dist_default2.boolean,dist_default2.null_,dist_default2.undefined],value);}}var globalCache=new Map,globalDnsCache,getGlobalDnsCache=()=>globalDnsCache||(globalDnsCache=new CacheableLookup,globalDnsCache),defaultInternals={request:void 0,agent:{http:void 0,https:void 0,http2:void 0},h2session:void 0,decompress:!0,timeout:{connect:void 0,lookup:void 0,read:void 0,request:void 0,response:void 0,secureConnect:void 0,send:void 0,socket:void 0},prefixUrl:"",body:void 0,form:void 0,json:void 0,cookieJar:void 0,ignoreInvalidCookies:!1,searchParams:void 0,dnsLookup:void 0,dnsCache:void 0,context:{},hooks:{init:[],beforeRequest:[],beforeError:[],beforeRedirect:[],beforeRetry:[],afterResponse:[]},followRedirect:!0,maxRedirects:10,cache:void 0,throwHttpErrors:!0,username:"",password:"",http2:!1,allowGetBody:!1,headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},methodRewriting:!1,dnsLookupIpVersion:void 0,parseJson:JSON.parse,stringifyJson:JSON.stringify,retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue})=>computedValue,backoffLimit:Number.POSITIVE_INFINITY,noise:100},localAddress:void 0,method:"GET",createConnection:void 0,cacheOptions:{shared:void 0,cacheHeuristic:void 0,immutableMinTimeToLive:void 0,ignoreCargoCult:void 0},https:{alpnProtocols:void 0,rejectUnauthorized:void 0,checkServerIdentity:void 0,certificateAuthority:void 0,key:void 0,certificate:void 0,passphrase:void 0,pfx:void 0,ciphers:void 0,honorCipherOrder:void 0,minVersion:void 0,maxVersion:void 0,signatureAlgorithms:void 0,tlsSessionLifetime:void 0,dhparam:void 0,ecdhCurve:void 0,certificateRevocationLists:void 0},encoding:void 0,resolveBodyOnly:!1,isStream:!1,responseType:"text",url:void 0,pagination:{transform(response){return response.request.options.responseType==="json"?response.body:JSON.parse(response.body)},paginate({response}){let rawLinkHeader=response.headers.link;if(typeof rawLinkHeader!="string"||rawLinkHeader.trim()==="")return !1;let next=parseLinkHeader(rawLinkHeader).find(entry=>entry.parameters.rel==="next"||entry.parameters.rel==='"next"');return next?{url:new URL$1(next.reference,response.url)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:Number.POSITIVE_INFINITY,backoff:0,requestLimit:1e4,stackAllItems:!1},setHost:!0,maxHeaderSize:void 0,signal:void 0,enableUnixSockets:!0},cloneInternals=internals=>{let{hooks,retry}=internals,result={...internals,context:{...internals.context},cacheOptions:{...internals.cacheOptions},https:{...internals.https},agent:{...internals.agent},headers:{...internals.headers},retry:{...retry,errorCodes:[...retry.errorCodes],methods:[...retry.methods],statusCodes:[...retry.statusCodes]},timeout:{...internals.timeout},hooks:{init:[...hooks.init],beforeRequest:[...hooks.beforeRequest],beforeError:[...hooks.beforeError],beforeRedirect:[...hooks.beforeRedirect],beforeRetry:[...hooks.beforeRetry],afterResponse:[...hooks.afterResponse]},searchParams:internals.searchParams?new URLSearchParams$1(internals.searchParams):void 0,pagination:{...internals.pagination}};return result.url!==void 0&&(result.prefixUrl=""),result},cloneRaw=raw=>{let{hooks,retry}=raw,result={...raw};return dist_default2.object(raw.context)&&(result.context={...raw.context}),dist_default2.object(raw.cacheOptions)&&(result.cacheOptions={...raw.cacheOptions}),dist_default2.object(raw.https)&&(result.https={...raw.https}),dist_default2.object(raw.cacheOptions)&&(result.cacheOptions={...result.cacheOptions}),dist_default2.object(raw.agent)&&(result.agent={...raw.agent}),dist_default2.object(raw.headers)&&(result.headers={...raw.headers}),dist_default2.object(retry)&&(result.retry={...retry},dist_default2.array(retry.errorCodes)&&(result.retry.errorCodes=[...retry.errorCodes]),dist_default2.array(retry.methods)&&(result.retry.methods=[...retry.methods]),dist_default2.array(retry.statusCodes)&&(result.retry.statusCodes=[...retry.statusCodes])),dist_default2.object(raw.timeout)&&(result.timeout={...raw.timeout}),dist_default2.object(hooks)&&(result.hooks={...hooks},dist_default2.array(hooks.init)&&(result.hooks.init=[...hooks.init]),dist_default2.array(hooks.beforeRequest)&&(result.hooks.beforeRequest=[...hooks.beforeRequest]),dist_default2.array(hooks.beforeError)&&(result.hooks.beforeError=[...hooks.beforeError]),dist_default2.array(hooks.beforeRedirect)&&(result.hooks.beforeRedirect=[...hooks.beforeRedirect]),dist_default2.array(hooks.beforeRetry)&&(result.hooks.beforeRetry=[...hooks.beforeRetry]),dist_default2.array(hooks.afterResponse)&&(result.hooks.afterResponse=[...hooks.afterResponse])),dist_default2.object(raw.pagination)&&(result.pagination={...raw.pagination}),result},getHttp2TimeoutOption=internals=>{let delays=[internals.timeout.socket,internals.timeout.connect,internals.timeout.lookup,internals.timeout.request,internals.timeout.secureConnect].filter(delay2=>typeof delay2=="number");if(delays.length>0)return Math.min(...delays)},init=(options,withOptions,self2)=>{var _a;let initHooks=(_a=options.hooks)==null?void 0:_a.init;if(initHooks)for(let hook of initHooks)hook(withOptions,self2);},Options=class{constructor(input,options,defaults2){if(Object.defineProperty(this,"_unixOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_internals",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_merging",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_init",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),assert.any([dist_default2.string,dist_default2.urlInstance,dist_default2.object,dist_default2.undefined],input),assert.any([dist_default2.object,dist_default2.undefined],options),assert.any([dist_default2.object,dist_default2.undefined],defaults2),input instanceof Options||options instanceof Options)throw new TypeError("The defaults must be passed as the third argument");this._internals=cloneInternals(defaults2?._internals??defaults2??defaultInternals),this._init=[...defaults2?._init??[]],this._merging=!1,this._unixOptions=void 0;try{if(dist_default2.plainObject(input))try{this.merge(input),this.merge(options);}finally{this.url=input.url;}else try{this.merge(options);}finally{if(options?.url!==void 0)if(input===void 0)this.url=options.url;else throw new TypeError("The `url` option is mutually exclusive with the `input` argument");else input!==void 0&&(this.url=input);}}catch(error){throw error.options=this,error}}merge(options){if(options){if(options instanceof Options){for(let init2 of options._init)this.merge(init2);return}options=cloneRaw(options),init(this,options,this),init(options,options,this),this._merging=!0,"isStream"in options&&(this.isStream=options.isStream);try{let push=!1;for(let key in options)if(!(key==="mutableDefaults"||key==="handlers")&&key!=="url"){if(!(key in this))throw new Error(`Unexpected option: ${key}`);this[key]=options[key],push=!0;}push&&this._init.push(options);}finally{this._merging=!1;}}}get request(){return this._internals.request}set request(value){assert.any([dist_default2.function_,dist_default2.undefined],value),this._internals.request=value;}get agent(){return this._internals.agent}set agent(value){assert.plainObject(value);for(let key in value){if(!(key in this._internals.agent))throw new TypeError(`Unexpected agent option: ${key}`);assert.any([dist_default2.object,dist_default2.undefined],value[key]);}this._merging?Object.assign(this._internals.agent,value):this._internals.agent={...value};}get h2session(){return this._internals.h2session}set h2session(value){this._internals.h2session=value;}get decompress(){return this._internals.decompress}set decompress(value){assert.boolean(value),this._internals.decompress=value;}get timeout(){return this._internals.timeout}set timeout(value){assert.plainObject(value);for(let key in value){if(!(key in this._internals.timeout))throw new Error(`Unexpected timeout option: ${key}`);assert.any([dist_default2.number,dist_default2.undefined],value[key]);}this._merging?Object.assign(this._internals.timeout,value):this._internals.timeout={...value};}get prefixUrl(){return this._internals.prefixUrl}set prefixUrl(value){if(assert.any([dist_default2.string,dist_default2.urlInstance],value),value===""){this._internals.prefixUrl="";return}if(value=value.toString(),value.endsWith("/")||(value+="/"),this._internals.prefixUrl&&this._internals.url){let{href}=this._internals.url;this._internals.url.href=value+href.slice(this._internals.prefixUrl.length);}this._internals.prefixUrl=value;}get body(){return this._internals.body}set body(value){assert.any([dist_default2.string,dist_default2.buffer,dist_default2.nodeStream,dist_default2.generator,dist_default2.asyncGenerator,isFormData,dist_default2.undefined],value),dist_default2.nodeStream(value)&&assert.truthy(value.readable),value!==void 0&&(assert.undefined(this._internals.form),assert.undefined(this._internals.json)),this._internals.body=value;}get form(){return this._internals.form}set form(value){assert.any([dist_default2.plainObject,dist_default2.undefined],value),value!==void 0&&(assert.undefined(this._internals.body),assert.undefined(this._internals.json)),this._internals.form=value;}get json(){return this._internals.json}set json(value){value!==void 0&&(assert.undefined(this._internals.body),assert.undefined(this._internals.form)),this._internals.json=value;}get url(){return this._internals.url}set url(value){if(assert.any([dist_default2.string,dist_default2.urlInstance,dist_default2.undefined],value),value===void 0){this._internals.url=void 0;return}if(dist_default2.string(value)&&value.startsWith("/"))throw new Error("`url` must not start with a slash");let urlString=`${this.prefixUrl}${value.toString()}`,url=new URL$1(urlString);if(this._internals.url=url,url.protocol==="unix:"&&(url.href=`http://unix${url.pathname}${url.search}`),url.protocol!=="http:"&&url.protocol!=="https:"){let error=new Error(`Unsupported protocol: ${url.protocol}`);throw error.code="ERR_UNSUPPORTED_PROTOCOL",error}if(this._internals.username&&(url.username=this._internals.username,this._internals.username=""),this._internals.password&&(url.password=this._internals.password,this._internals.password=""),this._internals.searchParams&&(url.search=this._internals.searchParams.toString(),this._internals.searchParams=void 0),url.hostname==="unix"){if(!this._internals.enableUnixSockets)throw new Error("Using UNIX domain sockets but option `enableUnixSockets` is not enabled");let matches=/(?<socketPath>.+?):(?<path>.+)/.exec(`${url.pathname}${url.search}`);if(matches?.groups){let{socketPath,path:path13}=matches.groups;this._unixOptions={socketPath,path:path13,host:""};}else this._unixOptions=void 0;return}this._unixOptions=void 0;}get cookieJar(){return this._internals.cookieJar}set cookieJar(value){if(assert.any([dist_default2.object,dist_default2.undefined],value),value===void 0){this._internals.cookieJar=void 0;return}let{setCookie,getCookieString}=value;assert.function_(setCookie),assert.function_(getCookieString),setCookie.length===4&&getCookieString.length===0?(setCookie=promisify(setCookie.bind(value)),getCookieString=promisify(getCookieString.bind(value)),this._internals.cookieJar={setCookie,getCookieString}):this._internals.cookieJar=value;}get signal(){return this._internals.signal}set signal(value){assert.object(value),this._internals.signal=value;}get ignoreInvalidCookies(){return this._internals.ignoreInvalidCookies}set ignoreInvalidCookies(value){assert.boolean(value),this._internals.ignoreInvalidCookies=value;}get searchParams(){return this._internals.url?this._internals.url.searchParams:(this._internals.searchParams===void 0&&(this._internals.searchParams=new URLSearchParams$1),this._internals.searchParams)}set searchParams(value){assert.any([dist_default2.string,dist_default2.object,dist_default2.undefined],value);let url=this._internals.url;if(value===void 0){this._internals.searchParams=void 0,url&&(url.search="");return}let searchParameters=this.searchParams,updated;if(dist_default2.string(value))updated=new URLSearchParams$1(value);else if(value instanceof URLSearchParams$1)updated=value;else {validateSearchParameters(value),updated=new URLSearchParams$1;for(let key in value){let entry=value[key];entry===null?updated.append(key,""):entry===void 0?searchParameters.delete(key):updated.append(key,entry);}}if(this._merging){for(let key of updated.keys())searchParameters.delete(key);for(let[key,value2]of updated)searchParameters.append(key,value2);}else url?url.search=searchParameters.toString():this._internals.searchParams=searchParameters;}get searchParameters(){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}set searchParameters(_value){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}get dnsLookup(){return this._internals.dnsLookup}set dnsLookup(value){assert.any([dist_default2.function_,dist_default2.undefined],value),this._internals.dnsLookup=value;}get dnsCache(){return this._internals.dnsCache}set dnsCache(value){assert.any([dist_default2.object,dist_default2.boolean,dist_default2.undefined],value),value===!0?this._internals.dnsCache=getGlobalDnsCache():value===!1?this._internals.dnsCache=void 0:this._internals.dnsCache=value;}get context(){return this._internals.context}set context(value){assert.object(value),this._merging?Object.assign(this._internals.context,value):this._internals.context={...value};}get hooks(){return this._internals.hooks}set hooks(value){assert.object(value);for(let knownHookEvent in value){if(!(knownHookEvent in this._internals.hooks))throw new Error(`Unexpected hook event: ${knownHookEvent}`);let typedKnownHookEvent=knownHookEvent,hooks=value[typedKnownHookEvent];if(assert.any([dist_default2.array,dist_default2.undefined],hooks),hooks)for(let hook of hooks)assert.function_(hook);if(this._merging)hooks&&this._internals.hooks[typedKnownHookEvent].push(...hooks);else {if(!hooks)throw new Error(`Missing hook event: ${knownHookEvent}`);this._internals.hooks[knownHookEvent]=[...hooks];}}}get followRedirect(){return this._internals.followRedirect}set followRedirect(value){assert.boolean(value),this._internals.followRedirect=value;}get followRedirects(){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}set followRedirects(_value){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}get maxRedirects(){return this._internals.maxRedirects}set maxRedirects(value){assert.number(value),this._internals.maxRedirects=value;}get cache(){return this._internals.cache}set cache(value){assert.any([dist_default2.object,dist_default2.string,dist_default2.boolean,dist_default2.undefined],value),value===!0?this._internals.cache=globalCache:value===!1?this._internals.cache=void 0:this._internals.cache=value;}get throwHttpErrors(){return this._internals.throwHttpErrors}set throwHttpErrors(value){assert.boolean(value),this._internals.throwHttpErrors=value;}get username(){let url=this._internals.url,value=url?url.username:this._internals.username;return decodeURIComponent(value)}set username(value){assert.string(value);let url=this._internals.url,fixedValue=encodeURIComponent(value);url?url.username=fixedValue:this._internals.username=fixedValue;}get password(){let url=this._internals.url,value=url?url.password:this._internals.password;return decodeURIComponent(value)}set password(value){assert.string(value);let url=this._internals.url,fixedValue=encodeURIComponent(value);url?url.password=fixedValue:this._internals.password=fixedValue;}get http2(){return this._internals.http2}set http2(value){assert.boolean(value),this._internals.http2=value;}get allowGetBody(){return this._internals.allowGetBody}set allowGetBody(value){assert.boolean(value),this._internals.allowGetBody=value;}get headers(){return this._internals.headers}set headers(value){assert.plainObject(value),this._merging?Object.assign(this._internals.headers,lowercaseKeys(value)):this._internals.headers=lowercaseKeys(value);}get methodRewriting(){return this._internals.methodRewriting}set methodRewriting(value){assert.boolean(value),this._internals.methodRewriting=value;}get dnsLookupIpVersion(){return this._internals.dnsLookupIpVersion}set dnsLookupIpVersion(value){if(value!==void 0&&value!==4&&value!==6)throw new TypeError(`Invalid DNS lookup IP version: ${value}`);this._internals.dnsLookupIpVersion=value;}get parseJson(){return this._internals.parseJson}set parseJson(value){assert.function_(value),this._internals.parseJson=value;}get stringifyJson(){return this._internals.stringifyJson}set stringifyJson(value){assert.function_(value),this._internals.stringifyJson=value;}get retry(){return this._internals.retry}set retry(value){if(assert.plainObject(value),assert.any([dist_default2.function_,dist_default2.undefined],value.calculateDelay),assert.any([dist_default2.number,dist_default2.undefined],value.maxRetryAfter),assert.any([dist_default2.number,dist_default2.undefined],value.limit),assert.any([dist_default2.array,dist_default2.undefined],value.methods),assert.any([dist_default2.array,dist_default2.undefined],value.statusCodes),assert.any([dist_default2.array,dist_default2.undefined],value.errorCodes),assert.any([dist_default2.number,dist_default2.undefined],value.noise),value.noise&&Math.abs(value.noise)>100)throw new Error(`The maximum acceptable retry noise is +/- 100ms, got ${value.noise}`);for(let key in value)if(!(key in this._internals.retry))throw new Error(`Unexpected retry option: ${key}`);this._merging?Object.assign(this._internals.retry,value):this._internals.retry={...value};let{retry}=this._internals;retry.methods=[...new Set(retry.methods.map(method=>method.toUpperCase()))],retry.statusCodes=[...new Set(retry.statusCodes)],retry.errorCodes=[...new Set(retry.errorCodes)];}get localAddress(){return this._internals.localAddress}set localAddress(value){assert.any([dist_default2.string,dist_default2.undefined],value),this._internals.localAddress=value;}get method(){return this._internals.method}set method(value){assert.string(value),this._internals.method=value.toUpperCase();}get createConnection(){return this._internals.createConnection}set createConnection(value){assert.any([dist_default2.function_,dist_default2.undefined],value),this._internals.createConnection=value;}get cacheOptions(){return this._internals.cacheOptions}set cacheOptions(value){assert.plainObject(value),assert.any([dist_default2.boolean,dist_default2.undefined],value.shared),assert.any([dist_default2.number,dist_default2.undefined],value.cacheHeuristic),assert.any([dist_default2.number,dist_default2.undefined],value.immutableMinTimeToLive),assert.any([dist_default2.boolean,dist_default2.undefined],value.ignoreCargoCult);for(let key in value)if(!(key in this._internals.cacheOptions))throw new Error(`Cache option \`${key}\` does not exist`);this._merging?Object.assign(this._internals.cacheOptions,value):this._internals.cacheOptions={...value};}get https(){return this._internals.https}set https(value){assert.plainObject(value),assert.any([dist_default2.boolean,dist_default2.undefined],value.rejectUnauthorized),assert.any([dist_default2.function_,dist_default2.undefined],value.checkServerIdentity),assert.any([dist_default2.string,dist_default2.object,dist_default2.array,dist_default2.undefined],value.certificateAuthority),assert.any([dist_default2.string,dist_default2.object,dist_default2.array,dist_default2.undefined],value.key),assert.any([dist_default2.string,dist_default2.object,dist_default2.array,dist_default2.undefined],value.certificate),assert.any([dist_default2.string,dist_default2.undefined],value.passphrase),assert.any([dist_default2.string,dist_default2.buffer,dist_default2.array,dist_default2.undefined],value.pfx),assert.any([dist_default2.array,dist_default2.undefined],value.alpnProtocols),assert.any([dist_default2.string,dist_default2.undefined],value.ciphers),assert.any([dist_default2.string,dist_default2.buffer,dist_default2.undefined],value.dhparam),assert.any([dist_default2.string,dist_default2.undefined],value.signatureAlgorithms),assert.any([dist_default2.string,dist_default2.undefined],value.minVersion),assert.any([dist_default2.string,dist_default2.undefined],value.maxVersion),assert.any([dist_default2.boolean,dist_default2.undefined],value.honorCipherOrder),assert.any([dist_default2.number,dist_default2.undefined],value.tlsSessionLifetime),assert.any([dist_default2.string,dist_default2.undefined],value.ecdhCurve),assert.any([dist_default2.string,dist_default2.buffer,dist_default2.array,dist_default2.undefined],value.certificateRevocationLists);for(let key in value)if(!(key in this._internals.https))throw new Error(`HTTPS option \`${key}\` does not exist`);this._merging?Object.assign(this._internals.https,value):this._internals.https={...value};}get encoding(){return this._internals.encoding}set encoding(value){if(value===null)throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");assert.any([dist_default2.string,dist_default2.undefined],value),this._internals.encoding=value;}get resolveBodyOnly(){return this._internals.resolveBodyOnly}set resolveBodyOnly(value){assert.boolean(value),this._internals.resolveBodyOnly=value;}get isStream(){return this._internals.isStream}set isStream(value){assert.boolean(value),this._internals.isStream=value;}get responseType(){return this._internals.responseType}set responseType(value){if(value===void 0){this._internals.responseType="text";return}if(value!=="text"&&value!=="buffer"&&value!=="json")throw new Error(`Invalid \`responseType\` option: ${value}`);this._internals.responseType=value;}get pagination(){return this._internals.pagination}set pagination(value){assert.object(value),this._merging?Object.assign(this._internals.pagination,value):this._internals.pagination=value;}get auth(){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}set auth(_value){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}get setHost(){return this._internals.setHost}set setHost(value){assert.boolean(value),this._internals.setHost=value;}get maxHeaderSize(){return this._internals.maxHeaderSize}set maxHeaderSize(value){assert.any([dist_default2.number,dist_default2.undefined],value),this._internals.maxHeaderSize=value;}get enableUnixSockets(){return this._internals.enableUnixSockets}set enableUnixSockets(value){assert.boolean(value),this._internals.enableUnixSockets=value;}toJSON(){return {...this._internals}}[Symbol.for("nodejs.util.inspect.custom")](_depth,options){return inspect(this._internals,options)}createNativeRequestOptions(){var _a;let internals=this._internals,url=internals.url,agent2;url.protocol==="https:"?agent2=internals.http2?internals.agent:internals.agent.https:agent2=internals.agent.http;let{https:https22}=internals,{pfx}=https22;return dist_default2.array(pfx)&&dist_default2.plainObject(pfx[0])&&(pfx=pfx.map(object=>({buf:object.buffer,passphrase:object.passphrase}))),{...internals.cacheOptions,...this._unixOptions,ALPNProtocols:https22.alpnProtocols,ca:https22.certificateAuthority,cert:https22.certificate,key:https22.key,passphrase:https22.passphrase,pfx:https22.pfx,rejectUnauthorized:https22.rejectUnauthorized,checkServerIdentity:https22.checkServerIdentity??checkServerIdentity,ciphers:https22.ciphers,honorCipherOrder:https22.honorCipherOrder,minVersion:https22.minVersion,maxVersion:https22.maxVersion,sigalgs:https22.signatureAlgorithms,sessionTimeout:https22.tlsSessionLifetime,dhparam:https22.dhparam,ecdhCurve:https22.ecdhCurve,crl:https22.certificateRevocationLists,lookup:internals.dnsLookup??((_a=internals.dnsCache)==null?void 0:_a.lookup),family:internals.dnsLookupIpVersion,agent:agent2,setHost:internals.setHost,method:internals.method,maxHeaderSize:internals.maxHeaderSize,localAddress:internals.localAddress,headers:internals.headers,createConnection:internals.createConnection,timeout:internals.http2?getHttp2TimeoutOption(internals):void 0,h2session:internals.h2session}}getRequestFunction(){let url=this._internals.url,{request}=this._internals;return !request&&url?this.getFallbackRequestFunction():request}getFallbackRequestFunction(){let url=this._internals.url;if(url){if(url.protocol==="https:"){if(this._internals.http2){if(major<15||major===15&&minor<10){let error=new Error("To use the `http2` option, install Node.js 15.10.0 or above");throw error.code="EUNSUPPORTED",error}return import_http2_wrapper.default.auto}return https.request}return http2.request}}freeze(){let options=this._internals;Object.freeze(options),Object.freeze(options.hooks),Object.freeze(options.hooks.afterResponse),Object.freeze(options.hooks.beforeError),Object.freeze(options.hooks.beforeRedirect),Object.freeze(options.hooks.beforeRequest),Object.freeze(options.hooks.beforeRetry),Object.freeze(options.hooks.init),Object.freeze(options.https),Object.freeze(options.cacheOptions),Object.freeze(options.agent),Object.freeze(options.headers),Object.freeze(options.timeout),Object.freeze(options.retry),Object.freeze(options.retry.errorCodes),Object.freeze(options.retry.methods),Object.freeze(options.retry.statusCodes);}},isResponseOk=response=>{let{statusCode}=response,limitStatusCode=response.request.options.followRedirect?299:399;return statusCode>=200&&statusCode<=limitStatusCode||statusCode===304},ParseError=class extends RequestError{constructor(error,response){let{options}=response.request;super(`${error.message} in "${options.url.toString()}"`,error,response.request),this.name="ParseError",this.code="ERR_BODY_PARSE_FAILURE";}},parseBody=(response,responseType,parseJson,encoding)=>{let{rawBody}=response;try{if(responseType==="text")return rawBody.toString(encoding);if(responseType==="json")return rawBody.length===0?"":parseJson(rawBody.toString(encoding));if(responseType==="buffer")return rawBody}catch(error){throw new ParseError(error,response)}throw new ParseError({message:`Unknown body type '${responseType}'`,name:"Error"},response)};function isClientRequest(clientRequest){return clientRequest.writable&&!clientRequest.writableEnded}var is_client_request_default=isClientRequest;function isUnixSocketURL(url){return url.protocol==="unix:"||url.hostname==="unix"}var supportsBrotli=dist_default2.string(process3.versions.brotli),methodsWithoutBody=new Set(["GET","HEAD"]),cacheableStore=new WeakableMap,redirectCodes=new Set([300,301,302,303,304,307,308]),proxiedRequestEvents=["socket","connect","continue","information","upgrade"],noop2=()=>{},Request2=class extends Duplex{constructor(url,options,defaults2){super({autoDestroy:!1,highWaterMark:0}),Object.defineProperty(this,"constructor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_noPipe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"requestUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"redirectUrls",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"retryCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopRetry",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downloadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_uploadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopReading",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pipedServerResponses",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_responseSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_bodySize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_unproxyEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isFromCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cannotHaveBody",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_triggerRead",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cancelTimeouts",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_removeListeners",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_nativeResponse",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_flushed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_aborted",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_requestInitialized",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._downloadedSize=0,this._uploadedSize=0,this._stopReading=!1,this._pipedServerResponses=new Set,this._cannotHaveBody=!1,this._unproxyEvents=noop2,this._triggerRead=!1,this._cancelTimeouts=noop2,this._removeListeners=noop2,this._jobs=[],this._flushed=!1,this._requestInitialized=!1,this._aborted=!1,this.redirectUrls=[],this.retryCount=0,this._stopRetry=noop2,this.on("pipe",source=>{source.headers&&Object.assign(this.options.headers,source.headers);}),this.on("newListener",event=>{if(event==="retry"&&this.listenerCount("retry")>0)throw new Error("A retry listener has been attached already.")});try{if(this.options=new Options(url,options,defaults2),!this.options.url){if(this.options.prefixUrl==="")throw new TypeError("Missing `url` property");this.options.url="";}this.requestUrl=this.options.url;}catch(error){let{options:options2}=error;options2&&(this.options=options2),this.flush=async()=>{this.flush=async()=>{},this.destroy(error);};return}let{body}=this.options;if(dist_default2.nodeStream(body)&&body.once("error",error=>{this._flushed?this._beforeError(new UploadError(error,this)):this.flush=async()=>{this.flush=async()=>{},this._beforeError(new UploadError(error,this));};}),this.options.signal){let abort=()=>{this.destroy(new AbortError2(this));};this.options.signal.aborted?abort():(this.options.signal.addEventListener("abort",abort),this._removeListeners=()=>{this.options.signal.removeEventListener("abort",abort);});}}async flush(){var _a;if(!this._flushed){this._flushed=!0;try{if(await this._finalizeBody(),this.destroyed)return;if(await this._makeRequest(),this.destroyed){(_a=this._request)==null||_a.destroy();return}for(let job of this._jobs)job();this._jobs.length=0,this._requestInitialized=!0;}catch(error){this._beforeError(error);}}}_beforeError(error){if(this._stopReading)return;let{response,options}=this,attemptCount=this.retryCount+(error.name==="RetryError"?0:1);this._stopReading=!0,error instanceof RequestError||(error=new RequestError(error.message,error,this));let typedError=error;(async()=>{var _a,_b;if(response?.readable&&!response.rawBody&&!((_b=(_a=this._request)==null?void 0:_a.socket)!=null&&_b.destroyed)&&(response.setEncoding(this.readableEncoding),await this._setRawBody(response)&&(response.body=response.rawBody.toString())),this.listenerCount("retry")!==0){let backoff;try{let retryAfter;response&&"retry-after"in response.headers&&(retryAfter=Number(response.headers["retry-after"]),Number.isNaN(retryAfter)?(retryAfter=Date.parse(response.headers["retry-after"])-Date.now(),retryAfter<=0&&(retryAfter=1)):retryAfter*=1e3);let retryOptions=options.retry;backoff=await retryOptions.calculateDelay({attemptCount,retryOptions,error:typedError,retryAfter,computedValue:calculate_retry_delay_default({attemptCount,retryOptions,error:typedError,retryAfter,computedValue:retryOptions.maxRetryAfter??options.timeout.request??Number.POSITIVE_INFINITY})});}catch(error_){this._error(new RequestError(error_.message,error_,this));return}if(backoff){if(await new Promise(resolve3=>{let timeout=setTimeout(resolve3,backoff);this._stopRetry=()=>{clearTimeout(timeout),resolve3();};}),this.destroyed)return;try{for(let hook of this.options.hooks.beforeRetry)await hook(typedError,this.retryCount+1);}catch(error_){this._error(new RequestError(error_.message,error,this));return}if(this.destroyed)return;this.destroy(),this.emit("retry",this.retryCount+1,error,updatedOptions=>{let request=new Request2(options.url,updatedOptions,options);return request.retryCount=this.retryCount+1,process3.nextTick(()=>{request.flush();}),request});return}}this._error(typedError);})();}_read(){this._triggerRead=!0;let{response}=this;if(response&&!this._stopReading){response.readableLength&&(this._triggerRead=!1);let data;for(;(data=response.read())!==null;){this._downloadedSize+=data.length;let progress=this.downloadProgress;progress.percent<1&&this.emit("downloadProgress",progress),this.push(data);}}}_write(chunk,encoding,callback){let write=()=>{this._writeRequest(chunk,encoding,callback);};this._requestInitialized?write():this._jobs.push(write);}_final(callback){let endRequest=()=>{if(!this._request||this._request.destroyed){callback();return}this._request.end(error=>{var _a;(_a=this._request._writableState)!=null&&_a.errored||(error||(this._bodySize=this._uploadedSize,this.emit("uploadProgress",this.uploadProgress),this._request.emit("upload-complete")),callback(error));});};this._requestInitialized?endRequest():this._jobs.push(endRequest);}_destroy(error,callback){if(this._stopReading=!0,this.flush=async()=>{},this._stopRetry(),this._cancelTimeouts(),this._removeListeners(),this.options){let{body}=this.options;dist_default2.nodeStream(body)&&body.destroy();}this._request&&this._request.destroy(),error!==null&&!dist_default2.undefined(error)&&!(error instanceof RequestError)&&(error=new RequestError(error.message,error,this)),callback(error);}pipe(destination,options){return destination instanceof ServerResponse&&this._pipedServerResponses.add(destination),super.pipe(destination,options)}unpipe(destination){return destination instanceof ServerResponse&&this._pipedServerResponses.delete(destination),super.unpipe(destination),this}async _finalizeBody(){let{options}=this,{headers}=options,isForm=!dist_default2.undefined(options.form),isJSON2=!dist_default2.undefined(options.json),isBody=!dist_default2.undefined(options.body),cannotHaveBody=methodsWithoutBody.has(options.method)&&!(options.method==="GET"&&options.allowGetBody);if(this._cannotHaveBody=cannotHaveBody,isForm||isJSON2||isBody){if(cannotHaveBody)throw new TypeError(`The \`${options.method}\` method cannot be used with a body`);let noContentType=!dist_default2.string(headers["content-type"]);if(isBody){if(isFormData(options.body)){let encoder=new FormDataEncoder(options.body);noContentType&&(headers["content-type"]=encoder.headers["Content-Type"]),"Content-Length"in encoder.headers&&(headers["content-length"]=encoder.headers["Content-Length"]),options.body=encoder.encode();}isFormData2(options.body)&&noContentType&&(headers["content-type"]=`multipart/form-data; boundary=${options.body.getBoundary()}`);}else if(isForm){noContentType&&(headers["content-type"]="application/x-www-form-urlencoded");let{form}=options;options.form=void 0,options.body=new URLSearchParams$1(form).toString();}else {noContentType&&(headers["content-type"]="application/json");let{json}=options;options.json=void 0,options.body=options.stringifyJson(json);}let uploadBodySize=await getBodySize(options.body,options.headers);dist_default2.undefined(headers["content-length"])&&dist_default2.undefined(headers["transfer-encoding"])&&!cannotHaveBody&&!dist_default2.undefined(uploadBodySize)&&(headers["content-length"]=String(uploadBodySize));}options.responseType==="json"&&!("accept"in options.headers)&&(options.headers.accept="application/json"),this._bodySize=Number(headers["content-length"])||void 0;}async _onResponseBase(response){if(this.isAborted)return;let{options}=this,{url}=options;this._nativeResponse=response,options.decompress&&(response=(0, import_decompress_response.default)(response));let statusCode=response.statusCode,typedResponse=response;typedResponse.statusMessage=typedResponse.statusMessage?typedResponse.statusMessage:http2.STATUS_CODES[statusCode],typedResponse.url=options.url.toString(),typedResponse.requestUrl=this.requestUrl,typedResponse.redirectUrls=this.redirectUrls,typedResponse.request=this,typedResponse.isFromCache=this._nativeResponse.fromCache??!1,typedResponse.ip=this.ip,typedResponse.retryCount=this.retryCount,typedResponse.ok=isResponseOk(typedResponse),this._isFromCache=typedResponse.isFromCache,this._responseSize=Number(response.headers["content-length"])||void 0,this.response=typedResponse,response.once("end",()=>{this._responseSize=this._downloadedSize,this.emit("downloadProgress",this.downloadProgress);}),response.once("error",error=>{this._aborted=!0,response.destroy(),this._beforeError(new ReadError(error,this));}),response.once("aborted",()=>{this._aborted=!0,this._beforeError(new ReadError({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this));}),this.emit("downloadProgress",this.downloadProgress);let rawCookies=response.headers["set-cookie"];if(dist_default2.object(options.cookieJar)&&rawCookies){let promises=rawCookies.map(async rawCookie=>options.cookieJar.setCookie(rawCookie,url.toString()));options.ignoreInvalidCookies&&(promises=promises.map(async promise=>{try{await promise;}catch{}}));try{await Promise.all(promises);}catch(error){this._beforeError(error);return}}if(!this.isAborted){if(options.followRedirect&&response.headers.location&&redirectCodes.has(statusCode)){if(response.resume(),this._cancelTimeouts(),this._unproxyEvents(),this.redirectUrls.length>=options.maxRedirects){this._beforeError(new MaxRedirectsError(this));return}this._request=void 0;let updatedOptions=new Options(void 0,void 0,this.options),serverRequestedGet=statusCode===303&&updatedOptions.method!=="GET"&&updatedOptions.method!=="HEAD",canRewrite=statusCode!==307&&statusCode!==308,userRequestedGet=updatedOptions.methodRewriting&&canRewrite;(serverRequestedGet||userRequestedGet)&&(updatedOptions.method="GET",updatedOptions.body=void 0,updatedOptions.json=void 0,updatedOptions.form=void 0,delete updatedOptions.headers["content-length"]);try{let redirectBuffer=Buffer$1.from(response.headers.location,"binary").toString(),redirectUrl=new URL$1(redirectBuffer,url);if(!isUnixSocketURL(url)&&isUnixSocketURL(redirectUrl)){this._beforeError(new RequestError("Cannot redirect to UNIX socket",{},this));return}redirectUrl.hostname!==url.hostname||redirectUrl.port!==url.port?("host"in updatedOptions.headers&&delete updatedOptions.headers.host,"cookie"in updatedOptions.headers&&delete updatedOptions.headers.cookie,"authorization"in updatedOptions.headers&&delete updatedOptions.headers.authorization,(updatedOptions.username||updatedOptions.password)&&(updatedOptions.username="",updatedOptions.password="")):(redirectUrl.username=updatedOptions.username,redirectUrl.password=updatedOptions.password),this.redirectUrls.push(redirectUrl),updatedOptions.prefixUrl="",updatedOptions.url=redirectUrl;for(let hook of updatedOptions.hooks.beforeRedirect)await hook(updatedOptions,typedResponse);this.emit("redirect",updatedOptions,typedResponse),this.options=updatedOptions,await this._makeRequest();}catch(error){this._beforeError(error);return}return}if(options.isStream&&options.throwHttpErrors&&!isResponseOk(typedResponse)){this._beforeError(new HTTPError(typedResponse));return}if(response.on("readable",()=>{this._triggerRead&&this._read();}),this.on("resume",()=>{response.resume();}),this.on("pause",()=>{response.pause();}),response.once("end",()=>{this.push(null);}),this._noPipe){await this._setRawBody()&&this.emit("response",response);return}this.emit("response",response);for(let destination of this._pipedServerResponses)if(!destination.headersSent){for(let key in response.headers){let isAllowed=options.decompress?key!=="content-encoding":!0,value=response.headers[key];isAllowed&&destination.setHeader(key,value);}destination.statusCode=statusCode;}}}async _setRawBody(from=this){if(from.readableEnded)return !1;try{let rawBody=await(0,import_get_stream2.buffer)(from);if(!this.isAborted)return this.response.rawBody=rawBody,!0}catch{}return !1}async _onResponse(response){try{await this._onResponseBase(response);}catch(error){this._beforeError(error);}}_onRequest(request){let{options}=this,{timeout,url}=options;source_default(request),this.options.http2&&request.setTimeout(0),this._cancelTimeouts=timedOut(request,timeout,url);let responseEventName=options.cache?"cacheableResponse":"response";request.once(responseEventName,response=>{this._onResponse(response);}),request.once("error",error=>{this._aborted=!0,request.destroy(),error=error instanceof TimeoutError2?new TimeoutError(error,this.timings,this):new RequestError(error.message,error,this),this._beforeError(error);}),this._unproxyEvents=proxyEvents(request,this,proxiedRequestEvents),this._request=request,this.emit("uploadProgress",this.uploadProgress),this._sendBody(),this.emit("request",request);}async _asyncWrite(chunk){return new Promise((resolve3,reject)=>{super.write(chunk,error=>{if(error){reject(error);return}resolve3();});})}_sendBody(){let{body}=this.options,currentRequest=this.redirectUrls.length===0?this:this._request??this;dist_default2.nodeStream(body)?body.pipe(currentRequest):dist_default2.generator(body)||dist_default2.asyncGenerator(body)?(async()=>{try{for await(let chunk of body)await this._asyncWrite(chunk);super.end();}catch(error){this._beforeError(error);}})():dist_default2.undefined(body)?(this._cannotHaveBody||this._noPipe)&&currentRequest.end():(this._writeRequest(body,void 0,()=>{}),currentRequest.end());}_prepareCache(cache3){if(!cacheableStore.has(cache3)){let cacheableRequest=new dist_default22((requestOptions,handler)=>{let result=requestOptions._request(requestOptions,handler);return dist_default2.promise(result)&&(result.once=(event,handler2)=>{if(event==="error")(async()=>{try{await result;}catch(error){handler2(error);}})();else if(event==="abort")(async()=>{try{(await result).once("abort",handler2);}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${event}`);return result}),result},cache3);cacheableStore.set(cache3,cacheableRequest.request());}}async _createCacheableRequest(url,options){return new Promise((resolve3,reject)=>{Object.assign(options,urlToOptions(url));let request,cacheRequest=cacheableStore.get(options.cache)(options,async response=>{if(response._readableState.autoDestroy=!1,request){let fix=()=>{response.req&&(response.complete=response.req.res.complete);};response.prependOnceListener("end",fix),fix(),(await request).emit("cacheableResponse",response);}resolve3(response);});cacheRequest.once("error",reject),cacheRequest.once("request",async requestOrPromise=>{request=requestOrPromise,resolve3(request);});})}async _makeRequest(){let{options}=this,{headers,username,password}=options,cookieJar=options.cookieJar;for(let key in headers)if(dist_default2.undefined(headers[key]))delete headers[key];else if(dist_default2.null_(headers[key]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${key}\` header`);if(options.decompress&&dist_default2.undefined(headers["accept-encoding"])&&(headers["accept-encoding"]=supportsBrotli?"gzip, deflate, br":"gzip, deflate"),username||password){let credentials=Buffer$1.from(`${username}:${password}`).toString("base64");headers.authorization=`Basic ${credentials}`;}if(cookieJar){let cookieString=await cookieJar.getCookieString(options.url.toString());dist_default2.nonEmptyString(cookieString)&&(headers.cookie=cookieString);}options.prefixUrl="";let request;for(let hook of options.hooks.beforeRequest){let result=await hook(options);if(!dist_default2.undefined(result)){request=()=>result;break}}request||(request=options.getRequestFunction());let url=options.url;this._requestOptions=options.createNativeRequestOptions(),options.cache&&(this._requestOptions._request=request,this._requestOptions.cache=options.cache,this._requestOptions.body=options.body,this._prepareCache(options.cache));let fn=options.cache?this._createCacheableRequest:request;try{let requestOrResponse=fn(url,this._requestOptions);dist_default2.promise(requestOrResponse)&&(requestOrResponse=await requestOrResponse),dist_default2.undefined(requestOrResponse)&&(requestOrResponse=options.getFallbackRequestFunction()(url,this._requestOptions),dist_default2.promise(requestOrResponse)&&(requestOrResponse=await requestOrResponse)),is_client_request_default(requestOrResponse)?this._onRequest(requestOrResponse):this.writable?(this.once("finish",()=>{this._onResponse(requestOrResponse);}),this._sendBody()):this._onResponse(requestOrResponse);}catch(error){throw error instanceof CacheError2?new CacheError(error,this):error}}async _error(error){try{if(!(error instanceof HTTPError&&!this.options.throwHttpErrors))for(let hook of this.options.hooks.beforeError)error=await hook(error);}catch(error_){error=new RequestError(error_.message,error_,this);}this.destroy(error);}_writeRequest(chunk,encoding,callback){!this._request||this._request.destroyed||this._request.write(chunk,encoding,error=>{if(!error&&!this._request.destroyed){this._uploadedSize+=Buffer$1.byteLength(chunk,encoding);let progress=this.uploadProgress;progress.percent<1&&this.emit("uploadProgress",progress);}callback(error);});}get ip(){var _a;return (_a=this.socket)==null?void 0:_a.remoteAddress}get isAborted(){return this._aborted}get socket(){var _a;return ((_a=this._request)==null?void 0:_a.socket)??void 0}get downloadProgress(){let percent;return this._responseSize?percent=this._downloadedSize/this._responseSize:this._responseSize===this._downloadedSize?percent=1:percent=0,{percent,transferred:this._downloadedSize,total:this._responseSize}}get uploadProgress(){let percent;return this._bodySize?percent=this._uploadedSize/this._bodySize:this._bodySize===this._uploadedSize?percent=1:percent=0,{percent,transferred:this._uploadedSize,total:this._bodySize}}get timings(){var _a;return (_a=this._request)==null?void 0:_a.timings}get isFromCache(){return this._isFromCache}get reusedSocket(){var _a;return (_a=this._request)==null?void 0:_a.reusedSocket}},CancelError2=class extends RequestError{constructor(request){super("Promise was canceled",{},request),this.name="CancelError",this.code="ERR_CANCELED";}get isCanceled(){return !0}},proxiedRequestEvents2=["request","response","redirect","uploadProgress","downloadProgress"];function asPromise(firstRequest){let globalRequest,globalResponse,normalizedOptions,emitter=new EventEmitter,promise=new PCancelable((resolve3,reject,onCancel)=>{onCancel(()=>{globalRequest.destroy();}),onCancel.shouldReject=!1,onCancel(()=>{reject(new CancelError2(globalRequest));});let makeRequest=retryCount=>{var _a;onCancel(()=>{});let request=firstRequest??new Request2(void 0,void 0,normalizedOptions);request.retryCount=retryCount,request._noPipe=!0,globalRequest=request,request.once("response",async response=>{let contentEncoding=(response.headers["content-encoding"]??"").toLowerCase(),isCompressed=contentEncoding==="gzip"||contentEncoding==="deflate"||contentEncoding==="br",{options}=request;if(isCompressed&&!options.decompress)response.body=response.rawBody;else try{response.body=parseBody(response,options.responseType,options.parseJson,options.encoding);}catch(error){if(response.body=response.rawBody.toString(),isResponseOk(response)){request._beforeError(error);return}}try{let hooks=options.hooks.afterResponse;for(let[index,hook]of hooks.entries())if(response=await hook(response,async updatedOptions=>{throw options.merge(updatedOptions),options.prefixUrl="",updatedOptions.url&&(options.url=updatedOptions.url),options.hooks.afterResponse=options.hooks.afterResponse.slice(0,index),new RetryError(request)}),!(dist_default2.object(response)&&dist_default2.number(response.statusCode)&&!dist_default2.nullOrUndefined(response.body)))throw new TypeError("The `afterResponse` hook returned an invalid value")}catch(error){request._beforeError(error);return}if(globalResponse=response,!isResponseOk(response)){request._beforeError(new HTTPError(response));return}request.destroy(),resolve3(request.options.resolveBodyOnly?response.body:response);});let onError=error=>{if(promise.isCanceled)return;let{options}=request;if(error instanceof HTTPError&&!options.throwHttpErrors){let{response}=error;request.destroy(),resolve3(request.options.resolveBodyOnly?response.body:response);return}reject(error);};request.once("error",onError);let previousBody=(_a=request.options)==null?void 0:_a.body;request.once("retry",(newRetryCount,error)=>{firstRequest=void 0;let newBody=request.options.body;if(previousBody===newBody&&dist_default2.nodeStream(newBody)){error.message="Cannot retry with consumed body stream",onError(error);return}normalizedOptions=request.options,makeRequest(newRetryCount);}),proxyEvents(request,emitter,proxiedRequestEvents2),dist_default2.undefined(firstRequest)&&request.flush();};makeRequest(0);});promise.on=(event,fn)=>(emitter.on(event,fn),promise),promise.off=(event,fn)=>(emitter.off(event,fn),promise);let shortcut=responseType=>{let newPromise=(async()=>{await promise;let{options}=globalResponse.request;return parseBody(globalResponse,responseType,options.parseJson,options.encoding)})();return Object.defineProperties(newPromise,Object.getOwnPropertyDescriptors(promise)),newPromise};return promise.json=()=>{if(globalRequest.options){let{headers}=globalRequest.options;!globalRequest.writableFinished&&!("accept"in headers)&&(headers.accept="application/json");}return shortcut("json")},promise.buffer=()=>shortcut("buffer"),promise.text=()=>shortcut("text"),promise}var delay=async ms=>new Promise(resolve3=>{setTimeout(resolve3,ms);}),isGotInstance=value=>dist_default2.function_(value),aliases=["get","post","put","patch","head","delete"],create=defaults2=>{defaults2={options:new Options(void 0,void 0,defaults2.options),handlers:[...defaults2.handlers],mutableDefaults:defaults2.mutableDefaults},Object.defineProperty(defaults2,"mutableDefaults",{enumerable:!0,configurable:!1,writable:!1});let got2=(url,options,defaultOptions2=defaults2.options)=>{let request=new Request2(url,options,defaultOptions2),promise,lastHandler=normalized=>(request.options=normalized,request._noPipe=!normalized.isStream,request.flush(),normalized.isStream?request:(promise||(promise=asPromise(request)),promise)),iteration=0,iterateHandlers=newOptions=>{let result=(defaults2.handlers[iteration++]??lastHandler)(newOptions,iterateHandlers);if(dist_default2.promise(result)&&!request.options.isStream&&(promise||(promise=asPromise(request)),result!==promise)){let descriptors=Object.getOwnPropertyDescriptors(promise);for(let key in descriptors)key in result&&delete descriptors[key];Object.defineProperties(result,descriptors),result.cancel=promise.cancel;}return result};return iterateHandlers(request.options)};got2.extend=(...instancesOrOptions)=>{let options=new Options(void 0,void 0,defaults2.options),handlers=[...defaults2.handlers],mutableDefaults;for(let value of instancesOrOptions)isGotInstance(value)?(options.merge(value.defaults.options),handlers.push(...value.defaults.handlers),mutableDefaults=value.defaults.mutableDefaults):(options.merge(value),value.handlers&&handlers.push(...value.handlers),mutableDefaults=value.mutableDefaults);return create({options,handlers,mutableDefaults:!!mutableDefaults})};let paginateEach=async function*(url,options){let normalizedOptions=new Options(url,options,defaults2.options);normalizedOptions.resolveBodyOnly=!1;let{pagination}=normalizedOptions;assert.function_(pagination.transform),assert.function_(pagination.shouldContinue),assert.function_(pagination.filter),assert.function_(pagination.paginate),assert.number(pagination.countLimit),assert.number(pagination.requestLimit),assert.number(pagination.backoff);let allItems=[],{countLimit}=pagination,numberOfRequests=0;for(;numberOfRequests<pagination.requestLimit;){numberOfRequests!==0&&await delay(pagination.backoff);let response=await got2(void 0,void 0,normalizedOptions),parsed=await pagination.transform(response),currentItems=[];assert.array(parsed);for(let item of parsed)if(pagination.filter({item,currentItems,allItems})&&(!pagination.shouldContinue({item,currentItems,allItems})||(yield item,pagination.stackAllItems&&allItems.push(item),currentItems.push(item),--countLimit<=0)))return;let optionsToMerge=pagination.paginate({response,currentItems,allItems});if(optionsToMerge===!1)return;optionsToMerge===response.request.options?normalizedOptions=response.request.options:(normalizedOptions.merge(optionsToMerge),assert.any([dist_default2.urlInstance,dist_default2.undefined],optionsToMerge.url),optionsToMerge.url!==void 0&&(normalizedOptions.prefixUrl="",normalizedOptions.url=optionsToMerge.url)),numberOfRequests++;}};got2.paginate=paginateEach,got2.paginate.all=async(url,options)=>{let results=[];for await(let item of paginateEach(url,options))results.push(item);return results},got2.paginate.each=paginateEach,got2.stream=(url,options)=>got2(url,{...options,isStream:!0});for(let method of aliases)got2[method]=(url,options)=>got2(url,{...options,method}),got2.stream[method]=(url,options)=>got2(url,{...options,method,isStream:!0});return defaults2.mutableDefaults||(Object.freeze(defaults2.handlers),defaults2.options.freeze()),Object.defineProperty(got2,"defaults",{value:defaults2,writable:!1,configurable:!1,enumerable:!0}),got2},create_default=create,defaults={options:new Options,handlers:[],mutableDefaults:!1};create_default(defaults);var agentOpts={keepAlive:!0,maxSockets:20};({http:new Agent(agentOpts),https:new Agent$1(agentOpts)});__toESM(require_lib());__toESM(require_tempy());var ProjectType=(ProjectType2=>(ProjectType2.UNDETECTED="UNDETECTED",ProjectType2.UNSUPPORTED="UNSUPPORTED",ProjectType2.REACT="REACT",ProjectType2.REACT_SCRIPTS="REACT_SCRIPTS",ProjectType2.REACT_NATIVE="REACT_NATIVE",ProjectType2.REACT_PROJECT="REACT_PROJECT",ProjectType2.WEBPACK_REACT="WEBPACK_REACT",ProjectType2.NEXTJS="NEXTJS",ProjectType2.VUE="VUE",ProjectType2.VUE3="VUE3",ProjectType2.SFC_VUE="SFC_VUE",ProjectType2.ANGULAR="ANGULAR",ProjectType2.EMBER="EMBER",ProjectType2.WEB_COMPONENTS="WEB_COMPONENTS",ProjectType2.HTML="HTML",ProjectType2.QWIK="QWIK",ProjectType2.PREACT="PREACT",ProjectType2.SVELTE="SVELTE",ProjectType2.SVELTEKIT="SVELTEKIT",ProjectType2.SERVER="SERVER",ProjectType2.NX="NX",ProjectType2.SOLID="SOLID",ProjectType2))(ProjectType||{});var notInstallableProjectTypes=["UNDETECTED","UNSUPPORTED","NX"];Object.values(ProjectType).filter(type=>!notInstallableProjectTypes.includes(type)).map(type=>type.toLowerCase());var versions_default={"@storybook/addon-a11y":"7.6.19","@storybook/addon-actions":"7.6.19","@storybook/addon-backgrounds":"7.6.19","@storybook/addon-controls":"7.6.19","@storybook/addon-docs":"7.6.19","@storybook/addon-essentials":"7.6.19","@storybook/addon-highlight":"7.6.19","@storybook/addon-interactions":"7.6.19","@storybook/addon-jest":"7.6.19","@storybook/addon-links":"7.6.19","@storybook/addon-mdx-gfm":"7.6.19","@storybook/addon-measure":"7.6.19","@storybook/addon-outline":"7.6.19","@storybook/addon-themes":"7.6.19","@storybook/addon-storyshots":"7.6.19","@storybook/addon-storyshots-puppeteer":"7.6.19","@storybook/addon-storysource":"7.6.19","@storybook/addon-toolbars":"7.6.19","@storybook/addon-viewport":"7.6.19","@storybook/addons":"7.6.19","@storybook/angular":"7.6.19","@storybook/api":"7.6.19","@storybook/blocks":"7.6.19","@storybook/builder-manager":"7.6.19","@storybook/builder-vite":"7.6.19","@storybook/builder-webpack5":"7.6.19","@storybook/channel-postmessage":"7.6.19","@storybook/channel-websocket":"7.6.19","@storybook/channels":"7.6.19","@storybook/cli":"7.6.19","@storybook/client-api":"7.6.19","@storybook/client-logger":"7.6.19","@storybook/codemod":"7.6.19","@storybook/components":"7.6.19","@storybook/core-client":"7.6.19","@storybook/core-common":"7.6.19","@storybook/core-events":"7.6.19","@storybook/core-server":"7.6.19","@storybook/core-webpack":"7.6.19","@storybook/csf-plugin":"7.6.19","@storybook/csf-tools":"7.6.19","@storybook/docs-tools":"7.6.19","@storybook/ember":"7.6.19","@storybook/html":"7.6.19","@storybook/html-vite":"7.6.19","@storybook/html-webpack5":"7.6.19","@storybook/instrumenter":"7.6.19","@storybook/manager":"7.6.19","@storybook/manager-api":"7.6.19","@storybook/nextjs":"7.6.19","@storybook/node-logger":"7.6.19","@storybook/postinstall":"7.6.19","@storybook/preact":"7.6.19","@storybook/preact-vite":"7.6.19","@storybook/preact-webpack5":"7.6.19","@storybook/preset-create-react-app":"7.6.19","@storybook/preset-html-webpack":"7.6.19","@storybook/preset-preact-webpack":"7.6.19","@storybook/preset-react-webpack":"7.6.19","@storybook/preset-server-webpack":"7.6.19","@storybook/preset-svelte-webpack":"7.6.19","@storybook/preset-vue-webpack":"7.6.19","@storybook/preset-vue3-webpack":"7.6.19","@storybook/preset-web-components-webpack":"7.6.19","@storybook/preview":"7.6.19","@storybook/preview-api":"7.6.19","@storybook/preview-web":"7.6.19","@storybook/react":"7.6.19","@storybook/react-dom-shim":"7.6.19","@storybook/react-vite":"7.6.19","@storybook/react-webpack5":"7.6.19","@storybook/router":"7.6.19","@storybook/server":"7.6.19","@storybook/server-webpack5":"7.6.19","@storybook/source-loader":"7.6.19","@storybook/store":"7.6.19","@storybook/svelte":"7.6.19","@storybook/svelte-vite":"7.6.19","@storybook/svelte-webpack5":"7.6.19","@storybook/sveltekit":"7.6.19","@storybook/telemetry":"7.6.19","@storybook/theming":"7.6.19","@storybook/types":"7.6.19","@storybook/test":"7.6.19","@storybook/vue":"7.6.19","@storybook/vue-vite":"7.6.19","@storybook/vue-webpack5":"7.6.19","@storybook/vue3":"7.6.19","@storybook/vue3-vite":"7.6.19","@storybook/vue3-webpack5":"7.6.19","@storybook/web-components":"7.6.19","@storybook/web-components-vite":"7.6.19","@storybook/web-components-webpack5":"7.6.19",sb:"7.6.19",storybook:"7.6.19"};var logger11=console;var commandLog=message=>(process.stdout.write(chalk7.cyan(" \u2022 ")+message),(errorMessage,errorInfo)=>{if(errorMessage){if(process.stdout.write(`. ${chalk7.red("\u2716")}
131
+ `),_FormDataEncoder_CRLF_BYTES.set(this,void 0),_FormDataEncoder_CRLF_BYTES_LENGTH.set(this,void 0),_FormDataEncoder_DASHES.set(this,"-".repeat(2)),_FormDataEncoder_encoder.set(this,new TextEncoder),_FormDataEncoder_footer.set(this,void 0),_FormDataEncoder_form.set(this,void 0),_FormDataEncoder_options.set(this,void 0),!isFormData(form))throw new TypeError("Expected first argument to be a FormData instance.");let boundary;if(isPlainObject(boundaryOrOptions)?options=boundaryOrOptions:boundary=boundaryOrOptions,boundary||(boundary=createBoundary()),typeof boundary!="string")throw new TypeError("Expected boundary argument to be a string.");if(options&&!isPlainObject(options))throw new TypeError("Expected options argument to be an object.");__classPrivateFieldSet(this,_FormDataEncoder_form,Array.from(form.entries()),"f"),__classPrivateFieldSet(this,_FormDataEncoder_options,{...defaultOptions,...options},"f"),__classPrivateFieldSet(this,_FormDataEncoder_CRLF_BYTES,__classPrivateFieldGet(this,_FormDataEncoder_encoder,"f").encode(__classPrivateFieldGet(this,_FormDataEncoder_CRLF,"f")),"f"),__classPrivateFieldSet(this,_FormDataEncoder_CRLF_BYTES_LENGTH,__classPrivateFieldGet(this,_FormDataEncoder_CRLF_BYTES,"f").byteLength,"f"),this.boundary=`form-data-boundary-${boundary}`,this.contentType=`multipart/form-data; boundary=${this.boundary}`,__classPrivateFieldSet(this,_FormDataEncoder_footer,__classPrivateFieldGet(this,_FormDataEncoder_encoder,"f").encode(`${__classPrivateFieldGet(this,_FormDataEncoder_DASHES,"f")}${this.boundary}${__classPrivateFieldGet(this,_FormDataEncoder_DASHES,"f")}${__classPrivateFieldGet(this,_FormDataEncoder_CRLF,"f").repeat(2)}`),"f");let headers={"Content-Type":this.contentType},contentLength=__classPrivateFieldGet(this,_FormDataEncoder_instances,"m",_FormDataEncoder_getContentLength).call(this);contentLength&&(this.contentLength=contentLength,headers["Content-Length"]=contentLength),this.headers=proxyHeaders(Object.freeze(headers)),Object.defineProperties(this,{boundary:readonlyProp,contentType:readonlyProp,contentLength:readonlyProp,headers:readonlyProp});}getContentLength(){return this.contentLength==null?void 0:Number(this.contentLength)}*values(){for(let[name,raw]of __classPrivateFieldGet(this,_FormDataEncoder_form,"f")){let value=isFile(raw)?raw:__classPrivateFieldGet(this,_FormDataEncoder_encoder,"f").encode(normalizeValue(raw));yield __classPrivateFieldGet(this,_FormDataEncoder_instances,"m",_FormDataEncoder_getFieldHeader).call(this,name,value),yield value,yield __classPrivateFieldGet(this,_FormDataEncoder_CRLF_BYTES,"f");}yield __classPrivateFieldGet(this,_FormDataEncoder_footer,"f");}async*encode(){for(let part of this.values())isFile(part)?yield*getStreamIterator(part.stream()):yield part;}[(_FormDataEncoder_CRLF=new WeakMap,_FormDataEncoder_CRLF_BYTES=new WeakMap,_FormDataEncoder_CRLF_BYTES_LENGTH=new WeakMap,_FormDataEncoder_DASHES=new WeakMap,_FormDataEncoder_encoder=new WeakMap,_FormDataEncoder_footer=new WeakMap,_FormDataEncoder_form=new WeakMap,_FormDataEncoder_options=new WeakMap,_FormDataEncoder_instances=new WeakSet,_FormDataEncoder_getFieldHeader=function(name,value){let header="";header+=`${__classPrivateFieldGet(this,_FormDataEncoder_DASHES,"f")}${this.boundary}${__classPrivateFieldGet(this,_FormDataEncoder_CRLF,"f")}`,header+=`Content-Disposition: form-data; name="${escapeName(name)}"`,isFile(value)&&(header+=`; filename="${escapeName(value.name)}"${__classPrivateFieldGet(this,_FormDataEncoder_CRLF,"f")}`,header+=`Content-Type: ${value.type||"application/octet-stream"}`);let size=isFile(value)?value.size:value.byteLength;return __classPrivateFieldGet(this,_FormDataEncoder_options,"f").enableAdditionalHeaders===!0&&size!=null&&!isNaN(size)&&(header+=`${__classPrivateFieldGet(this,_FormDataEncoder_CRLF,"f")}Content-Length: ${isFile(value)?value.size:value.byteLength}`),__classPrivateFieldGet(this,_FormDataEncoder_encoder,"f").encode(`${header}${__classPrivateFieldGet(this,_FormDataEncoder_CRLF,"f").repeat(2)}`)},_FormDataEncoder_getContentLength=function(){let length=0;for(let[name,raw]of __classPrivateFieldGet(this,_FormDataEncoder_form,"f")){let value=isFile(raw)?raw:__classPrivateFieldGet(this,_FormDataEncoder_encoder,"f").encode(normalizeValue(raw)),size=isFile(value)?value.size:value.byteLength;if(size==null||isNaN(size))return;length+=__classPrivateFieldGet(this,_FormDataEncoder_instances,"m",_FormDataEncoder_getFieldHeader).call(this,name,value).byteLength,length+=size,length+=__classPrivateFieldGet(this,_FormDataEncoder_CRLF_BYTES_LENGTH,"f");}return String(length+__classPrivateFieldGet(this,_FormDataEncoder_footer,"f").byteLength)},Symbol.iterator)](){return this.values()}[Symbol.asyncIterator](){return this.encode()}};function isFormData2(body){return dist_default2.nodeStream(body)&&dist_default2.function_(body.getBoundary)}async function getBodySize(body,headers){if(headers&&"content-length"in headers)return Number(headers["content-length"]);if(!body)return 0;if(dist_default2.string(body))return Buffer$1.byteLength(body);if(dist_default2.buffer(body))return body.length;if(isFormData2(body))return promisify(body.getLength.bind(body))()}function proxyEvents(from,to,events){let eventFunctions={};for(let event of events){let eventFunction=(...args)=>{to.emit(event,...args);};eventFunctions[event]=eventFunction,from.on(event,eventFunction);}return ()=>{for(let[event,eventFunction]of Object.entries(eventFunctions))from.off(event,eventFunction);}}function unhandle(){let handlers=[];return {once(origin,event,fn){origin.once(event,fn),handlers.push({origin,event,fn});},unhandleAll(){for(let handler of handlers){let{origin,event,fn}=handler;origin.removeListener(event,fn);}handlers.length=0;}}}var reentry=Symbol("reentry"),noop=()=>{},TimeoutError2=class extends Error{constructor(threshold,event){super(`Timeout awaiting '${event}' for ${threshold}ms`),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:event}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.code="ETIMEDOUT";}};function timedOut(request,delays,options){if(reentry in request)return noop;request[reentry]=!0;let cancelers=[],{once:once2,unhandleAll}=unhandle(),addTimeout=(delay2,callback,event)=>{var _a;let timeout=setTimeout(callback,delay2,delay2,event);(_a=timeout.unref)==null||_a.call(timeout);let cancel=()=>{clearTimeout(timeout);};return cancelers.push(cancel),cancel},{host,hostname}=options,timeoutHandler=(delay2,event)=>{request.destroy(new TimeoutError2(delay2,event));},cancelTimeouts=()=>{for(let cancel of cancelers)cancel();unhandleAll();};if(request.once("error",error=>{if(cancelTimeouts(),request.listenerCount("error")===0)throw error}),typeof delays.request<"u"){let cancelTimeout=addTimeout(delays.request,timeoutHandler,"request");once2(request,"response",response=>{once2(response,"end",cancelTimeout);});}if(typeof delays.socket<"u"){let{socket}=delays,socketTimeoutHandler=()=>{timeoutHandler(socket,"socket");};request.setTimeout(socket,socketTimeoutHandler),cancelers.push(()=>{request.removeListener("timeout",socketTimeoutHandler);});}let hasLookup=typeof delays.lookup<"u",hasConnect=typeof delays.connect<"u",hasSecureConnect=typeof delays.secureConnect<"u",hasSend=typeof delays.send<"u";return (hasLookup||hasConnect||hasSecureConnect||hasSend)&&once2(request,"socket",socket=>{let{socketPath}=request;if(socket.connecting){let hasPath=!!(socketPath??net.isIP(hostname??host??"")!==0);if(hasLookup&&!hasPath&&typeof socket.address().address>"u"){let cancelTimeout=addTimeout(delays.lookup,timeoutHandler,"lookup");once2(socket,"lookup",cancelTimeout);}if(hasConnect){let timeConnect=()=>addTimeout(delays.connect,timeoutHandler,"connect");hasPath?once2(socket,"connect",timeConnect()):once2(socket,"lookup",error=>{error===null&&once2(socket,"connect",timeConnect());});}hasSecureConnect&&options.protocol==="https:"&&once2(socket,"connect",()=>{let cancelTimeout=addTimeout(delays.secureConnect,timeoutHandler,"secureConnect");once2(socket,"secureConnect",cancelTimeout);});}if(hasSend){let timeRequest=()=>addTimeout(delays.send,timeoutHandler,"send");socket.connecting?once2(socket,"connect",()=>{once2(request,"upload-complete",timeRequest());}):once2(request,"upload-complete",timeRequest());}}),typeof delays.response<"u"&&once2(request,"upload-complete",()=>{let cancelTimeout=addTimeout(delays.response,timeoutHandler,"response");once2(request,"response",cancelTimeout);}),typeof delays.read<"u"&&once2(request,"response",response=>{let cancelTimeout=addTimeout(delays.read,timeoutHandler,"read");once2(response,"end",cancelTimeout);}),cancelTimeouts}function urlToOptions(url){url=url;let options={protocol:url.protocol,hostname:dist_default2.string(url.hostname)&&url.hostname.startsWith("[")?url.hostname.slice(1,-1):url.hostname,host:url.host,hash:url.hash,search:url.search,pathname:url.pathname,href:url.href,path:`${url.pathname||""}${url.search||""}`};return dist_default2.string(url.port)&&url.port.length>0&&(options.port=Number(url.port)),(url.username||url.password)&&(options.auth=`${url.username||""}:${url.password||""}`),options}var WeakableMap=class{constructor(){Object.defineProperty(this,"weakMap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"map",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.weakMap=new WeakMap,this.map=new Map;}set(key,value){typeof key=="object"?this.weakMap.set(key,value):this.map.set(key,value);}get(key){return typeof key=="object"?this.weakMap.get(key):this.map.get(key)}has(key){return typeof key=="object"?this.weakMap.has(key):this.map.has(key)}},calculateRetryDelay=({attemptCount,retryOptions,error,retryAfter,computedValue})=>{if(error.name==="RetryError")return 1;if(attemptCount>retryOptions.limit)return 0;let hasMethod=retryOptions.methods.includes(error.options.method),hasErrorCode=retryOptions.errorCodes.includes(error.code),hasStatusCode=error.response&&retryOptions.statusCodes.includes(error.response.statusCode);if(!hasMethod||!hasErrorCode&&!hasStatusCode)return 0;if(error.response){if(retryAfter)return retryAfter>computedValue?0:retryAfter;if(error.response.statusCode===413)return 0}let noise=Math.random()*retryOptions.noise;return Math.min(2**(attemptCount-1)*1e3,retryOptions.backoffLimit)+noise},calculate_retry_delay_default=calculateRetryDelay,{Resolver:AsyncResolver}=promises,kCacheableLookupCreateConnection=Symbol("cacheableLookupCreateConnection"),kCacheableLookupInstance=Symbol("cacheableLookupInstance"),kExpires=Symbol("expires"),supportsALL=typeof ALL=="number",verifyAgent=agent2=>{if(!(agent2&&typeof agent2.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},map4to6=entries2=>{for(let entry of entries2)entry.family!==6&&(entry.address=`::ffff:${entry.address}`,entry.family=6);},getIfaceInfo=()=>{let has4=!1,has6=!1;for(let device of Object.values(os.networkInterfaces()))for(let iface of device)if(!iface.internal&&(iface.family==="IPv6"?has6=!0:has4=!0,has4&&has6))return {has4,has6};return {has4,has6}},isIterable=map=>Symbol.iterator in map,ignoreNoResultErrors=dnsPromise=>dnsPromise.catch(error=>{if(error.code==="ENODATA"||error.code==="ENOTFOUND"||error.code==="ENOENT")return [];throw error}),ttl={ttl:!0},all={all:!0},all4={all:!0,family:4},all6={all:!0,family:6},CacheableLookup=class{constructor({cache:cache3=new Map,maxTtl=1/0,fallbackDuration=3600,errorTtl=.15,resolver=new AsyncResolver,lookup: lookup$1=lookup}={}){if(this.maxTtl=maxTtl,this.errorTtl=errorTtl,this._cache=cache3,this._resolver=resolver,this._dnsLookup=lookup$1&&promisify(lookup$1),this.stats={cache:0,query:0},this._resolver instanceof AsyncResolver?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=promisify(this._resolver.resolve4.bind(this._resolver)),this._resolve6=promisify(this._resolver.resolve6.bind(this._resolver))),this._iface=getIfaceInfo(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,this.fallbackDuration=fallbackDuration,fallbackDuration>0){let interval=setInterval(()=>{this._hostnamesToFallback.clear();},fallbackDuration*1e3);interval.unref&&interval.unref(),this._fallbackInterval=interval;}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this);}set servers(servers){this.clear(),this._resolver.setServers(servers);}get servers(){return this._resolver.getServers()}lookup(hostname,options,callback){if(typeof options=="function"?(callback=options,options={}):typeof options=="number"&&(options={family:options}),!callback)throw new Error("Callback must be a function.");this.lookupAsync(hostname,options).then(result=>{options.all?callback(null,result):callback(null,result.address,result.family,result.expires,result.ttl,result.source);},callback);}async lookupAsync(hostname,options={}){typeof options=="number"&&(options={family:options});let cached=await this.query(hostname);if(options.family===6){let filtered=cached.filter(entry=>entry.family===6);options.hints&V4MAPPED&&(supportsALL&&options.hints&ALL||filtered.length===0)?map4to6(cached):cached=filtered;}else options.family===4&&(cached=cached.filter(entry=>entry.family===4));if(options.hints&ADDRCONFIG){let{_iface}=this;cached=cached.filter(entry=>entry.family===6?_iface.has6:_iface.has4);}if(cached.length===0){let error=new Error(`cacheableLookup ENOTFOUND ${hostname}`);throw error.code="ENOTFOUND",error.hostname=hostname,error}return options.all?cached:cached[0]}async query(hostname){let source="cache",cached=await this._cache.get(hostname);if(cached&&this.stats.cache++,!cached){let pending=this._pending[hostname];if(pending)this.stats.cache++,cached=await pending;else {source="query";let newPromise=this.queryAndCache(hostname);this._pending[hostname]=newPromise,this.stats.query++;try{cached=await newPromise;}finally{delete this._pending[hostname];}}}return cached=cached.map(entry=>({...entry,source})),cached}async _resolve(hostname){let[A,AAAA]=await Promise.all([ignoreNoResultErrors(this._resolve4(hostname,ttl)),ignoreNoResultErrors(this._resolve6(hostname,ttl))]),aTtl=0,aaaaTtl=0,cacheTtl=0,now=Date.now();for(let entry of A)entry.family=4,entry.expires=now+entry.ttl*1e3,aTtl=Math.max(aTtl,entry.ttl);for(let entry of AAAA)entry.family=6,entry.expires=now+entry.ttl*1e3,aaaaTtl=Math.max(aaaaTtl,entry.ttl);return A.length>0?AAAA.length>0?cacheTtl=Math.min(aTtl,aaaaTtl):cacheTtl=aTtl:cacheTtl=aaaaTtl,{entries:[...A,...AAAA],cacheTtl}}async _lookup(hostname){try{let[A,AAAA]=await Promise.all([ignoreNoResultErrors(this._dnsLookup(hostname,all4)),ignoreNoResultErrors(this._dnsLookup(hostname,all6))]);return {entries:[...A,...AAAA],cacheTtl:0}}catch{return {entries:[],cacheTtl:0}}}async _set(hostname,data,cacheTtl){if(this.maxTtl>0&&cacheTtl>0){cacheTtl=Math.min(cacheTtl,this.maxTtl)*1e3,data[kExpires]=Date.now()+cacheTtl;try{await this._cache.set(hostname,data,cacheTtl);}catch(error){this.lookupAsync=async()=>{let cacheError=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw cacheError.cause=error,cacheError};}isIterable(this._cache)&&this._tick(cacheTtl);}}async queryAndCache(hostname){if(this._hostnamesToFallback.has(hostname))return this._dnsLookup(hostname,all);let query=await this._resolve(hostname);query.entries.length===0&&this._dnsLookup&&(query=await this._lookup(hostname),query.entries.length!==0&&this.fallbackDuration>0&&this._hostnamesToFallback.add(hostname));let cacheTtl=query.entries.length===0?this.errorTtl:query.cacheTtl;return await this._set(hostname,query.entries,cacheTtl),query.entries}_tick(ms){let nextRemovalTime=this._nextRemovalTime;(!nextRemovalTime||ms<nextRemovalTime)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=ms,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let nextExpiry=1/0,now=Date.now();for(let[hostname,entries2]of this._cache){let expires=entries2[kExpires];now>=expires?this._cache.delete(hostname):expires<nextExpiry&&(nextExpiry=expires);}nextExpiry!==1/0&&this._tick(nextExpiry-now);},ms),this._removalTimeout.unref&&this._removalTimeout.unref());}install(agent2){if(verifyAgent(agent2),kCacheableLookupCreateConnection in agent2)throw new Error("CacheableLookup has been already installed");agent2[kCacheableLookupCreateConnection]=agent2.createConnection,agent2[kCacheableLookupInstance]=this,agent2.createConnection=(options,callback)=>("lookup"in options||(options.lookup=this.lookup),agent2[kCacheableLookupCreateConnection](options,callback));}uninstall(agent2){if(verifyAgent(agent2),agent2[kCacheableLookupCreateConnection]){if(agent2[kCacheableLookupInstance]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");agent2.createConnection=agent2[kCacheableLookupCreateConnection],delete agent2[kCacheableLookupCreateConnection],delete agent2[kCacheableLookupInstance];}}updateInterfaceInfo(){let{_iface}=this;this._iface=getIfaceInfo(),(_iface.has4&&!this._iface.has4||_iface.has6&&!this._iface.has6)&&this._cache.clear();}clear(hostname){if(hostname){this._cache.delete(hostname);return}this._cache.clear();}},import_http2_wrapper=__toESM2(require_source2(),1);function parseLinkHeader(link){let parsed=[],items=link.split(",");for(let item of items){let[rawUriReference,...rawLinkParameters]=item.split(";"),trimmedUriReference=rawUriReference.trim();if(trimmedUriReference[0]!=="<"||trimmedUriReference[trimmedUriReference.length-1]!==">")throw new Error(`Invalid format of the Link header reference: ${trimmedUriReference}`);let reference=trimmedUriReference.slice(1,-1),parameters={};if(rawLinkParameters.length===0)throw new Error(`Unexpected end of Link header parameters: ${rawLinkParameters.join(";")}`);for(let rawParameter of rawLinkParameters){let trimmedRawParameter=rawParameter.trim(),center=trimmedRawParameter.indexOf("=");if(center===-1)throw new Error(`Failed to parse Link header: ${link}`);let name=trimmedRawParameter.slice(0,center).trim(),value=trimmedRawParameter.slice(center+1).trim();parameters[name]=value;}parsed.push({reference,parameters});}return parsed}var[major,minor]=process3.versions.node.split(".").map(Number);function validateSearchParameters(searchParameters){for(let key in searchParameters){let value=searchParameters[key];assert.any([dist_default2.string,dist_default2.number,dist_default2.boolean,dist_default2.null_,dist_default2.undefined],value);}}var globalCache=new Map,globalDnsCache,getGlobalDnsCache=()=>globalDnsCache||(globalDnsCache=new CacheableLookup,globalDnsCache),defaultInternals={request:void 0,agent:{http:void 0,https:void 0,http2:void 0},h2session:void 0,decompress:!0,timeout:{connect:void 0,lookup:void 0,read:void 0,request:void 0,response:void 0,secureConnect:void 0,send:void 0,socket:void 0},prefixUrl:"",body:void 0,form:void 0,json:void 0,cookieJar:void 0,ignoreInvalidCookies:!1,searchParams:void 0,dnsLookup:void 0,dnsCache:void 0,context:{},hooks:{init:[],beforeRequest:[],beforeError:[],beforeRedirect:[],beforeRetry:[],afterResponse:[]},followRedirect:!0,maxRedirects:10,cache:void 0,throwHttpErrors:!0,username:"",password:"",http2:!1,allowGetBody:!1,headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},methodRewriting:!1,dnsLookupIpVersion:void 0,parseJson:JSON.parse,stringifyJson:JSON.stringify,retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue})=>computedValue,backoffLimit:Number.POSITIVE_INFINITY,noise:100},localAddress:void 0,method:"GET",createConnection:void 0,cacheOptions:{shared:void 0,cacheHeuristic:void 0,immutableMinTimeToLive:void 0,ignoreCargoCult:void 0},https:{alpnProtocols:void 0,rejectUnauthorized:void 0,checkServerIdentity:void 0,certificateAuthority:void 0,key:void 0,certificate:void 0,passphrase:void 0,pfx:void 0,ciphers:void 0,honorCipherOrder:void 0,minVersion:void 0,maxVersion:void 0,signatureAlgorithms:void 0,tlsSessionLifetime:void 0,dhparam:void 0,ecdhCurve:void 0,certificateRevocationLists:void 0},encoding:void 0,resolveBodyOnly:!1,isStream:!1,responseType:"text",url:void 0,pagination:{transform(response){return response.request.options.responseType==="json"?response.body:JSON.parse(response.body)},paginate({response}){let rawLinkHeader=response.headers.link;if(typeof rawLinkHeader!="string"||rawLinkHeader.trim()==="")return !1;let next=parseLinkHeader(rawLinkHeader).find(entry=>entry.parameters.rel==="next"||entry.parameters.rel==='"next"');return next?{url:new URL$1(next.reference,response.url)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:Number.POSITIVE_INFINITY,backoff:0,requestLimit:1e4,stackAllItems:!1},setHost:!0,maxHeaderSize:void 0,signal:void 0,enableUnixSockets:!0},cloneInternals=internals=>{let{hooks,retry}=internals,result={...internals,context:{...internals.context},cacheOptions:{...internals.cacheOptions},https:{...internals.https},agent:{...internals.agent},headers:{...internals.headers},retry:{...retry,errorCodes:[...retry.errorCodes],methods:[...retry.methods],statusCodes:[...retry.statusCodes]},timeout:{...internals.timeout},hooks:{init:[...hooks.init],beforeRequest:[...hooks.beforeRequest],beforeError:[...hooks.beforeError],beforeRedirect:[...hooks.beforeRedirect],beforeRetry:[...hooks.beforeRetry],afterResponse:[...hooks.afterResponse]},searchParams:internals.searchParams?new URLSearchParams$1(internals.searchParams):void 0,pagination:{...internals.pagination}};return result.url!==void 0&&(result.prefixUrl=""),result},cloneRaw=raw=>{let{hooks,retry}=raw,result={...raw};return dist_default2.object(raw.context)&&(result.context={...raw.context}),dist_default2.object(raw.cacheOptions)&&(result.cacheOptions={...raw.cacheOptions}),dist_default2.object(raw.https)&&(result.https={...raw.https}),dist_default2.object(raw.cacheOptions)&&(result.cacheOptions={...result.cacheOptions}),dist_default2.object(raw.agent)&&(result.agent={...raw.agent}),dist_default2.object(raw.headers)&&(result.headers={...raw.headers}),dist_default2.object(retry)&&(result.retry={...retry},dist_default2.array(retry.errorCodes)&&(result.retry.errorCodes=[...retry.errorCodes]),dist_default2.array(retry.methods)&&(result.retry.methods=[...retry.methods]),dist_default2.array(retry.statusCodes)&&(result.retry.statusCodes=[...retry.statusCodes])),dist_default2.object(raw.timeout)&&(result.timeout={...raw.timeout}),dist_default2.object(hooks)&&(result.hooks={...hooks},dist_default2.array(hooks.init)&&(result.hooks.init=[...hooks.init]),dist_default2.array(hooks.beforeRequest)&&(result.hooks.beforeRequest=[...hooks.beforeRequest]),dist_default2.array(hooks.beforeError)&&(result.hooks.beforeError=[...hooks.beforeError]),dist_default2.array(hooks.beforeRedirect)&&(result.hooks.beforeRedirect=[...hooks.beforeRedirect]),dist_default2.array(hooks.beforeRetry)&&(result.hooks.beforeRetry=[...hooks.beforeRetry]),dist_default2.array(hooks.afterResponse)&&(result.hooks.afterResponse=[...hooks.afterResponse])),dist_default2.object(raw.pagination)&&(result.pagination={...raw.pagination}),result},getHttp2TimeoutOption=internals=>{let delays=[internals.timeout.socket,internals.timeout.connect,internals.timeout.lookup,internals.timeout.request,internals.timeout.secureConnect].filter(delay2=>typeof delay2=="number");if(delays.length>0)return Math.min(...delays)},init=(options,withOptions,self2)=>{var _a;let initHooks=(_a=options.hooks)==null?void 0:_a.init;if(initHooks)for(let hook of initHooks)hook(withOptions,self2);},Options=class{constructor(input,options,defaults2){if(Object.defineProperty(this,"_unixOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_internals",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_merging",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_init",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),assert.any([dist_default2.string,dist_default2.urlInstance,dist_default2.object,dist_default2.undefined],input),assert.any([dist_default2.object,dist_default2.undefined],options),assert.any([dist_default2.object,dist_default2.undefined],defaults2),input instanceof Options||options instanceof Options)throw new TypeError("The defaults must be passed as the third argument");this._internals=cloneInternals(defaults2?._internals??defaults2??defaultInternals),this._init=[...defaults2?._init??[]],this._merging=!1,this._unixOptions=void 0;try{if(dist_default2.plainObject(input))try{this.merge(input),this.merge(options);}finally{this.url=input.url;}else try{this.merge(options);}finally{if(options?.url!==void 0)if(input===void 0)this.url=options.url;else throw new TypeError("The `url` option is mutually exclusive with the `input` argument");else input!==void 0&&(this.url=input);}}catch(error){throw error.options=this,error}}merge(options){if(options){if(options instanceof Options){for(let init2 of options._init)this.merge(init2);return}options=cloneRaw(options),init(this,options,this),init(options,options,this),this._merging=!0,"isStream"in options&&(this.isStream=options.isStream);try{let push=!1;for(let key in options)if(!(key==="mutableDefaults"||key==="handlers")&&key!=="url"){if(!(key in this))throw new Error(`Unexpected option: ${key}`);this[key]=options[key],push=!0;}push&&this._init.push(options);}finally{this._merging=!1;}}}get request(){return this._internals.request}set request(value){assert.any([dist_default2.function_,dist_default2.undefined],value),this._internals.request=value;}get agent(){return this._internals.agent}set agent(value){assert.plainObject(value);for(let key in value){if(!(key in this._internals.agent))throw new TypeError(`Unexpected agent option: ${key}`);assert.any([dist_default2.object,dist_default2.undefined],value[key]);}this._merging?Object.assign(this._internals.agent,value):this._internals.agent={...value};}get h2session(){return this._internals.h2session}set h2session(value){this._internals.h2session=value;}get decompress(){return this._internals.decompress}set decompress(value){assert.boolean(value),this._internals.decompress=value;}get timeout(){return this._internals.timeout}set timeout(value){assert.plainObject(value);for(let key in value){if(!(key in this._internals.timeout))throw new Error(`Unexpected timeout option: ${key}`);assert.any([dist_default2.number,dist_default2.undefined],value[key]);}this._merging?Object.assign(this._internals.timeout,value):this._internals.timeout={...value};}get prefixUrl(){return this._internals.prefixUrl}set prefixUrl(value){if(assert.any([dist_default2.string,dist_default2.urlInstance],value),value===""){this._internals.prefixUrl="";return}if(value=value.toString(),value.endsWith("/")||(value+="/"),this._internals.prefixUrl&&this._internals.url){let{href}=this._internals.url;this._internals.url.href=value+href.slice(this._internals.prefixUrl.length);}this._internals.prefixUrl=value;}get body(){return this._internals.body}set body(value){assert.any([dist_default2.string,dist_default2.buffer,dist_default2.nodeStream,dist_default2.generator,dist_default2.asyncGenerator,isFormData,dist_default2.undefined],value),dist_default2.nodeStream(value)&&assert.truthy(value.readable),value!==void 0&&(assert.undefined(this._internals.form),assert.undefined(this._internals.json)),this._internals.body=value;}get form(){return this._internals.form}set form(value){assert.any([dist_default2.plainObject,dist_default2.undefined],value),value!==void 0&&(assert.undefined(this._internals.body),assert.undefined(this._internals.json)),this._internals.form=value;}get json(){return this._internals.json}set json(value){value!==void 0&&(assert.undefined(this._internals.body),assert.undefined(this._internals.form)),this._internals.json=value;}get url(){return this._internals.url}set url(value){if(assert.any([dist_default2.string,dist_default2.urlInstance,dist_default2.undefined],value),value===void 0){this._internals.url=void 0;return}if(dist_default2.string(value)&&value.startsWith("/"))throw new Error("`url` must not start with a slash");let urlString=`${this.prefixUrl}${value.toString()}`,url=new URL$1(urlString);if(this._internals.url=url,url.protocol==="unix:"&&(url.href=`http://unix${url.pathname}${url.search}`),url.protocol!=="http:"&&url.protocol!=="https:"){let error=new Error(`Unsupported protocol: ${url.protocol}`);throw error.code="ERR_UNSUPPORTED_PROTOCOL",error}if(this._internals.username&&(url.username=this._internals.username,this._internals.username=""),this._internals.password&&(url.password=this._internals.password,this._internals.password=""),this._internals.searchParams&&(url.search=this._internals.searchParams.toString(),this._internals.searchParams=void 0),url.hostname==="unix"){if(!this._internals.enableUnixSockets)throw new Error("Using UNIX domain sockets but option `enableUnixSockets` is not enabled");let matches=/(?<socketPath>.+?):(?<path>.+)/.exec(`${url.pathname}${url.search}`);if(matches?.groups){let{socketPath,path:path13}=matches.groups;this._unixOptions={socketPath,path:path13,host:""};}else this._unixOptions=void 0;return}this._unixOptions=void 0;}get cookieJar(){return this._internals.cookieJar}set cookieJar(value){if(assert.any([dist_default2.object,dist_default2.undefined],value),value===void 0){this._internals.cookieJar=void 0;return}let{setCookie,getCookieString}=value;assert.function_(setCookie),assert.function_(getCookieString),setCookie.length===4&&getCookieString.length===0?(setCookie=promisify(setCookie.bind(value)),getCookieString=promisify(getCookieString.bind(value)),this._internals.cookieJar={setCookie,getCookieString}):this._internals.cookieJar=value;}get signal(){return this._internals.signal}set signal(value){assert.object(value),this._internals.signal=value;}get ignoreInvalidCookies(){return this._internals.ignoreInvalidCookies}set ignoreInvalidCookies(value){assert.boolean(value),this._internals.ignoreInvalidCookies=value;}get searchParams(){return this._internals.url?this._internals.url.searchParams:(this._internals.searchParams===void 0&&(this._internals.searchParams=new URLSearchParams$1),this._internals.searchParams)}set searchParams(value){assert.any([dist_default2.string,dist_default2.object,dist_default2.undefined],value);let url=this._internals.url;if(value===void 0){this._internals.searchParams=void 0,url&&(url.search="");return}let searchParameters=this.searchParams,updated;if(dist_default2.string(value))updated=new URLSearchParams$1(value);else if(value instanceof URLSearchParams$1)updated=value;else {validateSearchParameters(value),updated=new URLSearchParams$1;for(let key in value){let entry=value[key];entry===null?updated.append(key,""):entry===void 0?searchParameters.delete(key):updated.append(key,entry);}}if(this._merging){for(let key of updated.keys())searchParameters.delete(key);for(let[key,value2]of updated)searchParameters.append(key,value2);}else url?url.search=searchParameters.toString():this._internals.searchParams=searchParameters;}get searchParameters(){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}set searchParameters(_value){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}get dnsLookup(){return this._internals.dnsLookup}set dnsLookup(value){assert.any([dist_default2.function_,dist_default2.undefined],value),this._internals.dnsLookup=value;}get dnsCache(){return this._internals.dnsCache}set dnsCache(value){assert.any([dist_default2.object,dist_default2.boolean,dist_default2.undefined],value),value===!0?this._internals.dnsCache=getGlobalDnsCache():value===!1?this._internals.dnsCache=void 0:this._internals.dnsCache=value;}get context(){return this._internals.context}set context(value){assert.object(value),this._merging?Object.assign(this._internals.context,value):this._internals.context={...value};}get hooks(){return this._internals.hooks}set hooks(value){assert.object(value);for(let knownHookEvent in value){if(!(knownHookEvent in this._internals.hooks))throw new Error(`Unexpected hook event: ${knownHookEvent}`);let typedKnownHookEvent=knownHookEvent,hooks=value[typedKnownHookEvent];if(assert.any([dist_default2.array,dist_default2.undefined],hooks),hooks)for(let hook of hooks)assert.function_(hook);if(this._merging)hooks&&this._internals.hooks[typedKnownHookEvent].push(...hooks);else {if(!hooks)throw new Error(`Missing hook event: ${knownHookEvent}`);this._internals.hooks[knownHookEvent]=[...hooks];}}}get followRedirect(){return this._internals.followRedirect}set followRedirect(value){assert.boolean(value),this._internals.followRedirect=value;}get followRedirects(){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}set followRedirects(_value){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}get maxRedirects(){return this._internals.maxRedirects}set maxRedirects(value){assert.number(value),this._internals.maxRedirects=value;}get cache(){return this._internals.cache}set cache(value){assert.any([dist_default2.object,dist_default2.string,dist_default2.boolean,dist_default2.undefined],value),value===!0?this._internals.cache=globalCache:value===!1?this._internals.cache=void 0:this._internals.cache=value;}get throwHttpErrors(){return this._internals.throwHttpErrors}set throwHttpErrors(value){assert.boolean(value),this._internals.throwHttpErrors=value;}get username(){let url=this._internals.url,value=url?url.username:this._internals.username;return decodeURIComponent(value)}set username(value){assert.string(value);let url=this._internals.url,fixedValue=encodeURIComponent(value);url?url.username=fixedValue:this._internals.username=fixedValue;}get password(){let url=this._internals.url,value=url?url.password:this._internals.password;return decodeURIComponent(value)}set password(value){assert.string(value);let url=this._internals.url,fixedValue=encodeURIComponent(value);url?url.password=fixedValue:this._internals.password=fixedValue;}get http2(){return this._internals.http2}set http2(value){assert.boolean(value),this._internals.http2=value;}get allowGetBody(){return this._internals.allowGetBody}set allowGetBody(value){assert.boolean(value),this._internals.allowGetBody=value;}get headers(){return this._internals.headers}set headers(value){assert.plainObject(value),this._merging?Object.assign(this._internals.headers,lowercaseKeys(value)):this._internals.headers=lowercaseKeys(value);}get methodRewriting(){return this._internals.methodRewriting}set methodRewriting(value){assert.boolean(value),this._internals.methodRewriting=value;}get dnsLookupIpVersion(){return this._internals.dnsLookupIpVersion}set dnsLookupIpVersion(value){if(value!==void 0&&value!==4&&value!==6)throw new TypeError(`Invalid DNS lookup IP version: ${value}`);this._internals.dnsLookupIpVersion=value;}get parseJson(){return this._internals.parseJson}set parseJson(value){assert.function_(value),this._internals.parseJson=value;}get stringifyJson(){return this._internals.stringifyJson}set stringifyJson(value){assert.function_(value),this._internals.stringifyJson=value;}get retry(){return this._internals.retry}set retry(value){if(assert.plainObject(value),assert.any([dist_default2.function_,dist_default2.undefined],value.calculateDelay),assert.any([dist_default2.number,dist_default2.undefined],value.maxRetryAfter),assert.any([dist_default2.number,dist_default2.undefined],value.limit),assert.any([dist_default2.array,dist_default2.undefined],value.methods),assert.any([dist_default2.array,dist_default2.undefined],value.statusCodes),assert.any([dist_default2.array,dist_default2.undefined],value.errorCodes),assert.any([dist_default2.number,dist_default2.undefined],value.noise),value.noise&&Math.abs(value.noise)>100)throw new Error(`The maximum acceptable retry noise is +/- 100ms, got ${value.noise}`);for(let key in value)if(!(key in this._internals.retry))throw new Error(`Unexpected retry option: ${key}`);this._merging?Object.assign(this._internals.retry,value):this._internals.retry={...value};let{retry}=this._internals;retry.methods=[...new Set(retry.methods.map(method=>method.toUpperCase()))],retry.statusCodes=[...new Set(retry.statusCodes)],retry.errorCodes=[...new Set(retry.errorCodes)];}get localAddress(){return this._internals.localAddress}set localAddress(value){assert.any([dist_default2.string,dist_default2.undefined],value),this._internals.localAddress=value;}get method(){return this._internals.method}set method(value){assert.string(value),this._internals.method=value.toUpperCase();}get createConnection(){return this._internals.createConnection}set createConnection(value){assert.any([dist_default2.function_,dist_default2.undefined],value),this._internals.createConnection=value;}get cacheOptions(){return this._internals.cacheOptions}set cacheOptions(value){assert.plainObject(value),assert.any([dist_default2.boolean,dist_default2.undefined],value.shared),assert.any([dist_default2.number,dist_default2.undefined],value.cacheHeuristic),assert.any([dist_default2.number,dist_default2.undefined],value.immutableMinTimeToLive),assert.any([dist_default2.boolean,dist_default2.undefined],value.ignoreCargoCult);for(let key in value)if(!(key in this._internals.cacheOptions))throw new Error(`Cache option \`${key}\` does not exist`);this._merging?Object.assign(this._internals.cacheOptions,value):this._internals.cacheOptions={...value};}get https(){return this._internals.https}set https(value){assert.plainObject(value),assert.any([dist_default2.boolean,dist_default2.undefined],value.rejectUnauthorized),assert.any([dist_default2.function_,dist_default2.undefined],value.checkServerIdentity),assert.any([dist_default2.string,dist_default2.object,dist_default2.array,dist_default2.undefined],value.certificateAuthority),assert.any([dist_default2.string,dist_default2.object,dist_default2.array,dist_default2.undefined],value.key),assert.any([dist_default2.string,dist_default2.object,dist_default2.array,dist_default2.undefined],value.certificate),assert.any([dist_default2.string,dist_default2.undefined],value.passphrase),assert.any([dist_default2.string,dist_default2.buffer,dist_default2.array,dist_default2.undefined],value.pfx),assert.any([dist_default2.array,dist_default2.undefined],value.alpnProtocols),assert.any([dist_default2.string,dist_default2.undefined],value.ciphers),assert.any([dist_default2.string,dist_default2.buffer,dist_default2.undefined],value.dhparam),assert.any([dist_default2.string,dist_default2.undefined],value.signatureAlgorithms),assert.any([dist_default2.string,dist_default2.undefined],value.minVersion),assert.any([dist_default2.string,dist_default2.undefined],value.maxVersion),assert.any([dist_default2.boolean,dist_default2.undefined],value.honorCipherOrder),assert.any([dist_default2.number,dist_default2.undefined],value.tlsSessionLifetime),assert.any([dist_default2.string,dist_default2.undefined],value.ecdhCurve),assert.any([dist_default2.string,dist_default2.buffer,dist_default2.array,dist_default2.undefined],value.certificateRevocationLists);for(let key in value)if(!(key in this._internals.https))throw new Error(`HTTPS option \`${key}\` does not exist`);this._merging?Object.assign(this._internals.https,value):this._internals.https={...value};}get encoding(){return this._internals.encoding}set encoding(value){if(value===null)throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");assert.any([dist_default2.string,dist_default2.undefined],value),this._internals.encoding=value;}get resolveBodyOnly(){return this._internals.resolveBodyOnly}set resolveBodyOnly(value){assert.boolean(value),this._internals.resolveBodyOnly=value;}get isStream(){return this._internals.isStream}set isStream(value){assert.boolean(value),this._internals.isStream=value;}get responseType(){return this._internals.responseType}set responseType(value){if(value===void 0){this._internals.responseType="text";return}if(value!=="text"&&value!=="buffer"&&value!=="json")throw new Error(`Invalid \`responseType\` option: ${value}`);this._internals.responseType=value;}get pagination(){return this._internals.pagination}set pagination(value){assert.object(value),this._merging?Object.assign(this._internals.pagination,value):this._internals.pagination=value;}get auth(){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}set auth(_value){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}get setHost(){return this._internals.setHost}set setHost(value){assert.boolean(value),this._internals.setHost=value;}get maxHeaderSize(){return this._internals.maxHeaderSize}set maxHeaderSize(value){assert.any([dist_default2.number,dist_default2.undefined],value),this._internals.maxHeaderSize=value;}get enableUnixSockets(){return this._internals.enableUnixSockets}set enableUnixSockets(value){assert.boolean(value),this._internals.enableUnixSockets=value;}toJSON(){return {...this._internals}}[Symbol.for("nodejs.util.inspect.custom")](_depth,options){return inspect(this._internals,options)}createNativeRequestOptions(){var _a;let internals=this._internals,url=internals.url,agent2;url.protocol==="https:"?agent2=internals.http2?internals.agent:internals.agent.https:agent2=internals.agent.http;let{https:https22}=internals,{pfx}=https22;return dist_default2.array(pfx)&&dist_default2.plainObject(pfx[0])&&(pfx=pfx.map(object=>({buf:object.buffer,passphrase:object.passphrase}))),{...internals.cacheOptions,...this._unixOptions,ALPNProtocols:https22.alpnProtocols,ca:https22.certificateAuthority,cert:https22.certificate,key:https22.key,passphrase:https22.passphrase,pfx:https22.pfx,rejectUnauthorized:https22.rejectUnauthorized,checkServerIdentity:https22.checkServerIdentity??checkServerIdentity,ciphers:https22.ciphers,honorCipherOrder:https22.honorCipherOrder,minVersion:https22.minVersion,maxVersion:https22.maxVersion,sigalgs:https22.signatureAlgorithms,sessionTimeout:https22.tlsSessionLifetime,dhparam:https22.dhparam,ecdhCurve:https22.ecdhCurve,crl:https22.certificateRevocationLists,lookup:internals.dnsLookup??((_a=internals.dnsCache)==null?void 0:_a.lookup),family:internals.dnsLookupIpVersion,agent:agent2,setHost:internals.setHost,method:internals.method,maxHeaderSize:internals.maxHeaderSize,localAddress:internals.localAddress,headers:internals.headers,createConnection:internals.createConnection,timeout:internals.http2?getHttp2TimeoutOption(internals):void 0,h2session:internals.h2session}}getRequestFunction(){let url=this._internals.url,{request}=this._internals;return !request&&url?this.getFallbackRequestFunction():request}getFallbackRequestFunction(){let url=this._internals.url;if(url){if(url.protocol==="https:"){if(this._internals.http2){if(major<15||major===15&&minor<10){let error=new Error("To use the `http2` option, install Node.js 15.10.0 or above");throw error.code="EUNSUPPORTED",error}return import_http2_wrapper.default.auto}return https.request}return http2.request}}freeze(){let options=this._internals;Object.freeze(options),Object.freeze(options.hooks),Object.freeze(options.hooks.afterResponse),Object.freeze(options.hooks.beforeError),Object.freeze(options.hooks.beforeRedirect),Object.freeze(options.hooks.beforeRequest),Object.freeze(options.hooks.beforeRetry),Object.freeze(options.hooks.init),Object.freeze(options.https),Object.freeze(options.cacheOptions),Object.freeze(options.agent),Object.freeze(options.headers),Object.freeze(options.timeout),Object.freeze(options.retry),Object.freeze(options.retry.errorCodes),Object.freeze(options.retry.methods),Object.freeze(options.retry.statusCodes);}},isResponseOk=response=>{let{statusCode}=response,limitStatusCode=response.request.options.followRedirect?299:399;return statusCode>=200&&statusCode<=limitStatusCode||statusCode===304},ParseError=class extends RequestError{constructor(error,response){let{options}=response.request;super(`${error.message} in "${options.url.toString()}"`,error,response.request),this.name="ParseError",this.code="ERR_BODY_PARSE_FAILURE";}},parseBody=(response,responseType,parseJson,encoding)=>{let{rawBody}=response;try{if(responseType==="text")return rawBody.toString(encoding);if(responseType==="json")return rawBody.length===0?"":parseJson(rawBody.toString(encoding));if(responseType==="buffer")return rawBody}catch(error){throw new ParseError(error,response)}throw new ParseError({message:`Unknown body type '${responseType}'`,name:"Error"},response)};function isClientRequest(clientRequest){return clientRequest.writable&&!clientRequest.writableEnded}var is_client_request_default=isClientRequest;function isUnixSocketURL(url){return url.protocol==="unix:"||url.hostname==="unix"}var supportsBrotli=dist_default2.string(process3.versions.brotli),methodsWithoutBody=new Set(["GET","HEAD"]),cacheableStore=new WeakableMap,redirectCodes=new Set([300,301,302,303,304,307,308]),proxiedRequestEvents=["socket","connect","continue","information","upgrade"],noop2=()=>{},Request2=class extends Duplex{constructor(url,options,defaults2){super({autoDestroy:!1,highWaterMark:0}),Object.defineProperty(this,"constructor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_noPipe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"requestUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"redirectUrls",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"retryCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopRetry",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downloadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_uploadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopReading",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pipedServerResponses",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_responseSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_bodySize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_unproxyEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isFromCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cannotHaveBody",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_triggerRead",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cancelTimeouts",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_removeListeners",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_nativeResponse",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_flushed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_aborted",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_requestInitialized",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._downloadedSize=0,this._uploadedSize=0,this._stopReading=!1,this._pipedServerResponses=new Set,this._cannotHaveBody=!1,this._unproxyEvents=noop2,this._triggerRead=!1,this._cancelTimeouts=noop2,this._removeListeners=noop2,this._jobs=[],this._flushed=!1,this._requestInitialized=!1,this._aborted=!1,this.redirectUrls=[],this.retryCount=0,this._stopRetry=noop2,this.on("pipe",source=>{source.headers&&Object.assign(this.options.headers,source.headers);}),this.on("newListener",event=>{if(event==="retry"&&this.listenerCount("retry")>0)throw new Error("A retry listener has been attached already.")});try{if(this.options=new Options(url,options,defaults2),!this.options.url){if(this.options.prefixUrl==="")throw new TypeError("Missing `url` property");this.options.url="";}this.requestUrl=this.options.url;}catch(error){let{options:options2}=error;options2&&(this.options=options2),this.flush=async()=>{this.flush=async()=>{},this.destroy(error);};return}let{body}=this.options;if(dist_default2.nodeStream(body)&&body.once("error",error=>{this._flushed?this._beforeError(new UploadError(error,this)):this.flush=async()=>{this.flush=async()=>{},this._beforeError(new UploadError(error,this));};}),this.options.signal){let abort=()=>{this.destroy(new AbortError2(this));};this.options.signal.aborted?abort():(this.options.signal.addEventListener("abort",abort),this._removeListeners=()=>{this.options.signal.removeEventListener("abort",abort);});}}async flush(){var _a;if(!this._flushed){this._flushed=!0;try{if(await this._finalizeBody(),this.destroyed)return;if(await this._makeRequest(),this.destroyed){(_a=this._request)==null||_a.destroy();return}for(let job of this._jobs)job();this._jobs.length=0,this._requestInitialized=!0;}catch(error){this._beforeError(error);}}}_beforeError(error){if(this._stopReading)return;let{response,options}=this,attemptCount=this.retryCount+(error.name==="RetryError"?0:1);this._stopReading=!0,error instanceof RequestError||(error=new RequestError(error.message,error,this));let typedError=error;(async()=>{var _a,_b;if(response?.readable&&!response.rawBody&&!((_b=(_a=this._request)==null?void 0:_a.socket)!=null&&_b.destroyed)&&(response.setEncoding(this.readableEncoding),await this._setRawBody(response)&&(response.body=response.rawBody.toString())),this.listenerCount("retry")!==0){let backoff;try{let retryAfter;response&&"retry-after"in response.headers&&(retryAfter=Number(response.headers["retry-after"]),Number.isNaN(retryAfter)?(retryAfter=Date.parse(response.headers["retry-after"])-Date.now(),retryAfter<=0&&(retryAfter=1)):retryAfter*=1e3);let retryOptions=options.retry;backoff=await retryOptions.calculateDelay({attemptCount,retryOptions,error:typedError,retryAfter,computedValue:calculate_retry_delay_default({attemptCount,retryOptions,error:typedError,retryAfter,computedValue:retryOptions.maxRetryAfter??options.timeout.request??Number.POSITIVE_INFINITY})});}catch(error_){this._error(new RequestError(error_.message,error_,this));return}if(backoff){if(await new Promise(resolve3=>{let timeout=setTimeout(resolve3,backoff);this._stopRetry=()=>{clearTimeout(timeout),resolve3();};}),this.destroyed)return;try{for(let hook of this.options.hooks.beforeRetry)await hook(typedError,this.retryCount+1);}catch(error_){this._error(new RequestError(error_.message,error,this));return}if(this.destroyed)return;this.destroy(),this.emit("retry",this.retryCount+1,error,updatedOptions=>{let request=new Request2(options.url,updatedOptions,options);return request.retryCount=this.retryCount+1,process3.nextTick(()=>{request.flush();}),request});return}}this._error(typedError);})();}_read(){this._triggerRead=!0;let{response}=this;if(response&&!this._stopReading){response.readableLength&&(this._triggerRead=!1);let data;for(;(data=response.read())!==null;){this._downloadedSize+=data.length;let progress=this.downloadProgress;progress.percent<1&&this.emit("downloadProgress",progress),this.push(data);}}}_write(chunk,encoding,callback){let write=()=>{this._writeRequest(chunk,encoding,callback);};this._requestInitialized?write():this._jobs.push(write);}_final(callback){let endRequest=()=>{if(!this._request||this._request.destroyed){callback();return}this._request.end(error=>{var _a;(_a=this._request._writableState)!=null&&_a.errored||(error||(this._bodySize=this._uploadedSize,this.emit("uploadProgress",this.uploadProgress),this._request.emit("upload-complete")),callback(error));});};this._requestInitialized?endRequest():this._jobs.push(endRequest);}_destroy(error,callback){if(this._stopReading=!0,this.flush=async()=>{},this._stopRetry(),this._cancelTimeouts(),this._removeListeners(),this.options){let{body}=this.options;dist_default2.nodeStream(body)&&body.destroy();}this._request&&this._request.destroy(),error!==null&&!dist_default2.undefined(error)&&!(error instanceof RequestError)&&(error=new RequestError(error.message,error,this)),callback(error);}pipe(destination,options){return destination instanceof ServerResponse&&this._pipedServerResponses.add(destination),super.pipe(destination,options)}unpipe(destination){return destination instanceof ServerResponse&&this._pipedServerResponses.delete(destination),super.unpipe(destination),this}async _finalizeBody(){let{options}=this,{headers}=options,isForm=!dist_default2.undefined(options.form),isJSON2=!dist_default2.undefined(options.json),isBody=!dist_default2.undefined(options.body),cannotHaveBody=methodsWithoutBody.has(options.method)&&!(options.method==="GET"&&options.allowGetBody);if(this._cannotHaveBody=cannotHaveBody,isForm||isJSON2||isBody){if(cannotHaveBody)throw new TypeError(`The \`${options.method}\` method cannot be used with a body`);let noContentType=!dist_default2.string(headers["content-type"]);if(isBody){if(isFormData(options.body)){let encoder=new FormDataEncoder(options.body);noContentType&&(headers["content-type"]=encoder.headers["Content-Type"]),"Content-Length"in encoder.headers&&(headers["content-length"]=encoder.headers["Content-Length"]),options.body=encoder.encode();}isFormData2(options.body)&&noContentType&&(headers["content-type"]=`multipart/form-data; boundary=${options.body.getBoundary()}`);}else if(isForm){noContentType&&(headers["content-type"]="application/x-www-form-urlencoded");let{form}=options;options.form=void 0,options.body=new URLSearchParams$1(form).toString();}else {noContentType&&(headers["content-type"]="application/json");let{json}=options;options.json=void 0,options.body=options.stringifyJson(json);}let uploadBodySize=await getBodySize(options.body,options.headers);dist_default2.undefined(headers["content-length"])&&dist_default2.undefined(headers["transfer-encoding"])&&!cannotHaveBody&&!dist_default2.undefined(uploadBodySize)&&(headers["content-length"]=String(uploadBodySize));}options.responseType==="json"&&!("accept"in options.headers)&&(options.headers.accept="application/json"),this._bodySize=Number(headers["content-length"])||void 0;}async _onResponseBase(response){if(this.isAborted)return;let{options}=this,{url}=options;this._nativeResponse=response,options.decompress&&(response=(0, import_decompress_response.default)(response));let statusCode=response.statusCode,typedResponse=response;typedResponse.statusMessage=typedResponse.statusMessage?typedResponse.statusMessage:http2.STATUS_CODES[statusCode],typedResponse.url=options.url.toString(),typedResponse.requestUrl=this.requestUrl,typedResponse.redirectUrls=this.redirectUrls,typedResponse.request=this,typedResponse.isFromCache=this._nativeResponse.fromCache??!1,typedResponse.ip=this.ip,typedResponse.retryCount=this.retryCount,typedResponse.ok=isResponseOk(typedResponse),this._isFromCache=typedResponse.isFromCache,this._responseSize=Number(response.headers["content-length"])||void 0,this.response=typedResponse,response.once("end",()=>{this._responseSize=this._downloadedSize,this.emit("downloadProgress",this.downloadProgress);}),response.once("error",error=>{this._aborted=!0,response.destroy(),this._beforeError(new ReadError(error,this));}),response.once("aborted",()=>{this._aborted=!0,this._beforeError(new ReadError({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this));}),this.emit("downloadProgress",this.downloadProgress);let rawCookies=response.headers["set-cookie"];if(dist_default2.object(options.cookieJar)&&rawCookies){let promises=rawCookies.map(async rawCookie=>options.cookieJar.setCookie(rawCookie,url.toString()));options.ignoreInvalidCookies&&(promises=promises.map(async promise=>{try{await promise;}catch{}}));try{await Promise.all(promises);}catch(error){this._beforeError(error);return}}if(!this.isAborted){if(options.followRedirect&&response.headers.location&&redirectCodes.has(statusCode)){if(response.resume(),this._cancelTimeouts(),this._unproxyEvents(),this.redirectUrls.length>=options.maxRedirects){this._beforeError(new MaxRedirectsError(this));return}this._request=void 0;let updatedOptions=new Options(void 0,void 0,this.options),serverRequestedGet=statusCode===303&&updatedOptions.method!=="GET"&&updatedOptions.method!=="HEAD",canRewrite=statusCode!==307&&statusCode!==308,userRequestedGet=updatedOptions.methodRewriting&&canRewrite;(serverRequestedGet||userRequestedGet)&&(updatedOptions.method="GET",updatedOptions.body=void 0,updatedOptions.json=void 0,updatedOptions.form=void 0,delete updatedOptions.headers["content-length"]);try{let redirectBuffer=Buffer$1.from(response.headers.location,"binary").toString(),redirectUrl=new URL$1(redirectBuffer,url);if(!isUnixSocketURL(url)&&isUnixSocketURL(redirectUrl)){this._beforeError(new RequestError("Cannot redirect to UNIX socket",{},this));return}redirectUrl.hostname!==url.hostname||redirectUrl.port!==url.port?("host"in updatedOptions.headers&&delete updatedOptions.headers.host,"cookie"in updatedOptions.headers&&delete updatedOptions.headers.cookie,"authorization"in updatedOptions.headers&&delete updatedOptions.headers.authorization,(updatedOptions.username||updatedOptions.password)&&(updatedOptions.username="",updatedOptions.password="")):(redirectUrl.username=updatedOptions.username,redirectUrl.password=updatedOptions.password),this.redirectUrls.push(redirectUrl),updatedOptions.prefixUrl="",updatedOptions.url=redirectUrl;for(let hook of updatedOptions.hooks.beforeRedirect)await hook(updatedOptions,typedResponse);this.emit("redirect",updatedOptions,typedResponse),this.options=updatedOptions,await this._makeRequest();}catch(error){this._beforeError(error);return}return}if(options.isStream&&options.throwHttpErrors&&!isResponseOk(typedResponse)){this._beforeError(new HTTPError(typedResponse));return}if(response.on("readable",()=>{this._triggerRead&&this._read();}),this.on("resume",()=>{response.resume();}),this.on("pause",()=>{response.pause();}),response.once("end",()=>{this.push(null);}),this._noPipe){await this._setRawBody()&&this.emit("response",response);return}this.emit("response",response);for(let destination of this._pipedServerResponses)if(!destination.headersSent){for(let key in response.headers){let isAllowed=options.decompress?key!=="content-encoding":!0,value=response.headers[key];isAllowed&&destination.setHeader(key,value);}destination.statusCode=statusCode;}}}async _setRawBody(from=this){if(from.readableEnded)return !1;try{let rawBody=await(0,import_get_stream2.buffer)(from);if(!this.isAborted)return this.response.rawBody=rawBody,!0}catch{}return !1}async _onResponse(response){try{await this._onResponseBase(response);}catch(error){this._beforeError(error);}}_onRequest(request){let{options}=this,{timeout,url}=options;source_default(request),this.options.http2&&request.setTimeout(0),this._cancelTimeouts=timedOut(request,timeout,url);let responseEventName=options.cache?"cacheableResponse":"response";request.once(responseEventName,response=>{this._onResponse(response);}),request.once("error",error=>{this._aborted=!0,request.destroy(),error=error instanceof TimeoutError2?new TimeoutError(error,this.timings,this):new RequestError(error.message,error,this),this._beforeError(error);}),this._unproxyEvents=proxyEvents(request,this,proxiedRequestEvents),this._request=request,this.emit("uploadProgress",this.uploadProgress),this._sendBody(),this.emit("request",request);}async _asyncWrite(chunk){return new Promise((resolve3,reject)=>{super.write(chunk,error=>{if(error){reject(error);return}resolve3();});})}_sendBody(){let{body}=this.options,currentRequest=this.redirectUrls.length===0?this:this._request??this;dist_default2.nodeStream(body)?body.pipe(currentRequest):dist_default2.generator(body)||dist_default2.asyncGenerator(body)?(async()=>{try{for await(let chunk of body)await this._asyncWrite(chunk);super.end();}catch(error){this._beforeError(error);}})():dist_default2.undefined(body)?(this._cannotHaveBody||this._noPipe)&&currentRequest.end():(this._writeRequest(body,void 0,()=>{}),currentRequest.end());}_prepareCache(cache3){if(!cacheableStore.has(cache3)){let cacheableRequest=new dist_default22((requestOptions,handler)=>{let result=requestOptions._request(requestOptions,handler);return dist_default2.promise(result)&&(result.once=(event,handler2)=>{if(event==="error")(async()=>{try{await result;}catch(error){handler2(error);}})();else if(event==="abort")(async()=>{try{(await result).once("abort",handler2);}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${event}`);return result}),result},cache3);cacheableStore.set(cache3,cacheableRequest.request());}}async _createCacheableRequest(url,options){return new Promise((resolve3,reject)=>{Object.assign(options,urlToOptions(url));let request,cacheRequest=cacheableStore.get(options.cache)(options,async response=>{if(response._readableState.autoDestroy=!1,request){let fix=()=>{response.req&&(response.complete=response.req.res.complete);};response.prependOnceListener("end",fix),fix(),(await request).emit("cacheableResponse",response);}resolve3(response);});cacheRequest.once("error",reject),cacheRequest.once("request",async requestOrPromise=>{request=requestOrPromise,resolve3(request);});})}async _makeRequest(){let{options}=this,{headers,username,password}=options,cookieJar=options.cookieJar;for(let key in headers)if(dist_default2.undefined(headers[key]))delete headers[key];else if(dist_default2.null_(headers[key]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${key}\` header`);if(options.decompress&&dist_default2.undefined(headers["accept-encoding"])&&(headers["accept-encoding"]=supportsBrotli?"gzip, deflate, br":"gzip, deflate"),username||password){let credentials=Buffer$1.from(`${username}:${password}`).toString("base64");headers.authorization=`Basic ${credentials}`;}if(cookieJar){let cookieString=await cookieJar.getCookieString(options.url.toString());dist_default2.nonEmptyString(cookieString)&&(headers.cookie=cookieString);}options.prefixUrl="";let request;for(let hook of options.hooks.beforeRequest){let result=await hook(options);if(!dist_default2.undefined(result)){request=()=>result;break}}request||(request=options.getRequestFunction());let url=options.url;this._requestOptions=options.createNativeRequestOptions(),options.cache&&(this._requestOptions._request=request,this._requestOptions.cache=options.cache,this._requestOptions.body=options.body,this._prepareCache(options.cache));let fn=options.cache?this._createCacheableRequest:request;try{let requestOrResponse=fn(url,this._requestOptions);dist_default2.promise(requestOrResponse)&&(requestOrResponse=await requestOrResponse),dist_default2.undefined(requestOrResponse)&&(requestOrResponse=options.getFallbackRequestFunction()(url,this._requestOptions),dist_default2.promise(requestOrResponse)&&(requestOrResponse=await requestOrResponse)),is_client_request_default(requestOrResponse)?this._onRequest(requestOrResponse):this.writable?(this.once("finish",()=>{this._onResponse(requestOrResponse);}),this._sendBody()):this._onResponse(requestOrResponse);}catch(error){throw error instanceof CacheError2?new CacheError(error,this):error}}async _error(error){try{if(!(error instanceof HTTPError&&!this.options.throwHttpErrors))for(let hook of this.options.hooks.beforeError)error=await hook(error);}catch(error_){error=new RequestError(error_.message,error_,this);}this.destroy(error);}_writeRequest(chunk,encoding,callback){!this._request||this._request.destroyed||this._request.write(chunk,encoding,error=>{if(!error&&!this._request.destroyed){this._uploadedSize+=Buffer$1.byteLength(chunk,encoding);let progress=this.uploadProgress;progress.percent<1&&this.emit("uploadProgress",progress);}callback(error);});}get ip(){var _a;return (_a=this.socket)==null?void 0:_a.remoteAddress}get isAborted(){return this._aborted}get socket(){var _a;return ((_a=this._request)==null?void 0:_a.socket)??void 0}get downloadProgress(){let percent;return this._responseSize?percent=this._downloadedSize/this._responseSize:this._responseSize===this._downloadedSize?percent=1:percent=0,{percent,transferred:this._downloadedSize,total:this._responseSize}}get uploadProgress(){let percent;return this._bodySize?percent=this._uploadedSize/this._bodySize:this._bodySize===this._uploadedSize?percent=1:percent=0,{percent,transferred:this._uploadedSize,total:this._bodySize}}get timings(){var _a;return (_a=this._request)==null?void 0:_a.timings}get isFromCache(){return this._isFromCache}get reusedSocket(){var _a;return (_a=this._request)==null?void 0:_a.reusedSocket}},CancelError2=class extends RequestError{constructor(request){super("Promise was canceled",{},request),this.name="CancelError",this.code="ERR_CANCELED";}get isCanceled(){return !0}},proxiedRequestEvents2=["request","response","redirect","uploadProgress","downloadProgress"];function asPromise(firstRequest){let globalRequest,globalResponse,normalizedOptions,emitter=new EventEmitter,promise=new PCancelable((resolve3,reject,onCancel)=>{onCancel(()=>{globalRequest.destroy();}),onCancel.shouldReject=!1,onCancel(()=>{reject(new CancelError2(globalRequest));});let makeRequest=retryCount=>{var _a;onCancel(()=>{});let request=firstRequest??new Request2(void 0,void 0,normalizedOptions);request.retryCount=retryCount,request._noPipe=!0,globalRequest=request,request.once("response",async response=>{let contentEncoding=(response.headers["content-encoding"]??"").toLowerCase(),isCompressed=contentEncoding==="gzip"||contentEncoding==="deflate"||contentEncoding==="br",{options}=request;if(isCompressed&&!options.decompress)response.body=response.rawBody;else try{response.body=parseBody(response,options.responseType,options.parseJson,options.encoding);}catch(error){if(response.body=response.rawBody.toString(),isResponseOk(response)){request._beforeError(error);return}}try{let hooks=options.hooks.afterResponse;for(let[index,hook]of hooks.entries())if(response=await hook(response,async updatedOptions=>{throw options.merge(updatedOptions),options.prefixUrl="",updatedOptions.url&&(options.url=updatedOptions.url),options.hooks.afterResponse=options.hooks.afterResponse.slice(0,index),new RetryError(request)}),!(dist_default2.object(response)&&dist_default2.number(response.statusCode)&&!dist_default2.nullOrUndefined(response.body)))throw new TypeError("The `afterResponse` hook returned an invalid value")}catch(error){request._beforeError(error);return}if(globalResponse=response,!isResponseOk(response)){request._beforeError(new HTTPError(response));return}request.destroy(),resolve3(request.options.resolveBodyOnly?response.body:response);});let onError=error=>{if(promise.isCanceled)return;let{options}=request;if(error instanceof HTTPError&&!options.throwHttpErrors){let{response}=error;request.destroy(),resolve3(request.options.resolveBodyOnly?response.body:response);return}reject(error);};request.once("error",onError);let previousBody=(_a=request.options)==null?void 0:_a.body;request.once("retry",(newRetryCount,error)=>{firstRequest=void 0;let newBody=request.options.body;if(previousBody===newBody&&dist_default2.nodeStream(newBody)){error.message="Cannot retry with consumed body stream",onError(error);return}normalizedOptions=request.options,makeRequest(newRetryCount);}),proxyEvents(request,emitter,proxiedRequestEvents2),dist_default2.undefined(firstRequest)&&request.flush();};makeRequest(0);});promise.on=(event,fn)=>(emitter.on(event,fn),promise),promise.off=(event,fn)=>(emitter.off(event,fn),promise);let shortcut=responseType=>{let newPromise=(async()=>{await promise;let{options}=globalResponse.request;return parseBody(globalResponse,responseType,options.parseJson,options.encoding)})();return Object.defineProperties(newPromise,Object.getOwnPropertyDescriptors(promise)),newPromise};return promise.json=()=>{if(globalRequest.options){let{headers}=globalRequest.options;!globalRequest.writableFinished&&!("accept"in headers)&&(headers.accept="application/json");}return shortcut("json")},promise.buffer=()=>shortcut("buffer"),promise.text=()=>shortcut("text"),promise}var delay=async ms=>new Promise(resolve3=>{setTimeout(resolve3,ms);}),isGotInstance=value=>dist_default2.function_(value),aliases=["get","post","put","patch","head","delete"],create=defaults2=>{defaults2={options:new Options(void 0,void 0,defaults2.options),handlers:[...defaults2.handlers],mutableDefaults:defaults2.mutableDefaults},Object.defineProperty(defaults2,"mutableDefaults",{enumerable:!0,configurable:!1,writable:!1});let got2=(url,options,defaultOptions2=defaults2.options)=>{let request=new Request2(url,options,defaultOptions2),promise,lastHandler=normalized=>(request.options=normalized,request._noPipe=!normalized.isStream,request.flush(),normalized.isStream?request:(promise||(promise=asPromise(request)),promise)),iteration=0,iterateHandlers=newOptions=>{let result=(defaults2.handlers[iteration++]??lastHandler)(newOptions,iterateHandlers);if(dist_default2.promise(result)&&!request.options.isStream&&(promise||(promise=asPromise(request)),result!==promise)){let descriptors=Object.getOwnPropertyDescriptors(promise);for(let key in descriptors)key in result&&delete descriptors[key];Object.defineProperties(result,descriptors),result.cancel=promise.cancel;}return result};return iterateHandlers(request.options)};got2.extend=(...instancesOrOptions)=>{let options=new Options(void 0,void 0,defaults2.options),handlers=[...defaults2.handlers],mutableDefaults;for(let value of instancesOrOptions)isGotInstance(value)?(options.merge(value.defaults.options),handlers.push(...value.defaults.handlers),mutableDefaults=value.defaults.mutableDefaults):(options.merge(value),value.handlers&&handlers.push(...value.handlers),mutableDefaults=value.mutableDefaults);return create({options,handlers,mutableDefaults:!!mutableDefaults})};let paginateEach=async function*(url,options){let normalizedOptions=new Options(url,options,defaults2.options);normalizedOptions.resolveBodyOnly=!1;let{pagination}=normalizedOptions;assert.function_(pagination.transform),assert.function_(pagination.shouldContinue),assert.function_(pagination.filter),assert.function_(pagination.paginate),assert.number(pagination.countLimit),assert.number(pagination.requestLimit),assert.number(pagination.backoff);let allItems=[],{countLimit}=pagination,numberOfRequests=0;for(;numberOfRequests<pagination.requestLimit;){numberOfRequests!==0&&await delay(pagination.backoff);let response=await got2(void 0,void 0,normalizedOptions),parsed=await pagination.transform(response),currentItems=[];assert.array(parsed);for(let item of parsed)if(pagination.filter({item,currentItems,allItems})&&(!pagination.shouldContinue({item,currentItems,allItems})||(yield item,pagination.stackAllItems&&allItems.push(item),currentItems.push(item),--countLimit<=0)))return;let optionsToMerge=pagination.paginate({response,currentItems,allItems});if(optionsToMerge===!1)return;optionsToMerge===response.request.options?normalizedOptions=response.request.options:(normalizedOptions.merge(optionsToMerge),assert.any([dist_default2.urlInstance,dist_default2.undefined],optionsToMerge.url),optionsToMerge.url!==void 0&&(normalizedOptions.prefixUrl="",normalizedOptions.url=optionsToMerge.url)),numberOfRequests++;}};got2.paginate=paginateEach,got2.paginate.all=async(url,options)=>{let results=[];for await(let item of paginateEach(url,options))results.push(item);return results},got2.paginate.each=paginateEach,got2.stream=(url,options)=>got2(url,{...options,isStream:!0});for(let method of aliases)got2[method]=(url,options)=>got2(url,{...options,method}),got2.stream[method]=(url,options)=>got2(url,{...options,method,isStream:!0});return defaults2.mutableDefaults||(Object.freeze(defaults2.handlers),defaults2.options.freeze()),Object.defineProperty(got2,"defaults",{value:defaults2,writable:!1,configurable:!1,enumerable:!0}),got2},create_default=create,defaults={options:new Options,handlers:[],mutableDefaults:!1};create_default(defaults);var agentOpts={keepAlive:!0,maxSockets:20};({http:new Agent(agentOpts),https:new Agent$1(agentOpts)});__toESM(require_lib());__toESM(require_tempy());var ProjectType=(ProjectType2=>(ProjectType2.UNDETECTED="UNDETECTED",ProjectType2.UNSUPPORTED="UNSUPPORTED",ProjectType2.REACT="REACT",ProjectType2.REACT_SCRIPTS="REACT_SCRIPTS",ProjectType2.REACT_NATIVE="REACT_NATIVE",ProjectType2.REACT_PROJECT="REACT_PROJECT",ProjectType2.WEBPACK_REACT="WEBPACK_REACT",ProjectType2.NEXTJS="NEXTJS",ProjectType2.VUE="VUE",ProjectType2.VUE3="VUE3",ProjectType2.SFC_VUE="SFC_VUE",ProjectType2.ANGULAR="ANGULAR",ProjectType2.EMBER="EMBER",ProjectType2.WEB_COMPONENTS="WEB_COMPONENTS",ProjectType2.HTML="HTML",ProjectType2.QWIK="QWIK",ProjectType2.PREACT="PREACT",ProjectType2.SVELTE="SVELTE",ProjectType2.SVELTEKIT="SVELTEKIT",ProjectType2.SERVER="SERVER",ProjectType2.NX="NX",ProjectType2.SOLID="SOLID",ProjectType2))(ProjectType||{});var notInstallableProjectTypes=["UNDETECTED","UNSUPPORTED","NX"];Object.values(ProjectType).filter(type=>!notInstallableProjectTypes.includes(type)).map(type=>type.toLowerCase());var versions_default={"@storybook/addon-a11y":"7.6.21","@storybook/addon-actions":"7.6.21","@storybook/addon-backgrounds":"7.6.21","@storybook/addon-controls":"7.6.21","@storybook/addon-docs":"7.6.21","@storybook/addon-essentials":"7.6.21","@storybook/addon-highlight":"7.6.21","@storybook/addon-interactions":"7.6.21","@storybook/addon-jest":"7.6.21","@storybook/addon-links":"7.6.21","@storybook/addon-mdx-gfm":"7.6.21","@storybook/addon-measure":"7.6.21","@storybook/addon-outline":"7.6.21","@storybook/addon-themes":"7.6.21","@storybook/addon-storyshots":"7.6.21","@storybook/addon-storyshots-puppeteer":"7.6.21","@storybook/addon-storysource":"7.6.21","@storybook/addon-toolbars":"7.6.21","@storybook/addon-viewport":"7.6.21","@storybook/addons":"7.6.21","@storybook/angular":"7.6.21","@storybook/api":"7.6.21","@storybook/blocks":"7.6.21","@storybook/builder-manager":"7.6.21","@storybook/builder-vite":"7.6.21","@storybook/builder-webpack5":"7.6.21","@storybook/channel-postmessage":"7.6.21","@storybook/channel-websocket":"7.6.21","@storybook/channels":"7.6.21","@storybook/cli":"7.6.21","@storybook/client-api":"7.6.21","@storybook/client-logger":"7.6.21","@storybook/codemod":"7.6.21","@storybook/components":"7.6.21","@storybook/core-client":"7.6.21","@storybook/core-common":"7.6.21","@storybook/core-events":"7.6.21","@storybook/core-server":"7.6.21","@storybook/core-webpack":"7.6.21","@storybook/csf-plugin":"7.6.21","@storybook/csf-tools":"7.6.21","@storybook/docs-tools":"7.6.21","@storybook/ember":"7.6.21","@storybook/html":"7.6.21","@storybook/html-vite":"7.6.21","@storybook/html-webpack5":"7.6.21","@storybook/instrumenter":"7.6.21","@storybook/manager":"7.6.21","@storybook/manager-api":"7.6.21","@storybook/nextjs":"7.6.21","@storybook/node-logger":"7.6.21","@storybook/postinstall":"7.6.21","@storybook/preact":"7.6.21","@storybook/preact-vite":"7.6.21","@storybook/preact-webpack5":"7.6.21","@storybook/preset-create-react-app":"7.6.21","@storybook/preset-html-webpack":"7.6.21","@storybook/preset-preact-webpack":"7.6.21","@storybook/preset-react-webpack":"7.6.21","@storybook/preset-server-webpack":"7.6.21","@storybook/preset-svelte-webpack":"7.6.21","@storybook/preset-vue-webpack":"7.6.21","@storybook/preset-vue3-webpack":"7.6.21","@storybook/preset-web-components-webpack":"7.6.21","@storybook/preview":"7.6.21","@storybook/preview-api":"7.6.21","@storybook/preview-web":"7.6.21","@storybook/react":"7.6.21","@storybook/react-dom-shim":"7.6.21","@storybook/react-vite":"7.6.21","@storybook/react-webpack5":"7.6.21","@storybook/router":"7.6.21","@storybook/server":"7.6.21","@storybook/server-webpack5":"7.6.21","@storybook/source-loader":"7.6.21","@storybook/store":"7.6.21","@storybook/svelte":"7.6.21","@storybook/svelte-vite":"7.6.21","@storybook/svelte-webpack5":"7.6.21","@storybook/sveltekit":"7.6.21","@storybook/telemetry":"7.6.21","@storybook/theming":"7.6.21","@storybook/types":"7.6.21","@storybook/test":"7.6.21","@storybook/vue":"7.6.21","@storybook/vue-vite":"7.6.21","@storybook/vue-webpack5":"7.6.21","@storybook/vue3":"7.6.21","@storybook/vue3-vite":"7.6.21","@storybook/vue3-webpack5":"7.6.21","@storybook/web-components":"7.6.21","@storybook/web-components-vite":"7.6.21","@storybook/web-components-webpack5":"7.6.21",sb:"7.6.21",storybook:"7.6.21"};var logger11=console;var commandLog=message=>(process.stdout.write(chalk7.cyan(" \u2022 ")+message),(errorMessage,errorInfo)=>{if(errorMessage){if(process.stdout.write(`. ${chalk7.red("\u2716")}
133
132
  `),logger11.error(`
134
133
  ${chalk7.red(errorMessage)}`),!errorInfo)return;let newErrorInfo=errorInfo.split(`
135
134
  `).map(line=>` ${chalk7.dim(line)}`).join(`