@flemist/simple-utils 2.1.4 → 2.1.5

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.
@@ -1,55 +1,56 @@
1
- import { V as mt, S as pt, F as yt } from "../urlGet-DZEwtNXt.mjs";
2
- import { ac as he, M as de, W as me, X as pe, P as ye, aj as we, a2 as be, a3 as ge, b5 as xe, b6 as Ee, b7 as Se, b8 as ke, b9 as Oe, ba as je, bb as Ce, bk as Pe, bc as Ae, bd as Le, be as Te, bf as Me, bg as De, bh as Fe, bi as Ie, bj as Re, R as _e, $ as Ne, a0 as We, U as $e, L as Be, H as ze, a6 as Je, ad as Ue, ae as ve, K as He, I as Ge, N as Ke, q as Ve, aa as Ye, a9 as qe, a8 as Xe, Z as Qe, l as Ze, o as tr, B as er, C as rr, D as nr, E as sr, z as ar, A as or, a5 as ir, ag as cr, af as lr, Q as ur, u as fr, v as hr, w as dr, J as mr, p as pr, x as yr, d as wr, g as br, a4 as gr, _ as xr, ab as Er, aH as Sr, aJ as kr, am as Or, ak as jr, b4 as Cr, al as Pr, ap as Ar, aL as Lr, aO as Tr, aD as Mr, aC as Dr, aq as Fr, aZ as Ir, ax as Rr, aY as _r, av as Nr, aX as Wr, aA as $r, au as Br, a_ as zr, as as Jr, ar as Ur, ao as vr, b1 as Hr, aF as Gr, aE as Kr, at as Vr, aw as Yr, aR as qr, aS as Xr, aT as Qr, aV as Zr, aP as tn, aW as en, ay as rn, aU as nn, aQ as sn, aN as an, aK as on, aG as cn, aI as ln, a$ as un, b0 as fn, an as hn, ah as dn, ai as mn, az as pn, aM as yn, aB as wn, b2 as bn, b3 as gn, b as xn, m as En, c as Sn, n as kn, f as On, k as jn, r as Cn, h as Pn, e as An, i as Ln, j as Tn, G as Mn, a as Dn, s as Fn, T as In, t as Rn, y as _n, bq as Nn, bs as Wn, br as $n, bl as Bn, bp as zn, bm as Jn, bo as Un, bn as vn, a7 as Hn, a1 as Gn, O as Kn, Y as Vn } from "../urlGet-DZEwtNXt.mjs";
3
- import { Locker as wt, useAbortController as bt, combineAbortSignals as st, delay as at } from "@flemist/async-utils";
4
- import { Pool as gt, poolRunWait as N } from "@flemist/time-limits";
5
- import xt from "node:os";
6
- import * as D from "path";
7
- import ot from "path";
8
- import { priorityCreate as z } from "@flemist/priority-queue";
9
- import * as F from "fs";
10
- import Et from "picomatch";
11
- import { spawn as v } from "child_process";
12
- import { AbortControllerFast as St } from "@flemist/abort-controller-fast";
13
- const Z = new gt(xt.cpus().length);
14
- function W(t) {
1
+ import { V as bt, S as gt, F as Et } from "../urlGet-DZEwtNXt.mjs";
2
+ import { ac as Se, M as xe, W as ke, X as Oe, P as Te, aj as Pe, a2 as Ce, a3 as Ae, b5 as je, b6 as De, b7 as Le, b8 as Me, b9 as Ie, ba as Fe, bb as Re, bk as _e, bc as $e, bd as Ne, be as We, bf as ve, bg as Be, bh as ze, bi as Je, bj as Ue, R as Ge, $ as He, a0 as Ve, U as Ke, L as qe, H as Ye, a6 as Xe, ad as Qe, ae as Ze, K as tr, I as er, N as rr, q as nr, aa as sr, a9 as ar, a8 as or, Z as ir, l as cr, o as lr, B as ur, C as fr, D as hr, E as dr, z as mr, A as wr, a5 as yr, ag as pr, af as br, Q as gr, u as Er, v as Sr, w as xr, J as kr, p as Or, x as Tr, d as Pr, g as Cr, a4 as Ar, _ as jr, ab as Dr, aH as Lr, aJ as Mr, am as Ir, ak as Fr, b4 as Rr, al as _r, ap as $r, aL as Nr, aO as Wr, aD as vr, aC as Br, aq as zr, aZ as Jr, ax as Ur, aY as Gr, av as Hr, aX as Vr, aA as Kr, au as qr, a_ as Yr, as as Xr, ar as Qr, ao as Zr, b1 as tn, aF as en, aE as rn, at as nn, aw as sn, aR as an, aS as on, aT as cn, aV as ln, aP as un, aW as fn, ay as hn, aU as dn, aQ as mn, aN as wn, aK as yn, aG as pn, aI as bn, a$ as gn, b0 as En, an as Sn, ah as xn, ai as kn, az as On, aM as Tn, aB as Pn, b2 as Cn, b3 as An, b as jn, m as Dn, c as Ln, n as Mn, f as In, k as Fn, r as Rn, h as _n, e as $n, i as Nn, j as Wn, G as vn, a as Bn, s as zn, T as Jn, t as Un, y as Gn, bq as Hn, bs as Vn, br as Kn, bl as qn, bp as Yn, bm as Xn, bo as Qn, bn as Zn, a7 as ts, a1 as es, O as rs, Y as ns } from "../urlGet-DZEwtNXt.mjs";
3
+ import { Locker as St, useAbortController as xt, combineAbortSignals as tt, delay as it } from "@flemist/async-utils";
4
+ import { Pool as kt, poolRunWait as $ } from "@flemist/time-limits";
5
+ import Ot from "node:os";
6
+ import * as M from "path";
7
+ import ct from "path";
8
+ import { priorityCreate as B } from "@flemist/priority-queue";
9
+ import * as I from "fs";
10
+ import Tt from "picomatch";
11
+ import { spawn as U } from "child_process";
12
+ import { AbortControllerFast as lt, AbortError as nt } from "@flemist/abort-controller-fast";
13
+ import { createTestVariants as Pt } from "@flemist/test-variants";
14
+ const et = new kt(Ot.cpus().length);
15
+ function N(t) {
15
16
  return t.replace(/\\/g, "/");
16
17
  }
17
- let U = null;
18
- function kt(t) {
19
- U == null && (U = /* @__PURE__ */ new Map());
20
- const e = W(t);
21
- let n = U.get(e);
22
- return n == null && (n = new wt(), U.set(e, n)), n;
18
+ let J = null;
19
+ function Ct(t) {
20
+ J == null && (J = /* @__PURE__ */ new Map());
21
+ const e = N(t);
22
+ let n = J.get(e);
23
+ return n == null && (n = new St(), J.set(e, n)), n;
23
24
  }
24
- function Qt(t) {
25
+ function oe(t) {
25
26
  const { filePath: e, func: n } = t;
26
- return kt(e).lock(
27
- () => N({
28
- pool: Z,
27
+ return Ct(e).lock(
28
+ () => $({
29
+ pool: et,
29
30
  count: 1,
30
31
  func: n
31
32
  })
32
33
  );
33
34
  }
34
- function Ot(t) {
35
+ function At(t) {
35
36
  return t.match(/^[/\\]?[^/\\]+/)[0];
36
37
  }
37
38
  function jt(t, e) {
38
- return Ot(t) + "|" + e.ino;
39
+ return At(t) + "|" + e.ino;
39
40
  }
40
- function Ct(t) {
41
- return t.endsWith(":") && (t += "/"), D.resolve(t);
41
+ function Dt(t) {
42
+ return t.endsWith(":") && (t += "/"), M.resolve(t);
42
43
  }
43
- function et(t, e) {
44
+ function st(t, e) {
44
45
  t.totalSize += e.totalSize, t.maxFileDateModified = Math.max(
45
46
  t.maxFileDateModified,
46
47
  e.maxFileDateModified
47
48
  ), t.countFiles += e.countFiles, t.countDirs += e.countDirs, t.countLinks += e.countLinks;
48
49
  }
49
- const Pt = function(e) {
50
+ const Lt = function(e) {
50
51
  return e.code === "ENOENT";
51
52
  };
52
- function it(t) {
53
+ function ut(t) {
53
54
  const e = t.paths;
54
55
  if (!e || e.length === 0)
55
56
  return Promise.resolve({
@@ -59,148 +60,148 @@ function it(t) {
59
60
  countDirs: 0,
60
61
  countLinks: 0
61
62
  });
62
- const n = t.level ?? 0, s = t.walkedIds ?? /* @__PURE__ */ new Set(), r = t.abortSignal, a = t.pool ?? Z, o = t.handleError, i = t.priority ?? z(0), u = t.walkLinks ?? !1, c = t.log, x = t.handlePath, f = t.matchPath;
63
- async function y(h) {
64
- if (!(o && await o(h)) && !Pt(h))
65
- throw h;
63
+ const n = t.level ?? 0, s = t.walkedIds ?? /* @__PURE__ */ new Set(), r = t.abortSignal, a = t.pool ?? et, o = t.handleError, i = t.priority ?? B(0), h = t.walkLinks ?? !1, l = t.log, g = t.handlePath, d = t.matchPath;
64
+ async function f(u) {
65
+ if (!(o && await o(u)) && !Lt(u))
66
+ throw u;
66
67
  }
67
- function j(h) {
68
- return !(!c || c.minTotalContentSize != null && h < c.minTotalContentSize || c.maxNestedLevel != null && n > c.maxNestedLevel);
68
+ function x(u) {
69
+ return !(!l || l.minTotalContentSize != null && u < l.minTotalContentSize || l.maxNestedLevel != null && n > l.maxNestedLevel);
69
70
  }
70
- return bt(async (h) => {
71
- const w = st(r, h), m = {
71
+ return xt(async (u) => {
72
+ const m = tt(r, u), w = {
72
73
  totalSize: 0,
73
74
  maxFileDateModified: 0,
74
75
  countFiles: 0,
75
76
  countDirs: 0,
76
77
  countLinks: 0
77
78
  };
78
- function T(g, O) {
79
- if (j(O.totalSize)) {
80
- const b = `${O.totalSize.toLocaleString("en-US").replace(/,/g, " ").padStart(19)}: ${g}`;
81
- c?.handleLog ? c.handleLog(b) : console.log(b);
79
+ function P(y, T) {
80
+ if (x(T.totalSize)) {
81
+ const k = `${T.totalSize.toLocaleString("en-US").replace(/,/g, " ").padStart(19)}: ${y}`;
82
+ l?.handleLog ? l.handleLog(k) : console.log(k);
82
83
  }
83
84
  }
84
- async function l(g, O, p, b) {
85
- return x ? await N({
85
+ async function c(y, T, S, k) {
86
+ return g ? await $({
86
87
  pool: a,
87
88
  func: async () => {
88
89
  try {
89
- return await x({
90
+ return await g({
90
91
  level: n,
91
- path: g,
92
- stat: O,
93
- itemStat: p,
94
- totalStat: m,
95
- abortSignal: w
92
+ path: y,
93
+ stat: T,
94
+ itemStat: S,
95
+ totalStat: w,
96
+ abortSignal: m
96
97
  });
97
- } catch (k) {
98
- return await y(k), !1;
98
+ } catch (O) {
99
+ return await f(O), !1;
99
100
  }
100
101
  },
101
102
  count: 1,
102
- priority: b,
103
- abortSignal: w
103
+ priority: k,
104
+ abortSignal: m
104
105
  }) : !0;
105
106
  }
106
- async function E(g, O, p, b) {
107
- b || (b = g);
108
- const k = await N({
107
+ async function p(y, T, S, k) {
108
+ k || (k = y);
109
+ const O = await $({
109
110
  pool: a,
110
- func: () => F.promises.lstat(g).catch(y),
111
+ func: () => I.promises.lstat(y).catch(f),
111
112
  count: 1,
112
- priority: z(O, z(1, i)),
113
- abortSignal: w
113
+ priority: B(T, B(1, i)),
114
+ abortSignal: m
114
115
  });
115
- if (!k || !p && k.isFile())
116
+ if (!O || !S && O.isFile())
116
117
  return null;
117
- const P = jt(g, k);
118
- if (s.has(P))
118
+ const A = jt(y, O);
119
+ if (s.has(A))
119
120
  return null;
120
- s.add(P);
121
- let d = {
122
- totalSize: k.size,
123
- maxFileDateModified: k.isDirectory() ? 0 : k.mtimeMs,
121
+ s.add(A);
122
+ let b = {
123
+ totalSize: O.size,
124
+ maxFileDateModified: O.isDirectory() ? 0 : O.mtimeMs,
124
125
  countFiles: 0,
125
126
  countDirs: 0,
126
127
  countLinks: 0
127
128
  };
128
- const A = z(
129
- O,
130
- z(k.isDirectory() ? 2 : 3, i)
129
+ const j = B(
130
+ T,
131
+ B(O.isDirectory() ? 2 : 3, i)
131
132
  );
132
- if (k.isSymbolicLink()) {
133
- if (u) {
134
- const C = await N({
133
+ if (O.isSymbolicLink()) {
134
+ if (h) {
135
+ const C = await $({
135
136
  pool: a,
136
- func: () => F.promises.readlink(g).catch(y).then((M) => M ?? null),
137
+ func: () => I.promises.readlink(y).catch(f).then((L) => L ?? null),
137
138
  count: 1,
138
- priority: A,
139
- abortSignal: w
139
+ priority: j,
140
+ abortSignal: m
140
141
  });
141
142
  if (C) {
142
- const M = D.isAbsolute(C) ? C : D.resolve(D.dirname(b), C), I = await E(
143
- M,
144
- O,
145
- p,
146
- b
143
+ const L = M.isAbsolute(C) ? C : M.resolve(M.dirname(k), C), F = await p(
144
+ L,
145
+ T,
146
+ S,
147
+ k
147
148
  );
148
- I && (d = I);
149
+ F && (b = F);
149
150
  }
150
151
  }
151
- return (p || d.countFiles + d.countDirs + d.countLinks >= 1) && (d.countLinks += 1, await l(
152
- b,
152
+ return (S || b.countFiles + b.countDirs + b.countLinks >= 1) && (b.countLinks += 1, await c(
153
153
  k,
154
- d,
155
- A
156
- ) && (et(m, d), T(b, d))), d;
157
- } else if (k.isDirectory()) {
158
- const C = await N({
154
+ O,
155
+ b,
156
+ j
157
+ ) && (st(w, b), P(k, b))), b;
158
+ } else if (O.isDirectory()) {
159
+ const C = await $({
159
160
  pool: a,
160
- func: () => F.promises.readdir(g).catch(y),
161
+ func: () => I.promises.readdir(y).catch(f),
161
162
  count: 1,
162
163
  priority: i,
163
- abortSignal: w
164
+ abortSignal: m
164
165
  });
165
166
  if (C) {
166
- for (let M = 0, I = C.length; M < I; M++)
167
- C[M] = D.join(b, C[M]);
168
- d = await it({
167
+ for (let L = 0, F = C.length; L < F; L++)
168
+ C[L] = M.join(k, C[L]);
169
+ b = await ut({
169
170
  ...t,
170
171
  paths: C,
171
- abortSignal: w,
172
- priority: A,
172
+ abortSignal: m,
173
+ priority: j,
173
174
  level: n + 1,
174
175
  walkedIds: s
175
176
  });
176
177
  }
177
178
  }
178
- return (p || d.countFiles + d.countDirs + d.countLinks >= 1) && (k.isDirectory() ? d.countDirs += 1 : k.isFile() && (d.countFiles += 1), await l(
179
- b,
179
+ return (S || b.countFiles + b.countDirs + b.countLinks >= 1) && (O.isDirectory() ? b.countDirs += 1 : O.isFile() && (b.countFiles += 1), await c(
180
180
  k,
181
- d,
182
- A
183
- ) && (et(m, d), T(b, d))), d;
181
+ O,
182
+ b,
183
+ j
184
+ ) && (st(w, b), P(k, b))), b;
184
185
  }
185
- const S = [];
186
- for (let g = 0, O = e.length; g < O; g++) {
187
- const p = Ct(e[g]), b = f ? f(p) : !0;
188
- b !== !1 && S.push(E(p, g, b));
186
+ const E = [];
187
+ for (let y = 0, T = e.length; y < T; y++) {
188
+ const S = Dt(e[y]), k = d ? d(S) : !0;
189
+ k !== !1 && E.push(p(S, y, k));
189
190
  }
190
- return await Promise.all(S), m;
191
+ return await Promise.all(E), w;
191
192
  });
192
193
  }
193
- function Zt(t) {
194
- return it(t);
194
+ function ie(t) {
195
+ return ut(t);
195
196
  }
196
- function te({
197
+ function ce({
197
198
  globs: t,
198
199
  rootDir: e,
199
200
  noCase: n
200
201
  }) {
201
202
  const s = [];
202
203
  return t.forEach((r) => {
203
- r = W(r).trim();
204
+ r = N(r).trim();
204
205
  const a = r.startsWith("^");
205
206
  a && (r = r.substring(1).trim());
206
207
  const o = r.startsWith("!");
@@ -209,85 +210,85 @@ function te({
209
210
  `Invalid glob pattern: "${r}". The syntax '${r.substring(0, 2)}' is not supported. Valid glob patterns use: * (match any characters), ** (match any directories), ? (match single character), [abc] (character class), ! (negate pattern), ^ (exclude if included). Examples of valid patterns: "*.js", "src/**/*.ts", "!node_modules", "^dist". Avoid starting with '!' after '^' or multiple special prefixes.`
210
211
  );
211
212
  r.startsWith("/") && (r = "." + r);
212
- const i = W(e ? D.resolve(e, r) : r);
213
+ const i = N(e ? M.resolve(e, r) : r);
213
214
  if (!i)
214
215
  return;
215
- let u;
216
+ let h;
216
217
  try {
217
- u = Et(i, {
218
+ h = Tt(i, {
218
219
  nocase: n ?? !1,
219
220
  dot: !0,
220
221
  strictBrackets: !0
221
222
  // Validate bracket balance for patterns like "["
222
223
  });
223
- } catch (c) {
224
+ } catch (l) {
224
225
  throw new Error(
225
- `Invalid glob pattern: "${r}". ${c instanceof Error ? c.message : "Unknown error"}. Valid glob patterns use: * (match any characters), ** (match any directories), ? (match single character), [abc] (character class with balanced brackets), ! (negate pattern), ^ (exclude if included). Examples: "*.js", "src/**/*.ts", "!node_modules", "[abc]def.txt". Ensure all brackets [ ] are properly closed and balanced.`
226
+ `Invalid glob pattern: "${r}". ${l instanceof Error ? l.message : "Unknown error"}. Valid glob patterns use: * (match any characters), ** (match any directories), ? (match single character), [abc] (character class with balanced brackets), ! (negate pattern), ^ (exclude if included). Examples: "*.js", "src/**/*.ts", "!node_modules", "[abc]def.txt". Ensure all brackets [ ] are properly closed and balanced.`
226
227
  );
227
228
  }
228
229
  s.push({
229
230
  exclude: a,
230
231
  negative: o,
231
232
  debugInfo: i,
232
- match: u
233
+ match: h
233
234
  });
234
235
  }), function(a) {
235
- a = W(a);
236
+ a = N(a);
236
237
  let o = null, i = !1;
237
- for (let u = 0, c = s.length; u < c; u++) {
238
- const x = s[u];
239
- x.match(a) && (x.exclude ? i = !x.negative : (o = !x.negative, i = !1));
238
+ for (let h = 0, l = s.length; h < l; h++) {
239
+ const g = s[h];
240
+ g.match(a) && (g.exclude ? i = !g.negative : (o = !g.negative, i = !1));
240
241
  }
241
242
  return i ? !1 : o;
242
243
  };
243
244
  }
244
- function At(t) {
245
+ function Mt(t) {
245
246
  const e = t.startsWith("!");
246
247
  return e && (t = t.substring(1)), t.startsWith("/") ? t = t.substring(1) : !t.startsWith("**") && !t.startsWith("../") && (t = `**/${t}`), e && (t = "!" + t), t;
247
248
  }
248
- function Lt(t, e) {
249
+ function It(t, e) {
249
250
  if (!e || e === ".")
250
251
  return t;
251
252
  const n = t.startsWith("^");
252
253
  n && (t = t.substring(1));
253
254
  const s = t.startsWith("!");
254
- return s && (t = t.substring(1)), t.startsWith("/") ? (e.endsWith("/") && (e = e.substring(0, e.length - 1)), t = e + t) : (e.endsWith("/") || (e += "/"), t.startsWith("./") ? t = e + t.substring(2) : t.startsWith("../") ? t = e + t : (e.startsWith("..") && (e = ""), t.startsWith("**") ? t = e + t : t = e + "**/" + t)), t = W(D.normalize(t)), s && (t = "!" + t), n && (t = "^" + t), t;
255
+ return s && (t = t.substring(1)), t.startsWith("/") ? (e.endsWith("/") && (e = e.substring(0, e.length - 1)), t = e + t) : (e.endsWith("/") || (e += "/"), t.startsWith("./") ? t = e + t.substring(2) : t.startsWith("../") ? t = e + t : (e.startsWith("..") && (e = ""), t.startsWith("**") ? t = e + t : t = e + "**/" + t)), t = N(M.normalize(t)), s && (t = "!" + t), n && (t = "^" + t), t;
255
256
  }
256
- function rt(t) {
257
+ function at(t) {
257
258
  return "^" + t;
258
259
  }
259
- async function Tt(t) {
260
- const n = (await F.promises.readFile(t, "utf-8")).split(`
260
+ async function Ft(t) {
261
+ const n = (await I.promises.readFile(t, "utf-8")).split(`
261
262
  `), s = [];
262
263
  return n.forEach((r) => {
263
264
  r = r.trim(), !(!r || r.startsWith("#")) && s.push(r);
264
265
  }), s;
265
266
  }
266
- async function ee(t) {
267
+ async function le(t) {
267
268
  const e = t.rootDir ?? ".", n = [];
268
269
  if (!t.globs?.length)
269
270
  return n;
270
271
  const s = [];
271
272
  return t.globs.forEach((r) => {
272
- r.value && (r.valueType === "file-contains-patterns" ? s.push(r) : r.valueType === "pattern" && n.push(r.exclude ? rt(r.value) : r.value));
273
+ r.value && (r.valueType === "file-contains-patterns" ? s.push(r) : r.valueType === "pattern" && n.push(r.exclude ? at(r.value) : r.value));
273
274
  }), s.length && await Promise.all(
274
275
  s.map(async (r) => {
275
- await N({
276
- pool: Z,
276
+ await $({
277
+ pool: et,
277
278
  count: 1,
278
279
  func: async () => {
279
- const a = D.resolve(e, r.value), o = await Tt(a), i = D.relative(e, D.dirname(a));
280
- o.forEach((u) => {
281
- u = At(u), u = Lt(u, i), n.push(r.exclude ? rt(u) : u);
280
+ const a = M.resolve(e, r.value), o = await Ft(a), i = M.relative(e, M.dirname(a));
281
+ o.forEach((h) => {
282
+ h = Mt(h), h = It(h, i), n.push(r.exclude ? at(h) : h);
282
283
  });
283
284
  }
284
285
  });
285
286
  })
286
287
  ), n;
287
288
  }
288
- function Mt(t, e = {}) {
289
+ function Rt(t, e = {}) {
289
290
  return new Promise((n, s) => {
290
- const r = v(t, {
291
+ const r = U(t, {
291
292
  shell: !0,
292
293
  ...e
293
294
  }), a = [];
@@ -305,19 +306,19 @@ function Mt(t, e = {}) {
305
306
  });
306
307
  });
307
308
  }
308
- async function re() {
309
+ async function ue() {
309
310
  let t;
310
311
  switch (process.platform) {
311
312
  case "darwin":
312
- t = v("afplay", ["/System/Library/Sounds/Ping.aiff"], {
313
+ t = U("afplay", ["/System/Library/Sounds/Ping.aiff"], {
313
314
  stdio: "ignore"
314
315
  });
315
316
  break;
316
317
  case "linux":
317
- t = v("beep", [], { stdio: "ignore", shell: !0 });
318
+ t = U("beep", [], { stdio: "ignore", shell: !0 });
318
319
  break;
319
320
  case "win32":
320
- t = v("powershell", ["-c", "[console]::beep(1000,300)"], {
321
+ t = U("powershell", ["-c", "[console]::beep(1000,300)"], {
321
322
  stdio: "ignore"
322
323
  });
323
324
  break;
@@ -332,84 +333,84 @@ async function re() {
332
333
  });
333
334
  });
334
335
  }
335
- async function Dt({
336
+ async function _t({
336
337
  page: t,
337
338
  urlFilters: e,
338
339
  timeouts: n
339
340
  }) {
340
- return n || (n = {}), n.downloadInternal || (n.downloadInternal = 10 * 1e3), n.downloadExternal || (n.downloadExternal = 60 * 1e3), n.total || (n.total = 300 * 1e3), await mt(
341
+ return n || (n = {}), n.downloadInternal || (n.downloadInternal = 10 * 1e3), n.downloadExternal || (n.downloadExternal = 60 * 1e3), n.total || (n.total = 300 * 1e3), await bt(
341
342
  () => t.evaluate(
342
343
  ({
343
344
  urlFilters: r,
344
345
  timeouts: a
345
346
  }) => {
346
- function o(c) {
347
- return function(f) {
348
- let y = !1;
349
- for (let j = 0, h = c.length; j < h; j++) {
350
- const w = c[j];
351
- w.pattern.test(f) && (y = w.value);
347
+ function o(l) {
348
+ return function(d) {
349
+ let f = !1;
350
+ for (let x = 0, u = l.length; x < u; x++) {
351
+ const m = l[x];
352
+ m.pattern.test(d) && (f = m.value);
352
353
  }
353
- return y;
354
+ return f;
354
355
  };
355
356
  }
356
357
  const i = r && o(r);
357
- let u = performance.getEntries && performance.getEntries();
358
- return u || (u = []), u.push({
358
+ let h = performance.getEntries && performance.getEntries();
359
+ return h || (h = []), h.push({
359
360
  name: location.href
360
361
  }), Promise.all(
361
- u.map(
362
- (c) => {
363
- if (c.entryType != null && c.entryType !== "resource" || i && !i(c.name))
362
+ h.map(
363
+ (l) => {
364
+ if (l.entryType != null && l.entryType !== "resource" || i && !i(l.name))
364
365
  return null;
365
- if (c.responseStatus != null)
366
- return c.responseStatus >= 400 ? Promise.resolve({
367
- url: c.name,
368
- error: c.responseStatus
366
+ if (l.responseStatus != null)
367
+ return l.responseStatus >= 400 ? Promise.resolve({
368
+ url: l.name,
369
+ error: l.responseStatus
369
370
  }) : null;
370
371
  if (navigator.userAgent.indexOf("Chrome") === -1)
371
372
  return null;
372
- const x = typeof AbortController < "u" ? new AbortController() : null, f = new URL(c.name).origin === location.origin, y = f ? a.downloadInternal : a.downloadExternal;
373
- let j;
374
- const h = new Promise((l, E) => {
375
- j = E;
376
- }), w = y && setTimeout(() => {
377
- x?.abort(), j(
373
+ const g = typeof AbortController < "u" ? new AbortController() : null, d = new URL(l.name).origin === location.origin, f = d ? a.downloadInternal : a.downloadExternal;
374
+ let x;
375
+ const u = new Promise((c, p) => {
376
+ x = p;
377
+ }), m = f && setTimeout(() => {
378
+ g?.abort(), x(
378
379
  new Error("[test][getPageHttpErrors] fetch timeout")
379
380
  );
380
- }, y);
381
- let m = fetch(c.name, {
382
- mode: f ? "same-origin" : "no-cors",
383
- signal: x?.signal,
384
- cache: f ? "force-cache" : void 0,
381
+ }, f);
382
+ let w = fetch(l.name, {
383
+ mode: d ? "same-origin" : "no-cors",
384
+ signal: g?.signal,
385
+ cache: d ? "force-cache" : void 0,
385
386
  method: "HEAD"
386
- }).then((l) => l.ok ? null : {
387
- url: c.name,
388
- error: l.status + " " + l.statusText
389
- }).catch((l) => ({
390
- url: c.name,
391
- error: l.message
387
+ }).then((c) => c.ok ? null : {
388
+ url: l.name,
389
+ error: c.status + " " + c.statusText
390
+ }).catch((c) => ({
391
+ url: l.name,
392
+ error: c.message
392
393
  }));
393
- x || (m = Promise.race([m, h]));
394
- function T() {
395
- w && clearTimeout(w);
394
+ g || (w = Promise.race([w, u]));
395
+ function P() {
396
+ m && clearTimeout(m);
396
397
  }
397
- return m.then(
398
- (l) => (T(), l),
399
- (l) => {
400
- throw T(), l;
398
+ return w.then(
399
+ (c) => (P(), c),
400
+ (c) => {
401
+ throw P(), c;
401
402
  }
402
403
  );
403
404
  }
404
405
  )
405
- ).then((c) => {
406
- const x = c.filter((f) => f).map(
407
- (f) => ({
408
- url: new URL(f.url),
409
- error: f.error
406
+ ).then((l) => {
407
+ const g = l.filter((d) => d).map(
408
+ (d) => ({
409
+ url: new URL(d.url),
410
+ error: d.error
410
411
  })
411
412
  );
412
- return x.length > 0 ? x : null;
413
+ return g.length > 0 ? g : null;
413
414
  });
414
415
  },
415
416
  {
@@ -420,12 +421,12 @@ async function Dt({
420
421
  { timeout: n.total }
421
422
  );
422
423
  }
423
- async function Ft({
424
+ async function $t({
424
425
  page: t,
425
426
  urlFilters: e,
426
427
  errorFilter: n
427
428
  }) {
428
- let s = await Dt({
429
+ let s = await _t({
429
430
  page: t,
430
431
  urlFilters: e
431
432
  });
@@ -434,12 +435,12 @@ async function Ft({
434
435
  `[test][checkPageHttpErrors] Page has http errors: ${JSON.stringify(s, null, 2)}`
435
436
  );
436
437
  }
437
- async function It({
438
+ async function Nt({
438
439
  page: t,
439
440
  filter: e,
440
441
  onError: n
441
442
  }) {
442
- const s = "callback_191b355ea6f64499a6607ad571da5d4d", r = t.context().browser()?.browserType().name(), a = pt();
443
+ const s = "callback_191b355ea6f64499a6607ad571da5d4d", r = t.context().browser()?.browserType().name(), a = gt();
443
444
  function o(i) {
444
445
  try {
445
446
  if (e && !e({
@@ -447,73 +448,73 @@ async function It({
447
448
  error: i
448
449
  }))
449
450
  return;
450
- } catch (u) {
451
- i = String(u);
451
+ } catch (h) {
452
+ i = String(h);
452
453
  }
453
454
  try {
454
455
  console.error(
455
456
  `[test][subscribeJsErrors] BROWSER JS ERROR (${r}): ${i}`
456
457
  );
457
- const u = new Error(i);
458
- u.stack = a, n(u);
459
- } catch (u) {
460
- console.error("[test][subscribeJsErrors] error", u);
458
+ const h = new Error(i);
459
+ h.stack = a, n(h);
460
+ } catch (h) {
461
+ console.error("[test][subscribeJsErrors] error", h);
461
462
  }
462
463
  }
463
464
  await t.exposeFunction(s, o), await t.addInitScript((i) => {
464
- function u(f) {
465
- if (Array.isArray(f))
466
- return f.map(u).join(`\r
465
+ function h(d) {
466
+ if (Array.isArray(d))
467
+ return d.map(h).join(`\r
467
468
  \r
468
469
  `);
469
- if (f instanceof Error)
470
- return f.stack || f.toString();
471
- if (typeof f == "object" && f != null) {
472
- const y = /* @__PURE__ */ new Set();
470
+ if (d instanceof Error)
471
+ return d.stack || d.toString();
472
+ if (typeof d == "object" && d != null) {
473
+ const f = /* @__PURE__ */ new Set();
473
474
  return JSON.stringify(
474
- f,
475
- (j, h) => {
476
- if (typeof h == "object" && h != null) {
477
- if (y.has(h))
475
+ d,
476
+ (x, u) => {
477
+ if (typeof u == "object" && u != null) {
478
+ if (f.has(u))
478
479
  return "[Circular]";
479
- y.add(h);
480
+ f.add(u);
480
481
  }
481
- return h;
482
+ return u;
482
483
  },
483
484
  2
484
485
  );
485
486
  }
486
- return String(f);
487
+ return String(d);
487
488
  }
488
- function c(f) {
489
- window[i](f);
489
+ function l(d) {
490
+ window[i](d);
490
491
  }
491
- const x = {
492
+ const g = {
492
493
  warn: console.warn.bind(console),
493
494
  error: console.error.bind(console)
494
495
  };
495
- console.warn = function(...y) {
496
- return c("console.warn: " + u(y)), x.warn.apply(this, y);
497
- }, console.error = function(...y) {
498
- return c("console.error: " + u(y)), x.error.apply(this, y);
496
+ console.warn = function(...f) {
497
+ return l("console.warn: " + h(f)), g.warn.apply(this, f);
498
+ }, console.error = function(...f) {
499
+ return l("console.error: " + h(f)), g.error.apply(this, f);
499
500
  }, window.addEventListener(
500
501
  "error",
501
- function(f) {
502
- c("window error: " + (f.message || JSON.stringify(f)));
502
+ function(d) {
503
+ l("window error: " + (d.message || JSON.stringify(d)));
503
504
  },
504
505
  !0
505
506
  ), window.addEventListener(
506
507
  "unhandledrejection",
507
- function(f) {
508
- c("window unhandledrejection: " + u(f.reason));
508
+ function(d) {
509
+ l("window unhandledrejection: " + h(d.reason));
509
510
  },
510
511
  !0
511
512
  );
512
513
  }, s);
513
514
  }
514
- async function Rt() {
515
+ async function ft() {
515
516
  try {
516
- process.platform === "win32" && await Mt(
517
+ process.platform === "win32" && await Rt(
517
518
  `wmic process where "commandline like '%ms-playwright%' and not commandline like '%wmic.exe%' and priority != 4" CALL setpriority "idle"`
518
519
  );
519
520
  } catch (t) {
@@ -523,38 +524,38 @@ async function Rt() {
523
524
  console.warn("[test][setPlaywrightPriorityLow] error: " + e);
524
525
  }
525
526
  }
526
- let H = null, q = null;
527
- function ne(t) {
528
- q = t;
527
+ let G = null, X = null;
528
+ function fe(t) {
529
+ X = t;
529
530
  }
530
- function _t() {
531
- if (H)
531
+ function Wt() {
532
+ if (G)
532
533
  return;
533
- const t = q || (process.env.DELAY_ON_ERROR ? parseInt(process.env.DELAY_ON_ERROR, 10) : 0);
534
- if (q)
535
- return console.log(`[test][delayOnError] Delay on error: ${t} ms`), H = at(t), H;
534
+ const t = X || (process.env.DELAY_ON_ERROR ? parseInt(process.env.DELAY_ON_ERROR, 10) : 0);
535
+ if (X)
536
+ return console.log(`[test][delayOnError] Delay on error: ${t} ms`), G = it(t), G;
536
537
  }
537
- function se() {
538
- return H;
538
+ function he() {
539
+ return G;
539
540
  }
540
- async function Nt(t) {
541
- const { page: e } = t, n = e.context().browser()?.browserType().name(), s = new St(), r = st(
541
+ async function vt(t) {
542
+ const { page: e } = t, n = e.context().browser()?.browserType().name(), s = new lt(), r = tt(
542
543
  s.signal,
543
544
  t.abortSignal
544
545
  ), a = (i) => {
545
- let u = `Error in (${n}) ${e.url()}
546
+ let h = `Error in (${n}) ${e.url()}
546
547
  `;
547
- t.pageFilePath && (u += ` at _ (${ot.resolve(t.pageFilePath)}:0:0)
548
- `), i.stack = u + (i.stack || i.message), i.message = u + i.message, console.error("[test][initPage] error", i), s.abort(i);
548
+ t.pageFilePath && (h += ` at _ (${ct.resolve(t.pageFilePath)}:0:0)
549
+ `), i.stack = h + (i.stack || i.message), i.message = h + i.message, console.error("[test][initPage] error", i), s.abort(i);
549
550
  };
550
- return await It({
551
+ return await Nt({
551
552
  page: e,
552
553
  filter: t.filters?.js?.filter,
553
554
  onError: a
554
555
  }), {
555
556
  abortSignal: r,
556
557
  checkErrors: async () => {
557
- await Ft({
558
+ await $t({
558
559
  page: e,
559
560
  urlFilters: t.filters?.http?.urlFilters,
560
561
  errorFilter: t.filters?.http?.errorFilter
@@ -562,7 +563,7 @@ async function Nt(t) {
562
563
  }
563
564
  };
564
565
  }
565
- async function ae({
566
+ async function Bt({
566
567
  page: t,
567
568
  abortSignal: e,
568
569
  filters: n,
@@ -571,7 +572,7 @@ async function ae({
571
572
  }) {
572
573
  const a = t.context().browser()?.browserType().name();
573
574
  try {
574
- const { abortSignal: o, checkErrors: i } = await Nt({
575
+ const { abortSignal: o, checkErrors: i } = await vt({
575
576
  page: t,
576
577
  abortSignal: e,
577
578
  filters: n,
@@ -585,11 +586,11 @@ async function ae({
585
586
  } catch (o) {
586
587
  let i = `Error in (${a}) ${t.url()}
587
588
  `;
588
- throw r && (i += ` at _ (${ot.resolve(r)}:0:0)
589
+ throw r && (i += ` at _ (${ct.resolve(r)}:0:0)
589
590
  `), o.stack = i + (o.stack || o.message), o.message = i + o.message, o;
590
591
  }
591
592
  }
592
- function oe({
593
+ function de({
593
594
  browserType: t,
594
595
  options: e
595
596
  }) {
@@ -602,43 +603,199 @@ function oe({
602
603
  }
603
604
  };
604
605
  }
605
- function ie({
606
+ function zt({
606
607
  browser: t,
607
608
  options: e
608
609
  }) {
609
610
  return async function(s) {
610
611
  const r = await t.newContext(e ?? void 0);
611
- await Rt();
612
+ await ft();
612
613
  try {
613
614
  const a = await s(r);
614
615
  return await r.close(), a;
615
616
  } catch (a) {
616
- const o = _t?.();
617
+ const o = Wt?.();
617
618
  throw o ? (console.error("[test][useBrowserContext] error", a), o.finally(() => r.close())) : await r.close(), a;
618
619
  }
619
620
  };
620
621
  }
622
+ async function me(t, e) {
623
+ const n = await t.$$(e);
624
+ for (const s of n)
625
+ await s.click();
626
+ }
627
+ const q = new lt();
628
+ let Jt = 0;
629
+ function Ut(t) {
630
+ return async function({
631
+ browser: n,
632
+ contextOptions: s,
633
+ name: r,
634
+ url: a,
635
+ pool: o,
636
+ priority: i,
637
+ filters: h,
638
+ ...l
639
+ }, g) {
640
+ const d = tt(
641
+ q.signal,
642
+ g
643
+ );
644
+ try {
645
+ await $({
646
+ pool: o,
647
+ count: 1,
648
+ priority: i,
649
+ abortSignal: d,
650
+ func: async (f, x) => {
651
+ x.throwIfAborted(), await zt({
652
+ browser: n,
653
+ options: s
654
+ })(async (u) => {
655
+ x.throwIfAborted();
656
+ const m = await u.newPage();
657
+ await ft();
658
+ const w = n.browserType().name(), P = x.subscribe(() => {
659
+ m.isClosed() || (m.close({
660
+ // reason: reason?.message,
661
+ runBeforeUnload: !1
662
+ }), u.close({
663
+ // reason: reason?.message,
664
+ }));
665
+ });
666
+ try {
667
+ console.log(`START ${r} (${w}): ${a}`), await Bt({
668
+ page: m,
669
+ abortSignal: x,
670
+ filters: h,
671
+ func: async ({ page: c, checkErrors: p, abortSignal: E }) => {
672
+ await t({
673
+ page: c,
674
+ url: a,
675
+ checkErrors: p,
676
+ abortSignal: E,
677
+ args: l
678
+ });
679
+ }
680
+ }), console.log(
681
+ `END [${Jt++}] ${r} (${w}): ${a}`
682
+ );
683
+ } catch (c) {
684
+ if (x.aborted || c instanceof nt) {
685
+ console.log(`ABORTED ${r} (${w}): ${a}`);
686
+ return;
687
+ }
688
+ throw console.log(`ERROR ${r} (${w}): ${a}`), q.signal.aborted || (console.log("unsubscribe on first error"), P()), q.abort(), c;
689
+ }
690
+ });
691
+ }
692
+ });
693
+ } catch (f) {
694
+ if (f instanceof nt)
695
+ return;
696
+ throw f;
697
+ }
698
+ };
699
+ }
700
+ function we(t) {
701
+ const e = Ut(t);
702
+ return Pt(async (n) => await e(n));
703
+ }
704
+ function ye(t, e) {
705
+ const n = e.stableTime, s = e.timeout, r = e.mutation ? {
706
+ childList: !!e.mutation.childList,
707
+ attributes: !!e.mutation.attributes,
708
+ characterData: !!e.mutation.characterData,
709
+ subtree: !!e.mutation.subtree,
710
+ selector: e.mutation.selector ?? null
711
+ } : null, a = e.resource ? {
712
+ resource: !!e.resource.resource,
713
+ navigation: !!e.resource.navigation,
714
+ paint: !!e.resource.paint,
715
+ longTask: !!e.resource.longTask
716
+ } : null;
717
+ return t.evaluate(
718
+ ({ stableTime: o, timeout: i, mutation: h, resource: l }) => {
719
+ return new Promise((f, x) => {
720
+ let u = Date.now(), m = null, w = null;
721
+ const P = [];
722
+ function c() {
723
+ u = Date.now();
724
+ }
725
+ function p() {
726
+ m != null && (clearTimeout(m), m = null), w != null && (clearTimeout(w), w = null);
727
+ for (let y = 0, T = P.length; y < T; y++)
728
+ P[y]();
729
+ }
730
+ function E() {
731
+ const y = o - (Date.now() - u);
732
+ y <= 0 ? (p(), f()) : m = setTimeout(E, y);
733
+ }
734
+ if (h) {
735
+ const y = g(h, c);
736
+ P.push(y);
737
+ }
738
+ if (l) {
739
+ const y = d(l, c);
740
+ P.push(y);
741
+ }
742
+ m = setTimeout(E, o), w = setTimeout(() => {
743
+ p(), x(
744
+ new Error(
745
+ `[waitPageStable] timed out after ${i}ms waiting for page to stabilize`
746
+ )
747
+ );
748
+ }, i);
749
+ });
750
+ function g(f, x) {
751
+ const u = f.selector ? document.querySelector(f.selector) : document.documentElement;
752
+ if (!u)
753
+ throw new Error(
754
+ `[waitPageStable] element not found: ${f.selector}`
755
+ );
756
+ const m = new MutationObserver(x);
757
+ return m.observe(u, {
758
+ childList: f.childList,
759
+ attributes: f.attributes,
760
+ characterData: f.characterData,
761
+ subtree: f.subtree
762
+ }), () => {
763
+ m.disconnect();
764
+ };
765
+ }
766
+ function d(f, x) {
767
+ const u = [];
768
+ f.resource && u.push("resource"), f.navigation && u.push("navigation"), f.paint && u.push("paint"), f.longTask && u.push("longtask");
769
+ const m = new PerformanceObserver(x);
770
+ return m.observe({ entryTypes: u }), () => {
771
+ m.disconnect();
772
+ };
773
+ }
774
+ },
775
+ { stableTime: n, timeout: s, mutation: r, resource: a }
776
+ );
777
+ }
621
778
  async function Y(t, e) {
622
- const n = D.dirname(t);
623
- await F.promises.stat(n).catch(() => null) || await F.promises.mkdir(n, { recursive: !0 }), await F.promises.writeFile(t, JSON.stringify(e, null, 4), {
779
+ const n = M.dirname(t);
780
+ await I.promises.stat(n).catch(() => null) || await I.promises.mkdir(n, { recursive: !0 }), await I.promises.writeFile(t, JSON.stringify(e, null, 4), {
624
781
  encoding: "utf-8"
625
782
  });
626
783
  }
627
- async function Wt(t) {
628
- if (!await F.promises.stat(t).catch(() => null))
784
+ async function Gt(t) {
785
+ if (!await I.promises.stat(t).catch(() => null))
629
786
  return null;
630
- const e = await F.promises.readFile(t, { encoding: "utf-8" });
787
+ const e = await I.promises.readFile(t, { encoding: "utf-8" });
631
788
  return JSON.parse(e);
632
789
  }
633
- const X = "-", Q = "+";
634
- function G(t, e, n) {
790
+ const Q = "-", Z = "+";
791
+ function H(t, e, n) {
635
792
  if (t === e)
636
793
  return null;
637
794
  if (Array.isArray(t)) {
638
795
  if (Array.isArray(e)) {
639
796
  let r = null;
640
797
  for (let a = 0, o = Math.max(e.length, e.length); a < o; a++) {
641
- const i = G(t[a], e[a], n);
798
+ const i = H(t[a], e[a], n);
642
799
  i != null && (r || (r = []), r.push(i));
643
800
  }
644
801
  return r != null && n && (r = n(t, e, r)), r;
@@ -647,159 +804,159 @@ function G(t, e, n) {
647
804
  let r = null;
648
805
  for (const a in t)
649
806
  if (Object.prototype.hasOwnProperty.call(t, a)) {
650
- const o = G(t[a], e[a], n);
807
+ const o = H(t[a], e[a], n);
651
808
  o != null && (r || (r = {}), r[a] = o);
652
809
  }
653
810
  for (const a in e)
654
811
  if (Object.prototype.hasOwnProperty.call(e, a) && !Object.prototype.hasOwnProperty.call(t, a)) {
655
- const o = G(t[a], e[a], n);
812
+ const o = H(t[a], e[a], n);
656
813
  o != null && (r || (r = {}), r[a] = o);
657
814
  }
658
815
  return r != null && n && (r = n(t, e, r)), r;
659
816
  }
660
817
  let s = {
661
- [X]: t,
662
- [Q]: e
818
+ [Q]: t,
819
+ [Z]: e
663
820
  };
664
821
  return n && (s = n(t, e, s)), s;
665
822
  }
666
- function nt(t) {
667
- function e(l) {
668
- return l.sort((E, S) => E[0] > S[0] ? 1 : -1).reduce((E, S) => (E[S[0]] = S[1], E), {});
823
+ function ot(t) {
824
+ function e(c) {
825
+ return c.sort((p, E) => p[0] > E[0] ? 1 : -1).reduce((p, E) => (p[E[0]] = E[1], p), {});
669
826
  }
670
- function n(l) {
671
- return l.reduce((E, S) => (E[S] = !0, E), {});
827
+ function n(c) {
828
+ return c.reduce((p, E) => (p[E] = !0, p), {});
672
829
  }
673
- const s = t.filters && t.filters.excludeAttrs && n(t.filters.excludeAttrs), r = t.filters && t.filters.fixAttrs, a = t.filters && t.filters.fixStyles, o = t.filters && t.filters.excludeStyles && n(t.filters.excludeStyles), i = t.filters && t.filters.fixTags, u = t.filters && t.filters.excludeClasses, c = t.filters && t.filters.excludeIds, x = t.filters && t.filters.excludeSelectorClasses, f = t.filters && t.filters.excludeSelectorIds;
674
- let y;
830
+ const s = t.filters && t.filters.excludeAttrs && n(t.filters.excludeAttrs), r = t.filters && t.filters.fixAttrs, a = t.filters && t.filters.fixStyles, o = t.filters && t.filters.excludeStyles && n(t.filters.excludeStyles), i = t.filters && t.filters.fixTags, h = t.filters && t.filters.excludeClasses, l = t.filters && t.filters.excludeIds, g = t.filters && t.filters.excludeSelectorClasses, d = t.filters && t.filters.excludeSelectorIds;
831
+ let f;
675
832
  if (t.filters && t.filters.excludeSelectors && t.filters.excludeSelectors.length > 0) {
676
- const l = Array.from(
833
+ const c = Array.from(
677
834
  document.querySelectorAll(t.filters.excludeSelectors.join(","))
678
835
  );
679
- l.length > 0 && (y = new Set(l));
836
+ c.length > 0 && (f = new Set(c));
680
837
  }
681
- function j(l, E, S, g) {
682
- const O = getComputedStyle(l, E), p = [];
683
- for (let b = 0, k = O.length; b < k; b++) {
684
- const P = O[b];
685
- if (o && o[P])
838
+ function x(c, p, E, y) {
839
+ const T = getComputedStyle(c, p), S = [];
840
+ for (let k = 0, O = T.length; k < O; k++) {
841
+ const A = T[k];
842
+ if (o && o[A])
686
843
  continue;
687
- let d = O[P];
688
- if (d && a)
689
- for (let A = 0, C = a.length; A < C; A++)
690
- a[A].name.test(P) && (d = d.replace(a[A].search, a[A].replace));
691
- (!S || S[P] !== d) && (!g || g[P] === d) && p.push([P, d]);
844
+ let b = T[A];
845
+ if (b && a)
846
+ for (let j = 0, C = a.length; j < C; j++)
847
+ a[j].name.test(A) && (b = b.replace(a[j].search, a[j].replace));
848
+ (!E || E[A] !== b) && (!y || y[A] === b) && S.push([A, b]);
692
849
  }
693
- return e(p);
850
+ return e(S);
694
851
  }
695
- function h(l, E, S) {
852
+ function u(c, p, E) {
696
853
  return {
697
- _: j(
698
- l,
854
+ _: x(
855
+ c,
699
856
  void 0,
700
- E && E._,
701
- S && S._
857
+ p && p._,
858
+ E && E._
702
859
  ),
703
- before: j(
704
- l,
860
+ before: x(
861
+ c,
705
862
  "before",
706
- E && E.before,
707
- S && S.before
863
+ p && p.before,
864
+ E && E.before
708
865
  ),
709
- after: j(
710
- l,
866
+ after: x(
867
+ c,
711
868
  "after",
712
- E && E.after,
713
- S && S.after
869
+ p && p.after,
870
+ E && E.after
714
871
  )
715
872
  };
716
873
  }
717
- function w(l, E, S, g, O) {
718
- for (let p = 0, b = l.childNodes.length; p < b; p++) {
719
- const k = l.childNodes[p];
720
- if (!k)
874
+ function m(c, p, E, y, T) {
875
+ for (let S = 0, k = c.childNodes.length; S < k; S++) {
876
+ const O = c.childNodes[S];
877
+ if (!O)
721
878
  throw new Error(
722
- `child is null; index=${p}; ${g}, ${l.className}\r
879
+ `child is null; index=${S}; ${y}, ${c.className}\r
723
880
  You should wait js executions before test`
724
881
  );
725
- k instanceof Element && m(
726
- k,
882
+ O instanceof Element && w(
883
+ O,
884
+ p,
727
885
  E,
728
- S,
729
- g,
730
- O
886
+ y,
887
+ T
731
888
  );
732
889
  }
733
890
  }
734
- function m(l, E, S, g, O) {
735
- const p = O && O[E.length];
736
- if (O && !p || y && y.has(l))
891
+ function w(c, p, E, y, T) {
892
+ const S = T && T[p.length];
893
+ if (T && !S || f && f.has(c))
737
894
  return;
738
- let b = l.tagName && l.tagName.toLowerCase();
739
- if (b === "head" && (S = !1), i)
740
- for (let L = 0, $ = i.length; L < $; L++)
741
- b = b.replace(i[L].search, i[L].replace);
742
- if (p && p.tag !== b)
895
+ let k = c.tagName && c.tagName.toLowerCase();
896
+ if (k === "head" && (E = !1), i)
897
+ for (let D = 0, W = i.length; D < W; D++)
898
+ k = k.replace(i[D].search, i[D].replace);
899
+ if (S && S.tag !== k)
743
900
  return;
744
- const k = [];
745
- for (let L = 0, $ = l.attributes.length; L < $; L++) {
746
- const R = l.attributes.item(L);
747
- let _ = R.name, J = R.value;
901
+ const O = [];
902
+ for (let D = 0, W = c.attributes.length; D < W; D++) {
903
+ const R = c.attributes.item(D);
904
+ let _ = R.name, z = R.value;
748
905
  if (_ = _.toLowerCase(), _ !== "class" && !(s && s[_])) {
749
906
  if (r)
750
- for (let B = 0, dt = r.length; B < dt; B++)
751
- r[B].name.test(_) && (J = J.replace(r[B].search, r[B].replace));
752
- (!p || p.attrs && p.attrs[_] === J) && k.push([_, J]);
907
+ for (let v = 0, pt = r.length; v < pt; v++)
908
+ r[v].name.test(_) && (z = z.replace(r[v].search, r[v].replace));
909
+ (!S || S.attrs && S.attrs[_] === z) && O.push([_, z]);
753
910
  }
754
911
  }
755
- const P = [], d = [];
756
- for (let L = 0, $ = l.classList.length; L < $; L++) {
757
- const R = l.classList.item(L);
758
- (!u || !u.test(R)) && P.push(R), (!x || !x.test(R)) && d.push(R);
912
+ const A = [], b = [];
913
+ for (let D = 0, W = c.classList.length; D < W; D++) {
914
+ const R = c.classList.item(D);
915
+ (!h || !h.test(R)) && A.push(R), (!g || !g.test(R)) && b.push(R);
759
916
  }
760
- const A = S ? h(l, t.defaultStyle, p && p.style) : null, C = l.childElementCount ? [] : null;
761
- l.id && (!c || !c.test(l.id)) && l.id;
762
- const M = l.id && (!f || !f.test(l.id)) ? l.id : "", I = (b || "") + (M ? "#" + M : "") + (d.length > 0 ? "." + d.join(".") : ""), tt = I ? g ? g + " > " + I : I : g, ht = {
763
- tag: b,
764
- selector: tt,
765
- classes: P,
766
- attrs: k.length > 0 ? e(k) : null,
767
- style: A,
917
+ const j = E ? u(c, t.defaultStyle, S && S.style) : null, C = c.childElementCount ? [] : null;
918
+ c.id && (!l || !l.test(c.id)) && c.id;
919
+ const L = c.id && (!d || !d.test(c.id)) ? c.id : "", F = (k || "") + (L ? "#" + L : "") + (b.length > 0 ? "." + b.join(".") : ""), rt = F ? y ? y + " > " + F : F : y, yt = {
920
+ tag: k,
921
+ selector: rt,
922
+ classes: A,
923
+ attrs: O.length > 0 ? e(O) : null,
924
+ style: j,
768
925
  childs: C
769
926
  };
770
- E.push(ht), C && w(
771
- l,
927
+ p.push(yt), C && m(
928
+ c,
772
929
  C,
773
- S,
774
- tt,
775
- p && p.childs
930
+ E,
931
+ rt,
932
+ S && S.childs
776
933
  );
777
934
  }
778
- const T = [];
779
- return m(
935
+ const P = [];
936
+ return w(
780
937
  document.documentElement,
781
- T,
938
+ P,
782
939
  !0,
783
940
  "",
784
941
  t.shouldEqualResult && [t.shouldEqualResult]
785
- ), T[0];
942
+ ), P[0];
786
943
  }
787
- async function ct(t) {
944
+ async function ht(t) {
788
945
  const e = await t.context().newCDPSession(t);
789
946
  return await e.send("DOM.enable"), await e.send("CSS.enable"), e;
790
947
  }
791
- async function lt(t) {
948
+ async function dt(t) {
792
949
  await t.send("CSS.disable"), await t.send("DOM.disable"), await t.detach();
793
950
  }
794
- async function ce(t, e) {
795
- const n = await ct(t);
951
+ async function pe(t, e) {
952
+ const n = await ht(t);
796
953
  try {
797
954
  return await e(n);
798
955
  } finally {
799
- await lt(n);
956
+ await dt(n);
800
957
  }
801
958
  }
802
- async function $t(t, e) {
959
+ async function Ht(t, e) {
803
960
  const { nodes: n } = await t.send("DOM.getFlattenedDocument", {
804
961
  depth: -1,
805
962
  pierce: !0
@@ -810,7 +967,7 @@ async function $t(t, e) {
810
967
  forcedPseudoClasses: e
811
968
  });
812
969
  }
813
- function K(t, e) {
970
+ function V(t, e) {
814
971
  if (!t || !e)
815
972
  return e || null;
816
973
  let n = null;
@@ -820,17 +977,17 @@ function K(t, e) {
820
977
  Object.prototype.hasOwnProperty.call(t, s) && !Object.prototype.hasOwnProperty.call(e, s) && (n || (n = {}), n[s] = "");
821
978
  return n;
822
979
  }
823
- function Bt(t, e) {
980
+ function Vt(t, e) {
824
981
  if (!t || !e)
825
982
  return e || null;
826
- const n = K(t._, e._), s = K(t.before, e.before), r = K(t.after, e.after);
983
+ const n = V(t._, e._), s = V(t.before, e.before), r = V(t.after, e.after);
827
984
  return !n && !s && !r ? null : {
828
985
  _: n || {},
829
986
  before: s || {},
830
987
  after: r || {}
831
988
  };
832
989
  }
833
- function zt(t, e) {
990
+ function Kt(t, e) {
834
991
  if (!t || !e)
835
992
  return e || null;
836
993
  if (t.length !== e.length)
@@ -840,20 +997,20 @@ function zt(t, e) {
840
997
  return e;
841
998
  return null;
842
999
  }
843
- function ut(t, e) {
844
- const n = zt(t.classes, e.classes), s = K(t.attrs, e.attrs), r = Bt(t.style, e.style);
1000
+ function mt(t, e) {
1001
+ const n = Kt(t.classes, e.classes), s = V(t.attrs, e.attrs), r = Vt(t.style, e.style);
845
1002
  let a = null;
846
1003
  if (t.childs && e.childs) {
847
1004
  const o = Math.min(t.childs.length, e.childs.length);
848
1005
  for (let i = 0; i < o; i++) {
849
- const u = ut(t.childs[i], e.childs[i]);
850
- if (u) {
1006
+ const h = mt(t.childs[i], e.childs[i]);
1007
+ if (h) {
851
1008
  if (!a) {
852
1009
  a = [];
853
- for (let c = 0; c < o; c++)
1010
+ for (let l = 0; l < o; l++)
854
1011
  a.push({});
855
1012
  }
856
- a[i] = u;
1013
+ a[i] = h;
857
1014
  }
858
1015
  }
859
1016
  }
@@ -866,23 +1023,23 @@ function ut(t, e) {
866
1023
  childs: a
867
1024
  };
868
1025
  }
869
- const V = (t, e, n, s) => {
1026
+ const K = (t, e, n, s) => {
870
1027
  const r = s(t, e, n, s);
871
1028
  if (r == null)
872
1029
  return r;
873
1030
  if (Array.isArray(r))
874
1031
  return r.map(
875
- (a, o, i) => V(a, o, i, s)
1032
+ (a, o, i) => K(a, o, i, s)
876
1033
  );
877
1034
  if (typeof r == "object") {
878
1035
  const a = {};
879
1036
  for (const o in r)
880
- Object.prototype.hasOwnProperty.call(r, o) && (a[o] = V(r[o], o, r, s));
1037
+ Object.prototype.hasOwnProperty.call(r, o) && (a[o] = K(r[o], o, r, s));
881
1038
  return a;
882
1039
  }
883
1040
  return r;
884
1041
  };
885
- function ft(t, e) {
1042
+ function wt(t, e) {
886
1043
  if (t.attrs && e.excludeAttrs) {
887
1044
  for (let n = 0, s = e.excludeAttrs.length; n < s; n++)
888
1045
  delete t.attrs[e.excludeAttrs[n]];
@@ -899,9 +1056,9 @@ function ft(t, e) {
899
1056
  }
900
1057
  if (t.childs)
901
1058
  for (let n = 0, s = t.childs.length; n < s; n++)
902
- ft(t.childs[n], e);
1059
+ wt(t.childs[n], e);
903
1060
  }
904
- function Jt(t, e) {
1061
+ function qt(t, e) {
905
1062
  for (const n in t) {
906
1063
  if (!Object.prototype.hasOwnProperty.call(t, n)) continue;
907
1064
  const s = t[n];
@@ -909,11 +1066,11 @@ function Jt(t, e) {
909
1066
  if (!Object.prototype.hasOwnProperty.call(s, r)) continue;
910
1067
  const a = s[r];
911
1068
  for (const o in a)
912
- Object.prototype.hasOwnProperty.call(a, o) && ft(a[o], e);
1069
+ Object.prototype.hasOwnProperty.call(a, o) && wt(a[o], e);
913
1070
  }
914
1071
  }
915
1072
  }
916
- function le({
1073
+ function be({
917
1074
  actualResultFile: t,
918
1075
  expectedResultFile: e,
919
1076
  diffResultFile: n,
@@ -921,269 +1078,273 @@ function le({
921
1078
  transform: r,
922
1079
  pseudoStates: a
923
1080
  }) {
924
- let o, i, u, c = {};
1081
+ let o, i, h, l = {};
925
1082
  return {
926
- async init(x) {
927
- o = await Wt(e), r && (o = V(o, null, null, r)), o && s && Jt(o, s), await x.goto("about:blank"), i = await x.evaluate(nt, { filters: s }), u = i.style;
1083
+ async init(g) {
1084
+ o = await Gt(e), r && (o = K(o, null, null, r)), o && s && qt(o, s), await g.goto("about:blank"), i = await g.evaluate(ot, { filters: s }), h = i.style;
928
1085
  },
929
1086
  async handlePage({
930
- page: x,
931
- testId: f,
932
- url: y,
933
- stateId: j,
934
- _filters: h
1087
+ page: g,
1088
+ testId: d,
1089
+ url: f,
1090
+ stateId: x,
1091
+ _filters: u
935
1092
  }) {
936
- let w = c[f];
937
- w || (w = {}, c[f] = w);
938
- let m = w[y.href];
939
- m || (m = {}, w[y.href] = m), await x.addStyleTag({
1093
+ let m = l[d];
1094
+ m || (m = {}, l[d] = m);
1095
+ let w = m[f.href];
1096
+ w || (w = {}, m[f.href] = w), await g.addStyleTag({
940
1097
  content: "*, *::before, *::after { animation-name: none!important; transition-duration: 0s !important; }"
941
1098
  });
942
- const T = a ?? [{ states: [] }];
943
- let l = null, E;
1099
+ const P = a ?? [{ states: [] }];
1100
+ let c = null, p;
944
1101
  try {
945
- for (let S = 0; S < T.length; S++) {
946
- const g = T[S], O = g.states.length > 0 ? j + ":" + g.states.join(":") : j;
947
- let p = null;
948
- if (g.states.length > 0) {
949
- l || (l = await ct(x));
950
- const d = performance.now();
951
- await $t(l, g.states), p = performance.now() - d;
1102
+ for (let E = 0; E < P.length; E++) {
1103
+ const y = P[E], T = y.states.length > 0 ? x + ":" + y.states.join(":") : x;
1104
+ let S = null;
1105
+ if (y.states.length > 0) {
1106
+ c || (c = await ht(g));
1107
+ const b = performance.now();
1108
+ await Ht(c, y.states), S = performance.now() - b;
952
1109
  }
953
- g.delay && await at(g.delay);
954
- const b = performance.now(), k = await x.evaluate(nt, {
955
- filters: h || s,
956
- defaultStyle: u,
957
- shouldEqualResult: m[O]
958
- }), P = performance.now() - b;
1110
+ y.delay && await it(y.delay);
1111
+ const k = performance.now(), O = await g.evaluate(ot, {
1112
+ filters: u || s,
1113
+ defaultStyle: h,
1114
+ shouldEqualResult: w[T]
1115
+ }), A = performance.now() - k;
959
1116
  if (console.log(
960
- `SNAPSHOT ${O}:` + (p != null ? ` forcePseudoClasses ${p.toFixed(0)}ms,` : "") + ` getAllElements ${P.toFixed(0)}ms`
961
- ), !E)
962
- E = k, m[O] = k;
1117
+ `SNAPSHOT ${T}:` + (S != null ? ` forcePseudoClasses ${S.toFixed(0)}ms,` : "") + ` getAllElements ${A.toFixed(0)}ms`
1118
+ ), !p)
1119
+ p = O, w[T] = O;
963
1120
  else {
964
- const d = ut(E, k);
965
- d && (m[O] = d);
1121
+ const b = mt(p, O);
1122
+ b && (w[T] = b);
966
1123
  }
967
1124
  }
968
1125
  } finally {
969
- l && await lt(l);
1126
+ c && await dt(c);
970
1127
  }
971
1128
  },
972
- async end({ checkExistUrlsOnly: x }) {
973
- if (c = yt(c), r && (c = V(c, null, null, r)), o) {
974
- let f, y;
975
- if (!x)
976
- f = o, y = c;
1129
+ async end({ checkExistUrlsOnly: g }) {
1130
+ if (l = Et(l), r && (l = K(l, null, null, r)), o) {
1131
+ let d, f;
1132
+ if (!g)
1133
+ d = o, f = l;
977
1134
  else {
978
- f = {}, y = {};
979
- for (const h in o)
980
- if (Object.prototype.hasOwnProperty.call(o, h) && Object.prototype.hasOwnProperty.call(c, h)) {
981
- f[h] = {}, y[h] = {};
982
- for (const w in o[h])
983
- Object.prototype.hasOwnProperty.call(o[h], w) && Object.prototype.hasOwnProperty.call(c[h], w) && (f[h][w] = o[h][w], y[h][w] = c[h][w]);
1135
+ d = {}, f = {};
1136
+ for (const u in o)
1137
+ if (Object.prototype.hasOwnProperty.call(o, u) && Object.prototype.hasOwnProperty.call(l, u)) {
1138
+ d[u] = {}, f[u] = {};
1139
+ for (const m in o[u])
1140
+ Object.prototype.hasOwnProperty.call(o[u], m) && Object.prototype.hasOwnProperty.call(l[u], m) && (d[u][m] = o[u][m], f[u][m] = l[u][m]);
984
1141
  }
985
1142
  }
986
- const j = G(
1143
+ const x = H(
1144
+ d,
987
1145
  f,
988
- y,
989
- (h, w, m) => m.selector && (delete m.selector, Object.keys(m).length === 0) ? null : m.childs && m.childs.length === 1 ? m.childs[0] : (w && w.selector ? m[Q] ? m[Q] = w.selector : m = { selector: w.selector, ...m } : h && h.selector && (m[X] ? m[X] = h.selector : m = { selector: h.selector, ...m }), m)
1146
+ (u, m, w) => w.selector && (delete w.selector, Object.keys(w).length === 0) ? null : w.childs && w.childs.length === 1 ? w.childs[0] : (m && m.selector ? w[Z] ? w[Z] = m.selector : w = { selector: m.selector, ...w } : u && u.selector && (w[Q] ? w[Q] = u.selector : w = { selector: u.selector, ...w }), w)
990
1147
  );
991
- if (n && await Y(n, j || {}), j)
992
- throw await Y(t, c), console.error(
993
- "Pages elements changes: " + JSON.stringify(j, null, 4).substring(0, 5e3)
1148
+ if (n && await Y(n, x || {}), x)
1149
+ throw await Y(t, l), console.error(
1150
+ "Pages elements changes: " + JSON.stringify(x, null, 4).substring(0, 5e3)
994
1151
  ), new Error("Pages elements changes detected");
995
- await F.promises.stat(t).catch(() => null) && await F.promises.unlink(t);
1152
+ await I.promises.stat(t).catch(() => null) && await I.promises.unlink(t);
996
1153
  } else
997
- await Y(e, c);
998
- return c;
1154
+ await Y(e, l);
1155
+ return l;
999
1156
  }
1000
1157
  };
1001
1158
  }
1002
1159
  export {
1003
- he as CheckError,
1004
- de as ConsoleMessageLevel,
1005
- Q as DIFF_NEW,
1006
- X as DIFF_OLD,
1007
- me as Lazy,
1008
- pe as LazyWithId,
1009
- ye as LogLevel,
1010
- we as MAX_REPORT_ITEMS_DEFAULT,
1011
- be as MatchInternalError,
1012
- ge as Matcher,
1013
- xe as MatcherAny,
1014
- Ee as MatcherArray,
1015
- Se as MatcherArrayItem,
1016
- ke as MatcherConvert,
1017
- Oe as MatcherCustom,
1018
- je as MatcherFew,
1019
- Ce as MatcherIn,
1020
- Pe as MatcherInstanceOf,
1021
- Ae as MatcherIs,
1022
- Le as MatcherNever,
1023
- Te as MatcherNot,
1024
- Me as MatcherNumber,
1025
- De as MatcherObject,
1026
- Fe as MatcherObjectEntry,
1027
- Ie as MatcherRef,
1028
- Re as MatcherString,
1029
- _e as Random,
1030
- Ne as Subject,
1031
- We as SubjectWithId,
1032
- $e as UNIQUE_PSEUDO_RANDOM_MAX_COUNT,
1033
- Be as alertConsole,
1034
- ze as alertReplace,
1035
- Je as argsToString,
1036
- Ue as check,
1037
- ve as checkFunc,
1038
- Ft as checkPageHttpErrors,
1039
- He as consoleIntercept,
1040
- Ge as consoleMessageToString,
1041
- Ke as consoleReplace,
1042
- Ve as convertTimeZone,
1043
- ct as createCDPSession,
1044
- te as createMatchPath,
1045
- Ye as createMatchResult,
1046
- qe as createMatchResultBoolean,
1047
- Xe as createMatchResultError,
1048
- le as createPagesElementsChangesTest,
1049
- Qe as createTaskDelayRetry,
1050
- Ze as createUniquePseudoRandom,
1051
- tr as dateNowUnique,
1052
- er as deepCloneJsonLike,
1053
- rr as deepEqualJsonLike,
1054
- nr as deepEqualJsonLikeMap,
1055
- _t as delayOnErrorCall,
1056
- ne as delayOnErrorSet,
1057
- se as delayOnErrorWait,
1058
- lt as destroyCDPSession,
1059
- sr as equalArray,
1060
- ar as escapeHtml,
1061
- or as escapeRegExp,
1062
- Mt as exec,
1063
- ir as expectedToString,
1064
- Qt as fileLock,
1065
- cr as filterMatchResult,
1066
- lr as filterMatchResultNested,
1067
- ur as fixStackTrace,
1068
- $t as forcePseudoClasses,
1069
- fr as formatAny,
1070
- hr as formatDate,
1071
- dr as formatDateFileName,
1072
- nt as getAllElements,
1073
- mr as getConsoleMessages,
1074
- pr as getDateInet,
1075
- Ot as getDrive,
1076
- ut as getElementsStyleDiff,
1160
+ Se as CheckError,
1161
+ xe as ConsoleMessageLevel,
1162
+ Z as DIFF_NEW,
1163
+ Q as DIFF_OLD,
1164
+ ke as Lazy,
1165
+ Oe as LazyWithId,
1166
+ Te as LogLevel,
1167
+ Pe as MAX_REPORT_ITEMS_DEFAULT,
1168
+ Ce as MatchInternalError,
1169
+ Ae as Matcher,
1170
+ je as MatcherAny,
1171
+ De as MatcherArray,
1172
+ Le as MatcherArrayItem,
1173
+ Me as MatcherConvert,
1174
+ Ie as MatcherCustom,
1175
+ Fe as MatcherFew,
1176
+ Re as MatcherIn,
1177
+ _e as MatcherInstanceOf,
1178
+ $e as MatcherIs,
1179
+ Ne as MatcherNever,
1180
+ We as MatcherNot,
1181
+ ve as MatcherNumber,
1182
+ Be as MatcherObject,
1183
+ ze as MatcherObjectEntry,
1184
+ Je as MatcherRef,
1185
+ Ue as MatcherString,
1186
+ Ge as Random,
1187
+ He as Subject,
1188
+ Ve as SubjectWithId,
1189
+ Ke as UNIQUE_PSEUDO_RANDOM_MAX_COUNT,
1190
+ qe as alertConsole,
1191
+ Ye as alertReplace,
1192
+ Xe as argsToString,
1193
+ Qe as check,
1194
+ Ze as checkFunc,
1195
+ $t as checkPageHttpErrors,
1196
+ me as clickAll,
1197
+ tr as consoleIntercept,
1198
+ er as consoleMessageToString,
1199
+ rr as consoleReplace,
1200
+ nr as convertTimeZone,
1201
+ ht as createCDPSession,
1202
+ ce as createMatchPath,
1203
+ sr as createMatchResult,
1204
+ ar as createMatchResultBoolean,
1205
+ or as createMatchResultError,
1206
+ be as createPagesElementsChangesTest,
1207
+ ir as createTaskDelayRetry,
1208
+ Ut as createTestE2e,
1209
+ we as createTestE2eVariants,
1210
+ cr as createUniquePseudoRandom,
1211
+ lr as dateNowUnique,
1212
+ ur as deepCloneJsonLike,
1213
+ fr as deepEqualJsonLike,
1214
+ hr as deepEqualJsonLikeMap,
1215
+ Wt as delayOnErrorCall,
1216
+ fe as delayOnErrorSet,
1217
+ he as delayOnErrorWait,
1218
+ dt as destroyCDPSession,
1219
+ dr as equalArray,
1220
+ mr as escapeHtml,
1221
+ wr as escapeRegExp,
1222
+ Rt as exec,
1223
+ yr as expectedToString,
1224
+ oe as fileLock,
1225
+ pr as filterMatchResult,
1226
+ br as filterMatchResultNested,
1227
+ gr as fixStackTrace,
1228
+ Ht as forcePseudoClasses,
1229
+ Er as formatAny,
1230
+ Sr as formatDate,
1231
+ xr as formatDateFileName,
1232
+ ot as getAllElements,
1233
+ kr as getConsoleMessages,
1234
+ Or as getDateInet,
1235
+ At as getDrive,
1236
+ mt as getElementsStyleDiff,
1077
1237
  jt as getFileId,
1078
- yt as getNormalizedObject,
1079
- yr as getObjectId,
1080
- G as getObjectsDiff,
1081
- Dt as getPageHttpErrors,
1082
- wr as getRandomFunc,
1083
- br as getRandomSeed,
1084
- pt as getStackTrace,
1085
- At as globGitIgnoreToPicomatch,
1086
- Lt as globToRelative,
1087
- Nt as initPage,
1088
- gr as isMatcher,
1089
- xr as isObservable,
1090
- ee as loadGlobs,
1091
- Tt as loadGlobsFromFile,
1092
- Wt as loadJson,
1093
- Er as match,
1094
- Sr as matchAnd,
1095
- kr as matchAndPipe,
1096
- Or as matchAny,
1097
- jr as matchArray,
1098
- Cr as matchArrayBuffer,
1099
- Pr as matchArrayIncludes,
1100
- Ar as matchArrayItem,
1101
- Lr as matchArrayLength,
1102
- Tr as matchArrayWith,
1103
- Mr as matchBoolean,
1104
- Dr as matchConstructor,
1105
- Fr as matchConvert,
1106
- Ir as matchCustom,
1107
- Rr as matchDeep,
1108
- _r as matchEnum,
1109
- Nr as matchFloat,
1110
- Wr as matchIn,
1111
- $r as matchInstanceOf,
1112
- Br as matchInt,
1113
- zr as matchIntDate,
1114
- Jr as matchIs,
1115
- Ur as matchIsNonStrict,
1116
- vr as matchNever,
1117
- Hr as matchNot,
1118
- Gr as matchNotNullish,
1119
- Kr as matchNullish,
1120
- Vr as matchNumber,
1121
- Yr as matchObject,
1122
- qr as matchObjectEntries,
1123
- Xr as matchObjectEntry,
1124
- Qr as matchObjectKey,
1125
- Zr as matchObjectKeyValue,
1126
- tn as matchObjectKeys,
1127
- en as matchObjectKeysNotNull,
1128
- rn as matchObjectPartial,
1129
- nn as matchObjectValue,
1130
- sn as matchObjectValues,
1131
- an as matchObjectWith,
1132
- on as matchOptional,
1133
- cn as matchOr,
1134
- ln as matchOrPipe,
1135
- un as matchRange,
1136
- fn as matchRangeDate,
1137
- hn as matchRef,
1138
- dn as matchResultNestedToString,
1139
- mn as matchResultToString,
1140
- pn as matchString,
1141
- yn as matchStringLength,
1142
- wn as matchTypeOf,
1143
- bn as matchUuid,
1144
- gn as matchValueState,
1145
- xn as max,
1146
- En as min,
1147
- Sn as minMax,
1148
- re as nodeBeep,
1149
- kn as numberMod,
1150
- V as objectTransform,
1151
- W as pathNormalize,
1152
- Ct as pathResolve,
1153
- Z as poolFs,
1154
- On as randomBoolean,
1155
- jn as randomEnum,
1156
- Cn as randomFloat,
1157
- Pn as randomIndexWeighted,
1158
- An as randomInt,
1159
- Ln as randomItem,
1160
- Tn as randomItems,
1238
+ Et as getNormalizedObject,
1239
+ Tr as getObjectId,
1240
+ H as getObjectsDiff,
1241
+ _t as getPageHttpErrors,
1242
+ Pr as getRandomFunc,
1243
+ Cr as getRandomSeed,
1244
+ gt as getStackTrace,
1245
+ Mt as globGitIgnoreToPicomatch,
1246
+ It as globToRelative,
1247
+ vt as initPage,
1248
+ Ar as isMatcher,
1249
+ jr as isObservable,
1250
+ le as loadGlobs,
1251
+ Ft as loadGlobsFromFile,
1252
+ Gt as loadJson,
1253
+ Dr as match,
1254
+ Lr as matchAnd,
1255
+ Mr as matchAndPipe,
1256
+ Ir as matchAny,
1257
+ Fr as matchArray,
1258
+ Rr as matchArrayBuffer,
1259
+ _r as matchArrayIncludes,
1260
+ $r as matchArrayItem,
1261
+ Nr as matchArrayLength,
1262
+ Wr as matchArrayWith,
1263
+ vr as matchBoolean,
1264
+ Br as matchConstructor,
1265
+ zr as matchConvert,
1266
+ Jr as matchCustom,
1267
+ Ur as matchDeep,
1268
+ Gr as matchEnum,
1269
+ Hr as matchFloat,
1270
+ Vr as matchIn,
1271
+ Kr as matchInstanceOf,
1272
+ qr as matchInt,
1273
+ Yr as matchIntDate,
1274
+ Xr as matchIs,
1275
+ Qr as matchIsNonStrict,
1276
+ Zr as matchNever,
1277
+ tn as matchNot,
1278
+ en as matchNotNullish,
1279
+ rn as matchNullish,
1280
+ nn as matchNumber,
1281
+ sn as matchObject,
1282
+ an as matchObjectEntries,
1283
+ on as matchObjectEntry,
1284
+ cn as matchObjectKey,
1285
+ ln as matchObjectKeyValue,
1286
+ un as matchObjectKeys,
1287
+ fn as matchObjectKeysNotNull,
1288
+ hn as matchObjectPartial,
1289
+ dn as matchObjectValue,
1290
+ mn as matchObjectValues,
1291
+ wn as matchObjectWith,
1292
+ yn as matchOptional,
1293
+ pn as matchOr,
1294
+ bn as matchOrPipe,
1295
+ gn as matchRange,
1296
+ En as matchRangeDate,
1297
+ Sn as matchRef,
1298
+ xn as matchResultNestedToString,
1299
+ kn as matchResultToString,
1300
+ On as matchString,
1301
+ Tn as matchStringLength,
1302
+ Pn as matchTypeOf,
1303
+ Cn as matchUuid,
1304
+ An as matchValueState,
1305
+ jn as max,
1306
+ Dn as min,
1307
+ Ln as minMax,
1308
+ ue as nodeBeep,
1309
+ Mn as numberMod,
1310
+ K as objectTransform,
1311
+ N as pathNormalize,
1312
+ Dt as pathResolve,
1313
+ et as poolFs,
1314
+ In as randomBoolean,
1315
+ Fn as randomEnum,
1316
+ Rn as randomFloat,
1317
+ _n as randomIndexWeighted,
1318
+ $n as randomInt,
1319
+ Nn as randomItem,
1320
+ Wn as randomItems,
1161
1321
  Y as saveJson,
1162
- Mn as setFuncName,
1163
- Rt as setPlaywrightPriorityLow,
1164
- Dn as sha256,
1165
- Fn as sha256Buffer,
1166
- It as subscribeJsErrors,
1167
- ae as testPage,
1168
- In as timeoutAbortController,
1169
- Rn as toHex,
1170
- _n as truncateString,
1171
- Nn as urlGetBoolean,
1172
- Wn as urlGetFloat,
1173
- $n as urlGetInt,
1174
- Bn as urlGetParams,
1175
- zn as urlGetString,
1176
- Jn as urlParamToBoolean,
1177
- Un as urlParamToFloat,
1178
- vn as urlParamToInt,
1179
- oe as useBrowser,
1180
- ie as useBrowserContext,
1181
- ce as usingCDPSession,
1182
- Hn as validateMatchResult,
1183
- Gn as waitObservable,
1184
- Pt as walkPathHandleErrorDefault,
1185
- Zt as walkPaths,
1186
- Kn as withConsoleReplace,
1187
- Vn as withRetry,
1188
- mt as withTimeout
1322
+ vn as setFuncName,
1323
+ ft as setPlaywrightPriorityLow,
1324
+ Bn as sha256,
1325
+ zn as sha256Buffer,
1326
+ Nt as subscribeJsErrors,
1327
+ Bt as testPage,
1328
+ Jn as timeoutAbortController,
1329
+ Un as toHex,
1330
+ Gn as truncateString,
1331
+ Hn as urlGetBoolean,
1332
+ Vn as urlGetFloat,
1333
+ Kn as urlGetInt,
1334
+ qn as urlGetParams,
1335
+ Yn as urlGetString,
1336
+ Xn as urlParamToBoolean,
1337
+ Qn as urlParamToFloat,
1338
+ Zn as urlParamToInt,
1339
+ de as useBrowser,
1340
+ zt as useBrowserContext,
1341
+ pe as usingCDPSession,
1342
+ ts as validateMatchResult,
1343
+ es as waitObservable,
1344
+ ye as waitPageStable,
1345
+ Lt as walkPathHandleErrorDefault,
1346
+ ie as walkPaths,
1347
+ rs as withConsoleReplace,
1348
+ ns as withRetry,
1349
+ bt as withTimeout
1189
1350
  };