opfs-worker 1.2.2 → 1.2.3

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.
@@ -8,42 +8,42 @@ class it extends g {
8
8
  super("OPFS is not supported in this browser", "OPFS_NOT_SUPPORTED", void 0, t);
9
9
  }
10
10
  }
11
- class me extends g {
11
+ class we extends g {
12
12
  constructor(t) {
13
13
  super("OPFS is not mounted", "OPFS_NOT_MOUNTED", void 0, t);
14
14
  }
15
15
  }
16
- class we extends g {
16
+ class ye extends g {
17
17
  constructor(t, e, n) {
18
18
  super(t, "INVALID_PATH", e, n);
19
19
  }
20
20
  }
21
- class ye extends g {
21
+ class Ee extends g {
22
22
  constructor(t, e) {
23
23
  super(`File not found: ${t}`, "FILE_NOT_FOUND", t, e);
24
24
  }
25
25
  }
26
- class Ee extends g {
26
+ class Se extends g {
27
27
  constructor(t, e) {
28
28
  super(`Directory not found: ${t}`, "DIRECTORY_NOT_FOUND", t, e);
29
29
  }
30
30
  }
31
- class Se extends g {
31
+ class xe extends g {
32
32
  constructor(t, e, n) {
33
33
  super(`Permission denied for ${e} on: ${t}`, "PERMISSION_DENIED", t, n);
34
34
  }
35
35
  }
36
- class xe extends g {
36
+ class Ne extends g {
37
37
  constructor(t, e, n) {
38
38
  super(t, "STORAGE_ERROR", e, n);
39
39
  }
40
40
  }
41
- class Ne extends g {
41
+ class Oe extends g {
42
42
  constructor(t, e, n) {
43
43
  super(`Operation timed out: ${t}`, "TIMEOUT_ERROR", e, n);
44
44
  }
45
45
  }
46
- function Oe(s, t, e, n) {
46
+ function be(s, t, e, n) {
47
47
  const i = `${s.toUpperCase()}_FAILED`;
48
48
  return new g(`Failed to ${s} file descriptor: ${t}`, i, e, n);
49
49
  }
@@ -130,7 +130,7 @@ const ot = [
130
130
  ".fbx",
131
131
  ".3ds"
132
132
  ];
133
- function be(s) {
133
+ function Ae(s) {
134
134
  const t = s.lastIndexOf(".");
135
135
  if (t <= 0)
136
136
  return !0;
@@ -163,7 +163,7 @@ function ct(s, t = "utf-8") {
163
163
  return console.warn("Encoding not supported, falling back to UTF-8"), new TextEncoder().encode(s);
164
164
  }
165
165
  }
166
- function Ae(s, t = "utf-8") {
166
+ function ve(s, t = "utf-8") {
167
167
  switch (t) {
168
168
  case "utf8":
169
169
  case "utf-8":
@@ -210,8 +210,9 @@ function ut(s) {
210
210
  t[e] = s.charCodeAt(e) & 127;
211
211
  return t;
212
212
  }
213
+ var ft = /* @__PURE__ */ ((s) => (s.Added = "added", s.Changed = "changed", s.Removed = "removed", s))(ft || {});
213
214
  const G = (s, t, e) => {
214
- const n = s instanceof RegExp ? W(s, e) : s, i = t instanceof RegExp ? W(t, e) : t, r = n !== null && i != null && ft(n, i, e);
215
+ const n = s instanceof RegExp ? j(s, e) : s, i = t instanceof RegExp ? j(t, e) : t, r = n !== null && i != null && pt(n, i, e);
215
216
  return r && {
216
217
  start: r[0],
217
218
  end: r[1],
@@ -219,10 +220,10 @@ const G = (s, t, e) => {
219
220
  body: e.slice(r[0] + n.length, r[1]),
220
221
  post: e.slice(r[1] + i.length)
221
222
  };
222
- }, W = (s, t) => {
223
+ }, j = (s, t) => {
223
224
  const e = t.match(s);
224
225
  return e ? e[0] : null;
225
- }, ft = (s, t, e) => {
226
+ }, pt = (s, t, e) => {
226
227
  let n, i, r, o, a, h = e.indexOf(s), l = e.indexOf(t, h + 1), c = h;
227
228
  if (h >= 0 && l > 0) {
228
229
  if (s === t)
@@ -240,15 +241,15 @@ const G = (s, t, e) => {
240
241
  n.length && o !== void 0 && (a = [r, o]);
241
242
  }
242
243
  return a;
243
- }, H = "\0SLASH" + Math.random() + "\0", V = "\0OPEN" + Math.random() + "\0", L = "\0CLOSE" + Math.random() + "\0", Z = "\0COMMA" + Math.random() + "\0", Y = "\0PERIOD" + Math.random() + "\0", pt = new RegExp(H, "g"), dt = new RegExp(V, "g"), gt = new RegExp(L, "g"), mt = new RegExp(Z, "g"), wt = new RegExp(Y, "g"), yt = /\\\\/g, Et = /\\{/g, St = /\\}/g, xt = /\\,/g, Nt = /\\./g;
244
+ }, H = "\0SLASH" + Math.random() + "\0", V = "\0OPEN" + Math.random() + "\0", L = "\0CLOSE" + Math.random() + "\0", Z = "\0COMMA" + Math.random() + "\0", Y = "\0PERIOD" + Math.random() + "\0", dt = new RegExp(H, "g"), gt = new RegExp(V, "g"), mt = new RegExp(L, "g"), wt = new RegExp(Z, "g"), yt = new RegExp(Y, "g"), Et = /\\\\/g, St = /\\{/g, xt = /\\}/g, Nt = /\\,/g, Ot = /\\./g;
244
245
  function D(s) {
245
246
  return isNaN(s) ? s.charCodeAt(0) : parseInt(s, 10);
246
247
  }
247
- function Ot(s) {
248
- return s.replace(yt, H).replace(Et, V).replace(St, L).replace(xt, Z).replace(Nt, Y);
249
- }
250
248
  function bt(s) {
251
- return s.replace(pt, "\\").replace(dt, "{").replace(gt, "}").replace(mt, ",").replace(wt, ".");
249
+ return s.replace(Et, H).replace(St, V).replace(xt, L).replace(Nt, Z).replace(Ot, Y);
250
+ }
251
+ function At(s) {
252
+ return s.replace(dt, "\\").replace(gt, "{").replace(mt, "}").replace(wt, ",").replace(yt, ".");
252
253
  }
253
254
  function J(s) {
254
255
  if (!s)
@@ -261,19 +262,19 @@ function J(s) {
261
262
  const a = J(r);
262
263
  return r.length && (o[o.length - 1] += a.shift(), o.push.apply(o, a)), t.push.apply(t, o), t;
263
264
  }
264
- function At(s) {
265
- return s ? (s.slice(0, 2) === "{}" && (s = "\\{\\}" + s.slice(2)), T(Ot(s), !0).map(bt)) : [];
266
- }
267
265
  function vt(s) {
268
- return "{" + s + "}";
266
+ return s ? (s.slice(0, 2) === "{}" && (s = "\\{\\}" + s.slice(2)), T(bt(s), !0).map(At)) : [];
269
267
  }
270
268
  function $t(s) {
269
+ return "{" + s + "}";
270
+ }
271
+ function Tt(s) {
271
272
  return /^-?0\d/.test(s);
272
273
  }
273
- function Tt(s, t) {
274
+ function Mt(s, t) {
274
275
  return s <= t;
275
276
  }
276
- function Mt(s, t) {
277
+ function Pt(s, t) {
277
278
  return s >= t;
278
279
  }
279
280
  function T(s, t) {
@@ -293,14 +294,14 @@ function T(s, t) {
293
294
  let c;
294
295
  if (h)
295
296
  c = n.body.split(/\.\./);
296
- else if (c = J(n.body), c.length === 1 && c[0] !== void 0 && (c = T(c[0], !1).map(vt), c.length === 1))
297
+ else if (c = J(n.body), c.length === 1 && c[0] !== void 0 && (c = T(c[0], !1).map($t), c.length === 1))
297
298
  return r.map((f) => n.pre + c[0] + f);
298
299
  let p;
299
300
  if (h && c[0] !== void 0 && c[1] !== void 0) {
300
301
  const f = D(c[0]), u = D(c[1]), m = Math.max(c[0].length, c[1].length);
301
- let d = c.length === 3 && c[2] !== void 0 ? Math.abs(D(c[2])) : 1, S = Tt;
302
- u < f && (d *= -1, S = Mt);
303
- const A = c.some($t);
302
+ let d = c.length === 3 && c[2] !== void 0 ? Math.abs(D(c[2])) : 1, S = Mt;
303
+ u < f && (d *= -1, S = Pt);
304
+ const A = c.some(Tt);
304
305
  p = [];
305
306
  for (let x = f; S(x, u); x += d) {
306
307
  let w;
@@ -328,12 +329,12 @@ function T(s, t) {
328
329
  }
329
330
  return e;
330
331
  }
331
- const Pt = 1024 * 64, C = (s) => {
332
+ const Rt = 1024 * 64, C = (s) => {
332
333
  if (typeof s != "string")
333
334
  throw new TypeError("invalid pattern");
334
- if (s.length > Pt)
335
+ if (s.length > Rt)
335
336
  throw new TypeError("pattern is too long");
336
- }, Rt = {
337
+ }, Ct = {
337
338
  "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", !0],
338
339
  "[:alpha:]": ["\\p{L}\\p{Nl}", !0],
339
340
  "[:ascii:]": ["\\x00-\\x7f", !1],
@@ -348,7 +349,7 @@ const Pt = 1024 * 64, C = (s) => {
348
349
  "[:upper:]": ["\\p{Lu}", !0],
349
350
  "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", !0],
350
351
  "[:xdigit:]": ["A-Fa-f0-9", !1]
351
- }, $ = (s) => s.replace(/[[\]\\-]/g, "\\$&"), Ct = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), j = (s) => s.join(""), It = (s, t) => {
352
+ }, $ = (s) => s.replace(/[[\]\\-]/g, "\\$&"), It = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), U = (s) => s.join(""), Dt = (s, t) => {
352
353
  const e = t;
353
354
  if (s.charAt(e) !== "[")
354
355
  throw new Error("not in a brace expression");
@@ -369,7 +370,7 @@ const Pt = 1024 * 64, C = (s) => {
369
370
  continue;
370
371
  }
371
372
  if (d === "[" && !h) {
372
- for (const [S, [b, A, x]] of Object.entries(Rt))
373
+ for (const [S, [b, A, x]] of Object.entries(Ct))
373
374
  if (s.startsWith(S, r)) {
374
375
  if (p)
375
376
  return ["$.", !1, s.length - e, !0];
@@ -397,11 +398,11 @@ const Pt = 1024 * 64, C = (s) => {
397
398
  return ["$.", !1, s.length - e, !0];
398
399
  if (i.length === 0 && n.length === 1 && /^\\?.$/.test(n[0]) && !l) {
399
400
  const d = n[0].length === 2 ? n[0].slice(-1) : n[0];
400
- return [Ct(d), !1, c - e, !1];
401
+ return [It(d), !1, c - e, !1];
401
402
  }
402
- const f = "[" + (l ? "^" : "") + j(n) + "]", u = "[" + (l ? "" : "^") + j(i) + "]";
403
+ const f = "[" + (l ? "^" : "") + U(n) + "]", u = "[" + (l ? "" : "^") + U(i) + "]";
403
404
  return [n.length && i.length ? "(" + f + "|" + u + ")" : n.length ? f : u, a, c - e, !0];
404
- }, M = (s, { windowsPathsNoEscape: t = !1 } = {}) => t ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1"), Dt = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]), U = (s) => Dt.has(s), Lt = "(?!(?:^|/)\\.\\.?(?:$|/))", R = "(?!\\.)", kt = /* @__PURE__ */ new Set(["[", "."]), Ft = /* @__PURE__ */ new Set(["..", "."]), Wt = new Set("().*{}+?[]^$\\!"), jt = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), k = "[^/]", z = k + "*?", _ = k + "+?";
405
+ }, M = (s, { windowsPathsNoEscape: t = !1 } = {}) => t ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1"), Lt = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]), W = (s) => Lt.has(s), kt = "(?!(?:^|/)\\.\\.?(?:$|/))", R = "(?!\\.)", Ft = /* @__PURE__ */ new Set(["[", "."]), jt = /* @__PURE__ */ new Set(["..", "."]), Ut = new Set("().*{}+?[]^$\\!"), Wt = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), k = "[^/]", z = k + "*?", _ = k + "+?";
405
406
  class E {
406
407
  type;
407
408
  #s;
@@ -518,7 +519,7 @@ class E {
518
519
  o = !0, a = u, h = !1, m += d;
519
520
  continue;
520
521
  }
521
- if (!i.noext && U(d) && t.charAt(u) === "(") {
522
+ if (!i.noext && W(d) && t.charAt(u) === "(") {
522
523
  e.push(m), m = "";
523
524
  const S = new E(d, e);
524
525
  u = E.#l(t, S, u, i), e.push(S);
@@ -544,7 +545,7 @@ class E {
544
545
  o = !0, a = l, h = !1, f += u;
545
546
  continue;
546
547
  }
547
- if (U(u) && t.charAt(l) === "(") {
548
+ if (W(u) && t.charAt(l) === "(") {
548
549
  c.push(f), f = "";
549
550
  const m = new E(u, c);
550
551
  c.push(m), l = E.#l(t, m, l, i);
@@ -658,14 +659,14 @@ class E {
658
659
  return this.#n = this.#n || S, this.#r = this.#r || b, m;
659
660
  }).join("");
660
661
  let c = "";
661
- if (this.isStart() && typeof this.#t[0] == "string" && !(this.#t.length === 1 && Ft.has(this.#t[0]))) {
662
- const m = kt, d = (
662
+ if (this.isStart() && typeof this.#t[0] == "string" && !(this.#t.length === 1 && jt.has(this.#t[0]))) {
663
+ const m = Ft, d = (
663
664
  // dots are allowed, and the pattern starts with [ or .
664
665
  e && m.has(l.charAt(0)) || // the pattern starts with \., and then [ or .
665
666
  l.startsWith("\\.") && m.has(l.charAt(2)) || // the pattern starts with \.\., and then [ or .
666
667
  l.startsWith("\\.\\.") && m.has(l.charAt(4))
667
668
  ), S = !e && !t && m.has(l.charAt(0));
668
- c = d ? Lt : S ? R : "";
669
+ c = d ? kt : S ? R : "";
669
670
  }
670
671
  let p = "";
671
672
  return this.isEnd() && this.#s.#c && this.#e?.type === "!" && (p = "(?:$|\\/)"), [
@@ -713,7 +714,7 @@ class E {
713
714
  for (let a = 0; a < t.length; a++) {
714
715
  const h = t.charAt(a);
715
716
  if (i) {
716
- i = !1, r += (Wt.has(h) ? "\\" : "") + h;
717
+ i = !1, r += (Ut.has(h) ? "\\" : "") + h;
717
718
  continue;
718
719
  }
719
720
  if (h === "\\") {
@@ -721,7 +722,7 @@ class E {
721
722
  continue;
722
723
  }
723
724
  if (h === "[") {
724
- const [l, c, p, f] = It(t, a);
725
+ const [l, c, p, f] = Dt(t, a);
725
726
  if (p) {
726
727
  r += l, o = o || c, a += p - 1, e = e || f;
727
728
  continue;
@@ -735,21 +736,21 @@ class E {
735
736
  r += k, e = !0;
736
737
  continue;
737
738
  }
738
- r += jt(h);
739
+ r += Wt(h);
739
740
  }
740
741
  return [r, M(t), !!e, o];
741
742
  }
742
743
  }
743
- const Ut = (s, { windowsPathsNoEscape: t = !1 } = {}) => t ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&"), y = (s, t, e = {}) => (C(t), !e.nocomment && t.charAt(0) === "#" ? !1 : new I(t, e).match(s)), zt = /^\*+([^+@!?\*\[\(]*)$/, _t = (s) => (t) => !t.startsWith(".") && t.endsWith(s), Bt = (s) => (t) => t.endsWith(s), qt = (s) => (s = s.toLowerCase(), (t) => !t.startsWith(".") && t.toLowerCase().endsWith(s)), Gt = (s) => (s = s.toLowerCase(), (t) => t.toLowerCase().endsWith(s)), Ht = /^\*+\.\*+$/, Vt = (s) => !s.startsWith(".") && s.includes("."), Zt = (s) => s !== "." && s !== ".." && s.includes("."), Yt = /^\.\*+$/, Jt = (s) => s !== "." && s !== ".." && s.startsWith("."), Xt = /^\*+$/, Qt = (s) => s.length !== 0 && !s.startsWith("."), Kt = (s) => s.length !== 0 && s !== "." && s !== "..", te = /^\?+([^+@!?\*\[\(]*)?$/, ee = ([s, t = ""]) => {
744
+ const zt = (s, { windowsPathsNoEscape: t = !1 } = {}) => t ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&"), y = (s, t, e = {}) => (C(t), !e.nocomment && t.charAt(0) === "#" ? !1 : new I(t, e).match(s)), _t = /^\*+([^+@!?\*\[\(]*)$/, Bt = (s) => (t) => !t.startsWith(".") && t.endsWith(s), qt = (s) => (t) => t.endsWith(s), Gt = (s) => (s = s.toLowerCase(), (t) => !t.startsWith(".") && t.toLowerCase().endsWith(s)), Ht = (s) => (s = s.toLowerCase(), (t) => t.toLowerCase().endsWith(s)), Vt = /^\*+\.\*+$/, Zt = (s) => !s.startsWith(".") && s.includes("."), Yt = (s) => s !== "." && s !== ".." && s.includes("."), Jt = /^\.\*+$/, Xt = (s) => s !== "." && s !== ".." && s.startsWith("."), Qt = /^\*+$/, Kt = (s) => s.length !== 0 && !s.startsWith("."), te = (s) => s.length !== 0 && s !== "." && s !== "..", ee = /^\?+([^+@!?\*\[\(]*)?$/, se = ([s, t = ""]) => {
744
745
  const e = X([s]);
745
746
  return t ? (t = t.toLowerCase(), (n) => e(n) && n.toLowerCase().endsWith(t)) : e;
746
- }, se = ([s, t = ""]) => {
747
+ }, ne = ([s, t = ""]) => {
747
748
  const e = Q([s]);
748
749
  return t ? (t = t.toLowerCase(), (n) => e(n) && n.toLowerCase().endsWith(t)) : e;
749
- }, ne = ([s, t = ""]) => {
750
+ }, ie = ([s, t = ""]) => {
750
751
  const e = Q([s]);
751
752
  return t ? (n) => e(n) && n.endsWith(t) : e;
752
- }, ie = ([s, t = ""]) => {
753
+ }, re = ([s, t = ""]) => {
753
754
  const e = X([s]);
754
755
  return t ? (n) => e(n) && n.endsWith(t) : e;
755
756
  }, X = ([s]) => {
@@ -761,13 +762,13 @@ const Ut = (s, { windowsPathsNoEscape: t = !1 } = {}) => t ? s.replace(/[?*()[\]
761
762
  }, K = typeof process == "object" && process ? typeof process.env == "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix", B = {
762
763
  win32: { sep: "\\" },
763
764
  posix: { sep: "/" }
764
- }, re = K === "win32" ? B.win32.sep : B.posix.sep;
765
- y.sep = re;
765
+ }, oe = K === "win32" ? B.win32.sep : B.posix.sep;
766
+ y.sep = oe;
766
767
  const O = Symbol("globstar **");
767
768
  y.GLOBSTAR = O;
768
- const oe = "[^/]", ce = oe + "*?", ae = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?", he = "(?:(?!(?:\\/|^)\\.).)*?", le = (s, t = {}) => (e) => y(e, s, t);
769
- y.filter = le;
770
- const N = (s, t = {}) => Object.assign({}, s, t), ue = (s) => {
769
+ const ce = "[^/]", ae = ce + "*?", he = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?", le = "(?:(?!(?:\\/|^)\\.).)*?", ue = (s, t = {}) => (e) => y(e, s, t);
770
+ y.filter = ue;
771
+ const N = (s, t = {}) => Object.assign({}, s, t), fe = (s) => {
771
772
  if (!s || typeof s != "object" || !Object.keys(s).length)
772
773
  return y;
773
774
  const t = y;
@@ -801,17 +802,17 @@ const N = (s, t = {}) => Object.assign({}, s, t), ue = (s) => {
801
802
  GLOBSTAR: O
802
803
  });
803
804
  };
804
- y.defaults = ue;
805
- const tt = (s, t = {}) => (C(s), t.nobrace || !/\{(?:(?!\{).)*\}/.test(s) ? [s] : At(s));
805
+ y.defaults = fe;
806
+ const tt = (s, t = {}) => (C(s), t.nobrace || !/\{(?:(?!\{).)*\}/.test(s) ? [s] : vt(s));
806
807
  y.braceExpand = tt;
807
- const fe = (s, t = {}) => new I(s, t).makeRe();
808
- y.makeRe = fe;
809
- const pe = (s, t, e = {}) => {
808
+ const pe = (s, t = {}) => new I(s, t).makeRe();
809
+ y.makeRe = pe;
810
+ const de = (s, t, e = {}) => {
810
811
  const n = new I(t, e);
811
812
  return s = s.filter((i) => n.match(i)), n.options.nonull && !s.length && s.push(t), s;
812
813
  };
813
- y.match = pe;
814
- const q = /[?*]|[+@!]\(.*?\)|\[|\]/, de = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
814
+ y.match = de;
815
+ const q = /[?*]|[+@!]\(.*?\)|\[|\]/, ge = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
815
816
  class I {
816
817
  options;
817
818
  set;
@@ -1098,7 +1099,7 @@ globstar while`, t, f, e, u, m), this.matchOne(t.slice(f), e.slice(u), n))
1098
1099
  if (t === "")
1099
1100
  return "";
1100
1101
  let n, i = null;
1101
- (n = t.match(Xt)) ? i = e.dot ? Kt : Qt : (n = t.match(zt)) ? i = (e.nocase ? e.dot ? Gt : qt : e.dot ? Bt : _t)(n[1]) : (n = t.match(te)) ? i = (e.nocase ? e.dot ? se : ee : e.dot ? ne : ie)(n) : (n = t.match(Ht)) ? i = e.dot ? Zt : Vt : (n = t.match(Yt)) && (i = Jt);
1102
+ (n = t.match(Qt)) ? i = e.dot ? te : Kt : (n = t.match(_t)) ? i = (e.nocase ? e.dot ? Ht : Gt : e.dot ? qt : Bt)(n[1]) : (n = t.match(ee)) ? i = (e.nocase ? e.dot ? ne : se : e.dot ? ie : re)(n) : (n = t.match(Vt)) ? i = e.dot ? Yt : Zt : (n = t.match(Jt)) && (i = Xt);
1102
1103
  const r = E.fromGlob(t, this.options).toMMPattern();
1103
1104
  return i && typeof r == "object" && Reflect.defineProperty(r, "test", { value: i }), r;
1104
1105
  }
@@ -1108,13 +1109,13 @@ globstar while`, t, f, e, u, m), this.matchOne(t.slice(f), e.slice(u), n))
1108
1109
  const t = this.set;
1109
1110
  if (!t.length)
1110
1111
  return this.regexp = !1, this.regexp;
1111
- const e = this.options, n = e.noglobstar ? ce : e.dot ? ae : he, i = new Set(e.nocase ? ["i"] : []);
1112
+ const e = this.options, n = e.noglobstar ? ae : e.dot ? he : le, i = new Set(e.nocase ? ["i"] : []);
1112
1113
  let r = t.map((h) => {
1113
1114
  const l = h.map((c) => {
1114
1115
  if (c instanceof RegExp)
1115
1116
  for (const p of c.flags.split(""))
1116
1117
  i.add(p);
1117
- return typeof c == "string" ? de(c) : c === O ? O : c._src;
1118
+ return typeof c == "string" ? ge(c) : c === O ? O : c._src;
1118
1119
  });
1119
1120
  return l.forEach((c, p) => {
1120
1121
  const f = l[p + 1], u = l[p - 1];
@@ -1164,13 +1165,13 @@ globstar while`, t, f, e, u, m), this.matchOne(t.slice(f), e.slice(u), n))
1164
1165
  }
1165
1166
  y.AST = E;
1166
1167
  y.Minimatch = I;
1167
- y.escape = Ut;
1168
+ y.escape = zt;
1168
1169
  y.unescape = M;
1169
- function Te() {
1170
+ function Me() {
1170
1171
  if (!("storage" in navigator) || !("getDirectory" in navigator.storage))
1171
1172
  throw new it();
1172
1173
  }
1173
- async function ge(s, t, e) {
1174
+ async function me(s, t, e) {
1174
1175
  return typeof navigator < "u" && navigator.locks?.request ? navigator.locks.request(`opfs:${s.replace(/\/+/g, "/")}`, { mode: t }, e) : e();
1175
1176
  }
1176
1177
  function F(s) {
@@ -1183,29 +1184,29 @@ function st(s) {
1183
1184
  const t = F(s);
1184
1185
  return t[t.length - 1] || "";
1185
1186
  }
1186
- function Me(s) {
1187
+ function Pe(s) {
1187
1188
  const t = F(s);
1188
1189
  return t.pop(), et(t);
1189
1190
  }
1190
1191
  function nt(s) {
1191
1192
  return !s || s === "/" ? "/" : s.startsWith("~/") ? `/${s.slice(2)}` : s.startsWith("/") ? s : `/${s}`;
1192
1193
  }
1193
- function Pe(s, t = !1) {
1194
+ function Re(s, t = !1) {
1194
1195
  return s = s.replace(/\/$/, ""), t && !s.includes("*") ? `${s}/**` : s;
1195
1196
  }
1196
- function Re(s, t) {
1197
+ function Ce(s, t) {
1197
1198
  return y(s, t, {
1198
1199
  dot: !0,
1199
1200
  matchBase: !0
1200
1201
  });
1201
1202
  }
1202
- function Ce(s, t) {
1203
+ function Ie(s, t) {
1203
1204
  if (!t || Array.isArray(t) && t.length === 0)
1204
1205
  return !1;
1205
1206
  const e = nt(s);
1206
1207
  return (Array.isArray(t) ? t : [t]).some((i) => y(e, i, { dot: !0 }));
1207
1208
  }
1208
- function Ie(s) {
1209
+ function De(s) {
1209
1210
  const t = nt(s), e = F(t), n = [];
1210
1211
  for (const i of e)
1211
1212
  if (!(i === "." || i === ""))
@@ -1217,20 +1218,20 @@ function Ie(s) {
1217
1218
  n.push(i);
1218
1219
  return et(n);
1219
1220
  }
1220
- function De(s) {
1221
+ function Le(s) {
1221
1222
  const t = st(s), e = t.lastIndexOf(".");
1222
1223
  return e <= 0 || e === t.length - 1 ? "" : t.slice(e);
1223
1224
  }
1224
- function Le(s, t = "utf-8") {
1225
+ function ke(s, t = "utf-8") {
1225
1226
  return typeof s == "string" ? ct(s, t) : s instanceof Uint8Array ? s : new Uint8Array(s);
1226
1227
  }
1227
- async function ke(s, t = "SHA-1", e = 50 * 1024 * 1024) {
1228
+ async function Fe(s, t = "SHA-1", e = 50 * 1024 * 1024) {
1228
1229
  if (s instanceof File && (s = await s.arrayBuffer()), s.byteLength > e)
1229
1230
  throw new Error(`File size ${s.byteLength} bytes exceeds maximum allowed size ${e} bytes`);
1230
1231
  const n = new Uint8Array(s), i = await crypto.subtle.digest(t, n);
1231
1232
  return Array.from(new Uint8Array(i)).map((o) => o.toString(16).padStart(2, "0")).join("");
1232
1233
  }
1233
- function Fe(s, t) {
1234
+ function je(s, t) {
1234
1235
  if (s.length !== t.length)
1235
1236
  return !1;
1236
1237
  for (let e = 0; e < s.length; e++)
@@ -1238,13 +1239,13 @@ function Fe(s, t) {
1238
1239
  return !1;
1239
1240
  return !0;
1240
1241
  }
1241
- async function We(s) {
1242
+ async function Ue(s) {
1242
1243
  const t = await s.arrayBuffer();
1243
1244
  return new Uint8Array(t);
1244
1245
  }
1245
- async function je(s, t, e = {}) {
1246
+ async function We(s, t, e = {}) {
1246
1247
  const n = st(t);
1247
- return ge(t, "exclusive", async () => {
1248
+ return me(t, "exclusive", async () => {
1248
1249
  const i = e.recursive ?? !1, r = e.force ?? !1;
1249
1250
  e.useTrash;
1250
1251
  try {
@@ -1257,7 +1258,7 @@ async function je(s, t, e = {}) {
1257
1258
  }
1258
1259
  });
1259
1260
  }
1260
- function Ue(s, t, e, n) {
1261
+ function ze(s, t, e, n) {
1261
1262
  if (!Number.isInteger(t) || !Number.isInteger(e))
1262
1263
  throw new g("Invalid offset or length", "EINVAL");
1263
1264
  if (t < 0 || e < 0)
@@ -1267,20 +1268,20 @@ function Ue(s, t, e, n) {
1267
1268
  if (n != null && (!Number.isInteger(n) || n < 0))
1268
1269
  throw new g("Invalid position", "EINVAL");
1269
1270
  }
1270
- function ze(s, t, e) {
1271
+ function _e(s, t, e) {
1271
1272
  try {
1272
1273
  t.flush(), t.close();
1273
1274
  } catch (n) {
1274
1275
  console.warn(`Warning: Failed to properly close file descriptor ${s} (${e}):`, n);
1275
1276
  }
1276
1277
  }
1277
- function _e(s, t, e) {
1278
+ function Be(s, t, e) {
1278
1279
  if (s >= e)
1279
1280
  return { isEOF: !0, actualLength: 0 };
1280
1281
  const n = Math.min(t, e - s);
1281
1282
  return n <= 0 ? { isEOF: !0, actualLength: 0 } : { isEOF: !1, actualLength: n };
1282
1283
  }
1283
- async function Be(s, t) {
1284
+ async function qe(s, t) {
1284
1285
  try {
1285
1286
  return await s.createSyncAccessHandle();
1286
1287
  } catch (e) {
@@ -1288,41 +1289,42 @@ async function Be(s, t) {
1288
1289
  }
1289
1290
  }
1290
1291
  export {
1291
- ze as A,
1292
- _e as B,
1293
- Be as C,
1294
- Ee as D,
1292
+ _e as A,
1293
+ Be as B,
1294
+ qe as C,
1295
+ Se as D,
1295
1296
  ot as E,
1296
- ye as F,
1297
+ Ee as F,
1297
1298
  g as O,
1298
- we as P,
1299
- xe as S,
1300
- Ne as T,
1299
+ ye as P,
1300
+ Ne as S,
1301
+ Oe as T,
1302
+ ft as W,
1301
1303
  it as a,
1302
- me as b,
1303
- Se as c,
1304
- Ae as d,
1304
+ we as b,
1305
+ xe as c,
1306
+ ve as d,
1305
1307
  ct as e,
1306
- Oe as f,
1307
- Te as g,
1308
+ be as f,
1309
+ Me as g,
1308
1310
  st as h,
1309
- be as i,
1311
+ Ae as i,
1310
1312
  et as j,
1311
- Me as k,
1312
- Pe as l,
1313
+ Pe as k,
1314
+ Re as l,
1313
1315
  rt as m,
1314
1316
  nt as n,
1315
- Re as o,
1316
- Ce as p,
1317
- De as q,
1318
- Ie as r,
1317
+ Ce as o,
1318
+ Ie as p,
1319
+ Le as q,
1320
+ De as r,
1319
1321
  F as s,
1320
- Le as t,
1321
- ke as u,
1322
- Fe as v,
1323
- ge as w,
1324
- We as x,
1325
- je as y,
1326
- Ue as z
1322
+ ke as t,
1323
+ Fe as u,
1324
+ je as v,
1325
+ me as w,
1326
+ Ue as x,
1327
+ We as y,
1328
+ ze as z
1327
1329
  };
1328
- //# sourceMappingURL=helpers-CkNHswLp.js.map
1330
+ //# sourceMappingURL=helpers-BXhw_-Ar.js.map