js-utils-kit 0.0.0 → 0.2.0

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.
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env node
2
+ import t from"fs";import e from"ora";import{Command as r}from"commander";import i from"path";import n from"constants";import s from"stream";import o from"util";import a from"assert";import l from"buffer";import h from"node:url";import u from"node:path";import c from"node:fs";import f from"node:fs/promises";import d from"node:events";import p from"node:stream";import g from"node:string_decoder";import y from"zlib";var m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function b(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var w,v,S,E,x,k,T,R,A,O,L,M={exports:{}};function P(){if(w)return M.exports;w=1;var t,e="object"==typeof Reflect?Reflect:null,r=e&&"function"==typeof e.apply?e.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};t=e&&"function"==typeof e.ownKeys?e.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function n(){n.init.call(this)}M.exports=n,M.exports.once=function(t,e){return new Promise(function(r,i){function n(r){t.removeListener(e,s),i(r)}function s(){"function"==typeof t.removeListener&&t.removeListener("error",n),r([].slice.call(arguments))}p(t,e,s,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&p(t,"error",e,r)}(t,n,{once:!0})})},n.EventEmitter=n,n.prototype._events=void 0,n.prototype._eventsCount=0,n.prototype._maxListeners=void 0;var s=10;function o(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function a(t){return void 0===t._maxListeners?n.defaultMaxListeners:t._maxListeners}function l(t,e,r,i){var n,s,l,h;if(o(r),void 0===(s=t._events)?(s=t._events=Object.create(null),t._eventsCount=0):(void 0!==s.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),s=t._events),l=s[e]),void 0===l)l=s[e]=r,++t._eventsCount;else if("function"==typeof l?l=s[e]=i?[r,l]:[l,r]:i?l.unshift(r):l.push(r),(n=a(t))>0&&l.length>n&&!l.warned){l.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=l.length,h=u,console&&console.warn&&console.warn(h)}return t}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=h.bind(i);return n.listener=r,i.wrapFn=n,n}function c(t,e,r){var i=t._events;if(void 0===i)return[];var n=i[e];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(n):d(n,n.length)}function f(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function d(t,e){for(var r=new Array(e),i=0;i<e;++i)r[i]=t[i];return r}function p(t,e,r,i){if("function"==typeof t.on)i.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,function n(s){i.once&&t.removeEventListener(e,n),r(s)})}}return Object.defineProperty(n,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),n.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},n.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},n.prototype.getMaxListeners=function(){return a(this)},n.prototype.emit=function(t){for(var e=[],i=1;i<arguments.length;i++)e.push(arguments[i]);var n="error"===t,s=this._events;if(void 0!==s)n=n&&void 0===s.error;else if(!n)return!1;if(n){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var l=s[t];if(void 0===l)return!1;if("function"==typeof l)r(l,this,e);else{var h=l.length,u=d(l,h);for(i=0;i<h;++i)r(u[i],this,e)}return!0},n.prototype.addListener=function(t,e){return l(this,t,e,!1)},n.prototype.on=n.prototype.addListener,n.prototype.prependListener=function(t,e){return l(this,t,e,!0)},n.prototype.once=function(t,e){return o(e),this.on(t,u(this,t,e)),this},n.prototype.prependOnceListener=function(t,e){return o(e),this.prependListener(t,u(this,t,e)),this},n.prototype.removeListener=function(t,e){var r,i,n,s,a;if(o(e),void 0===(i=this._events))return this;if(void 0===(r=i[t]))return this;if(r===e||r.listener===e)0===--this._eventsCount?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(n=-1,s=r.length-1;s>=0;s--)if(r[s]===e||r[s].listener===e){a=r[s].listener,n=s;break}if(n<0)return this;0===n?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,n),1===r.length&&(i[t]=r[0]),void 0!==i.removeListener&&this.emit("removeListener",t,a||e)}return this},n.prototype.off=n.prototype.removeListener,n.prototype.removeAllListeners=function(t){var e,r,i;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var n,s=Object.keys(r);for(i=0;i<s.length;++i)"removeListener"!==(n=s[i])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(i=e.length-1;i>=0;i--)this.removeListener(t,e[i]);return this},n.prototype.listeners=function(t){return c(this,t,!0)},n.prototype.rawListeners=function(t){return c(this,t,!1)},n.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):f.call(t,e)},n.prototype.listenerCount=f,n.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]},M.exports}function I(){if(S)return v;S=1;const t="object"==typeof process&&process&&"win32"===process.platform;return v=t?{sep:"\\"}:{sep:"/"}}function D(){if(T)return k;T=1;var t=function(){if(x)return E;function t(t,i,n){t instanceof RegExp&&(t=e(t,n)),i instanceof RegExp&&(i=e(i,n));var s=r(t,i,n);return s&&{start:s[0],end:s[1],pre:n.slice(0,s[0]),body:n.slice(s[0]+t.length,s[1]),post:n.slice(s[1]+i.length)}}function e(t,e){var r=e.match(t);return r?r[0]:null}function r(t,e,r){var i,n,s,o,a,l=r.indexOf(t),h=r.indexOf(e,l+1),u=l;if(l>=0&&h>0){if(t===e)return[l,h];for(i=[],s=r.length;u>=0&&!a;)u==l?(i.push(u),l=r.indexOf(t,u+1)):1==i.length?a=[i.pop(),h]:((n=i.pop())<s&&(s=n,o=h),h=r.indexOf(e,u+1)),u=l<h&&l>=0?l:h;i.length&&(a=[s,o])}return a}return x=1,E=t,t.range=r,E}();k=function(t){if(!t)return[];"{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2));return d(function(t){return t.split("\\\\").join(e).split("\\{").join(r).split("\\}").join(i).split("\\,").join(n).split("\\.").join(s)}(t),!0).map(a)};var e="\0SLASH"+Math.random()+"\0",r="\0OPEN"+Math.random()+"\0",i="\0CLOSE"+Math.random()+"\0",n="\0COMMA"+Math.random()+"\0",s="\0PERIOD"+Math.random()+"\0";function o(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function a(t){return t.split(e).join("\\").split(r).join("{").split(i).join("}").split(n).join(",").split(s).join(".")}function l(e){if(!e)return[""];var r=[],i=t("{","}",e);if(!i)return e.split(",");var n=i.pre,s=i.body,o=i.post,a=n.split(",");a[a.length-1]+="{"+s+"}";var h=l(o);return o.length&&(a[a.length-1]+=h.shift(),a.push.apply(a,h)),r.push.apply(r,a),r}function h(t){return"{"+t+"}"}function u(t){return/^-?0\d/.test(t)}function c(t,e){return t<=e}function f(t,e){return t>=e}function d(e,r){var n=[],s=t("{","}",e);if(!s)return[e];var a=s.pre,p=s.post.length?d(s.post,!1):[""];if(/\$$/.test(s.pre))for(var g=0;g<p.length;g++){var y=a+"{"+s.body+"}"+p[g];n.push(y)}else{var m,b,_=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),w=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),v=_||w,S=s.body.indexOf(",")>=0;if(!v&&!S)return s.post.match(/,(?!,).*\}/)?d(e=s.pre+"{"+s.body+i+s.post):[e];if(v)m=s.body.split(/\.\./);else if(1===(m=l(s.body)).length&&1===(m=d(m[0],!1).map(h)).length)return p.map(function(t){return s.pre+m[0]+t});if(v){var E=o(m[0]),x=o(m[1]),k=Math.max(m[0].length,m[1].length),T=3==m.length?Math.abs(o(m[2])):1,R=c;x<E&&(T*=-1,R=f);var A=m.some(u);b=[];for(var O=E;R(O,x);O+=T){var L;if(w)"\\"===(L=String.fromCharCode(O))&&(L="");else if(L=String(O),A){var M=k-L.length;if(M>0){var P=new Array(M+1).join("0");L=O<0?"-"+P+L.slice(1):P+L}}b.push(L)}}else{b=[];for(var I=0;I<m.length;I++)b.push.apply(b,d(m[I],!1))}for(I=0;I<b.length;I++)for(g=0;g<p.length;g++){y=a+b[I]+p[g];(!r||v||y)&&n.push(y)}}return n}return k}function N(){if(A)return R;A=1;const t=R=(t,e,r={})=>(d(e),!(!r.nocomment&&"#"===e.charAt(0))&&new m(e,r).match(t));R=t;const e=I();t.sep=e.sep;const r=Symbol("globstar **");t.GLOBSTAR=r;const i=D(),n={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},s="[^/]",o=s+"*?",a=t=>t.split("").reduce((t,e)=>(t[e]=!0,t),{}),l=a("().*{}+?[]^$\\!"),h=a("[.("),u=/\/+/;t.filter=(e,r={})=>(i,n,s)=>t(i,e,r);const c=(t,e={})=>{const r={};return Object.keys(t).forEach(e=>r[e]=t[e]),Object.keys(e).forEach(t=>r[t]=e[t]),r};t.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return t;const r=t,i=(t,i,n)=>r(t,i,c(e,n));return i.Minimatch=class extends r.Minimatch{constructor(t,r){super(t,c(e,r))}},i.Minimatch.defaults=t=>r.defaults(c(e,t)).Minimatch,i.filter=(t,i)=>r.filter(t,c(e,i)),i.defaults=t=>r.defaults(c(e,t)),i.makeRe=(t,i)=>r.makeRe(t,c(e,i)),i.braceExpand=(t,i)=>r.braceExpand(t,c(e,i)),i.match=(t,i,n)=>r.match(t,i,c(e,n)),i},t.braceExpand=(t,e)=>f(t,e);const f=(t,e={})=>(d(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:i(t)),d=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},p=Symbol("subparse");t.makeRe=(t,e)=>new m(t,e||{}).makeRe(),t.match=(t,e,r={})=>{const i=new m(e,r);return t=t.filter(t=>i.match(t)),i.options.nonull&&!t.length&&t.push(e),t};const g=t=>t.replace(/\\([^-\]])/g,"$1"),y=t=>t.replace(/[[\]\\]/g,"\\$&");class m{constructor(t,e){d(t),e||(e={}),this.options=e,this.set=[],this.pattern=t,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.make()}debug(){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate();let r=this.globSet=this.braceExpand();e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,r),r=this.globParts=r.map(t=>t.split(u)),this.debug(this.pattern,r),r=r.map((t,e,r)=>t.map(this.parse,this)),this.debug(this.pattern,r),r=r.filter(t=>-1===t.indexOf(!1)),this.debug(this.pattern,r),this.set=r}parseNegate(){if(this.options.nonegate)return;const t=this.pattern;let e=!1,r=0;for(let i=0;i<t.length&&"!"===t.charAt(i);i++)e=!e,r++;r&&(this.pattern=t.slice(r)),this.negate=e}matchOne(t,e,i){var n=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var s=0,o=0,a=t.length,l=e.length;s<a&&o<l;s++,o++){this.debug("matchOne loop");var h,u=e[o],c=t[s];if(this.debug(e,u,c),!1===u)return!1;if(u===r){this.debug("GLOBSTAR",[e,u,c]);var f=s,d=o+1;if(d===l){for(this.debug("** at the end");s<a;s++)if("."===t[s]||".."===t[s]||!n.dot&&"."===t[s].charAt(0))return!1;return!0}for(;f<a;){var p=t[f];if(this.debug("\nglobstar while",t,f,e,d,p),this.matchOne(t.slice(f),e.slice(d),i))return this.debug("globstar found match!",f,a,p),!0;if("."===p||".."===p||!n.dot&&"."===p.charAt(0)){this.debug("dot detected!",t,f,e,d);break}this.debug("globstar swallow a segment, and continue"),f++}return!(!i||(this.debug("\n>>> no match, partial?",t,f,e,d),f!==a))}if("string"==typeof u?(h=c===u,this.debug("string match",u,c,h)):(h=c.match(u),this.debug("pattern match",u,c,h)),!h)return!1}if(s===a&&o===l)return!0;if(s===a)return i;if(o===l)return s===a-1&&""===t[s];throw new Error("wtf?")}braceExpand(){return f(this.pattern,this.options)}parse(t,e){d(t);const i=this.options;if("**"===t){if(!i.noglobstar)return r;t="*"}if(""===t)return"";let a="",u=!1,c=!1;const f=[],m=[];let b,_,w,v,S=!1,E=-1,x=-1,k="."===t.charAt(0),T=i.dot||k;const R=t=>"."===t.charAt(0)?"":i.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",A=()=>{if(b){switch(b){case"*":a+=o,u=!0;break;case"?":a+=s,u=!0;break;default:a+="\\"+b}this.debug("clearStateChar %j %j",b,a),b=!1}};for(let e,r=0;r<t.length&&(e=t.charAt(r));r++)if(this.debug("%s\t%s %s %j",t,r,a,e),c){if("/"===e)return!1;l[e]&&(a+="\\"),a+=e,c=!1}else switch(e){case"/":return!1;case"\\":if(S&&"-"===t.charAt(r+1)){a+=e;continue}A(),c=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",t,r,a,e),S){this.debug(" in class"),"!"===e&&r===x+1&&(e="^"),a+=e;continue}this.debug("call clearStateChar %j",b),A(),b=e,i.noext&&A();continue;case"(":{if(S){a+="(";continue}if(!b){a+="\\(";continue}const e={type:b,start:r-1,reStart:a.length,open:n[b].open,close:n[b].close};this.debug(this.pattern,"\t",e),f.push(e),a+=e.open,0===e.start&&"!"!==e.type&&(k=!0,a+=R(t.slice(r+1))),this.debug("plType %j %j",b,a),b=!1;continue}case")":{const t=f[f.length-1];if(S||!t){a+="\\)";continue}f.pop(),A(),u=!0,w=t,a+=w.close,"!"===w.type&&m.push(Object.assign(w,{reEnd:a.length}));continue}case"|":{const e=f[f.length-1];if(S||!e){a+="\\|";continue}A(),a+="|",0===e.start&&"!"!==e.type&&(k=!0,a+=R(t.slice(r+1)));continue}case"[":if(A(),S){a+="\\"+e;continue}S=!0,x=r,E=a.length,a+=e;continue;case"]":if(r===x+1||!S){a+="\\"+e;continue}_=t.substring(x+1,r);try{RegExp("["+y(g(_))+"]"),a+=e}catch(t){a=a.substring(0,E)+"(?:$.)"}u=!0,S=!1;continue;default:A(),!l[e]||"^"===e&&S||(a+="\\"),a+=e}for(S&&(_=t.slice(x+1),v=this.parse(_,p),a=a.substring(0,E)+"\\["+v[0],u=u||v[1]),w=f.pop();w;w=f.pop()){let t;t=a.slice(w.reStart+w.open.length),this.debug("setting tail",a,w),t=t.replace(/((?:\\{2}){0,64})(\\?)\|/g,(t,e,r)=>(r||(r="\\"),e+e+r+"|")),this.debug("tail=%j\n %s",t,t,w,a);const e="*"===w.type?o:"?"===w.type?s:"\\"+w.type;u=!0,a=a.slice(0,w.reStart)+e+"\\("+t}A(),c&&(a+="\\\\");const O=h[a.charAt(0)];for(let t=m.length-1;t>-1;t--){const r=m[t],i=a.slice(0,r.reStart),n=a.slice(r.reStart,r.reEnd-8);let s=a.slice(r.reEnd);const o=a.slice(r.reEnd-8,r.reEnd)+s,l=i.split(")").length,h=i.split("(").length-l;let u=s;for(let t=0;t<h;t++)u=u.replace(/\)[+*?]?/,"");s=u;a=i+n+s+(""===s&&e!==p?"(?:$|\\/)":"")+o}if(""!==a&&u&&(a="(?=.)"+a),O&&(a=(k?"":T?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)")+a),e===p)return[a,u];if(i.nocase&&!u&&(u=t.toUpperCase()!==t.toLowerCase()),!u)return t.replace(/\\(.)/g,"$1");const L=i.nocase?"i":"";try{return Object.assign(new RegExp("^"+a+"$",L),{_glob:t,_src:a})}catch(t){return new RegExp("$.")}}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,i=e.noglobstar?o:e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",n=e.nocase?"i":"";let s=t.map(t=>(t=t.map(t=>"string"==typeof t?t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):t===r?r:t._src).reduce((t,e)=>(t[t.length-1]===r&&e===r||t.push(e),t),[]),t.forEach((e,n)=>{e===r&&t[n-1]!==r&&(0===n?t.length>1?t[n+1]="(?:\\/|"+i+"\\/)?"+t[n+1]:t[n]=i:n===t.length-1?t[n-1]+="(?:\\/|"+i+")?":(t[n-1]+="(?:\\/|\\/"+i+"\\/)"+t[n+1],t[n+1]=r))}),t.filter(t=>t!==r).join("/"))).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,n)}catch(t){this.regexp=!1}return this.regexp}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&r)return!0;const i=this.options;"/"!==e.sep&&(t=t.split(e.sep).join("/")),t=t.split(u),this.debug(this.pattern,"split",t);const n=this.set;let s;this.debug(this.pattern,"set",n);for(let e=t.length-1;e>=0&&(s=t[e],!s);e--);for(let e=0;e<n.length;e++){const o=n[e];let a=t;i.matchBase&&1===o.length&&(a=[s]);if(this.matchOne(a,o,r))return!!i.flipNegate||!this.negate}return!i.flipNegate&&this.negate}static defaults(e){return t.defaults(e).Minimatch}}return t.Minimatch=m,R}function C(){if(L)return O;L=1,O=h;const e=t,{EventEmitter:r}=P(),{Minimatch:n}=N(),{resolve:s}=i;function o(t,r){return new Promise((i,n)=>{(r?e.stat:e.lstat)(t,(e,n)=>{if(e)if("ENOENT"===e.code)i(r?o(t,!1):null);else i(null);else i(n)})})}async function*a(t,r,i,n,s,l){let h=await function(t,r){return new Promise((i,n)=>{e.readdir(t,{withFileTypes:!0},(t,e)=>{if(t)switch(t.code){case"ENOTDIR":r?n(t):i([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":i([]);break;default:n(t)}else i(e)})})}(r+t,l);for(const e of h){let l=e.name;void 0===l&&(l=e,n=!0);const h=t+"/"+l,u=h.slice(1),c=r+"/"+u;let f=null;(n||i)&&(f=await o(c,i)),f||void 0===e.name||(f=e),null===f&&(f={isDirectory:()=>!1}),f.isDirectory()?s(u)||(yield{relative:u,absolute:c,stats:f},yield*a(h,r,i,n,s,!1)):yield{relative:u,absolute:c,stats:f}}}class l extends r{constructor(t,e,r){if(super(),"function"==typeof e&&(r=e,e=null),this.options=function(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}(e||{}),this.matchers=[],this.options.pattern){const t=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=t.map(t=>new n(t,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){const t=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=t.map(t=>new n(t,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){const t=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=t.map(t=>new n(t,{dot:!0}))}this.iterator=async function*(t,e,r,i){yield*a("",t,e,r,i,!0)}(s(t||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,r&&(this._matches=[],this.on("match",t=>this._matches.push(this.options.absolute?t.absolute:t.relative)),this.on("error",t=>r(t)),this.on("end",()=>r(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(t){return this.skipMatchers.some(e=>e.match(t))}_fileMatches(t,e){const r=t+(e?"/":"");return(0===this.matchers.length||this.matchers.some(t=>t.match(r)))&&!this.ignoreMatchers.some(t=>t.match(r))&&(!this.options.nodir||!e)}_next(){this.paused||this.aborted?this.inactive=!0:this.iterator.next().then(t=>{if(t.done)this.emit("end");else{const e=t.value.stats.isDirectory();if(this._fileMatches(t.value.relative,e)){let r=t.value.relative,i=t.value.absolute;this.options.mark&&e&&(r+="/",i+="/"),this.options.stat?this.emit("match",{relative:r,absolute:i,stat:t.value.stats}):this.emit("match",{relative:r,absolute:i})}this._next(this.iterator)}}).catch(t=>{this.abort(),this.emit("error",t),t.code||this.options.silent||console.error(t)})}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}}function h(t,e,r){return new l(t,e,r)}return h.ReaddirGlob=l,O}var j,F={exports:{}};function B(){return j||(j=1,function(t){function e(t,...e){return(...r)=>t(...e,...r)}function r(t){return function(...e){var r=e.pop();return t.call(this,e,r)}}var i="function"==typeof queueMicrotask&&queueMicrotask,n="function"==typeof setImmediate&&setImmediate,s="object"==typeof process&&"function"==typeof process.nextTick;function o(t){setTimeout(t,0)}function a(t){return(e,...r)=>t(()=>e(...r))}var l=a(i?queueMicrotask:n?setImmediate:s?process.nextTick:o);function h(t){return f(t)?function(...e){const r=e.pop();return u(t.apply(this,e),r)}:r(function(e,r){var i;try{i=t.apply(this,e)}catch(t){return r(t)}if(i&&"function"==typeof i.then)return u(i,r);r(null,i)})}function u(t,e){return t.then(t=>{c(e,null,t)},t=>{c(e,t&&(t instanceof Error||t.message)?t:new Error(t))})}function c(t,e,r){try{t(e,r)}catch(t){l(t=>{throw t},t)}}function f(t){return"AsyncFunction"===t[Symbol.toStringTag]}function d(t){return"AsyncGenerator"===t[Symbol.toStringTag]}function p(t){return"function"==typeof t[Symbol.asyncIterator]}function g(t){if("function"!=typeof t)throw new Error("expected a function");return f(t)?h(t):t}function y(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");function r(...r){return"function"==typeof r[e-1]?t.apply(this,r):new Promise((i,n)=>{r[e-1]=(t,...e)=>{if(t)return n(t);i(e.length>1?e:e[0])},t.apply(this,r)})}return r}function m(t){return function(e,...r){return y(function(i){var n=this;return t(e,(t,e)=>{g(t).apply(n,r.concat(e))},i)})}}function b(t,e,r,i){e=e||[];var n=[],s=0,o=g(r);return t(e,(t,e,r)=>{var i=s++;o(t,(t,e)=>{n[i]=e,r(t)})},t=>{i(t,n)})}function _(t){return t&&"number"==typeof t.length&&t.length>=0&&t.length%1==0}const w={};function v(t){function e(...e){if(null!==t){var r=t;t=null,r.apply(this,e)}}return Object.assign(e,t),e}function S(t){return t[Symbol.iterator]&&t[Symbol.iterator]()}function E(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function x(t){var e=-1;return function(){var r=t.next();return r.done?null:(e++,{value:r.value,key:e})}}function k(t){var e=t?Object.keys(t):[],r=-1,i=e.length;return function n(){var s=e[++r];return"__proto__"===s?n():r<i?{value:t[s],key:s}:null}}function T(t){if(_(t))return E(t);var e=S(t);return e?x(e):k(t)}function R(t){return function(...e){if(null===t)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}function A(t,e,r,i){let n=!1,s=!1,o=!1,a=0,l=0;function h(){a>=e||o||n||(o=!0,t.next().then(({value:t,done:e})=>{if(!s&&!n){if(o=!1,e)return n=!0,void(a<=0&&i(null));a++,r(t,l,u),l++,h()}}).catch(c))}function u(t,e){if(a-=1,!s)return t?c(t):!1===t?(n=!0,void(s=!0)):e===w||n&&a<=0?(n=!0,i(null)):void h()}function c(t){s||(o=!1,n=!0,i(t))}h()}var O=t=>(e,r,i)=>{if(i=v(i),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return i(null);if(d(e))return A(e,t,r,i);if(p(e))return A(e[Symbol.asyncIterator](),t,r,i);var n=T(e),s=!1,o=!1,a=0,l=!1;function h(t,e){if(!o)if(a-=1,t)s=!0,i(t);else if(!1===t)s=!0,o=!0;else{if(e===w||s&&a<=0)return s=!0,i(null);l||u()}}function u(){for(l=!0;a<t&&!s;){var e=n();if(null===e)return s=!0,void(a<=0&&i(null));a+=1,r(e.value,e.key,R(h))}l=!1}u()};function L(t,e,r,i){return O(e)(t,g(r),i)}var M=y(L,4);function P(t,e,r){r=v(r);var i=0,n=0,{length:s}=t,o=!1;function a(t,e){!1===t&&(o=!0),!0!==o&&(t?r(t):++n!==s&&e!==w||r(null))}for(0===s&&r(null);i<s;i++)e(t[i],i,R(a))}function I(t,e,r){return M(t,1/0,e,r)}function D(t,e,r){return(_(t)?P:I)(t,g(e),r)}var N=y(D,3);function C(t,e,r){return b(N,t,e,r)}var j=y(C,3),F=m(j);function B(t,e,r){return M(t,1,e,r)}var z=y(B,3);function W(t,e,r){return b(z,t,e,r)}var U=y(W,3),G=m(U);const $=Symbol("promiseCallback");function H(){let t,e;function r(r,...i){if(r)return e(r);t(i.length>1?i:i[0])}return r[$]=new Promise((r,i)=>{t=r,e=i}),r}function q(t,e,r){"number"!=typeof e&&(r=e,e=null),r=v(r||H());var i=Object.keys(t).length;if(!i)return r(null);e||(e=i);var n={},s=0,o=!1,a=!1,l=Object.create(null),h=[],u=[],c={};function f(t,e){h.push(()=>m(t,e))}function d(){if(!o){if(0===h.length&&0===s)return r(null,n);for(;h.length&&s<e;)h.shift()()}}function p(t,e){var r=l[t];r||(r=l[t]=[]),r.push(e)}function y(t){(l[t]||[]).forEach(t=>t()),d()}function m(t,e){if(!a){var i=R((e,...i)=>{if(s--,!1!==e)if(i.length<2&&([i]=i),e){var h={};if(Object.keys(n).forEach(t=>{h[t]=n[t]}),h[t]=i,a=!0,l=Object.create(null),o)return;r(e,h)}else n[t]=i,y(t);else o=!0});s++;var h=g(e[e.length-1]);e.length>1?h(n,i):h(i)}}function b(){for(var t=0;u.length;)t++,_(u.pop()).forEach(t=>{0===--c[t]&&u.push(t)});if(t!==i)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function _(e){var r=[];return Object.keys(t).forEach(i=>{const n=t[i];Array.isArray(n)&&n.indexOf(e)>=0&&r.push(i)}),r}return Object.keys(t).forEach(e=>{var r=t[e];if(!Array.isArray(r))return f(e,[r]),void u.push(e);var i=r.slice(0,r.length-1),n=i.length;if(0===n)return f(e,r),void u.push(e);c[e]=n,i.forEach(s=>{if(!t[s])throw new Error("async.auto task `"+e+"` has a non-existent dependency `"+s+"` in "+i.join(", "));p(s,()=>{0===--n&&f(e,r)})})}),b(),d(),r[$]}var V=/^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/,Z=/^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/,Y=/,/,K=/(=.+)?(\s*)$/;function Q(t){let e="",r=0,i=t.indexOf("*/");for(;r<t.length;)if("/"===t[r]&&"/"===t[r+1]){let e=t.indexOf("\n",r);r=-1===e?t.length:e}else if(-1!==i&&"/"===t[r]&&"*"===t[r+1]){let n=t.indexOf("*/",r);-1!==n?(r=n+2,i=t.indexOf("*/",r)):(e+=t[r],r++)}else e+=t[r],r++;return e}function X(t){const e=Q(t.toString());let r=e.match(V);if(r||(r=e.match(Z)),!r)throw new Error("could not parse args in autoInject\nSource:\n"+e);let[,i]=r;return i.replace(/\s/g,"").split(Y).map(t=>t.replace(K,"").trim())}function J(t,e){var r={};return Object.keys(t).forEach(e=>{var i,n=t[e],s=f(n),o=!s&&1===n.length||s&&0===n.length;if(Array.isArray(n))i=[...n],n=i.pop(),r[e]=i.concat(i.length>0?a:n);else if(o)r[e]=n;else{if(i=X(n),0===n.length&&!s&&0===i.length)throw new Error("autoInject task functions require explicit parameters.");s||i.pop(),r[e]=i.concat(a)}function a(t,e){var r=i.map(e=>t[e]);r.push(e),g(n)(...r)}}),q(r,e)}class tt{constructor(){this.head=this.tail=null,this.length=0}removeLink(t){return t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev,t.prev=t.next=null,this.length-=1,t}empty(){for(;this.head;)this.shift();return this}insertAfter(t,e){e.prev=t,e.next=t.next,t.next?t.next.prev=e:this.tail=e,t.next=e,this.length+=1}insertBefore(t,e){e.prev=t.prev,e.next=t,t.prev?t.prev.next=e:this.head=e,t.prev=e,this.length+=1}unshift(t){this.head?this.insertBefore(this.head,t):et(this,t)}push(t){this.tail?this.insertAfter(this.tail,t):et(this,t)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var t=this.head;t;)yield t.data,t=t.next}remove(t){for(var e=this.head;e;){var{next:r}=e;t(e)&&this.removeLink(e),e=r}return this}}function et(t,e){t.length=1,t.head=t.tail=e}function rt(t,e,r){if(null==e)e=1;else if(0===e)throw new RangeError("Concurrency must not be zero");var i=g(t),n=0,s=[];const o={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(t,e){o[t].push(e)}function h(t,e){const r=(...i)=>{u(t,r),e(...i)};o[t].push(r)}function u(t,e){return t?e?void(o[t]=o[t].filter(t=>t!==e)):o[t]=[]:Object.keys(o).forEach(t=>o[t]=[])}function c(t,...e){o[t].forEach(t=>t(...e))}var f=!1;function d(t,e,r,i){if(null!=i&&"function"!=typeof i)throw new Error("task callback must be a function");var n,s;function o(t,...e){return t?r?s(t):n():e.length<=1?n(e[0]):void n(e)}_.started=!0;var a=_._createTaskItem(t,r?o:i||o);if(e?_._tasks.unshift(a):_._tasks.push(a),f||(f=!0,l(()=>{f=!1,_.process()})),r||!i)return new Promise((t,e)=>{n=t,s=e})}function p(t){return function(e,...r){n-=1;for(var i=0,o=t.length;i<o;i++){var a=t[i],l=s.indexOf(a);0===l?s.shift():l>0&&s.splice(l,1),a.callback(e,...r),null!=e&&c("error",e,a.data)}n<=_.concurrency-_.buffer&&c("unsaturated"),_.idle()&&c("drain"),_.process()}}function y(t){return!(0!==t.length||!_.idle()||(l(()=>c("drain")),0))}const m=t=>e=>{if(!e)return new Promise((e,r)=>{h(t,(t,i)=>{if(t)return r(t);e(i)})});u(t),a(t,e)};var b=!1,_={_tasks:new tt,_createTaskItem:(t,e)=>({data:t,callback:e}),*[Symbol.iterator](){yield*_._tasks[Symbol.iterator]()},concurrency:e,payload:r,buffer:e/4,started:!1,paused:!1,push(t,e){if(Array.isArray(t)){if(y(t))return;return t.map(t=>d(t,!1,!1,e))}return d(t,!1,!1,e)},pushAsync(t,e){if(Array.isArray(t)){if(y(t))return;return t.map(t=>d(t,!1,!0,e))}return d(t,!1,!0,e)},kill(){u(),_._tasks.empty()},unshift(t,e){if(Array.isArray(t)){if(y(t))return;return t.map(t=>d(t,!0,!1,e))}return d(t,!0,!1,e)},unshiftAsync(t,e){if(Array.isArray(t)){if(y(t))return;return t.map(t=>d(t,!0,!0,e))}return d(t,!0,!0,e)},remove(t){_._tasks.remove(t)},process(){if(!b){for(b=!0;!_.paused&&n<_.concurrency&&_._tasks.length;){var t=[],e=[],r=_._tasks.length;_.payload&&(r=Math.min(r,_.payload));for(var o=0;o<r;o++){var a=_._tasks.shift();t.push(a),s.push(a),e.push(a.data)}n+=1,0===_._tasks.length&&c("empty"),n===_.concurrency&&c("saturated");var l=R(p(t));i(e,l)}b=!1}},length:()=>_._tasks.length,running:()=>n,workersList:()=>s,idle:()=>_._tasks.length+n===0,pause(){_.paused=!0},resume(){!1!==_.paused&&(_.paused=!1,l(_.process))}};return Object.defineProperties(_,{saturated:{writable:!1,value:m("saturated")},unsaturated:{writable:!1,value:m("unsaturated")},empty:{writable:!1,value:m("empty")},drain:{writable:!1,value:m("drain")},error:{writable:!1,value:m("error")}}),_}function it(t,e){return rt(t,1,e)}function nt(t,e,r){return rt(t,e,r)}function st(t,e,r,i){i=v(i);var n=g(r);return z(t,(t,r,i)=>{n(e,t,(t,r)=>{e=r,i(t)})},t=>i(t,e))}var ot=y(st,4);function at(...t){var e=t.map(g);return function(...t){var r=this,i=t[t.length-1];return"function"==typeof i?t.pop():i=H(),ot(e,t,(t,e,i)=>{e.apply(r,t.concat((t,...e)=>{i(t,e)}))},(t,e)=>i(t,...e)),i[$]}}function lt(...t){return at(...t.reverse())}function ht(t,e,r,i){return b(O(e),t,r,i)}var ut=y(ht,4);function ct(t,e,r,i){var n=g(r);return ut(t,e,(t,e)=>{n(t,(t,...r)=>t?e(t):e(t,r))},(t,e)=>{for(var r=[],n=0;n<e.length;n++)e[n]&&(r=r.concat(...e[n]));return i(t,r)})}var ft=y(ct,4);function dt(t,e,r){return ft(t,1/0,e,r)}var pt=y(dt,3);function gt(t,e,r){return ft(t,1,e,r)}var yt=y(gt,3);function mt(...t){return function(...e){return e.pop()(null,...t)}}function bt(t,e){return(r,i,n,s)=>{var o,a=!1;const l=g(n);r(i,(r,i,n)=>{l(r,(i,s)=>i||!1===i?n(i):t(s)&&!o?(a=!0,o=e(!0,r),n(null,w)):void n())},t=>{if(t)return s(t);s(null,a?o:e(!1))})}}function _t(t,e,r){return bt(t=>t,(t,e)=>e)(N,t,e,r)}var wt=y(_t,3);function vt(t,e,r,i){return bt(t=>t,(t,e)=>e)(O(e),t,r,i)}var St=y(vt,4);function Et(t,e,r){return bt(t=>t,(t,e)=>e)(O(1),t,e,r)}var xt=y(Et,3);function kt(t){return(e,...r)=>g(e)(...r,(e,...r)=>{"object"==typeof console&&(e?console.error&&console.error(e):console[t]&&r.forEach(e=>console[t](e)))})}var Tt=kt("dir");function Rt(t,e,r){r=R(r);var i,n=g(t),s=g(e);function o(t,...e){if(t)return r(t);!1!==t&&(i=e,s(...e,a))}function a(t,e){return t?r(t):!1!==t?e?void n(o):r(null,...i):void 0}return a(null,!0)}var At=y(Rt,3);function Ot(t,e,r){const i=g(e);return At(t,(...t)=>{const e=t.pop();i(...t,(t,r)=>e(t,!r))},r)}function Lt(t){return(e,r,i)=>t(e,i)}function Mt(t,e,r){return N(t,Lt(g(e)),r)}var Pt=y(Mt,3);function It(t,e,r,i){return O(e)(t,Lt(g(r)),i)}var Dt=y(It,4);function Nt(t,e,r){return Dt(t,1,e,r)}var Ct=y(Nt,3);function jt(t){return f(t)?t:function(...e){var r=e.pop(),i=!0;e.push((...t)=>{i?l(()=>r(...t)):r(...t)}),t.apply(this,e),i=!1}}function Ft(t,e,r){return bt(t=>!t,t=>!t)(N,t,e,r)}var Bt=y(Ft,3);function zt(t,e,r,i){return bt(t=>!t,t=>!t)(O(e),t,r,i)}var Wt=y(zt,4);function Ut(t,e,r){return bt(t=>!t,t=>!t)(z,t,e,r)}var Gt=y(Ut,3);function $t(t,e,r,i){var n=new Array(e.length);t(e,(t,e,i)=>{r(t,(t,r)=>{n[e]=!!r,i(t)})},t=>{if(t)return i(t);for(var r=[],s=0;s<e.length;s++)n[s]&&r.push(e[s]);i(null,r)})}function Ht(t,e,r,i){var n=[];t(e,(t,e,i)=>{r(t,(r,s)=>{if(r)return i(r);s&&n.push({index:e,value:t}),i(r)})},t=>{if(t)return i(t);i(null,n.sort((t,e)=>t.index-e.index).map(t=>t.value))})}function qt(t,e,r,i){return(_(e)?$t:Ht)(t,e,g(r),i)}function Vt(t,e,r){return qt(N,t,e,r)}var Zt=y(Vt,3);function Yt(t,e,r,i){return qt(O(e),t,r,i)}var Kt=y(Yt,4);function Qt(t,e,r){return qt(z,t,e,r)}var Xt=y(Qt,3);function Jt(t,e){var r=R(e),i=g(jt(t));function n(t){if(t)return r(t);!1!==t&&i(n)}return n()}var te=y(Jt,2);function ee(t,e,r,i){var n=g(r);return ut(t,e,(t,e)=>{n(t,(r,i)=>r?e(r):e(r,{key:i,val:t}))},(t,e)=>{for(var r={},{hasOwnProperty:n}=Object.prototype,s=0;s<e.length;s++)if(e[s]){var{key:o}=e[s],{val:a}=e[s];n.call(r,o)?r[o].push(a):r[o]=[a]}return i(t,r)})}var re=y(ee,4);function ie(t,e,r){return re(t,1/0,e,r)}function ne(t,e,r){return re(t,1,e,r)}var se=kt("log");function oe(t,e,r,i){i=v(i);var n={},s=g(r);return O(e)(t,(t,e,r)=>{s(t,e,(t,i)=>{if(t)return r(t);n[e]=i,r(t)})},t=>i(t,n))}var ae=y(oe,4);function le(t,e,r){return ae(t,1/0,e,r)}function he(t,e,r){return ae(t,1,e,r)}function ue(t,e=t=>t){var i=Object.create(null),n=Object.create(null),s=g(t),o=r((t,r)=>{var o=e(...t);o in i?l(()=>r(null,...i[o])):o in n?n[o].push(r):(n[o]=[r],s(...t,(t,...e)=>{t||(i[o]=e);var r=n[o];delete n[o];for(var s=0,a=r.length;s<a;s++)r[s](t,...e)}))});return o.memo=i,o.unmemoized=t,o}var ce=a(s?process.nextTick:n?setImmediate:o),fe=y((t,e,r)=>{var i=_(e)?[]:{};t(e,(t,e,r)=>{g(t)((t,...n)=>{n.length<2&&([n]=n),i[e]=n,r(t)})},t=>r(t,i))},3);function de(t,e){return fe(N,t,e)}function pe(t,e,r){return fe(O(e),t,r)}function ge(t,e){var r=g(t);return rt((t,e)=>{r(t[0],e)},e,1)}class ye{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(t){let e;for(;t>0&&_e(this.heap[t],this.heap[e=be(t)]);){let r=this.heap[t];this.heap[t]=this.heap[e],this.heap[e]=r,t=e}}percDown(t){let e;for(;(e=me(t))<this.heap.length&&(e+1<this.heap.length&&_e(this.heap[e+1],this.heap[e])&&(e+=1),!_e(this.heap[t],this.heap[e]));){let r=this.heap[t];this.heap[t]=this.heap[e],this.heap[e]=r,t=e}}push(t){t.pushCount=++this.pushCount,this.heap.push(t),this.percUp(this.heap.length-1)}unshift(t){return this.heap.push(t)}shift(){let[t]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),t}toArray(){return[...this]}*[Symbol.iterator](){for(let t=0;t<this.heap.length;t++)yield this.heap[t].data}remove(t){let e=0;for(let r=0;r<this.heap.length;r++)t(this.heap[r])||(this.heap[e]=this.heap[r],e++);this.heap.splice(e);for(let t=be(this.heap.length-1);t>=0;t--)this.percDown(t);return this}}function me(t){return 1+(t<<1)}function be(t){return(t+1>>1)-1}function _e(t,e){return t.priority!==e.priority?t.priority<e.priority:t.pushCount<e.pushCount}function we(t,e){var r=ge(t,e),{push:i,pushAsync:n}=r;function s(t,e){return Array.isArray(t)?t.map(t=>({data:t,priority:e})):{data:t,priority:e}}return r._tasks=new ye,r._createTaskItem=({data:t,priority:e},r)=>({data:t,priority:e,callback:r}),r.push=function(t,e=0,r){return i(s(t,e),r)},r.pushAsync=function(t,e=0,r){return n(s(t,e),r)},delete r.unshift,delete r.unshiftAsync,r}function ve(t,e){if(e=v(e),!Array.isArray(t))return e(new TypeError("First argument to race must be an array of functions"));if(!t.length)return e();for(var r=0,i=t.length;r<i;r++)g(t[r])(e)}var Se=y(ve,2);function Ee(t,e,r,i){var n=[...t].reverse();return ot(n,e,r,i)}function xe(t){var e=g(t);return r(function(t,r){return t.push((t,...e)=>{let i={};if(t&&(i.error=t),e.length>0){var n=e;e.length<=1&&([n]=e),i.value=n}r(null,i)}),e.apply(this,t)})}function ke(t){var e;return Array.isArray(t)?e=t.map(xe):(e={},Object.keys(t).forEach(r=>{e[r]=xe.call(this,t[r])})),e}function Te(t,e,r,i){const n=g(r);return qt(t,e,(t,e)=>{n(t,(t,r)=>{e(t,!r)})},i)}function Re(t,e,r){return Te(N,t,e,r)}var Ae=y(Re,3);function Oe(t,e,r,i){return Te(O(e),t,r,i)}var Le=y(Oe,4);function Me(t,e,r){return Te(z,t,e,r)}var Pe=y(Me,3);function Ie(t){return function(){return t}}const De=5,Ne=0;function Ce(t,e,r){var i={times:De,intervalFunc:Ie(Ne)};if(arguments.length<3&&"function"==typeof t?(r=e||H(),e=t):(je(i,t),r=r||H()),"function"!=typeof e)throw new Error("Invalid arguments for async.retry");var n=g(e),s=1;function o(){n((t,...e)=>{!1!==t&&(t&&s++<i.times&&("function"!=typeof i.errorFilter||i.errorFilter(t))?setTimeout(o,i.intervalFunc(s-1)):r(t,...e))})}return o(),r[$]}function je(t,e){if("object"==typeof e)t.times=+e.times||De,t.intervalFunc="function"==typeof e.interval?e.interval:Ie(+e.interval||Ne),t.errorFilter=e.errorFilter;else{if("number"!=typeof e&&"string"!=typeof e)throw new Error("Invalid arguments for async.retry");t.times=+e||De}}function Fe(t,e){e||(e=t,t=null);let i=t&&t.arity||e.length;f(e)&&(i+=1);var n=g(e);return r((e,r)=>{function s(t){n(...e,t)}return(e.length<i-1||null==r)&&(e.push(r),r=H()),t?Ce(t,s,r):Ce(s,r),r[$]})}function Be(t,e){return fe(z,t,e)}function ze(t,e,r){return bt(Boolean,t=>t)(N,t,e,r)}var We=y(ze,3);function Ue(t,e,r,i){return bt(Boolean,t=>t)(O(e),t,r,i)}var Ge=y(Ue,4);function $e(t,e,r){return bt(Boolean,t=>t)(z,t,e,r)}var He=y($e,3);function qe(t,e,r){var i=g(e);return j(t,(t,e)=>{i(t,(r,i)=>{if(r)return e(r);e(r,{value:t,criteria:i})})},(t,e)=>{if(t)return r(t);r(null,e.sort(n).map(t=>t.value))});function n(t,e){var r=t.criteria,i=e.criteria;return r<i?-1:r>i?1:0}}var Ve=y(qe,3);function Ze(t,e,i){var n=g(t);return r((r,s)=>{var o,a=!1;function l(){var e=t.name||"anonymous",r=new Error('Callback function "'+e+'" timed out.');r.code="ETIMEDOUT",i&&(r.info=i),a=!0,s(r)}r.push((...t)=>{a||(s(...t),clearTimeout(o))}),o=setTimeout(l,e),n(...r)})}function Ye(t){for(var e=Array(t);t--;)e[t]=t;return e}function Ke(t,e,r,i){var n=g(r);return ut(Ye(t),e,n,i)}function Qe(t,e,r){return Ke(t,1/0,e,r)}function Xe(t,e,r){return Ke(t,1,e,r)}function Je(t,e,r,i){arguments.length<=3&&"function"==typeof e&&(i=r,r=e,e=Array.isArray(t)?[]:{}),i=v(i||H());var n=g(r);return N(t,(t,r,i)=>{n(e,t,r,i)},t=>i(t,e)),i[$]}function tr(t,e){var r,i=null;return Ct(t,(t,e)=>{g(t)((t,...n)=>{if(!1===t)return e(t);n.length<2?[r]=n:r=n,i=t,e(t?null:{})})},()=>e(i,r))}var er=y(tr);function rr(t){return(...e)=>(t.unmemoized||t)(...e)}function ir(t,e,r){r=R(r);var i=g(e),n=g(t),s=[];function o(t,...e){if(t)return r(t);s=e,!1!==t&&n(a)}function a(t,e){return t?r(t):!1!==t?e?void i(o):r(null,...s):void 0}return n(a)}var nr=y(ir,3);function sr(t,e,r){const i=g(t);return nr(t=>i((e,r)=>t(e,!r)),e,r)}function or(t,e){if(e=v(e),!Array.isArray(t))return e(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return e();var r=0;function i(e){g(t[r++])(...e,R(n))}function n(n,...s){if(!1!==n)return n||r===t.length?e(n,...s):void i(s)}i([])}var ar=y(or),lr={apply:e,applyEach:F,applyEachSeries:G,asyncify:h,auto:q,autoInject:J,cargo:it,cargoQueue:nt,compose:lt,concat:pt,concatLimit:ft,concatSeries:yt,constant:mt,detect:wt,detectLimit:St,detectSeries:xt,dir:Tt,doUntil:Ot,doWhilst:At,each:Pt,eachLimit:Dt,eachOf:N,eachOfLimit:M,eachOfSeries:z,eachSeries:Ct,ensureAsync:jt,every:Bt,everyLimit:Wt,everySeries:Gt,filter:Zt,filterLimit:Kt,filterSeries:Xt,forever:te,groupBy:ie,groupByLimit:re,groupBySeries:ne,log:se,map:j,mapLimit:ut,mapSeries:U,mapValues:le,mapValuesLimit:ae,mapValuesSeries:he,memoize:ue,nextTick:ce,parallel:de,parallelLimit:pe,priorityQueue:we,queue:ge,race:Se,reduce:ot,reduceRight:Ee,reflect:xe,reflectAll:ke,reject:Ae,rejectLimit:Le,rejectSeries:Pe,retry:Ce,retryable:Fe,seq:at,series:Be,setImmediate:l,some:We,someLimit:Ge,someSeries:He,sortBy:Ve,timeout:Ze,times:Qe,timesLimit:Ke,timesSeries:Xe,transform:Je,tryEach:er,unmemoize:rr,until:sr,waterfall:ar,whilst:nr,all:Bt,allLimit:Wt,allSeries:Gt,any:We,anyLimit:Ge,anySeries:He,find:wt,findLimit:St,findSeries:xt,flatMap:pt,flatMapLimit:ft,flatMapSeries:yt,forEach:Pt,forEachSeries:Ct,forEachLimit:Dt,forEachOf:N,forEachOfSeries:z,forEachOfLimit:M,inject:ot,foldl:ot,foldr:Ee,select:Zt,selectLimit:Kt,selectSeries:Xt,wrapSync:h,during:nr,doDuring:At};t.all=Bt,t.allLimit=Wt,t.allSeries=Gt,t.any=We,t.anyLimit=Ge,t.anySeries=He,t.apply=e,t.applyEach=F,t.applyEachSeries=G,t.asyncify=h,t.auto=q,t.autoInject=J,t.cargo=it,t.cargoQueue=nt,t.compose=lt,t.concat=pt,t.concatLimit=ft,t.concatSeries=yt,t.constant=mt,t.default=lr,t.detect=wt,t.detectLimit=St,t.detectSeries=xt,t.dir=Tt,t.doDuring=At,t.doUntil=Ot,t.doWhilst=At,t.during=nr,t.each=Pt,t.eachLimit=Dt,t.eachOf=N,t.eachOfLimit=M,t.eachOfSeries=z,t.eachSeries=Ct,t.ensureAsync=jt,t.every=Bt,t.everyLimit=Wt,t.everySeries=Gt,t.filter=Zt,t.filterLimit=Kt,t.filterSeries=Xt,t.find=wt,t.findLimit=St,t.findSeries=xt,t.flatMap=pt,t.flatMapLimit=ft,t.flatMapSeries=yt,t.foldl=ot,t.foldr=Ee,t.forEach=Pt,t.forEachLimit=Dt,t.forEachOf=N,t.forEachOfLimit=M,t.forEachOfSeries=z,t.forEachSeries=Ct,t.forever=te,t.groupBy=ie,t.groupByLimit=re,t.groupBySeries=ne,t.inject=ot,t.log=se,t.map=j,t.mapLimit=ut,t.mapSeries=U,t.mapValues=le,t.mapValuesLimit=ae,t.mapValuesSeries=he,t.memoize=ue,t.nextTick=ce,t.parallel=de,t.parallelLimit=pe,t.priorityQueue=we,t.queue=ge,t.race=Se,t.reduce=ot,t.reduceRight=Ee,t.reflect=xe,t.reflectAll=ke,t.reject=Ae,t.rejectLimit=Le,t.rejectSeries=Pe,t.retry=Ce,t.retryable=Fe,t.select=Zt,t.selectLimit=Kt,t.selectSeries=Xt,t.seq=at,t.series=Be,t.setImmediate=l,t.some=We,t.someLimit=Ge,t.someSeries=He,t.sortBy=Ve,t.timeout=Ze,t.times=Qe,t.timesLimit=Ke,t.timesSeries=Xe,t.transform=Je,t.tryEach=er,t.unmemoize=rr,t.until=sr,t.waterfall=ar,t.whilst=nr,t.wrapSync=h,Object.defineProperty(t,"__esModule",{value:!0})}(F.exports)),F.exports}var z,W,U,G,$,H,q,V,Z,Y,K={exports:{}};function Q(){if(W)return z;W=1;var t=n,e=process.cwd,r=null,i=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return r||(r=e.call(process)),r};try{process.cwd()}catch(t){}if("function"==typeof process.chdir){var s=process.chdir;process.chdir=function(t){r=null,s.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,s)}return z=function(e){t.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(r,i,n){e.open(r,t.O_WRONLY|t.O_SYMLINK,i,function(t,r){t?n&&n(t):e.fchmod(r,i,function(t){e.close(r,function(e){n&&n(t||e)})})})},e.lchmodSync=function(r,i){var n,s=e.openSync(r,t.O_WRONLY|t.O_SYMLINK,i),o=!0;try{n=e.fchmodSync(s,i),o=!1}finally{if(o)try{e.closeSync(s)}catch(t){}else e.closeSync(s)}return n}}(e);e.lutimes||function(e){t.hasOwnProperty("O_SYMLINK")&&e.futimes?(e.lutimes=function(r,i,n,s){e.open(r,t.O_SYMLINK,function(t,r){t?s&&s(t):e.futimes(r,i,n,function(t){e.close(r,function(e){s&&s(t||e)})})})},e.lutimesSync=function(r,i,n){var s,o=e.openSync(r,t.O_SYMLINK),a=!0;try{s=e.futimesSync(o,i,n),a=!1}finally{if(a)try{e.closeSync(o)}catch(t){}else e.closeSync(o)}return s}):e.futimes&&(e.lutimes=function(t,e,r,i){i&&process.nextTick(i)},e.lutimesSync=function(){})}(e);e.chown=s(e.chown),e.fchown=s(e.fchown),e.lchown=s(e.lchown),e.chmod=r(e.chmod),e.fchmod=r(e.fchmod),e.lchmod=r(e.lchmod),e.chownSync=o(e.chownSync),e.fchownSync=o(e.fchownSync),e.lchownSync=o(e.lchownSync),e.chmodSync=n(e.chmodSync),e.fchmodSync=n(e.fchmodSync),e.lchmodSync=n(e.lchmodSync),e.stat=a(e.stat),e.fstat=a(e.fstat),e.lstat=a(e.lstat),e.statSync=l(e.statSync),e.fstatSync=l(e.fstatSync),e.lstatSync=l(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(t,e,r){r&&process.nextTick(r)},e.lchmodSync=function(){});e.chown&&!e.lchown&&(e.lchown=function(t,e,r,i){i&&process.nextTick(i)},e.lchownSync=function(){});"win32"===i&&(e.rename="function"!=typeof e.rename?e.rename:function(t){function r(r,i,n){var s=Date.now(),o=0;t(r,i,function a(l){if(l&&("EACCES"===l.code||"EPERM"===l.code||"EBUSY"===l.code)&&Date.now()-s<6e4)return setTimeout(function(){e.stat(i,function(e,s){e&&"ENOENT"===e.code?t(r,i,a):n(l)})},o),void(o<100&&(o+=10));n&&n(l)})}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.rename));function r(t){return t?function(r,i,n){return t.call(e,r,i,function(t){h(t)&&(t=null),n&&n.apply(this,arguments)})}:t}function n(t){return t?function(r,i){try{return t.call(e,r,i)}catch(t){if(!h(t))throw t}}:t}function s(t){return t?function(r,i,n,s){return t.call(e,r,i,n,function(t){h(t)&&(t=null),s&&s.apply(this,arguments)})}:t}function o(t){return t?function(r,i,n){try{return t.call(e,r,i,n)}catch(t){if(!h(t))throw t}}:t}function a(t){return t?function(r,i,n){function s(t,e){e&&(e.uid<0&&(e.uid+=4294967296),e.gid<0&&(e.gid+=4294967296)),n&&n.apply(this,arguments)}return"function"==typeof i&&(n=i,i=null),i?t.call(e,r,i,s):t.call(e,r,s)}:t}function l(t){return t?function(r,i){var n=i?t.call(e,r,i):t.call(e,r);return n&&(n.uid<0&&(n.uid+=4294967296),n.gid<0&&(n.gid+=4294967296)),n}:t}function h(t){return!t||("ENOSYS"===t.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==t.code&&"EPERM"!==t.code))}e.read="function"!=typeof e.read?e.read:function(t){function r(r,i,n,s,o,a){var l;if(a&&"function"==typeof a){var h=0;l=function(u,c,f){if(u&&"EAGAIN"===u.code&&h<10)return h++,t.call(e,r,i,n,s,o,l);a.apply(this,arguments)}}return t.call(e,r,i,n,s,o,l)}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.read),e.readSync="function"!=typeof e.readSync?e.readSync:(u=e.readSync,function(t,r,i,n,s){for(var o=0;;)try{return u.call(e,t,r,i,n,s)}catch(t){if("EAGAIN"===t.code&&o<10){o++;continue}throw t}});var u},z}function X(){if(V)return q;V=1;var e,r,i=t,n=Q(),l=function(){if(G)return U;G=1;var t=s.Stream;return U=function(e){return{ReadStream:function r(i,n){if(!(this instanceof r))return new r(i,n);t.call(this);var s=this;this.path=i,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,n=n||{};for(var o=Object.keys(n),a=0,l=o.length;a<l;a++){var h=o[a];this[h]=n[h]}if(this.encoding&&this.setEncoding(this.encoding),void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}null===this.fd?e.open(this.path,this.flags,this.mode,function(t,e){if(t)return s.emit("error",t),void(s.readable=!1);s.fd=e,s.emit("open",e),s._read()}):process.nextTick(function(){s._read()})},WriteStream:function r(i,n){if(!(this instanceof r))return new r(i,n);t.call(this),this.path=i,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,n=n||{};for(var s=Object.keys(n),o=0,a=s.length;o<a;o++){var l=s[o];this[l]=n[l]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}},U}(),h=function(){if(H)return $;H=1,$=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var r={__proto__:t(e)};else r=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}),r};var t=Object.getPrototypeOf||function(t){return t.__proto__};return $}(),u=o;function c(t,r){Object.defineProperty(t,e,{get:function(){return r}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(e=Symbol.for("graceful-fs.queue"),r=Symbol.for("graceful-fs.previous")):(e="___graceful-fs.queue",r="___graceful-fs.previous");var f,d=function(){};if(u.debuglog?d=u.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(d=function(){var t=u.format.apply(u,arguments);t="GFS4: "+t.split(/\n/).join("\nGFS4: "),console.error(t)}),!i[e]){var p=m[e]||[];c(i,p),i.close=function(t){function e(e,r){return t.call(i,e,function(t){t||b(),"function"==typeof r&&r.apply(this,arguments)})}return Object.defineProperty(e,r,{value:t}),e}(i.close),i.closeSync=function(t){function e(e){t.apply(i,arguments),b()}return Object.defineProperty(e,r,{value:t}),e}(i.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){d(i[e]),a.equal(i[e].length,0)})}function g(t){n(t),t.gracefulify=g,t.createReadStream=function(e,r){return new t.ReadStream(e,r)},t.createWriteStream=function(e,r){return new t.WriteStream(e,r)};var e=t.readFile;t.readFile=function(t,r,i){"function"==typeof r&&(i=r,r=null);return function t(r,i,n,s){return e(r,i,function(e){!e||"EMFILE"!==e.code&&"ENFILE"!==e.code?"function"==typeof n&&n.apply(this,arguments):y([t,[r,i,n],e,s||Date.now(),Date.now()])})}(t,r,i)};var r=t.writeFile;t.writeFile=function(t,e,i,n){"function"==typeof i&&(n=i,i=null);return function t(e,i,n,s,o){return r(e,i,n,function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?"function"==typeof s&&s.apply(this,arguments):y([t,[e,i,n,s],r,o||Date.now(),Date.now()])})}(t,e,i,n)};var i=t.appendFile;i&&(t.appendFile=function(t,e,r,n){"function"==typeof r&&(n=r,r=null);return function t(e,r,n,s,o){return i(e,r,n,function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?"function"==typeof s&&s.apply(this,arguments):y([t,[e,r,n,s],i,o||Date.now(),Date.now()])})}(t,e,r,n)});var s=t.copyFile;s&&(t.copyFile=function(t,e,r,i){"function"==typeof r&&(i=r,r=0);return function t(e,r,i,n,o){return s(e,r,i,function(s){!s||"EMFILE"!==s.code&&"ENFILE"!==s.code?"function"==typeof n&&n.apply(this,arguments):y([t,[e,r,i,n],s,o||Date.now(),Date.now()])})}(t,e,r,i)});var o=t.readdir;t.readdir=function(t,e,r){"function"==typeof e&&(r=e,e=null);var i=a.test(process.version)?function(t,e,r,i){return o(t,n(t,e,r,i))}:function(t,e,r,i){return o(t,e,n(t,e,r,i))};return i(t,e,r);function n(t,e,r,n){return function(s,o){!s||"EMFILE"!==s.code&&"ENFILE"!==s.code?(o&&o.sort&&o.sort(),"function"==typeof r&&r.call(this,s,o)):y([i,[t,e,r],s,n||Date.now(),Date.now()])}}};var a=/^v[0-5]\./;if("v0.8"===process.version.substr(0,4)){var h=l(t);p=h.ReadStream,m=h.WriteStream}var u=t.ReadStream;u&&(p.prototype=Object.create(u.prototype),p.prototype.open=function(){var t=this;_(t.path,t.flags,t.mode,function(e,r){e?(t.autoClose&&t.destroy(),t.emit("error",e)):(t.fd=r,t.emit("open",r),t.read())})});var c=t.WriteStream;c&&(m.prototype=Object.create(c.prototype),m.prototype.open=function(){var t=this;_(t.path,t.flags,t.mode,function(e,r){e?(t.destroy(),t.emit("error",e)):(t.fd=r,t.emit("open",r))})}),Object.defineProperty(t,"ReadStream",{get:function(){return p},set:function(t){p=t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return m},set:function(t){m=t},enumerable:!0,configurable:!0});var f=p;Object.defineProperty(t,"FileReadStream",{get:function(){return f},set:function(t){f=t},enumerable:!0,configurable:!0});var d=m;function p(t,e){return this instanceof p?(u.apply(this,arguments),this):p.apply(Object.create(p.prototype),arguments)}function m(t,e){return this instanceof m?(c.apply(this,arguments),this):m.apply(Object.create(m.prototype),arguments)}Object.defineProperty(t,"FileWriteStream",{get:function(){return d},set:function(t){d=t},enumerable:!0,configurable:!0});var b=t.open;function _(t,e,r,i){return"function"==typeof r&&(i=r,r=null),function t(e,r,i,n,s){return b(e,r,i,function(o,a){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?"function"==typeof n&&n.apply(this,arguments):y([t,[e,r,i,n],o,s||Date.now(),Date.now()])})}(t,e,r,i)}return t.open=_,t}function y(t){d("ENQUEUE",t[0].name,t[1]),i[e].push(t),_()}function b(){for(var t=Date.now(),r=0;r<i[e].length;++r)i[e][r].length>2&&(i[e][r][3]=t,i[e][r][4]=t);_()}function _(){if(clearTimeout(f),f=void 0,0!==i[e].length){var t=i[e].shift(),r=t[0],n=t[1],s=t[2],o=t[3],a=t[4];if(void 0===o)d("RETRY",r.name,n),r.apply(null,n);else if(Date.now()-o>=6e4){d("TIMEOUT",r.name,n);var l=n.pop();"function"==typeof l&&l.call(null,s)}else{var h=Date.now()-a,u=Math.max(a-o,1);h>=Math.min(1.2*u,100)?(d("RETRY",r.name,n),r.apply(null,n.concat([o]))):i[e].push(t)}void 0===f&&(f=setTimeout(_,0))}}return m[e]||c(m,i[e]),q=g(h(i)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!i.__patched&&(q=g(i),i.__patched=!0),q}function J(){if(Y)return Z;Y=1;const t=t=>null!==t&&"object"==typeof t&&"function"==typeof t.pipe;return t.writable=e=>t(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,t.readable=e=>t(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,t.duplex=e=>t.writable(e)&&t.readable(e),t.transform=e=>t.duplex(e)&&"function"==typeof e._transform,Z=t}var tt,et,rt,it,nt,st={exports:{}},ot={exports:{}};function at(){if(tt)return ot.exports;return tt=1,"undefined"==typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?ot.exports={nextTick:function(t,e,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var n,s,o=arguments.length;switch(o){case 0:case 1:return process.nextTick(t);case 2:return process.nextTick(function(){t.call(null,e)});case 3:return process.nextTick(function(){t.call(null,e,r)});case 4:return process.nextTick(function(){t.call(null,e,r,i)});default:for(n=new Array(o-1),s=0;s<n.length;)n[s++]=arguments[s];return process.nextTick(function(){t.apply(null,n)})}}}:ot.exports=process,ot.exports}function lt(){return nt?it:(nt=1,it=s)}var ht,ut={exports:{}};function ct(){return ht||(ht=1,function(t,e){var r=l,i=r.Buffer;function n(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(n(r,e),e.Buffer=s),n(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}}(ut,ut.exports)),ut.exports}var ft,dt={};function pt(){if(ft)return dt;function t(t){return Object.prototype.toString.call(t)}return ft=1,dt.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},dt.isBoolean=function(t){return"boolean"==typeof t},dt.isNull=function(t){return null===t},dt.isNullOrUndefined=function(t){return null==t},dt.isNumber=function(t){return"number"==typeof t},dt.isString=function(t){return"string"==typeof t},dt.isSymbol=function(t){return"symbol"==typeof t},dt.isUndefined=function(t){return void 0===t},dt.isRegExp=function(e){return"[object RegExp]"===t(e)},dt.isObject=function(t){return"object"==typeof t&&null!==t},dt.isDate=function(e){return"[object Date]"===t(e)},dt.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},dt.isFunction=function(t){return"function"==typeof t},dt.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},dt.isBuffer=l.Buffer.isBuffer,dt}var gt,yt,mt={exports:{}},bt={exports:{}};function _t(){if(yt)return mt.exports;yt=1;try{var t=require("util");if("function"!=typeof t.inherits)throw"";mt.exports=t.inherits}catch(t){mt.exports=(gt||(gt=1,"function"==typeof Object.create?bt.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:bt.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}),bt.exports)}return mt.exports}var wt,vt,St,Et,xt,kt,Tt,Rt,At,Ot={exports:{}};function Lt(){return wt||(wt=1,function(t){var e=ct().Buffer,r=o;function i(t,e,r){t.copy(e,r)}t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return e.alloc(0);for(var r=e.allocUnsafe(t>>>0),n=this.head,s=0;n;)i(n.data,r,s),s+=n.data.length,n=n.next;return r},t}(),r&&r.inspect&&r.inspect.custom&&(t.exports.prototype[r.inspect.custom]=function(){var t=r.inspect({length:this.length});return this.constructor.name+" "+t})}(Ot)),Ot.exports}function Mt(){if(St)return vt;St=1;var t=at();function e(t,e){t.emit("error",e)}return vt={destroy:function(r,i){var n=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(i?i(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(e,this,r)):t.nextTick(e,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(r){!i&&r?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,t.nextTick(e,n,r)):t.nextTick(e,n,r):i&&i(r)}),this)},undestroy:function(){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 Pt(){if(Tt)return kt;Tt=1;var t=at();function e(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var i=t.entry;t.entry=null;for(;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}(e,t)}}kt=p;var r,i=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:t.nextTick;p.WritableState=d;var n=Object.create(pt());n.inherits=_t();var s={deprecate:xt?Et:(xt=1,Et=o.deprecate)},a=lt(),l=ct().Buffer,h=(void 0!==m?m:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var u,c=Mt();function f(){}function d(n,s){r=r||It(),n=n||{};var o=s instanceof r;this.objectMode=!!n.objectMode,o&&(this.objectMode=this.objectMode||!!n.writableObjectMode);var a=n.highWaterMark,l=n.writableHighWaterMark,h=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:o&&(l||0===l)?l:h,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 u=!1===n.decodeStrings;this.decodeStrings=!u,this.defaultEncoding=n.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,r){var n=e._writableState,s=n.sync,o=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),r)!function(e,r,i,n,s){--r.pendingcb,i?(t.nextTick(s,n),t.nextTick(v,e,r),e._writableState.errorEmitted=!0,e.emit("error",n)):(s(n),e._writableState.errorEmitted=!0,e.emit("error",n),v(e,r))}(e,n,s,r,o);else{var a=_(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||b(e,n),s?i(y,e,n,a,o):y(e,n,a,o)}}(s,e)},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 e(this)}function p(t){if(r=r||It(),!(u.call(p,this)||this instanceof r))return new p(t);this._writableState=new d(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function g(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function y(t,e,r,i){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,i(),v(t,e)}function b(t,r){r.bufferProcessing=!0;var i=r.bufferedRequest;if(t._writev&&i&&i.next){var n=r.bufferedRequestCount,s=new Array(n),o=r.corkedRequestsFree;o.entry=i;for(var a=0,l=!0;i;)s[a]=i,i.isBuf||(l=!1),i=i.next,a+=1;s.allBuffers=l,g(t,r,!0,r.length,s,"",o.finish),r.pendingcb++,r.lastBufferedRequest=null,o.next?(r.corkedRequestsFree=o.next,o.next=null):r.corkedRequestsFree=new e(r),r.bufferedRequestCount=0}else{for(;i;){var h=i.chunk,u=i.encoding,c=i.callback;if(g(t,r,!1,r.objectMode?1:h.length,h,u,c),i=i.next,r.bufferedRequestCount--,r.writing)break}null===i&&(r.lastBufferedRequest=null)}r.bufferedRequest=i,r.bufferProcessing=!1}function _(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function w(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),v(t,e)})}function v(e,r){var i=_(r);return i&&(!function(e,r){r.prefinished||r.finalCalled||("function"==typeof e._final?(r.pendingcb++,r.finalCalled=!0,t.nextTick(w,e,r)):(r.prefinished=!0,e.emit("prefinish")))}(e,r),0===r.pendingcb&&(r.finished=!0,e.emit("finish"))),i}return n.inherits(p,a),d.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(d.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(p,Symbol.hasInstance,{value:function(t){return!!u.call(this,t)||this===p&&(t&&t._writableState instanceof d)}})):u=function(t){return t instanceof this},p.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},p.prototype.write=function(e,r,i){var n,s=this._writableState,o=!1,a=!s.objectMode&&(n=e,l.isBuffer(n)||n instanceof h);return a&&!l.isBuffer(e)&&(e=function(t){return l.from(t)}(e)),"function"==typeof r&&(i=r,r=null),a?r="buffer":r||(r=s.defaultEncoding),"function"!=typeof i&&(i=f),s.ended?function(e,r){var i=new Error("write after end");e.emit("error",i),t.nextTick(r,i)}(this,i):(a||function(e,r,i,n){var s=!0,o=!1;return null===i?o=new TypeError("May not write null values to stream"):"string"==typeof i||void 0===i||r.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),t.nextTick(n,o),s=!1),s}(this,s,e,i))&&(s.pendingcb++,o=function(t,e,r,i,n,s){if(!r){var o=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=l.from(e,r));return e}(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=e.objectMode?1:i.length;e.length+=a;var h=e.length<e.highWaterMark;h||(e.needDrain=!0);if(e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else g(t,e,!1,a,i,n,s);return h}(this,s,a,e,r,i)),o},p.prototype.cork=function(){this._writableState.corked++},p.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||b(this,t))},p.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(p.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),p.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},p.prototype._writev=null,p.prototype.end=function(e,r,i){var n=this._writableState;"function"==typeof e?(i=e,e=null,r=null):"function"==typeof r&&(i=r,r=null),null!=e&&this.write(e,r),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,r,i){r.ending=!0,v(e,r),i&&(r.finished?t.nextTick(i):e.once("finish",i));r.ended=!0,e.writable=!1}(this,n,i)},Object.defineProperty(p.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),p.prototype.destroy=c.destroy,p.prototype._undestroy=c.undestroy,p.prototype._destroy=function(t,e){this.end(),e(t)},kt}function It(){if(At)return Rt;At=1;var t=at(),e=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Rt=l;var r=Object.create(pt());r.inherits=_t();var i=lr(),n=Pt();r.inherits(l,i);for(var s=e(n.prototype),o=0;o<s.length;o++){var a=s[o];l.prototype[a]||(l.prototype[a]=n.prototype[a])}function l(t){if(!(this instanceof l))return new l(t);i.call(this,t),n.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||t.nextTick(u,this)}function u(t){t.end()}return Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),l.prototype._destroy=function(e,r){this.push(null),this.end(),t.nextTick(r,e)},Rt}var Dt,Nt,Ct,jt,Ft,Bt,zt,Wt,Ut,Gt,$t,Ht,qt,Vt,Zt,Yt,Kt,Qt,Xt,Jt,te,ee,re,ie,ne,se,oe,ae,le,he,ue,ce,fe,de,pe,ge,ye,me,be,_e,we,ve,Se,Ee,xe,ke,Te,Re,Ae,Oe,Le,Me,Pe,Ie,De,Ne,Ce,je,Fe,Be,ze,We,Ue,Ge,$e,He,qe,Ve,Ze,Ye,Ke,Qe,Xe,Je,tr,er,rr,ir,nr,sr,or={};function ar(){if(Dt)return or;Dt=1;var t=ct().Buffer,e=t.isEncoding||function(t){switch((t=""+t)&&t.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 r(r){var i;switch(this.encoding=function(r){var i=function(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(r);if("string"!=typeof i&&(t.isEncoding===e||!e(r)))throw new Error("Unknown encoding: "+r);return i||r}(r),this.encoding){case"utf16le":this.text=s,this.end=o,i=4;break;case"utf8":this.fillLast=n,i=4;break;case"base64":this.text=a,this.end=l,i=3;break;default:return this.write=h,void(this.end=u)}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(i)}function i(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function n(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function s(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function o(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function a(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function u(t){return t&&t.length?this.write(t):""}return or.StringDecoder=r,r.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},r.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},r.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var s=i(e[n]);if(s>=0)return s>0&&(t.lastNeed=s-1),s;if(--n<r||-2===s)return 0;if(s=i(e[n]),s>=0)return s>0&&(t.lastNeed=s-2),s;if(--n<r||-2===s)return 0;if(s=i(e[n]),s>=0)return s>0&&(2===s?s=0:t.lastNeed=s-3),s;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},r.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length},or}function lr(){if(Ct)return Nt;Ct=1;var t=at();Nt=y;var e,r=function(){if(rt)return et;rt=1;var t={}.toString;return et=Array.isArray||function(e){return"[object Array]"==t.call(e)}}();y.ReadableState=g,P().EventEmitter;var i=function(t,e){return t.listeners(e).length},n=lt(),s=ct().Buffer,a=(void 0!==m?m:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var l=Object.create(pt());l.inherits=_t();var h=o,u=void 0;u=h&&h.debuglog?h.debuglog("stream"):function(){};var c,f=Lt(),d=Mt();l.inherits(y,n);var p=["error","close","destroy","pause","resume"];function g(t,r){t=t||{};var i=r instanceof(e=e||It());this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,s=t.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(s||0===s)?s:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new f,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=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(c||(c=ar().StringDecoder),this.decoder=new c(t.encoding),this.encoding=t.encoding)}function y(t){if(e=e||It(),!(this instanceof y))return new y(t);this._readableState=new g(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),n.call(this)}function b(t,e,r,i,n){var o,l=t._readableState;null===e?(l.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,S(t)}(t,l)):(n||(o=function(t,e){var r;i=e,s.isBuffer(i)||i instanceof a||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var i;return r}(l,e)),o?t.emit("error",o):l.objectMode||e&&e.length>0?("string"==typeof e||l.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),i?l.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_(t,l,e,!0):l.ended?t.emit("error",new Error("stream.push() after EOF")):(l.reading=!1,l.decoder&&!r?(e=l.decoder.write(e),l.objectMode||0!==e.length?_(t,l,e,!1):x(t,l)):_(t,l,e,!1))):i||(l.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(l)}function _(t,e,r,i){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&S(t)),x(t,e)}Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),y.prototype.destroy=d.destroy,y.prototype._undestroy=d.undestroy,y.prototype._destroy=function(t,e){this.push(null),e(t)},y.prototype.push=function(t,e){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof t&&((e=e||i.defaultEncoding)!==i.encoding&&(t=s.from(t,e),e=""),r=!0),b(this,t,e,!1,r)},y.prototype.unshift=function(t){return b(this,t,null,!0,!1)},y.prototype.isPaused=function(){return!1===this._readableState.flowing},y.prototype.setEncoding=function(t){return c||(c=ar().StringDecoder),this._readableState.decoder=new c(t),this._readableState.encoding=t,this};var w=8388608;function v(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=w?t=w:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function S(e){var r=e._readableState;r.needReadable=!1,r.emittedReadable||(u("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?t.nextTick(E,e):E(e))}function E(t){u("emit readable"),t.emit("readable"),A(t)}function x(e,r){r.readingMore||(r.readingMore=!0,t.nextTick(k,e,r))}function k(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(u("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function T(t){u("readable nexttick read 0"),t.read(0)}function R(t,e){e.reading||(u("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),A(t),e.flowing&&!e.reading&&t.read(0)}function A(t){var e=t._readableState;for(u("flow",e.flowing);e.flowing&&null!==t.read(););}function O(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var i;t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):i=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,i=1,n=r.data;t-=n.length;for(;r=r.next;){var s=r.data,o=t>s.length?s.length:t;if(o===s.length?n+=s:n+=s.slice(0,t),0===(t-=o)){o===s.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=s.slice(o));break}++i}return e.length-=i,n}(t,e):function(t,e){var r=s.allocUnsafe(t),i=e.head,n=1;i.data.copy(r),t-=i.data.length;for(;i=i.next;){var o=i.data,a=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,a),0===(t-=a)){a===o.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=o.slice(a));break}++n}return e.length-=n,r}(t,e);return i}(t,e.buffer,e.decoder),r);var r}function L(e){var r=e._readableState;if(r.length>0)throw new Error('"endReadable()" called on non-empty stream');r.endEmitted||(r.ended=!0,t.nextTick(M,r,e))}function M(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function I(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}return y.prototype.read=function(t){u("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return u("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?L(this):S(this),null;if(0===(t=v(t,e))&&e.ended)return 0===e.length&&L(this),null;var i,n=e.needReadable;return u("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&u("length less than watermark",n=!0),e.ended||e.reading?u("reading or ended",n=!1):n&&(u("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=v(r,e))),null===(i=t>0?O(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&L(this)),null!==i&&this.emit("data",i),i},y.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(e,n){var s=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,u("pipe count=%d opts=%j",o.pipesCount,n);var a=(!n||!1!==n.end)&&e!==process.stdout&&e!==process.stderr?h:b;function l(t,r){u("onunpipe"),t===s&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,u("cleanup"),e.removeListener("close",y),e.removeListener("finish",m),e.removeListener("drain",c),e.removeListener("error",g),e.removeListener("unpipe",l),s.removeListener("end",h),s.removeListener("end",b),s.removeListener("data",p),f=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function h(){u("onend"),e.end()}o.endEmitted?t.nextTick(a):s.once("end",a),e.on("unpipe",l);var c=function(t){return function(){var e=t._readableState;u("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&i(t,"data")&&(e.flowing=!0,A(t))}}(s);e.on("drain",c);var f=!1;var d=!1;function p(t){u("ondata"),d=!1,!1!==e.write(t)||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==I(o.pipes,e))&&!f&&(u("false write response, pause",o.awaitDrain),o.awaitDrain++,d=!0),s.pause())}function g(t){u("onerror",t),b(),e.removeListener("error",g),0===i(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",m),b()}function m(){u("onfinish"),e.removeListener("close",y),b()}function b(){u("unpipe"),s.unpipe(e)}return s.on("data",p),function(t,e,i){if("function"==typeof t.prependListener)return t.prependListener(e,i);t._events&&t._events[e]?r(t._events[e])?t._events[e].unshift(i):t._events[e]=[i,t._events[e]]:t.on(e,i)}(e,"error",g),e.once("close",y),e.once("finish",m),e.emit("pipe",s),o.flowing||(u("pipe resume"),s.resume()),e},y.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=I(e.pipes,t);return-1===o||(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},y.prototype.on=function(e,r){var i=n.prototype.on.call(this,e,r);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var s=this._readableState;s.endEmitted||s.readableListening||(s.readableListening=s.needReadable=!0,s.emittedReadable=!1,s.reading?s.length&&S(this):t.nextTick(T,this))}return i},y.prototype.addListener=y.prototype.on,y.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!0,function(e,r){r.resumeScheduled||(r.resumeScheduled=!0,t.nextTick(R,e,r))}(this,e)),this},y.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this},y.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var n in t.on("end",function(){if(u("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(n){(u("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(e.push(n)||(i=!0,t.pause()))}),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var s=0;s<p.length;s++)t.on(p[s],this.emit.bind(this,p[s]));return this._read=function(e){u("wrapped _read",e),i&&(i=!1,t.resume())},this},Object.defineProperty(y.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),y._fromList=O,Nt}function hr(){if(Ft)return jt;Ft=1,jt=i;var t=It(),e=Object.create(pt());function r(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function i(e){if(!(this instanceof i))return new i(e);t.call(this,e),this._transformState={afterTransform:r.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",n)}function n(){var t=this;"function"==typeof this._flush?this._flush(function(e,r){s(t,e,r)}):s(this,null,null)}function s(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}return e.inherits=_t(),e.inherits(i,t),i.prototype.push=function(e,r){return this._transformState.needTransform=!1,t.prototype.push.call(this,e,r)},i.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},i.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},i.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},i.prototype._destroy=function(e,r){var i=this;t.prototype._destroy.call(this,e,function(t){r(t),i.emit("close")})},jt}function ur(){return Wt||(Wt=1,t=st,e=st.exports,r=s,"disable"===process.env.READABLE_STREAM&&r?(t.exports=r,(e=t.exports=r.Readable).Readable=r.Readable,e.Writable=r.Writable,e.Duplex=r.Duplex,e.Transform=r.Transform,e.PassThrough=r.PassThrough,e.Stream=r):((e=t.exports=lr()).Stream=r||e,e.Readable=e,e.Writable=Pt(),e.Duplex=It(),e.Transform=hr(),e.PassThrough=function(){if(zt)return Bt;zt=1,Bt=r;var t=hr(),e=Object.create(pt());function r(e){if(!(this instanceof r))return new r(e);t.call(this,e)}return e.inherits=_t(),e.inherits(r,t),r.prototype._transform=function(t,e,r){r(null,t)},Bt}())),st.exports;var t,e,r}function cr(){if(Ht)return $t;Ht=1;var t=o,e=Gt?Ut:(Gt=1,Ut=ur().PassThrough);function r(t,e,r){t[e]=function(){return delete t[e],r.apply(this,arguments),this[e].apply(this,arguments)}}function i(t,n){if(!(this instanceof i))return new i(t,n);e.call(this,n),r(this,"_read",function(){var e=t.call(this,n),r=this.emit.bind(this,"error");e.on("error",r),e.pipe(this)}),this.emit("readable")}function n(t,i){if(!(this instanceof n))return new n(t,i);e.call(this,i),r(this,"_write",function(){var e=t.call(this,i),r=this.emit.bind(this,"error");e.on("error",r),this.pipe(e)}),this.emit("writable")}return $t={Readable:i,Writable:n},t.inherits(i,e),t.inherits(n,e),$t}
3
+ /*!
4
+ * normalize-path <https://github.com/jonschlinkert/normalize-path>
5
+ *
6
+ * Copyright (c) 2014-2018, Jon Schlinkert.
7
+ * Released under the MIT License.
8
+ */function fr(){return Vt||(Vt=1,qt=function(t,e){if("string"!=typeof t)throw new TypeError("expected path to be a string");if("\\"===t||"/"===t)return"/";var r=t.length;if(r<=1)return t;var i="";if(r>4&&"\\"===t[3]){var n=t[2];"?"!==n&&"."!==n||"\\\\"!==t.slice(0,2)||(t=t.slice(2),i="//")}var s=t.split(/[/\\]+/);return!1!==e&&""===s[s.length-1]&&s.pop(),i+s.join("/")}),qt}function dr(){if(Yt)return Zt;return Yt=1,Zt=function(t){return t}}function pr(){if(Jt)return Xt;Jt=1;var t=Qt?Kt:(Qt=1,Kt=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}),e=Math.max;return Xt=function(r,i,n){return i=e(void 0===i?r.length-1:i,0),function(){for(var s=arguments,o=-1,a=e(s.length-i,0),l=Array(a);++o<a;)l[o]=s[i+o];o=-1;for(var h=Array(i+1);++o<i;)h[o]=s[o];return h[i]=n(l),t(r,this,h)}},Xt}function gr(){if(ie)return re;ie=1;var t="object"==typeof m&&m&&m.Object===Object&&m;return re=t}function yr(){if(se)return ne;se=1;var t=gr(),e="object"==typeof self&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return ne=r}function mr(){if(ae)return oe;ae=1;var t=yr().Symbol;return oe=t}function br(){if(de)return fe;de=1;var t=mr(),e=function(){if(he)return le;he=1;var t=mr(),e=Object.prototype,r=e.hasOwnProperty,i=e.toString,n=t?t.toStringTag:void 0;return le=function(t){var e=r.call(t,n),s=t[n];try{t[n]=void 0;var o=!0}catch(t){}var a=i.call(t);return o&&(e?t[n]=s:delete t[n]),a}}(),r=function(){if(ce)return ue;ce=1;var t=Object.prototype.toString;return ue=function(e){return t.call(e)}}(),i=t?t.toStringTag:void 0;return fe=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":i&&i in Object(t)?e(t):r(t)}}function _r(){if(ge)return pe;return ge=1,pe=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}}function wr(){if(me)return ye;me=1;var t=br(),e=_r();return ye=function(r){if(!e(r))return!1;var i=t(r);return"[object Function]"==i||"[object GeneratorFunction]"==i||"[object AsyncFunction]"==i||"[object Proxy]"==i}}function vr(){if(ve)return we;ve=1;var t,e=function(){if(_e)return be;_e=1;var t=yr()["__core-js_shared__"];return be=t}(),r=(t=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return we=function(t){return!!r&&r in t}}function Sr(){if(ke)return xe;ke=1;var t=wr(),e=vr(),r=_r(),i=function(){if(Ee)return Se;Ee=1;var t=Function.prototype.toString;return Se=function(e){if(null!=e){try{return t.call(e)}catch(t){}try{return e+""}catch(t){}}return""}}(),n=/^\[object .+?Constructor\]$/,s=Function.prototype,o=Object.prototype,a=s.toString,l=o.hasOwnProperty,h=RegExp("^"+a.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return xe=function(s){return!(!r(s)||e(s))&&(t(s)?h:n).test(i(s))}}function Er(){if(Oe)return Ae;Oe=1;var t=Sr(),e=Re?Te:(Re=1,Te=function(t,e){return null==t?void 0:t[e]});return Ae=function(r,i){var n=e(r,i);return t(n)?n:void 0}}function xr(){if(Ie)return Pe;Ie=1;var t=ee?te:(ee=1,te=function(t){return function(){return t}}),e=function(){if(Me)return Le;Me=1;var t=Er(),e=function(){try{var e=t(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();return Le=e}(),r=dr();return Pe=e?function(r,i){return e(r,"toString",{configurable:!0,enumerable:!1,value:t(i),writable:!0})}:r}function kr(){if(je)return Ce;je=1;var t=xr(),e=function(){if(Ne)return De;Ne=1;var t=Date.now;return De=function(e){var r=0,i=0;return function(){var n=t(),s=16-(n-i);if(i=n,s>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}},De}(),r=e(t);return Ce=r}function Tr(){if(Be)return Fe;Be=1;var t=dr(),e=pr(),r=kr();return Fe=function(i,n){return r(e(i,n,t),i+"")}}function Rr(){if(We)return ze;return We=1,ze=function(t,e){return t===e||t!=t&&e!=e}}function Ar(){if(Ge)return Ue;Ge=1;return Ue=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}}function Or(){if(He)return $e;He=1;var t=wr(),e=Ar();return $e=function(r){return null!=r&&e(r.length)&&!t(r)}}function Lr(){if(Ve)return qe;Ve=1;var t=/^(?:0|[1-9]\d*)$/;return qe=function(e,r){var i=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&t.test(e))&&e>-1&&e%1==0&&e<r}}function Mr(){if(Je)return Xe;return Je=1,Xe=function(t){return null!=t&&"object"==typeof t}}function Pr(){if(ir)return rr;ir=1;var t=function(){if(er)return tr;er=1;var t=br(),e=Mr();return tr=function(r){return e(r)&&"[object Arguments]"==t(r)}}(),e=Mr(),r=Object.prototype,i=r.hasOwnProperty,n=r.propertyIsEnumerable,s=t(function(){return arguments}())?t:function(t){return e(t)&&i.call(t,"callee")&&!n.call(t,"callee")};return rr=s}function Ir(){if(sr)return nr;sr=1;var t=Array.isArray;return nr=t}var Dr,Nr,Cr,jr,Fr,Br,zr,Wr={exports:{}};function Ur(){return Cr||(Cr=1,function(t,e){var r=yr(),i=Nr?Dr:(Nr=1,Dr=function(){return!1}),n=e&&!e.nodeType&&e,s=n&&t&&!t.nodeType&&t,o=s&&s.exports===n?r.Buffer:void 0,a=(o?o.isBuffer:void 0)||i;t.exports=a}(Wr,Wr.exports)),Wr.exports}function Gr(){if(zr)return Br;return zr=1,Br=function(t){return function(e){return t(e)}}}var $r,Hr,qr,Vr,Zr,Yr,Kr,Qr,Xr,Jr,ti,ei,ri,ii,ni,si={exports:{}};function oi(){if(qr)return Hr;qr=1;var t=function(){if(Fr)return jr;Fr=1;var t=br(),e=Ar(),r=Mr(),i={};return i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,jr=function(n){return r(n)&&e(n.length)&&!!i[t(n)]}}(),e=Gr(),r=function(){return $r||($r=1,t=si,e=si.exports,r=gr(),i=e&&!e.nodeType&&e,n=i&&t&&!t.nodeType&&t,s=n&&n.exports===i&&r.process,o=function(){try{return n&&n.require&&n.require("util").types||s&&s.binding&&s.binding("util")}catch(t){}}(),t.exports=o),si.exports;var t,e,r,i,n,s,o}(),i=r&&r.isTypedArray,n=i?e(i):t;return Hr=n}function ai(){if(Zr)return Vr;Zr=1;var t=Qe?Ke:(Qe=1,Ke=function(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}),e=Pr(),r=Ir(),i=Ur(),n=Lr(),s=oi(),o=Object.prototype.hasOwnProperty;return Vr=function(a,l){var h=r(a),u=!h&&e(a),c=!h&&!u&&i(a),f=!h&&!u&&!c&&s(a),d=h||u||c||f,p=d?t(a.length,String):[],g=p.length;for(var y in a)!l&&!o.call(a,y)||d&&("length"==y||c&&("offset"==y||"parent"==y)||f&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||n(y,g))||p.push(y);return p}}function li(){if(ti)return Jr;ti=1;var t=_r(),e=function(){if(Kr)return Yr;Kr=1;var t=Object.prototype;return Yr=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}}(),r=Xr?Qr:(Xr=1,Qr=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}),i=Object.prototype.hasOwnProperty;return Jr=function(n){if(!t(n))return r(n);var s=e(n),o=[];for(var a in n)("constructor"!=a||!s&&i.call(n,a))&&o.push(a);return o}}function hi(){if(ni)return ii;ni=1;var t=Tr(),e=Rr(),r=function(){if(Ye)return Ze;Ye=1;var t=Rr(),e=Or(),r=Lr(),i=_r();return Ze=function(n,s,o){if(!i(o))return!1;var a=typeof s;return!!("number"==a?e(o)&&r(s,o.length):"string"==a&&s in o)&&t(o[s],n)}}(),i=function(){if(ri)return ei;ri=1;var t=ai(),e=li(),r=Or();return ei=function(i){return r(i)?t(i,!0):e(i)}}(),n=Object.prototype,s=n.hasOwnProperty,o=t(function(t,o){t=Object(t);var a=-1,l=o.length,h=l>2?o[2]:void 0;for(h&&r(o[0],o[1],h)&&(l=1);++a<l;)for(var u=o[a],c=i(u),f=-1,d=c.length;++f<d;){var p=c[f],g=t[p];(void 0===g||e(g,n[p])&&!s.call(t,p))&&(t[p]=u[p])}return t});return ii=o}var ui,ci,fi={exports:{}},di={exports:{}};function pi(){if(ci)return ui;ci=1;class t extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError("Expected input to be an Array, got "+typeof t);let e="";for(let r=0;r<t.length;r++)e+=` ${t[r].stack}\n`;super(e),this.name="AggregateError",this.errors=t}}return ui={AggregateError:t,ArrayIsArray:t=>Array.isArray(t),ArrayPrototypeIncludes:(t,e)=>t.includes(e),ArrayPrototypeIndexOf:(t,e)=>t.indexOf(e),ArrayPrototypeJoin:(t,e)=>t.join(e),ArrayPrototypeMap:(t,e)=>t.map(e),ArrayPrototypePop:(t,e)=>t.pop(e),ArrayPrototypePush:(t,e)=>t.push(e),ArrayPrototypeSlice:(t,e,r)=>t.slice(e,r),Error:Error,FunctionPrototypeCall:(t,e,...r)=>t.call(e,...r),FunctionPrototypeSymbolHasInstance:(t,e)=>Function.prototype[Symbol.hasInstance].call(t,e),MathFloor:Math.floor,Number:Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(t,e)=>Object.defineProperties(t,e),ObjectDefineProperty:(t,e,r)=>Object.defineProperty(t,e,r),ObjectGetOwnPropertyDescriptor:(t,e)=>Object.getOwnPropertyDescriptor(t,e),ObjectKeys:t=>Object.keys(t),ObjectSetPrototypeOf:(t,e)=>Object.setPrototypeOf(t,e),Promise:Promise,PromisePrototypeCatch:(t,e)=>t.catch(e),PromisePrototypeThen:(t,e,r)=>t.then(e,r),PromiseReject:t=>Promise.reject(t),PromiseResolve:t=>Promise.resolve(t),ReflectApply:Reflect.apply,RegExpPrototypeTest:(t,e)=>t.test(e),SafeSet:Set,String:String,StringPrototypeSlice:(t,e,r)=>t.slice(e,r),StringPrototypeToLowerCase:t=>t.toLowerCase(),StringPrototypeToUpperCase:t=>t.toUpperCase(),StringPrototypeTrim:t=>t.trim(),Symbol:Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(t,e,r)=>t.set(e,r),Boolean:Boolean,Uint8Array:Uint8Array}}var gi,yi,mi,bi,_i={exports:{}};function wi(){return yi?gi:(yi=1,gi={format:(t,...e)=>t.replace(/%([sdifj])/g,function(...[t,r]){const i=e.shift();if("f"===r)return i.toFixed(6);if("j"===r)return JSON.stringify(i);if("s"===r&&"object"==typeof i){return`${i.constructor!==Object?i.constructor.name:""} {}`.trim()}return i.toString()}),inspect(t){switch(typeof t){case"string":if(t.includes("'")){if(!t.includes('"'))return`"${t}"`;if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}}})}function vi(){if(bi)return mi;bi=1;const{format:t,inspect:e}=wi(),{AggregateError:r}=pi(),i=globalThis.AggregateError||r,n=Symbol("kIsNodeError"),s=["string","function","number","object","Function","Object","boolean","bigint","symbol"],o=/^([A-Z][a-z0-9]*)+$/,a={};function l(t,e){if(!t)throw new a.ERR_INTERNAL_ASSERTION(e)}function h(t){let e="",r=t.length;const i="-"===t[0]?1:0;for(;r>=i+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function u(e,r,i){i||(i=Error);class s extends i{constructor(...i){super(function(e,r,i){if("function"==typeof r)return l(r.length<=i.length,`Code: ${e}; The provided arguments length (${i.length}) does not match the required ones (${r.length}).`),r(...i);const n=(r.match(/%[dfijoOs]/g)||[]).length;return l(n===i.length,`Code: ${e}; The provided arguments length (${i.length}) does not match the required ones (${n}).`),0===i.length?r:t(r,...i)}(e,r,i))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(s.prototype,{name:{value:i.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),s.prototype.code=e,s.prototype[n]=!0,a[e]=s}function c(t){const e="__node_internal_"+t.name;return Object.defineProperty(t,"name",{value:e}),t}class f extends Error{constructor(t="The operation was aborted",e=void 0){if(void 0!==e&&"object"!=typeof e)throw new a.ERR_INVALID_ARG_TYPE("options","Object",e);super(t,e),this.code="ABORT_ERR",this.name="AbortError"}}return u("ERR_ASSERTION","%s",Error),u("ERR_INVALID_ARG_TYPE",(t,r,i)=>{l("string"==typeof t,"'name' must be a string"),Array.isArray(r)||(r=[r]);let n="The ";t.endsWith(" argument")?n+=`${t} `:n+=`"${t}" ${t.includes(".")?"property":"argument"} `,n+="must be ";const a=[],h=[],u=[];for(const t of r)l("string"==typeof t,"All expected entries have to be of type string"),s.includes(t)?a.push(t.toLowerCase()):o.test(t)?h.push(t):(l("object"!==t,'The value "object" should be written as "Object"'),u.push(t));if(h.length>0){const t=a.indexOf("object");-1!==t&&(a.splice(a,t,1),h.push("Object"))}if(a.length>0){switch(a.length){case 1:n+=`of type ${a[0]}`;break;case 2:n+=`one of type ${a[0]} or ${a[1]}`;break;default:{const t=a.pop();n+=`one of type ${a.join(", ")}, or ${t}`}}(h.length>0||u.length>0)&&(n+=" or ")}if(h.length>0){switch(h.length){case 1:n+=`an instance of ${h[0]}`;break;case 2:n+=`an instance of ${h[0]} or ${h[1]}`;break;default:{const t=h.pop();n+=`an instance of ${h.join(", ")}, or ${t}`}}u.length>0&&(n+=" or ")}switch(u.length){case 0:break;case 1:u[0].toLowerCase()!==u[0]&&(n+="an "),n+=`${u[0]}`;break;case 2:n+=`one of ${u[0]} or ${u[1]}`;break;default:{const t=u.pop();n+=`one of ${u.join(", ")}, or ${t}`}}if(null==i)n+=`. Received ${i}`;else if("function"==typeof i&&i.name)n+=`. Received function ${i.name}`;else if("object"==typeof i){var c;if(null!==(c=i.constructor)&&void 0!==c&&c.name)n+=`. Received an instance of ${i.constructor.name}`;else{n+=`. Received ${e(i,{depth:-1})}`}}else{let t=e(i,{colors:!1});t.length>25&&(t=`${t.slice(0,25)}...`),n+=`. Received type ${typeof i} (${t})`}return n},TypeError),u("ERR_INVALID_ARG_VALUE",(t,r,i="is invalid")=>{let n=e(r);n.length>128&&(n=n.slice(0,128)+"...");return`The ${t.includes(".")?"property":"argument"} '${t}' ${i}. Received ${n}`},TypeError),u("ERR_INVALID_RETURN_VALUE",(t,e,r)=>{var i;return`Expected ${t} to be returned from the "${e}" function but got ${null!=r&&null!==(i=r.constructor)&&void 0!==i&&i.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`},TypeError),u("ERR_MISSING_ARGS",(...t)=>{let e;l(t.length>0,"At least one arg needs to be specified");const r=t.length;switch(t=(Array.isArray(t)?t:[t]).map(t=>`"${t}"`).join(" or "),r){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{const r=t.pop();e+=`The ${t.join(", ")}, and ${r} arguments`}}return`${e} must be specified`},TypeError),u("ERR_OUT_OF_RANGE",(t,r,i)=>{let n;if(l(r,'Missing "range" argument'),Number.isInteger(i)&&Math.abs(i)>2**32)n=h(String(i));else if("bigint"==typeof i){n=String(i);const t=BigInt(2)**BigInt(32);(i>t||i<-t)&&(n=h(n)),n+="n"}else n=e(i);return`The value of "${t}" is out of range. It must be ${r}. Received ${n}`},RangeError),u("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),u("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),u("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),u("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),u("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),u("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),u("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),u("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),u("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),u("ERR_STREAM_WRITE_AFTER_END","write after end",Error),u("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),mi={AbortError:f,aggregateTwoErrors:c(function(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;const r=new i([e,t],e.message);return r.code=e.code,r}return t||e}),hideStackFrames:c,codes:a}}var Si,Ei,xi={exports:{}};function ki(){if(Si)return xi.exports;Si=1;const{AbortController:t,AbortSignal:e}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;return xi.exports=t,xi.exports.AbortSignal=e,xi.exports.default=t,xi.exports}function Ti(){return Ei||(Ei=1,function(t){const e=l,{format:r,inspect:i}=wi(),{codes:{ERR_INVALID_ARG_TYPE:n}}=vi(),{kResistStopPropagation:s,AggregateError:o,SymbolDispose:a}=pi(),h=globalThis.AbortSignal||ki().AbortSignal,u=globalThis.AbortController||ki().AbortController,c=Object.getPrototypeOf(async function(){}).constructor,f=globalThis.Blob||e.Blob,d=void 0!==f?function(t){return t instanceof f}:function(t){return!1},p=(t,e)=>{if(void 0!==t&&(null===t||"object"!=typeof t||!("aborted"in t)))throw new n(e,"AbortSignal",t)};t.exports={AggregateError:o,kEmptyObject:Object.freeze({}),once(t){let e=!1;return function(...r){e||(e=!0,t.apply(this,r))}},createDeferredPromise:function(){let t,e;return{promise:new Promise((r,i)=>{t=r,e=i}),resolve:t,reject:e}},promisify:t=>new Promise((e,r)=>{t((t,...i)=>t?r(t):e(...i))}),debuglog:()=>function(){},format:r,inspect:i,types:{isAsyncFunction:t=>t instanceof c,isArrayBufferView:t=>ArrayBuffer.isView(t)},isBlob:d,deprecate:(t,e)=>t,addAbortListener:P().addAbortListener||function(t,e){if(void 0===t)throw new n("signal","AbortSignal",t);let r;return p(t,"signal"),((t,e)=>{if("function"!=typeof t)throw new n(e,"Function",t)})(e,"listener"),t.aborted?queueMicrotask(()=>e()):(t.addEventListener("abort",e,{__proto__:null,once:!0,[s]:!0}),r=()=>{t.removeEventListener("abort",e)}),{__proto__:null,[a](){var t;null===(t=r)||void 0===t||t()}}},AbortSignalAny:h.any||function(t){if(1===t.length)return t[0];const e=new u,r=()=>e.abort();return t.forEach(t=>{p(t,"signals"),t.addEventListener("abort",r,{once:!0})}),e.signal.addEventListener("abort",()=>{t.forEach(t=>t.removeEventListener("abort",r))},{once:!0}),e.signal}},t.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}(_i)),_i.exports}var Ri,Ai,Oi={};function Li(){if(Ai)return Ri;Ai=1;const{ArrayIsArray:t,ArrayPrototypeIncludes:e,ArrayPrototypeJoin:r,ArrayPrototypeMap:i,NumberIsInteger:n,NumberIsNaN:s,NumberMAX_SAFE_INTEGER:o,NumberMIN_SAFE_INTEGER:a,NumberParseInt:l,ObjectPrototypeHasOwnProperty:h,RegExpPrototypeExec:u,String:c,StringPrototypeToUpperCase:f,StringPrototypeTrim:d}=pi(),{hideStackFrames:p,codes:{ERR_SOCKET_BAD_PORT:g,ERR_INVALID_ARG_TYPE:y,ERR_INVALID_ARG_VALUE:m,ERR_OUT_OF_RANGE:b,ERR_UNKNOWN_SIGNAL:_}}=vi(),{normalizeEncoding:w}=Ti(),{isAsyncFunction:v,isArrayBufferView:S}=Ti().types,E={};const x=/^[0-7]+$/;const k=p((t,e,r=a,i=o)=>{if("number"!=typeof t)throw new y(e,"number",t);if(!n(t))throw new b(e,"an integer",t);if(t<r||t>i)throw new b(e,`>= ${r} && <= ${i}`,t)}),T=p((t,e,r=-2147483648,i=2147483647)=>{if("number"!=typeof t)throw new y(e,"number",t);if(!n(t))throw new b(e,"an integer",t);if(t<r||t>i)throw new b(e,`>= ${r} && <= ${i}`,t)}),R=p((t,e,r=!1)=>{if("number"!=typeof t)throw new y(e,"number",t);if(!n(t))throw new b(e,"an integer",t);const i=r?1:0,s=4294967295;if(t<i||t>s)throw new b(e,`>= ${i} && <= ${s}`,t)});function A(t,e){if("string"!=typeof t)throw new y(e,"string",t)}const O=p((t,n,s)=>{if(!e(s,t)){const e=r(i(s,t=>"string"==typeof t?`'${t}'`:c(t)),", ");throw new m(n,t,"must be one of: "+e)}});function L(t,e){if("boolean"!=typeof t)throw new y(e,"boolean",t)}function M(t,e,r){return null!=t&&h(t,e)?t[e]:r}const P=p((e,r,i=null)=>{const n=M(i,"allowArray",!1),s=M(i,"allowFunction",!1);if(!M(i,"nullable",!1)&&null===e||!n&&t(e)||"object"!=typeof e&&(!s||"function"!=typeof e))throw new y(r,"Object",e)}),I=p((t,e)=>{if(null!=t&&"object"!=typeof t&&"function"!=typeof t)throw new y(e,"a dictionary",t)}),D=p((e,r,i=0)=>{if(!t(e))throw new y(r,"Array",e);if(e.length<i){throw new m(r,e,`must be longer than ${i}`)}});const N=p((t,e="buffer")=>{if(!S(t))throw new y(e,["Buffer","TypedArray","DataView"],t)});const C=p((t,e)=>{if(void 0!==t&&(null===t||"object"!=typeof t||!("aborted"in t)))throw new y(e,"AbortSignal",t)}),j=p((t,e)=>{if("function"!=typeof t)throw new y(e,"Function",t)}),F=p((t,e)=>{if("function"!=typeof t||v(t))throw new y(e,"Function",t)}),B=p((t,e)=>{if(void 0!==t)throw new y(e,"undefined",t)});const z=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function W(t,e){if(void 0===t||!u(z,t))throw new m(e,t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}return Ri={isInt32:function(t){return t===(0|t)},isUint32:function(t){return t===t>>>0},parseFileMode:function(t,e,r){if(void 0===t&&(t=r),"string"==typeof t){if(null===u(x,t))throw new m(e,t,"must be a 32-bit unsigned integer or an octal string");t=l(t,8)}return R(t,e),t},validateArray:D,validateStringArray:function(t,e){D(t,e);for(let r=0;r<t.length;r++)A(t[r],`${e}[${r}]`)},validateBooleanArray:function(t,e){D(t,e);for(let r=0;r<t.length;r++)L(t[r],`${e}[${r}]`)},validateAbortSignalArray:function(t,e){D(t,e);for(let r=0;r<t.length;r++){const i=t[r],n=`${e}[${r}]`;if(null==i)throw new y(n,"AbortSignal",i);C(i,n)}},validateBoolean:L,validateBuffer:N,validateDictionary:I,validateEncoding:function(t,e){const r=w(e),i=t.length;if("hex"===r&&i%2!=0)throw new m("encoding",e,`is invalid for data of length ${i}`)},validateFunction:j,validateInt32:T,validateInteger:k,validateNumber:function(t,e,r=void 0,i){if("number"!=typeof t)throw new y(e,"number",t);if(null!=r&&t<r||null!=i&&t>i||(null!=r||null!=i)&&s(t))throw new b(e,`${null!=r?`>= ${r}`:""}${null!=r&&null!=i?" && ":""}${null!=i?`<= ${i}`:""}`,t)},validateObject:P,validateOneOf:O,validatePlainFunction:F,validatePort:function(t,e="Port",r=!0){if("number"!=typeof t&&"string"!=typeof t||"string"==typeof t&&0===d(t).length||+t!==+t>>>0||t>65535||0===t&&!r)throw new g(e,t,r);return 0|t},validateSignalName:function(t,e="signal"){if(A(t,e),void 0===E[t]){if(void 0!==E[f(t)])throw new _(t+" (signals must use all capital letters)");throw new _(t)}},validateString:A,validateUint32:R,validateUndefined:B,validateUnion:function(t,i,n){if(!e(n,t))throw new y(i,`('${r(n,"|")}')`,t)},validateAbortSignal:C,validateLinkHeaderValue:function(e){if("string"==typeof e)return W(e,"hints"),e;if(t(e)){const t=e.length;let r="";if(0===t)return r;for(let i=0;i<t;i++){const n=e[i];W(n,"hints"),r+=n,i!==t-1&&(r+=", ")}return r}throw new m("hints",e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}}var Mi,Pi,Ii,Di,Ni,Ci,ji,Fi,Bi,zi={exports:{}};function Wi(){return Pi?Mi:(Pi=1,Mi=m.process)}function Ui(){if(Di)return Ii;Di=1;const{SymbolAsyncIterator:t,SymbolIterator:e,SymbolFor:r}=pi(),i=r("nodejs.stream.destroyed"),n=r("nodejs.stream.errored"),s=r("nodejs.stream.readable"),o=r("nodejs.stream.writable"),a=r("nodejs.stream.disturbed"),l=r("nodejs.webstream.isClosedPromise"),h=r("nodejs.webstream.controllerErrorFunction");function u(t,e=!1){var r;return!(!t||"function"!=typeof t.pipe||"function"!=typeof t.on||e&&("function"!=typeof t.pause||"function"!=typeof t.resume)||t._writableState&&!1===(null===(r=t._readableState)||void 0===r?void 0:r.readable)||t._writableState&&!t._readableState)}function c(t){var e;return!(!t||"function"!=typeof t.write||"function"!=typeof t.on||t._readableState&&!1===(null===(e=t._writableState)||void 0===e?void 0:e.writable))}function f(t){return t&&(t._readableState||t._writableState||"function"==typeof t.write&&"function"==typeof t.on||"function"==typeof t.pipe&&"function"==typeof t.on)}function d(t){return!(!t||f(t)||"function"!=typeof t.pipeThrough||"function"!=typeof t.getReader||"function"!=typeof t.cancel)}function p(t){return!(!t||f(t)||"function"!=typeof t.getWriter||"function"!=typeof t.abort)}function g(t){return!(!t||f(t)||"object"!=typeof t.readable||"object"!=typeof t.writable)}function y(t){if(!f(t))return null;const e=t._writableState,r=t._readableState,n=e||r;return!!(t.destroyed||t[i]||null!=n&&n.destroyed)}function m(t){if(!c(t))return null;if(!0===t.writableEnded)return!0;const e=t._writableState;return(null==e||!e.errored)&&("boolean"!=typeof(null==e?void 0:e.ended)?null:e.ended)}function b(t,e){if(!u(t))return null;const r=t._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===e&&!0===r.ended&&0===r.length))}function _(t){return t&&null!=t[s]?t[s]:"boolean"!=typeof(null==t?void 0:t.readable)?null:!y(t)&&(u(t)&&t.readable&&!b(t))}function w(t){return t&&null!=t[o]?t[o]:"boolean"!=typeof(null==t?void 0:t.writable)?null:!y(t)&&(c(t)&&t.writable&&!m(t))}function v(t){return"boolean"==typeof t._closed&&"boolean"==typeof t._defaultKeepAlive&&"boolean"==typeof t._removedConnection&&"boolean"==typeof t._removedContLen}function S(t){return"boolean"==typeof t._sent100&&v(t)}return Ii={isDestroyed:y,kIsDestroyed:i,isDisturbed:function(t){var e;return!(!t||!(null!==(e=t[a])&&void 0!==e?e:t.readableDidRead||t.readableAborted))},kIsDisturbed:a,isErrored:function(t){var e,r,i,s,o,a,l,h,u,c;return!(!t||!(null!==(e=null!==(r=null!==(i=null!==(s=null!==(o=null!==(a=t[n])&&void 0!==a?a:t.readableErrored)&&void 0!==o?o:t.writableErrored)&&void 0!==s?s:null===(l=t._readableState)||void 0===l?void 0:l.errorEmitted)&&void 0!==i?i:null===(h=t._writableState)||void 0===h?void 0:h.errorEmitted)&&void 0!==r?r:null===(u=t._readableState)||void 0===u?void 0:u.errored)&&void 0!==e?e:null===(c=t._writableState)||void 0===c?void 0:c.errored))},kIsErrored:n,isReadable:_,kIsReadable:s,kIsClosedPromise:l,kControllerErrorFunction:h,kIsWritable:o,isClosed:function(t){if(!f(t))return null;if("boolean"==typeof t.closed)return t.closed;const e=t._writableState,r=t._readableState;return"boolean"==typeof(null==e?void 0:e.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==e?void 0:e.closed)||(null==r?void 0:r.closed):"boolean"==typeof t._closed&&v(t)?t._closed:null},isDuplexNodeStream:function(t){return!(!t||"function"!=typeof t.pipe||!t._readableState||"function"!=typeof t.on||"function"!=typeof t.write)},isFinished:function(t,e){return f(t)?!!y(t)||(!1===(null==e?void 0:e.readable)||!_(t))&&(!1===(null==e?void 0:e.writable)||!w(t)):null},isIterable:function(r,i){return null!=r&&(!0===i?"function"==typeof r[t]:!1===i?"function"==typeof r[e]:"function"==typeof r[t]||"function"==typeof r[e])},isReadableNodeStream:u,isReadableStream:d,isReadableEnded:function(t){if(!u(t))return null;if(!0===t.readableEnded)return!0;const e=t._readableState;return!(!e||e.errored)&&("boolean"!=typeof(null==e?void 0:e.ended)?null:e.ended)},isReadableFinished:b,isReadableErrored:function(t){var e,r;return f(t)?t.readableErrored?t.readableErrored:null!==(e=null===(r=t._readableState)||void 0===r?void 0:r.errored)&&void 0!==e?e:null:null},isNodeStream:f,isWebStream:function(t){return d(t)||p(t)||g(t)},isWritable:w,isWritableNodeStream:c,isWritableStream:p,isWritableEnded:m,isWritableFinished:function(t,e){if(!c(t))return null;if(!0===t.writableFinished)return!0;const r=t._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===e&&!0===r.ended&&0===r.length))},isWritableErrored:function(t){var e,r;return f(t)?t.writableErrored?t.writableErrored:null!==(e=null===(r=t._writableState)||void 0===r?void 0:r.errored)&&void 0!==e?e:null:null},isServerRequest:function(t){var e;return"boolean"==typeof t._consuming&&"boolean"==typeof t._dumped&&void 0===(null===(e=t.req)||void 0===e?void 0:e.upgradeOrConnect)},isServerResponse:S,willEmitClose:function(t){if(!f(t))return null;const e=t._writableState,r=t._readableState,i=e||r;return!i&&S(t)||!!(i&&i.autoDestroy&&i.emitClose&&!1===i.closed)},isTransformStream:g},Ii}function Gi(){if(Ni)return zi.exports;Ni=1;const t=Wi(),{AbortError:e,codes:r}=vi(),{ERR_INVALID_ARG_TYPE:i,ERR_STREAM_PREMATURE_CLOSE:n}=r,{kEmptyObject:s,once:o}=Ti(),{validateAbortSignal:a,validateFunction:l,validateObject:h,validateBoolean:u}=Li(),{Promise:c,PromisePrototypeThen:f,SymbolDispose:d}=pi(),{isClosed:p,isReadable:g,isReadableNodeStream:y,isReadableStream:m,isReadableFinished:b,isReadableErrored:_,isWritable:w,isWritableNodeStream:v,isWritableStream:S,isWritableFinished:E,isWritableErrored:x,isNodeStream:k,willEmitClose:T,kIsClosedPromise:R}=Ui();let A;const O=()=>{};function L(r,u,c){var L,M;if(2===arguments.length?(c=u,u=s):null==u?u=s:h(u,"options"),l(c,"callback"),a(u.signal,"options.signal"),c=o(c),m(r)||S(r))return function(r,i,n){let s=!1,a=O;if(i.signal)if(a=()=>{s=!0,n.call(r,new e(void 0,{cause:i.signal.reason}))},i.signal.aborted)t.nextTick(a);else{A=A||Ti().addAbortListener;const t=A(i.signal,a),e=n;n=o((...i)=>{t[d](),e.apply(r,i)})}const l=(...e)=>{s||t.nextTick(()=>n.apply(r,e))};return f(r[R].promise,l,l),O}(r,u,c);if(!k(r))throw new i("stream",["ReadableStream","WritableStream","Stream"],r);const P=null!==(L=u.readable)&&void 0!==L?L:y(r),I=null!==(M=u.writable)&&void 0!==M?M:v(r),D=r._writableState,N=r._readableState,C=()=>{r.writable||B()};let j=T(r)&&y(r)===P&&v(r)===I,F=E(r,!1);const B=()=>{F=!0,r.destroyed&&(j=!1),(!j||r.readable&&!P)&&(P&&!z||c.call(r))};let z=b(r,!1);const W=()=>{z=!0,r.destroyed&&(j=!1),(!j||r.writable&&!I)&&(I&&!F||c.call(r))},U=t=>{c.call(r,t)};let G=p(r);const $=()=>{G=!0;const t=x(r)||_(r);return t&&"boolean"!=typeof t?c.call(r,t):P&&!z&&y(r,!0)&&!b(r,!1)?c.call(r,new n):!I||F||E(r,!1)?void c.call(r):c.call(r,new n)},H=()=>{G=!0;const t=x(r)||_(r);if(t&&"boolean"!=typeof t)return c.call(r,t);c.call(r)},q=()=>{r.req.on("finish",B)};!function(t){return t.setHeader&&"function"==typeof t.abort}(r)?I&&!D&&(r.on("end",C),r.on("close",C)):(r.on("complete",B),j||r.on("abort",$),r.req?q():r.on("request",q)),j||"boolean"!=typeof r.aborted||r.on("aborted",$),r.on("end",W),r.on("finish",B),!1!==u.error&&r.on("error",U),r.on("close",$),G?t.nextTick($):null!=D&&D.errorEmitted||null!=N&&N.errorEmitted?j||t.nextTick(H):(P||j&&!g(r)||!F&&!1!==w(r))&&(I||j&&!w(r)||!z&&!1!==g(r))?N&&r.req&&r.aborted&&t.nextTick(H):t.nextTick(H);const V=()=>{c=O,r.removeListener("aborted",$),r.removeListener("complete",B),r.removeListener("abort",$),r.removeListener("request",q),r.req&&r.req.removeListener("finish",B),r.removeListener("end",C),r.removeListener("close",C),r.removeListener("finish",B),r.removeListener("end",W),r.removeListener("error",U),r.removeListener("close",$)};if(u.signal&&!G){const i=()=>{const t=c;V(),t.call(r,new e(void 0,{cause:u.signal.reason}))};if(u.signal.aborted)t.nextTick(i);else{A=A||Ti().addAbortListener;const t=A(u.signal,i),e=c;c=o((...i)=>{t[d](),e.apply(r,i)})}}return V}return zi.exports=L,zi.exports.finished=function(t,e){var r;let i=!1;return null===e&&(e=s),null!==(r=e)&&void 0!==r&&r.cleanup&&(u(e.cleanup,"cleanup"),i=e.cleanup),new c((r,n)=>{const s=L(t,e,t=>{i&&s(),t?n(t):r()})})},zi.exports}function $i(){if(ji)return Ci;ji=1;const t=Wi(),{aggregateTwoErrors:e,codes:{ERR_MULTIPLE_CALLBACK:r},AbortError:i}=vi(),{Symbol:n}=pi(),{kIsDestroyed:s,isDestroyed:o,isFinished:a,isServerRequest:l}=Ui(),h=n("kDestroy"),u=n("kConstruct");function c(t,e,r){t&&(t.stack,e&&!e.errored&&(e.errored=t),r&&!r.errored&&(r.errored=t))}function f(e,r,i){let n=!1;function s(r){if(n)return;n=!0;const s=e._readableState,o=e._writableState;c(r,o,s),o&&(o.closed=!0),s&&(s.closed=!0),"function"==typeof i&&i(r),r?t.nextTick(d,e,r):t.nextTick(p,e)}try{e._destroy(r||null,s)}catch(r){s(r)}}function d(t,e){g(t,e),p(t)}function p(t){const e=t._readableState,r=t._writableState;r&&(r.closeEmitted=!0),e&&(e.closeEmitted=!0),(null!=r&&r.emitClose||null!=e&&e.emitClose)&&t.emit("close")}function g(t,e){const r=t._readableState,i=t._writableState;null!=i&&i.errorEmitted||null!=r&&r.errorEmitted||(i&&(i.errorEmitted=!0),r&&(r.errorEmitted=!0),t.emit("error",e))}function y(e,r,i){const n=e._readableState,s=e._writableState;if(null!=s&&s.destroyed||null!=n&&n.destroyed)return this;null!=n&&n.autoDestroy||null!=s&&s.autoDestroy?e.destroy(r):r&&(r.stack,s&&!s.errored&&(s.errored=r),n&&!n.errored&&(n.errored=r),i?t.nextTick(g,e,r):g(e,r))}function m(e){let i=!1;function n(n){if(i)return void y(e,null!=n?n:new r);i=!0;const s=e._readableState,o=e._writableState,a=o||s;s&&(s.constructed=!0),o&&(o.constructed=!0),a.destroyed?e.emit(h,n):n?y(e,n,!0):t.nextTick(b,e)}try{e._construct(e=>{t.nextTick(n,e)})}catch(e){t.nextTick(n,e)}}function b(t){t.emit(u)}function _(t){return(null==t?void 0:t.setHeader)&&"function"==typeof t.abort}function w(t){t.emit("close")}function v(e,r){e.emit("error",r),t.nextTick(w,e)}return Ci={construct:function(e,r){if("function"!=typeof e._construct)return;const i=e._readableState,n=e._writableState;i&&(i.constructed=!1),n&&(n.constructed=!1),e.once(u,r),e.listenerCount(u)>1||t.nextTick(m,e)},destroyer:function(e,r){e&&!o(e)&&(r||a(e)||(r=new i),l(e)?(e.socket=null,e.destroy(r)):_(e)?e.abort():_(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(r):"function"==typeof e.close?e.close():r?t.nextTick(v,e,r):t.nextTick(w,e),e.destroyed||(e[s]=!0))},destroy:function(t,r){const i=this._readableState,n=this._writableState,s=n||i;return null!=n&&n.destroyed||null!=i&&i.destroyed?("function"==typeof r&&r(),this):(c(t,n,i),n&&(n.destroyed=!0),i&&(i.destroyed=!0),s.constructed?f(this,t,r):this.once(h,function(i){f(this,e(i,t),r)}),this)},undestroy:function(){const t=this._readableState,e=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=!1===t.readable,t.endEmitted=!1===t.readable),e&&(e.constructed=!0,e.destroyed=!1,e.closed=!1,e.closeEmitted=!1,e.errored=null,e.errorEmitted=!1,e.finalCalled=!1,e.prefinished=!1,e.ended=!1===e.writable,e.ending=!1===e.writable,e.finished=!1===e.writable)},errorOrDestroy:y},Ci}function Hi(){if(Bi)return Fi;Bi=1;const{ArrayIsArray:t,ObjectSetPrototypeOf:e}=pi(),{EventEmitter:r}=P();function i(t){r.call(this,t)}function n(e,r,i){if("function"==typeof e.prependListener)return e.prependListener(r,i);e._events&&e._events[r]?t(e._events[r])?e._events[r].unshift(i):e._events[r]=[i,e._events[r]]:e.on(r,i)}return e(i.prototype,r.prototype),e(i,r),i.prototype.pipe=function(t,e){const i=this;function s(e){t.writable&&!1===t.write(e)&&i.pause&&i.pause()}function o(){i.readable&&i.resume&&i.resume()}i.on("data",s),t.on("drain",o),t._isStdio||e&&!1===e.end||(i.on("end",l),i.on("close",h));let a=!1;function l(){a||(a=!0,t.end())}function h(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function u(t){c(),0===r.listenerCount(this,"error")&&this.emit("error",t)}function c(){i.removeListener("data",s),t.removeListener("drain",o),i.removeListener("end",l),i.removeListener("close",h),i.removeListener("error",u),t.removeListener("error",u),i.removeListener("end",c),i.removeListener("close",c),t.removeListener("close",c)}return n(i,"error",u),n(t,"error",u),i.on("end",c),i.on("close",c),t.on("close",c),t.emit("pipe",i),t},Fi={Stream:i,prependListener:n}}var qi,Vi,Zi,Yi,Ki,Qi={exports:{}};function Xi(){return qi||(qi=1,function(t){const{SymbolDispose:e}=pi(),{AbortError:r,codes:i}=vi(),{isNodeStream:n,isWebStream:s,kControllerErrorFunction:o}=Ui(),a=Gi(),{ERR_INVALID_ARG_TYPE:l}=i;let h;t.exports.addAbortSignal=function(e,r){if(((t,e)=>{if("object"!=typeof t||!("aborted"in t))throw new l(e,"AbortSignal",t)})(e,"signal"),!n(r)&&!s(r))throw new l("stream",["ReadableStream","WritableStream","Stream"],r);return t.exports.addAbortSignalNoValidate(e,r)},t.exports.addAbortSignalNoValidate=function(t,i){if("object"!=typeof t||!("aborted"in t))return i;const s=n(i)?()=>{i.destroy(new r(void 0,{cause:t.reason}))}:()=>{i[o](new r(void 0,{cause:t.reason}))};if(t.aborted)s();else{h=h||Ti().addAbortListener;const r=h(t,s);a(i,r[e])}return i}}(Qi)),Qi.exports}function Ji(){if(Zi)return Vi;Zi=1;const{StringPrototypeSlice:t,SymbolIterator:e,TypedArrayPrototypeSet:r,Uint8Array:i}=pi(),{Buffer:n}=l,{inspect:s}=Ti();return Vi=class{constructor(){this.head=null,this.tail=null,this.length=0}push(t){const e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}unshift(t){const e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}shift(){if(0===this.length)return;const t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}clear(){this.head=this.tail=null,this.length=0}join(t){if(0===this.length)return"";let e=this.head,r=""+e.data;for(;null!==(e=e.next);)r+=t+e.data;return r}concat(t){if(0===this.length)return n.alloc(0);const e=n.allocUnsafe(t>>>0);let i=this.head,s=0;for(;i;)r(e,i.data,s),s+=i.data.length,i=i.next;return e}consume(t,e){const r=this.head.data;if(t<r.length){const e=r.slice(0,t);return this.head.data=r.slice(t),e}return t===r.length?this.shift():e?this._getString(t):this._getBuffer(t)}first(){return this.head.data}*[e](){for(let t=this.head;t;t=t.next)yield t.data}_getString(e){let r="",i=this.head,n=0;do{const s=i.data;if(!(e>s.length)){e===s.length?(r+=s,++n,i.next?this.head=i.next:this.head=this.tail=null):(r+=t(s,0,e),this.head=i,i.data=t(s,e));break}r+=s,e-=s.length,++n}while(null!==(i=i.next));return this.length-=n,r}_getBuffer(t){const e=n.allocUnsafe(t),s=t;let o=this.head,a=0;do{const n=o.data;if(!(t>n.length)){t===n.length?(r(e,n,s-t),++a,o.next?this.head=o.next:this.head=this.tail=null):(r(e,new i(n.buffer,n.byteOffset,t),s-t),this.head=o,o.data=n.slice(t));break}r(e,n,s-t),t-=n.length,++a}while(null!==(o=o.next));return this.length-=a,e}[Symbol.for("nodejs.util.inspect.custom")](t,e){return s(this,{...e,depth:0,customInspect:!1})}}}function tn(){if(Ki)return Yi;Ki=1;const{MathFloor:t,NumberIsInteger:e}=pi(),{validateInteger:r}=Li(),{ERR_INVALID_ARG_VALUE:i}=vi().codes;let n=16384,s=16;function o(t){return t?s:n}return Yi={getHighWaterMark:function(r,n,s,a){const l=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(n,a,s);if(null!=l){if(!e(l)||l<0){throw new i(a?`options.${s}`:"options.highWaterMark",l)}return t(l)}return o(r.objectMode)},getDefaultHighWaterMark:o,setDefaultHighWaterMark:function(t,e){r(e,"value",0),t?s=e:n=e}}}var en,rn,nn,sn,on,an,ln,hn,un,cn,fn,dn,pn,gn,yn,mn,bn,_n,wn,vn,Sn,En,xn,kn,Tn,Rn={},An={exports:{}};function On(){if(rn)return Rn;rn=1;var t=(en||(en=1,function(t,e){var r=l,i=r.Buffer;function n(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(n(r,e),e.Buffer=s),s.prototype=Object.create(i.prototype),n(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}}(An,An.exports)),An.exports).Buffer,e=t.isEncoding||function(t){switch((t=""+t)&&t.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 r(r){var i;switch(this.encoding=function(r){var i=function(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(r);if("string"!=typeof i&&(t.isEncoding===e||!e(r)))throw new Error("Unknown encoding: "+r);return i||r}(r),this.encoding){case"utf16le":this.text=s,this.end=o,i=4;break;case"utf8":this.fillLast=n,i=4;break;case"base64":this.text=a,this.end=h,i=3;break;default:return this.write=u,void(this.end=c)}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(i)}function i(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function n(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function s(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function o(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function a(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function u(t){return t.toString(this.encoding)}function c(t){return t&&t.length?this.write(t):""}return Rn.StringDecoder=r,r.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},r.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},r.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var s=i(e[n]);if(s>=0)return s>0&&(t.lastNeed=s-1),s;if(--n<r||-2===s)return 0;if(s=i(e[n]),s>=0)return s>0&&(t.lastNeed=s-2),s;if(--n<r||-2===s)return 0;if(s=i(e[n]),s>=0)return s>0&&(2===s?s=0:t.lastNeed=s-3),s;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},r.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length},Rn}function Ln(){if(sn)return nn;sn=1;const t=Wi(),{PromisePrototypeThen:e,SymbolAsyncIterator:r,SymbolIterator:i}=pi(),{Buffer:n}=l,{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_NULL_VALUES:o}=vi().codes;return nn=function(a,l,h){let u,c;if("string"==typeof l||l instanceof n)return new a({objectMode:!0,...h,read(){this.push(l),this.push(null)}});if(l&&l[r])c=!0,u=l[r]();else{if(!l||!l[i])throw new s("iterable",["Iterable"],l);c=!1,u=l[i]()}const f=new a({objectMode:!0,highWaterMark:1,...h});let d=!1;return f._read=function(){d||(d=!0,async function(){for(;;){try{const{value:t,done:e}=c?await u.next():u.next();if(e)f.push(null);else{const e=t&&"function"==typeof t.then?await t:t;if(null===e)throw d=!1,new o;if(f.push(e))continue;d=!1}}catch(t){f.destroy(t)}break}}())},f._destroy=function(r,i){e(async function(t){const e=null!=t,r="function"==typeof u.throw;if(e&&r){const{value:e,done:r}=await u.throw(t);if(await e,r)return}if("function"==typeof u.return){const{value:t}=await u.return();await t}}(r),()=>t.nextTick(i,r),e=>t.nextTick(i,e||r))},f},nn}function Mn(){if(an)return on;an=1;const t=Wi(),{ArrayPrototypeIndexOf:e,NumberIsInteger:r,NumberIsNaN:i,NumberParseInt:n,ObjectDefineProperties:s,ObjectKeys:o,ObjectSetPrototypeOf:a,Promise:h,SafeSet:u,SymbolAsyncDispose:c,SymbolAsyncIterator:f,Symbol:d}=pi();on=q,q.ReadableState=H;const{EventEmitter:p}=P(),{Stream:g,prependListener:y}=Hi(),{Buffer:m}=l,{addAbortSignal:b}=Xi(),_=Gi();let w=Ti().debuglog("stream",t=>{w=t});const v=Ji(),S=$i(),{getHighWaterMark:E,getDefaultHighWaterMark:x}=tn(),{aggregateTwoErrors:k,codes:{ERR_INVALID_ARG_TYPE:T,ERR_METHOD_NOT_IMPLEMENTED:R,ERR_OUT_OF_RANGE:A,ERR_STREAM_PUSH_AFTER_EOF:O,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:L},AbortError:M}=vi(),{validateObject:I}=Li(),D=d("kPaused"),{StringDecoder:N}=On(),C=Ln();a(q.prototype,g.prototype),a(q,g);const j=()=>{},{errorOrDestroy:F}=S,B=1,z=16,W=32,U=2048,G=4096;function $(t){return{enumerable:!1,get(){return 0!==(this.state&t)},set(e){e?this.state|=t:this.state&=~t}}}function H(t,e,r){"boolean"!=typeof r&&(r=e instanceof Dn()),this.state=U|G|z|W,t&&t.objectMode&&(this.state|=B),r&&t&&t.readableObjectMode&&(this.state|=B),this.highWaterMark=t?E(this,t,"readableHighWaterMark",r):x(!1),this.buffer=new v,this.length=0,this.pipes=[],this.flowing=null,this[D]=null,t&&!1===t.emitClose&&(this.state&=~U),t&&!1===t.autoDestroy&&(this.state&=~G),this.errored=null,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,t&&t.encoding&&(this.decoder=new N(t.encoding),this.encoding=t.encoding)}function q(t){if(!(this instanceof q))return new q(t);const e=this instanceof Dn();this._readableState=new H(t,this,e),t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&!e&&b(t.signal,this)),g.call(this,t),S.construct(this,()=>{this._readableState.needReadable&&X(this,this._readableState)})}function V(t,e,r,i){w("readableAddChunk",e);const n=t._readableState;let s;if(0===(n.state&B)&&("string"==typeof e?(r=r||n.defaultEncoding,n.encoding!==r&&(i&&n.encoding?e=m.from(e,r).toString(n.encoding):(e=m.from(e,r),r=""))):e instanceof m?r="":g._isUint8Array(e)?(e=g._uint8ArrayToBuffer(e),r=""):null!=e&&(s=new T("chunk",["string","Buffer","Uint8Array"],e))),s)F(t,s);else if(null===e)n.state&=-9,function(t,e){if(w("onEofChunk"),e.ended)return;if(e.decoder){const t=e.decoder.end();t&&t.length&&(e.buffer.push(t),e.length+=e.objectMode?1:t.length)}e.ended=!0,e.sync?K(t):(e.needReadable=!1,e.emittedReadable=!0,Q(t))}(t,n);else if(0!==(n.state&B)||e&&e.length>0)if(i)if(4&n.state)F(t,new L);else{if(n.destroyed||n.errored)return!1;Z(t,n,e,!0)}else if(n.ended)F(t,new O);else{if(n.destroyed||n.errored)return!1;n.state&=-9,n.decoder&&!r?(e=n.decoder.write(e),n.objectMode||0!==e.length?Z(t,n,e,!1):X(t,n)):Z(t,n,e,!1)}else i||(n.state&=-9,X(t,n));return!n.ended&&(n.length<n.highWaterMark||0===n.length)}function Z(t,e,r,i){e.flowing&&0===e.length&&!e.sync&&t.listenerCount("data")>0?(65536&e.state?e.awaitDrainWriters.clear():e.awaitDrainWriters=null,e.dataEmitted=!0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),64&e.state&&K(t)),X(t,e)}s(H.prototype,{objectMode:$(B),ended:$(2),endEmitted:$(4),reading:$(8),constructed:$(z),sync:$(W),needReadable:$(64),emittedReadable:$(128),readableListening:$(256),resumeScheduled:$(512),errorEmitted:$(1024),emitClose:$(U),autoDestroy:$(G),destroyed:$(8192),closed:$(16384),closeEmitted:$(32768),multiAwaitDrain:$(65536),readingMore:$(1<<17),dataEmitted:$(1<<18)}),q.prototype.destroy=S.destroy,q.prototype._undestroy=S.undestroy,q.prototype._destroy=function(t,e){e(t)},q.prototype[p.captureRejectionSymbol]=function(t){this.destroy(t)},q.prototype[c]=function(){let t;return this.destroyed||(t=this.readableEnded?null:new M,this.destroy(t)),new h((e,r)=>_(this,i=>i&&i!==t?r(i):e(null)))},q.prototype.push=function(t,e){return V(this,t,e,!1)},q.prototype.unshift=function(t,e){return V(this,t,e,!0)},q.prototype.isPaused=function(){const t=this._readableState;return!0===t[D]||!1===t.flowing},q.prototype.setEncoding=function(t){const e=new N(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let i="";for(const t of r)i+=e.write(t);return r.clear(),""!==i&&r.push(i),this._readableState.length=i.length,this};function Y(t,e){return t<=0||0===e.length&&e.ended?0:0!==(e.state&B)?1:i(t)?e.flowing&&e.length?e.buffer.first().length:e.length:t<=e.length?t:e.ended?e.length:0}function K(e){const r=e._readableState;w("emitReadable",r.needReadable,r.emittedReadable),r.needReadable=!1,r.emittedReadable||(w("emitReadable",r.flowing),r.emittedReadable=!0,t.nextTick(Q,e))}function Q(t){const e=t._readableState;w("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||e.errored||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,it(t)}function X(e,r){!r.readingMore&&r.constructed&&(r.readingMore=!0,t.nextTick(J,e,r))}function J(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){const r=e.length;if(w("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function tt(t){const e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!1===e[D]?e.flowing=!0:t.listenerCount("data")>0?t.resume():e.readableListening||(e.flowing=null)}function et(t){w("readable nexttick read 0"),t.read(0)}function rt(t,e){w("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),it(t),e.flowing&&!e.reading&&t.read(0)}function it(t){const e=t._readableState;for(w("flow",e.flowing);e.flowing&&null!==t.read(););}function nt(t,e){"function"!=typeof t.read&&(t=q.wrap(t,{objectMode:!0}));const r=async function*(t,e){let r,i=j;function n(e){this===t?(i(),i=j):i=e}t.on("readable",n);const s=_(t,{writable:!1},t=>{r=t?k(r,t):null,i(),i=j});try{for(;;){const e=t.destroyed?null:t.read();if(null!==e)yield e;else{if(r)throw r;if(null===r)return;await new h(n)}}}catch(t){throw r=k(r,t),r}finally{!r&&!1===(null==e?void 0:e.destroyOnReturn)||void 0!==r&&!t._readableState.autoDestroy?(t.off("readable",n),s()):S.destroyer(t,null)}}(t,e);return r.stream=t,r}function st(t,e){if(0===e.length)return null;let r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function ot(e){const r=e._readableState;w("endReadable",r.endEmitted),r.endEmitted||(r.ended=!0,t.nextTick(at,r,e))}function at(e,r){if(w("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,r.emit("end"),r.writable&&!1===r.allowHalfOpen)t.nextTick(lt,r);else if(e.autoDestroy){const t=r._writableState;(!t||t.autoDestroy&&(t.finished||!1===t.writable))&&r.destroy()}}function lt(t){t.writable&&!t.writableEnded&&!t.destroyed&&t.end()}let ht;function ut(){return void 0===ht&&(ht={}),ht}return q.prototype.read=function(t){w("read",t),void 0===t?t=NaN:r(t)||(t=n(t,10));const e=this._readableState,i=t;if(t>e.highWaterMark&&(e.highWaterMark=function(t){if(t>1073741824)throw new A("size","<= 1GiB",t);return t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,++t}(t)),0!==t&&(e.state&=-129),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return w("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?ot(this):K(this),null;if(0===(t=Y(t,e))&&e.ended)return 0===e.length&&ot(this),null;let s,o=!!(64&e.state);if(w("need readable",o),(0===e.length||e.length-t<e.highWaterMark)&&(o=!0,w("length less than watermark",o)),e.ended||e.reading||e.destroyed||e.errored||!e.constructed)o=!1,w("reading, ended or constructing",o);else if(o){w("do read"),e.state|=8|W,0===e.length&&(e.state|=64);try{this._read(e.highWaterMark)}catch(t){F(this,t)}e.state&=~W,e.reading||(t=Y(i,e))}return s=t>0?st(t,e):null,null===s?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null),0===e.length&&(e.ended||(e.needReadable=!0),i!==t&&e.ended&&ot(this)),null===s||e.errorEmitted||e.closeEmitted||(e.dataEmitted=!0,this.emit("data",s)),s},q.prototype._read=function(t){throw new R("_read()")},q.prototype.pipe=function(e,r){const i=this,n=this._readableState;1===n.pipes.length&&(n.multiAwaitDrain||(n.multiAwaitDrain=!0,n.awaitDrainWriters=new u(n.awaitDrainWriters?[n.awaitDrainWriters]:[]))),n.pipes.push(e),w("pipe count=%d opts=%j",n.pipes.length,r);const s=(!r||!1!==r.end)&&e!==t.stdout&&e!==t.stderr?a:m;function o(t,r){w("onunpipe"),t===i&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,function(){w("cleanup"),e.removeListener("close",p),e.removeListener("finish",g),l&&e.removeListener("drain",l);e.removeListener("error",d),e.removeListener("unpipe",o),i.removeListener("end",a),i.removeListener("end",m),i.removeListener("data",f),h=!0,l&&n.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&l()}())}function a(){w("onend"),e.end()}let l;n.endEmitted?t.nextTick(s):i.once("end",s),e.on("unpipe",o);let h=!1;function c(){h||(1===n.pipes.length&&n.pipes[0]===e?(w("false write response, pause",0),n.awaitDrainWriters=e,n.multiAwaitDrain=!1):n.pipes.length>1&&n.pipes.includes(e)&&(w("false write response, pause",n.awaitDrainWriters.size),n.awaitDrainWriters.add(e)),i.pause()),l||(l=function(t,e){return function(){const r=t._readableState;r.awaitDrainWriters===e?(w("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(w("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(e)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!t.listenerCount("data")||t.resume()}}(i,e),e.on("drain",l))}function f(t){w("ondata");const r=e.write(t);w("dest.write",r),!1===r&&c()}function d(t){if(w("onerror",t),m(),e.removeListener("error",d),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?F(e,t):e.emit("error",t)}}function p(){e.removeListener("finish",g),m()}function g(){w("onfinish"),e.removeListener("close",p),m()}function m(){w("unpipe"),i.unpipe(e)}return i.on("data",f),y(e,"error",d),e.once("close",p),e.once("finish",g),e.emit("pipe",i),!0===e.writableNeedDrain?c():n.flowing||(w("pipe resume"),i.resume()),e},q.prototype.unpipe=function(t){const r=this._readableState;if(0===r.pipes.length)return this;if(!t){const t=r.pipes;r.pipes=[],this.pause();for(let e=0;e<t.length;e++)t[e].emit("unpipe",this,{hasUnpiped:!1});return this}const i=e(r.pipes,t);return-1===i||(r.pipes.splice(i,1),0===r.pipes.length&&this.pause(),t.emit("unpipe",this,{hasUnpiped:!1})),this},q.prototype.on=function(e,r){const i=g.prototype.on.call(this,e,r),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,w("on readable",n.length,n.reading),n.length?K(this):n.reading||t.nextTick(et,this))),i},q.prototype.addListener=q.prototype.on,q.prototype.removeListener=function(e,r){const i=g.prototype.removeListener.call(this,e,r);return"readable"===e&&t.nextTick(tt,this),i},q.prototype.off=q.prototype.removeListener,q.prototype.removeAllListeners=function(e){const r=g.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||t.nextTick(tt,this),r},q.prototype.resume=function(){const e=this._readableState;return e.flowing||(w("resume"),e.flowing=!e.readableListening,function(e,r){r.resumeScheduled||(r.resumeScheduled=!0,t.nextTick(rt,e,r))}(this,e)),e[D]=!1,this},q.prototype.pause=function(){return w("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(w("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[D]=!0,this},q.prototype.wrap=function(t){let e=!1;t.on("data",r=>{!this.push(r)&&t.pause&&(e=!0,t.pause())}),t.on("end",()=>{this.push(null)}),t.on("error",t=>{F(this,t)}),t.on("close",()=>{this.destroy()}),t.on("destroy",()=>{this.destroy()}),this._read=()=>{e&&t.resume&&(e=!1,t.resume())};const r=o(t);for(let e=1;e<r.length;e++){const i=r[e];void 0===this[i]&&"function"==typeof t[i]&&(this[i]=t[i].bind(t))}return this},q.prototype[f]=function(){return nt(this)},q.prototype.iterator=function(t){return void 0!==t&&I(t,"options"),nt(this,t)},s(q.prototype,{readable:{__proto__:null,get(){const t=this._readableState;return!(!t||!1===t.readable||t.destroyed||t.errorEmitted||t.endEmitted)},set(t){this._readableState&&(this._readableState.readable=!!t)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._readableState.readable||!this._readableState.destroyed&&!this._readableState.errored||this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.objectMode}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return!!this._readableState&&this._readableState.closed}},destroyed:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.destroyed},set(t){this._readableState&&(this._readableState.destroyed=t)}},readableEnded:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.endEmitted}}}),s(H.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return!1!==this[D]},set(t){this[D]=!!t}}}),q._fromList=st,q.from=function(t,e){return C(q,t,e)},q.fromWeb=function(t,e){return ut().newStreamReadableFromReadableStream(t,e)},q.toWeb=function(t,e){return ut().newReadableStreamFromStreamReadable(t,e)},q.wrap=function(t,e){var r,i;return new q({objectMode:null===(r=null!==(i=t.readableObjectMode)&&void 0!==i?i:t.objectMode)||void 0===r||r,...e,destroy(e,r){S.destroyer(t,e),r(e)}}).wrap(t)},on}function Pn(){if(hn)return ln;hn=1;const t=Wi(),{ArrayPrototypeSlice:e,Error:r,FunctionPrototypeSymbolHasInstance:i,ObjectDefineProperty:n,ObjectDefineProperties:s,ObjectSetPrototypeOf:o,StringPrototypeToLowerCase:a,Symbol:h,SymbolHasInstance:u}=pi();ln=I,I.WritableState=L;const{EventEmitter:c}=P(),f=Hi().Stream,{Buffer:d}=l,p=$i(),{addAbortSignal:g}=Xi(),{getHighWaterMark:y,getDefaultHighWaterMark:m}=tn(),{ERR_INVALID_ARG_TYPE:b,ERR_METHOD_NOT_IMPLEMENTED:_,ERR_MULTIPLE_CALLBACK:w,ERR_STREAM_CANNOT_PIPE:v,ERR_STREAM_DESTROYED:S,ERR_STREAM_ALREADY_FINISHED:E,ERR_STREAM_NULL_VALUES:x,ERR_STREAM_WRITE_AFTER_END:k,ERR_UNKNOWN_ENCODING:T}=vi().codes,{errorOrDestroy:R}=p;function A(){}o(I.prototype,f.prototype),o(I,f);const O=h("kOnFinished");function L(t,e,r){"boolean"!=typeof r&&(r=e instanceof Dn()),this.objectMode=!(!t||!t.objectMode),r&&(this.objectMode=this.objectMode||!(!t||!t.writableObjectMode)),this.highWaterMark=t?y(this,t,"writableHighWaterMark",r):m(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!t||!1!==t.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=j.bind(void 0,e),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,M(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!t||!1!==t.emitClose,this.autoDestroy=!t||!1!==t.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[O]=[]}function M(t){t.buffered=[],t.bufferedIndex=0,t.allBuffers=!0,t.allNoop=!0}function I(t){const e=this instanceof Dn();if(!e&&!i(I,this))return new I(t);this._writableState=new L(t,this,e),t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&g(t.signal,this)),f.call(this,t),p.construct(this,()=>{const t=this._writableState;t.writing||W(this,t),$(this,t)})}function D(e,r,i,n){const s=e._writableState;if("function"==typeof i)n=i,i=s.defaultEncoding;else{if(i){if("buffer"!==i&&!d.isEncoding(i))throw new T(i)}else i=s.defaultEncoding;"function"!=typeof n&&(n=A)}if(null===r)throw new x;if(!s.objectMode)if("string"==typeof r)!1!==s.decodeStrings&&(r=d.from(r,i),i="buffer");else if(r instanceof d)i="buffer";else{if(!f._isUint8Array(r))throw new b("chunk",["string","Buffer","Uint8Array"],r);r=f._uint8ArrayToBuffer(r),i="buffer"}let o;return s.ending?o=new k:s.destroyed&&(o=new S("write")),o?(t.nextTick(n,o),R(e,o,!0),o):(s.pendingcb++,function(t,e,r,i,n){const s=e.objectMode?1:r.length;e.length+=s;const o=e.length<e.highWaterMark;o||(e.needDrain=!0);e.writing||e.corked||e.errored||!e.constructed?(e.buffered.push({chunk:r,encoding:i,callback:n}),e.allBuffers&&"buffer"!==i&&(e.allBuffers=!1),e.allNoop&&n!==A&&(e.allNoop=!1)):(e.writelen=s,e.writecb=n,e.writing=!0,e.sync=!0,t._write(r,i,e.onwrite),e.sync=!1);return o&&!e.errored&&!e.destroyed}(e,s,r,i,n))}function N(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new S("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function C(t,e,r,i){--e.pendingcb,i(r),z(e),R(t,r)}function j(e,r){const i=e._writableState,n=i.sync,s=i.writecb;"function"==typeof s?(i.writing=!1,i.writecb=null,i.length-=i.writelen,i.writelen=0,r?(r.stack,i.errored||(i.errored=r),e._readableState&&!e._readableState.errored&&(e._readableState.errored=r),n?t.nextTick(C,e,i,r,s):C(e,i,r,s)):(i.buffered.length>i.bufferedIndex&&W(e,i),n?null!==i.afterWriteTickInfo&&i.afterWriteTickInfo.cb===s?i.afterWriteTickInfo.count++:(i.afterWriteTickInfo={count:1,cb:s,stream:e,state:i},t.nextTick(F,i.afterWriteTickInfo)):B(e,i,1,s))):R(e,new w)}function F({stream:t,state:e,count:r,cb:i}){return e.afterWriteTickInfo=null,B(t,e,r,i)}function B(t,e,r,i){for(!e.ending&&!t.destroyed&&0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"));r-- >0;)e.pendingcb--,i();e.destroyed&&z(e),$(t,e)}function z(t){if(t.writing)return;for(let r=t.bufferedIndex;r<t.buffered.length;++r){var e;const{chunk:i,callback:n}=t.buffered[r],s=t.objectMode?1:i.length;t.length-=s,n(null!==(e=t.errored)&&void 0!==e?e:new S("write"))}const r=t[O].splice(0);for(let e=0;e<r.length;e++){var i;r[e](null!==(i=t.errored)&&void 0!==i?i:new S("end"))}M(t)}function W(t,r){if(r.corked||r.bufferProcessing||r.destroyed||!r.constructed)return;const{buffered:i,bufferedIndex:n,objectMode:s}=r,o=i.length-n;if(!o)return;let a=n;if(r.bufferProcessing=!0,o>1&&t._writev){r.pendingcb-=o-1;const n=r.allNoop?A:t=>{for(let e=a;e<i.length;++e)i[e].callback(t)},s=r.allNoop&&0===a?i:e(i,a);s.allBuffers=r.allBuffers,N(t,r,!0,r.length,s,"",n),M(r)}else{do{const{chunk:e,encoding:n,callback:o}=i[a];i[a++]=null;N(t,r,!1,s?1:e.length,e,n,o)}while(a<i.length&&!r.writing);a===i.length?M(r):a>256?(i.splice(0,a),r.bufferedIndex=0):r.bufferedIndex=a}r.bufferProcessing=!1}function U(t){return t.ending&&!t.destroyed&&t.constructed&&0===t.length&&!t.errored&&0===t.buffered.length&&!t.finished&&!t.writing&&!t.errorEmitted&&!t.closeEmitted}function G(e,r){r.prefinished||r.finalCalled||("function"!=typeof e._final||r.destroyed?(r.prefinished=!0,e.emit("prefinish")):(r.finalCalled=!0,function(e,r){let i=!1;function n(n){if(i)R(e,null!=n?n:w());else if(i=!0,r.pendingcb--,n){const t=r[O].splice(0);for(let e=0;e<t.length;e++)t[e](n);R(e,n,r.sync)}else U(r)&&(r.prefinished=!0,e.emit("prefinish"),r.pendingcb++,t.nextTick(H,e,r))}r.sync=!0,r.pendingcb++;try{e._final(n)}catch(t){n(t)}r.sync=!1}(e,r)))}function $(e,r,i){U(r)&&(G(e,r),0===r.pendingcb&&(i?(r.pendingcb++,t.nextTick((t,e)=>{U(e)?H(t,e):e.pendingcb--},e,r)):U(r)&&(r.pendingcb++,H(e,r))))}function H(t,e){e.pendingcb--,e.finished=!0;const r=e[O].splice(0);for(let t=0;t<r.length;t++)r[t]();if(t.emit("finish"),e.autoDestroy){const e=t._readableState;(!e||e.autoDestroy&&(e.endEmitted||!1===e.readable))&&t.destroy()}}L.prototype.getBuffer=function(){return e(this.buffered,this.bufferedIndex)},n(L.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}}),n(I,u,{__proto__:null,value:function(t){return!!i(this,t)||this===I&&(t&&t._writableState instanceof L)}}),I.prototype.pipe=function(){R(this,new v)},I.prototype.write=function(t,e,r){return!0===D(this,t,e,r)},I.prototype.cork=function(){this._writableState.corked++},I.prototype.uncork=function(){const t=this._writableState;t.corked&&(t.corked--,t.writing||W(this,t))},I.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=a(t)),!d.isEncoding(t))throw new T(t);return this._writableState.defaultEncoding=t,this},I.prototype._write=function(t,e,r){if(!this._writev)throw new _("_write()");this._writev([{chunk:t,encoding:e}],r)},I.prototype._writev=null,I.prototype.end=function(e,i,n){const s=this._writableState;let o;if("function"==typeof e?(n=e,e=null,i=null):"function"==typeof i&&(n=i,i=null),null!=e){const t=D(this,e,i);t instanceof r&&(o=t)}return s.corked&&(s.corked=1,this.uncork()),o||(s.errored||s.ending?s.finished?o=new E("end"):s.destroyed&&(o=new S("end")):(s.ending=!0,$(this,s,!0),s.ended=!0)),"function"==typeof n&&(o||s.finished?t.nextTick(n,o):s[O].push(n)),this},s(I.prototype,{closed:{__proto__:null,get(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get(){return!!this._writableState&&this._writableState.destroyed},set(t){this._writableState&&(this._writableState.destroyed=t)}},writable:{__proto__:null,get(){const t=this._writableState;return!(!t||!1===t.writable||t.destroyed||t.errored||t.ending||t.ended)},set(t){this._writableState&&(this._writableState.writable=!!t)}},writableFinished:{__proto__:null,get(){return!!this._writableState&&this._writableState.finished}},writableObjectMode:{__proto__:null,get(){return!!this._writableState&&this._writableState.objectMode}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return!!this._writableState&&this._writableState.ending}},writableNeedDrain:{__proto__:null,get(){const t=this._writableState;return!!t&&(!t.destroyed&&!t.ending&&t.needDrain)}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._writableState.writable||!this._writableState.destroyed&&!this._writableState.errored||this._writableState.finished)}}});const q=p.destroy;let V;function Z(){return void 0===V&&(V={}),V}return I.prototype.destroy=function(e,r){const i=this._writableState;return!i.destroyed&&(i.bufferedIndex<i.buffered.length||i[O].length)&&t.nextTick(z,i),q.call(this,e,r),this},I.prototype._undestroy=p.undestroy,I.prototype._destroy=function(t,e){e(t)},I.prototype[c.captureRejectionSymbol]=function(t){this.destroy(t)},I.fromWeb=function(t,e){return Z().newStreamWritableFromWritableStream(t,e)},I.toWeb=function(t){return Z().newWritableStreamFromStreamWritable(t)},ln}function In(){if(cn)return un;cn=1;const t=Wi(),e=l,{isReadable:r,isWritable:i,isIterable:n,isNodeStream:s,isReadableNodeStream:o,isWritableNodeStream:a,isDuplexNodeStream:h,isReadableStream:u,isWritableStream:c}=Ui(),f=Gi(),{AbortError:d,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:g}}=vi(),{destroyer:y}=$i(),m=Dn(),b=Mn(),_=Pn(),{createDeferredPromise:w}=Ti(),v=Ln(),S=globalThis.Blob||e.Blob,E=void 0!==S?function(t){return t instanceof S}:function(t){return!1},x=globalThis.AbortController||ki().AbortController,{FunctionPrototypeCall:k}=pi();class T extends m{constructor(t){super(t),!1===(null==t?void 0:t.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==t?void 0:t.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function R(t){const e=t.readable&&"function"!=typeof t.readable.read?b.wrap(t.readable):t.readable,n=t.writable;let s,o,a,l,h,u=!!r(e),c=!!i(n);function p(t){const e=l;l=null,e?e(t):t&&h.destroy(t)}return h=new T({readableObjectMode:!(null==e||!e.readableObjectMode),writableObjectMode:!(null==n||!n.writableObjectMode),readable:u,writable:c}),c&&(f(n,t=>{c=!1,t&&y(e,t),p(t)}),h._write=function(t,e,r){n.write(t,e)?r():s=r},h._final=function(t){n.end(),o=t},n.on("drain",function(){if(s){const t=s;s=null,t()}}),n.on("finish",function(){if(o){const t=o;o=null,t()}})),u&&(f(e,t=>{u=!1,t&&y(e,t),p(t)}),e.on("readable",function(){if(a){const t=a;a=null,t()}}),e.on("end",function(){h.push(null)}),h._read=function(){for(;;){const t=e.read();if(null===t)return void(a=h._read);if(!h.push(t))return}}),h._destroy=function(t,r){t||null===l||(t=new d),a=null,s=null,o=null,null===l?r(t):(l=r,y(n,t),y(e,t))},h}return un=function e(r,i){if(h(r))return r;if(o(r))return R({readable:r});if(a(r))return R({writable:r});if(s(r))return R({writable:!1,readable:!1});if(u(r))return R({readable:b.fromWeb(r)});if(c(r))return R({writable:_.fromWeb(r)});if("function"==typeof r){const{value:e,write:s,final:o,destroy:a}=function(e){let{promise:r,resolve:i}=w();const n=new x,s=n.signal,o=e(async function*(){for(;;){const e=r;r=null;const{chunk:n,done:o,cb:a}=await e;if(t.nextTick(a),o)return;if(s.aborted)throw new d(void 0,{cause:s.reason});({promise:r,resolve:i}=w()),yield n}}(),{signal:s});return{value:o,write(t,e,r){const n=i;i=null,n({chunk:t,done:!1,cb:r})},final(t){const e=i;i=null,e({done:!0,cb:t})},destroy(t,e){n.abort(),e(t)}}}(r);if(n(e))return v(T,e,{objectMode:!0,write:s,final:o,destroy:a});const l=null==e?void 0:e.then;if("function"==typeof l){let r;const i=k(l,e,t=>{if(null!=t)throw new g("nully","body",t)},t=>{y(r,t)});return r=new T({objectMode:!0,readable:!1,write:s,final(e){o(async()=>{try{await i,t.nextTick(e,null)}catch(r){t.nextTick(e,r)}})},destroy:a})}throw new g("Iterable, AsyncIterable or AsyncFunction",i,e)}if(E(r))return e(r.arrayBuffer());if(n(r))return v(T,r,{objectMode:!0,writable:!1});if(u(null==r?void 0:r.readable)&&c(null==r?void 0:r.writable))return T.fromWeb(r);if("object"==typeof(null==r?void 0:r.writable)||"object"==typeof(null==r?void 0:r.readable)){return R({readable:null!=r&&r.readable?o(null==r?void 0:r.readable)?null==r?void 0:r.readable:e(r.readable):void 0,writable:null!=r&&r.writable?a(null==r?void 0:r.writable)?null==r?void 0:r.writable:e(r.writable):void 0})}const l=null==r?void 0:r.then;if("function"==typeof l){let t;return k(l,r,e=>{null!=e&&t.push(e),t.push(null)},e=>{y(t,e)}),t=new T({objectMode:!0,writable:!1,read(){}})}throw new p(i,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],r)}}function Dn(){if(dn)return fn;dn=1;const{ObjectDefineProperties:t,ObjectGetOwnPropertyDescriptor:e,ObjectKeys:r,ObjectSetPrototypeOf:i}=pi();fn=o;const n=Mn(),s=Pn();i(o.prototype,n.prototype),i(o,n);{const t=r(s.prototype);for(let e=0;e<t.length;e++){const r=t[e];o.prototype[r]||(o.prototype[r]=s.prototype[r])}}function o(t){if(!(this instanceof o))return new o(t);n.call(this,t),s.call(this,t),t?(this.allowHalfOpen=!1!==t.allowHalfOpen,!1===t.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===t.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}let a,l;function h(){return void 0===a&&(a={}),a}return t(o.prototype,{writable:{__proto__:null,...e(s.prototype,"writable")},writableHighWaterMark:{__proto__:null,...e(s.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...e(s.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...e(s.prototype,"writableBuffer")},writableLength:{__proto__:null,...e(s.prototype,"writableLength")},writableFinished:{__proto__:null,...e(s.prototype,"writableFinished")},writableCorked:{__proto__:null,...e(s.prototype,"writableCorked")},writableEnded:{__proto__:null,...e(s.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...e(s.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set(t){this._readableState&&this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}}),o.fromWeb=function(t,e){return h().newStreamDuplexFromReadableWritablePair(t,e)},o.toWeb=function(t){return h().newReadableWritablePairFromDuplex(t)},o.from=function(t){return l||(l=In()),l(t,"body")},fn}function Nn(){if(gn)return pn;gn=1;const{ObjectSetPrototypeOf:t,Symbol:e}=pi();pn=o;const{ERR_METHOD_NOT_IMPLEMENTED:r}=vi().codes,i=Dn(),{getHighWaterMark:n}=tn();t(o.prototype,i.prototype),t(o,i);const s=e("kCallback");function o(t){if(!(this instanceof o))return new o(t);const e=t?n(this,t,"readableHighWaterMark",!0):null;0===e&&(t={...t,highWaterMark:null,readableHighWaterMark:e,writableHighWaterMark:t.writableHighWaterMark||0}),i.call(this,t),this._readableState.sync=!1,this[s]=null,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",l)}function a(t){"function"!=typeof this._flush||this.destroyed?(this.push(null),t&&t()):this._flush((e,r)=>{e?t?t(e):this.destroy(e):(null!=r&&this.push(r),this.push(null),t&&t())})}function l(){this._final!==a&&a.call(this)}return o.prototype._final=a,o.prototype._transform=function(t,e,i){throw new r("_transform()")},o.prototype._write=function(t,e,r){const i=this._readableState,n=this._writableState,o=i.length;this._transform(t,e,(t,e)=>{t?r(t):(null!=e&&this.push(e),n.ended||o===i.length||i.length<i.highWaterMark?r():this[s]=r)})},o.prototype._read=function(){if(this[s]){const t=this[s];this[s]=null,t()}},pn}function Cn(){if(mn)return yn;mn=1;const{ObjectSetPrototypeOf:t}=pi();yn=r;const e=Nn();function r(t){if(!(this instanceof r))return new r(t);e.call(this,t)}return t(r.prototype,e.prototype),t(r,e),r.prototype._transform=function(t,e,r){r(null,t)},yn}function jn(){if(_n)return bn;_n=1;const t=Wi(),{ArrayIsArray:e,Promise:r,SymbolAsyncIterator:i,SymbolDispose:n}=pi(),s=Gi(),{once:o}=Ti(),a=$i(),l=Dn(),{aggregateTwoErrors:h,codes:{ERR_INVALID_ARG_TYPE:u,ERR_INVALID_RETURN_VALUE:c,ERR_MISSING_ARGS:f,ERR_STREAM_DESTROYED:d,ERR_STREAM_PREMATURE_CLOSE:p},AbortError:g}=vi(),{validateFunction:y,validateAbortSignal:m}=Li(),{isIterable:b,isReadable:_,isReadableNodeStream:w,isNodeStream:v,isTransformStream:S,isWebStream:E,isReadableStream:x,isReadableFinished:k}=Ui(),T=globalThis.AbortController||ki().AbortController;let R,A,O;function L(t,e,r){let i=!1;t.on("close",()=>{i=!0});return{destroy:e=>{i||(i=!0,a.destroyer(t,e||new d("pipe")))},cleanup:s(t,{readable:e,writable:r},t=>{i=!t})}}function M(t){if(b(t))return t;if(w(t))return async function*(t){A||(A=Mn());yield*A.prototype[i].call(t)}(t);throw new u("val",["Readable","Iterable","AsyncIterable"],t)}async function P(t,e,i,{end:n}){let o,a=null;const l=t=>{if(t&&(o=t),a){const t=a;a=null,t()}},u=()=>new r((t,e)=>{o?e(o):a=()=>{o?e(o):t()}});e.on("drain",l);const c=s(e,{readable:!1},l);try{e.writableNeedDrain&&await u();for await(const r of t)e.write(r)||await u();n&&(e.end(),await u()),i()}catch(t){i(o!==t?h(o,t):t)}finally{c(),e.off("drain",l)}}async function I(t,e,r,{end:i}){S(e)&&(e=e.writable);const n=e.getWriter();try{for await(const e of t)await n.ready,n.write(e).catch(()=>{});await n.ready,i&&await n.close(),r()}catch(t){try{await n.abort(t),r(t)}catch(t){r(t)}}}function D(r,i,s){if(1===r.length&&e(r[0])&&(r=r[0]),r.length<2)throw new f("streams");const o=new T,a=o.signal,h=null==s?void 0:s.signal,d=[];function p(){B(new g)}let y,k,A;m(h,"options.signal"),O=O||Ti().addAbortListener,h&&(y=O(h,p));const D=[];let C,j=0;function F(t){B(t,0===--j)}function B(e,r){var s;if(!e||k&&"ERR_STREAM_PREMATURE_CLOSE"!==k.code||(k=e),k||r){for(;D.length;)D.shift()(k);null===(s=y)||void 0===s||s[n](),o.abort(),r&&(k||d.forEach(t=>t()),t.nextTick(i,k,A))}}for(let U=0;U<r.length;U++){const G=r[U],$=U<r.length-1,H=U>0,q=$||!1!==(null==s?void 0:s.end),V=U===r.length-1;if(v(G)){if(q){const{destroy:Y,cleanup:K}=L(G,$,H);D.push(Y),_(G)&&V&&d.push(K)}function Z(t){t&&"AbortError"!==t.name&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code&&F(t)}G.on("error",Z),_(G)&&V&&d.push(()=>{G.removeListener("error",Z)})}if(0===U)if("function"==typeof G){if(C=G({signal:a}),!b(C))throw new c("Iterable, AsyncIterable or Stream","source",C)}else C=b(G)||w(G)||S(G)?G:l.from(G);else if("function"==typeof G){var z;if(S(C))C=M(null===(z=C)||void 0===z?void 0:z.readable);else C=M(C);if(C=G(C,{signal:a}),$){if(!b(C,!0))throw new c("AsyncIterable",`transform[${U-1}]`,C)}else{var W;R||(R=Cn());const Q=new R({objectMode:!0}),X=null===(W=C)||void 0===W?void 0:W.then;if("function"==typeof X)j++,X.call(C,e=>{A=e,null!=e&&Q.write(e),q&&Q.end(),t.nextTick(F)},e=>{Q.destroy(e),t.nextTick(F,e)});else if(b(C,!0))j++,P(C,Q,F,{end:q});else{if(!x(C)&&!S(C))throw new c("AsyncIterable or Promise","destination",C);{const et=C.readable||C;j++,P(et,Q,F,{end:q})}}C=Q;const{destroy:J,cleanup:tt}=L(C,!1,!0);D.push(J),V&&d.push(tt)}}else if(v(G)){if(w(C)){j+=2;const rt=N(C,G,F,{end:q});_(G)&&V&&d.push(rt)}else if(S(C)||x(C)){const it=C.readable||C;j++,P(it,G,F,{end:q})}else{if(!b(C))throw new u("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],C);j++,P(C,G,F,{end:q})}C=G}else if(E(G)){if(w(C))j++,I(M(C),G,F,{end:q});else if(x(C)||b(C))j++,I(C,G,F,{end:q});else{if(!S(C))throw new u("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],C);j++,I(C.readable,G,F,{end:q})}C=G}else C=l.from(G)}return(null!=a&&a.aborted||null!=h&&h.aborted)&&t.nextTick(p),C}function N(e,r,i,{end:n}){let o=!1;if(r.on("close",()=>{o||i(new p)}),e.pipe(r,{end:!1}),n){function a(){o=!0,r.end()}k(e)?t.nextTick(a):e.once("end",a)}else i();return s(e,{readable:!0,writable:!1},t=>{const r=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&r&&r.ended&&!r.errored&&!r.errorEmitted?e.once("end",i).once("error",i):i(t)}),s(r,{readable:!1,writable:!0},i)}return bn={pipelineImpl:D,pipeline:function(...t){return D(t,o(function(t){return y(t[t.length-1],"streams[stream.length - 1]"),t.pop()}(t)))}}}function Fn(){if(vn)return wn;vn=1;const{pipeline:t}=jn(),e=Dn(),{destroyer:r}=$i(),{isNodeStream:i,isReadable:n,isWritable:s,isWebStream:o,isTransformStream:a,isWritableStream:l,isReadableStream:h}=Ui(),{AbortError:u,codes:{ERR_INVALID_ARG_VALUE:c,ERR_MISSING_ARGS:f}}=vi(),d=Gi();return wn=function(...p){if(0===p.length)throw new f("streams");if(1===p.length)return e.from(p[0]);const g=[...p];if("function"==typeof p[0]&&(p[0]=e.from(p[0])),"function"==typeof p[p.length-1]){const t=p.length-1;p[t]=e.from(p[t])}for(let t=0;t<p.length;++t)if(i(p[t])||o(p[t])){if(t<p.length-1&&!(n(p[t])||h(p[t])||a(p[t])))throw new c(`streams[${t}]`,g[t],"must be readable");if(t>0&&!(s(p[t])||l(p[t])||a(p[t])))throw new c(`streams[${t}]`,g[t],"must be writable")}let y,m,b,_,w;const v=p[0],S=t(p,function(t){const e=_;_=null,e?e(t):t?w.destroy(t):x||E||w.destroy()}),E=!!(s(v)||l(v)||a(v)),x=!!(n(S)||h(S)||a(S));if(w=new e({writableObjectMode:!(null==v||!v.writableObjectMode),readableObjectMode:!(null==S||!S.readableObjectMode),writable:E,readable:x}),E){if(i(v))w._write=function(t,e,r){v.write(t,e)?r():y=r},w._final=function(t){v.end(),m=t},v.on("drain",function(){if(y){const t=y;y=null,t()}});else if(o(v)){const t=(a(v)?v.writable:v).getWriter();w._write=async function(e,r,i){try{await t.ready,t.write(e).catch(()=>{}),i()}catch(t){i(t)}},w._final=async function(e){try{await t.ready,t.close().catch(()=>{}),m=e}catch(t){e(t)}}}const t=a(S)?S.readable:S;d(t,()=>{if(m){const t=m;m=null,t()}})}if(x)if(i(S))S.on("readable",function(){if(b){const t=b;b=null,t()}}),S.on("end",function(){w.push(null)}),w._read=function(){for(;;){const t=S.read();if(null===t)return void(b=w._read);if(!w.push(t))return}};else if(o(S)){const t=(a(S)?S.readable:S).getReader();w._read=async function(){for(;;)try{const{value:e,done:r}=await t.read();if(!w.push(e))return;if(r)return void w.push(null)}catch{return}}}return w._destroy=function(t,e){t||null===_||(t=new u),b=null,y=null,m=null,null===_?e(t):(_=e,i(S)&&r(S,t))},w},wn}function Bn(){if(xn)return En;xn=1;const{ArrayPrototypePop:t,Promise:e}=pi(),{isIterable:r,isNodeStream:i,isWebStream:n}=Ui(),{pipelineImpl:s}=jn(),{finished:o}=Gi();return zn(),En={finished:o,pipeline:function(...o){return new e((e,a)=>{let l,h;const u=o[o.length-1];if(u&&"object"==typeof u&&!i(u)&&!r(u)&&!n(u)){const e=t(o);l=e.signal,h=e.end}s(o,(t,r)=>{t?a(t):e(r)},{signal:l,end:h})})}}}function zn(){if(kn)return di.exports;kn=1;const{Buffer:t}=l,{ObjectDefineProperty:e,ObjectKeys:r,ReflectApply:i}=pi(),{promisify:{custom:n}}=Ti(),{streamReturningOperators:s,promiseReturningOperators:o}=function(){if(Sn)return Oi;Sn=1;const t=globalThis.AbortController||ki().AbortController,{codes:{ERR_INVALID_ARG_VALUE:e,ERR_INVALID_ARG_TYPE:r,ERR_MISSING_ARGS:i,ERR_OUT_OF_RANGE:n},AbortError:s}=vi(),{validateAbortSignal:o,validateInteger:a,validateObject:l}=Li(),h=pi().Symbol("kWeak"),u=pi().Symbol("kResistStopPropagation"),{finished:c}=Gi(),f=Fn(),{addAbortSignalNoValidate:d}=Xi(),{isWritable:p,isNodeStream:g}=Ui(),{deprecate:y}=Ti(),{ArrayPrototypePush:m,Boolean:b,MathFloor:_,Number:w,NumberIsNaN:v,Promise:S,PromiseReject:E,PromiseResolve:x,PromisePrototypeThen:k,Symbol:T}=pi(),R=T("kEmpty"),A=T("kEof");function O(t,e){if("function"!=typeof t)throw new r("fn",["Function","AsyncFunction"],t);null!=e&&l(e,"options"),null!=(null==e?void 0:e.signal)&&o(e.signal,"options.signal");let i=1;null!=(null==e?void 0:e.concurrency)&&(i=_(e.concurrency));let n=i-1;return null!=(null==e?void 0:e.highWaterMark)&&(n=_(e.highWaterMark)),a(i,"options.concurrency",1),a(n,"options.highWaterMark",0),n+=i,async function*(){const r=Ti().AbortSignalAny([null==e?void 0:e.signal].filter(b)),o=this,a=[],l={signal:r};let h,u,c=!1,f=0;function d(){c=!0,p()}function p(){f-=1,g()}function g(){u&&!c&&f<i&&a.length<n&&(u(),u=null)}!async function(){try{for await(let e of o){if(c)return;if(r.aborted)throw new s;try{if(e=t(e,l),e===R)continue;e=x(e)}catch(t){e=E(t)}f+=1,k(e,p,d),a.push(e),h&&(h(),h=null),!c&&(a.length>=n||f>=i)&&await new S(t=>{u=t})}a.push(A)}catch(t){const e=E(t);k(e,p,d),a.push(e)}finally{c=!0,h&&(h(),h=null)}}();try{for(;;){for(;a.length>0;){const t=await a[0];if(t===A)return;if(r.aborted)throw new s;t!==R&&(yield t),a.shift(),g()}await new S(t=>{h=t})}}finally{c=!0,u&&(u(),u=null)}}.call(this)}async function L(t,e=void 0){for await(const r of M.call(this,t,e))return!0;return!1}function M(t,e){if("function"!=typeof t)throw new r("fn",["Function","AsyncFunction"],t);return O.call(this,async function(e,r){return await t(e,r)?e:R},e)}class P extends i{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function I(t){if(t=w(t),v(t))return 0;if(t<0)throw new n("number",">= 0",t);return t}return Oi.streamReturningOperators={asIndexedPairs:y(function(t=void 0){return null!=t&&l(t,"options"),null!=(null==t?void 0:t.signal)&&o(t.signal,"options.signal"),async function*(){let e=0;for await(const i of this){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new s({cause:t.signal.reason});yield[e++,i]}}.call(this)},"readable.asIndexedPairs will be removed in a future version."),drop:function(t,e=void 0){return null!=e&&l(e,"options"),null!=(null==e?void 0:e.signal)&&o(e.signal,"options.signal"),t=I(t),async function*(){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new s;for await(const r of this){var i;if(null!=e&&null!==(i=e.signal)&&void 0!==i&&i.aborted)throw new s;t--<=0&&(yield r)}}.call(this)},filter:M,flatMap:function(t,e){const r=O.call(this,t,e);return async function*(){for await(const t of r)yield*t}.call(this)},map:O,take:function(t,e=void 0){return null!=e&&l(e,"options"),null!=(null==e?void 0:e.signal)&&o(e.signal,"options.signal"),t=I(t),async function*(){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new s;for await(const r of this){var i;if(null!=e&&null!==(i=e.signal)&&void 0!==i&&i.aborted)throw new s;if(t-- >0&&(yield r),t<=0)return}}.call(this)},compose:function(t,r){if(null!=r&&l(r,"options"),null!=(null==r?void 0:r.signal)&&o(r.signal,"options.signal"),g(t)&&!p(t))throw new e("stream",t,"must be writable");const i=f(this,t);return null!=r&&r.signal&&d(r.signal,i),i}},Oi.promiseReturningOperators={every:async function(t,e=void 0){if("function"!=typeof t)throw new r("fn",["Function","AsyncFunction"],t);return!await L.call(this,async(...e)=>!await t(...e),e)},forEach:async function(t,e){if("function"!=typeof t)throw new r("fn",["Function","AsyncFunction"],t);for await(const r of O.call(this,async function(e,r){return await t(e,r),R},e));},reduce:async function(e,i,n){var a;if("function"!=typeof e)throw new r("reducer",["Function","AsyncFunction"],e);null!=n&&l(n,"options"),null!=(null==n?void 0:n.signal)&&o(n.signal,"options.signal");let f=arguments.length>1;if(null!=n&&null!==(a=n.signal)&&void 0!==a&&a.aborted){const t=new s(void 0,{cause:n.signal.reason});throw this.once("error",()=>{}),await c(this.destroy(t)),t}const d=new t,p=d.signal;if(null!=n&&n.signal){const t={once:!0,[h]:this,[u]:!0};n.signal.addEventListener("abort",()=>d.abort(),t)}let g=!1;try{for await(const t of this){var y;if(g=!0,null!=n&&null!==(y=n.signal)&&void 0!==y&&y.aborted)throw new s;f?i=await e(i,t,{signal:p}):(i=t,f=!0)}if(!g&&!f)throw new P}finally{d.abort()}return i},toArray:async function(t){null!=t&&l(t,"options"),null!=(null==t?void 0:t.signal)&&o(t.signal,"options.signal");const e=[];for await(const i of this){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new s(void 0,{cause:t.signal.reason});m(e,i)}return e},some:L,find:async function(t,e){for await(const r of M.call(this,t,e))return r}},Oi}(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:a}}=vi(),h=Fn(),{setDefaultHighWaterMark:u,getDefaultHighWaterMark:c}=tn(),{pipeline:f}=jn(),{destroyer:d}=$i(),p=Gi(),g=Bn(),y=Ui(),m=di.exports=Hi().Stream;m.isDestroyed=y.isDestroyed,m.isDisturbed=y.isDisturbed,m.isErrored=y.isErrored,m.isReadable=y.isReadable,m.isWritable=y.isWritable,m.Readable=Mn();for(const _ of r(s)){const w=s[_];function v(...t){if(new.target)throw a();return m.Readable.from(i(w,this,t))}e(v,"name",{__proto__:null,value:w.name}),e(v,"length",{__proto__:null,value:w.length}),e(m.Readable.prototype,_,{__proto__:null,value:v,enumerable:!1,configurable:!0,writable:!0})}for(const S of r(o)){const E=o[S];function x(...t){if(new.target)throw a();return i(E,this,t)}e(x,"name",{__proto__:null,value:E.name}),e(x,"length",{__proto__:null,value:E.length}),e(m.Readable.prototype,S,{__proto__:null,value:x,enumerable:!1,configurable:!0,writable:!0})}m.Writable=Pn(),m.Duplex=Dn(),m.Transform=Nn(),m.PassThrough=Cn(),m.pipeline=f;const{addAbortSignal:b}=Xi();return m.addAbortSignal=b,m.finished=p,m.destroy=d,m.compose=h,m.setDefaultHighWaterMark=u,m.getDefaultHighWaterMark=c,e(m,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>g}),e(f,n,{__proto__:null,enumerable:!0,get:()=>g.pipeline}),e(p,n,{__proto__:null,enumerable:!0,get:()=>g.finished}),m.Stream=m,m._isUint8Array=function(t){return t instanceof Uint8Array},m._uint8ArrayToBuffer=function(e){return t.from(e.buffer,e.byteOffset,e.byteLength)},di.exports}function Wn(){return Tn||(Tn=1,function(t){const e=s;if(e&&"disable"===process.env.READABLE_STREAM){const r=e.promises;t.exports._uint8ArrayToBuffer=e._uint8ArrayToBuffer,t.exports._isUint8Array=e._isUint8Array,t.exports.isDisturbed=e.isDisturbed,t.exports.isErrored=e.isErrored,t.exports.isReadable=e.isReadable,t.exports.Readable=e.Readable,t.exports.Writable=e.Writable,t.exports.Duplex=e.Duplex,t.exports.Transform=e.Transform,t.exports.PassThrough=e.PassThrough,t.exports.addAbortSignal=e.addAbortSignal,t.exports.finished=e.finished,t.exports.destroy=e.destroy,t.exports.pipeline=e.pipeline,t.exports.compose=e.compose,Object.defineProperty(e,"promises",{configurable:!0,enumerable:!0,get:()=>r}),t.exports.Stream=e.Stream}else{const e=zn(),r=Bn(),i=e.Readable.destroy;t.exports=e.Readable,t.exports._uint8ArrayToBuffer=e._uint8ArrayToBuffer,t.exports._isUint8Array=e._isUint8Array,t.exports.isDisturbed=e.isDisturbed,t.exports.isErrored=e.isErrored,t.exports.isReadable=e.isReadable,t.exports.Readable=e.Readable,t.exports.Writable=e.Writable,t.exports.Duplex=e.Duplex,t.exports.Transform=e.Transform,t.exports.PassThrough=e.PassThrough,t.exports.addAbortSignal=e.addAbortSignal,t.exports.finished=e.finished,t.exports.destroy=e.destroy,t.exports.destroy=i,t.exports.pipeline=e.pipeline,t.exports.compose=e.compose,Object.defineProperty(e,"promises",{configurable:!0,enumerable:!0,get:()=>r}),t.exports.Stream=e.Stream}t.exports.default=t.exports}(fi)),fi.exports}var Un,Gn,$n,Hn,qn,Vn,Zn,Yn,Kn,Qn,Xn,Jn,ts,es,rs,is,ns,ss,os,as,ls,hs,us,cs,fs,ds,ps,gs,ys,ms,bs,_s,ws,vs,Ss,Es,xs,ks,Ts,Rs,As,Os,Ls,Ms,Ps,Is,Ds,Ns,Cs,js,Fs,Bs,zs,Ws,Us,Gs,$s,Hs,qs,Vs,Zs,Ys,Ks,Qs,Xs,Js,to,eo,ro,io,no,so,oo,ao,lo,ho,uo,co,fo,po,go,yo,mo,bo,_o,wo,vo,So,Eo,xo,ko,To,Ro,Ao,Oo,Lo,Mo,Po,Io,Do,No={exports:{}};function Co(){if(Vn)return qn;Vn=1;var t=Gn?Un:(Gn=1,Un=function(t,e){for(var r=-1,i=e.length,n=t.length;++r<i;)t[n+r]=e[r];return t}),e=function(){if(Hn)return $n;Hn=1;var t=mr(),e=Pr(),r=Ir(),i=t?t.isConcatSpreadable:void 0;return $n=function(t){return r(t)||e(t)||!!(i&&t&&t[i])}}();return qn=function r(i,n,s,o,a){var l=-1,h=i.length;for(s||(s=e),a||(a=[]);++l<h;){var u=i[l];n>0&&s(u)?n>1?r(u,n-1,s,o,a):t(a,u):o||(a[a.length]=u)}return a},qn}function jo(){if(Qn)return Kn;Qn=1;var t=Er()(Object,"create");return Kn=t}function Fo(){if(hs)return ls;hs=1;var t=function(){if(Jn)return Xn;Jn=1;var t=jo();return Xn=function(){this.__data__=t?t(null):{},this.size=0}}(),e=es?ts:(es=1,ts=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}),r=function(){if(is)return rs;is=1;var t=jo(),e=Object.prototype.hasOwnProperty;return rs=function(r){var i=this.__data__;if(t){var n=i[r];return"__lodash_hash_undefined__"===n?void 0:n}return e.call(i,r)?i[r]:void 0}}(),i=function(){if(ss)return ns;ss=1;var t=jo(),e=Object.prototype.hasOwnProperty;return ns=function(r){var i=this.__data__;return t?void 0!==i[r]:e.call(i,r)}}(),n=function(){if(as)return os;as=1;var t=jo();return os=function(e,r){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=t&&void 0===r?"__lodash_hash_undefined__":r,this}}();function s(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}return s.prototype.clear=t,s.prototype.delete=e,s.prototype.get=r,s.prototype.has=i,s.prototype.set=n,ls=s}function Bo(){if(ds)return fs;ds=1;var t=Rr();return fs=function(e,r){for(var i=e.length;i--;)if(t(e[i][0],r))return i;return-1}}function zo(){if(Es)return Ss;Es=1;var t=cs?us:(cs=1,us=function(){this.__data__=[],this.size=0}),e=function(){if(gs)return ps;gs=1;var t=Bo(),e=Array.prototype.splice;return ps=function(r){var i=this.__data__,n=t(i,r);return!(n<0||(n==i.length-1?i.pop():e.call(i,n,1),--this.size,0))}}(),r=function(){if(ms)return ys;ms=1;var t=Bo();return ys=function(e){var r=this.__data__,i=t(r,e);return i<0?void 0:r[i][1]}}(),i=function(){if(_s)return bs;_s=1;var t=Bo();return bs=function(e){return t(this.__data__,e)>-1}}(),n=function(){if(vs)return ws;vs=1;var t=Bo();return ws=function(e,r){var i=this.__data__,n=t(i,e);return n<0?(++this.size,i.push([e,r])):i[n][1]=r,this}}();function s(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}return s.prototype.clear=t,s.prototype.delete=e,s.prototype.get=r,s.prototype.has=i,s.prototype.set=n,Ss=s}function Wo(){if(Rs)return Ts;Rs=1;var t=Fo(),e=zo(),r=function(){if(ks)return xs;ks=1;var t=Er()(yr(),"Map");return xs=t}();return Ts=function(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}}function Uo(){if(Ms)return Ls;Ms=1;var t=Os?As:(Os=1,As=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t});return Ls=function(e,r){var i=e.__data__;return t(r)?i["string"==typeof r?"string":"hash"]:i.map}}function Go(){if(Ws)return zs;Ws=1;var t=Wo(),e=function(){if(Is)return Ps;Is=1;var t=Uo();return Ps=function(e){var r=t(this,e).delete(e);return this.size-=r?1:0,r}}(),r=function(){if(Ns)return Ds;Ns=1;var t=Uo();return Ds=function(e){return t(this,e).get(e)}}(),i=function(){if(js)return Cs;js=1;var t=Uo();return Cs=function(e){return t(this,e).has(e)}}(),n=function(){if(Bs)return Fs;Bs=1;var t=Uo();return Fs=function(e,r){var i=t(this,e),n=i.size;return i.set(e,r),this.size+=i.size==n?0:1,this}}();function s(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}return s.prototype.clear=t,s.prototype.delete=e,s.prototype.get=r,s.prototype.has=i,s.prototype.set=n,zs=s}function $o(){if(Vs)return qs;Vs=1;var t=Go(),e=Gs?Us:(Gs=1,Us=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}),r=Hs?$s:(Hs=1,$s=function(t){return this.__data__.has(t)});function i(e){var r=-1,i=null==e?0:e.length;for(this.__data__=new t;++r<i;)this.add(e[r])}return i.prototype.add=i.prototype.push=e,i.prototype.has=r,qs=i}function Ho(){if(eo)return to;eo=1;var t=Ys?Zs:(Ys=1,Zs=function(t,e,r,i){for(var n=t.length,s=r+(i?1:-1);i?s--:++s<n;)if(e(t[s],s,t))return s;return-1}),e=Qs?Ks:(Qs=1,Ks=function(t){return t!=t}),r=Js?Xs:(Js=1,Xs=function(t,e,r){for(var i=r-1,n=t.length;++i<n;)if(t[i]===e)return i;return-1});return to=function(i,n,s){return n==n?r(i,n,s):t(i,e,s)}}function qo(){if(io)return ro;io=1;var t=Ho();return ro=function(e,r){return!!(null==e?0:e.length)&&t(e,r,0)>-1}}function Vo(){if(so)return no;return so=1,no=function(t,e,r){for(var i=-1,n=null==t?0:t.length;++i<n;)if(r(e,t[i]))return!0;return!1}}function Zo(){if(ho)return lo;return ho=1,lo=function(t,e){return t.has(e)}}function Yo(){if(co)return uo;co=1;var t=$o(),e=qo(),r=Vo(),i=ao?oo:(ao=1,oo=function(t,e){for(var r=-1,i=null==t?0:t.length,n=Array(i);++r<i;)n[r]=e(t[r],r,t);return n}),n=Gr(),s=Zo();return uo=function(o,a,l,h){var u=-1,c=e,f=!0,d=o.length,p=[],g=a.length;if(!d)return p;l&&(a=i(a,n(l))),h?(c=r,f=!1):a.length>=200&&(c=s,f=!1,a=new t(a));t:for(;++u<d;){var y=o[u],m=null==l?y:l(y);if(y=h||0!==y?y:0,f&&m==m){for(var b=g;b--;)if(a[b]===m)continue t;p.push(y)}else c(a,m,h)||p.push(y)}return p}}function Ko(){if(po)return fo;po=1;var t=Or(),e=Mr();return fo=function(r){return e(r)&&t(r)}}function Qo(){if(So)return vo;return So=1,vo=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}}function Xo(){if(xo)return Eo;xo=1;var t=function(){if(bo)return mo;bo=1;var t=Er()(yr(),"Set");return mo=t}(),e=wo?_o:(wo=1,_o=function(){}),r=Qo(),i=t&&1/r(new t([,-0]))[1]==1/0?function(e){return new t(e)}:e;return Eo=i}function Jo(){if(Ao)return Ro;Ao=1;var t=Co(),e=Tr(),r=function(){if(To)return ko;To=1;var t=$o(),e=qo(),r=Vo(),i=Zo(),n=Xo(),s=Qo();return ko=function(o,a,l){var h=-1,u=e,c=o.length,f=!0,d=[],p=d;if(l)f=!1,u=r;else if(c>=200){var g=a?null:n(o);if(g)return s(g);f=!1,u=i,p=new t}else p=a?[]:d;t:for(;++h<c;){var y=o[h],m=a?a(y):y;if(y=l||0!==y?y:0,f&&m==m){for(var b=p.length;b--;)if(p[b]===m)continue t;a&&p.push(m),d.push(y)}else u(p,m,l)||(p!==d&&p.push(m),d.push(y))}return d}}(),i=Ko(),n=e(function(e){return r(t(e,1,i,!0))});return Ro=n}function ta(){if(Po)return Mo;Po=1;var t=(Lo||(Lo=1,Oo=function(t,e){return function(r){return t(e(r))}}),Oo),e=t(Object.getPrototypeOf,Object);return Mo=e}var ea,ra={},ia={},na={};var sa,oa={},aa={};var la,ha,ua={};function ca(){if(la)return ua;la=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.unescape=void 0;return ua.unescape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),ua}function fa(){if(ha)return oa;ha=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.AST=void 0;const t=function(){if(sa)return aa;sa=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.parseClass=void 0;const t={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},e=t=>t.replace(/[[\]\\-]/g,"\\$&"),r=t=>t.join("");return aa.parseClass=(i,n)=>{const s=n;if("["!==i.charAt(s))throw new Error("not in a brace expression");const o=[],a=[];let l=s+1,h=!1,u=!1,c=!1,f=!1,d=s,p="";t:for(;l<i.length;){const r=i.charAt(l);if("!"!==r&&"^"!==r||l!==s+1){if("]"===r&&h&&!c){d=l+1;break}if(h=!0,"\\"!==r||c){if("["===r&&!c)for(const[e,[r,n,h]]of Object.entries(t))if(i.startsWith(e,l)){if(p)return["$.",!1,i.length-s,!0];l+=e.length,h?a.push(r):o.push(r),u=u||n;continue t}c=!1,p?(r>p?o.push(e(p)+"-"+e(r)):r===p&&o.push(e(r)),p="",l++):i.startsWith("-]",l+1)?(o.push(e(r+"-")),l+=2):i.startsWith("-",l+1)?(p=r,l+=2):(o.push(e(r)),l++)}else c=!0,l++}else f=!0,l++}if(d<l)return["",!1,0,!1];if(!o.length&&!a.length)return["$.",!1,i.length-s,!0];if(0===a.length&&1===o.length&&/^\\?.$/.test(o[0])&&!f){return[(g=2===o[0].length?o[0].slice(-1):o[0],g.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,d-s,!1]}var g;const y="["+(f?"^":"")+r(o)+"]",m="["+(f?"":"^")+r(a)+"]";return[o.length&&a.length?"("+y+"|"+m+")":o.length?y:m,u,d-s,!0]},aa}(),e=ca(),r=new Set(["!","?","+","*","@"]),i=t=>r.has(t),n="(?!\\.)",s=new Set(["[","."]),o=new Set(["..","."]),a=new Set("().*{}+?[]^$\\!"),l=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),h="[^/]",u=h+"*?",c=h+"+?";class f{type;#t;#e;#r=!1;#i=[];#n;#s;#o;#a=!1;#l;#h;#u=!1;constructor(t,e,r={}){this.type=t,t&&(this.#e=!0),this.#n=e,this.#t=this.#n?this.#n.#t:this,this.#l=this.#t===this?r:this.#t.#l,this.#o=this.#t===this?[]:this.#t.#o,"!"!==t||this.#t.#a||this.#o.push(this),this.#s=this.#n?this.#n.#i.length:0}get hasMagic(){if(void 0!==this.#e)return this.#e;for(const t of this.#i)if("string"!=typeof t&&(t.type||t.hasMagic))return this.#e=!0;return this.#e}toString(){return void 0!==this.#h?this.#h:this.type?this.#h=this.type+"("+this.#i.map(t=>String(t)).join("|")+")":this.#h=this.#i.map(t=>String(t)).join("")}#c(){if(this!==this.#t)throw new Error("should only call on root");if(this.#a)return this;let t;for(this.toString(),this.#a=!0;t=this.#o.pop();){if("!"!==t.type)continue;let e=t,r=e.#n;for(;r;){for(let i=e.#s+1;!r.type&&i<r.#i.length;i++)for(const e of t.#i){if("string"==typeof e)throw new Error("string part in extglob AST??");e.copyIn(r.#i[i])}e=r,r=e.#n}}return this}push(...t){for(const e of t)if(""!==e){if("string"!=typeof e&&!(e instanceof f&&e.#n===this))throw new Error("invalid part: "+e);this.#i.push(e)}}toJSON(){const t=null===this.type?this.#i.slice().map(t=>"string"==typeof t?t:t.toJSON()):[this.type,...this.#i.map(t=>t.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#a&&"!"===this.#n?.type)&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#n?.isStart())return!1;if(0===this.#s)return!0;const t=this.#n;for(let e=0;e<this.#s;e++){const r=t.#i[e];if(!(r instanceof f&&"!"===r.type))return!1}return!0}isEnd(){if(this.#t===this)return!0;if("!"===this.#n?.type)return!0;if(!this.#n?.isEnd())return!1;if(!this.type)return this.#n?.isEnd();const t=this.#n?this.#n.#i.length:0;return this.#s===t-1}copyIn(t){"string"==typeof t?this.push(t):this.push(t.clone(this))}clone(t){const e=new f(this.type,t);for(const t of this.#i)e.copyIn(t);return e}static#f(t,e,r,n){let s=!1,o=!1,a=-1,l=!1;if(null===e.type){let h=r,u="";for(;h<t.length;){const r=t.charAt(h++);if(s||"\\"===r)s=!s,u+=r;else if(o)h===a+1?"^"!==r&&"!"!==r||(l=!0):"]"!==r||h===a+2&&l||(o=!1),u+=r;else if("["!==r){if(!n.noext&&i(r)&&"("===t.charAt(h)){e.push(u),u="";const i=new f(r,e);h=f.#f(t,i,h,n),e.push(i);continue}u+=r}else o=!0,a=h,l=!1,u+=r}return e.push(u),h}let h=r+1,u=new f(null,e);const c=[];let d="";for(;h<t.length;){const r=t.charAt(h++);if(s||"\\"===r)s=!s,d+=r;else if(o)h===a+1?"^"!==r&&"!"!==r||(l=!0):"]"!==r||h===a+2&&l||(o=!1),d+=r;else if("["!==r){if(i(r)&&"("===t.charAt(h)){u.push(d),d="";const e=new f(r,u);u.push(e),h=f.#f(t,e,h,n);continue}if("|"!==r){if(")"===r)return""===d&&0===e.#i.length&&(e.#u=!0),u.push(d),d="",e.push(...c,u),h;d+=r}else u.push(d),d="",c.push(u),u=new f(null,e)}else o=!0,a=h,l=!1,d+=r}return e.type=null,e.#e=void 0,e.#i=[t.substring(r-1)],h}static fromGlob(t,e={}){const r=new f(null,void 0,e);return f.#f(t,r,0,e),r}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();const t=this.toString(),[e,r,i,n]=this.toRegExpSource();if(!(i||this.#e||this.#l.nocase&&!this.#l.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;const s=(this.#l.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${e}$`,s),{_src:e,_glob:t})}get options(){return this.#l}toRegExpSource(t){const r=t??!!this.#l.dot;if(this.#t===this&&this.#c(),!this.type){const i=this.isStart()&&this.isEnd(),a=this.#i.map(e=>{const[r,n,s,o]="string"==typeof e?f.#d(e,this.#e,i):e.toRegExpSource(t);return this.#e=this.#e||s,this.#r=this.#r||o,r}).join("");let l="";if(this.isStart()&&"string"==typeof this.#i[0]){if(!(1===this.#i.length&&o.has(this.#i[0]))){const e=s,i=r&&e.has(a.charAt(0))||a.startsWith("\\.")&&e.has(a.charAt(2))||a.startsWith("\\.\\.")&&e.has(a.charAt(4)),o=!r&&!t&&e.has(a.charAt(0));l=i?"(?!(?:^|/)\\.\\.?(?:$|/))":o?n:""}}let h="";this.isEnd()&&this.#t.#a&&"!"===this.#n?.type&&(h="(?:$|\\/)");return[l+a+h,(0,e.unescape)(a),this.#e=!!this.#e,this.#r]}const i="*"===this.type||"+"===this.type,a="!"===this.type?"(?:(?!(?:":"(?:";let l=this.#p(r);if(this.isStart()&&this.isEnd()&&!l&&"!"!==this.type){const t=this.toString();return this.#i=[t],this.type=null,this.#e=void 0,[t,(0,e.unescape)(this.toString()),!1,!1]}let h=!i||t||r?"":this.#p(!0);h===l&&(h=""),h&&(l=`(?:${l})(?:${h})*?`);let d="";if("!"===this.type&&this.#u)d=(this.isStart()&&!r?n:"")+c;else{d=a+l+("!"===this.type?"))"+(!this.isStart()||r||t?"":n)+u+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&h?")":"*"===this.type&&h?")?":`)${this.type}`)}return[d,(0,e.unescape)(l),this.#e=!!this.#e,this.#r]}#p(t){return this.#i.map(e=>{if("string"==typeof e)throw new Error("string type in extglob ast??");const[r,i,n,s]=e.toRegExpSource(t);return this.#r=this.#r||s,r}).filter(t=>!(this.isStart()&&this.isEnd()&&!t)).join("|")}static#d(r,i,n=!1){let s=!1,o="",f=!1;for(let e=0;e<r.length;e++){const d=r.charAt(e);if(s)s=!1,o+=(a.has(d)?"\\":"")+d;else if("\\"!==d){if("["===d){const[n,s,a,l]=(0,t.parseClass)(r,e);if(a){o+=n,f=f||s,e+=a-1,i=i||l;continue}}"*"!==d?"?"!==d?o+=l(d):(o+=h,i=!0):(o+=n&&"*"===r?c:u,i=!0)}else e===r.length-1?o+="\\\\":s=!0}return[o,(0,e.unescape)(r),!!i,f]}}return oa.AST=f,oa}var da,pa,ga={};function ya(){if(da)return ga;da=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.escape=void 0;return ga.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),ga}function ma(){return pa||(pa=1,function(t){var e=ia&&ia.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.unescape=t.escape=t.AST=t.Minimatch=t.match=t.makeRe=t.braceExpand=t.defaults=t.filter=t.GLOBSTAR=t.sep=t.minimatch=void 0;const r=e(D()),i=(ea||(ea=1,Object.defineProperty(na,"__esModule",{value:!0}),na.assertValidPattern=void 0,na.assertValidPattern=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")}),na),n=fa(),s=ya(),o=ca();t.minimatch=(t,e,r={})=>((0,i.assertValidPattern)(e),!(!r.nocomment&&"#"===e.charAt(0))&&new P(e,r).match(t));const a=/^\*+([^+@!?\*\[\(]*)$/,l=t=>e=>!e.startsWith(".")&&e.endsWith(t),h=t=>e=>e.endsWith(t),u=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),c=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),f=/^\*+\.\*+$/,d=t=>!t.startsWith(".")&&t.includes("."),p=t=>"."!==t&&".."!==t&&t.includes("."),g=/^\.\*+$/,y=t=>"."!==t&&".."!==t&&t.startsWith("."),m=/^\*+$/,b=t=>0!==t.length&&!t.startsWith("."),_=t=>0!==t.length&&"."!==t&&".."!==t,w=/^\?+([^+@!?\*\[\(]*)?$/,v=([t,e=""])=>{const r=k([t]);return e?(e=e.toLowerCase(),t=>r(t)&&t.toLowerCase().endsWith(e)):r},S=([t,e=""])=>{const r=T([t]);return e?(e=e.toLowerCase(),t=>r(t)&&t.toLowerCase().endsWith(e)):r},E=([t,e=""])=>{const r=T([t]);return e?t=>r(t)&&t.endsWith(e):r},x=([t,e=""])=>{const r=k([t]);return e?t=>r(t)&&t.endsWith(e):r},k=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},T=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},R="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",A={sep:"\\"},O={sep:"/"};t.sep="win32"===R?A.sep:O.sep,t.minimatch.sep=t.sep,t.GLOBSTAR=Symbol("globstar **"),t.minimatch.GLOBSTAR=t.GLOBSTAR;t.filter=(e,r={})=>i=>(0,t.minimatch)(i,e,r),t.minimatch.filter=t.filter;const L=(t,e={})=>Object.assign({},t,e);t.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return t.minimatch;const r=t.minimatch;return Object.assign((t,i,n={})=>r(t,i,L(e,n)),{Minimatch:class extends r.Minimatch{constructor(t,r={}){super(t,L(e,r))}static defaults(t){return r.defaults(L(e,t)).Minimatch}},AST:class extends r.AST{constructor(t,r,i={}){super(t,r,L(e,i))}static fromGlob(t,i={}){return r.AST.fromGlob(t,L(e,i))}},unescape:(t,i={})=>r.unescape(t,L(e,i)),escape:(t,i={})=>r.escape(t,L(e,i)),filter:(t,i={})=>r.filter(t,L(e,i)),defaults:t=>r.defaults(L(e,t)),makeRe:(t,i={})=>r.makeRe(t,L(e,i)),braceExpand:(t,i={})=>r.braceExpand(t,L(e,i)),match:(t,i,n={})=>r.match(t,i,L(e,n)),sep:r.sep,GLOBSTAR:t.GLOBSTAR})},t.minimatch.defaults=t.defaults;t.braceExpand=(t,e={})=>((0,i.assertValidPattern)(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,r.default)(t)),t.minimatch.braceExpand=t.braceExpand;t.makeRe=(t,e={})=>new P(t,e).makeRe(),t.minimatch.makeRe=t.makeRe;t.match=(t,e,r={})=>{const i=new P(e,r);return t=t.filter(t=>i.match(t)),i.options.nonull&&!t.length&&t.push(e),t},t.minimatch.match=t.match;const M=/[?*]|[+@!]\(.*?\)|\[|\]/;class P{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){(0,i.assertValidPattern)(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||R,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,this.globSet);const r=this.globSet.map(t=>this.slashSplit(t));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map((t,e,r)=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&M.test(t[2])||M.test(t[3])),r=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map(t=>this.parse(t))];if(r)return[t[0],...t.slice(1).map(t=>this.parse(t))]}return t.map(t=>this.parse(t))});if(this.debug(this.pattern,i),this.set=i.filter(t=>-1===t.indexOf(!1)),this.isWindows)for(let t=0;t<this.set.length;t++){const e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let r=0;r<t[e].length;r++)"**"===t[e][r]&&(t[e][r]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let r=e;for(;"**"===t[r+1];)r++;r!==e&&t.splice(e,r-e)}return t})}levelOneOptimize(t){return t.map(t=>0===(t=t.reduce((t,e)=>{const r=t[t.length-1];return"**"===e&&"**"===r?t:".."===e&&r&&".."!==r&&"."!==r&&"**"!==r?(t.pop(),t):(t.push(e),t)},[])).length?[""]:t)}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let r=1;r<t.length-1;r++){const i=t[r];1===r&&""===i&&""===t[0]||("."!==i&&""!==i||(e=!0,t.splice(r,1),r--))}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let r=0;for(;-1!==(r=t.indexOf("..",r+1));){const i=t[r-1];i&&"."!==i&&".."!==i&&"**"!==i&&(e=!0,t.splice(r-1,2),r-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let r of t){let i=-1;for(;-1!==(i=r.indexOf("**",i+1));){let n=i;for(;"**"===r[n+1];)n++;n>i&&r.splice(i+1,n-i);let s=r[i+1];const o=r[i+2],a=r[i+3];if(".."!==s)continue;if(!o||"."===o||".."===o||!a||"."===a||".."===a)continue;e=!0,r.splice(i,1);const l=r.slice(0);l[i]="**",t.push(l),i--}if(!this.preserveMultipleSlashes){for(let t=1;t<r.length-1;t++){const i=r[t];1===t&&""===i&&""===r[0]||("."!==i&&""!==i||(e=!0,r.splice(t,1),t--))}"."!==r[0]||2!==r.length||"."!==r[1]&&""!==r[1]||(e=!0,r.pop())}let n=0;for(;-1!==(n=r.indexOf("..",n+1));){const t=r[n-1];if(t&&"."!==t&&".."!==t&&"**"!==t){e=!0;const t=1===n&&"**"===r[n+1]?["."]:[];r.splice(n-1,2,...t),0===r.length&&r.push(""),n-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let r=e+1;r<t.length;r++){const i=this.partsMatch(t[e],t[r],!this.preserveMultipleSlashes);if(i){t[e]=[],t[r]=i;break}}return t.filter(t=>t.length)}partsMatch(t,e,r=!1){let i=0,n=0,s=[],o="";for(;i<t.length&&n<e.length;)if(t[i]===e[n])s.push("b"===o?e[n]:t[i]),i++,n++;else if(r&&"**"===t[i]&&e[n]===t[i+1])s.push(t[i]),i++;else if(r&&"**"===e[n]&&t[i]===e[n+1])s.push(e[n]),n++;else if("*"!==t[i]||!e[n]||!this.options.dot&&e[n].startsWith(".")||"**"===e[n]){if("*"!==e[n]||!t[i]||!this.options.dot&&t[i].startsWith(".")||"**"===t[i])return!1;if("a"===o)return!1;o="b",s.push(e[n]),i++,n++}else{if("b"===o)return!1;o="a",s.push(t[i]),i++,n++}return t.length===e.length&&s}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,r=0;for(let i=0;i<t.length&&"!"===t.charAt(i);i++)e=!e,r++;r&&(this.pattern=t.slice(r)),this.negate=e}matchOne(e,r,i=!1){const n=this.options;if(this.isWindows){const t="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),i=!t&&""===e[0]&&""===e[1]&&"?"===e[2]&&/^[a-z]:$/i.test(e[3]),n="string"==typeof r[0]&&/^[a-z]:$/i.test(r[0]),s=i?3:t?0:void 0,o=!n&&""===r[0]&&""===r[1]&&"?"===r[2]&&"string"==typeof r[3]&&/^[a-z]:$/i.test(r[3])?3:n?0:void 0;if("number"==typeof s&&"number"==typeof o){const[t,i]=[e[s],r[o]];t.toLowerCase()===i.toLowerCase()&&(r[o]=t,o>s?r=r.slice(o):s>o&&(e=e.slice(s)))}}const{optimizationLevel:s=1}=this.options;s>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:r}),this.debug("matchOne",e.length,r.length);for(var o=0,a=0,l=e.length,h=r.length;o<l&&a<h;o++,a++){this.debug("matchOne loop");var u=r[a],c=e[o];if(this.debug(r,u,c),!1===u)return!1;if(u===t.GLOBSTAR){this.debug("GLOBSTAR",[r,u,c]);var f=o,d=a+1;if(d===h){for(this.debug("** at the end");o<l;o++)if("."===e[o]||".."===e[o]||!n.dot&&"."===e[o].charAt(0))return!1;return!0}for(;f<l;){var p=e[f];if(this.debug("\nglobstar while",e,f,r,d,p),this.matchOne(e.slice(f),r.slice(d),i))return this.debug("globstar found match!",f,l,p),!0;if("."===p||".."===p||!n.dot&&"."===p.charAt(0)){this.debug("dot detected!",e,f,r,d);break}this.debug("globstar swallow a segment, and continue"),f++}return!(!i||(this.debug("\n>>> no match, partial?",e,f,r,d),f!==l))}let s;if("string"==typeof u?(s=c===u,this.debug("string match",u,c,s)):(s=u.test(c),this.debug("pattern match",u,c,s)),!s)return!1}if(o===l&&a===h)return!0;if(o===l)return i;if(a===h)return o===l-1&&""===e[o];throw new Error("wtf?")}braceExpand(){return(0,t.braceExpand)(this.pattern,this.options)}parse(e){(0,i.assertValidPattern)(e);const r=this.options;if("**"===e)return t.GLOBSTAR;if(""===e)return"";let s,o=null;(s=e.match(m))?o=r.dot?_:b:(s=e.match(a))?o=(r.nocase?r.dot?c:u:r.dot?h:l)(s[1]):(s=e.match(w))?o=(r.nocase?r.dot?S:v:r.dot?E:x)(s):(s=e.match(f))?o=r.dot?p:d:(s=e.match(g))&&(o=y);const k=n.AST.fromGlob(e,this.options).toMMPattern();return o&&"object"==typeof k&&Reflect.defineProperty(k,"test",{value:o}),k}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const r=this.options,i=r.noglobstar?"[^/]*?":r.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",n=new Set(r.nocase?["i"]:[]);let s=e.map(e=>{const r=e.map(e=>{if(e instanceof RegExp)for(const t of e.flags.split(""))n.add(t);return"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===t.GLOBSTAR?t.GLOBSTAR:e._src});return r.forEach((e,n)=>{const s=r[n+1],o=r[n-1];e===t.GLOBSTAR&&o!==t.GLOBSTAR&&(void 0===o?void 0!==s&&s!==t.GLOBSTAR?r[n+1]="(?:\\/|"+i+"\\/)?"+s:r[n]=i:void 0===s?r[n-1]=o+"(?:\\/|"+i+")?":s!==t.GLOBSTAR&&(r[n-1]=o+"(?:\\/|\\/"+i+"\\/)"+s,r[n+1]=t.GLOBSTAR))}),r.filter(e=>e!==t.GLOBSTAR).join("/")}).join("|");const[o,a]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+a+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...n].join(""))}catch(t){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const r=this.options;this.isWindows&&(t=t.split("\\").join("/"));const i=this.slashSplit(t);this.debug(this.pattern,"split",i);const n=this.set;this.debug(this.pattern,"set",n);let s=i[i.length-1];if(!s)for(let t=i.length-2;!s&&t>=0;t--)s=i[t];for(let t=0;t<n.length;t++){const o=n[t];let a=i;r.matchBase&&1===o.length&&(a=[s]);if(this.matchOne(a,o,e))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate}static defaults(e){return t.minimatch.defaults(e).Minimatch}}t.Minimatch=P;var I=fa();Object.defineProperty(t,"AST",{enumerable:!0,get:function(){return I.AST}});var N=ya();Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return N.escape}});var C=ca();Object.defineProperty(t,"unescape",{enumerable:!0,get:function(){return C.unescape}}),t.minimatch.AST=n.AST,t.minimatch.Minimatch=P,t.minimatch.escape=s.escape,t.minimatch.unescape=o.unescape}(ia)),ia}var ba,_a={},wa={},va={};function Sa(){if(ba)return va;ba=1,Object.defineProperty(va,"__esModule",{value:!0}),va.LRUCache=void 0;const t="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,e=new Set,r="object"==typeof process&&process?process:{},i=(t,e,i,n)=>{"function"==typeof r.emitWarning?r.emitWarning(t,e,i,n):console.error(`[${i}] ${e}: ${t}`)};let n=globalThis.AbortController,s=globalThis.AbortSignal;if(void 0===n){s=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(t,e){this._onabort.push(e)}},n=class{constructor(){e()}signal=new s;abort(t){if(!this.signal.aborted){this.signal.reason=t,this.signal.aborted=!0;for(const e of this.signal._onabort)e(t);this.signal.onabort?.(t)}}};let t="1"!==r.env?.LRU_CACHE_IGNORE_AC_WARNING;const e=()=>{t&&(t=!1,i("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const o=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),a=t=>o(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?l:null:null;class l extends Array{constructor(t){super(t),this.fill(0)}}class h{heap;length;static#g=!1;static create(t){const e=a(t);if(!e)return[];h.#g=!0;const r=new h(t,e);return h.#g=!1,r}constructor(t,e){if(!h.#g)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class u{#y;#m;#b;#_;#w;#v;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#S;#E;#x;#k;#T;#R;#A;#O;#L;#M;#P;#I;#D;#N;#C;#j;#F;static unsafeExposeInternals(t){return{starts:t.#D,ttls:t.#N,sizes:t.#I,keyMap:t.#x,keyList:t.#k,valList:t.#T,next:t.#R,prev:t.#A,get head(){return t.#O},get tail(){return t.#L},free:t.#M,isBackgroundFetch:e=>t.#B(e),backgroundFetch:(e,r,i,n)=>t.#z(e,r,i,n),moveToTail:e=>t.#W(e),indexes:e=>t.#U(e),rindexes:e=>t.#G(e),isStale:e=>t.#$(e)}}get max(){return this.#y}get maxSize(){return this.#m}get calculatedSize(){return this.#E}get size(){return this.#S}get fetchMethod(){return this.#w}get memoMethod(){return this.#v}get dispose(){return this.#b}get disposeAfter(){return this.#_}constructor(t){const{max:r=0,ttl:n,ttlResolution:s=1,ttlAutopurge:l,updateAgeOnGet:c,updateAgeOnHas:f,allowStale:d,dispose:p,disposeAfter:g,noDisposeOnSet:y,noUpdateTTL:m,maxSize:b=0,maxEntrySize:_=0,sizeCalculation:w,fetchMethod:v,memoMethod:S,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:k,allowStaleOnFetchAbort:T,ignoreFetchAbort:R}=t;if(0!==r&&!o(r))throw new TypeError("max option must be a nonnegative integer");const A=r?a(r):Array;if(!A)throw new Error("invalid max value: "+r);if(this.#y=r,this.#m=b,this.maxEntrySize=_||this.#m,this.sizeCalculation=w,this.sizeCalculation){if(!this.#m&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==S&&"function"!=typeof S)throw new TypeError("memoMethod must be a function if defined");if(this.#v=S,void 0!==v&&"function"!=typeof v)throw new TypeError("fetchMethod must be a function if specified");if(this.#w=v,this.#j=!!v,this.#x=new Map,this.#k=new Array(r).fill(void 0),this.#T=new Array(r).fill(void 0),this.#R=new A(r),this.#A=new A(r),this.#O=0,this.#L=0,this.#M=h.create(r),this.#S=0,this.#E=0,"function"==typeof p&&(this.#b=p),"function"==typeof g?(this.#_=g,this.#P=[]):(this.#_=void 0,this.#P=void 0),this.#C=!!this.#b,this.#F=!!this.#_,this.noDisposeOnSet=!!y,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!k,this.allowStaleOnFetchAbort=!!T,this.ignoreFetchAbort=!!R,0!==this.maxEntrySize){if(0!==this.#m&&!o(this.#m))throw new TypeError("maxSize must be a positive integer if specified");if(!o(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#H()}if(this.allowStale=!!d,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!c,this.updateAgeOnHas=!!f,this.ttlResolution=o(s)||0===s?s:1,this.ttlAutopurge=!!l,this.ttl=n||0,this.ttl){if(!o(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#q()}if(0===this.#y&&0===this.ttl&&0===this.#m)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#y&&!this.#m){const t="LRU_CACHE_UNBOUNDED";if((t=>!e.has(t))(t)){e.add(t);i("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,u)}}}getRemainingTTL(t){return this.#x.has(t)?1/0:0}#q(){const e=new l(this.#y),r=new l(this.#y);this.#N=e,this.#D=r,this.#V=(i,n,s=t.now())=>{if(r[i]=0!==n?s:0,e[i]=n,0!==n&&this.ttlAutopurge){const t=setTimeout(()=>{this.#$(i)&&this.#Z(this.#k[i],"expire")},n+1);t.unref&&t.unref()}},this.#Y=i=>{r[i]=0!==e[i]?t.now():0},this.#K=(t,s)=>{if(e[s]){const o=e[s],a=r[s];if(!o||!a)return;t.ttl=o,t.start=a,t.now=i||n();const l=t.now-a;t.remainingTTL=o-l}};let i=0;const n=()=>{const e=t.now();if(this.ttlResolution>0){i=e;const t=setTimeout(()=>i=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=t=>{const s=this.#x.get(t);if(void 0===s)return 0;const o=e[s],a=r[s];if(!o||!a)return 1/0;return o-((i||n())-a)},this.#$=t=>{const s=r[t],o=e[t];return!!o&&!!s&&(i||n())-s>o}}#Y=()=>{};#K=()=>{};#V=()=>{};#$=()=>!1;#H(){const t=new l(this.#y);this.#E=0,this.#I=t,this.#Q=e=>{this.#E-=t[e],t[e]=0},this.#X=(t,e,r,i)=>{if(this.#B(e))return 0;if(!o(r)){if(!i)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof i)throw new TypeError("sizeCalculation must be a function");if(r=i(e,t),!o(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return r},this.#J=(e,r,i)=>{if(t[e]=r,this.#m){const r=this.#m-t[e];for(;this.#E>r;)this.#tt(!0)}this.#E+=t[e],i&&(i.entrySize=r,i.totalCalculatedSize=this.#E)}}#Q=t=>{};#J=(t,e,r)=>{};#X=(t,e,r,i)=>{if(r||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#U({allowStale:t=this.allowStale}={}){if(this.#S)for(let e=this.#L;this.#et(e)&&(!t&&this.#$(e)||(yield e),e!==this.#O);)e=this.#A[e]}*#G({allowStale:t=this.allowStale}={}){if(this.#S)for(let e=this.#O;this.#et(e)&&(!t&&this.#$(e)||(yield e),e!==this.#L);)e=this.#R[e]}#et(t){return void 0!==t&&this.#x.get(this.#k[t])===t}*entries(){for(const t of this.#U())void 0===this.#T[t]||void 0===this.#k[t]||this.#B(this.#T[t])||(yield[this.#k[t],this.#T[t]])}*rentries(){for(const t of this.#G())void 0===this.#T[t]||void 0===this.#k[t]||this.#B(this.#T[t])||(yield[this.#k[t],this.#T[t]])}*keys(){for(const t of this.#U()){const e=this.#k[t];void 0===e||this.#B(this.#T[t])||(yield e)}}*rkeys(){for(const t of this.#G()){const e=this.#k[t];void 0===e||this.#B(this.#T[t])||(yield e)}}*values(){for(const t of this.#U()){void 0===this.#T[t]||this.#B(this.#T[t])||(yield this.#T[t])}}*rvalues(){for(const t of this.#G()){void 0===this.#T[t]||this.#B(this.#T[t])||(yield this.#T[t])}}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(const r of this.#U()){const i=this.#T[r],n=this.#B(i)?i.__staleWhileFetching:i;if(void 0!==n&&t(n,this.#k[r],this))return this.get(this.#k[r],e)}}forEach(t,e=this){for(const r of this.#U()){const i=this.#T[r],n=this.#B(i)?i.__staleWhileFetching:i;void 0!==n&&t.call(e,n,this.#k[r],this)}}rforEach(t,e=this){for(const r of this.#G()){const i=this.#T[r],n=this.#B(i)?i.__staleWhileFetching:i;void 0!==n&&t.call(e,n,this.#k[r],this)}}purgeStale(){let t=!1;for(const e of this.#G({allowStale:!0}))this.#$(e)&&(this.#Z(this.#k[e],"expire"),t=!0);return t}info(e){const r=this.#x.get(e);if(void 0===r)return;const i=this.#T[r],n=this.#B(i)?i.__staleWhileFetching:i;if(void 0===n)return;const s={value:n};if(this.#N&&this.#D){const e=this.#N[r],i=this.#D[r];if(e&&i){const r=e-(t.now()-i);s.ttl=r,s.start=Date.now()}}return this.#I&&(s.size=this.#I[r]),s}dump(){const e=[];for(const r of this.#U({allowStale:!0})){const i=this.#k[r],n=this.#T[r],s=this.#B(n)?n.__staleWhileFetching:n;if(void 0===s||void 0===i)continue;const o={value:s};if(this.#N&&this.#D){o.ttl=this.#N[r];const e=t.now()-this.#D[r];o.start=Math.floor(Date.now()-e)}this.#I&&(o.size=this.#I[r]),e.unshift([i,o])}return e}load(e){this.clear();for(const[r,i]of e){if(i.start){const e=Date.now()-i.start;i.start=t.now()-e}this.set(r,i.value,i)}}set(t,e,r={}){if(void 0===e)return this.delete(t),this;const{ttl:i=this.ttl,start:n,noDisposeOnSet:s=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:a}=r;let{noUpdateTTL:l=this.noUpdateTTL}=r;const h=this.#X(t,e,r.size||0,o);if(this.maxEntrySize&&h>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#Z(t,"set"),this;let u=0===this.#S?void 0:this.#x.get(t);if(void 0===u)u=0===this.#S?this.#L:0!==this.#M.length?this.#M.pop():this.#S===this.#y?this.#tt(!1):this.#S,this.#k[u]=t,this.#T[u]=e,this.#x.set(t,u),this.#R[this.#L]=u,this.#A[u]=this.#L,this.#L=u,this.#S++,this.#J(u,h,a),a&&(a.set="add"),l=!1;else{this.#W(u);const r=this.#T[u];if(e!==r){if(this.#j&&this.#B(r)){r.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:e}=r;void 0===e||s||(this.#C&&this.#b?.(e,t,"set"),this.#F&&this.#P?.push([e,t,"set"]))}else s||(this.#C&&this.#b?.(r,t,"set"),this.#F&&this.#P?.push([r,t,"set"]));if(this.#Q(u),this.#J(u,h,a),this.#T[u]=e,a){a.set="replace";const t=r&&this.#B(r)?r.__staleWhileFetching:r;void 0!==t&&(a.oldValue=t)}}else a&&(a.set="update")}if(0===i||this.#N||this.#q(),this.#N&&(l||this.#V(u,i,n),a&&this.#K(a,u)),!s&&this.#F&&this.#P){const t=this.#P;let e;for(;e=t?.shift();)this.#_?.(...e)}return this}pop(){try{for(;this.#S;){const t=this.#T[this.#O];if(this.#tt(!0),this.#B(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(void 0!==t)return t}}finally{if(this.#F&&this.#P){const t=this.#P;let e;for(;e=t?.shift();)this.#_?.(...e)}}}#tt(t){const e=this.#O,r=this.#k[e],i=this.#T[e];return this.#j&&this.#B(i)?i.__abortController.abort(new Error("evicted")):(this.#C||this.#F)&&(this.#C&&this.#b?.(i,r,"evict"),this.#F&&this.#P?.push([i,r,"evict"])),this.#Q(e),t&&(this.#k[e]=void 0,this.#T[e]=void 0,this.#M.push(e)),1===this.#S?(this.#O=this.#L=0,this.#M.length=0):this.#O=this.#R[e],this.#x.delete(r),this.#S--,e}has(t,e={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:i}=e,n=this.#x.get(t);if(void 0!==n){const t=this.#T[n];if(this.#B(t)&&void 0===t.__staleWhileFetching)return!1;if(!this.#$(n))return r&&this.#Y(n),i&&(i.has="hit",this.#K(i,n)),!0;i&&(i.has="stale",this.#K(i,n))}else i&&(i.has="miss");return!1}peek(t,e={}){const{allowStale:r=this.allowStale}=e,i=this.#x.get(t);if(void 0===i||!r&&this.#$(i))return;const n=this.#T[i];return this.#B(n)?n.__staleWhileFetching:n}#z(t,e,r,i){const s=void 0===e?void 0:this.#T[e];if(this.#B(s))return s;const o=new n,{signal:a}=r;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});const l={signal:o.signal,options:r,context:i},h=(i,n=!1)=>{const{aborted:s}=o.signal,a=r.ignoreFetchAbort&&void 0!==i;if(r.status&&(s&&!n?(r.status.fetchAborted=!0,r.status.fetchError=o.signal.reason,a&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),s&&!a&&!n)return u(o.signal.reason);const h=c;return this.#T[e]===c&&(void 0===i?h.__staleWhileFetching?this.#T[e]=h.__staleWhileFetching:this.#Z(t,"fetch"):(r.status&&(r.status.fetchUpdated=!0),this.set(t,i,l.options))),i},u=i=>{const{aborted:n}=o.signal,s=n&&r.allowStaleOnFetchAbort,a=s||r.allowStaleOnFetchRejection,l=a||r.noDeleteOnFetchRejection,h=c;if(this.#T[e]===c){!l||void 0===h.__staleWhileFetching?this.#Z(t,"fetch"):s||(this.#T[e]=h.__staleWhileFetching)}if(a)return r.status&&void 0!==h.__staleWhileFetching&&(r.status.returnedStale=!0),h.__staleWhileFetching;if(h.__returned===h)throw i};r.status&&(r.status.fetchDispatched=!0);const c=new Promise((e,i)=>{const n=this.#w?.(t,s,l);n&&n instanceof Promise&&n.then(t=>e(void 0===t?void 0:t),i),o.signal.addEventListener("abort",()=>{r.ignoreFetchAbort&&!r.allowStaleOnFetchAbort||(e(void 0),r.allowStaleOnFetchAbort&&(e=t=>h(t,!0)))})}).then(h,t=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=t),u(t))),f=Object.assign(c,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return void 0===e?(this.set(t,f,{...l.options,status:void 0}),e=this.#x.get(t)):this.#T[e]=f,f}#B(t){if(!this.#j)return!1;const e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof n}async fetch(t,e={}){const{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:c=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:d=this.allowStaleOnFetchAbort,context:p,forceRefresh:g=!1,status:y,signal:m}=e;if(!this.#j)return y&&(y.fetch="get"),this.get(t,{allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:n,status:y});const b={allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:n,ttl:s,noDisposeOnSet:o,size:a,sizeCalculation:l,noUpdateTTL:h,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:c,allowStaleOnFetchAbort:d,ignoreFetchAbort:f,status:y,signal:m};let _=this.#x.get(t);if(void 0===_){y&&(y.fetch="miss");const e=this.#z(t,_,b,p);return e.__returned=e}{const e=this.#T[_];if(this.#B(e)){const t=r&&void 0!==e.__staleWhileFetching;return y&&(y.fetch="inflight",t&&(y.returnedStale=!0)),t?e.__staleWhileFetching:e.__returned=e}const n=this.#$(_);if(!g&&!n)return y&&(y.fetch="hit"),this.#W(_),i&&this.#Y(_),y&&this.#K(y,_),e;const s=this.#z(t,_,b,p),o=void 0!==s.__staleWhileFetching&&r;return y&&(y.fetch=n?"stale":"refresh",o&&n&&(y.returnedStale=!0)),o?s.__staleWhileFetching:s.__returned=s}}async forceFetch(t,e={}){const r=await this.fetch(t,e);if(void 0===r)throw new Error("fetch() returned undefined");return r}memo(t,e={}){const r=this.#v;if(!r)throw new Error("no memoMethod provided to constructor");const{context:i,forceRefresh:n,...s}=e,o=this.get(t,s);if(!n&&void 0!==o)return o;const a=r(t,o,{options:s,context:i});return this.set(t,a,s),a}get(t,e={}){const{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:s}=e,o=this.#x.get(t);if(void 0!==o){const e=this.#T[o],a=this.#B(e);return s&&this.#K(s,o),this.#$(o)?(s&&(s.get="stale"),a?(s&&r&&void 0!==e.__staleWhileFetching&&(s.returnedStale=!0),r?e.__staleWhileFetching:void 0):(n||this.#Z(t,"expire"),s&&r&&(s.returnedStale=!0),r?e:void 0)):(s&&(s.get="hit"),a?e.__staleWhileFetching:(this.#W(o),i&&this.#Y(o),e))}s&&(s.get="miss")}#rt(t,e){this.#A[e]=t,this.#R[t]=e}#W(t){t!==this.#L&&(t===this.#O?this.#O=this.#R[t]:this.#rt(this.#A[t],this.#R[t]),this.#rt(this.#L,t),this.#L=t)}delete(t){return this.#Z(t,"delete")}#Z(t,e){let r=!1;if(0!==this.#S){const i=this.#x.get(t);if(void 0!==i)if(r=!0,1===this.#S)this.#it(e);else{this.#Q(i);const r=this.#T[i];if(this.#B(r)?r.__abortController.abort(new Error("deleted")):(this.#C||this.#F)&&(this.#C&&this.#b?.(r,t,e),this.#F&&this.#P?.push([r,t,e])),this.#x.delete(t),this.#k[i]=void 0,this.#T[i]=void 0,i===this.#L)this.#L=this.#A[i];else if(i===this.#O)this.#O=this.#R[i];else{const t=this.#A[i];this.#R[t]=this.#R[i];const e=this.#R[i];this.#A[e]=this.#A[i]}this.#S--,this.#M.push(i)}}if(this.#F&&this.#P?.length){const t=this.#P;let e;for(;e=t?.shift();)this.#_?.(...e)}return r}clear(){return this.#it("delete")}#it(t){for(const e of this.#G({allowStale:!0})){const r=this.#T[e];if(this.#B(r))r.__abortController.abort(new Error("deleted"));else{const i=this.#k[e];this.#C&&this.#b?.(r,i,t),this.#F&&this.#P?.push([r,i,t])}}if(this.#x.clear(),this.#T.fill(void 0),this.#k.fill(void 0),this.#N&&this.#D&&(this.#N.fill(0),this.#D.fill(0)),this.#I&&this.#I.fill(0),this.#O=0,this.#L=0,this.#M.length=0,this.#E=0,this.#S=0,this.#F&&this.#P){const t=this.#P;let e;for(;e=t?.shift();)this.#_?.(...e)}}}return va.LRUCache=u,va}var Ea,xa,ka={};function Ta(){return Ea||(Ea=1,function(t){var e=ka&&ka.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.Minipass=t.isWritable=t.isReadable=t.isStream=void 0;const r="object"==typeof process&&process?process:{stdout:null,stderr:null},i=d,n=e(p),s=g;t.isStream=e=>!!e&&"object"==typeof e&&(e instanceof $||e instanceof n.default||(0,t.isReadable)(e)||(0,t.isWritable)(e));t.isReadable=t=>!!t&&"object"==typeof t&&t instanceof i.EventEmitter&&"function"==typeof t.pipe&&t.pipe!==n.default.Writable.prototype.pipe;t.isWritable=t=>!!t&&"object"==typeof t&&t instanceof i.EventEmitter&&"function"==typeof t.write&&"function"==typeof t.end;const o=Symbol("EOF"),a=Symbol("maybeEmitEnd"),l=Symbol("emittedEnd"),h=Symbol("emittingEnd"),u=Symbol("emittedError"),c=Symbol("closed"),f=Symbol("read"),y=Symbol("flush"),m=Symbol("flushChunk"),b=Symbol("encoding"),_=Symbol("decoder"),w=Symbol("flowing"),v=Symbol("paused"),S=Symbol("resume"),E=Symbol("buffer"),x=Symbol("pipes"),k=Symbol("bufferLength"),T=Symbol("bufferPush"),R=Symbol("bufferShift"),A=Symbol("objectMode"),O=Symbol("destroyed"),L=Symbol("error"),M=Symbol("emitData"),P=Symbol("emitEnd"),I=Symbol("emitEnd2"),D=Symbol("async"),N=Symbol("abort"),C=Symbol("aborted"),j=Symbol("signal"),F=Symbol("dataListeners"),B=Symbol("discarded"),z=t=>Promise.resolve().then(t),W=t=>t();class U{src;dest;opts;ondrain;constructor(t,e,r){this.src=t,this.dest=e,this.opts=r,this.ondrain=()=>t[S](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}}class G extends U{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,r){super(t,e,r),this.proxyErrors=t=>e.emit("error",t),t.on("error",this.proxyErrors)}}class $ extends i.EventEmitter{[w]=!1;[v]=!1;[x]=[];[E]=[];[A];[b];[D];[_];[o]=!1;[l]=!1;[h]=!1;[c]=!1;[u]=null;[k]=0;[O]=!1;[j];[C]=!1;[F]=0;[B]=!1;writable=!0;readable=!0;constructor(...t){const e=t[0]||{};if(super(),e.objectMode&&"string"==typeof e.encoding)throw new TypeError("Encoding and objectMode may not be used together");e.objectMode?(this[A]=!0,this[b]=null):(t=>!t.objectMode&&!!t.encoding&&"buffer"!==t.encoding)(e)?(this[b]=e.encoding,this[A]=!1):(this[A]=!1,this[b]=null),this[D]=!!e.async,this[_]=this[b]?new s.StringDecoder(this[b]):null,e&&!0===e.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[E]}),e&&!0===e.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[x]});const{signal:r}=e;r&&(this[j]=r,r.aborted?this[N]():r.addEventListener("abort",()=>this[N]()))}get bufferLength(){return this[k]}get encoding(){return this[b]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[A]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[D]}set async(t){this[D]=this[D]||!!t}[N](){this[C]=!0,this.emit("abort",this[j]?.reason),this.destroy(this[j]?.reason)}get aborted(){return this[C]}set aborted(t){}write(t,e,r){if(this[C])return!1;if(this[o])throw new Error("write after end");if(this[O])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof e&&(r=e,e="utf8"),e||(e="utf8");const i=this[D]?z:W;if(!this[A]&&!Buffer.isBuffer(t))if(n=t,!Buffer.isBuffer(n)&&ArrayBuffer.isView(n))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if((t=>t instanceof ArrayBuffer||!!t&&"object"==typeof t&&t.constructor&&"ArrayBuffer"===t.constructor.name&&t.byteLength>=0)(t))t=Buffer.from(t);else if("string"!=typeof t)throw new Error("Non-contiguous data written to non-objectMode stream");var n;return this[A]?(this[w]&&0!==this[k]&&this[y](!0),this[w]?this.emit("data",t):this[T](t),0!==this[k]&&this.emit("readable"),r&&i(r),this[w]):t.length?("string"!=typeof t||e===this[b]&&!this[_]?.lastNeed||(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[b]&&(t=this[_].write(t)),this[w]&&0!==this[k]&&this[y](!0),this[w]?this.emit("data",t):this[T](t),0!==this[k]&&this.emit("readable"),r&&i(r),this[w]):(0!==this[k]&&this.emit("readable"),r&&i(r),this[w])}read(t){if(this[O])return null;if(this[B]=!1,0===this[k]||0===t||t&&t>this[k])return this[a](),null;this[A]&&(t=null),this[E].length>1&&!this[A]&&(this[E]=[this[b]?this[E].join(""):Buffer.concat(this[E],this[k])]);const e=this[f](t||null,this[E][0]);return this[a](),e}[f](t,e){if(this[A])this[R]();else{const r=e;t===r.length||null===t?this[R]():"string"==typeof r?(this[E][0]=r.slice(t),e=r.slice(0,t),this[k]-=t):(this[E][0]=r.subarray(t),e=r.subarray(0,t),this[k]-=t)}return this.emit("data",e),this[E].length||this[o]||this.emit("drain"),e}end(t,e,r){return"function"==typeof t&&(r=t,t=void 0),"function"==typeof e&&(r=e,e="utf8"),void 0!==t&&this.write(t,e),r&&this.once("end",r),this[o]=!0,this.writable=!1,!this[w]&&this[v]||this[a](),this}[S](){this[O]||(this[F]||this[x].length||(this[B]=!0),this[v]=!1,this[w]=!0,this.emit("resume"),this[E].length?this[y]():this[o]?this[a]():this.emit("drain"))}resume(){return this[S]()}pause(){this[w]=!1,this[v]=!0,this[B]=!1}get destroyed(){return this[O]}get flowing(){return this[w]}get paused(){return this[v]}[T](t){this[A]?this[k]+=1:this[k]+=t.length,this[E].push(t)}[R](){return this[A]?this[k]-=1:this[k]-=this[E][0].length,this[E].shift()}[y](t=!1){do{}while(this[m](this[R]())&&this[E].length);t||this[E].length||this[o]||this.emit("drain")}[m](t){return this.emit("data",t),this[w]}pipe(t,e){if(this[O])return t;this[B]=!1;const i=this[l];return e=e||{},t===r.stdout||t===r.stderr?e.end=!1:e.end=!1!==e.end,e.proxyErrors=!!e.proxyErrors,i?e.end&&t.end():(this[x].push(e.proxyErrors?new G(this,t,e):new U(this,t,e)),this[D]?z(()=>this[S]()):this[S]()),t}unpipe(t){const e=this[x].find(e=>e.dest===t);e&&(1===this[x].length?(this[w]&&0===this[F]&&(this[w]=!1),this[x]=[]):this[x].splice(this[x].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){const r=super.on(t,e);if("data"===t)this[B]=!1,this[F]++,this[x].length||this[w]||this[S]();else if("readable"===t&&0!==this[k])super.emit("readable");else if((t=>"end"===t||"finish"===t||"prefinish"===t)(t)&&this[l])super.emit(t),this.removeAllListeners(t);else if("error"===t&&this[u]){const t=e;this[D]?z(()=>t.call(this,this[u])):t.call(this,this[u])}return r}removeListener(t,e){return this.off(t,e)}off(t,e){const r=super.off(t,e);return"data"===t&&(this[F]=this.listeners("data").length,0!==this[F]||this[B]||this[x].length||(this[w]=!1)),r}removeAllListeners(t){const e=super.removeAllListeners(t);return"data"!==t&&void 0!==t||(this[F]=0,this[B]||this[x].length||(this[w]=!1)),e}get emittedEnd(){return this[l]}[a](){this[h]||this[l]||this[O]||0!==this[E].length||!this[o]||(this[h]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[c]&&this.emit("close"),this[h]=!1)}emit(t,...e){const r=e[0];if("error"!==t&&"close"!==t&&t!==O&&this[O])return!1;if("data"===t)return!(!this[A]&&!r)&&(this[D]?(z(()=>this[M](r)),!0):this[M](r));if("end"===t)return this[P]();if("close"===t){if(this[c]=!0,!this[l]&&!this[O])return!1;const t=super.emit("close");return this.removeAllListeners("close"),t}if("error"===t){this[u]=r,super.emit(L,r);const t=!(this[j]&&!this.listeners("error").length)&&super.emit("error",r);return this[a](),t}if("resume"===t){const t=super.emit("resume");return this[a](),t}if("finish"===t||"prefinish"===t){const e=super.emit(t);return this.removeAllListeners(t),e}const i=super.emit(t,...e);return this[a](),i}[M](t){for(const e of this[x])!1===e.dest.write(t)&&this.pause();const e=!this[B]&&super.emit("data",t);return this[a](),e}[P](){return!this[l]&&(this[l]=!0,this.readable=!1,this[D]?(z(()=>this[I]()),!0):this[I]())}[I](){if(this[_]){const t=this[_].end();if(t){for(const e of this[x])e.dest.write(t);this[B]||super.emit("data",t)}}for(const t of this[x])t.end();const t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){const t=Object.assign([],{dataLength:0});this[A]||(t.dataLength=0);const e=this.promise();return this.on("data",e=>{t.push(e),this[A]||(t.dataLength+=e.length)}),await e,t}async concat(){if(this[A])throw new Error("cannot concat in objectMode");const t=await this.collect();return this[b]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(O,()=>e(new Error("stream destroyed"))),this.on("error",t=>e(t)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[B]=!1;let t=!1;const e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();const r=this.read();if(null!==r)return Promise.resolve({done:!1,value:r});if(this[o])return e();let i,n;const s=t=>{this.off("data",a),this.off("end",l),this.off(O,h),e(),n(t)},a=t=>{this.off("error",s),this.off("end",l),this.off(O,h),this.pause(),i({value:t,done:!!this[o]})},l=()=>{this.off("error",s),this.off("data",a),this.off(O,h),e(),i({done:!0,value:void 0})},h=()=>s(new Error("stream destroyed"));return new Promise((t,e)=>{n=e,i=t,this.once(O,h),this.once("error",s),this.once("end",l),this.once("data",a)})},throw:e,return:e,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[B]=!1;let t=!1;const e=()=>(this.pause(),this.off(L,e),this.off(O,e),this.off("end",e),t=!0,{done:!0,value:void 0});return this.once("end",e),this.once(L,e),this.once(O,e),{next:()=>{if(t)return e();const r=this.read();return null===r?e():{done:!1,value:r}},throw:e,return:e,[Symbol.iterator](){return this}}}destroy(t){if(this[O])return t?this.emit("error",t):this.emit(O),this;this[O]=!0,this[B]=!0,this[E].length=0,this[k]=0;return"function"!=typeof this.close||this[c]||this.close(),t?this.emit("error",t):this.emit(O),this}static get isStream(){return t.isStream}}t.Minipass=$}(ka)),ka}function Ra(){if(xa)return wa;xa=1;var e=wa&&wa.__createBinding||(Object.create?function(t,e,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}:function(t,e,r,i){void 0===i&&(i=r),t[i]=e[r]}),r=wa&&wa.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=wa&&wa.__importStar||function(t){if(t&&t.__esModule)return t;var i={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&e(i,t,n);return r(i,t),i};Object.defineProperty(wa,"__esModule",{value:!0}),wa.PathScurry=wa.Path=wa.PathScurryDarwin=wa.PathScurryPosix=wa.PathScurryWin32=wa.PathScurryBase=wa.PathPosix=wa.PathWin32=wa.PathBase=wa.ChildrenCache=wa.ResolveCache=void 0;const n=Sa(),s=u,o=h,a=t,l=i(c),d=a.realpathSync.native,p=f,g=Ta(),y={lstatSync:a.lstatSync,readdir:a.readdir,readdirSync:a.readdirSync,readlinkSync:a.readlinkSync,realpathSync:d,promises:{lstat:p.lstat,readdir:p.readdir,readlink:p.readlink,realpath:p.realpath}},m=t=>t&&t!==y&&t!==l?{...y,...t,promises:{...y.promises,...t.promises||{}}}:y,b=/^\\\\\?\\([a-z]:)\\?$/i,_=/[\\\/]/,w=10,v=15,S=-16,E=128,x=256,k=512,T=t=>t.isFile()?8:t.isDirectory()?4:t.isSymbolicLink()?w:t.isCharacterDevice()?2:t.isBlockDevice()?6:t.isSocket()?12:t.isFIFO()?1:0,R=new Map,A=t=>{const e=R.get(t);if(e)return e;const r=t.normalize("NFKD");return R.set(t,r),r},O=new Map,L=t=>{const e=O.get(t);if(e)return e;const r=A(t.toLowerCase());return O.set(t,r),r};class M extends n.LRUCache{constructor(){super({max:256})}}wa.ResolveCache=M;class P extends n.LRUCache{constructor(t=16384){super({maxSize:t,sizeCalculation:t=>t.length+1})}}wa.ChildrenCache=P;const I=Symbol("PathScurry setAsCwd");class D{name;root;roots;parent;nocase;isCWD=!1;#nt;#st;get dev(){return this.#st}#ot;get mode(){return this.#ot}#at;get nlink(){return this.#at}#lt;get uid(){return this.#lt}#ht;get gid(){return this.#ht}#ut;get rdev(){return this.#ut}#ct;get blksize(){return this.#ct}#ft;get ino(){return this.#ft}#S;get size(){return this.#S}#dt;get blocks(){return this.#dt}#pt;get atimeMs(){return this.#pt}#gt;get mtimeMs(){return this.#gt}#yt;get ctimeMs(){return this.#yt}#mt;get birthtimeMs(){return this.#mt}#bt;get atime(){return this.#bt}#_t;get mtime(){return this.#_t}#wt;get ctime(){return this.#wt}#vt;get birthtime(){return this.#vt}#St;#Et;#xt;#kt;#Tt;#Rt;#At;#Ot;#Lt;#Mt;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=0,r,i,n,s,o){this.name=t,this.#St=n?L(t):A(t),this.#At=1023&e,this.nocase=n,this.roots=i,this.root=r||this,this.#Ot=s,this.#xt=o.fullpath,this.#Tt=o.relative,this.#Rt=o.relativePosix,this.parent=o.parent,this.parent?this.#nt=this.parent.#nt:this.#nt=m(o.fs)}depth(){return void 0!==this.#Et?this.#Et:this.parent?this.#Et=this.parent.depth()+1:this.#Et=0}childrenCache(){return this.#Ot}resolve(t){if(!t)return this;const e=this.getRootString(t),r=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#Pt(r):this.#Pt(r)}#Pt(t){let e=this;for(const r of t)e=e.child(r);return e}children(){const t=this.#Ot.get(this);if(t)return t;const e=Object.assign([],{provisional:0});return this.#Ot.set(this,e),this.#At&=-17,e}child(t,e){if(""===t||"."===t)return this;if(".."===t)return this.parent||this;const r=this.children(),i=this.nocase?L(t):A(t);for(const t of r)if(t.#St===i)return t;const n=this.parent?this.sep:"",s=this.#xt?this.#xt+n+t:void 0,o=this.newChild(t,0,{...e,parent:this,fullpath:s});return this.canReaddir()||(o.#At|=E),r.push(o),o}relative(){if(this.isCWD)return"";if(void 0!==this.#Tt)return this.#Tt;const t=this.name,e=this.parent;if(!e)return this.#Tt=this.name;const r=e.relative();return r+(r&&e.parent?this.sep:"")+t}relativePosix(){if("/"===this.sep)return this.relative();if(this.isCWD)return"";if(void 0!==this.#Rt)return this.#Rt;const t=this.name,e=this.parent;if(!e)return this.#Rt=this.fullpathPosix();const r=e.relativePosix();return r+(r&&e.parent?"/":"")+t}fullpath(){if(void 0!==this.#xt)return this.#xt;const t=this.name,e=this.parent;if(!e)return this.#xt=this.name;const r=e.fullpath()+(e.parent?this.sep:"")+t;return this.#xt=r}fullpathPosix(){if(void 0!==this.#kt)return this.#kt;if("/"===this.sep)return this.#kt=this.fullpath();if(!this.parent){const t=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(t)?this.#kt=`//?/${t}`:this.#kt=t}const t=this.parent,e=t.fullpathPosix(),r=e+(e&&t.parent?"/":"")+this.name;return this.#kt=r}isUnknown(){return 0===(this.#At&v)}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return 8===(this.#At&v)}isDirectory(){return 4===(this.#At&v)}isCharacterDevice(){return 2===(this.#At&v)}isBlockDevice(){return 6===(this.#At&v)}isFIFO(){return 1===(this.#At&v)}isSocket(){return 12===(this.#At&v)}isSymbolicLink(){return(this.#At&w)===w}lstatCached(){return 32&this.#At?this:void 0}readlinkCached(){return this.#Lt}realpathCached(){return this.#Mt}readdirCached(){const t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#Lt)return!0;if(!this.parent)return!1;const t=this.#At&v;return!(0!==t&&t!==w||this.#At&x||this.#At&E)}calledReaddir(){return!!(16&this.#At)}isENOENT(){return!!(this.#At&E)}isNamed(t){return this.nocase?this.#St===L(t):this.#St===A(t)}async readlink(){const t=this.#Lt;if(t)return t;if(this.canReadlink()&&this.parent)try{const t=await this.#nt.promises.readlink(this.fullpath()),e=(await this.parent.realpath())?.resolve(t);if(e)return this.#Lt=e}catch(t){return void this.#It(t.code)}}readlinkSync(){const t=this.#Lt;if(t)return t;if(this.canReadlink()&&this.parent)try{const t=this.#nt.readlinkSync(this.fullpath()),e=this.parent.realpathSync()?.resolve(t);if(e)return this.#Lt=e}catch(t){return void this.#It(t.code)}}#Dt(t){this.#At|=16;for(let e=t.provisional;e<t.length;e++){const r=t[e];r&&r.#Nt()}}#Nt(){this.#At&E||(this.#At=(this.#At|E)&S,this.#Ct())}#Ct(){const t=this.children();t.provisional=0;for(const e of t)e.#Nt()}#jt(){this.#At|=k,this.#Ft()}#Ft(){if(64&this.#At)return;let t=this.#At;4===(t&v)&&(t&=S),this.#At=64|t,this.#Ct()}#Bt(t=""){"ENOTDIR"===t||"EPERM"===t?this.#Ft():"ENOENT"===t?this.#Nt():this.children().provisional=0}#zt(t=""){if("ENOTDIR"===t){this.parent.#Ft()}else"ENOENT"===t&&this.#Nt()}#It(t=""){let e=this.#At;e|=x,"ENOENT"===t&&(e|=E),"EINVAL"!==t&&"UNKNOWN"!==t||(e&=S),this.#At=e,"ENOTDIR"===t&&this.parent&&this.parent.#Ft()}#Wt(t,e){return this.#Ut(t,e)||this.#Gt(t,e)}#Gt(t,e){const r=T(t),i=this.newChild(t.name,r,{parent:this}),n=i.#At&v;return 4!==n&&n!==w&&0!==n&&(i.#At|=64),e.unshift(i),e.provisional++,i}#Ut(t,e){for(let r=e.provisional;r<e.length;r++){const i=e[r];if((this.nocase?L(t.name):A(t.name))===i.#St)return this.#$t(t,i,r,e)}}#$t(t,e,r,i){const n=e.name;return e.#At=e.#At&S|T(t),n!==t.name&&(e.name=t.name),r!==i.provisional&&(r===i.length-1?i.pop():i.splice(r,1),i.unshift(e)),i.provisional++,e}async lstat(){if(0===(this.#At&E))try{return this.#Ht(await this.#nt.promises.lstat(this.fullpath())),this}catch(t){this.#zt(t.code)}}lstatSync(){if(0===(this.#At&E))try{return this.#Ht(this.#nt.lstatSync(this.fullpath())),this}catch(t){this.#zt(t.code)}}#Ht(t){const{atime:e,atimeMs:r,birthtime:i,birthtimeMs:n,blksize:s,blocks:o,ctime:a,ctimeMs:l,dev:h,gid:u,ino:c,mode:f,mtime:d,mtimeMs:p,nlink:g,rdev:y,size:m,uid:b}=t;this.#bt=e,this.#pt=r,this.#vt=i,this.#mt=n,this.#ct=s,this.#dt=o,this.#wt=a,this.#yt=l,this.#st=h,this.#ht=u,this.#ft=c,this.#ot=f,this.#_t=d,this.#gt=p,this.#at=g,this.#ut=y,this.#S=m,this.#lt=b;const _=T(t);this.#At=this.#At&S|_|32,0!==_&&4!==_&&_!==w&&(this.#At|=64)}#qt=[];#Vt=!1;#Zt(t){this.#Vt=!1;const e=this.#qt.slice();this.#qt.length=0,e.forEach(e=>e(null,t))}readdirCB(t,e=!1){if(!this.canReaddir())return void(e?t(null,[]):queueMicrotask(()=>t(null,[])));const r=this.children();if(this.calledReaddir()){const i=r.slice(0,r.provisional);return void(e?t(null,i):queueMicrotask(()=>t(null,i)))}if(this.#qt.push(t),this.#Vt)return;this.#Vt=!0;const i=this.fullpath();this.#nt.readdir(i,{withFileTypes:!0},(t,e)=>{if(t)this.#Bt(t.code),r.provisional=0;else{for(const t of e)this.#Wt(t,r);this.#Dt(r)}this.#Zt(r.slice(0,r.provisional))})}#Yt;async readdir(){if(!this.canReaddir())return[];const t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);const e=this.fullpath();if(this.#Yt)await this.#Yt;else{let r=()=>{};this.#Yt=new Promise(t=>r=t);try{for(const r of await this.#nt.promises.readdir(e,{withFileTypes:!0}))this.#Wt(r,t);this.#Dt(t)}catch(e){this.#Bt(e.code),t.provisional=0}this.#Yt=void 0,r()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];const t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);const e=this.fullpath();try{for(const r of this.#nt.readdirSync(e,{withFileTypes:!0}))this.#Wt(r,t);this.#Dt(t)}catch(e){this.#Bt(e.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(704&this.#At)return!1;const t=v&this.#At;return 0===t||4===t||t===w}shouldWalk(t,e){return!(4&~this.#At)&&!(704&this.#At)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#Mt)return this.#Mt;if(!(896&this.#At))try{const t=await this.#nt.promises.realpath(this.fullpath());return this.#Mt=this.resolve(t)}catch(t){this.#jt()}}realpathSync(){if(this.#Mt)return this.#Mt;if(!(896&this.#At))try{const t=this.#nt.realpathSync(this.fullpath());return this.#Mt=this.resolve(t)}catch(t){this.#jt()}}[I](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;const e=new Set([]);let r=[],i=this;for(;i&&i.parent;)e.add(i),i.#Tt=r.join(this.sep),i.#Rt=r.join("/"),i=i.parent,r.push("..");for(i=t;i&&i.parent&&!e.has(i);)i.#Tt=void 0,i.#Rt=void 0,i=i.parent}}wa.PathBase=D;class N extends D{sep="\\";splitSep=_;constructor(t,e=0,r,i,n,s,o){super(t,e,r,i,n,s,o)}newChild(t,e=0,r={}){return new N(t,e,this.root,this.roots,this.nocase,this.childrenCache(),r)}getRootString(t){return s.win32.parse(t).root}getRoot(t){if((t=(t=>t.replace(/\//g,"\\").replace(b,"$1\\"))(t.toUpperCase()))===this.root.name)return this.root;for(const[e,r]of Object.entries(this.roots))if(this.sameRoot(t,e))return this.roots[t]=r;return this.roots[t]=new F(t,this).root}sameRoot(t,e=this.root.name){return(t=t.toUpperCase().replace(/\//g,"\\").replace(b,"$1\\"))===e}}wa.PathWin32=N;class C extends D{splitSep="/";sep="/";constructor(t,e=0,r,i,n,s,o){super(t,e,r,i,n,s,o)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=0,r={}){return new C(t,e,this.root,this.roots,this.nocase,this.childrenCache(),r)}}wa.PathPosix=C;class j{root;rootPath;roots;cwd;#Kt;#Qt;#Ot;nocase;#nt;constructor(t=process.cwd(),e,r,{nocase:i,childrenCacheSize:n=16384,fs:s=y}={}){this.#nt=m(s),(t instanceof URL||t.startsWith("file://"))&&(t=(0,o.fileURLToPath)(t));const a=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(a),this.#Kt=new M,this.#Qt=new M,this.#Ot=new P(n);const l=a.substring(this.rootPath.length).split(r);if(1!==l.length||l[0]||l.pop(),void 0===i)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#nt),this.roots[this.rootPath]=this.root;let h=this.root,u=l.length-1;const c=e.sep;let f=this.rootPath,d=!1;for(const t of l){const e=u--;h=h.child(t,{relative:new Array(e).fill("..").join(c),relativePosix:new Array(e).fill("..").join("/"),fullpath:f+=(d?"":c)+t}),d=!0}this.cwd=h}depth(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#Ot}resolve(...t){let e="";for(let r=t.length-1;r>=0;r--){const i=t[r];if(i&&"."!==i&&(e=e?`${i}/${e}`:i,this.isAbsolute(i)))break}const r=this.#Kt.get(e);if(void 0!==r)return r;const i=this.cwd.resolve(e).fullpath();return this.#Kt.set(e,i),i}resolvePosix(...t){let e="";for(let r=t.length-1;r>=0;r--){const i=t[r];if(i&&"."!==i&&(e=e?`${i}/${e}`:i,this.isAbsolute(i)))break}const r=this.#Qt.get(e);if(void 0!==r)return r;const i=this.cwd.resolve(e).fullpathPosix();return this.#Qt.set(e,i),i}relative(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof D||(e=t,t=this.cwd);const{withFileTypes:r}=e;if(t.canReaddir()){const e=await t.readdir();return r?e:e.map(t=>t.name)}return[]}readdirSync(t=this.cwd,e={withFileTypes:!0}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof D||(e=t,t=this.cwd);const{withFileTypes:r=!0}=e;return t.canReaddir()?r?t.readdirSync():t.readdirSync().map(t=>t.name):[]}async lstat(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof D||(e=t.withFileTypes,t=this.cwd);const r=await t.readlink();return e?r:r?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof D||(e=t.withFileTypes,t=this.cwd);const r=t.readlinkSync();return e?r:r?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof D||(e=t.withFileTypes,t=this.cwd);const r=await t.realpath();return e?r:r?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof D||(e=t.withFileTypes,t=this.cwd);const r=t.realpathSync();return e?r:r?.fullpath()}async walk(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof D||(e=t,t=this.cwd);const{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:s}=e,o=[];n&&!n(t)||o.push(r?t:t.fullpath());const a=new Set,l=(t,e)=>{a.add(t),t.readdirCB((t,h)=>{if(t)return e(t);let u=h.length;if(!u)return e();const c=()=>{0===--u&&e()};for(const t of h)n&&!n(t)||o.push(r?t:t.fullpath()),i&&t.isSymbolicLink()?t.realpath().then(t=>t?.isUnknown()?t.lstat():t).then(t=>t?.shouldWalk(a,s)?l(t,c):c()):t.shouldWalk(a,s)?l(t,c):c()},!0)},h=t;return new Promise((t,e)=>{l(h,r=>{if(r)return e(r);t(o)})})}walkSync(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof D||(e=t,t=this.cwd);const{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:s}=e,o=[];n&&!n(t)||o.push(r?t:t.fullpath());const a=new Set([t]);for(const t of a){const e=t.readdirSync();for(const t of e){n&&!n(t)||o.push(r?t:t.fullpath());let e=t;if(t.isSymbolicLink()){if(!i||!(e=t.realpathSync()))continue;e.isUnknown()&&e.lstatSync()}e.shouldWalk(a,s)&&a.add(e)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return"string"==typeof t?t=this.cwd.resolve(t):t instanceof D||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof D||(e=t,t=this.cwd);const{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:s}=e;n&&!n(t)||(yield r?t:t.fullpath());const o=new Set([t]);for(const t of o){const e=t.readdirSync();for(const t of e){n&&!n(t)||(yield r?t:t.fullpath());let e=t;if(t.isSymbolicLink()){if(!i||!(e=t.realpathSync()))continue;e.isUnknown()&&e.lstatSync()}e.shouldWalk(o,s)&&o.add(e)}}}stream(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof D||(e=t,t=this.cwd);const{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:s}=e,o=new g.Minipass({objectMode:!0});n&&!n(t)||o.write(r?t:t.fullpath());const a=new Set,l=[t];let h=0;const u=()=>{let t=!1;for(;!t;){const e=l.shift();if(!e)return void(0===h&&o.end());h++,a.add(e);const c=(e,d,p=!1)=>{if(e)return o.emit("error",e);if(i&&!p){const t=[];for(const e of d)e.isSymbolicLink()&&t.push(e.realpath().then(t=>t?.isUnknown()?t.lstat():t));if(t.length)return void Promise.all(t).then(()=>c(null,d,!0))}for(const e of d)!e||n&&!n(e)||o.write(r?e:e.fullpath())||(t=!0);h--;for(const t of d){const e=t.realpathCached()||t;e.shouldWalk(a,s)&&l.push(e)}t&&!o.flowing?o.once("drain",u):f||u()};let f=!0;e.readdirCB(c,!0),f=!1}};return u(),o}streamSync(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof D||(e=t,t=this.cwd);const{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:s}=e,o=new g.Minipass({objectMode:!0}),a=new Set;n&&!n(t)||o.write(r?t:t.fullpath());const l=[t];let h=0;const u=()=>{let t=!1;for(;!t;){const e=l.shift();if(!e)return void(0===h&&o.end());h++,a.add(e);const u=e.readdirSync();for(const e of u)n&&!n(e)||o.write(r?e:e.fullpath())||(t=!0);h--;for(const t of u){let e=t;if(t.isSymbolicLink()){if(!i||!(e=t.realpathSync()))continue;e.isUnknown()&&e.lstatSync()}e.shouldWalk(a,s)&&l.push(e)}}t&&!o.flowing&&o.once("drain",u)};return u(),o}chdir(t=this.cwd){const e=this.cwd;this.cwd="string"==typeof t?this.cwd.resolve(t):t,this.cwd[I](e)}}wa.PathScurryBase=j;class F extends j{sep="\\";constructor(t=process.cwd(),e={}){const{nocase:r=!0}=e;super(t,s.win32,"\\",{...e,nocase:r}),this.nocase=r;for(let t=this.cwd;t;t=t.parent)t.nocase=this.nocase}parseRootPath(t){return s.win32.parse(t).root.toUpperCase()}newRoot(t){return new N(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}}wa.PathScurryWin32=F;class B extends j{sep="/";constructor(t=process.cwd(),e={}){const{nocase:r=!1}=e;super(t,s.posix,"/",{...e,nocase:r}),this.nocase=r}parseRootPath(t){return"/"}newRoot(t){return new C(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}}wa.PathScurryPosix=B;class z extends B{constructor(t=process.cwd(),e={}){const{nocase:r=!0}=e;super(t,{...e,nocase:r})}}return wa.PathScurryDarwin=z,wa.Path="win32"===process.platform?N:C,wa.PathScurry="win32"===process.platform?F:"darwin"===process.platform?z:B,wa}var Aa,Oa={};function La(){if(Aa)return Oa;Aa=1,Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.Pattern=void 0;const t=ma();class e{#Xt;#Jt;#te;length;#ee;#re;#ie;#ne;#se;#oe;#ae=!0;constructor(t,e,r,i){if(!(t.length>=1))throw new TypeError("empty pattern list");if(!(e.length>=1))throw new TypeError("empty glob list");if(e.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,r<0||r>=this.length)throw new TypeError("index out of range");if(this.#Xt=t,this.#Jt=e,this.#te=r,this.#ee=i,0===this.#te)if(this.isUNC()){const[t,e,r,i,...n]=this.#Xt,[s,o,a,l,...h]=this.#Jt;""===n[0]&&(n.shift(),h.shift());const u=[t,e,r,i,""].join("/"),c=[s,o,a,l,""].join("/");this.#Xt=[u,...n],this.#Jt=[c,...h],this.length=this.#Xt.length}else if(this.isDrive()||this.isAbsolute()){const[t,...e]=this.#Xt,[r,...i]=this.#Jt;""===e[0]&&(e.shift(),i.shift());const n=t+"/",s=r+"/";this.#Xt=[n,...e],this.#Jt=[s,...i],this.length=this.#Xt.length}}pattern(){return this.#Xt[this.#te]}isString(){return"string"==typeof this.#Xt[this.#te]}isGlobstar(){return this.#Xt[this.#te]===t.GLOBSTAR}isRegExp(){return this.#Xt[this.#te]instanceof RegExp}globString(){return this.#ie=this.#ie||(0===this.#te?this.isAbsolute()?this.#Jt[0]+this.#Jt.slice(1).join("/"):this.#Jt.join("/"):this.#Jt.slice(this.#te).join("/"))}hasMore(){return this.length>this.#te+1}rest(){return void 0!==this.#re?this.#re:this.hasMore()?(this.#re=new e(this.#Xt,this.#Jt,this.#te+1,this.#ee),this.#re.#oe=this.#oe,this.#re.#se=this.#se,this.#re.#ne=this.#ne,this.#re):this.#re=null}isUNC(){const t=this.#Xt;return void 0!==this.#se?this.#se:this.#se="win32"===this.#ee&&0===this.#te&&""===t[0]&&""===t[1]&&"string"==typeof t[2]&&!!t[2]&&"string"==typeof t[3]&&!!t[3]}isDrive(){const t=this.#Xt;return void 0!==this.#ne?this.#ne:this.#ne="win32"===this.#ee&&0===this.#te&&this.length>1&&"string"==typeof t[0]&&/^[a-z]:$/i.test(t[0])}isAbsolute(){const t=this.#Xt;return void 0!==this.#oe?this.#oe:this.#oe=""===t[0]&&t.length>1||this.isDrive()||this.isUNC()}root(){const t=this.#Xt[0];return"string"==typeof t&&this.isAbsolute()&&0===this.#te?t:""}checkFollowGlobstar(){return!(0===this.#te||!this.isGlobstar()||!this.#ae)}markFollowGlobstar(){return!(0===this.#te||!this.isGlobstar()||!this.#ae)&&(this.#ae=!1,!0)}}return Oa.Pattern=e,Oa}var Ma,Pa={},Ia={};function Da(){if(Ma)return Ia;Ma=1,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.Ignore=void 0;const t=ma(),e=La(),r="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux";return Ia.Ignore=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:i,noext:n,noglobstar:s,platform:o=r}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:e,nocase:i,noext:n,noglobstar:s,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(const e of t)this.add(e)}add(r){const i=new t.Minimatch(r,this.mmopts);for(let r=0;r<i.set.length;r++){const n=i.set[r],s=i.globParts[r];if(!n||!s)throw new Error("invalid pattern object");for(;"."===n[0]&&"."===s[0];)n.shift(),s.shift();const o=new e.Pattern(n,s,0,this.platform),a=new t.Minimatch(o.globString(),this.mmopts),l="**"===s[s.length-1],h=o.isAbsolute();h?this.absolute.push(a):this.relative.push(a),l&&(h?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}ignored(t){const e=t.fullpath(),r=`${e}/`,i=t.relative()||".",n=`${i}/`;for(const t of this.relative)if(t.match(i)||t.match(n))return!0;for(const t of this.absolute)if(t.match(e)||t.match(r))return!0;return!1}childrenIgnored(t){const e=t.fullpath()+"/",r=(t.relative()||".")+"/";for(const t of this.relativeChildren)if(t.match(r))return!0;for(const t of this.absoluteChildren)if(t.match(e))return!0;return!1}},Ia}var Na,Ca,ja,Fa={};function Ba(){if(Ca)return Pa;Ca=1,Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.GlobStream=Pa.GlobWalker=Pa.GlobUtil=void 0;const t=Ta(),e=Da(),r=function(){if(Na)return Fa;Na=1,Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.Processor=Fa.SubWalks=Fa.MatchRecord=Fa.HasWalkedCache=void 0;const t=ma();class e{store;constructor(t=new Map){this.store=t}copy(){return new e(new Map(this.store))}hasWalked(t,e){return this.store.get(t.fullpath())?.has(e.globString())}storeWalked(t,e){const r=t.fullpath(),i=this.store.get(r);i?i.add(e.globString()):this.store.set(r,new Set([e.globString()]))}}Fa.HasWalkedCache=e;class r{store=new Map;add(t,e,r){const i=(e?2:0)|(r?1:0),n=this.store.get(t);this.store.set(t,void 0===n?i:i&n)}entries(){return[...this.store.entries()].map(([t,e])=>[t,!!(2&e),!!(1&e)])}}Fa.MatchRecord=r;class i{store=new Map;add(t,e){if(!t.canReaddir())return;const r=this.store.get(t);r?r.find(t=>t.globString()===e.globString())||r.push(e):this.store.set(t,[e])}get(t){const e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}}Fa.SubWalks=i;class n{hasWalkedCache;matches=new r;subwalks=new i;patterns;follow;dot;opts;constructor(t,r){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=r?r.copy():new e}processPatterns(e,r){this.patterns=r;const i=r.map(t=>[e,t]);for(let[e,r]of i){this.hasWalkedCache.storeWalked(e,r);const i=r.root(),n=r.isAbsolute()&&!1!==this.opts.absolute;if(i){e=e.resolve("/"===i&&void 0!==this.opts.root?this.opts.root:i);const t=r.rest();if(!t){this.matches.add(e,!0,!1);continue}r=t}if(e.isENOENT())continue;let s,o,a=!1;for(;"string"==typeof(s=r.pattern())&&(o=r.rest());){const t=e.resolve(s);e=t,r=o,a=!0}if(s=r.pattern(),o=r.rest(),a){if(this.hasWalkedCache.hasWalked(e,r))continue;this.hasWalkedCache.storeWalked(e,r)}if("string"==typeof s){const t=".."===s||""===s||"."===s;this.matches.add(e.resolve(s),n,t);continue}if(s===t.GLOBSTAR){(!e.isSymbolicLink()||this.follow||r.checkFollowGlobstar())&&this.subwalks.add(e,r);const t=o?.pattern(),i=o?.rest();if(o&&(""!==t&&"."!==t||i)){if(".."===t){const t=e.parent||e;i?this.hasWalkedCache.hasWalked(t,i)||this.subwalks.add(t,i):this.matches.add(t,n,!0)}}else this.matches.add(e,n,""===t||"."===t)}else s instanceof RegExp&&this.subwalks.add(e,r)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new n(this.opts,this.hasWalkedCache)}filterEntries(e,r){const i=this.subwalks.get(e),n=this.child();for(const e of r)for(const r of i){const i=r.isAbsolute(),s=r.pattern(),o=r.rest();s===t.GLOBSTAR?n.testGlobstar(e,r,o,i):s instanceof RegExp?n.testRegExp(e,s,o,i):n.testString(e,s,o,i)}return n}testGlobstar(t,e,r,i){if(!this.dot&&t.name.startsWith(".")||(e.hasMore()||this.matches.add(t,i,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(r&&e.checkFollowGlobstar()?this.subwalks.add(t,r):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),r){const e=r.pattern();if("string"==typeof e&&".."!==e&&""!==e&&"."!==e)this.testString(t,e,r.rest(),i);else if(".."===e){const e=t.parent||t;this.subwalks.add(e,r)}else e instanceof RegExp&&this.testRegExp(t,e,r.rest(),i)}}testRegExp(t,e,r,i){e.test(t.name)&&(r?this.subwalks.add(t,r):this.matches.add(t,i,!1))}testString(t,e,r,i){t.isNamed(e)&&(r?this.subwalks.add(t,r):this.matches.add(t,i,!1))}}return Fa.Processor=n,Fa}();class i{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#le=[];#he;#ue;signal;maxDepth;includeChildMatches;constructor(t,r,i){if(this.patterns=t,this.path=r,this.opts=i,this.#ue=i.posix||"win32"!==i.platform?"/":"\\",this.includeChildMatches=!1!==i.includeChildMatches,(i.ignore||!this.includeChildMatches)&&(this.#he=((t,r)=>"string"==typeof t?new e.Ignore([t],r):Array.isArray(t)?new e.Ignore(t,r):t)(i.ignore??[],i),!this.includeChildMatches&&"function"!=typeof this.#he.add)){throw new Error("cannot ignore child matches, ignore lacks add() method.")}this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#le.length=0}))}#ce(t){return this.seen.has(t)||!!this.#he?.ignored?.(t)}#fe(t){return!!this.#he?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;let t;for(this.paused=!1;!this.paused&&(t=this.#le.shift());)t()}onResume(t){this.signal?.aborted||(this.paused?this.#le.push(t):t())}async matchCheck(t,e){if(e&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=t.realpathCached()||await t.realpath(),!r)return;t=r}const i=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&i?.isSymbolicLink()){const t=await i.realpath();t&&(t.isUnknown()||this.opts.stat)&&await t.lstat()}return this.matchCheckTest(i,e)}matchCheckTest(t,e){return!t||!(this.maxDepth===1/0||t.depth()<=this.maxDepth)||e&&!t.canReaddir()||this.opts.nodir&&t.isDirectory()||this.opts.nodir&&this.opts.follow&&t.isSymbolicLink()&&t.realpathCached()?.isDirectory()||this.#ce(t)?void 0:t}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=t.realpathCached()||t.realpathSync(),!r)return;t=r}const i=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&i?.isSymbolicLink()){const t=i.realpathSync();t&&(t?.isUnknown()||this.opts.stat)&&t.lstatSync()}return this.matchCheckTest(i,e)}matchFinish(t,e){if(this.#ce(t))return;if(!this.includeChildMatches&&this.#he?.add){const e=`${t.relativePosix()}/**`;this.#he.add(e)}const r=void 0===this.opts.absolute?e:this.opts.absolute;this.seen.add(t);const i=this.opts.mark&&t.isDirectory()?this.#ue:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(r){const e=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(e+i)}else{const e=this.opts.posix?t.relativePosix():t.relative(),r=this.opts.dotRelative&&!e.startsWith(".."+this.#ue)?"."+this.#ue:"";this.matchEmit(e?r+e+i:"."+i)}}async match(t,e,r){const i=await this.matchCheck(t,r);i&&this.matchFinish(i,e)}matchSync(t,e,r){const i=this.matchCheckSync(t,r);i&&this.matchFinish(i,e)}walkCB(t,e,i){this.signal?.aborted&&i(),this.walkCB2(t,e,new r.Processor(this.opts),i)}walkCB2(t,e,r,i){if(this.#fe(t))return i();if(this.signal?.aborted&&i(),this.paused)return void this.onResume(()=>this.walkCB2(t,e,r,i));r.processPatterns(t,e);let n=1;const s=()=>{0===--n&&i()};for(const[t,e,i]of r.matches.entries())this.#ce(t)||(n++,this.match(t,e,i).then(()=>s()));for(const t of r.subwalkTargets()){if(this.maxDepth!==1/0&&t.depth()>=this.maxDepth)continue;n++;const e=t.readdirCached();t.calledReaddir()?this.walkCB3(t,e,r,s):t.readdirCB((e,i)=>this.walkCB3(t,i,r,s),!0)}s()}walkCB3(t,e,r,i){r=r.filterEntries(t,e);let n=1;const s=()=>{0===--n&&i()};for(const[t,e,i]of r.matches.entries())this.#ce(t)||(n++,this.match(t,e,i).then(()=>s()));for(const[t,e]of r.subwalks.entries())n++,this.walkCB2(t,e,r.child(),s);s()}walkCBSync(t,e,i){this.signal?.aborted&&i(),this.walkCB2Sync(t,e,new r.Processor(this.opts),i)}walkCB2Sync(t,e,r,i){if(this.#fe(t))return i();if(this.signal?.aborted&&i(),this.paused)return void this.onResume(()=>this.walkCB2Sync(t,e,r,i));r.processPatterns(t,e);let n=1;const s=()=>{0===--n&&i()};for(const[t,e,i]of r.matches.entries())this.#ce(t)||this.matchSync(t,e,i);for(const t of r.subwalkTargets()){if(this.maxDepth!==1/0&&t.depth()>=this.maxDepth)continue;n++;const e=t.readdirSync();this.walkCB3Sync(t,e,r,s)}s()}walkCB3Sync(t,e,r,i){r=r.filterEntries(t,e);let n=1;const s=()=>{0===--n&&i()};for(const[t,e,i]of r.matches.entries())this.#ce(t)||this.matchSync(t,e,i);for(const[t,e]of r.subwalks.entries())n++,this.walkCB2Sync(t,e,r.child(),s);s()}}Pa.GlobUtil=i;Pa.GlobWalker=class extends i{matches=new Set;constructor(t,e,r){super(t,e,r)}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,e)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?e(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}};return Pa.GlobStream=class extends i{results;constructor(e,r,i){super(e,r,i),this.results=new t.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){const t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end())}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}},Pa}function za(){if(ja)return _a;ja=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.Glob=void 0;const t=ma(),e=h,r=Ra(),i=La(),n=Ba(),s="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux";class o{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(n,o){if(!o)throw new TypeError("glob options required");if(this.withFileTypes=!!o.withFileTypes,this.signal=o.signal,this.follow=!!o.follow,this.dot=!!o.dot,this.dotRelative=!!o.dotRelative,this.nodir=!!o.nodir,this.mark=!!o.mark,o.cwd?(o.cwd instanceof URL||o.cwd.startsWith("file://"))&&(o.cwd=(0,e.fileURLToPath)(o.cwd)):this.cwd="",this.cwd=o.cwd||"",this.root=o.root,this.magicalBraces=!!o.magicalBraces,this.nobrace=!!o.nobrace,this.noext=!!o.noext,this.realpath=!!o.realpath,this.absolute=o.absolute,this.includeChildMatches=!1!==o.includeChildMatches,this.noglobstar=!!o.noglobstar,this.matchBase=!!o.matchBase,this.maxDepth="number"==typeof o.maxDepth?o.maxDepth:1/0,this.stat=!!o.stat,this.ignore=o.ignore,this.withFileTypes&&void 0!==this.absolute)throw new Error("cannot set absolute and withFileTypes:true");if("string"==typeof n&&(n=[n]),this.windowsPathsNoEscape=!!o.windowsPathsNoEscape||!1===o.allowWindowsEscape,this.windowsPathsNoEscape&&(n=n.map(t=>t.replace(/\\/g,"/"))),this.matchBase){if(o.noglobstar)throw new TypeError("base matching requires globstar");n=n.map(t=>t.includes("/")?t:`./**/${t}`)}if(this.pattern=n,this.platform=o.platform||s,this.opts={...o,platform:this.platform},o.scurry){if(this.scurry=o.scurry,void 0!==o.nocase&&o.nocase!==o.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{const t="win32"===o.platform?r.PathScurryWin32:"darwin"===o.platform?r.PathScurryDarwin:o.platform?r.PathScurryPosix:r.PathScurry;this.scurry=new t(this.cwd,{nocase:o.nocase,fs:o.fs})}this.nocase=this.scurry.nocase;const a="darwin"===this.platform||"win32"===this.platform,l={...o,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:a,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},h=this.pattern.map(e=>new t.Minimatch(e,l)),[u,c]=h.reduce((t,e)=>(t[0].push(...e.set),t[1].push(...e.globParts),t),[[],[]]);this.patterns=u.map((t,e)=>{const r=c[e];if(!r)throw new Error("invalid pattern object");return new i.Pattern(t,r,0,this.platform)})}async walk(){return[...await new n.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new n.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new n.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new n.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}return _a.Glob=o,_a}var Wa,Ua,Ga,$a,Ha={};function qa(){if(Wa)return Ha;Wa=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.hasMagic=void 0;const t=ma();return Ha.hasMagic=(e,r={})=>{Array.isArray(e)||(e=[e]);for(const i of e)if(new t.Minimatch(i,r).hasMagic())return!0;return!1},Ha}function Va(){if(Ga)return No.exports;Ga=1;var t=X(),e=i,r=function(){if(Yn)return Zn;Yn=1;var t=Co();return Zn=function(e){return null!=e&&e.length?t(e,1):[]}}(),n=function(){if(yo)return go;yo=1;var t=Yo(),e=Co(),r=Tr(),i=Ko(),n=r(function(r,n){return i(r)?t(r,e(n,1,i,!0)):[]});return go=n}(),s=Jo(),o=function(){if(Do)return Io;Do=1;var t=br(),e=ta(),r=Mr(),i=Function.prototype,n=Object.prototype,s=i.toString,o=n.hasOwnProperty,a=s.call(Object);return Io=function(i){if(!r(i)||"[object Object]"!=t(i))return!1;var n=e(i);if(null===n)return!0;var l=o.call(n,"constructor")&&n.constructor;return"function"==typeof l&&l instanceof l&&s.call(l)==a}}(),a=(Ua||(Ua=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.glob=t.sync=t.iterate=t.iterateSync=t.stream=t.streamSync=t.Ignore=t.hasMagic=t.Glob=t.unescape=t.escape=void 0,t.globStreamSync=l,t.globStream=h,t.globSync=u,t.globIterateSync=f,t.globIterate=d;const e=ma(),r=za(),i=qa();var n=ma();Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return n.escape}}),Object.defineProperty(t,"unescape",{enumerable:!0,get:function(){return n.unescape}});var s=za();Object.defineProperty(t,"Glob",{enumerable:!0,get:function(){return s.Glob}});var o=qa();Object.defineProperty(t,"hasMagic",{enumerable:!0,get:function(){return o.hasMagic}});var a=Da();function l(t,e={}){return new r.Glob(t,e).streamSync()}function h(t,e={}){return new r.Glob(t,e).stream()}function u(t,e={}){return new r.Glob(t,e).walkSync()}async function c(t,e={}){return new r.Glob(t,e).walk()}function f(t,e={}){return new r.Glob(t,e).iterateSync()}function d(t,e={}){return new r.Glob(t,e).iterate()}Object.defineProperty(t,"Ignore",{enumerable:!0,get:function(){return a.Ignore}}),t.streamSync=l,t.stream=Object.assign(h,{sync:l}),t.iterateSync=f,t.iterate=Object.assign(d,{sync:f}),t.sync=Object.assign(u,{stream:l,iterate:f}),t.glob=Object.assign(c,{glob:c,globSync:u,sync:t.sync,globStream:h,stream:t.stream,globStreamSync:l,streamSync:t.streamSync,globIterate:d,iterate:t.iterate,globIterateSync:f,iterateSync:t.iterateSync,Glob:r.Glob,hasMagic:i.hasMagic,escape:e.escape,unescape:e.unescape}),t.glob.glob=t.glob}(ra)),ra),l=No.exports={},h=/[\/\\]/g;return l.exists=function(){var r=e.join.apply(e,arguments);return t.existsSync(r)},l.expand=function(...i){var l=o(i[0])?i.shift():{},h=Array.isArray(i[0])?i[0]:i;if(0===h.length)return[];var u=function(t,e){var i=[];return r(t).forEach(function(t){var r=0===t.indexOf("!");r&&(t=t.slice(1));var o=e(t);i=r?n(i,o):s(i,o)}),i}(h,function(t){return a.sync(t,l)});return l.filter&&(u=u.filter(function(r){r=e.join(l.cwd||"",r);try{return"function"==typeof l.filter?l.filter(r):t.statSync(r)[l.filter]()}catch(t){return!1}})),u},l.expandMapping=function(t,r,i){i=Object.assign({rename:function(t,r){return e.join(t||"",r)}},i);var n=[],s={};return l.expand(i,t).forEach(function(t){var o=t;i.flatten&&(o=e.basename(o)),i.ext&&(o=o.replace(/(\.[^\/]*)?$/,i.ext));var a=i.rename(r,o,i);i.cwd&&(t=e.join(i.cwd,t)),a=a.replace(h,"/"),t=t.replace(h,"/"),s[a]?s[a].src.push(t):(n.push({src:[t],dest:a}),s[a]=n[n.length-1])}),n},l.normalizeFilesArray=function(t){var e=[];return t.forEach(function(t){("src"in t||"dest"in t)&&e.push(t)}),0===e.length?[]:e=_(e).chain().forEach(function(t){"src"in t&&t.src&&(Array.isArray(t.src)?t.src=r(t.src):t.src=[t.src])}).map(function(t){var e=Object.assign({},t);if(delete e.src,delete e.dest,t.expand)return l.expandMapping(t.src,t.dest,e).map(function(e){var r=Object.assign({},t);return r.orig=Object.assign({},t),r.src=e.src,r.dest=e.dest,["expand","cwd","flatten","rename","ext"].forEach(function(t){delete r[t]}),r});var i=Object.assign({},t);return i.orig=Object.assign({},t),"src"in i&&Object.defineProperty(i,"src",{enumerable:!0,get:function i(){var n;return"result"in i||(n=t.src,n=Array.isArray(n)?r(n):[n],i.result=l.expand(e,n)),i.result}}),"dest"in i&&(i.dest=t.dest),i}).flatten().value()},No.exports}function Za(){if($a)return K.exports;$a=1;var t=X(),e=i,r=J(),n=cr(),o=fr(),a=hi();s.Stream;var l=Wn().PassThrough,h=K.exports={};return h.file=Va(),h.collectStream=function(t,e){var r=[],i=0;t.on("error",e),t.on("data",function(t){r.push(t),i+=t.length}),t.on("end",function(){var t=Buffer.alloc(i),n=0;r.forEach(function(e){e.copy(t,n),n+=e.length}),e(null,t)})},h.dateify=function(t){return(t=t||new Date)instanceof Date||(t="string"==typeof t?new Date(t):new Date),t},h.defaults=function(t,e,r){var i=arguments;return i[0]=i[0]||{},a(...i)},h.isStream=function(t){return r(t)},h.lazyReadStream=function(e){return new n.Readable(function(){return t.createReadStream(e)})},h.normalizeInputSource=function(t){return null===t?Buffer.alloc(0):"string"==typeof t?Buffer.from(t):h.isStream(t)?t.pipe(new l):t},h.sanitizePath=function(t){return o(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")},h.trailingSlashIt=function(t){return"/"!==t.slice(-1)?t+"/":t},h.unixifyPath=function(t){return o(t,!1).replace(/^\w+:/,"")},h.walkdir=function(r,i,n){var s=[];"function"==typeof i&&(n=i,i=r),t.readdir(r,function(o,a){var l,u,c=0;if(o)return n(o);!function o(){if(!(l=a[c++]))return n(null,s);u=e.join(r,l),t.stat(u,function(t,r){s.push({path:u,relative:e.relative(i,u).replace(/\\/g,"/"),stats:r}),r&&r.isDirectory()?h.walkdir(u,i,function(t,e){if(t)return n(t);e.forEach(function(t){s.push(t)}),o()}):o()})}()})},K.exports}var Ya,Ka,Qa,Xa={exports:{}};
9
+ /**
10
+ * Archiver Core
11
+ *
12
+ * @ignore
13
+ * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
14
+ * @copyright (c) 2012-2014 Chris Talkington, contributors.
15
+ */function Ja(){if(Qa)return Ka;Qa=1;var e=t,r=C(),n=B(),s=i,a=Za(),l=o.inherits,h=(Ya||(Ya=1,function(t){const e={ABORTED:"archive was aborted",DIRECTORYDIRPATHREQUIRED:"diretory dirpath argument must be a non-empty string value",DIRECTORYFUNCTIONINVALIDDATA:"invalid data returned by directory custom data function",ENTRYNAMEREQUIRED:"entry name must be a non-empty string value",FILEFILEPATHREQUIRED:"file filepath argument must be a non-empty string value",FINALIZING:"archive already finalizing",QUEUECLOSED:"queue closed",NOENDMETHOD:"no suitable finalize/end method defined by module",DIRECTORYNOTSUPPORTED:"support for directory entries not defined by module",FORMATSET:"archive format already set",INPUTSTEAMBUFFERREQUIRED:"input source must be valid Stream or Buffer instance",MODULESET:"module already set",SYMLINKNOTSUPPORTED:"support for symlink entries not defined by module",SYMLINKFILEPATHREQUIRED:"symlink filepath argument must be a non-empty string value",SYMLINKTARGETREQUIRED:"symlink target argument must be a non-empty string value",ENTRYNOTSUPPORTED:"entry not supported"};function r(t,r){Error.captureStackTrace(this,this.constructor),this.message=e[t]||t,this.code=t,this.data=r}o.inherits(r,Error),t.exports=r}(Xa)),Xa.exports),u=Wn().Transform,c="win32"===process.platform,f=function(t,e){if(!(this instanceof f))return new f(t,e);"string"!=typeof t&&(e=t,t="zip"),e=this.options=a.defaults(e,{highWaterMark:1048576,statConcurrency:4}),u.call(this,e),this._format=!1,this._module=!1,this._pending=0,this._pointer=0,this._entriesCount=0,this._entriesProcessedCount=0,this._fsEntriesTotalBytes=0,this._fsEntriesProcessedBytes=0,this._queue=n.queue(this._onQueueTask.bind(this),1),this._queue.drain(this._onQueueDrain.bind(this)),this._statQueue=n.queue(this._onStatQueueTask.bind(this),e.statConcurrency),this._statQueue.drain(this._onQueueDrain.bind(this)),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]};return l(f,u),f.prototype._abort=function(){this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle()&&this._shutdown()},f.prototype._append=function(t,r){var i={source:null,filepath:t};(r=r||{}).name||(r.name=t),r.sourcePath=t,i.data=r,this._entriesCount++,r.stats&&r.stats instanceof e.Stats?(i=this._updateQueueTaskWithStats(i,r.stats))&&(r.stats.size&&(this._fsEntriesTotalBytes+=r.stats.size),this._queue.push(i)):this._statQueue.push(i)},f.prototype._finalize=function(){this._state.finalizing||this._state.finalized||this._state.aborted||(this._state.finalizing=!0,this._moduleFinalize(),this._state.finalizing=!1,this._state.finalized=!0)},f.prototype._maybeFinalize=function(){return!(this._state.finalizing||this._state.finalized||this._state.aborted)&&(!!(this._state.finalize&&0===this._pending&&this._queue.idle()&&this._statQueue.idle())&&(this._finalize(),!0))},f.prototype._moduleAppend=function(t,e,r){this._state.aborted?r():this._module.append(t,e,function(t){if(this._task=null,this._state.aborted)this._shutdown();else{if(t)return this.emit("error",t),void setImmediate(r);this.emit("entry",e),this._entriesProcessedCount++,e.stats&&e.stats.size&&(this._fsEntriesProcessedBytes+=e.stats.size),this.emit("progress",{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),setImmediate(r)}}.bind(this))},f.prototype._moduleFinalize=function(){"function"==typeof this._module.finalize?this._module.finalize():"function"==typeof this._module.end?this._module.end():this.emit("error",new h("NOENDMETHOD"))},f.prototype._modulePipe=function(){this._module.on("error",this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0},f.prototype._moduleSupports=function(t){return!(!this._module.supports||!this._module.supports[t])&&this._module.supports[t]},f.prototype._moduleUnpipe=function(){this._module.unpipe(this),this._state.modulePiped=!1},f.prototype._normalizeEntryData=function(t,e){t=a.defaults(t,{type:"file",name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1}),e&&!1===t.stats&&(t.stats=e);var r="directory"===t.type;return t.name&&("string"==typeof t.prefix&&""!==t.prefix&&(t.name=t.prefix+"/"+t.name,t.prefix=null),t.name=a.sanitizePath(t.name),"symlink"!==t.type&&"/"===t.name.slice(-1)?(r=!0,t.type="directory"):r&&(t.name+="/")),"number"==typeof t.mode?t.mode&=c?511:4095:t.stats&&null===t.mode?(t.mode=c?511&t.stats.mode:4095&t.stats.mode,c&&r&&(t.mode=493)):null===t.mode&&(t.mode=r?493:420),t.stats&&null===t.date?t.date=t.stats.mtime:t.date=a.dateify(t.date),t},f.prototype._onModuleError=function(t){this.emit("error",t)},f.prototype._onQueueDrain=function(){this._state.finalizing||this._state.finalized||this._state.aborted||this._state.finalize&&0===this._pending&&this._queue.idle()&&this._statQueue.idle()&&this._finalize()},f.prototype._onQueueTask=function(t,e){var r=()=>{t.data.callback&&t.data.callback(),e()};this._state.finalizing||this._state.finalized||this._state.aborted?r():(this._task=t,this._moduleAppend(t.source,t.data,r))},f.prototype._onStatQueueTask=function(t,r){this._state.finalizing||this._state.finalized||this._state.aborted?r():e.lstat(t.filepath,function(e,i){if(this._state.aborted)setImmediate(r);else{if(e)return this._entriesCount--,this.emit("warning",e),void setImmediate(r);(t=this._updateQueueTaskWithStats(t,i))&&(i.size&&(this._fsEntriesTotalBytes+=i.size),this._queue.push(t)),setImmediate(r)}}.bind(this))},f.prototype._shutdown=function(){this._moduleUnpipe(),this.end()},f.prototype._transform=function(t,e,r){t&&(this._pointer+=t.length),r(null,t)},f.prototype._updateQueueTaskWithStats=function(t,r){if(r.isFile())t.data.type="file",t.data.sourceType="stream",t.source=a.lazyReadStream(t.filepath);else if(r.isDirectory()&&this._moduleSupports("directory"))t.data.name=a.trailingSlashIt(t.data.name),t.data.type="directory",t.data.sourcePath=a.trailingSlashIt(t.filepath),t.data.sourceType="buffer",t.source=Buffer.concat([]);else{if(!r.isSymbolicLink()||!this._moduleSupports("symlink"))return r.isDirectory()?this.emit("warning",new h("DIRECTORYNOTSUPPORTED",t.data)):r.isSymbolicLink()?this.emit("warning",new h("SYMLINKNOTSUPPORTED",t.data)):this.emit("warning",new h("ENTRYNOTSUPPORTED",t.data)),null;var i=e.readlinkSync(t.filepath),n=s.dirname(t.filepath);t.data.type="symlink",t.data.linkname=s.relative(n,s.resolve(n,i)),t.data.sourceType="buffer",t.source=Buffer.concat([])}return t.data=this._normalizeEntryData(t.data,r),t},f.prototype.abort=function(){return this._state.aborted||this._state.finalized||this._abort(),this},f.prototype.append=function(t,e){if(this._state.finalize||this._state.aborted)return this.emit("error",new h("QUEUECLOSED")),this;if("string"!=typeof(e=this._normalizeEntryData(e)).name||0===e.name.length)return this.emit("error",new h("ENTRYNAMEREQUIRED")),this;if("directory"===e.type&&!this._moduleSupports("directory"))return this.emit("error",new h("DIRECTORYNOTSUPPORTED",{name:e.name})),this;if(t=a.normalizeInputSource(t),Buffer.isBuffer(t))e.sourceType="buffer";else{if(!a.isStream(t))return this.emit("error",new h("INPUTSTEAMBUFFERREQUIRED",{name:e.name})),this;e.sourceType="stream"}return this._entriesCount++,this._queue.push({data:e,source:t}),this},f.prototype.directory=function(t,e,i){if(this._state.finalize||this._state.aborted)return this.emit("error",new h("QUEUECLOSED")),this;if("string"!=typeof t||0===t.length)return this.emit("error",new h("DIRECTORYDIRPATHREQUIRED")),this;this._pending++,!1===e?e="":"string"!=typeof e&&(e=t);var n=!1;"function"==typeof i?(n=i,i={}):"object"!=typeof i&&(i={});var s=r(t,{stat:!0,dot:!0});return s.on("error",function(t){this.emit("error",t)}.bind(this)),s.on("match",function(r){s.pause();var o=!1,a=Object.assign({},i);a.name=r.relative,a.prefix=e,a.stats=r.stat,a.callback=s.resume.bind(s);try{if(n)if(!1===(a=n(a)))o=!0;else if("object"!=typeof a)throw new h("DIRECTORYFUNCTIONINVALIDDATA",{dirpath:t})}catch(t){return void this.emit("error",t)}o?s.resume():this._append(r.absolute,a)}.bind(this)),s.on("end",function(){this._pending--,this._maybeFinalize()}.bind(this)),this},f.prototype.file=function(t,e){return this._state.finalize||this._state.aborted?(this.emit("error",new h("QUEUECLOSED")),this):"string"!=typeof t||0===t.length?(this.emit("error",new h("FILEFILEPATHREQUIRED")),this):(this._append(t,e),this)},f.prototype.glob=function(t,e,i){this._pending++,e=a.defaults(e,{stat:!0,pattern:t});var n=r(e.cwd||".",e);return n.on("error",function(t){this.emit("error",t)}.bind(this)),n.on("match",function(t){n.pause();var e=Object.assign({},i);e.callback=n.resume.bind(n),e.stats=t.stat,e.name=t.relative,this._append(t.absolute,e)}.bind(this)),n.on("end",function(){this._pending--,this._maybeFinalize()}.bind(this)),this},f.prototype.finalize=function(){if(this._state.aborted){var t=new h("ABORTED");return this.emit("error",t),Promise.reject(t)}if(this._state.finalize){var e=new h("FINALIZING");return this.emit("error",e),Promise.reject(e)}this._state.finalize=!0,0===this._pending&&this._queue.idle()&&this._statQueue.idle()&&this._finalize();var r=this;return new Promise(function(t,e){var i;r._module.on("end",function(){i||t()}),r._module.on("error",function(t){i=!0,e(t)})})},f.prototype.setFormat=function(t){return this._format?(this.emit("error",new h("FORMATSET")),this):(this._format=t,this)},f.prototype.setModule=function(t){return this._state.aborted?(this.emit("error",new h("ABORTED")),this):this._state.module?(this.emit("error",new h("MODULESET")),this):(this._module=t,this._modulePipe(),this)},f.prototype.symlink=function(t,e,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new h("QUEUECLOSED")),this;if("string"!=typeof t||0===t.length)return this.emit("error",new h("SYMLINKFILEPATHREQUIRED")),this;if("string"!=typeof e||0===e.length)return this.emit("error",new h("SYMLINKTARGETREQUIRED",{filepath:t})),this;if(!this._moduleSupports("symlink"))return this.emit("error",new h("SYMLINKNOTSUPPORTED",{filepath:t})),this;var i={type:"symlink"};return i.name=t.replace(/\\/g,"/"),i.linkname=e.replace(/\\/g,"/"),i.sourceType="buffer","number"==typeof r&&(i.mode=r),this._entriesCount++,this._queue.push({data:i,source:Buffer.concat([])}),this},f.prototype.pointer=function(){return this._pointer},f.prototype.use=function(t){return this._streams.push(t),this},Ka=f}var tl,el={exports:{}},rl={exports:{}};function il(){if(tl)return rl.exports;tl=1;var t=rl.exports=function(){};return t.prototype.getName=function(){},t.prototype.getSize=function(){},t.prototype.getLastModifiedDate=function(){},t.prototype.isDirectory=function(){},rl.exports}var nl,sl,ol,al,ll,hl,ul,cl={exports:{}},fl={exports:{}},dl={exports:{}};function pl(){if(nl)return dl.exports;nl=1;var t=dl.exports={};return t.dateToDos=function(t,e){var r=(e=e||!1)?t.getFullYear():t.getUTCFullYear();return r<1980?2162688:r>=2044?2141175677:r-1980<<25|(e?t.getMonth():t.getUTCMonth())+1<<21|(e?t.getDate():t.getUTCDate())<<16|(e?t.getHours():t.getUTCHours())<<11|(e?t.getMinutes():t.getUTCMinutes())<<5|(e?t.getSeconds():t.getUTCSeconds())/2},t.dosToDate=function(t){return new Date(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1)},t.fromDosTime=function(e){return t.dosToDate(e.readUInt32LE(0))},t.getEightBytes=function(t){var e=Buffer.alloc(8);return e.writeUInt32LE(t%4294967296,0),e.writeUInt32LE(t/4294967296|0,4),e},t.getShortBytes=function(t){var e=Buffer.alloc(2);return e.writeUInt16LE((65535&t)>>>0,0),e},t.getShortBytesValue=function(t,e){return t.readUInt16LE(e)},t.getLongBytes=function(t){var e=Buffer.alloc(4);return e.writeUInt32LE((4294967295&t)>>>0,0),e},t.getLongBytesValue=function(t,e){return t.readUInt32LE(e)},t.toDosTime=function(e){return t.getLongBytes(t.dateToDos(e))},dl.exports}function gl(){if(sl)return fl.exports;sl=1;var t=pl(),e=fl.exports=function(){return this instanceof e?(this.descriptor=!1,this.encryption=!1,this.utf8=!1,this.numberOfShannonFanoTrees=0,this.strongEncryption=!1,this.slidingDictionarySize=0,this):new e};return e.prototype.encode=function(){return t.getShortBytes((this.descriptor?8:0)|(this.utf8?2048:0)|(this.encryption?1:0)|(this.strongEncryption?64:0))},e.prototype.parse=function(r,i){var n=t.getShortBytesValue(r,i),s=new e;return s.useDataDescriptor(!!(8&n)),s.useUTF8ForNames(!!(2048&n)),s.useStrongEncryption(!!(64&n)),s.useEncryption(!!(1&n)),s.setSlidingDictionarySize(2&n?8192:4096),s.setNumberOfShannonFanoTrees(4&n?3:2),s},e.prototype.setNumberOfShannonFanoTrees=function(t){this.numberOfShannonFanoTrees=t},e.prototype.getNumberOfShannonFanoTrees=function(){return this.numberOfShannonFanoTrees},e.prototype.setSlidingDictionarySize=function(t){this.slidingDictionarySize=t},e.prototype.getSlidingDictionarySize=function(){return this.slidingDictionarySize},e.prototype.useDataDescriptor=function(t){this.descriptor=t},e.prototype.usesDataDescriptor=function(){return this.descriptor},e.prototype.useEncryption=function(t){this.encryption=t},e.prototype.usesEncryption=function(){return this.encryption},e.prototype.useStrongEncryption=function(t){this.strongEncryption=t},e.prototype.usesStrongEncryption=function(){return this.strongEncryption},e.prototype.useUTF8ForNames=function(t){this.utf8=t},e.prototype.usesUTF8ForNames=function(){return this.utf8},fl.exports}function yl(){return hl?ll:(hl=1,ll={WORD:4,DWORD:8,EMPTY:Buffer.alloc(0),SHORT:2,SHORT_MASK:65535,SHORT_SHIFT:16,SHORT_ZERO:Buffer.from(Array(2)),LONG:4,LONG_ZERO:Buffer.from(Array(4)),MIN_VERSION_INITIAL:10,MIN_VERSION_DATA_DESCRIPTOR:20,MIN_VERSION_ZIP64:45,VERSION_MADEBY:45,METHOD_STORED:0,METHOD_DEFLATED:8,PLATFORM_UNIX:3,PLATFORM_FAT:0,SIG_LFH:67324752,SIG_DD:134695760,SIG_CFH:33639248,SIG_EOCD:101010256,SIG_ZIP64_EOCD:101075792,SIG_ZIP64_EOCD_LOC:117853008,ZIP64_MAGIC_SHORT:65535,ZIP64_MAGIC:4294967295,ZIP64_EXTRA_ID:1,ZLIB_NO_COMPRESSION:0,ZLIB_BEST_SPEED:1,ZLIB_BEST_COMPRESSION:9,ZLIB_DEFAULT_COMPRESSION:-1,MODE_MASK:4095,DEFAULT_FILE_MODE:33188,DEFAULT_DIR_MODE:16877,EXT_FILE_ATTR_DIR:1106051088,EXT_FILE_ATTR_FILE:2175008800,S_IFMT:61440,S_IFIFO:4096,S_IFCHR:8192,S_IFDIR:16384,S_IFBLK:24576,S_IFREG:32768,S_IFLNK:40960,S_IFSOCK:49152,S_DOS_A:32,S_DOS_D:16,S_DOS_V:8,S_DOS_S:4,S_DOS_H:2,S_DOS_R:1})}function ml(){if(ul)return cl.exports;ul=1;var t=o.inherits,e=fr(),r=il(),i=gl(),n=al?ol:(al=1,ol={PERM_MASK:4095,FILE_TYPE_FLAG:61440,LINK_FLAG:40960,FILE_FLAG:32768,DIR_FLAG:16384,DEFAULT_LINK_PERM:511,DEFAULT_DIR_PERM:493,DEFAULT_FILE_PERM:420}),s=yl(),a=pl(),l=cl.exports=function(t){if(!(this instanceof l))return new l(t);r.call(this),this.platform=s.PLATFORM_FAT,this.method=-1,this.name=null,this.size=0,this.csize=0,this.gpb=new i,this.crc=0,this.time=-1,this.minver=s.MIN_VERSION_INITIAL,this.mode=-1,this.extra=null,this.exattr=0,this.inattr=0,this.comment=null,t&&this.setName(t)};return t(l,r),l.prototype.getCentralDirectoryExtra=function(){return this.getExtra()},l.prototype.getComment=function(){return null!==this.comment?this.comment:""},l.prototype.getCompressedSize=function(){return this.csize},l.prototype.getCrc=function(){return this.crc},l.prototype.getExternalAttributes=function(){return this.exattr},l.prototype.getExtra=function(){return null!==this.extra?this.extra:s.EMPTY},l.prototype.getGeneralPurposeBit=function(){return this.gpb},l.prototype.getInternalAttributes=function(){return this.inattr},l.prototype.getLastModifiedDate=function(){return this.getTime()},l.prototype.getLocalFileDataExtra=function(){return this.getExtra()},l.prototype.getMethod=function(){return this.method},l.prototype.getName=function(){return this.name},l.prototype.getPlatform=function(){return this.platform},l.prototype.getSize=function(){return this.size},l.prototype.getTime=function(){return-1!==this.time?a.dosToDate(this.time):-1},l.prototype.getTimeDos=function(){return-1!==this.time?this.time:0},l.prototype.getUnixMode=function(){return this.platform!==s.PLATFORM_UNIX?0:this.getExternalAttributes()>>s.SHORT_SHIFT&s.SHORT_MASK},l.prototype.getVersionNeededToExtract=function(){return this.minver},l.prototype.setComment=function(t){Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.comment=t},l.prototype.setCompressedSize=function(t){if(t<0)throw new Error("invalid entry compressed size");this.csize=t},l.prototype.setCrc=function(t){if(t<0)throw new Error("invalid entry crc32");this.crc=t},l.prototype.setExternalAttributes=function(t){this.exattr=t>>>0},l.prototype.setExtra=function(t){this.extra=t},l.prototype.setGeneralPurposeBit=function(t){if(!(t instanceof i))throw new Error("invalid entry GeneralPurposeBit");this.gpb=t},l.prototype.setInternalAttributes=function(t){this.inattr=t},l.prototype.setMethod=function(t){if(t<0)throw new Error("invalid entry compression method");this.method=t},l.prototype.setName=function(t,r=!1){t=e(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,""),r&&(t=`/${t}`),Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.name=t},l.prototype.setPlatform=function(t){this.platform=t},l.prototype.setSize=function(t){if(t<0)throw new Error("invalid entry size");this.size=t},l.prototype.setTime=function(t,e){if(!(t instanceof Date))throw new Error("invalid entry time");this.time=a.dateToDos(t,e)},l.prototype.setUnixMode=function(t){var e=0;e|=(t|=this.isDirectory()?s.S_IFDIR:s.S_IFREG)<<s.SHORT_SHIFT|(this.isDirectory()?s.S_DOS_D:s.S_DOS_A),this.setExternalAttributes(e),this.mode=t&s.MODE_MASK,this.platform=s.PLATFORM_UNIX},l.prototype.setVersionNeededToExtract=function(t){this.minver=t},l.prototype.isDirectory=function(){return"/"===this.getName().slice(-1)},l.prototype.isUnixSymlink=function(){return(this.getUnixMode()&n.FILE_TYPE_FLAG)===n.LINK_FLAG},l.prototype.isZip64=function(){return this.csize>s.ZIP64_MAGIC||this.size>s.ZIP64_MAGIC},cl.exports}var bl,_l,wl={exports:{}},vl={exports:{}};function Sl(){if(bl)return vl.exports;bl=1,s.Stream;var t=Wn().PassThrough,e=J();return(vl.exports={}).normalizeInputSource=function(r){if(null===r)return Buffer.alloc(0);if("string"==typeof r)return Buffer.from(r);if(e(r)&&!r._readableState){var i=new t;return r.pipe(i),i}return r},vl.exports}function El(){if(_l)return wl.exports;_l=1;var t=o.inherits,e=J(),r=Wn().Transform,i=il(),n=Sl(),s=wl.exports=function(t){if(!(this instanceof s))return new s(t);r.call(this,t),this.offset=0,this._archive={finish:!1,finished:!1,processing:!1}};return t(s,r),s.prototype._appendBuffer=function(t,e,r){},s.prototype._appendStream=function(t,e,r){},s.prototype._emitErrorCallback=function(t){t&&this.emit("error",t)},s.prototype._finish=function(t){},s.prototype._normalizeEntry=function(t){},s.prototype._transform=function(t,e,r){r(null,t)},s.prototype.entry=function(t,r,s){if(r=r||null,"function"!=typeof s&&(s=this._emitErrorCallback.bind(this)),t instanceof i)if(this._archive.finish||this._archive.finished)s(new Error("unacceptable entry after finish"));else{if(!this._archive.processing){if(this._archive.processing=!0,this._normalizeEntry(t),this._entry=t,r=n.normalizeInputSource(r),Buffer.isBuffer(r))this._appendBuffer(t,r,s);else{if(!e(r))return this._archive.processing=!1,void s(new Error("input source must be valid Stream or Buffer instance"));this._appendStream(t,r,s)}return this}s(new Error("already processing an entry"))}else s(new Error("not a valid instance of ArchiveEntry"))},s.prototype.finish=function(){this._archive.processing?this._archive.finish=!0:this._finish()},s.prototype.getBytesWritten=function(){return this.offset},s.prototype.write=function(t,e){return t&&(this.offset+=t.length),r.prototype.write.call(this,t,e)},wl.exports}var xl,kl,Tl,Rl,Al,Ol,Ll,Ml,Pl,Il,Dl,Nl,Cl,jl={exports:{}},Fl={};function Bl(){return xl||(xl=1,t=function(t){t.version="1.2.2";var e=function(){for(var t=0,e=new Array(256),r=0;256!=r;++r)t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=r)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1,e[r]=t;return"undefined"!=typeof Int32Array?new Int32Array(e):e}(),r=function(t){var e=0,r=0,i=0,n="undefined"!=typeof Int32Array?new Int32Array(4096):new Array(4096);for(i=0;256!=i;++i)n[i]=t[i];for(i=0;256!=i;++i)for(r=t[i],e=256+i;e<4096;e+=256)r=n[e]=r>>>8^t[255&r];var s=[];for(i=1;16!=i;++i)s[i-1]="undefined"!=typeof Int32Array?n.subarray(256*i,256*i+256):n.slice(256*i,256*i+256);return s}(e),i=r[0],n=r[1],s=r[2],o=r[3],a=r[4],l=r[5],h=r[6],u=r[7],c=r[8],f=r[9],d=r[10],p=r[11],g=r[12],y=r[13],m=r[14];t.table=e,t.bstr=function(t,r){for(var i=-1^r,n=0,s=t.length;n<s;)i=i>>>8^e[255&(i^t.charCodeAt(n++))];return~i},t.buf=function(t,r){for(var b=-1^r,_=t.length-15,w=0;w<_;)b=m[t[w++]^255&b]^y[t[w++]^b>>8&255]^g[t[w++]^b>>16&255]^p[t[w++]^b>>>24]^d[t[w++]]^f[t[w++]]^c[t[w++]]^u[t[w++]]^h[t[w++]]^l[t[w++]]^a[t[w++]]^o[t[w++]]^s[t[w++]]^n[t[w++]]^i[t[w++]]^e[t[w++]];for(_+=15;w<_;)b=b>>>8^e[255&(b^t[w++])];return~b},t.str=function(t,r){for(var i=-1^r,n=0,s=t.length,o=0,a=0;n<s;)(o=t.charCodeAt(n++))<128?i=i>>>8^e[255&(i^o)]:o<2048?i=(i=i>>>8^e[255&(i^(192|o>>6&31))])>>>8^e[255&(i^(128|63&o))]:o>=55296&&o<57344?(o=64+(1023&o),a=1023&t.charCodeAt(n++),i=(i=(i=(i=i>>>8^e[255&(i^(240|o>>8&7))])>>>8^e[255&(i^(128|o>>2&63))])>>>8^e[255&(i^(128|a>>6&15|(3&o)<<4))])>>>8^e[255&(i^(128|63&a))]):i=(i=(i=i>>>8^e[255&(i^(224|o>>12&15))])>>>8^e[255&(i^(128|o>>6&63))])>>>8^e[255&(i^(128|63&o))];return~i}},"undefined"==typeof DO_NOT_EXPORT_CRC?t(Fl):t({})),Fl;var t}function zl(){if(Tl)return kl;Tl=1;const{Transform:t}=Wn(),e=Bl();return kl=class extends t{constructor(t){super(t),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(t,r,i){t&&(this.checksum=e.buf(t,this.checksum)>>>0,this.rawSize+=t.length),i(null,t)}digest(t){const e=Buffer.allocUnsafe(4);return e.writeUInt32BE(this.checksum>>>0,0),t?e.toString(t):e}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}}}function Wl(){if(Al)return Rl;Al=1;const{DeflateRaw:t}=y,e=Bl();return Rl=class extends t{constructor(t){super(t),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(t,e){return t&&(this.compressedSize+=t.length),super.push(t,e)}_transform(t,r,i){t&&(this.checksum=e.buf(t,this.checksum)>>>0,this.rawSize+=t.length),super._transform(t,r,i)}digest(t){const e=Buffer.allocUnsafe(4);return e.writeUInt32BE(this.checksum>>>0,0),t?e.toString(t):e}hex(){return this.digest("hex").toUpperCase()}size(t=!1){return t?this.compressedSize:this.rawSize}}}function Ul(){return Ll?Ol:(Ll=1,Ol={CRC32Stream:zl(),DeflateCRC32Stream:Wl()})}function Gl(){if(Ml)return jl.exports;Ml=1;var t=o.inherits,e=Bl(),{CRC32Stream:r}=Ul(),{DeflateCRC32Stream:i}=Ul(),n=El();ml(),gl();var s=yl();Sl();var a=pl(),l=jl.exports=function(t){if(!(this instanceof l))return new l(t);t=this.options=this._defaults(t),n.call(this,t),this._entry=null,this._entries=[],this._archive={centralLength:0,centralOffset:0,comment:"",finish:!1,finished:!1,processing:!1,forceZip64:t.forceZip64,forceLocalTime:t.forceLocalTime}};return t(l,n),l.prototype._afterAppend=function(t){this._entries.push(t),t.getGeneralPurposeBit().usesDataDescriptor()&&this._writeDataDescriptor(t),this._archive.processing=!1,this._entry=null,this._archive.finish&&!this._archive.finished&&this._finish()},l.prototype._appendBuffer=function(t,r,i){0===r.length&&t.setMethod(s.METHOD_STORED);var n=t.getMethod();return n===s.METHOD_STORED&&(t.setSize(r.length),t.setCompressedSize(r.length),t.setCrc(e.buf(r)>>>0)),this._writeLocalFileHeader(t),n===s.METHOD_STORED?(this.write(r),this._afterAppend(t),void i(null,t)):n===s.METHOD_DEFLATED?void this._smartStream(t,i).end(r):void i(new Error("compression method "+n+" not implemented"))},l.prototype._appendStream=function(t,e,r){t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(s.MIN_VERSION_DATA_DESCRIPTOR),this._writeLocalFileHeader(t);var i=this._smartStream(t,r);e.once("error",function(t){i.emit("error",t),i.end()}),e.pipe(i)},l.prototype._defaults=function(t){return"object"!=typeof t&&(t={}),"object"!=typeof t.zlib&&(t.zlib={}),"number"!=typeof t.zlib.level&&(t.zlib.level=s.ZLIB_BEST_SPEED),t.forceZip64=!!t.forceZip64,t.forceLocalTime=!!t.forceLocalTime,t},l.prototype._finish=function(){this._archive.centralOffset=this.offset,this._entries.forEach(function(t){this._writeCentralFileHeader(t)}.bind(this)),this._archive.centralLength=this.offset-this._archive.centralOffset,this.isZip64()&&this._writeCentralDirectoryZip64(),this._writeCentralDirectoryEnd(),this._archive.processing=!1,this._archive.finish=!0,this._archive.finished=!0,this.end()},l.prototype._normalizeEntry=function(t){-1===t.getMethod()&&t.setMethod(s.METHOD_DEFLATED),t.getMethod()===s.METHOD_DEFLATED&&(t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(s.MIN_VERSION_DATA_DESCRIPTOR)),-1===t.getTime()&&t.setTime(new Date,this._archive.forceLocalTime),t._offsets={file:0,data:0,contents:0}},l.prototype._smartStream=function(t,e){var n=t.getMethod()===s.METHOD_DEFLATED?new i(this.options.zlib):new r,o=null;return n.once("end",function(){var r=n.digest().readUInt32BE(0);t.setCrc(r),t.setSize(n.size()),t.setCompressedSize(n.size(!0)),this._afterAppend(t),e(o,t)}.bind(this)),n.once("error",function(t){o=t}),n.pipe(this,{end:!1}),n},l.prototype._writeCentralDirectoryEnd=function(){var t=this._entries.length,e=this._archive.centralLength,r=this._archive.centralOffset;this.isZip64()&&(t=s.ZIP64_MAGIC_SHORT,e=s.ZIP64_MAGIC,r=s.ZIP64_MAGIC),this.write(a.getLongBytes(s.SIG_EOCD)),this.write(s.SHORT_ZERO),this.write(s.SHORT_ZERO),this.write(a.getShortBytes(t)),this.write(a.getShortBytes(t)),this.write(a.getLongBytes(e)),this.write(a.getLongBytes(r));var i=this.getComment(),n=Buffer.byteLength(i);this.write(a.getShortBytes(n)),this.write(i)},l.prototype._writeCentralDirectoryZip64=function(){this.write(a.getLongBytes(s.SIG_ZIP64_EOCD)),this.write(a.getEightBytes(44)),this.write(a.getShortBytes(s.MIN_VERSION_ZIP64)),this.write(a.getShortBytes(s.MIN_VERSION_ZIP64)),this.write(s.LONG_ZERO),this.write(s.LONG_ZERO),this.write(a.getEightBytes(this._entries.length)),this.write(a.getEightBytes(this._entries.length)),this.write(a.getEightBytes(this._archive.centralLength)),this.write(a.getEightBytes(this._archive.centralOffset)),this.write(a.getLongBytes(s.SIG_ZIP64_EOCD_LOC)),this.write(s.LONG_ZERO),this.write(a.getEightBytes(this._archive.centralOffset+this._archive.centralLength)),this.write(a.getLongBytes(1))},l.prototype._writeCentralFileHeader=function(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),i=t._offsets.file,n=t.getSize(),o=t.getCompressedSize();if(t.isZip64()||i>s.ZIP64_MAGIC){n=s.ZIP64_MAGIC,o=s.ZIP64_MAGIC,i=s.ZIP64_MAGIC,t.setVersionNeededToExtract(s.MIN_VERSION_ZIP64);var l=Buffer.concat([a.getShortBytes(s.ZIP64_EXTRA_ID),a.getShortBytes(24),a.getEightBytes(t.getSize()),a.getEightBytes(t.getCompressedSize()),a.getEightBytes(t._offsets.file)],28);t.setExtra(l)}this.write(a.getLongBytes(s.SIG_CFH)),this.write(a.getShortBytes(t.getPlatform()<<8|s.VERSION_MADEBY)),this.write(a.getShortBytes(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(a.getShortBytes(r)),this.write(a.getLongBytes(t.getTimeDos())),this.write(a.getLongBytes(t.getCrc())),this.write(a.getLongBytes(o)),this.write(a.getLongBytes(n));var h=t.getName(),u=t.getComment(),c=t.getCentralDirectoryExtra();e.usesUTF8ForNames()&&(h=Buffer.from(h),u=Buffer.from(u)),this.write(a.getShortBytes(h.length)),this.write(a.getShortBytes(c.length)),this.write(a.getShortBytes(u.length)),this.write(s.SHORT_ZERO),this.write(a.getShortBytes(t.getInternalAttributes())),this.write(a.getLongBytes(t.getExternalAttributes())),this.write(a.getLongBytes(i)),this.write(h),this.write(c),this.write(u)},l.prototype._writeDataDescriptor=function(t){this.write(a.getLongBytes(s.SIG_DD)),this.write(a.getLongBytes(t.getCrc())),t.isZip64()?(this.write(a.getEightBytes(t.getCompressedSize())),this.write(a.getEightBytes(t.getSize()))):(this.write(a.getLongBytes(t.getCompressedSize())),this.write(a.getLongBytes(t.getSize())))},l.prototype._writeLocalFileHeader=function(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),i=t.getName(),n=t.getLocalFileDataExtra();t.isZip64()&&(e.useDataDescriptor(!0),t.setVersionNeededToExtract(s.MIN_VERSION_ZIP64)),e.usesUTF8ForNames()&&(i=Buffer.from(i)),t._offsets.file=this.offset,this.write(a.getLongBytes(s.SIG_LFH)),this.write(a.getShortBytes(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(a.getShortBytes(r)),this.write(a.getLongBytes(t.getTimeDos())),t._offsets.data=this.offset,e.usesDataDescriptor()?(this.write(s.LONG_ZERO),this.write(s.LONG_ZERO),this.write(s.LONG_ZERO)):(this.write(a.getLongBytes(t.getCrc())),this.write(a.getLongBytes(t.getCompressedSize())),this.write(a.getLongBytes(t.getSize()))),this.write(a.getShortBytes(i.length)),this.write(a.getShortBytes(n.length)),this.write(i),this.write(n),t._offsets.contents=this.offset},l.prototype.getComment=function(t){return null!==this._archive.comment?this._archive.comment:""},l.prototype.isZip64=function(){return this._archive.forceZip64||this._entries.length>s.ZIP64_MAGIC_SHORT||this._archive.centralLength>s.ZIP64_MAGIC||this._archive.centralOffset>s.ZIP64_MAGIC},l.prototype.setComment=function(t){this._archive.comment=t},jl.exports}function $l(){return Il?Pl:(Il=1,Pl={ArchiveEntry:il(),ZipArchiveEntry:ml(),ArchiveOutputStream:El(),ZipArchiveOutputStream:Gl()})}
16
+ /**
17
+ * ZipStream
18
+ *
19
+ * @ignore
20
+ * @license [MIT]{@link https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE}
21
+ * @copyright (c) 2014 Chris Talkington, contributors.
22
+ */function Hl(){if(Cl)return Nl;Cl=1;var t=function(){if(Dl)return el.exports;Dl=1;var t=o.inherits,e=$l().ZipArchiveOutputStream,r=$l().ZipArchiveEntry,i=Za(),n=el.exports=function(t){if(!(this instanceof n))return new n(t);(t=this.options=t||{}).zlib=t.zlib||{},e.call(this,t),"number"==typeof t.level&&t.level>=0&&(t.zlib.level=t.level,delete t.level),t.forceZip64||"number"!=typeof t.zlib.level||0!==t.zlib.level||(t.store=!0),t.namePrependSlash=t.namePrependSlash||!1,t.comment&&t.comment.length>0&&this.setComment(t.comment)};return t(n,e),n.prototype._normalizeFileData=function(t){var e="directory"===(t=i.defaults(t,{type:"file",name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:""})).type,r="symlink"===t.type;return t.name&&(t.name=i.sanitizePath(t.name),r||"/"!==t.name.slice(-1)?e&&(t.name+="/"):(e=!0,t.type="directory")),(e||r)&&(t.store=!0),t.date=i.dateify(t.date),t},n.prototype.entry=function(t,i,n){if("function"!=typeof n&&(n=this._emitErrorCallback.bind(this)),"file"===(i=this._normalizeFileData(i)).type||"directory"===i.type||"symlink"===i.type)if("string"==typeof i.name&&0!==i.name.length){if("symlink"!==i.type||"string"==typeof i.linkname){var s=new r(i.name);return s.setTime(i.date,this.options.forceLocalTime),i.namePrependSlash&&s.setName(i.name,!0),i.store&&s.setMethod(0),i.comment.length>0&&s.setComment(i.comment),"symlink"===i.type&&"number"!=typeof i.mode&&(i.mode=40960),"number"==typeof i.mode&&("symlink"===i.type&&(i.mode|=40960),s.setUnixMode(i.mode)),"symlink"===i.type&&"string"==typeof i.linkname&&(t=Buffer.from(i.linkname)),e.prototype.entry.call(this,s,t,n)}n(new Error("entry linkname must be a non-empty string value when type equals symlink"))}else n(new Error("entry name must be a non-empty string value"));else n(new Error(i.type+" entries not currently supported"))},n.prototype.finalize=function(){this.finish()},el.exports}
23
+ /**
24
+ * ZIP Format Plugin
25
+ *
26
+ * @module plugins/zip
27
+ * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
28
+ * @copyright (c) 2012-2014 Chris Talkington, contributors.
29
+ */(),e=Za(),r=function(i){if(!(this instanceof r))return new r(i);i=this.options=e.defaults(i,{comment:"",forceUTC:!1,namePrependSlash:!1,store:!1}),this.supports={directory:!0,symlink:!0},this.engine=new t(i)};return r.prototype.append=function(t,e,r){this.engine.entry(t,e,r)},r.prototype.finalize=function(){this.engine.finalize()},r.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)},r.prototype.pipe=function(){return this.engine.pipe.apply(this.engine,arguments)},r.prototype.unpipe=function(){return this.engine.unpipe.apply(this.engine,arguments)},Nl=r}var ql,Vl,Zl,Yl,Kl,Ql,Xl,Jl,th,eh,rh,ih,nh,sh,oh={};function ah(){if(Yl)return Zl;Yl=1;const t=Vl?ql:(Vl=1,ql=class{constructor(t){if(!(t>0)||t-1&t)throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(t),this.mask=t-1,this.top=0,this.btm=0,this.next=null}clear(){this.top=this.btm=0,this.next=null,this.buffer.fill(void 0)}push(t){return void 0===this.buffer[this.top]&&(this.buffer[this.top]=t,this.top=this.top+1&this.mask,!0)}shift(){const t=this.buffer[this.btm];if(void 0!==t)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,t}peek(){return this.buffer[this.btm]}isEmpty(){return void 0===this.buffer[this.btm]}});return Zl=class{constructor(e){this.hwm=e||16,this.head=new t(this.hwm),this.tail=this.head,this.length=0}clear(){this.head=this.tail,this.head.clear(),this.length=0}push(e){if(this.length++,!this.head.push(e)){const r=this.head;this.head=r.next=new t(2*this.head.buffer.length),this.head.push(e)}}shift(){0!==this.length&&this.length--;const t=this.tail.shift();if(void 0===t&&this.tail.next){const t=this.tail.next;return this.tail.next=null,this.tail=t,this.tail.shift()}return t}peek(){const t=this.tail.peek();return void 0===t&&this.tail.next?this.tail.next.peek():t}isEmpty(){return 0===this.length}}}function lh(){if(Ql)return Kl;function t(t){return Buffer.isBuffer(t)?t:Buffer.from(t.buffer,t.byteOffset,t.byteLength)}return Ql=1,Kl={isBuffer:function(t){return Buffer.isBuffer(t)||t instanceof Uint8Array},isEncoding:function(t){return Buffer.isEncoding(t)},alloc:function(t,e,r){return Buffer.alloc(t,e,r)},allocUnsafe:function(t){return Buffer.allocUnsafe(t)},allocUnsafeSlow:function(t){return Buffer.allocUnsafeSlow(t)},byteLength:function(t,e){return Buffer.byteLength(t,e)},compare:function(t,e){return Buffer.compare(t,e)},concat:function(t,e){return Buffer.concat(t,e)},copy:function(e,r,i,n,s){return t(e).copy(r,i,n,s)},equals:function(e,r){return t(e).equals(r)},fill:function(e,r,i,n,s){return t(e).fill(r,i,n,s)},from:function(t,e,r){return Buffer.from(t,e,r)},includes:function(e,r,i,n){return t(e).includes(r,i,n)},indexOf:function(e,r,i,n){return t(e).indexOf(r,i,n)},lastIndexOf:function(e,r,i,n){return t(e).lastIndexOf(r,i,n)},swap16:function(e){return t(e).swap16()},swap32:function(e){return t(e).swap32()},swap64:function(e){return t(e).swap64()},toBuffer:t,toString:function(e,r,i,n){return t(e).toString(r,i,n)},write:function(e,r,i,n,s){return t(e).write(r,i,n,s)},writeDoubleLE:function(e,r,i){return t(e).writeDoubleLE(r,i)},writeFloatLE:function(e,r,i){return t(e).writeFloatLE(r,i)},writeUInt32LE:function(e,r,i){return t(e).writeUInt32LE(r,i)},writeInt32LE:function(e,r,i){return t(e).writeInt32LE(r,i)},readDoubleLE:function(e,r){return t(e).readDoubleLE(r)},readFloatLE:function(e,r){return t(e).readFloatLE(r)},readUInt32LE:function(e,r){return t(e).readUInt32LE(r)},readInt32LE:function(e,r){return t(e).readInt32LE(r)},writeDoubleBE:function(e,r,i){return t(e).writeDoubleBE(r,i)},writeFloatBE:function(e,r,i){return t(e).writeFloatBE(r,i)},writeUInt32BE:function(e,r,i){return t(e).writeUInt32BE(r,i)},writeInt32BE:function(e,r,i){return t(e).writeInt32BE(r,i)},readDoubleBE:function(e,r){return t(e).readDoubleBE(r)},readFloatBE:function(e,r){return t(e).readFloatBE(r)},readUInt32BE:function(e,r){return t(e).readUInt32BE(r)},readInt32BE:function(e,r){return t(e).readInt32BE(r)}},Kl}function hh(){if(ih)return rh;ih=1;const t=function(){if(Jl)return Xl;Jl=1;const t=lh();return Xl=class{constructor(t){this.encoding=t}get remaining(){return 0}decode(e){return t.toString(e,this.encoding)}flush(){return""}}}(),e=function(){if(eh)return th;eh=1;const t=lh();return th=class{constructor(){this.codePoint=0,this.bytesSeen=0,this.bytesNeeded=0,this.lowerBoundary=128,this.upperBoundary=191}get remaining(){return this.bytesSeen}decode(e){if(0===this.bytesNeeded){let r=!0;for(let t=Math.max(0,e.byteLength-4),i=e.byteLength;t<i&&r;t++)r=e[t]<=127;if(r)return t.toString(e,"utf8")}let r="";for(let t=0,i=e.byteLength;t<i;t++){const i=e[t];0!==this.bytesNeeded?i<this.lowerBoundary||i>this.upperBoundary?(this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0,this.lowerBoundary=128,this.upperBoundary=191,r+="�"):(this.lowerBoundary=128,this.upperBoundary=191,this.codePoint=this.codePoint<<6|63&i,this.bytesSeen++,this.bytesSeen===this.bytesNeeded&&(r+=String.fromCodePoint(this.codePoint),this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0)):i<=127?r+=String.fromCharCode(i):(this.bytesSeen=1,i>=194&&i<=223?(this.bytesNeeded=2,this.codePoint=31&i):i>=224&&i<=239?(224===i?this.lowerBoundary=160:237===i&&(this.upperBoundary=159),this.bytesNeeded=3,this.codePoint=15&i):i>=240&&i<=244?(240===i&&(this.lowerBoundary=144),244===i&&(this.upperBoundary=143),this.bytesNeeded=4,this.codePoint=7&i):r+="�")}return r}flush(){const t=this.bytesNeeded>0?"�":"";return this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0,this.lowerBoundary=128,this.upperBoundary=191,t}}}();return rh=class{constructor(r="utf8"){switch(this.encoding=function(t){switch(t=t.toLowerCase()){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 t;default:throw new Error("Unknown encoding: "+t)}}(r),this.encoding){case"utf8":this.decoder=new e;break;case"utf16le":case"base64":throw new Error("Unsupported encoding: "+this.encoding);default:this.decoder=new t(this.encoding)}}get remaining(){return this.decoder.remaining}push(t){return"string"==typeof t?t:this.decoder.decode(t)}write(t){return this.push(t)}end(t){let e="";return t&&(e=this.push(t)),e+=this.decoder.flush(),e}}}function uh(){if(sh)return nh;sh=1;const{EventEmitter:t}=P(),e=new Error("Stream was destroyed"),r=new Error("Premature close"),i=ah(),n=hh(),s="undefined"==typeof queueMicrotask?t=>m.process.nextTick(t):queueMicrotask,o=536870911,a=1^o,l=2^o,h=32,u=64,c=128,f=256,d=1024,p=2048,g=4096,y=8192,b=16384,_=32768,w=131072,v=131328,S=16^o,E=536805375,x=768^o,k=536838143,T=536739839,R=1<<18,A=2<<18,O=4<<18,L=8<<18,M=16<<18,I=32<<18,D=64<<18,N=128<<18,C=256<<18,j=512<<18,F=1024<<18,B=535822335,z=503316479,W=268435455,U=262160,G=536608751,$=8404992,H=14,q=15,V=8405006,Z=33587200,Y=33587215,K=2359296,Q=270794767,X=Symbol.asyncIterator||Symbol("asyncIterator");class J{constructor(t,{highWaterMark:e=16384,map:r=null,mapWritable:n,byteLength:s,byteLengthWritable:o}={}){this.stream=t,this.queue=new i,this.highWaterMark=e,this.buffered=0,this.error=null,this.pipeline=null,this.drains=null,this.byteLength=o||s||Et,this.map=n||r,this.afterWrite=ot.bind(this),this.afterUpdateNextTick=ht.bind(this)}get ended(){return 0!==(this.stream._duplexState&I)}push(t){return!(142606350&this.stream._duplexState)&&(null!==this.map&&(t=this.map(t)),this.buffered+=this.byteLength(t),this.queue.push(t),this.buffered<this.highWaterMark?(this.stream._duplexState|=L,!0):(this.stream._duplexState|=6291456,!1))}shift(){const t=this.queue.shift();return this.buffered-=this.byteLength(t),0===this.buffered&&(this.stream._duplexState&=534773759),t}end(t){"function"==typeof t?this.stream.once("finish",t):null!=t&&this.push(t),this.stream._duplexState=(this.stream._duplexState|j)&B}autoBatch(t,e){const r=[],i=this.stream;for(r.push(t);(i._duplexState&Q)===K;)r.push(i._writableState.shift());if(0!==(i._duplexState&q))return e(null);i._writev(r,e)}update(){const t=this.stream;t._duplexState|=A;do{for(;(t._duplexState&Q)===L;){const e=this.shift();t._duplexState|=67371008,t._write(e,this.afterWrite)}1310720&t._duplexState||this.updateNonPrimary()}while(!0===this.continueUpdate());t._duplexState&=536346623}updateNonPrimary(){const t=this.stream;if((144965647&t._duplexState)===j)return t._duplexState=t._duplexState|R,void t._final(nt.bind(this));4!==(t._duplexState&H)?1===(t._duplexState&Y)&&(t._duplexState=(t._duplexState|U)&a,t._open(ut.bind(this))):0===(t._duplexState&Z)&&(t._duplexState|=U,t._destroy(st.bind(this)))}continueUpdate(){return 0!==(this.stream._duplexState&N)&&(this.stream._duplexState&=z,!0)}updateCallback(){(35127311&this.stream._duplexState)===O?this.update():this.updateNextTick()}updateNextTick(){0===(this.stream._duplexState&N)&&(this.stream._duplexState|=N,0===(this.stream._duplexState&A)&&s(this.afterUpdateNextTick))}}class tt{constructor(t,{highWaterMark:e=16384,map:r=null,mapReadable:n,byteLength:s,byteLengthReadable:o}={}){this.stream=t,this.queue=new i,this.highWaterMark=0===e?1:e,this.buffered=0,this.readAhead=e>0,this.error=null,this.pipeline=null,this.byteLength=o||s||Et,this.map=n||r,this.pipeTo=null,this.afterRead=at.bind(this),this.afterUpdateNextTick=lt.bind(this)}get ended(){return 0!==(this.stream._duplexState&b)}pipe(t,e){if(null!==this.pipeTo)throw new Error("Can only pipe to one destination");if("function"!=typeof e&&(e=null),this.stream._duplexState|=512,this.pipeTo=t,this.pipeline=new rt(this.stream,t,e),e&&this.stream.on("error",xt),St(t))t._writableState.pipeline=this.pipeline,e&&t.on("error",xt),t.on("finish",this.pipeline.finished.bind(this.pipeline));else{const e=this.pipeline.done.bind(this.pipeline,t),r=this.pipeline.done.bind(this.pipeline,t,null);t.on("error",e),t.on("close",r),t.on("finish",this.pipeline.finished.bind(this.pipeline))}t.on("drain",it.bind(this)),this.stream.emit("piping",t),t.emit("pipe",this.stream)}push(t){const e=this.stream;return null===t?(this.highWaterMark=0,e._duplexState=536805311&e._duplexState|1024,!1):null!==this.map&&null===(t=this.map(t))?(e._duplexState&=E,this.buffered<this.highWaterMark):(this.buffered+=this.byteLength(t),this.queue.push(t),e._duplexState=(e._duplexState|c)&E,this.buffered<this.highWaterMark)}shift(){const t=this.queue.shift();return this.buffered-=this.byteLength(t),0===this.buffered&&(this.stream._duplexState&=536862591),t}unshift(t){const e=[null!==this.map?this.map(t):t];for(;this.buffered>0;)e.push(this.shift());for(let t=0;t<e.length-1;t++){const r=e[t];this.buffered+=this.byteLength(r),this.queue.push(r)}this.push(e[e.length-1])}read(){const t=this.stream;if((16527&t._duplexState)===c){const e=this.shift();return null!==this.pipeTo&&!1===this.pipeTo.write(e)&&(t._duplexState&=x),0!==(t._duplexState&p)&&t.emit("data",e),e}return!1===this.readAhead&&(t._duplexState|=w,this.updateNextTick()),null}drain(){const t=this.stream;for(;(16527&t._duplexState)===c&&768&t._duplexState;){const e=this.shift();null!==this.pipeTo&&!1===this.pipeTo.write(e)&&(t._duplexState&=x),0!==(t._duplexState&p)&&t.emit("data",e)}}update(){const t=this.stream;t._duplexState|=h;do{for(this.drain();this.buffered<this.highWaterMark&&(214047&t._duplexState)===w;)t._duplexState|=65552,t._read(this.afterRead),this.drain();4224==(12431&t._duplexState)&&(t._duplexState|=y,t.emit("readable")),80&t._duplexState||this.updateNonPrimary()}while(!0===this.continueUpdate());t._duplexState&=536870879}updateNonPrimary(){const t=this.stream;(1167&t._duplexState)===d&&(t._duplexState=536869887&t._duplexState|16384,t.emit("end"),(t._duplexState&V)===$&&(t._duplexState|=4),null!==this.pipeTo&&this.pipeTo.end()),4!==(t._duplexState&H)?1===(t._duplexState&Y)&&(t._duplexState=(t._duplexState|U)&a,t._open(ut.bind(this))):0===(t._duplexState&Z)&&(t._duplexState|=U,t._destroy(st.bind(this)))}continueUpdate(){return 0!==(this.stream._duplexState&_)&&(this.stream._duplexState&=k,!0)}updateCallback(){(32879&this.stream._duplexState)===u?this.update():this.updateNextTick()}updateNextTickIfOpen(){32769&this.stream._duplexState||(this.stream._duplexState|=_,0===(this.stream._duplexState&h)&&s(this.afterUpdateNextTick))}updateNextTick(){0===(this.stream._duplexState&_)&&(this.stream._duplexState|=_,0===(this.stream._duplexState&h)&&s(this.afterUpdateNextTick))}}class et{constructor(t){this.data=null,this.afterTransform=ct.bind(t),this.afterFinal=null}}class rt{constructor(t,e,r){this.from=t,this.to=e,this.afterPipe=r,this.error=null,this.pipeToFinished=!1}finished(){this.pipeToFinished=!0}done(t,e){e&&(this.error=e),t!==this.to||(this.to=null,null===this.from)?t!==this.from||(this.from=null,null===this.to)?(null!==this.afterPipe&&this.afterPipe(this.error),this.to=this.from=this.afterPipe=null):0===(t._duplexState&b)&&this.to.destroy(this.error||new Error("Readable stream closed before ending")):0!==(this.from._duplexState&b)&&this.pipeToFinished||this.from.destroy(this.error||new Error("Writable stream closed prematurely"))}}function it(){this.stream._duplexState|=512,this.updateCallback()}function nt(t){const e=this.stream;t&&e.destroy(t),0===(e._duplexState&H)&&(e._duplexState|=I,e.emit("finish")),(e._duplexState&V)===$&&(e._duplexState|=4),e._duplexState&=402391039,0===(e._duplexState&A)?this.update():this.updateNextTick()}function st(t){const r=this.stream;t||this.error===e||(t=this.error),t&&r.emit("error",t),r._duplexState|=8,r.emit("close");const i=r._readableState,n=r._writableState;if(null!==i&&null!==i.pipeline&&i.pipeline.done(r,t),null!==n){for(;null!==n.drains&&n.drains.length>0;)n.drains.shift().resolve(!1);null!==n.pipeline&&n.pipeline.done(r,t)}}function ot(t){const e=this.stream;t&&e.destroy(t),e._duplexState&=469499903,null!==this.drains&&function(t){for(let e=0;e<t.length;e++)0===--t[e].writes&&(t.shift().resolve(!0),e--)}(this.drains),(6553615&e._duplexState)===M&&(e._duplexState&=532676607,(e._duplexState&D)===D&&e.emit("drain")),this.updateCallback()}function at(t){t&&this.stream.destroy(t),this.stream._duplexState&=S,!1===this.readAhead&&0===(this.stream._duplexState&f)&&(this.stream._duplexState&=T),this.updateCallback()}function lt(){0===(this.stream._duplexState&h)&&(this.stream._duplexState&=k,this.update())}function ht(){0===(this.stream._duplexState&A)&&(this.stream._duplexState&=z,this.update())}function ut(t){const e=this.stream;t&&e.destroy(t),4&e._duplexState||(17423&e._duplexState||(e._duplexState|=u),142606351&e._duplexState||(e._duplexState|=O),e.emit("open")),e._duplexState&=G,null!==e._writableState&&e._writableState.updateCallback(),null!==e._readableState&&e._readableState.updateCallback()}function ct(t,e){null!=e&&this.push(e),this._writableState.afterWrite(t)}function ft(t){null!==this._readableState&&("data"===t&&(this._duplexState|=133376,this._readableState.updateNextTick()),"readable"===t&&(this._duplexState|=g,this._readableState.updateNextTick())),null!==this._writableState&&"drain"===t&&(this._duplexState|=D,this._writableState.updateNextTick())}class dt extends t{constructor(t){super(),this._duplexState=0,this._readableState=null,this._writableState=null,t&&(t.open&&(this._open=t.open),t.destroy&&(this._destroy=t.destroy),t.predestroy&&(this._predestroy=t.predestroy),t.signal&&t.signal.addEventListener("abort",kt.bind(this))),this.on("newListener",ft)}_open(t){t(null)}_destroy(t){t(null)}_predestroy(){}get readable(){return null!==this._readableState||void 0}get writable(){return null!==this._writableState||void 0}get destroyed(){return!!(8&this._duplexState)}get destroying(){return 0!==(this._duplexState&H)}destroy(t){0===(this._duplexState&H)&&(t||(t=e),this._duplexState=535822271&this._duplexState|4,null!==this._readableState&&(this._readableState.highWaterMark=0,this._readableState.error=t),null!==this._writableState&&(this._writableState.highWaterMark=0,this._writableState.error=t),this._duplexState|=2,this._predestroy(),this._duplexState&=l,null!==this._readableState&&this._readableState.updateNextTick(),null!==this._writableState&&this._writableState.updateNextTick())}}class pt extends dt{constructor(t){super(t),this._duplexState|=8519681,this._readableState=new tt(this,t),t&&(!1===this._readableState.readAhead&&(this._duplexState&=T),t.read&&(this._read=t.read),t.eagerOpen&&this._readableState.updateNextTick(),t.encoding&&this.setEncoding(t.encoding))}setEncoding(t){const e=new n(t),r=this._readableState.map||wt;return this._readableState.map=function(t){const i=e.push(t);return""===i&&(0!==t.byteLength||e.remaining>0)?null:r(i)},this}_read(t){t(null)}pipe(t,e){return this._readableState.updateNextTick(),this._readableState.pipe(t,e),t}read(){return this._readableState.updateNextTick(),this._readableState.read()}push(t){return this._readableState.updateNextTickIfOpen(),this._readableState.push(t)}unshift(t){return this._readableState.updateNextTickIfOpen(),this._readableState.unshift(t)}resume(){return this._duplexState|=v,this._readableState.updateNextTick(),this}pause(){return this._duplexState&=!1===this._readableState.readAhead?536739583:536870655,this}static _fromAsyncIterator(t,e){let r;const i=new pt({...e,read(e){t.next().then(n).then(e.bind(null,null)).catch(e)},predestroy(){r=t.return()},destroy(t){if(!r)return t(null);r.then(t.bind(null,null)).catch(t)}});return i;function n(t){t.done?i.push(null):i.push(t.value)}}static from(t,e){if(function(t){return St(t)&&t.readable}(t))return t;if(t[X])return this._fromAsyncIterator(t[X](),e);Array.isArray(t)||(t=void 0===t?[]:[t]);let r=0;return new pt({...e,read(e){this.push(r===t.length?null:t[r++]),e(null)}})}static isBackpressured(t){return!!(17422&t._duplexState)||t._readableState.buffered>=t._readableState.highWaterMark}static isPaused(t){return 0===(t._duplexState&f)}[X](){const t=this;let r=null,i=null,n=null;return this.on("error",t=>{r=t}),this.on("readable",function(){null!==i&&s(t.read())}),this.on("close",function(){null!==i&&s(null)}),{[X](){return this},next:()=>new Promise(function(e,r){i=e,n=r;const o=t.read();null!==o?s(o):8&t._duplexState&&s(null)}),return:()=>o(null),throw:t=>o(t)};function s(s){null!==n&&(r?n(r):null===s&&0===(t._duplexState&b)?n(e):i({value:s,done:null===s}),n=i=null)}function o(e){return t.destroy(e),new Promise((r,i)=>{if(8&t._duplexState)return r({value:void 0,done:!0});t.once("close",function(){e?i(e):r({value:void 0,done:!0})})})}}}class gt extends dt{constructor(t){super(t),this._duplexState|=16385,this._writableState=new J(this,t),t&&(t.writev&&(this._writev=t.writev),t.write&&(this._write=t.write),t.final&&(this._final=t.final),t.eagerOpen&&this._writableState.updateNextTick())}cork(){this._duplexState|=F}uncork(){this._duplexState&=W,this._writableState.updateNextTick()}_writev(t,e){e(null)}_write(t,e){this._writableState.autoBatch(t,e)}_final(t){t(null)}static isBackpressured(t){return!!(146800654&t._duplexState)}static drained(t){if(t.destroyed)return Promise.resolve(!1);const e=t._writableState;var r;const i=((r=t)._writev!==gt.prototype._writev&&r._writev!==yt.prototype._writev?Math.min(1,e.queue.length):e.queue.length)+(t._duplexState&C?1:0);return 0===i?Promise.resolve(!0):(null===e.drains&&(e.drains=[]),new Promise(t=>{e.drains.push({writes:i,resolve:t})}))}write(t){return this._writableState.updateNextTick(),this._writableState.push(t)}end(t){return this._writableState.updateNextTick(),this._writableState.end(t),this}}class yt extends pt{constructor(t){super(t),this._duplexState=1|this._duplexState&w,this._writableState=new J(this,t),t&&(t.writev&&(this._writev=t.writev),t.write&&(this._write=t.write),t.final&&(this._final=t.final))}cork(){this._duplexState|=F}uncork(){this._duplexState&=W,this._writableState.updateNextTick()}_writev(t,e){e(null)}_write(t,e){this._writableState.autoBatch(t,e)}_final(t){t(null)}write(t){return this._writableState.updateNextTick(),this._writableState.push(t)}end(t){return this._writableState.updateNextTick(),this._writableState.end(t),this}}class mt extends yt{constructor(t){super(t),this._transformState=new et(this),t&&(t.transform&&(this._transform=t.transform),t.flush&&(this._flush=t.flush))}_write(t,e){this._readableState.buffered>=this._readableState.highWaterMark?this._transformState.data=t:this._transform(t,this._transformState.afterTransform)}_read(t){if(null!==this._transformState.data){const e=this._transformState.data;this._transformState.data=null,t(null),this._transform(e,this._transformState.afterTransform)}else t(null)}destroy(t){super.destroy(t),null!==this._transformState.data&&(this._transformState.data=null,this._transformState.afterTransform())}_transform(t,e){e(null,t)}_flush(t){t(null)}_final(t){this._transformState.afterFinal=t,this._flush(bt.bind(this))}}function bt(t,e){const r=this._transformState.afterFinal;if(t)return r(t);null!=e&&this.push(e),this.push(null),r(null)}function _t(t,...e){const i=Array.isArray(t)?[...t,...e]:[t,...e],n=i.length&&"function"==typeof i[i.length-1]?i.pop():null;if(i.length<2)throw new Error("Pipeline requires at least 2 streams");let s=i[0],o=null,a=null;for(let t=1;t<i.length;t++)o=i[t],St(s)?s.pipe(o,h):(l(s,!0,t>1,h),s.pipe(o)),s=o;if(n){let t=!1;const e=St(o)||!(!o._writableState||!o._writableState.autoDestroy);o.on("error",t=>{null===a&&(a=t)}),o.on("finish",()=>{t=!0,e||n(a)}),e&&o.on("close",()=>n(a||(t?null:r)))}return o;function l(t,e,i,n){t.on("error",n),t.on("close",function(){if(t._readableState&&!t._readableState.ended)return n(r);if(i&&t._writableState&&!t._writableState.ended)return n(r)})}function h(t){if(t&&!a){a=t;for(const e of i)e.destroy(t)}}}function wt(t){return t}function vt(t){return!!t._readableState||!!t._writableState}function St(t){return"number"==typeof t._duplexState&&vt(t)}function Et(t){return function(t){return"object"==typeof t&&null!==t&&"number"==typeof t.byteLength}(t)?t.byteLength:1024}function xt(){}function kt(){this.destroy(new Error("Stream aborted."))}return nh={pipeline:_t,pipelinePromise:function(...t){return new Promise((e,r)=>_t(...t,t=>{if(t)return r(t);e()}))},isStream:vt,isStreamx:St,isEnded:function(t){return!!t._readableState&&t._readableState.ended},isFinished:function(t){return!!t._writableState&&t._writableState.ended},isDisturbed:function(t){return!!(1&~t._duplexState)||0!==(t._duplexState&Z)},getStreamError:function(t,r={}){const i=t._readableState&&t._readableState.error||t._writableState&&t._writableState.error;return r.all||i!==e?i:null},Stream:dt,Writable:gt,Readable:pt,Duplex:yt,Transform:mt,PassThrough:class extends mt{}},nh}var ch,fh,dh,ph={};function gh(){if(ch)return ph;ch=1;const t=lh(),e="0".charCodeAt(0),r=t.from([117,115,116,97,114,0]),i=t.from([e,e]),n=t.from([117,115,116,97,114,32]),s=t.from([32,0]),o=257,a=263;function l(t,e,r,i){for(;r<i;r++)if(t[r]===e)return r;return i}function h(t){let e=256;for(let r=0;r<148;r++)e+=t[r];for(let r=156;r<512;r++)e+=t[r];return e}function u(t,e){return(t=t.toString(8)).length>e?"7777777777777777777".slice(0,e)+" ":"0000000000000000000".slice(0,e-t.length)+t+" "}function c(e,r,i){if(128&(e=e.subarray(r,r+i))[r=0])return function(t){let e;if(128===t[0])e=!0;else{if(255!==t[0])return null;e=!1}const r=[];let i;for(i=t.length-1;i>0;i--){const n=t[i];e?r.push(n):r.push(255-n)}let n=0;const s=r.length;for(i=0;i<s;i++)n+=r[i]*Math.pow(256,i);return e?n:-1*n}(e);{for(;r<e.length&&32===e[r];)r++;const i=(n=l(e,32,r,e.length),s=e.length,o=e.length,"number"!=typeof n?o:(n=~~n)>=s?s:n>=0||(n+=s)>=0?n:0);for(;r<i&&0===e[r];)r++;return i===r?0:parseInt(t.toString(e.subarray(r,i)),8)}var n,s,o}function f(e,r,i,n){return t.toString(e.subarray(r,l(e,0,r,r+i)),n)}function d(e){const r=t.byteLength(e);let i=Math.floor(Math.log(r)/Math.log(10))+1;return r+i>=Math.pow(10,i)&&i++,r+i+e}return ph.decodeLongPath=function(t,e){return f(t,0,t.length,e)},ph.encodePax=function(e){let r="";e.name&&(r+=d(" path="+e.name+"\n")),e.linkname&&(r+=d(" linkpath="+e.linkname+"\n"));const i=e.pax;if(i)for(const t in i)r+=d(" "+t+"="+i[t]+"\n");return t.from(r)},ph.decodePax=function(e){const r={};for(;e.length;){let i=0;for(;i<e.length&&32!==e[i];)i++;const n=parseInt(t.toString(e.subarray(0,i)),10);if(!n)return r;const s=t.toString(e.subarray(i+1,n-1)),o=s.indexOf("=");if(-1===o)return r;r[s.slice(0,o)]=s.slice(o+1),e=e.subarray(n)}return r},ph.encode=function(n){const s=t.alloc(512);let a=n.name,l="";if(5===n.typeflag&&"/"!==a[a.length-1]&&(a+="/"),t.byteLength(a)!==a.length)return null;for(;t.byteLength(a)>100;){const t=a.indexOf("/");if(-1===t)return null;l+=l?"/"+a.slice(0,t):a.slice(0,t),a=a.slice(t+1)}return t.byteLength(a)>100||t.byteLength(l)>155||n.linkname&&t.byteLength(n.linkname)>100?null:(t.write(s,a),t.write(s,u(4095&n.mode,6),100),t.write(s,u(n.uid,6),108),t.write(s,u(n.gid,6),116),function(e,r,i){e.toString(8).length>11?function(t,e,r){e[r]=128;for(let i=11;i>0;i--)e[r+i]=255&t,t=Math.floor(t/256)}(e,r,i):t.write(r,u(e,11),i)}(n.size,s,124),t.write(s,u(n.mtime.getTime()/1e3|0,11),136),s[156]=e+function(t){switch(t){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}(n.type),n.linkname&&t.write(s,n.linkname,157),t.copy(r,s,o),t.copy(i,s,263),n.uname&&t.write(s,n.uname,265),n.gname&&t.write(s,n.gname,297),t.write(s,u(n.devmajor||0,6),329),t.write(s,u(n.devminor||0,6),337),l&&t.write(s,l,345),t.write(s,u(h(s),6),148),s)},ph.decode=function(i,l,u){let d=0===i[156]?0:i[156]-e,p=f(i,0,100,l);const g=c(i,100,8),y=c(i,108,8),m=c(i,116,8),b=c(i,124,12),_=c(i,136,12),w=function(t){switch(t){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}(d),v=0===i[157]?null:f(i,157,100,l),S=f(i,265,32),E=f(i,297,32),x=c(i,329,8),k=c(i,337,8),T=h(i);if(256===T)return null;if(T!==c(i,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(function(e){return t.equals(r,e.subarray(o,263))}(i))i[345]&&(p=f(i,345,155,l)+"/"+p);else if(function(e){return t.equals(n,e.subarray(o,263))&&t.equals(s,e.subarray(a,265))}(i));else if(!u)throw new Error("Invalid tar header: unknown format.");return 0===d&&p&&"/"===p[p.length-1]&&(d=5),{name:p,mode:g,uid:y,gid:m,size:b,mtime:new Date(1e3*_),type:w,linkname:v,uname:S,gname:E,devmajor:x,devminor:k,pax:null}},ph}var yh,mh,bh,_h,wh,vh,Sh,Eh,xh,kh,Th,Rh,Ah={exports:{}};function Oh(){if(yh)return Ah.exports;yh=1;const t={S_IFMT:61440,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960};try{Ah.exports=require("fs").constants||t}catch{Ah.exports=t}return Ah.exports}function Lh(){if(bh)return mh;bh=1;const{Readable:t,Writable:e,getStreamError:r}=uh(),i=lh(),n=Oh(),s=gh(),o=i.alloc(1024);class a extends e{constructor(t,e,r){super({mapWritable:c,eagerOpen:!0}),this.written=0,this.header=e,this._callback=r,this._linkname=null,this._isLinkname="symlink"===e.type&&!e.linkname,this._isVoid="file"!==e.type&&"contiguous-file"!==e.type,this._finished=!1,this._pack=t,this._openCallback=null,null===this._pack._stream?this._pack._stream=this:this._pack._pending.push(this)}_open(t){this._openCallback=t,this._pack._stream===this&&this._continueOpen()}_continuePack(t){if(null===this._callback)return;const e=this._callback;this._callback=null,e(t)}_continueOpen(){null===this._pack._stream&&(this._pack._stream=this);const t=this._openCallback;if(this._openCallback=null,null!==t){if(this._pack.destroying)return t(new Error("pack stream destroyed"));if(this._pack._finalized)return t(new Error("pack stream is already finalized"));this._pack._stream=this,this._isLinkname||this._pack._encode(this.header),this._isVoid&&(this._finish(),this._continuePack(null)),t(null)}}_write(t,e){return this._isLinkname?(this._linkname=this._linkname?i.concat([this._linkname,t]):t,e(null)):this._isVoid?t.byteLength>0?e(new Error("No body allowed for this entry")):e():(this.written+=t.byteLength,this._pack.push(t)?e():void(this._pack._drain=e))}_finish(){this._finished||(this._finished=!0,this._isLinkname&&(this.header.linkname=this._linkname?i.toString(this._linkname,"utf-8"):"",this._pack._encode(this.header)),u(this._pack,this.header.size),this._pack._done(this))}_final(t){if(this.written!==this.header.size)return t(new Error("Size mismatch"));this._finish(),t(null)}_getError(){return r(this)||new Error("tar entry destroyed")}_predestroy(){this._pack.destroy(this._getError())}_destroy(t){this._pack._done(this),this._continuePack(this._finished?null:this._getError()),t()}}class l extends t{constructor(t){super(t),this._drain=h,this._finalized=!1,this._finalizing=!1,this._pending=[],this._stream=null}entry(t,e,r){if(this._finalized||this.destroying)throw new Error("already finalized or destroyed");"function"==typeof e&&(r=e,e=null),r||(r=h),t.size&&"symlink"!==t.type||(t.size=0),t.type||(t.type=function(t){switch(t&n.S_IFMT){case n.S_IFBLK:return"block-device";case n.S_IFCHR:return"character-device";case n.S_IFDIR:return"directory";case n.S_IFIFO:return"fifo";case n.S_IFLNK:return"symlink"}return"file"}(t.mode)),t.mode||(t.mode="directory"===t.type?493:420),t.uid||(t.uid=0),t.gid||(t.gid=0),t.mtime||(t.mtime=new Date),"string"==typeof e&&(e=i.from(e));const s=new a(this,t,r);return i.isBuffer(e)?(t.size=e.byteLength,s.write(e),s.end(),s):(s._isVoid,s)}finalize(){this._stream||this._pending.length>0?this._finalizing=!0:this._finalized||(this._finalized=!0,this.push(o),this.push(null))}_done(t){t===this._stream&&(this._stream=null,this._finalizing&&this.finalize(),this._pending.length&&this._pending.shift()._continueOpen())}_encode(t){if(!t.pax){const e=s.encode(t);if(e)return void this.push(e)}this._encodePax(t)}_encodePax(t){const e=s.encodePax({name:t.name,linkname:t.linkname,pax:t.pax}),r={name:"PaxHeader",mode:t.mode,uid:t.uid,gid:t.gid,size:e.byteLength,mtime:t.mtime,type:"pax-header",linkname:t.linkname&&"PaxHeader",uname:t.uname,gname:t.gname,devmajor:t.devmajor,devminor:t.devminor};this.push(s.encode(r)),this.push(e),u(this,e.byteLength),r.size=t.size,r.type=t.type,this.push(s.encode(r))}_doDrain(){const t=this._drain;this._drain=h,t()}_predestroy(){const t=r(this);for(this._stream&&this._stream.destroy(t);this._pending.length;){const e=this._pending.shift();e.destroy(t),e._continueOpen()}this._doDrain()}_read(t){this._doDrain(),t()}}function h(){}function u(t,e){(e&=511)&&t.push(o.subarray(0,512-e))}function c(t){return i.isBuffer(t)?t:i.from(t)}return mh=function(t){return new l(t)}}function Mh(){return _h||(_h=1,oh.extract=function(){if(dh)return fh;dh=1;const{Writable:t,Readable:e,getStreamError:r}=uh(),i=ah(),n=lh(),s=gh(),o=n.alloc(0);class a{constructor(){this.buffered=0,this.shifted=0,this.queue=new i,this._offset=0}push(t){this.buffered+=t.byteLength,this.queue.push(t)}shiftFirst(t){return 0===this._buffered?null:this._next(t)}shift(t){if(t>this.buffered)return null;if(0===t)return o;let e=this._next(t);if(t===e.byteLength)return e;const r=[e];for(;(t-=e.byteLength)>0;)e=this._next(t),r.push(e);return n.concat(r)}_next(t){const e=this.queue.peek(),r=e.byteLength-this._offset;if(t>=r){const t=this._offset?e.subarray(this._offset,e.byteLength):e;return this.queue.shift(),this._offset=0,this.buffered-=r,this.shifted+=r,t}return this.buffered-=t,this.shifted+=t,e.subarray(this._offset,this._offset+=t)}}class l extends e{constructor(t,e,r){super(),this.header=e,this.offset=r,this._parent=t}_read(t){0===this.header.size&&this.push(null),this._parent._stream===this&&this._parent._update(),t(null)}_predestroy(){this._parent.destroy(r(this))}_detach(){this._parent._stream===this&&(this._parent._stream=null,this._parent._missing=c(this.header.size),this._parent._update())}_destroy(t){this._detach(),t(null)}}class h extends t{constructor(t){super(t),t||(t={}),this._buffer=new a,this._offset=0,this._header=null,this._stream=null,this._missing=0,this._longHeader=!1,this._callback=u,this._locked=!1,this._finished=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null,this._filenameEncoding=t.filenameEncoding||"utf-8",this._allowUnknownFormat=!!t.allowUnknownFormat,this._unlockBound=this._unlock.bind(this)}_unlock(t){if(this._locked=!1,t)return this.destroy(t),void this._continueWrite(t);this._update()}_consumeHeader(){if(this._locked)return!1;this._offset=this._buffer.shifted;try{this._header=s.decode(this._buffer.shift(512),this._filenameEncoding,this._allowUnknownFormat)}catch(t){return this._continueWrite(t),!1}if(!this._header)return!0;switch(this._header.type){case"gnu-long-path":case"gnu-long-link-path":case"pax-global-header":case"pax-header":return this._longHeader=!0,this._missing=this._header.size,!0}return this._locked=!0,this._applyLongHeaders(),0===this._header.size||"directory"===this._header.type?(this.emit("entry",this._header,this._createStream(),this._unlockBound),!0):(this._stream=this._createStream(),this._missing=this._header.size,this.emit("entry",this._header,this._stream,this._unlockBound),!0)}_applyLongHeaders(){this._gnuLongPath&&(this._header.name=this._gnuLongPath,this._gnuLongPath=null),this._gnuLongLinkPath&&(this._header.linkname=this._gnuLongLinkPath,this._gnuLongLinkPath=null),this._pax&&(this._pax.path&&(this._header.name=this._pax.path),this._pax.linkpath&&(this._header.linkname=this._pax.linkpath),this._pax.size&&(this._header.size=parseInt(this._pax.size,10)),this._header.pax=this._pax,this._pax=null)}_decodeLongHeader(t){switch(this._header.type){case"gnu-long-path":this._gnuLongPath=s.decodeLongPath(t,this._filenameEncoding);break;case"gnu-long-link-path":this._gnuLongLinkPath=s.decodeLongPath(t,this._filenameEncoding);break;case"pax-global-header":this._paxGlobal=s.decodePax(t);break;case"pax-header":this._pax=null===this._paxGlobal?s.decodePax(t):Object.assign({},this._paxGlobal,s.decodePax(t))}}_consumeLongHeader(){this._longHeader=!1,this._missing=c(this._header.size);const t=this._buffer.shift(this._header.size);try{this._decodeLongHeader(t)}catch(t){return this._continueWrite(t),!1}return!0}_consumeStream(){const t=this._buffer.shiftFirst(this._missing);if(null===t)return!1;this._missing-=t.byteLength;const e=this._stream.push(t);return 0===this._missing?(this._stream.push(null),e&&this._stream._detach(),e&&!1===this._locked):e}_createStream(){return new l(this,this._header,this._offset)}_update(){for(;this._buffer.buffered>0&&!this.destroying;){if(this._missing>0){if(null!==this._stream){if(!1===this._consumeStream())return;continue}if(!0===this._longHeader){if(this._missing>this._buffer.buffered)break;if(!1===this._consumeLongHeader())return!1;continue}const t=this._buffer.shiftFirst(this._missing);null!==t&&(this._missing-=t.byteLength);continue}if(this._buffer.buffered<512)break;if(null!==this._stream||!1===this._consumeHeader())return}this._continueWrite(null)}_continueWrite(t){const e=this._callback;this._callback=u,e(t)}_write(t,e){this._callback=e,this._buffer.push(t),this._update()}_final(t){this._finished=0===this._missing&&0===this._buffer.buffered,t(this._finished?null:new Error("Unexpected end of data"))}_predestroy(){this._continueWrite(null)}_destroy(t){this._stream&&this._stream.destroy(r(this)),t(null)}[Symbol.asyncIterator](){let t=null,e=null,r=null,i=null,n=null;const s=this;return this.on("entry",function(t,s,o){n=o,s.on("error",u),e?(e({value:s,done:!1}),e=r=null):i=s}),this.on("error",e=>{t=e}),this.on("close",function(){o(t),e&&(t?r(t):e({value:void 0,done:!0}),e=r=null)}),{[Symbol.asyncIterator](){return this},next:()=>new Promise(a),return:()=>l(null),throw:t=>l(t)};function o(t){if(!n)return;const e=n;n=null,e(t)}function a(n,a){return t?a(t):i?(n({value:i,done:!1}),void(i=null)):(e=n,r=a,o(null),void(s._finished&&e&&(e({value:void 0,done:!0}),e=r=null)))}function l(t){return s.destroy(t),o(t),new Promise((e,r)=>{if(s.destroyed)return e({value:void 0,done:!0});s.once("close",function(){t?r(t):e({value:void 0,done:!0})})})}}}function u(){}function c(t){return(t&=511)&&512-t}return fh=function(t){return new h(t)}}(),oh.pack=Lh()),oh}
30
+ /**
31
+ * TAR Format Plugin
32
+ *
33
+ * @module plugins/tar
34
+ * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
35
+ * @copyright (c) 2012-2014 Chris Talkington, contributors.
36
+ */function Ph(){if(Eh)return Sh;function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}Eh=1;const e=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function r(t){if(Buffer.isBuffer(t))return t;if("number"==typeof t)return Buffer.alloc(t);if("string"==typeof t)return Buffer.from(t);throw new Error("input must be buffer, number, or string, received "+typeof t)}function i(t,i){t=r(t),Buffer.isBuffer(i)&&(i=i.readUInt32BE(0));let n=-1^i;for(var s=0;s<t.length;s++)n=e[255&(n^t[s])]^n>>>8;return-1^n}function n(){return function(t){const e=r(4);return e.writeInt32BE(t,0),e}(i.apply(null,arguments))}n.signed=function(){return i.apply(null,arguments)},n.unsigned=function(){return i.apply(null,arguments)>>>0};return Sh=t(n)}
37
+ /**
38
+ * JSON Format Plugin
39
+ *
40
+ * @module plugins/json
41
+ * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
42
+ * @copyright (c) 2012-2014 Chris Talkington, contributors.
43
+ */var Ih=function(){if(Rh)return Th;Rh=1;var t=Ja(),e={},r=function(t,e){return r.create(t,e)};return r.create=function(r,i){if(e[r]){var n=new t(r,i);return n.setFormat(r),n.setModule(new e[r](i)),n}throw new Error("create("+r+"): format not registered")},r.registerFormat=function(t,r){if(e[t])throw new Error("register("+t+"): format already registered");if("function"!=typeof r)throw new Error("register("+t+"): format module invalid");if("function"!=typeof r.prototype.append||"function"!=typeof r.prototype.finalize)throw new Error("register("+t+"): format module missing methods");e[t]=r},r.isRegisteredFormat=function(t){return!!e[t]},r.registerFormat("zip",Hl()),r.registerFormat("tar",function(){if(vh)return wh;vh=1;var t=y,e=Mh(),r=Za(),i=function(n){if(!(this instanceof i))return new i(n);"object"!=typeof(n=this.options=r.defaults(n,{gzip:!1})).gzipOptions&&(n.gzipOptions={}),this.supports={directory:!0,symlink:!0},this.engine=e.pack(n),this.compressor=!1,n.gzip&&(this.compressor=t.createGzip(n.gzipOptions),this.compressor.on("error",this._onCompressorError.bind(this)))};return i.prototype._onCompressorError=function(t){this.engine.emit("error",t)},i.prototype.append=function(t,e,i){var n=this;function s(t,r){t?i(t):n.engine.entry(e,r,function(t){i(t,e)})}if(e.mtime=e.date,"buffer"===e.sourceType)s(null,t);else if("stream"===e.sourceType&&e.stats){e.size=e.stats.size;var o=n.engine.entry(e,function(t){i(t,e)});t.pipe(o)}else"stream"===e.sourceType&&r.collectStream(t,s)},i.prototype.finalize=function(){this.engine.finalize()},i.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)},i.prototype.pipe=function(t,e){return this.compressor?this.engine.pipe.apply(this.engine,[this.compressor]).pipe(t,e):this.engine.pipe.apply(this.engine,arguments)},i.prototype.unpipe=function(){return this.compressor?this.compressor.unpipe.apply(this.compressor,arguments):this.engine.unpipe.apply(this.engine,arguments)},wh=i}()),r.registerFormat("json",function(){if(kh)return xh;kh=1;var t=o.inherits,e=Wn().Transform,r=Ph(),i=Za(),n=function(t){if(!(this instanceof n))return new n(t);t=this.options=i.defaults(t,{}),e.call(this,t),this.supports={directory:!0,symlink:!0},this.files=[]};return t(n,e),n.prototype._transform=function(t,e,r){r(null,t)},n.prototype._writeStringified=function(){var t=JSON.stringify(this.files);this.write(t)},n.prototype.append=function(t,e,n){var s=this;function o(t,i){t?n(t):(e.size=i.length||0,e.crc32=r.unsigned(i),s.files.push(e),n(null,e))}e.crc32=0,"buffer"===e.sourceType?o(null,t):"stream"===e.sourceType&&i.collectStream(t,o)},n.prototype.finalize=function(){this._writeStringified(),this.end()},xh=n}
44
+ /**
45
+ * Archiver Vending
46
+ *
47
+ * @ignore
48
+ * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
49
+ * @copyright (c) 2012-2014 Chris Talkington, contributors.
50
+ */()),Th=r}(),Dh=b(Ih);const Nh=JSON.parse(t.readFileSync("./package.json","utf8")),Ch=new r;Ch.name(Nh.displayName).description(Nh.description).version(Nh.version).enablePositionalOptions(),Ch.command("createArchive").description("Creates a archive from a specified directory").requiredOption("-f, --format <format>","Archive format (zip or tar)").requiredOption("-s, --source <source>","Source directory path").requiredOption("-d, --destination <destination>","Destination archive file").action(async r=>{const n=e("Creating archive...").start();try{await function({format:e,source:r,destination:n,options:s={},log:o=!0,onSuccess:a}){const l=i.resolve(r);if(!t.existsSync(l)||!t.statSync(l).isDirectory())throw new Error(`Source directory "${r}" does not exist or is not a directory.`);const h=t.createWriteStream(n);"zip"===e&&(s={...s,zlib:{level:9}});const u=Dh(e,s);return new Promise((t,e)=>{h.on("close",()=>{const e=u.pointer();o&&console.log(`${n} created: ${e} total bytes`),a&&a(e),t()}),u.on("error",t=>{e(t)}),u.pipe(h),u.directory(r,!1),u.finalize()})}({format:r.format,source:r.source,destination:r.destination,log:!1,onSuccess:t=>{n.succeed(`Archive created successfully at ${r.destination} (${t} bytes).`)}})}catch(t){n.fail("Failed to create archive: "+(t instanceof Error?t.message:"Unknown error")),process.exit(1)}}),Ch.parse();