@js-utils-kit/types 1.0.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.
- package/LICENSE +21 -0
- package/dist/index.cjs +78 -0
- package/dist/index.d.cts +122 -0
- package/dist/index.d.mts +122 -0
- package/dist/index.mjs +78 -0
- package/package.json +41 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import{createRequire as e}from"node:module";var t=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),n=e(import.meta.url),r=t(((e,t)=>{t.exports=typeof process==`object`&&process&&process.platform===`win32`?{sep:`\\`}:{sep:`/`}})),i=t(((e,t)=>{t.exports=n;function n(e,t,n){e instanceof RegExp&&(e=r(e,n)),t instanceof RegExp&&(t=r(t,n));var a=i(e,t,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+e.length,a[1]),post:n.slice(a[1]+t.length)}}function r(e,t){var n=t.match(e);return n?n[0]:null}n.range=i;function i(e,t,n){var r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;)u==c?(r.push(u),c=n.indexOf(e,u+1)):r.length==1?s=[r.pop(),l]:(i=r.pop(),i<a&&(a=i,o=l),l=n.indexOf(t,u+1)),u=c<l&&c>=0?c:l;r.length&&(s=[a,o])}return s}})),a=t(((e,t)=>{var n=i();t.exports=p;var r=`\0SLASH`+Math.random()+`\0`,a=`\0OPEN`+Math.random()+`\0`,o=`\0CLOSE`+Math.random()+`\0`,s=`\0COMMA`+Math.random()+`\0`,c=`\0PERIOD`+Math.random()+`\0`;function l(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function u(e){return e.split(`\\\\`).join(r).split(`\\{`).join(a).split(`\\}`).join(o).split(`\\,`).join(s).split(`\\.`).join(c)}function d(e){return e.split(r).join(`\\`).split(a).join(`{`).split(o).join(`}`).split(s).join(`,`).split(c).join(`.`)}function f(e){if(!e)return[``];var t=[],r=n(`{`,`}`,e);if(!r)return e.split(`,`);var i=r.pre,a=r.body,o=r.post,s=i.split(`,`);s[s.length-1]+=`{`+a+`}`;var c=f(o);return o.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c)),t.push.apply(t,s),t}function p(e){return e?(e.substr(0,2)===`{}`&&(e=`\\{\\}`+e.substr(2)),y(u(e),!0).map(d)):[]}function m(e){return`{`+e+`}`}function h(e){return/^-?0\d/.test(e)}function g(e,t){return e<=t}function v(e,t){return e>=t}function y(e,t){var r=[],i=n(`{`,`}`,e);if(!i)return[e];var a=i.pre,s=i.post.length?y(i.post,!1):[``];if(/\$$/.test(i.pre))for(var c=0;c<s.length;c++){var u=a+`{`+i.body+`}`+s[c];r.push(u)}else{var d=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),p=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),b=d||p,x=i.body.indexOf(`,`)>=0;if(!b&&!x)return i.post.match(/,(?!,).*\}/)?(e=i.pre+`{`+i.body+o+i.post,y(e)):[e];var S;if(b)S=i.body.split(/\.\./);else if(S=f(i.body),S.length===1&&(S=y(S[0],!1).map(m),S.length===1))return s.map(function(e){return i.pre+S[0]+e});var C;if(b){var w=l(S[0]),T=l(S[1]),E=Math.max(S[0].length,S[1].length),D=S.length==3?Math.abs(l(S[2])):1,O=g;T<w&&(D*=-1,O=v);var k=S.some(h);C=[];for(var A=w;O(A,T);A+=D){var j;if(p)j=String.fromCharCode(A),j===`\\`&&(j=``);else if(j=String(A),k){var M=E-j.length;if(M>0){var N=Array(M+1).join(`0`);j=A<0?`-`+N+j.slice(1):N+j}}C.push(j)}}else{C=[];for(var P=0;P<S.length;P++)C.push.apply(C,y(S[P],!1))}for(var P=0;P<C.length;P++)for(var c=0;c<s.length;c++){var u=a+C[P]+s[c];(!t||b||u)&&r.push(u)}}return r}})),o=t(((e,t)=>{let n=t.exports=(e,t,n={})=>(v(t),!n.nocomment&&t.charAt(0)===`#`?!1:new w(t,n).match(e));t.exports=n;let i=r();n.sep=i.sep;let o=Symbol(`globstar **`);n.GLOBSTAR=o;let s=a(),c={"!":{open:`(?:(?!(?:`,close:`))[^/]*?)`},"?":{open:`(?:`,close:`)?`},"+":{open:`(?:`,close:`)+`},"*":{open:`(?:`,close:`)*`},"@":{open:`(?:`,close:`)`}},l=`[^/]`,u=l+`*?`,d=e=>e.split(``).reduce((e,t)=>(e[t]=!0,e),{}),f=d(`().*{}+?[]^$\\!`),p=d(`[.(`),m=/\/+/;n.filter=(e,t={})=>(r,i,a)=>n(r,e,t);let h=(e,t={})=>{let n={};return Object.keys(e).forEach(t=>n[t]=e[t]),Object.keys(t).forEach(e=>n[e]=t[e]),n};n.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return n;let t=n,r=(n,r,i)=>t(n,r,h(e,i));return r.Minimatch=class extends t.Minimatch{constructor(t,n){super(t,h(e,n))}},r.Minimatch.defaults=n=>t.defaults(h(e,n)).Minimatch,r.filter=(n,r)=>t.filter(n,h(e,r)),r.defaults=n=>t.defaults(h(e,n)),r.makeRe=(n,r)=>t.makeRe(n,h(e,r)),r.braceExpand=(n,r)=>t.braceExpand(n,h(e,r)),r.match=(n,r,i)=>t.match(n,r,h(e,i)),r},n.braceExpand=(e,t)=>g(e,t);let g=(e,t={})=>(v(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:s(e)),v=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)},y=Symbol(`subparse`);n.makeRe=(e,t)=>new w(e,t||{}).makeRe(),n.match=(e,t,n={})=>{let r=new w(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e};let b=e=>e.replace(/\\(.)/g,`$1`),x=e=>e.replace(/\\([^-\]])/g,`$1`),S=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),C=e=>e.replace(/[[\]\\]/g,`\\$&`);var w=class{constructor(e,t){v(e),t||={},this.options=t,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}debug(){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();let n=this.globSet=this.braceExpand();t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,n),n=this.globParts=n.map(e=>e.split(m)),this.debug(this.pattern,n),n=n.map((e,t,n)=>e.map(this.parse,this)),this.debug(this.pattern,n),n=n.filter(e=>e.indexOf(!1)===-1),this.debug(this.pattern,n),this.set=n}parseNegate(){if(this.options.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n){var r=this.options;this.debug(`matchOne`,{this:this,file:e,pattern:t}),this.debug(`matchOne`,e.length,t.length);for(var i=0,a=0,s=e.length,c=t.length;i<s&&a<c;i++,a++){this.debug(`matchOne loop`);var l=t[a],u=e[i];if(this.debug(t,l,u),l===!1)return!1;if(l===o){this.debug(`GLOBSTAR`,[t,l,u]);var d=i,f=a+1;if(f===c){for(this.debug(`** at the end`);i<s;i++)if(e[i]===`.`||e[i]===`..`||!r.dot&&e[i].charAt(0)===`.`)return!1;return!0}for(;d<s;){var p=e[d];if(this.debug(`
|
|
2
|
+
globstar while`,e,d,t,f,p),this.matchOne(e.slice(d),t.slice(f),n))return this.debug(`globstar found match!`,d,s,p),!0;if(p===`.`||p===`..`||!r.dot&&p.charAt(0)===`.`){this.debug(`dot detected!`,e,d,t,f);break}this.debug(`globstar swallow a segment, and continue`),d++}return!!(n&&(this.debug(`
|
|
3
|
+
>>> no match, partial?`,e,d,t,f),d===s))}var m;if(typeof l==`string`?(m=u===l,this.debug(`string match`,l,u,m)):(m=u.match(l),this.debug(`pattern match`,l,u,m)),!m)return!1}if(i===s&&a===c)return!0;if(i===s)return n;if(a===c)return i===s-1&&e[i]===``;throw Error(`wtf?`)}braceExpand(){return g(this.pattern,this.options)}parse(e,t){v(e);let n=this.options;if(e===`**`)if(n.noglobstar)e=`*`;else return o;if(e===``)return``;let r=``,i=!1,a=!1,s=[],d=[],m,h=!1,g=-1,S=-1,w,T,E,D=e.charAt(0)===`.`,O=n.dot||D,k=()=>D?``:O?`(?!(?:^|\\/)\\.{1,2}(?:$|\\/))`:`(?!\\.)`,A=e=>e.charAt(0)===`.`?``:n.dot?`(?!(?:^|\\/)\\.{1,2}(?:$|\\/))`:`(?!\\.)`,j=()=>{if(m){switch(m){case`*`:r+=u,i=!0;break;case`?`:r+=l,i=!0;break;default:r+=`\\`+m;break}this.debug(`clearStateChar %j %j`,m,r),m=!1}};for(let t=0,o;t<e.length&&(o=e.charAt(t));t++){if(this.debug(`%s %s %s %j`,e,t,r,o),a){if(o===`/`)return!1;f[o]&&(r+=`\\`),r+=o,a=!1;continue}switch(o){case`/`:return!1;case`\\`:if(h&&e.charAt(t+1)===`-`){r+=o;continue}j(),a=!0;continue;case`?`:case`*`:case`+`:case`@`:case`!`:if(this.debug(`%s %s %s %j <-- stateChar`,e,t,r,o),h){this.debug(` in class`),o===`!`&&t===S+1&&(o=`^`),r+=o;continue}this.debug(`call clearStateChar %j`,m),j(),m=o,n.noext&&j();continue;case`(`:{if(h){r+=`(`;continue}if(!m){r+=`\\(`;continue}let n={type:m,start:t-1,reStart:r.length,open:c[m].open,close:c[m].close};this.debug(this.pattern,` `,n),s.push(n),r+=n.open,n.start===0&&n.type!==`!`&&(D=!0,r+=A(e.slice(t+1))),this.debug(`plType %j %j`,m,r),m=!1;continue}case`)`:{let e=s[s.length-1];if(h||!e){r+=`\\)`;continue}s.pop(),j(),i=!0,T=e,r+=T.close,T.type===`!`&&d.push(Object.assign(T,{reEnd:r.length}));continue}case`|`:{let n=s[s.length-1];if(h||!n){r+=`\\|`;continue}j(),r+=`|`,n.start===0&&n.type!==`!`&&(D=!0,r+=A(e.slice(t+1)));continue}case`[`:if(j(),h){r+=`\\`+o;continue}h=!0,S=t,g=r.length,r+=o;continue;case`]`:if(t===S+1||!h){r+=`\\`+o;continue}w=e.substring(S+1,t);try{RegExp(`[`+C(x(w))+`]`),r+=o}catch{r=r.substring(0,g)+`(?:$.)`}i=!0,h=!1;continue;default:j(),f[o]&&!(o===`^`&&h)&&(r+=`\\`),r+=o;break}}for(h&&(w=e.slice(S+1),E=this.parse(w,y),r=r.substring(0,g)+`\\[`+E[0],i||=E[1]),T=s.pop();T;T=s.pop()){let e;e=r.slice(T.reStart+T.open.length),this.debug(`setting tail`,r,T),e=e.replace(/((?:\\{2}){0,64})(\\?)\|/g,(e,t,n)=>(n||=`\\`,t+t+n+`|`)),this.debug(`tail=%j
|
|
4
|
+
%s`,e,e,T,r);let t=T.type===`*`?u:T.type===`?`?l:`\\`+T.type;i=!0,r=r.slice(0,T.reStart)+t+`\\(`+e}j(),a&&(r+=`\\\\`);let M=p[r.charAt(0)];for(let e=d.length-1;e>-1;e--){let n=d[e],i=r.slice(0,n.reStart),a=r.slice(n.reStart,n.reEnd-8),o=r.slice(n.reEnd),s=r.slice(n.reEnd-8,n.reEnd)+o,c=i.split(`)`).length,l=i.split(`(`).length-c,u=o;for(let e=0;e<l;e++)u=u.replace(/\)[+*?]?/,``);o=u;let f=o===``&&t!==y?`(?:$|\\/)`:``;r=i+a+o+f+s}if(r!==``&&i&&(r=`(?=.)`+r),M&&(r=k()+r),t===y)return[r,i];if(n.nocase&&!i&&(i=e.toUpperCase()!==e.toLowerCase()),!i)return b(e);let N=n.nocase?`i`:``;try{return Object.assign(RegExp(`^`+r+`$`,N),{_glob:e,_src:r})}catch{return RegExp(`$.`)}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?u:t.dot?`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`:`(?:(?!(?:\\/|^)\\.).)*?`,r=t.nocase?`i`:``,i=e.map(e=>(e=e.map(e=>typeof e==`string`?S(e):e===o?o:e._src).reduce((e,t)=>(e[e.length-1]===o&&t===o||e.push(t),e),[]),e.forEach((t,r)=>{t!==o||e[r-1]===o||(r===0?e.length>1?e[r+1]=`(?:\\/|`+n+`\\/)?`+e[r+1]:e[r]=n:r===e.length-1?e[r-1]+=`(?:\\/|`+n+`)?`:(e[r-1]+=`(?:\\/|\\/`+n+`\\/)`+e[r+1],e[r+1]=o))}),e.filter(e=>e!==o).join(`/`))).join(`|`);i=`^(?:`+i+`)$`,this.negate&&(i=`^(?!`+i+`).*$`);try{this.regexp=new RegExp(i,r)}catch{this.regexp=!1}return this.regexp}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;i.sep!==`/`&&(e=e.split(i.sep).join(`/`)),e=e.split(m),this.debug(this.pattern,`split`,e);let r=this.set;this.debug(this.pattern,`set`,r);let a;for(let t=e.length-1;t>=0&&(a=e[t],!a);t--);for(let i=0;i<r.length;i++){let o=r[i],s=e;if(n.matchBase&&o.length===1&&(s=[a]),this.matchOne(s,o,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return n.defaults(e).Minimatch}};n.Minimatch=w})),s=t(((e,t)=>{t.exports=m;let r=n(`fs`),{EventEmitter:i}=n(`events`),{Minimatch:a}=o(),{resolve:s}=n(`path`);function c(e,t){return new Promise((n,i)=>{r.readdir(e,{withFileTypes:!0},(e,r)=>{if(e)switch(e.code){case`ENOTDIR`:t?i(e):n([]);break;case`ENOTSUP`:case`ENOENT`:case`ENAMETOOLONG`:case`UNKNOWN`:n([]);break;case`ELOOP`:default:i(e);break}else n(r)})})}function l(e,t){return new Promise((n,i)=>{(t?r.stat:r.lstat)(e,(r,i)=>{if(r)switch(r.code){case`ENOENT`:n(t?l(e,!1):null);break;default:n(null);break}else n(i)})})}async function*u(e,t,n,r,i,a){let o=await c(t+e,a);for(let a of o){let o=a.name;o===void 0&&(o=a,r=!0);let s=e+`/`+o,c=s.slice(1),d=t+`/`+c,f=null;(r||n)&&(f=await l(d,n)),!f&&a.name!==void 0&&(f=a),f===null&&(f={isDirectory:()=>!1}),f.isDirectory()?i(c)||(yield{relative:c,absolute:d,stats:f},yield*u(s,t,n,r,i,!1)):yield{relative:c,absolute:d,stats:f}}}async function*d(e,t,n,r){yield*u(``,e,t,n,r,!0)}function f(e){return{pattern:e.pattern,dot:!!e.dot,noglobstar:!!e.noglobstar,matchBase:!!e.matchBase,nocase:!!e.nocase,ignore:e.ignore,skip:e.skip,follow:!!e.follow,stat:!!e.stat,nodir:!!e.nodir,mark:!!e.mark,silent:!!e.silent,absolute:!!e.absolute}}var p=class extends i{constructor(e,t,n){super(),typeof t==`function`&&(n=t,t=null),this.options=f(t||{}),this.matchers=[],this.options.pattern&&(this.matchers=(Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern]).map(e=>new a(e,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))),this.ignoreMatchers=[],this.options.ignore&&(this.ignoreMatchers=(Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore]).map(e=>new a(e,{dot:!0}))),this.skipMatchers=[],this.options.skip&&(this.skipMatchers=(Array.isArray(this.options.skip)?this.options.skip:[this.options.skip]).map(e=>new a(e,{dot:!0}))),this.iterator=d(s(e||`.`),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,n&&(this._matches=[],this.on(`match`,e=>this._matches.push(this.options.absolute?e.absolute:e.relative)),this.on(`error`,e=>n(e)),this.on(`end`,()=>n(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(e){return this.skipMatchers.some(t=>t.match(e))}_fileMatches(e,t){let n=e+(t?`/`:``);return(this.matchers.length===0||this.matchers.some(e=>e.match(n)))&&!this.ignoreMatchers.some(e=>e.match(n))&&(!this.options.nodir||!t)}_next(){!this.paused&&!this.aborted?this.iterator.next().then(e=>{if(e.done)this.emit(`end`);else{let t=e.value.stats.isDirectory();if(this._fileMatches(e.value.relative,t)){let n=e.value.relative,r=e.value.absolute;this.options.mark&&t&&(n+=`/`,r+=`/`),this.options.stat?this.emit(`match`,{relative:n,absolute:r,stat:e.value.stats}):this.emit(`match`,{relative:n,absolute:r})}this._next(this.iterator)}}).catch(e=>{this.abort(),this.emit(`error`,e),!e.code&&!this.options.silent&&console.error(e)}):this.inactive=!0}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}};function m(e,t,n){return new p(e,t,n)}m.ReaddirGlob=p})),c=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.async={}))})(e,(function(e){function t(e,...t){return(...n)=>e(...t,...n)}function n(e){return function(...t){var n=t.pop();return e.call(this,t,n)}}var r=typeof queueMicrotask==`function`&&queueMicrotask,i=typeof setImmediate==`function`&&setImmediate,a=typeof process==`object`&&typeof process.nextTick==`function`;function o(e){setTimeout(e,0)}function s(e){return(t,...n)=>e(()=>t(...n))}var c=s(r?queueMicrotask:i?setImmediate:a?process.nextTick:o);function l(e){return f(e)?function(...t){let n=t.pop();return u(e.apply(this,t),n)}:n(function(t,n){var r;try{r=e.apply(this,t)}catch(e){return n(e)}if(r&&typeof r.then==`function`)return u(r,n);n(null,r)})}function u(e,t){return e.then(e=>{d(t,null,e)},e=>{d(t,e&&(e instanceof Error||e.message)?e:Error(e))})}function d(e,t,n){try{e(t,n)}catch(e){c(e=>{throw e},e)}}function f(e){return e[Symbol.toStringTag]===`AsyncFunction`}function p(e){return e[Symbol.toStringTag]===`AsyncGenerator`}function m(e){return typeof e[Symbol.asyncIterator]==`function`}function h(e){if(typeof e!=`function`)throw Error(`expected a function`);return f(e)?l(e):e}function g(e,t){if(t||=e.length,!t)throw Error(`arity is undefined`);function n(...n){return typeof n[t-1]==`function`?e.apply(this,n):new Promise((r,i)=>{n[t-1]=(e,...t)=>{if(e)return i(e);r(t.length>1?t:t[0])},e.apply(this,n)})}return n}function v(e){return function(t,...n){return g(function(r){var i=this;return e(t,(e,t)=>{h(e).apply(i,n.concat(t))},r)})}}function y(e,t,n,r){t||=[];var i=[],a=0,o=h(n);return e(t,(e,t,n)=>{var r=a++;o(e,(e,t)=>{i[r]=t,n(e)})},e=>{r(e,i)})}function b(e){return e&&typeof e.length==`number`&&e.length>=0&&e.length%1==0}let x={};function S(e){function t(...t){if(e!==null){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t}function C(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}function w(e){var t=-1,n=e.length;return function(){return++t<n?{value:e[t],key:t}:null}}function T(e){var t=-1;return function(){var n=e.next();return n.done?null:(t++,{value:n.value,key:t})}}function E(e){var t=e?Object.keys(e):[],n=-1,r=t.length;return function i(){var a=t[++n];return a===`__proto__`?i():n<r?{value:e[a],key:a}:null}}function D(e){if(b(e))return w(e);var t=C(e);return t?T(t):E(e)}function O(e){return function(...t){if(e===null)throw Error(`Callback was already called.`);var n=e;e=null,n.apply(this,t)}}function k(e,t,n,r){let i=!1,a=!1,o=!1,s=0,c=0;function l(){s>=t||o||i||(o=!0,e.next().then(({value:e,done:t})=>{if(!(a||i)){if(o=!1,t){i=!0,s<=0&&r(null);return}s++,n(e,c,u),c++,l()}}).catch(d))}function u(e,t){if(--s,!a){if(e)return d(e);if(e===!1){i=!0,a=!0;return}if(t===x||i&&s<=0)return i=!0,r(null);l()}}function d(e){a||(o=!1,i=!0,r(e))}l()}var A=e=>(t,n,r)=>{if(r=S(r),e<=0)throw RangeError(`concurrency limit cannot be less than 1`);if(!t)return r(null);if(p(t))return k(t,e,n,r);if(m(t))return k(t[Symbol.asyncIterator](),e,n,r);var i=D(t),a=!1,o=!1,s=0,c=!1;function l(e,t){if(!o)if(--s,e)a=!0,r(e);else if(e===!1)a=!0,o=!0;else if(t===x||a&&s<=0)return a=!0,r(null);else c||u()}function u(){for(c=!0;s<e&&!a;){var t=i();if(t===null){a=!0,s<=0&&r(null);return}s+=1,n(t.value,t.key,O(l))}c=!1}u()};function j(e,t,n,r){return A(t)(e,h(n),r)}var M=g(j,4);function N(e,t,n){n=S(n);var r=0,i=0,{length:a}=e,o=!1;a===0&&n(null);function s(e,t){e===!1&&(o=!0),o!==!0&&(e?n(e):(++i===a||t===x)&&n(null))}for(;r<a;r++)t(e[r],r,O(s))}function P(e,t,n){return M(e,1/0,t,n)}function F(e,t,n){return(b(e)?N:P)(e,h(t),n)}var I=g(F,3);function L(e,t,n){return y(I,e,t,n)}var R=g(L,3),z=v(R);function B(e,t,n){return M(e,1,t,n)}var V=g(B,3);function H(e,t,n){return y(V,e,t,n)}var U=g(H,3),W=v(U);let G=Symbol(`promiseCallback`);function K(){let e,t;function n(n,...r){if(n)return t(n);e(r.length>1?r:r[0])}return n[G]=new Promise((n,r)=>{e=n,t=r}),n}function ee(e,t,n){typeof t!=`number`&&(n=t,t=null),n=S(n||K());var r=Object.keys(e).length;if(!r)return n(null);t||=r;var i={},a=0,o=!1,s=!1,c=Object.create(null),l=[],u=[],d={};Object.keys(e).forEach(t=>{var n=e[t];if(!Array.isArray(n)){f(t,[n]),u.push(t);return}var r=n.slice(0,n.length-1),i=r.length;if(i===0){f(t,n),u.push(t);return}d[t]=i,r.forEach(a=>{if(!e[a])throw Error("async.auto task `"+t+"` has a non-existent dependency `"+a+"` in "+r.join(`, `));m(a,()=>{i--,i===0&&f(t,n)})})}),y(),p();function f(e,t){l.push(()=>v(e,t))}function p(){if(!o){if(l.length===0&&a===0)return n(null,i);for(;l.length&&a<t;)l.shift()()}}function m(e,t){var n=c[e];n||=c[e]=[],n.push(t)}function g(e){(c[e]||[]).forEach(e=>e()),p()}function v(e,t){if(!s){var r=O((t,...r)=>{if(a--,t===!1){o=!0;return}if(r.length<2&&([r]=r),t){var l={};if(Object.keys(i).forEach(e=>{l[e]=i[e]}),l[e]=r,s=!0,c=Object.create(null),o)return;n(t,l)}else i[e]=r,g(e)});a++;var l=h(t[t.length-1]);t.length>1?l(i,r):l(r)}}function y(){for(var e,t=0;u.length;)e=u.pop(),t++,b(e).forEach(e=>{--d[e]===0&&u.push(e)});if(t!==r)throw Error(`async.auto cannot execute tasks due to a recursive dependency`)}function b(t){var n=[];return Object.keys(e).forEach(r=>{let i=e[r];Array.isArray(i)&&i.indexOf(t)>=0&&n.push(r)}),n}return n[G]}var q=/^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/,te=/^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/,ne=/,/,re=/(=.+)?(\s*)$/;function J(e){let t=``,n=0,r=e.indexOf(`*/`);for(;n<e.length;)if(e[n]===`/`&&e[n+1]===`/`){let t=e.indexOf(`
|
|
5
|
+
`,n);n=t===-1?e.length:t}else if(r!==-1&&e[n]===`/`&&e[n+1]===`*`){let i=e.indexOf(`*/`,n);i===-1?(t+=e[n],n++):(n=i+2,r=e.indexOf(`*/`,n))}else t+=e[n],n++;return t}function ie(e){let t=J(e.toString()),n=t.match(q);if(n||=t.match(te),!n)throw Error(`could not parse args in autoInject
|
|
6
|
+
Source:
|
|
7
|
+
`+t);let[,r]=n;return r.replace(/\s/g,``).split(ne).map(e=>e.replace(re,``).trim())}function ae(e,t){var n={};return Object.keys(e).forEach(t=>{var r=e[t],i,a=f(r),o=!a&&r.length===1||a&&r.length===0;if(Array.isArray(r))i=[...r],r=i.pop(),n[t]=i.concat(i.length>0?s:r);else if(o)n[t]=r;else{if(i=ie(r),r.length===0&&!a&&i.length===0)throw Error(`autoInject task functions require explicit parameters.`);a||i.pop(),n[t]=i.concat(s)}function s(e,t){var n=i.map(t=>e[t]);n.push(t),h(r)(...n)}}),ee(n,t)}class oe{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,--this.length,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):se(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):se(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:n}=t;e(t)&&this.removeLink(t),t=n}return this}}function se(e,t){e.length=1,e.head=e.tail=t}function ce(e,t,n){if(t==null)t=1;else if(t===0)throw RangeError(`Concurrency must not be zero`);var r=h(e),i=0,a=[];let o={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function s(e,t){o[e].push(t)}function l(e,t){let n=(...r)=>{u(e,n),t(...r)};o[e].push(n)}function u(e,t){if(!e)return Object.keys(o).forEach(e=>o[e]=[]);if(!t)return o[e]=[];o[e]=o[e].filter(e=>e!==t)}function d(e,...t){o[e].forEach(e=>e(...t))}var f=!1;function p(e,t,n,r){if(r!=null&&typeof r!=`function`)throw Error(`task callback must be a function`);b.started=!0;var i,a;function o(e,...t){if(e)return n?a(e):i();if(t.length<=1)return i(t[0]);i(t)}var s=b._createTaskItem(e,n?o:r||o);if(t?b._tasks.unshift(s):b._tasks.push(s),f||(f=!0,c(()=>{f=!1,b.process()})),n||!r)return new Promise((e,t)=>{i=e,a=t})}function m(e){return function(t,...n){--i;for(var r=0,o=e.length;r<o;r++){var s=e[r],c=a.indexOf(s);c===0?a.shift():c>0&&a.splice(c,1),s.callback(t,...n),t!=null&&d(`error`,t,s.data)}i<=b.concurrency-b.buffer&&d(`unsaturated`),b.idle()&&d(`drain`),b.process()}}function g(e){return e.length===0&&b.idle()?(c(()=>d(`drain`)),!0):!1}let v=e=>t=>{if(!t)return new Promise((t,n)=>{l(e,(e,r)=>{if(e)return n(e);t(r)})});u(e),s(e,t)};var y=!1,b={_tasks:new oe,_createTaskItem(e,t){return{data:e,callback:t}},*[Symbol.iterator](){yield*b._tasks[Symbol.iterator]()},concurrency:t,payload:n,buffer:t/4,started:!1,paused:!1,push(e,t){return Array.isArray(e)?g(e)?void 0:e.map(e=>p(e,!1,!1,t)):p(e,!1,!1,t)},pushAsync(e,t){return Array.isArray(e)?g(e)?void 0:e.map(e=>p(e,!1,!0,t)):p(e,!1,!0,t)},kill(){u(),b._tasks.empty()},unshift(e,t){return Array.isArray(e)?g(e)?void 0:e.map(e=>p(e,!0,!1,t)):p(e,!0,!1,t)},unshiftAsync(e,t){return Array.isArray(e)?g(e)?void 0:e.map(e=>p(e,!0,!0,t)):p(e,!0,!0,t)},remove(e){b._tasks.remove(e)},process(){if(!y){for(y=!0;!b.paused&&i<b.concurrency&&b._tasks.length;){var e=[],t=[],n=b._tasks.length;b.payload&&(n=Math.min(n,b.payload));for(var o=0;o<n;o++){var s=b._tasks.shift();e.push(s),a.push(s),t.push(s.data)}i+=1,b._tasks.length===0&&d(`empty`),i===b.concurrency&&d(`saturated`),r(t,O(m(e)))}y=!1}},length(){return b._tasks.length},running(){return i},workersList(){return a},idle(){return b._tasks.length+i===0},pause(){b.paused=!0},resume(){b.paused!==!1&&(b.paused=!1,c(b.process))}};return Object.defineProperties(b,{saturated:{writable:!1,value:v(`saturated`)},unsaturated:{writable:!1,value:v(`unsaturated`)},empty:{writable:!1,value:v(`empty`)},drain:{writable:!1,value:v(`drain`)},error:{writable:!1,value:v(`error`)}}),b}function le(e,t){return ce(e,1,t)}function ue(e,t,n){return ce(e,t,n)}function de(e,t,n,r){r=S(r);var i=h(n);return V(e,(e,n,r)=>{i(t,e,(e,n)=>{t=n,r(e)})},e=>r(e,t))}var Y=g(de,4);function fe(...e){var t=e.map(h);return function(...e){var n=this,r=e[e.length-1];return typeof r==`function`?e.pop():r=K(),Y(t,e,(e,t,r)=>{t.apply(n,e.concat((e,...t)=>{r(e,t)}))},(e,t)=>r(e,...t)),r[G]}}function pe(...e){return fe(...e.reverse())}function me(e,t,n,r){return y(A(t),e,n,r)}var he=g(me,4);function ge(e,t,n,r){var i=h(n);return he(e,t,(e,t)=>{i(e,(e,...n)=>e?t(e):t(e,n))},(e,t)=>{for(var n=[],i=0;i<t.length;i++)t[i]&&(n=n.concat(...t[i]));return r(e,n)})}var _e=g(ge,4);function ve(e,t,n){return _e(e,1/0,t,n)}var ye=g(ve,3);function be(e,t,n){return _e(e,1,t,n)}var xe=g(be,3);function Se(...e){return function(...t){return t.pop()(null,...e)}}function X(e,t){return(n,r,i,a)=>{var o=!1,s;let c=h(i);n(r,(n,r,i)=>{c(n,(r,a)=>{if(r||r===!1)return i(r);if(e(a)&&!s)return o=!0,s=t(!0,n),i(null,x);i()})},e=>{if(e)return a(e);a(null,o?s:t(!1))})}}function Ce(e,t,n){return X(e=>e,(e,t)=>t)(I,e,t,n)}var we=g(Ce,3);function Te(e,t,n,r){return X(e=>e,(e,t)=>t)(A(t),e,n,r)}var Ee=g(Te,4);function De(e,t,n){return X(e=>e,(e,t)=>t)(A(1),e,t,n)}var Oe=g(De,3);function Z(e){return(t,...n)=>h(t)(...n,(t,...n)=>{typeof console==`object`&&(t?console.error&&console.error(t):console[e]&&n.forEach(t=>console[e](t)))})}var ke=Z(`dir`);function Q(e,t,n){n=O(n);var r=h(e),i=h(t),a;function o(e,...t){if(e)return n(e);e!==!1&&(a=t,i(...t,s))}function s(e,t){if(e)return n(e);if(e!==!1){if(!t)return n(null,...a);r(o)}}return s(null,!0)}var Ae=g(Q,3);function je(e,t,n){let r=h(t);return Ae(e,(...e)=>{let t=e.pop();r(...e,(e,n)=>t(e,!n))},n)}function $(e){return(t,n,r)=>e(t,r)}function Me(e,t,n){return I(e,$(h(t)),n)}var Ne=g(Me,3);function Pe(e,t,n,r){return A(t)(e,$(h(n)),r)}var Fe=g(Pe,4);function Ie(e,t,n){return Fe(e,1,t,n)}var Le=g(Ie,3);function Re(e){return f(e)?e:function(...t){var n=t.pop(),r=!0;t.push((...e)=>{r?c(()=>n(...e)):n(...e)}),e.apply(this,t),r=!1}}function ze(e,t,n){return X(e=>!e,e=>!e)(I,e,t,n)}var Be=g(ze,3);function Ve(e,t,n,r){return X(e=>!e,e=>!e)(A(t),e,n,r)}var He=g(Ve,4);function Ue(e,t,n){return X(e=>!e,e=>!e)(V,e,t,n)}var We=g(Ue,3);function Ge(e,t,n,r){var i=Array(t.length);e(t,(e,t,r)=>{n(e,(e,n)=>{i[t]=!!n,r(e)})},e=>{if(e)return r(e);for(var n=[],a=0;a<t.length;a++)i[a]&&n.push(t[a]);r(null,n)})}function Ke(e,t,n,r){var i=[];e(t,(e,t,r)=>{n(e,(n,a)=>{if(n)return r(n);a&&i.push({index:t,value:e}),r(n)})},e=>{if(e)return r(e);r(null,i.sort((e,t)=>e.index-t.index).map(e=>e.value))})}function qe(e,t,n,r){return(b(t)?Ge:Ke)(e,t,h(n),r)}function Je(e,t,n){return qe(I,e,t,n)}var Ye=g(Je,3);function Xe(e,t,n,r){return qe(A(t),e,n,r)}var Ze=g(Xe,4);function Qe(e,t,n){return qe(V,e,t,n)}var $e=g(Qe,3);function et(e,t){var n=O(t),r=h(Re(e));function i(e){if(e)return n(e);e!==!1&&r(i)}return i()}var tt=g(et,2);function nt(e,t,n,r){var i=h(n);return he(e,t,(e,t)=>{i(e,(n,r)=>n?t(n):t(n,{key:r,val:e}))},(e,t)=>{for(var n={},{hasOwnProperty:i}=Object.prototype,a=0;a<t.length;a++)if(t[a]){var{key:o}=t[a],{val:s}=t[a];i.call(n,o)?n[o].push(s):n[o]=[s]}return r(e,n)})}var rt=g(nt,4);function it(e,t,n){return rt(e,1/0,t,n)}function at(e,t,n){return rt(e,1,t,n)}var ot=Z(`log`);function st(e,t,n,r){r=S(r);var i={},a=h(n);return A(t)(e,(e,t,n)=>{a(e,t,(e,r)=>{if(e)return n(e);i[t]=r,n(e)})},e=>r(e,i))}var ct=g(st,4);function lt(e,t,n){return ct(e,1/0,t,n)}function ut(e,t,n){return ct(e,1,t,n)}function dt(e,t=e=>e){var r=Object.create(null),i=Object.create(null),a=h(e),o=n((e,n)=>{var o=t(...e);o in r?c(()=>n(null,...r[o])):o in i?i[o].push(n):(i[o]=[n],a(...e,(e,...t)=>{e||(r[o]=t);var n=i[o];delete i[o];for(var a=0,s=n.length;a<s;a++)n[a](e,...t)}))});return o.memo=r,o.unmemoized=e,o}var ft=s(a?process.nextTick:i?setImmediate:o),pt=g((e,t,n)=>{var r=b(t)?[]:{};e(t,(e,t,n)=>{h(e)((e,...i)=>{i.length<2&&([i]=i),r[t]=i,n(e)})},e=>n(e,r))},3);function mt(e,t){return pt(I,e,t)}function ht(e,t,n){return pt(A(t),e,n)}function gt(e,t){var n=h(e);return ce((e,t)=>{n(e[0],t)},t,1)}class _t{constructor(){this.heap=[],this.pushCount=-(2**53-1)}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(e){let t;for(;e>0&&bt(this.heap[e],this.heap[t=yt(e)]);){let n=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=n,e=t}}percDown(e){let t;for(;(t=vt(e))<this.heap.length&&(t+1<this.heap.length&&bt(this.heap[t+1],this.heap[t])&&(t+=1),!bt(this.heap[e],this.heap[t]));){let n=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=n,e=t}}push(e){e.pushCount=++this.pushCount,this.heap.push(e),this.percUp(this.heap.length-1)}unshift(e){return this.heap.push(e)}shift(){let[e]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),e}toArray(){return[...this]}*[Symbol.iterator](){for(let e=0;e<this.heap.length;e++)yield this.heap[e].data}remove(e){let t=0;for(let n=0;n<this.heap.length;n++)e(this.heap[n])||(this.heap[t]=this.heap[n],t++);this.heap.splice(t);for(let e=yt(this.heap.length-1);e>=0;e--)this.percDown(e);return this}}function vt(e){return(e<<1)+1}function yt(e){return(e+1>>1)-1}function bt(e,t){return e.priority===t.priority?e.pushCount<t.pushCount:e.priority<t.priority}function xt(e,t){var n=gt(e,t),{push:r,pushAsync:i}=n;n._tasks=new _t,n._createTaskItem=({data:e,priority:t},n)=>({data:e,priority:t,callback:n});function a(e,t){return Array.isArray(e)?e.map(e=>({data:e,priority:t})):{data:e,priority:t}}return n.push=function(e,t=0,n){return r(a(e,t),n)},n.pushAsync=function(e,t=0,n){return i(a(e,t),n)},delete n.unshift,delete n.unshiftAsync,n}function St(e,t){if(t=S(t),!Array.isArray(e))return t(TypeError(`First argument to race must be an array of functions`));if(!e.length)return t();for(var n=0,r=e.length;n<r;n++)h(e[n])(t)}var Ct=g(St,2);function wt(e,t,n,r){return Y([...e].reverse(),t,n,r)}function Tt(e){var t=h(e);return n(function(e,n){return e.push((e,...t)=>{let r={};if(e&&(r.error=e),t.length>0){var i=t;t.length<=1&&([i]=t),r.value=i}n(null,r)}),t.apply(this,e)})}function Et(e){var t;return Array.isArray(e)?t=e.map(Tt):(t={},Object.keys(e).forEach(n=>{t[n]=Tt.call(this,e[n])})),t}function Dt(e,t,n,r){let i=h(n);return qe(e,t,(e,t)=>{i(e,(e,n)=>{t(e,!n)})},r)}function Ot(e,t,n){return Dt(I,e,t,n)}var kt=g(Ot,3);function At(e,t,n,r){return Dt(A(t),e,n,r)}var jt=g(At,4);function Mt(e,t,n){return Dt(V,e,t,n)}var Nt=g(Mt,3);function Pt(e){return function(){return e}}function Ft(e,t,n){var r={times:5,intervalFunc:Pt(0)};if(arguments.length<3&&typeof e==`function`?(n=t||K(),t=e):(It(r,e),n||=K()),typeof t!=`function`)throw Error(`Invalid arguments for async.retry`);var i=h(t),a=1;function o(){i((e,...t)=>{e!==!1&&(e&&a++<r.times&&(typeof r.errorFilter!=`function`||r.errorFilter(e))?setTimeout(o,r.intervalFunc(a-1)):n(e,...t))})}return o(),n[G]}function It(e,t){if(typeof t==`object`)e.times=+t.times||5,e.intervalFunc=typeof t.interval==`function`?t.interval:Pt(+t.interval||0),e.errorFilter=t.errorFilter;else if(typeof t==`number`||typeof t==`string`)e.times=+t||5;else throw Error(`Invalid arguments for async.retry`)}function Lt(e,t){t||(t=e,e=null);let r=e&&e.arity||t.length;f(t)&&(r+=1);var i=h(t);return n((t,n)=>{(t.length<r-1||n==null)&&(t.push(n),n=K());function a(e){i(...t,e)}return e?Ft(e,a,n):Ft(a,n),n[G]})}function Rt(e,t){return pt(V,e,t)}function zt(e,t,n){return X(Boolean,e=>e)(I,e,t,n)}var Bt=g(zt,3);function Vt(e,t,n,r){return X(Boolean,e=>e)(A(t),e,n,r)}var Ht=g(Vt,4);function Ut(e,t,n){return X(Boolean,e=>e)(V,e,t,n)}var Wt=g(Ut,3);function Gt(e,t,n){var r=h(t);return R(e,(e,t)=>{r(e,(n,r)=>{if(n)return t(n);t(n,{value:e,criteria:r})})},(e,t)=>{if(e)return n(e);n(null,t.sort(i).map(e=>e.value))});function i(e,t){var n=e.criteria,r=t.criteria;return n<r?-1:n>r?1:0}}var Kt=g(Gt,3);function qt(e,t,r){var i=h(e);return n((n,a)=>{var o=!1,s;function c(){var t=e.name||`anonymous`,n=Error(`Callback function "`+t+`" timed out.`);n.code=`ETIMEDOUT`,r&&(n.info=r),o=!0,a(n)}n.push((...e)=>{o||(a(...e),clearTimeout(s))}),s=setTimeout(c,t),i(...n)})}function Jt(e){for(var t=Array(e);e--;)t[e]=e;return t}function Yt(e,t,n,r){var i=h(n);return he(Jt(e),t,i,r)}function Xt(e,t,n){return Yt(e,1/0,t,n)}function Zt(e,t,n){return Yt(e,1,t,n)}function Qt(e,t,n,r){arguments.length<=3&&typeof t==`function`&&(r=n,n=t,t=Array.isArray(e)?[]:{}),r=S(r||K());var i=h(n);return I(e,(e,n,r)=>{i(t,e,n,r)},e=>r(e,t)),r[G]}function $t(e,t){var n=null,r;return Le(e,(e,t)=>{h(e)((e,...i)=>{if(e===!1)return t(e);i.length<2?[r]=i:r=i,n=e,t(e?null:{})})},()=>t(n,r))}var en=g($t);function tn(e){return(...t)=>(e.unmemoized||e)(...t)}function nn(e,t,n){n=O(n);var r=h(t),i=h(e),a=[];function o(e,...t){if(e)return n(e);a=t,e!==!1&&i(s)}function s(e,t){if(e)return n(e);if(e!==!1){if(!t)return n(null,...a);r(o)}}return i(s)}var rn=g(nn,3);function an(e,t,n){let r=h(e);return rn(e=>r((t,n)=>e(t,!n)),t,n)}function on(e,t){if(t=S(t),!Array.isArray(e))return t(Error(`First argument to waterfall must be an array of functions`));if(!e.length)return t();var n=0;function r(t){h(e[n++])(...t,O(i))}function i(i,...a){if(i!==!1){if(i||n===e.length)return t(i,...a);r(a)}}r([])}var sn=g(on),cn={apply:t,applyEach:z,applyEachSeries:W,asyncify:l,auto:ee,autoInject:ae,cargo:le,cargoQueue:ue,compose:pe,concat:ye,concatLimit:_e,concatSeries:xe,constant:Se,detect:we,detectLimit:Ee,detectSeries:Oe,dir:ke,doUntil:je,doWhilst:Ae,each:Ne,eachLimit:Fe,eachOf:I,eachOfLimit:M,eachOfSeries:V,eachSeries:Le,ensureAsync:Re,every:Be,everyLimit:He,everySeries:We,filter:Ye,filterLimit:Ze,filterSeries:$e,forever:tt,groupBy:it,groupByLimit:rt,groupBySeries:at,log:ot,map:R,mapLimit:he,mapSeries:U,mapValues:lt,mapValuesLimit:ct,mapValuesSeries:ut,memoize:dt,nextTick:ft,parallel:mt,parallelLimit:ht,priorityQueue:xt,queue:gt,race:Ct,reduce:Y,reduceRight:wt,reflect:Tt,reflectAll:Et,reject:kt,rejectLimit:jt,rejectSeries:Nt,retry:Ft,retryable:Lt,seq:fe,series:Rt,setImmediate:c,some:Bt,someLimit:Ht,someSeries:Wt,sortBy:Kt,timeout:qt,times:Xt,timesLimit:Yt,timesSeries:Zt,transform:Qt,tryEach:en,unmemoize:tn,until:an,waterfall:sn,whilst:rn,all:Be,allLimit:He,allSeries:We,any:Bt,anyLimit:Ht,anySeries:Wt,find:we,findLimit:Ee,findSeries:Oe,flatMap:ye,flatMapLimit:_e,flatMapSeries:xe,forEach:Ne,forEachSeries:Le,forEachLimit:Fe,forEachOf:I,forEachOfSeries:V,forEachOfLimit:M,inject:Y,foldl:Y,foldr:wt,select:Ye,selectLimit:Ze,selectSeries:$e,wrapSync:l,during:rn,doDuring:Ae};e.all=Be,e.allLimit=He,e.allSeries=We,e.any=Bt,e.anyLimit=Ht,e.anySeries=Wt,e.apply=t,e.applyEach=z,e.applyEachSeries=W,e.asyncify=l,e.auto=ee,e.autoInject=ae,e.cargo=le,e.cargoQueue=ue,e.compose=pe,e.concat=ye,e.concatLimit=_e,e.concatSeries=xe,e.constant=Se,e.default=cn,e.detect=we,e.detectLimit=Ee,e.detectSeries=Oe,e.dir=ke,e.doDuring=Ae,e.doUntil=je,e.doWhilst=Ae,e.during=rn,e.each=Ne,e.eachLimit=Fe,e.eachOf=I,e.eachOfLimit=M,e.eachOfSeries=V,e.eachSeries=Le,e.ensureAsync=Re,e.every=Be,e.everyLimit=He,e.everySeries=We,e.filter=Ye,e.filterLimit=Ze,e.filterSeries=$e,e.find=we,e.findLimit=Ee,e.findSeries=Oe,e.flatMap=ye,e.flatMapLimit=_e,e.flatMapSeries=xe,e.foldl=Y,e.foldr=wt,e.forEach=Ne,e.forEachLimit=Fe,e.forEachOf=I,e.forEachOfLimit=M,e.forEachOfSeries=V,e.forEachSeries=Le,e.forever=tt,e.groupBy=it,e.groupByLimit=rt,e.groupBySeries=at,e.inject=Y,e.log=ot,e.map=R,e.mapLimit=he,e.mapSeries=U,e.mapValues=lt,e.mapValuesLimit=ct,e.mapValuesSeries=ut,e.memoize=dt,e.nextTick=ft,e.parallel=mt,e.parallelLimit=ht,e.priorityQueue=xt,e.queue=gt,e.race=Ct,e.reduce=Y,e.reduceRight=wt,e.reflect=Tt,e.reflectAll=Et,e.reject=kt,e.rejectLimit=jt,e.rejectSeries=Nt,e.retry=Ft,e.retryable=Lt,e.select=Ye,e.selectLimit=Ze,e.selectSeries=$e,e.seq=fe,e.series=Rt,e.setImmediate=c,e.some=Bt,e.someLimit=Ht,e.someSeries=Wt,e.sortBy=Kt,e.timeout=qt,e.times=Xt,e.timesLimit=Yt,e.timesSeries=Zt,e.transform=Qt,e.tryEach=en,e.unmemoize=tn,e.until=an,e.waterfall=sn,e.whilst=rn,e.wrapSync=l,Object.defineProperty(e,`__esModule`,{value:!0})}))})),l=t(((e,t)=>{var r=n(`constants`),i=process.cwd,a=null,o=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return a||=i.call(process),a};try{process.cwd()}catch{}if(typeof process.chdir==`function`){var s=process.chdir;process.chdir=function(e){a=null,s.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,s)}t.exports=c;function c(e){r.hasOwnProperty(`O_SYMLINK`)&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||n(e),e.chown=s(e.chown),e.fchown=s(e.fchown),e.lchown=s(e.lchown),e.chmod=i(e.chmod),e.fchmod=i(e.fchmod),e.lchmod=i(e.lchmod),e.chownSync=c(e.chownSync),e.fchownSync=c(e.fchownSync),e.lchownSync=c(e.lchownSync),e.chmodSync=a(e.chmodSync),e.fchmodSync=a(e.fchmodSync),e.lchmodSync=a(e.lchmodSync),e.stat=l(e.stat),e.fstat=l(e.fstat),e.lstat=l(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){}),o===`win32`&&(e.rename=typeof e.rename==`function`?(function(t){function n(n,r,i){var a=Date.now(),o=0;t(n,r,function s(c){if(c&&(c.code===`EACCES`||c.code===`EPERM`||c.code===`EBUSY`)&&Date.now()-a<6e4){setTimeout(function(){e.stat(r,function(e,a){e&&e.code===`ENOENT`?t(n,r,s):i(c)})},o),o<100&&(o+=10);return}i&&i(c)})}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.rename):e.rename),e.read=typeof e.read==`function`?(function(t){function n(n,r,i,a,o,s){var c;if(s&&typeof s==`function`){var l=0;c=function(u,d,f){if(u&&u.code===`EAGAIN`&&l<10)return l++,t.call(e,n,r,i,a,o,c);s.apply(this,arguments)}}return t.call(e,n,r,i,a,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.read):e.read,e.readSync=typeof e.readSync==`function`?(function(t){return function(n,r,i,a,o){for(var s=0;;)try{return t.call(e,n,r,i,a,o)}catch(e){if(e.code===`EAGAIN`&&s<10){s++;continue}throw e}}})(e.readSync):e.readSync;function t(e){e.lchmod=function(t,n,i){e.open(t,r.O_WRONLY|r.O_SYMLINK,n,function(t,r){if(t){i&&i(t);return}e.fchmod(r,n,function(t){e.close(r,function(e){i&&i(t||e)})})})},e.lchmodSync=function(t,n){var i=e.openSync(t,r.O_WRONLY|r.O_SYMLINK,n),a=!0,o;try{o=e.fchmodSync(i,n),a=!1}finally{if(a)try{e.closeSync(i)}catch{}else e.closeSync(i)}return o}}function n(e){r.hasOwnProperty(`O_SYMLINK`)&&e.futimes?(e.lutimes=function(t,n,i,a){e.open(t,r.O_SYMLINK,function(t,r){if(t){a&&a(t);return}e.futimes(r,n,i,function(t){e.close(r,function(e){a&&a(t||e)})})})},e.lutimesSync=function(t,n,i){var a=e.openSync(t,r.O_SYMLINK),o,s=!0;try{o=e.futimesSync(a,n,i),s=!1}finally{if(s)try{e.closeSync(a)}catch{}else e.closeSync(a)}return o}):e.futimes&&(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}function i(t){return t&&function(n,r,i){return t.call(e,n,r,function(e){d(e)&&(e=null),i&&i.apply(this,arguments)})}}function a(t){return t&&function(n,r){try{return t.call(e,n,r)}catch(e){if(!d(e))throw e}}}function s(t){return t&&function(n,r,i,a){return t.call(e,n,r,i,function(e){d(e)&&(e=null),a&&a.apply(this,arguments)})}}function c(t){return t&&function(n,r,i){try{return t.call(e,n,r,i)}catch(e){if(!d(e))throw e}}}function l(t){return t&&function(n,r,i){typeof r==`function`&&(i=r,r=null);function a(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return r?t.call(e,n,r,a):t.call(e,n,a)}}function u(t){return t&&function(n,r){var i=r?t.call(e,n,r):t.call(e,n);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}}function d(e){return!e||e.code===`ENOSYS`||(!process.getuid||process.getuid()!==0)&&(e.code===`EINVAL`||e.code===`EPERM`)}}})),u=t(((e,t)=>{var r=n(`stream`).Stream;t.exports=i;function i(e){return{ReadStream:t,WriteStream:n};function t(n,i){if(!(this instanceof t))return new t(n,i);r.call(this);var a=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags=`r`,this.mode=438,this.bufferSize=64*1024,i||={};for(var o=Object.keys(i),s=0,c=o.length;s<c;s++){var l=o[s];this[l]=i[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.end===void 0)this.end=1/0;else if(typeof this.end!=`number`)throw TypeError(`end must be a Number`);if(this.start>this.end)throw Error(`start must be <= end`);this.pos=this.start}if(this.fd!==null){process.nextTick(function(){a._read()});return}e.open(this.path,this.flags,this.mode,function(e,t){if(e){a.emit(`error`,e),a.readable=!1;return}a.fd=t,a.emit(`open`,t),a._read()})}function n(t,i){if(!(this instanceof n))return new n(t,i);r.call(this),this.path=t,this.fd=null,this.writable=!0,this.flags=`w`,this.encoding=`binary`,this.mode=438,this.bytesWritten=0,i||={};for(var a=Object.keys(i),o=0,s=a.length;o<s;o++){var c=a[o];this[c]=i[c]}if(this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.start<0)throw Error(`start must be >= zero`);this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}})),d=t(((e,t)=>{t.exports=r;var n=Object.getPrototypeOf||function(e){return e.__proto__};function r(e){if(typeof e!=`object`||!e)return e;if(e instanceof Object)var t={__proto__:n(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}})),f=t(((e,t)=>{var r=n(`fs`),i=l(),a=u(),o=d(),s=n(`util`),c,f;typeof Symbol==`function`&&typeof Symbol.for==`function`?(c=Symbol.for(`graceful-fs.queue`),f=Symbol.for(`graceful-fs.previous`)):(c=`___graceful-fs.queue`,f=`___graceful-fs.previous`);function p(){}function m(e,t){Object.defineProperty(e,c,{get:function(){return t}})}var h=p;s.debuglog?h=s.debuglog(`gfs4`):/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&(h=function(){var e=s.format.apply(s,arguments);e=`GFS4: `+e.split(/\n/).join(`
|
|
8
|
+
GFS4: `),console.error(e)}),r[c]||(m(r,global[c]||[]),r.close=(function(e){function t(t,n){return e.call(r,t,function(e){e||b(),typeof n==`function`&&n.apply(this,arguments)})}return Object.defineProperty(t,f,{value:e}),t})(r.close),r.closeSync=(function(e){function t(t){e.apply(r,arguments),b()}return Object.defineProperty(t,f,{value:e}),t})(r.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&process.on(`exit`,function(){h(r[c]),n(`assert`).equal(r[c].length,0)})),global[c]||m(global,r[c]),t.exports=g(o(r)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!r.__patched&&(t.exports=g(r),r.__patched=!0);function g(e){i(e),e.gracefulify=g,e.createReadStream=E,e.createWriteStream=D;var t=e.readFile;e.readFile=n;function n(e,n,r){return typeof n==`function`&&(r=n,n=null),i(e,n,r);function i(e,n,r,a){return t(e,n,function(t){t&&(t.code===`EMFILE`||t.code===`ENFILE`)?v([i,[e,n,r],t,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var r=e.writeFile;e.writeFile=o;function o(e,t,n,i){return typeof n==`function`&&(i=n,n=null),a(e,t,n,i);function a(e,t,n,i,o){return r(e,t,n,function(r){r&&(r.code===`EMFILE`||r.code===`ENFILE`)?v([a,[e,t,n,i],r,o||Date.now(),Date.now()]):typeof i==`function`&&i.apply(this,arguments)})}}var s=e.appendFile;s&&(e.appendFile=c);function c(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return s(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?v([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var l=e.copyFile;l&&(e.copyFile=u);function u(e,t,n,r){return typeof n==`function`&&(r=n,n=0),i(e,t,n,r);function i(e,t,n,r,a){return l(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?v([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var d=e.readdir;e.readdir=p;var f=/^v[0-5]\./;function p(e,t,n){typeof t==`function`&&(n=t,t=null);var r=f.test(process.version)?function(e,t,n,r){return d(e,i(e,t,n,r))}:function(e,t,n,r){return d(e,t,i(e,t,n,r))};return r(e,t,n);function i(e,t,n,i){return function(a,o){a&&(a.code===`EMFILE`||a.code===`ENFILE`)?v([r,[e,t,n],a,i||Date.now(),Date.now()]):(o&&o.sort&&o.sort(),typeof n==`function`&&n.call(this,a,o))}}}if(process.version.substr(0,4)===`v0.8`){var m=a(e);S=m.ReadStream,w=m.WriteStream}var h=e.ReadStream;h&&(S.prototype=Object.create(h.prototype),S.prototype.open=C);var y=e.WriteStream;y&&(w.prototype=Object.create(y.prototype),w.prototype.open=T),Object.defineProperty(e,`ReadStream`,{get:function(){return S},set:function(e){S=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,`WriteStream`,{get:function(){return w},set:function(e){w=e},enumerable:!0,configurable:!0});var b=S;Object.defineProperty(e,`FileReadStream`,{get:function(){return b},set:function(e){b=e},enumerable:!0,configurable:!0});var x=w;Object.defineProperty(e,`FileWriteStream`,{get:function(){return x},set:function(e){x=e},enumerable:!0,configurable:!0});function S(e,t){return this instanceof S?(h.apply(this,arguments),this):S.apply(Object.create(S.prototype),arguments)}function C(){var e=this;k(e.path,e.flags,e.mode,function(t,n){t?(e.autoClose&&e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n),e.read())})}function w(e,t){return this instanceof w?(y.apply(this,arguments),this):w.apply(Object.create(w.prototype),arguments)}function T(){var e=this;k(e.path,e.flags,e.mode,function(t,n){t?(e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n))})}function E(t,n){return new e.ReadStream(t,n)}function D(t,n){return new e.WriteStream(t,n)}var O=e.open;e.open=k;function k(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return O(e,t,n,function(o,s){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?v([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}return e}function v(e){h(`ENQUEUE`,e[0].name,e[1]),r[c].push(e),x()}var y;function b(){for(var e=Date.now(),t=0;t<r[c].length;++t)r[c][t].length>2&&(r[c][t][3]=e,r[c][t][4]=e);x()}function x(){if(clearTimeout(y),y=void 0,r[c].length!==0){var e=r[c].shift(),t=e[0],n=e[1],i=e[2],a=e[3],o=e[4];if(a===void 0)h(`RETRY`,t.name,n),t.apply(null,n);else if(Date.now()-a>=6e4){h(`TIMEOUT`,t.name,n);var s=n.pop();typeof s==`function`&&s.call(null,i)}else{var l=Date.now()-o,u=Math.max(o-a,1);l>=Math.min(u*1.2,100)?(h(`RETRY`,t.name,n),t.apply(null,n.concat([a]))):r[c].push(e)}y===void 0&&(y=setTimeout(x,0))}}})),p=t(((e,t)=>{let n=e=>typeof e==`object`&&!!e&&typeof e.pipe==`function`;n.writable=e=>n(e)&&e.writable!==!1&&typeof e._write==`function`&&typeof e._writableState==`object`,n.readable=e=>n(e)&&e.readable!==!1&&typeof e._read==`function`&&typeof e._readableState==`object`,n.duplex=e=>n.writable(e)&&n.readable(e),n.transform=e=>n.duplex(e)&&typeof e._transform==`function`,t.exports=n})),m=t(((e,t)=>{typeof process>`u`||!process.version||process.version.indexOf(`v0.`)===0||process.version.indexOf(`v1.`)===0&&process.version.indexOf(`v1.8.`)!==0?t.exports={nextTick:n}:t.exports=process;function n(e,t,n,r){if(typeof e!=`function`)throw TypeError(`"callback" argument must be a function`);var i=arguments.length,a,o;switch(i){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,t)});case 3:return process.nextTick(function(){e.call(null,t,n)});case 4:return process.nextTick(function(){e.call(null,t,n,r)});default:for(a=Array(i-1),o=0;o<a.length;)a[o++]=arguments[o];return process.nextTick(function(){e.apply(null,a)})}}})),h=t(((e,t)=>{var n={}.toString;t.exports=Array.isArray||function(e){return n.call(e)==`[object Array]`}})),g=t(((e,t)=>{t.exports=n(`stream`)})),v=t(((e,t)=>{var r=n(`buffer`),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(a(r,e),e.Buffer=o);function o(e,t,n){return i(e,t,n)}a(i,o),o.from=function(e,t,n){if(typeof e==`number`)throw TypeError(`Argument must not be a number`);return i(e,t,n)},o.alloc=function(e,t,n){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);var r=i(e);return t===void 0?r.fill(0):typeof n==`string`?r.fill(t,n):r.fill(t),r},o.allocUnsafe=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return i(e)},o.allocUnsafeSlow=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return r.SlowBuffer(e)}})),y=t((e=>{function t(e){return Array.isArray?Array.isArray(e):g(e)===`[object Array]`}e.isArray=t;function r(e){return typeof e==`boolean`}e.isBoolean=r;function i(e){return e===null}e.isNull=i;function a(e){return e==null}e.isNullOrUndefined=a;function o(e){return typeof e==`number`}e.isNumber=o;function s(e){return typeof e==`string`}e.isString=s;function c(e){return typeof e==`symbol`}e.isSymbol=c;function l(e){return e===void 0}e.isUndefined=l;function u(e){return g(e)===`[object RegExp]`}e.isRegExp=u;function d(e){return typeof e==`object`&&!!e}e.isObject=d;function f(e){return g(e)===`[object Date]`}e.isDate=f;function p(e){return g(e)===`[object Error]`||e instanceof Error}e.isError=p;function m(e){return typeof e==`function`}e.isFunction=m;function h(e){return e===null||typeof e==`boolean`||typeof e==`number`||typeof e==`string`||typeof e==`symbol`||e===void 0}e.isPrimitive=h,e.isBuffer=n(`buffer`).Buffer.isBuffer;function g(e){return Object.prototype.toString.call(e)}})),b=t(((e,t)=>{typeof Object.create==`function`?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}})),x=t(((e,t)=>{try{var r=n(`util`);if(typeof r.inherits!=`function`)throw``;t.exports=r.inherits}catch{t.exports=b()}})),S=t(((e,t)=>{function r(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var i=v().Buffer,a=n(`util`);function o(e,t,n){e.copy(t,n)}t.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(this.length!==0){var e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(this.length===0)return``;for(var t=this.head,n=``+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(this.length===0)return i.alloc(0);for(var t=i.allocUnsafe(e>>>0),n=this.head,r=0;n;)o(n.data,t,r),r+=n.data.length,n=n.next;return t},e}(),a&&a.inspect&&a.inspect.custom&&(t.exports.prototype[a.inspect.custom]=function(){var e=a.inspect({length:this.length});return this.constructor.name+` `+e})})),C=t(((e,t)=>{var n=m();function r(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(a,this,e)):n.nextTick(a,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n.nextTick(a,r,e)):n.nextTick(a,r,e):t&&t(e)}),this)}function i(){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 a(e,t){e.emit(`error`,t)}t.exports={destroy:r,undestroy:i}})),w=t(((e,t)=>{t.exports=n(`util`).deprecate})),T=t(((e,t)=>{var n=m();t.exports=T;function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){U(t,e)}}var i=!process.browser&&[`v0.10`,`v0.9.`].indexOf(process.version.slice(0,5))>-1?setImmediate:n.nextTick,a;T.WritableState=b;var o=Object.create(y());o.inherits=x();var s={deprecate:w()},c=g(),l=v().Buffer,u=(typeof global<`u`?global:typeof window<`u`?window:typeof self<`u`?self:{}).Uint8Array||function(){};function d(e){return l.from(e)}function f(e){return l.isBuffer(e)||e instanceof u}var p=C();o.inherits(T,c);function h(){}function b(e,t){a||=E(),e||={};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,o=e.writableHighWaterMark,s=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:n&&(o||o===0)?this.highWaterMark=o:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=e.decodeStrings!==!1,this.defaultEncoding=e.defaultEncoding||`utf8`,this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){P(t,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 r(this)}b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},(function(){try{Object.defineProperty(b.prototype,`buffer`,{get:s.deprecate(function(){return this.getBuffer()},`_writableState.buffer is deprecated. Use _writableState.getBuffer instead.`,`DEP0003`)})}catch{}})();var S;typeof Symbol==`function`&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==`function`?(S=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(e){return S.call(this,e)?!0:this===T?e&&e._writableState instanceof b:!1}})):S=function(e){return e instanceof this};function T(e){if(a||=E(),!S.call(T,this)&&!(this instanceof a))return new T(e);this._writableState=new b(e,this),this.writable=!0,e&&(typeof e.write==`function`&&(this._write=e.write),typeof e.writev==`function`&&(this._writev=e.writev),typeof e.destroy==`function`&&(this._destroy=e.destroy),typeof e.final==`function`&&(this._final=e.final)),c.call(this)}T.prototype.pipe=function(){this.emit(`error`,Error(`Cannot pipe, not readable`))};function D(e,t){var r=Error(`write after end`);e.emit(`error`,r),n.nextTick(t,r)}function O(e,t,r,i){var a=!0,o=!1;return r===null?o=TypeError(`May not write null values to stream`):typeof r!=`string`&&r!==void 0&&!t.objectMode&&(o=TypeError(`Invalid non-string/buffer chunk`)),o&&(e.emit(`error`,o),n.nextTick(i,o),a=!1),a}T.prototype.write=function(e,t,n){var r=this._writableState,i=!1,a=!r.objectMode&&f(e);return a&&!l.isBuffer(e)&&(e=d(e)),typeof t==`function`&&(n=t,t=null),a?t=`buffer`:t||=r.defaultEncoding,typeof n!=`function`&&(n=h),r.ended?D(this,n):(a||O(this,r,e,n))&&(r.pendingcb++,i=A(this,r,a,e,t,n)),i},T.prototype.cork=function(){var e=this._writableState;e.corked++},T.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&L(this,e))},T.prototype.setDefaultEncoding=function(e){if(typeof e==`string`&&(e=e.toLowerCase()),!([`hex`,`utf8`,`utf-8`,`ascii`,`binary`,`base64`,`ucs2`,`ucs-2`,`utf16le`,`utf-16le`,`raw`].indexOf((e+``).toLowerCase())>-1))throw TypeError(`Unknown encoding: `+e);return this._writableState.defaultEncoding=e,this};function k(e,t,n){return!e.objectMode&&e.decodeStrings!==!1&&typeof t==`string`&&(t=l.from(t,n)),t}Object.defineProperty(T.prototype,`writableHighWaterMark`,{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function A(e,t,n,r,i,a){if(!n){var o=k(t,r,i);r!==o&&(n=!0,i=`buffer`,r=o)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else j(e,t,!1,s,r,i,a);return c}function j(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function M(e,t,r,i,a){--t.pendingcb,r?(n.nextTick(a,i),n.nextTick(V,e,t),e._writableState.errorEmitted=!0,e.emit(`error`,i)):(a(i),e._writableState.errorEmitted=!0,e.emit(`error`,i),V(e,t))}function N(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function P(e,t){var n=e._writableState,r=n.sync,a=n.writecb;if(N(n),t)M(e,n,r,t,a);else{var o=R(n);!o&&!n.corked&&!n.bufferProcessing&&n.bufferedRequest&&L(e,n),r?i(F,e,n,o,a):F(e,n,o,a)}}function F(e,t,n,r){n||I(e,t),t.pendingcb--,r(),V(e,t)}function I(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit(`drain`))}function L(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var i=t.bufferedRequestCount,a=Array(i),o=t.corkedRequestsFree;o.entry=n;for(var s=0,c=!0;n;)a[s]=n,n.isBuf||(c=!1),n=n.next,s+=1;a.allBuffers=c,j(e,t,!0,t.length,a,``,o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,u=n.encoding,d=n.callback;if(j(e,t,!1,t.objectMode?1:l.length,l,u,d),n=n.next,t.bufferedRequestCount--,t.writing)break}n===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}T.prototype._write=function(e,t,n){n(Error(`_write() is not implemented`))},T.prototype._writev=null,T.prototype.end=function(e,t,n){var r=this._writableState;typeof e==`function`?(n=e,e=null,t=null):typeof t==`function`&&(n=t,t=null),e!=null&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||H(this,r,n)};function R(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function z(e,t){e._final(function(n){t.pendingcb--,n&&e.emit(`error`,n),t.prefinished=!0,e.emit(`prefinish`),V(e,t)})}function B(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final==`function`?(t.pendingcb++,t.finalCalled=!0,n.nextTick(z,e,t)):(t.prefinished=!0,e.emit(`prefinish`)))}function V(e,t){var n=R(t);return n&&(B(e,t),t.pendingcb===0&&(t.finished=!0,e.emit(`finish`))),n}function H(e,t,r){t.ending=!0,V(e,t),r&&(t.finished?n.nextTick(r):e.once(`finish`,r)),t.ended=!0,e.writable=!1}function U(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}Object.defineProperty(T.prototype,`destroyed`,{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),T.prototype.destroy=p.destroy,T.prototype._undestroy=p.undestroy,T.prototype._destroy=function(e,t){this.end(),t(e)}})),E=t(((e,t)=>{var n=m(),r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=u;var i=Object.create(y());i.inherits=x();var a=O(),o=T();i.inherits(u,a);for(var s=r(o.prototype),c=0;c<s.length;c++){var l=s[c];u.prototype[l]||(u.prototype[l]=o.prototype[l])}function u(e){if(!(this instanceof u))return new u(e);a.call(this,e),o.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once(`end`,d)}Object.defineProperty(u.prototype,`writableHighWaterMark`,{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function d(){this.allowHalfOpen||this._writableState.ended||n.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(u.prototype,`destroyed`,{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),u.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}})),D=t((e=>{var t=v().Buffer,n=t.isEncoding||function(e){switch(e=``+e,e&&e.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(e){if(!e)return`utf8`;for(var t;;)switch(e){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 e;default:if(t)return;e=(``+e).toLowerCase(),t=!0}}function i(e){var i=r(e);if(typeof i!=`string`&&(t.isEncoding===n||!n(e)))throw Error(`Unknown encoding: `+e);return i||e}e.StringDecoder=a;function a(e){this.encoding=i(e);var n;switch(this.encoding){case`utf16le`:this.text=f,this.end=p,n=4;break;case`utf8`:this.fillLast=l,n=4;break;case`base64`:this.text=m,this.end=h,n=3;break;default:this.write=g,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(n)}a.prototype.write=function(e){if(e.length===0)return``;var t,n;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return``;n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||``},a.prototype.end=d,a.prototype.text=u,a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e,t,n){var r=t.length-1;if(r<n)return 0;var i=o(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||i===-2?0:(i=o(t[r]),i>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||i===-2?0:(i=o(t[r]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function c(e,t,n){if((t[0]&192)!=128)return e.lastNeed=0,`�`;if(e.lastNeed>1&&t.length>1){if((t[1]&192)!=128)return e.lastNeed=1,`�`;if(e.lastNeed>2&&t.length>2&&(t[2]&192)!=128)return e.lastNeed=2,`�`}}function l(e){var t=this.lastTotal-this.lastNeed,n=c(this,e,t);if(n!==void 0)return n;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function u(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString(`utf8`,t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString(`utf8`,t,r)}function d(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+`�`:t}function f(e,t){if((e.length-t)%2==0){var n=e.toString(`utf16le`,t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(`utf16le`,t,e.length-1)}function p(e){var t=e&&e.length?this.write(e):``;if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(`utf16le`,0,n)}return t}function m(e,t){var n=(e.length-t)%3;return n===0?e.toString(`base64`,t):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(`base64`,t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+this.lastChar.toString(`base64`,0,3-this.lastNeed):t}function g(e){return e.toString(this.encoding)}function y(e){return e&&e.length?this.write(e):``}})),O=t(((e,t)=>{var r=m();t.exports=M;var i=h(),a;M.ReadableState=j,n(`events`).EventEmitter;var o=function(e,t){return e.listeners(t).length},s=g(),c=v().Buffer,l=(typeof global<`u`?global:typeof window<`u`?window:typeof self<`u`?self:{}).Uint8Array||function(){};function u(e){return c.from(e)}function d(e){return c.isBuffer(e)||e instanceof l}var f=Object.create(y());f.inherits=x();var p=n(`util`),b=void 0;b=p&&p.debuglog?p.debuglog(`stream`):function(){};var w=S(),T=C(),O;f.inherits(M,s);var k=[`error`,`close`,`destroy`,`pause`,`resume`];function A(e,t,n){if(typeof e.prependListener==`function`)return e.prependListener(t,n);!e._events||!e._events[t]?e.on(t,n):i(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]}function j(e,t){a||=E(),e||={};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=e.readableHighWaterMark,o=this.objectMode?16:16*1024;r||r===0?this.highWaterMark=r:n&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new w,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=e.defaultEncoding||`utf8`,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(O||=D().StringDecoder,this.decoder=new O(e.encoding),this.encoding=e.encoding)}function M(e){if(a||=E(),!(this instanceof M))return new M(e);this._readableState=new j(e,this),this.readable=!0,e&&(typeof e.read==`function`&&(this._read=e.read),typeof e.destroy==`function`&&(this._destroy=e.destroy)),s.call(this)}Object.defineProperty(M.prototype,`destroyed`,{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),M.prototype.destroy=T.destroy,M.prototype._undestroy=T.undestroy,M.prototype._destroy=function(e,t){this.push(null),t(e)},M.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:typeof e==`string`&&(t||=n.defaultEncoding,t!==n.encoding&&(e=c.from(e,t),t=``),r=!0),N(this,e,t,!1,r)},M.prototype.unshift=function(e){return N(this,e,null,!0,!1)};function N(e,t,n,r,i){var a=e._readableState;if(t===null)a.reading=!1,B(e,a);else{var o;i||(o=F(a,t)),o?e.emit(`error`,o):a.objectMode||t&&t.length>0?(typeof t!=`string`&&!a.objectMode&&Object.getPrototypeOf(t)!==c.prototype&&(t=u(t)),r?a.endEmitted?e.emit(`error`,Error(`stream.unshift() after end event`)):P(e,a,t,!0):a.ended?e.emit(`error`,Error(`stream.push() after EOF`)):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||t.length!==0?P(e,a,t,!1):U(e,a)):P(e,a,t,!1))):r||(a.reading=!1)}return I(a)}function P(e,t,n,r){t.flowing&&t.length===0&&!t.sync?(e.emit(`data`,n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&V(e)),U(e,t)}function F(e,t){var n;return!d(t)&&typeof t!=`string`&&t!==void 0&&!e.objectMode&&(n=TypeError(`Invalid non-string/buffer chunk`)),n}function I(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}M.prototype.isPaused=function(){return this._readableState.flowing===!1},M.prototype.setEncoding=function(e){return O||=D().StringDecoder,this._readableState.decoder=new O(e),this._readableState.encoding=e,this};var L=8388608;function R(e){return e>=L?e=L:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function z(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e===e?(e>t.highWaterMark&&(t.highWaterMark=R(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0)):t.flowing&&t.length?t.buffer.head.data.length:t.length}M.prototype.read=function(e){b(`read`,e),e=parseInt(e,10);var t=this._readableState,n=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return b(`read: emitReadable`,t.length,t.ended),t.length===0&&t.ended?ae(this):V(this),null;if(e=z(e,t),e===0&&t.ended)return t.length===0&&ae(this),null;var r=t.needReadable;b(`need readable`,r),(t.length===0||t.length-e<t.highWaterMark)&&(r=!0,b(`length less than watermark`,r)),t.ended||t.reading?(r=!1,b(`reading or ended`,r)):r&&(b(`do read`),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=z(n,t)));var i=e>0?ne(e,t):null;return i===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&ae(this)),i!==null&&this.emit(`data`,i),i};function B(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,V(e)}}function V(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(b(`emitReadable`,t.flowing),t.emittedReadable=!0,t.sync?r.nextTick(H,e):H(e))}function H(e){b(`emit readable`),e.emit(`readable`),te(e)}function U(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(W,e,t))}function W(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(b(`maybeReadMore read 0`),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}M.prototype._read=function(e){this.emit(`error`,Error(`_read() is not implemented`))},M.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,b(`pipe count=%d opts=%j`,i.pipesCount,t);var a=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr?c:v;i.endEmitted?r.nextTick(a):n.once(`end`,a),e.on(`unpipe`,s);function s(e,t){b(`onunpipe`),e===n&&t&&t.hasUnpiped===!1&&(t.hasUnpiped=!0,d())}function c(){b(`onend`),e.end()}var l=G(n);e.on(`drain`,l);var u=!1;function d(){b(`cleanup`),e.removeListener(`close`,h),e.removeListener(`finish`,g),e.removeListener(`drain`,l),e.removeListener(`error`,m),e.removeListener(`unpipe`,s),n.removeListener(`end`,c),n.removeListener(`end`,v),n.removeListener(`data`,p),u=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&l()}var f=!1;n.on(`data`,p);function p(t){b(`ondata`),f=!1,!1===e.write(t)&&!f&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&se(i.pipes,e)!==-1)&&!u&&(b(`false write response, pause`,i.awaitDrain),i.awaitDrain++,f=!0),n.pause())}function m(t){b(`onerror`,t),v(),e.removeListener(`error`,m),o(e,`error`)===0&&e.emit(`error`,t)}A(e,`error`,m);function h(){e.removeListener(`finish`,g),v()}e.once(`close`,h);function g(){b(`onfinish`),e.removeListener(`close`,h),v()}e.once(`finish`,g);function v(){b(`unpipe`),n.unpipe(e)}return e.emit(`pipe`,n),i.flowing||(b(`pipe resume`),n.resume()),e};function G(e){return function(){var t=e._readableState;b(`pipeOnDrain`,t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&o(e,`data`)&&(t.flowing=!0,te(e))}}M.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||=t.pipes,t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit(`unpipe`,this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)r[a].emit(`unpipe`,this,{hasUnpiped:!1});return this}var o=se(t.pipes,e);return o===-1?this:(t.pipes.splice(o,1),--t.pipesCount,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit(`unpipe`,this,n),this)},M.prototype.on=function(e,t){var n=s.prototype.on.call(this,e,t);if(e===`data`)this._readableState.flowing!==!1&&this.resume();else if(e===`readable`){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&V(this):r.nextTick(K,this))}return n},M.prototype.addListener=M.prototype.on;function K(e){b(`readable nexttick read 0`),e.read(0)}M.prototype.resume=function(){var e=this._readableState;return e.flowing||(b(`resume`),e.flowing=!0,ee(this,e)),this};function ee(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(q,e,t))}function q(e,t){t.reading||(b(`resume read 0`),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit(`resume`),te(e),t.flowing&&!t.reading&&e.read(0)}M.prototype.pause=function(){return b(`call pause flowing=%j`,this._readableState.flowing),!1!==this._readableState.flowing&&(b(`pause`),this._readableState.flowing=!1,this.emit(`pause`)),this};function te(e){var t=e._readableState;for(b(`flow`,t.flowing);t.flowing&&e.read()!==null;);}M.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on(`end`,function(){if(b(`wrapped end`),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on(`data`,function(i){b(`wrapped data`),n.decoder&&(i=n.decoder.write(i)),!(n.objectMode&&i==null)&&(!n.objectMode&&(!i||!i.length)||t.push(i)||(r=!0,e.pause()))}),e)this[i]===void 0&&typeof e[i]==`function`&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<k.length;a++)e.on(k[a],this.emit.bind(this,k[a]));return this._read=function(t){b(`wrapped _read`,t),r&&(r=!1,e.resume())},this},Object.defineProperty(M.prototype,`readableHighWaterMark`,{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),M._fromList=ne;function ne(e,t){if(t.length===0)return null;var n;return t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(``):t.buffer.length===1?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=re(e,t.buffer,t.decoder),n}function re(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?J(e,t):ie(e,t),r}function J(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),e-=o,e===0){o===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++r}return t.length-=r,i}function ie(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,o),e-=o,e===0){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}function ae(e){var t=e._readableState;if(t.length>0)throw Error(`"endReadable()" called on non-empty stream`);t.endEmitted||(t.ended=!0,r.nextTick(oe,t,e))}function oe(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit(`end`))}function se(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}})),k=t(((e,t)=>{t.exports=a;var n=E(),r=Object.create(y());r.inherits=x(),r.inherits(a,n);function i(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit(`error`,Error(`write callback called multiple times`));n.writechunk=null,n.writecb=null,t!=null&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform==`function`&&(this._transform=e.transform),typeof e.flush==`function`&&(this._flush=e.flush)),this.on(`prefinish`,o)}function o(){var e=this;typeof this._flush==`function`?this._flush(function(t,n){s(e,t,n)}):s(this,null,null)}a.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw Error(`_transform() is not implemented`)},a.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,function(e){t(e),r.emit(`close`)})};function s(e,t,n){if(t)return e.emit(`error`,t);if(n!=null&&e.push(n),e._writableState.length)throw Error(`Calling transform done when ws.length != 0`);if(e._transformState.transforming)throw Error(`Calling transform done when still transforming`);return e.push(null)}})),A=t(((e,t)=>{t.exports=i;var n=k(),r=Object.create(y());r.inherits=x(),r.inherits(i,n);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}i.prototype._transform=function(e,t,n){n(null,e)}})),j=t(((e,t)=>{var r=n(`stream`);process.env.READABLE_STREAM===`disable`&&r?(t.exports=r,e=t.exports=r.Readable,e.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=O(),e.Stream=r||e,e.Readable=e,e.Writable=T(),e.Duplex=E(),e.Transform=k(),e.PassThrough=A())})),M=t(((e,t)=>{t.exports=j().PassThrough})),N=t(((e,t)=>{var r=n(`util`),i=M();t.exports={Readable:o,Writable:s},r.inherits(o,i),r.inherits(s,i);function a(e,t,n){e[t]=function(){return delete e[t],n.apply(this,arguments),this[t].apply(this,arguments)}}function o(e,t){if(!(this instanceof o))return new o(e,t);i.call(this,t),a(this,`_read`,function(){var n=e.call(this,t),r=this.emit.bind(this,`error`);n.on(`error`,r),n.pipe(this)}),this.emit(`readable`)}function s(e,t){if(!(this instanceof s))return new s(e,t);i.call(this,t),a(this,`_write`,function(){var n=e.call(this,t),r=this.emit.bind(this,`error`);n.on(`error`,r),this.pipe(n)}),this.emit(`writable`)}})),P=t(((e,t)=>{
|
|
9
|
+
/*!
|
|
10
|
+
* normalize-path <https://github.com/jonschlinkert/normalize-path>
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) 2014-2018, Jon Schlinkert.
|
|
13
|
+
* Released under the MIT License.
|
|
14
|
+
*/
|
|
15
|
+
t.exports=function(e,t){if(typeof e!=`string`)throw TypeError(`expected path to be a string`);if(e===`\\`||e===`/`)return`/`;var n=e.length;if(n<=1)return e;var r=``;if(n>4&&e[3]===`\\`){var i=e[2];(i===`?`||i===`.`)&&e.slice(0,2)===`\\\\`&&(e=e.slice(2),r=`//`)}var a=e.split(/[/\\]+/);return t!==!1&&a[a.length-1]===``&&a.pop(),r+a.join(`/`)}})),F=t(((e,t)=>{function n(e){return e}t.exports=n})),I=t(((e,t)=>{function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=n})),L=t(((e,t)=>{var n=I(),r=Math.max;function i(e,t,i){return t=r(t===void 0?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=r(a.length-t,0),c=Array(s);++o<s;)c[o]=a[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=a[o];return l[t]=i(c),n(e,this,l)}}t.exports=i})),R=t(((e,t)=>{function n(e){return function(){return e}}t.exports=n})),z=t(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),B=t(((e,t)=>{var n=z(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),V=t(((e,t)=>{t.exports=B().Symbol})),H=t(((e,t)=>{var n=V(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),U=t(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),W=t(((e,t)=>{var n=V(),r=H(),i=U(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),G=t(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),K=t(((e,t)=>{var n=W(),r=G(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),ee=t(((e,t)=>{t.exports=B()[`__core-js_shared__`]})),q=t(((e,t)=>{var n=ee(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),te=t(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),ne=t(((e,t)=>{var n=K(),r=q(),i=G(),a=te(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),re=t(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),J=t(((e,t)=>{var n=ne(),r=re();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),ie=t(((e,t)=>{var n=J();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),ae=t(((e,t)=>{var n=R(),r=ie(),i=F();t.exports=r?function(e,t){return r(e,`toString`,{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i})),oe=t(((e,t)=>{var n=800,r=16,i=Date.now;function a(e){var t=0,a=0;return function(){var o=i(),s=r-(o-a);if(a=o,s>0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=a})),se=t(((e,t)=>{var n=ae();t.exports=oe()(n)})),ce=t(((e,t)=>{var n=F(),r=L(),i=se();function a(e,t){return i(r(e,t,n),e+``)}t.exports=a})),le=t(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),ue=t(((e,t)=>{var n=9007199254740991;function r(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=n}t.exports=r})),de=t(((e,t)=>{var n=K(),r=ue();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),Y=t(((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(e,t){var i=typeof e;return t??=n,!!t&&(i==`number`||i!=`symbol`&&r.test(e))&&e>-1&&e%1==0&&e<t}t.exports=i})),fe=t(((e,t)=>{var n=le(),r=de(),i=Y(),a=G();function o(e,t,o){if(!a(o))return!1;var s=typeof t;return(s==`number`?r(o)&&i(t,o.length):s==`string`&&t in o)?n(o[t],e):!1}t.exports=o})),pe=t(((e,t)=>{function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=n})),me=t(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),he=t(((e,t)=>{var n=W(),r=me(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),ge=t(((e,t)=>{var n=he(),r=me(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),_e=t(((e,t)=>{t.exports=Array.isArray})),ve=t(((e,t)=>{function n(){return!1}t.exports=n})),ye=t(((e,t)=>{var n=B(),r=ve(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),be=t(((e,t)=>{var n=W(),r=ue(),i=me(),a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,l=`[object Error]`,u=`[object Function]`,d=`[object Map]`,f=`[object Number]`,p=`[object Object]`,m=`[object RegExp]`,h=`[object Set]`,g=`[object String]`,v=`[object WeakMap]`,y=`[object ArrayBuffer]`,b=`[object DataView]`,x=`[object Float32Array]`,S=`[object Float64Array]`,C=`[object Int8Array]`,w=`[object Int16Array]`,T=`[object Int32Array]`,E=`[object Uint8Array]`,D=`[object Uint8ClampedArray]`,O=`[object Uint16Array]`,k=`[object Uint32Array]`,A={};A[x]=A[S]=A[C]=A[w]=A[T]=A[E]=A[D]=A[O]=A[k]=!0,A[a]=A[o]=A[y]=A[s]=A[b]=A[c]=A[l]=A[u]=A[d]=A[f]=A[p]=A[m]=A[h]=A[g]=A[v]=!1;function j(e){return i(e)&&r(e.length)&&!!A[n(e)]}t.exports=j})),xe=t(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),Se=t(((e,t)=>{var n=z(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),X=t(((e,t)=>{var n=be(),r=xe(),i=Se(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),Ce=t(((e,t)=>{var n=pe(),r=ge(),i=_e(),a=ye(),o=Y(),s=X(),c=Object.prototype.hasOwnProperty;function l(e,t){var l=i(e),u=!l&&r(e),d=!l&&!u&&a(e),f=!l&&!u&&!d&&s(e),p=l||u||d||f,m=p?n(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(p&&(g==`length`||d&&(g==`offset`||g==`parent`)||f&&(g==`buffer`||g==`byteLength`||g==`byteOffset`)||o(g,h)))&&m.push(g);return m}t.exports=l})),we=t(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),Te=t(((e,t)=>{function n(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}t.exports=n})),Ee=t(((e,t)=>{var n=G(),r=we(),i=Te(),a=Object.prototype.hasOwnProperty;function o(e){if(!n(e))return i(e);var t=r(e),o=[];for(var s in e)s==`constructor`&&(t||!a.call(e,s))||o.push(s);return o}t.exports=o})),De=t(((e,t)=>{var n=Ce(),r=Ee(),i=de();function a(e){return i(e)?n(e,!0):r(e)}t.exports=a})),Oe=t(((e,t)=>{var n=ce(),r=le(),i=fe(),a=De(),o=Object.prototype,s=o.hasOwnProperty;t.exports=n(function(e,t){e=Object(e);var n=-1,c=t.length,l=c>2?t[2]:void 0;for(l&&i(t[0],t[1],l)&&(c=1);++n<c;)for(var u=t[n],d=a(u),f=-1,p=d.length;++f<p;){var m=d[f],h=e[m];(h===void 0||r(h,o[m])&&!s.call(e,m))&&(e[m]=u[m])}return e})})),Z=t(((e,t)=>{t.exports={AggregateError:class extends Error{constructor(e){if(!Array.isArray(e))throw TypeError(`Expected input to be an Array, got ${typeof e}`);let t=``;for(let n=0;n<e.length;n++)t+=` ${e[n].stack}\n`;super(t),this.name=`AggregateError`,this.errors=e}},ArrayIsArray(e){return Array.isArray(e)},ArrayPrototypeIncludes(e,t){return e.includes(t)},ArrayPrototypeIndexOf(e,t){return e.indexOf(t)},ArrayPrototypeJoin(e,t){return e.join(t)},ArrayPrototypeMap(e,t){return e.map(t)},ArrayPrototypePop(e,t){return e.pop(t)},ArrayPrototypePush(e,t){return e.push(t)},ArrayPrototypeSlice(e,t,n){return e.slice(t,n)},Error,FunctionPrototypeCall(e,t,...n){return e.call(t,...n)},FunctionPrototypeSymbolHasInstance(e,t){return Function.prototype[Symbol.hasInstance].call(e,t)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:2**53-1,NumberMIN_SAFE_INTEGER:-(2**53-1),NumberParseInt:Number.parseInt,ObjectDefineProperties(e,t){return Object.defineProperties(e,t)},ObjectDefineProperty(e,t,n){return Object.defineProperty(e,t,n)},ObjectGetOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)},ObjectKeys(e){return Object.keys(e)},ObjectSetPrototypeOf(e,t){return Object.setPrototypeOf(e,t)},Promise,PromisePrototypeCatch(e,t){return e.catch(t)},PromisePrototypeThen(e,t,n){return e.then(t,n)},PromiseReject(e){return Promise.reject(e)},PromiseResolve(e){return Promise.resolve(e)},ReflectApply:Reflect.apply,RegExpPrototypeTest(e,t){return e.test(t)},SafeSet:Set,String,StringPrototypeSlice(e,t,n){return e.slice(t,n)},StringPrototypeToLowerCase(e){return e.toLowerCase()},StringPrototypeToUpperCase(e){return e.toUpperCase()},StringPrototypeTrim(e){return e.trim()},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(e,t,n){return e.set(t,n)},Boolean,Uint8Array}})),ke=t(((e,t)=>{t.exports={format(e,...t){return e.replace(/%([sdifj])/g,function(...[e,n]){let r=t.shift();return n===`f`?r.toFixed(6):n===`j`?JSON.stringify(r):n===`s`&&typeof r==`object`?`${r.constructor===Object?``:r.constructor.name} {}`.trim():r.toString()})},inspect(e){switch(typeof e){case`string`:if(e.includes(`'`))if(e.includes(`"`)){if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}else return`"${e}"`;return`'${e}'`;case`number`:return isNaN(e)?`NaN`:Object.is(e,-0)?String(e):e;case`bigint`:return`${String(e)}n`;case`boolean`:case`undefined`:return String(e);case`object`:return`{}`}}}})),Q=t(((e,t)=>{let{format:n,inspect:r}=ke(),{AggregateError:i}=Z(),a=globalThis.AggregateError||i,o=Symbol(`kIsNodeError`),s=[`string`,`function`,`number`,`object`,`Function`,`Object`,`boolean`,`bigint`,`symbol`],c=/^([A-Z][a-z0-9]*)+$/,l={};function u(e,t){if(!e)throw new l.ERR_INTERNAL_ASSERTION(t)}function d(e){let t=``,n=e.length,r=e[0]===`-`?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function f(e,t,r){if(typeof t==`function`)return u(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);let i=(t.match(/%[dfijoOs]/g)||[]).length;return u(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),r.length===0?t:n(t,...r)}function p(e,t,n){n||=Error;class r extends n{constructor(...n){super(f(e,t,n))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(r.prototype,{name:{value:n.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),r.prototype.code=e,r.prototype[o]=!0,l[e]=r}function m(e){let t=`__node_internal_`+e.name;return Object.defineProperty(e,`name`,{value:t}),e}function h(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;let n=new a([t,e],t.message);return n.code=t.code,n}return e||t}var g=class extends Error{constructor(e=`The operation was aborted`,t=void 0){if(t!==void 0&&typeof t!=`object`)throw new l.ERR_INVALID_ARG_TYPE(`options`,`Object`,t);super(e,t),this.code=`ABORT_ERR`,this.name=`AbortError`}};p(`ERR_ASSERTION`,`%s`,Error),p(`ERR_INVALID_ARG_TYPE`,(e,t,n)=>{u(typeof e==`string`,`'name' must be a string`),Array.isArray(t)||(t=[t]);let i=`The `;e.endsWith(` argument`)?i+=`${e} `:i+=`"${e}" ${e.includes(`.`)?`property`:`argument`} `,i+=`must be `;let a=[],o=[],l=[];for(let e of t)u(typeof e==`string`,`All expected entries have to be of type string`),s.includes(e)?a.push(e.toLowerCase()):c.test(e)?o.push(e):(u(e!==`object`,`The value "object" should be written as "Object"`),l.push(e));if(o.length>0){let e=a.indexOf(`object`);e!==-1&&(a.splice(a,e,1),o.push(`Object`))}if(a.length>0){switch(a.length){case 1:i+=`of type ${a[0]}`;break;case 2:i+=`one of type ${a[0]} or ${a[1]}`;break;default:{let e=a.pop();i+=`one of type ${a.join(`, `)}, or ${e}`}}(o.length>0||l.length>0)&&(i+=` or `)}if(o.length>0){switch(o.length){case 1:i+=`an instance of ${o[0]}`;break;case 2:i+=`an instance of ${o[0]} or ${o[1]}`;break;default:{let e=o.pop();i+=`an instance of ${o.join(`, `)}, or ${e}`}}l.length>0&&(i+=` or `)}switch(l.length){case 0:break;case 1:l[0].toLowerCase()!==l[0]&&(i+=`an `),i+=`${l[0]}`;break;case 2:i+=`one of ${l[0]} or ${l[1]}`;break;default:{let e=l.pop();i+=`one of ${l.join(`, `)}, or ${e}`}}if(n==null)i+=`. Received ${n}`;else if(typeof n==`function`&&n.name)i+=`. Received function ${n.name}`;else if(typeof n==`object`){var d;if((d=n.constructor)!=null&&d.name)i+=`. Received an instance of ${n.constructor.name}`;else{let e=r(n,{depth:-1});i+=`. Received ${e}`}}else{let e=r(n,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),i+=`. Received type ${typeof n} (${e})`}return i},TypeError),p(`ERR_INVALID_ARG_VALUE`,(e,t,n=`is invalid`)=>{let i=r(t);return i.length>128&&(i=i.slice(0,128)+`...`),`The ${e.includes(`.`)?`property`:`argument`} '${e}' ${n}. Received ${i}`},TypeError),p(`ERR_INVALID_RETURN_VALUE`,(e,t,n)=>{var r;return`Expected ${e} to be returned from the "${t}" function but got ${n!=null&&(r=n.constructor)!=null&&r.name?`instance of ${n.constructor.name}`:`type ${typeof n}`}.`},TypeError),p(`ERR_MISSING_ARGS`,(...e)=>{u(e.length>0,`At least one arg needs to be specified`);let t,n=e.length;switch(e=(Array.isArray(e)?e:[e]).map(e=>`"${e}"`).join(` or `),n){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{let n=e.pop();t+=`The ${e.join(`, `)}, and ${n} arguments`}break}return`${t} must be specified`},TypeError),p(`ERR_OUT_OF_RANGE`,(e,t,n)=>{u(t,`Missing "range" argument`);let i;if(Number.isInteger(n)&&Math.abs(n)>2**32)i=d(String(n));else if(typeof n==`bigint`){i=String(n);let e=BigInt(2)**BigInt(32);(n>e||n<-e)&&(i=d(i)),i+=`n`}else i=r(n);return`The value of "${e}" is out of range. It must be ${t}. Received ${i}`},RangeError),p(`ERR_MULTIPLE_CALLBACK`,`Callback called multiple times`,Error),p(`ERR_METHOD_NOT_IMPLEMENTED`,`The %s method is not implemented`,Error),p(`ERR_STREAM_ALREADY_FINISHED`,`Cannot call %s after a stream was finished`,Error),p(`ERR_STREAM_CANNOT_PIPE`,`Cannot pipe, not readable`,Error),p(`ERR_STREAM_DESTROYED`,`Cannot call %s after a stream was destroyed`,Error),p(`ERR_STREAM_NULL_VALUES`,`May not write null values to stream`,TypeError),p(`ERR_STREAM_PREMATURE_CLOSE`,`Premature close`,Error),p(`ERR_STREAM_PUSH_AFTER_EOF`,`stream.push() after EOF`,Error),p(`ERR_STREAM_UNSHIFT_AFTER_END_EVENT`,`stream.unshift() after end event`,Error),p(`ERR_STREAM_WRITE_AFTER_END`,`write after end`,Error),p(`ERR_UNKNOWN_ENCODING`,`Unknown encoding: %s`,TypeError),t.exports={AbortError:g,aggregateTwoErrors:m(h),hideStackFrames:m,codes:l}})),Ae=t(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});let n=new WeakMap,r=new WeakMap;function i(e){let t=n.get(e);return console.assert(t!=null,`'this' is expected an Event object, but got`,e),t}function a(e){if(e.passiveListener!=null){typeof console<`u`&&typeof console.error==`function`&&console.error(`Unable to preventDefault inside passive event listener invocation.`,e.passiveListener);return}e.event.cancelable&&(e.canceled=!0,typeof e.event.preventDefault==`function`&&e.event.preventDefault())}function o(e,t){n.set(this,{eventTarget:e,event:t,eventPhase:2,currentTarget:e,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:t.timeStamp||Date.now()}),Object.defineProperty(this,`isTrusted`,{value:!1,enumerable:!0});let r=Object.keys(t);for(let e=0;e<r.length;++e){let t=r[e];t in this||Object.defineProperty(this,t,s(t))}}o.prototype={get type(){return i(this).event.type},get target(){return i(this).eventTarget},get currentTarget(){return i(this).currentTarget},composedPath(){let e=i(this).currentTarget;return e==null?[]:[e]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return i(this).eventPhase},stopPropagation(){let e=i(this);e.stopped=!0,typeof e.event.stopPropagation==`function`&&e.event.stopPropagation()},stopImmediatePropagation(){let e=i(this);e.stopped=!0,e.immediateStopped=!0,typeof e.event.stopImmediatePropagation==`function`&&e.event.stopImmediatePropagation()},get bubbles(){return!!i(this).event.bubbles},get cancelable(){return!!i(this).event.cancelable},preventDefault(){a(i(this))},get defaultPrevented(){return i(this).canceled},get composed(){return!!i(this).event.composed},get timeStamp(){return i(this).timeStamp},get srcElement(){return i(this).eventTarget},get cancelBubble(){return i(this).stopped},set cancelBubble(e){if(!e)return;let t=i(this);t.stopped=!0,typeof t.event.cancelBubble==`boolean`&&(t.event.cancelBubble=!0)},get returnValue(){return!i(this).canceled},set returnValue(e){e||a(i(this))},initEvent(){}},Object.defineProperty(o.prototype,`constructor`,{value:o,configurable:!0,writable:!0}),typeof window<`u`&&window.Event!==void 0&&(Object.setPrototypeOf(o.prototype,window.Event.prototype),r.set(window.Event.prototype,o));function s(e){return{get(){return i(this).event[e]},set(t){i(this).event[e]=t},configurable:!0,enumerable:!0}}function c(e){return{value(){let t=i(this).event;return t[e].apply(t,arguments)},configurable:!0,enumerable:!0}}function l(e,t){let n=Object.keys(t);if(n.length===0)return e;function r(t,n){e.call(this,t,n)}r.prototype=Object.create(e.prototype,{constructor:{value:r,configurable:!0,writable:!0}});for(let i=0;i<n.length;++i){let a=n[i];if(!(a in e.prototype)){let e=typeof Object.getOwnPropertyDescriptor(t,a).value==`function`;Object.defineProperty(r.prototype,a,e?c(a):s(a))}}return r}function u(e){if(e==null||e===Object.prototype)return o;let t=r.get(e);return t??(t=l(u(Object.getPrototypeOf(e)),e),r.set(e,t)),t}function d(e,t){return new(u(Object.getPrototypeOf(t)))(e,t)}function f(e){return i(e).immediateStopped}function p(e,t){i(e).eventPhase=t}function m(e,t){i(e).currentTarget=t}function h(e,t){i(e).passiveListener=t}let g=new WeakMap;function v(e){return typeof e==`object`&&!!e}function y(e){let t=g.get(e);if(t==null)throw TypeError(`'this' is expected an EventTarget object, but got another value.`);return t}function b(e){return{get(){let t=y(this).get(e);for(;t!=null;){if(t.listenerType===3)return t.listener;t=t.next}return null},set(t){typeof t!=`function`&&!v(t)&&(t=null);let n=y(this),r=null,i=n.get(e);for(;i!=null;)i.listenerType===3?r===null?i.next===null?n.delete(e):n.set(e,i.next):r.next=i.next:r=i,i=i.next;if(t!==null){let i={listener:t,listenerType:3,passive:!1,once:!1,next:null};r===null?n.set(e,i):r.next=i}},configurable:!0,enumerable:!0}}function x(e,t){Object.defineProperty(e,`on${t}`,b(t))}function S(e){function t(){C.call(this)}t.prototype=Object.create(C.prototype,{constructor:{value:t,configurable:!0,writable:!0}});for(let n=0;n<e.length;++n)x(t.prototype,e[n]);return t}function C(){if(this instanceof C){g.set(this,new Map);return}if(arguments.length===1&&Array.isArray(arguments[0]))return S(arguments[0]);if(arguments.length>0){let e=Array(arguments.length);for(let t=0;t<arguments.length;++t)e[t]=arguments[t];return S(e)}throw TypeError(`Cannot call a class as a function`)}C.prototype={addEventListener(e,t,n){if(t==null)return;if(typeof t!=`function`&&!v(t))throw TypeError(`'listener' should be a function or an object.`);let r=y(this),i=v(n),a=(i?n.capture:n)?1:2,o={listener:t,listenerType:a,passive:i&&!!n.passive,once:i&&!!n.once,next:null},s=r.get(e);if(s===void 0){r.set(e,o);return}let c=null;for(;s!=null;){if(s.listener===t&&s.listenerType===a)return;c=s,s=s.next}c.next=o},removeEventListener(e,t,n){if(t==null)return;let r=y(this),i=(v(n)?n.capture:n)?1:2,a=null,o=r.get(e);for(;o!=null;){if(o.listener===t&&o.listenerType===i){a===null?o.next===null?r.delete(e):r.set(e,o.next):a.next=o.next;return}a=o,o=o.next}},dispatchEvent(e){if(e==null||typeof e.type!=`string`)throw TypeError(`"event.type" should be a string.`);let t=y(this),n=e.type,r=t.get(n);if(r==null)return!0;let i=d(this,e),a=null;for(;r!=null;){if(r.once?a===null?r.next===null?t.delete(n):t.set(n,r.next):a.next=r.next:a=r,h(i,r.passive?r.listener:null),typeof r.listener==`function`)try{r.listener.call(this,i)}catch(e){typeof console<`u`&&typeof console.error==`function`&&console.error(e)}else r.listenerType!==3&&typeof r.listener.handleEvent==`function`&&r.listener.handleEvent(i);if(f(i))break;r=r.next}return h(i,null),p(i,0),m(i,null),!i.defaultPrevented}},Object.defineProperty(C.prototype,`constructor`,{value:C,configurable:!0,writable:!0}),typeof window<`u`&&window.EventTarget!==void 0&&Object.setPrototypeOf(C.prototype,window.EventTarget.prototype),e.defineEventAttribute=x,e.EventTarget=C,e.default=C,t.exports=C,t.exports.EventTarget=t.exports.default=C,t.exports.defineEventAttribute=x})),je=t(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});var n=Ae(),r=class extends n.EventTarget{constructor(){throw super(),TypeError(`AbortSignal cannot be constructed directly`)}get aborted(){let e=o.get(this);if(typeof e!=`boolean`)throw TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?`null`:typeof this}`);return e}};n.defineEventAttribute(r.prototype,`abort`);function i(){let e=Object.create(r.prototype);return n.EventTarget.call(e),o.set(e,!1),e}function a(e){o.get(e)===!1&&(o.set(e,!0),e.dispatchEvent({type:`abort`}))}let o=new WeakMap;Object.defineProperties(r.prototype,{aborted:{enumerable:!0}}),typeof Symbol==`function`&&typeof Symbol.toStringTag==`symbol`&&Object.defineProperty(r.prototype,Symbol.toStringTag,{configurable:!0,value:`AbortSignal`});var s=class{constructor(){c.set(this,i())}get signal(){return l(this)}abort(){a(l(this))}};let c=new WeakMap;function l(e){let t=c.get(e);if(t==null)throw TypeError(`Expected 'this' to be an 'AbortController' object, but got ${e===null?`null`:typeof e}`);return t}Object.defineProperties(s.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),typeof Symbol==`function`&&typeof Symbol.toStringTag==`symbol`&&Object.defineProperty(s.prototype,Symbol.toStringTag,{configurable:!0,value:`AbortController`}),e.AbortController=s,e.AbortSignal=r,e.default=s,t.exports=s,t.exports.AbortController=t.exports.default=s,t.exports.AbortSignal=r})),$=t(((e,t)=>{let r=n(`buffer`),{format:i,inspect:a}=ke(),{codes:{ERR_INVALID_ARG_TYPE:o}}=Q(),{kResistStopPropagation:s,AggregateError:c,SymbolDispose:l}=Z(),u=globalThis.AbortSignal||je().AbortSignal,d=globalThis.AbortController||je().AbortController,f=Object.getPrototypeOf(async function(){}).constructor,p=globalThis.Blob||r.Blob,m=p===void 0?function(e){return!1}:function(e){return e instanceof p},h=(e,t)=>{if(e!==void 0&&(typeof e!=`object`||!e||!(`aborted`in e)))throw new o(t,`AbortSignal`,e)},g=(e,t)=>{if(typeof e!=`function`)throw new o(t,`Function`,e)};t.exports={AggregateError:c,kEmptyObject:Object.freeze({}),once(e){let t=!1;return function(...n){t||(t=!0,e.apply(this,n))}},createDeferredPromise:function(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}},promisify(e){return new Promise((t,n)=>{e((e,...r)=>e?n(e):t(...r))})},debuglog(){return function(){}},format:i,inspect:a,types:{isAsyncFunction(e){return e instanceof f},isArrayBufferView(e){return ArrayBuffer.isView(e)}},isBlob:m,deprecate(e,t){return e},addAbortListener:n(`events`).addAbortListener||function(e,t){if(e===void 0)throw new o(`signal`,`AbortSignal`,e);h(e,`signal`),g(t,`listener`);let n;return e.aborted?queueMicrotask(()=>t()):(e.addEventListener(`abort`,t,{__proto__:null,once:!0,[s]:!0}),n=()=>{e.removeEventListener(`abort`,t)}),{__proto__:null,[l](){var e;(e=n)==null||e()}}},AbortSignalAny:u.any||function(e){if(e.length===1)return e[0];let t=new d,n=()=>t.abort();return e.forEach(e=>{h(e,`signals`),e.addEventListener(`abort`,n,{once:!0})}),t.signal.addEventListener(`abort`,()=>{e.forEach(e=>e.removeEventListener(`abort`,n))},{once:!0}),t.signal}},t.exports.promisify.custom=Symbol.for(`nodejs.util.promisify.custom`)})),Me=t(((e,t)=>{let{ArrayIsArray:n,ArrayPrototypeIncludes:r,ArrayPrototypeJoin:i,ArrayPrototypeMap:a,NumberIsInteger:o,NumberIsNaN:s,NumberMAX_SAFE_INTEGER:c,NumberMIN_SAFE_INTEGER:l,NumberParseInt:u,ObjectPrototypeHasOwnProperty:d,RegExpPrototypeExec:f,String:p,StringPrototypeToUpperCase:m,StringPrototypeTrim:h}=Z(),{hideStackFrames:g,codes:{ERR_SOCKET_BAD_PORT:v,ERR_INVALID_ARG_TYPE:y,ERR_INVALID_ARG_VALUE:b,ERR_OUT_OF_RANGE:x,ERR_UNKNOWN_SIGNAL:S}}=Q(),{normalizeEncoding:C}=$(),{isAsyncFunction:w,isArrayBufferView:T}=$().types,E={};function D(e){return e===(e|0)}function O(e){return e===e>>>0}let k=/^[0-7]+$/;function A(e,t,n){if(e===void 0&&(e=n),typeof e==`string`){if(f(k,e)===null)throw new b(t,e,`must be a 32-bit unsigned integer or an octal string`);e=u(e,8)}return N(e,t),e}let j=g((e,t,n=l,r=c)=>{if(typeof e!=`number`)throw new y(t,`number`,e);if(!o(e))throw new x(t,`an integer`,e);if(e<n||e>r)throw new x(t,`>= ${n} && <= ${r}`,e)}),M=g((e,t,n=-2147483648,r=2147483647)=>{if(typeof e!=`number`)throw new y(t,`number`,e);if(!o(e))throw new x(t,`an integer`,e);if(e<n||e>r)throw new x(t,`>= ${n} && <= ${r}`,e)}),N=g((e,t,n=!1)=>{if(typeof e!=`number`)throw new y(t,`number`,e);if(!o(e))throw new x(t,`an integer`,e);let r=n?1:0,i=4294967295;if(e<r||e>i)throw new x(t,`>= ${r} && <= ${i}`,e)});function P(e,t){if(typeof e!=`string`)throw new y(t,`string`,e)}function F(e,t,n=void 0,r){if(typeof e!=`number`)throw new y(t,`number`,e);if(n!=null&&e<n||r!=null&&e>r||(n!=null||r!=null)&&s(e))throw new x(t,`${n==null?``:`>= ${n}`}${n!=null&&r!=null?` && `:``}${r==null?``:`<= ${r}`}`,e)}let I=g((e,t,n)=>{if(!r(n,e))throw new b(t,e,`must be one of: `+i(a(n,e=>typeof e==`string`?`'${e}'`:p(e)),`, `))});function L(e,t){if(typeof e!=`boolean`)throw new y(t,`boolean`,e)}function R(e,t,n){return e==null||!d(e,t)?n:e[t]}let z=g((e,t,r=null)=>{let i=R(r,`allowArray`,!1),a=R(r,`allowFunction`,!1);if(!R(r,`nullable`,!1)&&e===null||!i&&n(e)||typeof e!=`object`&&(!a||typeof e!=`function`))throw new y(t,`Object`,e)}),B=g((e,t)=>{if(e!=null&&typeof e!=`object`&&typeof e!=`function`)throw new y(t,`a dictionary`,e)}),V=g((e,t,r=0)=>{if(!n(e))throw new y(t,`Array`,e);if(e.length<r)throw new b(t,e,`must be longer than ${r}`)});function H(e,t){V(e,t);for(let n=0;n<e.length;n++)P(e[n],`${t}[${n}]`)}function U(e,t){V(e,t);for(let n=0;n<e.length;n++)L(e[n],`${t}[${n}]`)}function W(e,t){V(e,t);for(let n=0;n<e.length;n++){let r=e[n],i=`${t}[${n}]`;if(r==null)throw new y(i,`AbortSignal`,r);te(r,i)}}function G(e,t=`signal`){if(P(e,t),E[e]===void 0)throw E[m(e)]===void 0?new S(e):new S(e+` (signals must use all capital letters)`)}let K=g((e,t=`buffer`)=>{if(!T(e))throw new y(t,[`Buffer`,`TypedArray`,`DataView`],e)});function ee(e,t){let n=C(t),r=e.length;if(n===`hex`&&r%2!=0)throw new b(`encoding`,t,`is invalid for data of length ${r}`)}function q(e,t=`Port`,n=!0){if(typeof e!=`number`&&typeof e!=`string`||typeof e==`string`&&h(e).length===0||+e!=e>>>0||e>65535||e===0&&!n)throw new v(t,e,n);return e|0}let te=g((e,t)=>{if(e!==void 0&&(typeof e!=`object`||!e||!(`aborted`in e)))throw new y(t,`AbortSignal`,e)}),ne=g((e,t)=>{if(typeof e!=`function`)throw new y(t,`Function`,e)}),re=g((e,t)=>{if(typeof e!=`function`||w(e))throw new y(t,`Function`,e)}),J=g((e,t)=>{if(e!==void 0)throw new y(t,`undefined`,e)});function ie(e,t,n){if(!r(n,e))throw new y(t,`('${i(n,`|`)}')`,e)}let ae=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function oe(e,t){if(e===void 0||!f(ae,e))throw new b(t,e,`must be an array or string of format "</styles.css>; rel=preload; as=style"`)}function se(e){if(typeof e==`string`)return oe(e,`hints`),e;if(n(e)){let t=e.length,n=``;if(t===0)return n;for(let r=0;r<t;r++){let i=e[r];oe(i,`hints`),n+=i,r!==t-1&&(n+=`, `)}return n}throw new b(`hints`,e,`must be an array or string of format "</styles.css>; rel=preload; as=style"`)}t.exports={isInt32:D,isUint32:O,parseFileMode:A,validateArray:V,validateStringArray:H,validateBooleanArray:U,validateAbortSignalArray:W,validateBoolean:L,validateBuffer:K,validateDictionary:B,validateEncoding:ee,validateFunction:ne,validateInt32:M,validateInteger:j,validateNumber:F,validateObject:z,validateOneOf:I,validatePlainFunction:re,validatePort:q,validateSignalName:G,validateString:P,validateUint32:N,validateUndefined:J,validateUnion:ie,validateAbortSignal:te,validateLinkHeaderValue:se}})),Ne=t(((e,t)=>{t.exports=global.process})),Pe=t(((e,t)=>{let{SymbolAsyncIterator:n,SymbolIterator:r,SymbolFor:i}=Z(),a=i(`nodejs.stream.destroyed`),o=i(`nodejs.stream.errored`),s=i(`nodejs.stream.readable`),c=i(`nodejs.stream.writable`),l=i(`nodejs.stream.disturbed`),u=i(`nodejs.webstream.isClosedPromise`),d=i(`nodejs.webstream.controllerErrorFunction`);function f(e,t=!1){return!!(e&&typeof e.pipe==`function`&&typeof e.on==`function`&&(!t||typeof e.pause==`function`&&typeof e.resume==`function`)&&(!e._writableState||e._readableState?.readable!==!1)&&(!e._writableState||e._readableState))}function p(e){return!!(e&&typeof e.write==`function`&&typeof e.on==`function`&&(!e._readableState||e._writableState?.writable!==!1))}function m(e){return!!(e&&typeof e.pipe==`function`&&e._readableState&&typeof e.on==`function`&&typeof e.write==`function`)}function h(e){return e&&(e._readableState||e._writableState||typeof e.write==`function`&&typeof e.on==`function`||typeof e.pipe==`function`&&typeof e.on==`function`)}function g(e){return!!(e&&!h(e)&&typeof e.pipeThrough==`function`&&typeof e.getReader==`function`&&typeof e.cancel==`function`)}function v(e){return!!(e&&!h(e)&&typeof e.getWriter==`function`&&typeof e.abort==`function`)}function y(e){return!!(e&&!h(e)&&typeof e.readable==`object`&&typeof e.writable==`object`)}function b(e){return g(e)||v(e)||y(e)}function x(e,t){return e==null?!1:t===!0?typeof e[n]==`function`:t===!1?typeof e[r]==`function`:typeof e[n]==`function`||typeof e[r]==`function`}function S(e){if(!h(e))return null;let t=e._writableState,n=e._readableState,r=t||n;return!!(e.destroyed||e[a]||r!=null&&r.destroyed)}function C(e){if(!p(e))return null;if(e.writableEnded===!0)return!0;let t=e._writableState;return t!=null&&t.errored?!1:typeof t?.ended==`boolean`?t.ended:null}function w(e,t){if(!p(e))return null;if(e.writableFinished===!0)return!0;let n=e._writableState;return n!=null&&n.errored?!1:typeof n?.finished==`boolean`?!!(n.finished||t===!1&&n.ended===!0&&n.length===0):null}function T(e){if(!f(e))return null;if(e.readableEnded===!0)return!0;let t=e._readableState;return!t||t.errored?!1:typeof t?.ended==`boolean`?t.ended:null}function E(e,t){if(!f(e))return null;let n=e._readableState;return n!=null&&n.errored?!1:typeof n?.endEmitted==`boolean`?!!(n.endEmitted||t===!1&&n.ended===!0&&n.length===0):null}function D(e){return e&&e[s]!=null?e[s]:typeof e?.readable==`boolean`?S(e)?!1:f(e)&&e.readable&&!E(e):null}function O(e){return e&&e[c]!=null?e[c]:typeof e?.writable==`boolean`?S(e)?!1:p(e)&&e.writable&&!C(e):null}function k(e,t){return h(e)?S(e)?!0:!(t?.readable!==!1&&D(e)||t?.writable!==!1&&O(e)):null}function A(e){return h(e)?e.writableErrored?e.writableErrored:e._writableState?.errored??null:null}function j(e){return h(e)?e.readableErrored?e.readableErrored:e._readableState?.errored??null:null}function M(e){if(!h(e))return null;if(typeof e.closed==`boolean`)return e.closed;let t=e._writableState,n=e._readableState;return typeof t?.closed==`boolean`||typeof n?.closed==`boolean`?t?.closed||n?.closed:typeof e._closed==`boolean`&&N(e)?e._closed:null}function N(e){return typeof e._closed==`boolean`&&typeof e._defaultKeepAlive==`boolean`&&typeof e._removedConnection==`boolean`&&typeof e._removedContLen==`boolean`}function P(e){return typeof e._sent100==`boolean`&&N(e)}function F(e){return typeof e._consuming==`boolean`&&typeof e._dumped==`boolean`&&e.req?.upgradeOrConnect===void 0}function I(e){if(!h(e))return null;let t=e._writableState,n=e._readableState,r=t||n;return!r&&P(e)||!!(r&&r.autoDestroy&&r.emitClose&&r.closed===!1)}function L(e){return!!(e&&(e[l]??(e.readableDidRead||e.readableAborted)))}function R(e){return!!(e&&(e[o]??e.readableErrored??e.writableErrored??e._readableState?.errorEmitted??e._writableState?.errorEmitted??e._readableState?.errored??e._writableState?.errored))}t.exports={isDestroyed:S,kIsDestroyed:a,isDisturbed:L,kIsDisturbed:l,isErrored:R,kIsErrored:o,isReadable:D,kIsReadable:s,kIsClosedPromise:u,kControllerErrorFunction:d,kIsWritable:c,isClosed:M,isDuplexNodeStream:m,isFinished:k,isIterable:x,isReadableNodeStream:f,isReadableStream:g,isReadableEnded:T,isReadableFinished:E,isReadableErrored:j,isNodeStream:h,isWebStream:b,isWritable:O,isWritableNodeStream:p,isWritableStream:v,isWritableEnded:C,isWritableFinished:w,isWritableErrored:A,isServerRequest:F,isServerResponse:P,willEmitClose:I,isTransformStream:y}})),Fe=t(((e,t)=>{let n=Ne(),{AbortError:r,codes:i}=Q(),{ERR_INVALID_ARG_TYPE:a,ERR_STREAM_PREMATURE_CLOSE:o}=i,{kEmptyObject:s,once:c}=$(),{validateAbortSignal:l,validateFunction:u,validateObject:d,validateBoolean:f}=Me(),{Promise:p,PromisePrototypeThen:m,SymbolDispose:h}=Z(),{isClosed:g,isReadable:v,isReadableNodeStream:y,isReadableStream:b,isReadableFinished:x,isReadableErrored:S,isWritable:C,isWritableNodeStream:w,isWritableStream:T,isWritableFinished:E,isWritableErrored:D,isNodeStream:O,willEmitClose:k,kIsClosedPromise:A}=Pe(),j;function M(e){return e.setHeader&&typeof e.abort==`function`}let N=()=>{};function P(e,t,i){if(arguments.length===2?(i=t,t=s):t==null?t=s:d(t,`options`),u(i,`callback`),l(t.signal,`options.signal`),i=c(i),b(e)||T(e))return F(e,t,i);if(!O(e))throw new a(`stream`,[`ReadableStream`,`WritableStream`,`Stream`],e);let f=t.readable??y(e),p=t.writable??w(e),m=e._writableState,A=e._readableState,P=()=>{e.writable||R()},I=k(e)&&y(e)===f&&w(e)===p,L=E(e,!1),R=()=>{L=!0,e.destroyed&&(I=!1),!(I&&(!e.readable||f))&&(!f||z)&&i.call(e)},z=x(e,!1),B=()=>{z=!0,e.destroyed&&(I=!1),!(I&&(!e.writable||p))&&(!p||L)&&i.call(e)},V=t=>{i.call(e,t)},H=g(e),U=()=>{H=!0;let t=D(e)||S(e);if(t&&typeof t!=`boolean`)return i.call(e,t);if(f&&!z&&y(e,!0)&&!x(e,!1)||p&&!L&&!E(e,!1))return i.call(e,new o);i.call(e)},W=()=>{H=!0;let t=D(e)||S(e);if(t&&typeof t!=`boolean`)return i.call(e,t);i.call(e)},G=()=>{e.req.on(`finish`,R)};M(e)?(e.on(`complete`,R),I||e.on(`abort`,U),e.req?G():e.on(`request`,G)):p&&!m&&(e.on(`end`,P),e.on(`close`,P)),!I&&typeof e.aborted==`boolean`&&e.on(`aborted`,U),e.on(`end`,B),e.on(`finish`,R),t.error!==!1&&e.on(`error`,V),e.on(`close`,U),H?n.nextTick(U):m!=null&&m.errorEmitted||A!=null&&A.errorEmitted?I||n.nextTick(W):(!f&&(!I||v(e))&&(L||C(e)===!1)||!p&&(!I||C(e))&&(z||v(e)===!1)||A&&e.req&&e.aborted)&&n.nextTick(W);let K=()=>{i=N,e.removeListener(`aborted`,U),e.removeListener(`complete`,R),e.removeListener(`abort`,U),e.removeListener(`request`,G),e.req&&e.req.removeListener(`finish`,R),e.removeListener(`end`,P),e.removeListener(`close`,P),e.removeListener(`finish`,R),e.removeListener(`end`,B),e.removeListener(`error`,V),e.removeListener(`close`,U)};if(t.signal&&!H){let a=()=>{let n=i;K(),n.call(e,new r(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(a);else{j||=$().addAbortListener;let n=j(t.signal,a),r=i;i=c((...t)=>{n[h](),r.apply(e,t)})}}return K}function F(e,t,i){let a=!1,o=N;if(t.signal)if(o=()=>{a=!0,i.call(e,new r(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(o);else{j||=$().addAbortListener;let n=j(t.signal,o),r=i;i=c((...t)=>{n[h](),r.apply(e,t)})}let s=(...t)=>{a||n.nextTick(()=>i.apply(e,t))};return m(e[A].promise,s,s),N}function I(e,t){var n;let r=!1;return t===null&&(t=s),(n=t)!=null&&n.cleanup&&(f(t.cleanup,`cleanup`),r=t.cleanup),new p((n,i)=>{let a=P(e,t,e=>{r&&a(),e?i(e):n()})})}t.exports=P,t.exports.finished=I})),Ie=t(((e,t)=>{let n=Ne(),{aggregateTwoErrors:r,codes:{ERR_MULTIPLE_CALLBACK:i},AbortError:a}=Q(),{Symbol:o}=Z(),{kIsDestroyed:s,isDestroyed:c,isFinished:l,isServerRequest:u}=Pe(),d=o(`kDestroy`),f=o(`kConstruct`);function p(e,t,n){e&&(e.stack,t&&!t.errored&&(t.errored=e),n&&!n.errored&&(n.errored=e))}function m(e,t){let n=this._readableState,i=this._writableState,a=i||n;return i!=null&&i.destroyed||n!=null&&n.destroyed?(typeof t==`function`&&t(),this):(p(e,i,n),i&&(i.destroyed=!0),n&&(n.destroyed=!0),a.constructed?h(this,e,t):this.once(d,function(n){h(this,r(n,e),t)}),this)}function h(e,t,r){let i=!1;function a(t){if(i)return;i=!0;let a=e._readableState,o=e._writableState;p(t,o,a),o&&(o.closed=!0),a&&(a.closed=!0),typeof r==`function`&&r(t),t?n.nextTick(g,e,t):n.nextTick(v,e)}try{e._destroy(t||null,a)}catch(e){a(e)}}function g(e,t){y(e,t),v(e)}function v(e){let t=e._readableState,n=e._writableState;n&&(n.closeEmitted=!0),t&&(t.closeEmitted=!0),(n!=null&&n.emitClose||t!=null&&t.emitClose)&&e.emit(`close`)}function y(e,t){let n=e._readableState,r=e._writableState;r!=null&&r.errorEmitted||n!=null&&n.errorEmitted||(r&&(r.errorEmitted=!0),n&&(n.errorEmitted=!0),e.emit(`error`,t))}function b(){let e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=e.readable===!1,e.endEmitted=e.readable===!1),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=t.writable===!1,t.ending=t.writable===!1,t.finished=t.writable===!1)}function x(e,t,r){let i=e._readableState,a=e._writableState;if(a!=null&&a.destroyed||i!=null&&i.destroyed)return this;i!=null&&i.autoDestroy||a!=null&&a.autoDestroy?e.destroy(t):t&&(t.stack,a&&!a.errored&&(a.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(y,e,t):y(e,t))}function S(e,t){if(typeof e._construct!=`function`)return;let r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(f,t),!(e.listenerCount(f)>1)&&n.nextTick(C,e)}function C(e){let t=!1;function r(r){if(t){x(e,r??new i);return}t=!0;let a=e._readableState,o=e._writableState,s=o||a;a&&(a.constructed=!0),o&&(o.constructed=!0),s.destroyed?e.emit(d,r):r?x(e,r,!0):n.nextTick(w,e)}try{e._construct(e=>{n.nextTick(r,e)})}catch(e){n.nextTick(r,e)}}function w(e){e.emit(f)}function T(e){return e?.setHeader&&typeof e.abort==`function`}function E(e){e.emit(`close`)}function D(e,t){e.emit(`error`,t),n.nextTick(E,e)}function O(e,t){!e||c(e)||(!t&&!l(e)&&(t=new a),u(e)?(e.socket=null,e.destroy(t)):T(e)?e.abort():T(e.req)?e.req.abort():typeof e.destroy==`function`?e.destroy(t):typeof e.close==`function`?e.close():t?n.nextTick(D,e,t):n.nextTick(E,e),e.destroyed||(e[s]=!0))}t.exports={construct:S,destroyer:O,destroy:m,undestroy:b,errorOrDestroy:x}})),Le=t(((e,t)=>{let{ArrayIsArray:r,ObjectSetPrototypeOf:i}=Z(),{EventEmitter:a}=n(`events`);function o(e){a.call(this,e)}i(o.prototype,a.prototype),i(o,a),o.prototype.pipe=function(e,t){let n=this;function r(t){e.writable&&e.write(t)===!1&&n.pause&&n.pause()}n.on(`data`,r);function i(){n.readable&&n.resume&&n.resume()}e.on(`drain`,i),!e._isStdio&&(!t||t.end!==!1)&&(n.on(`end`,c),n.on(`close`,l));let o=!1;function c(){o||(o=!0,e.end())}function l(){o||(o=!0,typeof e.destroy==`function`&&e.destroy())}function u(e){d(),a.listenerCount(this,`error`)===0&&this.emit(`error`,e)}s(n,`error`,u),s(e,`error`,u);function d(){n.removeListener(`data`,r),e.removeListener(`drain`,i),n.removeListener(`end`,c),n.removeListener(`close`,l),n.removeListener(`error`,u),e.removeListener(`error`,u),n.removeListener(`end`,d),n.removeListener(`close`,d),e.removeListener(`close`,d)}return n.on(`end`,d),n.on(`close`,d),e.on(`close`,d),e.emit(`pipe`,n),e};function s(e,t,n){if(typeof e.prependListener==`function`)return e.prependListener(t,n);!e._events||!e._events[t]?e.on(t,n):r(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]}t.exports={Stream:o,prependListener:s}})),Re=t(((e,t)=>{let{SymbolDispose:n}=Z(),{AbortError:r,codes:i}=Q(),{isNodeStream:a,isWebStream:o,kControllerErrorFunction:s}=Pe(),c=Fe(),{ERR_INVALID_ARG_TYPE:l}=i,u,d=(e,t)=>{if(typeof e!=`object`||!(`aborted`in e))throw new l(t,`AbortSignal`,e)};t.exports.addAbortSignal=function(e,n){if(d(e,`signal`),!a(n)&&!o(n))throw new l(`stream`,[`ReadableStream`,`WritableStream`,`Stream`],n);return t.exports.addAbortSignalNoValidate(e,n)},t.exports.addAbortSignalNoValidate=function(e,t){if(typeof e!=`object`||!(`aborted`in e))return t;let i=a(t)?()=>{t.destroy(new r(void 0,{cause:e.reason}))}:()=>{t[s](new r(void 0,{cause:e.reason}))};return e.aborted?i():(u||=$().addAbortListener,c(t,u(e,i)[n])),t}})),ze=t(((e,t)=>{let{StringPrototypeSlice:r,SymbolIterator:i,TypedArrayPrototypeSet:a,Uint8Array:o}=Z(),{Buffer:s}=n(`buffer`),{inspect:c}=$();t.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){let t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){let t={data:e,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length}shift(){if(this.length===0)return;let e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(this.length===0)return``;let t=this.head,n=``+t.data;for(;(t=t.next)!==null;)n+=e+t.data;return n}concat(e){if(this.length===0)return s.alloc(0);let t=s.allocUnsafe(e>>>0),n=this.head,r=0;for(;n;)a(t,n.data,r),r+=n.data.length,n=n.next;return t}consume(e,t){let n=this.head.data;if(e<n.length){let t=n.slice(0,e);return this.head.data=n.slice(e),t}return e===n.length?this.shift():t?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[i](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let t=``,n=this.head,i=0;do{let a=n.data;if(e>a.length)t+=a,e-=a.length;else{e===a.length?(t+=a,++i,n.next?this.head=n.next:this.head=this.tail=null):(t+=r(a,0,e),this.head=n,n.data=r(a,e));break}++i}while((n=n.next)!==null);return this.length-=i,t}_getBuffer(e){let t=s.allocUnsafe(e),n=e,r=this.head,i=0;do{let s=r.data;if(e>s.length)a(t,s,n-e),e-=s.length;else{e===s.length?(a(t,s,n-e),++i,r.next?this.head=r.next:this.head=this.tail=null):(a(t,new o(s.buffer,s.byteOffset,e),n-e),this.head=r,r.data=s.slice(e));break}++i}while((r=r.next)!==null);return this.length-=i,t}[Symbol.for(`nodejs.util.inspect.custom`)](e,t){return c(this,{...t,depth:0,customInspect:!1})}}})),Be=t(((e,t)=>{let{MathFloor:n,NumberIsInteger:r}=Z(),{validateInteger:i}=Me(),{ERR_INVALID_ARG_VALUE:a}=Q().codes,o=16*1024,s=16;function c(e,t,n){return e.highWaterMark==null?t?e[n]:null:e.highWaterMark}function l(e){return e?s:o}function u(e,t){i(t,`value`,0),e?s=t:o=t}function d(e,t,i,o){let s=c(t,o,i);if(s!=null){if(!r(s)||s<0)throw new a(o?`options.${i}`:`options.highWaterMark`,s);return n(s)}return l(e.objectMode)}t.exports={getHighWaterMark:d,getDefaultHighWaterMark:l,setDefaultHighWaterMark:u}})),Ve=t(((e,t)=>{
|
|
16
|
+
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
17
|
+
var r=n(`buffer`),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(a(r,e),e.Buffer=o);function o(e,t,n){return i(e,t,n)}o.prototype=Object.create(i.prototype),a(i,o),o.from=function(e,t,n){if(typeof e==`number`)throw TypeError(`Argument must not be a number`);return i(e,t,n)},o.alloc=function(e,t,n){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);var r=i(e);return t===void 0?r.fill(0):typeof n==`string`?r.fill(t,n):r.fill(t),r},o.allocUnsafe=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return i(e)},o.allocUnsafeSlow=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return r.SlowBuffer(e)}})),He=t((e=>{var t=Ve().Buffer,n=t.isEncoding||function(e){switch(e=``+e,e&&e.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(e){if(!e)return`utf8`;for(var t;;)switch(e){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 e;default:if(t)return;e=(``+e).toLowerCase(),t=!0}}function i(e){var i=r(e);if(typeof i!=`string`&&(t.isEncoding===n||!n(e)))throw Error(`Unknown encoding: `+e);return i||e}e.StringDecoder=a;function a(e){this.encoding=i(e);var n;switch(this.encoding){case`utf16le`:this.text=f,this.end=p,n=4;break;case`utf8`:this.fillLast=l,n=4;break;case`base64`:this.text=m,this.end=h,n=3;break;default:this.write=g,this.end=v;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(n)}a.prototype.write=function(e){if(e.length===0)return``;var t,n;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return``;n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||``},a.prototype.end=d,a.prototype.text=u,a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e,t,n){var r=t.length-1;if(r<n)return 0;var i=o(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||i===-2?0:(i=o(t[r]),i>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||i===-2?0:(i=o(t[r]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function c(e,t,n){if((t[0]&192)!=128)return e.lastNeed=0,`�`;if(e.lastNeed>1&&t.length>1){if((t[1]&192)!=128)return e.lastNeed=1,`�`;if(e.lastNeed>2&&t.length>2&&(t[2]&192)!=128)return e.lastNeed=2,`�`}}function l(e){var t=this.lastTotal-this.lastNeed,n=c(this,e,t);if(n!==void 0)return n;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function u(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString(`utf8`,t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString(`utf8`,t,r)}function d(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+`�`:t}function f(e,t){if((e.length-t)%2==0){var n=e.toString(`utf16le`,t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(`utf16le`,t,e.length-1)}function p(e){var t=e&&e.length?this.write(e):``;if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(`utf16le`,0,n)}return t}function m(e,t){var n=(e.length-t)%3;return n===0?e.toString(`base64`,t):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(`base64`,t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+this.lastChar.toString(`base64`,0,3-this.lastNeed):t}function g(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):``}})),Ue=t(((e,t)=>{let r=Ne(),{PromisePrototypeThen:i,SymbolAsyncIterator:a,SymbolIterator:o}=Z(),{Buffer:s}=n(`buffer`),{ERR_INVALID_ARG_TYPE:c,ERR_STREAM_NULL_VALUES:l}=Q().codes;function u(e,t,n){let u;if(typeof t==`string`||t instanceof s)return new e({objectMode:!0,...n,read(){this.push(t),this.push(null)}});let d;if(t&&t[a])d=!0,u=t[a]();else if(t&&t[o])d=!1,u=t[o]();else throw new c(`iterable`,[`Iterable`],t);let f=new e({objectMode:!0,highWaterMark:1,...n}),p=!1;f._read=function(){p||(p=!0,h())},f._destroy=function(e,t){i(m(e),()=>r.nextTick(t,e),n=>r.nextTick(t,n||e))};async function m(e){let t=e!=null,n=typeof u.throw==`function`;if(t&&n){let{value:t,done:n}=await u.throw(e);if(await t,n)return}if(typeof u.return==`function`){let{value:e}=await u.return();await e}}async function h(){for(;;){try{let{value:e,done:t}=d?await u.next():u.next();if(t)f.push(null);else{let t=e&&typeof e.then==`function`?await e:e;if(t===null)throw p=!1,new l;if(f.push(t))continue;p=!1}}catch(e){f.destroy(e)}break}}return f}t.exports=u})),We=t(((e,t)=>{let r=Ne(),{ArrayPrototypeIndexOf:i,NumberIsInteger:a,NumberIsNaN:o,NumberParseInt:s,ObjectDefineProperties:c,ObjectKeys:l,ObjectSetPrototypeOf:u,Promise:d,SafeSet:f,SymbolAsyncDispose:p,SymbolAsyncIterator:m,Symbol:h}=Z();t.exports=K,K.ReadableState=G;let{EventEmitter:g}=n(`events`),{Stream:v,prependListener:y}=Le(),{Buffer:b}=n(`buffer`),{addAbortSignal:x}=Re(),S=Fe(),C=$().debuglog(`stream`,e=>{C=e}),w=ze(),T=Ie(),{getHighWaterMark:E,getDefaultHighWaterMark:D}=Be(),{aggregateTwoErrors:O,codes:{ERR_INVALID_ARG_TYPE:k,ERR_METHOD_NOT_IMPLEMENTED:A,ERR_OUT_OF_RANGE:j,ERR_STREAM_PUSH_AFTER_EOF:M,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:N},AbortError:P}=Q(),{validateObject:F}=Me(),I=h(`kPaused`),{StringDecoder:L}=He(),R=Ue();u(K.prototype,v.prototype),u(K,v);let z=()=>{},{errorOrDestroy:B}=T,V=2048,H=4096,U=65536;function W(e){return{enumerable:!1,get(){return(this.state&e)!==0},set(t){t?this.state|=e:this.state&=~e}}}c(G.prototype,{objectMode:W(1),ended:W(2),endEmitted:W(4),reading:W(8),constructed:W(16),sync:W(32),needReadable:W(64),emittedReadable:W(128),readableListening:W(256),resumeScheduled:W(512),errorEmitted:W(1024),emitClose:W(V),autoDestroy:W(H),destroyed:W(8192),closed:W(16384),closeEmitted:W(32768),multiAwaitDrain:W(U),readingMore:W(131072),dataEmitted:W(262144)});function G(e,t,n){typeof n!=`boolean`&&(n=t instanceof qe()),this.state=6192,e&&e.objectMode&&(this.state|=1),n&&e&&e.readableObjectMode&&(this.state|=1),this.highWaterMark=e?E(this,e,`readableHighWaterMark`,n):D(!1),this.buffer=new w,this.length=0,this.pipes=[],this.flowing=null,this[I]=null,e&&e.emitClose===!1&&(this.state&=~V),e&&e.autoDestroy===!1&&(this.state&=~H),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||`utf8`,this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new L(e.encoding),this.encoding=e.encoding)}function K(e){if(!(this instanceof K))return new K(e);let t=this instanceof qe();this._readableState=new G(e,this,t),e&&(typeof e.read==`function`&&(this._read=e.read),typeof e.destroy==`function`&&(this._destroy=e.destroy),typeof e.construct==`function`&&(this._construct=e.construct),e.signal&&!t&&x(e.signal,this)),v.call(this,e),T.construct(this,()=>{this._readableState.needReadable&&ae(this,this._readableState)})}K.prototype.destroy=T.destroy,K.prototype._undestroy=T.undestroy,K.prototype._destroy=function(e,t){t(e)},K.prototype[g.captureRejectionSymbol]=function(e){this.destroy(e)},K.prototype[p]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new P,this.destroy(e)),new d((t,n)=>S(this,r=>r&&r!==e?n(r):t(null)))},K.prototype.push=function(e,t){return ee(this,e,t,!1)},K.prototype.unshift=function(e,t){return ee(this,e,t,!0)};function ee(e,t,n,r){C(`readableAddChunk`,t);let i=e._readableState,a;if(i.state&1||(typeof t==`string`?(n||=i.defaultEncoding,i.encoding!==n&&(r&&i.encoding?t=b.from(t,n).toString(i.encoding):(t=b.from(t,n),n=``))):t instanceof b?n=``:v._isUint8Array(t)?(t=v._uint8ArrayToBuffer(t),n=``):t!=null&&(a=new k(`chunk`,[`string`,`Buffer`,`Uint8Array`],t))),a)B(e,a);else if(t===null)i.state&=-9,re(e,i);else if(i.state&1||t&&t.length>0)if(r)if(i.state&4)B(e,new N);else if(i.destroyed||i.errored)return!1;else q(e,i,t,!0);else if(i.ended)B(e,new M);else if(i.destroyed||i.errored)return!1;else i.state&=-9,i.decoder&&!n?(t=i.decoder.write(t),i.objectMode||t.length!==0?q(e,i,t,!1):ae(e,i)):q(e,i,t,!1);else r||(i.state&=-9,ae(e,i));return!i.ended&&(i.length<i.highWaterMark||i.length===0)}function q(e,t,n,r){t.flowing&&t.length===0&&!t.sync&&e.listenerCount(`data`)>0?((t.state&U)===0?t.awaitDrainWriters=null:t.awaitDrainWriters.clear(),t.dataEmitted=!0,e.emit(`data`,n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.state&64&&J(e)),ae(e,t)}K.prototype.isPaused=function(){let e=this._readableState;return e[I]===!0||e.flowing===!1},K.prototype.setEncoding=function(e){let t=new L(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;let n=this._readableState.buffer,r=``;for(let e of n)r+=t.write(e);return n.clear(),r!==``&&n.push(r),this._readableState.length=r.length,this};function te(e){if(e>1073741824)throw new j(`size`,`<= 1GiB`,e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++,e}function ne(e,t){return e<=0||t.length===0&&t.ended?0:t.state&1?1:o(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}K.prototype.read=function(e){C(`read`,e),e===void 0?e=NaN:a(e)||(e=s(e,10));let t=this._readableState,n=e;if(e>t.highWaterMark&&(t.highWaterMark=te(e)),e!==0&&(t.state&=-129),e===0&&t.needReadable&&((t.highWaterMark===0?t.length>0:t.length>=t.highWaterMark)||t.ended))return C(`read: emitReadable`,t.length,t.ended),t.length===0&&t.ended?he(this):J(this),null;if(e=ne(e,t),e===0&&t.ended)return t.length===0&&he(this),null;let r=(t.state&64)!=0;if(C(`need readable`,r),(t.length===0||t.length-e<t.highWaterMark)&&(r=!0,C(`length less than watermark`,r)),t.ended||t.reading||t.destroyed||t.errored||!t.constructed)r=!1,C(`reading, ended or constructing`,r);else if(r){C(`do read`),t.state|=40,t.length===0&&(t.state|=64);try{this._read(t.highWaterMark)}catch(e){B(this,e)}t.state&=-33,t.reading||(e=ne(n,t))}let i;return i=e>0?me(e,t):null,i===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),t.length===0&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&he(this)),i!==null&&!t.errorEmitted&&!t.closeEmitted&&(t.dataEmitted=!0,this.emit(`data`,i)),i};function re(e,t){if(C(`onEofChunk`),!t.ended){if(t.decoder){let e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?J(e):(t.needReadable=!1,t.emittedReadable=!0,ie(e))}}function J(e){let t=e._readableState;C(`emitReadable`,t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(C(`emitReadable`,t.flowing),t.emittedReadable=!0,r.nextTick(ie,e))}function ie(e){let t=e._readableState;C(`emitReadable_`,t.destroyed,t.length,t.ended),!t.destroyed&&!t.errored&&(t.length||t.ended)&&(e.emit(`readable`),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,Y(e)}function ae(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,r.nextTick(oe,e,t))}function oe(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){let n=t.length;if(C(`maybeReadMore read 0`),e.read(0),n===t.length)break}t.readingMore=!1}K.prototype._read=function(e){throw new A(`_read()`)},K.prototype.pipe=function(e,t){let n=this,i=this._readableState;i.pipes.length===1&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new f(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(e),C(`pipe count=%d opts=%j`,i.pipes.length,t);let a=(!t||t.end!==!1)&&e!==r.stdout&&e!==r.stderr?s:v;i.endEmitted?r.nextTick(a):n.once(`end`,a),e.on(`unpipe`,o);function o(e,t){C(`onunpipe`),e===n&&t&&t.hasUnpiped===!1&&(t.hasUnpiped=!0,u())}function s(){C(`onend`),e.end()}let c,l=!1;function u(){C(`cleanup`),e.removeListener(`close`,h),e.removeListener(`finish`,g),c&&e.removeListener(`drain`,c),e.removeListener(`error`,m),e.removeListener(`unpipe`,o),n.removeListener(`end`,s),n.removeListener(`end`,v),n.removeListener(`data`,p),l=!0,c&&i.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&c()}function d(){l||(i.pipes.length===1&&i.pipes[0]===e?(C(`false write response, pause`,0),i.awaitDrainWriters=e,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(e)&&(C(`false write response, pause`,i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),n.pause()),c||(c=se(n,e),e.on(`drain`,c))}n.on(`data`,p);function p(t){C(`ondata`);let n=e.write(t);C(`dest.write`,n),n===!1&&d()}function m(t){if(C(`onerror`,t),v(),e.removeListener(`error`,m),e.listenerCount(`error`)===0){let n=e._writableState||e._readableState;n&&!n.errorEmitted?B(e,t):e.emit(`error`,t)}}y(e,`error`,m);function h(){e.removeListener(`finish`,g),v()}e.once(`close`,h);function g(){C(`onfinish`),e.removeListener(`close`,h),v()}e.once(`finish`,g);function v(){C(`unpipe`),n.unpipe(e)}return e.emit(`pipe`,n),e.writableNeedDrain===!0?d():i.flowing||(C(`pipe resume`),n.resume()),e};function se(e,t){return function(){let n=e._readableState;n.awaitDrainWriters===t?(C(`pipeOnDrain`,1),n.awaitDrainWriters=null):n.multiAwaitDrain&&(C(`pipeOnDrain`,n.awaitDrainWriters.size),n.awaitDrainWriters.delete(t)),(!n.awaitDrainWriters||n.awaitDrainWriters.size===0)&&e.listenerCount(`data`)&&e.resume()}}K.prototype.unpipe=function(e){let t=this._readableState,n={hasUnpiped:!1};if(t.pipes.length===0)return this;if(!e){let e=t.pipes;t.pipes=[],this.pause();for(let t=0;t<e.length;t++)e[t].emit(`unpipe`,this,{hasUnpiped:!1});return this}let r=i(t.pipes,e);return r===-1?this:(t.pipes.splice(r,1),t.pipes.length===0&&this.pause(),e.emit(`unpipe`,this,n),this)},K.prototype.on=function(e,t){let n=v.prototype.on.call(this,e,t),i=this._readableState;return e===`data`?(i.readableListening=this.listenerCount(`readable`)>0,i.flowing!==!1&&this.resume()):e===`readable`&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,C(`on readable`,i.length,i.reading),i.length?J(this):i.reading||r.nextTick(le,this)),n},K.prototype.addListener=K.prototype.on,K.prototype.removeListener=function(e,t){let n=v.prototype.removeListener.call(this,e,t);return e===`readable`&&r.nextTick(ce,this),n},K.prototype.off=K.prototype.removeListener,K.prototype.removeAllListeners=function(e){let t=v.prototype.removeAllListeners.apply(this,arguments);return(e===`readable`||e===void 0)&&r.nextTick(ce,this),t};function ce(e){let t=e._readableState;t.readableListening=e.listenerCount(`readable`)>0,t.resumeScheduled&&t[I]===!1?t.flowing=!0:e.listenerCount(`data`)>0?e.resume():t.readableListening||(t.flowing=null)}function le(e){C(`readable nexttick read 0`),e.read(0)}K.prototype.resume=function(){let e=this._readableState;return e.flowing||(C(`resume`),e.flowing=!e.readableListening,ue(this,e)),e[I]=!1,this};function ue(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(de,e,t))}function de(e,t){C(`resume`,t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit(`resume`),Y(e),t.flowing&&!t.reading&&e.read(0)}K.prototype.pause=function(){return C(`call pause flowing=%j`,this._readableState.flowing),this._readableState.flowing!==!1&&(C(`pause`),this._readableState.flowing=!1,this.emit(`pause`)),this._readableState[I]=!0,this};function Y(e){let t=e._readableState;for(C(`flow`,t.flowing);t.flowing&&e.read()!==null;);}K.prototype.wrap=function(e){let t=!1;e.on(`data`,n=>{!this.push(n)&&e.pause&&(t=!0,e.pause())}),e.on(`end`,()=>{this.push(null)}),e.on(`error`,e=>{B(this,e)}),e.on(`close`,()=>{this.destroy()}),e.on(`destroy`,()=>{this.destroy()}),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};let n=l(e);for(let t=1;t<n.length;t++){let r=n[t];this[r]===void 0&&typeof e[r]==`function`&&(this[r]=e[r].bind(e))}return this},K.prototype[m]=function(){return fe(this)},K.prototype.iterator=function(e){return e!==void 0&&F(e,`options`),fe(this,e)};function fe(e,t){typeof e.read!=`function`&&(e=K.wrap(e,{objectMode:!0}));let n=pe(e,t);return n.stream=e,n}async function*pe(e,t){let n=z;function r(t){this===e?(n(),n=z):n=t}e.on(`readable`,r);let i,a=S(e,{writable:!1},e=>{i=e?O(i,e):null,n(),n=z});try{for(;;){let t=e.destroyed?null:e.read();if(t!==null)yield t;else if(i)throw i;else if(i===null)return;else await new d(r)}}catch(e){throw i=O(i,e),i}finally{(i||t?.destroyOnReturn!==!1)&&(i===void 0||e._readableState.autoDestroy)?T.destroyer(e,null):(e.off(`readable`,r),a())}}c(K.prototype,{readable:{__proto__:null,get(){let e=this._readableState;return!!e&&e.readable!==!1&&!e.destroyed&&!e.errorEmitted&&!e.endEmitted},set(e){this._readableState&&(this._readableState.readable=!!e)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(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(e){this._readableState&&(this._readableState.flowing=e)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},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:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(e){this._readableState&&(this._readableState.destroyed=e)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),c(G.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[I]!==!1},set(e){this[I]=!!e}}}),K._fromList=me;function me(e,t){if(t.length===0)return null;let n;return t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(``):t.buffer.length===1?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n}function he(e){let t=e._readableState;C(`endReadable`,t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(ge,t,e))}function ge(e,t){if(C(`endReadableNT`,e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&e.length===0){if(e.endEmitted=!0,t.emit(`end`),t.writable&&t.allowHalfOpen===!1)r.nextTick(_e,t);else if(e.autoDestroy){let e=t._writableState;(!e||e.autoDestroy&&(e.finished||e.writable===!1))&&t.destroy()}}}function _e(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}K.from=function(e,t){return R(K,e,t)};let ve;function ye(){return ve===void 0&&(ve={}),ve}K.fromWeb=function(e,t){return ye().newStreamReadableFromReadableStream(e,t)},K.toWeb=function(e,t){return ye().newReadableStreamFromStreamReadable(e,t)},K.wrap=function(e,t){return new K({objectMode:e.readableObjectMode??e.objectMode??!0,...t,destroy(t,n){T.destroyer(e,t),n(t)}}).wrap(e)}})),Ge=t(((e,t)=>{let r=Ne(),{ArrayPrototypeSlice:i,Error:a,FunctionPrototypeSymbolHasInstance:o,ObjectDefineProperty:s,ObjectDefineProperties:c,ObjectSetPrototypeOf:l,StringPrototypeToLowerCase:u,Symbol:d,SymbolHasInstance:f}=Z();t.exports=F,F.WritableState=N;let{EventEmitter:p}=n(`events`),m=Le().Stream,{Buffer:h}=n(`buffer`),g=Ie(),{addAbortSignal:v}=Re(),{getHighWaterMark:y,getDefaultHighWaterMark:b}=Be(),{ERR_INVALID_ARG_TYPE:x,ERR_METHOD_NOT_IMPLEMENTED:S,ERR_MULTIPLE_CALLBACK:C,ERR_STREAM_CANNOT_PIPE:w,ERR_STREAM_DESTROYED:T,ERR_STREAM_ALREADY_FINISHED:E,ERR_STREAM_NULL_VALUES:D,ERR_STREAM_WRITE_AFTER_END:O,ERR_UNKNOWN_ENCODING:k}=Q().codes,{errorOrDestroy:A}=g;l(F.prototype,m.prototype),l(F,m);function j(){}let M=d(`kOnFinished`);function N(e,t,n){typeof n!=`boolean`&&(n=t instanceof qe()),this.objectMode=!!(e&&e.objectMode),n&&(this.objectMode=this.objectMode||!!(e&&e.writableObjectMode)),this.highWaterMark=e?y(this,e,`writableHighWaterMark`,n):b(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(e&&e.decodeStrings===!1),this.defaultEncoding=e&&e.defaultEncoding||`utf8`,this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=B.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,P(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||e.emitClose!==!1,this.autoDestroy=!e||e.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[M]=[]}function P(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}N.prototype.getBuffer=function(){return i(this.buffered,this.bufferedIndex)},s(N.prototype,`bufferedRequestCount`,{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function F(e){let t=this instanceof qe();if(!t&&!o(F,this))return new F(e);this._writableState=new N(e,this,t),e&&(typeof e.write==`function`&&(this._write=e.write),typeof e.writev==`function`&&(this._writev=e.writev),typeof e.destroy==`function`&&(this._destroy=e.destroy),typeof e.final==`function`&&(this._final=e.final),typeof e.construct==`function`&&(this._construct=e.construct),e.signal&&v(e.signal,this)),m.call(this,e),g.construct(this,()=>{let e=this._writableState;e.writing||W(this,e),q(this,e)})}s(F,f,{__proto__:null,value:function(e){return o(this,e)?!0:this===F?e&&e._writableState instanceof N:!1}}),F.prototype.pipe=function(){A(this,new w)};function I(e,t,n,i){let a=e._writableState;if(typeof n==`function`)i=n,n=a.defaultEncoding;else{if(!n)n=a.defaultEncoding;else if(n!==`buffer`&&!h.isEncoding(n))throw new k(n);typeof i!=`function`&&(i=j)}if(t===null)throw new D;if(!a.objectMode)if(typeof t==`string`)a.decodeStrings!==!1&&(t=h.from(t,n),n=`buffer`);else if(t instanceof h)n=`buffer`;else if(m._isUint8Array(t))t=m._uint8ArrayToBuffer(t),n=`buffer`;else throw new x(`chunk`,[`string`,`Buffer`,`Uint8Array`],t);let o;return a.ending?o=new O:a.destroyed&&(o=new T(`write`)),o?(r.nextTick(i,o),A(e,o,!0),o):(a.pendingcb++,L(e,a,t,n,i))}F.prototype.write=function(e,t,n){return I(this,e,t,n)===!0},F.prototype.cork=function(){this._writableState.corked++},F.prototype.uncork=function(){let e=this._writableState;e.corked&&(e.corked--,e.writing||W(this,e))},F.prototype.setDefaultEncoding=function(e){if(typeof e==`string`&&(e=u(e)),!h.isEncoding(e))throw new k(e);return this._writableState.defaultEncoding=e,this};function L(e,t,n,r,i){let a=t.objectMode?1:n.length;t.length+=a;let o=t.length<t.highWaterMark;return o||(t.needDrain=!0),t.writing||t.corked||t.errored||!t.constructed?(t.buffered.push({chunk:n,encoding:r,callback:i}),t.allBuffers&&r!==`buffer`&&(t.allBuffers=!1),t.allNoop&&i!==j&&(t.allNoop=!1)):(t.writelen=a,t.writecb=i,t.writing=!0,t.sync=!0,e._write(n,r,t.onwrite),t.sync=!1),o&&!t.errored&&!t.destroyed}function R(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new T(`write`)):n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function z(e,t,n,r){--t.pendingcb,r(n),U(t),A(e,n)}function B(e,t){let n=e._writableState,i=n.sync,a=n.writecb;if(typeof a!=`function`){A(e,new C);return}n.writing=!1,n.writecb=null,n.length-=n.writelen,n.writelen=0,t?(t.stack,n.errored||=t,e._readableState&&!e._readableState.errored&&(e._readableState.errored=t),i?r.nextTick(z,e,n,t,a):z(e,n,t,a)):(n.buffered.length>n.bufferedIndex&&W(e,n),i?n.afterWriteTickInfo!==null&&n.afterWriteTickInfo.cb===a?n.afterWriteTickInfo.count++:(n.afterWriteTickInfo={count:1,cb:a,stream:e,state:n},r.nextTick(V,n.afterWriteTickInfo)):H(e,n,1,a))}function V({stream:e,state:t,count:n,cb:r}){return t.afterWriteTickInfo=null,H(e,t,n,r)}function H(e,t,n,r){for(!t.ending&&!e.destroyed&&t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit(`drain`));n-- >0;)t.pendingcb--,r();t.destroyed&&U(t),q(e,t)}function U(e){if(e.writing)return;for(let t=e.bufferedIndex;t<e.buffered.length;++t){let{chunk:n,callback:r}=e.buffered[t],i=e.objectMode?1:n.length;e.length-=i,r(e.errored??new T(`write`))}let t=e[M].splice(0);for(let n=0;n<t.length;n++)t[n](e.errored??new T(`end`));P(e)}function W(e,t){if(t.corked||t.bufferProcessing||t.destroyed||!t.constructed)return;let{buffered:n,bufferedIndex:r,objectMode:a}=t,o=n.length-r;if(!o)return;let s=r;if(t.bufferProcessing=!0,o>1&&e._writev){t.pendingcb-=o-1;let r=t.allNoop?j:e=>{for(let t=s;t<n.length;++t)n[t].callback(e)},a=t.allNoop&&s===0?n:i(n,s);a.allBuffers=t.allBuffers,R(e,t,!0,t.length,a,``,r),P(t)}else{do{let{chunk:r,encoding:i,callback:o}=n[s];n[s++]=null,R(e,t,!1,a?1:r.length,r,i,o)}while(s<n.length&&!t.writing);s===n.length?P(t):s>256?(n.splice(0,s),t.bufferedIndex=0):t.bufferedIndex=s}t.bufferProcessing=!1}F.prototype._write=function(e,t,n){if(this._writev)this._writev([{chunk:e,encoding:t}],n);else throw new S(`_write()`)},F.prototype._writev=null,F.prototype.end=function(e,t,n){let i=this._writableState;typeof e==`function`?(n=e,e=null,t=null):typeof t==`function`&&(n=t,t=null);let o;if(e!=null){let n=I(this,e,t);n instanceof a&&(o=n)}return i.corked&&(i.corked=1,this.uncork()),o||(!i.errored&&!i.ending?(i.ending=!0,q(this,i,!0),i.ended=!0):i.finished?o=new E(`end`):i.destroyed&&(o=new T(`end`))),typeof n==`function`&&(o||i.finished?r.nextTick(n,o):i[M].push(n)),this};function G(e){return e.ending&&!e.destroyed&&e.constructed&&e.length===0&&!e.errored&&e.buffered.length===0&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function K(e,t){let n=!1;function i(i){if(n){A(e,i??C());return}if(n=!0,t.pendingcb--,i){let n=t[M].splice(0);for(let e=0;e<n.length;e++)n[e](i);A(e,i,t.sync)}else G(t)&&(t.prefinished=!0,e.emit(`prefinish`),t.pendingcb++,r.nextTick(te,e,t))}t.sync=!0,t.pendingcb++;try{e._final(i)}catch(e){i(e)}t.sync=!1}function ee(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final==`function`&&!t.destroyed?(t.finalCalled=!0,K(e,t)):(t.prefinished=!0,e.emit(`prefinish`)))}function q(e,t,n){G(t)&&(ee(e,t),t.pendingcb===0&&(n?(t.pendingcb++,r.nextTick((e,t)=>{G(t)?te(e,t):t.pendingcb--},e,t)):G(t)&&(t.pendingcb++,te(e,t))))}function te(e,t){t.pendingcb--,t.finished=!0;let n=t[M].splice(0);for(let e=0;e<n.length;e++)n[e]();if(e.emit(`finish`),t.autoDestroy){let t=e._readableState;(!t||t.autoDestroy&&(t.endEmitted||t.readable===!1))&&e.destroy()}}c(F.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(e){this._writableState&&(this._writableState.destroyed=e)}},writable:{__proto__:null,get(){let e=this._writableState;return!!e&&e.writable!==!1&&!e.destroyed&&!e.errored&&!e.ending&&!e.ended},set(e){this._writableState&&(this._writableState.writable=!!e)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let e=this._writableState;return e?!e.destroyed&&!e.ending&&e.needDrain:!1}},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!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});let ne=g.destroy;F.prototype.destroy=function(e,t){let n=this._writableState;return!n.destroyed&&(n.bufferedIndex<n.buffered.length||n[M].length)&&r.nextTick(U,n),ne.call(this,e,t),this},F.prototype._undestroy=g.undestroy,F.prototype._destroy=function(e,t){t(e)},F.prototype[p.captureRejectionSymbol]=function(e){this.destroy(e)};let re;function J(){return re===void 0&&(re={}),re}F.fromWeb=function(e,t){return J().newStreamWritableFromWritableStream(e,t)},F.toWeb=function(e){return J().newWritableStreamFromStreamWritable(e)}})),Ke=t(((e,t)=>{let r=Ne(),i=n(`buffer`),{isReadable:a,isWritable:o,isIterable:s,isNodeStream:c,isReadableNodeStream:l,isWritableNodeStream:u,isDuplexNodeStream:d,isReadableStream:f,isWritableStream:p}=Pe(),m=Fe(),{AbortError:h,codes:{ERR_INVALID_ARG_TYPE:g,ERR_INVALID_RETURN_VALUE:v}}=Q(),{destroyer:y}=Ie(),b=qe(),x=We(),S=Ge(),{createDeferredPromise:C}=$(),w=Ue(),T=globalThis.Blob||i.Blob,E=T===void 0?function(e){return!1}:function(e){return e instanceof T},D=globalThis.AbortController||je().AbortController,{FunctionPrototypeCall:O}=Z();var k=class extends b{constructor(e){super(e),e?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),e?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};t.exports=function e(t,n){if(d(t))return t;if(l(t))return j({readable:t});if(u(t))return j({writable:t});if(c(t))return j({writable:!1,readable:!1});if(f(t))return j({readable:x.fromWeb(t)});if(p(t))return j({writable:S.fromWeb(t)});if(typeof t==`function`){let{value:e,write:i,final:a,destroy:o}=A(t);if(s(e))return w(k,e,{objectMode:!0,write:i,final:a,destroy:o});let c=e?.then;if(typeof c==`function`){let t,n=O(c,e,e=>{if(e!=null)throw new v(`nully`,`body`,e)},e=>{y(t,e)});return t=new k({objectMode:!0,readable:!1,write:i,final(e){a(async()=>{try{await n,r.nextTick(e,null)}catch(t){r.nextTick(e,t)}})},destroy:o})}throw new v(`Iterable, AsyncIterable or AsyncFunction`,n,e)}if(E(t))return e(t.arrayBuffer());if(s(t))return w(k,t,{objectMode:!0,writable:!1});if(f(t?.readable)&&p(t?.writable))return k.fromWeb(t);if(typeof t?.writable==`object`||typeof t?.readable==`object`)return j({readable:t!=null&&t.readable?l(t?.readable)?t?.readable:e(t.readable):void 0,writable:t!=null&&t.writable?u(t?.writable)?t?.writable:e(t.writable):void 0});let i=t?.then;if(typeof i==`function`){let e;return O(i,t,t=>{t!=null&&e.push(t),e.push(null)},t=>{y(e,t)}),e=new k({objectMode:!0,writable:!1,read(){}})}throw new g(n,[`Blob`,`ReadableStream`,`WritableStream`,`Stream`,`Iterable`,`AsyncIterable`,`Function`,`{ readable, writable } pair`,`Promise`],t)};function A(e){let{promise:t,resolve:n}=C(),i=new D,a=i.signal;return{value:e((async function*(){for(;;){let e=t;t=null;let{chunk:i,done:o,cb:s}=await e;if(r.nextTick(s),o)return;if(a.aborted)throw new h(void 0,{cause:a.reason});({promise:t,resolve:n}=C()),yield i}})(),{signal:a}),write(e,t,r){let i=n;n=null,i({chunk:e,done:!1,cb:r})},final(e){let t=n;n=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}function j(e){let t=e.readable&&typeof e.readable.read!=`function`?x.wrap(e.readable):e.readable,n=e.writable,r=!!a(t),i=!!o(n),s,c,l,u,d;function f(e){let t=u;u=null,t?t(e):e&&d.destroy(e)}return d=new k({readableObjectMode:!!(t!=null&&t.readableObjectMode),writableObjectMode:!!(n!=null&&n.writableObjectMode),readable:r,writable:i}),i&&(m(n,e=>{i=!1,e&&y(t,e),f(e)}),d._write=function(e,t,r){n.write(e,t)?r():s=r},d._final=function(e){n.end(),c=e},n.on(`drain`,function(){if(s){let e=s;s=null,e()}}),n.on(`finish`,function(){if(c){let e=c;c=null,e()}})),r&&(m(t,e=>{r=!1,e&&y(t,e),f(e)}),t.on(`readable`,function(){if(l){let e=l;l=null,e()}}),t.on(`end`,function(){d.push(null)}),d._read=function(){for(;;){let e=t.read();if(e===null){l=d._read;return}if(!d.push(e))return}}),d._destroy=function(e,r){!e&&u!==null&&(e=new h),l=null,s=null,c=null,u===null?r(e):(u=r,y(n,e),y(t,e))},d}})),qe=t(((e,t)=>{let{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:r,ObjectKeys:i,ObjectSetPrototypeOf:a}=Z();t.exports=c;let o=We(),s=Ge();a(c.prototype,o.prototype),a(c,o);{let e=i(s.prototype);for(let t=0;t<e.length;t++){let n=e[t];c.prototype[n]||(c.prototype[n]=s.prototype[n])}}function c(e){if(!(this instanceof c))return new c(e);o.call(this,e),s.call(this,e),e?(this.allowHalfOpen=e.allowHalfOpen!==!1,e.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),e.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}n(c.prototype,{writable:{__proto__:null,...r(s.prototype,`writable`)},writableHighWaterMark:{__proto__:null,...r(s.prototype,`writableHighWaterMark`)},writableObjectMode:{__proto__:null,...r(s.prototype,`writableObjectMode`)},writableBuffer:{__proto__:null,...r(s.prototype,`writableBuffer`)},writableLength:{__proto__:null,...r(s.prototype,`writableLength`)},writableFinished:{__proto__:null,...r(s.prototype,`writableFinished`)},writableCorked:{__proto__:null,...r(s.prototype,`writableCorked`)},writableEnded:{__proto__:null,...r(s.prototype,`writableEnded`)},writableNeedDrain:{__proto__:null,...r(s.prototype,`writableNeedDrain`)},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(e){this._readableState&&this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}});let l;function u(){return l===void 0&&(l={}),l}c.fromWeb=function(e,t){return u().newStreamDuplexFromReadableWritablePair(e,t)},c.toWeb=function(e){return u().newReadableWritablePairFromDuplex(e)};let d;c.from=function(e){return d||=Ke(),d(e,`body`)}})),Je=t(((e,t)=>{let{ObjectSetPrototypeOf:n,Symbol:r}=Z();t.exports=c;let{ERR_METHOD_NOT_IMPLEMENTED:i}=Q().codes,a=qe(),{getHighWaterMark:o}=Be();n(c.prototype,a.prototype),n(c,a);let s=r(`kCallback`);function c(e){if(!(this instanceof c))return new c(e);let t=e?o(this,e,`readableHighWaterMark`,!0):null;t===0&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),a.call(this,e),this._readableState.sync=!1,this[s]=null,e&&(typeof e.transform==`function`&&(this._transform=e.transform),typeof e.flush==`function`&&(this._flush=e.flush)),this.on(`prefinish`,u)}function l(e){typeof this._flush==`function`&&!this.destroyed?this._flush((t,n)=>{if(t){e?e(t):this.destroy(t);return}n!=null&&this.push(n),this.push(null),e&&e()}):(this.push(null),e&&e())}function u(){this._final!==l&&l.call(this)}c.prototype._final=l,c.prototype._transform=function(e,t,n){throw new i(`_transform()`)},c.prototype._write=function(e,t,n){let r=this._readableState,i=this._writableState,a=r.length;this._transform(e,t,(e,t)=>{if(e){n(e);return}t!=null&&this.push(t),i.ended||a===r.length||r.length<r.highWaterMark?n():this[s]=n})},c.prototype._read=function(){if(this[s]){let e=this[s];this[s]=null,e()}}})),Ye=t(((e,t)=>{let{ObjectSetPrototypeOf:n}=Z();t.exports=i;let r=Je();n(i.prototype,r.prototype),n(i,r);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}i.prototype._transform=function(e,t,n){n(null,e)}})),Xe=t(((e,t)=>{let n=Ne(),{ArrayIsArray:r,Promise:i,SymbolAsyncIterator:a,SymbolDispose:o}=Z(),s=Fe(),{once:c}=$(),l=Ie(),u=qe(),{aggregateTwoErrors:d,codes:{ERR_INVALID_ARG_TYPE:f,ERR_INVALID_RETURN_VALUE:p,ERR_MISSING_ARGS:m,ERR_STREAM_DESTROYED:h,ERR_STREAM_PREMATURE_CLOSE:g},AbortError:v}=Q(),{validateFunction:y,validateAbortSignal:b}=Me(),{isIterable:x,isReadable:S,isReadableNodeStream:C,isNodeStream:w,isTransformStream:T,isWebStream:E,isReadableStream:D,isReadableFinished:O}=Pe(),k=globalThis.AbortController||je().AbortController,A,j,M;function N(e,t,n){let r=!1;return e.on(`close`,()=>{r=!0}),{destroy:t=>{r||(r=!0,l.destroyer(e,t||new h(`pipe`)))},cleanup:s(e,{readable:t,writable:n},e=>{r=!e})}}function P(e){return y(e[e.length-1],`streams[stream.length - 1]`),e.pop()}function F(e){if(x(e))return e;if(C(e))return I(e);throw new f(`val`,[`Readable`,`Iterable`,`AsyncIterable`],e)}async function*I(e){j||=We(),yield*j.prototype[a].call(e)}async function L(e,t,n,{end:r}){let a,o=null,c=e=>{if(e&&(a=e),o){let e=o;o=null,e()}},l=()=>new i((e,t)=>{a?t(a):o=()=>{a?t(a):e()}});t.on(`drain`,c);let u=s(t,{readable:!1},c);try{t.writableNeedDrain&&await l();for await(let n of e)t.write(n)||await l();r&&(t.end(),await l()),n()}catch(e){n(a===e?e:d(a,e))}finally{u(),t.off(`drain`,c)}}async function R(e,t,n,{end:r}){T(t)&&(t=t.writable);let i=t.getWriter();try{for await(let t of e)await i.ready,i.write(t).catch(()=>{});await i.ready,r&&await i.close(),n()}catch(e){try{await i.abort(e),n(e)}catch(e){n(e)}}}function z(...e){return B(e,c(P(e)))}function B(e,t,i){if(e.length===1&&r(e[0])&&(e=e[0]),e.length<2)throw new m(`streams`);let a=new k,s=a.signal,c=i?.signal,l=[];b(c,`options.signal`);function d(){I(new v)}M||=$().addAbortListener;let h;c&&(h=M(c,d));let g,y,O=[],j=0;function P(e){I(e,--j===0)}function I(e,r){var i;if(e&&(!g||g.code===`ERR_STREAM_PREMATURE_CLOSE`)&&(g=e),!(!g&&!r)){for(;O.length;)O.shift()(g);(i=h)==null||i[o](),a.abort(),r&&(g||l.forEach(e=>e()),n.nextTick(t,g,y))}}let z;for(let t=0;t<e.length;t++){let r=e[t],a=t<e.length-1,o=t>0,c=a||i?.end!==!1,d=t===e.length-1;if(w(r)){if(c){let{destroy:e,cleanup:t}=N(r,a,o);O.push(e),S(r)&&d&&l.push(t)}function e(e){e&&e.name!==`AbortError`&&e.code!==`ERR_STREAM_PREMATURE_CLOSE`&&P(e)}r.on(`error`,e),S(r)&&d&&l.push(()=>{r.removeListener(`error`,e)})}if(t===0)if(typeof r==`function`){if(z=r({signal:s}),!x(z))throw new p(`Iterable, AsyncIterable or Stream`,`source`,z)}else z=x(r)||C(r)||T(r)?r:u.from(r);else if(typeof r==`function`)if(z=T(z)?F(z?.readable):F(z),z=r(z,{signal:s}),a){if(!x(z,!0))throw new p(`AsyncIterable`,`transform[${t-1}]`,z)}else{A||=Ye();let e=new A({objectMode:!0}),t=z?.then;if(typeof t==`function`)j++,t.call(z,t=>{y=t,t!=null&&e.write(t),c&&e.end(),n.nextTick(P)},t=>{e.destroy(t),n.nextTick(P,t)});else if(x(z,!0))j++,L(z,e,P,{end:c});else if(D(z)||T(z)){let t=z.readable||z;j++,L(t,e,P,{end:c})}else throw new p(`AsyncIterable or Promise`,`destination`,z);z=e;let{destroy:r,cleanup:i}=N(z,!1,!0);O.push(r),d&&l.push(i)}else if(w(r)){if(C(z)){j+=2;let e=V(z,r,P,{end:c});S(r)&&d&&l.push(e)}else if(T(z)||D(z)){let e=z.readable||z;j++,L(e,r,P,{end:c})}else if(x(z))j++,L(z,r,P,{end:c});else throw new f(`val`,[`Readable`,`Iterable`,`AsyncIterable`,`ReadableStream`,`TransformStream`],z);z=r}else if(E(r)){if(C(z))j++,R(F(z),r,P,{end:c});else if(D(z)||x(z))j++,R(z,r,P,{end:c});else if(T(z))j++,R(z.readable,r,P,{end:c});else throw new f(`val`,[`Readable`,`Iterable`,`AsyncIterable`,`ReadableStream`,`TransformStream`],z);z=r}else z=u.from(r)}return(s!=null&&s.aborted||c!=null&&c.aborted)&&n.nextTick(d),z}function V(e,t,r,{end:i}){let a=!1;if(t.on(`close`,()=>{a||r(new g)}),e.pipe(t,{end:!1}),i){function r(){a=!0,t.end()}O(e)?n.nextTick(r):e.once(`end`,r)}else r();return s(e,{readable:!0,writable:!1},t=>{let n=e._readableState;t&&t.code===`ERR_STREAM_PREMATURE_CLOSE`&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once(`end`,r).once(`error`,r):r(t)}),s(t,{readable:!1,writable:!0},r)}t.exports={pipelineImpl:B,pipeline:z}})),Ze=t(((e,t)=>{let{pipeline:n}=Xe(),r=qe(),{destroyer:i}=Ie(),{isNodeStream:a,isReadable:o,isWritable:s,isWebStream:c,isTransformStream:l,isWritableStream:u,isReadableStream:d}=Pe(),{AbortError:f,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:m}}=Q(),h=Fe();t.exports=function(...e){if(e.length===0)throw new m(`streams`);if(e.length===1)return r.from(e[0]);let t=[...e];if(typeof e[0]==`function`&&(e[0]=r.from(e[0])),typeof e[e.length-1]==`function`){let t=e.length-1;e[t]=r.from(e[t])}for(let n=0;n<e.length;++n)if(!(!a(e[n])&&!c(e[n]))){if(n<e.length-1&&!(o(e[n])||d(e[n])||l(e[n])))throw new p(`streams[${n}]`,t[n],`must be readable`);if(n>0&&!(s(e[n])||u(e[n])||l(e[n])))throw new p(`streams[${n}]`,t[n],`must be writable`)}let g,v,y,b,x;function S(e){let t=b;b=null,t?t(e):e?x.destroy(e):!E&&!T&&x.destroy()}let C=e[0],w=n(e,S),T=!!(s(C)||u(C)||l(C)),E=!!(o(w)||d(w)||l(w));if(x=new r({writableObjectMode:!!(C!=null&&C.writableObjectMode),readableObjectMode:!!(w!=null&&w.readableObjectMode),writable:T,readable:E}),T){if(a(C))x._write=function(e,t,n){C.write(e,t)?n():g=n},x._final=function(e){C.end(),v=e},C.on(`drain`,function(){if(g){let e=g;g=null,e()}});else if(c(C)){let e=(l(C)?C.writable:C).getWriter();x._write=async function(t,n,r){try{await e.ready,e.write(t).catch(()=>{}),r()}catch(e){r(e)}},x._final=async function(t){try{await e.ready,e.close().catch(()=>{}),v=t}catch(e){t(e)}}}h(l(w)?w.readable:w,()=>{if(v){let e=v;v=null,e()}})}if(E){if(a(w))w.on(`readable`,function(){if(y){let e=y;y=null,e()}}),w.on(`end`,function(){x.push(null)}),x._read=function(){for(;;){let e=w.read();if(e===null){y=x._read;return}if(!x.push(e))return}};else if(c(w)){let e=(l(w)?w.readable:w).getReader();x._read=async function(){for(;;)try{let{value:t,done:n}=await e.read();if(!x.push(t))return;if(n){x.push(null);return}}catch{return}}}}return x._destroy=function(e,t){!e&&b!==null&&(e=new f),y=null,g=null,v=null,b===null?t(e):(b=t,a(w)&&i(w,e))},x}})),Qe=t(((e,t)=>{let n=globalThis.AbortController||je().AbortController,{codes:{ERR_INVALID_ARG_VALUE:r,ERR_INVALID_ARG_TYPE:i,ERR_MISSING_ARGS:a,ERR_OUT_OF_RANGE:o},AbortError:s}=Q(),{validateAbortSignal:c,validateInteger:l,validateObject:u}=Me(),d=Z().Symbol(`kWeak`),f=Z().Symbol(`kResistStopPropagation`),{finished:p}=Fe(),m=Ze(),{addAbortSignalNoValidate:h}=Re(),{isWritable:g,isNodeStream:v}=Pe(),{deprecate:y}=$(),{ArrayPrototypePush:b,Boolean:x,MathFloor:S,Number:C,NumberIsNaN:w,Promise:T,PromiseReject:E,PromiseResolve:D,PromisePrototypeThen:O,Symbol:k}=Z(),A=k(`kEmpty`),j=k(`kEof`);function M(e,t){if(t!=null&&u(t,`options`),t?.signal!=null&&c(t.signal,`options.signal`),v(e)&&!g(e))throw new r(`stream`,e,`must be writable`);let n=m(this,e);return t!=null&&t.signal&&h(t.signal,n),n}function N(e,t){if(typeof e!=`function`)throw new i(`fn`,[`Function`,`AsyncFunction`],e);t!=null&&u(t,`options`),t?.signal!=null&&c(t.signal,`options.signal`);let n=1;t?.concurrency!=null&&(n=S(t.concurrency));let r=n-1;return t?.highWaterMark!=null&&(r=S(t.highWaterMark)),l(n,`options.concurrency`,1),l(r,`options.highWaterMark`,0),r+=n,async function*(){let i=$().AbortSignalAny([t?.signal].filter(x)),a=this,o=[],c={signal:i},l,u,d=!1,f=0;function p(){d=!0,m()}function m(){--f,h()}function h(){u&&!d&&f<n&&o.length<r&&(u(),u=null)}async function g(){try{for await(let t of a){if(d)return;if(i.aborted)throw new s;try{if(t=e(t,c),t===A)continue;t=D(t)}catch(e){t=E(e)}f+=1,O(t,m,p),o.push(t),l&&=(l(),null),!d&&(o.length>=r||f>=n)&&await new T(e=>{u=e})}o.push(j)}catch(e){let t=E(e);O(t,m,p),o.push(t)}finally{d=!0,l&&=(l(),null)}}g();try{for(;;){for(;o.length>0;){let e=await o[0];if(e===j)return;if(i.aborted)throw new s;e!==A&&(yield e),o.shift(),h()}await new T(e=>{l=e})}}finally{d=!0,u&&=(u(),null)}}.call(this)}function P(e=void 0){return e!=null&&u(e,`options`),e?.signal!=null&&c(e.signal,`options.signal`),async function*(){let t=0;for await(let r of this){var n;if(e!=null&&(n=e.signal)!=null&&n.aborted)throw new s({cause:e.signal.reason});yield[t++,r]}}.call(this)}async function F(e,t=void 0){for await(let n of z.call(this,e,t))return!0;return!1}async function I(e,t=void 0){if(typeof e!=`function`)throw new i(`fn`,[`Function`,`AsyncFunction`],e);return!await F.call(this,async(...t)=>!await e(...t),t)}async function L(e,t){for await(let n of z.call(this,e,t))return n}async function R(e,t){if(typeof e!=`function`)throw new i(`fn`,[`Function`,`AsyncFunction`],e);async function n(t,n){return await e(t,n),A}for await(let e of N.call(this,n,t));}function z(e,t){if(typeof e!=`function`)throw new i(`fn`,[`Function`,`AsyncFunction`],e);async function n(t,n){return await e(t,n)?t:A}return N.call(this,n,t)}var B=class extends a{constructor(){super(`reduce`),this.message=`Reduce of an empty stream requires an initial value`}};async function V(e,t,r){var a;if(typeof e!=`function`)throw new i(`reducer`,[`Function`,`AsyncFunction`],e);r!=null&&u(r,`options`),r?.signal!=null&&c(r.signal,`options.signal`);let o=arguments.length>1;if(r!=null&&(a=r.signal)!=null&&a.aborted){let e=new s(void 0,{cause:r.signal.reason});throw this.once(`error`,()=>{}),await p(this.destroy(e)),e}let l=new n,m=l.signal;if(r!=null&&r.signal){let e={once:!0,[d]:this,[f]:!0};r.signal.addEventListener(`abort`,()=>l.abort(),e)}let h=!1;try{for await(let n of this){var g;if(h=!0,r!=null&&(g=r.signal)!=null&&g.aborted)throw new s;o?t=await e(t,n,{signal:m}):(t=n,o=!0)}if(!h&&!o)throw new B}finally{l.abort()}return t}async function H(e){e!=null&&u(e,`options`),e?.signal!=null&&c(e.signal,`options.signal`);let t=[];for await(let r of this){var n;if(e!=null&&(n=e.signal)!=null&&n.aborted)throw new s(void 0,{cause:e.signal.reason});b(t,r)}return t}function U(e,t){let n=N.call(this,e,t);return async function*(){for await(let e of n)yield*e}.call(this)}function W(e){if(e=C(e),w(e))return 0;if(e<0)throw new o(`number`,`>= 0`,e);return e}function G(e,t=void 0){return t!=null&&u(t,`options`),t?.signal!=null&&c(t.signal,`options.signal`),e=W(e),async function*(){var n;if(t!=null&&(n=t.signal)!=null&&n.aborted)throw new s;for await(let n of this){var r;if(t!=null&&(r=t.signal)!=null&&r.aborted)throw new s;e--<=0&&(yield n)}}.call(this)}function K(e,t=void 0){return t!=null&&u(t,`options`),t?.signal!=null&&c(t.signal,`options.signal`),e=W(e),async function*(){var n;if(t!=null&&(n=t.signal)!=null&&n.aborted)throw new s;for await(let n of this){var r;if(t!=null&&(r=t.signal)!=null&&r.aborted)throw new s;if(e-- >0&&(yield n),e<=0)return}}.call(this)}t.exports.streamReturningOperators={asIndexedPairs:y(P,`readable.asIndexedPairs will be removed in a future version.`),drop:G,filter:z,flatMap:U,map:N,take:K,compose:M},t.exports.promiseReturningOperators={every:I,forEach:R,reduce:V,toArray:H,some:F,find:L}})),$e=t(((e,t)=>{let{ArrayPrototypePop:n,Promise:r}=Z(),{isIterable:i,isNodeStream:a,isWebStream:o}=Pe(),{pipelineImpl:s}=Xe(),{finished:c}=Fe();et();function l(...e){return new r((t,r)=>{let c,l,u=e[e.length-1];if(u&&typeof u==`object`&&!a(u)&&!i(u)&&!o(u)){let t=n(e);c=t.signal,l=t.end}s(e,(e,n)=>{e?r(e):t(n)},{signal:c,end:l})})}t.exports={finished:c,pipeline:l}})),et=t(((e,t)=>{let{Buffer:r}=n(`buffer`),{ObjectDefineProperty:i,ObjectKeys:a,ReflectApply:o}=Z(),{promisify:{custom:s}}=$(),{streamReturningOperators:c,promiseReturningOperators:l}=Qe(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:u}}=Q(),d=Ze(),{setDefaultHighWaterMark:f,getDefaultHighWaterMark:p}=Be(),{pipeline:m}=Xe(),{destroyer:h}=Ie(),g=Fe(),v=$e(),y=Pe(),b=t.exports=Le().Stream;b.isDestroyed=y.isDestroyed,b.isDisturbed=y.isDisturbed,b.isErrored=y.isErrored,b.isReadable=y.isReadable,b.isWritable=y.isWritable,b.Readable=We();for(let e of a(c)){let t=c[e];function n(...e){if(new.target)throw u();return b.Readable.from(o(t,this,e))}i(n,`name`,{__proto__:null,value:t.name}),i(n,`length`,{__proto__:null,value:t.length}),i(b.Readable.prototype,e,{__proto__:null,value:n,enumerable:!1,configurable:!0,writable:!0})}for(let e of a(l)){let t=l[e];function n(...e){if(new.target)throw u();return o(t,this,e)}i(n,`name`,{__proto__:null,value:t.name}),i(n,`length`,{__proto__:null,value:t.length}),i(b.Readable.prototype,e,{__proto__:null,value:n,enumerable:!1,configurable:!0,writable:!0})}b.Writable=Ge(),b.Duplex=qe(),b.Transform=Je(),b.PassThrough=Ye(),b.pipeline=m;let{addAbortSignal:x}=Re();b.addAbortSignal=x,b.finished=g,b.destroy=h,b.compose=d,b.setDefaultHighWaterMark=f,b.getDefaultHighWaterMark=p,i(b,`promises`,{__proto__:null,configurable:!0,enumerable:!0,get(){return v}}),i(m,s,{__proto__:null,enumerable:!0,get(){return v.pipeline}}),i(g,s,{__proto__:null,enumerable:!0,get(){return v.finished}}),b.Stream=b,b._isUint8Array=function(e){return e instanceof Uint8Array},b._uint8ArrayToBuffer=function(e){return r.from(e.buffer,e.byteOffset,e.byteLength)}})),tt=t(((e,t)=>{let r=n(`stream`);if(r&&process.env.READABLE_STREAM===`disable`){let e=r.promises;t.exports._uint8ArrayToBuffer=r._uint8ArrayToBuffer,t.exports._isUint8Array=r._isUint8Array,t.exports.isDisturbed=r.isDisturbed,t.exports.isErrored=r.isErrored,t.exports.isReadable=r.isReadable,t.exports.Readable=r.Readable,t.exports.Writable=r.Writable,t.exports.Duplex=r.Duplex,t.exports.Transform=r.Transform,t.exports.PassThrough=r.PassThrough,t.exports.addAbortSignal=r.addAbortSignal,t.exports.finished=r.finished,t.exports.destroy=r.destroy,t.exports.pipeline=r.pipeline,t.exports.compose=r.compose,Object.defineProperty(r,`promises`,{configurable:!0,enumerable:!0,get(){return e}}),t.exports.Stream=r.Stream}else{let e=et(),n=$e(),r=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=r,t.exports.pipeline=e.pipeline,t.exports.compose=e.compose,Object.defineProperty(e,`promises`,{configurable:!0,enumerable:!0,get(){return n}}),t.exports.Stream=e.Stream}t.exports.default=t.exports})),nt=t(((e,t)=>{function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}t.exports=n})),rt=t(((e,t)=>{var n=V(),r=ge(),i=_e(),a=n?n.isConcatSpreadable:void 0;function o(e){return i(e)||r(e)||!!(a&&e&&e[a])}t.exports=o})),it=t(((e,t)=>{var n=nt(),r=rt();function i(e,t,a,o,s){var c=-1,l=e.length;for(a||=r,s||=[];++c<l;){var u=e[c];t>0&&a(u)?t>1?i(u,t-1,a,o,s):n(s,u):o||(s[s.length]=u)}return s}t.exports=i})),at=t(((e,t)=>{var n=it();function r(e){return e!=null&&e.length?n(e,1):[]}t.exports=r})),ot=t(((e,t)=>{t.exports=J()(Object,`create`)})),st=t(((e,t)=>{var n=ot();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),ct=t(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}t.exports=n})),lt=t(((e,t)=>{var n=ot(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=a})),ut=t(((e,t)=>{var n=ot(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),dt=t(((e,t)=>{var n=ot(),r=`__lodash_hash_undefined__`;function i(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=n&&t===void 0?r:t,this}t.exports=i})),ft=t(((e,t)=>{var n=st(),r=ct(),i=lt(),a=ut(),o=dt();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),pt=t(((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n})),mt=t(((e,t)=>{var n=le();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),ht=t(((e,t)=>{var n=mt(),r=Array.prototype.splice;function i(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=i})),gt=t(((e,t)=>{var n=mt();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),_t=t(((e,t)=>{var n=mt();function r(e){return n(this.__data__,e)>-1}t.exports=r})),vt=t(((e,t)=>{var n=mt();function r(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=r})),yt=t(((e,t)=>{var n=pt(),r=ht(),i=gt(),a=_t(),o=vt();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),bt=t(((e,t)=>{t.exports=J()(B(),`Map`)})),xt=t(((e,t)=>{var n=ft(),r=yt(),i=bt();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),St=t(((e,t)=>{function n(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=n})),Ct=t(((e,t)=>{var n=St();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),wt=t(((e,t)=>{var n=Ct();function r(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}t.exports=r})),Tt=t(((e,t)=>{var n=Ct();function r(e){return n(this,e).get(e)}t.exports=r})),Et=t(((e,t)=>{var n=Ct();function r(e){return n(this,e).has(e)}t.exports=r})),Dt=t(((e,t)=>{var n=Ct();function r(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=r})),Ot=t(((e,t)=>{var n=xt(),r=wt(),i=Tt(),a=Et(),o=Dt();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),kt=t(((e,t)=>{var n=`__lodash_hash_undefined__`;function r(e){return this.__data__.set(e,n),this}t.exports=r})),At=t(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),jt=t(((e,t)=>{var n=Ot(),r=kt(),i=At();function a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=r,a.prototype.has=i,t.exports=a})),Mt=t(((e,t)=>{function n(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}t.exports=n})),Nt=t(((e,t)=>{function n(e){return e!==e}t.exports=n})),Pt=t(((e,t)=>{function n(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}t.exports=n})),Ft=t(((e,t)=>{var n=Mt(),r=Nt(),i=Pt();function a(e,t,a){return t===t?i(e,t,a):n(e,r,a)}t.exports=a})),It=t(((e,t)=>{var n=Ft();function r(e,t){return!!(e!=null&&e.length)&&n(e,t,0)>-1}t.exports=r})),Lt=t(((e,t)=>{function n(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}t.exports=n})),Rt=t(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}t.exports=n})),zt=t(((e,t)=>{function n(e,t){return e.has(t)}t.exports=n})),Bt=t(((e,t)=>{var n=jt(),r=It(),i=Lt(),a=Rt(),o=xe(),s=zt(),c=200;function l(e,t,l,u){var d=-1,f=r,p=!0,m=e.length,h=[],g=t.length;if(!m)return h;l&&(t=a(t,o(l))),u?(f=i,p=!1):t.length>=c&&(f=s,p=!1,t=new n(t));outer:for(;++d<m;){var v=e[d],y=l==null?v:l(v);if(v=u||v!==0?v:0,p&&y===y){for(var b=g;b--;)if(t[b]===y)continue outer;h.push(v)}else f(t,y,u)||h.push(v)}return h}t.exports=l})),Vt=t(((e,t)=>{var n=de(),r=me();function i(e){return r(e)&&n(e)}t.exports=i})),Ht=t(((e,t)=>{var n=Bt(),r=it(),i=ce(),a=Vt();t.exports=i(function(e,t){return a(e)?n(e,r(t,1,a,!0)):[]})})),Ut=t(((e,t)=>{t.exports=J()(B(),`Set`)})),Wt=t(((e,t)=>{function n(){}t.exports=n})),Gt=t(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.exports=n})),Kt=t(((e,t)=>{var n=Ut(),r=Wt(),i=Gt();t.exports=n&&1/i(new n([,-0]))[1]==1/0?function(e){return new n(e)}:r})),qt=t(((e,t)=>{var n=jt(),r=It(),i=Lt(),a=zt(),o=Kt(),s=Gt(),c=200;function l(e,t,l){var u=-1,d=r,f=e.length,p=!0,m=[],h=m;if(l)p=!1,d=i;else if(f>=c){var g=t?null:o(e);if(g)return s(g);p=!1,d=a,h=new n}else h=t?[]:m;outer:for(;++u<f;){var v=e[u],y=t?t(v):v;if(v=l||v!==0?v:0,p&&y===y){for(var b=h.length;b--;)if(h[b]===y)continue outer;t&&h.push(y),m.push(v)}else d(h,y,l)||(h!==m&&h.push(y),m.push(v))}return m}t.exports=l})),Jt=t(((e,t)=>{var n=it(),r=ce(),i=qt(),a=Vt();t.exports=r(function(e){return i(n(e,1,a,!0))})})),Yt=t(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),Xt=t(((e,t)=>{t.exports=Yt()(Object.getPrototypeOf,Object)})),Zt=t(((e,t)=>{var n=W(),r=Xt(),i=me(),a=`[object Object]`,o=Function.prototype,s=Object.prototype,c=o.toString,l=s.hasOwnProperty,u=c.call(Object);function d(e){if(!i(e)||n(e)!=a)return!1;var t=r(e);if(t===null)return!0;var o=l.call(t,`constructor`)&&t.constructor;return typeof o==`function`&&o instanceof o&&c.call(o)==u}t.exports=d})),Qt=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.assertValidPattern=void 0,e.assertValidPattern=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)}})),$t=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.parseClass=void 0;let 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]},n=e=>e.replace(/[[\]\\-]/g,`\\$&`),r=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),i=e=>e.join(``);e.parseClass=(e,a)=>{let o=a;if(e.charAt(o)!==`[`)throw Error(`not in a brace expression`);let s=[],c=[],l=o+1,u=!1,d=!1,f=!1,p=!1,m=o,h=``;WHILE:for(;l<e.length;){let r=e.charAt(l);if((r===`!`||r===`^`)&&l===o+1){p=!0,l++;continue}if(r===`]`&&u&&!f){m=l+1;break}if(u=!0,r===`\\`&&!f){f=!0,l++;continue}if(r===`[`&&!f){for(let[n,[r,i,a]]of Object.entries(t))if(e.startsWith(n,l)){if(h)return[`$.`,!1,e.length-o,!0];l+=n.length,a?c.push(r):s.push(r),d||=i;continue WHILE}}if(f=!1,h){r>h?s.push(n(h)+`-`+n(r)):r===h&&s.push(n(r)),h=``,l++;continue}if(e.startsWith(`-]`,l+1)){s.push(n(r+`-`)),l+=2;continue}if(e.startsWith(`-`,l+1)){h=r,l+=2;continue}s.push(n(r)),l++}if(m<l)return[``,!1,0,!1];if(!s.length&&!c.length)return[`$.`,!1,e.length-o,!0];if(c.length===0&&s.length===1&&/^\\?.$/.test(s[0])&&!p)return[r(s[0].length===2?s[0].slice(-1):s[0]),!1,m-o,!1];let g=`[`+(p?`^`:``)+i(s)+`]`,v=`[`+(p?``:`^`)+i(c)+`]`;return[s.length&&c.length?`(`+g+`|`+v+`)`:s.length?g:v,d,m-o,!0]}})),en=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.unescape=void 0,e.unescape=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,`$1$2`).replace(/\\([^\/])/g,`$1`)})),tn=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.AST=void 0;let t=$t(),n=en(),r=new Set([`!`,`?`,`+`,`*`,`@`]),i=e=>r.has(e),a=`(?!\\.)`,o=new Set([`[`,`.`]),s=new Set([`..`,`.`]),c=new Set(`().*{}+?[]^$\\!`),l=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),u=`[^/]`,d=u+`*?`,f=u+`+?`;e.AST=class e{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;constructor(e,t,n={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#o=this.#e===this?[]:this.#e.#o,e===`!`&&!this.#e.#s&&this.#o.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!=`string`&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l===void 0?this.type?this.#l=this.type+`(`+this.#r.map(e=>String(e)).join(`|`)+`)`:this.#l=this.#r.map(e=>String(e)).join(``):this.#l}#d(){if(this!==this.#e)throw Error(`should only call on root`);if(this.#s)return this;this.toString(),this.#s=!0;let e;for(;e=this.#o.pop();){if(e.type!==`!`)continue;let t=e,n=t.#i;for(;n;){for(let r=t.#a+1;!n.type&&r<n.#r.length;r++)for(let t of e.#r){if(typeof t==`string`)throw Error(`string part in extglob AST??`);t.copyIn(n.#r[r])}t=n,n=t.#i}}return this}push(...t){for(let n of t)if(n!==``){if(typeof n!=`string`&&!(n instanceof e&&n.#i===this))throw Error(`invalid part: `+n);this.#r.push(n)}}toJSON(){let e=this.type===null?this.#r.slice().map(e=>typeof e==`string`?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type===`!`)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let t=this.#i;for(let n=0;n<this.#a;n++){let r=t.#r[n];if(!(r instanceof e&&r.type===`!`))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type===`!`)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#r.length:0;return this.#a===e-1}copyIn(e){typeof e==`string`?this.push(e):this.push(e.clone(this))}clone(t){let n=new e(this.type,t);for(let e of this.#r)n.copyIn(e);return n}static#f(t,n,r,a){let o=!1,s=!1,c=-1,l=!1;if(n.type===null){let u=r,d=``;for(;u<t.length;){let r=t.charAt(u++);if(o||r===`\\`){o=!o,d+=r;continue}if(s){u===c+1?(r===`^`||r===`!`)&&(l=!0):r===`]`&&!(u===c+2&&l)&&(s=!1),d+=r;continue}else if(r===`[`){s=!0,c=u,l=!1,d+=r;continue}if(!a.noext&&i(r)&&t.charAt(u)===`(`){n.push(d),d=``;let i=new e(r,n);u=e.#f(t,i,u,a),n.push(i);continue}d+=r}return n.push(d),u}let u=r+1,d=new e(null,n),f=[],p=``;for(;u<t.length;){let r=t.charAt(u++);if(o||r===`\\`){o=!o,p+=r;continue}if(s){u===c+1?(r===`^`||r===`!`)&&(l=!0):r===`]`&&!(u===c+2&&l)&&(s=!1),p+=r;continue}else if(r===`[`){s=!0,c=u,l=!1,p+=r;continue}if(i(r)&&t.charAt(u)===`(`){d.push(p),p=``;let n=new e(r,d);d.push(n),u=e.#f(t,n,u,a);continue}if(r===`|`){d.push(p),p=``,f.push(d),d=new e(null,n);continue}if(r===`)`)return p===``&&n.#r.length===0&&(n.#u=!0),d.push(p),p=``,n.push(...f,d),u;p+=r}return n.type=null,n.#t=void 0,n.#r=[t.substring(r-1)],u}static fromGlob(t,n={}){let r=new e(null,void 0,n);return e.#f(t,r,0,n),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,n,r,i]=this.toRegExpSource();if(!(r||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#c.nocase?`i`:``)+(i?`u`:``);return Object.assign(RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(t){let r=t??!!this.#c.dot;if(this.#e===this&&this.#d(),!this.type){let i=this.isStart()&&this.isEnd(),c=this.#r.map(n=>{let[r,a,o,s]=typeof n==`string`?e.#m(n,this.#t,i):n.toRegExpSource(t);return this.#t=this.#t||o,this.#n=this.#n||s,r}).join(``),l=``;if(this.isStart()&&typeof this.#r[0]==`string`&&!(this.#r.length===1&&s.has(this.#r[0]))){let e=o,n=r&&e.has(c.charAt(0))||c.startsWith(`\\.`)&&e.has(c.charAt(2))||c.startsWith(`\\.\\.`)&&e.has(c.charAt(4)),i=!r&&!t&&e.has(c.charAt(0));l=n?`(?!(?:^|/)\\.\\.?(?:$|/))`:i?a:``}let u=``;return this.isEnd()&&this.#e.#s&&this.#i?.type===`!`&&(u=`(?:$|\\/)`),[l+c+u,(0,n.unescape)(c),this.#t=!!this.#t,this.#n]}let i=this.type===`*`||this.type===`+`,c=this.type===`!`?`(?:(?!(?:`:`(?:`,l=this.#p(r);if(this.isStart()&&this.isEnd()&&!l&&this.type!==`!`){let e=this.toString();return this.#r=[e],this.type=null,this.#t=void 0,[e,(0,n.unescape)(this.toString()),!1,!1]}let u=!i||t||r?``:this.#p(!0);u===l&&(u=``),u&&(l=`(?:${l})(?:${u})*?`);let p=``;if(this.type===`!`&&this.#u)p=(this.isStart()&&!r?a:``)+f;else{let e=this.type===`!`?`))`+(this.isStart()&&!r&&!t?a:``)+d+`)`:this.type===`@`?`)`:this.type===`?`?`)?`:this.type===`+`&&u?`)`:this.type===`*`&&u?`)?`:`)${this.type}`;p=c+l+e}return[p,(0,n.unescape)(l),this.#t=!!this.#t,this.#n]}#p(e){return this.#r.map(t=>{if(typeof t==`string`)throw Error(`string type in extglob ast??`);let[n,r,i,a]=t.toRegExpSource(e);return this.#n=this.#n||a,n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join(`|`)}static#m(e,r,i=!1){let a=!1,o=``,s=!1;for(let n=0;n<e.length;n++){let p=e.charAt(n);if(a){a=!1,o+=(c.has(p)?`\\`:``)+p;continue}if(p===`\\`){n===e.length-1?o+=`\\\\`:a=!0;continue}if(p===`[`){let[i,a,c,l]=(0,t.parseClass)(e,n);if(c){o+=i,s||=a,n+=c-1,r||=l;continue}}if(p===`*`){i&&e===`*`?o+=f:o+=d,r=!0;continue}if(p===`?`){o+=u,r=!0;continue}o+=l(p)}return[o,(0,n.unescape)(e),!!r,s]}}})),nn=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.escape=void 0,e.escape=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`)})),rn=t((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.unescape=e.escape=e.AST=e.Minimatch=e.match=e.makeRe=e.braceExpand=e.defaults=e.filter=e.GLOBSTAR=e.sep=e.minimatch=void 0;let n=t(a()),r=Qt(),i=tn(),o=nn(),s=en();e.minimatch=(e,t,n={})=>((0,r.assertValidPattern)(t),!n.nocomment&&t.charAt(0)===`#`?!1:new P(t,n).match(e));let c=/^\*+([^+@!?\*\[\(]*)$/,l=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),u=e=>t=>t.endsWith(e),d=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),f=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),p=/^\*+\.\*+$/,m=e=>!e.startsWith(`.`)&&e.includes(`.`),h=e=>e!==`.`&&e!==`..`&&e.includes(`.`),g=/^\.\*+$/,v=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),y=/^\*+$/,b=e=>e.length!==0&&!e.startsWith(`.`),x=e=>e.length!==0&&e!==`.`&&e!==`..`,S=/^\?+([^+@!?\*\[\(]*)?$/,C=([e,t=``])=>{let n=D([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},w=([e,t=``])=>{let n=O([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},T=([e,t=``])=>{let n=O([e]);return t?e=>n(e)&&e.endsWith(t):n},E=([e,t=``])=>{let n=D([e]);return t?e=>n(e)&&e.endsWith(t):n},D=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(`.`)},O=([e])=>{let t=e.length;return e=>e.length===t&&e!==`.`&&e!==`..`},k=typeof process==`object`&&process?typeof process.env==`object`&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`,A={win32:{sep:`\\`},posix:{sep:`/`}};e.sep=k===`win32`?A.win32.sep:A.posix.sep,e.minimatch.sep=e.sep,e.GLOBSTAR=Symbol(`globstar **`),e.minimatch.GLOBSTAR=e.GLOBSTAR,e.filter=(t,n={})=>r=>(0,e.minimatch)(r,t,n),e.minimatch.filter=e.filter;let j=(e,t={})=>Object.assign({},e,t);e.defaults=t=>{if(!t||typeof t!=`object`||!Object.keys(t).length)return e.minimatch;let n=e.minimatch;return Object.assign((e,r,i={})=>n(e,r,j(t,i)),{Minimatch:class extends n.Minimatch{constructor(e,n={}){super(e,j(t,n))}static defaults(e){return n.defaults(j(t,e)).Minimatch}},AST:class extends n.AST{constructor(e,n,r={}){super(e,n,j(t,r))}static fromGlob(e,r={}){return n.AST.fromGlob(e,j(t,r))}},unescape:(e,r={})=>n.unescape(e,j(t,r)),escape:(e,r={})=>n.escape(e,j(t,r)),filter:(e,r={})=>n.filter(e,j(t,r)),defaults:e=>n.defaults(j(t,e)),makeRe:(e,r={})=>n.makeRe(e,j(t,r)),braceExpand:(e,r={})=>n.braceExpand(e,j(t,r)),match:(e,r,i={})=>n.match(e,r,j(t,i)),sep:n.sep,GLOBSTAR:e.GLOBSTAR})},e.minimatch.defaults=e.defaults,e.braceExpand=(e,t={})=>((0,r.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,n.default)(e)),e.minimatch.braceExpand=e.braceExpand,e.makeRe=(e,t={})=>new P(e,t).makeRe(),e.minimatch.makeRe=e.makeRe,e.match=(e,t,n={})=>{let r=new P(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e},e.minimatch.match=e.match;let M=/[?*]|[+@!]\(.*?\)|\[|\]/,N=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`);var P=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){(0,r.assertValidPattern)(e),t||={},this.options=t,this.pattern=e,this.platform=t.platform||k,this.isWindows=this.platform===`win32`,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot===void 0?!!(this.isWindows&&this.nocase):t.windowsNoMagicRoot,this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!=`string`)return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=e[0]===``&&e[1]===``&&(e[2]===`?`||!M.test(e[2]))&&!M.test(e[3]),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(n)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,r),this.set=r.filter(e=>e.indexOf(!1)===-1),this.isWindows)for(let e=0;e<this.set.length;e++){let t=this.set[e];t[0]===``&&t[1]===``&&this.globParts[e][2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3])&&(t[2]=`?`)}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t=0;t<e.length;t++)for(let n=0;n<e[t].length;n++)e[t][n]===`**`&&(e[t][n]=`*`);let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;(t=e.indexOf(`**`,t+1))!==-1;){let n=t;for(;e[n+1]===`**`;)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>(e=e.reduce((e,t)=>{let n=e[e.length-1];return t===`**`&&n===`**`?e:t===`..`&&n&&n!==`..`&&n!==`.`&&n!==`**`?(e.pop(),e):(e.push(t),e)},[]),e.length===0?[``]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let r=e[n];n===1&&r===``&&e[0]===``||(r===`.`||r===``)&&(t=!0,e.splice(n,1),n--)}e[0]===`.`&&e.length===2&&(e[1]===`.`||e[1]===``)&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf(`..`,n+1))!==-1;){let r=e[n-1];r&&r!==`.`&&r!==`..`&&r!==`**`&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[``]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;(r=n.indexOf(`**`,r+1))!==-1;){let i=r;for(;n[i+1]===`**`;)i++;i>r&&n.splice(r+1,i-r);let a=n[r+1],o=n[r+2],s=n[r+3];if(a!==`..`||!o||o===`.`||o===`..`||!s||s===`.`||s===`..`)continue;t=!0,n.splice(r,1);let c=n.slice(0);c[r]=`**`,e.push(c),r--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){let r=n[e];e===1&&r===``&&n[0]===``||(r===`.`||r===``)&&(t=!0,n.splice(e,1),e--)}n[0]===`.`&&n.length===2&&(n[1]===`.`||n[1]===``)&&(t=!0,n.pop())}let i=0;for(;(i=n.indexOf(`..`,i+1))!==-1;){let e=n[i-1];if(e&&e!==`.`&&e!==`..`&&e!==`**`){t=!0;let e=i===1&&n[i+1]===`**`?[`.`]:[];n.splice(i-1,2,...e),n.length===0&&n.push(``),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter(e=>e.length)}partsMatch(e,t,n=!1){let r=0,i=0,a=[],o=``;for(;r<e.length&&i<t.length;)if(e[r]===t[i])a.push(o===`b`?t[i]:e[r]),r++,i++;else if(n&&e[r]===`**`&&t[i]===e[r+1])a.push(e[r]),r++;else if(n&&t[i]===`**`&&e[r]===t[i+1])a.push(t[i]),i++;else if(e[r]===`*`&&t[i]&&(this.options.dot||!t[i].startsWith(`.`))&&t[i]!==`**`){if(o===`b`)return!1;o=`a`,a.push(e[r]),r++,i++}else if(t[i]===`*`&&e[r]&&(this.options.dot||!e[r].startsWith(`.`))&&e[r]!==`**`){if(o===`a`)return!1;o=`b`,a.push(t[i]),r++,i++}else return!1;return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(t,n,r=!1){let i=this.options;if(this.isWindows){let e=typeof t[0]==`string`&&/^[a-z]:$/i.test(t[0]),r=!e&&t[0]===``&&t[1]===``&&t[2]===`?`&&/^[a-z]:$/i.test(t[3]),i=typeof n[0]==`string`&&/^[a-z]:$/i.test(n[0]),a=!i&&n[0]===``&&n[1]===``&&n[2]===`?`&&typeof n[3]==`string`&&/^[a-z]:$/i.test(n[3]),o=r?3:e?0:void 0,s=a?3:i?0:void 0;if(typeof o==`number`&&typeof s==`number`){let[e,r]=[t[o],n[s]];e.toLowerCase()===r.toLowerCase()&&(n[s]=e,s>o?n=n.slice(s):o>s&&(t=t.slice(o)))}}let{optimizationLevel:a=1}=this.options;a>=2&&(t=this.levelTwoFileOptimize(t)),this.debug(`matchOne`,this,{file:t,pattern:n}),this.debug(`matchOne`,t.length,n.length);for(var o=0,s=0,c=t.length,l=n.length;o<c&&s<l;o++,s++){this.debug(`matchOne loop`);var u=n[s],d=t[o];if(this.debug(n,u,d),u===!1)return!1;if(u===e.GLOBSTAR){this.debug(`GLOBSTAR`,[n,u,d]);var f=o,p=s+1;if(p===l){for(this.debug(`** at the end`);o<c;o++)if(t[o]===`.`||t[o]===`..`||!i.dot&&t[o].charAt(0)===`.`)return!1;return!0}for(;f<c;){var m=t[f];if(this.debug(`
|
|
18
|
+
globstar while`,t,f,n,p,m),this.matchOne(t.slice(f),n.slice(p),r))return this.debug(`globstar found match!`,f,c,m),!0;if(m===`.`||m===`..`||!i.dot&&m.charAt(0)===`.`){this.debug(`dot detected!`,t,f,n,p);break}this.debug(`globstar swallow a segment, and continue`),f++}return!!(r&&(this.debug(`
|
|
19
|
+
>>> no match, partial?`,t,f,n,p),f===c))}let a;if(typeof u==`string`?(a=d===u,this.debug(`string match`,u,d,a)):(a=u.test(d),this.debug(`pattern match`,u,d,a)),!a)return!1}if(o===c&&s===l)return!0;if(o===c)return r;if(s===l)return o===c-1&&t[o]===``;throw Error(`wtf?`)}braceExpand(){return(0,e.braceExpand)(this.pattern,this.options)}parse(t){(0,r.assertValidPattern)(t);let n=this.options;if(t===`**`)return e.GLOBSTAR;if(t===``)return``;let a,o=null;(a=t.match(y))?o=n.dot?x:b:(a=t.match(c))?o=(n.nocase?n.dot?f:d:n.dot?u:l)(a[1]):(a=t.match(S))?o=(n.nocase?n.dot?w:C:n.dot?T:E)(a):(a=t.match(p))?o=n.dot?h:m:(a=t.match(g))&&(o=v);let s=i.AST.fromGlob(t,this.options).toMMPattern();return o&&typeof s==`object`&&Reflect.defineProperty(s,`test`,{value:o}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?`[^/]*?`:n.dot?`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`:`(?:(?!(?:\\/|^)\\.).)*?`,i=new Set(n.nocase?[`i`]:[]),a=t.map(t=>{let n=t.map(t=>{if(t instanceof RegExp)for(let e of t.flags.split(``))i.add(e);return typeof t==`string`?N(t):t===e.GLOBSTAR?e.GLOBSTAR:t._src});return n.forEach((t,i)=>{let a=n[i+1],o=n[i-1];t!==e.GLOBSTAR||o===e.GLOBSTAR||(o===void 0?a!==void 0&&a!==e.GLOBSTAR?n[i+1]=`(?:\\/|`+r+`\\/)?`+a:n[i]=r:a===void 0?n[i-1]=o+`(?:\\/|`+r+`)?`:a!==e.GLOBSTAR&&(n[i-1]=o+`(?:\\/|\\/`+r+`\\/)`+a,n[i+1]=e.GLOBSTAR))}),n.filter(t=>t!==e.GLOBSTAR).join(`/`)}).join(`|`),[o,s]=t.length>1?[`(?:`,`)`]:[``,``];a=`^`+o+a+s+`$`,this.negate&&(a=`^(?!`+a+`).+$`);try{this.regexp=new RegExp(a,[...i].join(``))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(`/`):this.isWindows&&/^\/\/[^\/]+/.test(e)?[``,...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;this.isWindows&&(e=e.split(`\\`).join(`/`));let r=this.slashSplit(e);this.debug(this.pattern,`split`,r);let i=this.set;this.debug(this.pattern,`set`,i);let a=r[r.length-1];if(!a)for(let e=r.length-2;!a&&e>=0;e--)a=r[e];for(let e=0;e<i.length;e++){let o=i[e],s=r;if(n.matchBase&&o.length===1&&(s=[a]),this.matchOne(s,o,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(t){return e.minimatch.defaults(t).Minimatch}};e.Minimatch=P;var F=tn();Object.defineProperty(e,`AST`,{enumerable:!0,get:function(){return F.AST}});var I=nn();Object.defineProperty(e,`escape`,{enumerable:!0,get:function(){return I.escape}});var L=en();Object.defineProperty(e,`unescape`,{enumerable:!0,get:function(){return L.unescape}}),e.minimatch.AST=i.AST,e.minimatch.Minimatch=P,e.minimatch.escape=o.escape,e.minimatch.unescape=s.unescape})),an=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.LRUCache=void 0;let t=typeof performance==`object`&&performance&&typeof performance.now==`function`?performance:Date,n=new Set,r=typeof process==`object`&&process?process:{},i=(e,t,n,i)=>{typeof r.emitWarning==`function`?r.emitWarning(e,t,n,i):console.error(`[${n}] ${t}: ${e}`)},a=globalThis.AbortController,o=globalThis.AbortSignal;if(a===void 0){o=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},a=class{constructor(){t()}signal=new o;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e=r.env?.LRU_CACHE_IGNORE_AC_WARNING!==`1`,t=()=>{e&&(e=!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`,t))}}let s=e=>!n.has(e),c=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),l=e=>c(e)?e<=2**8?Uint8Array:e<=2**16?Uint16Array:e<=2**32?Uint32Array:e<=2**53-1?u:null:null;var u=class extends Array{constructor(e){super(e),this.fill(0)}},d=class e{heap;length;static#e=!1;static create(t){let n=l(t);if(!n)return[];e.#e=!0;let r=new e(t,n);return e.#e=!1,r}constructor(t,n){if(!e.#e)throw TypeError(`instantiate Stack using Stack.create(n)`);this.heap=new n(t),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};e.LRUCache=class e{#e;#t;#n;#r;#i;#a;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#s;#c;#l;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y;#b;#x;#S;static unsafeExposeInternals(e){return{starts:e.#v,ttls:e.#y,sizes:e.#_,keyMap:e.#c,keyList:e.#l,valList:e.#u,next:e.#d,prev:e.#f,get head(){return e.#p},get tail(){return e.#m},free:e.#h,isBackgroundFetch:t=>e.#L(t),backgroundFetch:(t,n,r,i)=>e.#I(t,n,r,i),moveToTail:t=>e.#z(t),indexes:t=>e.#M(t),rindexes:t=>e.#N(t),isStale:t=>e.#D(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#s}get size(){return this.#o}get fetchMethod(){return this.#i}get memoMethod(){return this.#a}get dispose(){return this.#n}get disposeAfter(){return this.#r}constructor(t){let{max:r=0,ttl:a,ttlResolution:o=1,ttlAutopurge:u,updateAgeOnGet:f,updateAgeOnHas:p,allowStale:m,dispose:h,disposeAfter:g,noDisposeOnSet:v,noUpdateTTL:y,maxSize:b=0,maxEntrySize:x=0,sizeCalculation:S,fetchMethod:C,memoMethod:w,noDeleteOnFetchRejection:T,noDeleteOnStaleGet:E,allowStaleOnFetchRejection:D,allowStaleOnFetchAbort:O,ignoreFetchAbort:k}=t;if(r!==0&&!c(r))throw TypeError(`max option must be a nonnegative integer`);let A=r?l(r):Array;if(!A)throw Error(`invalid max value: `+r);if(this.#e=r,this.#t=b,this.maxEntrySize=x||this.#t,this.sizeCalculation=S,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw TypeError(`cannot set sizeCalculation without setting maxSize or maxEntrySize`);if(typeof this.sizeCalculation!=`function`)throw TypeError(`sizeCalculation set to non-function`)}if(w!==void 0&&typeof w!=`function`)throw TypeError(`memoMethod must be a function if defined`);if(this.#a=w,C!==void 0&&typeof C!=`function`)throw TypeError(`fetchMethod must be a function if specified`);if(this.#i=C,this.#x=!!C,this.#c=new Map,this.#l=Array(r).fill(void 0),this.#u=Array(r).fill(void 0),this.#d=new A(r),this.#f=new A(r),this.#p=0,this.#m=0,this.#h=d.create(r),this.#o=0,this.#s=0,typeof h==`function`&&(this.#n=h),typeof g==`function`?(this.#r=g,this.#g=[]):(this.#r=void 0,this.#g=void 0),this.#b=!!this.#n,this.#S=!!this.#r,this.noDisposeOnSet=!!v,this.noUpdateTTL=!!y,this.noDeleteOnFetchRejection=!!T,this.allowStaleOnFetchRejection=!!D,this.allowStaleOnFetchAbort=!!O,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(this.#t!==0&&!c(this.#t))throw TypeError(`maxSize must be a positive integer if specified`);if(!c(this.maxEntrySize))throw TypeError(`maxEntrySize must be a positive integer if specified`);this.#O()}if(this.allowStale=!!m,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!f,this.updateAgeOnHas=!!p,this.ttlResolution=c(o)||o===0?o:1,this.ttlAutopurge=!!u,this.ttl=a||0,this.ttl){if(!c(this.ttl))throw TypeError(`ttl must be a positive integer if specified`);this.#C()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw TypeError(`At least one of max, maxSize, or ttl is required`);if(!this.ttlAutopurge&&!this.#e&&!this.#t){let t=`LRU_CACHE_UNBOUNDED`;s(t)&&(n.add(t),i(`TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.`,`UnboundedCacheWarning`,t,e))}}getRemainingTTL(e){return this.#c.has(e)?1/0:0}#C(){let e=new u(this.#e),n=new u(this.#e);this.#y=e,this.#v=n,this.#E=(r,i,a=t.now())=>{if(n[r]=i===0?0:a,e[r]=i,i!==0&&this.ttlAutopurge){let e=setTimeout(()=>{this.#D(r)&&this.#B(this.#l[r],`expire`)},i+1);e.unref&&e.unref()}},this.#w=r=>{n[r]=e[r]===0?0:t.now()},this.#T=(t,a)=>{if(e[a]){let o=e[a],s=n[a];if(!o||!s)return;t.ttl=o,t.start=s,t.now=r||i(),t.remainingTTL=o-(t.now-s)}};let r=0,i=()=>{let e=t.now();if(this.ttlResolution>0){r=e;let t=setTimeout(()=>r=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=t=>{let a=this.#c.get(t);if(a===void 0)return 0;let o=e[a],s=n[a];return!o||!s?1/0:o-((r||i())-s)},this.#D=t=>{let a=n[t],o=e[t];return!!o&&!!a&&(r||i())-a>o}}#w=()=>{};#T=()=>{};#E=()=>{};#D=()=>!1;#O(){let e=new u(this.#e);this.#s=0,this.#_=e,this.#k=t=>{this.#s-=e[t],e[t]=0},this.#j=(e,t,n,r)=>{if(this.#L(t))return 0;if(!c(n))if(r){if(typeof r!=`function`)throw TypeError(`sizeCalculation must be a function`);if(n=r(t,e),!c(n))throw TypeError(`sizeCalculation return invalid (expect positive integer)`)}else throw TypeError(`invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.`);return n},this.#A=(t,n,r)=>{if(e[t]=n,this.#t){let n=this.#t-e[t];for(;this.#s>n;)this.#F(!0)}this.#s+=e[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.#s)}}#k=e=>{};#A=(e,t,n)=>{};#j=(e,t,n,r)=>{if(n||r)throw TypeError(`cannot set size without setting maxSize or maxEntrySize on cache`);return 0};*#M({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#m;!(!this.#P(t)||((e||!this.#D(t))&&(yield t),t===this.#p));)t=this.#f[t]}*#N({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#p;!(!this.#P(t)||((e||!this.#D(t))&&(yield t),t===this.#m));)t=this.#d[t]}#P(e){return e!==void 0&&this.#c.get(this.#l[e])===e}*entries(){for(let e of this.#M())this.#u[e]!==void 0&&this.#l[e]!==void 0&&!this.#L(this.#u[e])&&(yield[this.#l[e],this.#u[e]])}*rentries(){for(let e of this.#N())this.#u[e]!==void 0&&this.#l[e]!==void 0&&!this.#L(this.#u[e])&&(yield[this.#l[e],this.#u[e]])}*keys(){for(let e of this.#M()){let t=this.#l[e];t!==void 0&&!this.#L(this.#u[e])&&(yield t)}}*rkeys(){for(let e of this.#N()){let t=this.#l[e];t!==void 0&&!this.#L(this.#u[e])&&(yield t)}}*values(){for(let e of this.#M())this.#u[e]!==void 0&&!this.#L(this.#u[e])&&(yield this.#u[e])}*rvalues(){for(let e of this.#N())this.#u[e]!==void 0&&!this.#L(this.#u[e])&&(yield this.#u[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]=`LRUCache`;find(e,t={}){for(let n of this.#M()){let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;if(i!==void 0&&e(i,this.#l[n],this))return this.get(this.#l[n],t)}}forEach(e,t=this){for(let n of this.#M()){let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#l[n],this)}}rforEach(e,t=this){for(let n of this.#N()){let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#l[n],this)}}purgeStale(){let e=!1;for(let t of this.#N({allowStale:!0}))this.#D(t)&&(this.#B(this.#l[t],`expire`),e=!0);return e}info(e){let n=this.#c.get(e);if(n===void 0)return;let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;if(i===void 0)return;let a={value:i};if(this.#y&&this.#v){let e=this.#y[n],r=this.#v[n];e&&r&&(a.ttl=e-(t.now()-r),a.start=Date.now())}return this.#_&&(a.size=this.#_[n]),a}dump(){let e=[];for(let n of this.#M({allowStale:!0})){let r=this.#l[n],i=this.#u[n],a=this.#L(i)?i.__staleWhileFetching:i;if(a===void 0||r===void 0)continue;let o={value:a};if(this.#y&&this.#v){o.ttl=this.#y[n];let e=t.now()-this.#v[n];o.start=Math.floor(Date.now()-e)}this.#_&&(o.size=this.#_[n]),e.unshift([r,o])}return e}load(e){this.clear();for(let[n,r]of e){if(r.start){let e=Date.now()-r.start;r.start=t.now()-e}this.set(n,r.value,r)}}set(e,t,n={}){if(t===void 0)return this.delete(e),this;let{ttl:r=this.ttl,start:i,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:s}=n,{noUpdateTTL:c=this.noUpdateTTL}=n,l=this.#j(e,t,n.size||0,o);if(this.maxEntrySize&&l>this.maxEntrySize)return s&&(s.set=`miss`,s.maxEntrySizeExceeded=!0),this.#B(e,`set`),this;let u=this.#o===0?void 0:this.#c.get(e);if(u===void 0)u=this.#o===0?this.#m:this.#h.length===0?this.#o===this.#e?this.#F(!1):this.#o:this.#h.pop(),this.#l[u]=e,this.#u[u]=t,this.#c.set(e,u),this.#d[this.#m]=u,this.#f[u]=this.#m,this.#m=u,this.#o++,this.#A(u,l,s),s&&(s.set=`add`),c=!1;else{this.#z(u);let n=this.#u[u];if(t!==n){if(this.#x&&this.#L(n)){n.__abortController.abort(Error(`replaced`));let{__staleWhileFetching:t}=n;t!==void 0&&!a&&(this.#b&&this.#n?.(t,e,`set`),this.#S&&this.#g?.push([t,e,`set`]))}else a||(this.#b&&this.#n?.(n,e,`set`),this.#S&&this.#g?.push([n,e,`set`]));if(this.#k(u),this.#A(u,l,s),this.#u[u]=t,s){s.set=`replace`;let e=n&&this.#L(n)?n.__staleWhileFetching:n;e!==void 0&&(s.oldValue=e)}}else s&&(s.set=`update`)}if(r!==0&&!this.#y&&this.#C(),this.#y&&(c||this.#E(u,r,i),s&&this.#T(s,u)),!a&&this.#S&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}return this}pop(){try{for(;this.#o;){let e=this.#u[this.#p];if(this.#F(!0),this.#L(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#S&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}}}#F(e){let t=this.#p,n=this.#l[t],r=this.#u[t];return this.#x&&this.#L(r)?r.__abortController.abort(Error(`evicted`)):(this.#b||this.#S)&&(this.#b&&this.#n?.(r,n,`evict`),this.#S&&this.#g?.push([r,n,`evict`])),this.#k(t),e&&(this.#l[t]=void 0,this.#u[t]=void 0,this.#h.push(t)),this.#o===1?(this.#p=this.#m=0,this.#h.length=0):this.#p=this.#d[t],this.#c.delete(n),this.#o--,t}has(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,i=this.#c.get(e);if(i!==void 0){let e=this.#u[i];if(this.#L(e)&&e.__staleWhileFetching===void 0)return!1;if(this.#D(i))r&&(r.has=`stale`,this.#T(r,i));else return n&&this.#w(i),r&&(r.has=`hit`,this.#T(r,i)),!0}else r&&(r.has=`miss`);return!1}peek(e,t={}){let{allowStale:n=this.allowStale}=t,r=this.#c.get(e);if(r===void 0||!n&&this.#D(r))return;let i=this.#u[r];return this.#L(i)?i.__staleWhileFetching:i}#I(e,t,n,r){let i=t===void 0?void 0:this.#u[t];if(this.#L(i))return i;let o=new a,{signal:s}=n;s?.addEventListener(`abort`,()=>o.abort(s.reason),{signal:o.signal});let c={signal:o.signal,options:n,context:r},l=(r,i=!1)=>{let{aborted:a}=o.signal,s=n.ignoreFetchAbort&&r!==void 0;if(n.status&&(a&&!i?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,s&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),a&&!s&&!i)return d(o.signal.reason);let l=p;return this.#u[t]===p&&(r===void 0?l.__staleWhileFetching?this.#u[t]=l.__staleWhileFetching:this.#B(e,`fetch`):(n.status&&(n.status.fetchUpdated=!0),this.set(e,r,c.options))),r},u=e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),d(e)),d=r=>{let{aborted:i}=o.signal,a=i&&n.allowStaleOnFetchAbort,s=a||n.allowStaleOnFetchRejection,c=s||n.noDeleteOnFetchRejection,l=p;if(this.#u[t]===p&&(!c||l.__staleWhileFetching===void 0?this.#B(e,`fetch`):a||(this.#u[t]=l.__staleWhileFetching)),s)return n.status&&l.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),l.__staleWhileFetching;if(l.__returned===l)throw r},f=(t,r)=>{let a=this.#i?.(e,i,c);a&&a instanceof Promise&&a.then(e=>t(e===void 0?void 0:e),r),o.signal.addEventListener(`abort`,()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(t(void 0),n.allowStaleOnFetchAbort&&(t=e=>l(e,!0)))})};n.status&&(n.status.fetchDispatched=!0);let p=new Promise(f).then(l,u),m=Object.assign(p,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return t===void 0?(this.set(e,m,{...c.options,status:void 0}),t=this.#c.get(e)):this.#u[t]=m,m}#L(e){if(!this.#x)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty(`__staleWhileFetching`)&&t.__abortController instanceof a}async fetch(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:m,forceRefresh:h=!1,status:g,signal:v}=t;if(!this.#x)return g&&(g.fetch=`get`),this.get(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:g});let y={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:o,size:s,sizeCalculation:c,noUpdateTTL:l,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:p,ignoreFetchAbort:f,status:g,signal:v},b=this.#c.get(e);if(b===void 0){g&&(g.fetch=`miss`);let t=this.#I(e,b,y,m);return t.__returned=t}else{let t=this.#u[b];if(this.#L(t)){let e=n&&t.__staleWhileFetching!==void 0;return g&&(g.fetch=`inflight`,e&&(g.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}let i=this.#D(b);if(!h&&!i)return g&&(g.fetch=`hit`),this.#z(b),r&&this.#w(b),g&&this.#T(g,b),t;let a=this.#I(e,b,y,m),o=a.__staleWhileFetching!==void 0&&n;return g&&(g.fetch=i?`stale`:`refresh`,o&&i&&(g.returnedStale=!0)),o?a.__staleWhileFetching:a.__returned=a}}async forceFetch(e,t={}){let n=await this.fetch(e,t);if(n===void 0)throw Error(`fetch() returned undefined`);return n}memo(e,t={}){let n=this.#a;if(!n)throw Error(`no memoMethod provided to constructor`);let{context:r,forceRefresh:i,...a}=t,o=this.get(e,a);if(!i&&o!==void 0)return o;let s=n(e,o,{options:a,context:r});return this.set(e,s,a),s}get(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}=t,o=this.#c.get(e);if(o!==void 0){let t=this.#u[o],s=this.#L(t);return a&&this.#T(a,o),this.#D(o)?(a&&(a.get=`stale`),s?(a&&n&&t.__staleWhileFetching!==void 0&&(a.returnedStale=!0),n?t.__staleWhileFetching:void 0):(i||this.#B(e,`expire`),a&&n&&(a.returnedStale=!0),n?t:void 0)):(a&&(a.get=`hit`),s?t.__staleWhileFetching:(this.#z(o),r&&this.#w(o),t))}else a&&(a.get=`miss`)}#R(e,t){this.#f[t]=e,this.#d[e]=t}#z(e){e!==this.#m&&(e===this.#p?this.#p=this.#d[e]:this.#R(this.#f[e],this.#d[e]),this.#R(this.#m,e),this.#m=e)}delete(e){return this.#B(e,`delete`)}#B(e,t){let n=!1;if(this.#o!==0){let r=this.#c.get(e);if(r!==void 0)if(n=!0,this.#o===1)this.#V(t);else{this.#k(r);let n=this.#u[r];if(this.#L(n)?n.__abortController.abort(Error(`deleted`)):(this.#b||this.#S)&&(this.#b&&this.#n?.(n,e,t),this.#S&&this.#g?.push([n,e,t])),this.#c.delete(e),this.#l[r]=void 0,this.#u[r]=void 0,r===this.#m)this.#m=this.#f[r];else if(r===this.#p)this.#p=this.#d[r];else{let e=this.#f[r];this.#d[e]=this.#d[r];let t=this.#d[r];this.#f[t]=this.#f[r]}this.#o--,this.#h.push(r)}}if(this.#S&&this.#g?.length){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}return n}clear(){return this.#V(`delete`)}#V(e){for(let t of this.#N({allowStale:!0})){let n=this.#u[t];if(this.#L(n))n.__abortController.abort(Error(`deleted`));else{let r=this.#l[t];this.#b&&this.#n?.(n,r,e),this.#S&&this.#g?.push([n,r,e])}}if(this.#c.clear(),this.#u.fill(void 0),this.#l.fill(void 0),this.#y&&this.#v&&(this.#y.fill(0),this.#v.fill(0)),this.#_&&this.#_.fill(0),this.#p=0,this.#m=0,this.#h.length=0,this.#s=0,this.#o=0,this.#S&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}}}})),on=t((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Minipass=e.isWritable=e.isReadable=e.isStream=void 0;let r=typeof process==`object`&&process?process:{stdout:null,stderr:null},i=n(`node:events`),a=t(n(`node:stream`)),o=n(`node:string_decoder`);e.isStream=t=>!!t&&typeof t==`object`&&(t instanceof q||t instanceof a.default||(0,e.isReadable)(t)||(0,e.isWritable)(t)),e.isReadable=e=>!!e&&typeof e==`object`&&e instanceof i.EventEmitter&&typeof e.pipe==`function`&&e.pipe!==a.default.Writable.prototype.pipe,e.isWritable=e=>!!e&&typeof e==`object`&&e instanceof i.EventEmitter&&typeof e.write==`function`&&typeof e.end==`function`;let s=Symbol(`EOF`),c=Symbol(`maybeEmitEnd`),l=Symbol(`emittedEnd`),u=Symbol(`emittingEnd`),d=Symbol(`emittedError`),f=Symbol(`closed`),p=Symbol(`read`),m=Symbol(`flush`),h=Symbol(`flushChunk`),g=Symbol(`encoding`),v=Symbol(`decoder`),y=Symbol(`flowing`),b=Symbol(`paused`),x=Symbol(`resume`),S=Symbol(`buffer`),C=Symbol(`pipes`),w=Symbol(`bufferLength`),T=Symbol(`bufferPush`),E=Symbol(`bufferShift`),D=Symbol(`objectMode`),O=Symbol(`destroyed`),k=Symbol(`error`),A=Symbol(`emitData`),j=Symbol(`emitEnd`),M=Symbol(`emitEnd2`),N=Symbol(`async`),P=Symbol(`abort`),F=Symbol(`aborted`),I=Symbol(`signal`),L=Symbol(`dataListeners`),R=Symbol(`discarded`),z=e=>Promise.resolve().then(e),B=e=>e(),V=e=>e===`end`||e===`finish`||e===`prefinish`,H=e=>e instanceof ArrayBuffer||!!e&&typeof e==`object`&&e.constructor&&e.constructor.name===`ArrayBuffer`&&e.byteLength>=0,U=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);var W=class{src;dest;opts;ondrain;constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[x](),this.dest.on(`drain`,this.ondrain)}unpipe(){this.dest.removeListener(`drain`,this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},G=class extends W{unpipe(){this.src.removeListener(`error`,this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=e=>t.emit(`error`,e),e.on(`error`,this.proxyErrors)}};let K=e=>!!e.objectMode,ee=e=>!e.objectMode&&!!e.encoding&&e.encoding!==`buffer`;var q=class extends i.EventEmitter{[y]=!1;[b]=!1;[C]=[];[S]=[];[D];[g];[N];[v];[s]=!1;[l]=!1;[u]=!1;[f]=!1;[d]=null;[w]=0;[O]=!1;[I];[F]=!1;[L]=0;[R]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding==`string`)throw TypeError(`Encoding and objectMode may not be used together`);K(t)?(this[D]=!0,this[g]=null):ee(t)?(this[g]=t.encoding,this[D]=!1):(this[D]=!1,this[g]=null),this[N]=!!t.async,this[v]=this[g]?new o.StringDecoder(this[g]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,`buffer`,{get:()=>this[S]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,`pipes`,{get:()=>this[C]});let{signal:n}=t;n&&(this[I]=n,n.aborted?this[P]():n.addEventListener(`abort`,()=>this[P]()))}get bufferLength(){return this[w]}get encoding(){return this[g]}set encoding(e){throw Error(`Encoding must be set at instantiation time`)}setEncoding(e){throw Error(`Encoding must be set at instantiation time`)}get objectMode(){return this[D]}set objectMode(e){throw Error(`objectMode must be set at instantiation time`)}get async(){return this[N]}set async(e){this[N]=this[N]||!!e}[P](){this[F]=!0,this.emit(`abort`,this[I]?.reason),this.destroy(this[I]?.reason)}get aborted(){return this[F]}set aborted(e){}write(e,t,n){if(this[F])return!1;if(this[s])throw Error(`write after end`);if(this[O])return this.emit(`error`,Object.assign(Error(`Cannot call write after a stream was destroyed`),{code:`ERR_STREAM_DESTROYED`})),!0;typeof t==`function`&&(n=t,t=`utf8`),t||=`utf8`;let r=this[N]?z:B;if(!this[D]&&!Buffer.isBuffer(e)){if(U(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(H(e))e=Buffer.from(e);else if(typeof e!=`string`)throw Error(`Non-contiguous data written to non-objectMode stream`)}return this[D]?(this[y]&&this[w]!==0&&this[m](!0),this[y]?this.emit(`data`,e):this[T](e),this[w]!==0&&this.emit(`readable`),n&&r(n),this[y]):e.length?(typeof e==`string`&&!(t===this[g]&&!this[v]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[g]&&(e=this[v].write(e)),this[y]&&this[w]!==0&&this[m](!0),this[y]?this.emit(`data`,e):this[T](e),this[w]!==0&&this.emit(`readable`),n&&r(n),this[y]):(this[w]!==0&&this.emit(`readable`),n&&r(n),this[y])}read(e){if(this[O])return null;if(this[R]=!1,this[w]===0||e===0||e&&e>this[w])return this[c](),null;this[D]&&(e=null),this[S].length>1&&!this[D]&&(this[S]=[this[g]?this[S].join(``):Buffer.concat(this[S],this[w])]);let t=this[p](e||null,this[S][0]);return this[c](),t}[p](e,t){if(this[D])this[E]();else{let n=t;e===n.length||e===null?this[E]():typeof n==`string`?(this[S][0]=n.slice(e),t=n.slice(0,e),this[w]-=e):(this[S][0]=n.subarray(e),t=n.subarray(0,e),this[w]-=e)}return this.emit(`data`,t),!this[S].length&&!this[s]&&this.emit(`drain`),t}end(e,t,n){return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=`utf8`),e!==void 0&&this.write(e,t),n&&this.once(`end`,n),this[s]=!0,this.writable=!1,(this[y]||!this[b])&&this[c](),this}[x](){this[O]||(!this[L]&&!this[C].length&&(this[R]=!0),this[b]=!1,this[y]=!0,this.emit(`resume`),this[S].length?this[m]():this[s]?this[c]():this.emit(`drain`))}resume(){return this[x]()}pause(){this[y]=!1,this[b]=!0,this[R]=!1}get destroyed(){return this[O]}get flowing(){return this[y]}get paused(){return this[b]}[T](e){this[D]?this[w]+=1:this[w]+=e.length,this[S].push(e)}[E](){return this[D]?--this[w]:this[w]-=this[S][0].length,this[S].shift()}[m](e=!1){do;while(this[h](this[E]())&&this[S].length);!e&&!this[S].length&&!this[s]&&this.emit(`drain`)}[h](e){return this.emit(`data`,e),this[y]}pipe(e,t){if(this[O])return e;this[R]=!1;let n=this[l];return t||={},e===r.stdout||e===r.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this[C].push(t.proxyErrors?new G(this,e,t):new W(this,e,t)),this[N]?z(()=>this[x]()):this[x]()),e}unpipe(e){let t=this[C].find(t=>t.dest===e);t&&(this[C].length===1?(this[y]&&this[L]===0&&(this[y]=!1),this[C]=[]):this[C].splice(this[C].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let n=super.on(e,t);if(e===`data`)this[R]=!1,this[L]++,!this[C].length&&!this[y]&&this[x]();else if(e===`readable`&&this[w]!==0)super.emit(`readable`);else if(V(e)&&this[l])super.emit(e),this.removeAllListeners(e);else if(e===`error`&&this[d]){let e=t;this[N]?z(()=>e.call(this,this[d])):e.call(this,this[d])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){let n=super.off(e,t);return e===`data`&&(this[L]=this.listeners(`data`).length,this[L]===0&&!this[R]&&!this[C].length&&(this[y]=!1)),n}removeAllListeners(e){let t=super.removeAllListeners(e);return(e===`data`||e===void 0)&&(this[L]=0,!this[R]&&!this[C].length&&(this[y]=!1)),t}get emittedEnd(){return this[l]}[c](){!this[u]&&!this[l]&&!this[O]&&this[S].length===0&&this[s]&&(this[u]=!0,this.emit(`end`),this.emit(`prefinish`),this.emit(`finish`),this[f]&&this.emit(`close`),this[u]=!1)}emit(e,...t){let n=t[0];if(e!==`error`&&e!==`close`&&e!==O&&this[O])return!1;if(e===`data`)return!this[D]&&!n?!1:this[N]?(z(()=>this[A](n)),!0):this[A](n);if(e===`end`)return this[j]();if(e===`close`){if(this[f]=!0,!this[l]&&!this[O])return!1;let e=super.emit(`close`);return this.removeAllListeners(`close`),e}else if(e===`error`){this[d]=n,super.emit(k,n);let e=!this[I]||this.listeners(`error`).length?super.emit(`error`,n):!1;return this[c](),e}else if(e===`resume`){let e=super.emit(`resume`);return this[c](),e}else if(e===`finish`||e===`prefinish`){let t=super.emit(e);return this.removeAllListeners(e),t}let r=super.emit(e,...t);return this[c](),r}[A](e){for(let t of this[C])t.dest.write(e)===!1&&this.pause();let t=this[R]?!1:super.emit(`data`,e);return this[c](),t}[j](){return this[l]?!1:(this[l]=!0,this.readable=!1,this[N]?(z(()=>this[M]()),!0):this[M]())}[M](){if(this[v]){let e=this[v].end();if(e){for(let t of this[C])t.dest.write(e);this[R]||super.emit(`data`,e)}}for(let e of this[C])e.end();let e=super.emit(`end`);return this.removeAllListeners(`end`),e}async collect(){let e=Object.assign([],{dataLength:0});this[D]||(e.dataLength=0);let t=this.promise();return this.on(`data`,t=>{e.push(t),this[D]||(e.dataLength+=t.length)}),await t,e}async concat(){if(this[D])throw Error(`cannot concat in objectMode`);let e=await this.collect();return this[g]?e.join(``):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(O,()=>t(Error(`stream destroyed`))),this.on(`error`,e=>t(e)),this.on(`end`,()=>e())})}[Symbol.asyncIterator](){this[R]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[s])return t();let r,i,a=e=>{this.off(`data`,o),this.off(`end`,c),this.off(O,l),t(),i(e)},o=e=>{this.off(`error`,a),this.off(`end`,c),this.off(O,l),this.pause(),r({value:e,done:!!this[s]})},c=()=>{this.off(`error`,a),this.off(`data`,o),this.off(O,l),t(),r({done:!0,value:void 0})},l=()=>a(Error(`stream destroyed`));return new Promise((e,t)=>{i=t,r=e,this.once(O,l),this.once(`error`,a),this.once(`end`,c),this.once(`data`,o)})},throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[R]=!1;let e=!1,t=()=>(this.pause(),this.off(k,t),this.off(O,t),this.off(`end`,t),e=!0,{done:!0,value:void 0});return this.once(`end`,t),this.once(k,t),this.once(O,t),{next:()=>{if(e)return t();let n=this.read();return n===null?t():{done:!1,value:n}},throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[O])return e?this.emit(`error`,e):this.emit(O),this;this[O]=!0,this[R]=!0,this[S].length=0,this[w]=0;let t=this;return typeof t.close==`function`&&!this[f]&&t.close(),e?this.emit(`error`,e):this.emit(O),this}static get isStream(){return e.isStream}};e.Minipass=q})),sn=t((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,`__esModule`,{value:!0}),e.PathScurry=e.Path=e.PathScurryDarwin=e.PathScurryPosix=e.PathScurryWin32=e.PathScurryBase=e.PathPosix=e.PathWin32=e.PathBase=e.ChildrenCache=e.ResolveCache=void 0;let a=an(),o=n(`node:path`),s=n(`node:url`),c=n(`fs`),l=i(n(`node:fs`)),u=c.realpathSync.native,d=n(`node:fs/promises`),f=on(),p={lstatSync:c.lstatSync,readdir:c.readdir,readdirSync:c.readdirSync,readlinkSync:c.readlinkSync,realpathSync:u,promises:{lstat:d.lstat,readdir:d.readdir,readlink:d.readlink,realpath:d.realpath}},m=e=>!e||e===p||e===l?p:{...p,...e,promises:{...p.promises,...e.promises||{}}},h=/^\\\\\?\\([a-z]:)\\?$/i,g=e=>e.replace(/\//g,`\\`).replace(h,`$1\\`),v=/[\\\/]/,y=e=>e.isFile()?8:e.isDirectory()?4:e.isSymbolicLink()?10:e.isCharacterDevice()?2:e.isBlockDevice()?6:e.isSocket()?12:e.isFIFO()?1:0,b=new Map,x=e=>{let t=b.get(e);if(t)return t;let n=e.normalize(`NFKD`);return b.set(e,n),n},S=new Map,C=e=>{let t=S.get(e);if(t)return t;let n=x(e.toLowerCase());return S.set(e,n),n};var w=class extends a.LRUCache{constructor(){super({max:256})}};e.ResolveCache=w;var T=class extends a.LRUCache{constructor(e=16*1024){super({maxSize:e,sizeCalculation:e=>e.length+1})}};e.ChildrenCache=T;let E=Symbol(`PathScurry setAsCwd`);var D=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#i;get uid(){return this.#i}#a;get gid(){return this.#a}#o;get rdev(){return this.#o}#s;get blksize(){return this.#s}#c;get ino(){return this.#c}#l;get size(){return this.#l}#u;get blocks(){return this.#u}#d;get atimeMs(){return this.#d}#f;get mtimeMs(){return this.#f}#p;get ctimeMs(){return this.#p}#m;get birthtimeMs(){return this.#m}#h;get atime(){return this.#h}#g;get mtime(){return this.#g}#_;get ctime(){return this.#_}#v;get birthtime(){return this.#v}#y;#b;#x;#S;#C;#w;#T;#E;#D;#O;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=0,n,r,i,a,o){this.name=e,this.#y=i?C(e):x(e),this.#T=t&1023,this.nocase=i,this.roots=r,this.root=n||this,this.#E=a,this.#x=o.fullpath,this.#C=o.relative,this.#w=o.relativePosix,this.parent=o.parent,this.parent?this.#e=this.parent.#e:this.#e=m(o.fs)}depth(){return this.#b===void 0?this.parent?this.#b=this.parent.depth()+1:this.#b=0:this.#b}childrenCache(){return this.#E}resolve(e){if(!e)return this;let t=this.getRootString(e),n=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#k(n):this.#k(n)}#k(e){let t=this;for(let n of e)t=t.child(n);return t}children(){let e=this.#E.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#E.set(this,t),this.#T&=-17,t}child(e,t){if(e===``||e===`.`)return this;if(e===`..`)return this.parent||this;let n=this.children(),r=this.nocase?C(e):x(e);for(let e of n)if(e.#y===r)return e;let i=this.parent?this.sep:``,a=this.#x?this.#x+i+e:void 0,o=this.newChild(e,0,{...t,parent:this,fullpath:a});return this.canReaddir()||(o.#T|=128),n.push(o),o}relative(){if(this.isCWD)return``;if(this.#C!==void 0)return this.#C;let e=this.name,t=this.parent;if(!t)return this.#C=this.name;let n=t.relative();return n+(!n||!t.parent?``:this.sep)+e}relativePosix(){if(this.sep===`/`)return this.relative();if(this.isCWD)return``;if(this.#w!==void 0)return this.#w;let e=this.name,t=this.parent;if(!t)return this.#w=this.fullpathPosix();let n=t.relativePosix();return n+(!n||!t.parent?``:`/`)+e}fullpath(){if(this.#x!==void 0)return this.#x;let e=this.name,t=this.parent;return t?this.#x=t.fullpath()+(t.parent?this.sep:``)+e:this.#x=this.name}fullpathPosix(){if(this.#S!==void 0)return this.#S;if(this.sep===`/`)return this.#S=this.fullpath();if(!this.parent){let e=this.fullpath().replace(/\\/g,`/`);return/^[a-z]:\//i.test(e)?this.#S=`//?/${e}`:this.#S=e}let e=this.parent,t=e.fullpathPosix();return this.#S=t+(!t||!e.parent?``:`/`)+this.name}isUnknown(){return(this.#T&15)==0}isType(e){return this[`is${e}`]()}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(this.#T&15)==8}isDirectory(){return(this.#T&15)==4}isCharacterDevice(){return(this.#T&15)==2}isBlockDevice(){return(this.#T&15)==6}isFIFO(){return(this.#T&15)==1}isSocket(){return(this.#T&15)==12}isSymbolicLink(){return(this.#T&10)==10}lstatCached(){return this.#T&32?this:void 0}readlinkCached(){return this.#D}realpathCached(){return this.#O}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#D)return!0;if(!this.parent)return!1;let e=this.#T&15;return!(e!==0&&e!==10||this.#T&256||this.#T&128)}calledReaddir(){return!!(this.#T&16)}isENOENT(){return!!(this.#T&128)}isNamed(e){return this.nocase?this.#y===C(e):this.#y===x(e)}async readlink(){let e=this.#D;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=await this.#e.promises.readlink(this.fullpath()),t=(await this.parent.realpath())?.resolve(e);if(t)return this.#D=t}catch(e){this.#L(e.code);return}}readlinkSync(){let e=this.#D;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=this.#e.readlinkSync(this.fullpath()),t=this.parent.realpathSync()?.resolve(e);if(t)return this.#D=t}catch(e){this.#L(e.code);return}}#A(e){this.#T|=16;for(let t=e.provisional;t<e.length;t++){let n=e[t];n&&n.#j()}}#j(){this.#T&128||(this.#T=(this.#T|128)&-16,this.#M())}#M(){let e=this.children();e.provisional=0;for(let t of e)t.#j()}#N(){this.#T|=512,this.#P()}#P(){if(this.#T&64)return;let e=this.#T;(e&15)==4&&(e&=-16),this.#T=e|64,this.#M()}#F(e=``){e===`ENOTDIR`||e===`EPERM`?this.#P():e===`ENOENT`?this.#j():this.children().provisional=0}#I(e=``){e===`ENOTDIR`?this.parent.#P():e===`ENOENT`&&this.#j()}#L(e=``){let t=this.#T;t|=256,e===`ENOENT`&&(t|=128),(e===`EINVAL`||e===`UNKNOWN`)&&(t&=-16),this.#T=t,e===`ENOTDIR`&&this.parent&&this.parent.#P()}#R(e,t){return this.#B(e,t)||this.#z(e,t)}#z(e,t){let n=y(e),r=this.newChild(e.name,n,{parent:this}),i=r.#T&15;return i!==4&&i!==10&&i!==0&&(r.#T|=64),t.unshift(r),t.provisional++,r}#B(e,t){for(let n=t.provisional;n<t.length;n++){let r=t[n];if((this.nocase?C(e.name):x(e.name))===r.#y)return this.#V(e,r,n,t)}}#V(e,t,n,r){let i=t.name;return t.#T=t.#T&-16|y(e),i!==e.name&&(t.name=e.name),n!==r.provisional&&(n===r.length-1?r.pop():r.splice(n,1),r.unshift(t)),r.provisional++,t}async lstat(){if(!(this.#T&128))try{return this.#H(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#I(e.code)}}lstatSync(){if(!(this.#T&128))try{return this.#H(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#I(e.code)}}#H(e){let{atime:t,atimeMs:n,birthtime:r,birthtimeMs:i,blksize:a,blocks:o,ctime:s,ctimeMs:c,dev:l,gid:u,ino:d,mode:f,mtime:p,mtimeMs:m,nlink:h,rdev:g,size:v,uid:b}=e;this.#h=t,this.#d=n,this.#v=r,this.#m=i,this.#s=a,this.#u=o,this.#_=s,this.#p=c,this.#t=l,this.#a=u,this.#c=d,this.#n=f,this.#g=p,this.#f=m,this.#r=h,this.#o=g,this.#l=v,this.#i=b;let x=y(e);this.#T=this.#T&-16|x|32,x!==0&&x!==4&&x!==10&&(this.#T|=64)}#U=[];#W=!1;#G(e){this.#W=!1;let t=this.#U.slice();this.#U.length=0,t.forEach(t=>t(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let r=n.slice(0,n.provisional);t?e(null,r):queueMicrotask(()=>e(null,r));return}if(this.#U.push(e),this.#W)return;this.#W=!0;let r=this.fullpath();this.#e.readdir(r,{withFileTypes:!0},(e,t)=>{if(e)this.#F(e.code),n.provisional=0;else{for(let e of t)this.#R(e,n);this.#A(n)}this.#G(n.slice(0,n.provisional))})}#K;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#K)await this.#K;else{let n=()=>{};this.#K=new Promise(e=>n=e);try{for(let n of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#R(n,e);this.#A(e)}catch(t){this.#F(t.code),e.provisional=0}this.#K=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let n of this.#e.readdirSync(t,{withFileTypes:!0}))this.#R(n,e);this.#A(e)}catch(t){this.#F(t.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#T&704)return!1;let e=15&this.#T;return e===0||e===4||e===10}shouldWalk(e,t){return(this.#T&4)==4&&!(this.#T&704)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#O)return this.#O;if(!(896&this.#T))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#O=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#O)return this.#O;if(!(896&this.#T))try{let e=this.#e.realpathSync(this.fullpath());return this.#O=this.resolve(e)}catch{this.#N()}}[E](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),n=[],r=this;for(;r&&r.parent;)t.add(r),r.#C=n.join(this.sep),r.#w=n.join(`/`),r=r.parent,n.push(`..`);for(r=e;r&&r.parent&&!t.has(r);)r.#C=void 0,r.#w=void 0,r=r.parent}};e.PathBase=D;var O=class e extends D{sep=`\\`;splitSep=v;constructor(e,t=0,n,r,i,a,o){super(e,t,n,r,i,a,o)}newChild(t,n=0,r={}){return new e(t,n,this.root,this.roots,this.nocase,this.childrenCache(),r)}getRootString(e){return o.win32.parse(e).root}getRoot(e){if(e=g(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,n]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=n;return this.roots[e]=new j(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,`\\`).replace(h,`$1\\`),e===t}};e.PathWin32=O;var k=class e extends D{splitSep=`/`;sep=`/`;constructor(e,t=0,n,r,i,a,o){super(e,t,n,r,i,a,o)}getRootString(e){return e.startsWith(`/`)?`/`:``}getRoot(e){return this.root}newChild(t,n=0,r={}){return new e(t,n,this.root,this.roots,this.nocase,this.childrenCache(),r)}};e.PathPosix=k;var A=class{root;rootPath;roots;cwd;#e;#t;#n;nocase;#r;constructor(e=process.cwd(),t,n,{nocase:r,childrenCacheSize:i=16*1024,fs:a=p}={}){this.#r=m(a),(e instanceof URL||e.startsWith(`file://`))&&(e=(0,s.fileURLToPath)(e));let o=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#e=new w,this.#t=new w,this.#n=new T(i);let c=o.substring(this.rootPath.length).split(n);if(c.length===1&&!c[0]&&c.pop(),r===void 0)throw TypeError(`must provide nocase setting to PathScurryBase ctor`);this.nocase=r,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let l=this.root,u=c.length-1,d=t.sep,f=this.rootPath,h=!1;for(let e of c){let t=u--;l=l.child(e,{relative:Array(t).fill(`..`).join(d),relativePosix:Array(t).fill(`..`).join(`/`),fullpath:f+=(h?``:d)+e}),h=!0}this.cwd=l}depth(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#n}resolve(...e){let t=``;for(let n=e.length-1;n>=0;n--){let r=e[n];if(!(!r||r===`.`)&&(t=t?`${r}/${t}`:r,this.isAbsolute(r)))break}let n=this.#e.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpath();return this.#e.set(t,r),r}resolvePosix(...e){let t=``;for(let n=e.length-1;n>=0;n--){let r=e[n];if(!(!r||r===`.`)&&(t=t?`${r}/${t}`:r,this.isAbsolute(r)))break}let n=this.#t.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpathPosix();return this.#t.set(t,r),r}relative(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd);let{withFileTypes:n}=t;if(e.canReaddir()){let t=await e.readdir();return n?t:t.map(e=>e.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd);let{withFileTypes:n=!0}=t;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(e=>e.name):[]}async lstat(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e.withFileTypes,e=this.cwd);let n=await e.readlink();return t?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return t?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e.withFileTypes,e=this.cwd);let n=await e.realpath();return t?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return t?n:n?.fullpath()}async walk(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=[];(!i||i(e))&&o.push(n?e:e.fullpath());let s=new Set,c=(e,t)=>{s.add(e),e.readdirCB((e,l)=>{if(e)return t(e);let u=l.length;if(!u)return t();let d=()=>{--u===0&&t()};for(let e of l)(!i||i(e))&&o.push(n?e:e.fullpath()),r&&e.isSymbolicLink()?e.realpath().then(e=>e?.isUnknown()?e.lstat():e).then(e=>e?.shouldWalk(s,a)?c(e,d):d()):e.shouldWalk(s,a)?c(e,d):d()},!0)},l=e;return new Promise((e,t)=>{c(l,n=>{if(n)return t(n);e(o)})})}walkSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=[];(!i||i(e))&&o.push(n?e:e.fullpath());let s=new Set([e]);for(let e of s){let t=e.readdirSync();for(let e of t){(!i||i(e))&&o.push(n?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,a)&&s.add(t)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t;(!i||i(e))&&(yield n?e:e.fullpath());let o=new Set([e]);for(let e of o){let t=e.readdirSync();for(let e of t){(!i||i(e))&&(yield n?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(o,a)&&o.add(t)}}}stream(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=new f.Minipass({objectMode:!0});(!i||i(e))&&o.write(n?e:e.fullpath());let s=new Set,c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t){l===0&&o.end();return}l++,s.add(t);let d=(t,p,m=!1)=>{if(t)return o.emit(`error`,t);if(r&&!m){let e=[];for(let t of p)t.isSymbolicLink()&&e.push(t.realpath().then(e=>e?.isUnknown()?e.lstat():e));if(e.length){Promise.all(e).then(()=>d(null,p,!0));return}}for(let t of p)t&&(!i||i(t))&&(o.write(n?t:t.fullpath())||(e=!0));l--;for(let e of p){let t=e.realpathCached()||e;t.shouldWalk(s,a)&&c.push(t)}e&&!o.flowing?o.once(`drain`,u):f||u()},f=!0;t.readdirCB(d,!0),f=!1}};return u(),o}streamSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof D||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=new f.Minipass({objectMode:!0}),s=new Set;(!i||i(e))&&o.write(n?e:e.fullpath());let c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t){l===0&&o.end();return}l++,s.add(t);let u=t.readdirSync();for(let t of u)(!i||i(t))&&(o.write(n?t:t.fullpath())||(e=!0));l--;for(let e of u){let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,a)&&c.push(t)}}e&&!o.flowing&&o.once(`drain`,u)};return u(),o}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e==`string`?this.cwd.resolve(e):e,this.cwd[E](t)}};e.PathScurryBase=A;var j=class extends A{sep=`\\`;constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,o.win32,`\\`,{...t,nocase:n}),this.nocase=n;for(let e=this.cwd;e;e=e.parent)e.nocase=this.nocase}parseRootPath(e){return o.win32.parse(e).root.toUpperCase()}newRoot(e){return new O(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith(`/`)||e.startsWith(`\\`)||/^[a-z]:(\/|\\)/i.test(e)}};e.PathScurryWin32=j;var M=class extends A{sep=`/`;constructor(e=process.cwd(),t={}){let{nocase:n=!1}=t;super(e,o.posix,`/`,{...t,nocase:n}),this.nocase=n}parseRootPath(e){return`/`}newRoot(e){return new k(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith(`/`)}};e.PathScurryPosix=M;var N=class extends M{constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,{...t,nocase:n})}};e.PathScurryDarwin=N,e.Path=process.platform===`win32`?O:k,e.PathScurry=process.platform===`win32`?j:process.platform===`darwin`?N:M})),cn=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pattern=void 0;let t=rn(),n=e=>e.length>=1,r=e=>e.length>=1;e.Pattern=class e{#e;#t;#n;length;#r;#i;#a;#o;#s;#c;#l=!0;constructor(e,t,i,a){if(!n(e))throw TypeError(`empty pattern list`);if(!r(t))throw TypeError(`empty glob list`);if(t.length!==e.length)throw TypeError(`mismatched pattern list and glob list lengths`);if(this.length=e.length,i<0||i>=this.length)throw TypeError(`index out of range`);if(this.#e=e,this.#t=t,this.#n=i,this.#r=a,this.#n===0){if(this.isUNC()){let[e,t,n,r,...i]=this.#e,[a,o,s,c,...l]=this.#t;i[0]===``&&(i.shift(),l.shift());let u=[e,t,n,r,``].join(`/`),d=[a,o,s,c,``].join(`/`);this.#e=[u,...i],this.#t=[d,...l],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[e,...t]=this.#e,[n,...r]=this.#t;t[0]===``&&(t.shift(),r.shift());let i=e+`/`,a=n+`/`;this.#e=[i,...t],this.#t=[a,...r],this.length=this.#e.length}}}pattern(){return this.#e[this.#n]}isString(){return typeof this.#e[this.#n]==`string`}isGlobstar(){return this.#e[this.#n]===t.GLOBSTAR}isRegExp(){return this.#e[this.#n]instanceof RegExp}globString(){return this.#a=this.#a||(this.#n===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join(`/`):this.#t.join(`/`):this.#t.slice(this.#n).join(`/`))}hasMore(){return this.length>this.#n+1}rest(){return this.#i===void 0?this.hasMore()?(this.#i=new e(this.#e,this.#t,this.#n+1,this.#r),this.#i.#c=this.#c,this.#i.#s=this.#s,this.#i.#o=this.#o,this.#i):this.#i=null:this.#i}isUNC(){let e=this.#e;return this.#s===void 0?this.#s=this.#r===`win32`&&this.#n===0&&e[0]===``&&e[1]===``&&typeof e[2]==`string`&&!!e[2]&&typeof e[3]==`string`&&!!e[3]:this.#s}isDrive(){let e=this.#e;return this.#o===void 0?this.#o=this.#r===`win32`&&this.#n===0&&this.length>1&&typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]):this.#o}isAbsolute(){let e=this.#e;return this.#c===void 0?this.#c=e[0]===``&&e.length>1||this.isDrive()||this.isUNC():this.#c}root(){let e=this.#e[0];return typeof e==`string`&&this.isAbsolute()&&this.#n===0?e:``}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#l?!1:(this.#l=!1,!0)}}})),ln=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Ignore=void 0;let t=rn(),n=cn(),r=typeof process==`object`&&process&&typeof process.platform==`string`?process.platform:`linux`;e.Ignore=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:n,noext:i,noglobstar:a,platform:o=r}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:n,noext:i,noglobstar:a,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let t of e)this.add(t)}add(e){let r=new t.Minimatch(e,this.mmopts);for(let e=0;e<r.set.length;e++){let i=r.set[e],a=r.globParts[e];if(!i||!a)throw Error(`invalid pattern object`);for(;i[0]===`.`&&a[0]===`.`;)i.shift(),a.shift();let o=new n.Pattern(i,a,0,this.platform),s=new t.Minimatch(o.globString(),this.mmopts),c=a[a.length-1]===`**`,l=o.isAbsolute();l?this.absolute.push(s):this.relative.push(s),c&&(l?this.absoluteChildren.push(s):this.relativeChildren.push(s))}}ignored(e){let t=e.fullpath(),n=`${t}/`,r=e.relative()||`.`,i=`${r}/`;for(let e of this.relative)if(e.match(r)||e.match(i))return!0;for(let e of this.absolute)if(e.match(t)||e.match(n))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+`/`,n=(e.relative()||`.`)+`/`;for(let e of this.relativeChildren)if(e.match(n))return!0;for(let e of this.absoluteChildren)if(e.match(t))return!0;return!1}}})),un=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Processor=e.SubWalks=e.MatchRecord=e.HasWalkedCache=void 0;let t=rn();var n=class e{store;constructor(e=new Map){this.store=e}copy(){return new e(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let n=e.fullpath(),r=this.store.get(n);r?r.add(t.globString()):this.store.set(n,new Set([t.globString()]))}};e.HasWalkedCache=n;var r=class{store=new Map;add(e,t,n){let r=(t?2:0)|(n?1:0),i=this.store.get(e);this.store.set(e,i===void 0?r:r&i)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}};e.MatchRecord=r;var i=class{store=new Map;add(e,t){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(e=>e.globString()===t.globString())||n.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw Error(`attempting to walk unknown path`);return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}};e.SubWalks=i,e.Processor=class e{hasWalkedCache;matches=new r;subwalks=new i;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new n}processPatterns(e,n){this.patterns=n;let r=n.map(t=>[e,t]);for(let[e,n]of r){this.hasWalkedCache.storeWalked(e,n);let r=n.root(),i=n.isAbsolute()&&this.opts.absolute!==!1;if(r){e=e.resolve(r===`/`&&this.opts.root!==void 0?this.opts.root:r);let t=n.rest();if(t)n=t;else{this.matches.add(e,!0,!1);continue}}if(e.isENOENT())continue;let a,o,s=!1;for(;typeof(a=n.pattern())==`string`&&(o=n.rest());)e=e.resolve(a),n=o,s=!0;if(a=n.pattern(),o=n.rest(),s){if(this.hasWalkedCache.hasWalked(e,n))continue;this.hasWalkedCache.storeWalked(e,n)}if(typeof a==`string`){let t=a===`..`||a===``||a===`.`;this.matches.add(e.resolve(a),i,t);continue}else if(a===t.GLOBSTAR){(!e.isSymbolicLink()||this.follow||n.checkFollowGlobstar())&&this.subwalks.add(e,n);let t=o?.pattern(),r=o?.rest();if(!o||(t===``||t===`.`)&&!r)this.matches.add(e,i,t===``||t===`.`);else if(t===`..`){let t=e.parent||e;r?this.hasWalkedCache.hasWalked(t,r)||this.subwalks.add(t,r):this.matches.add(t,i,!0)}}else a instanceof RegExp&&this.subwalks.add(e,n)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new e(this.opts,this.hasWalkedCache)}filterEntries(e,n){let r=this.subwalks.get(e),i=this.child();for(let e of n)for(let n of r){let r=n.isAbsolute(),a=n.pattern(),o=n.rest();a===t.GLOBSTAR?i.testGlobstar(e,n,o,r):a instanceof RegExp?i.testRegExp(e,a,o,r):i.testString(e,a,o,r)}return i}testGlobstar(e,t,n,r){if((this.dot||!e.name.startsWith(`.`))&&(t.hasMore()||this.matches.add(e,r,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(n&&t.checkFollowGlobstar()?this.subwalks.add(e,n):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),n){let t=n.pattern();if(typeof t==`string`&&t!==`..`&&t!==``&&t!==`.`)this.testString(e,t,n.rest(),r);else if(t===`..`){let t=e.parent||e;this.subwalks.add(t,n)}else t instanceof RegExp&&this.testRegExp(e,t,n.rest(),r)}}testRegExp(e,t,n,r){t.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}testString(e,t,n,r){e.isNamed(t)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}}})),dn=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.GlobStream=e.GlobWalker=e.GlobUtil=void 0;let t=on(),n=ln(),r=un(),i=(e,t)=>typeof e==`string`?new n.Ignore([e],t):Array.isArray(e)?new n.Ignore(e,t):e;var a=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#n;signal;maxDepth;includeChildMatches;constructor(e,t,n){if(this.patterns=e,this.path=t,this.opts=n,this.#n=!n.posix&&n.platform===`win32`?`\\`:`/`,this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#t=i(n.ignore??[],n),!this.includeChildMatches&&typeof this.#t.add!=`function`))throw Error(`cannot ignore child matches, ignore lacks add() method.`);this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener(`abort`,()=>{this.#e.length=0}))}#r(e){return this.seen.has(e)||!!this.#t?.ignored?.(e)}#i(e){return!!this.#t?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let r=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let e=await r.realpath();e&&(e.isUnknown()||this.opts.stat)&&await e.lstat()}return this.matchCheckTest(r,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#r(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let r=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let e=r.realpathSync();e&&(e?.isUnknown()||this.opts.stat)&&e.lstatSync()}return this.matchCheckTest(r,t)}matchFinish(e,t){if(this.#r(e))return;if(!this.includeChildMatches&&this.#t?.add){let t=`${e.relativePosix()}/**`;this.#t.add(t)}let n=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let r=this.opts.mark&&e.isDirectory()?this.#n:``;if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+r)}else{let t=this.opts.posix?e.relativePosix():e.relative(),n=this.opts.dotRelative&&!t.startsWith(`..`+this.#n)?`.`+this.#n:``;this.matchEmit(t?n+t+r:`.`+r)}}async match(e,t,n){let r=await this.matchCheck(e,n);r&&this.matchFinish(r,t)}matchSync(e,t,n){let r=this.matchCheckSync(e,n);r&&this.matchFinish(r,t)}walkCB(e,t,n){this.signal?.aborted&&n(),this.walkCB2(e,t,new r.Processor(this.opts),n)}walkCB2(e,t,n,r){if(this.#i(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2(e,t,n,r));return}n.processPatterns(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||(i++,this.match(e,t,r).then(()=>a()));for(let e of n.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;let t=e.readdirCached();e.calledReaddir()?this.walkCB3(e,t,n,a):e.readdirCB((t,r)=>this.walkCB3(e,r,n,a),!0)}a()}walkCB3(e,t,n,r){n=n.filterEntries(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||(i++,this.match(e,t,r).then(()=>a()));for(let[e,t]of n.subwalks.entries())i++,this.walkCB2(e,t,n.child(),a);a()}walkCBSync(e,t,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,t,new r.Processor(this.opts),n)}walkCB2Sync(e,t,n,r){if(this.#i(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,n,r));return}n.processPatterns(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||this.matchSync(e,t,r);for(let e of n.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;let t=e.readdirSync();this.walkCB3Sync(e,t,n,a)}a()}walkCB3Sync(e,t,n,r){n=n.filterEntries(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||this.matchSync(e,t,r);for(let[e,t]of n.subwalks.entries())i++,this.walkCB2Sync(e,t,n.child(),a);a()}};e.GlobUtil=a,e.GlobWalker=class extends a{matches=new Set;constructor(e,t,n){super(e,t,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(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}},e.GlobStream=class extends a{results;constructor(e,n,r){super(e,n,r),this.results=new t.Minipass({signal:this.signal,objectMode:!0}),this.results.on(`drain`,()=>this.resume()),this.results.on(`resume`,()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,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}}})),fn=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Glob=void 0;let t=rn(),r=n(`node:url`),i=sn(),a=cn(),o=dn(),s=typeof process==`object`&&process&&typeof process.platform==`string`?process.platform:`linux`;e.Glob=class{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(e,n){if(!n)throw TypeError(`glob options required`);if(this.withFileTypes=!!n.withFileTypes,this.signal=n.signal,this.follow=!!n.follow,this.dot=!!n.dot,this.dotRelative=!!n.dotRelative,this.nodir=!!n.nodir,this.mark=!!n.mark,n.cwd?(n.cwd instanceof URL||n.cwd.startsWith(`file://`))&&(n.cwd=(0,r.fileURLToPath)(n.cwd)):this.cwd=``,this.cwd=n.cwd||``,this.root=n.root,this.magicalBraces=!!n.magicalBraces,this.nobrace=!!n.nobrace,this.noext=!!n.noext,this.realpath=!!n.realpath,this.absolute=n.absolute,this.includeChildMatches=n.includeChildMatches!==!1,this.noglobstar=!!n.noglobstar,this.matchBase=!!n.matchBase,this.maxDepth=typeof n.maxDepth==`number`?n.maxDepth:1/0,this.stat=!!n.stat,this.ignore=n.ignore,this.withFileTypes&&this.absolute!==void 0)throw Error(`cannot set absolute and withFileTypes:true`);if(typeof e==`string`&&(e=[e]),this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(e=>e.replace(/\\/g,`/`))),this.matchBase){if(n.noglobstar)throw TypeError(`base matching requires globstar`);e=e.map(e=>e.includes(`/`)?e:`./**/${e}`)}if(this.pattern=e,this.platform=n.platform||s,this.opts={...n,platform:this.platform},n.scurry){if(this.scurry=n.scurry,n.nocase!==void 0&&n.nocase!==n.scurry.nocase)throw Error(`nocase option contradicts provided scurry option`)}else this.scurry=new(n.platform===`win32`?i.PathScurryWin32:n.platform===`darwin`?i.PathScurryDarwin:n.platform?i.PathScurryPosix:i.PathScurry)(this.cwd,{nocase:n.nocase,fs:n.fs});this.nocase=this.scurry.nocase;let o=this.platform===`darwin`||this.platform===`win32`,c={...n,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:o,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},[l,u]=this.pattern.map(e=>new t.Minimatch(e,c)).reduce((e,t)=>(e[0].push(...t.set),e[1].push(...t.globParts),e),[[],[]]);this.patterns=l.map((e,t)=>{let n=u[t];if(!n)throw Error(`invalid pattern object`);return new a.Pattern(e,n,0,this.platform)})}async walk(){return[...await new o.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new o.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new o.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new o.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),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()}}})),pn=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.hasMagic=void 0;let t=rn();e.hasMagic=(e,n={})=>{Array.isArray(e)||(e=[e]);for(let r of e)if(new t.Minimatch(r,n).hasMagic())return!0;return!1}})),mn=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.glob=e.sync=e.iterate=e.iterateSync=e.stream=e.streamSync=e.Ignore=e.hasMagic=e.Glob=e.unescape=e.escape=void 0,e.globStreamSync=c,e.globStream=l,e.globSync=u,e.globIterateSync=f,e.globIterate=p;let t=rn(),n=fn(),r=pn();var i=rn();Object.defineProperty(e,`escape`,{enumerable:!0,get:function(){return i.escape}}),Object.defineProperty(e,`unescape`,{enumerable:!0,get:function(){return i.unescape}});var a=fn();Object.defineProperty(e,`Glob`,{enumerable:!0,get:function(){return a.Glob}});var o=pn();Object.defineProperty(e,`hasMagic`,{enumerable:!0,get:function(){return o.hasMagic}});var s=ln();Object.defineProperty(e,`Ignore`,{enumerable:!0,get:function(){return s.Ignore}});function c(e,t={}){return new n.Glob(e,t).streamSync()}function l(e,t={}){return new n.Glob(e,t).stream()}function u(e,t={}){return new n.Glob(e,t).walkSync()}async function d(e,t={}){return new n.Glob(e,t).walk()}function f(e,t={}){return new n.Glob(e,t).iterateSync()}function p(e,t={}){return new n.Glob(e,t).iterate()}e.streamSync=c,e.stream=Object.assign(l,{sync:c}),e.iterateSync=f,e.iterate=Object.assign(p,{sync:f}),e.sync=Object.assign(u,{stream:c,iterate:f}),e.glob=Object.assign(d,{glob:d,globSync:u,sync:e.sync,globStream:l,stream:e.stream,globStreamSync:c,streamSync:e.streamSync,globIterate:p,iterate:e.iterate,globIterateSync:f,iterateSync:e.iterateSync,Glob:n.Glob,hasMagic:r.hasMagic,escape:t.escape,unescape:t.unescape}),e.glob.glob=e.glob})),hn=t(((e,t)=>{var r=f(),i=n(`path`),a=at(),o=Ht(),s=Jt(),c=Zt(),l=mn(),u=t.exports={},d=/[\/\\]/g,p=function(e,t){var n=[];return a(e).forEach(function(e){var r=e.indexOf(`!`)===0;r&&(e=e.slice(1));var i=t(e);n=r?o(n,i):s(n,i)}),n};u.exists=function(){var e=i.join.apply(i,arguments);return r.existsSync(e)},u.expand=function(...e){var t=c(e[0])?e.shift():{},n=Array.isArray(e[0])?e[0]:e;if(n.length===0)return[];var a=p(n,function(e){return l.sync(e,t)});return t.filter&&(a=a.filter(function(e){e=i.join(t.cwd||``,e);try{return typeof t.filter==`function`?t.filter(e):r.statSync(e)[t.filter]()}catch{return!1}})),a},u.expandMapping=function(e,t,n){n=Object.assign({rename:function(e,t){return i.join(e||``,t)}},n);var r=[],a={};return u.expand(n,e).forEach(function(e){var o=e;n.flatten&&(o=i.basename(o)),n.ext&&(o=o.replace(/(\.[^\/]*)?$/,n.ext));var s=n.rename(t,o,n);n.cwd&&(e=i.join(n.cwd,e)),s=s.replace(d,`/`),e=e.replace(d,`/`),a[s]?a[s].src.push(e):(r.push({src:[e],dest:s}),a[s]=r[r.length-1])}),r},u.normalizeFilesArray=function(e){var t=[];return e.forEach(function(e){(`src`in e||`dest`in e)&&t.push(e)}),t.length===0?[]:(t=_(t).chain().forEach(function(e){!(`src`in e)||!e.src||(Array.isArray(e.src)?e.src=a(e.src):e.src=[e.src])}).map(function(e){var t=Object.assign({},e);if(delete t.src,delete t.dest,e.expand)return u.expandMapping(e.src,e.dest,t).map(function(t){var n=Object.assign({},e);return n.orig=Object.assign({},e),n.src=t.src,n.dest=t.dest,[`expand`,`cwd`,`flatten`,`rename`,`ext`].forEach(function(e){delete n[e]}),n});var n=Object.assign({},e);return n.orig=Object.assign({},e),`src`in n&&Object.defineProperty(n,`src`,{enumerable:!0,get:function n(){var r;return`result`in n||(r=e.src,r=Array.isArray(r)?a(r):[r],n.result=u.expand(t,r)),n.result}}),`dest`in n&&(n.dest=e.dest),n}).flatten().value(),t)}})),gn=t(((e,t)=>{var r=f(),i=n(`path`),a=p(),o=N(),s=P(),c=Oe();n(`stream`).Stream;var l=tt().PassThrough,u=t.exports={};u.file=hn(),u.collectStream=function(e,t){var n=[],r=0;e.on(`error`,t),e.on(`data`,function(e){n.push(e),r+=e.length}),e.on(`end`,function(){var e=Buffer.alloc(r),i=0;n.forEach(function(t){t.copy(e,i),i+=t.length}),t(null,e)})},u.dateify=function(e){return e||=new Date,e=e instanceof Date?e:typeof e==`string`?new Date(e):new Date,e},u.defaults=function(e,t,n){var r=arguments;return r[0]=r[0]||{},c(...r)},u.isStream=function(e){return a(e)},u.lazyReadStream=function(e){return new o.Readable(function(){return r.createReadStream(e)})},u.normalizeInputSource=function(e){return e===null?Buffer.alloc(0):typeof e==`string`?Buffer.from(e):u.isStream(e)?e.pipe(new l):e},u.sanitizePath=function(e){return s(e,!1).replace(/^\w+:/,``).replace(/^(\.\.\/|\/)+/,``)},u.trailingSlashIt=function(e){return e.slice(-1)===`/`?e:e+`/`},u.unixifyPath=function(e){return s(e,!1).replace(/^\w+:/,``)},u.walkdir=function(e,t,n){var a=[];typeof t==`function`&&(n=t,t=e),r.readdir(e,function(o,s){var c=0,l,d;if(o)return n(o);(function o(){if(l=s[c++],!l)return n(null,a);d=i.join(e,l),r.stat(d,function(e,r){a.push({path:d,relative:i.relative(t,d).replace(/\\/g,`/`),stats:r}),r&&r.isDirectory()?u.walkdir(d,t,function(e,t){if(e)return n(e);t.forEach(function(e){a.push(e)}),o()}):o()})})()})}})),_n=t(((e,t)=>{
|
|
20
|
+
/**
|
|
21
|
+
* Archiver Core
|
|
22
|
+
*
|
|
23
|
+
* @ignore
|
|
24
|
+
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
25
|
+
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
26
|
+
*/
|
|
27
|
+
var r=n(`util`);let i={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 a(e,t){Error.captureStackTrace(this,this.constructor),this.message=i[e]||e,this.code=e,this.data=t}r.inherits(a,Error),e=t.exports=a})),vn=t(((e,t)=>{
|
|
28
|
+
/**
|
|
29
|
+
* Archiver Core
|
|
30
|
+
*
|
|
31
|
+
* @ignore
|
|
32
|
+
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
33
|
+
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
34
|
+
*/
|
|
35
|
+
var r=n(`fs`),i=s(),a=c(),o=n(`path`),l=gn(),u=n(`util`).inherits,d=_n(),f=tt().Transform,p=process.platform===`win32`,m=function(e,t){if(!(this instanceof m))return new m(e,t);typeof e!=`string`&&(t=e,e=`zip`),t=this.options=l.defaults(t,{highWaterMark:1024*1024,statConcurrency:4}),f.call(this,t),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=a.queue(this._onQueueTask.bind(this),1),this._queue.drain(this._onQueueDrain.bind(this)),this._statQueue=a.queue(this._onStatQueueTask.bind(this),t.statConcurrency),this._statQueue.drain(this._onQueueDrain.bind(this)),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]};u(m,f),m.prototype._abort=function(){this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle()&&this._shutdown()},m.prototype._append=function(e,t){t||={};var n={source:null,filepath:e};t.name||=e,t.sourcePath=e,n.data=t,this._entriesCount++,t.stats&&t.stats instanceof r.Stats?(n=this._updateQueueTaskWithStats(n,t.stats),n&&(t.stats.size&&(this._fsEntriesTotalBytes+=t.stats.size),this._queue.push(n))):this._statQueue.push(n)},m.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)},m.prototype._maybeFinalize=function(){return this._state.finalizing||this._state.finalized||this._state.aborted?!1:this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()?(this._finalize(),!0):!1},m.prototype._moduleAppend=function(e,t,n){if(this._state.aborted){n();return}this._module.append(e,t,function(e){if(this._task=null,this._state.aborted){this._shutdown();return}if(e){this.emit(`error`,e),setImmediate(n);return}this.emit(`entry`,t),this._entriesProcessedCount++,t.stats&&t.stats.size&&(this._fsEntriesProcessedBytes+=t.stats.size),this.emit(`progress`,{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),setImmediate(n)}.bind(this))},m.prototype._moduleFinalize=function(){typeof this._module.finalize==`function`?this._module.finalize():typeof this._module.end==`function`?this._module.end():this.emit(`error`,new d(`NOENDMETHOD`))},m.prototype._modulePipe=function(){this._module.on(`error`,this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0},m.prototype._moduleSupports=function(e){return!this._module.supports||!this._module.supports[e]?!1:this._module.supports[e]},m.prototype._moduleUnpipe=function(){this._module.unpipe(this),this._state.modulePiped=!1},m.prototype._normalizeEntryData=function(e,t){e=l.defaults(e,{type:`file`,name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1}),t&&e.stats===!1&&(e.stats=t);var n=e.type===`directory`;return e.name&&(typeof e.prefix==`string`&&e.prefix!==``&&(e.name=e.prefix+`/`+e.name,e.prefix=null),e.name=l.sanitizePath(e.name),e.type!==`symlink`&&e.name.slice(-1)===`/`?(n=!0,e.type=`directory`):n&&(e.name+=`/`)),typeof e.mode==`number`?p?e.mode&=511:e.mode&=4095:e.stats&&e.mode===null?(p?e.mode=e.stats.mode&511:e.mode=e.stats.mode&4095,p&&n&&(e.mode=493)):e.mode===null&&(e.mode=n?493:420),e.stats&&e.date===null?e.date=e.stats.mtime:e.date=l.dateify(e.date),e},m.prototype._onModuleError=function(e){this.emit(`error`,e)},m.prototype._onQueueDrain=function(){this._state.finalizing||this._state.finalized||this._state.aborted||this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize()},m.prototype._onQueueTask=function(e,t){var n=()=>{e.data.callback&&e.data.callback(),t()};if(this._state.finalizing||this._state.finalized||this._state.aborted){n();return}this._task=e,this._moduleAppend(e.source,e.data,n)},m.prototype._onStatQueueTask=function(e,t){if(this._state.finalizing||this._state.finalized||this._state.aborted){t();return}r.lstat(e.filepath,function(n,r){if(this._state.aborted){setImmediate(t);return}if(n){this._entriesCount--,this.emit(`warning`,n),setImmediate(t);return}e=this._updateQueueTaskWithStats(e,r),e&&(r.size&&(this._fsEntriesTotalBytes+=r.size),this._queue.push(e)),setImmediate(t)}.bind(this))},m.prototype._shutdown=function(){this._moduleUnpipe(),this.end()},m.prototype._transform=function(e,t,n){e&&(this._pointer+=e.length),n(null,e)},m.prototype._updateQueueTaskWithStats=function(e,t){if(t.isFile())e.data.type=`file`,e.data.sourceType=`stream`,e.source=l.lazyReadStream(e.filepath);else if(t.isDirectory()&&this._moduleSupports(`directory`))e.data.name=l.trailingSlashIt(e.data.name),e.data.type=`directory`,e.data.sourcePath=l.trailingSlashIt(e.filepath),e.data.sourceType=`buffer`,e.source=Buffer.concat([]);else if(t.isSymbolicLink()&&this._moduleSupports(`symlink`)){var n=r.readlinkSync(e.filepath),i=o.dirname(e.filepath);e.data.type=`symlink`,e.data.linkname=o.relative(i,o.resolve(i,n)),e.data.sourceType=`buffer`,e.source=Buffer.concat([])}else return t.isDirectory()?this.emit(`warning`,new d(`DIRECTORYNOTSUPPORTED`,e.data)):t.isSymbolicLink()?this.emit(`warning`,new d(`SYMLINKNOTSUPPORTED`,e.data)):this.emit(`warning`,new d(`ENTRYNOTSUPPORTED`,e.data)),null;return e.data=this._normalizeEntryData(e.data,t),e},m.prototype.abort=function(){return this._state.aborted||this._state.finalized||this._abort(),this},m.prototype.append=function(e,t){if(this._state.finalize||this._state.aborted)return this.emit(`error`,new d(`QUEUECLOSED`)),this;if(t=this._normalizeEntryData(t),typeof t.name!=`string`||t.name.length===0)return this.emit(`error`,new d(`ENTRYNAMEREQUIRED`)),this;if(t.type===`directory`&&!this._moduleSupports(`directory`))return this.emit(`error`,new d(`DIRECTORYNOTSUPPORTED`,{name:t.name})),this;if(e=l.normalizeInputSource(e),Buffer.isBuffer(e))t.sourceType=`buffer`;else if(l.isStream(e))t.sourceType=`stream`;else return this.emit(`error`,new d(`INPUTSTEAMBUFFERREQUIRED`,{name:t.name})),this;return this._entriesCount++,this._queue.push({data:t,source:e}),this},m.prototype.directory=function(e,t,n){if(this._state.finalize||this._state.aborted)return this.emit(`error`,new d(`QUEUECLOSED`)),this;if(typeof e!=`string`||e.length===0)return this.emit(`error`,new d(`DIRECTORYDIRPATHREQUIRED`)),this;this._pending++,t===!1?t=``:typeof t!=`string`&&(t=e);var r=!1;typeof n==`function`?(r=n,n={}):typeof n!=`object`&&(n={});var a={stat:!0,dot:!0};function o(){this._pending--,this._maybeFinalize()}function s(e){this.emit(`error`,e)}function c(i){l.pause();var a=!1,o=Object.assign({},n);o.name=i.relative,o.prefix=t,o.stats=i.stat,o.callback=l.resume.bind(l);try{if(r){if(o=r(o),o===!1)a=!0;else if(typeof o!=`object`)throw new d(`DIRECTORYFUNCTIONINVALIDDATA`,{dirpath:e})}}catch(e){this.emit(`error`,e);return}if(a){l.resume();return}this._append(i.absolute,o)}var l=i(e,a);return l.on(`error`,s.bind(this)),l.on(`match`,c.bind(this)),l.on(`end`,o.bind(this)),this},m.prototype.file=function(e,t){return this._state.finalize||this._state.aborted?(this.emit(`error`,new d(`QUEUECLOSED`)),this):typeof e!=`string`||e.length===0?(this.emit(`error`,new d(`FILEFILEPATHREQUIRED`)),this):(this._append(e,t),this)},m.prototype.glob=function(e,t,n){this._pending++,t=l.defaults(t,{stat:!0,pattern:e});function r(){this._pending--,this._maybeFinalize()}function a(e){this.emit(`error`,e)}function o(e){s.pause();var t=Object.assign({},n);t.callback=s.resume.bind(s),t.stats=e.stat,t.name=e.relative,this._append(e.absolute,t)}var s=i(t.cwd||`.`,t);return s.on(`error`,a.bind(this)),s.on(`match`,o.bind(this)),s.on(`end`,r.bind(this)),this},m.prototype.finalize=function(){if(this._state.aborted){var e=new d(`ABORTED`);return this.emit(`error`,e),Promise.reject(e)}if(this._state.finalize){var t=new d(`FINALIZING`);return this.emit(`error`,t),Promise.reject(t)}this._state.finalize=!0,this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize();var n=this;return new Promise(function(e,t){var r;n._module.on(`end`,function(){r||e()}),n._module.on(`error`,function(e){r=!0,t(e)})})},m.prototype.setFormat=function(e){return this._format?(this.emit(`error`,new d(`FORMATSET`)),this):(this._format=e,this)},m.prototype.setModule=function(e){return this._state.aborted?(this.emit(`error`,new d(`ABORTED`)),this):this._state.module?(this.emit(`error`,new d(`MODULESET`)),this):(this._module=e,this._modulePipe(),this)},m.prototype.symlink=function(e,t,n){if(this._state.finalize||this._state.aborted)return this.emit(`error`,new d(`QUEUECLOSED`)),this;if(typeof e!=`string`||e.length===0)return this.emit(`error`,new d(`SYMLINKFILEPATHREQUIRED`)),this;if(typeof t!=`string`||t.length===0)return this.emit(`error`,new d(`SYMLINKTARGETREQUIRED`,{filepath:e})),this;if(!this._moduleSupports(`symlink`))return this.emit(`error`,new d(`SYMLINKNOTSUPPORTED`,{filepath:e})),this;var r={};return r.type=`symlink`,r.name=e.replace(/\\/g,`/`),r.linkname=t.replace(/\\/g,`/`),r.sourceType=`buffer`,typeof n==`number`&&(r.mode=n),this._entriesCount++,this._queue.push({data:r,source:Buffer.concat([])}),this},m.prototype.pointer=function(){return this._pointer},m.prototype.use=function(e){return this._streams.push(e),this},t.exports=m})),yn=t(((e,t)=>{var n=t.exports=function(){};n.prototype.getName=function(){},n.prototype.getSize=function(){},n.prototype.getLastModifiedDate=function(){},n.prototype.isDirectory=function(){}})),bn=t(((e,t)=>{var n=t.exports={};n.dateToDos=function(e,t){t||=!1;var n=t?e.getFullYear():e.getUTCFullYear();if(n<1980)return 2162688;if(n>=2044)return 2141175677;var r={year:n,month:t?e.getMonth():e.getUTCMonth(),date:t?e.getDate():e.getUTCDate(),hours:t?e.getHours():e.getUTCHours(),minutes:t?e.getMinutes():e.getUTCMinutes(),seconds:t?e.getSeconds():e.getUTCSeconds()};return r.year-1980<<25|r.month+1<<21|r.date<<16|r.hours<<11|r.minutes<<5|r.seconds/2},n.dosToDate=function(e){return new Date((e>>25&127)+1980,(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(e&31)<<1)},n.fromDosTime=function(e){return n.dosToDate(e.readUInt32LE(0))},n.getEightBytes=function(e){var t=Buffer.alloc(8);return t.writeUInt32LE(e%4294967296,0),t.writeUInt32LE(e/4294967296|0,4),t},n.getShortBytes=function(e){var t=Buffer.alloc(2);return t.writeUInt16LE((e&65535)>>>0,0),t},n.getShortBytesValue=function(e,t){return e.readUInt16LE(t)},n.getLongBytes=function(e){var t=Buffer.alloc(4);return t.writeUInt32LE((e&4294967295)>>>0,0),t},n.getLongBytesValue=function(e,t){return e.readUInt32LE(t)},n.toDosTime=function(e){return n.getLongBytes(n.dateToDos(e))}})),xn=t(((e,t)=>{var n=bn(),r=8,i=1,a=4,o=2,s=64,c=2048,l=t.exports=function(){return this instanceof l?(this.descriptor=!1,this.encryption=!1,this.utf8=!1,this.numberOfShannonFanoTrees=0,this.strongEncryption=!1,this.slidingDictionarySize=0,this):new l};l.prototype.encode=function(){return n.getShortBytes((this.descriptor?r:0)|(this.utf8?c:0)|(this.encryption?i:0)|(this.strongEncryption?s:0))},l.prototype.parse=function(e,t){var u=n.getShortBytesValue(e,t),d=new l;return d.useDataDescriptor((u&r)!==0),d.useUTF8ForNames((u&c)!==0),d.useStrongEncryption((u&s)!==0),d.useEncryption((u&i)!==0),d.setSlidingDictionarySize((u&o)===0?4096:8192),d.setNumberOfShannonFanoTrees((u&a)===0?2:3),d},l.prototype.setNumberOfShannonFanoTrees=function(e){this.numberOfShannonFanoTrees=e},l.prototype.getNumberOfShannonFanoTrees=function(){return this.numberOfShannonFanoTrees},l.prototype.setSlidingDictionarySize=function(e){this.slidingDictionarySize=e},l.prototype.getSlidingDictionarySize=function(){return this.slidingDictionarySize},l.prototype.useDataDescriptor=function(e){this.descriptor=e},l.prototype.usesDataDescriptor=function(){return this.descriptor},l.prototype.useEncryption=function(e){this.encryption=e},l.prototype.usesEncryption=function(){return this.encryption},l.prototype.useStrongEncryption=function(e){this.strongEncryption=e},l.prototype.usesStrongEncryption=function(){return this.strongEncryption},l.prototype.useUTF8ForNames=function(e){this.utf8=e},l.prototype.usesUTF8ForNames=function(){return this.utf8}})),Sn=t(((e,t)=>{t.exports={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}})),Cn=t(((e,t)=>{t.exports={WORD:4,DWORD:8,EMPTY:Buffer.alloc(0),SHORT:2,SHORT_MASK:65535,SHORT_SHIFT:16,SHORT_ZERO:Buffer.from([,,]),LONG:4,LONG_ZERO:Buffer.from([,,,,]),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}})),wn=t(((e,t)=>{var r=n(`util`).inherits,i=P(),a=yn(),o=xn(),s=Sn(),c=Cn(),l=bn(),u=t.exports=function(e){if(!(this instanceof u))return new u(e);a.call(this),this.platform=c.PLATFORM_FAT,this.method=-1,this.name=null,this.size=0,this.csize=0,this.gpb=new o,this.crc=0,this.time=-1,this.minver=c.MIN_VERSION_INITIAL,this.mode=-1,this.extra=null,this.exattr=0,this.inattr=0,this.comment=null,e&&this.setName(e)};r(u,a),u.prototype.getCentralDirectoryExtra=function(){return this.getExtra()},u.prototype.getComment=function(){return this.comment===null?``:this.comment},u.prototype.getCompressedSize=function(){return this.csize},u.prototype.getCrc=function(){return this.crc},u.prototype.getExternalAttributes=function(){return this.exattr},u.prototype.getExtra=function(){return this.extra===null?c.EMPTY:this.extra},u.prototype.getGeneralPurposeBit=function(){return this.gpb},u.prototype.getInternalAttributes=function(){return this.inattr},u.prototype.getLastModifiedDate=function(){return this.getTime()},u.prototype.getLocalFileDataExtra=function(){return this.getExtra()},u.prototype.getMethod=function(){return this.method},u.prototype.getName=function(){return this.name},u.prototype.getPlatform=function(){return this.platform},u.prototype.getSize=function(){return this.size},u.prototype.getTime=function(){return this.time===-1?-1:l.dosToDate(this.time)},u.prototype.getTimeDos=function(){return this.time===-1?0:this.time},u.prototype.getUnixMode=function(){return this.platform===c.PLATFORM_UNIX?this.getExternalAttributes()>>c.SHORT_SHIFT&c.SHORT_MASK:0},u.prototype.getVersionNeededToExtract=function(){return this.minver},u.prototype.setComment=function(e){Buffer.byteLength(e)!==e.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.comment=e},u.prototype.setCompressedSize=function(e){if(e<0)throw Error(`invalid entry compressed size`);this.csize=e},u.prototype.setCrc=function(e){if(e<0)throw Error(`invalid entry crc32`);this.crc=e},u.prototype.setExternalAttributes=function(e){this.exattr=e>>>0},u.prototype.setExtra=function(e){this.extra=e},u.prototype.setGeneralPurposeBit=function(e){if(!(e instanceof o))throw Error(`invalid entry GeneralPurposeBit`);this.gpb=e},u.prototype.setInternalAttributes=function(e){this.inattr=e},u.prototype.setMethod=function(e){if(e<0)throw Error(`invalid entry compression method`);this.method=e},u.prototype.setName=function(e,t=!1){e=i(e,!1).replace(/^\w+:/,``).replace(/^(\.\.\/|\/)+/,``),t&&(e=`/${e}`),Buffer.byteLength(e)!==e.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.name=e},u.prototype.setPlatform=function(e){this.platform=e},u.prototype.setSize=function(e){if(e<0)throw Error(`invalid entry size`);this.size=e},u.prototype.setTime=function(e,t){if(!(e instanceof Date))throw Error(`invalid entry time`);this.time=l.dateToDos(e,t)},u.prototype.setUnixMode=function(e){e|=this.isDirectory()?c.S_IFDIR:c.S_IFREG;var t=0;t|=e<<c.SHORT_SHIFT|(this.isDirectory()?c.S_DOS_D:c.S_DOS_A),this.setExternalAttributes(t),this.mode=e&c.MODE_MASK,this.platform=c.PLATFORM_UNIX},u.prototype.setVersionNeededToExtract=function(e){this.minver=e},u.prototype.isDirectory=function(){return this.getName().slice(-1)===`/`},u.prototype.isUnixSymlink=function(){return(this.getUnixMode()&s.FILE_TYPE_FLAG)===s.LINK_FLAG},u.prototype.isZip64=function(){return this.csize>c.ZIP64_MAGIC||this.size>c.ZIP64_MAGIC}})),Tn=t(((e,t)=>{n(`stream`).Stream;var r=tt().PassThrough,i=p(),a=t.exports={};a.normalizeInputSource=function(e){if(e===null)return Buffer.alloc(0);if(typeof e==`string`)return Buffer.from(e);if(i(e)&&!e._readableState){var t=new r;return e.pipe(t),t}return e}})),En=t(((e,t)=>{var r=n(`util`).inherits,i=p(),a=tt().Transform,o=yn(),s=Tn(),c=t.exports=function(e){if(!(this instanceof c))return new c(e);a.call(this,e),this.offset=0,this._archive={finish:!1,finished:!1,processing:!1}};r(c,a),c.prototype._appendBuffer=function(e,t,n){},c.prototype._appendStream=function(e,t,n){},c.prototype._emitErrorCallback=function(e){e&&this.emit(`error`,e)},c.prototype._finish=function(e){},c.prototype._normalizeEntry=function(e){},c.prototype._transform=function(e,t,n){n(null,e)},c.prototype.entry=function(e,t,n){if(t||=null,typeof n!=`function`&&(n=this._emitErrorCallback.bind(this)),!(e instanceof o)){n(Error(`not a valid instance of ArchiveEntry`));return}if(this._archive.finish||this._archive.finished){n(Error(`unacceptable entry after finish`));return}if(this._archive.processing){n(Error(`already processing an entry`));return}if(this._archive.processing=!0,this._normalizeEntry(e),this._entry=e,t=s.normalizeInputSource(t),Buffer.isBuffer(t))this._appendBuffer(e,t,n);else if(i(t))this._appendStream(e,t,n);else{this._archive.processing=!1,n(Error(`input source must be valid Stream or Buffer instance`));return}return this},c.prototype.finish=function(){if(this._archive.processing){this._archive.finish=!0;return}this._finish()},c.prototype.getBytesWritten=function(){return this.offset},c.prototype.write=function(e,t){return e&&(this.offset+=e.length),a.prototype.write.call(this,e,t)}})),Dn=t((e=>{(function(t){typeof DO_NOT_EXPORT_CRC>`u`?typeof e==`object`?t(e):typeof define==`function`&&define.amd?define(function(){var e={};return t(e),e}):t({}):t({})})(function(e){e.version=`1.2.2`;function t(){for(var e=0,t=Array(256),n=0;n!=256;++n)e=n,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,t[n]=e;return typeof Int32Array<`u`?new Int32Array(t):t}var n=t();function r(e){var t=0,n=0,r=0,i=typeof Int32Array<`u`?new Int32Array(4096):Array(4096);for(r=0;r!=256;++r)i[r]=e[r];for(r=0;r!=256;++r)for(n=e[r],t=256+r;t<4096;t+=256)n=i[t]=n>>>8^e[n&255];var a=[];for(r=1;r!=16;++r)a[r-1]=typeof Int32Array<`u`?i.subarray(r*256,r*256+256):i.slice(r*256,r*256+256);return a}var i=r(n),a=i[0],o=i[1],s=i[2],c=i[3],l=i[4],u=i[5],d=i[6],f=i[7],p=i[8],m=i[9],h=i[10],g=i[11],v=i[12],y=i[13],b=i[14];function x(e,t){for(var r=t^-1,i=0,a=e.length;i<a;)r=r>>>8^n[(r^e.charCodeAt(i++))&255];return~r}function S(e,t){for(var r=t^-1,i=e.length-15,x=0;x<i;)r=b[e[x++]^r&255]^y[e[x++]^r>>8&255]^v[e[x++]^r>>16&255]^g[e[x++]^r>>>24]^h[e[x++]]^m[e[x++]]^p[e[x++]]^f[e[x++]]^d[e[x++]]^u[e[x++]]^l[e[x++]]^c[e[x++]]^s[e[x++]]^o[e[x++]]^a[e[x++]]^n[e[x++]];for(i+=15;x<i;)r=r>>>8^n[(r^e[x++])&255];return~r}function C(e,t){for(var r=t^-1,i=0,a=e.length,o=0,s=0;i<a;)o=e.charCodeAt(i++),o<128?r=r>>>8^n[(r^o)&255]:o<2048?(r=r>>>8^n[(r^(192|o>>6&31))&255],r=r>>>8^n[(r^(128|o&63))&255]):o>=55296&&o<57344?(o=(o&1023)+64,s=e.charCodeAt(i++)&1023,r=r>>>8^n[(r^(240|o>>8&7))&255],r=r>>>8^n[(r^(128|o>>2&63))&255],r=r>>>8^n[(r^(128|s>>6&15|(o&3)<<4))&255],r=r>>>8^n[(r^(128|s&63))&255]):(r=r>>>8^n[(r^(224|o>>12&15))&255],r=r>>>8^n[(r^(128|o>>6&63))&255],r=r>>>8^n[(r^(128|o&63))&255]);return~r}e.table=n,e.bstr=x,e.buf=S,e.str=C})})),On=t(((e,t)=>{let{Transform:n}=tt(),r=Dn();t.exports=class extends n{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(e,t,n){e&&(this.checksum=r.buf(e,this.checksum)>>>0,this.rawSize+=e.length),n(null,e)}digest(e){let t=Buffer.allocUnsafe(4);return t.writeUInt32BE(this.checksum>>>0,0),e?t.toString(e):t}hex(){return this.digest(`hex`).toUpperCase()}size(){return this.rawSize}}})),kn=t(((e,t)=>{let{DeflateRaw:r}=n(`zlib`),i=Dn();t.exports=class extends r{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(e,t){return e&&(this.compressedSize+=e.length),super.push(e,t)}_transform(e,t,n){e&&(this.checksum=i.buf(e,this.checksum)>>>0,this.rawSize+=e.length),super._transform(e,t,n)}digest(e){let t=Buffer.allocUnsafe(4);return t.writeUInt32BE(this.checksum>>>0,0),e?t.toString(e):t}hex(){return this.digest(`hex`).toUpperCase()}size(e=!1){return e?this.compressedSize:this.rawSize}}})),An=t(((e,t)=>{t.exports={CRC32Stream:On(),DeflateCRC32Stream:kn()}})),jn=t(((e,t)=>{var r=n(`util`).inherits,i=Dn(),{CRC32Stream:a}=An(),{DeflateCRC32Stream:o}=An(),s=En();wn(),xn();var c=Cn();Tn();var l=bn(),u=t.exports=function(e){if(!(this instanceof u))return new u(e);e=this.options=this._defaults(e),s.call(this,e),this._entry=null,this._entries=[],this._archive={centralLength:0,centralOffset:0,comment:``,finish:!1,finished:!1,processing:!1,forceZip64:e.forceZip64,forceLocalTime:e.forceLocalTime}};r(u,s),u.prototype._afterAppend=function(e){this._entries.push(e),e.getGeneralPurposeBit().usesDataDescriptor()&&this._writeDataDescriptor(e),this._archive.processing=!1,this._entry=null,this._archive.finish&&!this._archive.finished&&this._finish()},u.prototype._appendBuffer=function(e,t,n){t.length===0&&e.setMethod(c.METHOD_STORED);var r=e.getMethod();if(r===c.METHOD_STORED&&(e.setSize(t.length),e.setCompressedSize(t.length),e.setCrc(i.buf(t)>>>0)),this._writeLocalFileHeader(e),r===c.METHOD_STORED){this.write(t),this._afterAppend(e),n(null,e);return}else if(r===c.METHOD_DEFLATED){this._smartStream(e,n).end(t);return}else{n(Error(`compression method `+r+` not implemented`));return}},u.prototype._appendStream=function(e,t,n){e.getGeneralPurposeBit().useDataDescriptor(!0),e.setVersionNeededToExtract(c.MIN_VERSION_DATA_DESCRIPTOR),this._writeLocalFileHeader(e);var r=this._smartStream(e,n);t.once(`error`,function(e){r.emit(`error`,e),r.end()}),t.pipe(r)},u.prototype._defaults=function(e){return typeof e!=`object`&&(e={}),typeof e.zlib!=`object`&&(e.zlib={}),typeof e.zlib.level!=`number`&&(e.zlib.level=c.ZLIB_BEST_SPEED),e.forceZip64=!!e.forceZip64,e.forceLocalTime=!!e.forceLocalTime,e},u.prototype._finish=function(){this._archive.centralOffset=this.offset,this._entries.forEach(function(e){this._writeCentralFileHeader(e)}.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()},u.prototype._normalizeEntry=function(e){e.getMethod()===-1&&e.setMethod(c.METHOD_DEFLATED),e.getMethod()===c.METHOD_DEFLATED&&(e.getGeneralPurposeBit().useDataDescriptor(!0),e.setVersionNeededToExtract(c.MIN_VERSION_DATA_DESCRIPTOR)),e.getTime()===-1&&e.setTime(new Date,this._archive.forceLocalTime),e._offsets={file:0,data:0,contents:0}},u.prototype._smartStream=function(e,t){var n=e.getMethod()===c.METHOD_DEFLATED?new o(this.options.zlib):new a,r=null;function i(){var i=n.digest().readUInt32BE(0);e.setCrc(i),e.setSize(n.size()),e.setCompressedSize(n.size(!0)),this._afterAppend(e),t(r,e)}return n.once(`end`,i.bind(this)),n.once(`error`,function(e){r=e}),n.pipe(this,{end:!1}),n},u.prototype._writeCentralDirectoryEnd=function(){var e=this._entries.length,t=this._archive.centralLength,n=this._archive.centralOffset;this.isZip64()&&(e=c.ZIP64_MAGIC_SHORT,t=c.ZIP64_MAGIC,n=c.ZIP64_MAGIC),this.write(l.getLongBytes(c.SIG_EOCD)),this.write(c.SHORT_ZERO),this.write(c.SHORT_ZERO),this.write(l.getShortBytes(e)),this.write(l.getShortBytes(e)),this.write(l.getLongBytes(t)),this.write(l.getLongBytes(n));var r=this.getComment(),i=Buffer.byteLength(r);this.write(l.getShortBytes(i)),this.write(r)},u.prototype._writeCentralDirectoryZip64=function(){this.write(l.getLongBytes(c.SIG_ZIP64_EOCD)),this.write(l.getEightBytes(44)),this.write(l.getShortBytes(c.MIN_VERSION_ZIP64)),this.write(l.getShortBytes(c.MIN_VERSION_ZIP64)),this.write(c.LONG_ZERO),this.write(c.LONG_ZERO),this.write(l.getEightBytes(this._entries.length)),this.write(l.getEightBytes(this._entries.length)),this.write(l.getEightBytes(this._archive.centralLength)),this.write(l.getEightBytes(this._archive.centralOffset)),this.write(l.getLongBytes(c.SIG_ZIP64_EOCD_LOC)),this.write(c.LONG_ZERO),this.write(l.getEightBytes(this._archive.centralOffset+this._archive.centralLength)),this.write(l.getLongBytes(1))},u.prototype._writeCentralFileHeader=function(e){var t=e.getGeneralPurposeBit(),n=e.getMethod(),r=e._offsets.file,i=e.getSize(),a=e.getCompressedSize();if(e.isZip64()||r>c.ZIP64_MAGIC){i=c.ZIP64_MAGIC,a=c.ZIP64_MAGIC,r=c.ZIP64_MAGIC,e.setVersionNeededToExtract(c.MIN_VERSION_ZIP64);var o=Buffer.concat([l.getShortBytes(c.ZIP64_EXTRA_ID),l.getShortBytes(24),l.getEightBytes(e.getSize()),l.getEightBytes(e.getCompressedSize()),l.getEightBytes(e._offsets.file)],28);e.setExtra(o)}this.write(l.getLongBytes(c.SIG_CFH)),this.write(l.getShortBytes(e.getPlatform()<<8|c.VERSION_MADEBY)),this.write(l.getShortBytes(e.getVersionNeededToExtract())),this.write(t.encode()),this.write(l.getShortBytes(n)),this.write(l.getLongBytes(e.getTimeDos())),this.write(l.getLongBytes(e.getCrc())),this.write(l.getLongBytes(a)),this.write(l.getLongBytes(i));var s=e.getName(),u=e.getComment(),d=e.getCentralDirectoryExtra();t.usesUTF8ForNames()&&(s=Buffer.from(s),u=Buffer.from(u)),this.write(l.getShortBytes(s.length)),this.write(l.getShortBytes(d.length)),this.write(l.getShortBytes(u.length)),this.write(c.SHORT_ZERO),this.write(l.getShortBytes(e.getInternalAttributes())),this.write(l.getLongBytes(e.getExternalAttributes())),this.write(l.getLongBytes(r)),this.write(s),this.write(d),this.write(u)},u.prototype._writeDataDescriptor=function(e){this.write(l.getLongBytes(c.SIG_DD)),this.write(l.getLongBytes(e.getCrc())),e.isZip64()?(this.write(l.getEightBytes(e.getCompressedSize())),this.write(l.getEightBytes(e.getSize()))):(this.write(l.getLongBytes(e.getCompressedSize())),this.write(l.getLongBytes(e.getSize())))},u.prototype._writeLocalFileHeader=function(e){var t=e.getGeneralPurposeBit(),n=e.getMethod(),r=e.getName(),i=e.getLocalFileDataExtra();e.isZip64()&&(t.useDataDescriptor(!0),e.setVersionNeededToExtract(c.MIN_VERSION_ZIP64)),t.usesUTF8ForNames()&&(r=Buffer.from(r)),e._offsets.file=this.offset,this.write(l.getLongBytes(c.SIG_LFH)),this.write(l.getShortBytes(e.getVersionNeededToExtract())),this.write(t.encode()),this.write(l.getShortBytes(n)),this.write(l.getLongBytes(e.getTimeDos())),e._offsets.data=this.offset,t.usesDataDescriptor()?(this.write(c.LONG_ZERO),this.write(c.LONG_ZERO),this.write(c.LONG_ZERO)):(this.write(l.getLongBytes(e.getCrc())),this.write(l.getLongBytes(e.getCompressedSize())),this.write(l.getLongBytes(e.getSize()))),this.write(l.getShortBytes(r.length)),this.write(l.getShortBytes(i.length)),this.write(r),this.write(i),e._offsets.contents=this.offset},u.prototype.getComment=function(e){return this._archive.comment===null?``:this._archive.comment},u.prototype.isZip64=function(){return this._archive.forceZip64||this._entries.length>c.ZIP64_MAGIC_SHORT||this._archive.centralLength>c.ZIP64_MAGIC||this._archive.centralOffset>c.ZIP64_MAGIC},u.prototype.setComment=function(e){this._archive.comment=e}})),Mn=t(((e,t)=>{t.exports={ArchiveEntry:yn(),ZipArchiveEntry:wn(),ArchiveOutputStream:En(),ZipArchiveOutputStream:jn()}})),Nn=t(((e,t)=>{
|
|
36
|
+
/**
|
|
37
|
+
* ZipStream
|
|
38
|
+
*
|
|
39
|
+
* @ignore
|
|
40
|
+
* @license [MIT]{@link https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE}
|
|
41
|
+
* @copyright (c) 2014 Chris Talkington, contributors.
|
|
42
|
+
*/
|
|
43
|
+
var r=n(`util`).inherits,i=Mn().ZipArchiveOutputStream,a=Mn().ZipArchiveEntry,o=gn(),s=t.exports=function(e){if(!(this instanceof s))return new s(e);e=this.options=e||{},e.zlib=e.zlib||{},i.call(this,e),typeof e.level==`number`&&e.level>=0&&(e.zlib.level=e.level,delete e.level),!e.forceZip64&&typeof e.zlib.level==`number`&&e.zlib.level===0&&(e.store=!0),e.namePrependSlash=e.namePrependSlash||!1,e.comment&&e.comment.length>0&&this.setComment(e.comment)};r(s,i),s.prototype._normalizeFileData=function(e){e=o.defaults(e,{type:`file`,name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:``});var t=e.type===`directory`,n=e.type===`symlink`;return e.name&&(e.name=o.sanitizePath(e.name),!n&&e.name.slice(-1)===`/`?(t=!0,e.type=`directory`):t&&(e.name+=`/`)),(t||n)&&(e.store=!0),e.date=o.dateify(e.date),e},s.prototype.entry=function(e,t,n){if(typeof n!=`function`&&(n=this._emitErrorCallback.bind(this)),t=this._normalizeFileData(t),t.type!==`file`&&t.type!==`directory`&&t.type!==`symlink`){n(Error(t.type+` entries not currently supported`));return}if(typeof t.name!=`string`||t.name.length===0){n(Error(`entry name must be a non-empty string value`));return}if(t.type===`symlink`&&typeof t.linkname!=`string`){n(Error(`entry linkname must be a non-empty string value when type equals symlink`));return}var r=new a(t.name);return r.setTime(t.date,this.options.forceLocalTime),t.namePrependSlash&&r.setName(t.name,!0),t.store&&r.setMethod(0),t.comment.length>0&&r.setComment(t.comment),t.type===`symlink`&&typeof t.mode!=`number`&&(t.mode=40960),typeof t.mode==`number`&&(t.type===`symlink`&&(t.mode|=40960),r.setUnixMode(t.mode)),t.type===`symlink`&&typeof t.linkname==`string`&&(e=Buffer.from(t.linkname)),i.prototype.entry.call(this,r,e,n)},s.prototype.finalize=function(){this.finish()}})),Pn=t(((e,t)=>{
|
|
44
|
+
/**
|
|
45
|
+
* ZIP Format Plugin
|
|
46
|
+
*
|
|
47
|
+
* @module plugins/zip
|
|
48
|
+
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
49
|
+
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
50
|
+
*/
|
|
51
|
+
var n=Nn(),r=gn(),i=function(e){if(!(this instanceof i))return new i(e);e=this.options=r.defaults(e,{comment:``,forceUTC:!1,namePrependSlash:!1,store:!1}),this.supports={directory:!0,symlink:!0},this.engine=new n(e)};i.prototype.append=function(e,t,n){this.engine.entry(e,t,n)},i.prototype.finalize=function(){this.engine.finalize()},i.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)},i.prototype.pipe=function(){return this.engine.pipe.apply(this.engine,arguments)},i.prototype.unpipe=function(){return this.engine.unpipe.apply(this.engine,arguments)},t.exports=i})),Fn=t(((e,t)=>{t.exports=n(`events`)})),In=t(((e,t)=>{t.exports=class{constructor(e){if(!(e>0)||e-1&e)throw Error(`Max size for a FixedFIFO should be a power of two`);this.buffer=Array(e),this.mask=e-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(e){return this.buffer[this.top]===void 0?(this.buffer[this.top]=e,this.top=this.top+1&this.mask,!0):!1}shift(){let e=this.buffer[this.btm];if(e!==void 0)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,e}peek(){return this.buffer[this.btm]}isEmpty(){return this.buffer[this.btm]===void 0}}})),Ln=t(((e,t)=>{let n=In();t.exports=class{constructor(e){this.hwm=e||16,this.head=new n(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)){let t=this.head;this.head=t.next=new n(2*this.head.buffer.length),this.head.push(e)}}shift(){this.length!==0&&this.length--;let e=this.tail.shift();if(e===void 0&&this.tail.next){let e=this.tail.next;return this.tail.next=null,this.tail=e,this.tail.shift()}return e}peek(){let e=this.tail.peek();return e===void 0&&this.tail.next?this.tail.next.peek():e}isEmpty(){return this.length===0}}})),Rn=t(((e,t)=>{function n(e){return Buffer.isBuffer(e)||e instanceof Uint8Array}function r(e){return Buffer.isEncoding(e)}function i(e,t,n){return Buffer.alloc(e,t,n)}function a(e){return Buffer.allocUnsafe(e)}function o(e){return Buffer.allocUnsafeSlow(e)}function s(e,t){return Buffer.byteLength(e,t)}function c(e,t){return Buffer.compare(e,t)}function l(e,t){return Buffer.concat(e,t)}function u(e,t,n,r,i){return x(e).copy(t,n,r,i)}function d(e,t){return x(e).equals(t)}function f(e,t,n,r,i){return x(e).fill(t,n,r,i)}function p(e,t,n){return Buffer.from(e,t,n)}function m(e,t,n,r){return x(e).includes(t,n,r)}function h(e,t,n,r){return x(e).indexOf(t,n,r)}function g(e,t,n,r){return x(e).lastIndexOf(t,n,r)}function v(e){return x(e).swap16()}function y(e){return x(e).swap32()}function b(e){return x(e).swap64()}function x(e){return Buffer.isBuffer(e)?e:Buffer.from(e.buffer,e.byteOffset,e.byteLength)}function S(e,t,n,r){return x(e).toString(t,n,r)}function C(e,t,n,r,i){return x(e).write(t,n,r,i)}function w(e,t){return x(e).readDoubleBE(t)}function T(e,t){return x(e).readDoubleLE(t)}function E(e,t){return x(e).readFloatBE(t)}function D(e,t){return x(e).readFloatLE(t)}function O(e,t){return x(e).readInt32BE(t)}function k(e,t){return x(e).readInt32LE(t)}function A(e,t){return x(e).readUInt32BE(t)}function j(e,t){return x(e).readUInt32LE(t)}function M(e,t,n){return x(e).writeDoubleBE(t,n)}function N(e,t,n){return x(e).writeDoubleLE(t,n)}function P(e,t,n){return x(e).writeFloatBE(t,n)}function F(e,t,n){return x(e).writeFloatLE(t,n)}function I(e,t,n){return x(e).writeInt32BE(t,n)}function L(e,t,n){return x(e).writeInt32LE(t,n)}function R(e,t,n){return x(e).writeUInt32BE(t,n)}function z(e,t,n){return x(e).writeUInt32LE(t,n)}t.exports={isBuffer:n,isEncoding:r,alloc:i,allocUnsafe:a,allocUnsafeSlow:o,byteLength:s,compare:c,concat:l,copy:u,equals:d,fill:f,from:p,includes:m,indexOf:h,lastIndexOf:g,swap16:v,swap32:y,swap64:b,toBuffer:x,toString:S,write:C,readDoubleBE:w,readDoubleLE:T,readFloatBE:E,readFloatLE:D,readInt32BE:O,readInt32LE:k,readUInt32BE:A,readUInt32LE:j,writeDoubleBE:M,writeDoubleLE:N,writeFloatBE:P,writeFloatLE:F,writeInt32BE:I,writeInt32LE:L,writeUInt32BE:R,writeUInt32LE:z}})),zn=t(((e,t)=>{let n=Rn();t.exports=class{constructor(e){this.encoding=e}get remaining(){return 0}decode(e){return n.toString(e,this.encoding)}flush(){return``}}})),Bn=t(((e,t)=>{let n=Rn();t.exports=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(this.bytesNeeded===0){let t=!0;for(let n=Math.max(0,e.byteLength-4),r=e.byteLength;n<r&&t;n++)t=e[n]<=127;if(t)return n.toString(e,`utf8`)}let t=``;for(let n=0,r=e.byteLength;n<r;n++){let r=e[n];if(this.bytesNeeded===0){r<=127?t+=String.fromCharCode(r):(this.bytesSeen=1,r>=194&&r<=223?(this.bytesNeeded=2,this.codePoint=r&31):r>=224&&r<=239?(r===224?this.lowerBoundary=160:r===237&&(this.upperBoundary=159),this.bytesNeeded=3,this.codePoint=r&15):r>=240&&r<=244?(r===240&&(this.lowerBoundary=144),r===244&&(this.upperBoundary=143),this.bytesNeeded=4,this.codePoint=r&7):t+=`�`);continue}if(r<this.lowerBoundary||r>this.upperBoundary){this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0,this.lowerBoundary=128,this.upperBoundary=191,t+=`�`;continue}this.lowerBoundary=128,this.upperBoundary=191,this.codePoint=this.codePoint<<6|r&63,this.bytesSeen++,this.bytesSeen===this.bytesNeeded&&(t+=String.fromCodePoint(this.codePoint),this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0)}return t}flush(){let e=this.bytesNeeded>0?`�`:``;return this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0,this.lowerBoundary=128,this.upperBoundary=191,e}}})),Vn=t(((e,t)=>{let n=zn(),r=Bn();t.exports=class{constructor(e=`utf8`){switch(this.encoding=i(e),this.encoding){case`utf8`:this.decoder=new r;break;case`utf16le`:case`base64`:throw Error(`Unsupported encoding: `+this.encoding);default:this.decoder=new n(this.encoding)}}get remaining(){return this.decoder.remaining}push(e){return typeof e==`string`?e:this.decoder.decode(e)}write(e){return this.push(e)}end(e){let t=``;return e&&(t=this.push(e)),t+=this.decoder.flush(),t}};function i(e){switch(e=e.toLowerCase(),e){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 e;default:throw Error(`Unknown encoding: `+e)}}})),Hn=t(((e,t)=>{let{EventEmitter:n}=Fn(),r=Error(`Stream was destroyed`),i=Error(`Premature close`),a=Ln(),o=Vn(),s=typeof queueMicrotask>`u`?e=>global.process.nextTick(e):queueMicrotask,c=(1<<29)-1,l=c^1;c^2;let u=1024,d=2048,f=4096,p=8192,m=16384,h=32768,g=65536,v=131072;16|g,f|128;let y=256|v;c^16,c^64,c^(64|g);let b=c^g;c^256,c^(128|p),c^u;let x=c^768,S=c^h;c^32;let C=c^v;c^y;let w=1<<18,T=2<<18,E=4<<18,D=8<<18,O=16<<18,k=32<<18,A=64<<18,j=128<<18,M=256<<18,N=512<<18,P=1024<<18;c^(w|M);let F=c^E;c^(w|N),c^O,c^D;let I=c^j;c^T;let L=c^P,R=16|w,z=c^R,B=m|k,V=14|B;F&536870847;let H=j|h,U=15|H&z;u|16399;let W=m|143;u|143,u|16398,h|1,N|8388623,D|O,D|w;let G=270794767;E|w,w|M,k|134217742;let K=Symbol.asyncIterator||Symbol(`asyncIterator`);var ee=class{constructor(e,{highWaterMark:t=16384,map:n=null,mapWritable:r,byteLength:i,byteLengthWritable:o}={}){this.stream=e,this.queue=new a,this.highWaterMark=t,this.buffered=0,this.error=null,this.pipeline=null,this.drains=null,this.byteLength=o||i||Z,this.map=r||n,this.afterWrite=ae.bind(this),this.afterUpdateNextTick=ce.bind(this)}get ended(){return(this.stream._duplexState&k)!==0}push(e){return this.stream._duplexState&142606350?!1:(this.map!==null&&(e=this.map(e)),this.buffered+=this.byteLength(e),this.queue.push(e),this.buffered<this.highWaterMark?(this.stream._duplexState|=D,!0):(this.stream._duplexState|=6291456,!1))}shift(){let e=this.queue.shift();return this.buffered-=this.byteLength(e),this.buffered===0&&(this.stream._duplexState&=534773759),e}end(e){typeof e==`function`?this.stream.once(`finish`,e):e!=null&&this.push(e),this.stream._duplexState=(this.stream._duplexState|N)&F}autoBatch(e,t){let n=[],r=this.stream;for(n.push(e);(r._duplexState&G)===2359296;)n.push(r._writableState.shift());if(r._duplexState&15)return t(null);r._writev(n,t)}update(){let e=this.stream;e._duplexState|=T;do{for(;(e._duplexState&G)===D;){let t=this.shift();e._duplexState|=67371008,e._write(t,this.afterWrite)}e._duplexState&1310720||this.updateNonPrimary()}while(this.continueUpdate()===!0);e._duplexState&=536346623}updateNonPrimary(){let e=this.stream;if((e._duplexState&144965647)===N){e._duplexState|=w,e._final(J.bind(this));return}if((e._duplexState&14)==4){(e._duplexState&H)===0&&(e._duplexState|=R,e._destroy(ie.bind(this)));return}(e._duplexState&U)===1&&(e._duplexState=(e._duplexState|R)&l,e._open(ue.bind(this)))}continueUpdate(){return(this.stream._duplexState&j)===0?!1:(this.stream._duplexState&=I,!0)}updateCallback(){(this.stream._duplexState&35127311)===E?this.update():this.updateNextTick()}updateNextTick(){(this.stream._duplexState&j)===0&&(this.stream._duplexState|=j,(this.stream._duplexState&T)===0&&s(this.afterUpdateNextTick))}},q=class{constructor(e,{highWaterMark:t=16384,map:n=null,mapReadable:r,byteLength:i,byteLengthReadable:o}={}){this.stream=e,this.queue=new a,this.highWaterMark=t===0?1:t,this.buffered=0,this.readAhead=t>0,this.error=null,this.pipeline=null,this.byteLength=o||i||Z,this.map=r||n,this.pipeTo=null,this.afterRead=oe.bind(this),this.afterUpdateNextTick=se.bind(this)}get ended(){return(this.stream._duplexState&m)!==0}pipe(e,t){if(this.pipeTo!==null)throw Error(`Can only pipe to one destination`);if(typeof t!=`function`&&(t=null),this.stream._duplexState|=512,this.pipeTo=e,this.pipeline=new ne(this.stream,e,t),t&&this.stream.on(`error`,ke),X(e))e._writableState.pipeline=this.pipeline,t&&e.on(`error`,ke),e.on(`finish`,this.pipeline.finished.bind(this.pipeline));else{let t=this.pipeline.done.bind(this.pipeline,e),n=this.pipeline.done.bind(this.pipeline,e,null);e.on(`error`,t),e.on(`close`,n),e.on(`finish`,this.pipeline.finished.bind(this.pipeline))}e.on(`drain`,re.bind(this)),this.stream.emit(`piping`,e),e.emit(`pipe`,this.stream)}push(e){let t=this.stream;return e===null?(this.highWaterMark=0,t._duplexState=(t._duplexState|u)&536805311,!1):this.map!==null&&(e=this.map(e),e===null)?(t._duplexState&=b,this.buffered<this.highWaterMark):(this.buffered+=this.byteLength(e),this.queue.push(e),t._duplexState=(t._duplexState|128)&b,this.buffered<this.highWaterMark)}shift(){let e=this.queue.shift();return this.buffered-=this.byteLength(e),this.buffered===0&&(this.stream._duplexState&=536862591),e}unshift(e){let t=[this.map===null?e:this.map(e)];for(;this.buffered>0;)t.push(this.shift());for(let e=0;e<t.length-1;e++){let n=t[e];this.buffered+=this.byteLength(n),this.queue.push(n)}this.push(t[t.length-1])}read(){let e=this.stream;if((e._duplexState&W)===128){let t=this.shift();return this.pipeTo!==null&&this.pipeTo.write(t)===!1&&(e._duplexState&=x),(e._duplexState&d)!==0&&e.emit(`data`,t),t}return this.readAhead===!1&&(e._duplexState|=v,this.updateNextTick()),null}drain(){let e=this.stream;for(;(e._duplexState&W)===128&&e._duplexState&768;){let t=this.shift();this.pipeTo!==null&&this.pipeTo.write(t)===!1&&(e._duplexState&=x),(e._duplexState&d)!==0&&e.emit(`data`,t)}}update(){let e=this.stream;e._duplexState|=32;do{for(this.drain();this.buffered<this.highWaterMark&&(e._duplexState&214047)===v;)e._duplexState|=65552,e._read(this.afterRead),this.drain();(e._duplexState&12431)==4224&&(e._duplexState|=p,e.emit(`readable`)),e._duplexState&80||this.updateNonPrimary()}while(this.continueUpdate()===!0);e._duplexState&=536870879}updateNonPrimary(){let e=this.stream;if((e._duplexState&1167)===u&&(e._duplexState=(e._duplexState|m)&536869887,e.emit(`end`),(e._duplexState&V)===B&&(e._duplexState|=4),this.pipeTo!==null&&this.pipeTo.end()),(e._duplexState&14)==4){(e._duplexState&H)===0&&(e._duplexState|=R,e._destroy(ie.bind(this)));return}(e._duplexState&U)===1&&(e._duplexState=(e._duplexState|R)&l,e._open(ue.bind(this)))}continueUpdate(){return(this.stream._duplexState&h)===0?!1:(this.stream._duplexState&=S,!0)}updateCallback(){(this.stream._duplexState&32879)==64?this.update():this.updateNextTick()}updateNextTickIfOpen(){this.stream._duplexState&32769||(this.stream._duplexState|=h,this.stream._duplexState&32||s(this.afterUpdateNextTick))}updateNextTick(){(this.stream._duplexState&h)===0&&(this.stream._duplexState|=h,this.stream._duplexState&32||s(this.afterUpdateNextTick))}},te=class{constructor(e){this.data=null,this.afterTransform=de.bind(e),this.afterFinal=null}},ne=class{constructor(e,t,n){this.from=e,this.to=t,this.afterPipe=n,this.error=null,this.pipeToFinished=!1}finished(){this.pipeToFinished=!0}done(e,t){if(t&&(this.error=t),e===this.to&&(this.to=null,this.from!==null)){((this.from._duplexState&m)===0||!this.pipeToFinished)&&this.from.destroy(this.error||Error(`Writable stream closed prematurely`));return}if(e===this.from&&(this.from=null,this.to!==null)){(e._duplexState&m)===0&&this.to.destroy(this.error||Error(`Readable stream closed before ending`));return}this.afterPipe!==null&&this.afterPipe(this.error),this.to=this.from=this.afterPipe=null}};function re(){this.stream._duplexState|=512,this.updateCallback()}function J(e){let t=this.stream;e&&t.destroy(e),t._duplexState&14||(t._duplexState|=k,t.emit(`finish`)),(t._duplexState&V)===B&&(t._duplexState|=4),t._duplexState&=402391039,(t._duplexState&T)===0?this.update():this.updateNextTick()}function ie(e){let t=this.stream;!e&&this.error!==r&&(e=this.error),e&&t.emit(`error`,e),t._duplexState|=8,t.emit(`close`);let n=t._readableState,i=t._writableState;if(n!==null&&n.pipeline!==null&&n.pipeline.done(t,e),i!==null){for(;i.drains!==null&&i.drains.length>0;)i.drains.shift().resolve(!1);i.pipeline!==null&&i.pipeline.done(t,e)}}function ae(e){let t=this.stream;e&&t.destroy(e),t._duplexState&=469499903,this.drains!==null&&le(this.drains),(t._duplexState&6553615)===O&&(t._duplexState&=532676607,(t._duplexState&A)===A&&t.emit(`drain`)),this.updateCallback()}function oe(e){e&&this.stream.destroy(e),this.stream._duplexState&=536870895,this.readAhead===!1&&!(this.stream._duplexState&256)&&(this.stream._duplexState&=C),this.updateCallback()}function se(){this.stream._duplexState&32||(this.stream._duplexState&=S,this.update())}function ce(){(this.stream._duplexState&T)===0&&(this.stream._duplexState&=I,this.update())}function le(e){for(let t=0;t<e.length;t++)--e[t].writes===0&&(e.shift().resolve(!0),t--)}function ue(e){let t=this.stream;e&&t.destroy(e),t._duplexState&4||(t._duplexState&17423||(t._duplexState|=64),t._duplexState&142606351||(t._duplexState|=E),t.emit(`open`)),t._duplexState&=z,t._writableState!==null&&t._writableState.updateCallback(),t._readableState!==null&&t._readableState.updateCallback()}function de(e,t){t!=null&&this.push(t),this._writableState.afterWrite(e)}function Y(e){this._readableState!==null&&(e===`data`&&(this._duplexState|=d|y,this._readableState.updateNextTick()),e===`readable`&&(this._duplexState|=f,this._readableState.updateNextTick())),this._writableState!==null&&e===`drain`&&(this._duplexState|=A,this._writableState.updateNextTick())}var fe=class extends n{constructor(e){super(),this._duplexState=0,this._readableState=null,this._writableState=null,e&&(e.open&&(this._open=e.open),e.destroy&&(this._destroy=e.destroy),e.predestroy&&(this._predestroy=e.predestroy),e.signal&&e.signal.addEventListener(`abort`,Q.bind(this))),this.on(`newListener`,Y)}_open(e){e(null)}_destroy(e){e(null)}_predestroy(){}get readable(){return this._readableState===null?void 0:!0}get writable(){return this._writableState===null?void 0:!0}get destroyed(){return(this._duplexState&8)!=0}get destroying(){return(this._duplexState&14)!=0}destroy(e){this._duplexState&14||(e||=r,this._duplexState=(this._duplexState|4)&535822271,this._readableState!==null&&(this._readableState.highWaterMark=0,this._readableState.error=e),this._writableState!==null&&(this._writableState.highWaterMark=0,this._writableState.error=e),this._duplexState|=2,this._predestroy(),this._duplexState&=536870909,this._readableState!==null&&this._readableState.updateNextTick(),this._writableState!==null&&this._writableState.updateNextTick())}},pe=class e extends fe{constructor(e){super(e),this._duplexState|=k|131073,this._readableState=new q(this,e),e&&(this._readableState.readAhead===!1&&(this._duplexState&=C),e.read&&(this._read=e.read),e.eagerOpen&&this._readableState.updateNextTick(),e.encoding&&this.setEncoding(e.encoding))}setEncoding(e){let t=new o(e),n=this._readableState.map||xe;return this._readableState.map=r,this;function r(e){let r=t.push(e);return r===``&&(e.byteLength!==0||t.remaining>0)?null:n(r)}}_read(e){e(null)}pipe(e,t){return this._readableState.updateNextTick(),this._readableState.pipe(e,t),e}read(){return this._readableState.updateNextTick(),this._readableState.read()}push(e){return this._readableState.updateNextTickIfOpen(),this._readableState.push(e)}unshift(e){return this._readableState.updateNextTickIfOpen(),this._readableState.unshift(e)}resume(){return this._duplexState|=y,this._readableState.updateNextTick(),this}pause(){return this._duplexState&=this._readableState.readAhead===!1?536739583:536870655,this}static _fromAsyncIterator(t,n){let r,i=new e({...n,read(e){t.next().then(a).then(e.bind(null,null)).catch(e)},predestroy(){r=t.return()},destroy(e){if(!r)return e(null);r.then(e.bind(null,null)).catch(e)}});return i;function a(e){e.done?i.push(null):i.push(e.value)}}static from(t,n){if(Ee(t))return t;if(t[K])return this._fromAsyncIterator(t[K](),n);Array.isArray(t)||(t=t===void 0?[]:[t]);let r=0;return new e({...n,read(e){this.push(r===t.length?null:t[r++]),e(null)}})}static isBackpressured(e){return(e._duplexState&17422)!=0||e._readableState.buffered>=e._readableState.highWaterMark}static isPaused(e){return(e._duplexState&256)==0}[K](){let e=this,t=null,n=null,i=null;return this.on(`error`,e=>{t=e}),this.on(`readable`,a),this.on(`close`,o),{[K](){return this},next(){return new Promise(function(t,r){n=t,i=r;let a=e.read();a===null?e._duplexState&8&&s(null):s(a)})},return(){return c(null)},throw(e){return c(e)}};function a(){n!==null&&s(e.read())}function o(){n!==null&&s(null)}function s(a){i!==null&&(t?i(t):a===null&&(e._duplexState&m)===0?i(r):n({value:a,done:a===null}),i=n=null)}function c(t){return e.destroy(t),new Promise((n,r)=>{if(e._duplexState&8)return n({value:void 0,done:!0});e.once(`close`,function(){t?r(t):n({value:void 0,done:!0})})})}}},me=class extends fe{constructor(e){super(e),this._duplexState|=1|m,this._writableState=new ee(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final),e.eagerOpen&&this._writableState.updateNextTick())}cork(){this._duplexState|=P}uncork(){this._duplexState&=L,this._writableState.updateNextTick()}_writev(e,t){t(null)}_write(e,t){this._writableState.autoBatch(e,t)}_final(e){e(null)}static isBackpressured(e){return(e._duplexState&146800654)!=0}static drained(e){if(e.destroyed)return Promise.resolve(!1);let t=e._writableState,n=(Ae(e)?Math.min(1,t.queue.length):t.queue.length)+(e._duplexState&M?1:0);return n===0?Promise.resolve(!0):(t.drains===null&&(t.drains=[]),new Promise(e=>{t.drains.push({writes:n,resolve:e})}))}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},he=class extends pe{constructor(e){super(e),this._duplexState=1|this._duplexState&v,this._writableState=new ee(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final))}cork(){this._duplexState|=P}uncork(){this._duplexState&=L,this._writableState.updateNextTick()}_writev(e,t){t(null)}_write(e,t){this._writableState.autoBatch(e,t)}_final(e){e(null)}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},ge=class extends he{constructor(e){super(e),this._transformState=new te(this),e&&(e.transform&&(this._transform=e.transform),e.flush&&(this._flush=e.flush))}_write(e,t){this._readableState.buffered>=this._readableState.highWaterMark?this._transformState.data=e:this._transform(e,this._transformState.afterTransform)}_read(e){if(this._transformState.data!==null){let t=this._transformState.data;this._transformState.data=null,e(null),this._transform(t,this._transformState.afterTransform)}else e(null)}destroy(e){super.destroy(e),this._transformState.data!==null&&(this._transformState.data=null,this._transformState.afterTransform())}_transform(e,t){t(null,e)}_flush(e){e(null)}_final(e){this._transformState.afterFinal=e,this._flush(ve.bind(this))}},_e=class extends ge{};function ve(e,t){let n=this._transformState.afterFinal;if(e)return n(e);t!=null&&this.push(t),this.push(null),n(null)}function ye(...e){return new Promise((t,n)=>be(...e,e=>{if(e)return n(e);t()}))}function be(e,...t){let n=Array.isArray(e)?[...e,...t]:[e,...t],r=n.length&&typeof n[n.length-1]==`function`?n.pop():null;if(n.length<2)throw Error(`Pipeline requires at least 2 streams`);let a=n[0],o=null,s=null;for(let e=1;e<n.length;e++)o=n[e],X(a)?a.pipe(o,l):(c(a,!0,e>1,l),a.pipe(o)),a=o;if(r){let e=!1,t=X(o)||!!(o._writableState&&o._writableState.autoDestroy);o.on(`error`,e=>{s===null&&(s=e)}),o.on(`finish`,()=>{e=!0,t||r(s)}),t&&o.on(`close`,()=>r(s||(e?null:i)))}return o;function c(e,t,n,r){e.on(`error`,r),e.on(`close`,a);function a(){if(t&&e._readableState&&!e._readableState.ended||n&&e._writableState&&!e._writableState.ended)return r(i)}}function l(e){if(!(!e||s)){s=e;for(let t of n)t.destroy(e)}}}function xe(e){return e}function Se(e){return!!e._readableState||!!e._writableState}function X(e){return typeof e._duplexState==`number`&&Se(e)}function Ce(e){return!!e._readableState&&e._readableState.ended}function we(e){return!!e._writableState&&e._writableState.ended}function Te(e,t={}){let n=e._readableState&&e._readableState.error||e._writableState&&e._writableState.error;return!t.all&&n===r?null:n}function Ee(e){return X(e)&&e.readable}function De(e){return(e._duplexState&1)!=1||(e._duplexState&H)!==0}function Oe(e){return typeof e==`object`&&!!e&&typeof e.byteLength==`number`}function Z(e){return Oe(e)?e.byteLength:1024}function ke(){}function Q(){this.destroy(Error(`Stream aborted.`))}function Ae(e){return e._writev!==me.prototype._writev&&e._writev!==he.prototype._writev}t.exports={pipeline:be,pipelinePromise:ye,isStream:Se,isStreamx:X,isEnded:Ce,isFinished:we,isDisturbed:De,getStreamError:Te,Stream:fe,Writable:me,Readable:pe,Duplex:he,Transform:ge,PassThrough:_e}})),Un=t((e=>{let t=Rn(),n=t.from([117,115,116,97,114,0]),r=t.from([48,48]),i=t.from([117,115,116,97,114,32]),a=t.from([32,0]);e.decodeLongPath=function(e,t){return y(e,0,e.length,t)},e.encodePax=function(e){let n=``;e.name&&(n+=b(` path=`+e.name+`
|
|
52
|
+
`)),e.linkname&&(n+=b(` linkpath=`+e.linkname+`
|
|
53
|
+
`));let r=e.pax;if(r)for(let e in r)n+=b(` `+e+`=`+r[e]+`
|
|
54
|
+
`);return t.from(n)},e.decodePax=function(e){let n={};for(;e.length;){let r=0;for(;r<e.length&&e[r]!==32;)r++;let i=parseInt(t.toString(e.subarray(0,r)),10);if(!i)return n;let a=t.toString(e.subarray(r+1,i-1)),o=a.indexOf(`=`);if(o===-1)return n;n[a.slice(0,o)]=a.slice(o+1),e=e.subarray(i)}return n},e.encode=function(e){let i=t.alloc(512),a=e.name,o=``;if(e.typeflag===5&&a[a.length-1]!==`/`&&(a+=`/`),t.byteLength(a)!==a.length)return null;for(;t.byteLength(a)>100;){let e=a.indexOf(`/`);if(e===-1)return null;o+=o?`/`+a.slice(0,e):a.slice(0,e),a=a.slice(e+1)}return t.byteLength(a)>100||t.byteLength(o)>155||e.linkname&&t.byteLength(e.linkname)>100?null:(t.write(i,a),t.write(i,p(e.mode&4095,6),100),t.write(i,p(e.uid,6),108),t.write(i,p(e.gid,6),116),h(e.size,i,124),t.write(i,p(e.mtime.getTime()/1e3|0,11),136),i[156]=48+u(e.type),e.linkname&&t.write(i,e.linkname,157),t.copy(n,i,257),t.copy(r,i,263),e.uname&&t.write(i,e.uname,265),e.gname&&t.write(i,e.gname,297),t.write(i,p(e.devmajor||0,6),329),t.write(i,p(e.devminor||0,6),337),o&&t.write(i,o,345),t.write(i,p(f(i),6),148),i)},e.decode=function(e,t,n){let r=e[156]===0?0:e[156]-48,i=y(e,0,100,t),a=v(e,100,8),c=v(e,108,8),u=v(e,116,8),d=v(e,124,12),p=v(e,136,12),m=l(r),h=e[157]===0?null:y(e,157,100,t),g=y(e,265,32),b=y(e,297,32),x=v(e,329,8),S=v(e,337,8),C=f(e);if(C===256)return null;if(C!==v(e,148,8))throw Error(`Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?`);if(o(e))e[345]&&(i=y(e,345,155,t)+`/`+i);else if(!s(e)&&!n)throw Error(`Invalid tar header: unknown format.`);return r===0&&i&&i[i.length-1]===`/`&&(r=5),{name:i,mode:a,uid:c,gid:u,size:d,mtime:new Date(1e3*p),type:m,linkname:h,uname:g,gname:b,devmajor:x,devminor:S,pax:null}};function o(e){return t.equals(n,e.subarray(257,263))}function s(e){return t.equals(i,e.subarray(257,263))&&t.equals(a,e.subarray(263,265))}function c(e,t,n){return typeof e==`number`?(e=~~e,e>=t?t:e>=0||(e+=t,e>=0)?e:0):n}function l(e){switch(e){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}function u(e){switch(e){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}function d(e,t,n,r){for(;n<r;n++)if(e[n]===t)return n;return r}function f(e){let t=256;for(let n=0;n<148;n++)t+=e[n];for(let n=156;n<512;n++)t+=e[n];return t}function p(e,t){return e=e.toString(8),e.length>t?`7777777777777777777`.slice(0,t)+` `:`0000000000000000000`.slice(0,t-e.length)+e+` `}function m(e,t,n){t[n]=128;for(let r=11;r>0;r--)t[n+r]=e&255,e=Math.floor(e/256)}function h(e,n,r){e.toString(8).length>11?m(e,n,r):t.write(n,p(e,11),r)}function g(e){let t;if(e[0]===128)t=!0;else if(e[0]===255)t=!1;else return null;let n=[],r;for(r=e.length-1;r>0;r--){let i=e[r];t?n.push(i):n.push(255-i)}let i=0,a=n.length;for(r=0;r<a;r++)i+=n[r]*256**r;return t?i:-1*i}function v(e,n,r){if(e=e.subarray(n,n+r),n=0,e[n]&128)return g(e);{for(;n<e.length&&e[n]===32;)n++;let r=c(d(e,32,n,e.length),e.length,e.length);for(;n<r&&e[n]===0;)n++;return r===n?0:parseInt(t.toString(e.subarray(n,r)),8)}}function y(e,n,r,i){return t.toString(e.subarray(n,d(e,0,n,n+r)),i)}function b(e){let n=t.byteLength(e),r=Math.floor(Math.log(n)/Math.log(10))+1;return n+r>=10**r&&r++,n+r+e}})),Wn=t(((e,t)=>{let{Writable:n,Readable:r,getStreamError:i}=Hn(),a=Ln(),o=Rn(),s=Un(),c=o.alloc(0);var l=class{constructor(){this.buffered=0,this.shifted=0,this.queue=new a,this._offset=0}push(e){this.buffered+=e.byteLength,this.queue.push(e)}shiftFirst(e){return this._buffered===0?null:this._next(e)}shift(e){if(e>this.buffered)return null;if(e===0)return c;let t=this._next(e);if(e===t.byteLength)return t;let n=[t];for(;(e-=t.byteLength)>0;)t=this._next(e),n.push(t);return o.concat(n)}_next(e){let t=this.queue.peek(),n=t.byteLength-this._offset;if(e>=n){let e=this._offset?t.subarray(this._offset,t.byteLength):t;return this.queue.shift(),this._offset=0,this.buffered-=n,this.shifted+=n,e}return this.buffered-=e,this.shifted+=e,t.subarray(this._offset,this._offset+=e)}},u=class extends r{constructor(e,t,n){super(),this.header=t,this.offset=n,this._parent=e}_read(e){this.header.size===0&&this.push(null),this._parent._stream===this&&this._parent._update(),e(null)}_predestroy(){this._parent.destroy(i(this))}_detach(){this._parent._stream===this&&(this._parent._stream=null,this._parent._missing=p(this.header.size),this._parent._update())}_destroy(e){this._detach(),e(null)}},d=class extends n{constructor(e){super(e),e||={},this._buffer=new l,this._offset=0,this._header=null,this._stream=null,this._missing=0,this._longHeader=!1,this._callback=f,this._locked=!1,this._finished=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null,this._filenameEncoding=e.filenameEncoding||`utf-8`,this._allowUnknownFormat=!!e.allowUnknownFormat,this._unlockBound=this._unlock.bind(this)}_unlock(e){if(this._locked=!1,e){this.destroy(e),this._continueWrite(e);return}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(e){return this._continueWrite(e),!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(),this._header.size===0||this._header.type===`directory`?(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,null),this._gnuLongLinkPath&&=(this._header.linkname=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,null)}_decodeLongHeader(e){switch(this._header.type){case`gnu-long-path`:this._gnuLongPath=s.decodeLongPath(e,this._filenameEncoding);break;case`gnu-long-link-path`:this._gnuLongLinkPath=s.decodeLongPath(e,this._filenameEncoding);break;case`pax-global-header`:this._paxGlobal=s.decodePax(e);break;case`pax-header`:this._pax=this._paxGlobal===null?s.decodePax(e):Object.assign({},this._paxGlobal,s.decodePax(e));break}}_consumeLongHeader(){this._longHeader=!1,this._missing=p(this._header.size);let e=this._buffer.shift(this._header.size);try{this._decodeLongHeader(e)}catch(e){return this._continueWrite(e),!1}return!0}_consumeStream(){let e=this._buffer.shiftFirst(this._missing);if(e===null)return!1;this._missing-=e.byteLength;let t=this._stream.push(e);return this._missing===0?(this._stream.push(null),t&&this._stream._detach(),t&&this._locked===!1):t}_createStream(){return new u(this,this._header,this._offset)}_update(){for(;this._buffer.buffered>0&&!this.destroying;){if(this._missing>0){if(this._stream!==null){if(this._consumeStream()===!1)return;continue}if(this._longHeader===!0){if(this._missing>this._buffer.buffered)break;if(this._consumeLongHeader()===!1)return!1;continue}let e=this._buffer.shiftFirst(this._missing);e!==null&&(this._missing-=e.byteLength);continue}if(this._buffer.buffered<512)break;if(this._stream!==null||this._consumeHeader()===!1)return}this._continueWrite(null)}_continueWrite(e){let t=this._callback;this._callback=f,t(e)}_write(e,t){this._callback=t,this._buffer.push(e),this._update()}_final(e){this._finished=this._missing===0&&this._buffer.buffered===0,e(this._finished?null:Error(`Unexpected end of data`))}_predestroy(){this._continueWrite(null)}_destroy(e){this._stream&&this._stream.destroy(i(this)),e(null)}[Symbol.asyncIterator](){let e=null,t=null,n=null,r=null,i=null,a=this;return this.on(`entry`,c),this.on(`error`,t=>{e=t}),this.on(`close`,l),{[Symbol.asyncIterator](){return this},next(){return new Promise(s)},return(){return u(null)},throw(e){return u(e)}};function o(e){if(!i)return;let t=i;i=null,t(e)}function s(i,s){if(e)return s(e);if(r){i({value:r,done:!1}),r=null;return}t=i,n=s,o(null),a._finished&&t&&(t({value:void 0,done:!0}),t=n=null)}function c(e,a,o){i=o,a.on(`error`,f),t?(t({value:a,done:!1}),t=n=null):r=a}function l(){o(e),t&&=(e?n(e):t({value:void 0,done:!0}),n=null)}function u(e){return a.destroy(e),o(e),new Promise((t,n)=>{if(a.destroyed)return t({value:void 0,done:!0});a.once(`close`,function(){e?n(e):t({value:void 0,done:!0})})})}}};t.exports=function(e){return new d(e)};function f(){}function p(e){return e&=511,e&&512-e}})),Gn=t(((e,t)=>{let r={S_IFMT:61440,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960};try{t.exports=n(`fs`).constants||r}catch{t.exports=r}})),Kn=t(((e,t)=>{let{Readable:n,Writable:r,getStreamError:i}=Hn(),a=Rn(),o=Gn(),s=Un(),c=a.alloc(1024);var l=class extends r{constructor(e,t,n){super({mapWritable:m,eagerOpen:!0}),this.written=0,this.header=t,this._callback=n,this._linkname=null,this._isLinkname=t.type===`symlink`&&!t.linkname,this._isVoid=t.type!==`file`&&t.type!==`contiguous-file`,this._finished=!1,this._pack=e,this._openCallback=null,this._pack._stream===null?this._pack._stream=this:this._pack._pending.push(this)}_open(e){this._openCallback=e,this._pack._stream===this&&this._continueOpen()}_continuePack(e){if(this._callback===null)return;let t=this._callback;this._callback=null,t(e)}_continueOpen(){this._pack._stream===null&&(this._pack._stream=this);let e=this._openCallback;if(this._openCallback=null,e!==null){if(this._pack.destroying)return e(Error(`pack stream destroyed`));if(this._pack._finalized)return e(Error(`pack stream is already finalized`));this._pack._stream=this,this._isLinkname||this._pack._encode(this.header),this._isVoid&&(this._finish(),this._continuePack(null)),e(null)}}_write(e,t){if(this._isLinkname)return this._linkname=this._linkname?a.concat([this._linkname,e]):e,t(null);if(this._isVoid)return e.byteLength>0?t(Error(`No body allowed for this entry`)):t();if(this.written+=e.byteLength,this._pack.push(e))return t();this._pack._drain=t}_finish(){this._finished||(this._finished=!0,this._isLinkname&&(this.header.linkname=this._linkname?a.toString(this._linkname,`utf-8`):``,this._pack._encode(this.header)),p(this._pack,this.header.size),this._pack._done(this))}_final(e){if(this.written!==this.header.size)return e(Error(`Size mismatch`));this._finish(),e(null)}_getError(){return i(this)||Error(`tar entry destroyed`)}_predestroy(){this._pack.destroy(this._getError())}_destroy(e){this._pack._done(this),this._continuePack(this._finished?null:this._getError()),e()}},u=class extends n{constructor(e){super(e),this._drain=f,this._finalized=!1,this._finalizing=!1,this._pending=[],this._stream=null}entry(e,t,n){if(this._finalized||this.destroying)throw Error(`already finalized or destroyed`);typeof t==`function`&&(n=t,t=null),n||=f,(!e.size||e.type===`symlink`)&&(e.size=0),e.type||=d(e.mode),e.mode||=e.type===`directory`?493:420,e.uid||=0,e.gid||=0,e.mtime||=new Date,typeof t==`string`&&(t=a.from(t));let r=new l(this,e,n);return a.isBuffer(t)?(e.size=t.byteLength,r.write(t),r.end(),r):(r._isVoid,r)}finalize(){if(this._stream||this._pending.length>0){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(c),this.push(null))}_done(e){e===this._stream&&(this._stream=null,this._finalizing&&this.finalize(),this._pending.length&&this._pending.shift()._continueOpen())}_encode(e){if(!e.pax){let t=s.encode(e);if(t){this.push(t);return}}this._encodePax(e)}_encodePax(e){let t=s.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),n={name:`PaxHeader`,mode:e.mode,uid:e.uid,gid:e.gid,size:t.byteLength,mtime:e.mtime,type:`pax-header`,linkname:e.linkname&&`PaxHeader`,uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(s.encode(n)),this.push(t),p(this,t.byteLength),n.size=e.size,n.type=e.type,this.push(s.encode(n))}_doDrain(){let e=this._drain;this._drain=f,e()}_predestroy(){let e=i(this);for(this._stream&&this._stream.destroy(e);this._pending.length;){let t=this._pending.shift();t.destroy(e),t._continueOpen()}this._doDrain()}_read(e){this._doDrain(),e()}};t.exports=function(e){return new u(e)};function d(e){switch(e&o.S_IFMT){case o.S_IFBLK:return`block-device`;case o.S_IFCHR:return`character-device`;case o.S_IFDIR:return`directory`;case o.S_IFIFO:return`fifo`;case o.S_IFLNK:return`symlink`}return`file`}function f(){}function p(e,t){t&=511,t&&e.push(c.subarray(0,512-t))}function m(e){return a.isBuffer(e)?e:a.from(e)}})),qn=t((e=>{e.extract=Wn(),e.pack=Kn()})),Jn=t(((e,t)=>{
|
|
55
|
+
/**
|
|
56
|
+
* TAR Format Plugin
|
|
57
|
+
*
|
|
58
|
+
* @module plugins/tar
|
|
59
|
+
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
60
|
+
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
61
|
+
*/
|
|
62
|
+
var r=n(`zlib`),i=qn(),a=gn(),o=function(e){if(!(this instanceof o))return new o(e);e=this.options=a.defaults(e,{gzip:!1}),typeof e.gzipOptions!=`object`&&(e.gzipOptions={}),this.supports={directory:!0,symlink:!0},this.engine=i.pack(e),this.compressor=!1,e.gzip&&(this.compressor=r.createGzip(e.gzipOptions),this.compressor.on(`error`,this._onCompressorError.bind(this)))};o.prototype._onCompressorError=function(e){this.engine.emit(`error`,e)},o.prototype.append=function(e,t,n){var r=this;t.mtime=t.date;function i(e,i){if(e){n(e);return}r.engine.entry(t,i,function(e){n(e,t)})}if(t.sourceType===`buffer`)i(null,e);else if(t.sourceType===`stream`&&t.stats){t.size=t.stats.size;var o=r.engine.entry(t,function(e){n(e,t)});e.pipe(o)}else t.sourceType===`stream`&&a.collectStream(e,i)},o.prototype.finalize=function(){this.engine.finalize()},o.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)},o.prototype.pipe=function(e,t){return this.compressor?this.engine.pipe.apply(this.engine,[this.compressor]).pipe(e,t):this.engine.pipe.apply(this.engine,arguments)},o.prototype.unpipe=function(){return this.compressor?this.compressor.unpipe.apply(this.compressor,arguments):this.engine.unpipe.apply(this.engine,arguments)},t.exports=o})),Yn=t(((e,t)=>{function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}let r=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 i(e){if(Buffer.isBuffer(e))return e;if(typeof e==`number`)return Buffer.alloc(e);if(typeof e==`string`)return Buffer.from(e);throw Error(`input must be buffer, number, or string, received `+typeof e)}function a(e){let t=i(4);return t.writeInt32BE(e,0),t}function o(e,t){e=i(e),Buffer.isBuffer(t)&&(t=t.readUInt32BE(0));let n=~~t^-1;for(var a=0;a<e.length;a++)n=r[(n^e[a])&255]^n>>>8;return n^-1}function s(){return a(o.apply(null,arguments))}s.signed=function(){return o.apply(null,arguments)},s.unsigned=function(){return o.apply(null,arguments)>>>0},t.exports=n(s)})),Xn=t(((e,t)=>{
|
|
63
|
+
/**
|
|
64
|
+
* JSON Format Plugin
|
|
65
|
+
*
|
|
66
|
+
* @module plugins/json
|
|
67
|
+
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
68
|
+
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
69
|
+
*/
|
|
70
|
+
var r=n(`util`).inherits,i=tt().Transform,a=Yn(),o=gn(),s=function(e){if(!(this instanceof s))return new s(e);e=this.options=o.defaults(e,{}),i.call(this,e),this.supports={directory:!0,symlink:!0},this.files=[]};r(s,i),s.prototype._transform=function(e,t,n){n(null,e)},s.prototype._writeStringified=function(){var e=JSON.stringify(this.files);this.write(e)},s.prototype.append=function(e,t,n){var r=this;t.crc32=0;function i(e,i){if(e){n(e);return}t.size=i.length||0,t.crc32=a.unsigned(i),r.files.push(t),n(null,t)}t.sourceType===`buffer`?i(null,e):t.sourceType===`stream`&&o.collectStream(e,i)},s.prototype.finalize=function(){this._writeStringified(),this.end()},t.exports=s})),Zn=t(((e,t)=>{
|
|
71
|
+
/**
|
|
72
|
+
* Archiver Vending
|
|
73
|
+
*
|
|
74
|
+
* @ignore
|
|
75
|
+
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
76
|
+
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
77
|
+
*/
|
|
78
|
+
var n=vn(),r={},i=function(e,t){return i.create(e,t)};i.create=function(e,t){if(r[e]){var i=new n(e,t);return i.setFormat(e),i.setModule(new r[e](t)),i}else throw Error(`create(`+e+`): format not registered`)},i.registerFormat=function(e,t){if(r[e])throw Error(`register(`+e+`): format already registered`);if(typeof t!=`function`)throw Error(`register(`+e+`): format module invalid`);if(typeof t.prototype.append!=`function`||typeof t.prototype.finalize!=`function`)throw Error(`register(`+e+`): format module missing methods`);r[e]=t},i.isRegisteredFormat=function(e){return!!r[e]},i.registerFormat(`zip`,Pn()),i.registerFormat(`tar`,Jn()),i.registerFormat(`json`,Xn()),t.exports=i}))();const Qn={PROD:`production`,DEV:`development`,TEST:`test`,UNKNOWN:`unknown`};var $n=Zn.ArchiverOptions;export{$n as ArchiverOptions,Qn as Environment};
|