npm-pkg-lint 5.1.8 → 5.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -496,7 +496,7 @@ var require_argparse = __commonJS({
496
496
  var no_default = /* @__PURE__ */ Symbol("no_default_value");
497
497
  function _parse_opts(args, descriptor) {
498
498
  function get_name() {
499
- let stack = new Error().stack.split("\n").map((x) => x.match(/^ at (.*) \(.*\)$/)).filter(Boolean).map((m2) => m2[1]).map((fn2) => fn2.match(/[^ .]*$/)[0]);
499
+ let stack = new Error().stack.split("\n").map((x) => x.match(/^ at (.*) \(.*\)$/)).filter(Boolean).map((m2) => m2[1]).map((fn) => fn.match(/[^ .]*$/)[0]);
500
500
  if (stack.length && stack[0] === get_name.name) stack.shift();
501
501
  if (stack.length && stack[0] === _parse_opts.name) stack.shift();
502
502
  return stack.length ? stack[0] : "";
@@ -6086,8 +6086,8 @@ var CharCodeReader = class {
6086
6086
  * @param {(number) => boolean} fn A function to call on the next character.
6087
6087
  * @returns {boolean} True if the next character code matches, false if not.
6088
6088
  */
6089
- match(fn2) {
6090
- if (fn2(this.peek())) {
6089
+ match(fn) {
6090
+ if (fn(this.peek())) {
6091
6091
  this.next();
6092
6092
  return true;
6093
6093
  }
@@ -7352,9 +7352,9 @@ function pLimit(concurrency) {
7352
7352
  queue.dequeue()();
7353
7353
  }
7354
7354
  };
7355
- const run2 = async (fn2, resolve, args) => {
7355
+ const run2 = async (fn, resolve, args) => {
7356
7356
  activeCount++;
7357
- const result = (async () => fn2(...args))();
7357
+ const result = (async () => fn(...args))();
7358
7358
  resolve(result);
7359
7359
  try {
7360
7360
  await result;
@@ -7362,8 +7362,8 @@ function pLimit(concurrency) {
7362
7362
  }
7363
7363
  next();
7364
7364
  };
7365
- const enqueue = (fn2, resolve, args) => {
7366
- queue.enqueue(run2.bind(void 0, fn2, resolve, args));
7365
+ const enqueue = (fn, resolve, args) => {
7366
+ queue.enqueue(run2.bind(void 0, fn, resolve, args));
7367
7367
  (async () => {
7368
7368
  await Promise.resolve();
7369
7369
  if (activeCount < concurrency && queue.size > 0) {
@@ -7371,8 +7371,8 @@ function pLimit(concurrency) {
7371
7371
  }
7372
7372
  })();
7373
7373
  };
7374
- const generator = (fn2, ...args) => new Promise((resolve) => {
7375
- enqueue(fn2, resolve, args);
7374
+ const generator = (fn, ...args) => new Promise((resolve) => {
7375
+ enqueue(fn, resolve, args);
7376
7376
  });
7377
7377
  Object.defineProperties(generator, {
7378
7378
  activeCount: {
@@ -7740,84 +7740,84 @@ function isBlacklisted(filename2) {
7740
7740
  import fs3 from "node:fs";
7741
7741
 
7742
7742
  // node_modules/tar/dist/esm/index.min.js
7743
- import $r from "events";
7743
+ import Qr from "events";
7744
7744
  import I from "fs";
7745
- import { EventEmitter as Li } from "node:events";
7746
- import As from "node:stream";
7747
- import { StringDecoder as Pr } from "node:string_decoder";
7748
- import hr from "node:path";
7745
+ import { EventEmitter as Di } from "node:events";
7746
+ import Cs from "node:stream";
7747
+ import { StringDecoder as Hr } from "node:string_decoder";
7748
+ import cr from "node:path";
7749
7749
  import Kt from "node:fs";
7750
- import { dirname as Nn, parse as Dn } from "path";
7751
- import { EventEmitter as On } from "events";
7752
- import Pi from "assert";
7750
+ import { dirname as Fn, parse as kn } from "path";
7751
+ import { EventEmitter as Dn } from "events";
7752
+ import zi from "assert";
7753
7753
  import { Buffer as Ot } from "buffer";
7754
- import * as Ms from "zlib";
7755
- import Jr from "zlib";
7754
+ import * as Ps from "zlib";
7755
+ import en from "zlib";
7756
7756
  import { posix as Zt } from "node:path";
7757
- import { basename as yn } from "node:path";
7757
+ import { basename as _n } from "node:path";
7758
7758
  import ui from "fs";
7759
- import $ from "fs";
7760
- import qs from "path";
7761
- import { win32 as Cn } from "node:path";
7762
- import nr from "path";
7763
- import kr from "node:fs";
7764
- import no from "node:assert";
7765
- import { randomBytes as Cr } from "node:crypto";
7766
- import u from "node:fs";
7759
+ import X from "fs";
7760
+ import js from "path";
7761
+ import { win32 as Pn } from "node:path";
7762
+ import ar from "path";
7763
+ import Br from "node:fs";
7764
+ import co from "node:assert";
7765
+ import { randomBytes as Mr } from "node:crypto";
7766
+ import m from "node:fs";
7767
7767
  import R from "node:path";
7768
- import dr from "fs";
7769
- import Ei from "node:fs";
7770
- import Ee from "node:path";
7768
+ import pr from "fs";
7769
+ import wi from "node:fs";
7770
+ import we from "node:path";
7771
7771
  import k from "node:fs";
7772
- import jn from "node:fs/promises";
7773
- import wi from "node:path";
7774
- import { join as _r } from "node:path";
7772
+ import ro from "node:fs/promises";
7773
+ import Si from "node:path";
7774
+ import { join as xr } from "node:path";
7775
7775
  import v from "node:fs";
7776
- import vr from "node:path";
7777
- var Mr = Object.defineProperty;
7778
- var Br = (s3, t) => {
7779
- for (var e in t) Mr(s3, e, { get: t[e], enumerable: true });
7776
+ import Pr from "node:path";
7777
+ var zr = Object.defineProperty;
7778
+ var Ur = (s3, t) => {
7779
+ for (var e in t) zr(s3, e, { get: t[e], enumerable: true });
7780
7780
  };
7781
- var xs = typeof process == "object" && process ? process : { stdout: null, stderr: null };
7782
- var zr = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof A || s3 instanceof As || Ur(s3) || Hr(s3));
7783
- var Ur = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Li && typeof s3.pipe == "function" && s3.pipe !== As.Writable.prototype.pipe;
7784
- var Hr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Li && typeof s3.write == "function" && typeof s3.end == "function";
7785
- var q = /* @__PURE__ */ Symbol("EOF");
7786
- var Q = /* @__PURE__ */ Symbol("maybeEmitEnd");
7787
- var rt = /* @__PURE__ */ Symbol("emittedEnd");
7788
- var Le = /* @__PURE__ */ Symbol("emittingEnd");
7781
+ var Ds = typeof process == "object" && process ? process : { stdout: null, stderr: null };
7782
+ var Wr = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof A || s3 instanceof Cs || Gr(s3) || Zr(s3));
7783
+ var Gr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Di && typeof s3.pipe == "function" && s3.pipe !== Cs.Writable.prototype.pipe;
7784
+ var Zr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Di && typeof s3.write == "function" && typeof s3.end == "function";
7785
+ var Q = /* @__PURE__ */ Symbol("EOF");
7786
+ var J = /* @__PURE__ */ Symbol("maybeEmitEnd");
7787
+ var nt = /* @__PURE__ */ Symbol("emittedEnd");
7788
+ var De = /* @__PURE__ */ Symbol("emittingEnd");
7789
7789
  var qt = /* @__PURE__ */ Symbol("emittedError");
7790
7790
  var Ne = /* @__PURE__ */ Symbol("closed");
7791
- var Ls = /* @__PURE__ */ Symbol("read");
7792
- var De = /* @__PURE__ */ Symbol("flush");
7793
- var Ns = /* @__PURE__ */ Symbol("flushChunk");
7791
+ var Ns = /* @__PURE__ */ Symbol("read");
7792
+ var Ae = /* @__PURE__ */ Symbol("flush");
7793
+ var As = /* @__PURE__ */ Symbol("flushChunk");
7794
7794
  var z = /* @__PURE__ */ Symbol("encoding");
7795
7795
  var Mt = /* @__PURE__ */ Symbol("decoder");
7796
7796
  var g = /* @__PURE__ */ Symbol("flowing");
7797
7797
  var Qt = /* @__PURE__ */ Symbol("paused");
7798
7798
  var Bt = /* @__PURE__ */ Symbol("resume");
7799
7799
  var b = /* @__PURE__ */ Symbol("buffer");
7800
- var D = /* @__PURE__ */ Symbol("pipes");
7800
+ var N = /* @__PURE__ */ Symbol("pipes");
7801
7801
  var _ = /* @__PURE__ */ Symbol("bufferLength");
7802
- var gi = /* @__PURE__ */ Symbol("bufferPush");
7803
- var Ae = /* @__PURE__ */ Symbol("bufferShift");
7802
+ var bi = /* @__PURE__ */ Symbol("bufferPush");
7803
+ var Ie = /* @__PURE__ */ Symbol("bufferShift");
7804
7804
  var L = /* @__PURE__ */ Symbol("objectMode");
7805
7805
  var w = /* @__PURE__ */ Symbol("destroyed");
7806
- var bi = /* @__PURE__ */ Symbol("error");
7807
- var _i = /* @__PURE__ */ Symbol("emitData");
7808
- var Ds = /* @__PURE__ */ Symbol("emitEnd");
7809
- var Oi = /* @__PURE__ */ Symbol("emitEnd2");
7806
+ var _i = /* @__PURE__ */ Symbol("error");
7807
+ var Oi = /* @__PURE__ */ Symbol("emitData");
7808
+ var Is = /* @__PURE__ */ Symbol("emitEnd");
7809
+ var Ti = /* @__PURE__ */ Symbol("emitEnd2");
7810
7810
  var Z = /* @__PURE__ */ Symbol("async");
7811
- var Ti = /* @__PURE__ */ Symbol("abort");
7812
- var Ie = /* @__PURE__ */ Symbol("aborted");
7811
+ var xi = /* @__PURE__ */ Symbol("abort");
7812
+ var Ce = /* @__PURE__ */ Symbol("aborted");
7813
7813
  var Jt = /* @__PURE__ */ Symbol("signal");
7814
7814
  var Rt = /* @__PURE__ */ Symbol("dataListeners");
7815
- var F = /* @__PURE__ */ Symbol("discarded");
7815
+ var C = /* @__PURE__ */ Symbol("discarded");
7816
7816
  var jt = (s3) => Promise.resolve().then(s3);
7817
- var Wr = (s3) => s3();
7818
- var Gr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
7819
- var Zr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
7820
- var Yr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
7817
+ var Yr = (s3) => s3();
7818
+ var Kr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
7819
+ var Vr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
7820
+ var $r = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
7821
7821
  var Fe = class {
7822
7822
  src;
7823
7823
  dest;
@@ -7835,7 +7835,7 @@ var Fe = class {
7835
7835
  this.unpipe(), this.opts.end && this.dest.end();
7836
7836
  }
7837
7837
  };
7838
- var xi = class extends Fe {
7838
+ var Li = class extends Fe {
7839
7839
  unpipe() {
7840
7840
  this.src.removeListener("error", this.proxyErrors), super.unpipe();
7841
7841
  }
@@ -7843,36 +7843,36 @@ var xi = class extends Fe {
7843
7843
  super(t, e, i), this.proxyErrors = (r) => this.dest.emit("error", r), t.on("error", this.proxyErrors);
7844
7844
  }
7845
7845
  };
7846
- var Kr = (s3) => !!s3.objectMode;
7847
- var Vr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
7848
- var A = class extends Li {
7846
+ var Xr = (s3) => !!s3.objectMode;
7847
+ var qr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
7848
+ var A = class extends Di {
7849
7849
  [g] = false;
7850
7850
  [Qt] = false;
7851
- [D] = [];
7851
+ [N] = [];
7852
7852
  [b] = [];
7853
7853
  [L];
7854
7854
  [z];
7855
7855
  [Z];
7856
7856
  [Mt];
7857
- [q] = false;
7858
- [rt] = false;
7859
- [Le] = false;
7857
+ [Q] = false;
7858
+ [nt] = false;
7859
+ [De] = false;
7860
7860
  [Ne] = false;
7861
7861
  [qt] = null;
7862
7862
  [_] = 0;
7863
7863
  [w] = false;
7864
7864
  [Jt];
7865
- [Ie] = false;
7865
+ [Ce] = false;
7866
7866
  [Rt] = 0;
7867
- [F] = false;
7867
+ [C] = false;
7868
7868
  writable = true;
7869
7869
  readable = true;
7870
7870
  constructor(...t) {
7871
7871
  let e = t[0] || {};
7872
7872
  if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
7873
- Kr(e) ? (this[L] = true, this[z] = null) : Vr(e) ? (this[z] = e.encoding, this[L] = false) : (this[L] = false, this[z] = null), this[Z] = !!e.async, this[Mt] = this[z] ? new Pr(this[z]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[b] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[D] });
7873
+ Xr(e) ? (this[L] = true, this[z] = null) : qr(e) ? (this[z] = e.encoding, this[L] = false) : (this[L] = false, this[z] = null), this[Z] = !!e.async, this[Mt] = this[z] ? new Hr(this[z]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[b] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[N] });
7874
7874
  let { signal: i } = e;
7875
- i && (this[Jt] = i, i.aborted ? this[Ti]() : i.addEventListener("abort", () => this[Ti]()));
7875
+ i && (this[Jt] = i, i.aborted ? this[xi]() : i.addEventListener("abort", () => this[xi]()));
7876
7876
  }
7877
7877
  get bufferLength() {
7878
7878
  return this[_];
@@ -7898,53 +7898,53 @@ var A = class extends Li {
7898
7898
  set async(t) {
7899
7899
  this[Z] = this[Z] || !!t;
7900
7900
  }
7901
- [Ti]() {
7902
- this[Ie] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
7901
+ [xi]() {
7902
+ this[Ce] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
7903
7903
  }
7904
7904
  get aborted() {
7905
- return this[Ie];
7905
+ return this[Ce];
7906
7906
  }
7907
7907
  set aborted(t) {
7908
7908
  }
7909
7909
  write(t, e, i) {
7910
- if (this[Ie]) return false;
7911
- if (this[q]) throw new Error("write after end");
7910
+ if (this[Ce]) return false;
7911
+ if (this[Q]) throw new Error("write after end");
7912
7912
  if (this[w]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
7913
7913
  typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
7914
- let r = this[Z] ? jt : Wr;
7914
+ let r = this[Z] ? jt : Yr;
7915
7915
  if (!this[L] && !Buffer.isBuffer(t)) {
7916
- if (Yr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
7917
- else if (Zr(t)) t = Buffer.from(t);
7916
+ if ($r(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
7917
+ else if (Vr(t)) t = Buffer.from(t);
7918
7918
  else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
7919
7919
  }
7920
- return this[L] ? (this[g] && this[_] !== 0 && this[De](true), this[g] ? this.emit("data", t) : this[gi](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : t.length ? (typeof t == "string" && !(e === this[z] && !this[Mt]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[z] && (t = this[Mt].write(t)), this[g] && this[_] !== 0 && this[De](true), this[g] ? this.emit("data", t) : this[gi](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : (this[_] !== 0 && this.emit("readable"), i && r(i), this[g]);
7920
+ return this[L] ? (this[g] && this[_] !== 0 && this[Ae](true), this[g] ? this.emit("data", t) : this[bi](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : t.length ? (typeof t == "string" && !(e === this[z] && !this[Mt]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[z] && (t = this[Mt].write(t)), this[g] && this[_] !== 0 && this[Ae](true), this[g] ? this.emit("data", t) : this[bi](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : (this[_] !== 0 && this.emit("readable"), i && r(i), this[g]);
7921
7921
  }
7922
7922
  read(t) {
7923
7923
  if (this[w]) return null;
7924
- if (this[F] = false, this[_] === 0 || t === 0 || t && t > this[_]) return this[Q](), null;
7924
+ if (this[C] = false, this[_] === 0 || t === 0 || t && t > this[_]) return this[J](), null;
7925
7925
  this[L] && (t = null), this[b].length > 1 && !this[L] && (this[b] = [this[z] ? this[b].join("") : Buffer.concat(this[b], this[_])]);
7926
- let e = this[Ls](t || null, this[b][0]);
7927
- return this[Q](), e;
7926
+ let e = this[Ns](t || null, this[b][0]);
7927
+ return this[J](), e;
7928
7928
  }
7929
- [Ls](t, e) {
7930
- if (this[L]) this[Ae]();
7929
+ [Ns](t, e) {
7930
+ if (this[L]) this[Ie]();
7931
7931
  else {
7932
7932
  let i = e;
7933
- t === i.length || t === null ? this[Ae]() : typeof i == "string" ? (this[b][0] = i.slice(t), e = i.slice(0, t), this[_] -= t) : (this[b][0] = i.subarray(t), e = i.subarray(0, t), this[_] -= t);
7933
+ t === i.length || t === null ? this[Ie]() : typeof i == "string" ? (this[b][0] = i.slice(t), e = i.slice(0, t), this[_] -= t) : (this[b][0] = i.subarray(t), e = i.subarray(0, t), this[_] -= t);
7934
7934
  }
7935
- return this.emit("data", e), !this[b].length && !this[q] && this.emit("drain"), e;
7935
+ return this.emit("data", e), !this[b].length && !this[Q] && this.emit("drain"), e;
7936
7936
  }
7937
7937
  end(t, e, i) {
7938
- return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = "utf8"), t !== void 0 && this.write(t, e), i && this.once("end", i), this[q] = true, this.writable = false, (this[g] || !this[Qt]) && this[Q](), this;
7938
+ return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = "utf8"), t !== void 0 && this.write(t, e), i && this.once("end", i), this[Q] = true, this.writable = false, (this[g] || !this[Qt]) && this[J](), this;
7939
7939
  }
7940
7940
  [Bt]() {
7941
- this[w] || (!this[Rt] && !this[D].length && (this[F] = true), this[Qt] = false, this[g] = true, this.emit("resume"), this[b].length ? this[De]() : this[q] ? this[Q]() : this.emit("drain"));
7941
+ this[w] || (!this[Rt] && !this[N].length && (this[C] = true), this[Qt] = false, this[g] = true, this.emit("resume"), this[b].length ? this[Ae]() : this[Q] ? this[J]() : this.emit("drain"));
7942
7942
  }
7943
7943
  resume() {
7944
7944
  return this[Bt]();
7945
7945
  }
7946
7946
  pause() {
7947
- this[g] = false, this[Qt] = true, this[F] = false;
7947
+ this[g] = false, this[Qt] = true, this[C] = false;
7948
7948
  }
7949
7949
  get destroyed() {
7950
7950
  return this[w];
@@ -7955,39 +7955,39 @@ var A = class extends Li {
7955
7955
  get paused() {
7956
7956
  return this[Qt];
7957
7957
  }
7958
- [gi](t) {
7958
+ [bi](t) {
7959
7959
  this[L] ? this[_] += 1 : this[_] += t.length, this[b].push(t);
7960
7960
  }
7961
- [Ae]() {
7961
+ [Ie]() {
7962
7962
  return this[L] ? this[_] -= 1 : this[_] -= this[b][0].length, this[b].shift();
7963
7963
  }
7964
- [De](t = false) {
7964
+ [Ae](t = false) {
7965
7965
  do
7966
7966
  ;
7967
- while (this[Ns](this[Ae]()) && this[b].length);
7968
- !t && !this[b].length && !this[q] && this.emit("drain");
7967
+ while (this[As](this[Ie]()) && this[b].length);
7968
+ !t && !this[b].length && !this[Q] && this.emit("drain");
7969
7969
  }
7970
- [Ns](t) {
7970
+ [As](t) {
7971
7971
  return this.emit("data", t), this[g];
7972
7972
  }
7973
7973
  pipe(t, e) {
7974
7974
  if (this[w]) return t;
7975
- this[F] = false;
7976
- let i = this[rt];
7977
- return e = e || {}, t === xs.stdout || t === xs.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i ? e.end && t.end() : (this[D].push(e.proxyErrors ? new xi(this, t, e) : new Fe(this, t, e)), this[Z] ? jt(() => this[Bt]()) : this[Bt]()), t;
7975
+ this[C] = false;
7976
+ let i = this[nt];
7977
+ return e = e || {}, t === Ds.stdout || t === Ds.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i ? e.end && t.end() : (this[N].push(e.proxyErrors ? new Li(this, t, e) : new Fe(this, t, e)), this[Z] ? jt(() => this[Bt]()) : this[Bt]()), t;
7978
7978
  }
7979
7979
  unpipe(t) {
7980
- let e = this[D].find((i) => i.dest === t);
7981
- e && (this[D].length === 1 ? (this[g] && this[Rt] === 0 && (this[g] = false), this[D] = []) : this[D].splice(this[D].indexOf(e), 1), e.unpipe());
7980
+ let e = this[N].find((i) => i.dest === t);
7981
+ e && (this[N].length === 1 ? (this[g] && this[Rt] === 0 && (this[g] = false), this[N] = []) : this[N].splice(this[N].indexOf(e), 1), e.unpipe());
7982
7982
  }
7983
7983
  addListener(t, e) {
7984
7984
  return this.on(t, e);
7985
7985
  }
7986
7986
  on(t, e) {
7987
7987
  let i = super.on(t, e);
7988
- if (t === "data") this[F] = false, this[Rt]++, !this[D].length && !this[g] && this[Bt]();
7988
+ if (t === "data") this[C] = false, this[Rt]++, !this[N].length && !this[g] && this[Bt]();
7989
7989
  else if (t === "readable" && this[_] !== 0) super.emit("readable");
7990
- else if (Gr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
7990
+ else if (Kr(t) && this[nt]) super.emit(t), this.removeAllListeners(t);
7991
7991
  else if (t === "error" && this[qt]) {
7992
7992
  let r = e;
7993
7993
  this[Z] ? jt(() => r.call(this, this[qt])) : r.call(this, this[qt]);
@@ -7999,58 +7999,58 @@ var A = class extends Li {
7999
7999
  }
8000
8000
  off(t, e) {
8001
8001
  let i = super.off(t, e);
8002
- return t === "data" && (this[Rt] = this.listeners("data").length, this[Rt] === 0 && !this[F] && !this[D].length && (this[g] = false)), i;
8002
+ return t === "data" && (this[Rt] = this.listeners("data").length, this[Rt] === 0 && !this[C] && !this[N].length && (this[g] = false)), i;
8003
8003
  }
8004
8004
  removeAllListeners(t) {
8005
8005
  let e = super.removeAllListeners(t);
8006
- return (t === "data" || t === void 0) && (this[Rt] = 0, !this[F] && !this[D].length && (this[g] = false)), e;
8006
+ return (t === "data" || t === void 0) && (this[Rt] = 0, !this[C] && !this[N].length && (this[g] = false)), e;
8007
8007
  }
8008
8008
  get emittedEnd() {
8009
- return this[rt];
8009
+ return this[nt];
8010
8010
  }
8011
- [Q]() {
8012
- !this[Le] && !this[rt] && !this[w] && this[b].length === 0 && this[q] && (this[Le] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Ne] && this.emit("close"), this[Le] = false);
8011
+ [J]() {
8012
+ !this[De] && !this[nt] && !this[w] && this[b].length === 0 && this[Q] && (this[De] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Ne] && this.emit("close"), this[De] = false);
8013
8013
  }
8014
8014
  emit(t, ...e) {
8015
8015
  let i = e[0];
8016
8016
  if (t !== "error" && t !== "close" && t !== w && this[w]) return false;
8017
- if (t === "data") return !this[L] && !i ? false : this[Z] ? (jt(() => this[_i](i)), true) : this[_i](i);
8018
- if (t === "end") return this[Ds]();
8017
+ if (t === "data") return !this[L] && !i ? false : this[Z] ? (jt(() => this[Oi](i)), true) : this[Oi](i);
8018
+ if (t === "end") return this[Is]();
8019
8019
  if (t === "close") {
8020
- if (this[Ne] = true, !this[rt] && !this[w]) return false;
8020
+ if (this[Ne] = true, !this[nt] && !this[w]) return false;
8021
8021
  let n = super.emit("close");
8022
8022
  return this.removeAllListeners("close"), n;
8023
8023
  } else if (t === "error") {
8024
- this[qt] = i, super.emit(bi, i);
8024
+ this[qt] = i, super.emit(_i, i);
8025
8025
  let n = !this[Jt] || this.listeners("error").length ? super.emit("error", i) : false;
8026
- return this[Q](), n;
8026
+ return this[J](), n;
8027
8027
  } else if (t === "resume") {
8028
8028
  let n = super.emit("resume");
8029
- return this[Q](), n;
8029
+ return this[J](), n;
8030
8030
  } else if (t === "finish" || t === "prefinish") {
8031
8031
  let n = super.emit(t);
8032
8032
  return this.removeAllListeners(t), n;
8033
8033
  }
8034
8034
  let r = super.emit(t, ...e);
8035
- return this[Q](), r;
8035
+ return this[J](), r;
8036
8036
  }
8037
- [_i](t) {
8038
- for (let i of this[D]) i.dest.write(t) === false && this.pause();
8039
- let e = this[F] ? false : super.emit("data", t);
8040
- return this[Q](), e;
8037
+ [Oi](t) {
8038
+ for (let i of this[N]) i.dest.write(t) === false && this.pause();
8039
+ let e = this[C] ? false : super.emit("data", t);
8040
+ return this[J](), e;
8041
8041
  }
8042
- [Ds]() {
8043
- return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (jt(() => this[Oi]()), true) : this[Oi]());
8042
+ [Is]() {
8043
+ return this[nt] ? false : (this[nt] = true, this.readable = false, this[Z] ? (jt(() => this[Ti]()), true) : this[Ti]());
8044
8044
  }
8045
- [Oi]() {
8045
+ [Ti]() {
8046
8046
  if (this[Mt]) {
8047
8047
  let e = this[Mt].end();
8048
8048
  if (e) {
8049
- for (let i of this[D]) i.dest.write(e);
8050
- this[F] || super.emit("data", e);
8049
+ for (let i of this[N]) i.dest.write(e);
8050
+ this[C] || super.emit("data", e);
8051
8051
  }
8052
8052
  }
8053
- for (let e of this[D]) e.end();
8053
+ for (let e of this[N]) e.end();
8054
8054
  let t = super.emit("end");
8055
8055
  return this.removeAllListeners("end"), t;
8056
8056
  }
@@ -8073,22 +8073,22 @@ var A = class extends Li {
8073
8073
  });
8074
8074
  }
8075
8075
  [Symbol.asyncIterator]() {
8076
- this[F] = false;
8076
+ this[C] = false;
8077
8077
  let t = false, e = async () => (this.pause(), t = true, { value: void 0, done: true });
8078
8078
  return { next: () => {
8079
8079
  if (t) return e();
8080
8080
  let r = this.read();
8081
8081
  if (r !== null) return Promise.resolve({ done: false, value: r });
8082
- if (this[q]) return e();
8083
- let n, o, a = (d) => {
8084
- this.off("data", h), this.off("end", l), this.off(w, c), e(), o(d);
8085
- }, h = (d) => {
8086
- this.off("error", a), this.off("end", l), this.off(w, c), this.pause(), n({ value: d, done: !!this[q] });
8082
+ if (this[Q]) return e();
8083
+ let n, o, h = (d) => {
8084
+ this.off("data", a), this.off("end", l), this.off(w, c), e(), o(d);
8085
+ }, a = (d) => {
8086
+ this.off("error", h), this.off("end", l), this.off(w, c), this.pause(), n({ value: d, done: !!this[Q] });
8087
8087
  }, l = () => {
8088
- this.off("error", a), this.off("data", h), this.off(w, c), e(), n({ done: true, value: void 0 });
8089
- }, c = () => a(new Error("stream destroyed"));
8088
+ this.off("error", h), this.off("data", a), this.off(w, c), e(), n({ done: true, value: void 0 });
8089
+ }, c = () => h(new Error("stream destroyed"));
8090
8090
  return new Promise((d, S) => {
8091
- o = S, n = d, this.once(w, c), this.once("error", a), this.once("end", l), this.once("data", h);
8091
+ o = S, n = d, this.once(w, c), this.once("error", h), this.once("end", l), this.once("data", a);
8092
8092
  });
8093
8093
  }, throw: e, return: e, [Symbol.asyncIterator]() {
8094
8094
  return this;
@@ -8096,71 +8096,71 @@ var A = class extends Li {
8096
8096
  } };
8097
8097
  }
8098
8098
  [Symbol.iterator]() {
8099
- this[F] = false;
8100
- let t = false, e = () => (this.pause(), this.off(bi, e), this.off(w, e), this.off("end", e), t = true, { done: true, value: void 0 }), i = () => {
8099
+ this[C] = false;
8100
+ let t = false, e = () => (this.pause(), this.off(_i, e), this.off(w, e), this.off("end", e), t = true, { done: true, value: void 0 }), i = () => {
8101
8101
  if (t) return e();
8102
8102
  let r = this.read();
8103
8103
  return r === null ? e() : { done: false, value: r };
8104
8104
  };
8105
- return this.once("end", e), this.once(bi, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
8105
+ return this.once("end", e), this.once(_i, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
8106
8106
  return this;
8107
8107
  }, [Symbol.dispose]: () => {
8108
8108
  } };
8109
8109
  }
8110
8110
  destroy(t) {
8111
8111
  if (this[w]) return t ? this.emit("error", t) : this.emit(w), this;
8112
- this[w] = true, this[F] = true, this[b].length = 0, this[_] = 0;
8112
+ this[w] = true, this[C] = true, this[b].length = 0, this[_] = 0;
8113
8113
  let e = this;
8114
8114
  return typeof e.close == "function" && !this[Ne] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
8115
8115
  }
8116
8116
  static get isStream() {
8117
- return zr;
8117
+ return Wr;
8118
8118
  }
8119
8119
  };
8120
- var Xr = I.writev;
8121
- var ot = /* @__PURE__ */ Symbol("_autoClose");
8120
+ var Jr = I.writev;
8121
+ var ht = /* @__PURE__ */ Symbol("_autoClose");
8122
8122
  var H = /* @__PURE__ */ Symbol("_close");
8123
8123
  var te = /* @__PURE__ */ Symbol("_ended");
8124
- var m = /* @__PURE__ */ Symbol("_fd");
8124
+ var u = /* @__PURE__ */ Symbol("_fd");
8125
8125
  var Ni = /* @__PURE__ */ Symbol("_finished");
8126
- var j = /* @__PURE__ */ Symbol("_flags");
8127
- var Di = /* @__PURE__ */ Symbol("_flush");
8128
- var Ci = /* @__PURE__ */ Symbol("_handleChunk");
8129
- var ki = /* @__PURE__ */ Symbol("_makeBuf");
8126
+ var tt2 = /* @__PURE__ */ Symbol("_flags");
8127
+ var Ai = /* @__PURE__ */ Symbol("_flush");
8128
+ var ki = /* @__PURE__ */ Symbol("_handleChunk");
8129
+ var vi = /* @__PURE__ */ Symbol("_makeBuf");
8130
8130
  var ie = /* @__PURE__ */ Symbol("_mode");
8131
- var Ce = /* @__PURE__ */ Symbol("_needDrain");
8131
+ var ke = /* @__PURE__ */ Symbol("_needDrain");
8132
8132
  var Ut = /* @__PURE__ */ Symbol("_onerror");
8133
8133
  var Ht = /* @__PURE__ */ Symbol("_onopen");
8134
- var Ai = /* @__PURE__ */ Symbol("_onread");
8134
+ var Ii = /* @__PURE__ */ Symbol("_onread");
8135
8135
  var Pt = /* @__PURE__ */ Symbol("_onwrite");
8136
- var ht = /* @__PURE__ */ Symbol("_open");
8136
+ var at = /* @__PURE__ */ Symbol("_open");
8137
8137
  var U = /* @__PURE__ */ Symbol("_path");
8138
- var nt = /* @__PURE__ */ Symbol("_pos");
8138
+ var ot = /* @__PURE__ */ Symbol("_pos");
8139
8139
  var Y = /* @__PURE__ */ Symbol("_queue");
8140
8140
  var zt = /* @__PURE__ */ Symbol("_read");
8141
- var Ii = /* @__PURE__ */ Symbol("_readSize");
8142
- var J = /* @__PURE__ */ Symbol("_reading");
8141
+ var Ci = /* @__PURE__ */ Symbol("_readSize");
8142
+ var j = /* @__PURE__ */ Symbol("_reading");
8143
8143
  var ee = /* @__PURE__ */ Symbol("_remain");
8144
8144
  var Fi = /* @__PURE__ */ Symbol("_size");
8145
- var ke = /* @__PURE__ */ Symbol("_write");
8145
+ var ve = /* @__PURE__ */ Symbol("_write");
8146
8146
  var gt = /* @__PURE__ */ Symbol("_writing");
8147
- var ve = /* @__PURE__ */ Symbol("_defaultFlag");
8147
+ var Me = /* @__PURE__ */ Symbol("_defaultFlag");
8148
8148
  var bt = /* @__PURE__ */ Symbol("_errored");
8149
8149
  var _t = class extends A {
8150
8150
  [bt] = false;
8151
- [m];
8151
+ [u];
8152
8152
  [U];
8153
- [Ii];
8154
- [J] = false;
8153
+ [Ci];
8154
+ [j] = false;
8155
8155
  [Fi];
8156
8156
  [ee];
8157
- [ot];
8157
+ [ht];
8158
8158
  constructor(t, e) {
8159
8159
  if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
8160
- this[bt] = false, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[Ii] = e.readSize || 16 * 1024 * 1024, this[J] = false, this[Fi] = typeof e.size == "number" ? e.size : 1 / 0, this[ee] = this[Fi], this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[m] == "number" ? this[zt]() : this[ht]();
8160
+ this[bt] = false, this[u] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[Ci] = e.readSize || 16 * 1024 * 1024, this[j] = false, this[Fi] = typeof e.size == "number" ? e.size : 1 / 0, this[ee] = this[Fi], this[ht] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[u] == "number" ? this[zt]() : this[at]();
8161
8161
  }
8162
8162
  get fd() {
8163
- return this[m];
8163
+ return this[u];
8164
8164
  }
8165
8165
  get path() {
8166
8166
  return this[U];
@@ -8171,36 +8171,36 @@ var _t = class extends A {
8171
8171
  end() {
8172
8172
  throw new TypeError("this is a readable stream");
8173
8173
  }
8174
- [ht]() {
8174
+ [at]() {
8175
8175
  I.open(this[U], "r", (t, e) => this[Ht](t, e));
8176
8176
  }
8177
8177
  [Ht](t, e) {
8178
- t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[zt]());
8178
+ t ? this[Ut](t) : (this[u] = e, this.emit("open", e), this[zt]());
8179
8179
  }
8180
- [ki]() {
8181
- return Buffer.allocUnsafe(Math.min(this[Ii], this[ee]));
8180
+ [vi]() {
8181
+ return Buffer.allocUnsafe(Math.min(this[Ci], this[ee]));
8182
8182
  }
8183
8183
  [zt]() {
8184
- if (!this[J]) {
8185
- this[J] = true;
8186
- let t = this[ki]();
8187
- if (t.length === 0) return process.nextTick(() => this[Ai](null, 0, t));
8188
- I.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ai](e, i, r));
8184
+ if (!this[j]) {
8185
+ this[j] = true;
8186
+ let t = this[vi]();
8187
+ if (t.length === 0) return process.nextTick(() => this[Ii](null, 0, t));
8188
+ I.read(this[u], t, 0, t.length, null, (e, i, r) => this[Ii](e, i, r));
8189
8189
  }
8190
8190
  }
8191
- [Ai](t, e, i) {
8192
- this[J] = false, t ? this[Ut](t) : this[Ci](e, i) && this[zt]();
8191
+ [Ii](t, e, i) {
8192
+ this[j] = false, t ? this[Ut](t) : this[ki](e, i) && this[zt]();
8193
8193
  }
8194
8194
  [H]() {
8195
- if (this[ot] && typeof this[m] == "number") {
8196
- let t = this[m];
8197
- this[m] = void 0, I.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
8195
+ if (this[ht] && typeof this[u] == "number") {
8196
+ let t = this[u];
8197
+ this[u] = void 0, I.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
8198
8198
  }
8199
8199
  }
8200
8200
  [Ut](t) {
8201
- this[J] = true, this[H](), this.emit("error", t);
8201
+ this[j] = true, this[H](), this.emit("error", t);
8202
8202
  }
8203
- [Ci](t, e) {
8203
+ [ki](t, e) {
8204
8204
  let i = false;
8205
8205
  return this[ee] -= t, t > 0 && (i = super.write(t < e.length ? e.subarray(0, t) : e)), (t === 0 || this[ee] <= 0) && (i = false, this[H](), super.end()), i;
8206
8206
  }
@@ -8210,7 +8210,7 @@ var _t = class extends A {
8210
8210
  case "finish":
8211
8211
  return false;
8212
8212
  case "drain":
8213
- return typeof this[m] == "number" && this[zt](), false;
8213
+ return typeof this[u] == "number" && this[zt](), false;
8214
8214
  case "error":
8215
8215
  return this[bt] ? false : (this[bt] = true, super.emit(t, ...e));
8216
8216
  default:
@@ -8218,8 +8218,8 @@ var _t = class extends A {
8218
8218
  }
8219
8219
  }
8220
8220
  };
8221
- var Me = class extends _t {
8222
- [ht]() {
8221
+ var Be = class extends _t {
8222
+ [at]() {
8223
8223
  let t = true;
8224
8224
  try {
8225
8225
  this[Ht](null, I.openSync(this[U], "r")), t = false;
@@ -8230,13 +8230,13 @@ var Me = class extends _t {
8230
8230
  [zt]() {
8231
8231
  let t = true;
8232
8232
  try {
8233
- if (!this[J]) {
8234
- this[J] = true;
8233
+ if (!this[j]) {
8234
+ this[j] = true;
8235
8235
  do {
8236
- let e = this[ki](), i = e.length === 0 ? 0 : I.readSync(this[m], e, 0, e.length, null);
8237
- if (!this[Ci](i, e)) break;
8236
+ let e = this[vi](), i = e.length === 0 ? 0 : I.readSync(this[u], e, 0, e.length, null);
8237
+ if (!this[ki](i, e)) break;
8238
8238
  } while (true);
8239
- this[J] = false;
8239
+ this[j] = false;
8240
8240
  }
8241
8241
  t = false;
8242
8242
  } finally {
@@ -8244,32 +8244,32 @@ var Me = class extends _t {
8244
8244
  }
8245
8245
  }
8246
8246
  [H]() {
8247
- if (this[ot] && typeof this[m] == "number") {
8248
- let t = this[m];
8249
- this[m] = void 0, I.closeSync(t), this.emit("close");
8247
+ if (this[ht] && typeof this[u] == "number") {
8248
+ let t = this[u];
8249
+ this[u] = void 0, I.closeSync(t), this.emit("close");
8250
8250
  }
8251
8251
  }
8252
8252
  };
8253
- var tt2 = class extends $r {
8253
+ var et = class extends Qr {
8254
8254
  readable = false;
8255
8255
  writable = true;
8256
8256
  [bt] = false;
8257
8257
  [gt] = false;
8258
8258
  [te] = false;
8259
8259
  [Y] = [];
8260
- [Ce] = false;
8260
+ [ke] = false;
8261
8261
  [U];
8262
8262
  [ie];
8263
- [ot];
8264
- [m];
8265
- [ve];
8266
- [j];
8263
+ [ht];
8264
+ [u];
8265
+ [Me];
8266
+ [tt2];
8267
8267
  [Ni] = false;
8268
- [nt];
8268
+ [ot];
8269
8269
  constructor(t, e) {
8270
- e = e || {}, super(e), this[U] = t, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[ie] = e.mode === void 0 ? 438 : e.mode, this[nt] = typeof e.start == "number" ? e.start : void 0, this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true;
8271
- let i = this[nt] !== void 0 ? "r+" : "w";
8272
- this[ve] = e.flags === void 0, this[j] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
8270
+ e = e || {}, super(e), this[U] = t, this[u] = typeof e.fd == "number" ? e.fd : void 0, this[ie] = e.mode === void 0 ? 438 : e.mode, this[ot] = typeof e.start == "number" ? e.start : void 0, this[ht] = typeof e.autoClose == "boolean" ? e.autoClose : true;
8271
+ let i = this[ot] !== void 0 ? "r+" : "w";
8272
+ this[Me] = e.flags === void 0, this[tt2] = e.flags === void 0 ? i : e.flags, this[u] === void 0 && this[at]();
8273
8273
  }
8274
8274
  emit(t, ...e) {
8275
8275
  if (t === "error") {
@@ -8279,7 +8279,7 @@ var tt2 = class extends $r {
8279
8279
  return super.emit(t, ...e);
8280
8280
  }
8281
8281
  get fd() {
8282
- return this[m];
8282
+ return this[u];
8283
8283
  }
8284
8284
  get path() {
8285
8285
  return this[U];
@@ -8287,61 +8287,61 @@ var tt2 = class extends $r {
8287
8287
  [Ut](t) {
8288
8288
  this[H](), this[gt] = true, this.emit("error", t);
8289
8289
  }
8290
- [ht]() {
8291
- I.open(this[U], this[j], this[ie], (t, e) => this[Ht](t, e));
8290
+ [at]() {
8291
+ I.open(this[U], this[tt2], this[ie], (t, e) => this[Ht](t, e));
8292
8292
  }
8293
8293
  [Ht](t, e) {
8294
- this[ve] && this[j] === "r+" && t && t.code === "ENOENT" ? (this[j] = "w", this[ht]()) : t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[gt] || this[Di]());
8294
+ this[Me] && this[tt2] === "r+" && t && t.code === "ENOENT" ? (this[tt2] = "w", this[at]()) : t ? this[Ut](t) : (this[u] = e, this.emit("open", e), this[gt] || this[Ai]());
8295
8295
  }
8296
8296
  end(t, e) {
8297
- return t && this.write(t, e), this[te] = true, !this[gt] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
8297
+ return t && this.write(t, e), this[te] = true, !this[gt] && !this[Y].length && typeof this[u] == "number" && this[Pt](null, 0), this;
8298
8298
  }
8299
8299
  write(t, e) {
8300
- return typeof t == "string" && (t = Buffer.from(t, e)), this[te] ? (this.emit("error", new Error("write() after end()")), false) : this[m] === void 0 || this[gt] || this[Y].length ? (this[Y].push(t), this[Ce] = true, false) : (this[gt] = true, this[ke](t), true);
8300
+ return typeof t == "string" && (t = Buffer.from(t, e)), this[te] ? (this.emit("error", new Error("write() after end()")), false) : this[u] === void 0 || this[gt] || this[Y].length ? (this[Y].push(t), this[ke] = true, false) : (this[gt] = true, this[ve](t), true);
8301
8301
  }
8302
- [ke](t) {
8303
- I.write(this[m], t, 0, t.length, this[nt], (e, i) => this[Pt](e, i));
8302
+ [ve](t) {
8303
+ I.write(this[u], t, 0, t.length, this[ot], (e, i) => this[Pt](e, i));
8304
8304
  }
8305
8305
  [Pt](t, e) {
8306
- t ? this[Ut](t) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y].length ? this[Di]() : (this[gt] = false, this[te] && !this[Ni] ? (this[Ni] = true, this[H](), this.emit("finish")) : this[Ce] && (this[Ce] = false, this.emit("drain"))));
8306
+ t ? this[Ut](t) : (this[ot] !== void 0 && typeof e == "number" && (this[ot] += e), this[Y].length ? this[Ai]() : (this[gt] = false, this[te] && !this[Ni] ? (this[Ni] = true, this[H](), this.emit("finish")) : this[ke] && (this[ke] = false, this.emit("drain"))));
8307
8307
  }
8308
- [Di]() {
8308
+ [Ai]() {
8309
8309
  if (this[Y].length === 0) this[te] && this[Pt](null, 0);
8310
- else if (this[Y].length === 1) this[ke](this[Y].pop());
8310
+ else if (this[Y].length === 1) this[ve](this[Y].pop());
8311
8311
  else {
8312
8312
  let t = this[Y];
8313
- this[Y] = [], Xr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
8313
+ this[Y] = [], Jr(this[u], t, this[ot], (e, i) => this[Pt](e, i));
8314
8314
  }
8315
8315
  }
8316
8316
  [H]() {
8317
- if (this[ot] && typeof this[m] == "number") {
8318
- let t = this[m];
8319
- this[m] = void 0, I.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
8317
+ if (this[ht] && typeof this[u] == "number") {
8318
+ let t = this[u];
8319
+ this[u] = void 0, I.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
8320
8320
  }
8321
8321
  }
8322
8322
  };
8323
- var Wt = class extends tt2 {
8324
- [ht]() {
8323
+ var Wt = class extends et {
8324
+ [at]() {
8325
8325
  let t;
8326
- if (this[ve] && this[j] === "r+") try {
8327
- t = I.openSync(this[U], this[j], this[ie]);
8326
+ if (this[Me] && this[tt2] === "r+") try {
8327
+ t = I.openSync(this[U], this[tt2], this[ie]);
8328
8328
  } catch (e) {
8329
- if (e?.code === "ENOENT") return this[j] = "w", this[ht]();
8329
+ if (e?.code === "ENOENT") return this[tt2] = "w", this[at]();
8330
8330
  throw e;
8331
8331
  }
8332
- else t = I.openSync(this[U], this[j], this[ie]);
8332
+ else t = I.openSync(this[U], this[tt2], this[ie]);
8333
8333
  this[Ht](null, t);
8334
8334
  }
8335
8335
  [H]() {
8336
- if (this[ot] && typeof this[m] == "number") {
8337
- let t = this[m];
8338
- this[m] = void 0, I.closeSync(t), this.emit("close");
8336
+ if (this[ht] && typeof this[u] == "number") {
8337
+ let t = this[u];
8338
+ this[u] = void 0, I.closeSync(t), this.emit("close");
8339
8339
  }
8340
8340
  }
8341
- [ke](t) {
8341
+ [ve](t) {
8342
8342
  let e = true;
8343
8343
  try {
8344
- this[Pt](null, I.writeSync(this[m], t, 0, t.length, this[nt])), e = false;
8344
+ this[Pt](null, I.writeSync(this[u], t, 0, t.length, this[ot])), e = false;
8345
8345
  } finally {
8346
8346
  if (e) try {
8347
8347
  this[H]();
@@ -8350,50 +8350,50 @@ var Wt = class extends tt2 {
8350
8350
  }
8351
8351
  }
8352
8352
  };
8353
- var qr = /* @__PURE__ */ new Map([["C", "cwd"], ["f", "file"], ["z", "gzip"], ["P", "preservePaths"], ["U", "unlink"], ["strip-components", "strip"], ["stripComponents", "strip"], ["keep-newer", "newer"], ["keepNewer", "newer"], ["keep-newer-files", "newer"], ["keepNewerFiles", "newer"], ["k", "keep"], ["keep-existing", "keep"], ["keepExisting", "keep"], ["m", "noMtime"], ["no-mtime", "noMtime"], ["p", "preserveOwner"], ["L", "follow"], ["h", "follow"], ["onentry", "onReadEntry"]]);
8354
- var Is = (s3) => !!s3.sync && !!s3.file;
8355
- var Fs = (s3) => !s3.sync && !!s3.file;
8356
- var Cs = (s3) => !!s3.sync && !s3.file;
8357
- var ks = (s3) => !s3.sync && !s3.file;
8358
- var vs = (s3) => !!s3.file;
8359
- var Qr = (s3) => {
8360
- let t = qr.get(s3);
8353
+ var jr = /* @__PURE__ */ new Map([["C", "cwd"], ["f", "file"], ["z", "gzip"], ["P", "preservePaths"], ["U", "unlink"], ["strip-components", "strip"], ["stripComponents", "strip"], ["keep-newer", "newer"], ["keepNewer", "newer"], ["keep-newer-files", "newer"], ["keepNewerFiles", "newer"], ["k", "keep"], ["keep-existing", "keep"], ["keepExisting", "keep"], ["m", "noMtime"], ["no-mtime", "noMtime"], ["p", "preserveOwner"], ["L", "follow"], ["h", "follow"], ["onentry", "onReadEntry"]]);
8354
+ var Fs = (s3) => !!s3.sync && !!s3.file;
8355
+ var ks = (s3) => !s3.sync && !!s3.file;
8356
+ var vs = (s3) => !!s3.sync && !s3.file;
8357
+ var Ms = (s3) => !s3.sync && !s3.file;
8358
+ var Bs = (s3) => !!s3.file;
8359
+ var tn = (s3) => {
8360
+ let t = jr.get(s3);
8361
8361
  return t || s3;
8362
8362
  };
8363
8363
  var se = (s3 = {}) => {
8364
8364
  if (!s3) return {};
8365
8365
  let t = {};
8366
8366
  for (let [e, i] of Object.entries(s3)) {
8367
- let r = Qr(e);
8367
+ let r = tn(e);
8368
8368
  t[r] = i;
8369
8369
  }
8370
8370
  return t.chmod === void 0 && t.noChmod === false && (t.chmod = true), delete t.noChmod, t;
8371
8371
  };
8372
- var K = (s3, t, e, i, r) => Object.assign((n = [], o, a) => {
8373
- Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (a = o, o = void 0), o = o ? Array.from(o) : [];
8374
- let h = se(n);
8375
- if (r?.(h, o), Is(h)) {
8376
- if (typeof a == "function") throw new TypeError("callback not supported for sync tar functions");
8377
- return s3(h, o);
8378
- } else if (Fs(h)) {
8379
- let l = t(h, o);
8380
- return a ? l.then(() => a(), a) : l;
8381
- } else if (Cs(h)) {
8382
- if (typeof a == "function") throw new TypeError("callback not supported for sync tar functions");
8383
- return e(h, o);
8384
- } else if (ks(h)) {
8385
- if (typeof a == "function") throw new TypeError("callback only supported with file option");
8386
- return i(h, o);
8372
+ var K = (s3, t, e, i, r) => Object.assign((n = [], o, h) => {
8373
+ Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (h = o, o = void 0), o = o ? Array.from(o) : [];
8374
+ let a = se(n);
8375
+ if (r?.(a, o), Fs(a)) {
8376
+ if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
8377
+ return s3(a, o);
8378
+ } else if (ks(a)) {
8379
+ let l = t(a, o);
8380
+ return h ? l.then(() => h(), h) : l;
8381
+ } else if (vs(a)) {
8382
+ if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
8383
+ return e(a, o);
8384
+ } else if (Ms(a)) {
8385
+ if (typeof h == "function") throw new TypeError("callback only supported with file option");
8386
+ return i(a, o);
8387
8387
  }
8388
8388
  throw new Error("impossible options??");
8389
8389
  }, { syncFile: s3, asyncFile: t, syncNoFile: e, asyncNoFile: i, validate: r });
8390
- var jr = Jr.constants || { ZLIB_VERNUM: 4736 };
8391
- var M = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 }, jr));
8392
- var tn = Ot.concat;
8393
- var Bs = Object.getOwnPropertyDescriptor(Ot, "concat");
8394
- var en = (s3) => s3;
8395
- var Mi = Bs?.writable === true || Bs?.set !== void 0 ? (s3) => {
8396
- Ot.concat = s3 ? en : tn;
8390
+ var sn = en.constants || { ZLIB_VERNUM: 4736 };
8391
+ var M = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 }, sn));
8392
+ var rn = Ot.concat;
8393
+ var zs = Object.getOwnPropertyDescriptor(Ot, "concat");
8394
+ var nn = (s3) => s3;
8395
+ var Bi = zs?.writable === true || zs?.set !== void 0 ? (s3) => {
8396
+ Ot.concat = s3 ? nn : rn;
8397
8397
  } : (s3) => {
8398
8398
  };
8399
8399
  var Tt = /* @__PURE__ */ Symbol("_superWrite");
@@ -8407,7 +8407,7 @@ var Gt = class extends Error {
8407
8407
  return "ZlibError";
8408
8408
  }
8409
8409
  };
8410
- var Bi = /* @__PURE__ */ Symbol("flushFlag");
8410
+ var Pi = /* @__PURE__ */ Symbol("flushFlag");
8411
8411
  var re = class extends A {
8412
8412
  #t = false;
8413
8413
  #i = false;
@@ -8427,9 +8427,9 @@ var re = class extends A {
8427
8427
  }
8428
8428
  constructor(t, e) {
8429
8429
  if (!t || typeof t != "object") throw new TypeError("invalid options for ZlibBase constructor");
8430
- if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof Ms[e] != "function") throw new TypeError("Compression method not supported: " + e);
8430
+ if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof Ps[e] != "function") throw new TypeError("Compression method not supported: " + e);
8431
8431
  try {
8432
- this.#e = new Ms[e](t);
8432
+ this.#e = new Ps[e](t);
8433
8433
  } catch (i) {
8434
8434
  throw new Gt(i, this.constructor);
8435
8435
  }
@@ -8441,10 +8441,10 @@ var re = class extends A {
8441
8441
  this.#e && (this.#e.close(), this.#e = void 0, this.emit("close"));
8442
8442
  }
8443
8443
  reset() {
8444
- if (!this.#t) return Pi(this.#e, "zlib binding closed"), this.#e.reset?.();
8444
+ if (!this.#t) return zi(this.#e, "zlib binding closed"), this.#e.reset?.();
8445
8445
  }
8446
8446
  flush(t) {
8447
- this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(Ot.alloc(0), { [Bi]: t })));
8447
+ this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(Ot.alloc(0), { [Pi]: t })));
8448
8448
  }
8449
8449
  end(t, e, i) {
8450
8450
  return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), t && (e ? this.write(t, e) : this.write(t)), this.flush(this.#n), this.#i = true, super.end(i);
@@ -8457,33 +8457,33 @@ var re = class extends A {
8457
8457
  }
8458
8458
  write(t, e, i) {
8459
8459
  if (typeof e == "function" && (i = e, e = "utf8"), typeof t == "string" && (t = Ot.from(t, e)), this.#t) return;
8460
- Pi(this.#e, "zlib binding closed");
8460
+ zi(this.#e, "zlib binding closed");
8461
8461
  let r = this.#e._handle, n = r.close;
8462
8462
  r.close = () => {
8463
8463
  };
8464
8464
  let o = this.#e.close;
8465
8465
  this.#e.close = () => {
8466
- }, Mi(true);
8467
- let a;
8466
+ }, Bi(true);
8467
+ let h;
8468
8468
  try {
8469
- let l = typeof t[Bi] == "number" ? t[Bi] : this.#s;
8470
- a = this.#e._processChunk(t, l), Mi(false);
8469
+ let l = typeof t[Pi] == "number" ? t[Pi] : this.#s;
8470
+ h = this.#e._processChunk(t, l), Bi(false);
8471
8471
  } catch (l) {
8472
- Mi(false), this.#o(new Gt(l, this.write));
8472
+ Bi(false), this.#o(new Gt(l, this.write));
8473
8473
  } finally {
8474
8474
  this.#e && (this.#e._handle = r, r.close = n, this.#e.close = o, this.#e.removeAllListeners("error"));
8475
8475
  }
8476
8476
  this.#e && this.#e.on("error", (l) => this.#o(new Gt(l, this.write)));
8477
- let h;
8478
- if (a) if (Array.isArray(a) && a.length > 0) {
8479
- let l = a[0];
8480
- h = this[Tt](Ot.from(l));
8481
- for (let c = 1; c < a.length; c++) h = this[Tt](a[c]);
8482
- } else h = this[Tt](Ot.from(a));
8483
- return i && i(), h;
8477
+ let a;
8478
+ if (h) if (Array.isArray(h) && h.length > 0) {
8479
+ let l = h[0];
8480
+ a = this[Tt](Ot.from(l));
8481
+ for (let c = 1; c < h.length; c++) a = this[Tt](h[c]);
8482
+ } else a = this[Tt](Ot.from(h));
8483
+ return i && i(), a;
8484
8484
  }
8485
8485
  };
8486
- var Be = class extends re {
8486
+ var Pe = class extends re {
8487
8487
  #t;
8488
8488
  #i;
8489
8489
  constructor(t, e) {
@@ -8494,7 +8494,7 @@ var Be = class extends re {
8494
8494
  if (!this.handle) throw new Error("cannot switch params when binding is closed");
8495
8495
  if (!this.handle.params) throw new Error("not supported in this implementation");
8496
8496
  if (this.#t !== t || this.#i !== e) {
8497
- this.flush(M.Z_SYNC_FLUSH), Pi(this.handle, "zlib binding closed");
8497
+ this.flush(M.Z_SYNC_FLUSH), zi(this.handle, "zlib binding closed");
8498
8498
  let i = this.handle.flush;
8499
8499
  this.handle.flush = (r, n) => {
8500
8500
  typeof r == "function" && (n = r, r = this.flushFlag), this.flush(r), n?.();
@@ -8509,7 +8509,7 @@ var Be = class extends re {
8509
8509
  }
8510
8510
  }
8511
8511
  };
8512
- var Pe = class extends Be {
8512
+ var ze = class extends Pe {
8513
8513
  #t;
8514
8514
  constructor(t) {
8515
8515
  super(t, "Gzip"), this.#t = t && !!t.portable;
@@ -8518,89 +8518,90 @@ var Pe = class extends Be {
8518
8518
  return this.#t ? (this.#t = false, t[9] = 255, super[Tt](t)) : super[Tt](t);
8519
8519
  }
8520
8520
  };
8521
- var ze = class extends Be {
8521
+ var Ue = class extends Pe {
8522
8522
  constructor(t) {
8523
8523
  super(t, "Unzip");
8524
8524
  }
8525
8525
  };
8526
- var Ue = class extends re {
8526
+ var He = class extends re {
8527
8527
  constructor(t, e) {
8528
8528
  t = t || {}, t.flush = t.flush || M.BROTLI_OPERATION_PROCESS, t.finishFlush = t.finishFlush || M.BROTLI_OPERATION_FINISH, t.fullFlushFlag = M.BROTLI_OPERATION_FLUSH, super(t, e);
8529
8529
  }
8530
8530
  };
8531
- var He = class extends Ue {
8531
+ var We = class extends He {
8532
8532
  constructor(t) {
8533
8533
  super(t, "BrotliCompress");
8534
8534
  }
8535
8535
  };
8536
- var We = class extends Ue {
8536
+ var Ge = class extends He {
8537
8537
  constructor(t) {
8538
8538
  super(t, "BrotliDecompress");
8539
8539
  }
8540
8540
  };
8541
- var Ge = class extends re {
8541
+ var Ze = class extends re {
8542
8542
  constructor(t, e) {
8543
8543
  t = t || {}, t.flush = t.flush || M.ZSTD_e_continue, t.finishFlush = t.finishFlush || M.ZSTD_e_end, t.fullFlushFlag = M.ZSTD_e_flush, super(t, e);
8544
8544
  }
8545
8545
  };
8546
- var Ze = class extends Ge {
8546
+ var Ye = class extends Ze {
8547
8547
  constructor(t) {
8548
8548
  super(t, "ZstdCompress");
8549
8549
  }
8550
8550
  };
8551
- var Ye = class extends Ge {
8551
+ var Ke = class extends Ze {
8552
8552
  constructor(t) {
8553
8553
  super(t, "ZstdDecompress");
8554
8554
  }
8555
8555
  };
8556
- var Ps = (s3, t) => {
8557
- if (Number.isSafeInteger(s3)) s3 < 0 ? nn(s3, t) : rn(s3, t);
8556
+ var Us = (s3, t) => {
8557
+ if (Number.isSafeInteger(s3)) s3 < 0 ? an(s3, t) : hn(s3, t);
8558
8558
  else throw Error("cannot encode number outside of javascript safe integer range");
8559
8559
  return t;
8560
8560
  };
8561
- var rn = (s3, t) => {
8561
+ var hn = (s3, t) => {
8562
8562
  t[0] = 128;
8563
8563
  for (var e = t.length; e > 1; e--) t[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
8564
8564
  };
8565
- var nn = (s3, t) => {
8565
+ var an = (s3, t) => {
8566
8566
  t[0] = 255;
8567
8567
  var e = false;
8568
8568
  s3 = s3 * -1;
8569
8569
  for (var i = t.length; i > 1; i--) {
8570
8570
  var r = s3 & 255;
8571
- s3 = Math.floor(s3 / 256), e ? t[i - 1] = Us(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = Hs(r));
8571
+ s3 = Math.floor(s3 / 256), e ? t[i - 1] = Ws(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = Gs(r));
8572
8572
  }
8573
8573
  };
8574
- var zs = (s3) => {
8575
- let t = s3[0], e = t === 128 ? hn(s3.subarray(1, s3.length)) : t === 255 ? on(s3) : null;
8574
+ var Hs = (s3) => {
8575
+ let t = s3[0], e = t === 128 ? cn(s3.subarray(1, s3.length)) : t === 255 ? ln(s3) : null;
8576
8576
  if (e === null) throw Error("invalid base256 encoding");
8577
8577
  if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
8578
8578
  return e;
8579
8579
  };
8580
- var on = (s3) => {
8580
+ var ln = (s3) => {
8581
8581
  for (var t = s3.length, e = 0, i = false, r = t - 1; r > -1; r--) {
8582
8582
  var n = Number(s3[r]), o;
8583
- i ? o = Us(n) : n === 0 ? o = n : (i = true, o = Hs(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
8583
+ i ? o = Ws(n) : n === 0 ? o = n : (i = true, o = Gs(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
8584
8584
  }
8585
8585
  return e;
8586
8586
  };
8587
- var hn = (s3) => {
8587
+ var cn = (s3) => {
8588
8588
  for (var t = s3.length, e = 0, i = t - 1; i > -1; i--) {
8589
8589
  var r = Number(s3[i]);
8590
8590
  r !== 0 && (e += r * Math.pow(256, t - i - 1));
8591
8591
  }
8592
8592
  return e;
8593
8593
  };
8594
- var Us = (s3) => (255 ^ s3) & 255;
8595
- var Hs = (s3) => (255 ^ s3) + 1 & 255;
8596
- var Ui = {};
8597
- Br(Ui, { code: () => Ke, isCode: () => ne, isName: () => ln, name: () => oe, normalFsTypes: () => zi });
8594
+ var Ws = (s3) => (255 ^ s3) & 255;
8595
+ var Gs = (s3) => (255 ^ s3) + 1 & 255;
8596
+ var Hi = {};
8597
+ Ur(Hi, { code: () => Ve, isCode: () => ne, isName: () => dn, name: () => oe, normalFsTypes: () => Ui });
8598
8598
  var ne = (s3) => oe.has(s3);
8599
- var ln = (s3) => Ke.has(s3);
8600
- var zi = /* @__PURE__ */ new Set(["0", "", "1", "2", "3", "4", "5", "6", "7", "D"]);
8599
+ var dn = (s3) => Ve.has(s3);
8600
+ var Ui = /* @__PURE__ */ new Set(["0", "", "1", "2", "3", "4", "5", "6", "7", "D"]);
8601
8601
  var oe = /* @__PURE__ */ new Map([["0", "File"], ["", "OldFile"], ["1", "Link"], ["2", "SymbolicLink"], ["3", "CharacterDevice"], ["4", "BlockDevice"], ["5", "Directory"], ["6", "FIFO"], ["7", "ContiguousFile"], ["g", "GlobalExtendedHeader"], ["x", "ExtendedHeader"], ["A", "SolarisACL"], ["D", "GNUDumpDir"], ["I", "Inode"], ["K", "NextFileHasLongLinkpath"], ["L", "NextFileHasLongPath"], ["M", "ContinuationFile"], ["N", "OldGnuLongPath"], ["S", "SparseFile"], ["V", "TapeVolumeHeader"], ["X", "OldExtendedHeader"]]);
8602
- var Ke = new Map(Array.from(oe).map((s3) => [s3[1], s3[0]]));
8603
- var C = class {
8602
+ var Ve = new Map(Array.from(oe).map((s3) => [s3[1], s3[0]]));
8603
+ var mn = (s3) => s3 === void 0 || s3 < 0 ? void 0 : s3;
8604
+ var F = class {
8604
8605
  cksumValid = false;
8605
8606
  needPax = false;
8606
8607
  nullBlock = false;
@@ -8627,13 +8628,13 @@ var C = class {
8627
8628
  }
8628
8629
  decode(t, e, i, r) {
8629
8630
  if (e || (e = 0), !t || !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
8630
- let n = xt(t, e + 156, 1), o = zi.has(n), a = o ? i : void 0, h = o ? r : void 0;
8631
- if (this.path = a?.path ?? xt(t, e, 100), this.mode = a?.mode ?? h?.mode ?? at(t, e + 100, 8), this.uid = a?.uid ?? h?.uid ?? at(t, e + 108, 8), this.gid = a?.gid ?? h?.gid ?? at(t, e + 116, 8), this.size = a?.size ?? h?.size ?? at(t, e + 124, 12), this.mtime = a?.mtime ?? h?.mtime ?? Hi(t, e + 136, 12), this.cksum = at(t, e + 148, 12), h && this.#i(h, true), a && this.#i(a), ne(n) && (this.#t = n || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = xt(t, e + 157, 100), t.subarray(e + 257, e + 265).toString() === "ustar\x0000") if (this.uname = a?.uname ?? h?.uname ?? xt(t, e + 265, 32), this.gname = a?.gname ?? h?.gname ?? xt(t, e + 297, 32), this.devmaj = a?.devmaj ?? h?.devmaj ?? at(t, e + 329, 8) ?? 0, this.devmin = a?.devmin ?? h?.devmin ?? at(t, e + 337, 8) ?? 0, t[e + 475] !== 0) {
8631
+ let n = xt(t, e + 156, 1), o = Ui.has(n), h = o ? i : void 0, a = o ? r : void 0;
8632
+ if (this.path = h?.path ?? xt(t, e, 100), this.mode = h?.mode ?? a?.mode ?? lt(t, e + 100, 8), this.uid = h?.uid ?? a?.uid ?? lt(t, e + 108, 8), this.gid = h?.gid ?? a?.gid ?? lt(t, e + 116, 8), this.size = mn(h?.size ?? a?.size ?? lt(t, e + 124, 12)), this.mtime = h?.mtime ?? a?.mtime ?? Wi(t, e + 136, 12), this.cksum = lt(t, e + 148, 12), a && this.#i(a, true), h && this.#i(h), ne(n) && (this.#t = n || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = xt(t, e + 157, 100), t.subarray(e + 257, e + 265).toString() === "ustar\x0000") if (this.uname = h?.uname ?? a?.uname ?? xt(t, e + 265, 32), this.gname = h?.gname ?? a?.gname ?? xt(t, e + 297, 32), this.devmaj = h?.devmaj ?? a?.devmaj ?? lt(t, e + 329, 8) ?? 0, this.devmin = h?.devmin ?? a?.devmin ?? lt(t, e + 337, 8) ?? 0, t[e + 475] !== 0) {
8632
8633
  let c = xt(t, e + 345, 155);
8633
8634
  this.path = c + "/" + this.path;
8634
8635
  } else {
8635
8636
  let c = xt(t, e + 345, 130);
8636
- c && (this.path = c + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Hi(t, e + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Hi(t, e + 488, 12);
8637
+ c && (this.path = c + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Wi(t, e + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Wi(t, e + 488, 12);
8637
8638
  }
8638
8639
  let l = 256;
8639
8640
  for (let c = e; c < e + 148; c++) l += t[c];
@@ -8641,16 +8642,16 @@ var C = class {
8641
8642
  this.cksumValid = l === this.cksum, this.cksum === void 0 && l === 256 && (this.nullBlock = true);
8642
8643
  }
8643
8644
  #i(t, e = false) {
8644
- Object.assign(this, Object.fromEntries(Object.entries(t).filter(([i, r]) => !(r == null || i === "path" && e || i === "linkpath" && e || i === "global"))));
8645
+ Object.assign(this, Object.fromEntries(Object.entries(t).filter(([i, r]) => !(r == null || i === "size" && Number(r) < 0 || i === "path" && e || i === "linkpath" && e || i === "global"))));
8645
8646
  }
8646
8647
  encode(t, e = 0) {
8647
8648
  if (t || (t = this.block = Buffer.alloc(512)), this.#t === "Unsupported" && (this.#t = "0"), !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
8648
- let i = this.ctime || this.atime ? 130 : 155, r = cn(this.path || "", i), n = r[0], o = r[1];
8649
- this.needPax = !!r[2], this.needPax = Lt(t, e, 100, n) || this.needPax, this.needPax = lt(t, e + 100, 8, this.mode) || this.needPax, this.needPax = lt(t, e + 108, 8, this.uid) || this.needPax, this.needPax = lt(t, e + 116, 8, this.gid) || this.needPax, this.needPax = lt(t, e + 124, 12, this.size) || this.needPax, this.needPax = Wi(t, e + 136, 12, this.mtime) || this.needPax, t[e + 156] = Number(this.#t.codePointAt(0)), this.needPax = Lt(t, e + 157, 100, this.linkpath) || this.needPax, t.write("ustar\x0000", e + 257, 8), this.needPax = Lt(t, e + 265, 32, this.uname) || this.needPax, this.needPax = Lt(t, e + 297, 32, this.gname) || this.needPax, this.needPax = lt(t, e + 329, 8, this.devmaj) || this.needPax, this.needPax = lt(t, e + 337, 8, this.devmin) || this.needPax, this.needPax = Lt(t, e + 345, i, o) || this.needPax, t[e + 475] !== 0 ? this.needPax = Lt(t, e + 345, 155, o) || this.needPax : (this.needPax = Lt(t, e + 345, 130, o) || this.needPax, this.needPax = Wi(t, e + 476, 12, this.atime) || this.needPax, this.needPax = Wi(t, e + 488, 12, this.ctime) || this.needPax);
8650
- let a = 256;
8651
- for (let h = e; h < e + 148; h++) a += t[h];
8652
- for (let h = e + 156; h < e + 512; h++) a += t[h];
8653
- return this.cksum = a, lt(t, e + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
8649
+ let i = this.ctime || this.atime ? 130 : 155, r = un(this.path || "", i), n = r[0], o = r[1];
8650
+ this.needPax = !!r[2], this.needPax = Lt(t, e, 100, n) || this.needPax, this.needPax = ct(t, e + 100, 8, this.mode) || this.needPax, this.needPax = ct(t, e + 108, 8, this.uid) || this.needPax, this.needPax = ct(t, e + 116, 8, this.gid) || this.needPax, this.needPax = ct(t, e + 124, 12, this.size) || this.needPax, this.needPax = Gi(t, e + 136, 12, this.mtime) || this.needPax, t[e + 156] = Number(this.#t.codePointAt(0)), this.needPax = Lt(t, e + 157, 100, this.linkpath) || this.needPax, t.write("ustar\x0000", e + 257, 8), this.needPax = Lt(t, e + 265, 32, this.uname) || this.needPax, this.needPax = Lt(t, e + 297, 32, this.gname) || this.needPax, this.needPax = ct(t, e + 329, 8, this.devmaj) || this.needPax, this.needPax = ct(t, e + 337, 8, this.devmin) || this.needPax, this.needPax = Lt(t, e + 345, i, o) || this.needPax, t[e + 475] !== 0 ? this.needPax = Lt(t, e + 345, 155, o) || this.needPax : (this.needPax = Lt(t, e + 345, 130, o) || this.needPax, this.needPax = Gi(t, e + 476, 12, this.atime) || this.needPax, this.needPax = Gi(t, e + 488, 12, this.ctime) || this.needPax);
8651
+ let h = 256;
8652
+ for (let a = e; a < e + 148; a++) h += t[a];
8653
+ for (let a = e + 156; a < e + 512; a++) h += t[a];
8654
+ return this.cksum = h, ct(t, e + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
8654
8655
  }
8655
8656
  get type() {
8656
8657
  return this.#t === "Unsupported" ? this.#t : oe.get(this.#t);
@@ -8659,13 +8660,13 @@ var C = class {
8659
8660
  return this.#t;
8660
8661
  }
8661
8662
  set type(t) {
8662
- let e = String(Ke.get(t));
8663
+ let e = String(Ve.get(t));
8663
8664
  if (ne(e) || e === "Unsupported") this.#t = e;
8664
8665
  else if (ne(t)) this.#t = t;
8665
8666
  else throw new TypeError("invalid entry type: " + t);
8666
8667
  }
8667
8668
  };
8668
- var cn = (s3, t) => {
8669
+ var un = (s3, t) => {
8669
8670
  let i = s3, r = "", n, o = Zt.parse(s3).root || ".";
8670
8671
  if (Buffer.byteLength(i) < 100) n = [i, r, false];
8671
8672
  else {
@@ -8678,20 +8679,20 @@ var cn = (s3, t) => {
8678
8679
  return n;
8679
8680
  };
8680
8681
  var xt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
8681
- var Hi = (s3, t, e) => fn(at(s3, t, e));
8682
- var fn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
8683
- var at = (s3, t, e) => Number(s3[t]) & 128 ? zs(s3.subarray(t, t + e)) : un(s3, t, e);
8684
- var dn = (s3) => isNaN(s3) ? void 0 : s3;
8685
- var un = (s3, t, e) => dn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
8686
- var mn = { 12: 8589934591, 8: 2097151 };
8687
- var lt = (s3, t, e, i) => i === void 0 ? false : i > mn[e] || i < 0 ? (Ps(i, s3.subarray(t, t + e)), true) : (pn(s3, t, e, i), false);
8688
- var pn = (s3, t, e, i) => s3.write(En(i, e), t, e, "ascii");
8689
- var En = (s3, t) => wn(Math.floor(s3).toString(8), t);
8690
- var wn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
8691
- var Wi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
8692
- var Sn = new Array(156).join("\0");
8693
- var Lt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + Sn, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
8694
- var ct = class s {
8682
+ var Wi = (s3, t, e) => pn(lt(s3, t, e));
8683
+ var pn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
8684
+ var lt = (s3, t, e) => Number(s3[t]) & 128 ? Hs(s3.subarray(t, t + e)) : wn(s3, t, e);
8685
+ var En = (s3) => isNaN(s3) ? void 0 : s3;
8686
+ var wn = (s3, t, e) => En(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
8687
+ var Sn = { 12: 8589934591, 8: 2097151 };
8688
+ var ct = (s3, t, e, i) => i === void 0 ? false : i > Sn[e] || i < 0 ? (Us(i, s3.subarray(t, t + e)), true) : (yn(s3, t, e, i), false);
8689
+ var yn = (s3, t, e, i) => s3.write(Rn(i, e), t, e, "ascii");
8690
+ var Rn = (s3, t) => gn(Math.floor(s3).toString(8), t);
8691
+ var gn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
8692
+ var Gi = (s3, t, e, i) => i === void 0 ? false : ct(s3, t, e, i.getTime() / 1e3);
8693
+ var bn = new Array(156).join("\0");
8694
+ var Lt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + bn, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
8695
+ var ft = class s {
8695
8696
  atime;
8696
8697
  mtime;
8697
8698
  ctime;
@@ -8717,7 +8718,7 @@ var ct = class s {
8717
8718
  if (t === "") return Buffer.allocUnsafe(0);
8718
8719
  let e = Buffer.byteLength(t), i = 512 * Math.ceil(1 + e / 512), r = Buffer.allocUnsafe(i);
8719
8720
  for (let n = 0; n < 512; n++) r[n] = 0;
8720
- new C({ path: ("PaxHeader/" + yn(this.path ?? "")).slice(0, 99), mode: this.mode || 420, uid: this.uid, gid: this.gid, size: e, mtime: this.mtime, type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", linkpath: "", uname: this.uname || "", gname: this.gname || "", devmaj: 0, devmin: 0, atime: this.atime, ctime: this.ctime }).encode(r), r.write(t, 512, e, "utf8");
8721
+ new F({ path: ("PaxHeader/" + _n(this.path ?? "")).slice(0, 99), mode: this.mode || 420, uid: this.uid, gid: this.gid, size: e, mtime: this.mtime, type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", linkpath: "", uname: this.uname || "", gname: this.gname || "", devmaj: 0, devmin: 0, atime: this.atime, ctime: this.ctime }).encode(r), r.write(t, 512, e, "utf8");
8721
8722
  for (let n = e + 512; n < r.length; n++) r[n] = 0;
8722
8723
  return r;
8723
8724
  }
@@ -8731,24 +8732,52 @@ var ct = class s {
8731
8732
  return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
8732
8733
  }
8733
8734
  static parse(t, e, i = false) {
8734
- return new s(Rn(gn(t), e), i);
8735
+ return new s(On(Tn(t), e), i);
8735
8736
  }
8736
8737
  };
8737
- var Rn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
8738
- var gn = (s3) => s3.replace(/\n$/, "").split(`
8739
- `).reduce(bn, /* @__PURE__ */ Object.create(null));
8740
- var bn = (s3, t) => {
8738
+ var On = (s3, t) => t ? Object.assign({}, t, s3) : s3;
8739
+ var Tn = (s3) => s3.replace(/\n$/, "").split(`
8740
+ `).reduce(xn, /* @__PURE__ */ Object.create(null));
8741
+ var xn = (s3, t) => {
8741
8742
  let e = parseInt(t, 10);
8742
8743
  if (e !== Buffer.byteLength(t) + 1) return s3;
8743
8744
  t = t.slice((e + " ").length);
8744
8745
  let i = t.split("="), r = i.shift();
8745
8746
  if (!r) return s3;
8746
- let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=");
8747
- return s3[n] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n) ? new Date(Number(o) * 1e3) : /^[0-9]+$/.test(o) ? +o : o, s3;
8747
+ let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=").replace(/\0.*/, "");
8748
+ switch (n) {
8749
+ case "path":
8750
+ case "linkpath":
8751
+ case "type":
8752
+ case "charset":
8753
+ case "comment":
8754
+ case "gname":
8755
+ case "uname":
8756
+ s3[n] = o;
8757
+ break;
8758
+ case "ctime":
8759
+ case "atime":
8760
+ case "mtime":
8761
+ s3[n] = new Date(Number(o) * 1e3);
8762
+ break;
8763
+ case "size":
8764
+ let h = +o;
8765
+ h >= 0 && (s3[n] = h);
8766
+ break;
8767
+ case "gid":
8768
+ case "uid":
8769
+ case "dev":
8770
+ case "ino":
8771
+ case "nlink":
8772
+ case "mode":
8773
+ s3[n] = +o;
8774
+ break;
8775
+ }
8776
+ return s3;
8748
8777
  };
8749
- var _n = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
8750
- var f = _n !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
8751
- var Ve = class extends A {
8778
+ var Ln = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
8779
+ var f = Ln !== "win32" ? (s3) => String(s3) : (s3) => String(s3).replaceAll(/\\/g, "/");
8780
+ var $e = class extends A {
8752
8781
  extended;
8753
8782
  globalExtended;
8754
8783
  header;
@@ -8812,163 +8841,170 @@ var Ve = class extends A {
8812
8841
  t.path && (t.path = f(t.path)), t.linkpath && (t.linkpath = f(t.linkpath)), Object.assign(this, Object.fromEntries(Object.entries(t).filter(([i, r]) => !(r == null || i === "path" && e))));
8813
8842
  }
8814
8843
  };
8815
- var Nt = (s3, t, e, i = {}) => {
8844
+ var Dt = (s3, t, e, i = {}) => {
8816
8845
  s3.file && (i.file = s3.file), s3.cwd && (i.cwd = s3.cwd), i.code = e instanceof Error && e.code || t, i.tarCode = t, !s3.strict && i.recoverable !== false ? (e instanceof Error && (i = Object.assign(e, i), e = e.message), s3.emit("warn", t, e, i)) : e instanceof Error ? s3.emit("error", Object.assign(e, i)) : s3.emit("error", Object.assign(new Error(`${t}: ${e}`), i));
8817
8846
  };
8818
- var Tn = 1024 * 1024;
8819
- var Vi = Buffer.from([31, 139]);
8820
- var $i = Buffer.from([40, 181, 47, 253]);
8821
- var xn = Math.max(Vi.length, $i.length);
8847
+ var Nn = 1024 * 1024;
8848
+ var Xi = Buffer.from([31, 139]);
8849
+ var qi = Buffer.from([40, 181, 47, 253]);
8850
+ var An = Math.max(Xi.length, qi.length);
8822
8851
  var B = /* @__PURE__ */ Symbol("state");
8823
- var Dt = /* @__PURE__ */ Symbol("writeEntry");
8824
- var et = /* @__PURE__ */ Symbol("readEntry");
8825
- var Gi = /* @__PURE__ */ Symbol("nextEntry");
8826
- var Ws = /* @__PURE__ */ Symbol("processEntry");
8852
+ var Nt = /* @__PURE__ */ Symbol("writeEntry");
8853
+ var it = /* @__PURE__ */ Symbol("readEntry");
8854
+ var Zi = /* @__PURE__ */ Symbol("nextEntry");
8855
+ var Zs = /* @__PURE__ */ Symbol("processEntry");
8827
8856
  var V = /* @__PURE__ */ Symbol("extendedHeader");
8828
8857
  var he = /* @__PURE__ */ Symbol("globalExtendedHeader");
8829
- var ft = /* @__PURE__ */ Symbol("meta");
8830
- var Gs = /* @__PURE__ */ Symbol("emitMeta");
8858
+ var dt = /* @__PURE__ */ Symbol("meta");
8859
+ var Ys = /* @__PURE__ */ Symbol("emitMeta");
8831
8860
  var p = /* @__PURE__ */ Symbol("buffer");
8832
- var it = /* @__PURE__ */ Symbol("queue");
8833
- var dt = /* @__PURE__ */ Symbol("ended");
8834
- var Zi = /* @__PURE__ */ Symbol("emittedEnd");
8861
+ var st = /* @__PURE__ */ Symbol("queue");
8862
+ var mt = /* @__PURE__ */ Symbol("ended");
8863
+ var Yi = /* @__PURE__ */ Symbol("emittedEnd");
8835
8864
  var At = /* @__PURE__ */ Symbol("emit");
8836
8865
  var y = /* @__PURE__ */ Symbol("unzip");
8837
- var $e = /* @__PURE__ */ Symbol("consumeChunk");
8838
- var Xe = /* @__PURE__ */ Symbol("consumeChunkSub");
8839
- var Yi = /* @__PURE__ */ Symbol("consumeBody");
8840
- var Zs = /* @__PURE__ */ Symbol("consumeMeta");
8841
- var Ys = /* @__PURE__ */ Symbol("consumeHeader");
8866
+ var Xe = /* @__PURE__ */ Symbol("consumeChunk");
8867
+ var qe = /* @__PURE__ */ Symbol("consumeChunkSub");
8868
+ var Ki = /* @__PURE__ */ Symbol("consumeBody");
8869
+ var Ks = /* @__PURE__ */ Symbol("consumeMeta");
8870
+ var Vs = /* @__PURE__ */ Symbol("consumeHeader");
8842
8871
  var ae = /* @__PURE__ */ Symbol("consuming");
8843
- var Ki = /* @__PURE__ */ Symbol("bufferConcat");
8844
- var qe = /* @__PURE__ */ Symbol("maybeEnd");
8872
+ var Vi = /* @__PURE__ */ Symbol("bufferConcat");
8873
+ var Qe = /* @__PURE__ */ Symbol("maybeEnd");
8845
8874
  var Yt = /* @__PURE__ */ Symbol("writing");
8846
- var ut = /* @__PURE__ */ Symbol("aborted");
8847
- var Qe = /* @__PURE__ */ Symbol("onDone");
8875
+ var $ = /* @__PURE__ */ Symbol("aborted");
8876
+ var Je = /* @__PURE__ */ Symbol("onDone");
8848
8877
  var It = /* @__PURE__ */ Symbol("sawValidEntry");
8849
- var Je = /* @__PURE__ */ Symbol("sawNullBlock");
8850
- var je = /* @__PURE__ */ Symbol("sawEOF");
8851
- var Ks = /* @__PURE__ */ Symbol("closeStream");
8852
- var Ln = () => true;
8853
- var st = class extends On {
8878
+ var je = /* @__PURE__ */ Symbol("sawNullBlock");
8879
+ var ti = /* @__PURE__ */ Symbol("sawEOF");
8880
+ var $s = /* @__PURE__ */ Symbol("closeStream");
8881
+ var In = 1e3;
8882
+ var le = /* @__PURE__ */ Symbol("compressedBytesRead");
8883
+ var $i = /* @__PURE__ */ Symbol("decompressedBytesRead");
8884
+ var Xs = /* @__PURE__ */ Symbol("checkDecompressionRatio");
8885
+ var Cn = () => true;
8886
+ var rt = class extends Dn {
8854
8887
  file;
8855
8888
  strict;
8856
8889
  maxMetaEntrySize;
8857
8890
  filter;
8858
8891
  brotli;
8859
8892
  zstd;
8893
+ maxDecompressionRatio;
8860
8894
  writable = true;
8861
8895
  readable = false;
8862
- [it] = [];
8896
+ [st] = [];
8863
8897
  [p];
8864
- [et];
8865
- [Dt];
8898
+ [it];
8899
+ [Nt];
8866
8900
  [B] = "begin";
8867
- [ft] = "";
8901
+ [dt] = "";
8868
8902
  [V];
8869
8903
  [he];
8870
- [dt] = false;
8904
+ [mt] = false;
8871
8905
  [y];
8872
- [ut] = false;
8906
+ [$] = false;
8873
8907
  [It];
8874
- [Je] = false;
8875
8908
  [je] = false;
8909
+ [ti] = false;
8876
8910
  [Yt] = false;
8877
8911
  [ae] = false;
8878
- [Zi] = false;
8912
+ [Yi] = false;
8913
+ [le] = 0;
8914
+ [$i] = 0;
8879
8915
  constructor(t = {}) {
8880
- super(), this.file = t.file || "", this.on(Qe, () => {
8916
+ super(), this.file = t.file || "", this.on(Je, () => {
8881
8917
  (this[B] === "begin" || this[It] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
8882
- }), t.ondone ? this.on(Qe, t.ondone) : this.on(Qe, () => {
8918
+ }), t.ondone ? this.on(Je, t.ondone) : this.on(Je, () => {
8883
8919
  this.emit("prefinish"), this.emit("finish"), this.emit("end");
8884
- }), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || Tn, this.filter = typeof t.filter == "function" ? t.filter : Ln;
8920
+ }), this.strict = !!t.strict, this.maxDecompressionRatio = typeof t.maxDecompressionRatio == "number" ? t.maxDecompressionRatio : In, this.maxMetaEntrySize = t.maxMetaEntrySize || Nn, this.filter = typeof t.filter == "function" ? t.filter : Cn;
8885
8921
  let e = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
8886
8922
  this.brotli = !(t.gzip || t.zstd) && t.brotli !== void 0 ? t.brotli : e ? void 0 : false;
8887
8923
  let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
8888
- this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[Ks]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onReadEntry == "function" && this.on("entry", t.onReadEntry);
8924
+ this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[$s]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onReadEntry == "function" && this.on("entry", t.onReadEntry);
8889
8925
  }
8890
8926
  warn(t, e, i = {}) {
8891
- Nt(this, t, e, i);
8927
+ Dt(this, t, e, i);
8892
8928
  }
8893
- [Ys](t, e) {
8929
+ [Vs](t, e) {
8894
8930
  this[It] === void 0 && (this[It] = false);
8895
8931
  let i;
8896
8932
  try {
8897
- i = new C(t, e, this[V], this[he]);
8933
+ i = new F(t, e, this[V], this[he]);
8898
8934
  } catch (r) {
8899
8935
  return this.warn("TAR_ENTRY_INVALID", r);
8900
8936
  }
8901
- if (i.nullBlock) this[Je] ? (this[je] = true, this[B] === "begin" && (this[B] = "header"), this[At]("eof")) : (this[Je] = true, this[At]("nullBlock"));
8902
- else if (this[Je] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
8937
+ if (i.nullBlock) this[je] ? (this[ti] = true, this[B] === "begin" && (this[B] = "header"), this[At]("eof")) : (this[je] = true, this[At]("nullBlock"));
8938
+ else if (this[je] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
8903
8939
  else if (!i.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: i });
8904
8940
  else {
8905
8941
  let r = i.type;
8906
8942
  if (/^(Symbolic)?Link$/.test(r) && !i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath required", { header: i });
8907
8943
  else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
8908
8944
  else {
8909
- let n = this[Dt] = new Ve(i, this[V], this[he]);
8945
+ let n = this[Nt] = new $e(i, this[V], this[he]);
8910
8946
  if (!this[It]) if (n.remain) {
8911
8947
  let o = () => {
8912
8948
  n.invalid || (this[It] = true);
8913
8949
  };
8914
8950
  n.on("end", o);
8915
8951
  } else this[It] = true;
8916
- n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B] = "ignore", n.resume()) : n.size > 0 && (this[ft] = "", n.on("data", (o) => this[ft] += o), this[B] = "meta") : (this[V] = void 0, n.ignore = n.ignore || !this.filter(n.path, n), n.ignore ? (this[At]("ignoredEntry", n), this[B] = n.remain ? "ignore" : "header", n.resume()) : (n.remain ? this[B] = "body" : (this[B] = "header", n.end()), this[et] ? this[it].push(n) : (this[it].push(n), this[Gi]())));
8952
+ n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B] = "ignore", n.resume()) : n.size > 0 && (this[dt] = "", n.on("data", (o) => this[dt] += o), this[B] = "meta") : (this[V] = void 0, n.ignore = n.ignore || !this.filter(n.path, n), n.ignore ? (this[At]("ignoredEntry", n), this[B] = n.remain ? "ignore" : "header", n.resume()) : (n.remain ? this[B] = "body" : (this[B] = "header", n.end()), this[it] ? this[st].push(n) : (this[st].push(n), this[Zi]())));
8917
8953
  }
8918
8954
  }
8919
8955
  }
8920
- [Ks]() {
8956
+ [$s]() {
8921
8957
  queueMicrotask(() => this.emit("close"));
8922
8958
  }
8923
- [Ws](t) {
8959
+ [Zs](t) {
8924
8960
  let e = true;
8925
- if (!t) this[et] = void 0, e = false;
8961
+ if (!t) this[it] = void 0, e = false;
8926
8962
  else if (Array.isArray(t)) {
8927
8963
  let [i, ...r] = t;
8928
8964
  this.emit(i, ...r);
8929
- } else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Gi]()), e = false);
8965
+ } else this[it] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Zi]()), e = false);
8930
8966
  return e;
8931
8967
  }
8932
- [Gi]() {
8968
+ [Zi]() {
8933
8969
  do
8934
8970
  ;
8935
- while (this[Ws](this[it].shift()));
8936
- if (this[it].length === 0) {
8937
- let t = this[et];
8971
+ while (this[Zs](this[st].shift()));
8972
+ if (this[st].length === 0) {
8973
+ let t = this[it];
8938
8974
  !t || t.flowing || t.size === t.remain ? this[Yt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
8939
8975
  }
8940
8976
  }
8941
- [Yi](t, e) {
8942
- let i = this[Dt];
8977
+ [Ki](t, e) {
8978
+ let i = this[Nt];
8943
8979
  if (!i) throw new Error("attempt to consume body without entry??");
8944
8980
  let r = i.blockRemain ?? 0, n = r >= t.length && e === 0 ? t : t.subarray(e, e + r);
8945
- return i.write(n), i.blockRemain || (this[B] = "header", this[Dt] = void 0, i.end()), n.length;
8981
+ return i.write(n), i.blockRemain || (this[B] = "header", this[Nt] = void 0, i.end()), n.length;
8946
8982
  }
8947
- [Zs](t, e) {
8948
- let i = this[Dt], r = this[Yi](t, e);
8949
- return !this[Dt] && i && this[Gs](i), r;
8983
+ [Ks](t, e) {
8984
+ let i = this[Nt], r = this[Ki](t, e);
8985
+ return !this[Nt] && i && this[Ys](i), r;
8950
8986
  }
8951
8987
  [At](t, e, i) {
8952
- this[it].length === 0 && !this[et] ? this.emit(t, e, i) : this[it].push([t, e, i]);
8988
+ this[st].length === 0 && !this[it] ? this.emit(t, e, i) : this[st].push([t, e, i]);
8953
8989
  }
8954
- [Gs](t) {
8955
- switch (this[At]("meta", this[ft]), t.type) {
8990
+ [Ys](t) {
8991
+ switch (this[At]("meta", this[dt]), t.type) {
8956
8992
  case "ExtendedHeader":
8957
8993
  case "OldExtendedHeader":
8958
- this[V] = ct.parse(this[ft], this[V], false);
8994
+ this[V] = ft.parse(this[dt], this[V], false);
8959
8995
  break;
8960
8996
  case "GlobalExtendedHeader":
8961
- this[he] = ct.parse(this[ft], this[he], true);
8997
+ this[he] = ft.parse(this[dt], this[he], true);
8962
8998
  break;
8963
8999
  case "NextFileHasLongPath":
8964
9000
  case "OldGnuLongPath": {
8965
9001
  let e = this[V] ?? /* @__PURE__ */ Object.create(null);
8966
- this[V] = e, e.path = this[ft].replace(/\0.*/, "");
9002
+ this[V] = e, e.path = this[dt].replace(/\0.*/, "");
8967
9003
  break;
8968
9004
  }
8969
9005
  case "NextFileHasLongLinkpath": {
8970
9006
  let e = this[V] || /* @__PURE__ */ Object.create(null);
8971
- this[V] = e, e.linkpath = this[ft].replace(/\0.*/, "");
9007
+ this[V] = e, e.linkpath = this[dt].replace(/\0.*/, "");
8972
9008
  break;
8973
9009
  }
8974
9010
  default:
@@ -8976,86 +9012,95 @@ var st = class extends On {
8976
9012
  }
8977
9013
  }
8978
9014
  abort(t) {
8979
- this[ut] = true, this.emit("abort", t), this.warn("TAR_ABORT", t, { recoverable: false });
9015
+ this[$] || (this[$] = true, this.emit("abort", t), this.warn("TAR_ABORT", t, { recoverable: false }));
9016
+ }
9017
+ [Xs](t) {
9018
+ this[$i] += t.length;
9019
+ let e = this[$i] / this[le];
9020
+ return e > this.maxDecompressionRatio ? (this.abort(new Error(`max decompression ratio exceeded: ${e.toFixed(2)} > ${this.maxDecompressionRatio}`)), false) : true;
8980
9021
  }
8981
9022
  write(t, e, i) {
8982
- if (typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8")), this[ut]) return i?.(), false;
9023
+ if (typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8")), this[$]) return i?.(), false;
8983
9024
  if ((this[y] === void 0 || this.brotli === void 0 && this[y] === false) && t) {
8984
- if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < xn) return this[p] = t, i?.(), true;
8985
- for (let h = 0; this[y] === void 0 && h < Vi.length; h++) t[h] !== Vi[h] && (this[y] = false);
9025
+ if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < An) return this[p] = t, i?.(), true;
9026
+ for (let a = 0; this[y] === void 0 && a < Xi.length; a++) t[a] !== Xi[a] && (this[y] = false);
8986
9027
  let o = false;
8987
9028
  if (this[y] === false && this.zstd !== false) {
8988
9029
  o = true;
8989
- for (let h = 0; h < $i.length; h++) if (t[h] !== $i[h]) {
9030
+ for (let a = 0; a < qi.length; a++) if (t[a] !== qi[a]) {
8990
9031
  o = false;
8991
9032
  break;
8992
9033
  }
8993
9034
  }
8994
- let a = this.brotli === void 0 && !o;
8995
- if (this[y] === false && a) if (t.length < 512) if (this[dt]) this.brotli = true;
9035
+ let h = this.brotli === void 0 && !o;
9036
+ if (this[y] === false && h) if (t.length < 512) if (this[mt]) this.brotli = true;
8996
9037
  else return this[p] = t, i?.(), true;
8997
9038
  else try {
8998
- new C(t.subarray(0, 512)), this.brotli = false;
9039
+ new F(t.subarray(0, 512)), this.brotli = false;
8999
9040
  } catch {
9000
9041
  this.brotli = true;
9001
9042
  }
9002
9043
  if (this[y] === void 0 || this[y] === false && (this.brotli || o)) {
9003
- let h = this[dt];
9004
- this[dt] = false, this[y] = this[y] === void 0 ? new ze({}) : o ? new Ye({}) : new We({}), this[y].on("data", (c) => this[$e](c)), this[y].on("error", (c) => this.abort(c)), this[y].on("end", () => {
9005
- this[dt] = true, this[$e]();
9006
- }), this[Yt] = true;
9007
- let l = !!this[y][h ? "end" : "write"](t);
9044
+ let a = this[mt];
9045
+ this[mt] = false, this[y] = this[y] === void 0 ? new Ue({}) : o ? new Ke({}) : new Ge({}), this[y].on("data", (c) => {
9046
+ this[Xs](c) && this[Xe](c);
9047
+ }), this[y].on("error", (c) => {
9048
+ this[$] || this.abort(c);
9049
+ }), this[y].on("end", () => {
9050
+ this[mt] = true, this[Xe]();
9051
+ }), this[Yt] = true, this[le] += t.length;
9052
+ let l = !!this[y][a ? "end" : "write"](t);
9008
9053
  return this[Yt] = false, i?.(), l;
9009
9054
  }
9010
9055
  }
9011
- this[Yt] = true, this[y] ? this[y].write(t) : this[$e](t), this[Yt] = false;
9012
- let n = this[it].length > 0 ? false : this[et] ? this[et].flowing : true;
9013
- return !n && this[it].length === 0 && this[et]?.once("drain", () => this.emit("drain")), i?.(), n;
9056
+ this[Yt] = true, this[y] ? (this[le] += t.length, this[y].write(t)) : this[Xe](t), this[Yt] = false;
9057
+ let n = this[st].length > 0 ? false : this[it] ? this[it].flowing : true;
9058
+ return !n && this[st].length === 0 && this[it]?.once("drain", () => this.emit("drain")), i?.(), n;
9014
9059
  }
9015
- [Ki](t) {
9016
- t && !this[ut] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
9060
+ [Vi](t) {
9061
+ t && !this[$] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
9017
9062
  }
9018
- [qe]() {
9019
- if (this[dt] && !this[Zi] && !this[ut] && !this[ae]) {
9020
- this[Zi] = true;
9021
- let t = this[Dt];
9022
- if (t && t.blockRemain) {
9063
+ [Qe]() {
9064
+ if (this[mt] && !this[Yi] && !this[$] && !this[ae]) {
9065
+ this[Yi] = true;
9066
+ let t = this[Nt];
9067
+ if (t?.blockRemain) {
9023
9068
  let e = this[p] ? this[p].length : 0;
9024
9069
  this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${t.blockRemain} more bytes, only ${e} available)`, { entry: t }), this[p] && t.write(this[p]), t.end();
9025
9070
  }
9026
- this[At](Qe);
9071
+ this[At](Je);
9027
9072
  }
9028
9073
  }
9029
- [$e](t) {
9030
- if (this[ae] && t) this[Ki](t);
9031
- else if (!t && !this[p]) this[qe]();
9074
+ [Xe](t) {
9075
+ if (this[ae] && t) this[Vi](t);
9076
+ else if (!t && !this[p]) this[Qe]();
9032
9077
  else if (t) {
9033
9078
  if (this[ae] = true, this[p]) {
9034
- this[Ki](t);
9079
+ this[Vi](t);
9035
9080
  let e = this[p];
9036
- this[p] = void 0, this[Xe](e);
9037
- } else this[Xe](t);
9038
- for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[je]; ) {
9081
+ this[p] = void 0, this[qe](e);
9082
+ } else this[qe](t);
9083
+ for (; this[p] && this[p]?.length >= 512 && !this[$] && !this[ti]; ) {
9039
9084
  let e = this[p];
9040
- this[p] = void 0, this[Xe](e);
9085
+ this[p] = void 0, this[qe](e);
9041
9086
  }
9042
9087
  this[ae] = false;
9043
9088
  }
9044
- (!this[p] || this[dt]) && this[qe]();
9089
+ (!this[p] || this[mt]) && this[Qe]();
9045
9090
  }
9046
- [Xe](t) {
9091
+ [qe](t) {
9047
9092
  let e = 0, i = t.length;
9048
- for (; e + 512 <= i && !this[ut] && !this[je]; ) switch (this[B]) {
9093
+ for (; e + 512 <= i && !this[$] && !this[ti]; ) switch (this[B]) {
9049
9094
  case "begin":
9050
9095
  case "header":
9051
- this[Ys](t, e), e += 512;
9096
+ this[Vs](t, e), e += 512;
9052
9097
  break;
9053
9098
  case "ignore":
9054
9099
  case "body":
9055
- e += this[Yi](t, e);
9100
+ e += this[Ki](t, e);
9056
9101
  break;
9057
9102
  case "meta":
9058
- e += this[Zs](t, e);
9103
+ e += this[Ks](t, e);
9059
9104
  break;
9060
9105
  default:
9061
9106
  throw new Error("invalid state: " + this[B]);
@@ -9063,46 +9108,46 @@ var st = class extends On {
9063
9108
  e < i && (this[p] = this[p] ? Buffer.concat([t.subarray(e), this[p]]) : t.subarray(e));
9064
9109
  }
9065
9110
  end(t, e, i) {
9066
- return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e)), i && this.once("finish", i), this[ut] || (this[y] ? (t && this[y].write(t), this[y].end()) : (this[dt] = true, (this.brotli === void 0 || this.zstd === void 0) && (t = t || Buffer.alloc(0)), t && this.write(t), this[qe]())), this;
9111
+ return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e)), i && this.once("finish", i), this[$] || (this[y] ? (t && (this[le] += t.length, this[y].write(t)), this[y].end()) : (this[mt] = true, (this.brotli === void 0 || this.zstd === void 0) && (t = t || Buffer.alloc(0)), t && this.write(t), this[Qe]())), this;
9067
9112
  }
9068
9113
  };
9069
- var mt = (s3) => {
9114
+ var ut = (s3) => {
9070
9115
  let t = s3.length - 1, e = -1;
9071
9116
  for (; t > -1 && s3.charAt(t) === "/"; ) e = t, t--;
9072
9117
  return e === -1 ? s3 : s3.slice(0, e);
9073
9118
  };
9074
- var An = (s3) => {
9119
+ var vn = (s3) => {
9075
9120
  let t = s3.onReadEntry;
9076
9121
  s3.onReadEntry = t ? (e) => {
9077
9122
  t(e), e.resume();
9078
9123
  } : (e) => e.resume();
9079
9124
  };
9080
- var Xi = (s3, t) => {
9081
- let e = new Map(t.map((n) => [mt(n), true])), i = s3.filter, r = (n, o = "") => {
9082
- let a = o || Dn(n).root || ".", h;
9083
- if (n === a) h = false;
9125
+ var Qi = (s3, t) => {
9126
+ let e = new Map(t.map((n) => [ut(n), true])), i = s3.filter, r = (n, o = "") => {
9127
+ let h = o || kn(n).root || ".", a;
9128
+ if (n === h) a = false;
9084
9129
  else {
9085
9130
  let l = e.get(n);
9086
- h = l !== void 0 ? l : r(Nn(n), a);
9131
+ a = l !== void 0 ? l : r(Fn(n), h);
9087
9132
  }
9088
- return e.set(n, h), h;
9133
+ return e.set(n, a), a;
9089
9134
  };
9090
- s3.filter = i ? (n, o) => i(n, o) && r(mt(n)) : (n) => r(mt(n));
9135
+ s3.filter = i ? (n, o) => i(n, o) && r(ut(n)) : (n) => r(ut(n));
9091
9136
  };
9092
- var In = (s3) => {
9093
- let t = new st(s3), e = s3.file, i;
9137
+ var Mn = (s3) => {
9138
+ let t = new rt(s3), e = s3.file, i;
9094
9139
  try {
9095
9140
  i = Kt.openSync(e, "r");
9096
9141
  let r = Kt.fstatSync(i), n = s3.maxReadSize || 16 * 1024 * 1024;
9097
9142
  if (r.size < n) {
9098
- let o = Buffer.allocUnsafe(r.size), a = Kt.readSync(i, o, 0, r.size, 0);
9099
- t.end(a === o.byteLength ? o : o.subarray(0, a));
9143
+ let o = Buffer.allocUnsafe(r.size), h = Kt.readSync(i, o, 0, r.size, 0);
9144
+ t.end(h === o.byteLength ? o : o.subarray(0, h));
9100
9145
  } else {
9101
- let o = 0, a = Buffer.allocUnsafe(n);
9146
+ let o = 0, h = Buffer.allocUnsafe(n);
9102
9147
  for (; o < r.size; ) {
9103
- let h = Kt.readSync(i, a, 0, n, o);
9104
- if (h === 0) break;
9105
- o += h, t.write(a.subarray(0, h));
9148
+ let a = Kt.readSync(i, h, 0, n, o);
9149
+ if (a === 0) break;
9150
+ o += a, t.write(h.subarray(0, a));
9106
9151
  }
9107
9152
  t.end();
9108
9153
  }
@@ -9113,58 +9158,58 @@ var In = (s3) => {
9113
9158
  }
9114
9159
  }
9115
9160
  };
9116
- var Fn = (s3, t) => {
9117
- let e = new st(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
9118
- return new Promise((o, a) => {
9119
- e.on("error", a), e.on("end", o), Kt.stat(r, (h, l) => {
9120
- if (h) a(h);
9161
+ var Bn = (s3, t) => {
9162
+ let e = new rt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
9163
+ return new Promise((o, h) => {
9164
+ e.on("error", h), e.on("end", o), Kt.stat(r, (a, l) => {
9165
+ if (a) h(a);
9121
9166
  else {
9122
9167
  let c = new _t(r, { readSize: i, size: l.size });
9123
- c.on("error", a), c.pipe(e);
9168
+ c.on("error", h), c.pipe(e);
9124
9169
  }
9125
9170
  });
9126
9171
  });
9127
9172
  };
9128
- var Ft = K(In, Fn, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
9129
- t?.length && Xi(s3, t), s3.noResume || An(s3);
9173
+ var Ct = K(Mn, Bn, (s3) => new rt(s3), (s3) => new rt(s3), (s3, t) => {
9174
+ t?.length && Qi(s3, t), s3.noResume || vn(s3);
9130
9175
  });
9131
- var qi = (s3, t, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
9132
- var { isAbsolute: kn, parse: Vs } = Cn;
9133
- var le = (s3) => {
9134
- let t = "", e = Vs(s3);
9135
- for (; kn(s3) || e.root; ) {
9176
+ var Ji = (s3, t, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
9177
+ var { isAbsolute: zn, parse: qs } = Pn;
9178
+ var ce = (s3) => {
9179
+ let t = "", e = qs(s3);
9180
+ for (; zn(s3) || e.root; ) {
9136
9181
  let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
9137
- s3 = s3.slice(i.length), t += i, e = Vs(s3);
9182
+ s3 = s3.slice(i.length), t += i, e = qs(s3);
9138
9183
  }
9139
9184
  return [t, s3];
9140
9185
  };
9141
- var ti = ["|", "<", ">", "?", ":"];
9142
- var Qi = ti.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
9143
- var vn = new Map(ti.map((s3, t) => [s3, Qi[t]]));
9144
- var Mn = new Map(Qi.map((s3, t) => [s3, ti[t]]));
9145
- var Ji = (s3) => ti.reduce((t, e) => t.split(e).join(vn.get(e)), s3);
9146
- var $s = (s3) => Qi.reduce((t, e) => t.split(e).join(Mn.get(e)), s3);
9147
- var er = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
9148
- var Bn = 16 * 1024 * 1024;
9149
- var Qs = /* @__PURE__ */ Symbol("process");
9150
- var Js = /* @__PURE__ */ Symbol("file");
9151
- var js = /* @__PURE__ */ Symbol("directory");
9152
- var ts = /* @__PURE__ */ Symbol("symlink");
9153
- var tr = /* @__PURE__ */ Symbol("hardlink");
9154
- var ce = /* @__PURE__ */ Symbol("header");
9155
- var ei = /* @__PURE__ */ Symbol("read");
9156
- var es = /* @__PURE__ */ Symbol("lstat");
9157
- var ii = /* @__PURE__ */ Symbol("onlstat");
9158
- var is = /* @__PURE__ */ Symbol("onread");
9159
- var ss = /* @__PURE__ */ Symbol("onreadlink");
9160
- var rs = /* @__PURE__ */ Symbol("openfile");
9161
- var ns = /* @__PURE__ */ Symbol("onopenfile");
9186
+ var ei = ["|", "<", ">", "?", ":"];
9187
+ var ji = ei.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
9188
+ var Un = new Map(ei.map((s3, t) => [s3, ji[t]]));
9189
+ var Hn = new Map(ji.map((s3, t) => [s3, ei[t]]));
9190
+ var ts = (s3) => ei.reduce((t, e) => t.split(e).join(Un.get(e)), s3);
9191
+ var Qs = (s3) => ji.reduce((t, e) => t.split(e).join(Hn.get(e)), s3);
9192
+ var rr = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), ut(t) + "/" + s3) : f(s3);
9193
+ var Wn = 16 * 1024 * 1024;
9194
+ var tr = /* @__PURE__ */ Symbol("process");
9195
+ var er = /* @__PURE__ */ Symbol("file");
9196
+ var ir = /* @__PURE__ */ Symbol("directory");
9197
+ var is = /* @__PURE__ */ Symbol("symlink");
9198
+ var sr = /* @__PURE__ */ Symbol("hardlink");
9199
+ var fe = /* @__PURE__ */ Symbol("header");
9200
+ var ii = /* @__PURE__ */ Symbol("read");
9201
+ var ss = /* @__PURE__ */ Symbol("lstat");
9202
+ var si = /* @__PURE__ */ Symbol("onlstat");
9203
+ var rs = /* @__PURE__ */ Symbol("onread");
9204
+ var ns = /* @__PURE__ */ Symbol("onreadlink");
9205
+ var os = /* @__PURE__ */ Symbol("openfile");
9206
+ var hs = /* @__PURE__ */ Symbol("onopenfile");
9162
9207
  var pt = /* @__PURE__ */ Symbol("close");
9163
- var si = /* @__PURE__ */ Symbol("mode");
9164
- var os = /* @__PURE__ */ Symbol("awaitDrain");
9165
- var ji = /* @__PURE__ */ Symbol("ondrain");
9166
- var X = /* @__PURE__ */ Symbol("prefix");
9167
- var fe = class extends A {
9208
+ var ri = /* @__PURE__ */ Symbol("mode");
9209
+ var as = /* @__PURE__ */ Symbol("awaitDrain");
9210
+ var es = /* @__PURE__ */ Symbol("ondrain");
9211
+ var q = /* @__PURE__ */ Symbol("prefix");
9212
+ var de = class extends A {
9168
9213
  path;
9169
9214
  portable;
9170
9215
  myuid = process.getuid && process.getuid() || 0;
@@ -9197,109 +9242,109 @@ var fe = class extends A {
9197
9242
  #t = false;
9198
9243
  constructor(t, e = {}) {
9199
9244
  let i = se(e);
9200
- super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || Bn, this.linkCache = i.linkCache || /* @__PURE__ */ new Map(), this.statCache = i.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!i.preservePaths, this.cwd = f(i.cwd || process.cwd()), this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.mtime = i.mtime, this.prefix = i.prefix ? f(i.prefix) : void 0, this.onWriteEntry = i.onWriteEntry, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
9245
+ super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || Wn, this.linkCache = i.linkCache || /* @__PURE__ */ new Map(), this.statCache = i.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!i.preservePaths, this.cwd = f(i.cwd || process.cwd()), this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.mtime = i.mtime, this.prefix = i.prefix ? f(i.prefix) : void 0, this.onWriteEntry = i.onWriteEntry, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
9201
9246
  let r = false;
9202
9247
  if (!this.preservePaths) {
9203
- let [o, a] = le(this.path);
9204
- o && typeof a == "string" && (this.path = a, r = o);
9248
+ let [o, h] = ce(this.path);
9249
+ o && typeof h == "string" && (this.path = h, r = o);
9205
9250
  }
9206
- this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = $s(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || qs.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
9251
+ this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Qs(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || js.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
9207
9252
  let n = this.statCache.get(this.absolute);
9208
- n ? this[ii](n) : this[es]();
9253
+ n ? this[si](n) : this[ss]();
9209
9254
  }
9210
9255
  warn(t, e, i = {}) {
9211
- return Nt(this, t, e, i);
9256
+ return Dt(this, t, e, i);
9212
9257
  }
9213
9258
  emit(t, ...e) {
9214
9259
  return t === "error" && (this.#t = true), super.emit(t, ...e);
9215
9260
  }
9216
- [es]() {
9217
- $.lstat(this.absolute, (t, e) => {
9261
+ [ss]() {
9262
+ X.lstat(this.absolute, (t, e) => {
9218
9263
  if (t) return this.emit("error", t);
9219
- this[ii](e);
9264
+ this[si](e);
9220
9265
  });
9221
9266
  }
9222
- [ii](t) {
9223
- this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Pn(t), this.emit("stat", t), this[Qs]();
9267
+ [si](t) {
9268
+ this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Gn(t), this.emit("stat", t), this[tr]();
9224
9269
  }
9225
- [Qs]() {
9270
+ [tr]() {
9226
9271
  switch (this.type) {
9227
9272
  case "File":
9228
- return this[Js]();
9273
+ return this[er]();
9229
9274
  case "Directory":
9230
- return this[js]();
9275
+ return this[ir]();
9231
9276
  case "SymbolicLink":
9232
- return this[ts]();
9277
+ return this[is]();
9233
9278
  default:
9234
9279
  return this.end();
9235
9280
  }
9236
9281
  }
9237
- [si](t) {
9238
- return qi(t, this.type === "Directory", this.portable);
9282
+ [ri](t) {
9283
+ return Ji(t, this.type === "Directory", this.portable);
9239
9284
  }
9240
- [X](t) {
9241
- return er(t, this.prefix);
9285
+ [q](t) {
9286
+ return rr(t, this.prefix);
9242
9287
  }
9243
- [ce]() {
9288
+ [fe]() {
9244
9289
  if (!this.stat) throw new Error("cannot write header before stat");
9245
- this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new C({ path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, mode: this[si](this.stat.mode), uid: this.portable ? void 0 : this.stat.uid, gid: this.portable ? void 0 : this.stat.gid, size: this.stat.size, mtime: this.noMtime ? void 0 : this.mtime || this.stat.mtime, type: this.type === "Unsupported" ? void 0 : this.type, uname: this.portable ? void 0 : this.stat.uid === this.myuid ? this.myuser : "", atime: this.portable ? void 0 : this.stat.atime, ctime: this.portable ? void 0 : this.stat.ctime }), this.header.encode() && !this.noPax && super.write(new ct({ atime: this.portable ? void 0 : this.header.atime, ctime: this.portable ? void 0 : this.header.ctime, gid: this.portable ? void 0 : this.header.gid, mtime: this.noMtime ? void 0 : this.mtime || this.header.mtime, path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, size: this.header.size, uid: this.portable ? void 0 : this.header.uid, uname: this.portable ? void 0 : this.header.uname, dev: this.portable ? void 0 : this.stat.dev, ino: this.portable ? void 0 : this.stat.ino, nlink: this.portable ? void 0 : this.stat.nlink }).encode());
9290
+ this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new F({ path: this[q](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q](this.linkpath) : this.linkpath, mode: this[ri](this.stat.mode), uid: this.portable ? void 0 : this.stat.uid, gid: this.portable ? void 0 : this.stat.gid, size: this.stat.size, mtime: this.noMtime ? void 0 : this.mtime || this.stat.mtime, type: this.type === "Unsupported" ? void 0 : this.type, uname: this.portable ? void 0 : this.stat.uid === this.myuid ? this.myuser : "", atime: this.portable ? void 0 : this.stat.atime, ctime: this.portable ? void 0 : this.stat.ctime }), this.header.encode() && !this.noPax && super.write(new ft({ atime: this.portable ? void 0 : this.header.atime, ctime: this.portable ? void 0 : this.header.ctime, gid: this.portable ? void 0 : this.header.gid, mtime: this.noMtime ? void 0 : this.mtime || this.header.mtime, path: this[q](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q](this.linkpath) : this.linkpath, size: this.header.size, uid: this.portable ? void 0 : this.header.uid, uname: this.portable ? void 0 : this.header.uname, dev: this.portable ? void 0 : this.stat.dev, ino: this.portable ? void 0 : this.stat.ino, nlink: this.portable ? void 0 : this.stat.nlink }).encode());
9246
9291
  let t = this.header?.block;
9247
9292
  if (!t) throw new Error("failed to encode header");
9248
9293
  super.write(t);
9249
9294
  }
9250
- [js]() {
9295
+ [ir]() {
9251
9296
  if (!this.stat) throw new Error("cannot create directory entry without stat");
9252
- this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[ce](), this.end();
9297
+ this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
9253
9298
  }
9254
- [ts]() {
9255
- $.readlink(this.absolute, (t, e) => {
9299
+ [is]() {
9300
+ X.readlink(this.absolute, (t, e) => {
9256
9301
  if (t) return this.emit("error", t);
9257
- this[ss](e);
9302
+ this[ns](e);
9258
9303
  });
9259
9304
  }
9260
- [ss](t) {
9261
- this.linkpath = f(t), this[ce](), this.end();
9305
+ [ns](t) {
9306
+ this.linkpath = f(t), this[fe](), this.end();
9262
9307
  }
9263
- [tr](t) {
9308
+ [sr](t) {
9264
9309
  if (!this.stat) throw new Error("cannot create link entry without stat");
9265
- this.type = "Link", this.linkpath = f(qs.relative(this.cwd, t)), this.stat.size = 0, this[ce](), this.end();
9310
+ this.type = "Link", this.linkpath = f(js.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
9266
9311
  }
9267
- [Js]() {
9312
+ [er]() {
9268
9313
  if (!this.stat) throw new Error("cannot create file entry without stat");
9269
9314
  if (this.stat.nlink > 1) {
9270
9315
  let t = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t);
9271
- if (e?.indexOf(this.cwd) === 0) return this[tr](e);
9316
+ if (e?.indexOf(this.cwd) === 0) return this[sr](e);
9272
9317
  this.linkCache.set(t, this.absolute);
9273
9318
  }
9274
- if (this[ce](), this.stat.size === 0) return this.end();
9275
- this[rs]();
9319
+ if (this[fe](), this.stat.size === 0) return this.end();
9320
+ this[os]();
9276
9321
  }
9277
- [rs]() {
9278
- $.open(this.absolute, "r", (t, e) => {
9322
+ [os]() {
9323
+ X.open(this.absolute, "r", (t, e) => {
9279
9324
  if (t) return this.emit("error", t);
9280
- this[ns](e);
9325
+ this[hs](e);
9281
9326
  });
9282
9327
  }
9283
- [ns](t) {
9328
+ [hs](t) {
9284
9329
  if (this.fd = t, this.#t) return this[pt]();
9285
9330
  if (!this.stat) throw new Error("should stat before calling onopenfile");
9286
9331
  this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
9287
9332
  let e = Math.min(this.blockLen, this.maxReadSize);
9288
- this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ei]();
9333
+ this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ii]();
9289
9334
  }
9290
- [ei]() {
9335
+ [ii]() {
9291
9336
  let { fd: t, buf: e, offset: i, length: r, pos: n } = this;
9292
9337
  if (t === void 0 || e === void 0) throw new Error("cannot read file without first opening");
9293
- $.read(t, e, i, r, n, (o, a) => {
9338
+ X.read(t, e, i, r, n, (o, h) => {
9294
9339
  if (o) return this[pt](() => this.emit("error", o));
9295
- this[is](a);
9340
+ this[rs](h);
9296
9341
  });
9297
9342
  }
9298
9343
  [pt](t = () => {
9299
9344
  }) {
9300
- this.fd !== void 0 && $.close(this.fd, t);
9345
+ this.fd !== void 0 && X.close(this.fd, t);
9301
9346
  }
9302
- [is](t) {
9347
+ [rs](t) {
9303
9348
  if (t <= 0 && this.remain > 0) {
9304
9349
  let r = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
9305
9350
  return this[pt](() => this.emit("error", r));
@@ -9311,9 +9356,9 @@ var fe = class extends A {
9311
9356
  if (!this.buf) throw new Error("should have created buffer prior to reading");
9312
9357
  if (t === this.remain) for (let r = t; r < this.length && t < this.blockRemain; r++) this.buf[r + this.offset] = 0, t++, this.remain++;
9313
9358
  let e = this.offset === 0 && t === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t);
9314
- this.write(e) ? this[ji]() : this[os](() => this[ji]());
9359
+ this.write(e) ? this[es]() : this[as](() => this[es]());
9315
9360
  }
9316
- [os](t) {
9361
+ [as](t) {
9317
9362
  this.once("drain", t);
9318
9363
  }
9319
9364
  write(t, e, i) {
@@ -9323,30 +9368,30 @@ var fe = class extends A {
9323
9368
  }
9324
9369
  return this.remain -= t.length, this.blockRemain -= t.length, this.pos += t.length, this.offset += t.length, super.write(t, null, i);
9325
9370
  }
9326
- [ji]() {
9371
+ [es]() {
9327
9372
  if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t) => t ? this.emit("error", t) : this.end());
9328
9373
  if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
9329
- this.offset >= this.length && (this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)), this.offset = 0), this.length = this.buf.length - this.offset, this[ei]();
9374
+ this.offset >= this.length && (this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)), this.offset = 0), this.length = this.buf.length - this.offset, this[ii]();
9330
9375
  }
9331
9376
  };
9332
- var ri = class extends fe {
9377
+ var ni = class extends de {
9333
9378
  sync = true;
9334
- [es]() {
9335
- this[ii]($.lstatSync(this.absolute));
9379
+ [ss]() {
9380
+ this[si](X.lstatSync(this.absolute));
9336
9381
  }
9337
- [ts]() {
9338
- this[ss]($.readlinkSync(this.absolute));
9382
+ [is]() {
9383
+ this[ns](X.readlinkSync(this.absolute));
9339
9384
  }
9340
- [rs]() {
9341
- this[ns]($.openSync(this.absolute, "r"));
9385
+ [os]() {
9386
+ this[hs](X.openSync(this.absolute, "r"));
9342
9387
  }
9343
- [ei]() {
9388
+ [ii]() {
9344
9389
  let t = true;
9345
9390
  try {
9346
9391
  let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
9347
9392
  if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
9348
- let a = $.readSync(e, i, r, n, o);
9349
- this[is](a), t = false;
9393
+ let h = X.readSync(e, i, r, n, o);
9394
+ this[rs](h), t = false;
9350
9395
  } finally {
9351
9396
  if (t) try {
9352
9397
  this[pt](() => {
@@ -9355,15 +9400,15 @@ var ri = class extends fe {
9355
9400
  }
9356
9401
  }
9357
9402
  }
9358
- [os](t) {
9403
+ [as](t) {
9359
9404
  t();
9360
9405
  }
9361
9406
  [pt](t = () => {
9362
9407
  }) {
9363
- this.fd !== void 0 && $.closeSync(this.fd), t();
9408
+ this.fd !== void 0 && X.closeSync(this.fd), t();
9364
9409
  }
9365
9410
  };
9366
- var ni = class extends A {
9411
+ var oi = class extends A {
9367
9412
  blockLen = 0;
9368
9413
  blockRemain = 0;
9369
9414
  buf = 0;
@@ -9392,29 +9437,29 @@ var ni = class extends A {
9392
9437
  size;
9393
9438
  onWriteEntry;
9394
9439
  warn(t, e, i = {}) {
9395
- return Nt(this, t, e, i);
9440
+ return Dt(this, t, e, i);
9396
9441
  }
9397
9442
  constructor(t, e = {}) {
9398
9443
  let i = se(e);
9399
9444
  super(), this.preservePaths = !!i.preservePaths, this.portable = !!i.portable, this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.onWriteEntry = i.onWriteEntry, this.readEntry = t;
9400
9445
  let { type: r } = t;
9401
9446
  if (r === "Unsupported") throw new Error("writing entry that should be ignored");
9402
- this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f(t.path), this.mode = t.mode !== void 0 ? this[si](t.mode) : void 0, this.uid = this.portable ? void 0 : t.uid, this.gid = this.portable ? void 0 : t.gid, this.uname = this.portable ? void 0 : t.uname, this.gname = this.portable ? void 0 : t.gname, this.size = t.size, this.mtime = this.noMtime ? void 0 : i.mtime || t.mtime, this.atime = this.portable ? void 0 : t.atime, this.ctime = this.portable ? void 0 : t.ctime, this.linkpath = t.linkpath !== void 0 ? f(t.linkpath) : void 0, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
9447
+ this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f(t.path), this.mode = t.mode !== void 0 ? this[ri](t.mode) : void 0, this.uid = this.portable ? void 0 : t.uid, this.gid = this.portable ? void 0 : t.gid, this.uname = this.portable ? void 0 : t.uname, this.gname = this.portable ? void 0 : t.gname, this.size = t.size, this.mtime = this.noMtime ? void 0 : i.mtime || t.mtime, this.atime = this.portable ? void 0 : t.atime, this.ctime = this.portable ? void 0 : t.ctime, this.linkpath = t.linkpath !== void 0 ? f(t.linkpath) : void 0, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
9403
9448
  let n = false;
9404
9449
  if (!this.preservePaths) {
9405
- let [a, h] = le(this.path);
9406
- a && typeof h == "string" && (this.path = h, n = a);
9450
+ let [h, a] = ce(this.path);
9451
+ h && typeof a == "string" && (this.path = a, n = h);
9407
9452
  }
9408
- this.remain = t.size, this.blockRemain = t.startBlockSize, this.onWriteEntry?.(this), this.header = new C({ path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, mode: this.mode, uid: this.portable ? void 0 : this.uid, gid: this.portable ? void 0 : this.gid, size: this.size, mtime: this.noMtime ? void 0 : this.mtime, type: this.type, uname: this.portable ? void 0 : this.uname, atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime }), n && this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute path`, { entry: this, path: n + this.path }), this.header.encode() && !this.noPax && super.write(new ct({ atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime, gid: this.portable ? void 0 : this.gid, mtime: this.noMtime ? void 0 : this.mtime, path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, size: this.size, uid: this.portable ? void 0 : this.uid, uname: this.portable ? void 0 : this.uname, dev: this.portable ? void 0 : this.readEntry.dev, ino: this.portable ? void 0 : this.readEntry.ino, nlink: this.portable ? void 0 : this.readEntry.nlink }).encode());
9453
+ this.remain = t.size, this.blockRemain = t.startBlockSize, this.onWriteEntry?.(this), this.header = new F({ path: this[q](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q](this.linkpath) : this.linkpath, mode: this.mode, uid: this.portable ? void 0 : this.uid, gid: this.portable ? void 0 : this.gid, size: this.size, mtime: this.noMtime ? void 0 : this.mtime, type: this.type, uname: this.portable ? void 0 : this.uname, atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime }), n && this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute path`, { entry: this, path: n + this.path }), this.header.encode() && !this.noPax && super.write(new ft({ atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime, gid: this.portable ? void 0 : this.gid, mtime: this.noMtime ? void 0 : this.mtime, path: this[q](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q](this.linkpath) : this.linkpath, size: this.size, uid: this.portable ? void 0 : this.uid, uname: this.portable ? void 0 : this.uname, dev: this.portable ? void 0 : this.readEntry.dev, ino: this.portable ? void 0 : this.readEntry.ino, nlink: this.portable ? void 0 : this.readEntry.nlink }).encode());
9409
9454
  let o = this.header?.block;
9410
9455
  if (!o) throw new Error("failed to encode header");
9411
9456
  super.write(o), t.pipe(this);
9412
9457
  }
9413
- [X](t) {
9414
- return er(t, this.prefix);
9458
+ [q](t) {
9459
+ return rr(t, this.prefix);
9415
9460
  }
9416
- [si](t) {
9417
- return qi(t, this.type === "Directory", this.portable);
9461
+ [ri](t) {
9462
+ return Ji(t, this.type === "Directory", this.portable);
9418
9463
  }
9419
9464
  write(t, e, i) {
9420
9465
  typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8"));
@@ -9426,8 +9471,8 @@ var ni = class extends A {
9426
9471
  return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e ?? "utf8")), i && this.once("finish", i), t ? super.end(t, i) : super.end(i), this;
9427
9472
  }
9428
9473
  };
9429
- var Pn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
9430
- var oi = class s2 {
9474
+ var Gn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
9475
+ var hi = class s2 {
9431
9476
  tail;
9432
9477
  head;
9433
9478
  length = 0;
@@ -9458,11 +9503,11 @@ var oi = class s2 {
9458
9503
  t.list = this, t.prev = e, e && (e.next = t), this.tail = t, this.head || (this.head = t), this.length++;
9459
9504
  }
9460
9505
  push(...t) {
9461
- for (let e = 0, i = t.length; e < i; e++) Un(this, t[e]);
9506
+ for (let e = 0, i = t.length; e < i; e++) Yn(this, t[e]);
9462
9507
  return this.length;
9463
9508
  }
9464
9509
  unshift(...t) {
9465
- for (var e = 0, i = t.length; e < i; e++) Hn(this, t[e]);
9510
+ for (var e = 0, i = t.length; e < i; e++) Kn(this, t[e]);
9466
9511
  return this.length;
9467
9512
  }
9468
9513
  pop() {
@@ -9558,7 +9603,7 @@ var oi = class s2 {
9558
9603
  let n = [];
9559
9604
  for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
9560
9605
  r ? r !== this.tail && (r = r.prev) : r = this.tail;
9561
- for (let o of i) r = zn(this, r, o);
9606
+ for (let o of i) r = Zn(this, r, o);
9562
9607
  return n;
9563
9608
  }
9564
9609
  reverse() {
@@ -9570,17 +9615,17 @@ var oi = class s2 {
9570
9615
  return this.head = e, this.tail = t, this;
9571
9616
  }
9572
9617
  };
9573
- function zn(s3, t, e) {
9574
- let i = t, r = t ? t.next : s3.head, n = new de(e, i, r, s3);
9618
+ function Zn(s3, t, e) {
9619
+ let i = t, r = t ? t.next : s3.head, n = new me(e, i, r, s3);
9575
9620
  return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
9576
9621
  }
9577
- function Un(s3, t) {
9578
- s3.tail = new de(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
9622
+ function Yn(s3, t) {
9623
+ s3.tail = new me(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
9579
9624
  }
9580
- function Hn(s3, t) {
9581
- s3.head = new de(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
9625
+ function Kn(s3, t) {
9626
+ s3.head = new me(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
9582
9627
  }
9583
- var de = class {
9628
+ var me = class {
9584
9629
  list;
9585
9630
  next;
9586
9631
  prev;
@@ -9589,7 +9634,7 @@ var de = class {
9589
9634
  this.list = r, this.value = t, e ? (e.next = this, this.prev = e) : this.prev = void 0, i ? (i.prev = this, this.next = i) : this.next = void 0;
9590
9635
  }
9591
9636
  };
9592
- var mi = class {
9637
+ var pi = class {
9593
9638
  path;
9594
9639
  absolute;
9595
9640
  entry;
@@ -9603,28 +9648,28 @@ var mi = class {
9603
9648
  this.path = t || "./", this.absolute = e;
9604
9649
  }
9605
9650
  };
9606
- var ir = Buffer.alloc(1024);
9607
- var ai = /* @__PURE__ */ Symbol("onStat");
9651
+ var nr = Buffer.alloc(1024);
9652
+ var li = /* @__PURE__ */ Symbol("onStat");
9608
9653
  var ue = /* @__PURE__ */ Symbol("ended");
9609
9654
  var W = /* @__PURE__ */ Symbol("queue");
9610
- var me = /* @__PURE__ */ Symbol("pendingLinks");
9655
+ var pe = /* @__PURE__ */ Symbol("pendingLinks");
9611
9656
  var Et = /* @__PURE__ */ Symbol("current");
9612
- var Ct = /* @__PURE__ */ Symbol("process");
9613
- var pe = /* @__PURE__ */ Symbol("processing");
9614
- var hi = /* @__PURE__ */ Symbol("processJob");
9657
+ var Ft = /* @__PURE__ */ Symbol("process");
9658
+ var Ee = /* @__PURE__ */ Symbol("processing");
9659
+ var ai = /* @__PURE__ */ Symbol("processJob");
9615
9660
  var G = /* @__PURE__ */ Symbol("jobs");
9616
- var hs = /* @__PURE__ */ Symbol("jobDone");
9617
- var li = /* @__PURE__ */ Symbol("addFSEntry");
9618
- var sr = /* @__PURE__ */ Symbol("addTarEntry");
9619
- var cs = /* @__PURE__ */ Symbol("stat");
9620
- var fs2 = /* @__PURE__ */ Symbol("readdir");
9621
- var ci = /* @__PURE__ */ Symbol("onreaddir");
9622
- var fi = /* @__PURE__ */ Symbol("pipe");
9623
- var rr = /* @__PURE__ */ Symbol("entry");
9624
- var as = /* @__PURE__ */ Symbol("entryOpt");
9625
- var di = /* @__PURE__ */ Symbol("writeEntryClass");
9626
- var or = /* @__PURE__ */ Symbol("write");
9627
- var ls = /* @__PURE__ */ Symbol("ondrain");
9661
+ var ls = /* @__PURE__ */ Symbol("jobDone");
9662
+ var ci = /* @__PURE__ */ Symbol("addFSEntry");
9663
+ var or = /* @__PURE__ */ Symbol("addTarEntry");
9664
+ var ds = /* @__PURE__ */ Symbol("stat");
9665
+ var ms = /* @__PURE__ */ Symbol("readdir");
9666
+ var fi = /* @__PURE__ */ Symbol("onreaddir");
9667
+ var di = /* @__PURE__ */ Symbol("pipe");
9668
+ var hr = /* @__PURE__ */ Symbol("entry");
9669
+ var cs = /* @__PURE__ */ Symbol("entryOpt");
9670
+ var mi = /* @__PURE__ */ Symbol("writeEntryClass");
9671
+ var lr = /* @__PURE__ */ Symbol("write");
9672
+ var fs2 = /* @__PURE__ */ Symbol("ondrain");
9628
9673
  var wt = class extends A {
9629
9674
  sync = false;
9630
9675
  opt;
@@ -9646,139 +9691,139 @@ var wt = class extends A {
9646
9691
  mtime;
9647
9692
  filter;
9648
9693
  jobs;
9649
- [di];
9694
+ [mi];
9650
9695
  onWriteEntry;
9651
9696
  [W];
9652
- [me] = /* @__PURE__ */ new Map();
9697
+ [pe] = /* @__PURE__ */ new Map();
9653
9698
  [G] = 0;
9654
- [pe] = false;
9699
+ [Ee] = false;
9655
9700
  [ue] = false;
9656
9701
  constructor(t = {}) {
9657
- if (super(), this.opt = t, this.file = t.file || "", this.cwd = t.cwd || process.cwd(), this.maxReadSize = t.maxReadSize, this.preservePaths = !!t.preservePaths, this.strict = !!t.strict, this.noPax = !!t.noPax, this.prefix = f(t.prefix || ""), this.linkCache = t.linkCache || /* @__PURE__ */ new Map(), this.statCache = t.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t.onWriteEntry, this[di] = fe, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
9702
+ if (super(), this.opt = t, this.file = t.file || "", this.cwd = t.cwd || process.cwd(), this.maxReadSize = t.maxReadSize, this.preservePaths = !!t.preservePaths, this.strict = !!t.strict, this.noPax = !!t.noPax, this.prefix = f(t.prefix || ""), this.linkCache = t.linkCache || /* @__PURE__ */ new Map(), this.statCache = t.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t.onWriteEntry, this[mi] = de, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
9658
9703
  if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
9659
- if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new Pe(t.gzip)), t.brotli && (typeof t.brotli != "object" && (t.brotli = {}), this.zip = new He(t.brotli)), t.zstd && (typeof t.zstd != "object" && (t.zstd = {}), this.zip = new Ze(t.zstd)), !this.zip) throw new Error("impossible");
9704
+ if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new ze(t.gzip)), t.brotli && (typeof t.brotli != "object" && (t.brotli = {}), this.zip = new We(t.brotli)), t.zstd && (typeof t.zstd != "object" && (t.zstd = {}), this.zip = new Ye(t.zstd)), !this.zip) throw new Error("impossible");
9660
9705
  let e = this.zip;
9661
- e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[ls]()), this.on("resume", () => e.resume());
9662
- } else this.on("drain", this[ls]);
9663
- this.noDirRecurse = !!t.noDirRecurse, this.follow = !!t.follow, this.noMtime = !!t.noMtime, t.mtime && (this.mtime = t.mtime), this.filter = typeof t.filter == "function" ? t.filter : () => true, this[W] = new oi(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[pe] = false, this[ue] = false;
9706
+ e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[fs2]()), this.on("resume", () => e.resume());
9707
+ } else this.on("drain", this[fs2]);
9708
+ this.noDirRecurse = !!t.noDirRecurse, this.follow = !!t.follow, this.noMtime = !!t.noMtime, t.mtime && (this.mtime = t.mtime), this.filter = typeof t.filter == "function" ? t.filter : () => true, this[W] = new hi(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[Ee] = false, this[ue] = false;
9664
9709
  }
9665
- [or](t) {
9710
+ [lr](t) {
9666
9711
  return super.write(t);
9667
9712
  }
9668
9713
  add(t) {
9669
9714
  return this.write(t), this;
9670
9715
  }
9671
9716
  end(t, e, i) {
9672
- return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = void 0), t && this.add(t), this[ue] = true, this[Ct](), i && i(), this;
9717
+ return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = void 0), t && this.add(t), this[ue] = true, this[Ft](), i && i(), this;
9673
9718
  }
9674
9719
  write(t) {
9675
9720
  if (this[ue]) throw new Error("write after end");
9676
- return typeof t == "string" ? this[li](t) : this[sr](t), this.flowing;
9721
+ return typeof t == "string" ? this[ci](t) : this[or](t), this.flowing;
9677
9722
  }
9678
- [sr](t) {
9679
- let e = f(nr.resolve(this.cwd, t.path));
9723
+ [or](t) {
9724
+ let e = f(ar.resolve(this.cwd, t.path));
9680
9725
  if (!this.filter(t.path, t)) t.resume();
9681
9726
  else {
9682
- let i = new mi(t.path, e);
9683
- i.entry = new ni(t, this[as](i)), i.entry.on("end", () => this[hs](i)), this[G] += 1, this[W].push(i);
9727
+ let i = new pi(t.path, e);
9728
+ i.entry = new oi(t, this[cs](i)), i.entry.on("end", () => this[ls](i)), this[G] += 1, this[W].push(i);
9684
9729
  }
9685
- this[Ct]();
9730
+ this[Ft]();
9686
9731
  }
9687
- [li](t) {
9688
- let e = f(nr.resolve(this.cwd, t));
9689
- this[W].push(new mi(t, e)), this[Ct]();
9732
+ [ci](t) {
9733
+ let e = f(ar.resolve(this.cwd, t));
9734
+ this[W].push(new pi(t, e)), this[Ft]();
9690
9735
  }
9691
- [cs](t) {
9736
+ [ds](t) {
9692
9737
  t.pending = true, this[G] += 1;
9693
9738
  let e = this.follow ? "stat" : "lstat";
9694
9739
  ui[e](t.absolute, (i, r) => {
9695
- t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[ai](t, r);
9740
+ t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[li](t, r);
9696
9741
  });
9697
9742
  }
9698
- [ai](t, e) {
9743
+ [li](t, e) {
9699
9744
  if (this.statCache.set(t.absolute, e), t.stat = e, !this.filter(t.path, e)) t.ignore = true;
9700
- else if (e.isFile() && e.nlink > 1 && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync) if (t === this[Et]) this[hi](t);
9745
+ else if (e.isFile() && e.nlink > 1 && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync) if (t === this[Et]) this[ai](t);
9701
9746
  else {
9702
- let i = `${e.dev}:${e.ino}`, r = this[me].get(i);
9703
- r ? r.push(t) : this[me].set(i, [t]), t.pendingLink = true, t.pending = true;
9747
+ let i = `${e.dev}:${e.ino}`, r = this[pe].get(i);
9748
+ r ? r.push(t) : this[pe].set(i, [t]), t.pendingLink = true, t.pending = true;
9704
9749
  }
9705
- this[Ct]();
9750
+ this[Ft]();
9706
9751
  }
9707
- [fs2](t) {
9752
+ [ms](t) {
9708
9753
  t.pending = true, this[G] += 1, ui.readdir(t.absolute, (e, i) => {
9709
9754
  if (t.pending = false, this[G] -= 1, e) return this.emit("error", e);
9710
- this[ci](t, i);
9755
+ this[fi](t, i);
9711
9756
  });
9712
9757
  }
9713
- [ci](t, e) {
9714
- this.readdirCache.set(t.absolute, e), t.readdir = e, this[Ct]();
9758
+ [fi](t, e) {
9759
+ this.readdirCache.set(t.absolute, e), t.readdir = e, this[Ft]();
9715
9760
  }
9716
- [Ct]() {
9717
- if (!this[pe]) {
9718
- this[pe] = true;
9719
- for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[hi](t.value), t.value.ignore) {
9761
+ [Ft]() {
9762
+ if (!this[Ee]) {
9763
+ this[Ee] = true;
9764
+ for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[ai](t.value), t.value.ignore) {
9720
9765
  let e = t.next;
9721
9766
  this[W].removeNode(t), t.next = e;
9722
9767
  }
9723
- this[pe] = false, this[ue] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(ir) : (super.write(ir), super.end()));
9768
+ this[Ee] = false, this[ue] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(nr) : (super.write(nr), super.end()));
9724
9769
  }
9725
9770
  }
9726
9771
  get [Et]() {
9727
9772
  return this[W] && this[W].head && this[W].head.value;
9728
9773
  }
9729
- [hs](t) {
9774
+ [ls](t) {
9730
9775
  this[W].shift(), this[G] -= 1;
9731
9776
  let { stat: e } = t;
9732
9777
  if (e && e.isFile() && e.nlink > 1) {
9733
- let i = `${e.dev}:${e.ino}`, r = this[me].get(i);
9778
+ let i = `${e.dev}:${e.ino}`, r = this[pe].get(i);
9734
9779
  if (r) {
9735
- this[me].delete(i);
9736
- for (let n of r) n.pending = false, this[hi](n);
9780
+ this[pe].delete(i);
9781
+ for (let n of r) n.pending = false, this[ai](n);
9737
9782
  }
9738
9783
  }
9739
- this[Ct]();
9784
+ this[Ft]();
9740
9785
  }
9741
- [hi](t) {
9786
+ [ai](t) {
9742
9787
  if (t.pending && t.pendingLink && t === this[Et] && (t.pending = false, t.pendingLink = false), !t.pending) {
9743
9788
  if (t.entry) {
9744
- t === this[Et] && !t.piped && this[fi](t);
9789
+ t === this[Et] && !t.piped && this[di](t);
9745
9790
  return;
9746
9791
  }
9747
9792
  if (!t.stat) {
9748
9793
  let e = this.statCache.get(t.absolute);
9749
- e ? this[ai](t, e) : this[cs](t);
9794
+ e ? this[li](t, e) : this[ds](t);
9750
9795
  }
9751
9796
  if (t.stat && !t.ignore) {
9752
9797
  if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
9753
9798
  let e = this.readdirCache.get(t.absolute);
9754
- if (e ? this[ci](t, e) : this[fs2](t), !t.readdir) return;
9799
+ if (e ? this[fi](t, e) : this[ms](t), !t.readdir) return;
9755
9800
  }
9756
- if (t.entry = this[rr](t), !t.entry) {
9801
+ if (t.entry = this[hr](t), !t.entry) {
9757
9802
  t.ignore = true;
9758
9803
  return;
9759
9804
  }
9760
- t === this[Et] && !t.piped && this[fi](t);
9805
+ t === this[Et] && !t.piped && this[di](t);
9761
9806
  }
9762
9807
  }
9763
9808
  }
9764
- [as](t) {
9809
+ [cs](t) {
9765
9810
  return { onwarn: (e, i, r) => this.warn(e, i, r), noPax: this.noPax, cwd: this.cwd, absolute: t.absolute, preservePaths: this.preservePaths, maxReadSize: this.maxReadSize, strict: this.strict, portable: this.portable, linkCache: this.linkCache, statCache: this.statCache, noMtime: this.noMtime, mtime: this.mtime, prefix: this.prefix, onWriteEntry: this.onWriteEntry };
9766
9811
  }
9767
- [rr](t) {
9812
+ [hr](t) {
9768
9813
  this[G] += 1;
9769
9814
  try {
9770
- return new this[di](t.path, this[as](t)).on("end", () => this[hs](t)).on("error", (i) => this.emit("error", i));
9815
+ return new this[mi](t.path, this[cs](t)).on("end", () => this[ls](t)).on("error", (i) => this.emit("error", i));
9771
9816
  } catch (e) {
9772
9817
  this.emit("error", e);
9773
9818
  }
9774
9819
  }
9775
- [ls]() {
9820
+ [fs2]() {
9776
9821
  this[Et] && this[Et].entry && this[Et].entry.resume();
9777
9822
  }
9778
- [fi](t) {
9823
+ [di](t) {
9779
9824
  t.piped = true, t.readdir && t.readdir.forEach((r) => {
9780
9825
  let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
9781
- this[li](o + r);
9826
+ this[ci](o + r);
9782
9827
  });
9783
9828
  let e = t.entry, i = this.zip;
9784
9829
  if (!e) throw new Error("cannot pipe without source");
@@ -9792,137 +9837,137 @@ var wt = class extends A {
9792
9837
  return this.zip && this.zip.pause(), super.pause();
9793
9838
  }
9794
9839
  warn(t, e, i = {}) {
9795
- Nt(this, t, e, i);
9840
+ Dt(this, t, e, i);
9796
9841
  }
9797
9842
  };
9798
9843
  var kt = class extends wt {
9799
9844
  sync = true;
9800
9845
  constructor(t) {
9801
- super(t), this[di] = ri;
9846
+ super(t), this[mi] = ni;
9802
9847
  }
9803
9848
  pause() {
9804
9849
  }
9805
9850
  resume() {
9806
9851
  }
9807
- [cs](t) {
9852
+ [ds](t) {
9808
9853
  let e = this.follow ? "statSync" : "lstatSync";
9809
- this[ai](t, ui[e](t.absolute));
9854
+ this[li](t, ui[e](t.absolute));
9810
9855
  }
9811
- [fs2](t) {
9812
- this[ci](t, ui.readdirSync(t.absolute));
9856
+ [ms](t) {
9857
+ this[fi](t, ui.readdirSync(t.absolute));
9813
9858
  }
9814
- [fi](t) {
9859
+ [di](t) {
9815
9860
  let e = t.entry, i = this.zip;
9816
9861
  if (t.readdir && t.readdir.forEach((r) => {
9817
9862
  let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
9818
- this[li](o + r);
9863
+ this[ci](o + r);
9819
9864
  }), !e) throw new Error("Cannot pipe without source");
9820
9865
  i ? e.on("data", (r) => {
9821
9866
  i.write(r);
9822
9867
  }) : e.on("data", (r) => {
9823
- super[or](r);
9868
+ super[lr](r);
9824
9869
  });
9825
9870
  }
9826
9871
  };
9827
- var Wn = (s3, t) => {
9872
+ var Vn = (s3, t) => {
9828
9873
  let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
9829
- e.pipe(i), ar(e, t);
9874
+ e.pipe(i), fr(e, t);
9830
9875
  };
9831
- var Gn = (s3, t) => {
9832
- let e = new wt(s3), i = new tt2(s3.file, { mode: s3.mode || 438 });
9876
+ var $n = (s3, t) => {
9877
+ let e = new wt(s3), i = new et(s3.file, { mode: s3.mode || 438 });
9833
9878
  e.pipe(i);
9834
9879
  let r = new Promise((n, o) => {
9835
9880
  i.on("error", o), i.on("close", n), e.on("error", o);
9836
9881
  });
9837
- return lr(e, t).catch((n) => e.emit("error", n)), r;
9882
+ return dr(e, t).catch((n) => e.emit("error", n)), r;
9838
9883
  };
9839
- var ar = (s3, t) => {
9884
+ var fr = (s3, t) => {
9840
9885
  t.forEach((e) => {
9841
- e.charAt(0) === "@" ? Ft({ file: hr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
9886
+ e.charAt(0) === "@" ? Ct({ file: cr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
9842
9887
  }), s3.end();
9843
9888
  };
9844
- var lr = async (s3, t) => {
9845
- for (let e of t) e.charAt(0) === "@" ? await Ft({ file: hr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
9889
+ var dr = async (s3, t) => {
9890
+ for (let e of t) e.charAt(0) === "@" ? await Ct({ file: cr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
9846
9891
  s3.add(i);
9847
9892
  } }) : s3.add(e);
9848
9893
  s3.end();
9849
9894
  };
9850
- var Zn = (s3, t) => {
9895
+ var Xn = (s3, t) => {
9851
9896
  let e = new kt(s3);
9852
- return ar(e, t), e;
9897
+ return fr(e, t), e;
9853
9898
  };
9854
- var Yn = (s3, t) => {
9899
+ var qn = (s3, t) => {
9855
9900
  let e = new wt(s3);
9856
- return lr(e, t).catch((i) => e.emit("error", i)), e;
9901
+ return dr(e, t).catch((i) => e.emit("error", i)), e;
9857
9902
  };
9858
- var Kn = K(Wn, Gn, Zn, Yn, (s3, t) => {
9903
+ var Qn = K(Vn, $n, Xn, qn, (s3, t) => {
9859
9904
  if (!t?.length) throw new TypeError("no paths specified to add to archive");
9860
9905
  });
9861
- var Vn = process.env.__FAKE_PLATFORM__ || process.platform;
9862
- var ur = Vn === "win32";
9863
- var { O_CREAT: mr, O_NOFOLLOW: cr, O_TRUNC: pr, O_WRONLY: Er } = dr.constants;
9864
- var wr = Number(process.env.__FAKE_FS_O_FILENAME__) || dr.constants.UV_FS_O_FILEMAP || 0;
9865
- var $n = ur && !!wr;
9866
- var Xn = 512 * 1024;
9867
- var qn = wr | pr | mr | Er;
9868
- var fr = !ur && typeof cr == "number" ? cr | pr | mr | Er : null;
9869
- var ds = fr !== null ? () => fr : $n ? (s3) => s3 < Xn ? qn : "w" : () => "w";
9870
- var us = (s3, t, e) => {
9906
+ var Jn = process.env.__FAKE_PLATFORM__ || process.platform;
9907
+ var Er = Jn === "win32";
9908
+ var { O_CREAT: wr, O_NOFOLLOW: mr, O_TRUNC: Sr, O_WRONLY: yr } = pr.constants;
9909
+ var Rr = Number(process.env.__FAKE_FS_O_FILENAME__) || pr.constants.UV_FS_O_FILEMAP || 0;
9910
+ var jn = Er && !!Rr;
9911
+ var to = 512 * 1024;
9912
+ var eo = Rr | Sr | wr | yr;
9913
+ var ur = !Er && typeof mr == "number" ? mr | Sr | wr | yr : null;
9914
+ var us = ur !== null ? () => ur : jn ? (s3) => s3 < to ? eo : "w" : () => "w";
9915
+ var ps = (s3, t, e) => {
9871
9916
  try {
9872
- return Ei.lchownSync(s3, t, e);
9917
+ return wi.lchownSync(s3, t, e);
9873
9918
  } catch (i) {
9874
9919
  if (i?.code !== "ENOENT") throw i;
9875
9920
  }
9876
9921
  };
9877
- var pi = (s3, t, e, i) => {
9878
- Ei.lchown(s3, t, e, (r) => {
9922
+ var Ei = (s3, t, e, i) => {
9923
+ wi.lchown(s3, t, e, (r) => {
9879
9924
  i(r && r?.code !== "ENOENT" ? r : null);
9880
9925
  });
9881
9926
  };
9882
- var Qn = (s3, t, e, i, r) => {
9883
- if (t.isDirectory()) ms(Ee.resolve(s3, t.name), e, i, (n) => {
9927
+ var io = (s3, t, e, i, r) => {
9928
+ if (t.isDirectory()) Es(we.resolve(s3, t.name), e, i, (n) => {
9884
9929
  if (n) return r(n);
9885
- let o = Ee.resolve(s3, t.name);
9886
- pi(o, e, i, r);
9930
+ let o = we.resolve(s3, t.name);
9931
+ Ei(o, e, i, r);
9887
9932
  });
9888
9933
  else {
9889
- let n = Ee.resolve(s3, t.name);
9890
- pi(n, e, i, r);
9934
+ let n = we.resolve(s3, t.name);
9935
+ Ei(n, e, i, r);
9891
9936
  }
9892
9937
  };
9893
- var ms = (s3, t, e, i) => {
9894
- Ei.readdir(s3, { withFileTypes: true }, (r, n) => {
9938
+ var Es = (s3, t, e, i) => {
9939
+ wi.readdir(s3, { withFileTypes: true }, (r, n) => {
9895
9940
  if (r) {
9896
9941
  if (r.code === "ENOENT") return i();
9897
9942
  if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
9898
9943
  }
9899
- if (r || !n.length) return pi(s3, t, e, i);
9900
- let o = n.length, a = null, h = (l) => {
9901
- if (!a) {
9902
- if (l) return i(a = l);
9903
- if (--o === 0) return pi(s3, t, e, i);
9944
+ if (r || !n.length) return Ei(s3, t, e, i);
9945
+ let o = n.length, h = null, a = (l) => {
9946
+ if (!h) {
9947
+ if (l) return i(h = l);
9948
+ if (--o === 0) return Ei(s3, t, e, i);
9904
9949
  }
9905
9950
  };
9906
- for (let l of n) Qn(s3, l, t, e, h);
9951
+ for (let l of n) io(s3, l, t, e, a);
9907
9952
  });
9908
9953
  };
9909
- var Jn = (s3, t, e, i) => {
9910
- t.isDirectory() && ps(Ee.resolve(s3, t.name), e, i), us(Ee.resolve(s3, t.name), e, i);
9954
+ var so = (s3, t, e, i) => {
9955
+ t.isDirectory() && ws(we.resolve(s3, t.name), e, i), ps(we.resolve(s3, t.name), e, i);
9911
9956
  };
9912
- var ps = (s3, t, e) => {
9957
+ var ws = (s3, t, e) => {
9913
9958
  let i;
9914
9959
  try {
9915
- i = Ei.readdirSync(s3, { withFileTypes: true });
9960
+ i = wi.readdirSync(s3, { withFileTypes: true });
9916
9961
  } catch (r) {
9917
9962
  let n = r;
9918
9963
  if (n?.code === "ENOENT") return;
9919
- if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return us(s3, t, e);
9964
+ if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return ps(s3, t, e);
9920
9965
  throw n;
9921
9966
  }
9922
- for (let r of i) Jn(s3, r, t, e);
9923
- return us(s3, t, e);
9967
+ for (let r of i) so(s3, r, t, e);
9968
+ return ps(s3, t, e);
9924
9969
  };
9925
- var we = class extends Error {
9970
+ var Se = class extends Error {
9926
9971
  path;
9927
9972
  code;
9928
9973
  syscall = "chdir";
@@ -9945,97 +9990,97 @@ var St = class extends Error {
9945
9990
  return "SymlinkError";
9946
9991
  }
9947
9992
  };
9948
- var to = (s3, t) => {
9993
+ var no = (s3, t) => {
9949
9994
  k.stat(s3, (e, i) => {
9950
- (e || !i.isDirectory()) && (e = new we(s3, e?.code || "ENOTDIR")), t(e);
9995
+ (e || !i.isDirectory()) && (e = new Se(s3, e?.code || "ENOTDIR")), t(e);
9951
9996
  });
9952
9997
  };
9953
- var Sr = (s3, t, e) => {
9998
+ var gr = (s3, t, e) => {
9954
9999
  s3 = f(s3);
9955
- let i = t.umask ?? 18, r = t.mode | 448, n = (r & i) !== 0, o = t.uid, a = t.gid, h = typeof o == "number" && typeof a == "number" && (o !== t.processUid || a !== t.processGid), l = t.preserve, c = t.unlink, d = f(t.cwd), S = (E, x) => {
9956
- E ? e(E) : x && h ? ms(x, o, a, (xe) => S(xe)) : n ? k.chmod(s3, r, e) : e();
10000
+ let i = t.umask ?? 18, r = t.mode | 448, n = (r & i) !== 0, o = t.uid, h = t.gid, a = typeof o == "number" && typeof h == "number" && (o !== t.processUid || h !== t.processGid), l = t.preserve, c = t.unlink, d = f(t.cwd), S = (E, x) => {
10001
+ E ? e(E) : x && a ? Es(x, o, h, (Le) => S(Le)) : n ? k.chmod(s3, r, e) : e();
9957
10002
  };
9958
- if (s3 === d) return to(s3, S);
9959
- if (l) return jn.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
9960
- let N = f(wi.relative(d, s3)).split("/");
9961
- Es(d, N, r, c, d, void 0, S);
10003
+ if (s3 === d) return no(s3, S);
10004
+ if (l) return ro.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
10005
+ let D = f(Si.relative(d, s3)).split("/");
10006
+ Ss(d, D, r, c, d, void 0, S);
9962
10007
  };
9963
- var Es = (s3, t, e, i, r, n, o) => {
10008
+ var Ss = (s3, t, e, i, r, n, o) => {
9964
10009
  if (t.length === 0) return o(null, n);
9965
- let a = t.shift(), h = f(wi.resolve(s3 + "/" + a));
9966
- k.mkdir(h, e, yr(h, t, e, i, r, n, o));
10010
+ let h = t.shift(), a = f(Si.resolve(s3 + "/" + h));
10011
+ k.mkdir(a, e, br(a, t, e, i, r, n, o));
9967
10012
  };
9968
- var yr = (s3, t, e, i, r, n, o) => (a) => {
9969
- a ? k.lstat(s3, (h, l) => {
9970
- if (h) h.path = h.path && f(h.path), o(h);
9971
- else if (l.isDirectory()) Es(s3, t, e, i, r, n, o);
10013
+ var br = (s3, t, e, i, r, n, o) => (h) => {
10014
+ h ? k.lstat(s3, (a, l) => {
10015
+ if (a) a.path = a.path && f(a.path), o(a);
10016
+ else if (l.isDirectory()) Ss(s3, t, e, i, r, n, o);
9972
10017
  else if (i) k.unlink(s3, (c) => {
9973
10018
  if (c) return o(c);
9974
- k.mkdir(s3, e, yr(s3, t, e, i, r, n, o));
10019
+ k.mkdir(s3, e, br(s3, t, e, i, r, n, o));
9975
10020
  });
9976
10021
  else {
9977
10022
  if (l.isSymbolicLink()) return o(new St(s3, s3 + "/" + t.join("/")));
9978
- o(a);
10023
+ o(h);
9979
10024
  }
9980
- }) : (n = n || s3, Es(s3, t, e, i, r, n, o));
10025
+ }) : (n = n || s3, Ss(s3, t, e, i, r, n, o));
9981
10026
  };
9982
- var eo = (s3) => {
10027
+ var oo = (s3) => {
9983
10028
  let t = false, e;
9984
10029
  try {
9985
10030
  t = k.statSync(s3).isDirectory();
9986
10031
  } catch (i) {
9987
10032
  e = i?.code;
9988
10033
  } finally {
9989
- if (!t) throw new we(s3, e ?? "ENOTDIR");
10034
+ if (!t) throw new Se(s3, e ?? "ENOTDIR");
9990
10035
  }
9991
10036
  };
9992
- var Rr = (s3, t) => {
10037
+ var _r = (s3, t) => {
9993
10038
  s3 = f(s3);
9994
- let e = t.umask ?? 18, i = t.mode | 448, r = (i & e) !== 0, n = t.uid, o = t.gid, a = typeof n == "number" && typeof o == "number" && (n !== t.processUid || o !== t.processGid), h = t.preserve, l = t.unlink, c = f(t.cwd), d = (E) => {
9995
- E && a && ps(E, n, o), r && k.chmodSync(s3, i);
10039
+ let e = t.umask ?? 18, i = t.mode | 448, r = (i & e) !== 0, n = t.uid, o = t.gid, h = typeof n == "number" && typeof o == "number" && (n !== t.processUid || o !== t.processGid), a = t.preserve, l = t.unlink, c = f(t.cwd), d = (E) => {
10040
+ E && h && ws(E, n, o), r && k.chmodSync(s3, i);
9996
10041
  };
9997
- if (s3 === c) return eo(c), d();
9998
- if (h) return d(k.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
9999
- let T = f(wi.relative(c, s3)).split("/"), N;
10042
+ if (s3 === c) return oo(c), d();
10043
+ if (a) return d(k.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
10044
+ let T = f(Si.relative(c, s3)).split("/"), D;
10000
10045
  for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
10001
- x = f(wi.resolve(x));
10046
+ x = f(Si.resolve(x));
10002
10047
  try {
10003
- k.mkdirSync(x, i), N = N || x;
10048
+ k.mkdirSync(x, i), D = D || x;
10004
10049
  } catch {
10005
- let xe = k.lstatSync(x);
10006
- if (xe.isDirectory()) continue;
10050
+ let Le = k.lstatSync(x);
10051
+ if (Le.isDirectory()) continue;
10007
10052
  if (l) {
10008
- k.unlinkSync(x), k.mkdirSync(x, i), N = N || x;
10053
+ k.unlinkSync(x), k.mkdirSync(x, i), D = D || x;
10009
10054
  continue;
10010
- } else if (xe.isSymbolicLink()) return new St(x, x + "/" + T.join("/"));
10055
+ } else if (Le.isSymbolicLink()) return new St(x, x + "/" + T.join("/"));
10011
10056
  }
10012
10057
  }
10013
- return d(N);
10058
+ return d(D);
10014
10059
  };
10015
- var ws = /* @__PURE__ */ Object.create(null);
10016
- var gr = 1e4;
10060
+ var ys = /* @__PURE__ */ Object.create(null);
10061
+ var Or = 1e4;
10017
10062
  var Vt = /* @__PURE__ */ new Set();
10018
- var br = (s3) => {
10019
- Vt.has(s3) ? Vt.delete(s3) : ws[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), Vt.add(s3);
10020
- let t = ws[s3], e = Vt.size - gr;
10021
- if (e > gr / 10) {
10022
- for (let i of Vt) if (Vt.delete(i), delete ws[i], --e <= 0) break;
10063
+ var Tr = (s3) => {
10064
+ Vt.has(s3) ? Vt.delete(s3) : ys[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), Vt.add(s3);
10065
+ let t = ys[s3], e = Vt.size - Or;
10066
+ if (e > Or / 10) {
10067
+ for (let i of Vt) if (Vt.delete(i), delete ys[i], --e <= 0) break;
10023
10068
  }
10024
10069
  return t;
10025
10070
  };
10026
- var io = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
10027
- var so = io === "win32";
10028
- var ro = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
10071
+ var ho = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
10072
+ var ao = ho === "win32";
10073
+ var lo = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
10029
10074
  let r = e.at(-1);
10030
- return r !== void 0 && (i = _r(r, i)), e.push(i || "/"), e;
10075
+ return r !== void 0 && (i = xr(r, i)), e.push(i || "/"), e;
10031
10076
  }, []);
10032
- var Si = class {
10077
+ var yi = class {
10033
10078
  #t = /* @__PURE__ */ new Map();
10034
10079
  #i = /* @__PURE__ */ new Map();
10035
10080
  #s = /* @__PURE__ */ new Set();
10036
10081
  reserve(t, e) {
10037
- t = so ? ["win32 parallelization disabled"] : t.map((r) => mt(_r(br(r))));
10038
- let i = new Set(t.map((r) => ro(r)).reduce((r, n) => r.concat(n)));
10082
+ t = ao ? ["win32 parallelization disabled"] : t.map((r) => ut(xr(Tr(r))));
10083
+ let i = new Set(t.map((r) => lo(r)).reduce((r, n) => r.concat(n)));
10039
10084
  this.#i.set(e, { dirs: i, paths: t });
10040
10085
  for (let r of t) {
10041
10086
  let n = this.#t.get(r);
@@ -10069,79 +10114,79 @@ var Si = class {
10069
10114
  if (!e) throw new Error("invalid reservation");
10070
10115
  let { paths: i, dirs: r } = e, n = /* @__PURE__ */ new Set();
10071
10116
  for (let o of i) {
10072
- let a = this.#t.get(o);
10073
- if (!a || a?.[0] !== t) continue;
10074
- let h = a[1];
10075
- if (!h) {
10117
+ let h = this.#t.get(o);
10118
+ if (!h || h?.[0] !== t) continue;
10119
+ let a = h[1];
10120
+ if (!a) {
10076
10121
  this.#t.delete(o);
10077
10122
  continue;
10078
10123
  }
10079
- if (a.shift(), typeof h == "function") n.add(h);
10080
- else for (let l of h) n.add(l);
10124
+ if (h.shift(), typeof a == "function") n.add(a);
10125
+ else for (let l of a) n.add(l);
10081
10126
  }
10082
10127
  for (let o of r) {
10083
- let a = this.#t.get(o), h = a?.[0];
10084
- if (!(!a || !(h instanceof Set))) if (h.size === 1 && a.length === 1) {
10128
+ let h = this.#t.get(o), a = h?.[0];
10129
+ if (!(!h || !(a instanceof Set))) if (a.size === 1 && h.length === 1) {
10085
10130
  this.#t.delete(o);
10086
10131
  continue;
10087
- } else if (h.size === 1) {
10088
- a.shift();
10089
- let l = a[0];
10132
+ } else if (a.size === 1) {
10133
+ h.shift();
10134
+ let l = h[0];
10090
10135
  typeof l == "function" && n.add(l);
10091
- } else h.delete(t);
10136
+ } else a.delete(t);
10092
10137
  }
10093
10138
  return this.#s.delete(t), n.forEach((o) => this.#r(o)), true;
10094
10139
  }
10095
10140
  };
10096
- var Or = () => process.umask();
10097
- var Tr = /* @__PURE__ */ Symbol("onEntry");
10098
- var gs = /* @__PURE__ */ Symbol("checkFs");
10099
- var xr = /* @__PURE__ */ Symbol("checkFs2");
10100
- var bs = /* @__PURE__ */ Symbol("isReusable");
10141
+ var Lr = () => process.umask();
10142
+ var Dr = /* @__PURE__ */ Symbol("onEntry");
10143
+ var _s = /* @__PURE__ */ Symbol("checkFs");
10144
+ var Nr = /* @__PURE__ */ Symbol("checkFs2");
10145
+ var Os = /* @__PURE__ */ Symbol("isReusable");
10101
10146
  var P = /* @__PURE__ */ Symbol("makeFs");
10102
- var _s = /* @__PURE__ */ Symbol("file");
10103
- var Os = /* @__PURE__ */ Symbol("directory");
10104
- var Ri = /* @__PURE__ */ Symbol("link");
10105
- var Lr = /* @__PURE__ */ Symbol("symlink");
10106
- var Nr = /* @__PURE__ */ Symbol("hardlink");
10107
- var ye = /* @__PURE__ */ Symbol("ensureNoSymlink");
10108
- var Dr = /* @__PURE__ */ Symbol("unsupported");
10109
- var Ar = /* @__PURE__ */ Symbol("checkPath");
10110
- var Ss = /* @__PURE__ */ Symbol("stripAbsolutePath");
10147
+ var Ts = /* @__PURE__ */ Symbol("file");
10148
+ var xs = /* @__PURE__ */ Symbol("directory");
10149
+ var gi = /* @__PURE__ */ Symbol("link");
10150
+ var Ar = /* @__PURE__ */ Symbol("symlink");
10151
+ var Ir = /* @__PURE__ */ Symbol("hardlink");
10152
+ var Re = /* @__PURE__ */ Symbol("ensureNoSymlink");
10153
+ var Cr = /* @__PURE__ */ Symbol("unsupported");
10154
+ var Fr = /* @__PURE__ */ Symbol("checkPath");
10155
+ var Rs = /* @__PURE__ */ Symbol("stripAbsolutePath");
10111
10156
  var yt = /* @__PURE__ */ Symbol("mkdir");
10112
10157
  var O = /* @__PURE__ */ Symbol("onError");
10113
- var yi = /* @__PURE__ */ Symbol("pending");
10114
- var Ir = /* @__PURE__ */ Symbol("pend");
10158
+ var Ri = /* @__PURE__ */ Symbol("pending");
10159
+ var kr = /* @__PURE__ */ Symbol("pend");
10115
10160
  var $t = /* @__PURE__ */ Symbol("unpend");
10116
- var ys = /* @__PURE__ */ Symbol("ended");
10117
- var Rs = /* @__PURE__ */ Symbol("maybeClose");
10118
- var Ts = /* @__PURE__ */ Symbol("skip");
10119
- var Re = /* @__PURE__ */ Symbol("doChown");
10120
- var ge = /* @__PURE__ */ Symbol("uid");
10121
- var be = /* @__PURE__ */ Symbol("gid");
10122
- var _e = /* @__PURE__ */ Symbol("checkedCwd");
10123
- var oo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
10124
- var Oe = oo === "win32";
10125
- var ho = 1024;
10126
- var ao = (s3, t) => {
10127
- if (!Oe) return u.unlink(s3, t);
10128
- let e = s3 + ".DELETE." + Cr(16).toString("hex");
10129
- u.rename(s3, e, (i) => {
10161
+ var gs = /* @__PURE__ */ Symbol("ended");
10162
+ var bs = /* @__PURE__ */ Symbol("maybeClose");
10163
+ var Ls = /* @__PURE__ */ Symbol("skip");
10164
+ var ge = /* @__PURE__ */ Symbol("doChown");
10165
+ var be = /* @__PURE__ */ Symbol("uid");
10166
+ var _e = /* @__PURE__ */ Symbol("gid");
10167
+ var Oe = /* @__PURE__ */ Symbol("checkedCwd");
10168
+ var fo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
10169
+ var Te = fo === "win32";
10170
+ var mo = 1024;
10171
+ var uo = (s3, t) => {
10172
+ if (!Te) return m.unlink(s3, t);
10173
+ let e = s3 + ".DELETE." + Mr(16).toString("hex");
10174
+ m.rename(s3, e, (i) => {
10130
10175
  if (i) return t(i);
10131
- u.unlink(e, t);
10176
+ m.unlink(e, t);
10132
10177
  });
10133
10178
  };
10134
- var lo = (s3) => {
10135
- if (!Oe) return u.unlinkSync(s3);
10136
- let t = s3 + ".DELETE." + Cr(16).toString("hex");
10137
- u.renameSync(s3, t), u.unlinkSync(t);
10179
+ var po = (s3) => {
10180
+ if (!Te) return m.unlinkSync(s3);
10181
+ let t = s3 + ".DELETE." + Mr(16).toString("hex");
10182
+ m.renameSync(s3, t), m.unlinkSync(t);
10138
10183
  };
10139
- var Fr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
10140
- var Xt = class extends st {
10141
- [ys] = false;
10142
- [_e] = false;
10143
- [yi] = 0;
10144
- reservations = new Si();
10184
+ var vr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
10185
+ var Xt = class extends rt {
10186
+ [gs] = false;
10187
+ [Oe] = false;
10188
+ [Ri] = 0;
10189
+ reservations = new yi();
10145
10190
  transform;
10146
10191
  writable = true;
10147
10192
  readable = false;
@@ -10168,32 +10213,32 @@ var Xt = class extends st {
10168
10213
  chmod;
10169
10214
  constructor(t = {}) {
10170
10215
  if (t.ondone = () => {
10171
- this[ys] = true, this[Rs]();
10216
+ this[gs] = true, this[bs]();
10172
10217
  }, super(t), this.transform = t.transform, this.chmod = !!t.chmod, typeof t.uid == "number" || typeof t.gid == "number") {
10173
10218
  if (typeof t.uid != "number" || typeof t.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
10174
10219
  if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
10175
10220
  this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
10176
10221
  } else this.uid = void 0, this.gid = void 0, this.setOwner = false;
10177
- this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : ho, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Oe, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(R.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : Or() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[Tr](e));
10222
+ this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? process.getuid?.() === 0 : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : mo, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Te, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(R.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : Lr() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[Dr](e));
10178
10223
  }
10179
10224
  warn(t, e, i = {}) {
10180
10225
  return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e, i);
10181
10226
  }
10182
- [Rs]() {
10183
- this[ys] && this[yi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
10227
+ [bs]() {
10228
+ this[gs] && this[Ri] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
10184
10229
  }
10185
- [Ss](t, e) {
10230
+ [Rs](t, e) {
10186
10231
  let i = t[e], { type: r } = t;
10187
10232
  if (!i || this.preservePaths) return true;
10188
- let [n, o] = le(i), a = o.replaceAll(/\\/g, "/").split("/");
10189
- if (a.includes("..") || Oe && /^[a-z]:\.\.$/i.test(a[0] ?? "")) {
10233
+ let [n, o] = ce(i), h = o.replaceAll(/\\/g, "/").split("/");
10234
+ if (h.includes("..") || Te && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
10190
10235
  if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t, [e]: i }), false;
10191
- let h = R.posix.dirname(t.path), l = R.posix.normalize(R.posix.join(h, a.join("/")));
10236
+ let a = R.posix.dirname(t.path), l = R.posix.normalize(R.posix.join(a, h.join("/")));
10192
10237
  if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
10193
10238
  }
10194
10239
  return n && (t[e] = String(o), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e}`, { entry: t, [e]: i })), true;
10195
10240
  }
10196
- [Ar](t) {
10241
+ [Fr](t) {
10197
10242
  let e = f(t.path), i = e.split("/");
10198
10243
  if (this.strip) {
10199
10244
  if (i.length < this.strip) return false;
@@ -10205,20 +10250,20 @@ var Xt = class extends st {
10205
10250
  i.splice(0, this.strip), t.path = i.join("/");
10206
10251
  }
10207
10252
  if (isFinite(this.maxDepth) && i.length > this.maxDepth) return this.warn("TAR_ENTRY_ERROR", "path excessively deep", { entry: t, path: e, depth: i.length, maxDepth: this.maxDepth }), false;
10208
- if (!this[Ss](t, "path") || !this[Ss](t, "linkpath")) return false;
10253
+ if (!this[Rs](t, "path") || !this[Rs](t, "linkpath")) return false;
10209
10254
  if (t.absolute = R.isAbsolute(t.path) ? f(R.resolve(t.path)) : f(R.resolve(this.cwd, t.path)), !this.preservePaths && typeof t.absolute == "string" && t.absolute.indexOf(this.cwd + "/") !== 0 && t.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { entry: t, path: f(t.path), resolvedPath: t.absolute, cwd: this.cwd }), false;
10210
10255
  if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return false;
10211
10256
  if (this.win32) {
10212
10257
  let { root: r } = R.win32.parse(String(t.absolute));
10213
- t.absolute = r + Ji(String(t.absolute).slice(r.length));
10258
+ t.absolute = r + ts(String(t.absolute).slice(r.length));
10214
10259
  let { root: n } = R.win32.parse(t.path);
10215
- t.path = n + Ji(t.path.slice(n.length));
10260
+ t.path = n + ts(t.path.slice(n.length));
10216
10261
  }
10217
10262
  return true;
10218
10263
  }
10219
- [Tr](t) {
10220
- if (!this[Ar](t)) return t.resume();
10221
- switch (no.equal(typeof t.absolute, "string"), t.type) {
10264
+ [Dr](t) {
10265
+ if (!this[Fr](t)) return t.resume();
10266
+ switch (co.equal(typeof t.absolute, "string"), t.type) {
10222
10267
  case "Directory":
10223
10268
  case "GNUDumpDir":
10224
10269
  t.mode && (t.mode = t.mode | 448);
@@ -10227,62 +10272,62 @@ var Xt = class extends st {
10227
10272
  case "ContiguousFile":
10228
10273
  case "Link":
10229
10274
  case "SymbolicLink":
10230
- return this[gs](t);
10275
+ return this[_s](t);
10231
10276
  default:
10232
- return this[Dr](t);
10277
+ return this[Cr](t);
10233
10278
  }
10234
10279
  }
10235
10280
  [O](t, e) {
10236
10281
  t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[$t](), e.resume());
10237
10282
  }
10238
10283
  [yt](t, e, i) {
10239
- Sr(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e }, i);
10240
- }
10241
- [Re](t) {
10242
- return this.forceChown || this.preserveOwner && (typeof t.uid == "number" && t.uid !== this.processUid || typeof t.gid == "number" && t.gid !== this.processGid) || typeof this.uid == "number" && this.uid !== this.processUid || typeof this.gid == "number" && this.gid !== this.processGid;
10284
+ gr(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e }, i);
10243
10285
  }
10244
10286
  [ge](t) {
10245
- return Fr(this.uid, t.uid, this.processUid);
10287
+ return this.forceChown || this.preserveOwner && (typeof t.uid == "number" && t.uid !== this.processUid || typeof t.gid == "number" && t.gid !== this.processGid) || typeof this.uid == "number" && this.uid !== this.processUid || typeof this.gid == "number" && this.gid !== this.processGid;
10246
10288
  }
10247
10289
  [be](t) {
10248
- return Fr(this.gid, t.gid, this.processGid);
10290
+ return vr(this.uid, t.uid, this.processUid);
10249
10291
  }
10250
- [_s](t, e) {
10251
- let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt2(String(t.absolute), { flags: ds(t.size), mode: i, autoClose: false });
10252
- r.on("error", (h) => {
10253
- r.fd && u.close(r.fd, () => {
10254
- }), r.write = () => true, this[O](h, t), e();
10292
+ [_e](t) {
10293
+ return vr(this.gid, t.gid, this.processGid);
10294
+ }
10295
+ [Ts](t, e) {
10296
+ let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new et(String(t.absolute), { flags: us(t.size), mode: i, autoClose: false });
10297
+ r.on("error", (a) => {
10298
+ r.fd && m.close(r.fd, () => {
10299
+ }), r.write = () => true, this[O](a, t), e();
10255
10300
  });
10256
- let n = 1, o = (h) => {
10257
- if (h) {
10258
- r.fd && u.close(r.fd, () => {
10259
- }), this[O](h, t), e();
10301
+ let n = 1, o = (a) => {
10302
+ if (a) {
10303
+ r.fd && m.close(r.fd, () => {
10304
+ }), this[O](a, t), e();
10260
10305
  return;
10261
10306
  }
10262
- --n === 0 && r.fd !== void 0 && u.close(r.fd, (l) => {
10307
+ --n === 0 && r.fd !== void 0 && m.close(r.fd, (l) => {
10263
10308
  l ? this[O](l, t) : this[$t](), e();
10264
10309
  });
10265
10310
  };
10266
10311
  r.on("finish", () => {
10267
- let h = String(t.absolute), l = r.fd;
10312
+ let a = String(t.absolute), l = r.fd;
10268
10313
  if (typeof l == "number" && t.mtime && !this.noMtime) {
10269
10314
  n++;
10270
10315
  let c = t.atime || /* @__PURE__ */ new Date(), d = t.mtime;
10271
- u.futimes(l, c, d, (S) => S ? u.utimes(h, c, d, (T) => o(T && S)) : o());
10316
+ m.futimes(l, c, d, (S) => S ? m.utimes(a, c, d, (T) => o(T && S)) : o());
10272
10317
  }
10273
- if (typeof l == "number" && this[Re](t)) {
10318
+ if (typeof l == "number" && this[ge](t)) {
10274
10319
  n++;
10275
- let c = this[ge](t), d = this[be](t);
10276
- typeof c == "number" && typeof d == "number" && u.fchown(l, c, d, (S) => S ? u.chown(h, c, d, (T) => o(T && S)) : o());
10320
+ let c = this[be](t), d = this[_e](t);
10321
+ typeof c == "number" && typeof d == "number" && m.fchown(l, c, d, (S) => S ? m.chown(a, c, d, (T) => o(T && S)) : o());
10277
10322
  }
10278
10323
  o();
10279
10324
  });
10280
- let a = this.transform && this.transform(t) || t;
10281
- a !== t && (a.on("error", (h) => {
10282
- this[O](h, t), e();
10283
- }), t.pipe(a)), a.pipe(r);
10325
+ let h = this.transform && this.transform(t) || t;
10326
+ h !== t && (h.on("error", (a) => {
10327
+ this[O](a, t), e();
10328
+ }), t.pipe(h)), h.pipe(r);
10284
10329
  }
10285
- [Os](t, e) {
10330
+ [xs](t, e) {
10286
10331
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode;
10287
10332
  this[yt](String(t.absolute), i, (r) => {
10288
10333
  if (r) {
@@ -10292,68 +10337,68 @@ var Xt = class extends st {
10292
10337
  let n = 1, o = () => {
10293
10338
  --n === 0 && (e(), this[$t](), t.resume());
10294
10339
  };
10295
- t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, u.chown(String(t.absolute), Number(this[ge](t)), Number(this[be](t)), o)), o();
10340
+ t.mtime && !this.noMtime && (n++, m.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[ge](t) && (n++, m.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o)), o();
10296
10341
  });
10297
10342
  }
10298
- [Dr](t) {
10343
+ [Cr](t) {
10299
10344
  t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
10300
10345
  }
10301
- [Lr](t, e) {
10346
+ [Ar](t, e) {
10302
10347
  let i = f(R.relative(this.cwd, R.resolve(R.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
10303
- this[ye](t, this.cwd, i, () => this[Ri](t, String(t.linkpath), "symlink", e), (r) => {
10348
+ this[Re](t, this.cwd, i, () => this[gi](t, String(t.linkpath), "symlink", e), (r) => {
10304
10349
  this[O](r, t), e();
10305
10350
  });
10306
10351
  }
10307
- [Nr](t, e) {
10352
+ [Ir](t, e) {
10308
10353
  let i = f(R.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
10309
- this[ye](t, this.cwd, r, () => this[Ri](t, i, "link", e), (n) => {
10354
+ this[Re](t, this.cwd, r, () => this[gi](t, i, "link", e), (n) => {
10310
10355
  this[O](n, t), e();
10311
10356
  });
10312
10357
  }
10313
- [ye](t, e, i, r, n) {
10358
+ [Re](t, e, i, r, n) {
10314
10359
  let o = i.shift();
10315
10360
  if (this.preservePaths || o === void 0) return r();
10316
- let a = R.resolve(e, o);
10317
- u.lstat(a, (h, l) => {
10318
- if (h) return r();
10319
- if (l?.isSymbolicLink()) return n(new St(a, R.resolve(a, i.join("/"))));
10320
- this[ye](t, a, i, r, n);
10361
+ let h = R.resolve(e, o);
10362
+ m.lstat(h, (a, l) => {
10363
+ if (a) return r();
10364
+ if (l?.isSymbolicLink()) return n(new St(h, R.resolve(h, i.join("/"))));
10365
+ this[Re](t, h, i, r, n);
10321
10366
  });
10322
10367
  }
10323
- [Ir]() {
10324
- this[yi]++;
10368
+ [kr]() {
10369
+ this[Ri]++;
10325
10370
  }
10326
10371
  [$t]() {
10327
- this[yi]--, this[Rs]();
10372
+ this[Ri]--, this[bs]();
10328
10373
  }
10329
- [Ts](t) {
10374
+ [Ls](t) {
10330
10375
  this[$t](), t.resume();
10331
10376
  }
10332
- [bs](t, e) {
10333
- return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Oe;
10377
+ [Os](t, e) {
10378
+ return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Te;
10334
10379
  }
10335
- [gs](t) {
10336
- this[Ir]();
10380
+ [_s](t) {
10381
+ this[kr]();
10337
10382
  let e = [t.path];
10338
- t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[xr](t, i));
10383
+ t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Nr](t, i));
10339
10384
  }
10340
- [xr](t, e) {
10341
- let i = (a) => {
10342
- e(a);
10385
+ [Nr](t, e) {
10386
+ let i = (h) => {
10387
+ e(h);
10343
10388
  }, r = () => {
10344
- this[yt](this.cwd, this.dmode, (a) => {
10345
- if (a) {
10346
- this[O](a, t), i();
10389
+ this[yt](this.cwd, this.dmode, (h) => {
10390
+ if (h) {
10391
+ this[O](h, t), i();
10347
10392
  return;
10348
10393
  }
10349
- this[_e] = true, n();
10394
+ this[Oe] = true, n();
10350
10395
  });
10351
10396
  }, n = () => {
10352
10397
  if (t.absolute !== this.cwd) {
10353
- let a = f(R.dirname(String(t.absolute)));
10354
- if (a !== this.cwd) return this[yt](a, this.dmode, (h) => {
10355
- if (h) {
10356
- this[O](h, t), i();
10398
+ let h = f(R.dirname(String(t.absolute)));
10399
+ if (h !== this.cwd) return this[yt](h, this.dmode, (a) => {
10400
+ if (a) {
10401
+ this[O](a, t), i();
10357
10402
  return;
10358
10403
  }
10359
10404
  o();
@@ -10361,24 +10406,24 @@ var Xt = class extends st {
10361
10406
  }
10362
10407
  o();
10363
10408
  }, o = () => {
10364
- u.lstat(String(t.absolute), (a, h) => {
10365
- if (h && (this.keep || this.newer && h.mtime > (t.mtime ?? h.mtime))) {
10366
- this[Ts](t), i();
10409
+ m.lstat(String(t.absolute), (h, a) => {
10410
+ if (a && (this.keep || this.newer && a.mtime > (t.mtime ?? a.mtime))) {
10411
+ this[Ls](t), i();
10367
10412
  return;
10368
10413
  }
10369
- if (a || this[bs](t, h)) return this[P](null, t, i);
10370
- if (h.isDirectory()) {
10414
+ if (h || this[Os](t, a)) return this[P](null, t, i);
10415
+ if (a.isDirectory()) {
10371
10416
  if (t.type === "Directory") {
10372
- let l = this.chmod && t.mode && (h.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
10373
- return l ? u.chmod(String(t.absolute), Number(t.mode), c) : c();
10417
+ let l = this.chmod && t.mode && (a.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
10418
+ return l ? m.chmod(String(t.absolute), Number(t.mode), c) : c();
10374
10419
  }
10375
- if (t.absolute !== this.cwd) return u.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
10420
+ if (t.absolute !== this.cwd) return m.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
10376
10421
  }
10377
10422
  if (t.absolute === this.cwd) return this[P](null, t, i);
10378
- ao(String(t.absolute), (l) => this[P](l ?? null, t, i));
10423
+ uo(String(t.absolute), (l) => this[P](l ?? null, t, i));
10379
10424
  });
10380
10425
  };
10381
- this[_e] ? n() : r();
10426
+ this[Oe] ? n() : r();
10382
10427
  }
10383
10428
  [P](t, e, i) {
10384
10429
  if (t) {
@@ -10389,40 +10434,40 @@ var Xt = class extends st {
10389
10434
  case "File":
10390
10435
  case "OldFile":
10391
10436
  case "ContiguousFile":
10392
- return this[_s](e, i);
10437
+ return this[Ts](e, i);
10393
10438
  case "Link":
10394
- return this[Nr](e, i);
10439
+ return this[Ir](e, i);
10395
10440
  case "SymbolicLink":
10396
- return this[Lr](e, i);
10441
+ return this[Ar](e, i);
10397
10442
  case "Directory":
10398
10443
  case "GNUDumpDir":
10399
- return this[Os](e, i);
10444
+ return this[xs](e, i);
10400
10445
  }
10401
10446
  }
10402
- [Ri](t, e, i, r) {
10403
- u[i](e, String(t.absolute), (n) => {
10447
+ [gi](t, e, i, r) {
10448
+ m[i](e, String(t.absolute), (n) => {
10404
10449
  n ? this[O](n, t) : (this[$t](), t.resume()), r();
10405
10450
  });
10406
10451
  }
10407
10452
  };
10408
- var Se = (s3) => {
10453
+ var ye = (s3) => {
10409
10454
  try {
10410
10455
  return [null, s3()];
10411
10456
  } catch (t) {
10412
10457
  return [t, null];
10413
10458
  }
10414
10459
  };
10415
- var Te = class extends Xt {
10460
+ var xe = class extends Xt {
10416
10461
  sync = true;
10417
10462
  [P](t, e) {
10418
10463
  return super[P](t, e, () => {
10419
10464
  });
10420
10465
  }
10421
- [gs](t) {
10422
- if (!this[_e]) {
10466
+ [_s](t) {
10467
+ if (!this[Oe]) {
10423
10468
  let n = this[yt](this.cwd, this.dmode);
10424
10469
  if (n) return this[O](n, t);
10425
- this[_e] = true;
10470
+ this[Oe] = true;
10426
10471
  }
10427
10472
  if (t.absolute !== this.cwd) {
10428
10473
  let n = f(R.dirname(String(t.absolute)));
@@ -10431,157 +10476,157 @@ var Te = class extends Xt {
10431
10476
  if (o) return this[O](o, t);
10432
10477
  }
10433
10478
  }
10434
- let [e, i] = Se(() => u.lstatSync(String(t.absolute)));
10435
- if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[Ts](t);
10436
- if (e || this[bs](t, i)) return this[P](null, t);
10479
+ let [e, i] = ye(() => m.lstatSync(String(t.absolute)));
10480
+ if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[Ls](t);
10481
+ if (e || this[Os](t, i)) return this[P](null, t);
10437
10482
  if (i.isDirectory()) {
10438
10483
  if (t.type === "Directory") {
10439
- let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [a] = o ? Se(() => {
10440
- u.chmodSync(String(t.absolute), Number(t.mode));
10484
+ let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? ye(() => {
10485
+ m.chmodSync(String(t.absolute), Number(t.mode));
10441
10486
  }) : [];
10442
- return this[P](a, t);
10487
+ return this[P](h, t);
10443
10488
  }
10444
- let [n] = Se(() => u.rmdirSync(String(t.absolute)));
10489
+ let [n] = ye(() => m.rmdirSync(String(t.absolute)));
10445
10490
  this[P](n, t);
10446
10491
  }
10447
- let [r] = t.absolute === this.cwd ? [] : Se(() => lo(String(t.absolute)));
10492
+ let [r] = t.absolute === this.cwd ? [] : ye(() => po(String(t.absolute)));
10448
10493
  this[P](r, t);
10449
10494
  }
10450
- [_s](t, e) {
10451
- let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (a) => {
10452
- let h;
10495
+ [Ts](t, e) {
10496
+ let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (h) => {
10497
+ let a;
10453
10498
  try {
10454
- u.closeSync(n);
10499
+ m.closeSync(n);
10455
10500
  } catch (l) {
10456
- h = l;
10501
+ a = l;
10457
10502
  }
10458
- (a || h) && this[O](a || h, t), e();
10503
+ (h || a) && this[O](h || a, t), e();
10459
10504
  }, n;
10460
10505
  try {
10461
- n = u.openSync(String(t.absolute), ds(t.size), i);
10462
- } catch (a) {
10463
- return r(a);
10506
+ n = m.openSync(String(t.absolute), us(t.size), i);
10507
+ } catch (h) {
10508
+ return r(h);
10464
10509
  }
10465
10510
  let o = this.transform && this.transform(t) || t;
10466
- o !== t && (o.on("error", (a) => this[O](a, t)), t.pipe(o)), o.on("data", (a) => {
10511
+ o !== t && (o.on("error", (h) => this[O](h, t)), t.pipe(o)), o.on("data", (h) => {
10467
10512
  try {
10468
- u.writeSync(n, a, 0, a.length);
10469
- } catch (h) {
10470
- r(h);
10513
+ m.writeSync(n, h, 0, h.length);
10514
+ } catch (a) {
10515
+ r(a);
10471
10516
  }
10472
10517
  }), o.on("end", () => {
10473
- let a = null;
10518
+ let h = null;
10474
10519
  if (t.mtime && !this.noMtime) {
10475
- let h = t.atime || /* @__PURE__ */ new Date(), l = t.mtime;
10520
+ let a = t.atime || /* @__PURE__ */ new Date(), l = t.mtime;
10476
10521
  try {
10477
- u.futimesSync(n, h, l);
10522
+ m.futimesSync(n, a, l);
10478
10523
  } catch (c) {
10479
10524
  try {
10480
- u.utimesSync(String(t.absolute), h, l);
10525
+ m.utimesSync(String(t.absolute), a, l);
10481
10526
  } catch {
10482
- a = c;
10527
+ h = c;
10483
10528
  }
10484
10529
  }
10485
10530
  }
10486
- if (this[Re](t)) {
10487
- let h = this[ge](t), l = this[be](t);
10531
+ if (this[ge](t)) {
10532
+ let a = this[be](t), l = this[_e](t);
10488
10533
  try {
10489
- u.fchownSync(n, Number(h), Number(l));
10534
+ m.fchownSync(n, Number(a), Number(l));
10490
10535
  } catch (c) {
10491
10536
  try {
10492
- u.chownSync(String(t.absolute), Number(h), Number(l));
10537
+ m.chownSync(String(t.absolute), Number(a), Number(l));
10493
10538
  } catch {
10494
- a = a || c;
10539
+ h = h || c;
10495
10540
  }
10496
10541
  }
10497
10542
  }
10498
- r(a);
10543
+ r(h);
10499
10544
  });
10500
10545
  }
10501
- [Os](t, e) {
10546
+ [xs](t, e) {
10502
10547
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[yt](String(t.absolute), i);
10503
10548
  if (r) {
10504
10549
  this[O](r, t), e();
10505
10550
  return;
10506
10551
  }
10507
10552
  if (t.mtime && !this.noMtime) try {
10508
- u.utimesSync(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime);
10553
+ m.utimesSync(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime);
10509
10554
  } catch {
10510
10555
  }
10511
- if (this[Re](t)) try {
10512
- u.chownSync(String(t.absolute), Number(this[ge](t)), Number(this[be](t)));
10556
+ if (this[ge](t)) try {
10557
+ m.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
10513
10558
  } catch {
10514
10559
  }
10515
10560
  e(), t.resume();
10516
10561
  }
10517
10562
  [yt](t, e) {
10518
10563
  try {
10519
- return Rr(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e });
10564
+ return _r(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e });
10520
10565
  } catch (i) {
10521
10566
  return i;
10522
10567
  }
10523
10568
  }
10524
- [ye](t, e, i, r, n) {
10569
+ [Re](t, e, i, r, n) {
10525
10570
  if (this.preservePaths || i.length === 0) return r();
10526
10571
  let o = e;
10527
- for (let a of i) {
10528
- o = R.resolve(o, a);
10529
- let [h, l] = Se(() => u.lstatSync(o));
10530
- if (h) return r();
10572
+ for (let h of i) {
10573
+ o = R.resolve(o, h);
10574
+ let [a, l] = ye(() => m.lstatSync(o));
10575
+ if (a) return r();
10531
10576
  if (l.isSymbolicLink()) return n(new St(o, R.resolve(e, i.join("/"))));
10532
10577
  }
10533
10578
  r();
10534
10579
  }
10535
- [Ri](t, e, i, r) {
10580
+ [gi](t, e, i, r) {
10536
10581
  let n = `${i}Sync`;
10537
10582
  try {
10538
- u[n](e, String(t.absolute)), r(), t.resume();
10583
+ m[n](e, String(t.absolute)), r(), t.resume();
10539
10584
  } catch (o) {
10540
10585
  return this[O](o, t);
10541
10586
  }
10542
10587
  }
10543
10588
  };
10544
- var co = (s3) => {
10545
- let t = new Te(s3), e = s3.file, i = kr.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
10546
- new Me(e, { readSize: r, size: i.size }).pipe(t);
10589
+ var Eo = (s3) => {
10590
+ let t = new xe(s3), e = s3.file, i = Br.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
10591
+ new Be(e, { readSize: r, size: i.size }).pipe(t);
10547
10592
  };
10548
- var fo = (s3, t) => {
10593
+ var wo = (s3, t) => {
10549
10594
  let e = new Xt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
10550
- return new Promise((o, a) => {
10551
- e.on("error", a), e.on("close", o), kr.stat(r, (h, l) => {
10552
- if (h) a(h);
10595
+ return new Promise((o, h) => {
10596
+ e.on("error", h), e.on("close", o), Br.stat(r, (a, l) => {
10597
+ if (a) h(a);
10553
10598
  else {
10554
10599
  let c = new _t(r, { readSize: i, size: l.size });
10555
- c.on("error", a), c.pipe(e);
10600
+ c.on("error", h), c.pipe(e);
10556
10601
  }
10557
10602
  });
10558
10603
  });
10559
10604
  };
10560
- var uo = K(co, fo, (s3) => new Te(s3), (s3) => new Xt(s3), (s3, t) => {
10561
- t?.length && Xi(s3, t);
10605
+ var So = K(Eo, wo, (s3) => new xe(s3), (s3) => new Xt(s3), (s3, t) => {
10606
+ t?.length && Qi(s3, t);
10562
10607
  });
10563
- var mo = (s3, t) => {
10608
+ var yo = (s3, t) => {
10564
10609
  let e = new kt(s3), i = true, r, n;
10565
10610
  try {
10566
10611
  try {
10567
10612
  r = v.openSync(s3.file, "r+");
10568
- } catch (h) {
10569
- if (h?.code === "ENOENT") r = v.openSync(s3.file, "w+");
10570
- else throw h;
10613
+ } catch (a) {
10614
+ if (a?.code === "ENOENT") r = v.openSync(s3.file, "w+");
10615
+ else throw a;
10571
10616
  }
10572
- let o = v.fstatSync(r), a = Buffer.alloc(512);
10617
+ let o = v.fstatSync(r), h = Buffer.alloc(512);
10573
10618
  t: for (n = 0; n < o.size; n += 512) {
10574
10619
  for (let c = 0, d = 0; c < 512; c += d) {
10575
- if (d = v.readSync(r, a, c, a.length - c, n + c), n === 0 && a[0] === 31 && a[1] === 139) throw new Error("cannot append to compressed archives");
10620
+ if (d = v.readSync(r, h, c, h.length - c, n + c), n === 0 && h[0] === 31 && h[1] === 139) throw new Error("cannot append to compressed archives");
10576
10621
  if (!d) break t;
10577
10622
  }
10578
- let h = new C(a);
10579
- if (!h.cksumValid) break;
10580
- let l = 512 * Math.ceil((h.size || 0) / 512);
10623
+ let a = new F(h);
10624
+ if (!a.cksumValid) break;
10625
+ let l = 512 * Math.ceil((a.size || 0) / 512);
10581
10626
  if (n + l + 512 > o.size) break;
10582
- n += l, s3.mtimeCache && h.mtime && s3.mtimeCache.set(String(h.path), h.mtime);
10627
+ n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
10583
10628
  }
10584
- i = false, po(s3, e, n, r, t);
10629
+ i = false, Ro(s3, e, n, r, t);
10585
10630
  } finally {
10586
10631
  if (i) try {
10587
10632
  v.closeSync(r);
@@ -10589,69 +10634,69 @@ var mo = (s3, t) => {
10589
10634
  }
10590
10635
  }
10591
10636
  };
10592
- var po = (s3, t, e, i, r) => {
10637
+ var Ro = (s3, t, e, i, r) => {
10593
10638
  let n = new Wt(s3.file, { fd: i, start: e });
10594
- t.pipe(n), wo(t, r);
10639
+ t.pipe(n), bo(t, r);
10595
10640
  };
10596
- var Eo = (s3, t) => {
10641
+ var go = (s3, t) => {
10597
10642
  t = Array.from(t);
10598
- let e = new wt(s3), i = (n, o, a) => {
10599
- let h = (T, N) => {
10600
- T ? v.close(n, (E) => a(T)) : a(null, N);
10643
+ let e = new wt(s3), i = (n, o, h) => {
10644
+ let a = (T, D) => {
10645
+ T ? v.close(n, (E) => h(T)) : h(null, D);
10601
10646
  }, l = 0;
10602
- if (o === 0) return h(null, 0);
10603
- let c = 0, d = Buffer.alloc(512), S = (T, N) => {
10604
- if (T || N === void 0) return h(T);
10605
- if (c += N, c < 512 && N) return v.read(n, d, c, d.length - c, l + c, S);
10606
- if (l === 0 && d[0] === 31 && d[1] === 139) return h(new Error("cannot append to compressed archives"));
10607
- if (c < 512) return h(null, l);
10608
- let E = new C(d);
10609
- if (!E.cksumValid) return h(null, l);
10647
+ if (o === 0) return a(null, 0);
10648
+ let c = 0, d = Buffer.alloc(512), S = (T, D) => {
10649
+ if (T || D === void 0) return a(T);
10650
+ if (c += D, c < 512 && D) return v.read(n, d, c, d.length - c, l + c, S);
10651
+ if (l === 0 && d[0] === 31 && d[1] === 139) return a(new Error("cannot append to compressed archives"));
10652
+ if (c < 512) return a(null, l);
10653
+ let E = new F(d);
10654
+ if (!E.cksumValid) return a(null, l);
10610
10655
  let x = 512 * Math.ceil((E.size ?? 0) / 512);
10611
- if (l + x + 512 > o || (l += x + 512, l >= o)) return h(null, l);
10656
+ if (l + x + 512 > o || (l += x + 512, l >= o)) return a(null, l);
10612
10657
  s3.mtimeCache && E.mtime && s3.mtimeCache.set(String(E.path), E.mtime), c = 0, v.read(n, d, 0, 512, l, S);
10613
10658
  };
10614
10659
  v.read(n, d, 0, 512, l, S);
10615
10660
  };
10616
10661
  return new Promise((n, o) => {
10617
10662
  e.on("error", o);
10618
- let a = "r+", h = (l, c) => {
10619
- if (l && l.code === "ENOENT" && a === "r+") return a = "w+", v.open(s3.file, a, h);
10663
+ let h = "r+", a = (l, c) => {
10664
+ if (l && l.code === "ENOENT" && h === "r+") return h = "w+", v.open(s3.file, h, a);
10620
10665
  if (l || !c) return o(l);
10621
10666
  v.fstat(c, (d, S) => {
10622
10667
  if (d) return v.close(c, () => o(d));
10623
- i(c, S.size, (T, N) => {
10668
+ i(c, S.size, (T, D) => {
10624
10669
  if (T) return o(T);
10625
- let E = new tt2(s3.file, { fd: c, start: N });
10626
- e.pipe(E), E.on("error", o), E.on("close", n), So(e, t);
10670
+ let E = new et(s3.file, { fd: c, start: D });
10671
+ e.pipe(E), E.on("error", o), E.on("close", n), _o(e, t);
10627
10672
  });
10628
10673
  });
10629
10674
  };
10630
- v.open(s3.file, a, h);
10675
+ v.open(s3.file, h, a);
10631
10676
  });
10632
10677
  };
10633
- var wo = (s3, t) => {
10678
+ var bo = (s3, t) => {
10634
10679
  t.forEach((e) => {
10635
- e.charAt(0) === "@" ? Ft({ file: vr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
10680
+ e.charAt(0) === "@" ? Ct({ file: Pr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
10636
10681
  }), s3.end();
10637
10682
  };
10638
- var So = async (s3, t) => {
10639
- for (let e of t) e.charAt(0) === "@" ? await Ft({ file: vr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
10683
+ var _o = async (s3, t) => {
10684
+ for (let e of t) e.charAt(0) === "@" ? await Ct({ file: Pr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
10640
10685
  s3.end();
10641
10686
  };
10642
- var vt = K(mo, Eo, () => {
10687
+ var vt = K(yo, go, () => {
10643
10688
  throw new TypeError("file is required");
10644
10689
  }, () => {
10645
10690
  throw new TypeError("file is required");
10646
10691
  }, (s3, t) => {
10647
- if (!vs(s3)) throw new TypeError("file is required");
10692
+ if (!Bs(s3)) throw new TypeError("file is required");
10648
10693
  if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
10649
10694
  if (!t?.length) throw new TypeError("no paths specified to add/replace");
10650
10695
  });
10651
- var yo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
10652
- vt.validate?.(s3, t), Ro(s3);
10696
+ var Oo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
10697
+ vt.validate?.(s3, t), To(s3);
10653
10698
  });
10654
- var Ro = (s3) => {
10699
+ var To = (s3) => {
10655
10700
  let t = s3.filter;
10656
10701
  s3.mtimeCache || (s3.mtimeCache = /* @__PURE__ */ new Map()), s3.filter = t ? (e, i) => t(e, i) && !((s3.mtimeCache?.get(e) ?? i.mtime ?? 0) > (i.mtime ?? 0)) : (e, i) => !((s3.mtimeCache?.get(e) ?? i.mtime ?? 0) > (i.mtime ?? 0));
10657
10702
  };
@@ -10663,7 +10708,7 @@ function normalize(filename2) {
10663
10708
  }
10664
10709
  async function getFileList(filename2) {
10665
10710
  const entries = [];
10666
- await Ft({
10711
+ await Ct({
10667
10712
  file: filename2,
10668
10713
  strict: true,
10669
10714
  onReadEntry(entry) {
@@ -10678,7 +10723,7 @@ async function getFileList(filename2) {
10678
10723
  async function getFileContent(tarball, filenames) {
10679
10724
  const contents = {};
10680
10725
  return new Promise((resolve, reject) => {
10681
- const t = new st({
10726
+ const t = new rt({
10682
10727
  filter(path8) {
10683
10728
  return filenames.includes(normalize(path8));
10684
10729
  }
@@ -10993,7 +11038,7 @@ var escapeArgument = (argument) => escapeFile(escapeFile(`"${argument.replaceAll
10993
11038
  var escapeFile = (file) => file.replaceAll(/([()\][%!^"`<>&|;, *?])/g, "^$1");
10994
11039
 
10995
11040
  // node_modules/nano-spawn/source/result.js
10996
- import { once, on as on2 } from "node:events";
11041
+ import { once, on } from "node:events";
10997
11042
  import process6 from "node:process";
10998
11043
  var getResult = async (nodeChildProcess, options, context) => {
10999
11044
  const instance = await nodeChildProcess;
@@ -11014,7 +11059,7 @@ var getResult = async (nodeChildProcess, options, context) => {
11014
11059
  }
11015
11060
  };
11016
11061
  var onStreamError = async (stream) => {
11017
- for await (const [error] of on2(stream, "error")) {
11062
+ for await (const [error] of on(stream, "error")) {
11018
11063
  if (!["ERR_STREAM_PREMATURE_CLOSE", "EPIPE"].includes(error?.code)) {
11019
11064
  throw error;
11020
11065
  }
@@ -11480,17 +11525,21 @@ function* validateOrder2(pkgAst, value, path8) {
11480
11525
  const keys = Object.keys(value);
11481
11526
  if (keys.includes("require")) {
11482
11527
  for (const esm of ["import", "module"]) {
11483
- if (keys.includes(esm) && keys.indexOf(esm) > keys.indexOf("require")) {
11484
- const { line, column } = jsonLocation(pkgAst, "member", "exports", ...path8, esm);
11485
- const property = path8.map((it2) => `["${it2}"]`).join("");
11486
- yield {
11487
- ruleId: ruleId5,
11488
- severity: severity3,
11489
- message: `"${esm}" must come before "require" in "exports${property}"`,
11490
- line,
11491
- column
11492
- };
11528
+ if (!keys.includes(esm)) {
11529
+ continue;
11493
11530
  }
11531
+ if (keys.indexOf(esm) <= keys.indexOf("require")) {
11532
+ continue;
11533
+ }
11534
+ const { line, column } = jsonLocation(pkgAst, "member", "exports", ...path8, esm);
11535
+ const property = path8.map((it2) => `["${it2}"]`).join("");
11536
+ yield {
11537
+ ruleId: ruleId5,
11538
+ severity: severity3,
11539
+ message: `"${esm}" must come before "require" in "exports${property}"`,
11540
+ line,
11541
+ column
11542
+ };
11494
11543
  }
11495
11544
  }
11496
11545
  for (const key of keys) {
@@ -11886,7 +11935,8 @@ async function* getDeepDependencies(pkg, visited, dependency) {
11886
11935
  if (!pkgData) {
11887
11936
  return;
11888
11937
  }
11889
- for (let [key, version2] of Object.entries(pkgData.dependencies ?? {})) {
11938
+ const { dependencies = {} } = pkgData;
11939
+ for (let [key, version2] of Object.entries(dependencies)) {
11890
11940
  if (version2.startsWith("npm:")) {
11891
11941
  const [newKey, newVersion] = version2.slice("npm:".length).split("@", 2);
11892
11942
  key = newKey;