kss-modern 0.0.37 → 0.0.39

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.
@@ -3055,19 +3055,25 @@ var a = /* @__PURE__ */ i(((e) => {
3055
3055
  };
3056
3056
  })), be = /* @__PURE__ */ i(((e) => {
3057
3057
  Object.defineProperty(e, "__esModule", { value: !0 });
3058
- var t = g(), n = s();
3058
+ var t = g(), n = c(), r = s();
3059
3059
  e.default = {
3060
3060
  keyword: "pattern",
3061
3061
  type: "string",
3062
3062
  schemaType: "string",
3063
3063
  $data: !0,
3064
3064
  error: {
3065
- message: ({ schemaCode: e }) => (0, n.str)`must match pattern "${e}"`,
3066
- params: ({ schemaCode: e }) => (0, n._)`{pattern: ${e}}`
3065
+ message: ({ schemaCode: e }) => (0, r.str)`must match pattern "${e}"`,
3066
+ params: ({ schemaCode: e }) => (0, r._)`{pattern: ${e}}`
3067
3067
  },
3068
3068
  code(e) {
3069
- let { data: r, $data: i, schema: a, schemaCode: o, it: s } = e, c = s.opts.unicodeRegExp ? "u" : "", l = i ? (0, n._)`(new RegExp(${o}, ${c}))` : (0, t.usePattern)(e, a);
3070
- e.fail$data((0, n._)`!${l}.test(${r})`);
3069
+ let { gen: i, data: a, $data: o, schema: s, schemaCode: c, it: l } = e, u = l.opts.unicodeRegExp ? "u" : "";
3070
+ if (o) {
3071
+ let { regExp: t } = l.opts.code, o = t.code === "new RegExp" ? (0, r._)`new RegExp` : (0, n.useFunc)(i, t), s = i.let("valid");
3072
+ i.try(() => i.assign(s, (0, r._)`${o}(${c}, ${u}).test(${a})`), () => i.assign(s, !1)), e.fail$data((0, r._)`!${s}`);
3073
+ } else {
3074
+ let n = (0, t.usePattern)(e, s);
3075
+ e.fail$data((0, r._)`!${n}.test(${a})`);
3076
+ }
3071
3077
  }
3072
3078
  };
3073
3079
  })), xe = /* @__PURE__ */ i(((e) => {
@@ -7372,7 +7378,7 @@ function N(e, t) {
7372
7378
  };
7373
7379
  }
7374
7380
  //#endregion
7375
- //#region node_modules/html-validate/node_modules/semver/internal/constants.js
7381
+ //#region node_modules/semver/internal/constants.js
7376
7382
  var ji = /* @__PURE__ */ i(((e, t) => {
7377
7383
  var n = "2.0.0", r = 256;
7378
7384
  t.exports = {
@@ -8758,7 +8764,7 @@ var Ya = [
8758
8764
  "submitButton"
8759
8765
  ], Xa = /* @__PURE__ */ new Map();
8760
8766
  function Za(e) {
8761
- return JSON.parse(JSON.stringify(e));
8767
+ return globalThis.structuredClone ? globalThis.structuredClone(e) : JSON.parse(JSON.stringify(e));
8762
8768
  }
8763
8769
  function Qa(e, t) {
8764
8770
  return t;
@@ -8934,45 +8940,7 @@ function z(e, t, n, r) {
8934
8940
  }
8935
8941
  return a;
8936
8942
  }
8937
- var B = /* @__PURE__ */ ((e) => (e[e.INITIAL = 1] = "INITIAL", e[e.DOCTYPE = 2] = "DOCTYPE", e[e.TEXT = 3] = "TEXT", e[e.TAG = 4] = "TAG", e[e.ATTR = 5] = "ATTR", e[e.CDATA = 6] = "CDATA", e[e.SCRIPT = 7] = "SCRIPT", e[e.STYLE = 8] = "STYLE", e[e.TEXTAREA = 9] = "TEXTAREA", e[e.TITLE = 10] = "TITLE", e))(B || {}), V = /* @__PURE__ */ ((e) => (e[e.TEXT = 1] = "TEXT", e[e.SCRIPT = 2] = "SCRIPT", e[e.STYLE = 3] = "STYLE", e[e.TEXTAREA = 4] = "TEXTAREA", e[e.TITLE = 5] = "TITLE", e))(V || {}), lo = class {
8938
- contentModel;
8939
- state;
8940
- string;
8941
- filename;
8942
- offset;
8943
- line;
8944
- column;
8945
- constructor(e) {
8946
- this.state = B.INITIAL, this.string = e.data, this.filename = e.filename, this.offset = e.offset, this.line = e.line, this.column = e.column, this.contentModel = 1;
8947
- }
8948
- getTruncatedLine(e = 13) {
8949
- return JSON.stringify(this.string.length > e ? `${this.string.slice(0, 10)}...` : this.string);
8950
- }
8951
- consume(e, t) {
8952
- let n = this.string.slice(0, e), r;
8953
- for (; (r = n.indexOf("\n")) >= 0;) this.line++, this.column = 1, n = n.slice(r + 1);
8954
- this.column += n.length, this.offset += e, this.string = this.string.slice(e), this.state = t;
8955
- }
8956
- getLocation(e) {
8957
- return {
8958
- filename: this.filename,
8959
- offset: this.offset,
8960
- line: this.line,
8961
- column: this.column,
8962
- size: e
8963
- };
8964
- }
8965
- };
8966
- function uo(e) {
8967
- return {
8968
- filename: "",
8969
- offset: 0,
8970
- line: 1,
8971
- column: 1,
8972
- ...e
8973
- };
8974
- }
8975
- var fo = /* @__PURE__ */ ((e) => (e[e.ELEMENT_NODE = 1] = "ELEMENT_NODE", e[e.TEXT_NODE = 3] = "TEXT_NODE", e[e.DOCUMENT_NODE = 9] = "DOCUMENT_NODE", e))(fo || {}), po = "#document", mo = /* @__PURE__ */ Symbol("textContent"), ho = 0, go = class {
8943
+ var lo = /* @__PURE__ */ ((e) => (e[e.ELEMENT_NODE = 1] = "ELEMENT_NODE", e[e.TEXT_NODE = 3] = "TEXT_NODE", e[e.DOCUMENT_NODE = 9] = "DOCUMENT_NODE", e))(lo || {}), uo = "#document", fo = /* @__PURE__ */ Symbol("textContent"), po = 0, mo = class {
8976
8944
  nodeName;
8977
8945
  nodeType;
8978
8946
  childNodes;
@@ -8982,7 +8950,7 @@ var fo = /* @__PURE__ */ ((e) => (e[e.ELEMENT_NODE = 1] = "ELEMENT_NODE", e[e.TE
8982
8950
  disabledRules;
8983
8951
  blockedRules;
8984
8952
  constructor(e, t, n) {
8985
- this.nodeType = e, this.nodeName = t ?? po, this.location = n, this.disabledRules = /* @__PURE__ */ new Set(), this.blockedRules = /* @__PURE__ */ new Map(), this.childNodes = [], this.unique = ho++, this.cache = null;
8953
+ this.nodeType = e, this.nodeName = t ?? uo, this.location = n, this.disabledRules = /* @__PURE__ */ new Set(), this.blockedRules = /* @__PURE__ */ new Map(), this.childNodes = [], this.unique = po++, this.cache = null;
8986
8954
  }
8987
8955
  cacheEnable(e = !0) {
8988
8956
  this.cache = e ? /* @__PURE__ */ new Map() : null;
@@ -9000,10 +8968,10 @@ var fo = /* @__PURE__ */ ((e) => (e[e.ELEMENT_NODE = 1] = "ELEMENT_NODE", e[e.TE
9000
8968
  return !!this.cache?.has(e);
9001
8969
  }
9002
8970
  get textContent() {
9003
- let e = this.cacheGet(mo);
8971
+ let e = this.cacheGet(fo);
9004
8972
  if (e) return e;
9005
8973
  let t = this.childNodes.map((e) => e.textContent).join("");
9006
- return this.cacheSet(mo, t), t;
8974
+ return this.cacheSet(fo, t), t;
9007
8975
  }
9008
8976
  append(e) {
9009
8977
  let t = e._setParent(this);
@@ -9016,7 +8984,7 @@ var fo = /* @__PURE__ */ ((e) => (e[e.ELEMENT_NODE = 1] = "ELEMENT_NODE", e[e.TE
9016
8984
  r && r._removeChild(e);
9017
8985
  }
9018
8986
  isRootElement() {
9019
- return this.nodeType === fo.DOCUMENT_NODE;
8987
+ return this.nodeType === lo.DOCUMENT_NODE;
9020
8988
  }
9021
8989
  isSameNode(e) {
9022
8990
  return this.unique === e.unique;
@@ -9067,7 +9035,7 @@ var fo = /* @__PURE__ */ ((e) => (e[e.ELEMENT_NODE = 1] = "ELEMENT_NODE", e[e.TE
9067
9035
  else throw Error("DOMException: _removeChild(..) could not find child to remove");
9068
9036
  }
9069
9037
  };
9070
- function _o(e, t) {
9038
+ function ho(e, t) {
9071
9039
  let n = [], r = t ? [] : null;
9072
9040
  for (let i = 0; i < e.length;) {
9073
9041
  let a = e.indexOf(" ", i);
@@ -9089,12 +9057,12 @@ function _o(e, t) {
9089
9057
  locations: r
9090
9058
  };
9091
9059
  }
9092
- var H = class extends Array {
9060
+ var B = class extends Array {
9093
9061
  value;
9094
9062
  locations;
9095
9063
  constructor(e, t) {
9096
9064
  if (e && typeof e == "string") {
9097
- let { tokens: n, locations: r } = _o(e.replaceAll(/[\t\r\n]/g, " "), t);
9065
+ let { tokens: n, locations: r } = ho(e.replaceAll(/[\t\n\r]/g, " "), t);
9098
9066
  super(...n), this.locations = r;
9099
9067
  } else super(0), this.locations = null;
9100
9068
  e instanceof R ? this.value = e.expr : this.value = e ?? "";
@@ -9119,8 +9087,8 @@ var H = class extends Array {
9119
9087
  };
9120
9088
  }
9121
9089
  }
9122
- }, U = /* @__PURE__ */ ((e) => (e[e.DESCENDANT = 1] = "DESCENDANT", e[e.CHILD = 2] = "CHILD", e[e.ADJACENT_SIBLING = 3] = "ADJACENT_SIBLING", e[e.GENERAL_SIBLING = 4] = "GENERAL_SIBLING", e[e.SCOPE = 5] = "SCOPE", e))(U || {});
9123
- function vo(e, t) {
9090
+ }, V = /* @__PURE__ */ ((e) => (e[e.DESCENDANT = 1] = "DESCENDANT", e[e.CHILD = 2] = "CHILD", e[e.ADJACENT_SIBLING = 3] = "ADJACENT_SIBLING", e[e.GENERAL_SIBLING = 4] = "GENERAL_SIBLING", e[e.SCOPE = 5] = "SCOPE", e))(V || {});
9091
+ function go(e, t) {
9124
9092
  if (t === ":scope") return 5;
9125
9093
  switch (e) {
9126
9094
  case void 0:
@@ -9132,44 +9100,44 @@ function vo(e, t) {
9132
9100
  default: throw Error(`Unknown combinator "${e}"`);
9133
9101
  }
9134
9102
  }
9135
- function yo(e) {
9103
+ function _o(e) {
9136
9104
  return e.previousSibling === null;
9137
9105
  }
9138
- function bo(e) {
9106
+ function vo(e) {
9139
9107
  return e.nextSibling === null;
9140
9108
  }
9141
- var xo = {};
9142
- function So(e) {
9109
+ var yo = {};
9110
+ function bo(e) {
9143
9111
  if (!e.parent) return -1;
9144
- if (!xo[e.unique]) {
9112
+ if (!yo[e.unique]) {
9145
9113
  let t = e.parent.childElements.findIndex((t) => t.unique === e.unique);
9146
- xo[e.unique] = t + 1;
9114
+ yo[e.unique] = t + 1;
9147
9115
  }
9148
- return xo[e.unique];
9116
+ return yo[e.unique];
9149
9117
  }
9150
- function Co(e, t) {
9118
+ function xo(e, t) {
9151
9119
  if (!t) throw Error("Missing argument to nth-child");
9152
9120
  let n = Number.parseInt(t.trim(), 10);
9153
- return So(e) === n;
9121
+ return bo(e) === n;
9154
9122
  }
9155
- function wo(e) {
9123
+ function So(e) {
9156
9124
  return !!(this.scope && e.isSameNode(this.scope));
9157
9125
  }
9158
- var To = {
9159
- "first-child": yo,
9160
- "last-child": bo,
9161
- "nth-child": Co,
9162
- scope: wo
9126
+ var Co = {
9127
+ "first-child": _o,
9128
+ "last-child": vo,
9129
+ "nth-child": xo,
9130
+ scope: So
9163
9131
  };
9164
- function Eo(e, t) {
9165
- let n = To[e];
9132
+ function wo(e, t) {
9133
+ let n = Co[e];
9166
9134
  if (n) return n.bind(t);
9167
9135
  throw Error(`Pseudo-class "${e}" is not implemented`);
9168
9136
  }
9169
- function Do(e) {
9137
+ function To(e) {
9170
9138
  return e.replaceAll(/\\(.)/g, "$1");
9171
9139
  }
9172
- var Oo = class {}, ko = class extends Oo {
9140
+ var Eo = class {}, Do = class extends Eo {
9173
9141
  classname;
9174
9142
  constructor(e) {
9175
9143
  super(), this.classname = e;
@@ -9177,22 +9145,22 @@ var Oo = class {}, ko = class extends Oo {
9177
9145
  match(e) {
9178
9146
  return e.classList.contains(this.classname);
9179
9147
  }
9180
- }, Ao = class extends Oo {
9148
+ }, Oo = class extends Eo {
9181
9149
  id;
9182
9150
  constructor(e) {
9183
- super(), this.id = Do(e);
9151
+ super(), this.id = To(e);
9184
9152
  }
9185
9153
  match(e) {
9186
9154
  return e.id === this.id;
9187
9155
  }
9188
- }, jo = class extends Oo {
9156
+ }, ko = class extends Eo {
9189
9157
  key;
9190
9158
  op;
9191
9159
  value;
9192
9160
  constructor(e) {
9193
9161
  super();
9194
- let [, t, n, r] = /^(.+?)(?:([~^$*|]?=)"([^"]+?)")?$/.exec(e);
9195
- this.key = t, this.op = n, this.value = typeof r == "string" ? Do(r) : r;
9162
+ let [, t, n, r] = /^(.+?)(?:([$*^|~]?=)"([^"]+?)")?$/.exec(e);
9163
+ this.key = t, this.op = n, this.value = typeof r == "string" ? To(r) : r;
9196
9164
  }
9197
9165
  match(e) {
9198
9166
  return e.getAttribute(this.key, !0).some((e) => {
@@ -9203,7 +9171,7 @@ var Oo = class {}, ko = class extends Oo {
9203
9171
  }
9204
9172
  });
9205
9173
  }
9206
- }, Mo = class extends Oo {
9174
+ }, Ao = class extends Eo {
9207
9175
  name;
9208
9176
  args;
9209
9177
  constructor(e, t) {
@@ -9214,19 +9182,19 @@ var Oo = class {}, ko = class extends Oo {
9214
9182
  this.name = r, this.args = i;
9215
9183
  }
9216
9184
  match(e, t) {
9217
- return Eo(this.name, t)(e, this.args);
9185
+ return wo(this.name, t)(e, this.args);
9218
9186
  }
9219
9187
  };
9220
- function No(e) {
9221
- return /[.#[:]/.test(e);
9188
+ function jo(e) {
9189
+ return /[#.:[]/.test(e);
9222
9190
  }
9223
- function Po(e) {
9224
- return /['"]/.test(e);
9191
+ function Mo(e) {
9192
+ return /["']/.test(e);
9225
9193
  }
9226
- function Fo(e, t) {
9194
+ function No(e, t) {
9227
9195
  return e === ":" && t === ":";
9228
9196
  }
9229
- function* Io(e) {
9197
+ function* Po(e) {
9230
9198
  if (e === "") return;
9231
9199
  let t = e.length, n = 0, r = 1, i = !1;
9232
9200
  for (; r < t;) {
@@ -9239,91 +9207,91 @@ function* Io(e) {
9239
9207
  t === i && (i = !1), r += 1;
9240
9208
  continue;
9241
9209
  }
9242
- if (Po(t)) {
9210
+ if (Mo(t)) {
9243
9211
  i = t, r += 1;
9244
9212
  continue;
9245
9213
  }
9246
- if (Fo(t, a)) {
9214
+ if (No(t, a)) {
9247
9215
  r += 1;
9248
9216
  continue;
9249
9217
  }
9250
- No(t) && (n = r, yield a), r += 1;
9218
+ jo(t) && (n = r, yield a), r += 1;
9251
9219
  }
9252
9220
  yield e.slice(n, r);
9253
9221
  }
9254
- var Lo = class {
9222
+ var Fo = class {
9255
9223
  combinator;
9256
9224
  tagName;
9257
9225
  selector;
9258
9226
  conditions;
9259
9227
  constructor(e) {
9260
- let t = /^([~+\->]?)((?:[*]|[^.#[:]+)?)([^]*)$/.exec(e);
9228
+ let t = /^([+>~-]?)((?:\*|[^#.:[]+)?)([^]*)$/.exec(e);
9261
9229
  if (!t) throw Error(`Failed to create selector pattern from "${e}"`);
9262
- t.shift(), this.selector = e, this.combinator = vo(t.shift(), e), this.tagName = t.shift() || "*", this.conditions = Array.from(Io(t[0]), (e) => this.createCondition(e));
9230
+ t.shift(), this.selector = e, this.combinator = go(t.shift(), e), this.tagName = t.shift() || "*", this.conditions = Array.from(Po(t[0]), (e) => this.createCondition(e));
9263
9231
  }
9264
9232
  match(e, t) {
9265
9233
  return e.is(this.tagName) && this.conditions.every((n) => n.match(e, t));
9266
9234
  }
9267
9235
  createCondition(e) {
9268
9236
  switch (e[0]) {
9269
- case ".": return new ko(e.slice(1));
9270
- case "#": return new Ao(e.slice(1));
9271
- case "[": return new jo(e.slice(1, -1));
9272
- case ":": return new Mo(e.slice(1), this.selector);
9237
+ case ".": return new Do(e.slice(1));
9238
+ case "#": return new Oo(e.slice(1));
9239
+ case "[": return new ko(e.slice(1, -1));
9240
+ case ":": return new Ao(e.slice(1), this.selector);
9273
9241
  default: throw Error(`Failed to create selector condition for "${e}"`);
9274
9242
  }
9275
9243
  }
9276
9244
  };
9277
- function* Ro(e) {
9245
+ function* Io(e) {
9278
9246
  let t = e.parent;
9279
9247
  for (; t && !t.isRootElement();) yield t, t = t.parent;
9280
9248
  }
9281
- function* zo(e) {
9249
+ function* Lo(e) {
9282
9250
  let t = e.parent;
9283
9251
  t && !t.isRootElement() && (yield t);
9284
9252
  }
9285
- function* Bo(e) {
9253
+ function* Ro(e) {
9286
9254
  let t = e.previousSibling;
9287
9255
  t && (yield t);
9288
9256
  }
9289
- function* Vo(e) {
9257
+ function* zo(e) {
9290
9258
  let t = e.siblings, n = t.findIndex((t) => t.isSameNode(e));
9291
9259
  for (let e = 0; e < n; e++) yield t[e];
9292
9260
  }
9293
- function* Ho(e) {
9261
+ function* Bo(e) {
9294
9262
  yield e;
9295
9263
  }
9296
- function Uo(e, t) {
9264
+ function Vo(e, t) {
9297
9265
  switch (t) {
9298
- case U.DESCENDANT: return Ro(e);
9299
- case U.CHILD: return zo(e);
9300
- case U.ADJACENT_SIBLING: return Bo(e);
9301
- case U.GENERAL_SIBLING: return Vo(e);
9266
+ case V.DESCENDANT: return Io(e);
9267
+ case V.CHILD: return Lo(e);
9268
+ case V.ADJACENT_SIBLING: return Ro(e);
9269
+ case V.GENERAL_SIBLING: return zo(e);
9302
9270
  /* istanbul ignore next -- cannot really happen, the selector would be malformed */
9303
- case U.SCOPE: return Ho(e);
9271
+ case V.SCOPE: return Bo(e);
9304
9272
  }
9305
9273
  }
9306
- function Wo(e, t, n) {
9274
+ function Ho(e, t, n) {
9307
9275
  let r = t.at(-1);
9308
9276
  if (!r.match(e, n)) return !1;
9309
9277
  let i = t.slice(0, -1);
9310
9278
  if (i.length === 0) return !0;
9311
- let a = Uo(e, r.combinator);
9312
- for (let e of a) if (Wo(e, i, n)) return !0;
9279
+ let a = Vo(e, r.combinator);
9280
+ for (let e of a) if (Ho(e, i, n)) return !0;
9313
9281
  return !1;
9314
9282
  }
9315
- var Go = /* @__PURE__ */ new Set([
9283
+ var Uo = /* @__PURE__ */ new Set([
9316
9284
  "9",
9317
9285
  "a",
9318
9286
  "d"
9319
9287
  ]);
9320
- function* Ko(e) {
9288
+ function* Wo(e) {
9321
9289
  let t = 0, n = 0;
9322
9290
  function r(e, t) {
9323
9291
  return e === "\\" ? 1 : e === " " ? (n = t, 2) : 0;
9324
9292
  }
9325
9293
  function i(e) {
9326
- return +!!Go.has(e);
9294
+ return +!!Uo.has(e);
9327
9295
  }
9328
9296
  function* a(r, i) {
9329
9297
  return r === " " ? 2 : (yield e.slice(t, n), t = i, n = i, 0);
@@ -9345,27 +9313,27 @@ function* Ko(e) {
9345
9313
  }
9346
9314
  t !== e.length && (yield e.slice(t));
9347
9315
  }
9348
- function qo(e) {
9316
+ function Go(e) {
9349
9317
  let t = {
9350
9318
  "\\9 ": " ",
9351
9319
  "\\a ": "\n",
9352
9320
  "\\d ": "\r"
9353
9321
  };
9354
- return e.replaceAll(/(\\[\u0039\u0061\u0064] )/g, (e, n) => t[n]);
9322
+ return e.replaceAll(/(\\[9ad] )/g, (e, n) => t[n]);
9355
9323
  }
9356
- function Jo(e) {
9324
+ function Ko(e) {
9357
9325
  let t = {
9358
9326
  " ": "\\9 ",
9359
9327
  "\n": "\\a ",
9360
9328
  "\r": "\\d "
9361
9329
  };
9362
- return e.toString().replaceAll(/([\t\n\r]|[^a-z0-9_-])/gi, (e, n) => t[n] ? t[n] : `\\${n}`);
9330
+ return e.toString().replaceAll(/([\t\n\r]|[^\w-])/gi, (e, n) => t[n] ? t[n] : `\\${n}`);
9363
9331
  }
9364
- function Yo(e) {
9365
- let t = Jo(e);
9332
+ function qo(e) {
9333
+ let t = Ko(e);
9366
9334
  return /^\d/.test(t) ? `[id="${t}"]` : `#${t}`;
9367
9335
  }
9368
- var Xo = class e {
9336
+ var Jo = class e {
9369
9337
  pattern;
9370
9338
  constructor(t) {
9371
9339
  this.pattern = e.parse(t);
@@ -9375,7 +9343,7 @@ var Xo = class e {
9375
9343
  yield* this.matchInternal(e, 0, t);
9376
9344
  }
9377
9345
  matchElement(e) {
9378
- return Wo(e, this.pattern, { scope: null });
9346
+ return Ho(e, this.pattern, { scope: null });
9379
9347
  }
9380
9348
  *matchInternal(t, n, r) {
9381
9349
  if (n >= this.pattern.length) {
@@ -9386,15 +9354,15 @@ var Xo = class e {
9386
9354
  for (let e of a) i.match(e, r) && (yield* this.matchInternal(e, n + 1, r));
9387
9355
  }
9388
9356
  static parse(e) {
9389
- return e = e.replaceAll(/([+~>]) /g, "$1"), Array.from(Ko(e), (e) => new Lo(qo(e)));
9357
+ return e = e.replaceAll(/([+>~]) /g, "$1"), Array.from(Wo(e), (e) => new Fo(Go(e)));
9390
9358
  }
9391
9359
  static findCandidates(t, n) {
9392
9360
  switch (n.combinator) {
9393
- case U.DESCENDANT: return t.getElementsByTagName(n.tagName);
9394
- case U.CHILD: return t.childElements.filter((e) => e.is(n.tagName));
9395
- case U.ADJACENT_SIBLING: return e.findAdjacentSibling(t);
9396
- case U.GENERAL_SIBLING: return e.findGeneralSibling(t);
9397
- case U.SCOPE: return [t];
9361
+ case V.DESCENDANT: return t.getElementsByTagName(n.tagName);
9362
+ case V.CHILD: return t.childElements.filter((e) => e.is(n.tagName));
9363
+ case V.ADJACENT_SIBLING: return e.findAdjacentSibling(t);
9364
+ case V.GENERAL_SIBLING: return e.findGeneralSibling(t);
9365
+ case V.SCOPE: return [t];
9398
9366
  }
9399
9367
  }
9400
9368
  static findAdjacentSibling(e) {
@@ -9405,14 +9373,14 @@ var Xo = class e {
9405
9373
  let t = !1;
9406
9374
  return e.siblings.filter((n) => t ? !0 : (n === e && (t = !0), !1));
9407
9375
  }
9408
- }, Zo = "#text";
9409
- function Qo(e) {
9410
- return e?.nodeType === fo.TEXT_NODE;
9376
+ }, Yo = "#text";
9377
+ function Xo(e) {
9378
+ return e?.nodeType === lo.TEXT_NODE;
9411
9379
  }
9412
- var $o = class extends go {
9380
+ var Zo = class extends mo {
9413
9381
  text;
9414
9382
  constructor(e, t) {
9415
- super(fo.TEXT_NODE, Zo, t), this.text = e;
9383
+ super(lo.TEXT_NODE, Yo, t), this.text = e;
9416
9384
  }
9417
9385
  get textContent() {
9418
9386
  return this.text.toString();
@@ -9423,14 +9391,14 @@ var $o = class extends go {
9423
9391
  get isDynamic() {
9424
9392
  return this.text instanceof R;
9425
9393
  }
9426
- }, es = /* @__PURE__ */ Symbol("role"), ts = /* @__PURE__ */ Symbol("tabindex"), W = /* @__PURE__ */ ((e) => (e[e.Open = 0] = "Open", e[e.EndTag = 1] = "EndTag", e[e.VoidOmitted = 2] = "VoidOmitted", e[e.VoidSelfClosed = 3] = "VoidSelfClosed", e[e.ImplicitClosed = 4] = "ImplicitClosed", e))(W || {});
9427
- function ns(e) {
9428
- return e?.nodeType === fo.ELEMENT_NODE;
9394
+ }, Qo = /* @__PURE__ */ Symbol("role"), $o = /* @__PURE__ */ Symbol("tabindex"), H = /* @__PURE__ */ ((e) => (e[e.Open = 0] = "Open", e[e.EndTag = 1] = "EndTag", e[e.VoidOmitted = 2] = "VoidOmitted", e[e.VoidSelfClosed = 3] = "VoidSelfClosed", e[e.ImplicitClosed = 4] = "ImplicitClosed", e))(H || {});
9395
+ function es(e) {
9396
+ return e?.nodeType === lo.ELEMENT_NODE;
9429
9397
  }
9430
- function rs(e) {
9398
+ function ts(e) {
9431
9399
  return e === "" || e === "*";
9432
9400
  }
9433
- function is(e) {
9401
+ function ns(e) {
9434
9402
  return {
9435
9403
  closest(t) {
9436
9404
  return e.closest(t)?._adapter;
@@ -9443,7 +9411,7 @@ function is(e) {
9443
9411
  }
9444
9412
  };
9445
9413
  }
9446
- var as = class e extends go {
9414
+ var rs = class e extends mo {
9447
9415
  tagName;
9448
9416
  voidElement;
9449
9417
  depth;
@@ -9455,8 +9423,8 @@ var as = class e extends go {
9455
9423
  _adapter;
9456
9424
  constructor(e) {
9457
9425
  let { nodeType: t, tagName: n, parent: r = null, closed: i = 1, meta: a = null, location: o } = e;
9458
- if (super(t, n, o), rs(n)) throw Error(`The tag name provided ("${n}") is not a valid name`);
9459
- if (this.tagName = n ?? "#document", this._parent = null, this.attr = {}, this.metaElement = a ?? null, this.closed = i, this.voidElement = a ? !!a.void : !1, this.depth = 0, this.annotation = null, this._adapter = is(this), r) {
9426
+ if (super(t, n, o), ts(n)) throw Error(`The tag name provided ("${n}") is not a valid name`);
9427
+ if (this.tagName = n ?? "#document", this._parent = null, this.attr = {}, this.metaElement = a ?? null, this.closed = i, this.voidElement = a ? !!a.void : !1, this.depth = 0, this.annotation = null, this._adapter = ns(this), r) {
9460
9428
  r.append(this);
9461
9429
  let e = r;
9462
9430
  for (; e.parent;) this.depth++, e = e.parent;
@@ -9465,7 +9433,7 @@ var as = class e extends go {
9465
9433
  static createElement(t, n, r = {}) {
9466
9434
  let { closed: i = 1, meta: a = null, parent: o = null } = r;
9467
9435
  return new e({
9468
- nodeType: fo.ELEMENT_NODE,
9436
+ nodeType: lo.ELEMENT_NODE,
9469
9437
  tagName: t,
9470
9438
  parent: o,
9471
9439
  closed: i,
@@ -9475,7 +9443,7 @@ var as = class e extends go {
9475
9443
  }
9476
9444
  static rootNode(t) {
9477
9445
  let n = new e({
9478
- nodeType: fo.DOCUMENT_NODE,
9446
+ nodeType: lo.DOCUMENT_NODE,
9479
9447
  location: t
9480
9448
  });
9481
9449
  return n.setAnnotation("#document"), n;
@@ -9483,9 +9451,9 @@ var as = class e extends go {
9483
9451
  static fromTokens(t, n, r, i, a = "") {
9484
9452
  let o = t.data[2], s = a ? `${a}:${o}` : o;
9485
9453
  if (!o) throw Error("tagName cannot be empty");
9486
- let c = i ? i.getMetaFor(s) : null, l = t.data[1] !== "/", u = os(n, c), d = z(t.location, 1);
9454
+ let c = i ? i.getMetaFor(s) : null, l = t.data[1] !== "/", u = is(n, c), d = z(t.location, 1);
9487
9455
  return new e({
9488
- nodeType: fo.ELEMENT_NODE,
9456
+ nodeType: lo.ELEMENT_NODE,
9489
9457
  tagName: s,
9490
9458
  parent: l ? r : null,
9491
9459
  closed: u,
@@ -9500,11 +9468,11 @@ var as = class e extends go {
9500
9468
  let e = this.getAttribute("aria-labelledby");
9501
9469
  if (!e?.value) return null;
9502
9470
  if (e.value instanceof R) return e.value;
9503
- let t = new H(e.value, e.valueLocation);
9471
+ let t = new B(e.value, e.valueLocation);
9504
9472
  return t.length > 0 ? Array.from(t) : null;
9505
9473
  }
9506
9474
  get childElements() {
9507
- return this.childNodes.filter(ns);
9475
+ return this.childNodes.filter(es);
9508
9476
  }
9509
9477
  closest(e) {
9510
9478
  let t = this;
@@ -9520,7 +9488,7 @@ var as = class e extends go {
9520
9488
  for (t = this; t.parent; t = t.parent);
9521
9489
  for (let n = this; n.parent; n = n.parent) {
9522
9490
  if (n.id) {
9523
- let r = Yo(n.id);
9491
+ let r = qo(n.id);
9524
9492
  if (t.querySelectorAll(r).length === 1) {
9525
9493
  e.push(r);
9526
9494
  break;
@@ -9546,7 +9514,7 @@ var as = class e extends go {
9546
9514
  }
9547
9515
  }
9548
9516
  matches(e) {
9549
- return e.split(",").some((e) => new Xo(e.trim()).matchElement(this));
9517
+ return e.split(",").some((e) => new Jo(e.trim()).matchElement(this));
9550
9518
  }
9551
9519
  get meta() {
9552
9520
  return this.metaElement;
@@ -9555,15 +9523,15 @@ var as = class e extends go {
9555
9523
  return this._parent;
9556
9524
  }
9557
9525
  get role() {
9558
- let e = this.cacheGet(es);
9526
+ let e = this.cacheGet(Qo);
9559
9527
  if (e !== void 0) return e;
9560
9528
  let t = this.getAttribute("role");
9561
- if (t) return this.cacheSet(es, t.value);
9529
+ if (t) return this.cacheSet(Qo, t.value);
9562
9530
  if (this.metaElement) {
9563
9531
  let { aria: e } = this.metaElement, t = e.implicitRole(this._adapter);
9564
- return this.cacheSet(es, t);
9532
+ return this.cacheSet(Qo, t);
9565
9533
  }
9566
- return this.cacheSet(es, null);
9534
+ return this.cacheSet(Qo, null);
9567
9535
  }
9568
9536
  setAnnotation(e) {
9569
9537
  this.annotation = e;
@@ -9574,13 +9542,13 @@ var as = class e extends go {
9574
9542
  o ? o.push(a) : this.attr[e] = [a];
9575
9543
  }
9576
9544
  get tabIndex() {
9577
- let e = this.cacheGet(ts);
9545
+ let e = this.cacheGet($o);
9578
9546
  if (e !== void 0) return e;
9579
9547
  let t = this.getAttribute("tabindex");
9580
- if (!t || t.value === null) return this.cacheSet(ts, null);
9581
- if (t.value instanceof R) return this.cacheSet(ts, 0);
9548
+ if (!t || t.value === null) return this.cacheSet($o, null);
9549
+ if (t.value instanceof R) return this.cacheSet($o, 0);
9582
9550
  let n = Number.parseInt(t.value, 10);
9583
- return Number.isNaN(n) ? this.cacheSet(ts, null) : this.cacheSet(ts, n);
9551
+ return Number.isNaN(n) ? this.cacheSet($o, null) : this.cacheSet($o, n);
9584
9552
  }
9585
9553
  get textType() {
9586
9554
  let e = this.tagName.toLowerCase();
@@ -9603,10 +9571,10 @@ var as = class e extends go {
9603
9571
  return t ? t.value === null ? null : t.value.toString() : null;
9604
9572
  }
9605
9573
  appendText(e, t) {
9606
- this.childNodes.push(new $o(e, t));
9574
+ this.childNodes.push(new Zo(e, t));
9607
9575
  }
9608
9576
  get classList() {
9609
- return this.hasAttribute("class") ? new H(this.getAttribute("class", !0).filter((e) => e.isStatic).map((e) => e.value).join(" "), null) : new H(null, null);
9577
+ return this.hasAttribute("class") ? new B(this.getAttribute("class", !0).filter((e) => e.isStatic).map((e) => e.value).join(" "), null) : new B(null, null);
9610
9578
  }
9611
9579
  get id() {
9612
9580
  return this.getAttributeValue("id");
@@ -9645,7 +9613,7 @@ var as = class e extends go {
9645
9613
  return Array.from(n.values());
9646
9614
  }
9647
9615
  *querySelectorImpl(e) {
9648
- if (e) for (let t of e.split(/(?<!\\),\s*/)) yield* new Xo(t).match(this);
9616
+ if (e) for (let t of e.split(/(?<!\\),\s*/)) yield* new Jo(t).match(this);
9649
9617
  }
9650
9618
  someChildren(e) {
9651
9619
  return this.childElements.some(t);
@@ -9675,15 +9643,15 @@ var as = class e extends go {
9675
9643
  return this._parent = t instanceof e ? t : null, n;
9676
9644
  }
9677
9645
  };
9678
- function os(e, t) {
9646
+ function is(e, t) {
9679
9647
  let n = 0;
9680
9648
  return t?.void && (n = 2), e.data[0] === "/>" && (n = 3), n;
9681
9649
  }
9682
- function ss(e) {
9650
+ function as(e) {
9683
9651
  return "root" in e && "readyState" in e;
9684
9652
  }
9685
- function cs(e, t) {
9686
- if (ss(e)) {
9653
+ function os(e, t) {
9654
+ if (as(e)) {
9687
9655
  if (e.readyState !== "complete") throw Error("Cannot call walk.depthFirst(..) before document is ready");
9688
9656
  e = e.root;
9689
9657
  }
@@ -9693,13 +9661,13 @@ function cs(e, t) {
9693
9661
  }
9694
9662
  n(e);
9695
9663
  }
9696
- var G = { depthFirst: cs }, ls = class {
9664
+ var U = { depthFirst: os }, ss = class {
9697
9665
  root;
9698
9666
  active;
9699
9667
  _readyState;
9700
9668
  doctype;
9701
9669
  constructor(e) {
9702
- this.root = as.rootNode(e), this.active = this.root, this.doctype = null, this._readyState = "loading";
9670
+ this.root = rs.rootNode(e), this.active = this.root, this.doctype = null, this._readyState = "loading";
9703
9671
  }
9704
9672
  pushActive(e) {
9705
9673
  this.active = e;
@@ -9714,7 +9682,7 @@ var G = { depthFirst: cs }, ls = class {
9714
9682
  return this._readyState;
9715
9683
  }
9716
9684
  resolveMeta(e) {
9717
- this._readyState = "complete", G.depthFirst(this, (t) => {
9685
+ this._readyState = "complete", U.depthFirst(this, (t) => {
9718
9686
  e.resolve(t);
9719
9687
  });
9720
9688
  }
@@ -9722,7 +9690,7 @@ var G = { depthFirst: cs }, ls = class {
9722
9690
  return this.root.getElementsByTagName(e);
9723
9691
  }
9724
9692
  visitDepthFirst(e) {
9725
- G.depthFirst(this, e);
9693
+ U.depthFirst(this, e);
9726
9694
  }
9727
9695
  find(e) {
9728
9696
  return this.root.find(e);
@@ -9733,7 +9701,7 @@ var G = { depthFirst: cs }, ls = class {
9733
9701
  querySelectorAll(e) {
9734
9702
  return this.root.querySelectorAll(e);
9735
9703
  }
9736
- }, us = /* @__PURE__ */ new Set(["exclude"]), ds = class e {
9704
+ }, cs = /* @__PURE__ */ new Set(["exclude"]), ls = class e {
9737
9705
  static validatePermitted(t, n) {
9738
9706
  return n ? n.some((n) => e.validatePermittedRule(t, n)) : !0;
9739
9707
  }
@@ -9742,7 +9710,7 @@ var G = { depthFirst: cs }, ls = class {
9742
9710
  let i = !0;
9743
9711
  for (let a of n) {
9744
9712
  if (typeof a != "string") return !1;
9745
- let [, n, o] = /^(@?.*?)([?*]?)$/.exec(a), s = n && o && ps(o);
9713
+ let [, n, o] = /^(@?.*?)([*?]?)$/.exec(a), s = n && o && ds(o);
9746
9714
  if (s) {
9747
9715
  let o = t.filter((t) => e.validatePermittedCategory(t, a, !0));
9748
9716
  if (o.length > s) {
@@ -9779,7 +9747,7 @@ var G = { depthFirst: cs }, ls = class {
9779
9747
  let r = e.value;
9780
9748
  if (r instanceof R) return !0;
9781
9749
  let i = r === null || r === "";
9782
- return n.boolean ? i || r === e.key : n.omit && i ? !0 : n.list ? new H(r, e.valueLocation).every((e) => this.validateAttributeValue(e, n)) : this.validateAttributeValue(r, n);
9750
+ return n.boolean ? i || r === e.key : n.omit && i ? !0 : n.list ? new B(r, e.valueLocation).every((e) => this.validateAttributeValue(e, n)) : this.validateAttributeValue(r, n);
9783
9751
  }
9784
9752
  static validateAttributeValue(e, t) {
9785
9753
  if (!t.enum) return !0;
@@ -9788,10 +9756,10 @@ var G = { depthFirst: cs }, ls = class {
9788
9756
  return t.enum.some((t) => t instanceof RegExp ? t.test(e) : n === t);
9789
9757
  }
9790
9758
  static validatePermittedRule(t, n, r = !1) {
9791
- return typeof n == "string" ? e.validatePermittedCategory(t, n, !r) : Array.isArray(n) ? n.every((n) => e.validatePermittedRule(t, n, r)) : (fs(n), n.exclude ? Array.isArray(n.exclude) ? !n.exclude.some((n) => e.validatePermittedRule(t, n, !0)) : !e.validatePermittedRule(t, n.exclude, !0) : !0);
9759
+ return typeof n == "string" ? e.validatePermittedCategory(t, n, !r) : Array.isArray(n) ? n.every((n) => e.validatePermittedRule(t, n, r)) : (us(n), n.exclude ? Array.isArray(n.exclude) ? !n.exclude.some((n) => e.validatePermittedRule(t, n, !0)) : !e.validatePermittedRule(t, n.exclude, !0) : !0);
9792
9760
  }
9793
9761
  static validatePermittedCategory(e, t, n) {
9794
- let [, r] = /^(@?.*?)([?*]?)$/.exec(t);
9762
+ let [, r] = /^(@?.*?)([*?]?)$/.exec(t);
9795
9763
  if (!r.startsWith("@")) return e.matches(r);
9796
9764
  if (!e.meta) return n;
9797
9765
  switch (r) {
@@ -9808,13 +9776,13 @@ var G = { depthFirst: cs }, ls = class {
9808
9776
  }
9809
9777
  }
9810
9778
  };
9811
- function fs(e) {
9812
- for (let t of Object.keys(e)) if (!us.has(t)) {
9779
+ function us(e) {
9780
+ for (let t of Object.keys(e)) if (!cs.has(t)) {
9813
9781
  let n = JSON.stringify(e);
9814
9782
  throw Error(`Permitted rule "${n}" contains unknown property "${t}"`);
9815
9783
  }
9816
9784
  }
9817
- function ps(e) {
9785
+ function ds(e) {
9818
9786
  switch (e) {
9819
9787
  case "?": return 1;
9820
9788
  case "*": return null;
@@ -9822,8 +9790,8 @@ function ps(e) {
9822
9790
  default: throw Error(`Invalid quantifier "${e}" used`);
9823
9791
  }
9824
9792
  }
9825
- var ms = /* @__PURE__ */ ((e) => (e[e.DISABLED = 0] = "DISABLED", e[e.WARN = 1] = "WARN", e[e.ERROR = 2] = "ERROR", e))(ms || {});
9826
- function hs(e) {
9793
+ var fs = /* @__PURE__ */ ((e) => (e[e.DISABLED = 0] = "DISABLED", e[e.WARN = 1] = "WARN", e[e.ERROR = 2] = "ERROR", e))(fs || {});
9794
+ function ps(e) {
9827
9795
  switch (e) {
9828
9796
  case 0:
9829
9797
  case "off": return 0;
@@ -9834,7 +9802,7 @@ function hs(e) {
9834
9802
  default: throw Error(`Invalid severity "${String(e)}"`);
9835
9803
  }
9836
9804
  }
9837
- var gs = /* @__PURE__ */ Symbol("aria-naming"), _s = "allowed", vs = /* @__PURE__ */ new Set([
9805
+ var ms = /* @__PURE__ */ Symbol("aria-naming"), hs = "allowed", gs = /* @__PURE__ */ new Set([
9838
9806
  "caption",
9839
9807
  "code",
9840
9808
  "deletion",
@@ -9847,163 +9815,163 @@ var gs = /* @__PURE__ */ Symbol("aria-naming"), _s = "allowed", vs = /* @__PURE_
9847
9815
  "subscript",
9848
9816
  "superscript"
9849
9817
  ]);
9850
- function ys(e) {
9851
- return vs.has(e) ? "prohibited" : "allowed";
9818
+ function _s(e) {
9819
+ return gs.has(e) ? "prohibited" : "allowed";
9852
9820
  }
9853
- function bs(e, t) {
9821
+ function vs(e, t) {
9854
9822
  return t.aria.naming(e._adapter);
9855
9823
  }
9856
- function xs(e) {
9857
- let t = e.cacheGet(gs);
9824
+ function ys(e) {
9825
+ let t = e.cacheGet(ms);
9858
9826
  if (t) return t;
9859
9827
  let n = e.getAttribute("role")?.value;
9860
- if (n) return n instanceof R ? e.cacheSet(gs, _s) : e.cacheSet(gs, ys(n));
9828
+ if (n) return n instanceof R ? e.cacheSet(ms, hs) : e.cacheSet(ms, _s(n));
9861
9829
  let r = e.meta;
9862
- return r ? e.cacheSet(gs, bs(e, r)) : e.cacheSet(gs, _s);
9830
+ return r ? e.cacheSet(ms, vs(e, r)) : e.cacheSet(ms, hs);
9863
9831
  }
9864
- var Ss = Symbol(Cs.name);
9865
- function Cs(e, t) {
9866
- let n = e.cacheGet(Ss);
9832
+ var bs = Symbol(xs.name);
9833
+ function xs(e, t) {
9834
+ let n = e.cacheGet(bs);
9867
9835
  if (n) return t ? n : n.byFieldset || n.bySelf;
9868
- let r = e.cacheSet(Ss, ws(e));
9836
+ let r = e.cacheSet(bs, Ss(e));
9869
9837
  return t ? r : r.byFieldset || r.bySelf;
9870
9838
  }
9871
- function ws(e) {
9839
+ function Ss(e) {
9872
9840
  return {
9873
9841
  byFieldset: ((e) => !!e.closest("fieldset[disabled]")?.getAttribute("disabled")?.isStatic)(e),
9874
9842
  bySelf: ((e) => !!e.getAttribute("disabled")?.isStatic)(e)
9875
9843
  };
9876
9844
  }
9877
- var Ts = /* @__PURE__ */ new Map();
9878
- function Es(e) {
9879
- let t = e.replaceAll(/[*]+/g, ".+");
9845
+ var Cs = /* @__PURE__ */ new Map();
9846
+ function ws(e) {
9847
+ let t = e.replaceAll(/\*+/g, ".+");
9880
9848
  return RegExp(`^${t}$`);
9881
9849
  }
9882
- function Ds(e) {
9850
+ function Ts(e) {
9883
9851
  return RegExp(`^${e}$`);
9884
9852
  }
9885
- function Os(e) {
9886
- let t = Ts.get(e);
9853
+ function Es(e) {
9854
+ let t = Cs.get(e);
9887
9855
  if (t) return t;
9888
- let n = /^\/(.*)\/$/.exec(e), r = n ? Ds(n[1]) : Es(e);
9889
- return Ts.set(e, r), r;
9856
+ let n = /^\/(.*)\/$/.exec(e), r = n ? Ts(n[1]) : ws(e);
9857
+ return Cs.set(e, r), r;
9890
9858
  }
9891
- function ks(e, t) {
9892
- for (let n of e) if (Os(n).test(t)) return !0;
9859
+ function Ds(e, t) {
9860
+ for (let n of e) if (Es(n).test(t)) return !0;
9893
9861
  return !1;
9894
9862
  }
9895
- function As(e, t, n = (e, t) => e.includes(t)) {
9863
+ function Os(e, t, n = (e, t) => e.includes(t)) {
9896
9864
  let { include: r, exclude: i } = e;
9897
9865
  return !!(r && !n(r, t) || i && n(i, t));
9898
9866
  }
9899
- var js = Symbol(Rs.name), Ms = Symbol(Bs.name), Ns = Symbol(Hs.name), Ps = Symbol(Gs.name), Fs = Symbol(Ws.name);
9900
- function Is(e) {
9901
- return !(Rs(e) || Gs(e) || Bs(e) || Hs(e) || Ws(e));
9867
+ var ks = Symbol(Is.name), As = Symbol(Rs.name), js = Symbol(Bs.name), Ms = Symbol(Us.name), Ns = Symbol(Hs.name);
9868
+ function Ps(e) {
9869
+ return !(Is(e) || Us(e) || Rs(e) || Bs(e) || Hs(e));
9902
9870
  }
9903
- function Ls(e) {
9871
+ function Fs(e) {
9904
9872
  return {
9905
- byParent: e.parent ? Rs(e.parent) : !1,
9873
+ byParent: e.parent ? Is(e.parent) : !1,
9906
9874
  bySelf: ((e) => e.getAttribute("aria-hidden")?.value === "true")(e)
9907
9875
  };
9908
9876
  }
9909
- function Rs(e, t) {
9910
- let n = e.cacheGet(js);
9877
+ function Is(e, t) {
9878
+ let n = e.cacheGet(ks);
9911
9879
  if (n) return t ? n : n.byParent || n.bySelf;
9912
- let r = e.cacheSet(js, Ls(e));
9880
+ let r = e.cacheSet(ks, Fs(e));
9913
9881
  return t ? r : r.byParent || r.bySelf;
9914
9882
  }
9915
- function zs(e) {
9883
+ function Ls(e) {
9916
9884
  return {
9917
- byParent: e.parent ? Bs(e.parent) : !1,
9885
+ byParent: e.parent ? Rs(e.parent) : !1,
9918
9886
  bySelf: ((e) => !!e.getAttribute("hidden")?.isStatic)(e)
9919
9887
  };
9920
9888
  }
9921
- function Bs(e, t) {
9922
- let n = e.cacheGet(Ms);
9889
+ function Rs(e, t) {
9890
+ let n = e.cacheGet(As);
9923
9891
  if (n) return t ? n : n.byParent || n.bySelf;
9924
- let r = e.cacheSet(Ms, zs(e));
9892
+ let r = e.cacheSet(As, Ls(e));
9925
9893
  return t ? r : r.byParent || r.bySelf;
9926
9894
  }
9927
- function Vs(e) {
9895
+ function zs(e) {
9928
9896
  return {
9929
- byParent: e.parent ? Hs(e.parent) : !1,
9897
+ byParent: e.parent ? Bs(e.parent) : !1,
9930
9898
  bySelf: ((e) => !!e.getAttribute("inert")?.isStatic)(e)
9931
9899
  };
9932
9900
  }
9933
- function Hs(e, t) {
9934
- let n = e.cacheGet(Ns);
9901
+ function Bs(e, t) {
9902
+ let n = e.cacheGet(js);
9935
9903
  if (n) return t ? n : n.byParent || n.bySelf;
9936
- let r = e.cacheSet(Ns, Vs(e));
9904
+ let r = e.cacheSet(js, zs(e));
9937
9905
  return t ? r : r.byParent || r.bySelf;
9938
9906
  }
9939
- function Us(e) {
9907
+ function Vs(e) {
9940
9908
  let t = (e) => {
9941
9909
  let { display: t, visibility: n } = so(e.getAttribute("style")?.value);
9942
9910
  return t === "none" || n === "hidden";
9943
- }, n = e.parent ? Ws(e.parent) : !1, r = t(e);
9911
+ }, n = e.parent ? Hs(e.parent) : !1, r = t(e);
9944
9912
  return n || r;
9945
9913
  }
9946
- function Ws(e) {
9947
- return e.cacheGet(Fs) || e.cacheSet(Fs, Us(e));
9914
+ function Hs(e) {
9915
+ return e.cacheGet(Ns) || e.cacheSet(Ns, Vs(e));
9948
9916
  }
9949
- function Gs(e) {
9950
- if (e.cacheExists(Ps)) return !!e.cacheGet(Ps);
9951
- if (e.meta?.interactive || e.getAttribute("tabindex")) return e.cacheSet(Ps, !1);
9917
+ function Us(e) {
9918
+ if (e.cacheExists(Ms)) return !!e.cacheGet(Ms);
9919
+ if (e.meta?.interactive || e.getAttribute("tabindex")) return e.cacheSet(Ms, !1);
9952
9920
  let t = e.getAttribute("role");
9953
- return t && (t.value === "presentation" || t.value === "none") ? e.cacheSet(Ps, !0) : e.cacheSet(Ps, !1);
9921
+ return t && (t.value === "presentation" || t.value === "none") ? e.cacheSet(Ms, !0) : e.cacheSet(Ms, !1);
9954
9922
  }
9955
- var Ks = $s.name, qs = /* @__PURE__ */ Symbol(`${Ks}|html`), Js = /* @__PURE__ */ Symbol(`${Ks}|a11y`), Ys = /* @__PURE__ */ Symbol(`${Ks}|html|ignore-hidden-root`), Xs = /* @__PURE__ */ Symbol(`${Ks}|a11y|ignore-hidden-root`), K = /* @__PURE__ */ ((e) => (e[e.EMPTY_TEXT = 0] = "EMPTY_TEXT", e[e.DYNAMIC_TEXT = 1] = "DYNAMIC_TEXT", e[e.STATIC_TEXT = 2] = "STATIC_TEXT", e))(K || {});
9956
- function Zs(e) {
9923
+ var Ws = Zs.name, Gs = /* @__PURE__ */ Symbol(`${Ws}|html`), Ks = /* @__PURE__ */ Symbol(`${Ws}|a11y`), qs = /* @__PURE__ */ Symbol(`${Ws}|html|ignore-hidden-root`), Js = /* @__PURE__ */ Symbol(`${Ws}|a11y|ignore-hidden-root`), W = /* @__PURE__ */ ((e) => (e[e.EMPTY_TEXT = 0] = "EMPTY_TEXT", e[e.DYNAMIC_TEXT = 1] = "DYNAMIC_TEXT", e[e.STATIC_TEXT = 2] = "STATIC_TEXT", e))(W || {});
9924
+ function Ys(e) {
9957
9925
  let { accessible: t = !1, ignoreHiddenRoot: n = !1 } = e;
9958
- return t && n ? Xs : n ? Ys : t ? Js : qs;
9926
+ return t && n ? Js : n ? qs : t ? Ks : Gs;
9959
9927
  }
9960
- function Qs(e) {
9928
+ function Xs(e) {
9961
9929
  return e.is("select") || e.is("textarea");
9962
9930
  }
9963
- function $s(e, t = {}) {
9964
- let { accessible: n = !1, ignoreHiddenRoot: r = !1 } = t, i = Zs(t);
9931
+ function Zs(e, t = {}) {
9932
+ let { accessible: n = !1, ignoreHiddenRoot: r = !1 } = t, i = Ys(t);
9965
9933
  if (e.cacheExists(i)) return e.cacheGet(i);
9966
- if (!r && Bs(e) || !r && n && Rs(e) || Qs(e)) return e.cacheSet(i, 0);
9967
- let a = ec(e, { ...t });
9934
+ if (!r && Rs(e) || !r && n && Is(e) || Xs(e)) return e.cacheSet(i, 0);
9935
+ let a = Qs(e, { ...t });
9968
9936
  return a.some((e) => e.isDynamic) ? e.cacheSet(i, 1) : a.some((e) => /\S/.exec(e.textContent) !== null) ? e.cacheSet(i, 2) : e.cacheSet(i, 0);
9969
9937
  }
9970
- function ec(e, t) {
9938
+ function Qs(e, t) {
9971
9939
  let { accessible: n = !1 } = t, r = [];
9972
- for (let i of e.childNodes) if (Qo(i)) r.push(i);
9973
- else if (ns(i)) {
9974
- if (Bs(i, !0).bySelf || n && Rs(i, !0).bySelf) continue;
9975
- r = r.concat(ec(i, t));
9940
+ for (let i of e.childNodes) if (Xo(i)) r.push(i);
9941
+ else if (es(i)) {
9942
+ if (Rs(i, !0).bySelf || n && Is(i, !0).bySelf) continue;
9943
+ r = r.concat(Qs(i, t));
9976
9944
  }
9977
9945
  return r;
9978
9946
  }
9979
- function tc(e) {
9947
+ function $s(e) {
9980
9948
  let t = e.getAttribute("alt");
9981
9949
  return !t || t.value === null ? !1 : t.isDynamic || t.value.toString() !== "";
9982
9950
  }
9983
- function nc(e) {
9951
+ function ec(e) {
9984
9952
  let t = e.getAttribute("aria-label");
9985
9953
  return !t || t.value === null ? !1 : t.isDynamic || t.value.toString() !== "";
9986
9954
  }
9987
- function rc(e, t) {
9955
+ function tc(e, t) {
9988
9956
  return e.reduce((n, r, i) => (n[+!t(r, i, e)].push(r), n), [[], []]);
9989
9957
  }
9990
- function ic(e) {
9958
+ function nc(e) {
9991
9959
  return JSON.stringify(e);
9992
9960
  }
9993
- function ac(e, t = !1) {
9994
- return e == null ? "null" : typeof e == "number" ? e.toString() : typeof e == "string" ? t ? ic(e) : e : Array.isArray(e) ? `[ ${e.map((e) => ac(e, !0)).join(", ")} ]` : typeof e == "object" ? `{ ${Object.entries(e).map(([e, t]) => `${e}: ${ac(t, !0)}`).join(", ")} }` : String(e);
9961
+ function rc(e, t = !1) {
9962
+ return e == null ? "null" : typeof e == "number" ? e.toString() : typeof e == "string" ? t ? nc(e) : e : Array.isArray(e) ? `[ ${e.map((e) => rc(e, !0)).join(", ")} ]` : typeof e == "object" ? `{ ${Object.entries(e).map(([e, t]) => `${e}: ${rc(t, !0)}`).join(", ")} }` : String(e);
9995
9963
  }
9996
- function oc(e, t) {
9997
- return e.replaceAll(/{{\s*([^\s{}]+)\s*}}/g, (e, n) => t[n] === void 0 ? e : ac(t[n]));
9964
+ function ic(e, t) {
9965
+ return e.replaceAll(/{{\s*([^\s{}]+)\s*}}/g, (e, n) => t[n] === void 0 ? e : rc(t[n]));
9998
9966
  }
9999
- var sc = new st.default({
9967
+ var ac = new st.default({
10000
9968
  strict: !0,
10001
9969
  strictTuples: !0,
10002
9970
  strictTypes: !0
10003
9971
  });
10004
- sc.addMetaSchema(va), sc.addKeyword(Na);
10005
- function cc(e, t) {
10006
- let n = `rule/${e}`, r = sc.getSchema(n);
9972
+ ac.addMetaSchema(va), ac.addKeyword(Na);
9973
+ function oc(e, t) {
9974
+ let n = `rule/${e}`, r = ac.getSchema(n);
10007
9975
  if (r) return r;
10008
9976
  let i = {
10009
9977
  $id: n,
@@ -10011,13 +9979,13 @@ function cc(e, t) {
10011
9979
  additionalProperties: !1,
10012
9980
  properties: t
10013
9981
  };
10014
- return sc.compile(i);
9982
+ return ac.compile(i);
10015
9983
  }
10016
- function lc(e) {
9984
+ function sc(e) {
10017
9985
  return !!(e[0] && e[0].message);
10018
9986
  }
10019
- function uc(e) {
10020
- if (lc(e)) return e[0];
9987
+ function cc(e) {
9988
+ if (sc(e)) return e[0];
10021
9989
  {
10022
9990
  let [t, n, r, i] = e;
10023
9991
  return {
@@ -10028,7 +9996,7 @@ function uc(e) {
10028
9996
  };
10029
9997
  }
10030
9998
  }
10031
- var q = class {
9999
+ var G = class {
10032
10000
  reporter;
10033
10001
  parser;
10034
10002
  meta;
@@ -10039,7 +10007,7 @@ var q = class {
10039
10007
  name;
10040
10008
  options;
10041
10009
  constructor(e) {
10042
- this.reporter = null, this.parser = null, this.meta = null, this.event = null, this.options = e, this.enabled = !0, this.blockers = [], this.severity = ms.DISABLED, this.name = "";
10010
+ this.reporter = null, this.parser = null, this.meta = null, this.event = null, this.options = e, this.enabled = !0, this.blockers = [], this.severity = fs.DISABLED, this.name = "";
10043
10011
  }
10044
10012
  getSeverity() {
10045
10013
  return this.severity;
@@ -10060,7 +10028,7 @@ var q = class {
10060
10028
  return !1;
10061
10029
  }
10062
10030
  isEnabled(e) {
10063
- return this.enabled && this.severity >= ms.WARN && (!e || e.ruleEnabled(this.name));
10031
+ return this.enabled && this.severity >= fs.WARN && (!e || e.ruleEnabled(this.name));
10064
10032
  }
10065
10033
  isBlocked(e) {
10066
10034
  return !!(this.blockers.length > 0 || e && e.ruleBlockers(this.name).length > 0);
@@ -10069,7 +10037,7 @@ var q = class {
10069
10037
  return [...this.blockers, ...e ? e.ruleBlockers(this.name) : []];
10070
10038
  }
10071
10039
  isKeywordIgnored(e, t = (e, t) => e.includes(t)) {
10072
- return As(this.options, e, t);
10040
+ return Os(this.options, e, t);
10073
10041
  }
10074
10042
  getMetaFor(e) {
10075
10043
  return this.meta.getMetaFor(e);
@@ -10084,7 +10052,7 @@ var q = class {
10084
10052
  return null;
10085
10053
  }
10086
10054
  report(...e) {
10087
- let { node: t, message: n, location: r, context: i } = uc(e), a = this.isEnabled(t), o = this.isBlocked(t), s = this.findLocation({
10055
+ let { node: t, message: n, location: r, context: i } = cc(e), a = this.isEnabled(t), o = this.isBlocked(t), s = this.findLocation({
10088
10056
  node: t,
10089
10057
  location: r,
10090
10058
  event: this.event
@@ -10095,7 +10063,7 @@ var q = class {
10095
10063
  enabled: a,
10096
10064
  blockers: this.getBlockers(t)
10097
10065
  }), a && !o) {
10098
- let e = oc(n, i ?? {});
10066
+ let e = ic(n, i ?? {});
10099
10067
  this.reporter.add({
10100
10068
  rule: this,
10101
10069
  message: e,
@@ -10122,47 +10090,47 @@ var q = class {
10122
10090
  if (!e) return;
10123
10091
  let o = e.schema();
10124
10092
  if (!o) return;
10125
- let s = cc(t, o);
10093
+ let s = oc(t, o);
10126
10094
  if (!s(r)) throw new Aa(i, "Rule configuration error", a, o, (s.errors ?? []).map((e) => (e.instancePath = `${n}${e.instancePath}`, e)));
10127
10095
  }
10128
10096
  documentation(e) {
10129
10097
  return null;
10130
10098
  }
10131
- }, dc = {
10099
+ }, lc = {
10132
10100
  allowExternal: !0,
10133
10101
  allowRelative: !0,
10134
10102
  allowAbsolute: !0,
10135
10103
  allowBase: !0
10136
- }, fc = {
10104
+ }, uc = {
10137
10105
  a: "href",
10138
10106
  img: "src",
10139
10107
  link: "href",
10140
10108
  script: "src"
10141
- }, pc = {
10109
+ }, dc = {
10142
10110
  external: "External links are not allowed by current configuration.",
10143
10111
  "relative-base": "Links relative to <base> are not allowed by current configuration.",
10144
10112
  "relative-path": "Relative links are not allowed by current configuration.",
10145
10113
  absolute: "Absolute links are not allowed by current configuration.",
10146
10114
  anchor: null
10147
10115
  };
10148
- function mc(e) {
10116
+ function fc(e) {
10149
10117
  return typeof e == "boolean" ? e : {
10150
10118
  include: e.include ? e.include.map((e) => new RegExp(e)) : null,
10151
10119
  exclude: e.exclude ? e.exclude.map((e) => new RegExp(e)) : null
10152
10120
  };
10153
10121
  }
10154
- function hc(e, t) {
10122
+ function pc(e, t) {
10155
10123
  return !(t.include && !t.include.some((t) => t.test(e)) || t.exclude?.some((t) => t.test(e)));
10156
10124
  }
10157
- var gc = class extends q {
10125
+ var mc = class extends G {
10158
10126
  allowExternal;
10159
10127
  allowRelative;
10160
10128
  allowAbsolute;
10161
10129
  constructor(e) {
10162
10130
  super({
10163
- ...dc,
10131
+ ...lc,
10164
10132
  ...e
10165
- }), this.allowExternal = mc(this.options.allowExternal), this.allowRelative = mc(this.options.allowRelative), this.allowAbsolute = mc(this.options.allowAbsolute);
10133
+ }), this.allowExternal = fc(this.options.allowExternal), this.allowRelative = fc(this.options.allowRelative), this.allowAbsolute = fc(this.options.allowAbsolute);
10166
10134
  }
10167
10135
  static schema() {
10168
10136
  let e = { anyOf: [{ type: "boolean" }, {
@@ -10187,7 +10155,7 @@ var gc = class extends q {
10187
10155
  }
10188
10156
  documentation(e) {
10189
10157
  return {
10190
- description: pc[e] ?? "This link type is not allowed by current configuration",
10158
+ description: dc[e] ?? "This link type is not allowed by current configuration",
10191
10159
  url: "https://html-validate.org/rules/allowed-links.html"
10192
10160
  };
10193
10161
  }
@@ -10215,7 +10183,7 @@ var gc = class extends q {
10215
10183
  isRelevant(e) {
10216
10184
  let { target: t, key: n, value: r } = e;
10217
10185
  if (r instanceof R) return !1;
10218
- let i = fc[t.tagName];
10186
+ let i = uc[t.tagName];
10219
10187
  return !!(i && i === n);
10220
10188
  }
10221
10189
  getStyle(e) {
@@ -10229,28 +10197,28 @@ var gc = class extends q {
10229
10197
  }
10230
10198
  handleAbsolute(e, t, n) {
10231
10199
  let { allowAbsolute: r } = this;
10232
- r !== !0 && (r === !1 ? this.report(t.target, "Link destination must not be absolute url", t.valueLocation, n) : hc(e, r) || this.report(t.target, "Absolute link to this destination is not allowed by current configuration", t.valueLocation, n));
10200
+ r !== !0 && (r === !1 ? this.report(t.target, "Link destination must not be absolute url", t.valueLocation, n) : pc(e, r) || this.report(t.target, "Absolute link to this destination is not allowed by current configuration", t.valueLocation, n));
10233
10201
  }
10234
10202
  handleExternal(e, t, n) {
10235
10203
  let { allowExternal: r } = this;
10236
- r !== !0 && (r === !1 ? this.report(t.target, "Link destination must not be external url", t.valueLocation, n) : hc(e, r) || this.report(t.target, "External link to this destination is not allowed by current configuration", t.valueLocation, n));
10204
+ r !== !0 && (r === !1 ? this.report(t.target, "Link destination must not be external url", t.valueLocation, n) : pc(e, r) || this.report(t.target, "External link to this destination is not allowed by current configuration", t.valueLocation, n));
10237
10205
  }
10238
10206
  handleRelativePath(e, t, n) {
10239
10207
  let { allowRelative: r } = this;
10240
- return r === !0 ? !1 : r === !1 ? (this.report(t.target, "Link destination must not be relative url", t.valueLocation, n), !0) : hc(e, r) ? !1 : (this.report(t.target, "Relative link to this destination is not allowed by current configuration", t.valueLocation, n), !0);
10208
+ return r === !0 ? !1 : r === !1 ? (this.report(t.target, "Link destination must not be relative url", t.valueLocation, n), !0) : pc(e, r) ? !1 : (this.report(t.target, "Relative link to this destination is not allowed by current configuration", t.valueLocation, n), !0);
10241
10209
  }
10242
10210
  handleRelativeBase(e, t, n) {
10243
10211
  let { allowBase: r } = this.options;
10244
10212
  this.handleRelativePath(e, t, n) || r || this.report(t.target, "Relative links must be relative to current folder", t.valueLocation, n);
10245
10213
  }
10246
- }, _c = { accessible: !0 };
10247
- function vc(e, t) {
10214
+ }, hc = { accessible: !0 };
10215
+ function gc(e, t) {
10248
10216
  return t.filter((t) => t.getAttributeValue("href") === e);
10249
10217
  }
10250
- function yc(e) {
10218
+ function _c(e) {
10251
10219
  return e.getAttributeValue("alt");
10252
10220
  }
10253
- function bc(e) {
10221
+ function vc(e) {
10254
10222
  switch (e) {
10255
10223
  case "missing-alt": return [
10256
10224
  "The `alt` attribute must be set (and not empty) when the `href` attribute is present on an `<area>` element.",
@@ -10267,10 +10235,10 @@ function bc(e) {
10267
10235
  ];
10268
10236
  }
10269
10237
  }
10270
- var xc = class extends q {
10238
+ var yc = class extends G {
10271
10239
  constructor(e) {
10272
10240
  super({
10273
- ..._c,
10241
+ ...hc,
10274
10242
  ...e
10275
10243
  });
10276
10244
  }
@@ -10279,7 +10247,7 @@ var xc = class extends q {
10279
10247
  }
10280
10248
  documentation(e) {
10281
10249
  return {
10282
- description: bc(e).join("\n"),
10250
+ description: vc(e).join("\n"),
10283
10251
  url: "https://html-validate.org/rules/area-alt.html"
10284
10252
  };
10285
10253
  }
@@ -10294,7 +10262,7 @@ var xc = class extends q {
10294
10262
  if (r) {
10295
10263
  if (io(i)) return;
10296
10264
  let a = e.getAttributeValue("href");
10297
- (n ? [yc(e)] : vc(a, t).map(yc)).some(Boolean) || this.report({
10265
+ (n ? [_c(e)] : gc(a, t).map(_c)).some(Boolean) || this.report({
10298
10266
  node: e,
10299
10267
  message: "\"alt\" attribute must be set and non-empty when the \"href\" attribute is present",
10300
10268
  location: i ? i.keyLocation : r.keyLocation,
@@ -10311,7 +10279,7 @@ var xc = class extends q {
10311
10279
  let { target: t } = e;
10312
10280
  return t.is("map");
10313
10281
  }
10314
- }, Sc = class extends q {
10282
+ }, bc = class extends G {
10315
10283
  documentation() {
10316
10284
  return {
10317
10285
  description: "`aria-hidden` must not be used on the `<body>` element as it makes the page inaccessible to assistive technology such as screenreaders",
@@ -10327,13 +10295,13 @@ var xc = class extends q {
10327
10295
  isRelevant(e) {
10328
10296
  return e.target.is("body");
10329
10297
  }
10330
- }, Cc = {
10298
+ }, xc = {
10331
10299
  allowAnyNamable: !1,
10332
10300
  elements: {
10333
10301
  include: null,
10334
10302
  exclude: null
10335
10303
  }
10336
- }, wc = /* @__PURE__ */ new Set([
10304
+ }, Sc = /* @__PURE__ */ new Set([
10337
10305
  "main",
10338
10306
  "nav",
10339
10307
  "table",
@@ -10353,13 +10321,13 @@ var xc = class extends q {
10353
10321
  "summary",
10354
10322
  "figure"
10355
10323
  ]);
10356
- function Tc(e, t) {
10357
- return !!(t.attributes["aria-label"] || wc.has(e.tagName) || e.hasAttribute("role") || e.hasAttribute("tabindex") || t.interactive || t.labelable);
10324
+ function Cc(e, t) {
10325
+ return !!(t.attributes["aria-label"] || Sc.has(e.tagName) || e.hasAttribute("role") || e.hasAttribute("tabindex") || t.interactive || t.labelable);
10358
10326
  }
10359
- var Ec = class extends q {
10327
+ var wc = class extends G {
10360
10328
  constructor(e) {
10361
10329
  super({
10362
- ...Cc,
10330
+ ...xc,
10363
10331
  ...e
10364
10332
  });
10365
10333
  }
@@ -10427,8 +10395,8 @@ var Ec = class extends q {
10427
10395
  validateElement(e, t, n) {
10428
10396
  if (!t.value || t.valueMatches("", !1)) return;
10429
10397
  let r = e.meta;
10430
- if (!r || this.shouldIgnoreElement(e) || Tc(e, r)) return;
10431
- let i = xs(e) === "allowed";
10398
+ if (!r || this.shouldIgnoreElement(e) || Cc(e, r)) return;
10399
+ let i = ys(e) === "allowed";
10432
10400
  if (i && this.options.allowAnyNamable) return;
10433
10401
  let a = {
10434
10402
  attr: n,
@@ -10447,16 +10415,16 @@ var Ec = class extends q {
10447
10415
  });
10448
10416
  }
10449
10417
  shouldIgnoreElement(e) {
10450
- return As(this.options.elements, e.tagName, ks);
10418
+ return Os(this.options.elements, e.tagName, Ds);
10451
10419
  }
10452
- }, J = class extends L {
10420
+ }, K = class extends L {
10453
10421
  constructor(e, t) {
10454
10422
  super(e, t), this.name = "ConfigError";
10455
10423
  }
10456
- }, Dc = class {
10424
+ }, Tc = class {
10457
10425
  styles;
10458
10426
  constructor(e, t) {
10459
- if (Array.isArray(e) || (e = [e]), e.length === 0) throw new J(`Missing style for ${t} rule`);
10427
+ if (Array.isArray(e) || (e = [e]), e.length === 0) throw new K(`Missing style for ${t} rule`);
10460
10428
  this.styles = this.parseStyle(e, t);
10461
10429
  }
10462
10430
  match(e) {
@@ -10492,20 +10460,20 @@ var Ec = class extends q {
10492
10460
  pattern: /^[a-z][A-Za-z]*$/,
10493
10461
  name: "camelCase"
10494
10462
  };
10495
- default: throw new J(`Invalid style "${e}" for ${t} rule`);
10463
+ default: throw new K(`Invalid style "${e}" for ${t} rule`);
10496
10464
  }
10497
10465
  });
10498
10466
  }
10499
- }, Oc = {
10467
+ }, Ec = {
10500
10468
  style: "lowercase",
10501
10469
  ignoreForeign: !0
10502
- }, kc = class extends q {
10470
+ }, Dc = class extends G {
10503
10471
  style;
10504
10472
  constructor(e) {
10505
10473
  super({
10506
- ...Oc,
10474
+ ...Ec,
10507
10475
  ...e
10508
- }), this.style = new Dc(this.options.style, "attr-case");
10476
+ }), this.style = new Tc(this.options.style, "attr-case");
10509
10477
  }
10510
10478
  static schema() {
10511
10479
  let e = [
@@ -10553,44 +10521,82 @@ var Ec = class extends q {
10553
10521
  isIgnored(e) {
10554
10522
  return this.options.ignoreForeign ? !!e.meta?.foreign : !1;
10555
10523
  }
10556
- }, Y = /* @__PURE__ */ ((e) => (e[e.UNICODE_BOM = 1] = "UNICODE_BOM", e[e.WHITESPACE = 2] = "WHITESPACE", e[e.DOCTYPE_OPEN = 3] = "DOCTYPE_OPEN", e[e.DOCTYPE_VALUE = 4] = "DOCTYPE_VALUE", e[e.DOCTYPE_CLOSE = 5] = "DOCTYPE_CLOSE", e[e.TAG_OPEN = 6] = "TAG_OPEN", e[e.TAG_CLOSE = 7] = "TAG_CLOSE", e[e.ATTR_NAME = 8] = "ATTR_NAME", e[e.ATTR_VALUE = 9] = "ATTR_VALUE", e[e.TEXT = 10] = "TEXT", e[e.TEMPLATING = 11] = "TEMPLATING", e[e.SCRIPT = 12] = "SCRIPT", e[e.STYLE = 13] = "STYLE", e[e.COMMENT = 14] = "COMMENT", e[e.CONDITIONAL = 15] = "CONDITIONAL", e[e.DIRECTIVE = 16] = "DIRECTIVE", e[e.EOF = 17] = "EOF", e))(Y || {}), Ac = /^\uFEFF/, jc = /^(?:\r\n|\r|\n|[ \t]+(?:\r\n|\r|\n)?)/, Mc = /^<!(DOCTYPE)\s/i, Nc = /^[^>]+/, Pc = /^>/, Fc = /^<\?xml.*?\?>\s+/, Ic = /^<(\/?)([a-zA-Z0-9\-_:]+)/, Lc = /^\/?>/, Rc = /^[^]*?(?=(?:[ \t]*(?:\r\n|\r|\n)|<[^ ]|$))/, zc = /^(?:<%.*?%>|<\?.*?\?>|<\$.*?\$>)/s, Bc = /^[^]*?(?=<|$)/, Vc = /^([^\t\r\n\f \/><"'=]+)/, Hc = /^(\s*=\s*)'([^']*?)(')/, Uc = /^(\s*=\s*)"([^"]*?)(")/, Wc = /^(\s*=\s*)([^\t\r\n\f "'<>][^\t\r\n\f <>]*)/, Gc = /^<!\[CDATA\[/, Kc = /^[^]*?]]>/, qc = /^[^]*?(?=<\/script)/, Jc = /^<(\/)(script)/, Yc = /^[^]*?(?=<\/style)/, Xc = /^<(\/)(style)/, Zc = /^[^]*?(?=<\/textarea)/, Qc = /^<(\/)(textarea)/, $c = /^[^]*?(?=<\/title)/, el = /^<(\/)(title)/, tl = /^(<!--\s*\[?)(html-validate-)([a-z0-9-]+)(\s*)(.*?)(]?\s*-->)/, nl = /^<!--([^]*?)-->/, rl = /^<!\[([^\]]*?)\]>/, il = class extends Error {
10524
+ }, q = /* @__PURE__ */ ((e) => (e[e.INITIAL = 1] = "INITIAL", e[e.DOCTYPE = 2] = "DOCTYPE", e[e.TEXT = 3] = "TEXT", e[e.TAG = 4] = "TAG", e[e.ATTR = 5] = "ATTR", e[e.CDATA = 6] = "CDATA", e[e.SCRIPT = 7] = "SCRIPT", e[e.STYLE = 8] = "STYLE", e[e.TEXTAREA = 9] = "TEXTAREA", e[e.TITLE = 10] = "TITLE", e))(q || {}), J = /* @__PURE__ */ ((e) => (e[e.TEXT = 1] = "TEXT", e[e.SCRIPT = 2] = "SCRIPT", e[e.STYLE = 3] = "STYLE", e[e.TEXTAREA = 4] = "TEXTAREA", e[e.TITLE = 5] = "TITLE", e))(J || {}), Oc = class {
10525
+ contentModel;
10526
+ state;
10527
+ string;
10528
+ filename;
10529
+ offset;
10530
+ line;
10531
+ column;
10532
+ constructor(e) {
10533
+ this.state = q.INITIAL, this.string = e.data, this.filename = e.filename, this.offset = e.offset, this.line = e.line, this.column = e.column, this.contentModel = 1;
10534
+ }
10535
+ getTruncatedLine(e = 13) {
10536
+ return JSON.stringify(this.string.length > e ? `${this.string.slice(0, 10)}...` : this.string);
10537
+ }
10538
+ consume(e, t) {
10539
+ let n = this.string.slice(0, e), r;
10540
+ for (; (r = n.indexOf("\n")) >= 0;) this.line++, this.column = 1, n = n.slice(r + 1);
10541
+ this.column += n.length, this.offset += e, this.string = this.string.slice(e), this.state = t;
10542
+ }
10543
+ getLocation(e) {
10544
+ return {
10545
+ filename: this.filename,
10546
+ offset: this.offset,
10547
+ line: this.line,
10548
+ column: this.column,
10549
+ size: e
10550
+ };
10551
+ }
10552
+ };
10553
+ function kc(e) {
10554
+ return {
10555
+ filename: "",
10556
+ offset: 0,
10557
+ line: 1,
10558
+ column: 1,
10559
+ ...e
10560
+ };
10561
+ }
10562
+ var Y = /* @__PURE__ */ ((e) => (e[e.UNICODE_BOM = 1] = "UNICODE_BOM", e[e.WHITESPACE = 2] = "WHITESPACE", e[e.DOCTYPE_OPEN = 3] = "DOCTYPE_OPEN", e[e.DOCTYPE_VALUE = 4] = "DOCTYPE_VALUE", e[e.DOCTYPE_CLOSE = 5] = "DOCTYPE_CLOSE", e[e.TAG_OPEN = 6] = "TAG_OPEN", e[e.TAG_CLOSE = 7] = "TAG_CLOSE", e[e.ATTR_NAME = 8] = "ATTR_NAME", e[e.ATTR_VALUE = 9] = "ATTR_VALUE", e[e.TEXT = 10] = "TEXT", e[e.TEMPLATING = 11] = "TEMPLATING", e[e.SCRIPT = 12] = "SCRIPT", e[e.STYLE = 13] = "STYLE", e[e.COMMENT = 14] = "COMMENT", e[e.CONDITIONAL = 15] = "CONDITIONAL", e[e.DIRECTIVE = 16] = "DIRECTIVE", e[e.EOF = 17] = "EOF", e))(Y || {}), Ac = /^\uFEFF/, jc = /^(?:\r\n|\r|\n|[\t ]+(?:\r\n|\r|\n)?)/, Mc = /^<!(doctype)\s/i, Nc = /^[^>]+/, Pc = /^>/, Fc = /^<\?xml.*?\?>\s+/, Ic = /^<(\/?)([\w:\-]+)/, Lc = /^\/?>/, Rc = /^[^]*?(?=(?:[\t ]*(?:\r\n|\r|\n)|<[^ ]|$))/, zc = /^(?:<%.*?%>|<\?.*?\?>|<\$.*?\$>)/s, Bc = /^[^]*?(?=<|$)/, Vc = /^([^\t\n\f\r "'/<=>]+)/, Hc = /^(\s*=\s*)'([^']*?)(')/, Uc = /^(\s*=\s*)"([^"]*?)(")/, Wc = /^(\s*=\s*)([^\t\n\f\r "'<>][^\t\n\f\r <>]*)/, Gc = /^<!\[CDATA\[/, Kc = /^[^]*?]]>/, qc = /^[^]*?(?=<\/script)/, Jc = /^<(\/)(script)/, Yc = /^[^]*?(?=<\/style)/, Xc = /^<(\/)(style)/, Zc = /^[^]*?(?=<\/textarea)/, Qc = /^<(\/)(textarea)/, $c = /^[^]*?(?=<\/title)/, el = /^<(\/)(title)/, tl = /^(<!--\s*\[?)(html-validate-)([\da-z-]+)(\s*)(.*?)(]?\s*-->)/, nl = /^<!--([^]*?)-->/, rl = /^<!\[([^\]]*?)]>/, il = class extends Error {
10557
10563
  location;
10558
10564
  constructor(e, t) {
10559
10565
  super(t), this.name = "InvalidTokenError", this.location = e;
10560
10566
  }
10561
10567
  }, al = class {
10562
10568
  *tokenize(e) {
10563
- let t = new lo(e), n = t.state, r = t.string.length;
10569
+ let t = new Oc(e), n = t.state, r = t.string.length;
10564
10570
  for (; t.string.length > 0;) {
10565
10571
  switch (t.state) {
10566
- case B.INITIAL:
10572
+ case q.INITIAL:
10567
10573
  yield* this.tokenizeInitial(t);
10568
10574
  break;
10569
- case B.DOCTYPE:
10575
+ case q.DOCTYPE:
10570
10576
  yield* this.tokenizeDoctype(t);
10571
10577
  break;
10572
- case B.TAG:
10578
+ case q.TAG:
10573
10579
  yield* this.tokenizeTag(t);
10574
10580
  break;
10575
- case B.ATTR:
10581
+ case q.ATTR:
10576
10582
  yield* this.tokenizeAttr(t);
10577
10583
  break;
10578
- case B.TEXT:
10584
+ case q.TEXT:
10579
10585
  yield* this.tokenizeText(t);
10580
10586
  break;
10581
- case B.CDATA:
10587
+ case q.CDATA:
10582
10588
  yield* this.tokenizeCDATA(t);
10583
10589
  break;
10584
- case B.SCRIPT:
10590
+ case q.SCRIPT:
10585
10591
  yield* this.tokenizeScript(t);
10586
10592
  break;
10587
- case B.STYLE:
10593
+ case q.STYLE:
10588
10594
  yield* this.tokenizeStyle(t);
10589
10595
  break;
10590
- case B.TEXTAREA:
10596
+ case q.TEXTAREA:
10591
10597
  yield* this.tokenizeTextarea(t);
10592
10598
  break;
10593
- case B.TITLE:
10599
+ case q.TITLE:
10594
10600
  yield* this.tokenizeTitle(t);
10595
10601
  break;
10596
10602
  /* istanbul ignore next: sanity check: should not happen unless adding new states */
@@ -10610,12 +10616,12 @@ var Ec = class extends q {
10610
10616
  }
10611
10617
  /* istanbul ignore next: used to provide a better error when an unhandled state happens */
10612
10618
  unhandled(e) {
10613
- let t = `failed to tokenize ${JSON.stringify(e.string.length > 13 ? `${e.string.slice(0, 15)}...` : e.string)}, unhandled state ${B[e.state]}.`;
10619
+ let t = `failed to tokenize ${JSON.stringify(e.string.length > 13 ? `${e.string.slice(0, 15)}...` : e.string)}, unhandled state ${q[e.state]}.`;
10614
10620
  throw new il(e.getLocation(1), t);
10615
10621
  }
10616
10622
  /* istanbul ignore next: used to provide a better error when lexer is detected to be stuck, no known way to reproduce */
10617
10623
  errorStuck(e) {
10618
- let t = B[e.state], n = `failed to tokenize ${e.getTruncatedLine()}, state ${t} failed to consume data or change state.`;
10624
+ let t = q[e.state], n = `failed to tokenize ${e.getTruncatedLine()}, state ${t} failed to consume data or change state.`;
10619
10625
  throw new il(e.getLocation(1), n);
10620
10626
  }
10621
10627
  evalNextState(e, t) {
@@ -10637,62 +10643,62 @@ var Ec = class extends q {
10637
10643
  throw new il(e.getLocation(1), i);
10638
10644
  }
10639
10645
  enter(e, t, n) {
10640
- if (t === B.TAG && n?.[0].startsWith("<")) switch (n[0]) {
10646
+ if (t === q.TAG && n?.[0].startsWith("<")) switch (n[0]) {
10641
10647
  case "<script":
10642
- e.contentModel = V.SCRIPT;
10648
+ e.contentModel = J.SCRIPT;
10643
10649
  break;
10644
10650
  case "<style":
10645
- e.contentModel = V.STYLE;
10651
+ e.contentModel = J.STYLE;
10646
10652
  break;
10647
10653
  case "<textarea":
10648
- e.contentModel = V.TEXTAREA;
10654
+ e.contentModel = J.TEXTAREA;
10649
10655
  break;
10650
10656
  case "<title":
10651
- e.contentModel = V.TITLE;
10657
+ e.contentModel = J.TITLE;
10652
10658
  break;
10653
- default: e.contentModel = V.TEXT;
10659
+ default: e.contentModel = J.TEXT;
10654
10660
  }
10655
10661
  }
10656
10662
  *tokenizeInitial(e) {
10657
10663
  yield* this.match(e, [
10658
10664
  [
10659
10665
  Ac,
10660
- B.INITIAL,
10666
+ q.INITIAL,
10661
10667
  Y.UNICODE_BOM
10662
10668
  ],
10663
10669
  [
10664
10670
  Fc,
10665
- B.INITIAL,
10671
+ q.INITIAL,
10666
10672
  !1
10667
10673
  ],
10668
10674
  [
10669
10675
  Mc,
10670
- B.DOCTYPE,
10676
+ q.DOCTYPE,
10671
10677
  Y.DOCTYPE_OPEN
10672
10678
  ],
10673
10679
  [
10674
10680
  jc,
10675
- B.INITIAL,
10681
+ q.INITIAL,
10676
10682
  Y.WHITESPACE
10677
10683
  ],
10678
10684
  [
10679
10685
  tl,
10680
- B.INITIAL,
10686
+ q.INITIAL,
10681
10687
  Y.DIRECTIVE
10682
10688
  ],
10683
10689
  [
10684
10690
  rl,
10685
- B.INITIAL,
10691
+ q.INITIAL,
10686
10692
  Y.CONDITIONAL
10687
10693
  ],
10688
10694
  [
10689
10695
  nl,
10690
- B.INITIAL,
10696
+ q.INITIAL,
10691
10697
  Y.COMMENT
10692
10698
  ],
10693
10699
  [
10694
10700
  !1,
10695
- B.TEXT,
10701
+ q.TEXT,
10696
10702
  !1
10697
10703
  ]
10698
10704
  ], "expected doctype");
@@ -10701,17 +10707,17 @@ var Ec = class extends q {
10701
10707
  yield* this.match(e, [
10702
10708
  [
10703
10709
  jc,
10704
- B.DOCTYPE,
10710
+ q.DOCTYPE,
10705
10711
  Y.WHITESPACE
10706
10712
  ],
10707
10713
  [
10708
10714
  Nc,
10709
- B.DOCTYPE,
10715
+ q.DOCTYPE,
10710
10716
  Y.DOCTYPE_VALUE
10711
10717
  ],
10712
10718
  [
10713
10719
  Pc,
10714
- B.TEXT,
10720
+ q.TEXT,
10715
10721
  Y.DOCTYPE_CLOSE
10716
10722
  ]
10717
10723
  ], "expected doctype name");
@@ -10720,11 +10726,11 @@ var Ec = class extends q {
10720
10726
  function t(t) {
10721
10727
  let n = t, r = n && !n.data[0].startsWith("/");
10722
10728
  switch (e.contentModel) {
10723
- case V.TEXT: return B.TEXT;
10724
- case V.SCRIPT: return r ? B.SCRIPT : B.TEXT;
10725
- case V.STYLE: return r ? B.STYLE : B.TEXT;
10726
- case V.TEXTAREA: return r ? B.TEXTAREA : B.TEXT;
10727
- case V.TITLE: return r ? B.TITLE : B.TEXT;
10729
+ case J.TEXT: return q.TEXT;
10730
+ case J.SCRIPT: return r ? q.SCRIPT : q.TEXT;
10731
+ case J.STYLE: return r ? q.STYLE : q.TEXT;
10732
+ case J.TEXTAREA: return r ? q.TEXTAREA : q.TEXT;
10733
+ case J.TITLE: return r ? q.TITLE : q.TEXT;
10728
10734
  }
10729
10735
  }
10730
10736
  yield* this.match(e, [
@@ -10735,12 +10741,12 @@ var Ec = class extends q {
10735
10741
  ],
10736
10742
  [
10737
10743
  Vc,
10738
- B.ATTR,
10744
+ q.ATTR,
10739
10745
  Y.ATTR_NAME
10740
10746
  ],
10741
10747
  [
10742
10748
  jc,
10743
- B.TAG,
10749
+ q.TAG,
10744
10750
  Y.WHITESPACE
10745
10751
  ]
10746
10752
  ], "expected attribute, \">\" or \"/>\"");
@@ -10749,22 +10755,22 @@ var Ec = class extends q {
10749
10755
  yield* this.match(e, [
10750
10756
  [
10751
10757
  Hc,
10752
- B.TAG,
10758
+ q.TAG,
10753
10759
  Y.ATTR_VALUE
10754
10760
  ],
10755
10761
  [
10756
10762
  Uc,
10757
- B.TAG,
10763
+ q.TAG,
10758
10764
  Y.ATTR_VALUE
10759
10765
  ],
10760
10766
  [
10761
10767
  Wc,
10762
- B.TAG,
10768
+ q.TAG,
10763
10769
  Y.ATTR_VALUE
10764
10770
  ],
10765
10771
  [
10766
10772
  !1,
10767
- B.TAG,
10773
+ q.TAG,
10768
10774
  !1
10769
10775
  ]
10770
10776
  ], "expected attribute, \">\" or \"/>\"");
@@ -10773,47 +10779,47 @@ var Ec = class extends q {
10773
10779
  yield* this.match(e, [
10774
10780
  [
10775
10781
  jc,
10776
- B.TEXT,
10782
+ q.TEXT,
10777
10783
  Y.WHITESPACE
10778
10784
  ],
10779
10785
  [
10780
10786
  Gc,
10781
- B.CDATA,
10787
+ q.CDATA,
10782
10788
  !1
10783
10789
  ],
10784
10790
  [
10785
10791
  tl,
10786
- B.TEXT,
10792
+ q.TEXT,
10787
10793
  Y.DIRECTIVE
10788
10794
  ],
10789
10795
  [
10790
10796
  rl,
10791
- B.TEXT,
10797
+ q.TEXT,
10792
10798
  Y.CONDITIONAL
10793
10799
  ],
10794
10800
  [
10795
10801
  nl,
10796
- B.TEXT,
10802
+ q.TEXT,
10797
10803
  Y.COMMENT
10798
10804
  ],
10799
10805
  [
10800
10806
  zc,
10801
- B.TEXT,
10807
+ q.TEXT,
10802
10808
  Y.TEMPLATING
10803
10809
  ],
10804
10810
  [
10805
10811
  Ic,
10806
- B.TAG,
10812
+ q.TAG,
10807
10813
  Y.TAG_OPEN
10808
10814
  ],
10809
10815
  [
10810
10816
  Rc,
10811
- B.TEXT,
10817
+ q.TEXT,
10812
10818
  Y.TEXT
10813
10819
  ],
10814
10820
  [
10815
10821
  Bc,
10816
- B.TEXT,
10822
+ q.TEXT,
10817
10823
  Y.TEXT
10818
10824
  ]
10819
10825
  ], "expected text or \"<\"");
@@ -10821,55 +10827,55 @@ var Ec = class extends q {
10821
10827
  *tokenizeCDATA(e) {
10822
10828
  yield* this.match(e, [[
10823
10829
  Kc,
10824
- B.TEXT,
10830
+ q.TEXT,
10825
10831
  !1
10826
10832
  ]], "expected ]]>");
10827
10833
  }
10828
10834
  *tokenizeScript(e) {
10829
10835
  yield* this.match(e, [[
10830
10836
  Jc,
10831
- B.TAG,
10837
+ q.TAG,
10832
10838
  Y.TAG_OPEN
10833
10839
  ], [
10834
10840
  qc,
10835
- B.SCRIPT,
10841
+ q.SCRIPT,
10836
10842
  Y.SCRIPT
10837
10843
  ]], "expected <\/script>");
10838
10844
  }
10839
10845
  *tokenizeStyle(e) {
10840
10846
  yield* this.match(e, [[
10841
10847
  Xc,
10842
- B.TAG,
10848
+ q.TAG,
10843
10849
  Y.TAG_OPEN
10844
10850
  ], [
10845
10851
  Yc,
10846
- B.STYLE,
10852
+ q.STYLE,
10847
10853
  Y.STYLE
10848
10854
  ]], "expected </style>");
10849
10855
  }
10850
10856
  *tokenizeTextarea(e) {
10851
10857
  yield* this.match(e, [[
10852
10858
  Qc,
10853
- B.TAG,
10859
+ q.TAG,
10854
10860
  Y.TAG_OPEN
10855
10861
  ], [
10856
10862
  Zc,
10857
- B.TEXTAREA,
10863
+ q.TEXTAREA,
10858
10864
  Y.TEXT
10859
10865
  ]], "expected </textarea>");
10860
10866
  }
10861
10867
  *tokenizeTitle(e) {
10862
10868
  yield* this.match(e, [[
10863
10869
  el,
10864
- B.TAG,
10870
+ q.TAG,
10865
10871
  Y.TAG_OPEN
10866
10872
  ], [
10867
10873
  $c,
10868
- B.TITLE,
10874
+ q.TITLE,
10869
10875
  Y.TEXT
10870
10876
  ]], "expected </title>");
10871
10877
  }
10872
- }, ol = /(\s+)/, sl = class extends q {
10878
+ }, ol = /(\s+)/, sl = class extends G {
10873
10879
  documentation() {
10874
10880
  return {
10875
10881
  description: "Attribute value must not be separated by whitespace.",
@@ -10904,7 +10910,7 @@ function dl(e, t) {
10904
10910
  ...t.map((e) => `- \`/${e}/\``)
10905
10911
  ].join("\n") : `Attribute "${e}" should match the regular expression \`/${t}/\``;
10906
10912
  }
10907
- var fl = class extends q {
10913
+ var fl = class extends G {
10908
10914
  pattern;
10909
10915
  constructor(e) {
10910
10916
  super({
@@ -10970,7 +10976,7 @@ function hl(e, t) {
10970
10976
  return t && n.push("- unquoted (if applicable)"), `${n.join(" or\n")}
10971
10977
  `;
10972
10978
  }
10973
- var gl = class extends q {
10979
+ var gl = class extends G {
10974
10980
  style;
10975
10981
  static schema() {
10976
10982
  return {
@@ -11042,10 +11048,10 @@ function _l(e) {
11042
11048
  case "single": return "'";
11043
11049
  case "any": return "any";
11044
11050
  /* istanbul ignore next: covered by schema validation */
11045
- default: throw new J(`Invalid style "${e}" for "attr-quotes" rule`);
11051
+ default: throw new K(`Invalid style "${e}" for "attr-quotes" rule`);
11046
11052
  }
11047
11053
  }
11048
- var vl = class extends q {
11054
+ var vl = class extends G {
11049
11055
  documentation() {
11050
11056
  return {
11051
11057
  description: "No space between attributes. At least one whitespace character (commonly space) must be used to separate attributes.",
@@ -11063,7 +11069,7 @@ function yl(e) {
11063
11069
  let t = {};
11064
11070
  return e.enum !== void 0 && (t.enum = e.enum), e.boolean !== void 0 && (t.boolean = e.boolean), t;
11065
11071
  }
11066
- var bl = class extends q {
11072
+ var bl = class extends G {
11067
11073
  documentation(e) {
11068
11074
  let t = {
11069
11075
  description: "Attribute has invalid value.",
@@ -11084,10 +11090,10 @@ var bl = class extends q {
11084
11090
  setup() {
11085
11091
  this.on("dom:ready", (e) => {
11086
11092
  let t = e.document;
11087
- G.depthFirst(t, (e) => {
11093
+ U.depthFirst(t, (e) => {
11088
11094
  let t = e.meta;
11089
11095
  if (t?.attributes) for (let n of e.attributes) {
11090
- if (ds.validateAttribute(n, t.attributes)) continue;
11096
+ if (ls.validateAttribute(n, t.attributes)) continue;
11091
11097
  let r = n.value ? n.value.toString() : "", i = {
11092
11098
  element: e.tagName,
11093
11099
  attribute: n.key,
@@ -11106,7 +11112,7 @@ var bl = class extends q {
11106
11112
  getLocation(e) {
11107
11113
  return e.valueLocation ?? e.keyLocation;
11108
11114
  }
11109
- }, xl = { style: "omit" }, Sl = class extends q {
11115
+ }, xl = { style: "omit" }, Sl = class extends G {
11110
11116
  hasInvalidStyle;
11111
11117
  constructor(e) {
11112
11118
  super({
@@ -11133,7 +11139,7 @@ var bl = class extends q {
11133
11139
  setup() {
11134
11140
  this.on("dom:ready", (e) => {
11135
11141
  let t = e.document;
11136
- G.depthFirst(t, (e) => {
11142
+ U.depthFirst(t, (e) => {
11137
11143
  let t = e.meta;
11138
11144
  if (t?.attributes) for (let n of e.attributes) this.isBoolean(n, t.attributes) && (n.originalAttribute || this.hasInvalidStyle(n) && this.report(e, wl(n, this.options.style), n.keyLocation));
11139
11145
  });
@@ -11161,7 +11167,7 @@ function wl(e, t) {
11161
11167
  }
11162
11168
  return "";
11163
11169
  }
11164
- var Tl = { style: "omit" }, El = class extends q {
11170
+ var Tl = { style: "omit" }, El = class extends G {
11165
11171
  hasInvalidStyle;
11166
11172
  constructor(e) {
11167
11173
  super({
@@ -11184,7 +11190,7 @@ var Tl = { style: "omit" }, El = class extends q {
11184
11190
  setup() {
11185
11191
  this.on("dom:ready", (e) => {
11186
11192
  let t = e.document;
11187
- G.depthFirst(t, (e) => {
11193
+ U.depthFirst(t, (e) => {
11188
11194
  let t = e.meta;
11189
11195
  if (t?.attributes) for (let n of e.attributes) Dl(n, t.attributes) && Ol(n) && this.hasInvalidStyle(n) && this.report(e, Al(n, this.options.style), n.keyLocation);
11190
11196
  });
@@ -11217,7 +11223,7 @@ function jl(e) {
11217
11223
  let { tagName: t, attr: n, details: r } = e;
11218
11224
  return `The \`${n}\` attribute cannot be used on \`${t}\` in this context: ${r}`;
11219
11225
  }
11220
- var Ml = class extends q {
11226
+ var Ml = class extends G {
11221
11227
  documentation(e) {
11222
11228
  return {
11223
11229
  description: jl(e),
@@ -11255,7 +11261,7 @@ function Pl(e) {
11255
11261
  function Fl(e) {
11256
11262
  return e.startsWith("section-") || e === "shipping" || e === "billing";
11257
11263
  }
11258
- var Il = class extends q {
11264
+ var Il = class extends G {
11259
11265
  preferred;
11260
11266
  constructor(e) {
11261
11267
  super({
@@ -11305,7 +11311,7 @@ var Il = class extends q {
11305
11311
  return;
11306
11312
  }
11307
11313
  if (r.isDynamic || !r.value) return;
11308
- let i = new H(r.value.toString().toLowerCase(), r.valueLocation), a = i.findIndex((e) => !Fl(e)), o = i.item(a), s = i.location(a);
11314
+ let i = new B(r.value.toString().toLowerCase(), r.valueLocation), a = i.findIndex((e) => !Fl(e)), o = i.item(a), s = i.location(a);
11309
11315
  if (o) {
11310
11316
  if (o === "off") {
11311
11317
  this.report({
@@ -11350,16 +11356,16 @@ function zl(e) {
11350
11356
  };
11351
11357
  switch (e) {
11352
11358
  case "kebabcase": return {
11353
- regexp: /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,
11359
+ regexp: /^[a-z][\da-z]*(?:-[\da-z]+)*$/,
11354
11360
  description: e
11355
11361
  };
11356
11362
  case "camelcase": return {
11357
- regexp: /^[a-z][a-zA-Z0-9]*$/,
11363
+ regexp: /^[a-z][\dA-Za-z]*$/,
11358
11364
  description: e
11359
11365
  };
11360
11366
  case "snakecase":
11361
11367
  case "underscore": return {
11362
- regexp: /^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/,
11368
+ regexp: /^[a-z][\da-z]*(?:_[\da-z]+)*$/,
11363
11369
  description: e
11364
11370
  };
11365
11371
  case "bem": return {
@@ -11367,7 +11373,7 @@ function zl(e) {
11367
11373
  description: e
11368
11374
  };
11369
11375
  case "tailwind": return {
11370
- regexp: /^!?(?:[-a-z[]|\d+xl:)[\w\-:./\\[\]()#'&>,!=%]*$/,
11376
+ regexp: /^!?(?:[[a-z-]|\d+xl:)[\w!#%&'(),./:=>[\\\]-]*$/,
11371
11377
  description: "tailwind"
11372
11378
  };
11373
11379
  default: {
@@ -11397,7 +11403,7 @@ function Vl(e, t, n) {
11397
11403
  throw Error(`Pattern ${i} cannot be used with "${n}". Allowed patterns: ${a}`);
11398
11404
  }
11399
11405
  }
11400
- var Hl = class extends q {
11406
+ var Hl = class extends G {
11401
11407
  attr;
11402
11408
  patterns;
11403
11409
  constructor({ ruleId: e, attr: t, options: n, allowedPatterns: r }) {
@@ -11463,11 +11469,11 @@ var Hl = class extends q {
11463
11469
  this.on("attr", (e) => {
11464
11470
  let { target: t, key: n, value: r, valueLocation: i } = e;
11465
11471
  if (n.toLowerCase() !== "class") return;
11466
- let a = new H(r, i);
11472
+ let a = new B(r, i);
11467
11473
  for (let { item: e, location: n } of a.iterator()) this.validateValue(t, e, n);
11468
11474
  });
11469
11475
  }
11470
- }, Gl = class extends q {
11476
+ }, Gl = class extends G {
11471
11477
  documentation() {
11472
11478
  return {
11473
11479
  description: "HTML disallows end tags to have attributes.",
@@ -11495,7 +11501,7 @@ function ql(e, t) {
11495
11501
  for (let n of Kl(e)) if (t(n)) return n;
11496
11502
  return null;
11497
11503
  }
11498
- var Jl = class extends q {
11504
+ var Jl = class extends G {
11499
11505
  documentation() {
11500
11506
  return {
11501
11507
  description: "HTML requires elements to be closed in the same order as they were opened.",
@@ -11511,7 +11517,7 @@ var Jl = class extends q {
11511
11517
  if (!n) for (let t of Kl(r)) t.isRootElement() || e.has(t.unique) || (this.report(t, `Unclosed element '<${t.tagName}>'`, t.location), e.add(t.unique));
11512
11518
  }), this.on("tag:end", (t) => {
11513
11519
  let n = t.target, r = t.previous;
11514
- if (!n || n.voidElement || r.closed === W.ImplicitClosed) return;
11520
+ if (!n || n.voidElement || r.closed === H.ImplicitClosed) return;
11515
11521
  if (r.isRootElement()) {
11516
11522
  let e = {
11517
11523
  filename: n.location.filename,
@@ -11537,7 +11543,7 @@ var Jl = class extends q {
11537
11543
  }, Yl = {
11538
11544
  include: null,
11539
11545
  exclude: null
11540
- }, Xl = class extends q {
11546
+ }, Xl = class extends G {
11541
11547
  constructor(e) {
11542
11548
  super({
11543
11549
  ...Yl,
@@ -11639,7 +11645,7 @@ ${n.join("\n")}`);
11639
11645
  }
11640
11646
  return e.url && t.push(`For details see: ${e.url}`), t.join("\n\n");
11641
11647
  }
11642
- var iu = class extends q {
11648
+ var iu = class extends G {
11643
11649
  deprecatedMap;
11644
11650
  constructor(e) {
11645
11651
  super({
@@ -11676,7 +11682,7 @@ var iu = class extends q {
11676
11682
  }
11677
11683
  setup() {
11678
11684
  this.on("attr", eu, (e) => {
11679
- let { value: t, valueLocation: n, target: r } = e, i = new H(t, n);
11685
+ let { value: t, valueLocation: n, target: r } = e, i = new B(t, n);
11680
11686
  for (let { item: e, location: t } of i.iterator()) {
11681
11687
  let n = this.deprecatedMap.get(e);
11682
11688
  if (!n) continue;
@@ -11695,7 +11701,7 @@ var iu = class extends q {
11695
11701
  }
11696
11702
  });
11697
11703
  }
11698
- }, au = class extends q {
11704
+ }, au = class extends G {
11699
11705
  documentation(e) {
11700
11706
  return {
11701
11707
  description: `${e ? `The rule "${e}"` : "This rule"} is deprecated and should not be used any longer, consult documentation for further information.`,
@@ -11704,13 +11710,13 @@ var iu = class extends q {
11704
11710
  }
11705
11711
  setup() {
11706
11712
  this.on("config:ready", (e) => {
11707
- for (let t of this.getDeprecatedRules(e)) t.getSeverity() > ms.DISABLED && this.report(null, `Usage of deprecated rule "${t.name}"`, null, t.name);
11713
+ for (let t of this.getDeprecatedRules(e)) t.getSeverity() > fs.DISABLED && this.report(null, `Usage of deprecated rule "${t.name}"`, null, t.name);
11708
11714
  });
11709
11715
  }
11710
11716
  getDeprecatedRules(e) {
11711
11717
  return Object.values(e.rules).filter((e) => e.deprecated);
11712
11718
  }
11713
- }, ou = class extends q {
11719
+ }, ou = class extends G {
11714
11720
  documentation() {
11715
11721
  return {
11716
11722
  description: [
@@ -11728,7 +11734,7 @@ var iu = class extends q {
11728
11734
  e.value.toLowerCase() !== "html" && this.report(null, "doctype should be \"html\"", e.valueLocation);
11729
11735
  });
11730
11736
  }
11731
- }, su = { style: "uppercase" }, cu = class extends q {
11737
+ }, su = { style: "uppercase" }, cu = class extends G {
11732
11738
  constructor(e) {
11733
11739
  super({
11734
11740
  ...su,
@@ -11752,13 +11758,13 @@ var iu = class extends q {
11752
11758
  this.options.style === "uppercase" && e.tag !== "DOCTYPE" && this.report(null, "DOCTYPE should be uppercase", e.location, this.options), this.options.style === "lowercase" && e.tag !== "doctype" && this.report(null, "DOCTYPE should be lowercase", e.location, this.options);
11753
11759
  });
11754
11760
  }
11755
- }, lu = { style: "lowercase" }, uu = class extends q {
11761
+ }, lu = { style: "lowercase" }, uu = class extends G {
11756
11762
  style;
11757
11763
  constructor(e) {
11758
11764
  super({
11759
11765
  ...lu,
11760
11766
  ...e
11761
- }), this.style = new Dc(this.options.style, "element-case");
11767
+ }), this.style = new Tc(this.options.style, "element-case");
11762
11768
  }
11763
11769
  static schema() {
11764
11770
  let e = [
@@ -11812,7 +11818,7 @@ var iu = class extends q {
11812
11818
  pattern: "^[a-z][a-z0-9\\-._]*-[a-z0-9\\-._]*$",
11813
11819
  whitelist: [],
11814
11820
  blacklist: []
11815
- }, fu = class extends q {
11821
+ }, fu = class extends G {
11816
11822
  pattern;
11817
11823
  constructor(e) {
11818
11824
  super({
@@ -11874,7 +11880,7 @@ function pu(e) {
11874
11880
  return n ? !!(t === "template" && n.templateRoot && n.scriptSupporting) : !1;
11875
11881
  }
11876
11882
  function mu(e, t) {
11877
- return typeof t == "boolean" ? e.childElements : e.childElements.filter((e) => t.some((t) => ds.validatePermittedCategory(e, t, !1)));
11883
+ return typeof t == "boolean" ? e.childElements : e.childElements.filter((e) => t.some((t) => ls.validatePermittedCategory(e, t, !1)));
11878
11884
  }
11879
11885
  function hu(e) {
11880
11886
  switch (e.kind) {
@@ -11882,7 +11888,7 @@ function hu(e) {
11882
11888
  case "descendant": return [`The \`${e.child}\` element is not permitted as a descendant of the \`${e.ancestor}\` element.`];
11883
11889
  }
11884
11890
  }
11885
- var gu = class extends q {
11891
+ var gu = class extends G {
11886
11892
  documentation(e) {
11887
11893
  return {
11888
11894
  description: hu(e).join("\n"),
@@ -11892,7 +11898,7 @@ var gu = class extends q {
11892
11898
  setup() {
11893
11899
  this.on("dom:ready", (e) => {
11894
11900
  let t = e.document;
11895
- G.depthFirst(t, (e) => {
11901
+ U.depthFirst(t, (e) => {
11896
11902
  let t = e.parent;
11897
11903
  t && [() => this.validatePermittedContent(e, t), () => this.validatePermittedDescendant(e, t)].some((e) => e());
11898
11904
  });
@@ -11904,7 +11910,7 @@ var gu = class extends q {
11904
11910
  return this.validatePermittedContentImpl(e, t, n);
11905
11911
  }
11906
11912
  validatePermittedContentImpl(e, t, n) {
11907
- if (!ds.validatePermitted(e, n)) {
11913
+ if (!ls.validatePermitted(e, n)) {
11908
11914
  let n = `<${e.tagName}>`, r = `${n} element is not permitted as content under ${t.annotatedName}`, i = {
11909
11915
  kind: "content",
11910
11916
  parent: t.annotatedName,
@@ -11919,7 +11925,7 @@ var gu = class extends q {
11919
11925
  let t = n.meta;
11920
11926
  if (!t) continue;
11921
11927
  let r = t.permittedDescendants;
11922
- if (!r || ds.validatePermitted(e, r)) continue;
11928
+ if (!r || ls.validatePermitted(e, r)) continue;
11923
11929
  let i = `<${e.tagName}>`, a = n.annotatedName, o = `${i} element is not permitted as a descendant of ${a}`, s = {
11924
11930
  kind: "descendant",
11925
11931
  ancestor: a,
@@ -11929,7 +11935,7 @@ var gu = class extends q {
11929
11935
  }
11930
11936
  return !1;
11931
11937
  }
11932
- }, _u = class extends q {
11938
+ }, _u = class extends G {
11933
11939
  documentation() {
11934
11940
  return {
11935
11941
  description: "Some elements may only be used a fixed amount of times in given context.",
@@ -11939,16 +11945,16 @@ var gu = class extends q {
11939
11945
  setup() {
11940
11946
  this.on("dom:ready", (e) => {
11941
11947
  let t = e.document;
11942
- G.depthFirst(t, (e) => {
11948
+ U.depthFirst(t, (e) => {
11943
11949
  if (!e.meta) return;
11944
11950
  let t = e.meta.permittedContent;
11945
- t && ds.validateOccurrences(e.childElements, t, (t, n) => {
11951
+ t && ls.validateOccurrences(e.childElements, t, (t, n) => {
11946
11952
  this.report(t, `Element <${n}> can only appear once under ${e.annotatedName}`);
11947
11953
  });
11948
11954
  });
11949
11955
  });
11950
11956
  }
11951
- }, vu = class extends q {
11957
+ }, vu = class extends G {
11952
11958
  documentation() {
11953
11959
  return {
11954
11960
  description: "Some elements has a specific order the children must use.",
@@ -11958,10 +11964,10 @@ var gu = class extends q {
11958
11964
  setup() {
11959
11965
  this.on("dom:ready", (e) => {
11960
11966
  let t = e.document;
11961
- G.depthFirst(t, (e) => {
11967
+ U.depthFirst(t, (e) => {
11962
11968
  if (!e.meta) return;
11963
11969
  let t = e.meta.permittedOrder;
11964
- t && ds.validateOrder(e.childElements, t, (e, t) => {
11970
+ t && ls.validateOrder(e.childElements, t, (e, t) => {
11965
11971
  this.report(e, `Element <${e.tagName}> must be used before <${t.tagName}> in this context`);
11966
11972
  });
11967
11973
  });
@@ -11994,7 +12000,7 @@ function wu(e, t, n) {
11994
12000
  let r = e.annotatedName, i = t.annotatedName;
11995
12001
  return Su(n) ? `${r} element requires a ${E(n.filter(yu).map(xu))} element as parent` : `${r} element cannot have ${i} element as parent`;
11996
12002
  }
11997
- var Tu = class extends q {
12003
+ var Tu = class extends G {
11998
12004
  documentation(e) {
11999
12005
  return {
12000
12006
  description: Cu(e).join("\n"),
@@ -12004,11 +12010,11 @@ var Tu = class extends q {
12004
12010
  setup() {
12005
12011
  this.on("dom:ready", (e) => {
12006
12012
  let t = e.document;
12007
- G.depthFirst(t, (e) => {
12013
+ U.depthFirst(t, (e) => {
12008
12014
  let t = e.parent;
12009
12015
  if (!t || t.isRootElement() || t.tagName === e.tagName) return;
12010
12016
  let n = e.meta?.permittedParent;
12011
- if (!n || ds.validatePermitted(t, n)) return;
12017
+ if (!n || ls.validatePermitted(t, n)) return;
12012
12018
  let r = wu(e, t, n), i = {
12013
12019
  parent: t.annotatedName,
12014
12020
  child: e.annotatedName,
@@ -12020,13 +12026,13 @@ var Tu = class extends q {
12020
12026
  }
12021
12027
  };
12022
12028
  function Eu(e) {
12023
- return /^[a-zA-Z0-9-]+$/.test(e);
12029
+ return /^[\dA-Za-z-]+$/.test(e);
12024
12030
  }
12025
12031
  function Du(e) {
12026
12032
  let t = e.ancestor.map((e) => `\`${e}\``);
12027
12033
  return [`The \`${e.child}\` element requires a ${E(t)} ancestor.`];
12028
12034
  }
12029
- var Ou = class extends q {
12035
+ var Ou = class extends G {
12030
12036
  documentation(e) {
12031
12037
  return {
12032
12038
  description: Du(e).join("\n"),
@@ -12036,7 +12042,7 @@ var Ou = class extends q {
12036
12042
  setup() {
12037
12043
  this.on("dom:ready", (e) => {
12038
12044
  let t = e.document;
12039
- G.depthFirst(t, (e) => {
12045
+ U.depthFirst(t, (e) => {
12040
12046
  e.parent && this.validateRequiredAncestors(e);
12041
12047
  });
12042
12048
  });
@@ -12044,7 +12050,7 @@ var Ou = class extends q {
12044
12050
  validateRequiredAncestors(e) {
12045
12051
  if (!e.meta) return;
12046
12052
  let t = e.meta.requiredAncestors;
12047
- if (!t || ds.validateAncestors(e, t)) return;
12053
+ if (!t || ls.validateAncestors(e, t)) return;
12048
12054
  let n = t.map((e) => Eu(e) ? `<${e}>` : `"${e}"`), r = `<${e.tagName}>`, i = `<${e.tagName}> element requires a ${E(n)} ancestor`, a = {
12049
12055
  ancestor: n,
12050
12056
  child: r
@@ -12066,7 +12072,7 @@ function Au(e, t) {
12066
12072
  }
12067
12073
  } else return n ? ku : !1;
12068
12074
  }
12069
- var ju = class extends q {
12075
+ var ju = class extends G {
12070
12076
  documentation(e) {
12071
12077
  return {
12072
12078
  description: `The \`${e.tagName}\` element is required to have a \`${e.attr}\` attribute.`,
@@ -12099,7 +12105,7 @@ var ju = class extends q {
12099
12105
  function Mu(e) {
12100
12106
  return e.startsWith("@");
12101
12107
  }
12102
- var Nu = class extends q {
12108
+ var Nu = class extends G {
12103
12109
  documentation(e) {
12104
12110
  let { element: t, missing: n } = e;
12105
12111
  return {
@@ -12110,10 +12116,10 @@ var Nu = class extends q {
12110
12116
  setup() {
12111
12117
  this.on("dom:ready", (e) => {
12112
12118
  let t = e.document;
12113
- G.depthFirst(t, (e) => {
12119
+ U.depthFirst(t, (e) => {
12114
12120
  if (!e.meta) return;
12115
12121
  let t = e.meta.requiredContent;
12116
- if (t) for (let n of ds.validateRequiredContent(e, t)) {
12122
+ if (t) for (let n of ls.validateRequiredContent(e, t)) {
12117
12123
  let t = {
12118
12124
  element: e.annotatedName,
12119
12125
  missing: `<${n}>`
@@ -12132,9 +12138,9 @@ var Nu = class extends q {
12132
12138
  "h6"
12133
12139
  ].join(",");
12134
12140
  function Fu(e) {
12135
- return e.is("img") ? tc(e) : e.is("svg") ? e.textContent.trim() !== "" : !1;
12141
+ return e.is("img") ? $s(e) : e.is("svg") ? e.textContent.trim() !== "" : !1;
12136
12142
  }
12137
- var Iu = class extends q {
12143
+ var Iu = class extends G {
12138
12144
  documentation() {
12139
12145
  return {
12140
12146
  description: "Assistive technology such as screen readers require textual content in headings. Whitespace only is considered empty.",
@@ -12150,15 +12156,15 @@ var Iu = class extends q {
12150
12156
  validateHeading(e) {
12151
12157
  let t = e.querySelectorAll("img, svg");
12152
12158
  for (let e of t) if (Fu(e)) return;
12153
- switch ($s(e, { ignoreHiddenRoot: !0 })) {
12154
- case K.DYNAMIC_TEXT:
12155
- case K.STATIC_TEXT: break;
12156
- case K.EMPTY_TEXT:
12159
+ switch (Zs(e, { ignoreHiddenRoot: !0 })) {
12160
+ case W.DYNAMIC_TEXT:
12161
+ case W.STATIC_TEXT: break;
12162
+ case W.EMPTY_TEXT:
12157
12163
  this.report(e, `<${e.tagName}> cannot be empty, must have text content`);
12158
12164
  break;
12159
12165
  }
12160
12166
  }
12161
- }, Lu = class extends q {
12167
+ }, Lu = class extends G {
12162
12168
  documentation() {
12163
12169
  return {
12164
12170
  description: [
@@ -12175,10 +12181,10 @@ var Iu = class extends q {
12175
12181
  setup() {
12176
12182
  this.on("tag:end", (e) => {
12177
12183
  let t = e.previous;
12178
- if (t.tagName === "title") switch ($s(t)) {
12179
- case K.DYNAMIC_TEXT:
12180
- case K.STATIC_TEXT: break;
12181
- case K.EMPTY_TEXT: {
12184
+ if (t.tagName === "title") switch (Zs(t)) {
12185
+ case W.DYNAMIC_TEXT:
12186
+ case W.STATIC_TEXT: break;
12187
+ case W.EMPTY_TEXT: {
12182
12188
  let e = `<${t.tagName}> cannot be empty, must have text content`;
12183
12189
  this.report(t, e, t.location);
12184
12190
  break;
@@ -12197,7 +12203,7 @@ var Iu = class extends q {
12197
12203
  ]
12198
12204
  }, zu = /* @__PURE__ */ Symbol("form-elements-unique"), Bu = /* @__PURE__ */ Symbol("form-elements-shared");
12199
12205
  function Vu(e) {
12200
- return !(Bs(e) || Hs(e) || Cs(e));
12206
+ return !(Rs(e) || Bs(e) || xs(e));
12201
12207
  }
12202
12208
  function Hu(e) {
12203
12209
  return typeof e == "string" && e !== "";
@@ -12227,7 +12233,7 @@ function Ju(e) {
12227
12233
  case "mix": return ["Form control name cannot mix regular name \"{{ name }}\" with array brackets \"{{ name }}[]\"", t].join("\n");
12228
12234
  }
12229
12235
  }
12230
- var Yu = class extends q {
12236
+ var Yu = class extends G {
12231
12237
  constructor(e) {
12232
12238
  super({
12233
12239
  ...Ru,
@@ -12259,7 +12265,7 @@ var Yu = class extends q {
12259
12265
  setup() {
12260
12266
  let e = this.getSelector(), { shared: t } = this.options;
12261
12267
  this.on("dom:ready", (n) => {
12262
- let { document: r } = n, [i, a] = rc(r.querySelectorAll(e).filter(Vu), (e) => Uu(e, t));
12268
+ let { document: r } = n, [i, a] = tc(r.querySelectorAll(e).filter(Vu), (e) => Uu(e, t));
12263
12269
  for (let e of a) {
12264
12270
  let t = e.getAttribute("name"), n = t?.value;
12265
12271
  if (!t || !Hu(n)) continue;
@@ -12369,7 +12375,7 @@ function Zu(e) {
12369
12375
  return !!e.target.meta?.heading;
12370
12376
  }
12371
12377
  function Qu(e) {
12372
- let t = /^[hH](\d)$/.exec(e.tagName);
12378
+ let t = /^[Hh](\d)$/.exec(e.tagName);
12373
12379
  return t ? Number.parseInt(t[1], 10) : null;
12374
12380
  }
12375
12381
  function $u(e) {
@@ -12377,7 +12383,7 @@ function $u(e) {
12377
12383
  let t = /^h(\d)$/.exec(e);
12378
12384
  return t ? Number.parseInt(t[1], 10) : 1;
12379
12385
  }
12380
- var ed = class extends q {
12386
+ var ed = class extends G {
12381
12387
  minInitialRank;
12382
12388
  sectionRoots;
12383
12389
  stack = [];
@@ -12385,7 +12391,7 @@ var ed = class extends q {
12385
12391
  super({
12386
12392
  ...Xu,
12387
12393
  ...e
12388
- }), this.minInitialRank = $u(this.options.minInitialRank), this.sectionRoots = this.options.sectioningRoots.map((e) => new Lo(e)), this.stack.push({
12394
+ }), this.minInitialRank = $u(this.options.minInitialRank), this.sectionRoots = this.options.sectioningRoots.map((e) => new Fo(e)), this.stack.push({
12389
12395
  node: null,
12390
12396
  current: 0,
12391
12397
  h1Count: 0
@@ -12496,14 +12502,14 @@ function nd(e, t) {
12496
12502
  return t.formAssociated?.disablable ? !!(e.matches("[disabled]") || e.closest("fieldset[disabled]")) : !1;
12497
12503
  }
12498
12504
  function rd(e) {
12499
- if (Bs(e) || Hs(e) || Ws(e)) return !1;
12505
+ if (Rs(e) || Bs(e) || Hs(e)) return !1;
12500
12506
  let { tabIndex: t, meta: n } = e;
12501
12507
  return t === null ? !n || nd(e, n) ? !1 : !!n.focusable : t >= 0;
12502
12508
  }
12503
12509
  function id(e) {
12504
12510
  return e.cacheGet(td) || e.cacheSet(td, rd(e));
12505
12511
  }
12506
- var ad = class extends q {
12512
+ var ad = class extends G {
12507
12513
  documentation(e) {
12508
12514
  return {
12509
12515
  description: [
@@ -12525,7 +12531,7 @@ var ad = class extends q {
12525
12531
  let e = ["[tabindex]", ...this.getTagsWithProperty("focusable")].join(",");
12526
12532
  this.on("dom:ready", (t) => {
12527
12533
  let { document: n } = t;
12528
- for (let t of n.querySelectorAll(e)) id(t) && Rs(t) && this.reportElement(t);
12534
+ for (let t of n.querySelectorAll(e)) id(t) && Is(t) && this.reportElement(t);
12529
12535
  });
12530
12536
  }
12531
12537
  reportElement(e) {
@@ -12700,7 +12706,7 @@ function ud(e) {
12700
12706
  let { target: t } = e;
12701
12707
  return t.is("input");
12702
12708
  }
12703
- var dd = class extends q {
12709
+ var dd = class extends G {
12704
12710
  documentation(e) {
12705
12711
  let { attribute: t, type: n } = e;
12706
12712
  return {
@@ -12732,10 +12738,10 @@ var dd = class extends q {
12732
12738
  }, fd = Symbol(vd.name);
12733
12739
  function pd(e, t) {
12734
12740
  let { reference: n } = t;
12735
- return n?.isSameNode(e) ? !1 : !Is(e);
12741
+ return n?.isSameNode(e) ? !1 : !Ps(e);
12736
12742
  }
12737
12743
  function md(e, t) {
12738
- if (e.is("img")) return tc(e);
12744
+ if (e.is("img")) return $s(e);
12739
12745
  if (e.is("svg")) return e.textContent.trim() !== "";
12740
12746
  for (let n of e.querySelectorAll("img, svg")) if (_d(n, t)) return !0;
12741
12747
  return !1;
@@ -12748,7 +12754,7 @@ function gd(e, t) {
12748
12754
  if (r) return !1;
12749
12755
  let i = e.ariaLabelledby;
12750
12756
  return i instanceof R ? !0 : i === null ? !1 : i.some((e) => {
12751
- let t = Yo(e);
12757
+ let t = qo(e);
12752
12758
  return n.querySelectorAll(t).some((e) => _d(e, {
12753
12759
  document: n,
12754
12760
  reference: e
@@ -12757,10 +12763,10 @@ function gd(e, t) {
12757
12763
  }
12758
12764
  function _d(e, t) {
12759
12765
  let { reference: n } = t;
12760
- return pd(e, t) ? !1 : !!($s(e, {
12766
+ return pd(e, t) ? !1 : !!(Zs(e, {
12761
12767
  accessible: !0,
12762
12768
  ignoreHiddenRoot: !!n?.isSameNode(e)
12763
- }) !== K.EMPTY_TEXT || md(e, t) || hd(e) || gd(e, t));
12769
+ }) !== W.EMPTY_TEXT || md(e, t) || hd(e) || gd(e, t));
12764
12770
  }
12765
12771
  function vd(e, t) {
12766
12772
  if (t.cacheExists(fd)) return !!t.cacheGet(fd);
@@ -12782,7 +12788,7 @@ function yd(e) {
12782
12788
  }
12783
12789
  return !1;
12784
12790
  }
12785
- var bd = class extends q {
12791
+ var bd = class extends G {
12786
12792
  documentation() {
12787
12793
  return {
12788
12794
  description: [
@@ -12805,7 +12811,7 @@ var bd = class extends q {
12805
12811
  });
12806
12812
  }
12807
12813
  validateInput(e, t) {
12808
- if (!Is(t) || yd(t) || vd(e, t)) return;
12814
+ if (!Ps(t) || yd(t) || vd(e, t)) return;
12809
12815
  let n = [];
12810
12816
  if ((n = xd(e, t.id)).length > 0) {
12811
12817
  this.validateLabel(e, t, n);
@@ -12818,7 +12824,7 @@ var bd = class extends q {
12818
12824
  t.hasAttribute("aria-label") ? this.report(t, `<${t.tagName}> element has aria-label but label has no text`) : t.hasAttribute("aria-labelledby") ? this.report(t, `<${t.tagName}> element has aria-labelledby but referenced element has no text`) : this.report(t, `<${t.tagName}> element does not have a <label>`);
12819
12825
  }
12820
12826
  validateLabel(e, t, n) {
12821
- if (n.filter(Is).length === 0) {
12827
+ if (n.filter(Ps).length === 0) {
12822
12828
  this.report(t, `<${t.tagName}> element has <label> but <label> element is hidden`);
12823
12829
  return;
12824
12830
  }
@@ -12836,7 +12842,7 @@ function Sd(e) {
12836
12842
  }
12837
12843
  return [];
12838
12844
  }
12839
- var Cd = { maxlength: 70 }, wd = class extends q {
12845
+ var Cd = { maxlength: 70 }, wd = class extends G {
12840
12846
  maxlength;
12841
12847
  constructor(e) {
12842
12848
  super({
@@ -12864,7 +12870,7 @@ function Td(e) {
12864
12870
  let t = e.value;
12865
12871
  return !t || t instanceof R ? null : t;
12866
12872
  }
12867
- var Ed = class extends q {
12873
+ var Ed = class extends G {
12868
12874
  documentation() {
12869
12875
  return {
12870
12876
  description: "`<map>` must have a unique name, it cannot be the same name as another `<map>` element",
@@ -12893,7 +12899,7 @@ function Dd(e) {
12893
12899
  function Od(e) {
12894
12900
  return !!(e && !(e.value instanceof R));
12895
12901
  }
12896
- var kd = class extends q {
12902
+ var kd = class extends G {
12897
12903
  documentation() {
12898
12904
  return {
12899
12905
  description: "When the `id` attribute is present on a `<map>` element it must be equal to the `name` attribute.",
@@ -12910,7 +12916,7 @@ var kd = class extends q {
12910
12916
  });
12911
12917
  });
12912
12918
  }
12913
- }, Ad = { allowLongDelay: !1 }, jd = class extends q {
12919
+ }, Ad = { allowLongDelay: !1 }, jd = class extends G {
12914
12920
  constructor(e) {
12915
12921
  super({
12916
12922
  ...Ad,
@@ -12958,7 +12964,7 @@ function Md(e) {
12958
12964
  url: t[2]
12959
12965
  } : null;
12960
12966
  }
12961
- var Nd = class extends q {
12967
+ var Nd = class extends G {
12962
12968
  documentation() {
12963
12969
  return {
12964
12970
  description: "Requires that the document contains a doctype.",
@@ -12971,7 +12977,7 @@ var Nd = class extends q {
12971
12977
  t.doctype || this.report(t.root, "Document is missing doctype");
12972
12978
  });
12973
12979
  }
12974
- }, Pd = class extends q {
12980
+ }, Pd = class extends G {
12975
12981
  labelable = "";
12976
12982
  documentation() {
12977
12983
  return {
@@ -13042,7 +13048,7 @@ var Ld = class extends Hl {
13042
13048
  function zd(e) {
13043
13049
  return e.key === "role";
13044
13050
  }
13045
- var Bd = class extends q {
13051
+ var Bd = class extends G {
13046
13052
  documentation(e) {
13047
13053
  return {
13048
13054
  description: [
@@ -13061,7 +13067,7 @@ var Bd = class extends q {
13061
13067
  this.on("attr", zd, (e) => {
13062
13068
  let t = e.value;
13063
13069
  if (!t || t instanceof R) return;
13064
- let n = new H(t, e.valueLocation);
13070
+ let n = new B(t, e.valueLocation);
13065
13071
  for (let { item: t, location: r } of n.iterator()) Rd.includes(t) && this.report({
13066
13072
  node: e.target,
13067
13073
  message: "Role \"{{ role }}\" is abstract and must not be used",
@@ -13073,7 +13079,7 @@ var Bd = class extends q {
13073
13079
  }, Vd = {
13074
13080
  include: null,
13075
13081
  exclude: null
13076
- }, Hd = class extends q {
13082
+ }, Hd = class extends G {
13077
13083
  constructor(e) {
13078
13084
  super({
13079
13085
  ...Vd,
@@ -13111,7 +13117,7 @@ var Bd = class extends q {
13111
13117
  this.report(e.target, `The autoplay attribute is not allowed on <${t}>`, r, n);
13112
13118
  });
13113
13119
  }
13114
- }, Ud = class extends q {
13120
+ }, Ud = class extends G {
13115
13121
  documentation() {
13116
13122
  return {
13117
13123
  description: "Microsoft Internet Explorer previously supported using special HTML comments (conditional comments) for targeting specific versions of IE but since IE 10 it is deprecated and not supported in standards mode.",
@@ -13123,7 +13129,7 @@ var Bd = class extends q {
13123
13129
  this.report(e.parent, "Use of conditional comments are deprecated", e.location);
13124
13130
  });
13125
13131
  }
13126
- }, Wd = class extends q {
13132
+ }, Wd = class extends G {
13127
13133
  documentation() {
13128
13134
  return {
13129
13135
  description: "HTML5 deprecated many old attributes.",
@@ -13138,7 +13144,7 @@ var Bd = class extends q {
13138
13144
  i && i.deprecated && this.report(t, `Attribute "${e.key}" is deprecated on <${t.tagName}> element`, e.keyLocation);
13139
13145
  });
13140
13146
  }
13141
- }, Gd = class extends q {
13147
+ }, Gd = class extends G {
13142
13148
  documentation() {
13143
13149
  return {
13144
13150
  description: "HTML disallows two or more attributes with the same (case-insensitive) name.",
@@ -13155,7 +13161,7 @@ var Bd = class extends q {
13155
13161
  n in e && this.report(t.target, `Attribute "${n}" duplicated`, t.keyLocation), e[t.key] = !0;
13156
13162
  });
13157
13163
  }
13158
- }, Kd = class extends q {
13164
+ }, Kd = class extends G {
13159
13165
  documentation() {
13160
13166
  return {
13161
13167
  description: "Prevents unnecessary duplication of class names.",
@@ -13165,11 +13171,11 @@ var Bd = class extends q {
13165
13171
  setup() {
13166
13172
  this.on("attr", (e) => {
13167
13173
  if (e.key.toLowerCase() !== "class") return;
13168
- let t = new H(e.value, e.valueLocation), n = /* @__PURE__ */ new Set();
13174
+ let t = new B(e.value, e.valueLocation), n = /* @__PURE__ */ new Set();
13169
13175
  for (let { item: r, location: i } of t.iterator()) n.has(r) && this.report(e.target, `Class "${r}" duplicated`, i), n.add(r);
13170
13176
  });
13171
13177
  }
13172
- }, qd = /* @__PURE__ */ Symbol("no-dup-id"), Jd = class extends q {
13178
+ }, qd = /* @__PURE__ */ Symbol("no-dup-id"), Jd = class extends G {
13173
13179
  documentation() {
13174
13180
  return {
13175
13181
  description: "The ID of an element must be unique.",
@@ -13203,7 +13209,7 @@ function Yd(e, t) {
13203
13209
  function Xd(e) {
13204
13210
  return e.target.is("button");
13205
13211
  }
13206
- var Zd = class extends q {
13212
+ var Zd = class extends G {
13207
13213
  documentation() {
13208
13214
  return {
13209
13215
  description: [
@@ -13230,7 +13236,7 @@ var Zd = class extends q {
13230
13236
  });
13231
13237
  });
13232
13238
  }
13233
- }, Qd = class extends q {
13239
+ }, Qd = class extends G {
13234
13240
  documentation() {
13235
13241
  return {
13236
13242
  description: "Some elements in HTML has optional end tags. When an optional tag is omitted a browser must handle it as if the end tag was present.\n\nOmitted end tags can be ambigious for humans to read and many editors have trouble formatting the markup.",
@@ -13240,7 +13246,7 @@ var Zd = class extends q {
13240
13246
  setup() {
13241
13247
  this.on("tag:end", (e) => {
13242
13248
  let t = e.previous, n = e.target;
13243
- if (!n || t.closed !== W.ImplicitClosed) return;
13249
+ if (!n || t.closed !== H.ImplicitClosed) return;
13244
13250
  let r = t.parent, i = r?.tagName === n.tagName, a = i && r.isRootElement(), o = t.tagName === n.tagName;
13245
13251
  a ? this.report(t, `Element <${t.tagName}> is implicitly closed by document ending`, t.location) : i ? this.report(t, `Element <${t.tagName}> is implicitly closed by parent </${n.tagName}>`, t.location) : o ? this.report(t, `Element <${t.tagName}> is implicitly closed by sibling`, t.location) : this.report(t, `Element <${t.tagName}> is implicitly closed by adjacent <${n.tagName}>`, t.location);
13246
13252
  });
@@ -13249,7 +13255,7 @@ var Zd = class extends q {
13249
13255
  function $d(e) {
13250
13256
  return e.target.is("input");
13251
13257
  }
13252
- var ef = class extends q {
13258
+ var ef = class extends G {
13253
13259
  documentation() {
13254
13260
  return {
13255
13261
  description: ["`<input>` is missing recommended `type` attribute"].join("\n"),
@@ -13269,7 +13275,7 @@ var ef = class extends q {
13269
13275
  include: null,
13270
13276
  exclude: null,
13271
13277
  allowedProperties: ["display"]
13272
- }, nf = class extends q {
13278
+ }, nf = class extends G {
13273
13279
  constructor(e) {
13274
13280
  super({
13275
13281
  ...tf,
@@ -13351,9 +13357,9 @@ var ef = class extends q {
13351
13357
  }
13352
13358
  ];
13353
13359
  function af(e, t) {
13354
- return e.querySelectorAll(Yo(t)).length === 0;
13360
+ return e.querySelectorAll(qo(t)).length === 0;
13355
13361
  }
13356
- var of = class extends q {
13362
+ var of = class extends G {
13357
13363
  documentation(e) {
13358
13364
  return {
13359
13365
  description: `The element ID "${e.value}" referenced by the ${e.key} attribute must point to an existing element.`,
@@ -13392,7 +13398,7 @@ var of = class extends q {
13392
13398
  }
13393
13399
  }
13394
13400
  validateList(e, t, n, r) {
13395
- let i = new H(r, n.valueLocation);
13401
+ let i = new B(r, n.valueLocation);
13396
13402
  for (let r of i.iterator()) {
13397
13403
  let i = r.item;
13398
13404
  if (af(e, i)) {
@@ -13404,7 +13410,7 @@ var of = class extends q {
13404
13410
  }
13405
13411
  }
13406
13412
  }
13407
- }, sf = class extends q {
13413
+ }, sf = class extends G {
13408
13414
  documentation() {
13409
13415
  return {
13410
13416
  description: [
@@ -13422,7 +13428,7 @@ var of = class extends q {
13422
13428
  for (let e of n) this.report(e, "Multiple <main> elements present in document");
13423
13429
  });
13424
13430
  }
13425
- }, cf = { relaxed: !1 }, lf = /([<>]|&(?![a-zA-Z0-9#]+;))/g, uf = /([<>"'=`]|&(?![a-zA-Z0-9#]+;))/g, df = /^(<%.*?%>|<\?.*?\?>|<\$.*?\$>)$/s, ff = {
13431
+ }, cf = { relaxed: !1 }, lf = /([<>]|&(?![\d#A-Za-z]+;))/g, uf = /(["'<=>`]|&(?![\d#A-Za-z]+;))/g, df = /^(<%.*?%>|<\?.*?\?>|<\$.*?\$>)$/s, ff = {
13426
13432
  "\"": "&quot;",
13427
13433
  "&": "&amp;",
13428
13434
  "'": "&apos;",
@@ -13430,7 +13436,7 @@ var of = class extends q {
13430
13436
  "=": "&equals;",
13431
13437
  ">": "&gt;",
13432
13438
  "`": "&grave;"
13433
- }, pf = class extends q {
13439
+ }, pf = class extends G {
13434
13440
  relaxed;
13435
13441
  constructor(e) {
13436
13442
  super({
@@ -13450,7 +13456,7 @@ var of = class extends q {
13450
13456
  setup() {
13451
13457
  this.on("element:ready", (e) => {
13452
13458
  let t = e.target;
13453
- if (t.textType === "text") for (let e of t.childNodes) e.nodeType === fo.TEXT_NODE && (df.test(e.textContent) || this.findRawChars(t, e.textContent, e.location, lf));
13459
+ if (t.textType === "text") for (let e of t.childNodes) e.nodeType === lo.TEXT_NODE && (df.test(e.textContent) || this.findRawChars(t, e.textContent, e.location, lf));
13454
13460
  }), this.on("attr", (e) => {
13455
13461
  let { meta: t } = e;
13456
13462
  e.value && (e.quote || t?.boolean || this.findRawChars(e.target, e.value.toString(), e.valueLocation, uf));
@@ -13471,7 +13477,7 @@ var of = class extends q {
13471
13477
  "input[aria-label]",
13472
13478
  "textarea[aria-label]",
13473
13479
  "select[aria-label]"
13474
- ], hf = class extends q {
13480
+ ], hf = class extends G {
13475
13481
  documentation() {
13476
13482
  return {
13477
13483
  description: "`aria-label` is redundant when an associated `<label>` element containing the same text exists.",
@@ -13493,7 +13499,7 @@ var of = class extends q {
13493
13499
  }
13494
13500
  });
13495
13501
  }
13496
- }, gf = class extends q {
13502
+ }, gf = class extends G {
13497
13503
  documentation() {
13498
13504
  return {
13499
13505
  description: "When the `<label>` element wraps the labelable control the `for` attribute is redundant and better left out.",
@@ -13507,13 +13513,13 @@ var of = class extends q {
13507
13513
  let n = t.getAttribute("for");
13508
13514
  if (!n || !ro(n)) return;
13509
13515
  let r = n.value;
13510
- r && t.querySelector(Yo(r)) && this.report(t, "Redundant \"for\" attribute", n.keyLocation);
13516
+ r && t.querySelector(qo(r)) && this.report(t, "Redundant \"for\" attribute", n.keyLocation);
13511
13517
  });
13512
13518
  }
13513
13519
  }, _f = {
13514
13520
  include: null,
13515
13521
  exclude: null
13516
- }, vf = class extends q {
13522
+ }, vf = class extends G {
13517
13523
  constructor(e) {
13518
13524
  super({
13519
13525
  ..._f,
@@ -13557,7 +13563,7 @@ var of = class extends q {
13557
13563
  }, yf = /^(.+):.+$/, bf = {
13558
13564
  ignoreForeign: !0,
13559
13565
  ignoreXML: !0
13560
- }, xf = class extends q {
13566
+ }, xf = class extends G {
13561
13567
  constructor(e) {
13562
13568
  super({
13563
13569
  ...bf,
@@ -13583,13 +13589,13 @@ var of = class extends q {
13583
13589
  });
13584
13590
  }
13585
13591
  validateElement(e) {
13586
- e.closed === W.VoidSelfClosed && this.report(e, `<${e.tagName}> must not be self-closed`, null, e.tagName);
13592
+ e.closed === H.VoidSelfClosed && this.report(e, `<${e.tagName}> must not be self-closed`, null, e.tagName);
13587
13593
  }
13588
13594
  };
13589
13595
  function Sf(e, t) {
13590
13596
  return yf.test(e.tagName) ? !t.ignoreXML : e.meta ? e.meta.void ? !1 : e.meta.foreign ? !t.ignoreForeign : !0 : !0;
13591
13597
  }
13592
- var Cf = { allowTemplate: !0 }, wf = class extends q {
13598
+ var Cf = { allowTemplate: !0 }, wf = class extends G {
13593
13599
  constructor(e) {
13594
13600
  super({
13595
13601
  ...Cf,
@@ -13615,7 +13621,7 @@ var Cf = { allowTemplate: !0 }, wf = class extends q {
13615
13621
  }
13616
13622
  });
13617
13623
  }
13618
- }, Tf = class extends q {
13624
+ }, Tf = class extends G {
13619
13625
  documentation() {
13620
13626
  return {
13621
13627
  description: "Lines with trailing whitespace cause unnessecary diff when using version control and usually serve no special purpose in HTML.",
@@ -13624,13 +13630,13 @@ var Cf = { allowTemplate: !0 }, wf = class extends q {
13624
13630
  }
13625
13631
  setup() {
13626
13632
  this.on("whitespace", (e) => {
13627
- /^[ \t]+\r?\n$/.test(e.text) && this.report(null, "Trailing whitespace", e.location);
13633
+ /^[\t ]+\r?\n$/.test(e.text) && this.report(null, "Trailing whitespace", e.location);
13628
13634
  });
13629
13635
  }
13630
13636
  }, Ef = {
13631
13637
  include: null,
13632
13638
  exclude: null
13633
- }, Df = class extends q {
13639
+ }, Df = class extends G {
13634
13640
  constructor(e) {
13635
13641
  super({
13636
13642
  ...Ef,
@@ -13658,10 +13664,10 @@ var Cf = { allowTemplate: !0 }, wf = class extends q {
13658
13664
  setup() {
13659
13665
  this.on("tag:start", (e) => {
13660
13666
  let t = e.target;
13661
- t.meta || this.isKeywordIgnored(t.tagName, ks) || this.report(t, `Unknown element <${t.tagName}>`, null, t.tagName);
13667
+ t.meta || this.isKeywordIgnored(t.tagName, Ds) || this.report(t, `Unknown element <${t.tagName}>`, null, t.tagName);
13662
13668
  });
13663
13669
  }
13664
- }, Of = class extends q {
13670
+ }, Of = class extends G {
13665
13671
  documentation(e) {
13666
13672
  return {
13667
13673
  description: `\`${e.ruleId}\` rule is disabled but no error was reported.`,
@@ -13670,7 +13676,7 @@ var Cf = { allowTemplate: !0 }, wf = class extends q {
13670
13676
  }
13671
13677
  setup() {}
13672
13678
  reportUnused(e, t, n) {
13673
- let r = new H(t.replaceAll(",", " "), n);
13679
+ let r = new B(t.replaceAll(",", " "), n);
13674
13680
  for (let t of e) {
13675
13681
  let e = r.indexOf(t), i = e === -1 ? n : r.location(e);
13676
13682
  this.report({
@@ -13681,7 +13687,7 @@ var Cf = { allowTemplate: !0 }, wf = class extends q {
13681
13687
  });
13682
13688
  }
13683
13689
  }
13684
- }, kf = class extends q {
13690
+ }, kf = class extends G {
13685
13691
  documentation() {
13686
13692
  return {
13687
13693
  description: "This file is saved with the UTF-8 byte order mark (BOM) present. It is neither required or recommended to use.\n\nInstead the document should be served with the `Content-Type: application/javascript; charset=utf-8` header.",
@@ -13706,7 +13712,7 @@ var Cf = { allowTemplate: !0 }, wf = class extends q {
13706
13712
  }, Mf = {
13707
13713
  include: null,
13708
13714
  exclude: null
13709
- }, Nf = class extends q {
13715
+ }, Nf = class extends G {
13710
13716
  constructor(e) {
13711
13717
  super({
13712
13718
  ...Mf,
@@ -13769,7 +13775,7 @@ var Cf = { allowTemplate: !0 }, wf = class extends q {
13769
13775
  },
13770
13776
  include: null,
13771
13777
  exclude: null
13772
- }, Ff = class extends q {
13778
+ }, Ff = class extends G {
13773
13779
  constructor(e) {
13774
13780
  super({
13775
13781
  ...Pf,
@@ -13824,7 +13830,7 @@ var Cf = { allowTemplate: !0 }, wf = class extends q {
13824
13830
  size: i
13825
13831
  };
13826
13832
  }
13827
- }, If = class extends q {
13833
+ }, If = class extends G {
13828
13834
  documentation() {
13829
13835
  return {
13830
13836
  description: "While `<tbody>` is optional is relays semantic information about its contents. Where applicable it should also be combined with `<thead>` and `<tfoot>`.",
@@ -13841,7 +13847,7 @@ var Cf = { allowTemplate: !0 }, wf = class extends q {
13841
13847
  }
13842
13848
  });
13843
13849
  }
13844
- }, Lf = { tags: ["script", "style"] }, Rf = class extends q {
13850
+ }, Lf = { tags: ["script", "style"] }, Rf = class extends G {
13845
13851
  constructor(e) {
13846
13852
  super({
13847
13853
  ...Lf,
@@ -13900,7 +13906,7 @@ function Wf(e) {
13900
13906
  }
13901
13907
  return !0;
13902
13908
  }
13903
- var Gf = class extends q {
13909
+ var Gf = class extends G {
13904
13910
  target;
13905
13911
  constructor(e) {
13906
13912
  super({
@@ -13953,7 +13959,7 @@ var Gf = class extends q {
13953
13959
  isIgnored(e) {
13954
13960
  return this.isKeywordIgnored(e, (e, t) => e.some((e) => t.includes(e)));
13955
13961
  }
13956
- }, Kf = class extends q {
13962
+ }, Kf = class extends G {
13957
13963
  documentation() {
13958
13964
  return {
13959
13965
  description: "The end tag for `<script>` is a hard requirement and must never be omitted even when using the `src` attribute.",
@@ -13963,7 +13969,7 @@ var Gf = class extends q {
13963
13969
  setup() {
13964
13970
  this.on("tag:end", (e) => {
13965
13971
  let t = e.target;
13966
- t?.tagName === "script" && t.closed !== W.EndTag && this.report(t, `End tag for <${t.tagName}> must not be omitted`);
13972
+ t?.tagName === "script" && t.closed !== H.EndTag && this.report(t, `End tag for <${t.tagName}> must not be omitted`);
13967
13973
  });
13968
13974
  }
13969
13975
  }, qf = /* @__PURE__ */ new Set([
@@ -13972,7 +13978,7 @@ var Gf = class extends q {
13972
13978
  "application/javascript",
13973
13979
  "text/ecmascript",
13974
13980
  "text/javascript"
13975
- ]), Jf = class extends q {
13981
+ ]), Jf = class extends G {
13976
13982
  documentation() {
13977
13983
  return {
13978
13984
  description: "While valid the HTML5 standard encourages authors to omit the type element for JavaScript resources.",
@@ -13993,7 +13999,7 @@ var Gf = class extends q {
13993
13999
  let t = e.replace(/;.*/, "");
13994
14000
  return qf.has(t);
13995
14001
  }
13996
- }, Yf = class extends q {
14002
+ }, Yf = class extends G {
13997
14003
  documentation() {
13998
14004
  return {
13999
14005
  description: "Inline SVG elements in IE are focusable by default which may cause issues with tab-ordering. The `focusable` attribute should explicitly be set to avoid unintended behaviour.",
@@ -14034,7 +14040,7 @@ function $f(e, t) {
14034
14040
  for (; i = n.exec(e);) r.push(i);
14035
14041
  return r;
14036
14042
  }
14037
- var ep = class extends q {
14043
+ var ep = class extends G {
14038
14044
  regex;
14039
14045
  constructor(e) {
14040
14046
  super({
@@ -14101,7 +14107,7 @@ var ep = class extends q {
14101
14107
  return this.isIgnoredClass(e) || this.isIgnoredStyle(e);
14102
14108
  }
14103
14109
  walk(e, t) {
14104
- for (let n of t.childNodes) Qo(n) ? this.detectDisallowed(e, n) : ns(n) && this.walk(e, n);
14110
+ for (let n of t.childNodes) Xo(n) ? this.detectDisallowed(e, n) : es(n) && this.walk(e, n);
14105
14111
  }
14106
14112
  detectDisallowed(e, t) {
14107
14113
  let [n, r] = Qf(t), i = $f(r, this.regex);
@@ -14120,12 +14126,12 @@ function np(e) {
14120
14126
  return !e.is("input") || e.hasAttribute("value") ? !1 : !!e.getAttribute("type")?.valueMatches(/submit|reset/, !1);
14121
14127
  }
14122
14128
  function rp(e) {
14123
- return Qo(e) ? e.isDynamic || e.textContent.trim() !== "" : !1;
14129
+ return Xo(e) ? e.isDynamic || e.textContent.trim() !== "" : !1;
14124
14130
  }
14125
14131
  function ip(e) {
14126
- return Is(e) ? e.childNodes.some((e) => rp(e)) || tp(e, "aria-label") || tp(e, "aria-labelledby") || e.is("img") && tp(e, "alt") || e.is("selectedcontent") || np(e) ? !0 : e.childElements.some((e) => ip(e)) : !1;
14132
+ return Ps(e) ? e.childNodes.some((e) => rp(e)) || tp(e, "aria-label") || tp(e, "aria-labelledby") || e.is("img") && tp(e, "alt") || e.is("selectedcontent") || np(e) ? !0 : e.childElements.some((e) => ip(e)) : !1;
14127
14133
  }
14128
- var ap = class e extends q {
14134
+ var ap = class e extends G {
14129
14135
  documentation(e) {
14130
14136
  let t = {
14131
14137
  description: "The textual content for this element is not valid.",
@@ -14167,13 +14173,13 @@ var ap = class e extends q {
14167
14173
  });
14168
14174
  }
14169
14175
  validateNone(e) {
14170
- $s(e) !== K.EMPTY_TEXT && this.reportError(e, e.meta, `${e.annotatedName} must not have text content`);
14176
+ Zs(e) !== W.EMPTY_TEXT && this.reportError(e, e.meta, `${e.annotatedName} must not have text content`);
14171
14177
  }
14172
14178
  validateRequired(e) {
14173
- $s(e) === K.EMPTY_TEXT && this.reportError(e, e.meta, `${e.annotatedName} must have text content`);
14179
+ Zs(e) === W.EMPTY_TEXT && this.reportError(e, e.meta, `${e.annotatedName} must have text content`);
14174
14180
  }
14175
14181
  validateAccessible(e) {
14176
- Is(e) && (ip(e) || this.reportError(e, e.meta, `${e.annotatedName} must have accessible text`));
14182
+ Ps(e) && (ip(e) || this.reportError(e, e.meta, `${e.annotatedName} must have accessible text`));
14177
14183
  }
14178
14184
  reportError(e, t, n) {
14179
14185
  this.report(e, n, null, {
@@ -14201,7 +14207,7 @@ var ap = class e extends q {
14201
14207
  ];
14202
14208
  function cp(e, t) {
14203
14209
  if (!t || t instanceof R) return t;
14204
- let n = Yo(t), r = e.querySelector(n);
14210
+ let n = qo(t), r = e.querySelector(n);
14205
14211
  return r ? r.textContent : n;
14206
14212
  }
14207
14213
  function lp(e, t) {
@@ -14234,7 +14240,7 @@ function dp(e) {
14234
14240
  let { node: t, text: n } = e;
14235
14241
  return n === null ? !(t.is("form") || t.is("section")) : !0;
14236
14242
  }
14237
- var fp = class extends q {
14243
+ var fp = class extends G {
14238
14244
  documentation() {
14239
14245
  return {
14240
14246
  description: [
@@ -14284,7 +14290,7 @@ var fp = class extends q {
14284
14290
  }, pp = {
14285
14291
  ignoreCase: !1,
14286
14292
  requireSemicolon: !0
14287
- }, mp = /&(?:[a-z0-9]+|#x?[0-9a-f]+)(;|[^a-z0-9]|$)/gi, hp = St.map((e) => e.toLowerCase());
14293
+ }, mp = /&(?:[\da-z]+|#x?[\da-f]+)(;|[^\da-z]|$)/gi, hp = St.map((e) => e.toLowerCase());
14288
14294
  function gp(e) {
14289
14295
  return e.startsWith("&#");
14290
14296
  }
@@ -14309,7 +14315,7 @@ function yp(e, t) {
14309
14315
  ...t.requireSemicolon ? ["1. The name is terminated with a `;`."] : []
14310
14316
  ].join("\n");
14311
14317
  }
14312
- var bp = class extends q {
14318
+ var bp = class extends G {
14313
14319
  constructor(e) {
14314
14320
  super({
14315
14321
  ...pp,
@@ -14331,7 +14337,7 @@ var bp = class extends q {
14331
14337
  setup() {
14332
14338
  this.on("element:ready", (e) => {
14333
14339
  let t = e.target;
14334
- if (t.textType === "text") for (let e of t.childNodes) e.nodeType === fo.TEXT_NODE && this.findCharacterReferences(t, e.textContent, e.location, { isAttribute: !1 });
14340
+ if (t.textType === "text") for (let e of t.childNodes) e.nodeType === lo.TEXT_NODE && this.findCharacterReferences(t, e.textContent, e.location, { isAttribute: !1 });
14335
14341
  }), this.on("attr", (e) => {
14336
14342
  e.value && this.findCharacterReferences(e.target, e.value.toString(), e.valueLocation, { isAttribute: !0 });
14337
14343
  });
@@ -14340,7 +14346,7 @@ var bp = class extends q {
14340
14346
  return this.options.ignoreCase ? hp : St;
14341
14347
  }
14342
14348
  findCharacterReferences(e, t, n, { isAttribute: r }) {
14343
- let i = t.search(/[?#]/);
14349
+ let i = t.search(/[#?]/);
14344
14350
  for (let a of this.getMatches(t)) {
14345
14351
  let t = r && _p(i, a);
14346
14352
  this.validateCharacterReference(e, n, a, { allowUnterminated: t });
@@ -14579,7 +14585,7 @@ function Fp(e) {
14579
14585
  case 5: return "Autocomplete attribute is missing field name";
14580
14586
  }
14581
14587
  }
14582
- var Ip = class extends q {
14588
+ var Ip = class extends G {
14583
14589
  documentation(e) {
14584
14590
  return {
14585
14591
  description: Fp(e),
@@ -14592,7 +14598,7 @@ var Ip = class extends q {
14592
14598
  for (let e of n) {
14593
14599
  let t = e.getAttribute("autocomplete");
14594
14600
  if (t.value === null || t.value instanceof R) continue;
14595
- let n = t.valueLocation, r = t.value.toLowerCase(), i = new H(r, n);
14601
+ let n = t.valueLocation, r = t.value.toLowerCase(), i = new B(r, n);
14596
14602
  i.length !== 0 && this.validate(e, r, i, t.keyLocation, n);
14597
14603
  }
14598
14604
  });
@@ -14781,7 +14787,7 @@ function Lp(e) {
14781
14787
  let { meta: t } = e;
14782
14788
  return t ? !!t.labelable : !0;
14783
14789
  }
14784
- var Rp = class extends q {
14790
+ var Rp = class extends G {
14785
14791
  documentation() {
14786
14792
  return {
14787
14793
  description: "The `<label>` `for` attribute must reference a labelable form control.",
@@ -14794,7 +14800,7 @@ var Rp = class extends q {
14794
14800
  for (let e of t.querySelectorAll("label[for]")) {
14795
14801
  let n = e.getAttribute("for");
14796
14802
  if (!ro(n) || !n.value) continue;
14797
- let r = Yo(n.value), i = t.querySelector(r);
14803
+ let r = qo(n.value), i = t.querySelector(r);
14798
14804
  i && (Lp(i) || this.report({
14799
14805
  node: e,
14800
14806
  message: "<label> \"for\" attribute must reference a labelable form control",
@@ -14803,7 +14809,7 @@ var Rp = class extends q {
14803
14809
  }
14804
14810
  });
14805
14811
  }
14806
- }, zp = { relaxed: !1 }, Bp = class extends q {
14812
+ }, zp = { relaxed: !1 }, Bp = class extends G {
14807
14813
  constructor(e) {
14808
14814
  super({
14809
14815
  ...zp,
@@ -14817,7 +14823,7 @@ var Rp = class extends q {
14817
14823
  let { relaxed: t } = this.options, { kind: n, id: r } = e, i = this.messages[n].replace("\"{{ id }}\"", "`{{ id }}`").replace("id", "ID").replace(/^(.)/, (e) => e.toUpperCase()), a = t ? [] : [" - ID must begin with a letter", " - ID must only contain letters, digits, `-` and `_`"];
14818
14824
  return {
14819
14825
  description: [
14820
- `${oc(i, { id: r })}.`,
14826
+ `${ic(i, { id: r })}.`,
14821
14827
  "",
14822
14828
  "Under the current configuration the following rules are applied:",
14823
14829
  "",
@@ -14879,7 +14885,7 @@ var Rp = class extends q {
14879
14885
  isRelevant(e) {
14880
14886
  return e.key === "id";
14881
14887
  }
14882
- }, Vp = class extends q {
14888
+ }, Vp = class extends G {
14883
14889
  documentation(e) {
14884
14890
  let t = {
14885
14891
  description: "HTML void elements cannot have any content and must not have content or end tag.",
@@ -14890,10 +14896,10 @@ var Rp = class extends q {
14890
14896
  setup() {
14891
14897
  this.on("tag:end", (e) => {
14892
14898
  let t = e.target;
14893
- t && t.voidElement && t.closed === W.EndTag && this.report(null, `End tag for <${t.tagName}> must be omitted`, t.location, t.tagName);
14899
+ t && t.voidElement && t.closed === H.EndTag && this.report(null, `End tag for <${t.tagName}> must be omitted`, t.location, t.tagName);
14894
14900
  });
14895
14901
  }
14896
- }, Hp = { style: "omit" }, Up = class extends q {
14902
+ }, Hp = { style: "omit" }, Up = class extends G {
14897
14903
  style;
14898
14904
  constructor(e) {
14899
14905
  super({
@@ -14929,10 +14935,10 @@ var Rp = class extends q {
14929
14935
  });
14930
14936
  }
14931
14937
  validateOmitted(e) {
14932
- e.voidElement && e.closed === W.VoidSelfClosed && this.reportError(e, `Expected omitted end tag <${e.tagName}> instead of self-closing element <${e.tagName}/>`);
14938
+ e.voidElement && e.closed === H.VoidSelfClosed && this.reportError(e, `Expected omitted end tag <${e.tagName}> instead of self-closing element <${e.tagName}/>`);
14933
14939
  }
14934
14940
  validateSelfClosed(e) {
14935
- e.voidElement && e.closed === W.VoidOmitted && this.reportError(e, `Expected self-closing element <${e.tagName}/> instead of omitted end-tag <${e.tagName}>`);
14941
+ e.voidElement && e.closed === H.VoidOmitted && this.reportError(e, `Expected self-closing element <${e.tagName}/> instead of omitted end-tag <${e.tagName}>`);
14936
14942
  }
14937
14943
  reportError(e, t) {
14938
14944
  let n = {
@@ -14959,7 +14965,7 @@ function Gp(e) {
14959
14965
  default: throw Error("Unknown style");
14960
14966
  }
14961
14967
  }
14962
- var Kp = class extends q {
14968
+ var Kp = class extends G {
14963
14969
  documentation() {
14964
14970
  return {
14965
14971
  description: "WCAG 2.1 requires each `<a href>` anchor link to have a text describing the purpose of the link using either plain text or an `<img>` with the `alt` attribute set.",
@@ -14968,15 +14974,15 @@ var Kp = class extends q {
14968
14974
  }
14969
14975
  setup() {
14970
14976
  this.on("dom:ready", (e) => {
14971
- let t = e.document.getElementsByTagName("a");
14977
+ let t = e.document.querySelectorAll("a");
14972
14978
  for (let e of t) {
14973
- if (!e.hasAttribute("href") || !Is(e) || $s(e, { ignoreHiddenRoot: !0 }) !== K.EMPTY_TEXT || e.querySelectorAll("img").some((e) => tc(e))) continue;
14979
+ if (!e.hasAttribute("href") || !Ps(e) || Zs(e, { ignoreHiddenRoot: !0 }) !== W.EMPTY_TEXT || e.querySelectorAll("img").some((e) => $s(e))) continue;
14974
14980
  let t = e.querySelectorAll("[aria-label]");
14975
- nc(e) || t.some((e) => nc(e)) || this.report(e, "Anchor link must have a text describing its purpose");
14981
+ ec(e) || t.some((e) => ec(e)) || this.report(e, "Anchor link must have a text describing its purpose");
14976
14982
  }
14977
14983
  });
14978
14984
  }
14979
- }, qp = class extends q {
14985
+ }, qp = class extends G {
14980
14986
  documentation() {
14981
14987
  return {
14982
14988
  description: "WCAG 2.1 requires each `<form>` element to have at least one submit button.",
@@ -15004,7 +15010,7 @@ function Zp(e, t) {
15004
15010
  let { id: n } = t;
15005
15011
  return n ? e.querySelectorAll("button[form],input[form]").filter(Jp).filter((e) => Yp(n, e)).length > 0 : !1;
15006
15012
  }
15007
- var Qp = class extends q {
15013
+ var Qp = class extends G {
15008
15014
  documentation() {
15009
15015
  return {
15010
15016
  description: ["WCAG 2.1 requires all images used as submit buttons to have a non-empty textual description using the `alt` attribute.", "The alt text cannot be empty (`alt=\"\"`)."].join("\n"),
@@ -15014,7 +15020,7 @@ var Qp = class extends q {
15014
15020
  setup() {
15015
15021
  this.on("tag:end", (e) => {
15016
15022
  let t = e.previous;
15017
- if (t.tagName === "input" && t.getAttributeValue("type") === "image" && Is(t) && !tc(t)) {
15023
+ if (t.tagName === "input" && t.getAttributeValue("type") === "image" && Ps(t) && !$s(t)) {
15018
15024
  let e = t.getAttribute("alt");
15019
15025
  this.report({
15020
15026
  node: t,
@@ -15027,7 +15033,7 @@ var Qp = class extends q {
15027
15033
  }, $p = {
15028
15034
  allowEmpty: !0,
15029
15035
  alias: []
15030
- }, em = class extends q {
15036
+ }, em = class extends G {
15031
15037
  constructor(e) {
15032
15038
  super({
15033
15039
  ...$p,
@@ -15056,7 +15062,7 @@ var Qp = class extends q {
15056
15062
  });
15057
15063
  }
15058
15064
  validateNode(e) {
15059
- if (!Is(e) || e.getAttributeValue("alt") || e.hasAttribute("alt") && this.options.allowEmpty) return;
15065
+ if (!Ps(e) || e.getAttributeValue("alt") || e.hasAttribute("alt") && this.options.allowEmpty) return;
15060
15066
  for (let t of this.options.alias) if (e.getAttribute(t)) return;
15061
15067
  let t = e.annotatedName;
15062
15068
  if (e.hasAttribute("alt")) {
@@ -15085,11 +15091,11 @@ function sm(e) {
15085
15091
  return !!(l === i.rows && u.every((e) => e === 0) && !d);
15086
15092
  }
15087
15093
  var cm = {
15088
- "allowed-links": gc,
15089
- "area-alt": xc,
15090
- "aria-hidden-body": Sc,
15091
- "aria-label-misuse": Ec,
15092
- "attr-case": kc,
15094
+ "allowed-links": mc,
15095
+ "area-alt": yc,
15096
+ "aria-hidden-body": bc,
15097
+ "aria-label-misuse": wc,
15098
+ "attr-case": Dc,
15093
15099
  "attr-delimiter": sl,
15094
15100
  "attr-pattern": fl,
15095
15101
  "attr-quotes": gl,
@@ -15175,7 +15181,7 @@ var cm = {
15175
15181
  "wcag/h32": qp,
15176
15182
  "wcag/h36": Qp,
15177
15183
  "wcag/h37": em,
15178
- "wcag/h63": class extends q {
15184
+ "wcag/h63": class extends G {
15179
15185
  constructor(e) {
15180
15186
  super({
15181
15187
  ...tm,
@@ -15207,7 +15213,7 @@ var cm = {
15207
15213
  }
15208
15214
  }
15209
15215
  },
15210
- "wcag/h67": class extends q {
15216
+ "wcag/h67": class extends G {
15211
15217
  documentation() {
15212
15218
  return {
15213
15219
  description: "A decorative image cannot have a title attribute. Either remove `title` or add a descriptive `alt` text.",
@@ -15225,7 +15231,7 @@ var cm = {
15225
15231
  });
15226
15232
  }
15227
15233
  },
15228
- "wcag/h71": class extends q {
15234
+ "wcag/h71": class extends G {
15229
15235
  documentation() {
15230
15236
  return {
15231
15237
  description: "H71: Providing a description for groups of form controls using fieldset and legend elements",
@@ -15345,30 +15351,10 @@ var cm = {
15345
15351
  }
15346
15352
  }
15347
15353
  };
15348
- function um(e) {
15349
- let t = [];
15350
- function n(e) {
15351
- let t = "";
15352
- return e.id && (t += `#${e.id}`), e.hasAttribute("class") && (t += `.${e.classList.join(".")}`), t;
15353
- }
15354
- function r(e, i, a, o) {
15355
- let s = o === (e.parent ? e.parent.childElements.length : 0) - 1;
15356
- if (e.parent) {
15357
- let r = s ? "└" : "├";
15358
- t.push(`${a}${r}\u2500\u2500 ${e.tagName}${n(e)}`);
15359
- } else t.push("(root)");
15360
- for (let [t, n] of e.childElements.entries()) {
15361
- let e = i > 0 ? `${a}${s ? " " : "│"} ` : "";
15362
- r(n, i + 1, e, t);
15363
- }
15364
- }
15365
- return r(e, 0, "", 0), t;
15366
- }
15367
15354
  function Z(e) {
15368
15355
  return e && typeof e == "object" && "then" in e && typeof e.then == "function";
15369
15356
  }
15370
- new Set(Object.keys(cm));
15371
- var dm = {}, fm = {
15357
+ var um = {}, dm = {
15372
15358
  "html-validate:a11y": { rules: {
15373
15359
  "area-alt": ["error", { accessible: !0 }],
15374
15360
  "aria-hidden-body": "error",
@@ -15538,7 +15524,7 @@ var dm = {}, fm = {
15538
15524
  "valid-id": ["error", { relaxed: !0 }],
15539
15525
  "void-content": "error"
15540
15526
  } }
15541
- }, pm = class {
15527
+ }, fm = class {
15542
15528
  metaTable;
15543
15529
  plugins;
15544
15530
  rules;
@@ -15567,104 +15553,104 @@ var dm = {}, fm = {
15567
15553
  return this.transformers.find((t) => t.pattern.test(e)) ?? null;
15568
15554
  }
15569
15555
  };
15570
- function mm(e, t) {
15556
+ function pm(e, t) {
15571
15557
  return e in t;
15572
15558
  }
15559
+ function mm(e) {
15560
+ return pm("resolveConfig", e);
15561
+ }
15573
15562
  function hm(e) {
15574
- return mm("resolveConfig", e);
15563
+ return pm("resolveElements", e);
15575
15564
  }
15576
15565
  function gm(e) {
15577
- return mm("resolveElements", e);
15566
+ return pm("resolvePlugin", e);
15578
15567
  }
15579
15568
  function _m(e) {
15580
- return mm("resolvePlugin", e);
15581
- }
15582
- function vm(e) {
15583
- return mm("resolveTransformer", e);
15569
+ return pm("resolveTransformer", e);
15584
15570
  }
15585
- function ym(e, t, n) {
15586
- for (let r of e.filter(hm)) {
15571
+ function vm(e, t, n) {
15572
+ for (let r of e.filter(mm)) {
15587
15573
  let i = r.resolveConfig(t, n);
15588
- if (Z(i)) return bm(e, t, n);
15574
+ if (Z(i)) return ym(e, t, n);
15589
15575
  if (i) return i;
15590
15576
  }
15591
15577
  throw new L(`Failed to load configuration from "${t}"`);
15592
15578
  }
15593
- async function bm(e, t, n) {
15594
- for (let r of e.filter(hm)) {
15579
+ async function ym(e, t, n) {
15580
+ for (let r of e.filter(mm)) {
15595
15581
  let e = await r.resolveConfig(t, n);
15596
15582
  if (e) return e;
15597
15583
  }
15598
15584
  throw new L(`Failed to load configuration from "${t}"`);
15599
15585
  }
15600
- function xm(e, t, n) {
15601
- for (let r of e.filter(gm)) {
15586
+ function bm(e, t, n) {
15587
+ for (let r of e.filter(hm)) {
15602
15588
  let i = r.resolveElements(t, n);
15603
- if (Z(i)) return Sm(e, t, n);
15589
+ if (Z(i)) return xm(e, t, n);
15604
15590
  if (i) return i;
15605
15591
  }
15606
15592
  throw new L(`Failed to load elements from "${t}"`);
15607
15593
  }
15608
- async function Sm(e, t, n) {
15609
- for (let r of e.filter(gm)) {
15594
+ async function xm(e, t, n) {
15595
+ for (let r of e.filter(hm)) {
15610
15596
  let e = await r.resolveElements(t, n);
15611
15597
  if (e) return e;
15612
15598
  }
15613
15599
  throw new L(`Failed to load elements from "${t}"`);
15614
15600
  }
15615
- function Cm(e, t, n) {
15616
- for (let r of e.filter(_m)) {
15601
+ function Sm(e, t, n) {
15602
+ for (let r of e.filter(gm)) {
15617
15603
  let i = r.resolvePlugin(t, n);
15618
- if (Z(i)) return wm(e, t, n);
15604
+ if (Z(i)) return Cm(e, t, n);
15619
15605
  if (i) return i;
15620
15606
  }
15621
15607
  throw new L(`Failed to load plugin from "${t}"`);
15622
15608
  }
15623
- async function wm(e, t, n) {
15624
- for (let r of e.filter(_m)) {
15609
+ async function Cm(e, t, n) {
15610
+ for (let r of e.filter(gm)) {
15625
15611
  let e = await r.resolvePlugin(t, n);
15626
15612
  if (e) return e;
15627
15613
  }
15628
15614
  throw new L(`Failed to load plugin from "${t}"`);
15629
15615
  }
15630
- function Tm(e, t, n) {
15631
- for (let r of e.filter(vm)) {
15616
+ function wm(e, t, n) {
15617
+ for (let r of e.filter(_m)) {
15632
15618
  let i = r.resolveTransformer(t, n);
15633
- if (Z(i)) return Em(e, t, n);
15619
+ if (Z(i)) return Tm(e, t, n);
15634
15620
  if (i) return i;
15635
15621
  }
15636
15622
  throw new L(`Failed to load transformer from "${t}"`);
15637
15623
  }
15638
- async function Em(e, t, n) {
15639
- for (let r of e.filter(vm)) {
15624
+ async function Tm(e, t, n) {
15625
+ for (let r of e.filter(_m)) {
15640
15626
  let e = await r.resolveTransformer(t, n);
15641
15627
  if (e) return e;
15642
15628
  }
15643
15629
  throw new L(`Failed to load transformer from "${t}"`);
15644
15630
  }
15645
- var Dm = new st.default({
15631
+ var Em = new st.default({
15646
15632
  strict: !0,
15647
15633
  strictTuples: !0,
15648
15634
  strictTypes: !0
15649
15635
  });
15650
- Dm.addMetaSchema(va), Dm.addKeyword(Fa);
15651
- var Om = Dm.compile(lm);
15652
- function km(e, t) {
15636
+ Em.addMetaSchema(va), Em.addKeyword(Fa);
15637
+ var Dm = Em.compile(lm);
15638
+ function Om(e, t) {
15653
15639
  return t;
15654
15640
  }
15655
- function Am(e, t) {
15641
+ function km(e, t) {
15656
15642
  let n = Ca(e, {
15657
15643
  ...t,
15658
15644
  rules: {}
15659
15645
  });
15660
- t.rules && (n.rules = Ca(n.rules, t.rules, { arrayMerge: km }));
15646
+ t.rules && (n.rules = Ca(n.rules, t.rules, { arrayMerge: Om }));
15661
15647
  let r = !!e.root || !!t.root;
15662
15648
  return r && (n.root = r), n;
15663
15649
  }
15664
- function jm(e) {
15650
+ function Am(e) {
15665
15651
  return Array.isArray(e) ? e : [e];
15666
15652
  }
15667
- function Mm(e) {
15653
+ function jm(e) {
15668
15654
  return Object.entries(e).map(([e, t]) => {
15669
15655
  let n = new RegExp(e);
15670
15656
  return typeof t == "string" ? {
@@ -15678,7 +15664,7 @@ function Mm(e) {
15678
15664
  };
15679
15665
  });
15680
15666
  }
15681
- var Nm = class e {
15667
+ var Mm = class e {
15682
15668
  config;
15683
15669
  configurations;
15684
15670
  resolvers;
@@ -15697,28 +15683,28 @@ var Nm = class e {
15697
15683
  return e.validate(n, r), e.create(t, n);
15698
15684
  }
15699
15685
  static fromFile(t, n) {
15700
- let r = ym(jm(t), n, { cache: !1 });
15686
+ let r = vm(Am(t), n, { cache: !1 });
15701
15687
  return Z(r) ? r.then((r) => e.fromObject(t, r, n)) : e.fromObject(t, r, n);
15702
15688
  }
15703
15689
  static validate(t, n = null) {
15704
- if (!Om(t)) throw new Aa(
15690
+ if (!Dm(t)) throw new Aa(
15705
15691
  n,
15706
15692
  "Invalid configuration",
15707
15693
  t,
15708
15694
  lm,
15709
15695
  /* istanbul ignore next: will be set when a validation error has occurred */
15710
- Om.errors ?? []
15696
+ Dm.errors ?? []
15711
15697
  );
15712
15698
  if (t.rules) {
15713
15699
  let r = e.getRulesObject(t.rules);
15714
15700
  for (let [e, [, i]] of r.entries()) {
15715
15701
  let r = cm[e], a = `/rules/${e}/1`;
15716
- q.validateOptions(r, e, a, i, n, t);
15702
+ G.validateOptions(r, e, a, i, n, t);
15717
15703
  }
15718
15704
  }
15719
15705
  }
15720
15706
  static defaultConfig() {
15721
- return new e([], dm);
15707
+ return new e([], um);
15722
15708
  }
15723
15709
  static create(t, n) {
15724
15710
  let r = new e(t, n), i = r.loadPlugins(r.config.plugins ?? []);
@@ -15726,22 +15712,22 @@ var Nm = class e {
15726
15712
  }
15727
15713
  init(e, t) {
15728
15714
  this.plugins = t, this.configurations = this.loadConfigurations(this.plugins), this.extendMeta(this.plugins);
15729
- let n = (t) => (this.config = t, this.config.extends = [], e.rules && (this.config = Am(this.config, { rules: e.rules })), this), r = this.extendConfig(this.config.extends ?? []);
15715
+ let n = (t) => (this.config = t, this.config.extends = [], e.rules && (this.config = km(this.config, { rules: e.rules })), this), r = this.extendConfig(this.config.extends ?? []);
15730
15716
  return Z(r) ? r.then((e) => n(e)) : n(r);
15731
15717
  }
15732
15718
  constructor(e, t) {
15733
- this.config = Am({
15719
+ this.config = km({
15734
15720
  extends: [],
15735
15721
  plugins: [],
15736
15722
  rules: {},
15737
15723
  transform: {}
15738
- }, t), this.configurations = /* @__PURE__ */ new Map(), this.resolvers = jm(e), this.metaTable = null, this.plugins = [], this.transformers = Mm(this.config.transform ?? {});
15724
+ }, t), this.configurations = /* @__PURE__ */ new Map(), this.resolvers = Am(e), this.metaTable = null, this.plugins = [], this.transformers = jm(this.config.transform ?? {});
15739
15725
  }
15740
15726
  isRootFound() {
15741
15727
  return !!this.config.root;
15742
15728
  }
15743
15729
  merge(t, n) {
15744
- let r = new e(t, Am(this.config, n.config)), i = r.loadPlugins(r.config.plugins ?? []);
15730
+ let r = new e(t, km(this.config, n.config)), i = r.loadPlugins(r.config.plugins ?? []);
15745
15731
  return Z(i) ? i.then((e) => (r.plugins = e, r.configurations = r.loadConfigurations(r.plugins), r.extendMeta(r.plugins), r)) : (r.plugins = i, r.configurations = r.loadConfigurations(r.plugins), r.extendMeta(r.plugins), r);
15746
15732
  }
15747
15733
  extendConfig(t) {
@@ -15755,17 +15741,17 @@ var Nm = class e {
15755
15741
  if (Z(n)) return this.extendConfigAsync(t);
15756
15742
  i = n.config;
15757
15743
  }
15758
- n = Am(n, i);
15744
+ n = km(n, i);
15759
15745
  }
15760
- return Am(n, this.config);
15746
+ return km(n, this.config);
15761
15747
  }
15762
15748
  async extendConfigAsync(t) {
15763
15749
  let n = {};
15764
15750
  for (let r of t) {
15765
15751
  let t;
15766
- t = this.configurations.has(r) ? this.configurations.get(r) : (await e.fromFile(this.resolvers, r)).config, n = Am(n, t);
15752
+ t = this.configurations.has(r) ? this.configurations.get(r) : (await e.fromFile(this.resolvers, r)).config, n = km(n, t);
15767
15753
  }
15768
- return Am(n, this.config);
15754
+ return km(n, this.config);
15769
15755
  }
15770
15756
  getMetaTable() {
15771
15757
  if (this.metaTable) return this.metaTable;
@@ -15797,10 +15783,10 @@ var Nm = class e {
15797
15783
  let t = xt[e];
15798
15784
  if (t) return [t, null];
15799
15785
  try {
15800
- let t = xm(this.resolvers, e, { cache: !1 });
15786
+ let t = bm(this.resolvers, e, { cache: !1 });
15801
15787
  return Z(t) ? t.then((t) => [t, e]) : [t, e];
15802
15788
  } catch (t) {
15803
- throw new J(`Failed to load elements from "${e}": ${t instanceof Error ? t.message : String(t)}`, Ea(t));
15789
+ throw new K(`Failed to load elements from "${e}": ${t instanceof Error ? t.message : String(t)}`, Ea(t));
15804
15790
  }
15805
15791
  }
15806
15792
  /* istanbul ignore next: used for testing only */
@@ -15815,7 +15801,7 @@ var Nm = class e {
15815
15801
  for (let [n, r] of Object.entries(e)) {
15816
15802
  let e = r;
15817
15803
  Array.isArray(e) ? e.length === 1 && (e = [e[0], {}]) : e = [e, {}];
15818
- let i = hs(e[0]);
15804
+ let i = ps(e[0]);
15819
15805
  t.set(n, [i, e[1]]);
15820
15806
  }
15821
15807
  return t;
@@ -15834,7 +15820,7 @@ var Nm = class e {
15834
15820
  let o = n.shift();
15835
15821
  if (o) return r(o, i + 1);
15836
15822
  } else try {
15837
- let a = Cm(this.resolvers, e, { cache: !0 });
15823
+ let a = Sm(this.resolvers, e, { cache: !0 });
15838
15824
  if (Z(a)) return a.then((a) => {
15839
15825
  a.name = a.name || e, a.originalName = e, t.push(a);
15840
15826
  let o = n.shift();
@@ -15846,7 +15832,7 @@ var Nm = class e {
15846
15832
  if (o) return r(o, i + 1);
15847
15833
  }
15848
15834
  } catch (t) {
15849
- throw new J(`Failed to load plugin "${e}": ${t instanceof Error ? t.message : String(t)}`, Ea(t));
15835
+ throw new K(`Failed to load plugin "${e}": ${t instanceof Error ? t.message : String(t)}`, Ea(t));
15850
15836
  }
15851
15837
  }, i = n.shift();
15852
15838
  if (i) {
@@ -15857,7 +15843,7 @@ var Nm = class e {
15857
15843
  }
15858
15844
  loadConfigurations(t) {
15859
15845
  let n = /* @__PURE__ */ new Map();
15860
- for (let [t, r] of Object.entries(fm)) e.validate(r, t), n.set(t, r);
15846
+ for (let [t, r] of Object.entries(dm)) e.validate(r, t), n.set(t, r);
15861
15847
  for (let r of t) for (let [t, i] of Object.entries(r.configs ?? {})) i && (e.validate(i, t), n.set(`${r.name}:${t}`, i), r.name !== r.originalName && n.set(`${r.originalName}:${t}`, i));
15862
15848
  return n;
15863
15849
  }
@@ -15873,7 +15859,7 @@ var Nm = class e {
15873
15859
  }
15874
15860
  resolve() {
15875
15861
  let e = this.resolveData();
15876
- return Z(e) ? e.then((e) => new pm(e, this.get())) : new pm(e, this.get());
15862
+ return Z(e) ? e.then((e) => new fm(e, this.get())) : new fm(e, this.get());
15877
15863
  }
15878
15864
  resolveData() {
15879
15865
  let e = this.getMetaTable();
@@ -15889,7 +15875,7 @@ var Nm = class e {
15889
15875
  transformers: this.transformers
15890
15876
  };
15891
15877
  }
15892
- }, Pm = class {
15878
+ }, Nm = class {
15893
15879
  _globalConfig;
15894
15880
  _configData;
15895
15881
  resolvers;
@@ -15917,26 +15903,26 @@ var Nm = class e {
15917
15903
  return (await this.getGlobalConfig()).get();
15918
15904
  }
15919
15905
  empty() {
15920
- return Nm.empty();
15906
+ return Mm.empty();
15921
15907
  }
15922
15908
  loadFromObject(e, t) {
15923
- return Nm.fromObject(this.resolvers, e, t);
15909
+ return Mm.fromObject(this.resolvers, e, t);
15924
15910
  }
15925
15911
  loadFromFile(e) {
15926
- return Nm.fromFile(this.resolvers, e);
15912
+ return Mm.fromFile(this.resolvers, e);
15927
15913
  }
15928
- }, Fm = [];
15929
- function Im(e) {
15914
+ }, Pm = [];
15915
+ function Fm(e) {
15930
15916
  return Array.isArray(e[0]);
15931
15917
  }
15932
- var Lm = class extends Pm {
15918
+ var Im = class extends Nm {
15933
15919
  constructor(...e) {
15934
- if (Im(e)) {
15920
+ if (Fm(e)) {
15935
15921
  let [t, n] = e;
15936
15922
  super(t, n);
15937
15923
  } else {
15938
15924
  let [t] = e;
15939
- super(Fm, t);
15925
+ super(Pm, t);
15940
15926
  }
15941
15927
  }
15942
15928
  setConfig(e) {
@@ -15965,7 +15951,7 @@ var Lm = class extends Pm {
15965
15951
  return Z(n) ? n.then((e) => e.resolve()) : n.resolve();
15966
15952
  }
15967
15953
  }
15968
- }, Rm = class {
15954
+ }, Lm = class {
15969
15955
  listeners;
15970
15956
  constructor() {
15971
15957
  this.listeners = {};
@@ -15997,34 +15983,34 @@ var Lm = class extends Pm {
15997
15983
  return [...n, ...r];
15998
15984
  }
15999
15985
  };
16000
- function zm(e) {
15986
+ function Rm(e) {
16001
15987
  return {
16002
15988
  ...e,
16003
15989
  selector: e.selector()
16004
15990
  };
16005
15991
  }
16006
- function Bm(e) {
15992
+ function zm(e) {
16007
15993
  return e.length === 0 ? !1 : Z(e[0]);
16008
15994
  }
16009
- var Vm = class {
15995
+ var Bm = class {
16010
15996
  result;
16011
15997
  constructor() {
16012
15998
  this.result = {};
16013
15999
  }
16014
16000
  static merge(e) {
16015
16001
  if (Z(e)) return e.then((e) => this.merge(e));
16016
- if (Bm(e)) return Promise.all(e).then((e) => this.merge(e));
16002
+ if (zm(e)) return Promise.all(e).then((e) => this.merge(e));
16017
16003
  let t = e.every((e) => e.valid), n = {};
16018
16004
  for (let t of e) for (let e of t.results) {
16019
16005
  let t = e.filePath;
16020
16006
  t in n ? n[t].messages = [...n[t].messages, ...e.messages] : n[t] = { ...e };
16021
16007
  }
16022
- let r = Object.values(n).map((e) => (e.errorCount = Hm(e.messages), e.warningCount = Um(e.messages), e));
16008
+ let r = Object.values(n).map((e) => (e.errorCount = Vm(e.messages), e.warningCount = Hm(e.messages), e));
16023
16009
  return {
16024
16010
  valid: t,
16025
16011
  results: r,
16026
- errorCount: Wm(r),
16027
- warningCount: Gm(r)
16012
+ errorCount: Um(r),
16013
+ warningCount: Wm(r)
16028
16014
  };
16029
16015
  }
16030
16016
  add(e) {
@@ -16051,43 +16037,43 @@ var Vm = class {
16051
16037
  let t = {
16052
16038
  valid: this.isValid(),
16053
16039
  results: Object.keys(this.result).map((t) => {
16054
- let n = Array.from(this.result[t], zm).toSorted(Km), r = (e ?? []).find((e) => t === e.filename);
16040
+ let n = Array.from(this.result[t], Rm).toSorted(Gm), r = (e ?? []).find((e) => t === e.filename);
16055
16041
  return {
16056
16042
  filePath: t,
16057
16043
  messages: n,
16058
- errorCount: Hm(n),
16059
- warningCount: Um(n),
16044
+ errorCount: Vm(n),
16045
+ warningCount: Hm(n),
16060
16046
  source: r ? r.originalData ?? r.data : null
16061
16047
  };
16062
16048
  }),
16063
16049
  errorCount: 0,
16064
16050
  warningCount: 0
16065
16051
  };
16066
- return t.errorCount = Wm(t.results), t.warningCount = Gm(t.results), t;
16052
+ return t.errorCount = Um(t.results), t.warningCount = Wm(t.results), t;
16067
16053
  }
16068
16054
  isValid() {
16069
- return Object.values(this.result).reduce((e, t) => e + Hm(t), 0) === 0;
16055
+ return Object.values(this.result).reduce((e, t) => e + Vm(t), 0) === 0;
16070
16056
  }
16071
16057
  };
16058
+ function Vm(e) {
16059
+ return e.filter((e) => e.severity === Number(fs.ERROR)).length;
16060
+ }
16072
16061
  function Hm(e) {
16073
- return e.filter((e) => e.severity === Number(ms.ERROR)).length;
16062
+ return e.filter((e) => e.severity === Number(fs.WARN)).length;
16074
16063
  }
16075
16064
  function Um(e) {
16076
- return e.filter((e) => e.severity === Number(ms.WARN)).length;
16077
- }
16078
- function Wm(e) {
16079
16065
  return e.reduce((e, t) => e + t.errorCount, 0);
16080
16066
  }
16081
- function Gm(e) {
16067
+ function Wm(e) {
16082
16068
  return e.reduce((e, t) => e + t.warningCount, 0);
16083
16069
  }
16084
- function Km(e, t) {
16070
+ function Gm(e, t) {
16085
16071
  return e.line < t.line ? -1 : e.line > t.line ? 1 : e.column < t.column ? -1 : +(e.column > t.column);
16086
16072
  }
16087
- var qm = /<!(?:--)?\[(.*?)\](?:--)?>/g;
16088
- function* Jm(e, t) {
16073
+ var Km = /<!(?:--)?\[(.*?)](?:--)?>/g;
16074
+ function* qm(e, t) {
16089
16075
  let n;
16090
- for (; (n = qm.exec(e)) !== null;) {
16076
+ for (; (n = Km.exec(e)) !== null;) {
16091
16077
  let r = n[1], i = n.index;
16092
16078
  yield {
16093
16079
  expression: r,
@@ -16095,19 +16081,19 @@ function* Jm(e, t) {
16095
16081
  };
16096
16082
  }
16097
16083
  }
16098
- var Ym = class extends Error {
16084
+ var Jm = class extends Error {
16099
16085
  location;
16100
16086
  constructor(e, t) {
16101
16087
  super(t), this.name = "ParserError", this.location = e;
16102
16088
  }
16103
16089
  };
16104
- function Xm(e) {
16090
+ function Ym(e) {
16105
16091
  return e?.type === Y.ATTR_VALUE;
16106
16092
  }
16107
- function Zm(e, t) {
16093
+ function Xm(e, t) {
16108
16094
  return e === "svg" && ["title", "desc"].includes(t);
16109
16095
  }
16110
- function Qm(e) {
16096
+ function Zm(e) {
16111
16097
  return [
16112
16098
  "enable",
16113
16099
  "disable",
@@ -16121,7 +16107,7 @@ var Q = class {
16121
16107
  currentNamespace = "";
16122
16108
  dom;
16123
16109
  constructor(e) {
16124
- this.event = new Rm(), this.dom = null, this.metaTable = e.getMetaTable();
16110
+ this.event = new Lm(), this.dom = null, this.metaTable = e.getMetaTable();
16125
16111
  }
16126
16112
  parseHtml(e) {
16127
16113
  typeof e == "string" && (e = {
@@ -16130,7 +16116,7 @@ var Q = class {
16130
16116
  line: 1,
16131
16117
  column: 1,
16132
16118
  offset: 0
16133
- }), this.trigger("parse:begin", { location: null }), this.dom = new ls({
16119
+ }), this.trigger("parse:begin", { location: null }), this.dom = new ss({
16134
16120
  filename: e.filename,
16135
16121
  offset: e.offset,
16136
16122
  line: e.line,
@@ -16193,10 +16179,10 @@ var Q = class {
16193
16179
  }
16194
16180
  }
16195
16181
  consumeTag(e, t, n) {
16196
- let r = Array.from(this.consumeUntil(n, Y.TAG_CLOSE, t.location)), i = r.at(-1), a = this.closeOptional(t), o = a ? this.dom.getActive().parent : this.dom.getActive(), s = as.fromTokens(t, i, o, this.metaTable, this.currentNamespace), c = !t.data[1], l = !c || s.closed !== W.Open, u = s.meta?.foreign;
16182
+ let r = Array.from(this.consumeUntil(n, Y.TAG_CLOSE, t.location)), i = r.at(-1), a = this.closeOptional(t), o = a ? this.dom.getActive().parent : this.dom.getActive(), s = rs.fromTokens(t, i, o, this.metaTable, this.currentNamespace), c = !t.data[1], l = !c || s.closed !== H.Open, u = s.meta?.foreign;
16197
16183
  if (a) {
16198
16184
  let n = this.dom.getActive();
16199
- n.closed = W.ImplicitClosed, this.closeElement(e, s, n, t.location), this.dom.popActive();
16185
+ n.closed = H.ImplicitClosed, this.closeElement(e, s, n, t.location), this.dom.popActive();
16200
16186
  }
16201
16187
  c && (this.dom.pushActive(s), this.trigger("tag:start", {
16202
16188
  target: s,
@@ -16216,7 +16202,7 @@ var Q = class {
16216
16202
  location: i.location
16217
16203
  }), l) {
16218
16204
  let t = this.dom.getActive();
16219
- c || (s.closed = W.EndTag), this.closeElement(e, s, t, i.location);
16205
+ c || (s.closed = H.EndTag), this.closeElement(e, s, t, i.location);
16220
16206
  let n = s.tagName !== t.tagName;
16221
16207
  !(!c && s.voidElement) && !n && this.dom.popActive();
16222
16208
  } else u && this.discardForeignBody(e, s.tagName, n, t.location);
@@ -16228,7 +16214,7 @@ var Q = class {
16228
16214
  previous: n,
16229
16215
  location: r
16230
16216
  };
16231
- this.trigger("tag:end", i), !(t && t.tagName !== n.tagName && n.closed !== W.ImplicitClosed) && (n.isRootElement() || this.trigger("element:ready", {
16217
+ this.trigger("tag:end", i), !(t && t.tagName !== n.tagName && n.closed !== H.ImplicitClosed) && (n.isRootElement() || this.trigger("element:ready", {
16232
16218
  target: n,
16233
16219
  location: n.location
16234
16220
  }));
@@ -16245,7 +16231,7 @@ var Q = class {
16245
16231
  let i = 1, a, o;
16246
16232
  do {
16247
16233
  let [s] = Array.from(this.consumeUntil(n, Y.TAG_OPEN, r)).slice(-1), [, c, l] = s.data;
16248
- if (!c && Zm(t, l)) {
16234
+ if (!c && Xm(t, l)) {
16249
16235
  let t = this.currentNamespace;
16250
16236
  this.currentNamespace = "svg", this.consumeTag(e, s, n), this.consumeUntilMatchingTag(e, n, l), this.currentNamespace = t;
16251
16237
  continue;
@@ -16256,11 +16242,11 @@ var Q = class {
16256
16242
  c ? (a = s, i--) : u || i++;
16257
16243
  } while (i > 0);
16258
16244
  if (!a || !o) return;
16259
- let s = this.dom.getActive(), c = as.fromTokens(a, o, s, this.metaTable);
16245
+ let s = this.dom.getActive(), c = rs.fromTokens(a, o, s, this.metaTable);
16260
16246
  this.closeElement(e, c, s, o.location), this.dom.popActive();
16261
16247
  }
16262
16248
  consumeAttribute(e, t, n, r) {
16263
- let { meta: i } = t, a = this.getAttributeKeyLocation(n), o = this.getAttributeValueLocation(r), s = this.getAttributeLocation(n, r), c = Xm(r), l = {
16249
+ let { meta: i } = t, a = this.getAttributeKeyLocation(n), o = this.getAttributeValueLocation(r), s = this.getAttributeLocation(n, r), c = Ym(r), l = {
16264
16250
  key: n.data[1],
16265
16251
  value: null,
16266
16252
  quote: null
@@ -16315,7 +16301,7 @@ var Q = class {
16315
16301
  }
16316
16302
  let u = /^(.*?)(?:(\s*(?:--|:)\s*)(.*))?$/.exec(o);
16317
16303
  if (!u) throw Error(`Failed to parse directive "${t}"`);
16318
- if (!Qm(i)) {
16304
+ if (!Zm(i)) {
16319
16305
  let a = n.length, o = n.length + r.length + i.length;
16320
16306
  this.trigger("parse:error", {
16321
16307
  location: z(e.location, a, -t.length + o),
@@ -16344,7 +16330,7 @@ var Q = class {
16344
16330
  }
16345
16331
  consumeComment(e) {
16346
16332
  let t = e.data[0], n = this.dom.getActive();
16347
- for (let r of Jm(t, e.location)) this.trigger("conditional", {
16333
+ for (let r of qm(t, e.location)) this.trigger("conditional", {
16348
16334
  condition: r.expression,
16349
16335
  location: r.location,
16350
16336
  parent: n
@@ -16366,7 +16352,7 @@ var Q = class {
16366
16352
  if (yield n, n.type === t) return;
16367
16353
  r = this.next(e);
16368
16354
  }
16369
- throw new Ym(n, `stream ended before ${Y[t]} token was found`);
16355
+ throw new Jm(n, `stream ended before ${Y[t]} token was found`);
16370
16356
  }
16371
16357
  consumeUntilMatchingTag(e, t, n) {
16372
16358
  let r = 1, i = this.next(t);
@@ -16413,9 +16399,30 @@ var Q = class {
16413
16399
  }
16414
16400
  closeTree(e, t) {
16415
16401
  let n = this.dom.root, r = this.dom.getActive();
16416
- for (; !r.isRootElement();) r.meta?.implicitClosed ? (r.closed = W.ImplicitClosed, this.closeElement(e, n, r, t)) : this.closeElement(e, null, r, t), this.dom.popActive(), r = this.dom.getActive();
16402
+ for (; !r.isRootElement();) r.meta?.implicitClosed ? (r.closed = H.ImplicitClosed, this.closeElement(e, n, r, t)) : this.closeElement(e, null, r, t), this.dom.popActive(), r = this.dom.getActive();
16403
+ }
16404
+ };
16405
+ new Set(Object.keys(cm));
16406
+ function Qm(e) {
16407
+ let t = [];
16408
+ function n(e) {
16409
+ let t = "";
16410
+ return e.id && (t += `#${e.id}`), e.hasAttribute("class") && (t += `.${e.classList.join(".")}`), t;
16417
16411
  }
16418
- }, $m = 1;
16412
+ function r(e, i, a, o) {
16413
+ let s = o === (e.parent ? e.parent.childElements.length : 0) - 1;
16414
+ if (e.parent) {
16415
+ let r = s ? "└" : "├";
16416
+ t.push(`${a}${r}\u2500\u2500 ${e.tagName}${n(e)}`);
16417
+ } else t.push("(root)");
16418
+ for (let [t, n] of e.childElements.entries()) {
16419
+ let e = i > 0 ? `${a}${s ? " " : "│"} ` : "";
16420
+ r(n, i + 1, e, t);
16421
+ }
16422
+ }
16423
+ return r(e, 0, "", 0), t;
16424
+ }
16425
+ var $m = 1;
16419
16426
  function eh() {
16420
16427
  return $m++;
16421
16428
  }
@@ -16425,7 +16432,7 @@ var $ = class {
16425
16432
  ParserClass;
16426
16433
  availableRules;
16427
16434
  constructor(e, t) {
16428
- this.report = new Vm(), this.config = e, this.ParserClass = t;
16435
+ this.report = new Bm(), this.config = e, this.ParserClass = t;
16429
16436
  let n = this.initPlugins(this.config);
16430
16437
  this.availableRules = {
16431
16438
  ...cm,
@@ -16463,7 +16470,7 @@ var $ = class {
16463
16470
  try {
16464
16471
  e.parseHtml(t);
16465
16472
  } catch (e) {
16466
- if (e instanceof il || e instanceof Ym) this.reportError("parser-error", e.message, e.location);
16473
+ if (e instanceof il || e instanceof Jm) this.reportError("parser-error", e.message, e.location);
16467
16474
  else throw e;
16468
16475
  }
16469
16476
  }
@@ -16493,7 +16500,7 @@ var $ = class {
16493
16500
  return n;
16494
16501
  }
16495
16502
  dumpTree(e) {
16496
- return um(this.instantiateParser().parseHtml(e[0]));
16503
+ return Qm(this.instantiateParser().parseHtml(e[0]));
16497
16504
  }
16498
16505
  getRuleDocumentation({ ruleId: e, context: t }) {
16499
16506
  let n = this.config.getRules().get(e);
@@ -16523,7 +16530,7 @@ var $ = class {
16523
16530
  }
16524
16531
  }
16525
16532
  processEnableDirective(e, t) {
16526
- for (let t of e) t.setEnabled(!0), t.getSeverity() === ms.DISABLED && t.setServerity(ms.ERROR);
16533
+ for (let t of e) t.setEnabled(!0), t.getSeverity() === fs.DISABLED && t.setServerity(fs.ERROR);
16527
16534
  t.on("tag:start", (t, n) => {
16528
16535
  n.target.enableRules(e.map((e) => e.name));
16529
16536
  });
@@ -16598,7 +16605,7 @@ var $ = class {
16598
16605
  } else return this.missingRule(e);
16599
16606
  }
16600
16607
  missingRule(e) {
16601
- return new class extends q {
16608
+ return new class extends G {
16602
16609
  setup() {
16603
16610
  this.on("dom:load", () => {
16604
16611
  this.report(null, `Definition for rule '${e}' was not found`);
@@ -16609,7 +16616,7 @@ var $ = class {
16609
16616
  reportError(e, t, n) {
16610
16617
  this.report.addManual(n.filename, {
16611
16618
  ruleId: e,
16612
- severity: ms.ERROR,
16619
+ severity: fs.ERROR,
16613
16620
  message: t,
16614
16621
  offset: n.offset,
16615
16622
  line: n.line,
@@ -16621,28 +16628,28 @@ var $ = class {
16621
16628
  };
16622
16629
  function th(e, t, n, r) {
16623
16630
  let i = t.find((e) => e.name === n);
16624
- if (!i) throw new J(`No plugin named "${n}" has been loaded`);
16625
- if (!i.transformer) throw new J("Plugin does not expose any transformers");
16626
- if (typeof i.transformer == "function") throw new J(`Transformer "${e}" refers to named transformer but plugin exposes only unnamed, use "${n}" instead.`);
16631
+ if (!i) throw new K(`No plugin named "${n}" has been loaded`);
16632
+ if (!i.transformer) throw new K("Plugin does not expose any transformers");
16633
+ if (typeof i.transformer == "function") throw new K(`Transformer "${e}" refers to named transformer but plugin exposes only unnamed, use "${n}" instead.`);
16627
16634
  let a = i.transformer[r];
16628
- if (!a) throw new J(`Plugin "${n}" does not expose a transformer named "${r}".`);
16635
+ if (!a) throw new K(`Plugin "${n}" does not expose a transformer named "${r}".`);
16629
16636
  return a;
16630
16637
  }
16631
16638
  function nh(e, t) {
16632
- return Tm(e, t, { cache: !0 });
16639
+ return wm(e, t, { cache: !0 });
16633
16640
  }
16634
16641
  function rh(e, t) {
16635
- if (!t.transformer) throw new J("Plugin does not expose any transformers");
16642
+ if (!t.transformer) throw new K("Plugin does not expose any transformers");
16636
16643
  if (typeof t.transformer != "function") {
16637
16644
  if (t.transformer.default) return t.transformer.default;
16638
- throw new J(`Transformer "${e}" refers to unnamed transformer but plugin exposes only named.`);
16645
+ throw new K(`Transformer "${e}" refers to unnamed transformer but plugin exposes only named.`);
16639
16646
  }
16640
16647
  return t.transformer;
16641
16648
  }
16642
16649
  var ih = { VERSION: 1 };
16643
16650
  function ah(e) {
16644
16651
  let t = e.api ?? 0;
16645
- if (t !== ih.VERSION) throw new J(`Transformer uses API version ${String(t)} but only version ${String(ih.VERSION)} is supported`);
16652
+ if (t !== ih.VERSION) throw new K(`Transformer uses API version ${String(t)} but only version ${String(ih.VERSION)} is supported`);
16646
16653
  }
16647
16654
  function oh(e, t, n) {
16648
16655
  let r = /(.*):(.*)/.exec(t);
@@ -16658,7 +16665,7 @@ function sh(e, t, n) {
16658
16665
  let r = oh(e, t, n);
16659
16666
  return Z(r) ? r.then((e) => (ah(e), e)) : (ah(r), r);
16660
16667
  } catch (e) {
16661
- throw e instanceof J ? new J(`Failed to load transformer "${t}": ${e.message}`, e) : new J(`Failed to load transformer "${t}"`, Ea(e));
16668
+ throw e instanceof K ? new K(`Failed to load transformer "${t}": ${e.message}`, e) : new K(`Failed to load transformer "${t}"`, Ea(e));
16662
16669
  }
16663
16670
  }
16664
16671
  function ch(e, t, n, r) {
@@ -16748,16 +16755,16 @@ function gh(e, t, n, r) {
16748
16755
  //#endregion
16749
16756
  //#region node_modules/html-validate/dist/esm/core-browser.js
16750
16757
  function _h(e) {
16751
- return !e || typeof e == "string" ? !1 : !!(e.processAttribute ?? e.processElement);
16758
+ return !e || typeof e != "object" ? !1 : ["processAttribute", "processElement"].some((t) => t in e);
16752
16759
  }
16753
16760
  function vh(e) {
16754
- return !e || typeof e == "string" ? !1 : !(e.processAttribute ?? e.processElement);
16761
+ return !e || typeof e != "object" ? !1 : !["processAttribute", "processElement"].some((t) => t in e);
16755
16762
  }
16756
16763
  var yh = class {
16757
16764
  configLoader;
16758
16765
  constructor(e) {
16759
- let [t, n] = e instanceof Pm ? [e, void 0] : [void 0, e];
16760
- this.configLoader = t ?? new Lm(n);
16766
+ let [t, n] = e instanceof Nm ? [e, void 0] : [void 0, e];
16767
+ this.configLoader = t ?? new Im(n);
16761
16768
  }
16762
16769
  validateString(e, t, n, r) {
16763
16770
  let i = typeof t == "string" ? t : "inline", a = vh(t) ? t : vh(n) ? n : void 0, o = {
@@ -16782,11 +16789,11 @@ var yh = class {
16782
16789
  return this.validateSourceSync(o, a);
16783
16790
  }
16784
16791
  async validateSource(e, t) {
16785
- let n = uo(e), r = await this.getConfigFor(n.filename, t), i = await ph(this.configLoader.getResolvers(), r, n);
16792
+ let n = kc(e), r = await this.getConfigFor(n.filename, t), i = await ph(this.configLoader.getResolvers(), r, n);
16786
16793
  return new $(r, Q).lint(i);
16787
16794
  }
16788
16795
  validateSourceSync(e, t) {
16789
- let n = uo(e), r = this.getConfigForSync(n.filename, t), i = mh(this.configLoader.getResolvers(), r, n);
16796
+ let n = kc(e), r = this.getConfigForSync(n.filename, t), i = mh(this.configLoader.getResolvers(), r, n);
16790
16797
  return new $(r, Q).lint(i);
16791
16798
  }
16792
16799
  async validateFile(e, t) {
@@ -16798,10 +16805,10 @@ var yh = class {
16798
16805
  return new $(n, Q).lint(r);
16799
16806
  }
16800
16807
  async validateMultipleFiles(e, t) {
16801
- return Vm.merge(e.map((e) => this.validateFile(e, t)));
16808
+ return Bm.merge(e.map((e) => this.validateFile(e, t)));
16802
16809
  }
16803
16810
  validateMultipleFilesSync(e, t) {
16804
- return Vm.merge(e.map((e) => this.validateFileSync(e, t)));
16811
+ return Bm.merge(e.map((e) => this.validateFileSync(e, t)));
16805
16812
  }
16806
16813
  async canValidate(e) {
16807
16814
  return e.toLowerCase().endsWith(".html") ? !0 : (await this.getConfigFor(e)).canTransform(e);
@@ -16884,4 +16891,4 @@ var yh = class {
16884
16891
  }
16885
16892
  };
16886
16893
  //#endregion
16887
- export { yh as HtmlValidate, Lm as StaticConfigLoader };
16894
+ export { yh as HtmlValidate, Im as StaticConfigLoader };