@projectwallace/css-analyzer 8.0.1 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/css-analyzer.js +1167 -1061
  2. package/package.json +6 -6
@@ -1,11 +1,11 @@
1
- var ar = Object.defineProperty;
2
- var pi = (r) => {
1
+ var Er = Object.defineProperty;
2
+ var ki = (r) => {
3
3
  throw TypeError(r);
4
4
  };
5
- var hr = (r, e, t) => e in r ? ar(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
- var g = (r, e, t) => hr(r, typeof e != "symbol" ? e + "" : e, t), di = (r, e, t) => e.has(r) || pi("Cannot " + t);
7
- var w = (r, e, t) => (di(r, e, "read from private field"), t ? t.call(r) : e.get(r)), G = (r, e, t) => e.has(r) ? pi("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), M = (r, e, t, s) => (di(r, e, "write to private field"), s ? s.call(r, t) : e.set(r, t), t);
8
- var Vt = (r, e, t, s) => ({
5
+ var Cr = (r, e, t) => e in r ? Er(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
+ var m = (r, e, t) => Cr(r, typeof e != "symbol" ? e + "" : e, t), wi = (r, e, t) => e.has(r) || ki("Cannot " + t);
7
+ var w = (r, e, t) => (wi(r, e, "read from private field"), t ? t.call(r) : e.get(r)), W = (r, e, t) => e.has(r) ? ki("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), M = (r, e, t, s) => (wi(r, e, "write to private field"), s ? s.call(r, t) : e.set(r, t), t);
8
+ var jt = (r, e, t, s) => ({
9
9
  set _(i) {
10
10
  M(r, e, i, t);
11
11
  },
@@ -13,121 +13,143 @@ var Vt = (r, e, t, s) => ({
13
13
  return w(r, e, s);
14
14
  }
15
15
  });
16
- import { walk as B, SUPPORTS_QUERY as Hi, BREAK as Q, MEDIA_TYPE as cr, MEDIA_FEATURE as Ii, str_equals as P, DIMENSION as ft, NUMBER as _s, IDENTIFIER as he, SELECTOR as ce, NTH_SELECTOR as _r, PSEUDO_ELEMENT_SELECTOR as us, TYPE_SELECTOR as fs, PSEUDO_CLASS_SELECTOR as Oe, ATTRIBUTE_SELECTOR as ps, SKIP as I, COMBINATOR as is, SELECTOR_LIST as ds, NTH_OF_SELECTOR as ur, CLASS_SELECTOR as fr, ID_SELECTOR as pr, FUNCTION as gs, OPERATOR as Ee, is_custom as xs, is_vendor_prefixed as ms, parse as dr, AT_RULE as gr, BLOCK as xr, DECLARATION as jt, LAYER_NAME as mr, CONTAINER_QUERY as kr, STYLE_RULE as wr, HASH as Ar, URL as yr, str_starts_with as Er } from "@projectwallace/css-parser";
17
- function Cr(r) {
18
- let e = !1;
19
- return B(r, function(t) {
20
- if (t.type === Hi) {
16
+ import { walk as $, SUPPORTS_QUERY as zi, BREAK as Y, MEDIA_TYPE as yr, MEDIA_FEATURE as qi, str_equals as ge, DIMENSION as mt, NUMBER as ds, IDENTIFIER as _e, SELECTOR as me, NTH_SELECTOR as br, PSEUDO_ELEMENT_SELECTOR as pt, TYPE_SELECTOR as gs, PSEUDO_CLASS_SELECTOR as Le, ATTRIBUTE_SELECTOR as xs, SKIP as H, str_starts_with as Ki, COMBINATOR as rs, SELECTOR_LIST as ms, NTH_OF_SELECTOR as Rr, CLASS_SELECTOR as vr, ID_SELECTOR as Tr, FUNCTION as ks, OPERATOR as Re, is_custom as ws, is_vendor_prefixed as As, parse as Or, AT_RULE as Sr, BLOCK as Nr, DECLARATION as Xt, LAYER_NAME as Lr, CONTAINER_QUERY as Ur, STYLE_RULE as Ir, HASH as Hr, URL as Pr } from "@projectwallace/css-parser";
17
+ function Dr(r, e) {
18
+ $(r, function(t) {
19
+ if (t.type === zi) {
21
20
  const i = (t.prelude || t.value || "").toString().toLowerCase().replaceAll(/\s+/g, "");
22
- if (i.includes("-webkit-appearance:none") || i.includes("-moz-appearance:meterbar"))
23
- return e = !0, Q;
21
+ if (i.includes("-webkit-appearance:none"))
22
+ return e("-webkit-appearance: none"), Y;
23
+ if (i.includes("-moz-appearance:meterbar"))
24
+ return e("-moz-appearance: meterbar"), Y;
24
25
  }
25
- }), e;
26
+ });
26
27
  }
27
- function br(r) {
28
- let e = !1;
29
- return B(r, function(t) {
30
- if (t.type === cr) {
28
+ function Fr(r, e) {
29
+ $(r, function(t) {
30
+ if (t.type === yr) {
31
31
  const s = t.text || "";
32
- if (s.startsWith("\\0") || s.includes("\\9"))
33
- return e = !0, Q;
32
+ if (s.startsWith("\\0"))
33
+ return e("\\0"), Y;
34
+ if (s.includes("\\9"))
35
+ return e("\\9"), Y;
34
36
  }
35
- if (t.type === Ii) {
37
+ if (t.type === qi) {
36
38
  const s = t.name || "";
37
- if (P("-moz-images-in-menus", s) || P("min--moz-device-pixel-ratio", s) || P("-ms-high-contrast", s))
38
- return e = !0, Q;
39
- if (P("min-resolution", s) && t.has_children) {
39
+ if (ge("-moz-images-in-menus", s))
40
+ return e("-moz-images-in-menus"), Y;
41
+ if (ge("min--moz-device-pixel-ratio", s))
42
+ return e("min--moz-device-pixel-ratio"), Y;
43
+ if (ge("-ms-high-contrast", s))
44
+ return e("-ms-high-contrast"), Y;
45
+ if (ge("min-resolution", s) && t.has_children) {
40
46
  for (const i of t)
41
- if (i.type === ft && i.value === 1e-3 && P("dpcm", i.unit || ""))
42
- return e = !0, Q;
47
+ if (i.type === mt && i.value === 1e-3 && ge("dpcm", i.unit || ""))
48
+ return e("min-resolution: .001dpcm"), Y;
43
49
  }
44
- if (P("-webkit-min-device-pixel-ratio", s) && t.has_children) {
50
+ if (ge("-webkit-min-device-pixel-ratio", s) && t.has_children) {
45
51
  for (const i of t)
46
- if (i.type === _s && (i.value === 0 || i.value === 1e4))
47
- return e = !0, Q;
52
+ if (i.type === ds && (i.value === 0 || i.value === 1e4))
53
+ return e("-webkit-min-device-pixel-ratio"), Y;
48
54
  }
49
55
  if (t.has_children) {
50
56
  for (const i of t)
51
- if (i.type === he && i.text === "\\0")
52
- return e = !0, Q;
57
+ if (i.type === _e && i.text === "\\0")
58
+ return e("\\0"), Y;
53
59
  }
54
60
  }
55
- }), e;
61
+ });
56
62
  }
57
- class $ {
63
+ class B {
58
64
  constructor(e) {
59
- g(this, "set");
65
+ m(this, "set");
60
66
  this.set = new Set(e);
61
67
  }
62
68
  has(e) {
63
69
  return this.set.has(e.toLowerCase());
64
70
  }
65
71
  }
66
- const Pi = new $(["nth-child", "where", "not", "is", "has", "nth-last-child", "matches", "-webkit-any", "-moz-any"]);
67
- function Rr(r) {
68
- let e = !1;
69
- return B(r, function(t) {
70
- if ((t.type === us || t.type === Oe || t.type === fs) && t.is_vendor_prefixed)
71
- return e = !0, Q;
72
- }), e;
72
+ function $i(r) {
73
+ return r.replaceAll(/(?:^['"])|(?:['"]$)/g, "");
73
74
  }
74
- function Di(r) {
75
- let e = !1;
76
- return B(r, function(t) {
77
- if (t.type === ps) {
78
- const s = t.name || "";
79
- if (s === "role" || s.startsWith("aria-"))
80
- return e = !0, Q;
81
- } else if (t.type === Oe && Pi.has(t.name || "") && t.has_children) {
82
- for (const s of t)
83
- if (s.type === ce && Di(s))
84
- return e = !0, Q;
75
+ function Mr(r, e) {
76
+ return e >= 65 && e <= 90 && (e = e | 32), r === e;
77
+ }
78
+ function ns(r, e) {
79
+ if (r === e) return !0;
80
+ let t = e.length, s = t - r.length;
81
+ if (s < 0)
82
+ return !1;
83
+ for (let i = t - 1; i >= s; i--)
84
+ if (Mr(r.charCodeAt(i - s), e.charCodeAt(i)) === !1)
85
+ return !1;
86
+ return !0;
87
+ }
88
+ const zr = new B(["nth-child", "where", "not", "is", "has", "nth-last-child", "matches", "-webkit-any", "-moz-any"]);
89
+ function qr(r, e) {
90
+ $(r, function(t) {
91
+ if ((t.type === pt || t.type === Le || t.type === gs) && t.is_vendor_prefixed) {
92
+ let s = "";
93
+ t.type === Le ? s = ":" : t.type === pt && (s = "::"), e(s + (t.name || t.text));
85
94
  }
86
- }), e;
95
+ });
96
+ }
97
+ function Kr(r, e) {
98
+ function t(s) {
99
+ var n, l;
100
+ let i = s.clone();
101
+ return i.value ? "[" + ((n = i.name) == null ? void 0 : n.toLowerCase()) + i.attr_operator + '"' + $i(i.value.toString()) + '"]' : "[" + ((l = i.name) == null ? void 0 : l.toLowerCase()) + "]";
102
+ }
103
+ $(r, function(s) {
104
+ if (s.type === xs) {
105
+ const i = s.name || "";
106
+ (ge("role", i) || Ki(i, "aria-")) && e(t(s));
107
+ }
108
+ });
87
109
  }
88
- function vr(r) {
89
- let e = [];
90
- return B(r, function(t) {
91
- t.type === Oe && e.push(t.name);
92
- }), e.length === 0 ? !1 : e;
110
+ function $r(r, e) {
111
+ $(r, function(t) {
112
+ t.type === Le && t.name && e(t.name);
113
+ });
93
114
  }
94
- function rs(r) {
115
+ function ls(r) {
95
116
  let e = 0;
96
117
  function t(s, i) {
97
- B(s, function(n) {
98
- n.type === ce && i.push(rs(n));
118
+ $(s, function(n) {
119
+ n.type === me && i.push(ls(n));
99
120
  });
100
121
  }
101
- return B(r, function(s) {
122
+ return $(r, function(s) {
102
123
  const i = s.type;
103
- if (i !== ce) {
104
- if (i === _r) {
124
+ if (i !== me) {
125
+ if (i === br) {
105
126
  s.text && s.text.trim() && e++;
106
127
  return;
107
128
  }
108
- if (e++, (i === us || i === fs || i === Oe) && s.is_vendor_prefixed && e++, i === ps)
109
- return s.value && e++, I;
110
- if (i === Oe) {
129
+ if (e++, (i === pt || i === gs || i === Le) && s.is_vendor_prefixed && e++, i === xs)
130
+ return s.value && e++, H;
131
+ if (i === Le) {
111
132
  const n = s.name || "";
112
- if (Pi.has(n.toLowerCase())) {
133
+ if (zr.has(n.toLowerCase())) {
113
134
  const l = [];
114
135
  if (s.has_children)
115
- for (const o of s)
116
- o.type === ce ? l.push(rs(o)) : t(o, l);
136
+ for (const a of s)
137
+ a.type === me ? l.push(ls(a)) : t(a, l);
117
138
  if (l.length > 0) {
118
- for (const o of l)
119
- e += o;
120
- return I;
139
+ for (const a of l)
140
+ e += a;
141
+ return H;
121
142
  }
122
143
  }
123
144
  }
124
145
  }
125
146
  }), e;
126
147
  }
127
- function Tr(r, e) {
128
- B(r, function(t) {
129
- t.type === is && e({
130
- name: t.name.trim() === "" ? " " : t.name,
148
+ function Br(r, e) {
149
+ $(r, function(t) {
150
+ var s;
151
+ t.type === rs && e({
152
+ name: ((s = t.name) == null ? void 0 : s.trim()) === "" ? " " : t.name,
131
153
  loc: {
132
154
  offset: t.start,
133
155
  line: t.line,
@@ -137,221 +159,221 @@ function Tr(r, e) {
137
159
  });
138
160
  });
139
161
  }
140
- let ks = 1, q = 2, pt = 4, Ce = 8, ge = 16, y = new Uint8Array(128);
162
+ let Es = 1, q = 2, kt = 4, ve = 8, ke = 16, C = new Uint8Array(128);
141
163
  for (let r = 48; r <= 57; r++)
142
- y[r] = q;
164
+ C[r] = q;
143
165
  for (let r = 48; r <= 57; r++)
144
- y[r] |= pt;
166
+ C[r] |= kt;
145
167
  for (let r = 65; r <= 70; r++)
146
- y[r] = pt;
168
+ C[r] = kt;
147
169
  for (let r = 97; r <= 102; r++)
148
- y[r] = pt;
170
+ C[r] = kt;
149
171
  for (let r = 65; r <= 90; r++)
150
- y[r] |= ks;
172
+ C[r] |= Es;
151
173
  for (let r = 97; r <= 122; r++)
152
- y[r] |= ks;
153
- y[32] = Ce;
154
- y[9] = Ce;
155
- y[10] = ge;
156
- y[13] = ge;
157
- y[12] = ge;
158
- function Or(r) {
159
- return r < 128 && (y[r] & q) !== 0;
174
+ C[r] |= Es;
175
+ C[32] = ve;
176
+ C[9] = ve;
177
+ C[10] = ke;
178
+ C[13] = ke;
179
+ C[12] = ke;
180
+ function Gr(r) {
181
+ return r < 128 && (C[r] & q) !== 0;
160
182
  }
161
- function et(r) {
162
- return r < 128 && (y[r] & pt) !== 0;
183
+ function pe(r) {
184
+ return r < 128 && (C[r] & kt) !== 0;
163
185
  }
164
- function Sr(r) {
165
- return r < 128 && (y[r] & ks) !== 0;
186
+ function Wr(r) {
187
+ return r < 128 && (C[r] & Es) !== 0;
166
188
  }
167
- function gi(r) {
168
- return r < 128 && (y[r] & Ce) !== 0;
189
+ function Ai(r) {
190
+ return r < 128 && (C[r] & ve) !== 0;
169
191
  }
170
- function ie(r) {
171
- return r < 128 && (y[r] & ge) !== 0;
192
+ function ne(r) {
193
+ return r < 128 && (C[r] & ke) !== 0;
172
194
  }
173
- function Me(r) {
174
- return r >= 128 || r === 95 ? !0 : Sr(r);
195
+ function Ke(r) {
196
+ return r >= 128 || r === 95 ? !0 : Wr(r);
175
197
  }
176
- function tt(r) {
177
- return r === 45 ? !0 : Me(r) || Or(r);
198
+ function lt(r) {
199
+ return r === 45 ? !0 : Ke(r) || Gr(r);
178
200
  }
179
- const le = 1, rt = 2, Nr = 3, Fi = 4, Mi = 5, xi = 6, de = 9, nt = 10, qi = 11, zi = 12, ns = 13, Ur = 14, Lr = 15, Ki = 16, Hr = 17, qe = 18, ls = 19, Bi = 20, $i = 21, Gi = 22, Ir = 23, Pr = 24, os = 26, Dr = 123, Fr = 125, Mr = 58, qr = 59, zr = 44, Kr = 91, Br = 93, mi = 40, $r = 41, ki = 47, wi = 42, Gr = 34, Yr = 39, Xt = 46, Wr = 60, Qr = 33, K = 45, Vr = 62, jr = 64, Xr = 35, Zt = 92, st = 43, Zr = 37, Jr = 101, en = 69, Ai = 13, yi = 10;
180
- class Yi {
201
+ const ae = 1, at = 2, Yr = 3, Bi = 4, Gi = 5, Ei = 6, xe = 9, ht = 10, Wi = 11, Yi = 12, os = 13, Qr = 14, Vr = 15, Qi = 16, jr = 17, $e = 18, as = 19, Vi = 20, ji = 21, Xi = 22, Xr = 23, Zr = 24, hs = 26, Ci = 27, Jr = 123, en = 125, tn = 58, sn = 59, rn = 44, nn = 91, ln = 93, yi = 40, on = 41, bi = 47, Ri = 42, an = 34, hn = 39, Zt = 46, cn = 60, _n = 33, z = 45, un = 62, fn = 64, pn = 35, Jt = 92, Me = 43, dn = 37, gn = 101, xn = 69, mn = 117, kn = 85, wn = 63, vi = 13, Ti = 10;
202
+ class Zi {
181
203
  constructor(e, t) {
182
- g(this, "source");
183
- g(this, "pos");
184
- g(this, "line");
185
- g(this, "column");
186
- g(this, "on_comment");
204
+ m(this, "source");
205
+ m(this, "pos");
206
+ m(this, "line");
207
+ m(this, "column");
208
+ m(this, "on_comment");
187
209
  // Current token properties (avoiding object allocation)
188
- g(this, "token_type");
189
- g(this, "token_start");
190
- g(this, "token_end");
191
- g(this, "token_line");
192
- g(this, "token_column");
193
- this.source = e, this.pos = 0, this.line = 1, this.column = 1, this.on_comment = t, this.token_type = os, this.token_start = 0, this.token_end = 0, this.token_line = 1, this.token_column = 1;
210
+ m(this, "token_type");
211
+ m(this, "token_start");
212
+ m(this, "token_end");
213
+ m(this, "token_line");
214
+ m(this, "token_column");
215
+ this.source = e, this.pos = 0, this.line = 1, this.column = 1, this.on_comment = t, this.token_type = hs, this.token_start = 0, this.token_end = 0, this.token_line = 1, this.token_column = 1;
194
216
  }
195
217
  // Fast token advancing without object allocation (for internal parser use)
196
218
  next_token_fast(e = !1) {
197
219
  if (e)
198
220
  for (; this.pos < this.source.length; ) {
199
221
  let l = this.source.charCodeAt(this.pos);
200
- if (l >= 128 || (y[l] & (Ce | ge)) === 0) break;
222
+ if (l >= 128 || (C[l] & (ve | ke)) === 0) break;
201
223
  this.advance();
202
224
  }
203
225
  if (this.pos >= this.source.length)
204
- return this.make_token(os, this.pos, this.pos);
226
+ return this.make_token(hs, this.pos, this.pos);
205
227
  let t = this.source.charCodeAt(this.pos), s = this.pos, i = this.line, n = this.column;
206
228
  switch (t) {
207
- case Dr:
208
- return this.advance(), this.make_token(Ir, s, this.pos, i, n);
209
- case Fr:
210
- return this.advance(), this.make_token(Pr, s, this.pos, i, n);
211
- case Mr:
212
- return this.advance(), this.make_token(Ki, s, this.pos, i, n);
213
- case qr:
214
- return this.advance(), this.make_token(Hr, s, this.pos, i, n);
215
- case zr:
216
- return this.advance(), this.make_token(qe, s, this.pos, i, n);
217
- case Kr:
218
- return this.advance(), this.make_token(ls, s, this.pos, i, n);
219
- case Br:
220
- return this.advance(), this.make_token(Bi, s, this.pos, i, n);
221
- case mi:
222
- return this.advance(), this.make_token($i, s, this.pos, i, n);
223
- case $r:
224
- return this.advance(), this.make_token(Gi, s, this.pos, i, n);
225
- }
226
- if (t < 128 && (y[t] & (Ce | ge)) !== 0)
229
+ case Jr:
230
+ return this.advance(), this.make_token(Xr, s, this.pos, i, n);
231
+ case en:
232
+ return this.advance(), this.make_token(Zr, s, this.pos, i, n);
233
+ case tn:
234
+ return this.advance(), this.make_token(Qi, s, this.pos, i, n);
235
+ case sn:
236
+ return this.advance(), this.make_token(jr, s, this.pos, i, n);
237
+ case rn:
238
+ return this.advance(), this.make_token($e, s, this.pos, i, n);
239
+ case nn:
240
+ return this.advance(), this.make_token(as, s, this.pos, i, n);
241
+ case ln:
242
+ return this.advance(), this.make_token(Vi, s, this.pos, i, n);
243
+ case yi:
244
+ return this.advance(), this.make_token(ji, s, this.pos, i, n);
245
+ case on:
246
+ return this.advance(), this.make_token(Xi, s, this.pos, i, n);
247
+ }
248
+ if (t < 128 && (C[t] & (ve | ke)) !== 0)
227
249
  return this.consume_whitespace(i, n);
228
- if (t === ki && this.peek() === wi) {
229
- let l = s, o = i, h = n;
250
+ if (t === bi && this.peek() === Ri) {
251
+ let l = s, a = i, h = n;
230
252
  for (this.advance(2); this.pos < this.source.length - 1; ) {
231
- if (this.source.charCodeAt(this.pos) === wi && this.peek() === ki) {
253
+ if (this.source.charCodeAt(this.pos) === Ri && this.peek() === bi) {
232
254
  this.advance(2);
233
255
  break;
234
256
  }
235
257
  this.advance();
236
258
  }
237
- let c = this.pos;
259
+ let o = this.pos;
238
260
  return this.on_comment && this.on_comment({
239
261
  start: l,
240
- end: c,
241
- length: c - l,
242
- line: o,
262
+ end: o,
263
+ length: o - l,
264
+ line: a,
243
265
  column: h
244
266
  }), this.next_token_fast(e);
245
267
  }
246
- if (t === Gr || t === Yr)
268
+ if (t === an || t === hn)
247
269
  return this.consume_string(t, i, n);
248
- if (t < 128 && (y[t] & q) !== 0)
270
+ if (t < 128 && (C[t] & q) !== 0)
249
271
  return this.consume_number(i, n);
250
- if (t === Xt) {
272
+ if (t === Zt) {
251
273
  let l = this.peek();
252
- if (l < 128 && (y[l] & q) !== 0)
274
+ if (l < 128 && (C[l] & q) !== 0)
253
275
  return this.consume_number(i, n);
254
276
  }
255
- if (t === Wr && this.pos + 3 < this.source.length && this.peek() === Qr && this.peek(2) === K && this.peek(3) === K)
256
- return this.advance(4), this.make_token(Ur, s, this.pos, i, n);
257
- if (t === K && this.pos + 2 < this.source.length && this.peek() === K && this.peek(2) === Vr)
258
- return this.advance(3), this.make_token(Lr, s, this.pos, i, n);
259
- if (t === jr)
277
+ if (t === cn && this.pos + 3 < this.source.length && this.peek() === _n && this.peek(2) === z && this.peek(3) === z)
278
+ return this.advance(4), this.make_token(Qr, s, this.pos, i, n);
279
+ if (t === z && this.pos + 2 < this.source.length && this.peek() === z && this.peek(2) === un)
280
+ return this.advance(3), this.make_token(Vr, s, this.pos, i, n);
281
+ if (t === fn)
260
282
  return this.consume_at_keyword(i, n);
261
- if (t === Xr)
283
+ if (t === pn)
262
284
  return this.consume_hash(i, n);
263
- if (Me(t))
285
+ if (Ke(t))
264
286
  return this.consume_ident_or_function(i, n);
265
- if (t === K) {
287
+ if (t === z) {
266
288
  let l = this.peek();
267
- if (Me(l) || l === K)
289
+ if (Ke(l) || l === z)
268
290
  return this.consume_ident_or_function(i, n);
269
291
  }
270
- if (t === Zt) {
292
+ if (t === Jt) {
271
293
  let l = this.peek();
272
- if (l !== 0 && !ie(l))
294
+ if (l !== 0 && !ne(l))
273
295
  return this.consume_ident_or_function(i, n);
274
296
  }
275
- if (t === K || t === st) {
297
+ if (t === z || t === Me) {
276
298
  let l = this.peek();
277
- if (l < 128 && (y[l] & q) !== 0)
299
+ if (l < 128 && (C[l] & q) !== 0)
278
300
  return this.consume_number(i, n);
279
- if (l === Xt) {
301
+ if (l === Zt) {
280
302
  let h = this.peek(2);
281
- if (h < 128 && (y[h] & q) !== 0)
303
+ if (h < 128 && (C[h] & q) !== 0)
282
304
  return this.consume_number(i, n);
283
305
  }
284
306
  }
285
- return this.advance(), this.make_token(de, s, this.pos, i, n);
307
+ return this.advance(), this.make_token(xe, s, this.pos, i, n);
286
308
  }
287
309
  consume_whitespace(e, t) {
288
310
  let s = this.pos;
289
311
  for (; this.pos < this.source.length; ) {
290
312
  let i = this.source.charCodeAt(this.pos);
291
- if (i >= 128 || (y[i] & (Ce | ge)) === 0) break;
313
+ if (i >= 128 || (C[i] & (ve | ke)) === 0) break;
292
314
  this.advance();
293
315
  }
294
- return this.make_token(ns, s, this.pos, e, t);
316
+ return this.make_token(os, s, this.pos, e, t);
295
317
  }
296
318
  consume_string(e, t, s) {
297
319
  let i = this.pos;
298
320
  for (this.advance(); this.pos < this.source.length; ) {
299
321
  let n = this.source.charCodeAt(this.pos);
300
322
  if (n === e)
301
- return this.advance(), this.make_token(Mi, i, this.pos, t, s);
302
- if (ie(n))
303
- return this.make_token(xi, i, this.pos, t, s);
304
- if (n === Zt) {
323
+ return this.advance(), this.make_token(Gi, i, this.pos, t, s);
324
+ if (ne(n))
325
+ return this.make_token(Ei, i, this.pos, t, s);
326
+ if (n === Jt) {
305
327
  if (this.advance(), this.pos < this.source.length) {
306
328
  let l = this.source.charCodeAt(this.pos);
307
- et(l) ? this.consume_hex_escape() : ie(l) ? this.advance() : this.advance();
329
+ pe(l) ? this.consume_hex_escape() : ne(l) ? this.advance() : this.advance();
308
330
  }
309
331
  continue;
310
332
  }
311
333
  this.advance();
312
334
  }
313
- return this.make_token(xi, i, this.pos, t, s);
335
+ return this.make_token(Ei, i, this.pos, t, s);
314
336
  }
315
337
  consume_hex_escape() {
316
338
  let e = 0;
317
339
  for (; e < 6 && this.pos < this.source.length; ) {
318
340
  let t = this.source.charCodeAt(this.pos);
319
- if (!et(t)) break;
341
+ if (!pe(t)) break;
320
342
  this.advance(), e++;
321
343
  }
322
344
  if (this.pos < this.source.length) {
323
345
  let t = this.source.charCodeAt(this.pos);
324
- (gi(t) || ie(t)) && this.advance();
346
+ (Ai(t) || ne(t)) && this.advance();
325
347
  }
326
348
  }
327
349
  consume_number(e, t) {
328
350
  let s = this.pos, i = this.source.charCodeAt(this.pos);
329
- for ((i === st || i === K) && this.advance(); this.pos < this.source.length; ) {
351
+ for ((i === Me || i === z) && this.advance(); this.pos < this.source.length; ) {
330
352
  let n = this.source.charCodeAt(this.pos);
331
- if (n >= 128 || (y[n] & q) === 0) break;
353
+ if (n >= 128 || (C[n] & q) === 0) break;
332
354
  this.advance();
333
355
  }
334
- if (this.pos < this.source.length && this.source.charCodeAt(this.pos) === Xt && this.pos + 1 < this.source.length) {
356
+ if (this.pos < this.source.length && this.source.charCodeAt(this.pos) === Zt && this.pos + 1 < this.source.length) {
335
357
  let n = this.peek();
336
- if (n < 128 && (y[n] & q) !== 0)
358
+ if (n < 128 && (C[n] & q) !== 0)
337
359
  for (this.advance(); this.pos < this.source.length; ) {
338
360
  let l = this.source.charCodeAt(this.pos);
339
- if (l >= 128 || (y[l] & q) === 0) break;
361
+ if (l >= 128 || (C[l] & q) === 0) break;
340
362
  this.advance();
341
363
  }
342
364
  }
343
365
  if (this.pos < this.source.length) {
344
366
  let n = this.source.charCodeAt(this.pos);
345
- if (n === Jr || n === en) {
346
- let l = this.peek(), o = l < 128 && (y[l] & q) !== 0, h = this.peek(2), c = h < 128 && (y[h] & q) !== 0;
347
- if (o || (l === st || l === K) && c) {
367
+ if (n === gn || n === xn) {
368
+ let l = this.peek(), a = l < 128 && (C[l] & q) !== 0, h = this.peek(2), o = h < 128 && (C[h] & q) !== 0;
369
+ if (a || (l === Me || l === z) && o) {
348
370
  if (this.advance(), this.pos < this.source.length) {
349
- let u = this.source.charCodeAt(this.pos);
350
- (u === st || u === K) && this.advance();
371
+ let _ = this.source.charCodeAt(this.pos);
372
+ (_ === Me || _ === z) && this.advance();
351
373
  }
352
374
  for (; this.pos < this.source.length; ) {
353
- let u = this.source.charCodeAt(this.pos);
354
- if (u >= 128 || (y[u] & q) === 0) break;
375
+ let _ = this.source.charCodeAt(this.pos);
376
+ if (_ >= 128 || (C[_] & q) === 0) break;
355
377
  this.advance();
356
378
  }
357
379
  }
@@ -359,63 +381,97 @@ class Yi {
359
381
  }
360
382
  if (this.pos < this.source.length) {
361
383
  let n = this.source.charCodeAt(this.pos);
362
- if (n === Zr)
363
- return this.advance(), this.make_token(qi, s, this.pos, e, t);
364
- if (Me(n) || n === K && Me(this.peek())) {
365
- for (; this.pos < this.source.length && tt(this.source.charCodeAt(this.pos)); )
384
+ if (n === dn)
385
+ return this.advance(), this.make_token(Wi, s, this.pos, e, t);
386
+ if (Ke(n) || n === z && Ke(this.peek())) {
387
+ for (; this.pos < this.source.length && lt(this.source.charCodeAt(this.pos)); )
366
388
  this.advance();
367
- return this.make_token(zi, s, this.pos, e, t);
389
+ return this.make_token(Yi, s, this.pos, e, t);
368
390
  }
369
391
  }
370
- return this.make_token(nt, s, this.pos, e, t);
392
+ return this.make_token(ht, s, this.pos, e, t);
371
393
  }
372
394
  consume_ident_or_function(e, t) {
373
395
  let s = this.pos;
374
396
  for (; this.pos < this.source.length; ) {
375
397
  let i = this.source.charCodeAt(this.pos);
376
- if (i === Zt) {
398
+ if (i === Jt) {
377
399
  if (this.pos + 1 >= this.source.length) break;
378
400
  let n = this.peek();
379
- if (ie(n)) break;
380
- if (this.advance(), et(n)) {
401
+ if (ne(n)) break;
402
+ if (this.advance(), pe(n)) {
381
403
  this.advance();
382
- for (let l = 0; l < 5 && this.pos < this.source.length && et(this.source.charCodeAt(this.pos)); l++)
404
+ for (let l = 0; l < 5 && this.pos < this.source.length && pe(this.source.charCodeAt(this.pos)); l++)
383
405
  this.advance();
384
406
  if (this.pos < this.source.length) {
385
407
  let l = this.source.charCodeAt(this.pos);
386
- (gi(l) || ie(l)) && this.advance();
408
+ (Ai(l) || ne(l)) && this.advance();
387
409
  }
388
410
  } else
389
411
  this.advance();
390
- } else if (tt(i))
412
+ } else if (lt(i))
391
413
  this.advance();
392
414
  else
393
415
  break;
394
416
  }
395
- return this.pos < this.source.length && this.source.charCodeAt(this.pos) === mi ? (this.advance(), this.make_token(rt, s, this.pos, e, t)) : this.make_token(le, s, this.pos, e, t);
417
+ if (this.pos - s === 1) {
418
+ let i = this.source.charCodeAt(s);
419
+ if ((i === mn || i === kn) && this.pos < this.source.length && this.source.charCodeAt(this.pos) === Me)
420
+ return this.consume_unicode_range(s, e, t);
421
+ }
422
+ return this.pos < this.source.length && this.source.charCodeAt(this.pos) === yi ? (this.advance(), this.make_token(at, s, this.pos, e, t)) : this.make_token(ae, s, this.pos, e, t);
423
+ }
424
+ consume_unicode_range(e, t, s) {
425
+ this.advance();
426
+ let i = 0, n = !1;
427
+ for (; this.pos < this.source.length && i < 6; ) {
428
+ let l = this.source.charCodeAt(this.pos);
429
+ if (pe(l)) {
430
+ if (n)
431
+ break;
432
+ this.advance(), i++;
433
+ } else if (l === wn)
434
+ this.advance(), i++, n = !0;
435
+ else
436
+ break;
437
+ }
438
+ if (n)
439
+ return this.make_token(Ci, e, this.pos, t, s);
440
+ if (this.pos < this.source.length && this.source.charCodeAt(this.pos) === z && this.pos + 1 < this.source.length && pe(this.source.charCodeAt(this.pos + 1))) {
441
+ this.advance();
442
+ let l = 0;
443
+ for (; this.pos < this.source.length && l < 6; ) {
444
+ let a = this.source.charCodeAt(this.pos);
445
+ if (pe(a))
446
+ this.advance(), l++;
447
+ else
448
+ break;
449
+ }
450
+ }
451
+ return this.make_token(Ci, e, this.pos, t, s);
396
452
  }
397
453
  consume_at_keyword(e, t) {
398
454
  let s = this.pos;
399
- for (this.advance(); this.pos < this.source.length && tt(this.source.charCodeAt(this.pos)); )
455
+ for (this.advance(); this.pos < this.source.length && lt(this.source.charCodeAt(this.pos)); )
400
456
  this.advance();
401
- return this.make_token(Nr, s, this.pos, e, t);
457
+ return this.make_token(Yr, s, this.pos, e, t);
402
458
  }
403
459
  consume_hash(e, t) {
404
460
  let s = this.pos;
405
- for (this.advance(); this.pos < this.source.length && tt(this.source.charCodeAt(this.pos)); )
461
+ for (this.advance(); this.pos < this.source.length && lt(this.source.charCodeAt(this.pos)); )
406
462
  this.advance();
407
- return this.make_token(Fi, s, this.pos, e, t);
463
+ return this.make_token(Bi, s, this.pos, e, t);
408
464
  }
409
465
  advance(e = 1) {
410
466
  if (e === 1) {
411
467
  if (this.pos >= this.source.length) return;
412
468
  let t = this.source.charCodeAt(this.pos);
413
- this.pos++, ie(t) ? (t === Ai && this.pos < this.source.length && this.source.charCodeAt(this.pos) === yi && this.pos++, this.line++, this.column = 1) : this.column++;
469
+ this.pos++, ne(t) ? (t === vi && this.pos < this.source.length && this.source.charCodeAt(this.pos) === Ti && this.pos++, this.line++, this.column = 1) : this.column++;
414
470
  return;
415
471
  }
416
472
  for (let t = 0; t < e && !(this.pos >= this.source.length); t++) {
417
473
  let s = this.source.charCodeAt(this.pos);
418
- this.pos++, ie(s) ? (s === Ai && this.pos < this.source.length && this.source.charCodeAt(this.pos) === yi && (this.pos++, t++), this.line++, this.column = 1) : this.column++;
474
+ this.pos++, ne(s) ? (s === vi && this.pos < this.source.length && this.source.charCodeAt(this.pos) === Ti && (this.pos++, t++), this.line++, this.column = 1) : this.column++;
419
475
  }
420
476
  }
421
477
  peek(e = 1) {
@@ -459,23 +515,23 @@ class Yi {
459
515
  this.pos = e.pos, this.line = e.line, this.column = e.column, this.token_type = e.token_type, this.token_start = e.token_start, this.token_end = e.token_end, this.token_line = e.token_line, this.token_column = e.token_column;
460
516
  }
461
517
  }
462
- let it = 36;
463
- const tn = 1, lt = 2, ze = 3, pe = 4, Wi = 5, Qi = 6, ot = 7, Vi = 10, as = 11, Ke = 12, ji = 13, sn = 14, Xi = 15, rn = 16, nn = 17, Zi = 18, ln = 19, dt = 20, hs = 21, Ji = 22, er = 23, Be = 24, be = 25, Ye = 26, at = 27, cs = 28, tr = 29, $e = 30, re = 31, sr = 56, on = 32, an = 33, hn = 34, cn = 35, _n = 36, un = 37, fn = 38, pn = 39, ir = 40, dn = 1, gn = 2, Ei = 4, xn = 8, mn = 32, rr = 64, kn = 128, Ci = 0, wn = 1, An = 2, yn = 3, En = 4, Cn = 5, bn = 6, Pe = 0, Rn = 1, vn = 2, ne = class ne {
518
+ let ot = 36;
519
+ const An = 1, ct = 2, Be = 3, Z = 4, Cs = 5, Ji = 6, _t = 7, er = 10, cs = 11, Ge = 12, tr = 13, En = 14, sr = 15, _s = 16, Cn = 17, ir = 18, yn = 19, wt = 20, us = 21, rr = 22, nr = 23, We = 24, Te = 25, Qe = 26, ut = 27, fs = 28, lr = 29, Ye = 30, le = 31, or = 56, bn = 32, ar = 33, Rn = 34, vn = 35, Tn = 36, On = 37, Sn = 38, Nn = 39, hr = 40, Ln = 50, Un = 1, In = 2, Oi = 4, Hn = 8, Pn = 32, cr = 64, Dn = 128, ps = 0, _r = 1, ur = 2, fr = 3, pr = 4, dr = 5, gr = 6, ye = 0, xr = 1, mr = 2, oe = class oe {
464
520
  constructor(e = 1024) {
465
- g(this, "buffer");
466
- g(this, "view");
467
- g(this, "capacity");
521
+ m(this, "buffer");
522
+ m(this, "view");
523
+ m(this, "capacity");
468
524
  // Number of nodes that can fit
469
- g(this, "count");
525
+ m(this, "count");
470
526
  // Number of nodes currently allocated
471
- g(this, "growth_count");
527
+ m(this, "growth_count");
472
528
  // Number of times the arena has grown
473
- g(this, "overflow_lengths");
474
- this.capacity = e, this.count = 1, this.growth_count = 0, this.buffer = new ArrayBuffer(e * it), this.view = new DataView(this.buffer), this.overflow_lengths = /* @__PURE__ */ new Map();
529
+ m(this, "overflow_lengths");
530
+ this.capacity = e, this.count = 1, this.growth_count = 0, this.buffer = new ArrayBuffer(e * ot), this.view = new DataView(this.buffer), this.overflow_lengths = /* @__PURE__ */ new Map();
475
531
  }
476
532
  // Calculate recommended initial capacity based on CSS source size
477
533
  static capacity_for_source(e) {
478
- let t = e / 1024, s = Math.ceil(t * ne.NODES_PER_KB), i = Math.ceil(s * ne.CAPACITY_BUFFER);
534
+ let t = e / 1024, s = Math.ceil(t * oe.NODES_PER_KB), i = Math.ceil(s * oe.CAPACITY_BUFFER);
479
535
  return Math.max(16, i);
480
536
  }
481
537
  // Get the number of nodes currently in the arena
@@ -492,7 +548,7 @@ const tn = 1, lt = 2, ze = 3, pe = 4, Wi = 5, Qi = 6, ot = 7, Vi = 10, as = 11,
492
548
  }
493
549
  // Calculate byte offset for a node
494
550
  node_offset(e) {
495
- return e * it;
551
+ return e * ot;
496
552
  }
497
553
  // Read node type
498
554
  get_type(e) {
@@ -508,7 +564,7 @@ const tn = 1, lt = 2, ze = 3, pe = 4, Wi = 5, Qi = 6, ot = 7, Vi = 10, as = 11,
508
564
  }
509
565
  // Read length in source
510
566
  get_length(e) {
511
- if (this.has_flag(e, Ei)) {
567
+ if (this.has_flag(e, Oi)) {
512
568
  const t = this.overflow_lengths.get(e);
513
569
  if (t !== void 0)
514
570
  return t;
@@ -568,7 +624,7 @@ const tn = 1, lt = 2, ze = 3, pe = 4, Wi = 5, Qi = 6, ot = 7, Vi = 10, as = 11,
568
624
  }
569
625
  // Write length in source
570
626
  set_length(e, t) {
571
- t > 65535 ? (this.view.setUint16(this.node_offset(e) + 2, 65535, !0), this.set_flag(e, Ei), this.overflow_lengths.set(e, t)) : this.view.setUint16(this.node_offset(e) + 2, t, !0);
627
+ t > 65535 ? (this.view.setUint16(this.node_offset(e) + 2, 65535, !0), this.set_flag(e, Oi), this.overflow_lengths.set(e, t)) : this.view.setUint16(this.node_offset(e) + 2, t, !0);
572
628
  }
573
629
  // Write content start delta (offset from startOffset)
574
630
  set_content_start_delta(e, t) {
@@ -606,7 +662,7 @@ const tn = 1, lt = 2, ze = 3, pe = 4, Wi = 5, Qi = 6, ot = 7, Vi = 10, as = 11,
606
662
  // Grow the arena by 1.3x when capacity is exceeded
607
663
  grow() {
608
664
  this.growth_count++;
609
- let e = Math.ceil(this.capacity * ne.GROWTH_FACTOR), t = new ArrayBuffer(e * it);
665
+ let e = Math.ceil(this.capacity * oe.GROWTH_FACTOR), t = new ArrayBuffer(e * ot);
610
666
  new Uint8Array(t).set(new Uint8Array(this.buffer)), this.buffer = t, this.view = new DataView(t), this.capacity = e;
611
667
  }
612
668
  // Allocate and initialize a new node with core properties
@@ -615,8 +671,8 @@ const tn = 1, lt = 2, ze = 3, pe = 4, Wi = 5, Qi = 6, ot = 7, Vi = 10, as = 11,
615
671
  this.count >= this.capacity && this.grow();
616
672
  const l = this.count;
617
673
  this.count++;
618
- const o = l * it;
619
- return this.view.setUint8(o, e), this.view.setUint32(o + 12, t, !0), this.view.setUint32(o + 24, i, !0), this.view.setUint32(o + 28, n, !0), this.set_length(l, s), l;
674
+ const a = l * ot;
675
+ return this.view.setUint8(a, e), this.view.setUint32(a + 12, t, !0), this.view.setUint32(a + 24, i, !0), this.view.setUint32(a + 28, n, !0), this.set_length(l, s), l;
620
676
  }
621
677
  // --- Tree Building Helpers ---
622
678
  // Link multiple child nodes to a parent
@@ -654,23 +710,23 @@ const tn = 1, lt = 2, ze = 3, pe = 4, Wi = 5, Qi = 6, ot = 7, Vi = 10, as = 11,
654
710
  };
655
711
  // Stores actual lengths for nodes > 65535 chars
656
712
  // Growth multiplier when capacity is exceeded
657
- g(ne, "GROWTH_FACTOR", 1.3), // Estimated nodes per KB of CSS (based on real-world data)
713
+ m(oe, "GROWTH_FACTOR", 1.3), // Estimated nodes per KB of CSS (based on real-world data)
658
714
  // Increased from 270 to 325 to account for VALUE wrapper nodes
659
715
  // (~20% of nodes are declarations, +1 VALUE node per declaration = +20% nodes)
660
- g(ne, "NODES_PER_KB", 325), // Buffer to avoid frequent growth (15%)
661
- g(ne, "CAPACITY_BUFFER", 1.2);
662
- let ct = ne;
663
- const Tn = 32, On = 9, Sn = 10, Nn = 13, Un = 12, Se = 47, W = 42, F = 45, Ln = 39, Hn = 34, te = 43, nr = 46, ht = 126, lr = 62, In = 38, fe = 61, De = 124, bi = 36, Ri = 94, Pn = 58;
664
- function se(r) {
665
- return r === Tn || r === On || r === Sn || r === Nn || r === Un;
716
+ m(oe, "NODES_PER_KB", 325), // Buffer to avoid frequent growth (15%)
717
+ m(oe, "CAPACITY_BUFFER", 1.2);
718
+ let dt = oe;
719
+ const Fn = 32, Mn = 9, zn = 10, qn = 13, Kn = 12, Ue = 47, V = 42, F = 45, $n = 39, Bn = 34, se = 43, kr = 46, ft = 126, wr = 62, Gn = 38, de = 61, ze = 124, Si = 36, Ni = 94, Wn = 58;
720
+ function ie(r) {
721
+ return r === Fn || r === Mn || r === zn || r === qn || r === Kn;
666
722
  }
667
- function Dn(r) {
668
- return r === lr || r === te || r === ht;
723
+ function Yn(r) {
724
+ return r === wr || r === se || r === ft;
669
725
  }
670
- function Jt(r) {
726
+ function es(r) {
671
727
  return r >= 48 && r <= 57;
672
728
  }
673
- function Y(r, e) {
729
+ function Q(r, e) {
674
730
  if (r.length !== e.length)
675
731
  return !1;
676
732
  for (let t = 0; t < r.length; t++) {
@@ -680,7 +736,7 @@ function Y(r, e) {
680
736
  }
681
737
  return !0;
682
738
  }
683
- function Fn(r, e) {
739
+ function Qn(r, e) {
684
740
  if (r.length < e.length)
685
741
  return !1;
686
742
  for (let t = 0; t < e.length; t++) {
@@ -690,7 +746,7 @@ function Fn(r, e) {
690
746
  }
691
747
  return !0;
692
748
  }
693
- function Mn(r, e) {
749
+ function Vn(r, e) {
694
750
  if (e.length === 0)
695
751
  return -1;
696
752
  if (e.length === 1) {
@@ -716,7 +772,7 @@ function Mn(r, e) {
716
772
  }
717
773
  return -1;
718
774
  }
719
- function Fe(r, e, t) {
775
+ function qe(r, e, t) {
720
776
  if ((e === void 0 || t === void 0) && (e = 0, t = r.length), r.charCodeAt(e) !== F || r.charCodeAt(e + 1) === F || t - e < 3)
721
777
  return !1;
722
778
  for (let i = e + 2; i < t; i++)
@@ -724,21 +780,21 @@ function Fe(r, e, t) {
724
780
  return !0;
725
781
  return !1;
726
782
  }
727
- function qn(r, e, t) {
728
- for (; e < t && se(r.charCodeAt(e)); )
783
+ function jn(r, e, t) {
784
+ for (; e < t && ie(r.charCodeAt(e)); )
729
785
  e++;
730
786
  return e;
731
787
  }
732
- function ye(r, e, t) {
788
+ function be(r, e, t) {
733
789
  for (; e < t; ) {
734
790
  let s = r.charCodeAt(e);
735
- if (se(s)) {
791
+ if (ie(s)) {
736
792
  e++;
737
793
  continue;
738
794
  }
739
- if (s === Se && e + 1 < t && r.charCodeAt(e + 1) === W) {
795
+ if (s === Ue && e + 1 < t && r.charCodeAt(e + 1) === V) {
740
796
  for (e += 2; e < t; ) {
741
- if (r.charCodeAt(e) === W && e + 1 < t && r.charCodeAt(e + 1) === Se) {
797
+ if (r.charCodeAt(e) === V && e + 1 < t && r.charCodeAt(e + 1) === Ue) {
742
798
  e += 2;
743
799
  break;
744
800
  }
@@ -750,16 +806,16 @@ function ye(r, e, t) {
750
806
  }
751
807
  return e;
752
808
  }
753
- function zn(r, e, t) {
809
+ function Xn(r, e, t) {
754
810
  for (; e > t; ) {
755
811
  let s = r.charCodeAt(e - 1);
756
- if (se(s)) {
812
+ if (ie(s)) {
757
813
  e--;
758
814
  continue;
759
815
  }
760
- if (e >= 2 && s === Se && r.charCodeAt(e - 2) === W) {
816
+ if (e >= 2 && s === Ue && r.charCodeAt(e - 2) === V) {
761
817
  for (e -= 2; e > t; ) {
762
- if (e >= 2 && r.charCodeAt(e - 2) === Se && r.charCodeAt(e - 1) === W) {
818
+ if (e >= 2 && r.charCodeAt(e - 2) === Ue && r.charCodeAt(e - 1) === V) {
763
819
  e -= 2;
764
820
  break;
765
821
  }
@@ -771,20 +827,20 @@ function zn(r, e, t) {
771
827
  }
772
828
  return e;
773
829
  }
774
- function es(r) {
830
+ function ts(r) {
775
831
  let e = 0;
776
832
  for (let n = 0; n < r.length; n++) {
777
833
  let l = r.charCodeAt(n);
778
834
  if (l === 101 || l === 69) {
779
835
  if (n + 1 < r.length) {
780
- let o = r.charCodeAt(n + 1);
781
- if (Jt(o)) {
836
+ let a = r.charCodeAt(n + 1);
837
+ if (es(a)) {
782
838
  e = n + 1;
783
839
  continue;
784
840
  }
785
- if ((o === 43 || o === 45) && n + 2 < r.length) {
841
+ if ((a === 43 || a === 45) && n + 2 < r.length) {
786
842
  let h = r.charCodeAt(n + 2);
787
- if (Jt(h)) {
843
+ if (es(h)) {
788
844
  e = n + 1;
789
845
  continue;
790
846
  }
@@ -792,7 +848,7 @@ function es(r) {
792
848
  }
793
849
  break;
794
850
  }
795
- if (Jt(l) || l === nr || l === F || l === te)
851
+ if (es(l) || l === kr || l === F || l === se)
796
852
  e = n + 1;
797
853
  else
798
854
  break;
@@ -800,52 +856,65 @@ function es(r) {
800
856
  let t = r.substring(0, e), s = r.substring(e);
801
857
  return { value: t ? parseFloat(t) : 0, unit: s };
802
858
  }
803
- const Kn = {
804
- [tn]: "StyleSheet",
805
- [lt]: "Rule",
806
- [ze]: "Atrule",
807
- [pe]: "Declaration",
808
- [Wi]: "Selector",
809
- [Qi]: "Comment",
810
- [ot]: "Block",
811
- [Vi]: "Identifier",
812
- [as]: "Number",
813
- [Ke]: "Dimension",
814
- [ji]: "String",
815
- [sn]: "Hash",
816
- [Xi]: "Function",
817
- [rn]: "Operator",
818
- [nn]: "Parentheses",
819
- [Zi]: "Url",
820
- [ln]: "Value",
821
- [dt]: "SelectorList",
822
- [hs]: "TypeSelector",
823
- [Ji]: "ClassSelector",
824
- [er]: "IdSelector",
825
- [Be]: "AttributeSelector",
826
- [be]: "PseudoClassSelector",
827
- [Ye]: "PseudoElementSelector",
828
- [at]: "Combinator",
829
- [cs]: "UniversalSelector",
830
- [tr]: "NestingSelector",
831
- [$e]: "Nth",
832
- [re]: "NthOf",
833
- [sr]: "Lang",
834
- [on]: "MediaQuery",
835
- [an]: "Feature",
836
- [hn]: "MediaType",
837
- [cn]: "ContainerQuery",
838
- [_n]: "SupportsQuery",
839
- [un]: "Layer",
840
- [fn]: "Operator",
841
- [pn]: "MediaFeatureRange",
842
- [ir]: "AtrulePrelude"
859
+ const Zn = {
860
+ [An]: "StyleSheet",
861
+ [ct]: "Rule",
862
+ [Be]: "Atrule",
863
+ [Z]: "Declaration",
864
+ [Cs]: "Selector",
865
+ [Ji]: "Comment",
866
+ [_t]: "Block",
867
+ [er]: "Identifier",
868
+ [cs]: "Number",
869
+ [Ge]: "Dimension",
870
+ [tr]: "String",
871
+ [En]: "Hash",
872
+ [sr]: "Function",
873
+ [_s]: "Operator",
874
+ [Cn]: "Parentheses",
875
+ [ir]: "Url",
876
+ [yn]: "UnicodeRange",
877
+ [Ln]: "Value",
878
+ [wt]: "SelectorList",
879
+ [us]: "TypeSelector",
880
+ [rr]: "ClassSelector",
881
+ [nr]: "IdSelector",
882
+ [We]: "AttributeSelector",
883
+ [Te]: "PseudoClassSelector",
884
+ [Qe]: "PseudoElementSelector",
885
+ [ut]: "Combinator",
886
+ [fs]: "UniversalSelector",
887
+ [lr]: "NestingSelector",
888
+ [Ye]: "Nth",
889
+ [le]: "NthOf",
890
+ [or]: "Lang",
891
+ [bn]: "MediaQuery",
892
+ [ar]: "Feature",
893
+ [Rn]: "MediaType",
894
+ [vn]: "ContainerQuery",
895
+ [Tn]: "SupportsQuery",
896
+ [On]: "Layer",
897
+ [Sn]: "Operator",
898
+ [Nn]: "MediaFeatureRange",
899
+ [hr]: "AtrulePrelude"
900
+ }, Jn = {
901
+ [ps]: null,
902
+ [_r]: "=",
903
+ [ur]: "~=",
904
+ [fr]: "|=",
905
+ [pr]: "^=",
906
+ [dr]: "$=",
907
+ [gr]: "*="
908
+ }, el = {
909
+ [ye]: null,
910
+ [xr]: "i",
911
+ [mr]: "s"
843
912
  };
844
- class We {
913
+ class Ve {
845
914
  constructor(e, t, s) {
846
- g(this, "arena");
847
- g(this, "source");
848
- g(this, "index");
915
+ m(this, "arena");
916
+ m(this, "source");
917
+ m(this, "index");
849
918
  this.arena = e, this.source = t, this.index = s;
850
919
  }
851
920
  /**
@@ -855,30 +924,37 @@ class We {
855
924
  __get_arena() {
856
925
  return this.arena;
857
926
  }
927
+ get_content() {
928
+ let e = this.arena.get_content_start(this.index), t = this.arena.get_content_length(this.index);
929
+ return t === 0 ? "" : this.source.substring(e, e + t);
930
+ }
858
931
  /** Get node type as number (for performance) */
859
932
  get type() {
860
933
  return this.arena.get_type(this.index);
861
934
  }
862
935
  /** Get node type as human-readable string */
863
936
  get type_name() {
864
- return Kn[this.type] || "unknown";
937
+ return Zn[this.type] || "unknown";
865
938
  }
866
939
  /** Get the full text of this node from source */
867
940
  get text() {
868
941
  let e = this.arena.get_start_offset(this.index), t = this.arena.get_length(this.index);
869
942
  return this.source.substring(e, e + t);
870
943
  }
871
- /** Get the "content" text (property name for declarations, at-rule name for at-rules, layer name for import layers) */
944
+ /** Get the "content" text (at-rule name for at-rules, layer name for import layers) */
872
945
  get name() {
873
- let e = this.arena.get_content_start(this.index), t = this.arena.get_content_length(this.index);
874
- return t === 0 ? "" : this.source.substring(e, e + t);
946
+ let { type: e } = this;
947
+ if (!(e === Z || e === _s || e === Cs))
948
+ return this.get_content();
875
949
  }
876
950
  /**
877
951
  * Alias for name (for declarations: "color" in "color: blue")
878
952
  * More semantic than `name` for declaration nodes
879
953
  */
880
954
  get property() {
881
- return this.name;
955
+ let { type: e } = this;
956
+ if (!(e !== Z && e !== ar))
957
+ return this.get_content();
882
958
  }
883
959
  /**
884
960
  * Get the value text (for declarations: "blue" in "color: blue")
@@ -888,31 +964,32 @@ class We {
888
964
  * For URL nodes with unquoted URL: returns the URL content without quotes
889
965
  */
890
966
  get value() {
891
- let { type: e, text: t } = this;
892
- if (e === pe && this.first_child)
893
- return this.first_child;
894
- if (e === Ke)
895
- return es(t).value;
896
- if (e === as)
897
- return Number.parseFloat(this.text);
898
- if (e === Zi) {
899
- let n = this.first_child;
900
- if (n && n.type === ji)
901
- return n.text;
902
- if (Fn(t, "url(")) {
903
- let l = t.indexOf("("), o = t.lastIndexOf(")");
904
- if (l !== -1 && o !== -1 && o > l)
905
- return t.substring(l + 1, o).trim();
967
+ let { type: e, text: t, first_child: s } = this;
968
+ if (e === Z && s)
969
+ return s;
970
+ if (e === Ge)
971
+ return ts(t).value;
972
+ if (e === cs)
973
+ return Number.parseFloat(t);
974
+ if (e === ir) {
975
+ if ((s == null ? void 0 : s.type) === tr)
976
+ return s.text;
977
+ if (Qn(t, "url(")) {
978
+ let l = t.indexOf("("), a = t.lastIndexOf(")");
979
+ if (l !== -1 && a !== -1 && a > l)
980
+ return t.substring(l + 1, a).trim();
906
981
  } else if (t.startsWith('"') || t.startsWith("'"))
907
982
  return t;
908
983
  }
909
- let s = this.arena.get_value_start(this.index), i = this.arena.get_value_length(this.index);
910
- return i === 0 ? null : this.source.substring(s, s + i);
984
+ if (e === _s)
985
+ return this.get_content();
986
+ let i = this.arena.get_value_start(this.index), n = this.arena.get_value_length(this.index);
987
+ return n === 0 ? null : this.source.substring(i, i + n);
911
988
  }
912
989
  /** Get the numeric value for NUMBER and DIMENSION nodes, or null for other node types */
913
990
  get value_as_number() {
914
- let e = this.text;
915
- return this.type === as ? Number.parseFloat(e) : this.type === Ke ? es(e).value : null;
991
+ let { text: e, type: t } = this;
992
+ return t === cs ? Number.parseFloat(e) : t === Ge ? ts(e).value : null;
916
993
  }
917
994
  /**
918
995
  * Get the prelude node:
@@ -921,11 +998,11 @@ class We {
921
998
  * Returns null if no prelude exists
922
999
  */
923
1000
  get prelude() {
924
- if (this.type === ze) {
1001
+ if (this.type === Be) {
925
1002
  let e = this.first_child;
926
- return e && e.type === ir ? e : null;
1003
+ return e && e.type === hr ? e : null;
927
1004
  }
928
- if (this.type === lt)
1005
+ if (this.type === ct)
929
1006
  return this.first_child;
930
1007
  }
931
1008
  /**
@@ -933,7 +1010,7 @@ class We {
933
1010
  * Returns one of the ATTR_OPERATOR_* constants
934
1011
  */
935
1012
  get attr_operator() {
936
- if (this.type === Be)
1013
+ if (this.type === We)
937
1014
  return this.arena.get_attr_operator(this.index);
938
1015
  }
939
1016
  /**
@@ -941,72 +1018,74 @@ class We {
941
1018
  * Returns one of the ATTR_FLAG_* constants
942
1019
  */
943
1020
  get attr_flags() {
944
- if (this.type === Be)
1021
+ if (this.type === We)
945
1022
  return this.arena.get_attr_flags(this.index);
946
1023
  }
947
1024
  /** Get the unit for dimension nodes (e.g., "px" from "100px", "%" from "50%") */
948
1025
  get unit() {
949
- if (this.type === Ke)
950
- return es(this.text).unit;
1026
+ if (this.type === Ge)
1027
+ return ts(this.text).unit;
951
1028
  }
952
1029
  /** Check if this declaration has !important */
953
1030
  get is_important() {
954
- if (this.type === pe)
955
- return this.arena.has_flag(this.index, dn);
1031
+ if (this.type === Z)
1032
+ return this.arena.has_flag(this.index, Un);
956
1033
  }
957
1034
  /** Check if this declaration has a browser hack prefix */
958
1035
  get is_browserhack() {
959
- if (this.type === pe)
960
- return this.arena.has_flag(this.index, kn);
1036
+ if (this.type === Z)
1037
+ return this.arena.has_flag(this.index, Dn);
961
1038
  }
962
1039
  /** Check if this has a vendor prefix (computed on-demand) */
963
1040
  get is_vendor_prefixed() {
964
1041
  switch (this.type) {
965
- case pe:
966
- return Fe(this.name);
967
- case be:
968
- case Ye:
969
- return Fe(this.name);
970
- case ze:
971
- return Fe(this.name);
972
- case Xi:
973
- return Fe(this.name);
974
- case Vi:
975
- return Fe(this.text);
1042
+ case Z:
1043
+ return qe(this.get_content());
1044
+ case Te:
1045
+ case Qe:
1046
+ return qe(this.get_content());
1047
+ case Be:
1048
+ return qe(this.get_content());
1049
+ case sr:
1050
+ return qe(this.get_content());
1051
+ case er:
1052
+ return qe(this.text);
976
1053
  default:
977
1054
  return !1;
978
1055
  }
979
1056
  }
980
1057
  /** Check if this node has an error */
981
1058
  get has_error() {
982
- return this.arena.has_flag(this.index, gn);
1059
+ return this.arena.has_flag(this.index, In);
983
1060
  }
984
1061
  /** Check if this node has a prelude (at-rules and style rules) */
985
1062
  get has_prelude() {
986
- return this.type === ze ? this.arena.get_value_length(this.index) > 0 : this.type === lt ? this.first_child !== null : !1;
1063
+ let { type: e } = this;
1064
+ return e === Be ? this.arena.get_value_length(this.index) > 0 : e === ct ? this.first_child !== null : !1;
987
1065
  }
988
1066
  /** Check if this rule has a block { } */
989
1067
  get has_block() {
990
- return this.arena.has_flag(this.index, xn);
1068
+ return this.arena.has_flag(this.index, Hn);
991
1069
  }
992
1070
  /** Check if this style rule has declarations */
993
1071
  get has_declarations() {
994
- return this.arena.has_flag(this.index, mn);
1072
+ return this.arena.has_flag(this.index, Pn);
995
1073
  }
996
1074
  /** Get the block node (for style rules and at-rules with blocks) */
997
1075
  get block() {
998
- if (this.type === lt) {
999
- let e = this.first_child;
1000
- if (!e) return null;
1001
- let t = e.next_sibling;
1002
- return t && t.type === ot ? t : null;
1003
- }
1004
- if (this.type === ze) {
1005
- let e = this.first_child;
1006
- for (; e; ) {
1007
- if (e.type === ot && !e.next_sibling)
1008
- return e;
1009
- e = e.next_sibling;
1076
+ let { type: e } = this;
1077
+ if (e === ct) {
1078
+ let t = this.first_child;
1079
+ if (!t) return null;
1080
+ let s = t.next_sibling;
1081
+ return (s == null ? void 0 : s.type) === _t ? s : null;
1082
+ }
1083
+ if (e === Be) {
1084
+ let t = this.first_child;
1085
+ for (; t; ) {
1086
+ if (t.type === _t && !t.next_sibling)
1087
+ return t;
1088
+ t = t.next_sibling;
1010
1089
  }
1011
1090
  return null;
1012
1091
  }
@@ -1014,10 +1093,10 @@ class We {
1014
1093
  }
1015
1094
  /** Check if this block is empty (no declarations or rules, only comments allowed) */
1016
1095
  get is_empty() {
1017
- if (this.type !== ot) return;
1096
+ if (this.type !== _t) return;
1018
1097
  let e = this.first_child;
1019
1098
  for (; e; ) {
1020
- if (e.type !== Qi)
1099
+ if (e.type !== Ji)
1021
1100
  return !1;
1022
1101
  e = e.next_sibling;
1023
1102
  }
@@ -1050,12 +1129,12 @@ class We {
1050
1129
  /** Get first child node */
1051
1130
  get first_child() {
1052
1131
  let e = this.arena.get_first_child(this.index);
1053
- return e === 0 ? null : new We(this.arena, this.source, e);
1132
+ return e === 0 ? null : new Ve(this.arena, this.source, e);
1054
1133
  }
1055
1134
  /** Get next sibling node */
1056
1135
  get next_sibling() {
1057
1136
  let e = this.arena.get_next_sibling(this.index);
1058
- return e === 0 ? null : new We(this.arena, this.source, e);
1137
+ return e === 0 ? null : new Ve(this.arena, this.source, e);
1059
1138
  }
1060
1139
  /** Check if this node has a next sibling */
1061
1140
  get has_next() {
@@ -1067,7 +1146,8 @@ class We {
1067
1146
  * This allows formatters to distinguish :lang() from :hover
1068
1147
  */
1069
1148
  get has_children() {
1070
- return (this.type === be || this.type === Ye) && this.arena.has_flag(this.index, rr) ? !0 : this.arena.has_children(this.index);
1149
+ let { type: e } = this;
1150
+ return (e === Te || e === Qe) && this.arena.has_flag(this.index, cr) ? !0 : this.arena.has_children(this.index);
1071
1151
  }
1072
1152
  /** Get all children as an array */
1073
1153
  get children() {
@@ -1085,38 +1165,40 @@ class We {
1085
1165
  // --- An+B Expression Helpers (for NODE_SELECTOR_NTH) ---
1086
1166
  /** Get the 'a' coefficient from An+B expression (e.g., "2n" from "2n+1", "odd" from "odd") */
1087
1167
  get nth_a() {
1088
- if (this.type !== $e && this.type !== re) return;
1089
- let e = this.arena.get_content_length(this.index);
1090
- if (e === 0) return;
1091
- let t = this.arena.get_content_start(this.index);
1092
- return this.source.substring(t, t + e);
1168
+ let { type: e, arena: t, index: s } = this;
1169
+ if (e !== Ye && e !== le) return;
1170
+ let i = t.get_content_length(s);
1171
+ if (i === 0) return;
1172
+ let n = t.get_content_start(s);
1173
+ return this.source.substring(n, n + i);
1093
1174
  }
1094
1175
  /** Get the 'b' coefficient from An+B expression (e.g., "+1" from "2n+1") */
1095
1176
  get nth_b() {
1096
- if (this.type !== $e && this.type !== re) return;
1097
- let e = this.arena.get_value_length(this.index);
1098
- if (e === 0) return;
1099
- let t = this.arena.get_value_start(this.index), s = this.source.substring(t, t + e), i = t - 1;
1100
- for (; i >= 0; ) {
1101
- let n = this.source.charCodeAt(i);
1102
- if (se(n)) {
1103
- i--;
1177
+ let { type: e, arena: t, index: s, source: i } = this;
1178
+ if (e !== Ye && e !== le) return;
1179
+ let n = t.get_value_length(s);
1180
+ if (n === 0) return;
1181
+ let l = t.get_value_start(s), a = i.substring(l, l + n), h = l - 1;
1182
+ for (; h >= 0; ) {
1183
+ let o = i.charCodeAt(h);
1184
+ if (ie(o)) {
1185
+ h--;
1104
1186
  continue;
1105
1187
  }
1106
- n === F ? s = "-" + s : n === te && (s = "+" + s);
1188
+ o === F ? a = "-" + a : o === se && (a = "+" + a);
1107
1189
  break;
1108
1190
  }
1109
- return s;
1191
+ return a;
1110
1192
  }
1111
1193
  // --- Pseudo-Class Nth-Of Helpers (for NODE_SELECTOR_NTH_OF) ---
1112
1194
  /** Get the An+B formula node from :nth-child(2n+1 of .foo) */
1113
1195
  get nth() {
1114
- if (this.type === re)
1196
+ if (this.type === le)
1115
1197
  return this.first_child ?? void 0;
1116
1198
  }
1117
1199
  /** Get the selector list from :nth-child(2n+1 of .foo) */
1118
1200
  get selector() {
1119
- if (this.type !== re) return;
1201
+ if (this.type !== le) return;
1120
1202
  let e = this.first_child;
1121
1203
  return (e == null ? void 0 : e.next_sibling) ?? void 0;
1122
1204
  }
@@ -1126,12 +1208,12 @@ class We {
1126
1208
  * Works for :is(.a), :not(.b), :has(.c), :where(.d), :nth-child(2n of .e)
1127
1209
  */
1128
1210
  get selector_list() {
1129
- if (this.type !== be) return;
1211
+ if (this.type !== Te) return;
1130
1212
  let e = this.first_child;
1131
1213
  if (e) {
1132
- if (e.type === dt)
1214
+ if (e.type === wt)
1133
1215
  return e;
1134
- if (e.type === re)
1216
+ if (e.type === le)
1135
1217
  return e.selector;
1136
1218
  }
1137
1219
  }
@@ -1146,25 +1228,31 @@ class We {
1146
1228
  */
1147
1229
  clone(e = {}) {
1148
1230
  const { deep: t = !0, locations: s = !1 } = e;
1149
- let i = {
1150
- type: this.type,
1231
+ let { type: i, name: n, property: l, value: a, unit: h } = this, o = {
1232
+ type: i,
1151
1233
  type_name: this.type_name,
1152
- text: this.text,
1153
- children: []
1234
+ text: this.text
1154
1235
  };
1155
- if (this.name && (i.name = this.name), this.type === pe && (i.property = this.name), this.value !== void 0 && this.value !== null && (i.value = this.value, this.unit && (i.unit = this.unit)), this.type === pe && (i.is_important = this.is_important, i.is_browserhack = this.is_browserhack), i.is_vendor_prefixed = this.is_vendor_prefixed, i.has_error = this.has_error, this.type === Be && (i.attr_operator = this.attr_operator, i.attr_flags = this.attr_flags), (this.type === $e || this.type === re) && (i.nth_a = this.nth_a, i.nth_b = this.nth_b), s && (i.line = this.line, i.column = this.column, i.start = this.start, i.length = this.length, i.end = this.end), t)
1156
- for (let n of this.children)
1157
- i.children.push(n.clone({ deep: !0, locations: s }));
1158
- return i;
1236
+ if (n && (o.name = n), l && (o.property = l), a && (o.value = a, h && (o.unit = h)), i === Z) {
1237
+ let { is_important: d, is_browserhack: u } = this;
1238
+ d && (o.is_important = !0), u && (o.is_browserhack = !0);
1239
+ }
1240
+ let { is_vendor_prefixed: _, has_error: p } = this;
1241
+ if (_ && (o.is_vendor_prefixed = !0), p && (o.has_error = !0), i === We && (o.attr_operator = Jn[this.attr_operator], o.attr_flags = el[this.attr_flags]), (i === Ye || i === le) && (o.nth_a = this.nth_a, o.nth_b = this.nth_b), s && (o.line = this.line, o.column = this.column, o.start = this.start, o.length = this.length, o.end = this.end), t && i !== Z) {
1242
+ o.children = [];
1243
+ for (let d of this.children)
1244
+ o.children.push(d.clone({ deep: !0, locations: s }));
1245
+ }
1246
+ return o;
1159
1247
  }
1160
1248
  }
1161
- class vi {
1249
+ class Li {
1162
1250
  constructor(e, t) {
1163
- g(this, "lexer");
1164
- g(this, "arena");
1165
- g(this, "source");
1166
- g(this, "expr_end");
1167
- this.arena = e, this.source = t, this.lexer = new Yi(t), this.expr_end = 0;
1251
+ m(this, "lexer");
1252
+ m(this, "arena");
1253
+ m(this, "source");
1254
+ m(this, "expr_end");
1255
+ this.arena = e, this.source = t, this.lexer = new Zi(t), this.expr_end = 0;
1168
1256
  }
1169
1257
  /**
1170
1258
  * Parse An+B expression
@@ -1172,35 +1260,35 @@ class vi {
1172
1260
  */
1173
1261
  parse_anplusb(e, t, s = 1) {
1174
1262
  this.expr_end = t, this.lexer.pos = e, this.lexer.line = s;
1175
- let i = null, n = e, l = e, o = e, h = e;
1176
- const c = e;
1263
+ let i = null, n = e, l = e, a = e, h = e;
1264
+ const o = e;
1177
1265
  if (this.skip_whitespace(), this.lexer.pos >= this.expr_end)
1178
1266
  return null;
1179
- if (this.lexer.next_token_fast(!0), this.lexer.token_type === le) {
1180
- const u = this.source.substring(this.lexer.token_start, this.lexer.token_end);
1181
- if (Y("odd", u) || Y("even", u))
1182
- return n = this.lexer.token_start, l = this.lexer.token_end, this.create_anplusb_node(c, n, l, 0, 0);
1183
- const f = this.source.charCodeAt(this.lexer.token_start), x = this.lexer.token_end > this.lexer.token_start + 1 ? this.source.charCodeAt(this.lexer.token_start + 1) : 0;
1184
- return f === F && x === 110 ? this.lexer.token_end > this.lexer.token_start + 2 && this.source.charCodeAt(this.lexer.token_start + 2) === F ? (n = this.lexer.token_start, l = this.lexer.token_start + 2, i = this.source.substring(this.lexer.token_start + 2, this.lexer.token_end), o = this.lexer.token_start + 2, h = this.lexer.token_end, this.create_anplusb_node(c, n, l, o, h)) : (n = this.lexer.token_start, l = this.lexer.token_start + 2, i = this.parse_b_part(), i !== null && (o = this.lexer.token_start, h = this.lexer.token_end), this.create_anplusb_node(c, n, l, i !== null ? o : 0, i !== null ? h : 0)) : f === 110 ? this.lexer.token_end > this.lexer.token_start + 1 && this.source.charCodeAt(this.lexer.token_start + 1) === F ? (n = this.lexer.token_start, l = this.lexer.token_start + 1, i = this.source.substring(this.lexer.token_start + 1, this.lexer.token_end), o = this.lexer.token_start + 1, h = this.lexer.token_end, this.create_anplusb_node(c, n, l, o, h)) : (n = this.lexer.token_start, l = this.lexer.token_start + 1, i = this.parse_b_part(), i !== null && (o = this.lexer.token_start, h = this.lexer.token_end), this.create_anplusb_node(c, n, l, i !== null ? o : 0, i !== null ? h : 0)) : null;
1185
- }
1186
- if (this.lexer.token_type === de && this.source.charCodeAt(this.lexer.token_start) === te) {
1187
- const u = this.lexer.save_position();
1188
- if (this.lexer.next_token_fast(!0), this.lexer.token_type === le && this.source.substring(this.lexer.token_start, this.lexer.token_end).charCodeAt(0) === 110)
1189
- return n = u.pos - 1, l = this.lexer.token_start + 1, this.lexer.token_end > this.lexer.token_start + 1 && this.source.charCodeAt(this.lexer.token_start + 1) === F ? (i = this.source.substring(this.lexer.token_start + 1, this.lexer.token_end), o = this.lexer.token_start + 1, h = this.lexer.token_end, this.create_anplusb_node(c, n, l, o, h)) : (i = this.parse_b_part(), i !== null && (o = this.lexer.token_start, h = this.lexer.token_end), this.create_anplusb_node(c, n, l, i !== null ? o : 0, i !== null ? h : 0));
1190
- this.lexer.restore_position(u);
1191
- }
1192
- if (this.lexer.token_type === zi) {
1193
- const u = this.source.substring(this.lexer.token_start, this.lexer.token_end), f = Mn(u, "n");
1194
- if (f !== -1) {
1195
- if (n = this.lexer.token_start, l = this.lexer.token_start + f + 1, f + 1 < u.length) {
1196
- const x = u.substring(f + 1);
1197
- if (x.charCodeAt(0) === F)
1198
- return i = x, o = this.lexer.token_start + f + 1, h = this.lexer.token_end, this.create_anplusb_node(c, n, l, o, h);
1267
+ if (this.lexer.next_token_fast(!0), this.lexer.token_type === ae) {
1268
+ const _ = this.source.substring(this.lexer.token_start, this.lexer.token_end);
1269
+ if (Q("odd", _) || Q("even", _))
1270
+ return n = this.lexer.token_start, l = this.lexer.token_end, this.create_anplusb_node(o, n, l, 0, 0);
1271
+ const p = this.source.charCodeAt(this.lexer.token_start), d = this.lexer.token_end > this.lexer.token_start + 1 ? this.source.charCodeAt(this.lexer.token_start + 1) : 0;
1272
+ return p === F && d === 110 ? this.lexer.token_end > this.lexer.token_start + 2 && this.source.charCodeAt(this.lexer.token_start + 2) === F ? (n = this.lexer.token_start, l = this.lexer.token_start + 2, i = this.source.substring(this.lexer.token_start + 2, this.lexer.token_end), a = this.lexer.token_start + 2, h = this.lexer.token_end, this.create_anplusb_node(o, n, l, a, h)) : (n = this.lexer.token_start, l = this.lexer.token_start + 2, i = this.parse_b_part(), i !== null && (a = this.lexer.token_start, h = this.lexer.token_end), this.create_anplusb_node(o, n, l, i !== null ? a : 0, i !== null ? h : 0)) : p === 110 ? this.lexer.token_end > this.lexer.token_start + 1 && this.source.charCodeAt(this.lexer.token_start + 1) === F ? (n = this.lexer.token_start, l = this.lexer.token_start + 1, i = this.source.substring(this.lexer.token_start + 1, this.lexer.token_end), a = this.lexer.token_start + 1, h = this.lexer.token_end, this.create_anplusb_node(o, n, l, a, h)) : (n = this.lexer.token_start, l = this.lexer.token_start + 1, i = this.parse_b_part(), i !== null && (a = this.lexer.token_start, h = this.lexer.token_end), this.create_anplusb_node(o, n, l, i !== null ? a : 0, i !== null ? h : 0)) : null;
1273
+ }
1274
+ if (this.lexer.token_type === xe && this.source.charCodeAt(this.lexer.token_start) === se) {
1275
+ const _ = this.lexer.save_position();
1276
+ if (this.lexer.next_token_fast(!0), this.lexer.token_type === ae && this.source.substring(this.lexer.token_start, this.lexer.token_end).charCodeAt(0) === 110)
1277
+ return n = _.pos - 1, l = this.lexer.token_start + 1, this.lexer.token_end > this.lexer.token_start + 1 && this.source.charCodeAt(this.lexer.token_start + 1) === F ? (i = this.source.substring(this.lexer.token_start + 1, this.lexer.token_end), a = this.lexer.token_start + 1, h = this.lexer.token_end, this.create_anplusb_node(o, n, l, a, h)) : (i = this.parse_b_part(), i !== null && (a = this.lexer.token_start, h = this.lexer.token_end), this.create_anplusb_node(o, n, l, i !== null ? a : 0, i !== null ? h : 0));
1278
+ this.lexer.restore_position(_);
1279
+ }
1280
+ if (this.lexer.token_type === Yi) {
1281
+ const _ = this.source.substring(this.lexer.token_start, this.lexer.token_end), p = Vn(_, "n");
1282
+ if (p !== -1) {
1283
+ if (n = this.lexer.token_start, l = this.lexer.token_start + p + 1, p + 1 < _.length) {
1284
+ const d = _.substring(p + 1);
1285
+ if (d.charCodeAt(0) === F)
1286
+ return i = d, a = this.lexer.token_start + p + 1, h = this.lexer.token_end, this.create_anplusb_node(o, n, l, a, h);
1199
1287
  }
1200
- return i = this.parse_b_part(), i !== null && (o = this.lexer.token_start, h = this.lexer.token_end), this.create_anplusb_node(c, n, l, o, h);
1288
+ return i = this.parse_b_part(), i !== null && (a = this.lexer.token_start, h = this.lexer.token_end), this.create_anplusb_node(o, n, l, a, h);
1201
1289
  }
1202
1290
  }
1203
- return this.lexer.token_type === nt ? (i = this.source.substring(this.lexer.token_start, this.lexer.token_end), o = this.lexer.token_start, h = this.lexer.token_end, this.create_anplusb_node(c, 0, 0, o, h)) : null;
1291
+ return this.lexer.token_type === ht ? (i = this.source.substring(this.lexer.token_start, this.lexer.token_end), a = this.lexer.token_start, h = this.lexer.token_end, this.create_anplusb_node(o, 0, 0, a, h)) : null;
1204
1292
  }
1205
1293
  /**
1206
1294
  * Parse the b part after 'n'
@@ -1209,39 +1297,39 @@ class vi {
1209
1297
  parse_b_part() {
1210
1298
  if (this.skip_whitespace(), this.lexer.pos >= this.expr_end)
1211
1299
  return null;
1212
- if (this.lexer.next_token_fast(!0), this.lexer.token_type === de) {
1300
+ if (this.lexer.next_token_fast(!0), this.lexer.token_type === xe) {
1213
1301
  const e = this.source.charCodeAt(this.lexer.token_start);
1214
- if (e === te || e === F) {
1302
+ if (e === se || e === F) {
1215
1303
  const t = e === F ? "-" : "";
1216
- if (this.skip_whitespace(), this.lexer.next_token_fast(!0), this.lexer.token_type === nt) {
1304
+ if (this.skip_whitespace(), this.lexer.next_token_fast(!0), this.lexer.token_type === ht) {
1217
1305
  let s = this.source.substring(this.lexer.token_start, this.lexer.token_end);
1218
- return s.charCodeAt(0) === te && (s = s.substring(1)), t === "-" ? t + s : s;
1306
+ return s.charCodeAt(0) === se && (s = s.substring(1)), t === "-" ? t + s : s;
1219
1307
  }
1220
1308
  }
1221
1309
  }
1222
- if (this.lexer.token_type === nt) {
1310
+ if (this.lexer.token_type === ht) {
1223
1311
  let e = this.source.substring(this.lexer.token_start, this.lexer.token_end);
1224
1312
  const t = e.charCodeAt(0);
1225
- if (t === te || t === F)
1226
- return t === te && (e = e.substring(1)), e;
1313
+ if (t === se || t === F)
1314
+ return t === se && (e = e.substring(1)), e;
1227
1315
  }
1228
1316
  return null;
1229
1317
  }
1230
1318
  skip_whitespace() {
1231
- this.lexer.pos = ye(this.source, this.lexer.pos, this.expr_end);
1319
+ this.lexer.pos = be(this.source, this.lexer.pos, this.expr_end);
1232
1320
  }
1233
1321
  create_anplusb_node(e, t, s, i, n) {
1234
- const l = this.arena.create_node($e, e, this.lexer.pos - e, this.lexer.line, 1);
1322
+ const l = this.arena.create_node(Ye, e, this.lexer.pos - e, this.lexer.line, 1);
1235
1323
  return s > t && (this.arena.set_content_start_delta(l, t - e), this.arena.set_content_length(l, s - t)), n > i && (this.arena.set_value_start_delta(l, i - e), this.arena.set_value_length(l, n - i)), l;
1236
1324
  }
1237
1325
  }
1238
- class Bn {
1326
+ class tl {
1239
1327
  constructor(e, t) {
1240
- g(this, "lexer");
1241
- g(this, "arena");
1242
- g(this, "source");
1243
- g(this, "selector_end");
1244
- this.arena = e, this.source = t, this.lexer = new Yi(t), this.selector_end = 0;
1328
+ m(this, "lexer");
1329
+ m(this, "arena");
1330
+ m(this, "source");
1331
+ m(this, "selector_end");
1332
+ this.arena = e, this.source = t, this.lexer = new Zi(t), this.selector_end = 0;
1245
1333
  }
1246
1334
  // Parse a selector range into selector nodes (standalone use)
1247
1335
  // Always returns a NODE_SELECTOR_LIST with selector components as children
@@ -1252,30 +1340,30 @@ class Bn {
1252
1340
  parse_selector_list(e = !0) {
1253
1341
  let t = [], s = this.lexer.pos, i = this.lexer.line, n = this.lexer.column;
1254
1342
  for (; this.lexer.pos < this.selector_end; ) {
1255
- let l = this.lexer.pos, o = this.lexer.line, h = this.lexer.column, c = this.parse_complex_selector(e);
1256
- if (c !== null) {
1257
- let f = this.arena.create_node(
1258
- Wi,
1343
+ let l = this.lexer.pos, a = this.lexer.line, h = this.lexer.column, o = this.parse_complex_selector(e);
1344
+ if (o !== null) {
1345
+ let p = this.arena.create_node(
1346
+ Cs,
1259
1347
  l,
1260
1348
  this.lexer.pos - l,
1261
- o,
1349
+ a,
1262
1350
  h
1263
1351
  );
1264
- this.arena.set_content_start_delta(f, 0), this.arena.set_content_length(f, this.lexer.pos - l);
1265
- let x = c, k = this.arena.get_next_sibling(x);
1266
- for (; k !== 0; )
1267
- x = k, k = this.arena.get_next_sibling(x);
1268
- this.arena.set_first_child(f, c), t.push(f);
1352
+ this.arena.set_content_start_delta(p, 0), this.arena.set_content_length(p, this.lexer.pos - l);
1353
+ let d = o, u = this.arena.get_next_sibling(d);
1354
+ for (; u !== 0; )
1355
+ d = u, u = this.arena.get_next_sibling(d);
1356
+ this.arena.set_first_child(p, o), t.push(p);
1269
1357
  }
1270
1358
  if (this.skip_whitespace(), this.lexer.pos >= this.selector_end) break;
1271
- if (this.lexer.next_token_fast(!1), this.lexer.token_type === qe) {
1359
+ if (this.lexer.next_token_fast(!1), this.lexer.token_type === $e) {
1272
1360
  this.skip_whitespace();
1273
1361
  continue;
1274
1362
  } else
1275
1363
  break;
1276
1364
  }
1277
1365
  if (t.length >= 1) {
1278
- let l = this.arena.create_node(dt, s, this.lexer.pos - s, i, n);
1366
+ let l = this.arena.create_node(wt, s, this.lexer.pos - s, i, n);
1279
1367
  return this.arena.append_children(l, t), l;
1280
1368
  }
1281
1369
  return null;
@@ -1287,11 +1375,11 @@ class Bn {
1287
1375
  let t = [];
1288
1376
  if (this.skip_whitespace(), e && this.lexer.pos < this.selector_end) {
1289
1377
  const s = this.lexer.save_position();
1290
- if (this.lexer.next_token_fast(!1), this.lexer.token_type === de) {
1378
+ if (this.lexer.next_token_fast(!1), this.lexer.token_type === xe) {
1291
1379
  let n = this.source.charCodeAt(this.lexer.token_start);
1292
- if (n === lr || n === te || n === ht) {
1380
+ if (n === wr || n === se || n === ft) {
1293
1381
  let l = this.create_node_at(
1294
- at,
1382
+ ut,
1295
1383
  this.lexer.token_start,
1296
1384
  this.lexer.token_end,
1297
1385
  this.lexer.token_line,
@@ -1319,7 +1407,7 @@ class Bn {
1319
1407
  this.lexer.restore_position(n);
1320
1408
  break;
1321
1409
  }
1322
- if (this.lexer.next_token_fast(!1), this.lexer.token_type === qe || this.lexer.pos >= this.selector_end) {
1410
+ if (this.lexer.next_token_fast(!1), this.lexer.token_type === $e || this.lexer.pos >= this.selector_end) {
1323
1411
  this.lexer.restore_position(n);
1324
1412
  break;
1325
1413
  }
@@ -1341,7 +1429,7 @@ class Bn {
1341
1429
  let e = [];
1342
1430
  for (; this.lexer.pos < this.selector_end; ) {
1343
1431
  const t = this.lexer.save_position();
1344
- if (this.lexer.next_token_fast(!1), this.lexer.token_start >= this.selector_end || this.lexer.token_type === os) break;
1432
+ if (this.lexer.next_token_fast(!1), this.lexer.token_start >= this.selector_end || this.lexer.token_type === hs) break;
1345
1433
  let i = this.parse_simple_selector();
1346
1434
  if (i !== null)
1347
1435
  e.push(i);
@@ -1359,23 +1447,23 @@ class Bn {
1359
1447
  parse_simple_selector() {
1360
1448
  let e = this.lexer.token_type, t = this.lexer.token_start, s = this.lexer.token_end;
1361
1449
  switch (e) {
1362
- case le:
1450
+ case ae:
1363
1451
  return this.parse_type_or_namespace_selector(t, s);
1364
- case Fi:
1365
- return this.create_node(er, t, s);
1366
- case de:
1452
+ case Bi:
1453
+ return this.create_node(nr, t, s);
1454
+ case xe:
1367
1455
  let i = this.source.charCodeAt(t);
1368
- return i === nr ? this.parse_class_selector(t) : i === W ? this.parse_universal_or_namespace_selector(t, s) : i === In ? this.create_node(tr, t, s) : i === De ? this.parse_empty_namespace_selector(t) : null;
1369
- case ls:
1456
+ return i === kr ? this.parse_class_selector(t) : i === V ? this.parse_universal_or_namespace_selector(t, s) : i === Gn ? this.create_node(lr, t, s) : i === ze ? this.parse_empty_namespace_selector(t) : null;
1457
+ case as:
1370
1458
  return this.parse_attribute_selector(t);
1371
- case Ki:
1459
+ case Qi:
1372
1460
  return this.parse_pseudo(t);
1373
- case rt:
1461
+ case at:
1374
1462
  return this.parse_pseudo_function(t, s);
1375
- case qi:
1376
- return this.create_node(Ke, t, s);
1377
- case ns:
1378
- case qe:
1463
+ case Wi:
1464
+ return this.create_node(Ge, t, s);
1465
+ case os:
1466
+ case $e:
1379
1467
  return null;
1380
1468
  default:
1381
1469
  return null;
@@ -1387,10 +1475,10 @@ class Bn {
1387
1475
  const i = this.lexer.save_position();
1388
1476
  this.lexer.next_token_fast(!1);
1389
1477
  let n;
1390
- if (this.lexer.token_type === le)
1391
- n = hs;
1392
- else if (this.lexer.token_type === de && this.source.charCodeAt(this.lexer.token_start) === W)
1393
- n = cs;
1478
+ if (this.lexer.token_type === ae)
1479
+ n = us;
1480
+ else if (this.lexer.token_type === xe && this.source.charCodeAt(this.lexer.token_start) === V)
1481
+ n = fs;
1394
1482
  else
1395
1483
  return this.lexer.restore_position(i), null;
1396
1484
  let l = this.create_node(n, e, this.lexer.token_end);
@@ -1400,27 +1488,27 @@ class Bn {
1400
1488
  // Called when we've seen an IDENT token
1401
1489
  parse_type_or_namespace_selector(e, t) {
1402
1490
  const s = this.lexer.save_position();
1403
- if (this.skip_whitespace(), this.lexer.pos < this.selector_end && this.source.charCodeAt(this.lexer.pos) === De) {
1491
+ if (this.skip_whitespace(), this.lexer.pos < this.selector_end && this.source.charCodeAt(this.lexer.pos) === ze) {
1404
1492
  this.lexer.pos++;
1405
1493
  let i = this.parse_namespace_local_part(e, e, t - e);
1406
1494
  if (i !== null) return i;
1407
1495
  this.lexer.pos = t;
1408
1496
  } else
1409
1497
  this.lexer.restore_position(s);
1410
- return this.create_node(hs, e, t);
1498
+ return this.create_node(us, e, t);
1411
1499
  }
1412
1500
  // Parse universal selector or namespace selector (*|E or *|*)
1413
1501
  // Called when we've seen a * DELIM token
1414
1502
  parse_universal_or_namespace_selector(e, t) {
1415
1503
  const s = this.lexer.save_position();
1416
- if (this.skip_whitespace(), this.lexer.pos < this.selector_end && this.source.charCodeAt(this.lexer.pos) === De) {
1504
+ if (this.skip_whitespace(), this.lexer.pos < this.selector_end && this.source.charCodeAt(this.lexer.pos) === ze) {
1417
1505
  this.lexer.pos++;
1418
1506
  let i = this.parse_namespace_local_part(e, e, t - e);
1419
1507
  if (i !== null) return i;
1420
1508
  this.lexer.pos = t;
1421
1509
  } else
1422
1510
  this.lexer.restore_position(s);
1423
- return this.create_node(cs, e, t);
1511
+ return this.create_node(fs, e, t);
1424
1512
  }
1425
1513
  // Parse empty namespace selector (|E or |*)
1426
1514
  // Called when we've seen a | DELIM token at the start
@@ -1432,110 +1520,110 @@ class Bn {
1432
1520
  let e = this.lexer.pos, t = this.lexer.line, s = this.lexer.column, i = this.lexer.pos < this.selector_end;
1433
1521
  if (this.skip_whitespace(), i = i && this.lexer.pos > e, this.lexer.pos >= this.selector_end)
1434
1522
  return this.lexer.pos = e, this.lexer.line = t, this.lexer.column = s, null;
1435
- if (this.lexer.next_token_fast(!1), this.lexer.token_type === de) {
1523
+ if (this.lexer.next_token_fast(!1), this.lexer.token_type === xe) {
1436
1524
  let n = this.source.charCodeAt(this.lexer.token_start);
1437
- if (Dn(n))
1438
- return this.create_node_at(at, this.lexer.token_start, this.lexer.token_end, this.lexer.token_line, this.lexer.token_column);
1525
+ if (Yn(n))
1526
+ return this.create_node_at(ut, this.lexer.token_start, this.lexer.token_end, this.lexer.token_line, this.lexer.token_column);
1439
1527
  }
1440
- return i ? (this.lexer.pos = e, this.lexer.line = t, this.lexer.column = s, this.skip_whitespace(), this.create_node_at(at, e, this.lexer.pos, t, s)) : (this.lexer.pos = e, this.lexer.line = t, this.lexer.column = s, null);
1528
+ return i ? (this.lexer.pos = e, this.lexer.line = t, this.lexer.column = s, this.skip_whitespace(), this.create_node_at(ut, e, this.lexer.pos, t, s)) : (this.lexer.pos = e, this.lexer.line = t, this.lexer.column = s, null);
1441
1529
  }
1442
1530
  // Parse class selector (.classname)
1443
1531
  parse_class_selector(e) {
1444
1532
  const t = this.lexer.save_position();
1445
- return this.lexer.next_token_fast(!1), this.lexer.token_type !== le ? (this.lexer.restore_position(t), null) : this.create_node(Ji, e, this.lexer.token_end);
1533
+ return this.lexer.next_token_fast(!1), this.lexer.token_type !== ae ? (this.lexer.restore_position(t), null) : this.create_node(rr, e, this.lexer.token_end);
1446
1534
  }
1447
1535
  // Parse attribute selector ([attr], [attr=value], etc.)
1448
1536
  parse_attribute_selector(e) {
1449
1537
  let t = 1, s = this.lexer.token_end, i = e + 1, n = i;
1450
1538
  for (; this.lexer.pos < this.selector_end && t > 0; ) {
1451
1539
  this.lexer.next_token_fast(!1);
1452
- let o = this.lexer.token_type;
1453
- if (o === ls)
1540
+ let a = this.lexer.token_type;
1541
+ if (a === as)
1454
1542
  t++;
1455
- else if (o === Bi && (t--, t === 0)) {
1543
+ else if (a === Vi && (t--, t === 0)) {
1456
1544
  n = this.lexer.token_start, s = this.lexer.token_end;
1457
1545
  break;
1458
1546
  }
1459
1547
  }
1460
- let l = this.create_node(Be, e, s);
1548
+ let l = this.create_node(We, e, s);
1461
1549
  return this.parse_attribute_content(l, i, n), l;
1462
1550
  }
1463
1551
  // Parse attribute content to extract name, operator, and value
1464
1552
  parse_attribute_content(e, t, s) {
1465
- if (t = ye(this.source, t, s), s = zn(this.source, s, t), t >= s) return;
1466
- let i = t, n = t, l = -1, o = -1, h = -1;
1553
+ if (t = be(this.source, t, s), s = Xn(this.source, s, t), t >= s) return;
1554
+ let i = t, n = t, l = -1, a = -1, h = -1;
1467
1555
  for (; n < s; ) {
1468
- let k = this.source.charCodeAt(n);
1469
- if (se(k) || k === fe || k === ht || k === De || k === Ri || k === bi || k === W)
1556
+ let u = this.source.charCodeAt(n);
1557
+ if (ie(u) || u === de || u === ft || u === ze || u === Ni || u === Si || u === V)
1470
1558
  break;
1471
1559
  n++;
1472
1560
  }
1473
1561
  n > i && (this.arena.set_content_start_delta(e, i - this.arena.get_start_offset(e)), this.arena.set_content_length(e, n - i));
1474
- let c = ye(this.source, n, s);
1475
- if (c >= s) {
1476
- this.arena.set_attr_operator(e, Ci), this.arena.set_attr_flags(e, Pe);
1562
+ let o = be(this.source, n, s);
1563
+ if (o >= s) {
1564
+ this.arena.set_attr_operator(e, ps), this.arena.set_attr_flags(e, ye);
1477
1565
  return;
1478
1566
  }
1479
- let u = this.source.charCodeAt(c), f = c + 1 < s ? this.source.charCodeAt(c + 1) : 0;
1480
- if (u === fe)
1481
- l = c + 1, this.arena.set_attr_operator(e, wn);
1482
- else if (u === ht && f === fe)
1483
- l = c + 2, this.arena.set_attr_operator(e, An);
1484
- else if (u === De && f === fe)
1485
- l = c + 2, this.arena.set_attr_operator(e, yn);
1486
- else if (u === Ri && f === fe)
1487
- l = c + 2, this.arena.set_attr_operator(e, En);
1488
- else if (u === bi && f === fe)
1489
- l = c + 2, this.arena.set_attr_operator(e, Cn);
1490
- else if (u === W && f === fe)
1491
- l = c + 2, this.arena.set_attr_operator(e, bn);
1567
+ let _ = this.source.charCodeAt(o), p = o + 1 < s ? this.source.charCodeAt(o + 1) : 0;
1568
+ if (_ === de)
1569
+ l = o + 1, this.arena.set_attr_operator(e, _r);
1570
+ else if (_ === ft && p === de)
1571
+ l = o + 2, this.arena.set_attr_operator(e, ur);
1572
+ else if (_ === ze && p === de)
1573
+ l = o + 2, this.arena.set_attr_operator(e, fr);
1574
+ else if (_ === Ni && p === de)
1575
+ l = o + 2, this.arena.set_attr_operator(e, pr);
1576
+ else if (_ === Si && p === de)
1577
+ l = o + 2, this.arena.set_attr_operator(e, dr);
1578
+ else if (_ === V && p === de)
1579
+ l = o + 2, this.arena.set_attr_operator(e, gr);
1492
1580
  else {
1493
- this.arena.set_attr_operator(e, Ci), this.arena.set_attr_flags(e, Pe);
1581
+ this.arena.set_attr_operator(e, ps), this.arena.set_attr_flags(e, ye);
1494
1582
  return;
1495
1583
  }
1496
- if (c = ye(this.source, l, s), c >= s) {
1497
- this.arena.set_attr_flags(e, Pe);
1584
+ if (o = be(this.source, l, s), o >= s) {
1585
+ this.arena.set_attr_flags(e, ye);
1498
1586
  return;
1499
1587
  }
1500
- o = c;
1501
- let x = this.source.charCodeAt(c);
1502
- if (x === Ln || x === Hn) {
1503
- let k = x;
1504
- for (o = c, c++; c < s; ) {
1505
- let V = this.source.charCodeAt(c);
1506
- if (V === k) {
1507
- c++;
1588
+ a = o;
1589
+ let d = this.source.charCodeAt(o);
1590
+ if (d === $n || d === Bn) {
1591
+ let u = d;
1592
+ for (a = o, o++; o < s; ) {
1593
+ let N = this.source.charCodeAt(o);
1594
+ if (N === u) {
1595
+ o++;
1508
1596
  break;
1509
1597
  }
1510
- V === 92 ? c += 2 : c++;
1598
+ N === 92 ? o += 2 : o++;
1511
1599
  }
1512
- h = c;
1600
+ h = o;
1513
1601
  } else {
1514
- for (; c < s; ) {
1515
- let k = this.source.charCodeAt(c);
1516
- if (se(k))
1602
+ for (; o < s; ) {
1603
+ let u = this.source.charCodeAt(o);
1604
+ if (ie(u))
1517
1605
  break;
1518
- c++;
1606
+ o++;
1519
1607
  }
1520
- h = c;
1608
+ h = o;
1521
1609
  }
1522
- if (h > o && (this.arena.set_value_start_delta(e, o - this.arena.get_start_offset(e)), this.arena.set_value_length(e, h - o)), c = ye(this.source, h, s), c < s) {
1523
- let k = this.source.charCodeAt(c);
1524
- k === 105 || k === 73 ? this.arena.set_attr_flags(e, Rn) : k === 115 || k === 83 ? this.arena.set_attr_flags(e, vn) : this.arena.set_attr_flags(e, Pe);
1610
+ if (h > a && (this.arena.set_value_start_delta(e, a - this.arena.get_start_offset(e)), this.arena.set_value_length(e, h - a)), o = be(this.source, h, s), o < s) {
1611
+ let u = this.source.charCodeAt(o);
1612
+ u === 105 || u === 73 ? this.arena.set_attr_flags(e, xr) : u === 115 || u === 83 ? this.arena.set_attr_flags(e, mr) : this.arena.set_attr_flags(e, ye);
1525
1613
  } else
1526
- this.arena.set_attr_flags(e, Pe);
1614
+ this.arena.set_attr_flags(e, ye);
1527
1615
  }
1528
1616
  // Parse pseudo-class or pseudo-element (:hover, ::before)
1529
1617
  parse_pseudo(e) {
1530
1618
  const t = this.lexer.save_position(), s = this.lexer.save_position();
1531
1619
  this.skip_whitespace();
1532
1620
  let i = !1;
1533
- this.lexer.pos < this.selector_end && this.source.charCodeAt(this.lexer.pos) === Pn ? (i = !0, this.lexer.pos++) : this.lexer.restore_position(s), this.lexer.next_token_fast(!1);
1621
+ this.lexer.pos < this.selector_end && this.source.charCodeAt(this.lexer.pos) === Wn ? (i = !0, this.lexer.pos++) : this.lexer.restore_position(s), this.lexer.next_token_fast(!1);
1534
1622
  let n = this.lexer.token_type;
1535
- if (n === le) {
1536
- let l = this.create_node(i ? Ye : be, e, this.lexer.token_end);
1623
+ if (n === ae) {
1624
+ let l = this.create_node(i ? Qe : Te, e, this.lexer.token_end);
1537
1625
  return this.arena.set_content_start_delta(l, this.lexer.token_start - e), this.arena.set_content_length(l, this.lexer.token_end - this.lexer.token_start), l;
1538
- } else if (n === rt)
1626
+ } else if (n === at)
1539
1627
  return this.parse_pseudo_function_after_colon(e, i);
1540
1628
  return this.lexer.restore_position(t), null;
1541
1629
  }
@@ -1545,37 +1633,37 @@ class Bn {
1545
1633
  }
1546
1634
  // Parse pseudo-class function after we've seen the colon
1547
1635
  parse_pseudo_function_after_colon(e, t) {
1548
- let s = this.lexer.token_start, i = this.lexer.token_end - 1, n = this.lexer.pos, l = n, o = 1, h = this.lexer.token_end;
1549
- for (; this.lexer.pos < this.selector_end && o > 0; ) {
1636
+ let s = this.lexer.token_start, i = this.lexer.token_end - 1, n = this.lexer.pos, l = n, a = 1, h = this.lexer.token_end;
1637
+ for (; this.lexer.pos < this.selector_end && a > 0; ) {
1550
1638
  this.lexer.next_token_fast(!1);
1551
- let u = this.lexer.token_type;
1552
- if (u === $i || u === rt)
1553
- o++;
1554
- else if (u === Gi && (o--, o === 0)) {
1639
+ let _ = this.lexer.token_type;
1640
+ if (_ === ji || _ === at)
1641
+ a++;
1642
+ else if (_ === Xi && (a--, a === 0)) {
1555
1643
  l = this.lexer.token_start, h = this.lexer.token_end;
1556
1644
  break;
1557
1645
  }
1558
1646
  }
1559
- let c = this.create_node(t ? Ye : be, e, h);
1560
- if (this.arena.set_content_start_delta(c, s - e), this.arena.set_content_length(c, i - s), this.arena.set_flag(c, rr), l > n) {
1561
- let u = this.source.substring(s, i);
1562
- if (this.is_nth_pseudo(u)) {
1563
- let f = this.parse_nth_expression(n, l);
1564
- f !== null && this.arena.set_first_child(c, f);
1565
- } else if (Y("lang", u))
1566
- this.parse_lang_identifiers(n, l, c);
1647
+ let o = this.create_node(t ? Qe : Te, e, h);
1648
+ if (this.arena.set_content_start_delta(o, s - e), this.arena.set_content_length(o, i - s), this.arena.set_flag(o, cr), l > n) {
1649
+ let _ = this.source.substring(s, i);
1650
+ if (this.is_nth_pseudo(_)) {
1651
+ let p = this.parse_nth_expression(n, l);
1652
+ p !== null && this.arena.set_first_child(o, p);
1653
+ } else if (Q("lang", _))
1654
+ this.parse_lang_identifiers(n, l, o);
1567
1655
  else {
1568
- let f = this.selector_end;
1569
- const x = this.lexer.save_position();
1570
- let k = Y("has", u), V = this.parse_selector(n, l, this.lexer.line, this.lexer.column, k);
1571
- this.selector_end = f, this.lexer.restore_position(x), V !== null && this.arena.set_first_child(c, V);
1656
+ let p = this.selector_end;
1657
+ const d = this.lexer.save_position();
1658
+ let u = Q("has", _), N = this.parse_selector(n, l, this.lexer.line, this.lexer.column, u);
1659
+ this.selector_end = p, this.lexer.restore_position(d), N !== null && this.arena.set_first_child(o, N);
1572
1660
  }
1573
1661
  }
1574
- return c;
1662
+ return o;
1575
1663
  }
1576
1664
  // Check if pseudo-class name is an nth-* pseudo
1577
1665
  is_nth_pseudo(e) {
1578
- return Y("nth-child", e) || Y("nth-last-child", e) || Y("nth-of-type", e) || Y("nth-last-of-type", e) || Y("nth-col", e) || Y("nth-last-col", e);
1666
+ return Q("nth-child", e) || Q("nth-last-child", e) || Q("nth-of-type", e) || Q("nth-last-of-type", e) || Q("nth-col", e) || Q("nth-last-col", e);
1579
1667
  }
1580
1668
  // Parse :lang() content - comma-separated language identifiers
1581
1669
  // Accepts both quoted strings: :lang("en", "fr") and unquoted: :lang(en, fr)
@@ -1583,14 +1671,14 @@ class Bn {
1583
1671
  let i = this.selector_end;
1584
1672
  const n = this.lexer.save_position();
1585
1673
  this.lexer.pos = e, this.selector_end = t;
1586
- let l = null, o = null;
1674
+ let l = null, a = null;
1587
1675
  for (; this.lexer.pos < t; ) {
1588
1676
  this.lexer.next_token_fast(!1);
1589
- let h = this.lexer.token_type, c = this.lexer.token_start, u = this.lexer.token_end;
1590
- if (h !== ns && h !== qe) {
1591
- if (h === Mi || h === le) {
1592
- let f = this.create_node(sr, c, u);
1593
- l === null && (l = f), o !== null && this.arena.set_next_sibling(o, f), o = f;
1677
+ let h = this.lexer.token_type, o = this.lexer.token_start, _ = this.lexer.token_end;
1678
+ if (h !== os && h !== $e) {
1679
+ if (h === Gi || h === ae) {
1680
+ let p = this.create_node(or, o, _);
1681
+ l === null && (l = p), a !== null && this.arena.set_next_sibling(a, p), a = p;
1594
1682
  }
1595
1683
  if (this.lexer.pos >= t)
1596
1684
  break;
@@ -1603,26 +1691,26 @@ class Bn {
1603
1691
  parse_nth_expression(e, t) {
1604
1692
  let s = this.find_of_keyword(e, t);
1605
1693
  if (s !== -1) {
1606
- let n = new vi(this.arena, this.source).parse_anplusb(e, s, this.lexer.line), l = s + 2;
1607
- l = qn(this.source, l, t);
1608
- let o = this.selector_end;
1694
+ let n = new Li(this.arena, this.source).parse_anplusb(e, s, this.lexer.line), l = s + 2;
1695
+ l = jn(this.source, l, t);
1696
+ let a = this.selector_end;
1609
1697
  const h = this.lexer.save_position();
1610
1698
  this.selector_end = t, this.lexer.pos = l;
1611
- let c = this.parse_selector_list();
1612
- this.selector_end = o, this.lexer.restore_position(h);
1613
- let u = this.arena.create_node(re, e, t - e, this.lexer.line, 1);
1614
- return n !== null && c !== null ? (this.arena.set_first_child(u, n), this.arena.set_next_sibling(n, c)) : n !== null && this.arena.set_first_child(u, n), u;
1699
+ let o = this.parse_selector_list();
1700
+ this.selector_end = a, this.lexer.restore_position(h);
1701
+ let _ = this.arena.create_node(le, e, t - e, this.lexer.line, 1);
1702
+ return n !== null && o !== null ? (this.arena.set_first_child(_, n), this.arena.set_next_sibling(n, o)) : n !== null && this.arena.set_first_child(_, n), _;
1615
1703
  } else
1616
- return new vi(this.arena, this.source).parse_anplusb(e, t, this.lexer.line);
1704
+ return new Li(this.arena, this.source).parse_anplusb(e, t, this.lexer.line);
1617
1705
  }
1618
1706
  // Find the position of standalone "of" keyword (case-insensitive)
1619
1707
  find_of_keyword(e, t) {
1620
1708
  let s = e;
1621
- for (; s < t - 1 && (s = ye(this.source, s, t), !(s >= t - 1)); ) {
1709
+ for (; s < t - 1 && (s = be(this.source, s, t), !(s >= t - 1)); ) {
1622
1710
  let i = this.source.charCodeAt(s), n = this.source.charCodeAt(s + 1);
1623
1711
  if ((i === 111 || i === 79) && (n === 102 || n === 70)) {
1624
- let l = s === e || se(this.source.charCodeAt(s - 1)), o = s + 2 >= t || se(this.source.charCodeAt(s + 2));
1625
- if (l && o)
1712
+ let l = s === e || ie(this.source.charCodeAt(s - 1)), a = s + 2 >= t || ie(this.source.charCodeAt(s + 2));
1713
+ if (l && a)
1626
1714
  return s;
1627
1715
  }
1628
1716
  s++;
@@ -1641,13 +1729,13 @@ class Bn {
1641
1729
  skip_whitespace() {
1642
1730
  for (; this.lexer.pos < this.selector_end; ) {
1643
1731
  let e = this.source.charCodeAt(this.lexer.pos);
1644
- if (se(e)) {
1732
+ if (ie(e)) {
1645
1733
  this.lexer.advance();
1646
1734
  continue;
1647
1735
  }
1648
- if (e === Se && this.lexer.pos + 1 < this.selector_end && this.source.charCodeAt(this.lexer.pos + 1) === W) {
1736
+ if (e === Ue && this.lexer.pos + 1 < this.selector_end && this.source.charCodeAt(this.lexer.pos + 1) === V) {
1649
1737
  for (this.lexer.advance(2); this.lexer.pos < this.selector_end; ) {
1650
- if (this.source.charCodeAt(this.lexer.pos) === W && this.lexer.pos + 1 < this.selector_end && this.source.charCodeAt(this.lexer.pos + 1) === Se) {
1738
+ if (this.source.charCodeAt(this.lexer.pos) === V && this.lexer.pos + 1 < this.selector_end && this.source.charCodeAt(this.lexer.pos + 1) === Ue) {
1651
1739
  this.lexer.advance(2);
1652
1740
  break;
1653
1741
  }
@@ -1659,34 +1747,34 @@ class Bn {
1659
1747
  }
1660
1748
  }
1661
1749
  }
1662
- function $n(r) {
1663
- const e = new ct(ct.capacity_for_source(r.length)), s = new Bn(e, r).parse_selector(0, r.length);
1750
+ function sl(r) {
1751
+ const e = new dt(dt.capacity_for_source(r.length)), s = new tl(e, r).parse_selector(0, r.length);
1664
1752
  if (s === null) {
1665
- const i = e.create_node(dt, 0, 0, 1, 1);
1666
- return new We(e, r, i);
1753
+ const i = e.create_node(wt, 0, 0, 1, 1);
1754
+ return new Ve(e, r, i);
1667
1755
  }
1668
- return new We(e, r, s);
1756
+ return new Ve(e, r, s);
1669
1757
  }
1670
- function Gn(r, e) {
1758
+ function il(r, e) {
1671
1759
  return r[0] === e[0] ? r[1] === e[1] ? r[2] - e[2] : r[1] - e[1] : r[0] - e[0];
1672
1760
  }
1673
- function Ti(r) {
1674
- return r.sort(Gn).at(-1);
1761
+ function Ui(r) {
1762
+ return r.sort(il).at(-1);
1675
1763
  }
1676
- const _t = (r) => {
1677
- var n, l, o;
1764
+ const gt = (r) => {
1765
+ var n, l, a, h, o;
1678
1766
  let e = 0, t = 0, s = 0, i = r.first_child;
1679
1767
  for (; i; ) {
1680
1768
  switch (i.type) {
1681
- case pr:
1769
+ case Tr:
1682
1770
  e += 1;
1683
1771
  break;
1684
- case ps:
1685
- case fr:
1772
+ case xs:
1773
+ case vr:
1686
1774
  t += 1;
1687
1775
  break;
1688
- case Oe:
1689
- switch (i.name.toLowerCase()) {
1776
+ case Le:
1777
+ switch ((n = i.name) == null ? void 0 : n.toLowerCase()) {
1690
1778
  // "The specificity of a :where() pseudo-class is replaced by zero."
1691
1779
  case "where":
1692
1780
  break;
@@ -1701,10 +1789,10 @@ const _t = (r) => {
1701
1789
  case "not":
1702
1790
  case "has":
1703
1791
  if (i.has_children) {
1704
- const f = i.first_child;
1705
- if ((f == null ? void 0 : f.type) === ds) {
1706
- const x = Ti(Oi(f));
1707
- e += x[0], t += x[1], s += x[2];
1792
+ const u = i.first_child;
1793
+ if ((u == null ? void 0 : u.type) === ms) {
1794
+ const N = Ui(Ii(u));
1795
+ e += N[0], t += N[1], s += N[2];
1708
1796
  }
1709
1797
  }
1710
1798
  break;
@@ -1712,10 +1800,10 @@ const _t = (r) => {
1712
1800
  case "nth-child":
1713
1801
  case "nth-last-child":
1714
1802
  t += 1;
1715
- const c = i.first_child;
1716
- if ((c == null ? void 0 : c.type) === ur && c.selector) {
1717
- const f = Ti(Oi(c.selector));
1718
- e += f[0], t += f[1], s += f[2];
1803
+ const p = i.first_child;
1804
+ if ((p == null ? void 0 : p.type) === Rr && p.selector) {
1805
+ const u = Ui(Ii(p.selector));
1806
+ e += u[0], t += u[1], s += u[2];
1719
1807
  }
1720
1808
  break;
1721
1809
  // "The specificity of :host is that of a pseudo-class. The specificity of :host() is that of a pseudo-class, plus the specificity of its argument."
@@ -1723,14 +1811,14 @@ const _t = (r) => {
1723
1811
  case "host-context":
1724
1812
  case "host":
1725
1813
  t += 1;
1726
- const u = (n = i.first_child) == null ? void 0 : n.first_child;
1727
- if ((u == null ? void 0 : u.type) === ce) {
1728
- let f = u.first_child;
1729
- for (; f && f.type !== is; ) {
1730
- const x = _t({
1731
- first_child: f
1814
+ const d = (l = i.first_child) == null ? void 0 : l.first_child;
1815
+ if ((d == null ? void 0 : d.type) === me) {
1816
+ let u = d.first_child;
1817
+ for (; u && u.type !== rs; ) {
1818
+ const N = gt({
1819
+ first_child: u
1732
1820
  });
1733
- e += x[0] ?? 0, t += x[1] ?? 0, s += x[2] ?? 0, f = f.next_sibling;
1821
+ e += N[0] ?? 0, t += N[1] ?? 0, s += N[2] ?? 0, u = u.next_sibling;
1734
1822
  }
1735
1823
  }
1736
1824
  break;
@@ -1747,19 +1835,19 @@ const _t = (r) => {
1747
1835
  break;
1748
1836
  }
1749
1837
  break;
1750
- case us:
1751
- switch (i.name.toLowerCase()) {
1838
+ case pt:
1839
+ switch ((a = i.name) == null ? void 0 : a.toLowerCase()) {
1752
1840
  // "The specificity of ::slotted() is that of a pseudo-element, plus the specificity of its argument."
1753
1841
  case "slotted":
1754
1842
  s += 1;
1755
- const c = (l = i.first_child) == null ? void 0 : l.first_child;
1756
- if ((c == null ? void 0 : c.type) === ce) {
1757
- let u = c.first_child;
1758
- for (; u && u.type !== is; ) {
1759
- const f = _t({
1760
- first_child: u
1843
+ const p = (h = i.first_child) == null ? void 0 : h.first_child;
1844
+ if ((p == null ? void 0 : p.type) === me) {
1845
+ let d = p.first_child;
1846
+ for (; d && d.type !== rs; ) {
1847
+ const u = gt({
1848
+ first_child: d
1761
1849
  });
1762
- e += f[0] ?? 0, t += f[1] ?? 0, s += f[2] ?? 0, u = u.next_sibling;
1850
+ e += u[0] ?? 0, t += u[1] ?? 0, s += u[2] ?? 0, d = d.next_sibling;
1763
1851
  }
1764
1852
  }
1765
1853
  break;
@@ -1776,37 +1864,37 @@ const _t = (r) => {
1776
1864
  break;
1777
1865
  }
1778
1866
  break;
1779
- case fs:
1780
- let h = i.name ?? "";
1781
- h.includes("|") && (h = h.split("|")[1] ?? ""), h !== "*" && (s += 1);
1867
+ case gs:
1868
+ let _ = i.name ?? "";
1869
+ _.includes("|") && (_ = _.split("|")[1] ?? ""), _ !== "*" && (s += 1);
1782
1870
  break;
1783
1871
  }
1784
1872
  i = i.next_sibling;
1785
1873
  }
1786
1874
  return [e, t, s];
1787
- }, Yn = (r) => {
1875
+ }, rl = (r) => {
1788
1876
  if (typeof r == "string")
1789
1877
  try {
1790
- return $n(r);
1878
+ return sl(r);
1791
1879
  } catch (e) {
1792
1880
  const t = e instanceof Error ? e.message : String(e);
1793
1881
  throw new TypeError(`Could not convert passed in source '${r}' to SelectorList: ${t}`);
1794
1882
  }
1795
1883
  if (r instanceof Object) {
1796
- if (r.type === ds)
1884
+ if (r.type === ms)
1797
1885
  return r;
1798
1886
  throw new TypeError("Passed in source is an Object but no AST / AST of the type SelectorList");
1799
1887
  }
1800
1888
  throw new TypeError("Passed in source is not a String nor an Object. I don't know what to do with it.");
1801
- }, Oi = (r) => {
1889
+ }, Ii = (r) => {
1802
1890
  if (!r)
1803
1891
  return [];
1804
- const e = Yn(r), t = [];
1892
+ const e = rl(r), t = [];
1805
1893
  let s = e.first_child;
1806
1894
  for (; s; )
1807
- t.push(_t(s)), s = s.next_sibling;
1895
+ t.push(gt(s)), s = s.next_sibling;
1808
1896
  return t;
1809
- }, Wn = new $([
1897
+ }, nl = new B([
1810
1898
  // CSS Named Colors
1811
1899
  // Spec: https://drafts.csswg.org/css-color/#named-colors
1812
1900
  // Heuristic: popular names first for quick finding in set.has()
@@ -1959,7 +2047,7 @@ const _t = (r) => {
1959
2047
  "mediumorchid",
1960
2048
  "darksalmon",
1961
2049
  "mediumspringgreen"
1962
- ]), Qn = new $([
2050
+ ]), ll = new B([
1963
2051
  // CSS System Colors
1964
2052
  // Spec: https://drafts.csswg.org/css-color/#css-system-colors
1965
2053
  "accentcolor",
@@ -1981,7 +2069,7 @@ const _t = (r) => {
1981
2069
  "selecteditem",
1982
2070
  "selecteditemtext",
1983
2071
  "visitedtext"
1984
- ]), Vn = new $(["rgba", "rgb", "hsla", "hsl", "oklch", "color", "hwb", "lch", "lab", "oklab"]), jn = new $(["transparent", "currentcolor"]), ut = new $([
2072
+ ]), ol = new B(["rgba", "rgb", "hsla", "hsl", "oklch", "color", "hwb", "lch", "lab", "oklab"]), al = new B(["transparent", "currentcolor"]), xt = new B([
1985
2073
  "auto",
1986
2074
  "none",
1987
2075
  // for `text-shadow`, `box-shadow` and `background`
@@ -1991,13 +2079,13 @@ const _t = (r) => {
1991
2079
  "revert",
1992
2080
  "revert-layer"
1993
2081
  ]);
1994
- function Xn(r) {
2082
+ function hl(r) {
1995
2083
  for (let e of r.children)
1996
- if (!(e.type === _s && e.value === 0) && !(e.type === ft && e.value === 0))
2084
+ if (!(e.type === ds && e.value === 0) && !(e.type === mt && e.value === 0))
1997
2085
  return !1;
1998
2086
  return !0;
1999
2087
  }
2000
- const ts = new $(["caption", "icon", "menu", "message-box", "small-caption", "status-bar"]), Zn = new $([
2088
+ const ss = new B(["caption", "icon", "menu", "message-box", "small-caption", "status-bar"]), cl = new B([
2001
2089
  /* <absolute-size> values */
2002
2090
  "xx-small",
2003
2091
  "x-small",
@@ -2010,45 +2098,46 @@ const ts = new $(["caption", "icon", "menu", "message-box", "small-caption", "st
2010
2098
  /* <relative-size> values */
2011
2099
  "smaller",
2012
2100
  "larger"
2013
- ]), Jn = 44, Si = 47;
2014
- function el(r, e) {
2101
+ ]), _l = 44, Hi = 47;
2102
+ function ul(r, e) {
2103
+ var a;
2015
2104
  let t = [void 0, void 0], s, i;
2016
- if (r.first_child.type === gs && r.first_child.name.toLowerCase() === "var")
2105
+ if (r.first_child.type === ks && ((a = r.first_child.name) == null ? void 0 : a.toLowerCase()) === "var")
2017
2106
  return null;
2018
2107
  let n;
2019
- for (let o of r.children) {
2020
- let h = o.next_sibling;
2021
- if (o.type === he && ut.has(o.name) && e({
2108
+ for (let h of r.children) {
2109
+ let o = h.next_sibling;
2110
+ if (h.type === _e && xt.has(h.name) && e({
2022
2111
  type: "keyword",
2023
- value: o.name
2024
- }), h && h.type === Ee && h.text.charCodeAt(0) === Si) {
2025
- s = o.text, n = o;
2112
+ value: h.name
2113
+ }), o && o.type === Re && o.text.charCodeAt(0) === Hi) {
2114
+ s = h.text, n = h;
2026
2115
  continue;
2027
2116
  }
2028
- if ((n == null ? void 0 : n.type) === Ee && n.text.charCodeAt(0) === Si) {
2029
- i = o.text, n = o;
2117
+ if ((n == null ? void 0 : n.type) === Re && n.text.charCodeAt(0) === Hi) {
2118
+ i = h.text, n = h;
2030
2119
  continue;
2031
2120
  }
2032
- if ((h == null ? void 0 : h.type) === Ee && h.text.charCodeAt(0) === Jn && !t[0]) {
2033
- t[0] = o, !s && n && (s = n.text), n = o;
2121
+ if ((o == null ? void 0 : o.type) === Re && o.text.charCodeAt(0) === _l && !t[0]) {
2122
+ t[0] = h, !s && n && (s = n.text), n = h;
2034
2123
  continue;
2035
2124
  }
2036
- if (o.next_sibling === null) {
2037
- t[1] = o, !s && !t[0] && n && (s = n.text), n = o;
2125
+ if (h.next_sibling === null) {
2126
+ t[1] = h, !s && !t[0] && n && (s = n.text), n = h;
2038
2127
  continue;
2039
2128
  }
2040
- if (o.type === _s) {
2041
- n = o;
2129
+ if (h.type === ds) {
2130
+ n = h;
2042
2131
  continue;
2043
2132
  }
2044
- if (o.type === he) {
2045
- let c = o.name;
2046
- if (Zn.has(c)) {
2047
- s = c, n = o;
2133
+ if (h.type === _e) {
2134
+ let _ = h.name;
2135
+ if (_ && cl.has(_)) {
2136
+ s = _, n = h;
2048
2137
  continue;
2049
2138
  }
2050
2139
  }
2051
- n = o;
2140
+ n = h;
2052
2141
  }
2053
2142
  let l = t[0] || t[1] ? r.text.substring(
2054
2143
  ((t == null ? void 0 : t[0]) || (t == null ? void 0 : t[1]) || { start: r.start }).start - r.start,
@@ -2062,98 +2151,96 @@ function el(r, e) {
2062
2151
  font_family: l
2063
2152
  };
2064
2153
  }
2065
- const tl = new $(["linear", "ease", "ease-in", "ease-out", "ease-in-out", "step-start", "step-end"]), sl = new $(["cubic-bezier", "steps"]);
2066
- function il(r, e) {
2154
+ const fl = new B(["linear", "ease", "ease-in", "ease-out", "ease-in-out", "step-start", "step-end"]), pl = new B(["cubic-bezier", "steps"]);
2155
+ function dl(r, e) {
2067
2156
  let t = !1;
2068
2157
  for (let s of r) {
2069
2158
  let i = s.type, n = s.name;
2070
- i === Ee ? t = !1 : i === ft && t === !1 ? (t = !0, e({
2159
+ i === Re ? t = !1 : i === mt && t === !1 ? (t = !0, e({
2071
2160
  type: "duration",
2072
2161
  value: s
2073
- })) : i === he ? tl.has(n) ? e({
2162
+ })) : i === _e && n ? fl.has(n) ? e({
2074
2163
  type: "fn",
2075
2164
  value: s
2076
- }) : ut.has(n) && e({
2165
+ }) : xt.has(n) && e({
2077
2166
  type: "keyword",
2078
2167
  value: s
2079
- }) : i === gs && sl.has(n) && e({
2168
+ }) : i === ks && n && pl.has(n) && e({
2080
2169
  type: "fn",
2081
2170
  value: s
2082
2171
  });
2083
2172
  }
2084
2173
  }
2085
- function rl(r) {
2086
- let e = !1;
2087
- return B(r, function(t) {
2088
- if (t.is_vendor_prefixed)
2089
- return e = !0, Q;
2090
- }), e;
2174
+ function gl(r, e) {
2175
+ $(r, function(t) {
2176
+ t.is_vendor_prefixed && e(t.name || t.text);
2177
+ });
2091
2178
  }
2092
- var oe, Z, J, Re;
2093
- class p {
2179
+ var he, J, ee, Oe;
2180
+ class f {
2094
2181
  constructor(e = !1) {
2095
- G(this, oe);
2096
- G(this, Z);
2097
- G(this, J, []);
2098
- G(this, Re);
2099
- M(this, oe, /* @__PURE__ */ new Map()), M(this, Z, 0), e && M(this, J, []), M(this, Re, e);
2182
+ W(this, he);
2183
+ W(this, J);
2184
+ W(this, ee, []);
2185
+ W(this, Oe);
2186
+ M(this, he, /* @__PURE__ */ new Map()), M(this, J, 0), e && M(this, ee, []), M(this, Oe, e);
2100
2187
  }
2101
2188
  p(e, t) {
2102
- let s = w(this, Z);
2103
- if (w(this, Re)) {
2189
+ let s = w(this, J);
2190
+ if (w(this, Oe)) {
2104
2191
  let i = s * 4;
2105
- w(this, J)[i] = t.line, w(this, J)[i + 1] = t.column, w(this, J)[i + 2] = t.offset, w(this, J)[i + 3] = t.length;
2192
+ w(this, ee)[i] = t.line, w(this, ee)[i + 1] = t.column, w(this, ee)[i + 2] = t.offset, w(this, ee)[i + 3] = t.length;
2106
2193
  }
2107
- if (w(this, oe).has(e)) {
2108
- w(this, oe).get(e).push(s), Vt(this, Z)._++;
2194
+ if (w(this, he).has(e)) {
2195
+ w(this, he).get(e).push(s), jt(this, J)._++;
2109
2196
  return;
2110
2197
  }
2111
- w(this, oe).set(e, [s]), Vt(this, Z)._++;
2198
+ w(this, he).set(e, [s]), jt(this, J)._++;
2112
2199
  }
2113
2200
  size() {
2114
- return w(this, Z);
2201
+ return w(this, J);
2115
2202
  }
2116
2203
  c() {
2117
- let e = /* @__PURE__ */ new Map(), t = {}, s = w(this, Re), i = w(this, oe), n = w(this, J), l = i.size;
2118
- i.forEach((h, c) => {
2204
+ let e = /* @__PURE__ */ new Map(), t = {}, s = w(this, Oe), i = w(this, he), n = w(this, ee), l = i.size;
2205
+ i.forEach((h, o) => {
2119
2206
  if (s) {
2120
- let u = h.map(function(f) {
2121
- let x = f * 4;
2207
+ let _ = h.map(function(p) {
2208
+ let d = p * 4;
2122
2209
  return {
2123
- line: n[x],
2124
- column: n[x + 1],
2125
- offset: n[x + 2],
2126
- length: n[x + 3]
2210
+ line: n[d],
2211
+ column: n[d + 1],
2212
+ offset: n[d + 2],
2213
+ length: n[d + 3]
2127
2214
  };
2128
2215
  });
2129
- e.set(c, u);
2216
+ e.set(o, _);
2130
2217
  } else
2131
- t[c] = h.length;
2218
+ t[o] = h.length;
2132
2219
  });
2133
- let o = w(this, Z);
2220
+ let a = w(this, J);
2134
2221
  return s ? {
2135
- total: o,
2222
+ total: a,
2136
2223
  totalUnique: l,
2137
2224
  unique: t,
2138
- uniquenessRatio: o === 0 ? 0 : l / o,
2225
+ uniquenessRatio: a === 0 ? 0 : l / a,
2139
2226
  uniqueWithLocations: Object.fromEntries(e)
2140
2227
  } : {
2141
- total: o,
2228
+ total: a,
2142
2229
  totalUnique: l,
2143
2230
  unique: t,
2144
- uniquenessRatio: o === 0 ? 0 : l / o,
2231
+ uniquenessRatio: a === 0 ? 0 : l / a,
2145
2232
  uniqueWithLocations: void 0
2146
2233
  };
2147
2234
  }
2148
2235
  }
2149
- oe = new WeakMap(), Z = new WeakMap(), J = new WeakMap(), Re = new WeakMap();
2150
- var ve, ae, Qe;
2151
- class ss {
2236
+ he = new WeakMap(), J = new WeakMap(), ee = new WeakMap(), Oe = new WeakMap();
2237
+ var Se, ce, je;
2238
+ class is {
2152
2239
  constructor(e) {
2153
- G(this, ve);
2154
- G(this, ae);
2155
- G(this, Qe);
2156
- M(this, ve, new p(e)), M(this, ae, /* @__PURE__ */ new Map()), M(this, Qe, e);
2240
+ W(this, Se);
2241
+ W(this, ce);
2242
+ W(this, je);
2243
+ M(this, Se, new f(e)), M(this, ce, /* @__PURE__ */ new Map()), M(this, je, e);
2157
2244
  }
2158
2245
  /**
2159
2246
  * Add an item to this #list's context
@@ -2162,45 +2249,45 @@ class ss {
2162
2249
  * @param node_location
2163
2250
  */
2164
2251
  push(e, t, s) {
2165
- w(this, ve).p(e, s), w(this, ae).has(t) || w(this, ae).set(t, new p(w(this, Qe))), w(this, ae).get(t).p(e, s);
2252
+ w(this, Se).p(e, s), w(this, ce).has(t) || w(this, ce).set(t, new f(w(this, je))), w(this, ce).get(t).p(e, s);
2166
2253
  }
2167
2254
  count() {
2168
2255
  let e = /* @__PURE__ */ new Map();
2169
- for (let [t, s] of w(this, ae).entries())
2256
+ for (let [t, s] of w(this, ce).entries())
2170
2257
  e.set(t, s.c());
2171
- return Object.assign(w(this, ve).c(), {
2258
+ return Object.assign(w(this, Se).c(), {
2172
2259
  itemsPerContext: Object.fromEntries(e)
2173
2260
  });
2174
2261
  }
2175
2262
  }
2176
- ve = new WeakMap(), ae = new WeakMap(), Qe = new WeakMap();
2177
- function nl(r) {
2263
+ Se = new WeakMap(), ce = new WeakMap(), je = new WeakMap();
2264
+ function xl(r) {
2178
2265
  let e = /* @__PURE__ */ new Map(), t = -1, s = 0, i = 0, n = r.length;
2179
2266
  for (let l = 0; l < n; l++) {
2180
- let o = r[l], h = (e.get(o) || 0) + 1;
2181
- e.set(o, h), h > t && (t = h, s = 0, i = 0), h >= t && (s++, i += o);
2267
+ let a = r[l], h = (e.get(a) || 0) + 1;
2268
+ e.set(a, h), h > t && (t = h, s = 0, i = 0), h >= t && (s++, i += a);
2182
2269
  }
2183
2270
  return i / s;
2184
2271
  }
2185
- var ee, Te;
2186
- class L {
2272
+ var te, Ne;
2273
+ class U {
2187
2274
  constructor() {
2188
- G(this, ee);
2189
- G(this, Te);
2190
- M(this, ee, []), M(this, Te, 0);
2275
+ W(this, te);
2276
+ W(this, Ne);
2277
+ M(this, te, []), M(this, Ne, 0);
2191
2278
  }
2192
2279
  /**
2193
2280
  * Add a new Integer at the end of this AggregateCollection
2194
2281
  * @param item - The item to add
2195
2282
  */
2196
2283
  push(e) {
2197
- w(this, ee).push(e), M(this, Te, w(this, Te) + e);
2284
+ w(this, te).push(e), M(this, Ne, w(this, Ne) + e);
2198
2285
  }
2199
2286
  size() {
2200
- return w(this, ee).length;
2287
+ return w(this, te).length;
2201
2288
  }
2202
2289
  aggregate() {
2203
- let e = w(this, ee).length;
2290
+ let e = w(this, te).length;
2204
2291
  if (e === 0)
2205
2292
  return {
2206
2293
  min: 0,
@@ -2210,7 +2297,7 @@ class L {
2210
2297
  range: 0,
2211
2298
  sum: 0
2212
2299
  };
2213
- let t = w(this, ee).slice().sort((o, h) => o - h), s = t[0], i = t[e - 1], n = nl(t), l = w(this, Te);
2300
+ let t = w(this, te).slice().sort((a, h) => a - h), s = t[0], i = t[e - 1], n = xl(t), l = w(this, Ne);
2214
2301
  return {
2215
2302
  min: s,
2216
2303
  max: i,
@@ -2221,59 +2308,46 @@ class L {
2221
2308
  };
2222
2309
  }
2223
2310
  toArray() {
2224
- return w(this, ee);
2311
+ return w(this, te);
2225
2312
  }
2226
2313
  }
2227
- ee = new WeakMap(), Te = new WeakMap();
2228
- function ll(r) {
2229
- return r.replaceAll(/(?:^['"])|(?:['"]$)/g, "");
2230
- }
2231
- function ol(r, e) {
2232
- return e >= 65 && e <= 90 && (e = e | 32), r === e;
2233
- }
2234
- function Ge(r, e) {
2235
- if (r === e) return !0;
2236
- let t = e.length, s = t - r.length;
2237
- if (s < 0)
2238
- return !1;
2239
- for (let i = t - 1; i >= s; i--)
2240
- if (ol(r.charCodeAt(i - s), e.charCodeAt(i)) === !1)
2241
- return !1;
2242
- return !0;
2243
- }
2244
- function fl(r) {
2245
- if (xs(r) || ms(r)) return !1;
2246
- let e = r.charCodeAt(0);
2247
- return e === 47 || // /
2248
- e === 42 || // *
2249
- e === 95 || // _
2250
- e === 43 || // +
2251
- e === 38 || // &
2252
- e === 36 || // $
2253
- e === 35;
2254
- }
2255
- function m(r, e) {
2256
- return xs(e) ? !1 : Ge(r, e);
2257
- }
2258
- function al(r) {
2259
- return ms(r) ? r.slice(r.indexOf("-", 2) + 1) : r;
2260
- }
2261
- function hl(r) {
2314
+ te = new WeakMap(), Ne = new WeakMap();
2315
+ function ml(r) {
2262
2316
  let e = 5, t = r.indexOf(";"), s = r.indexOf(",");
2263
2317
  return t === -1 || s !== -1 && s < t ? r.substring(e, s) : r.substring(e, t);
2264
2318
  }
2265
- function Ni(r) {
2319
+ function Pi(r) {
2266
2320
  let e = r.children;
2267
2321
  if (e) {
2268
2322
  let t = e.at(-1);
2269
- return !!(t && t.type === he && Ge("\\9", t.text));
2323
+ return !!(t && t.type === _e && ns("\\9", t.text));
2270
2324
  }
2271
2325
  return !1;
2272
2326
  }
2273
- function pl(r) {
2274
- return ms(r);
2275
- }
2276
- let cl = new $([
2327
+ const kl = /* @__PURE__ */ new Set([
2328
+ "margin",
2329
+ "margin-block",
2330
+ "margin-inline",
2331
+ "margin-top",
2332
+ "margin-block-start",
2333
+ "margin-block-end",
2334
+ "margin-inline-end",
2335
+ "margin-inline-end",
2336
+ "margin-right",
2337
+ "margin-bottom",
2338
+ "margin-left",
2339
+ "padding",
2340
+ "padding-block",
2341
+ "padding-inline",
2342
+ "padding-top",
2343
+ "padding-right",
2344
+ "padding-bottom",
2345
+ "padding-left",
2346
+ "padding-block-start",
2347
+ "padding-block-end",
2348
+ "padding-inline-start",
2349
+ "padding-inline-end"
2350
+ ]), wl = new B([
2277
2351
  "border-radius",
2278
2352
  "border-top-left-radius",
2279
2353
  "border-top-right-radius",
@@ -2284,464 +2358,496 @@ let cl = new $([
2284
2358
  "border-end-end-radius",
2285
2359
  "border-end-start-radius"
2286
2360
  ]);
2287
- function H(r, e) {
2361
+ function Al(r) {
2362
+ if (ws(r) || As(r)) return !1;
2363
+ let e = r.charCodeAt(0);
2364
+ return e === 47 || // /
2365
+ e === 42 || // *
2366
+ e === 95 || // _
2367
+ e === 43 || // +
2368
+ e === 38 || // &
2369
+ e === 36 || // $
2370
+ e === 35;
2371
+ }
2372
+ function Di(r) {
2373
+ return ws(r) ? r : As(r) ? r.slice(r.indexOf("-", 2) + 1).toLowerCase() : Al(r) ? r.slice(1).toLowerCase() : r.toLowerCase();
2374
+ }
2375
+ function yl(r) {
2376
+ return As(r);
2377
+ }
2378
+ function I(r, e) {
2288
2379
  return e === 0 ? 0 : r / e;
2289
2380
  }
2290
- function dl(r, e = {}) {
2291
- return e.useLocations === !0 ? Ui(r, e, !0) : Ui(r, e, !1);
2381
+ function bl(r, e = {}) {
2382
+ return e.useLocations === !0 ? Fi(r, e, !0) : Fi(r, e, !1);
2292
2383
  }
2293
- function Ui(r, e, t) {
2294
- let s = Date.now(), i = (r.match(/\n/g) || []).length + 1, n = 0, l = 0, o = 0, h = {
2384
+ function Fi(r, e, t) {
2385
+ let s = Date.now(), i = (r.match(/\n/g) || []).length + 1, n = 0, l = 0, a = 0, h = {
2295
2386
  total: 0,
2296
2387
  unique: /* @__PURE__ */ new Map()
2297
- }, c = Date.now(), u = dr(r, {
2298
- on_comment({ length: a }) {
2299
- n++, l += a;
2388
+ }, o = Date.now(), _ = Or(r, {
2389
+ on_comment({ length: c }) {
2390
+ n++, l += c;
2300
2391
  }
2301
- }), f = Date.now(), x = new p(t), k = new L(), V = [], ws = new p(t), Ve = new p(t), As = new p(t), ys = new p(t), Es = new p(t), Cs = new p(t), bs = new p(t), gt = new p(t), Rs = new p(t), xt = new p(t), mt = new p(t), vs = new p(t), je = new p(t), Ts = new p(t), kt = new L(), Os = new p(t), wt = 0, At = 0, yt = new L(), Et = new L(), Ct = new L(), Ss = new p(t), Ns = new p(t), Us = new p(t), bt = new L(), Ls = new p(t), Rt = new p(t), Hs = /* @__PURE__ */ new Set(), vt = new p(t), _e, ue, Is = new L(), Ps = new L(), Ds = new L(), Fs = new p(t), Xe = new L(), Ms = new p(t), qs = [], Tt = new p(t), Ot = new p(t), zs = new p(t), Ks = new p(t), St = new L(), Bs = new p(t), $s = /* @__PURE__ */ new Set(), Ne = 0, Gs = new L(), Ze = 0, Nt = 0, Ut = new p(t), Lt = new L(), Ys = new p(t), Ue = new p(t), Ht = new p(t), It = new p(t), Je = new p(t), Le = new L(), Pt = new L(), Ws = new p(t), Dt = new p(t), Qs = new p(t), Vs = new p(t), js = new p(t), Ft = new p(t), Mt = new p(t), qt = new p(t), zt = new p(t), Kt = new p(t), xe = new ss(t), me = new p(t), Xs = new ss(t), Zs = new p(t), He = new p(t), Js = new ss(t), ei = new p(t);
2302
- function A(a) {
2392
+ }), p = Date.now(), d = new f(t), u = new U(), N = [], ys = new f(t), Xe = new f(t), bs = new f(t), Rs = new f(t), vs = new f(t), Ts = new f(t), Os = new f(t), At = new f(t), Ss = new f(t), Et = new f(t), Ct = new f(t), Ns = new f(t), Ze = new f(t), Ls = new f(t), yt = new U(), Us = new f(t), bt = 0, Rt = 0, vt = new U(), Tt = new U(), Ot = new U(), Is = new f(t), Hs = new f(t), Ps = new f(t), St = new U(), Ds = new f(t), Nt = new f(t), Fs = /* @__PURE__ */ new Set(), Lt = new f(t), ue, fe, Ms = new U(), zs = new U(), qs = new U(), Ks = new f(t), Je = new U(), $s = new f(t), Bs = [], Ut = new f(t), It = new f(t), Gs = new f(t), Ws = new f(t), Ht = new U(), Ys = new f(t), Qs = /* @__PURE__ */ new Set(), Ie = 0, Vs = new U(), et = 0, Pt = 0, Dt = new f(t), Ft = new U(), js = new f(t), He = new f(t), Mt = new f(t), zt = new f(t), tt = new f(t), Pe = new U(), qt = new U(), Xs = new f(t), Kt = new f(t), Zs = new f(t), Js = new f(t), ei = new f(t), $t = new f(t), st = new f(t), it = new f(t), Bt = new f(t), rt = new f(t), we = new is(t), Ae = new f(t), ti = new is(t), si = new f(t), De = new f(t), ii = new is(t), ri = new f(t);
2393
+ function A(c) {
2303
2394
  return {
2304
- line: a.line,
2305
- column: a.column,
2306
- offset: a.start,
2307
- length: a.length
2395
+ line: c.line,
2396
+ column: c.column,
2397
+ offset: c.start,
2398
+ length: c.length
2308
2399
  };
2309
2400
  }
2310
- let ke = -1;
2311
- B(u, (a, D) => {
2312
- var ci, _i, ui, fi;
2313
- ke >= 0 && D <= ke && (ke = -1);
2314
- let Wt = ke >= 0 && D > ke;
2315
- if (a.type === gr) {
2316
- let N = A(a);
2317
- if (kt.push(D), Os.p(D, N), x.p(a.name, N), P("font-face", a.name)) {
2318
- let E = /* @__PURE__ */ Object.create(null);
2319
- t && ws.p(a.start, A(a));
2320
- let R = a.children.find((d) => d.type === xr);
2321
- for (let d of (R == null ? void 0 : R.children) || [])
2322
- d.type === jt && d.value && (E[d.property] = d.value.text);
2323
- k.push(1), V.push(E);
2401
+ let Ee = -1;
2402
+ $(_, (c, D) => {
2403
+ var pi, di, gi, xi, mi;
2404
+ Ee >= 0 && D <= Ee && (Ee = -1);
2405
+ let Vt = Ee >= 0 && D > Ee;
2406
+ if (c.type === Sr) {
2407
+ let v = A(c);
2408
+ yt.push(D), Us.p(D, v);
2409
+ let y = Di(c.name ?? "");
2410
+ if (d.p(y, v), y === "font-face") {
2411
+ let k = /* @__PURE__ */ Object.create(null);
2412
+ t && ys.p(c.start, A(c));
2413
+ let g = c.children.find((E) => E.type === Nr);
2414
+ for (let E of (g == null ? void 0 : g.children) || [])
2415
+ E.type === Xt && E.value && (k[E.property] = E.value.text);
2416
+ u.push(1), N.push(k);
2324
2417
  }
2325
- if (a.prelude === null || a.prelude === void 0)
2326
- P("layer", a.name) && (Ve.p("<anonymous>", A(a)), k.push(2));
2418
+ if (c.prelude === null || c.prelude === void 0)
2419
+ y === "layer" && (Xe.p("<anonymous>", A(c)), u.push(2));
2327
2420
  else {
2328
- let { name: E } = a, R = 1;
2329
- if (P("media", E))
2330
- ys.p(a.prelude.text, A(a)), br(a.prelude) && (Es.p(a.prelude.text, A(a)), R++);
2331
- else if (P("supports", E))
2332
- gt.p(a.prelude.text, A(a)), Cr(a.prelude) && (Rs.p(a.prelude.text, A(a)), R++);
2333
- else if (Ge("keyframes", E)) {
2334
- let d = `@${E} ${a.prelude.text}`;
2335
- xt.p(d, A(a)), a.is_vendor_prefixed && (mt.p(d, A(a)), R++), ke = D;
2336
- } else if (P("layer", E))
2337
- for (let d of a.prelude.text.split(",").map((_) => _.trim()))
2338
- Ve.p(d, A(a));
2339
- else if (P("import", E)) {
2340
- if (As.p(a.prelude.text, A(a)), a.prelude.has_children)
2341
- for (let d of a.prelude)
2342
- d.type === Hi && typeof d.value == "string" ? gt.p(d.value, A(d)) : d.type === mr && typeof d.value == "string" && Ve.p(d.value, A(d));
2343
- } else P("container", E) ? (vs.p(a.prelude.text, A(a)), ((ci = a.prelude.first_child) == null ? void 0 : ci.type) === kr && ((_i = a.prelude.first_child.first_child) == null ? void 0 : _i.type) === he && je.p(a.prelude.first_child.first_child.text, A(a))) : P("property", E) ? Ts.p(a.prelude.text, A(a)) : P("charset", E) && bs.p(a.prelude.text, A(a));
2344
- k.push(R);
2421
+ let k = 1;
2422
+ if (y === "media")
2423
+ Rs.p(c.prelude.text, A(c)), Fr(c.prelude, (g) => {
2424
+ vs.p(g, A(c)), k++;
2425
+ });
2426
+ else if (y === "supports")
2427
+ At.p(c.prelude.text, A(c)), Dr(c.prelude, (g) => {
2428
+ Ss.p(g, A(c)), k++;
2429
+ });
2430
+ else if (y.endsWith("keyframes")) {
2431
+ let g = c.prelude.text;
2432
+ Et.p(g, A(c)), c.is_vendor_prefixed && (Ct.p(`@${(pi = c.name) == null ? void 0 : pi.toLowerCase()} ${c.prelude.text}`, A(c)), k++), Ee = D;
2433
+ } else if (y === "layer")
2434
+ for (let g of c.prelude.text.split(",").map((E) => E.trim()))
2435
+ Xe.p(g, A(c));
2436
+ else if (y === "import") {
2437
+ if (bs.p(c.prelude.text, A(c)), c.prelude.has_children)
2438
+ for (let g of c.prelude)
2439
+ g.type === zi && typeof g.value == "string" ? At.p(g.value, A(g)) : g.type === Lr && typeof g.value == "string" && Xe.p(g.value, A(g));
2440
+ } else y === "container" ? (Ns.p(c.prelude.text, A(c)), ((di = c.prelude.first_child) == null ? void 0 : di.type) === Ur && ((gi = c.prelude.first_child.first_child) == null ? void 0 : gi.type) === _e && Ze.p(c.prelude.first_child.first_child.text, A(c))) : y === "property" ? Ls.p(c.prelude.text, A(c)) : y === "charset" && Os.p(c.prelude.text.toLowerCase(), A(c));
2441
+ u.push(k);
2345
2442
  }
2346
- } else if (a.type === wr)
2347
- if (Wt && a.prelude)
2348
- a.prelude.type === ds && a.prelude.text && Rt.p(a.prelude.text, A(a.prelude));
2349
- else {
2350
- wt++, (ui = a.block) != null && ui.is_empty && At++;
2351
- let N = 0, E = 0, R = A(a);
2352
- if (a.prelude)
2353
- for (const d of a.prelude.children)
2354
- d.type === ce && N++;
2355
- if (a.block)
2356
- for (const d of a.block.children)
2357
- d.type === jt && E++;
2358
- yt.push(N + E), Ss.p(N + E, R), Et.push(N), Ns.p(N, R), Ct.push(E), Us.p(E, R), bt.push(D), Ls.p(D, R);
2443
+ } else if (c.type === Ir)
2444
+ if (Vt && c.prelude) {
2445
+ if (c.prelude.type === ms && c.prelude.children.length > 0)
2446
+ for (let v of c.prelude.children)
2447
+ Nt.p(v.text, A(v));
2448
+ } else {
2449
+ bt++, (xi = c.block) != null && xi.is_empty && Rt++;
2450
+ let v = 0, y = 0, k = A(c);
2451
+ if (c.prelude)
2452
+ for (const g of c.prelude.children)
2453
+ g.type === me && v++;
2454
+ if (c.block)
2455
+ for (const g of c.block.children)
2456
+ g.type === Xt && y++;
2457
+ vt.push(v + y), Is.p(v + y, k), Tt.push(v), Hs.p(v, k), Ot.push(y), Ps.p(y, k), St.push(D), Ds.p(D, k);
2359
2458
  }
2360
- else if (a.type === ce) {
2361
- if (Wt)
2362
- return I;
2363
- let N = A(a);
2364
- St.push(D > 0 ? D - 1 : 0), Bs.p(D > 0 ? D - 1 : 0, N), Hs.add(a.text);
2365
- let E = rs(a);
2366
- Xe.push(E), Ms.p(E, N), Rr(a) && vt.p(a.text, N), Di(a) && Ot.p(a.text, N);
2367
- let R = vr(a);
2368
- if (R !== !1)
2369
- for (let j of R)
2370
- zs.p(j, N);
2371
- Tr(a, function(T) {
2372
- let U = T.name.trim() === "" ? " " : T.name;
2373
- Ks.p(U, T.loc);
2459
+ else if (c.type === me) {
2460
+ if (Vt)
2461
+ return H;
2462
+ let v = A(c);
2463
+ Ht.push(D > 0 ? D - 1 : 0), Ys.p(D > 0 ? D - 1 : 0, v), Fs.add(c.text);
2464
+ let y = ls(c);
2465
+ Je.push(y), $s.p(y, v), qr(c, (re) => {
2466
+ Lt.p(re.toLowerCase(), v);
2467
+ }), Kr(c, (re) => {
2468
+ It.p(re, v);
2469
+ }), $r(c, (re) => {
2470
+ Gs.p(re.toLowerCase(), v);
2471
+ }), Br(c, function(G) {
2472
+ let T = G.name.trim() === "" ? " " : G.name;
2473
+ Ws.p(T, G.loc);
2374
2474
  });
2375
- let d = _t(a), [_, z, Qt] = d;
2376
- return Fs.p(d.toString(), N), Is.push(_), Ps.push(z), Ds.push(Qt), _e === void 0 && (_e = d), ue === void 0 && (ue = d), ue !== void 0 && Li(ue, d) < 0 && (ue = d), _e !== void 0 && Li(_e, d) > 0 && (_e = d), qs.push(d), _ > 0 && Tt.p(a.text, N), I;
2377
- } else if (a.type === jt) {
2378
- Ne++, $s.add(a.text);
2379
- let N = A(a), E = D > 0 ? D - 1 : 0;
2380
- Lt.push(E), Ys.p(E, N);
2381
- let R = 1;
2382
- if (a.is_important) {
2383
- R++;
2384
- let T = a.text;
2385
- if (!T.toLowerCase().includes("!important")) {
2386
- let U = a.value.text, v = T.indexOf(U), Ae = T.slice(-1) === ";";
2387
- Dt.p(`${T.slice(v, Ae ? -1 : void 0)}`, A(a.value));
2388
- }
2389
- Wt && (Nt++, R++);
2390
- }
2391
- Gs.push(R);
2392
- let { is_important: d, property: _, is_browserhack: z, is_vendor_prefixed: Qt } = a, j = A(a);
2393
- j.length = _.length, Ue.p(_, j), d && Ze++, Qt ? (Le.push(2), It.p(_, j)) : xs(_) ? (Je.p(_, j), Le.push(d ? 3 : 2), d && Ut.p(_, j)) : z ? (Ht.p(_, j), Le.push(2)) : Le.push(1);
2475
+ let k = gt(c), [g, E, K] = k;
2476
+ return Ks.p(k.toString(), v), Ms.push(g), zs.push(E), qs.push(K), ue === void 0 && (ue = k), fe === void 0 && (fe = k), fe !== void 0 && Mi(fe, k) < 0 && (fe = k), ue !== void 0 && Mi(ue, k) > 0 && (ue = k), Bs.push(k), g > 0 && Ut.p(c.text, v), H;
2477
+ } else if (c.type === Xt) {
2478
+ Ie++, Qs.add(c.text);
2479
+ let v = A(c), y = D > 0 ? D - 1 : 0;
2480
+ Ft.push(y), js.p(y, v);
2481
+ let k = 1;
2482
+ c.is_important && (k++, c.text.toLowerCase().includes("!important") || Kt.p("!ie", A(c.value)), Vt && (Pt++, k++)), Vs.push(k);
2483
+ let { is_important: g, property: E, is_browserhack: K, is_vendor_prefixed: re } = c;
2484
+ if (!E) return;
2485
+ let G = A(c);
2486
+ G.length = E.length;
2487
+ let T = Di(E);
2488
+ He.p(T, G), g && et++, re ? (Pe.push(2), zt.p(E, G)) : ws(E) ? (tt.p(E, G), Pe.push(g ? 3 : 2), g && Dt.p(E, G)) : K ? (Mt.p(E.charAt(0), G), Pe.push(2)) : Pe.push(1);
2394
2489
  {
2395
- let T = a.value, { text: U } = T, v = A(T), Ae = 1;
2396
- if (ut.has(U)) {
2397
- He.p(U, v), Pt.push(Ae);
2490
+ let P = c.value, { text: L } = P, R = A(P), nt = 1;
2491
+ if (xt.has(L)) {
2492
+ De.p(L.toLowerCase(), R), qt.push(nt);
2398
2493
  return;
2399
2494
  }
2400
- if (rl(T) && (Ws.p(T.text, v), Ae++), Ni(T) && (Dt.p(U, v), U = U.slice(0, -2), Ae++), Pt.push(Ae), m("margin", _) || m("margin-block", _) || m("margin-inline", _) || m("margin-top", _) || m("margin-right", _) || m("margin-bottom", _) || m("margin-left", _) || m("padding", _) || m("padding-block", _) || m("padding-inline", _) || m("padding-top", _) || m("padding-right", _) || m("padding-bottom", _) || m("padding-left", _))
2401
- Xn(T) && ei.p(_, v);
2495
+ if (gl(P, (x) => {
2496
+ Xs.p(x.toLowerCase(), R), nt++;
2497
+ }), Pi(P) && (Kt.p("\\9", R), L = L.slice(0, -2), nt++), qt.push(nt), kl.has(T))
2498
+ hl(P) && ri.p(T, R);
2402
2499
  else {
2403
- if (m("z-index", _))
2404
- return Qs.p(U, v), I;
2405
- if (m("font", _)) {
2406
- if (!ts.has(U)) {
2407
- let C = el(T, function(Ie) {
2408
- Ie.type === "keyword" && He.p(Ie.value, v);
2500
+ if (T === "z-index")
2501
+ return Zs.p(L, R), H;
2502
+ if (T === "font") {
2503
+ if (!ss.has(L)) {
2504
+ let x = ul(P, function(X) {
2505
+ X.type === "keyword" && De.p(X.value.toLowerCase(), R);
2409
2506
  });
2410
- if (!C)
2411
- return I;
2412
- let { font_size: O, line_height: S, font_family: X } = C;
2413
- X && Ft.p(X, v), O && Mt.p(O, v), S && qt.p(S, v);
2507
+ if (!x)
2508
+ return H;
2509
+ let { font_size: j, line_height: S, font_family: O } = x;
2510
+ O && $t.p(O, R), j && st.p(j.toLowerCase(), R), S && it.p(S.toLowerCase(), R);
2511
+ }
2512
+ } else if (T === "font-size") {
2513
+ if (!ss.has(L)) {
2514
+ let x = L.toLowerCase();
2515
+ x.includes("var(") ? st.p(L, R) : st.p(x, R);
2414
2516
  }
2415
- } else if (m("font-size", _))
2416
- ts.has(U) || Mt.p(U, v);
2417
- else {
2418
- if (m("font-family", _))
2419
- return ts.has(U) || Ft.p(U, v), I;
2420
- if (m("line-height", _))
2421
- qt.p(U, v);
2422
- else {
2423
- if (m("transition", _) || m("animation", _))
2424
- return il(T.children, function(C) {
2425
- C.type === "fn" ? zt.p(C.value.text, v) : C.type === "duration" ? Kt.p(C.value.text, v) : C.type === "keyword" && He.p(C.value.text, v);
2426
- }), I;
2427
- if (m("animation-duration", _) || m("transition-duration", _))
2428
- for (let C of T.children)
2429
- C.type !== Ee && Kt.p(C.text, v);
2430
- else if (m("transition-timing-function", _) || m("animation-timing-function", _))
2431
- for (let C of T.children)
2432
- C.type !== Ee && zt.p(C.text, v);
2433
- else m("container-name", _) ? je.p(U, v) : m("container", _) ? ((fi = T.first_child) == null ? void 0 : fi.type) === he && je.p(T.first_child.text, v) : cl.has(al(_)) ? Js.push(U, _, v) : m("text-shadow", _) ? Vs.p(U, v) : m("box-shadow", _) && js.p(U, v);
2517
+ } else {
2518
+ if (T === "font-family")
2519
+ return ss.has(L) || $t.p(L, R), H;
2520
+ if (T === "line-height") {
2521
+ let x = L.toLowerCase();
2522
+ x.includes("var(") ? it.p(L, R) : it.p(x, R);
2523
+ } else {
2524
+ if (T === "transition" || T === "animation")
2525
+ return dl(P.children, function(x) {
2526
+ x.type === "fn" ? Bt.p(x.value.text.toLowerCase(), R) : x.type === "duration" ? rt.p(x.value.text.toLowerCase(), R) : x.type === "keyword" && De.p(x.value.text.toLowerCase(), R);
2527
+ }), H;
2528
+ if (T === "animation-duration" || T === "transition-duration") {
2529
+ for (let x of P.children)
2530
+ if (x.type !== Re) {
2531
+ let j = x.text;
2532
+ /var\(/i.test(j) ? rt.p(j, R) : rt.p(j.toLowerCase(), R);
2533
+ }
2534
+ } else if (T === "transition-timing-function" || T === "animation-timing-function")
2535
+ for (let x of P.children)
2536
+ x.type !== Re && Bt.p(x.text, R);
2537
+ else T === "container-name" ? Ze.p(L, R) : T === "container" ? ((mi = P.first_child) == null ? void 0 : mi.type) === _e && Ze.p(P.first_child.text, R) : wl.has(T) ? ii.push(L, E, R) : T === "text-shadow" ? Js.p(L, R) : T === "box-shadow" && ei.p(L, R);
2434
2538
  }
2435
2539
  }
2436
2540
  }
2437
- let or = Ni(T);
2438
- B(T, (C) => {
2439
- switch (C.type) {
2440
- case ft: {
2441
- let O = C.unit, S = A(C);
2442
- return Xs.push(O, _, S), I;
2541
+ let Ar = Pi(P);
2542
+ $(P, (x) => {
2543
+ var j;
2544
+ switch (x.type) {
2545
+ case mt: {
2546
+ let S = ((j = x.unit) == null ? void 0 : j.toLowerCase()) ?? "", O = A(x);
2547
+ return ti.push(S, E, O), H;
2443
2548
  }
2444
- case Ar: {
2445
- let O = C.text;
2446
- if (!O || !O.startsWith("#"))
2447
- return I;
2448
- let S = O;
2449
- or && !S.endsWith("\\9") && (S = S + "\\9");
2450
- let X = S.length - 1;
2451
- Ge("\\9", S) && (X = X - 2);
2452
- let Ie = A(C);
2453
- return xe.push(S, _, Ie), me.p("hex" + X, Ie), I;
2549
+ case Hr: {
2550
+ let S = x.text;
2551
+ if (!S || !S.startsWith("#"))
2552
+ return H;
2553
+ let O = S.toLowerCase();
2554
+ Ar && !O.endsWith("\\9") && (O = O + "\\9");
2555
+ let X = O.length - 1;
2556
+ ns("\\9", O) && (X = X - 2);
2557
+ let Fe = A(x);
2558
+ return we.push(O, E, Fe), Ae.p("hex" + X, Fe), H;
2454
2559
  }
2455
- case he: {
2456
- let O = C.text, S = A(C);
2457
- if (m("font", _) || m("font-family", _))
2458
- return I;
2459
- ut.has(O) && He.p(O, S);
2460
- let X = O.length;
2560
+ case _e: {
2561
+ let S = x.text, O = A(x);
2562
+ if (T === "font" || T === "font-family")
2563
+ return H;
2564
+ xt.has(S) && De.p(S.toLowerCase(), O);
2565
+ let X = S.length;
2461
2566
  if (X > 20 || X < 3)
2462
- return I;
2463
- if (jn.has(O)) {
2464
- xe.push(O, _, S), me.p(O.toLowerCase(), S);
2567
+ return H;
2568
+ if (al.has(S)) {
2569
+ let Fe = S.toLowerCase();
2570
+ we.push(Fe, E, O), Ae.p(Fe, O);
2465
2571
  return;
2466
2572
  }
2467
- if (Wn.has(O)) {
2468
- xe.push(O, _, S), me.p("named", S);
2573
+ if (nl.has(S)) {
2574
+ we.push(S.toLowerCase(), E, O), Ae.p("named", O);
2469
2575
  return;
2470
2576
  }
2471
- if (Qn.has(O)) {
2472
- xe.push(O, _, S), me.p("system", S);
2577
+ if (ll.has(S)) {
2578
+ we.push(S.toLowerCase(), E, O), Ae.p("system", O);
2473
2579
  return;
2474
2580
  }
2475
- return I;
2581
+ return H;
2476
2582
  }
2477
- case gs: {
2478
- let O = C.name, S = A(C);
2479
- if (Vn.has(O)) {
2480
- xe.push(C.text, _, S), me.p(O.toLowerCase(), S);
2583
+ case ks: {
2584
+ let S = x.name, O = A(x);
2585
+ if (ol.has(S)) {
2586
+ we.push(x.text, E, O), Ae.p(S.toLowerCase(), O);
2481
2587
  return;
2482
2588
  }
2483
- if (Ge("gradient", O)) {
2484
- Zs.p(C.text, S);
2589
+ if (ns("gradient", S)) {
2590
+ si.p(x.text, O);
2485
2591
  return;
2486
2592
  }
2487
2593
  }
2488
2594
  }
2489
2595
  });
2490
2596
  }
2491
- } else if (a.type === yr) {
2492
- let { value: N } = a, E = ll(N || "");
2493
- if (Er(E, "data:")) {
2494
- let R = E.length, d = hl(E);
2495
- h.total++, o += R;
2496
- let _ = {
2497
- line: a.line,
2498
- column: a.column,
2499
- offset: a.start,
2500
- length: a.length
2597
+ } else if (c.type === Pr) {
2598
+ let { value: v } = c, y = $i(v || "");
2599
+ if (Ki(y, "data:")) {
2600
+ let k = y.length, g = ml(y);
2601
+ h.total++, a += k;
2602
+ let E = {
2603
+ line: c.line,
2604
+ column: c.column,
2605
+ offset: c.start,
2606
+ length: c.length
2501
2607
  };
2502
- if (h.unique.has(d)) {
2503
- let z = h.unique.get(d);
2504
- z.count++, z.size += R, h.unique.set(d, z), t && z.uniqueWithLocations && z.uniqueWithLocations.push(_);
2608
+ if (h.unique.has(g)) {
2609
+ let K = h.unique.get(g);
2610
+ K.count++, K.size += k, h.unique.set(g, K), t && K.uniqueWithLocations && K.uniqueWithLocations.push(E);
2505
2611
  } else {
2506
- let z = {
2612
+ let K = {
2507
2613
  count: 1,
2508
- size: R,
2509
- uniqueWithLocations: t ? [_] : void 0
2614
+ size: k,
2615
+ uniqueWithLocations: t ? [E] : void 0
2510
2616
  };
2511
- h.unique.set(d, z);
2617
+ h.unique.set(g, K);
2512
2618
  }
2513
2619
  }
2514
- } else if (a.type === Ii)
2515
- return Cs.p(a.name, A(a)), I;
2620
+ } else if (c.type === qi)
2621
+ return c.name && Ts.p(c.name.toLowerCase(), A(c)), H;
2516
2622
  });
2517
- let ti = $s.size, we = Xe.size(), Bt = Is.aggregate(), $t = Ps.aggregate(), Gt = Ds.aggregate(), si = Hs.size, b = Object.assign, ii = r.length, Yt = V.length, ri = k.aggregate(), ni = Xe.aggregate(), li = Gs.aggregate(), oi = Le.aggregate(), ai = Pt.aggregate(), hi = x.c();
2623
+ let ni = Qs.size, Ce = Je.size(), Gt = Ms.aggregate(), Wt = zs.aggregate(), Yt = qs.aggregate(), li = Fs.size, b = Object.assign, oi = r.length, Qt = N.length, ai = u.aggregate(), hi = Je.aggregate(), ci = Vs.aggregate(), _i = Pe.aggregate(), ui = qt.aggregate(), fi = d.c();
2518
2624
  return {
2519
2625
  stylesheet: {
2520
- sourceLinesOfCode: hi.total + we + Ne + Rt.size(),
2626
+ sourceLinesOfCode: fi.total + Ce + Ie + Nt.size(),
2521
2627
  linesOfCode: i,
2522
- size: ii,
2523
- complexity: ri.sum + ni.sum + li.sum + oi.sum + ai.sum,
2628
+ size: oi,
2629
+ complexity: ai.sum + hi.sum + ci.sum + _i.sum + ui.sum,
2524
2630
  comments: {
2525
2631
  total: n,
2526
2632
  size: l
2527
2633
  },
2528
2634
  embeddedContent: {
2529
2635
  size: {
2530
- total: o,
2531
- ratio: H(o, ii)
2636
+ total: a,
2637
+ ratio: I(a, oi)
2532
2638
  },
2533
2639
  types: {
2534
2640
  total: h.total,
2535
2641
  totalUnique: h.unique.size,
2536
- uniquenessRatio: H(h.unique.size, h.total),
2642
+ uniquenessRatio: I(h.unique.size, h.total),
2537
2643
  unique: Object.fromEntries(h.unique)
2538
2644
  }
2539
2645
  }
2540
2646
  },
2541
- atrules: b(hi, {
2647
+ atrules: b(fi, {
2542
2648
  fontface: b(
2543
2649
  {
2544
- total: Yt,
2545
- totalUnique: Yt,
2546
- unique: V,
2547
- uniquenessRatio: Yt === 0 ? 0 : 1
2650
+ total: Qt,
2651
+ totalUnique: Qt,
2652
+ unique: N,
2653
+ uniquenessRatio: Qt === 0 ? 0 : 1
2548
2654
  },
2549
2655
  t ? {
2550
- uniqueWithLocations: ws.c().uniqueWithLocations
2656
+ uniqueWithLocations: ys.c().uniqueWithLocations
2551
2657
  } : {}
2552
2658
  ),
2553
- import: As.c(),
2554
- media: b(ys.c(), {
2555
- browserhacks: Es.c(),
2556
- features: Cs.c()
2659
+ import: bs.c(),
2660
+ media: b(Rs.c(), {
2661
+ browserhacks: vs.c(),
2662
+ features: Ts.c()
2557
2663
  }),
2558
- charset: bs.c(),
2559
- supports: b(gt.c(), {
2560
- browserhacks: Rs.c()
2664
+ charset: Os.c(),
2665
+ supports: b(At.c(), {
2666
+ browserhacks: Ss.c()
2561
2667
  }),
2562
- keyframes: b(xt.c(), {
2563
- prefixed: b(mt.c(), {
2564
- ratio: H(mt.size(), xt.size())
2668
+ keyframes: b(Et.c(), {
2669
+ prefixed: b(Ct.c(), {
2670
+ ratio: I(Ct.size(), Et.size())
2565
2671
  })
2566
2672
  }),
2567
- container: b(vs.c(), {
2568
- names: je.c()
2673
+ container: b(Ns.c(), {
2674
+ names: Ze.c()
2569
2675
  }),
2570
- layer: Ve.c(),
2571
- property: Ts.c(),
2572
- complexity: ri,
2676
+ layer: Xe.c(),
2677
+ property: Ls.c(),
2678
+ complexity: ai,
2573
2679
  nesting: b(
2574
- kt.aggregate(),
2680
+ yt.aggregate(),
2575
2681
  {
2576
- items: kt.toArray()
2682
+ items: yt.toArray()
2577
2683
  },
2578
- Os.c()
2684
+ Us.c()
2579
2685
  )
2580
2686
  }),
2581
2687
  rules: {
2582
- total: wt,
2688
+ total: bt,
2583
2689
  empty: {
2584
- total: At,
2585
- ratio: H(At, wt)
2690
+ total: Rt,
2691
+ ratio: I(Rt, bt)
2586
2692
  },
2587
2693
  sizes: b(
2588
- yt.aggregate(),
2694
+ vt.aggregate(),
2589
2695
  {
2590
- items: yt.toArray()
2696
+ items: vt.toArray()
2591
2697
  },
2592
- Ss.c()
2698
+ Is.c()
2593
2699
  ),
2594
2700
  nesting: b(
2595
- bt.aggregate(),
2701
+ St.aggregate(),
2596
2702
  {
2597
- items: bt.toArray()
2703
+ items: St.toArray()
2598
2704
  },
2599
- Ls.c()
2705
+ Ds.c()
2600
2706
  ),
2601
2707
  selectors: b(
2602
- Et.aggregate(),
2708
+ Tt.aggregate(),
2603
2709
  {
2604
- items: Et.toArray()
2710
+ items: Tt.toArray()
2605
2711
  },
2606
- Ns.c()
2712
+ Hs.c()
2607
2713
  ),
2608
2714
  declarations: b(
2609
- Ct.aggregate(),
2715
+ Ot.aggregate(),
2610
2716
  {
2611
- items: Ct.toArray()
2717
+ items: Ot.toArray()
2612
2718
  },
2613
- Us.c()
2719
+ Ps.c()
2614
2720
  )
2615
2721
  },
2616
2722
  selectors: {
2617
- total: we,
2618
- totalUnique: si,
2619
- uniquenessRatio: H(si, we),
2723
+ total: Ce,
2724
+ totalUnique: li,
2725
+ uniquenessRatio: I(li, Ce),
2620
2726
  specificity: b(
2621
2727
  {
2622
2728
  /** @type Specificity */
2623
- min: ue === void 0 ? [0, 0, 0] : ue,
2729
+ min: fe === void 0 ? [0, 0, 0] : fe,
2624
2730
  /** @type Specificity */
2625
- max: _e === void 0 ? [0, 0, 0] : _e,
2731
+ max: ue === void 0 ? [0, 0, 0] : ue,
2626
2732
  /** @type Specificity */
2627
- sum: [Bt.sum, $t.sum, Gt.sum],
2733
+ sum: [Gt.sum, Wt.sum, Yt.sum],
2628
2734
  /** @type Specificity */
2629
- mean: [Bt.mean, $t.mean, Gt.mean],
2735
+ mean: [Gt.mean, Wt.mean, Yt.mean],
2630
2736
  /** @type Specificity */
2631
- mode: [Bt.mode, $t.mode, Gt.mode],
2737
+ mode: [Gt.mode, Wt.mode, Yt.mode],
2632
2738
  /** @type Specificity */
2633
- items: qs
2739
+ items: Bs
2634
2740
  },
2635
- Fs.c()
2741
+ Ks.c()
2636
2742
  ),
2637
- complexity: b(ni, Ms.c(), {
2638
- items: Xe.toArray()
2743
+ complexity: b(hi, $s.c(), {
2744
+ items: Je.toArray()
2639
2745
  }),
2640
2746
  nesting: b(
2641
- St.aggregate(),
2747
+ Ht.aggregate(),
2642
2748
  {
2643
- items: St.toArray()
2749
+ items: Ht.toArray()
2644
2750
  },
2645
- Bs.c()
2751
+ Ys.c()
2646
2752
  ),
2647
- id: b(Tt.c(), {
2648
- ratio: H(Tt.size(), we)
2753
+ id: b(Ut.c(), {
2754
+ ratio: I(Ut.size(), Ce)
2649
2755
  }),
2650
- pseudoClasses: zs.c(),
2651
- accessibility: b(Ot.c(), {
2652
- ratio: H(Ot.size(), we)
2756
+ pseudoClasses: Gs.c(),
2757
+ accessibility: b(It.c(), {
2758
+ ratio: I(It.size(), Ce)
2653
2759
  }),
2654
- keyframes: Rt.c(),
2655
- prefixed: b(vt.c(), {
2656
- ratio: H(vt.size(), we)
2760
+ keyframes: Nt.c(),
2761
+ prefixed: b(Lt.c(), {
2762
+ ratio: I(Lt.size(), Ce)
2657
2763
  }),
2658
- combinators: Ks.c()
2764
+ combinators: Ws.c()
2659
2765
  },
2660
2766
  declarations: {
2661
- total: Ne,
2662
- totalUnique: ti,
2663
- uniquenessRatio: H(ti, Ne),
2767
+ total: Ie,
2768
+ totalUnique: ni,
2769
+ uniquenessRatio: I(ni, Ie),
2664
2770
  importants: {
2665
- total: Ze,
2666
- ratio: H(Ze, Ne),
2771
+ total: et,
2772
+ ratio: I(et, Ie),
2667
2773
  inKeyframes: {
2668
- total: Nt,
2669
- ratio: H(Nt, Ze)
2774
+ total: Pt,
2775
+ ratio: I(Pt, et)
2670
2776
  }
2671
2777
  },
2672
- complexity: li,
2778
+ complexity: ci,
2673
2779
  nesting: b(
2674
- Lt.aggregate(),
2780
+ Ft.aggregate(),
2675
2781
  {
2676
- items: Lt.toArray()
2782
+ items: Ft.toArray()
2677
2783
  },
2678
- Ys.c()
2784
+ js.c()
2679
2785
  )
2680
2786
  },
2681
- properties: b(Ue.c(), {
2682
- prefixed: b(It.c(), {
2683
- ratio: H(It.size(), Ue.size())
2787
+ properties: b(He.c(), {
2788
+ prefixed: b(zt.c(), {
2789
+ ratio: I(zt.size(), He.size())
2684
2790
  }),
2685
- custom: b(Je.c(), {
2686
- ratio: H(Je.size(), Ue.size()),
2687
- importants: b(Ut.c(), {
2688
- ratio: H(Ut.size(), Je.size())
2791
+ custom: b(tt.c(), {
2792
+ ratio: I(tt.size(), He.size()),
2793
+ importants: b(Dt.c(), {
2794
+ ratio: I(Dt.size(), tt.size())
2689
2795
  })
2690
2796
  }),
2691
- browserhacks: b(Ht.c(), {
2692
- ratio: H(Ht.size(), Ue.size())
2797
+ browserhacks: b(Mt.c(), {
2798
+ ratio: I(Mt.size(), He.size())
2693
2799
  }),
2694
- complexity: oi
2800
+ complexity: _i
2695
2801
  }),
2696
2802
  values: {
2697
- colors: b(xe.count(), {
2698
- formats: me.c()
2803
+ colors: b(we.count(), {
2804
+ formats: Ae.c()
2699
2805
  }),
2700
- gradients: Zs.c(),
2701
- fontFamilies: Ft.c(),
2702
- fontSizes: Mt.c(),
2703
- lineHeights: qt.c(),
2704
- zindexes: Qs.c(),
2705
- textShadows: Vs.c(),
2706
- boxShadows: js.c(),
2707
- borderRadiuses: Js.count(),
2806
+ gradients: si.c(),
2807
+ fontFamilies: $t.c(),
2808
+ fontSizes: st.c(),
2809
+ lineHeights: it.c(),
2810
+ zindexes: Zs.c(),
2811
+ textShadows: Js.c(),
2812
+ boxShadows: ei.c(),
2813
+ borderRadiuses: ii.count(),
2708
2814
  animations: {
2709
- durations: Kt.c(),
2710
- timingFunctions: zt.c()
2815
+ durations: rt.c(),
2816
+ timingFunctions: Bt.c()
2711
2817
  },
2712
- prefixes: Ws.c(),
2713
- browserhacks: Dt.c(),
2714
- units: Xs.count(),
2715
- complexity: ai,
2716
- keywords: He.c(),
2717
- resets: ei.c()
2818
+ prefixes: Xs.c(),
2819
+ browserhacks: Kt.c(),
2820
+ units: ti.count(),
2821
+ complexity: ui,
2822
+ keywords: De.c(),
2823
+ resets: ri.c()
2718
2824
  },
2719
2825
  __meta__: {
2720
- parseTime: f - c,
2721
- analyzeTime: Date.now() - f,
2826
+ parseTime: p - o,
2827
+ analyzeTime: Date.now() - p,
2722
2828
  total: Date.now() - s
2723
2829
  }
2724
2830
  };
2725
2831
  }
2726
- function Li(r, e) {
2832
+ function Mi(r, e) {
2727
2833
  return r[0] === e[0] ? r[1] === e[1] ? e[2] - r[2] : e[1] - r[1] : e[0] - r[0];
2728
2834
  }
2729
2835
  export {
2730
- $ as KeywordSet,
2731
- dl as analyze,
2732
- Oi as calculateSpecificity,
2733
- Vn as colorFunctions,
2734
- jn as colorKeywords,
2735
- Li as compareSpecificity,
2736
- ut as cssKeywords,
2737
- pl as hasVendorPrefix,
2738
- Di as isAccessibilitySelector,
2739
- br as isMediaBrowserhack,
2740
- fl as isPropertyHack,
2741
- Rr as isSelectorPrefixed,
2742
- Cr as isSupportsBrowserhack,
2743
- rl as isValuePrefixed,
2744
- Wn as namedColors,
2745
- rs as selectorComplexity,
2746
- Qn as systemColors
2836
+ B as KeywordSet,
2837
+ bl as analyze,
2838
+ Ii as calculateSpecificity,
2839
+ ol as colorFunctions,
2840
+ al as colorKeywords,
2841
+ Mi as compareSpecificity,
2842
+ xt as cssKeywords,
2843
+ yl as hasVendorPrefix,
2844
+ Kr as isAccessibilitySelector,
2845
+ Fr as isMediaBrowserhack,
2846
+ Al as isPropertyHack,
2847
+ qr as isSelectorPrefixed,
2848
+ Dr as isSupportsBrowserhack,
2849
+ gl as isValuePrefixed,
2850
+ nl as namedColors,
2851
+ ls as selectorComplexity,
2852
+ ll as systemColors
2747
2853
  };