@tricoteuses/assemblee 3.3.3 → 3.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/parsers.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _t as e, gt as t, r as n, vt as r, yt as i } from "./amendements-DmjkxpwG.js";
2
- import { t as a } from "./amendements-C3RgTrF-.js";
1
+ import { _t as e, gt as t, r as n, vt as r, yt as i } from "./amendements-Cpku2Ut-.js";
2
+ import { t as a } from "./amendements-C_aR-BVu.js";
3
3
  import o from "node:assert";
4
4
  import s from "fs-extra";
5
5
  import c from "node:path";
@@ -7,30 +7,30 @@ import l from "deep-equal";
7
7
  import u from "js-yaml";
8
8
  import { parse as d } from "node-html-parser";
9
9
  //#region \0rolldown/runtime.js
10
- var f = Object.create, p = Object.defineProperty, m = Object.getOwnPropertyDescriptor, h = Object.getOwnPropertyNames, g = Object.getPrototypeOf, _ = Object.prototype.hasOwnProperty, v = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), y = (e, t) => {
10
+ var f = Object.create, p = Object.defineProperty, ee = Object.getOwnPropertyDescriptor, m = Object.getOwnPropertyNames, h = Object.getPrototypeOf, g = Object.prototype.hasOwnProperty, _ = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), v = (e, t) => {
11
11
  let n = {};
12
12
  for (var r in e) p(n, r, {
13
13
  get: e[r],
14
14
  enumerable: !0
15
15
  });
16
16
  return t || p(n, Symbol.toStringTag, { value: "Module" }), n;
17
- }, ee = (e, t, n, r) => {
18
- if (t && typeof t == "object" || typeof t == "function") for (var i = h(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !_.call(e, s) && s !== n && p(e, s, {
17
+ }, y = (e, t, n, r) => {
18
+ if (t && typeof t == "object" || typeof t == "function") for (var i = m(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !g.call(e, s) && s !== n && p(e, s, {
19
19
  get: ((e) => t[e]).bind(null, s),
20
- enumerable: !(r = m(t, s)) || r.enumerable
20
+ enumerable: !(r = ee(t, s)) || r.enumerable
21
21
  });
22
22
  return e;
23
- }, te = (e, t, n) => (n = e == null ? {} : f(g(e)), ee(t || !e || !e.__esModule ? p(n, "default", {
23
+ }, b = (e, t, n) => (n = e == null ? {} : f(h(e)), y(t || !e || !e.__esModule || !g.call(e, "default") ? p(n, "default", {
24
24
  value: e,
25
25
  enumerable: !0
26
- }) : n, e)), b;
26
+ }) : n, e)), x;
27
27
  (function(e) {
28
28
  e.Root = "root", e.Text = "text", e.Directive = "directive", e.Comment = "comment", e.Script = "script", e.Style = "style", e.Tag = "tag", e.CDATA = "cdata", e.Doctype = "doctype";
29
- })(b || (b = {}));
30
- function ne(e) {
31
- return e.type === b.Tag || e.type === b.Script || e.type === b.Style;
29
+ })(x || (x = {}));
30
+ function S(e) {
31
+ return e.type === x.Tag || e.type === x.Script || e.type === x.Style;
32
32
  }
33
- var re = b.Root, x = b.Text, ie = b.Directive, ae = b.Comment, oe = b.Script, se = b.Style, ce = b.Tag, le = b.CDATA, ue = b.Doctype, de = class {
33
+ var te = x.Root, ne = x.Text, re = x.Directive, ie = x.Comment, ae = x.Script, oe = x.Style, se = x.Tag, ce = x.CDATA, le = x.Doctype, ue = class {
34
34
  constructor() {
35
35
  this.parent = null, this.prev = null, this.next = null, this.startIndex = null, this.endIndex = null;
36
36
  }
@@ -53,9 +53,9 @@ var re = b.Root, x = b.Text, ie = b.Directive, ae = b.Comment, oe = b.Script, se
53
53
  this.next = e;
54
54
  }
55
55
  cloneNode(e = !1) {
56
- return Te(this, e);
56
+ return we(this, e);
57
57
  }
58
- }, fe = class extends de {
58
+ }, de = class extends ue {
59
59
  constructor(e) {
60
60
  super(), this.data = e;
61
61
  }
@@ -65,28 +65,28 @@ var re = b.Root, x = b.Text, ie = b.Directive, ae = b.Comment, oe = b.Script, se
65
65
  set nodeValue(e) {
66
66
  this.data = e;
67
67
  }
68
- }, pe = class extends fe {
68
+ }, fe = class extends de {
69
69
  constructor() {
70
- super(...arguments), this.type = b.Text;
70
+ super(...arguments), this.type = x.Text;
71
71
  }
72
72
  get nodeType() {
73
73
  return 3;
74
74
  }
75
- }, me = class extends fe {
75
+ }, pe = class extends de {
76
76
  constructor() {
77
- super(...arguments), this.type = b.Comment;
77
+ super(...arguments), this.type = x.Comment;
78
78
  }
79
79
  get nodeType() {
80
80
  return 8;
81
81
  }
82
- }, he = class extends fe {
82
+ }, me = class extends de {
83
83
  constructor(e, t) {
84
- super(t), this.name = e, this.type = b.Directive;
84
+ super(t), this.name = e, this.type = x.Directive;
85
85
  }
86
86
  get nodeType() {
87
87
  return 1;
88
88
  }
89
- }, ge = class extends de {
89
+ }, he = class extends ue {
90
90
  constructor(e) {
91
91
  super(), this.children = e;
92
92
  }
@@ -102,22 +102,22 @@ var re = b.Root, x = b.Text, ie = b.Directive, ae = b.Comment, oe = b.Script, se
102
102
  set childNodes(e) {
103
103
  this.children = e;
104
104
  }
105
- }, _e = class extends ge {
105
+ }, ge = class extends he {
106
106
  constructor() {
107
- super(...arguments), this.type = b.CDATA;
107
+ super(...arguments), this.type = x.CDATA;
108
108
  }
109
109
  get nodeType() {
110
110
  return 4;
111
111
  }
112
- }, ve = class extends ge {
112
+ }, _e = class extends he {
113
113
  constructor() {
114
- super(...arguments), this.type = b.Root;
114
+ super(...arguments), this.type = x.Root;
115
115
  }
116
116
  get nodeType() {
117
117
  return 9;
118
118
  }
119
- }, ye = class extends ge {
120
- constructor(e, t, n = [], r = e === "script" ? b.Script : e === "style" ? b.Style : b.Tag) {
119
+ }, ve = class extends he {
120
+ constructor(e, t, n = [], r = e === "script" ? x.Script : e === "style" ? x.Style : x.Tag) {
121
121
  super(n), this.name = e, this.attribs = t, this.type = r;
122
122
  }
123
123
  get nodeType() {
@@ -138,66 +138,66 @@ var re = b.Root, x = b.Text, ie = b.Directive, ae = b.Comment, oe = b.Script, se
138
138
  }));
139
139
  }
140
140
  };
141
- function S(e) {
142
- return ne(e);
141
+ function C(e) {
142
+ return S(e);
143
+ }
144
+ function ye(e) {
145
+ return e.type === x.CDATA;
143
146
  }
144
147
  function be(e) {
145
- return e.type === b.CDATA;
148
+ return e.type === x.Text;
146
149
  }
147
150
  function xe(e) {
148
- return e.type === b.Text;
151
+ return e.type === x.Comment;
149
152
  }
150
153
  function Se(e) {
151
- return e.type === b.Comment;
154
+ return e.type === x.Directive;
152
155
  }
153
156
  function Ce(e) {
154
- return e.type === b.Directive;
157
+ return e.type === x.Root;
155
158
  }
156
- function we(e) {
157
- return e.type === b.Root;
158
- }
159
- function C(e) {
159
+ function w(e) {
160
160
  return Object.prototype.hasOwnProperty.call(e, "children");
161
161
  }
162
- function Te(e, t = !1) {
162
+ function we(e, t = !1) {
163
163
  let n;
164
- if (xe(e)) n = new pe(e.data);
165
- else if (Se(e)) n = new me(e.data);
166
- else if (S(e)) {
167
- let r = t ? Ee(e.children) : [], i = new ye(e.name, { ...e.attribs }, r);
164
+ if (be(e)) n = new fe(e.data);
165
+ else if (xe(e)) n = new pe(e.data);
166
+ else if (C(e)) {
167
+ let r = t ? Te(e.children) : [], i = new ve(e.name, { ...e.attribs }, r);
168
168
  r.forEach((e) => e.parent = i), e.namespace != null && (i.namespace = e.namespace), e["x-attribsNamespace"] && (i["x-attribsNamespace"] = { ...e["x-attribsNamespace"] }), e["x-attribsPrefix"] && (i["x-attribsPrefix"] = { ...e["x-attribsPrefix"] }), n = i;
169
- } else if (be(e)) {
170
- let r = t ? Ee(e.children) : [], i = new _e(r);
169
+ } else if (ye(e)) {
170
+ let r = t ? Te(e.children) : [], i = new ge(r);
171
171
  r.forEach((e) => e.parent = i), n = i;
172
- } else if (we(e)) {
173
- let r = t ? Ee(e.children) : [], i = new ve(r);
174
- r.forEach((e) => e.parent = i), e["x-mode"] && (i["x-mode"] = e["x-mode"]), n = i;
175
172
  } else if (Ce(e)) {
176
- let t = new he(e.name, e.data);
173
+ let r = t ? Te(e.children) : [], i = new _e(r);
174
+ r.forEach((e) => e.parent = i), e["x-mode"] && (i["x-mode"] = e["x-mode"]), n = i;
175
+ } else if (Se(e)) {
176
+ let t = new me(e.name, e.data);
177
177
  e["x-name"] != null && (t["x-name"] = e["x-name"], t["x-publicId"] = e["x-publicId"], t["x-systemId"] = e["x-systemId"]), n = t;
178
178
  } else throw Error(`Not implemented yet: ${e.type}`);
179
179
  return n.startIndex = e.startIndex, n.endIndex = e.endIndex, e.sourceCodeLocation != null && (n.sourceCodeLocation = e.sourceCodeLocation), n;
180
180
  }
181
- function Ee(e) {
182
- let t = e.map((e) => Te(e, !0));
181
+ function Te(e) {
182
+ let t = e.map((e) => we(e, !0));
183
183
  for (let e = 1; e < t.length; e++) t[e].prev = t[e - 1], t[e - 1].next = t[e];
184
184
  return t;
185
185
  }
186
186
  //#endregion
187
187
  //#region node_modules/domhandler/lib/esm/index.js
188
- var De = {
188
+ var Ee = {
189
189
  withStartIndices: !1,
190
190
  withEndIndices: !1,
191
191
  xmlMode: !1
192
- }, Oe = class {
192
+ }, De = class {
193
193
  constructor(e, t, n) {
194
- this.dom = [], this.root = new ve(this.dom), this.done = !1, this.tagStack = [this.root], this.lastNode = null, this.parser = null, typeof t == "function" && (n = t, t = De), typeof e == "object" && (t = e, e = void 0), this.callback = e ?? null, this.options = t ?? De, this.elementCB = n ?? null;
194
+ this.dom = [], this.root = new _e(this.dom), this.done = !1, this.tagStack = [this.root], this.lastNode = null, this.parser = null, typeof t == "function" && (n = t, t = Ee), typeof e == "object" && (t = e, e = void 0), this.callback = e ?? null, this.options = t ?? Ee, this.elementCB = n ?? null;
195
195
  }
196
196
  onparserinit(e) {
197
197
  this.parser = e;
198
198
  }
199
199
  onreset() {
200
- this.dom = [], this.root = new ve(this.dom), this.done = !1, this.tagStack = [this.root], this.lastNode = null, this.parser = null;
200
+ this.dom = [], this.root = new _e(this.dom), this.done = !1, this.tagStack = [this.root], this.lastNode = null, this.parser = null;
201
201
  }
202
202
  onend() {
203
203
  this.done || (this.done = !0, this.parser = null, this.handleCallback(null));
@@ -211,37 +211,37 @@ var De = {
211
211
  this.options.withEndIndices && (e.endIndex = this.parser.endIndex), this.elementCB && this.elementCB(e);
212
212
  }
213
213
  onopentag(e, t) {
214
- let n = new ye(e, t, void 0, this.options.xmlMode ? b.Tag : void 0);
214
+ let n = new ve(e, t, void 0, this.options.xmlMode ? x.Tag : void 0);
215
215
  this.addNode(n), this.tagStack.push(n);
216
216
  }
217
217
  ontext(e) {
218
218
  let { lastNode: t } = this;
219
- if (t && t.type === b.Text) t.data += e, this.options.withEndIndices && (t.endIndex = this.parser.endIndex);
219
+ if (t && t.type === x.Text) t.data += e, this.options.withEndIndices && (t.endIndex = this.parser.endIndex);
220
220
  else {
221
- let t = new pe(e);
221
+ let t = new fe(e);
222
222
  this.addNode(t), this.lastNode = t;
223
223
  }
224
224
  }
225
225
  oncomment(e) {
226
- if (this.lastNode && this.lastNode.type === b.Comment) {
226
+ if (this.lastNode && this.lastNode.type === x.Comment) {
227
227
  this.lastNode.data += e;
228
228
  return;
229
229
  }
230
- let t = new me(e);
230
+ let t = new pe(e);
231
231
  this.addNode(t), this.lastNode = t;
232
232
  }
233
233
  oncommentend() {
234
234
  this.lastNode = null;
235
235
  }
236
236
  oncdatastart() {
237
- let e = new pe(""), t = new _e([e]);
237
+ let e = new fe(""), t = new ge([e]);
238
238
  this.addNode(t), e.parent = t, this.lastNode = e;
239
239
  }
240
240
  oncdataend() {
241
241
  this.lastNode = null;
242
242
  }
243
243
  onprocessinginstruction(e, t) {
244
- let n = new he(e, t);
244
+ let n = new me(e, t);
245
245
  this.addNode(n);
246
246
  }
247
247
  handleCallback(e) {
@@ -252,38 +252,38 @@ var De = {
252
252
  let t = this.tagStack[this.tagStack.length - 1], n = t.children[t.children.length - 1];
253
253
  this.options.withStartIndices && (e.startIndex = this.parser.startIndex), this.options.withEndIndices && (e.endIndex = this.parser.endIndex), t.children.push(e), n && (e.prev = n, n.next = e), e.parent = t, this.lastNode = null;
254
254
  }
255
- }, ke = /["&'<>$\x80-\uFFFF]/g, Ae = /* @__PURE__ */ new Map([
255
+ }, Oe = /["&'<>$\x80-\uFFFF]/g, ke = /* @__PURE__ */ new Map([
256
256
  [34, "&quot;"],
257
257
  [38, "&amp;"],
258
258
  [39, "&apos;"],
259
259
  [60, "&lt;"],
260
260
  [62, "&gt;"]
261
- ]), je = String.prototype.codePointAt == null ? (e, t) => (e.charCodeAt(t) & 64512) == 55296 ? (e.charCodeAt(t) - 55296) * 1024 + e.charCodeAt(t + 1) - 56320 + 65536 : e.charCodeAt(t) : (e, t) => e.codePointAt(t);
262
- function Me(e) {
261
+ ]), Ae = String.prototype.codePointAt == null ? (e, t) => (e.charCodeAt(t) & 64512) == 55296 ? (e.charCodeAt(t) - 55296) * 1024 + e.charCodeAt(t + 1) - 56320 + 65536 : e.charCodeAt(t) : (e, t) => e.codePointAt(t);
262
+ function je(e) {
263
263
  let t = "", n = 0, r;
264
- for (; (r = ke.exec(e)) !== null;) {
265
- let i = r.index, a = e.charCodeAt(i), o = Ae.get(a);
266
- o === void 0 ? (t += `${e.substring(n, i)}&#x${je(e, i).toString(16)};`, n = ke.lastIndex += Number((a & 64512) == 55296)) : (t += e.substring(n, i) + o, n = i + 1);
264
+ for (; (r = Oe.exec(e)) !== null;) {
265
+ let i = r.index, a = e.charCodeAt(i), o = ke.get(a);
266
+ o === void 0 ? (t += `${e.substring(n, i)}&#x${Ae(e, i).toString(16)};`, n = Oe.lastIndex += Number((a & 64512) == 55296)) : (t += e.substring(n, i) + o, n = i + 1);
267
267
  }
268
268
  return t + e.substr(n);
269
269
  }
270
- function Ne(e, t) {
270
+ function Me(e, t) {
271
271
  return function(n) {
272
272
  let r, i = 0, a = "";
273
273
  for (; r = e.exec(n);) i !== r.index && (a += n.substring(i, r.index)), a += t.get(r[0].charCodeAt(0)), i = r.index + 1;
274
274
  return a + n.substring(i);
275
275
  };
276
276
  }
277
- var Pe = Ne(/["&\u00A0]/g, /* @__PURE__ */ new Map([
277
+ var Ne = Me(/["&\u00A0]/g, /* @__PURE__ */ new Map([
278
278
  [34, "&quot;"],
279
279
  [38, "&amp;"],
280
280
  [160, "&nbsp;"]
281
- ])), Fe = Ne(/[&<>\u00A0]/g, /* @__PURE__ */ new Map([
281
+ ])), Pe = Me(/[&<>\u00A0]/g, /* @__PURE__ */ new Map([
282
282
  [38, "&amp;"],
283
283
  [60, "&lt;"],
284
284
  [62, "&gt;"],
285
285
  [160, "&nbsp;"]
286
- ])), Ie = new Map((/* @__PURE__ */ "altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath".split(".")).map((e) => [e.toLowerCase(), e])), Le = new Map((/* @__PURE__ */ "definitionURL.attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan".split(".")).map((e) => [e.toLowerCase(), e])), Re = /* @__PURE__ */ new Set([
286
+ ])), Fe = new Map((/* @__PURE__ */ "altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath".split(".")).map((e) => [e.toLowerCase(), e])), Ie = new Map((/* @__PURE__ */ "definitionURL.attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan".split(".")).map((e) => [e.toLowerCase(), e])), Le = /* @__PURE__ */ new Set([
287
287
  "style",
288
288
  "script",
289
289
  "xmp",
@@ -293,18 +293,18 @@ var Pe = Ne(/["&\u00A0]/g, /* @__PURE__ */ new Map([
293
293
  "plaintext",
294
294
  "noscript"
295
295
  ]);
296
- function ze(e) {
296
+ function Re(e) {
297
297
  return e.replace(/"/g, "&quot;");
298
298
  }
299
- function Be(e, t) {
299
+ function ze(e, t) {
300
300
  if (!e) return;
301
- let n = (t.encodeEntities ?? t.decodeEntities) === !1 ? ze : t.xmlMode || t.encodeEntities !== "utf8" ? Me : Pe;
301
+ let n = (t.encodeEntities ?? t.decodeEntities) === !1 ? Re : t.xmlMode || t.encodeEntities !== "utf8" ? je : Ne;
302
302
  return Object.keys(e).map((r) => {
303
303
  let i = e[r] ?? "";
304
- return t.xmlMode === "foreign" && (r = Le.get(r) ?? r), !t.emptyAttrs && !t.xmlMode && i === "" ? r : `${r}="${n(i)}"`;
304
+ return t.xmlMode === "foreign" && (r = Ie.get(r) ?? r), !t.emptyAttrs && !t.xmlMode && i === "" ? r : `${r}="${n(i)}"`;
305
305
  }).join(" ");
306
306
  }
307
- var Ve = /* @__PURE__ */ new Set([
307
+ var Be = /* @__PURE__ */ new Set([
308
308
  "area",
309
309
  "base",
310
310
  "basefont",
@@ -325,25 +325,25 @@ var Ve = /* @__PURE__ */ new Set([
325
325
  "track",
326
326
  "wbr"
327
327
  ]);
328
- function He(e, t = {}) {
328
+ function Ve(e, t = {}) {
329
329
  let n = "length" in e ? e : [e], r = "";
330
- for (let e = 0; e < n.length; e++) r += Ue(n[e], t);
330
+ for (let e = 0; e < n.length; e++) r += He(n[e], t);
331
331
  return r;
332
332
  }
333
- function Ue(e, t) {
333
+ function He(e, t) {
334
334
  switch (e.type) {
335
- case re: return He(e.children, t);
336
- case ue:
337
- case ie: return qe(e);
338
- case ae: return Xe(e);
339
- case le: return Ye(e);
335
+ case te: return Ve(e.children, t);
336
+ case le:
337
+ case re: return Ke(e);
338
+ case ie: return Ye(e);
339
+ case ce: return Je(e);
340
+ case ae:
340
341
  case oe:
341
- case se:
342
- case ce: return Ke(e, t);
343
- case x: return Je(e, t);
342
+ case se: return Ge(e, t);
343
+ case ne: return qe(e, t);
344
344
  }
345
345
  }
346
- var We = /* @__PURE__ */ new Set([
346
+ var Ue = /* @__PURE__ */ new Set([
347
347
  "mi",
348
348
  "mo",
349
349
  "mn",
@@ -353,93 +353,93 @@ var We = /* @__PURE__ */ new Set([
353
353
  "foreignObject",
354
354
  "desc",
355
355
  "title"
356
- ]), Ge = /* @__PURE__ */ new Set(["svg", "math"]);
357
- function Ke(e, t) {
358
- t.xmlMode === "foreign" && (e.name = Ie.get(e.name) ?? e.name, e.parent && We.has(e.parent.name) && (t = {
356
+ ]), We = /* @__PURE__ */ new Set(["svg", "math"]);
357
+ function Ge(e, t) {
358
+ t.xmlMode === "foreign" && (e.name = Fe.get(e.name) ?? e.name, e.parent && Ue.has(e.parent.name) && (t = {
359
359
  ...t,
360
360
  xmlMode: !1
361
- })), !t.xmlMode && Ge.has(e.name) && (t = {
361
+ })), !t.xmlMode && We.has(e.name) && (t = {
362
362
  ...t,
363
363
  xmlMode: "foreign"
364
364
  });
365
- let n = `<${e.name}`, r = Be(e.attribs, t);
366
- return r && (n += ` ${r}`), e.children.length === 0 && (t.xmlMode ? t.selfClosingTags !== !1 : t.selfClosingTags && Ve.has(e.name)) ? (t.xmlMode || (n += " "), n += "/>") : (n += ">", e.children.length > 0 && (n += He(e.children, t)), (t.xmlMode || !Ve.has(e.name)) && (n += `</${e.name}>`)), n;
365
+ let n = `<${e.name}`, r = ze(e.attribs, t);
366
+ return r && (n += ` ${r}`), e.children.length === 0 && (t.xmlMode ? t.selfClosingTags !== !1 : t.selfClosingTags && Be.has(e.name)) ? (t.xmlMode || (n += " "), n += "/>") : (n += ">", e.children.length > 0 && (n += Ve(e.children, t)), (t.xmlMode || !Be.has(e.name)) && (n += `</${e.name}>`)), n;
367
367
  }
368
- function qe(e) {
368
+ function Ke(e) {
369
369
  return `<${e.data}>`;
370
370
  }
371
- function Je(e, t) {
371
+ function qe(e, t) {
372
372
  let n = e.data || "";
373
- return (t.encodeEntities ?? t.decodeEntities) !== !1 && !(!t.xmlMode && e.parent && Re.has(e.parent.name)) && (n = t.xmlMode || t.encodeEntities !== "utf8" ? Me(n) : Fe(n)), n;
373
+ return (t.encodeEntities ?? t.decodeEntities) !== !1 && !(!t.xmlMode && e.parent && Le.has(e.parent.name)) && (n = t.xmlMode || t.encodeEntities !== "utf8" ? je(n) : Pe(n)), n;
374
374
  }
375
- function Ye(e) {
375
+ function Je(e) {
376
376
  return `<![CDATA[${e.children[0].data}]]>`;
377
377
  }
378
- function Xe(e) {
378
+ function Ye(e) {
379
379
  return `<!--${e.data}-->`;
380
380
  }
381
381
  //#endregion
382
382
  //#region node_modules/domutils/lib/esm/stringify.js
383
+ function Xe(e, t) {
384
+ return Ve(e, t);
385
+ }
383
386
  function Ze(e, t) {
384
- return He(e, t);
387
+ return w(e) ? e.children.map((e) => Xe(e, t)).join("") : "";
385
388
  }
386
- function Qe(e, t) {
387
- return C(e) ? e.children.map((e) => Ze(e, t)).join("") : "";
389
+ function Qe(e) {
390
+ return Array.isArray(e) ? e.map(Qe).join("") : C(e) ? e.name === "br" ? "\n" : Qe(e.children) : ye(e) ? Qe(e.children) : be(e) ? e.data : "";
388
391
  }
389
392
  function $e(e) {
390
- return Array.isArray(e) ? e.map($e).join("") : S(e) ? e.name === "br" ? "\n" : $e(e.children) : be(e) ? $e(e.children) : xe(e) ? e.data : "";
393
+ return Array.isArray(e) ? e.map($e).join("") : w(e) && !xe(e) ? $e(e.children) : be(e) ? e.data : "";
391
394
  }
392
395
  function et(e) {
393
- return Array.isArray(e) ? e.map(et).join("") : C(e) && !Se(e) ? et(e.children) : xe(e) ? e.data : "";
394
- }
395
- function tt(e) {
396
- return Array.isArray(e) ? e.map(tt).join("") : C(e) && (e.type === b.Tag || be(e)) ? tt(e.children) : xe(e) ? e.data : "";
396
+ return Array.isArray(e) ? e.map(et).join("") : w(e) && (e.type === x.Tag || ye(e)) ? et(e.children) : be(e) ? e.data : "";
397
397
  }
398
398
  //#endregion
399
399
  //#region node_modules/domutils/lib/esm/traversal.js
400
- function nt(e) {
401
- return C(e) ? e.children : [];
400
+ function tt(e) {
401
+ return w(e) ? e.children : [];
402
402
  }
403
- function rt(e) {
403
+ function nt(e) {
404
404
  return e.parent || null;
405
405
  }
406
- function it(e) {
407
- let t = rt(e);
408
- if (t != null) return nt(t);
406
+ function rt(e) {
407
+ let t = nt(e);
408
+ if (t != null) return tt(t);
409
409
  let n = [e], { prev: r, next: i } = e;
410
410
  for (; r != null;) n.unshift(r), {prev: r} = r;
411
411
  for (; i != null;) n.push(i), {next: i} = i;
412
412
  return n;
413
413
  }
414
- function at(e, t) {
414
+ function it(e, t) {
415
415
  return e.attribs?.[t];
416
416
  }
417
- function ot(e, t) {
417
+ function at(e, t) {
418
418
  return e.attribs != null && Object.prototype.hasOwnProperty.call(e.attribs, t) && e.attribs[t] != null;
419
419
  }
420
- function st(e) {
420
+ function ot(e) {
421
421
  return e.name;
422
422
  }
423
- function ct(e) {
423
+ function st(e) {
424
424
  let { next: t } = e;
425
- for (; t !== null && !S(t);) ({next: t} = t);
425
+ for (; t !== null && !C(t);) ({next: t} = t);
426
426
  return t;
427
427
  }
428
- function lt(e) {
428
+ function ct(e) {
429
429
  let { prev: t } = e;
430
- for (; t !== null && !S(t);) ({prev: t} = t);
430
+ for (; t !== null && !C(t);) ({prev: t} = t);
431
431
  return t;
432
432
  }
433
433
  //#endregion
434
434
  //#region node_modules/domutils/lib/esm/manipulation.js
435
- function ut(e) {
435
+ function lt(e) {
436
436
  if (e.prev && (e.prev.next = e.next), e.next && (e.next.prev = e.prev), e.parent) {
437
437
  let t = e.parent.children, n = t.lastIndexOf(e);
438
438
  n >= 0 && t.splice(n, 1);
439
439
  }
440
440
  e.next = null, e.prev = null, e.parent = null;
441
441
  }
442
- function dt(e, t) {
442
+ function ut(e, t) {
443
443
  let n = t.prev = e.prev;
444
444
  n && (n.next = t);
445
445
  let r = t.next = e.next;
@@ -450,14 +450,14 @@ function dt(e, t) {
450
450
  n[n.lastIndexOf(e)] = t, e.parent = null;
451
451
  }
452
452
  }
453
- function ft(e, t) {
454
- if (ut(t), t.next = null, t.parent = e, e.children.push(t) > 1) {
453
+ function dt(e, t) {
454
+ if (lt(t), t.next = null, t.parent = e, e.children.push(t) > 1) {
455
455
  let n = e.children[e.children.length - 2];
456
456
  n.next = t, t.prev = n;
457
457
  } else t.prev = null;
458
458
  }
459
- function pt(e, t) {
460
- ut(t);
459
+ function ft(e, t) {
460
+ lt(t);
461
461
  let { parent: n } = e, r = e.next;
462
462
  if (t.next = r, t.prev = e, e.next = t, t.parent = n, r) {
463
463
  if (r.prev = t, n) {
@@ -466,14 +466,14 @@ function pt(e, t) {
466
466
  }
467
467
  } else n && n.children.push(t);
468
468
  }
469
- function mt(e, t) {
470
- if (ut(t), t.parent = e, t.prev = null, e.children.unshift(t) !== 1) {
469
+ function pt(e, t) {
470
+ if (lt(t), t.parent = e, t.prev = null, e.children.unshift(t) !== 1) {
471
471
  let n = e.children[1];
472
472
  n.prev = t, t.next = n;
473
473
  } else t.next = null;
474
474
  }
475
- function ht(e, t) {
476
- ut(t);
475
+ function mt(e, t) {
476
+ lt(t);
477
477
  let { parent: n } = e;
478
478
  if (n) {
479
479
  let r = n.children;
@@ -483,10 +483,10 @@ function ht(e, t) {
483
483
  }
484
484
  //#endregion
485
485
  //#region node_modules/domutils/lib/esm/querying.js
486
- function gt(e, t, n = !0, r = Infinity) {
487
- return _t(e, Array.isArray(t) ? t : [t], n, r);
486
+ function ht(e, t, n = !0, r = Infinity) {
487
+ return gt(e, Array.isArray(t) ? t : [t], n, r);
488
488
  }
489
- function _t(e, t, n, r) {
489
+ function gt(e, t, n, r) {
490
490
  let i = [], a = [Array.isArray(t) ? t : [t]], o = [0];
491
491
  for (;;) {
492
492
  if (o[0] >= a[0].length) {
@@ -496,28 +496,28 @@ function _t(e, t, n, r) {
496
496
  }
497
497
  let t = a[0][o[0]++];
498
498
  if (e(t) && (i.push(t), --r <= 0)) return i;
499
- n && C(t) && t.children.length > 0 && (o.unshift(0), a.unshift(t.children));
499
+ n && w(t) && t.children.length > 0 && (o.unshift(0), a.unshift(t.children));
500
500
  }
501
501
  }
502
- function vt(e, t) {
502
+ function _t(e, t) {
503
503
  return t.find(e);
504
504
  }
505
- function yt(e, t, n = !0) {
505
+ function vt(e, t, n = !0) {
506
506
  let r = Array.isArray(t) ? t : [t];
507
507
  for (let t = 0; t < r.length; t++) {
508
508
  let i = r[t];
509
- if (S(i) && e(i)) return i;
510
- if (n && C(i) && i.children.length > 0) {
511
- let t = yt(e, i.children, !0);
509
+ if (C(i) && e(i)) return i;
510
+ if (n && w(i) && i.children.length > 0) {
511
+ let t = vt(e, i.children, !0);
512
512
  if (t) return t;
513
513
  }
514
514
  }
515
515
  return null;
516
516
  }
517
- function bt(e, t) {
518
- return (Array.isArray(t) ? t : [t]).some((t) => S(t) && e(t) || C(t) && bt(e, t.children));
517
+ function yt(e, t) {
518
+ return (Array.isArray(t) ? t : [t]).some((t) => C(t) && e(t) || w(t) && yt(e, t.children));
519
519
  }
520
- function xt(e, t) {
520
+ function bt(e, t) {
521
521
  let n = [], r = [Array.isArray(t) ? t : [t]], i = [0];
522
522
  for (;;) {
523
523
  if (i[0] >= r[0].length) {
@@ -526,58 +526,58 @@ function xt(e, t) {
526
526
  continue;
527
527
  }
528
528
  let t = r[0][i[0]++];
529
- S(t) && e(t) && n.push(t), C(t) && t.children.length > 0 && (i.unshift(0), r.unshift(t.children));
529
+ C(t) && e(t) && n.push(t), w(t) && t.children.length > 0 && (i.unshift(0), r.unshift(t.children));
530
530
  }
531
531
  }
532
532
  //#endregion
533
533
  //#region node_modules/domutils/lib/esm/legacy.js
534
- var St = {
534
+ var xt = {
535
535
  tag_name(e) {
536
- return typeof e == "function" ? (t) => S(t) && e(t.name) : e === "*" ? S : (t) => S(t) && t.name === e;
536
+ return typeof e == "function" ? (t) => C(t) && e(t.name) : e === "*" ? C : (t) => C(t) && t.name === e;
537
537
  },
538
538
  tag_type(e) {
539
539
  return typeof e == "function" ? (t) => e(t.type) : (t) => t.type === e;
540
540
  },
541
541
  tag_contains(e) {
542
- return typeof e == "function" ? (t) => xe(t) && e(t.data) : (t) => xe(t) && t.data === e;
542
+ return typeof e == "function" ? (t) => be(t) && e(t.data) : (t) => be(t) && t.data === e;
543
543
  }
544
544
  };
545
- function Ct(e, t) {
546
- return typeof t == "function" ? (n) => S(n) && t(n.attribs[e]) : (n) => S(n) && n.attribs[e] === t;
545
+ function St(e, t) {
546
+ return typeof t == "function" ? (n) => C(n) && t(n.attribs[e]) : (n) => C(n) && n.attribs[e] === t;
547
547
  }
548
- function wt(e, t) {
548
+ function Ct(e, t) {
549
549
  return (n) => e(n) || t(n);
550
550
  }
551
- function Tt(e) {
551
+ function wt(e) {
552
552
  let t = Object.keys(e).map((t) => {
553
553
  let n = e[t];
554
- return Object.prototype.hasOwnProperty.call(St, t) ? St[t](n) : Ct(t, n);
554
+ return Object.prototype.hasOwnProperty.call(xt, t) ? xt[t](n) : St(t, n);
555
555
  });
556
- return t.length === 0 ? null : t.reduce(wt);
556
+ return t.length === 0 ? null : t.reduce(Ct);
557
557
  }
558
- function Et(e, t) {
559
- let n = Tt(e);
560
- return n ? n(t) : !0;
558
+ function Tt(e, t) {
559
+ let n = wt(e);
560
+ return !n || n(t);
561
561
  }
562
- function Dt(e, t, n, r = Infinity) {
563
- let i = Tt(e);
564
- return i ? gt(i, t, n, r) : [];
562
+ function Et(e, t, n, r = Infinity) {
563
+ let i = wt(e);
564
+ return i ? ht(i, t, n, r) : [];
565
565
  }
566
- function Ot(e, t, n = !0) {
567
- return Array.isArray(t) || (t = [t]), yt(Ct("id", e), t, n);
566
+ function Dt(e, t, n = !0) {
567
+ return Array.isArray(t) || (t = [t]), vt(St("id", e), t, n);
568
+ }
569
+ function Ot(e, t, n = !0, r = Infinity) {
570
+ return ht(xt.tag_name(e), t, n, r);
568
571
  }
569
572
  function kt(e, t, n = !0, r = Infinity) {
570
- return gt(St.tag_name(e), t, n, r);
573
+ return ht(St("class", e), t, n, r);
571
574
  }
572
575
  function At(e, t, n = !0, r = Infinity) {
573
- return gt(Ct("class", e), t, n, r);
574
- }
575
- function jt(e, t, n = !0, r = Infinity) {
576
- return gt(St.tag_type(e), t, n, r);
576
+ return ht(xt.tag_type(e), t, n, r);
577
577
  }
578
578
  //#endregion
579
579
  //#region node_modules/domutils/lib/esm/helpers.js
580
- function Mt(e) {
580
+ function jt(e) {
581
581
  let t = e.length;
582
582
  for (; --t >= 0;) {
583
583
  let n = e[t];
@@ -592,26 +592,26 @@ function Mt(e) {
592
592
  }
593
593
  return e;
594
594
  }
595
- var w;
595
+ var Mt;
596
596
  (function(e) {
597
597
  e[e.DISCONNECTED = 1] = "DISCONNECTED", e[e.PRECEDING = 2] = "PRECEDING", e[e.FOLLOWING = 4] = "FOLLOWING", e[e.CONTAINS = 8] = "CONTAINS", e[e.CONTAINED_BY = 16] = "CONTAINED_BY";
598
- })(w || (w = {}));
598
+ })(Mt || (Mt = {}));
599
599
  function Nt(e, t) {
600
600
  let n = [], r = [];
601
601
  if (e === t) return 0;
602
- let i = C(e) ? e : e.parent;
602
+ let i = w(e) ? e : e.parent;
603
603
  for (; i;) n.unshift(i), i = i.parent;
604
- for (i = C(t) ? t : t.parent; i;) r.unshift(i), i = i.parent;
604
+ for (i = w(t) ? t : t.parent; i;) r.unshift(i), i = i.parent;
605
605
  let a = Math.min(n.length, r.length), o = 0;
606
606
  for (; o < a && n[o] === r[o];) o++;
607
- if (o === 0) return w.DISCONNECTED;
607
+ if (o === 0) return Mt.DISCONNECTED;
608
608
  let s = n[o - 1], c = s.children, l = n[o], u = r[o];
609
- return c.indexOf(l) > c.indexOf(u) ? s === t ? w.FOLLOWING | w.CONTAINED_BY : w.FOLLOWING : s === e ? w.PRECEDING | w.CONTAINS : w.PRECEDING;
609
+ return c.indexOf(l) > c.indexOf(u) ? s === t ? Mt.FOLLOWING | Mt.CONTAINED_BY : Mt.FOLLOWING : s === e ? Mt.PRECEDING | Mt.CONTAINS : Mt.PRECEDING;
610
610
  }
611
611
  function Pt(e) {
612
612
  return e = e.filter((e, t, n) => !n.includes(e, t + 1)), e.sort((e, t) => {
613
613
  let n = Nt(e, t);
614
- return n & w.PRECEDING ? -1 : n & w.FOLLOWING ? 1 : 0;
614
+ return n & Mt.PRECEDING ? -1 : n & Mt.FOLLOWING ? 1 : 0;
615
615
  }), e;
616
616
  }
617
617
  //#endregion
@@ -623,7 +623,7 @@ function Ft(e) {
623
623
  function It(e) {
624
624
  let t = e.children, n = {
625
625
  type: "atom",
626
- items: kt("entry", t).map((e) => {
626
+ items: Ot("entry", t).map((e) => {
627
627
  let { children: t } = e, n = { media: Bt(t) };
628
628
  T(n, "id", "id", t), T(n, "title", "title", t);
629
629
  let r = Vt("link", t)?.attribs.href;
@@ -644,7 +644,7 @@ function Lt(e) {
644
644
  let t = Vt("channel", e.children)?.children ?? [], n = {
645
645
  type: e.name.substr(0, 3),
646
646
  id: "",
647
- items: kt("item", e.children).map((e) => {
647
+ items: Ot("item", e.children).map((e) => {
648
648
  let { children: t } = e, n = { media: Bt(t) };
649
649
  T(n, "id", "guid", t), T(n, "title", "title", t), T(n, "link", "link", t), T(n, "description", "description", t);
650
650
  let r = Ht("pubDate", t) || Ht("dc:date", t);
@@ -670,7 +670,7 @@ var Rt = [
670
670
  "width"
671
671
  ];
672
672
  function Bt(e) {
673
- return kt("media:content", e).map((e) => {
673
+ return Ot("media:content", e).map((e) => {
674
674
  let { attribs: t } = e, n = {
675
675
  medium: t.medium,
676
676
  isDefault: !!t.isDefault
@@ -681,10 +681,10 @@ function Bt(e) {
681
681
  });
682
682
  }
683
683
  function Vt(e, t) {
684
- return kt(e, t, !0, 1)[0];
684
+ return Ot(e, t, !0, 1)[0];
685
685
  }
686
686
  function Ht(e, t, n = !1) {
687
- return et(kt(e, t, n, 1)).trim();
687
+ return $e(Ot(e, t, n, 1)).trim();
688
688
  }
689
689
  function T(e, t, n, r, i = !1) {
690
690
  let a = Ht(n, r, i);
@@ -695,48 +695,48 @@ function Ut(e) {
695
695
  }
696
696
  //#endregion
697
697
  //#region node_modules/domutils/lib/esm/index.js
698
- var Wt = /* @__PURE__ */ y({
699
- DocumentPosition: () => w,
700
- append: () => pt,
701
- appendChild: () => ft,
698
+ var Wt = /* @__PURE__ */ v({
699
+ DocumentPosition: () => Mt,
700
+ append: () => ft,
701
+ appendChild: () => dt,
702
702
  compareDocumentPosition: () => Nt,
703
- existsOne: () => bt,
704
- filter: () => gt,
705
- find: () => _t,
706
- findAll: () => xt,
707
- findOne: () => yt,
708
- findOneChild: () => vt,
709
- getAttributeValue: () => at,
710
- getChildren: () => nt,
711
- getElementById: () => Ot,
712
- getElements: () => Dt,
713
- getElementsByClassName: () => At,
714
- getElementsByTagName: () => kt,
715
- getElementsByTagType: () => jt,
703
+ existsOne: () => yt,
704
+ filter: () => ht,
705
+ find: () => gt,
706
+ findAll: () => bt,
707
+ findOne: () => vt,
708
+ findOneChild: () => _t,
709
+ getAttributeValue: () => it,
710
+ getChildren: () => tt,
711
+ getElementById: () => Dt,
712
+ getElements: () => Et,
713
+ getElementsByClassName: () => kt,
714
+ getElementsByTagName: () => Ot,
715
+ getElementsByTagType: () => At,
716
716
  getFeed: () => Ft,
717
- getInnerHTML: () => Qe,
718
- getName: () => st,
719
- getOuterHTML: () => Ze,
720
- getParent: () => rt,
721
- getSiblings: () => it,
722
- getText: () => $e,
723
- hasAttrib: () => ot,
724
- hasChildren: () => C,
725
- innerText: () => tt,
726
- isCDATA: () => be,
727
- isComment: () => Se,
728
- isDocument: () => we,
729
- isTag: () => S,
730
- isText: () => xe,
731
- nextElementSibling: () => ct,
732
- prepend: () => ht,
733
- prependChild: () => mt,
734
- prevElementSibling: () => lt,
735
- removeElement: () => ut,
736
- removeSubsets: () => Mt,
737
- replaceElement: () => dt,
738
- testElement: () => Et,
739
- textContent: () => et,
717
+ getInnerHTML: () => Ze,
718
+ getName: () => ot,
719
+ getOuterHTML: () => Xe,
720
+ getParent: () => nt,
721
+ getSiblings: () => rt,
722
+ getText: () => Qe,
723
+ hasAttrib: () => at,
724
+ hasChildren: () => w,
725
+ innerText: () => et,
726
+ isCDATA: () => ye,
727
+ isComment: () => xe,
728
+ isDocument: () => Ce,
729
+ isTag: () => C,
730
+ isText: () => be,
731
+ nextElementSibling: () => st,
732
+ prepend: () => mt,
733
+ prependChild: () => pt,
734
+ prevElementSibling: () => ct,
735
+ removeElement: () => lt,
736
+ removeSubsets: () => jt,
737
+ replaceElement: () => ut,
738
+ testElement: () => Tt,
739
+ textContent: () => $e,
740
740
  uniqueSort: () => Pt
741
741
  }), Gt = { _useHtmlParser2: !1 };
742
742
  function Kt(e, t) {
@@ -750,7 +750,7 @@ function Kt(e, t) {
750
750
  }
751
751
  //#endregion
752
752
  //#region node_modules/cheerio/dist/browser/static.js
753
- var qt = /* @__PURE__ */ y({
753
+ var qt = /* @__PURE__ */ v({
754
754
  contains: () => tn,
755
755
  extract: () => nn,
756
756
  html: () => Xt,
@@ -782,10 +782,10 @@ function Zt(e) {
782
782
  }
783
783
  function Qt(e) {
784
784
  let t = e ?? (this ? this.root() : []), n = "";
785
- for (let e = 0; e < t.length; e++) n += et(t[e]);
785
+ for (let e = 0; e < t.length; e++) n += $e(t[e]);
786
786
  return n;
787
787
  }
788
- function $t(e, t, n = typeof t == "boolean" ? t : !1) {
788
+ function $t(e, t, n = typeof t == "boolean" && t) {
789
789
  if (!e || typeof e != "string") return null;
790
790
  typeof t == "boolean" && (n = t);
791
791
  let r = this.load(e, this._options, !1);
@@ -1189,7 +1189,7 @@ var M = {
1189
1189
  else if (e === A.Questionmark) this.state = j.InProcessingInstruction, this.sectionStart = this.index + 1;
1190
1190
  else if (this.isTagStartChar(e)) {
1191
1191
  let t = e | 32;
1192
- this.sectionStart = this.index, this.xmlMode ? this.state = j.InTagName : t === M.ScriptEnd[2] ? this.state = j.BeforeSpecialS : t === M.TitleEnd[2] || t === M.XmpEnd[2] ? this.state = j.BeforeSpecialT : this.state = j.InTagName;
1192
+ this.sectionStart = this.index, this.state = this.xmlMode ? j.InTagName : t === M.ScriptEnd[2] ? j.BeforeSpecialS : t === M.TitleEnd[2] || t === M.XmpEnd[2] ? j.BeforeSpecialT : j.InTagName;
1193
1193
  } else e === A.Slash ? this.state = j.BeforeClosingTagName : (this.state = j.Text, this.stateText(e));
1194
1194
  }
1195
1195
  stateInTagName(e) {
@@ -1363,9 +1363,7 @@ var M = {
1363
1363
  case j.InProcessingInstruction:
1364
1364
  this.stateInProcessingInstruction(e);
1365
1365
  break;
1366
- case j.InEntity:
1367
- this.stateInEntity();
1368
- break;
1366
+ case j.InEntity: this.stateInEntity();
1369
1367
  }
1370
1368
  this.index++;
1371
1369
  }
@@ -1645,12 +1643,12 @@ var M = {
1645
1643
  //#endregion
1646
1644
  //#region node_modules/htmlparser2/dist/esm/index.js
1647
1645
  function Bn(e, t) {
1648
- let n = new Oe(void 0, t);
1646
+ let n = new De(void 0, t);
1649
1647
  return new zn(n, t).end(e), n.root;
1650
1648
  }
1651
1649
  //#endregion
1652
1650
  //#region node_modules/cheerio/dist/browser/api/attributes.js
1653
- var Vn = /* @__PURE__ */ y({
1651
+ var Vn = /* @__PURE__ */ v({
1654
1652
  addClass: () => lr,
1655
1653
  attr: () => Yn,
1656
1654
  data: () => rr,
@@ -1662,7 +1660,7 @@ var Vn = /* @__PURE__ */ y({
1662
1660
  val: () => ir
1663
1661
  }), Hn = Object.hasOwn ?? ((e, t) => Object.prototype.hasOwnProperty.call(e, t)), Un = /\s+/, Wn = "data-", Gn = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, Kn = /^{[^]*}$|^\[[^]*]$/;
1664
1662
  function qn(e, t, n) {
1665
- if (!(!e || !S(e))) {
1663
+ if (!(!e || !C(e))) {
1666
1664
  if (e.attribs ?? (e.attribs = {}), !t) return e.attribs;
1667
1665
  if (Hn(e.attribs, t)) return !n && Gn.test(t) ? t : e.attribs[t];
1668
1666
  if (e.name === "option" && t === "value") return Qt(e.children);
@@ -1677,15 +1675,17 @@ function Yn(e, t) {
1677
1675
  if (typeof t == "function") {
1678
1676
  if (typeof e != "string") throw Error("Bad combination of arguments.");
1679
1677
  return E(this, (n, r) => {
1680
- S(n) && Jn(n, e, t.call(n, r, n.attribs[e]));
1678
+ C(n) && Jn(n, e, t.call(n, r, n.attribs[e]));
1681
1679
  });
1682
1680
  }
1683
1681
  return E(this, (n) => {
1684
- if (S(n)) if (typeof e == "object") for (let t of Object.keys(e)) {
1685
- let r = e[t];
1686
- Jn(n, t, r);
1682
+ if (C(n)) {
1683
+ if (typeof e == "object") for (let t of Object.keys(e)) {
1684
+ let r = e[t];
1685
+ Jn(n, t, r);
1686
+ }
1687
+ else Jn(n, e, t);
1687
1688
  }
1688
- else Jn(n, e, t);
1689
1689
  });
1690
1690
  }
1691
1691
  return arguments.length > 1 ? this : qn(this[0], e, this.options.xmlMode);
@@ -1707,33 +1707,35 @@ function Qn(e, t) {
1707
1707
  return e.length = t.length, e;
1708
1708
  }
1709
1709
  case "tagName":
1710
- case "nodeName": return S(t) ? t.name.toUpperCase() : void 0;
1710
+ case "nodeName": return C(t) ? t.name.toUpperCase() : void 0;
1711
1711
  case "href":
1712
1712
  case "src": {
1713
- if (!S(t)) return;
1713
+ if (!C(t)) return;
1714
1714
  let n = t.attribs?.[e];
1715
1715
  return typeof URL < "u" && (e === "href" && (t.tagName === "a" || t.tagName === "link") || e === "src" && (t.tagName === "img" || t.tagName === "iframe" || t.tagName === "audio" || t.tagName === "video" || t.tagName === "source")) && n !== void 0 && this.options.baseURI ? new URL(n, this.options.baseURI).href : n;
1716
1716
  }
1717
- case "innerText": return tt(t);
1718
- case "textContent": return et(t);
1719
- case "outerHTML": return t.type === re ? this.html() : this.clone().wrap("<container />").parent().html();
1717
+ case "innerText": return et(t);
1718
+ case "textContent": return $e(t);
1719
+ case "outerHTML": return t.type === te ? this.html() : this.clone().wrap("<container />").parent().html();
1720
1720
  case "innerHTML": return this.html();
1721
- default: return S(t) ? Xn(t, e, this.options.xmlMode) : void 0;
1721
+ default: return C(t) ? Xn(t, e, this.options.xmlMode) : void 0;
1722
1722
  }
1723
1723
  }
1724
1724
  if (typeof e == "object" || t !== void 0) {
1725
1725
  if (typeof t == "function") {
1726
1726
  if (typeof e == "object") throw TypeError("Bad combination of arguments.");
1727
1727
  return E(this, (n, r) => {
1728
- S(n) && Zn(n, e, t.call(n, r, Xn(n, e, this.options.xmlMode)), this.options.xmlMode);
1728
+ C(n) && Zn(n, e, t.call(n, r, Xn(n, e, this.options.xmlMode)), this.options.xmlMode);
1729
1729
  });
1730
1730
  }
1731
1731
  return E(this, (n) => {
1732
- if (S(n)) if (typeof e == "object") for (let t of Object.keys(e)) {
1733
- let r = e[t];
1734
- Zn(n, t, r, this.options.xmlMode);
1732
+ if (C(n)) {
1733
+ if (typeof e == "object") for (let t of Object.keys(e)) {
1734
+ let r = e[t];
1735
+ Zn(n, t, r, this.options.xmlMode);
1736
+ }
1737
+ else Zn(n, e, t, this.options.xmlMode);
1735
1738
  }
1736
- else Zn(n, e, t, this.options.xmlMode);
1737
1739
  });
1738
1740
  }
1739
1741
  }
@@ -1766,15 +1768,15 @@ function nr(e) {
1766
1768
  }
1767
1769
  function rr(e, t) {
1768
1770
  let n = this[0];
1769
- if (!n || !S(n)) return;
1771
+ if (!n || !C(n)) return;
1770
1772
  let r = n;
1771
1773
  return r.data ?? (r.data = {}), e == null ? er(r) : typeof e == "object" || t !== void 0 ? (E(this, (n) => {
1772
- S(n) && (typeof e == "object" ? $n(n, e) : $n(n, e, t));
1774
+ C(n) && (typeof e == "object" ? $n(n, e) : $n(n, e, t));
1773
1775
  }), this) : tr(r, e);
1774
1776
  }
1775
1777
  function ir(e) {
1776
1778
  let t = arguments.length === 0, n = this[0];
1777
- if (!n || !S(n)) return t ? void 0 : this;
1779
+ if (!n || !C(n)) return t ? void 0 : this;
1778
1780
  switch (n.name) {
1779
1781
  case "textarea": return this.text(e);
1780
1782
  case "select": {
@@ -1802,13 +1804,13 @@ function or(e) {
1802
1804
  function sr(e) {
1803
1805
  let t = or(e);
1804
1806
  for (let e of t) E(this, (t) => {
1805
- S(t) && ar(t, e);
1807
+ C(t) && ar(t, e);
1806
1808
  });
1807
1809
  return this;
1808
1810
  }
1809
1811
  function cr(e) {
1810
1812
  return this.toArray().some((t) => {
1811
- let n = S(t) && t.attribs.class, r = -1;
1813
+ let n = C(t) && t.attribs.class, r = -1;
1812
1814
  if (n && e.length > 0) for (; (r = n.indexOf(e, r + 1)) > -1;) {
1813
1815
  let t = r + e.length;
1814
1816
  if ((r === 0 || Un.test(n[r - 1])) && (t === n.length || Un.test(n[t]))) return !0;
@@ -1818,7 +1820,7 @@ function cr(e) {
1818
1820
  }
1819
1821
  function lr(e) {
1820
1822
  if (typeof e == "function") return E(this, (t, n) => {
1821
- if (S(t)) {
1823
+ if (C(t)) {
1822
1824
  let r = t.attribs.class || "";
1823
1825
  lr.call([t], e.call(t, n, r));
1824
1826
  }
@@ -1827,7 +1829,7 @@ function lr(e) {
1827
1829
  let t = e.split(Un), n = this.length;
1828
1830
  for (let e = 0; e < n; e++) {
1829
1831
  let n = this[e];
1830
- if (!S(n)) continue;
1832
+ if (!C(n)) continue;
1831
1833
  let r = qn(n, "class", !1);
1832
1834
  if (r) {
1833
1835
  let e = ` ${r} `;
@@ -1842,30 +1844,32 @@ function lr(e) {
1842
1844
  }
1843
1845
  function ur(e) {
1844
1846
  if (typeof e == "function") return E(this, (t, n) => {
1845
- S(t) && ur.call([t], e.call(t, n, t.attribs.class || ""));
1847
+ C(t) && ur.call([t], e.call(t, n, t.attribs.class || ""));
1846
1848
  });
1847
1849
  let t = or(e), n = t.length, r = arguments.length === 0;
1848
1850
  return E(this, (e) => {
1849
- if (S(e)) if (r) e.attribs.class = "";
1850
- else {
1851
- let r = or(e.attribs.class), i = !1;
1852
- for (let e = 0; e < n; e++) {
1853
- let n = r.indexOf(t[e]);
1854
- n !== -1 && (r.splice(n, 1), i = !0, e--);
1851
+ if (C(e)) {
1852
+ if (r) e.attribs.class = "";
1853
+ else {
1854
+ let r = or(e.attribs.class), i = !1;
1855
+ for (let e = 0; e < n; e++) {
1856
+ let n = r.indexOf(t[e]);
1857
+ n !== -1 && (r.splice(n, 1), i = !0, e--);
1858
+ }
1859
+ i && (e.attribs.class = r.join(" "));
1855
1860
  }
1856
- i && (e.attribs.class = r.join(" "));
1857
1861
  }
1858
1862
  });
1859
1863
  }
1860
1864
  function dr(e, t) {
1861
1865
  if (typeof e == "function") return E(this, (n, r) => {
1862
- S(n) && dr.call([n], e.call(n, r, n.attribs.class || "", t), t);
1866
+ C(n) && dr.call([n], e.call(n, r, n.attribs.class || "", t), t);
1863
1867
  });
1864
1868
  if (!e || typeof e != "string") return this;
1865
1869
  let n = e.split(Un), r = n.length, i = typeof t == "boolean" ? t ? 1 : -1 : 0, a = this.length;
1866
1870
  for (let e = 0; e < a; e++) {
1867
1871
  let t = this[e];
1868
- if (!S(t)) continue;
1872
+ if (!C(t)) continue;
1869
1873
  let a = or(t.attribs.class);
1870
1874
  for (let e = 0; e < r; e++) {
1871
1875
  let t = a.indexOf(n[e]);
@@ -2057,16 +2061,18 @@ function Cr(e, t, n) {
2057
2061
  continue;
2058
2062
  }
2059
2063
  let e = i(1).toLowerCase(), a = null;
2060
- if (t.charCodeAt(n) === 40) if (hr.has(e)) {
2061
- if (br(t.charCodeAt(n + 1))) throw Error(`Pseudo-selector ${e} cannot be quoted`);
2062
- if (a = [], n = Cr(a, t, n + 1), t.charCodeAt(n) !== 41) throw Error(`Missing closing parenthesis in :${e} (${t})`);
2063
- n += 1;
2064
- } else {
2065
- if (a = o(), _r.has(e)) {
2066
- let e = a.charCodeAt(0);
2067
- e === a.charCodeAt(a.length - 1) && br(e) && (a = a.slice(1, -1));
2064
+ if (t.charCodeAt(n) === 40) {
2065
+ if (hr.has(e)) {
2066
+ if (br(t.charCodeAt(n + 1))) throw Error(`Pseudo-selector ${e} cannot be quoted`);
2067
+ if (a = [], n = Cr(a, t, n + 1), t.charCodeAt(n) !== 41) throw Error(`Missing closing parenthesis in :${e} (${t})`);
2068
+ n += 1;
2069
+ } else {
2070
+ if (a = o(), _r.has(e)) {
2071
+ let e = a.charCodeAt(0);
2072
+ e === a.charCodeAt(a.length - 1) && br(e) && (a = a.slice(1, -1));
2073
+ }
2074
+ a = yr(a);
2068
2075
  }
2069
- a = yr(a);
2070
2076
  }
2071
2077
  r.push({
2072
2078
  type: P.Pseudo,
@@ -2109,7 +2115,7 @@ function Cr(e, t, n) {
2109
2115
  }
2110
2116
  //#endregion
2111
2117
  //#region node_modules/css-select/lib/esm/sort.js
2112
- var I = /* @__PURE__ */ te((/* @__PURE__ */ v(((e, t) => {
2118
+ var I = /* @__PURE__ */ b((/* @__PURE__ */ _(((e, t) => {
2113
2119
  t.exports = {
2114
2120
  trueFunc: function() {
2115
2121
  return !0;
@@ -2580,8 +2586,10 @@ function ai(e, { adapter: t }, n) {
2580
2586
  return e === Kr || n && t.isTag(n);
2581
2587
  });
2582
2588
  for (let t of e) {
2583
- if (!(t.length > 0 && Tr(t[0]) && t[0].type !== P.Descendant)) if (r && !t.some(ti)) t.unshift(ni);
2584
- else continue;
2589
+ if (!(t.length > 0 && Tr(t[0]) && t[0].type !== P.Descendant)) {
2590
+ if (r && !t.some(ti)) t.unshift(ni);
2591
+ else continue;
2592
+ }
2585
2593
  t.unshift(ii);
2586
2594
  }
2587
2595
  }
@@ -2722,12 +2730,14 @@ function Di(e, t, n) {
2722
2730
  }
2723
2731
  for (let e = 0; e < i.length && a?.size !== t.length; e++) {
2724
2732
  let r = i[e];
2725
- if ((a ? t.filter((e) => S(e) && !a.has(e)) : t).length === 0) break;
2733
+ if ((a ? t.filter((e) => C(e) && !a.has(e)) : t).length === 0) break;
2726
2734
  let o = Oi(r, t, n);
2727
- if (o.length) if (a) o.forEach((e) => a.add(e));
2728
- else {
2729
- if (e === i.length - 1) return o;
2730
- a = new Set(o);
2735
+ if (o.length) {
2736
+ if (a) o.forEach((e) => a.add(e));
2737
+ else {
2738
+ if (e === i.length - 1) return o;
2739
+ a = new Set(o);
2740
+ }
2731
2741
  }
2732
2742
  }
2733
2743
  return a === void 0 ? [] : a.size === t.length ? t : t.filter((e) => a.has(e));
@@ -2751,7 +2761,7 @@ function ki(e, t, n = {}, r = Infinity) {
2751
2761
  function Ai(e, t, n, r, i) {
2752
2762
  let a = t.findIndex(_i), o = t.slice(0, a), s = t[a], c = t.length - 1 === a ? i : Infinity, l = vi(s.name, s.data, c);
2753
2763
  if (l === 0) return [];
2754
- let u = (o.length === 0 && !Array.isArray(e) ? nt(e).filter(S) : o.length === 0 ? (Array.isArray(e) ? e : [e]).filter(S) : r || o.some(gr) ? ji(e, [o], n, l) : Ni(e, [o], n)).slice(0, l), d = Ti(s.name, u, s.data, n);
2764
+ let u = (o.length === 0 && !Array.isArray(e) ? tt(e).filter(C) : o.length === 0 ? (Array.isArray(e) ? e : [e]).filter(C) : r || o.some(gr) ? ji(e, [o], n, l) : Ni(e, [o], n)).slice(0, l), d = Ti(s.name, u, s.data, n);
2755
2765
  if (d.length === 0 || t.length === a + 1) return d;
2756
2766
  let f = t.slice(a + 1), p = f.some(gr);
2757
2767
  if (p) {
@@ -2774,17 +2784,17 @@ function ji(e, t, n, r) {
2774
2784
  return Mi(e, pi(t, n, e), r);
2775
2785
  }
2776
2786
  function Mi(e, t, n = Infinity) {
2777
- return _t((e) => S(e) && t(e), mi(e, Wt, t.shouldTestNextSiblings), !0, n);
2787
+ return gt((e) => C(e) && t(e), mi(e, Wt, t.shouldTestNextSiblings), !0, n);
2778
2788
  }
2779
2789
  function Ni(e, t, n) {
2780
- let r = (Array.isArray(e) ? e : [e]).filter(S);
2790
+ let r = (Array.isArray(e) ? e : [e]).filter(C);
2781
2791
  if (r.length === 0) return r;
2782
2792
  let i = pi(t, n);
2783
2793
  return i === I.trueFunc ? r : r.filter(i);
2784
2794
  }
2785
2795
  //#endregion
2786
2796
  //#region node_modules/cheerio/dist/browser/api/traversing.js
2787
- var Pi = /* @__PURE__ */ y({
2797
+ var Pi = /* @__PURE__ */ v({
2788
2798
  _findBySelector: () => Li,
2789
2799
  add: () => va,
2790
2800
  addBack: () => ya,
@@ -2877,11 +2887,11 @@ function Vi(e, ...t) {
2877
2887
  function Hi(e) {
2878
2888
  return e.length > 1 ? Array.from(new Set(e)) : e;
2879
2889
  }
2880
- var Ui = Bi(({ parent: e }) => e && !we(e) ? e : null, Hi), Wi = zi((e) => {
2890
+ var Ui = Bi(({ parent: e }) => e && !Ce(e) ? e : null, Hi), Wi = zi((e) => {
2881
2891
  let t = [];
2882
- for (; e.parent && !we(e.parent);) t.push(e.parent), e = e.parent;
2892
+ for (; e.parent && !Ce(e.parent);) t.push(e.parent), e = e.parent;
2883
2893
  return t;
2884
- }, Pt, (e) => e.reverse()), Gi = Vi(({ parent: e }) => e && !we(e) ? e : null, Pt, (e) => e.reverse());
2894
+ }, Pt, (e) => e.reverse()), Gi = Vi(({ parent: e }) => e && !Ce(e) ? e : null, Pt, (e) => e.reverse());
2885
2895
  function Ki(e) {
2886
2896
  let t = [];
2887
2897
  if (!e) return this._make(t);
@@ -2890,7 +2900,7 @@ function Ki(e) {
2890
2900
  root: this._root?.[0]
2891
2901
  }, r = typeof e == "string" ? (t) => Ci(t, e, n) : ia(e);
2892
2902
  return E(this, (e) => {
2893
- for (e && !we(e) && !S(e) && (e = e.parent); e && S(e);) {
2903
+ for (e && !Ce(e) && !C(e) && (e = e.parent); e && C(e);) {
2894
2904
  if (r(e, 0)) {
2895
2905
  t.includes(e) || t.push(e);
2896
2906
  break;
@@ -2899,17 +2909,17 @@ function Ki(e) {
2899
2909
  }
2900
2910
  }), this._make(t);
2901
2911
  }
2902
- var qi = Bi((e) => ct(e)), Ji = zi((e) => {
2912
+ var qi = Bi((e) => st(e)), Ji = zi((e) => {
2903
2913
  let t = [];
2904
- for (; e.next;) e = e.next, S(e) && t.push(e);
2914
+ for (; e.next;) e = e.next, C(e) && t.push(e);
2905
2915
  return t;
2906
- }, Hi), Yi = Vi((e) => ct(e), Hi), Xi = Bi((e) => lt(e)), Zi = zi((e) => {
2916
+ }, Hi), Yi = Vi((e) => st(e), Hi), Xi = Bi((e) => ct(e)), Zi = zi((e) => {
2907
2917
  let t = [];
2908
- for (; e.prev;) e = e.prev, S(e) && t.push(e);
2918
+ for (; e.prev;) e = e.prev, C(e) && t.push(e);
2909
2919
  return t;
2910
- }, Hi), Qi = Vi((e) => lt(e), Hi), $i = zi((e) => it(e).filter((t) => S(t) && t !== e), Pt), ea = zi((e) => nt(e).filter(S), Hi);
2920
+ }, Hi), Qi = Vi((e) => ct(e), Hi), $i = zi((e) => rt(e).filter((t) => C(t) && t !== e), Pt), ea = zi((e) => tt(e).filter(C), Hi);
2911
2921
  function ta() {
2912
- let e = this.toArray().reduce((e, t) => C(t) ? e.concat(t.children) : e, []);
2922
+ let e = this.toArray().reduce((e, t) => w(t) ? e.concat(t.children) : e, []);
2913
2923
  return this._make(e);
2914
2924
  }
2915
2925
  function na(e) {
@@ -2941,7 +2951,7 @@ function oa(e, t, n, r) {
2941
2951
  }
2942
2952
  function sa(e) {
2943
2953
  let t = this.toArray();
2944
- return typeof e == "string" ? wi(t.filter(S), e, this.options) : e ? t.some(ia(e)) : !1;
2954
+ return typeof e == "string" ? wi(t.filter(C), e, this.options) : e ? t.some(ia(e)) : !1;
2945
2955
  }
2946
2956
  function ca(e) {
2947
2957
  let t = this.toArray();
@@ -2995,8 +3005,8 @@ function ba(e) {
2995
3005
  return function(t, n, r, i) {
2996
3006
  if (typeof Buffer < "u" && Buffer.isBuffer(t) && (t = t.toString()), typeof t == "string") return e(t, n, r, i);
2997
3007
  let a = t;
2998
- if (!Array.isArray(a) && we(a)) return a;
2999
- let o = new ve([]);
3008
+ if (!Array.isArray(a) && Ce(a)) return a;
3009
+ let o = new _e([]);
3000
3010
  return xa(a, o), o;
3001
3011
  };
3002
3012
  }
@@ -3005,13 +3015,13 @@ function xa(e, t) {
3005
3015
  t ? t.children = n : t = null;
3006
3016
  for (let e = 0; e < n.length; e++) {
3007
3017
  let r = n[e];
3008
- r.parent && r.parent.children !== n && ut(r), t ? (r.prev = n[e - 1] || null, r.next = n[e + 1] || null) : r.prev = r.next = null, r.parent = t;
3018
+ r.parent && r.parent.children !== n && lt(r), t ? (r.prev = n[e - 1] || null, r.next = n[e + 1] || null) : r.prev = r.next = null, r.parent = t;
3009
3019
  }
3010
3020
  return t;
3011
3021
  }
3012
3022
  //#endregion
3013
3023
  //#region node_modules/cheerio/dist/browser/api/manipulation.js
3014
- var Sa = /* @__PURE__ */ y({
3024
+ var Sa = /* @__PURE__ */ v({
3015
3025
  _makeDomArray: () => Ca,
3016
3026
  after: () => Fa,
3017
3027
  append: () => Oa,
@@ -3044,7 +3054,7 @@ function Ca(e, t) {
3044
3054
  if (typeof i == "object") {
3045
3055
  if (i == null) continue;
3046
3056
  if (!("length" in i)) {
3047
- n.push(t ? Te(i, !0) : i);
3057
+ n.push(t ? we(i, !0) : i);
3048
3058
  continue;
3049
3059
  }
3050
3060
  }
@@ -3052,13 +3062,13 @@ function Ca(e, t) {
3052
3062
  }
3053
3063
  return n;
3054
3064
  }
3055
- return [t ? Te(e, !0) : e];
3065
+ return [t ? we(e, !0) : e];
3056
3066
  }
3057
3067
  function wa(e) {
3058
3068
  return function(...t) {
3059
3069
  let n = this.length - 1;
3060
3070
  return E(this, (r, i) => {
3061
- if (!C(r)) return;
3071
+ if (!w(r)) return;
3062
3072
  let a = typeof t[0] == "function" ? t[0].call(r, i, this._render(r.children)) : t;
3063
3073
  e(this._makeDomArray(a, i < n), r.children, r);
3064
3074
  });
@@ -3096,11 +3106,11 @@ function Aa(e) {
3096
3106
  let n = this.length - 1, r = this.parents().last();
3097
3107
  for (let i = 0; i < this.length; i++) {
3098
3108
  let a = this[i], o = typeof t == "function" ? t.call(a, i, a) : typeof t == "string" && !un(t) ? r.find(t).clone() : t, [s] = this._makeDomArray(o, i < n);
3099
- if (!s || !C(s)) continue;
3109
+ if (!s || !w(s)) continue;
3100
3110
  let c = s, l = 0;
3101
3111
  for (; l < c.children.length;) {
3102
3112
  let e = c.children[l];
3103
- S(e) ? (c = e, l = 0) : l++;
3113
+ C(e) ? (c = e, l = 0) : l++;
3104
3114
  }
3105
3115
  e(a, c, [s]);
3106
3116
  }
@@ -3113,7 +3123,7 @@ var ja = Aa((e, t, n) => {
3113
3123
  let i = r.children, a = i.indexOf(e);
3114
3124
  xa([e], t), Ta(i, a, 0, n, r);
3115
3125
  }), Ma = Aa((e, t, n) => {
3116
- C(e) && (xa(e.children, t), xa(n, e));
3126
+ w(e) && (xa(e.children, t), xa(n, e));
3117
3127
  });
3118
3128
  function Na(e) {
3119
3129
  return this.parent(e).not("body").each((e, t) => {
@@ -3124,11 +3134,11 @@ function Pa(e) {
3124
3134
  let t = this[0];
3125
3135
  if (t) {
3126
3136
  let n = this._make(typeof e == "function" ? e.call(t, 0, t) : e).insertBefore(t), r;
3127
- for (let e = 0; e < n.length; e++) n[e].type === ce && (r = n[e]);
3137
+ for (let e = 0; e < n.length; e++) n[e].type === se && (r = n[e]);
3128
3138
  let i = 0;
3129
3139
  for (; r && i < r.children.length;) {
3130
3140
  let e = r.children[i];
3131
- e.type === ce ? (r = e, i = 0) : i++;
3141
+ e.type === se ? (r = e, i = 0) : i++;
3132
3142
  }
3133
3143
  r && this._make(r).append(this);
3134
3144
  }
@@ -3137,7 +3147,7 @@ function Pa(e) {
3137
3147
  function Fa(...e) {
3138
3148
  let t = this.length - 1;
3139
3149
  return E(this, (n, r) => {
3140
- if (!C(n) || !n.parent) return;
3150
+ if (!w(n) || !n.parent) return;
3141
3151
  let i = n.parent.children, a = i.indexOf(n);
3142
3152
  /* istanbul ignore next */
3143
3153
  if (a === -1) return;
@@ -3159,7 +3169,7 @@ function Ia(e) {
3159
3169
  function La(...e) {
3160
3170
  let t = this.length - 1;
3161
3171
  return E(this, (n, r) => {
3162
- if (!C(n) || !n.parent) return;
3172
+ if (!w(n) || !n.parent) return;
3163
3173
  let i = n.parent.children, a = i.indexOf(n);
3164
3174
  /* istanbul ignore next */
3165
3175
  if (a === -1) return;
@@ -3180,7 +3190,7 @@ function Ra(e) {
3180
3190
  }
3181
3191
  function za(e) {
3182
3192
  return E(e ? this.filter(e) : this, (e) => {
3183
- ut(e), e.prev = e.next = e.parent = null;
3193
+ lt(e), e.prev = e.next = e.parent = null;
3184
3194
  }), this;
3185
3195
  }
3186
3196
  function Ba(e) {
@@ -3193,7 +3203,7 @@ function Ba(e) {
3193
3203
  }
3194
3204
  function Va() {
3195
3205
  return E(this, (e) => {
3196
- if (C(e)) {
3206
+ if (w(e)) {
3197
3207
  for (let t of e.children) t.next = t.prev = t.parent = null;
3198
3208
  e.children.length = 0;
3199
3209
  }
@@ -3202,10 +3212,10 @@ function Va() {
3202
3212
  function Ha(e) {
3203
3213
  if (e === void 0) {
3204
3214
  let e = this[0];
3205
- return !e || !C(e) ? null : this._render(e.children);
3215
+ return !e || !w(e) ? null : this._render(e.children);
3206
3216
  }
3207
3217
  return E(this, (t) => {
3208
- if (C(t)) {
3218
+ if (w(t)) {
3209
3219
  for (let e of t.children) e.next = e.prev = e.parent = null;
3210
3220
  xa(on(e) ? e.toArray() : this._parse(`${e}`, this.options, !1, t).children, t);
3211
3221
  }
@@ -3216,23 +3226,23 @@ function Ua() {
3216
3226
  }
3217
3227
  function Wa(e) {
3218
3228
  return e === void 0 ? Qt(this) : typeof e == "function" ? E(this, (t, n) => this._make(t).text(e.call(t, n, Qt([t])))) : E(this, (t) => {
3219
- if (C(t)) {
3229
+ if (w(t)) {
3220
3230
  for (let e of t.children) e.next = e.prev = e.parent = null;
3221
- xa(new pe(`${e}`), t);
3231
+ xa(new fe(`${e}`), t);
3222
3232
  }
3223
3233
  });
3224
3234
  }
3225
3235
  function Ga() {
3226
- let e = Array.prototype.map.call(this.get(), (e) => Te(e, !0)), t = new ve(e);
3236
+ let e = Array.prototype.map.call(this.get(), (e) => we(e, !0)), t = new _e(e);
3227
3237
  for (let n of e) n.parent = t;
3228
3238
  return this._make(e);
3229
3239
  }
3230
3240
  //#endregion
3231
3241
  //#region node_modules/cheerio/dist/browser/api/css.js
3232
- var Ka = /* @__PURE__ */ y({ css: () => qa });
3242
+ var Ka = /* @__PURE__ */ v({ css: () => qa });
3233
3243
  function qa(e, t) {
3234
3244
  if (e != null && t != null || typeof e == "object" && !Array.isArray(e)) return E(this, (n, r) => {
3235
- S(n) && Ja(n, e, t, r);
3245
+ C(n) && Ja(n, e, t, r);
3236
3246
  });
3237
3247
  if (this.length !== 0) return Ya(this[0], e);
3238
3248
  }
@@ -3249,7 +3259,7 @@ function Ja(e, t, n, r) {
3249
3259
  }
3250
3260
  }
3251
3261
  function Ya(e, t) {
3252
- if (!e || !S(e)) return;
3262
+ if (!e || !C(e)) return;
3253
3263
  let n = Za(e.attribs.style);
3254
3264
  if (typeof t == "string") return n[t];
3255
3265
  if (Array.isArray(t)) {
@@ -3276,7 +3286,7 @@ function Za(e) {
3276
3286
  }
3277
3287
  //#endregion
3278
3288
  //#region node_modules/cheerio/dist/browser/api/forms.js
3279
- var Qa = /* @__PURE__ */ y({
3289
+ var Qa = /* @__PURE__ */ v({
3280
3290
  serialize: () => no,
3281
3291
  serializeArray: () => ro
3282
3292
  }), $a = "input,select,textarea,keygen", eo = /%20/g, to = /\r?\n/g;
@@ -3286,7 +3296,7 @@ function no() {
3286
3296
  function ro() {
3287
3297
  return this.map((e, t) => {
3288
3298
  let n = this._make(t);
3289
- return S(t) && t.name === "form" ? n.find($a).toArray() : n.filter($a).toArray();
3299
+ return C(t) && t.name === "form" ? n.find($a).toArray() : n.filter($a).toArray();
3290
3300
  }).filter("[name!=\"\"]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))").map((e, t) => {
3291
3301
  let n = this._make(t), r = n.attr("name"), i = n.val() ?? "";
3292
3302
  return Array.isArray(i) ? i.map((e) => ({
@@ -3300,7 +3310,7 @@ function ro() {
3300
3310
  }
3301
3311
  //#endregion
3302
3312
  //#region node_modules/cheerio/dist/browser/api/extract.js
3303
- var io = /* @__PURE__ */ y({ extract: () => oo });
3313
+ var io = /* @__PURE__ */ v({ extract: () => oo });
3304
3314
  function ao(e) {
3305
3315
  return typeof e == "string" ? {
3306
3316
  selector: e,
@@ -3358,8 +3368,8 @@ function co(e, t) {
3358
3368
  let d = typeof t == "string" && un(t) ? e(t, a, !1, null).children : lo(t) ? [t] : Array.isArray(t) ? t : void 0, f = new c(d, u, a);
3359
3369
  if (d) return f;
3360
3370
  if (typeof t != "string") throw TypeError("Unexpected type of selector");
3361
- let p = t, m = n ? typeof n == "string" ? un(n) ? new c([e(n, a, !1, null)], u, a) : (p = `${n} ${p}`, u) : on(n) ? n : new c(Array.isArray(n) ? n : [n], u, a) : u;
3362
- return m ? m.find(p) : f;
3371
+ let p = t, ee = n ? typeof n == "string" ? un(n) ? new c([e(n, a, !1, null)], u, a) : (p = `${n} ${p}`, u) : on(n) ? n : new c(Array.isArray(n) ? n : [n], u, a) : u;
3372
+ return ee ? ee.find(p) : f;
3363
3373
  }
3364
3374
  return Object.assign(l, qt, {
3365
3375
  load: n,
@@ -3371,7 +3381,7 @@ function co(e, t) {
3371
3381
  };
3372
3382
  }
3373
3383
  function lo(e) {
3374
- return !!e.name || e.type === re || e.type === x || e.type === ae;
3384
+ return !!e.name || e.type === te || e.type === ne || e.type === ie;
3375
3385
  }
3376
3386
  //#endregion
3377
3387
  //#region node_modules/parse5/dist/common/unicode.js
@@ -4155,9 +4165,7 @@ var Jo = class {
4155
4165
  case B.NULL_CHARACTER:
4156
4166
  this.handler.onNullCharacter(this.currentCharacterToken);
4157
4167
  break;
4158
- case B.WHITESPACE_CHARACTER:
4159
- this.handler.onWhitespaceCharacter(this.currentCharacterToken);
4160
- break;
4168
+ case B.WHITESPACE_CHARACTER: this.handler.onWhitespaceCharacter(this.currentCharacterToken);
4161
4169
  }
4162
4170
  this.currentCharacterToken = null;
4163
4171
  }
@@ -4170,10 +4178,13 @@ var Jo = class {
4170
4178
  }), this.active = !1;
4171
4179
  }
4172
4180
  _appendCharToCurrentCharacterToken(e, t) {
4173
- if (this.currentCharacterToken) if (this.currentCharacterToken.type === e) {
4174
- this.currentCharacterToken.chars += t;
4175
- return;
4176
- } else this.currentLocation = this.getCurrentLocation(0), this._emitCurrentCharacterToken(this.currentLocation), this.preprocessor.dropParsedChunk();
4181
+ if (this.currentCharacterToken) {
4182
+ if (this.currentCharacterToken.type === e) {
4183
+ this.currentCharacterToken.chars += t;
4184
+ return;
4185
+ }
4186
+ this.currentLocation = this.getCurrentLocation(0), this._emitCurrentCharacterToken(this.currentLocation), this.preprocessor.dropParsedChunk();
4187
+ }
4177
4188
  this._createCharacterToken(e, t);
4178
4189
  }
4179
4190
  _emitCodePoint(e) {
@@ -5358,10 +5369,7 @@ var Jo = class {
5358
5369
  case L.NULL:
5359
5370
  this._err(z.unexpectedNullCharacter);
5360
5371
  break;
5361
- case L.EOF:
5362
- this.emitCurrentDoctype(t), this._emitEOFToken();
5363
- break;
5364
- default:
5372
+ case L.EOF: this.emitCurrentDoctype(t), this._emitEOFToken();
5365
5373
  }
5366
5374
  }
5367
5375
  _stateCdataSection(e) {
@@ -5391,10 +5399,12 @@ var Jo = class {
5391
5399
  }
5392
5400
  _stateCharacterReference() {
5393
5401
  let e = this.entityDecoder.write(this.preprocessor.html, this.preprocessor.pos);
5394
- if (e < 0) if (this.preprocessor.lastChunkWritten) e = this.entityDecoder.end();
5395
- else {
5396
- this.active = !1, this.preprocessor.pos = this.preprocessor.html.length - 1, this.consumedAfterSnapshot = 0, this.preprocessor.endOfChunkHit = !0;
5397
- return;
5402
+ if (e < 0) {
5403
+ if (this.preprocessor.lastChunkWritten) e = this.entityDecoder.end();
5404
+ else {
5405
+ this.active = !1, this.preprocessor.pos = this.preprocessor.html.length - 1, this.consumedAfterSnapshot = 0, this.preprocessor.endOfChunkHit = !0;
5406
+ return;
5407
+ }
5398
5408
  }
5399
5409
  e === 0 ? (this.preprocessor.pos = this.entityStartPos, this._flushCodePointConsumedAsCharacterReference(L.AMPERSAND), this.state = !this._isCharacterReferenceInAttribute() && Uo(this.preprocessor.peek(1)) ? J.AMBIGUOUS_AMPERSAND : this.returnState) : this.state = this.returnState;
5400
5410
  }
@@ -5567,9 +5577,7 @@ var Jo = class {
5567
5577
  case U.SVG:
5568
5578
  if (ts.has(r)) return !1;
5569
5579
  break;
5570
- case U.MATHML:
5571
- if (es.has(r)) return !1;
5572
- break;
5580
+ case U.MATHML: if (es.has(r)) return !1;
5573
5581
  }
5574
5582
  }
5575
5583
  return !0;
@@ -5594,9 +5602,7 @@ var Jo = class {
5594
5602
  case U.SVG:
5595
5603
  if (ts.has(t)) return !1;
5596
5604
  break;
5597
- case U.MATHML:
5598
- if (es.has(t)) return !1;
5599
- break;
5605
+ case U.MATHML: if (es.has(t)) return !1;
5600
5606
  }
5601
5607
  }
5602
5608
  return !0;
@@ -6148,10 +6154,7 @@ var Vs = {
6148
6154
  case K.SCRIPT:
6149
6155
  this.tokenizer.state = Y.SCRIPT_DATA;
6150
6156
  break;
6151
- case K.PLAINTEXT:
6152
- this.tokenizer.state = Y.PLAINTEXT;
6153
- break;
6154
- default:
6157
+ case K.PLAINTEXT: this.tokenizer.state = Y.PLAINTEXT;
6155
6158
  }
6156
6159
  }
6157
6160
  _setDocumentType(e) {
@@ -6258,9 +6261,7 @@ var Vs = {
6258
6261
  case B.EOF:
6259
6262
  this.onEof(e);
6260
6263
  break;
6261
- case B.WHITESPACE_CHARACTER:
6262
- this.onWhitespaceCharacter(e);
6263
- break;
6264
+ case B.WHITESPACE_CHARACTER: this.onWhitespaceCharacter(e);
6264
6265
  }
6265
6266
  }
6266
6267
  _isIntegrationPoint(e, t, n) {
@@ -6323,12 +6324,10 @@ var Vs = {
6323
6324
  return;
6324
6325
  }
6325
6326
  break;
6326
- case K.HEAD:
6327
- if (e > 0) {
6328
- this.insertionMode = X.IN_HEAD;
6329
- return;
6330
- }
6331
- break;
6327
+ case K.HEAD: if (e > 0) {
6328
+ this.insertionMode = X.IN_HEAD;
6329
+ return;
6330
+ }
6332
6331
  }
6333
6332
  this.insertionMode = X.IN_BODY;
6334
6333
  }
@@ -6369,7 +6368,6 @@ var Vs = {
6369
6368
  beforeElement: null
6370
6369
  };
6371
6370
  }
6372
- default:
6373
6371
  }
6374
6372
  }
6375
6373
  return {
@@ -6433,10 +6431,7 @@ var Vs = {
6433
6431
  case X.AFTER_BODY:
6434
6432
  Ql(this, e);
6435
6433
  break;
6436
- case X.AFTER_AFTER_BODY:
6437
- iu(this, e);
6438
- break;
6439
- default:
6434
+ case X.AFTER_AFTER_BODY: iu(this, e);
6440
6435
  }
6441
6436
  }
6442
6437
  onNullCharacter(e) {
@@ -6477,10 +6472,7 @@ var Vs = {
6477
6472
  case X.AFTER_BODY:
6478
6473
  Ql(this, e);
6479
6474
  break;
6480
- case X.AFTER_AFTER_BODY:
6481
- iu(this, e);
6482
- break;
6483
- default:
6475
+ case X.AFTER_AFTER_BODY: iu(this, e);
6484
6476
  }
6485
6477
  }
6486
6478
  onComment(e) {
@@ -6516,10 +6508,7 @@ var Vs = {
6516
6508
  $s(this, e);
6517
6509
  break;
6518
6510
  case X.AFTER_AFTER_BODY:
6519
- case X.AFTER_AFTER_FRAMESET:
6520
- ec(this, e);
6521
- break;
6522
- default:
6511
+ case X.AFTER_AFTER_FRAMESET: ec(this, e);
6523
6512
  }
6524
6513
  }
6525
6514
  onDoctype(e) {
@@ -6533,10 +6522,7 @@ var Vs = {
6533
6522
  case X.AFTER_HEAD:
6534
6523
  this._err(e, z.misplacedDoctype);
6535
6524
  break;
6536
- case X.IN_TABLE_TEXT:
6537
- Al(this, e);
6538
- break;
6539
- default:
6525
+ case X.IN_TABLE_TEXT: Al(this, e);
6540
6526
  }
6541
6527
  }
6542
6528
  onStartTag(e) {
@@ -6610,10 +6596,7 @@ var Vs = {
6610
6596
  case X.AFTER_AFTER_BODY:
6611
6597
  ru(this, e);
6612
6598
  break;
6613
- case X.AFTER_AFTER_FRAMESET:
6614
- au(this, e);
6615
- break;
6616
- default:
6599
+ case X.AFTER_AFTER_FRAMESET: au(this, e);
6617
6600
  }
6618
6601
  }
6619
6602
  onEndTag(e) {
@@ -6684,10 +6667,7 @@ var Vs = {
6684
6667
  case X.AFTER_FRAMESET:
6685
6668
  nu(this, e);
6686
6669
  break;
6687
- case X.AFTER_AFTER_BODY:
6688
- iu(this, e);
6689
- break;
6690
- default:
6670
+ case X.AFTER_AFTER_BODY: iu(this, e);
6691
6671
  }
6692
6672
  }
6693
6673
  onEof(e) {
@@ -6734,10 +6714,7 @@ var Vs = {
6734
6714
  case X.IN_FRAMESET:
6735
6715
  case X.AFTER_FRAMESET:
6736
6716
  case X.AFTER_AFTER_BODY:
6737
- case X.AFTER_AFTER_FRAMESET:
6738
- tc(this, e);
6739
- break;
6740
- default:
6717
+ case X.AFTER_AFTER_FRAMESET: tc(this, e);
6741
6718
  }
6742
6719
  }
6743
6720
  onWhitespaceCharacter(e) {
@@ -6775,10 +6752,7 @@ var Vs = {
6775
6752
  case X.IN_ROW:
6776
6753
  gl(this, e);
6777
6754
  break;
6778
- case X.IN_TABLE_TEXT:
6779
- Ol(this, e);
6780
- break;
6781
- default:
6755
+ case X.IN_TABLE_TEXT: Ol(this, e);
6782
6756
  }
6783
6757
  }
6784
6758
  };
@@ -7042,10 +7016,7 @@ function bc(e, t) {
7042
7016
  case B.END_TAG:
7043
7017
  fl(e, t);
7044
7018
  break;
7045
- case B.EOF:
7046
- pl(e, t);
7047
- break;
7048
- default:
7019
+ case B.EOF: pl(e, t);
7049
7020
  }
7050
7021
  }
7051
7022
  function xc(e, t) {
@@ -7492,9 +7463,7 @@ function gl(e, t) {
7492
7463
  case B.CHARACTER:
7493
7464
  kl(e, t);
7494
7465
  break;
7495
- case B.WHITESPACE_CHARACTER:
7496
- Ol(e, t);
7497
- break;
7466
+ case B.WHITESPACE_CHARACTER: Ol(e, t);
7498
7467
  }
7499
7468
  else Dl(e, t);
7500
7469
  }
@@ -7792,10 +7761,7 @@ function Ul(e, t) {
7792
7761
  e.openElements.hasInSelectScope(K.SELECT) && (e.openElements.popUntilTagNamePopped(K.SELECT), e._resetInsertionMode(), t.tagID !== K.SELECT && e._processStartTag(t));
7793
7762
  break;
7794
7763
  case K.SCRIPT:
7795
- case K.TEMPLATE:
7796
- uc(e, t);
7797
- break;
7798
- default:
7764
+ case K.TEMPLATE: uc(e, t);
7799
7765
  }
7800
7766
  }
7801
7767
  function Wl(e, t) {
@@ -7809,10 +7775,7 @@ function Wl(e, t) {
7809
7775
  case K.SELECT:
7810
7776
  e.openElements.hasInSelectScope(K.SELECT) && (e.openElements.popUntilTagNamePopped(K.SELECT), e._resetInsertionMode());
7811
7777
  break;
7812
- case K.TEMPLATE:
7813
- fc(e, t);
7814
- break;
7815
- default:
7778
+ case K.TEMPLATE: fc(e, t);
7816
7779
  }
7817
7780
  }
7818
7781
  function Gl(e, t) {
@@ -7889,10 +7852,7 @@ function $l(e, t) {
7889
7852
  case K.FRAME:
7890
7853
  e._appendElement(t, U.HTML), t.ackSelfClosing = !0;
7891
7854
  break;
7892
- case K.NOFRAMES:
7893
- uc(e, t);
7894
- break;
7895
- default:
7855
+ case K.NOFRAMES: uc(e, t);
7896
7856
  }
7897
7857
  }
7898
7858
  function eu(e, t) {
@@ -7903,10 +7863,7 @@ function tu(e, t) {
7903
7863
  case K.HTML:
7904
7864
  Z(e, t);
7905
7865
  break;
7906
- case K.NOFRAMES:
7907
- uc(e, t);
7908
- break;
7909
- default:
7866
+ case K.NOFRAMES: uc(e, t);
7910
7867
  }
7911
7868
  }
7912
7869
  function nu(e, t) {
@@ -7923,10 +7880,7 @@ function au(e, t) {
7923
7880
  case K.HTML:
7924
7881
  Z(e, t);
7925
7882
  break;
7926
- case K.NOFRAMES:
7927
- uc(e, t);
7928
- break;
7929
- default:
7883
+ case K.NOFRAMES: uc(e, t);
7930
7884
  }
7931
7885
  }
7932
7886
  function ou(e, t) {
@@ -8076,15 +8030,15 @@ function Ou(e, t, n) {
8076
8030
  return e && (r += e), t ? r += ` PUBLIC ${Du(t)}` : n && (r += " SYSTEM"), n && (r += ` ${Du(n)}`), r;
8077
8031
  }
8078
8032
  var ku = {
8079
- isCommentNode: Se,
8080
- isElementNode: S,
8081
- isTextNode: xe,
8033
+ isCommentNode: xe,
8034
+ isElementNode: C,
8035
+ isTextNode: be,
8082
8036
  createDocument() {
8083
- let e = new ve([]);
8037
+ let e = new _e([]);
8084
8038
  return e["x-mode"] = W.NO_QUIRKS, e;
8085
8039
  },
8086
8040
  createDocumentFragment() {
8087
- return new ve([]);
8041
+ return new _e([]);
8088
8042
  },
8089
8043
  createElement(e, t, n) {
8090
8044
  let r = Object.create(null), i = Object.create(null), a = Object.create(null);
@@ -8092,14 +8046,14 @@ var ku = {
8092
8046
  let t = n[e].name;
8093
8047
  r[t] = n[e].value, i[t] = n[e].namespace, a[t] = n[e].prefix;
8094
8048
  }
8095
- let o = new ye(e, r, []);
8049
+ let o = new ve(e, r, []);
8096
8050
  return o.namespace = t, o["x-attribsNamespace"] = i, o["x-attribsPrefix"] = a, o;
8097
8051
  },
8098
8052
  createCommentNode(e) {
8099
- return new me(e);
8053
+ return new pe(e);
8100
8054
  },
8101
8055
  createTextNode(e) {
8102
- return new pe(e);
8056
+ return new fe(e);
8103
8057
  },
8104
8058
  appendChild(e, t) {
8105
8059
  let n = e.children[e.children.length - 1];
@@ -8116,8 +8070,8 @@ var ku = {
8116
8070
  return e.children[0];
8117
8071
  },
8118
8072
  setDocumentType(e, t, n, r) {
8119
- let i = Ou(t, n, r), a = e.children.find((e) => Ce(e) && e.name === "!doctype");
8120
- a ? a.data = i ?? null : (a = new he("!doctype", i), ku.appendChild(e, a)), a["x-name"] = t, a["x-publicId"] = n, a["x-systemId"] = r;
8073
+ let i = Ou(t, n, r), a = e.children.find((e) => Se(e) && e.name === "!doctype");
8074
+ a ? a.data = i ?? null : (a = new me("!doctype", i), ku.appendChild(e, a)), a["x-name"] = t, a["x-publicId"] = n, a["x-systemId"] = r;
8121
8075
  },
8122
8076
  setDocumentMode(e, t) {
8123
8077
  e["x-mode"] = t;
@@ -8133,11 +8087,11 @@ var ku = {
8133
8087
  },
8134
8088
  insertText(e, t) {
8135
8089
  let n = e.children[e.children.length - 1];
8136
- n && xe(n) ? n.data += t : ku.appendChild(e, ku.createTextNode(t));
8090
+ n && be(n) ? n.data += t : ku.appendChild(e, ku.createTextNode(t));
8137
8091
  },
8138
8092
  insertTextBefore(e, t, n) {
8139
8093
  let r = e.children[e.children.indexOf(n) - 1];
8140
- r && xe(r) ? r.data += t : ku.insertBefore(e, ku.createTextNode(t), n);
8094
+ r && be(r) ? r.data += t : ku.insertBefore(e, ku.createTextNode(t), n);
8141
8095
  },
8142
8096
  adoptAttributes(e, t) {
8143
8097
  for (let n = 0; n < t.length; n++) {
@@ -8179,7 +8133,7 @@ var ku = {
8179
8133
  return e["x-systemId"] ?? "";
8180
8134
  },
8181
8135
  isDocumentTypeNode(e) {
8182
- return Ce(e) && e.name === "!doctype";
8136
+ return Se(e) && e.name === "!doctype";
8183
8137
  },
8184
8138
  setNodeSourceCodeLocation(e, t) {
8185
8139
  t && (e.startIndex = t.startOffset, e.endIndex = t.endOffset), e.sourceCodeLocation = t;
@@ -8204,7 +8158,7 @@ function Mu(e) {
8204
8158
  let t = "length" in e ? e : [e];
8205
8159
  for (let e = 0; e < t.length; e += 1) {
8206
8160
  let n = t[e];
8207
- we(n) && Array.prototype.splice.call(t, e, 1, ...n.children);
8161
+ Ce(n) && Array.prototype.splice.call(t, e, 1, ...n.children);
8208
8162
  }
8209
8163
  let n = "";
8210
8164
  for (let e = 0; e < t.length; e += 1) {
@@ -8213,7 +8167,7 @@ function Mu(e) {
8213
8167
  }
8214
8168
  return n;
8215
8169
  }
8216
- var Nu = co(ba((e, t, n, r) => t._useHtmlParser2 ? Bn(e, t) : Au(e, t, n, r)), (e, t) => t._useHtmlParser2 ? He(e, t) : Mu(e));
8170
+ var Nu = co(ba((e, t, n, r) => t._useHtmlParser2 ? Bn(e, t) : Au(e, t, n, r)), (e, t) => t._useHtmlParser2 ? Ve(e, t) : Mu(e));
8217
8171
  //#endregion
8218
8172
  //#region src/parsers/utils.ts
8219
8173
  function Pu(e, { removeEmptyElements: t = !1 } = {}) {
@@ -8338,49 +8292,65 @@ function Hu(e) {
8338
8292
  return Vu.some((t) => t.test(e));
8339
8293
  }
8340
8294
  function Uu(e, t) {
8341
- let n = Nu(Pu(t, { removeEmptyElements: !0 })), r = n("p:not(table p), h4, table").toArray().filter((e) => Lu(Q(n(e).text())).length > 0), i = [], a = [], o = null, s = null, c = !1, l = [], u = [], d = [], f = !1, p = !1;
8342
- for (let e of r) {
8343
- let t = n(e), r = t.find("a").first().attr("href") || "", m = t.hasClass("assnatFootnoteText") || r.startsWith("#_ftnref"), h = Lu(Q(t.prop("outerHTML") || "")), g = t.is("table") ? Fu(t) : Lu(Q(t.text()));
8344
- if (m) {
8295
+ let n = e(t), [r] = Iu(Ru(n.is("table") ? Fu(n) : Lu(Q(n.text()))));
8296
+ return r !== null && r >= 0;
8297
+ }
8298
+ function Wu(e, t) {
8299
+ let n = Nu(Pu(t, { removeEmptyElements: !0 })), r = n("p:not(table p), h4, table").toArray().filter((e) => Lu(Q(n(e).text())).length > 0), i = [], a = [], o = null, s = null, c = !1, l = [], u = [], d = [], f = !1, p = !1, ee = !1, m = Array.from({ length: r.length + 1 }, () => !1), h = !1;
8300
+ for (let e = r.length - 1; e >= 0; e--) h = h || Uu(n, r[e]), m[e] = h;
8301
+ for (let e = 0; e < r.length; e++) {
8302
+ let t = r[e], h = n(t), g = h.find("a").first().attr("href") || "", _ = h.hasClass("assnatFootnoteText") || g.startsWith("#_ftnref"), v = Lu(Q(h.prop("outerHTML") || "")), y = h.is("table") ? Fu(h) : Lu(Q(h.text()));
8303
+ if (_) {
8345
8304
  f && d.push({
8346
- texte: g,
8347
- html: h
8305
+ texte: y,
8306
+ html: v
8348
8307
  });
8349
8308
  continue;
8350
8309
  }
8351
- let _ = Ru(g), [v, y] = Iu(_);
8352
- if (!f) if (v !== null && v >= 0 && y !== "Annexe") f = !0;
8353
- else continue;
8354
- if (!(!_ || Bu(g) || v !== null && v < 0)) {
8355
- if (Hu(g)) break;
8356
- if (v === null) l.length === 0 || c && u.length === 0 ? l.push({
8357
- texte: g,
8358
- html: h
8359
- }) : u.push({
8360
- texte: g,
8361
- html: h
8362
- }), c && l.length >= 2 && (c = !1);
8363
- else {
8364
- if (y === "ExposeMotifs" && (p = !0), y !== "ExposeMotifs" && p && t.closest(".assnatSection2").length > 0) {
8365
- u.push({
8366
- texte: g,
8367
- html: h
8368
- });
8369
- continue;
8370
- }
8371
- for (o = v, l.length > 0 && i.push({
8372
- id: `D_${Ru(l[0]?.texte ?? "")}`,
8373
- type: s ?? "",
8374
- niveau: o + 1,
8375
- niveauRelatif: a.length,
8376
- titres: l,
8377
- alineas: u
8378
- }); a.length > 0 && o < a[a.length - 1];) a.pop();
8379
- (a.length === 0 || o > a[a.length - 1]) && a.push(o), s = y, l = [{
8380
- texte: g,
8381
- html: h
8382
- }], u = [], c = !_.match(/^ARTICLES?(_|$)/) && !_.match(/^EXPOSE_DES_MOTIFS$/);
8310
+ let b = Ru(y), [x, S] = Iu(b);
8311
+ if (!f) {
8312
+ if (x !== null && x >= 0 && S !== "Annexe") f = !0;
8313
+ else continue;
8314
+ }
8315
+ if (!b || Bu(y) || x !== null && x < 0) {
8316
+ x !== null && x < 0 && (ee = !0);
8317
+ continue;
8318
+ }
8319
+ if (ee) {
8320
+ if (x === null) continue;
8321
+ ee = !1;
8322
+ }
8323
+ if (Hu(y)) {
8324
+ if (!m[e + 1]) break;
8325
+ continue;
8326
+ }
8327
+ if (x === null) l.length === 0 || c && u.length === 0 ? l.push({
8328
+ texte: y,
8329
+ html: v
8330
+ }) : u.push({
8331
+ texte: y,
8332
+ html: v
8333
+ }), c && l.length >= 2 && (c = !1);
8334
+ else {
8335
+ if (S === "ExposeMotifs" && (p = !0), S !== "ExposeMotifs" && p && h.closest(".assnatSection2").length > 0) {
8336
+ u.push({
8337
+ texte: y,
8338
+ html: v
8339
+ });
8340
+ continue;
8383
8341
  }
8342
+ for (o = x, l.length > 0 && i.push({
8343
+ id: `D_${Ru(l[0]?.texte ?? "")}`,
8344
+ type: s ?? "",
8345
+ niveau: o + 1,
8346
+ niveauRelatif: a.length,
8347
+ titres: l,
8348
+ alineas: u
8349
+ }); a.length > 0 && o < a[a.length - 1];) a.pop();
8350
+ (a.length === 0 || o > a[a.length - 1]) && a.push(o), s = S, l = [{
8351
+ texte: y,
8352
+ html: v
8353
+ }], u = [], c = !b.match(/^ARTICLES?(_|$)/) && !b.match(/^EXPOSE_DES_MOTIFS$/);
8384
8354
  }
8385
8355
  }
8386
8356
  l.length > 0 && i.push({
@@ -8391,19 +8361,19 @@ function Uu(e, t) {
8391
8361
  titres: l,
8392
8362
  alineas: u
8393
8363
  });
8394
- let m = /* @__PURE__ */ new Map();
8364
+ let g = /* @__PURE__ */ new Map();
8395
8365
  for (let e of i) for (let t of [...e.titres || [], ...e.alineas || []]) {
8396
8366
  if (!t.html?.includes("#_ftn") && !t.html?.includes("Footnote")) continue;
8397
8367
  let n = Nu(t.html, null, !1);
8398
8368
  n(".assnatFootnote, .assNatFootnote, a[href^=\"#_ftn\"]:not([href^=\"#_ftnref\"])").each((t, r) => {
8399
8369
  let i = n(r).text().match(/(\d+)/);
8400
- i && !m.has(i[1]) && m.set(i[1], e);
8370
+ i && !g.has(i[1]) && g.set(i[1], e);
8401
8371
  });
8402
8372
  }
8403
8373
  for (let e of d) {
8404
8374
  let t = e.texte?.match(/^[\s([]*(\d+)[\s)\]]*/), n = !1;
8405
8375
  if (t) {
8406
- let r = t[1], i = m.get(r);
8376
+ let r = t[1], i = g.get(r);
8407
8377
  i && (i.alineas?.push(e), n = !0);
8408
8378
  }
8409
8379
  if (!n) {
@@ -8418,7 +8388,7 @@ function Uu(e, t) {
8418
8388
  }
8419
8389
  //#endregion
8420
8390
  //#region node_modules/date-fns/formatISO.js
8421
- function Wu(e, t) {
8391
+ function Gu(e, t) {
8422
8392
  let n = i(e, t?.in);
8423
8393
  if (isNaN(+n)) throw RangeError("Invalid time value");
8424
8394
  let a = t?.format ?? "extended", o = t?.representation ?? "complete", s = "", c = "", l = a === "extended" ? "-" : "", u = a === "extended" ? ":" : "";
@@ -8443,32 +8413,32 @@ function Wu(e, t) {
8443
8413
  }
8444
8414
  //#endregion
8445
8415
  //#region src/parsers/recherche_amendements.ts
8446
- var Gu = /* @__PURE__ */ RegExp("^(\\ufeff?(= yaml =|---)$[\\s\\S]*?^(?:\\2|\\.\\.\\.)\\s*$(?:\\r?\\n)?)", "m");
8447
- function Ku(e) {
8448
- return e.replace(Gu, "");
8416
+ var Ku = /* @__PURE__ */ RegExp("^(\\ufeff?(= yaml =|---)$[\\s\\S]*?^(?:\\2|\\.\\.\\.)\\s*$(?:\\r?\\n)?)", "m");
8417
+ function qu(e) {
8418
+ return e.replace(Ku, "");
8449
8419
  }
8450
- async function* qu(e, t, r, i, o, s = {}) {
8451
- for await (let [c, l] of Ju(e, t, r, i, o, s)) a(l), yield [c, n.toAmendement(JSON.stringify(l))];
8420
+ async function* Ju(e, t, r, i, o, s = {}) {
8421
+ for await (let [c, l] of Yu(e, t, r, i, o, s)) a(l), yield [c, n.toAmendement(JSON.stringify(l))];
8452
8422
  }
8453
- async function* Ju(n, r, i, a, f, p = {}) {
8423
+ async function* Yu(n, r, i, a, f, p = {}) {
8454
8424
  await s.ensureDir(n), o.strictEqual(/[?&]date_depot=/.exec(r), null, `URL ${r} already contains a deposit date`), o.strictEqual(/[?&]order=/.exec(r), null, `URL ${r} already contains a sort order`), o.strictEqual(/[?&]page=/.exec(r), null, `URL ${r} already contains a page number`), i && o.notStrictEqual(/[?&]etat=/.exec(r), null, `In incremental mode, URL ${r} must contain an "etat" query parameter`), r += (r.includes("?") ? "&" : "?") + "order=date_depot,desc&page=1", a != null && o.notStrictEqual(/\d{4}-\d{2}-\d{2}/.exec(a), null, `Invalid format for minimum date: ${a}`);
8455
- let m = 0;
8425
+ let ee = 0;
8456
8426
  iterSearchPages: for (;;) {
8457
8427
  p.verbose && console.log(`Fetching amendements search page at ${r}…`);
8458
- let h = await fetch(r);
8459
- o(h.ok, `Retrieval of search page at ${r} failed with error: ${h.status} ${h.statusText}`);
8460
- let g = d(await h.text());
8428
+ let m = await fetch(r);
8429
+ o(m.ok, `Retrieval of search page at ${r} failed with error: ${m.status} ${m.statusText}`);
8430
+ let h = await m.text(), g = d(h);
8461
8431
  if (g.querySelector("div.no-result") !== null) break;
8462
8432
  let _ = g.querySelector("div.mirror-card-subtitle");
8463
8433
  o.notStrictEqual(_, null);
8464
8434
  let v = parseInt(/\d+/.exec(_.text)[0]), y = g.querySelector("div.amendement-list--results-table");
8465
8435
  o.notStrictEqual(y, null);
8466
- let ee = y.querySelector("table");
8467
- o.notStrictEqual(ee, null);
8468
- let te = ee.querySelector("tfoot > tr");
8469
- o.notStrictEqual(te, null);
8470
- let b = te.querySelectorAll("td, th").map((e) => e.text);
8471
- o(l(b, [
8436
+ let b = y.querySelector("table");
8437
+ o.notStrictEqual(b, null);
8438
+ let x = b.querySelector("tfoot > tr");
8439
+ o.notStrictEqual(x, null);
8440
+ let S = x.querySelectorAll("td, th").map((e) => e.text);
8441
+ o(l(S, [
8472
8442
  "",
8473
8443
  "n°",
8474
8444
  "Dossier législatif",
@@ -8480,66 +8450,66 @@ async function* Ju(n, r, i, a, f, p = {}) {
8480
8450
  "Examiné par",
8481
8451
  "Texte visé",
8482
8452
  "Date de dépôt"
8483
- ]), `Unexpected columns in ${JSON.stringify(b, null, 2)}`);
8484
- let ne = ee.querySelectorAll("tbody > tr");
8485
- o.notStrictEqual(ne.length, 0);
8486
- for (let l of ne) {
8487
- if (m++, a != null || f != null) {
8453
+ ]), `Unexpected columns in ${JSON.stringify(S, null, 2)}`);
8454
+ let te = b.querySelectorAll("tbody > tr");
8455
+ o.notStrictEqual(te.length, 0);
8456
+ for (let l of te) {
8457
+ if (ee++, a != null || f != null) {
8488
8458
  let n = l.querySelectorAll("td");
8489
8459
  if (o.strictEqual(n.length, 11, `Unexpected number of columns in amendment row: ${l.outerHTML}`), a != null) {
8490
8460
  let r = n[10];
8491
- if (Wu(t(r.text, "d MMMM y", /* @__PURE__ */ new Date(), { locale: e }), { representation: "date" }) < a) break iterSearchPages;
8461
+ if (Gu(t(r.text, "d MMMM y", /* @__PURE__ */ new Date(), { locale: e }), { representation: "date" }) < a) break iterSearchPages;
8492
8462
  }
8493
8463
  if (f != null) {
8494
8464
  let r = n[7];
8495
- if (r.text && Wu(t(r.text, "d MMMM y", /* @__PURE__ */ new Date(), { locale: e }), { representation: "date" }) < f) continue;
8465
+ if (r.text && Gu(t(r.text, "d MMMM y", /* @__PURE__ */ new Date(), { locale: e }), { representation: "date" }) < f) continue;
8496
8466
  }
8497
8467
  }
8498
- let h = l.getAttribute("data-href");
8499
- o.notStrictEqual(h, void 0);
8500
- let g = h.split("/");
8501
- o.strictEqual(g[0], "", `Unexpected URL path for amendement: ${h}`), o.strictEqual(g[1], "dyn", `Unexpected URL path for amendement: ${h}`);
8502
- let _ = c.join(n, ...g.slice(2)) + ".html";
8503
- await s.ensureDir(c.dirname(_));
8504
- let y = await s.pathExists(_) ? await s.readFile(_, "utf8") : null, ee = l.outerHTML, te = `---\n${u.dump({
8505
- position: v - m,
8468
+ let m = l.getAttribute("data-href");
8469
+ o.notStrictEqual(m, void 0);
8470
+ let h = m.split("/");
8471
+ o.strictEqual(h[0], "", `Unexpected URL path for amendement: ${m}`), o.strictEqual(h[1], "dyn", `Unexpected URL path for amendement: ${m}`);
8472
+ let g = c.join(n, ...h.slice(2)) + ".html";
8473
+ await s.ensureDir(c.dirname(g));
8474
+ let _ = await s.pathExists(g) ? await s.readFile(g, "utf8") : null, y = l.outerHTML, b = `---\n${u.dump({
8475
+ position: v - ee,
8506
8476
  search: r.replace(/&page=[\d]+/, "")
8507
- }, { sortKeys: !0 })}---\n\n${ee}`;
8508
- if (te === y) {
8477
+ }, { sortKeys: !0 })}---\n\n${y}`;
8478
+ if (b === _) {
8509
8479
  if (i) break iterSearchPages;
8510
8480
  continue;
8511
8481
  }
8512
- if (y !== null && Ku(y) === ee) continue;
8513
- p.verbose && console.log(y === null ? `Adding amendement search cache: ${_}…` : `Updating amendement search cache: ${_}…`);
8514
- let b = new URL(h, "https://www.assemblee-nationale.fr/").toString(), ne = await fetch(b);
8515
- if (ne.status === 404) {
8516
- console.log(`Amendement HTML page not found at ${b}. Skipping.`);
8482
+ if (_ !== null && qu(_) === y) continue;
8483
+ p.verbose && console.log(_ === null ? `Adding amendement search cache: ${g}…` : `Updating amendement search cache: ${g}…`);
8484
+ let x = new URL(m, "https://www.assemblee-nationale.fr/").toString(), S = await fetch(x);
8485
+ if (S.status === 404) {
8486
+ console.log(`Amendement HTML page not found at ${x}. Skipping.`);
8517
8487
  continue;
8518
8488
  }
8519
- o(ne.ok, `Retrieval of amendement HTML page at ${b} failed with error: ${ne.status} ${ne.statusText}`);
8520
- let re = d(await ne.text()).querySelectorAll("li.mirror-card-header--options--content--item");
8521
- o.notStrictEqual(re.length, 0);
8522
- let x = re.find((e) => {
8489
+ o(S.ok, `Retrieval of amendement HTML page at ${x} failed with error: ${S.status} ${S.statusText}`);
8490
+ let te = await S.text(), ne = d(te).querySelectorAll("li.mirror-card-header--options--content--item");
8491
+ o.notStrictEqual(ne.length, 0);
8492
+ let re = ne.find((e) => {
8523
8493
  let t = e.querySelector("a > span");
8524
8494
  return o.notStrictEqual(t, null, `No <span> in <a> found in ${e.toString()}`), t.text === "Version JSON";
8525
8495
  });
8526
- o.notStrictEqual(x, void 0, `No JSON version found for amendement at ${b}`);
8527
- let ie = x.querySelector("a");
8528
- o.notStrictEqual(ie, null, `No <a> found in ${x.toString()}`);
8496
+ o.notStrictEqual(re, void 0, `No JSON version found for amendement at ${x}`);
8497
+ let ie = re.querySelector("a");
8498
+ o.notStrictEqual(ie, null, `No <a> found in ${re.toString()}`);
8529
8499
  let ae = ie.getAttribute("href");
8530
- o.notStrictEqual(ae, void 0, `No URL found for JSON version of amendement: ${x.toString()}`);
8500
+ o.notStrictEqual(ae, void 0, `No URL found for JSON version of amendement: ${re.toString()}`);
8531
8501
  let oe = new URL(ae, "https://www.assemblee-nationale.fr/").toString(), se = await fetch(oe);
8532
- o(se.ok, `Retrieval of amendement JSON page at ${oe} failed with error: ${se.status} ${se.statusText}`), yield [h, await se.json()], await s.writeFile(_, te, "utf8");
8502
+ o(se.ok, `Retrieval of amendement JSON page at ${oe} failed with error: ${se.status} ${se.statusText}`), yield [m, await se.json()], await s.writeFile(g, b, "utf8");
8533
8503
  }
8534
- let re = g.querySelector("div.an-pagination--item > i.an-icons-chevron-right ~ a");
8535
- if (re === null) break;
8536
- let x = re.getAttribute("href");
8537
- o.notStrictEqual(x, void 0), r = new URL(x, "https://www.assemblee-nationale.fr/").toString();
8504
+ let ne = g.querySelector("div.an-pagination--item > i.an-icons-chevron-right ~ a");
8505
+ if (ne === null) break;
8506
+ let re = ne.getAttribute("href");
8507
+ o.notStrictEqual(re, void 0), r = new URL(re, "https://www.assemblee-nationale.fr/").toString();
8538
8508
  }
8539
8509
  }
8540
8510
  //#endregion
8541
8511
  //#region src/parsers/plf/parser_utils.ts
8542
- function Yu(e) {
8512
+ function Xu(e) {
8543
8513
  return e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-zA-Z0-9]/g, "_").replace(/_+/g, "_").replace(/^_|_$/g, "").toUpperCase();
8544
8514
  }
8545
8515
  function $(e) {
@@ -8548,7 +8518,7 @@ function $(e) {
8548
8518
  html: Q(e.html())
8549
8519
  };
8550
8520
  }
8551
- function Xu(e, t, n, r) {
8521
+ function Zu(e, t, n, r) {
8552
8522
  return {
8553
8523
  id: e,
8554
8524
  type: t,
@@ -8558,10 +8528,10 @@ function Xu(e, t, n, r) {
8558
8528
  alineas: []
8559
8529
  };
8560
8530
  }
8561
- function Zu(e) {
8531
+ function Qu(e) {
8562
8532
  return /états\s+l[ée]gislatifs\s+annex/i.test(e);
8563
8533
  }
8564
- function Qu(e) {
8534
+ function $u(e) {
8565
8535
  return {
8566
8536
  texte: Fu(e),
8567
8537
  html: e.prop("outerHTML") || ""
@@ -8569,100 +8539,100 @@ function Qu(e) {
8569
8539
  }
8570
8540
  //#endregion
8571
8541
  //#region src/parsers/plf/depot.ts
8572
- var $u = [
8542
+ var ed = [
8573
8543
  "Partie",
8574
8544
  "Titre",
8575
8545
  "Chapitre",
8576
8546
  "Section"
8577
8547
  ];
8578
- function ed(e) {
8548
+ function td(e) {
8579
8549
  let t = Nu(Pu(e)), n = [], r = [], i = "generalExpose", a = null, o = null, s = t("h1, h2, h3, h4, h5, h6, p.assnatFPFexpogentitre1, p.assnatFPFexpogentexte, li.assnatFPFprojetloiartexte, p.assnatFPFfinartexte, table, img").toArray(), c = () => {
8580
8550
  o && (n.push(o), o = null);
8581
8551
  };
8582
8552
  for (let e of s) {
8583
8553
  if (i === "done") break;
8584
- let s = t(e), _ = Q(s.text()), v = td(s), y = v !== null, ee = v !== null && v >= 2 && v <= 5, te = s.hasClass("assnatFPFexpogentitre1"), b = s.hasClass("assnatFPFexpogentexte"), ne = s.hasClass("assnatFPFprojetloiartexte"), re = s.hasClass("assnatFPFfinartexte"), x = s.is("table"), ie = s.is("img"), ae = s.find("img").length > 0;
8585
- if (!(y && _.length === 0)) {
8554
+ let s = t(e), g = Q(s.text()), _ = nd(s), v = _ !== null, y = _ !== null && _ >= 2 && _ <= 5, b = s.hasClass("assnatFPFexpogentitre1"), x = s.hasClass("assnatFPFexpogentexte"), S = s.hasClass("assnatFPFprojetloiartexte"), te = s.hasClass("assnatFPFfinartexte"), ne = s.is("table"), re = s.is("img"), ie = s.find("img").length > 0;
8555
+ if (!(v && g.length === 0)) {
8586
8556
  if (i === "generalExpose") {
8587
- if (v === 1) {
8588
- let e = _.toLowerCase();
8557
+ if (_ === 1) {
8558
+ let e = g.toLowerCase();
8589
8559
  if (e.includes("articles du projet de loi")) {
8590
8560
  a && n.push(a), a = null, i = "hierarchy";
8591
8561
  continue;
8592
8562
  }
8593
- e.includes("exposé général des motifs") && (a ?? (a = Xu("D_EXPOSE", "Exposé des motifs", 1, 1)));
8563
+ e.includes("exposé général des motifs") && (a ?? (a = Zu("D_EXPOSE", "Exposé des motifs", 1, 1)));
8594
8564
  }
8595
- if (ee && (a && n.push(a), a = null, i = "hierarchy"), a) {
8596
- if (ie) {
8597
- let e = id(s);
8565
+ if (y && (a && n.push(a), a = null, i = "hierarchy"), a) {
8566
+ if (re) {
8567
+ let e = ad(s);
8598
8568
  if (e) {
8599
8569
  var l;
8600
8570
  (l = a).alineas ?? (l.alineas = []), a.alineas.push(e);
8601
8571
  }
8602
- } else if ((v === 1 || v === 6) && _.length > 0) {
8572
+ } else if ((_ === 1 || _ === 6) && g.length > 0) {
8603
8573
  var u;
8604
8574
  (u = a).titres ?? (u.titres = []), a.titres.push($(s));
8605
- } else if (te || b) {
8606
- let e = ae ? nd(s) : $(s);
8575
+ } else if (b || x) {
8576
+ let e = ie ? rd(s) : $(s);
8607
8577
  if (e) {
8608
8578
  var d;
8609
8579
  (d = a).alineas ?? (d.alineas = []), a.alineas.push(e);
8610
8580
  }
8611
- } else if (x) {
8581
+ } else if (ne) {
8612
8582
  var f;
8613
- (f = a).alineas ?? (f.alineas = []), a.alineas.push(Qu(s));
8583
+ (f = a).alineas ?? (f.alineas = []), a.alineas.push($u(s));
8614
8584
  }
8615
8585
  continue;
8616
8586
  }
8617
8587
  }
8618
- if (Zu(_)) {
8588
+ if (Qu(g)) {
8619
8589
  c(), a && (n.push(a), a = null), i = "done";
8620
8590
  continue;
8621
8591
  }
8622
- if (v !== 1) {
8623
- if (ee) {
8592
+ if (_ !== 1) {
8593
+ if (y) {
8624
8594
  c();
8625
- let e = v - 2, t = $u[e];
8595
+ let e = _ - 2, t = ed[e];
8626
8596
  for (; r.length > 0 && r[r.length - 1] >= e;) r.pop();
8627
8597
  r.push(e);
8628
- let a = Xu(`D_${Yu(_)}`, t, e + 1, r.length);
8598
+ let a = Zu(`D_${Xu(g)}`, t, e + 1, r.length);
8629
8599
  a.titres = [$(s)], n.push(a), i = "hierarchy";
8630
8600
  continue;
8631
8601
  }
8632
- if (v === 6) {
8602
+ if (_ === 6) {
8633
8603
  c();
8634
8604
  let e = r.length + 1;
8635
- o = Xu(`D_${Yu(_)}`, "Article", 5, e), o.titres = [$(s)], i = "articleBody";
8605
+ o = Zu(`D_${Xu(g)}`, "Article", 5, e), o.titres = [$(s)], i = "articleBody";
8636
8606
  continue;
8637
8607
  }
8638
- if (ne && i === "articleBody" && o) {
8608
+ if (S && i === "articleBody" && o) {
8639
8609
  var p;
8640
8610
  (p = o).alineas ?? (p.alineas = []), o.alineas.push($(s));
8641
8611
  continue;
8642
8612
  }
8643
- if (x && i === "articleBody" && o) {
8644
- var m;
8645
- (m = o).alineas ?? (m.alineas = []), o.alineas.push(Qu(s));
8613
+ if (ne && i === "articleBody" && o) {
8614
+ var ee;
8615
+ (ee = o).alineas ?? (ee.alineas = []), o.alineas.push($u(s));
8646
8616
  continue;
8647
8617
  }
8648
- if (re && o) {
8618
+ if (te && o) {
8649
8619
  i = "articleExpose";
8650
8620
  continue;
8651
8621
  }
8652
- if (te && i === "articleBody" && o) {
8622
+ if (b && i === "articleBody" && o) {
8653
8623
  i = "articleExpose";
8654
8624
  continue;
8655
8625
  }
8656
8626
  if (i === "articleExpose" && o) {
8657
- if (te) continue;
8658
- if (b) {
8659
- var h;
8660
- (h = o).exposeDesMotifs ?? (h.exposeDesMotifs = []), o.exposeDesMotifs.push($(s));
8627
+ if (b) continue;
8628
+ if (x) {
8629
+ var m;
8630
+ (m = o).exposeDesMotifs ?? (m.exposeDesMotifs = []), o.exposeDesMotifs.push($(s));
8661
8631
  continue;
8662
8632
  }
8663
- if (x) {
8664
- var g;
8665
- (g = o).exposeDesMotifs ?? (g.exposeDesMotifs = []), o.exposeDesMotifs.push(Qu(s));
8633
+ if (ne) {
8634
+ var h;
8635
+ (h = o).exposeDesMotifs ?? (h.exposeDesMotifs = []), o.exposeDesMotifs.push($u(s));
8666
8636
  }
8667
8637
  }
8668
8638
  }
@@ -8670,11 +8640,11 @@ function ed(e) {
8670
8640
  }
8671
8641
  return c(), a && n.push(a), { subdivisions: n };
8672
8642
  }
8673
- function td(e) {
8643
+ function nd(e) {
8674
8644
  for (let t = 1; t <= 6; t++) if (e.is(`h${t}`)) return t;
8675
8645
  return null;
8676
8646
  }
8677
- function nd(e) {
8647
+ function rd(e) {
8678
8648
  let t = e.clone();
8679
8649
  t.find("img").remove();
8680
8650
  let n = Q(t.text());
@@ -8683,14 +8653,14 @@ function nd(e) {
8683
8653
  html: Q(t.html())
8684
8654
  } : null;
8685
8655
  }
8686
- function rd(e) {
8656
+ function id(e) {
8687
8657
  if (!e || !/^\d+$/.test(e)) return;
8688
8658
  let t = Number(e);
8689
8659
  return t > 0 ? t : void 0;
8690
8660
  }
8691
- function id(e) {
8661
+ function ad(e) {
8692
8662
  if (!e.attr("src")) return null;
8693
- let t = rd(e.attr("width")), n = rd(e.attr("height"));
8663
+ let t = id(e.attr("width")), n = id(e.attr("height"));
8694
8664
  return t === 15 && n === 15 || t === 2 && n === 138 ? null : {
8695
8665
  texte: Q(e.attr("alt") ?? ""),
8696
8666
  html: e.prop("outerHTML") || ""
@@ -8698,18 +8668,18 @@ function id(e) {
8698
8668
  }
8699
8669
  //#endregion
8700
8670
  //#region src/parsers/plf/later_stage.ts
8701
- function ad(e) {
8671
+ function od(e) {
8702
8672
  let t = Nu(Pu(e)), n = [], r = [], i = null, a = null, o = null, s = !1, c = t("p.assnat2PartieNum, p.assnat2PartieIntit, p.assnat4TitreNum, p.assnat4TitreNum0, p.assnat4TitreIntit, p.assnat9ArticleNum, p.assnatLoiTexte, p.assnat1TomeNum, table, p.assnat5ChapitreIntit, p.assnat5ChapitreIntit0, p.assnat5ChapitreNum, p.assnat5ChapitreNum0, p.assnat6SectionIntit, p.assnat6SectionIntit0, p.assnat6SectionNum, p.assnat6SectionNum0").toArray();
8703
8673
  for (let e of c) {
8704
8674
  let c = t(e), l = Q(c.text());
8705
- if (l.length === 0 || (!s && Zu(l) && (i && (n.push(i), i = null), s = !0), s)) continue;
8706
- let u = c.hasClass("assnat2PartieNum"), d = c.hasClass("assnat2PartieIntit"), f = c.hasClass("assnat4TitreNum") || c.hasClass("assnat4TitreNum0"), p = c.hasClass("assnat4TitreIntit"), m = c.hasClass("assnat9ArticleNum"), h = c.hasClass("assnatLoiTexte"), g = c.is("table");
8675
+ if (l.length === 0 || (!s && Qu(l) && (i && (n.push(i), i = null), s = !0), s)) continue;
8676
+ let u = c.hasClass("assnat2PartieNum"), d = c.hasClass("assnat2PartieIntit"), f = c.hasClass("assnat4TitreNum") || c.hasClass("assnat4TitreNum0"), p = c.hasClass("assnat4TitreIntit"), ee = c.hasClass("assnat9ArticleNum"), m = c.hasClass("assnatLoiTexte"), h = c.is("table");
8707
8677
  if (d) {
8708
8678
  for (i && (n.push(i), i = null); r.length > 0 && r[r.length - 1] >= 0;) r.pop();
8709
8679
  r.push(0);
8710
- let e = od(a, $(c));
8680
+ let e = sd(a, $(c));
8711
8681
  a = null, o = null;
8712
- let t = Xu(`D_${Yu(e.texte ?? l)}`, "Partie", 1, r.length);
8682
+ let t = Zu(`D_${Xu(e.texte ?? l)}`, "Partie", 1, r.length);
8713
8683
  t.titres = [e], n.push(t);
8714
8684
  continue;
8715
8685
  }
@@ -8720,9 +8690,9 @@ function ad(e) {
8720
8690
  if (p) {
8721
8691
  for (i && (n.push(i), i = null); r.length > 0 && r[r.length - 1] >= 1;) r.pop();
8722
8692
  r.push(1);
8723
- let e = od(o, $(c));
8693
+ let e = sd(o, $(c));
8724
8694
  o = null;
8725
- let t = Xu(`D_${Yu(e.texte ?? l)}`, "Titre", 2, r.length);
8695
+ let t = Zu(`D_${Xu(e.texte ?? l)}`, "Titre", 2, r.length);
8726
8696
  t.titres = [e], n.push(t);
8727
8697
  continue;
8728
8698
  }
@@ -8730,35 +8700,35 @@ function ad(e) {
8730
8700
  o = $(c);
8731
8701
  continue;
8732
8702
  }
8733
- if (m) {
8703
+ if (ee) {
8734
8704
  i && n.push(i);
8735
8705
  let e = r.length + 1;
8736
- i = Xu(`D_${Yu(l)}`, "Article", 5, e), i.titres = [$(c)];
8706
+ i = Zu(`D_${Xu(l)}`, "Article", 5, e), i.titres = [$(c)];
8737
8707
  continue;
8738
8708
  }
8739
- if (h) {
8709
+ if (m) {
8740
8710
  let e = c.prop("outerHTML") || "";
8741
8711
  if (e = e.replace(/[\r\n\t]/g, " ").trim(), /text-align:\s*center/.test(e) && /font-weight:\s*bold/.test(e)) {
8742
8712
  i && (n.push(i), i = null);
8743
8713
  let e = /^chapitre\b/i.test(l), t = /^section\b/i.test(l), a = /^[IVXLCDM]+[.\s]/.test(l), o = /^[A-Z][.\s]/.test(l), s = e || !t && a, u = s ? "Chapitre" : t || !e && o ? "Section" : "Chapitre", d = s ? 2 : 3;
8744
8714
  for (; r.length > 0 && r[r.length - 1] >= d;) r.pop();
8745
8715
  r.push(d);
8746
- let f = Xu(`D_${Yu(l)}`, u, d + 1, r.length);
8716
+ let f = Zu(`D_${Xu(l)}`, u, d + 1, r.length);
8747
8717
  f.titres = [$(c)], n.push(f);
8748
8718
  continue;
8749
8719
  }
8750
8720
  i && (i.alineas = i.alineas || [], i.alineas.push($(c)));
8751
8721
  continue;
8752
8722
  }
8753
- if (g && i) {
8754
- i.alineas = i.alineas || [], i.alineas.push(Qu(c));
8723
+ if (h && i) {
8724
+ i.alineas = i.alineas || [], i.alineas.push($u(c));
8755
8725
  continue;
8756
8726
  }
8757
8727
  (/assnat5Chapitre(Intit|Num)/.test(c.attr("class") ?? "") || /assnat6Section(Intit|Num)/.test(c.attr("class") ?? "")) && i && (i.alineas = i.alineas || [], i.alineas.push($(c)));
8758
8728
  }
8759
8729
  return i && n.push(i), { subdivisions: n };
8760
8730
  }
8761
- function od(e, t) {
8731
+ function sd(e, t) {
8762
8732
  return e === null ? t : {
8763
8733
  texte: `${e.texte} : ${t.texte}`,
8764
8734
  html: `${e.html} : ${t.html}`
@@ -8766,20 +8736,20 @@ function od(e, t) {
8766
8736
  }
8767
8737
  //#endregion
8768
8738
  //#region src/parsers/plf/variant_detection.ts
8769
- var sd = [
8739
+ var cd = [
8770
8740
  "assnatFPFexpogentexte",
8771
8741
  "assnatFPFexpogentitre1",
8772
8742
  "assnatFPFexpogentitre2",
8773
8743
  "assnatFPFexpogentitre3",
8774
8744
  "assnatFPFexpogentitre4"
8775
8745
  ];
8776
- function cd(e) {
8746
+ function ld(e) {
8777
8747
  let t = Nu(Pu(e));
8778
- return t("h1, h2, h3, h4, h5, h6").toArray().some((e) => Q(t(e).text()).normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().includes("expose general des motifs")) || t(sd.map((e) => `.${e}`).join(", ")).length > 0 ? "depot" : "laterStage";
8748
+ return t("h1, h2, h3, h4, h5, h6").toArray().some((e) => Q(t(e).text()).normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().includes("expose general des motifs")) || t(cd.map((e) => `.${e}`).join(", ")).length > 0 ? "depot" : "laterStage";
8779
8749
  }
8780
8750
  //#endregion
8781
8751
  //#region src/parsers/plf/credits.ts
8782
- var ld = {
8752
+ var ud = {
8783
8753
  bg: {
8784
8754
  budgetType: "budgetGeneral",
8785
8755
  libelle: "Budget général"
@@ -8797,15 +8767,15 @@ var ld = {
8797
8767
  libelle: "Comptes de concours financiers"
8798
8768
  }
8799
8769
  };
8800
- function ud(e) {
8770
+ function dd(e) {
8801
8771
  if (!e) return [];
8802
- let t = Nu(Pu(e)), n = gd(t);
8772
+ let t = Nu(Pu(e)), n = _d(t);
8803
8773
  if (n.length === 0) return [];
8804
8774
  let r = [];
8805
8775
  for (let e of n) {
8806
8776
  let n = [], i;
8807
8777
  for (let r of e.tableEls) {
8808
- let e = md(t, r);
8778
+ let e = hd(t, r);
8809
8779
  n.push(...e.missions), e.total && (i = e.total);
8810
8780
  }
8811
8781
  n.length !== 0 && r.push({
@@ -8820,7 +8790,7 @@ function ud(e) {
8820
8790
  }
8821
8791
  return r;
8822
8792
  }
8823
- function dd(e) {
8793
+ function fd(e) {
8824
8794
  let t = Q(e).replace(/[\u2212\u2011]/g, "-").replace(/\s/g, "").replace(/[^0-9,.-]/g, ""), n = (t.match(/,/g) ?? []).length;
8825
8795
  if (n > 1) return;
8826
8796
  let r = n === 1 ? t.replace(/\./g, "").replace(",", ".") : t;
@@ -8828,23 +8798,23 @@ function dd(e) {
8828
8798
  let i = Number(r);
8829
8799
  return Number.isNaN(i) ? void 0 : i;
8830
8800
  }
8831
- function fd(e) {
8801
+ function pd(e) {
8832
8802
  let t = Q(e);
8833
8803
  if (!/\(\s*ligne\s+supprim(?:ée|ee)\s*\)\s*$/i.test(t)) return t.replace(/\s*\(\s*ligne\s+nouvelle\s*\)\s*$/i, "").trim();
8834
8804
  }
8835
- function pd(e, t) {
8836
- let n = dd(t(e[1]).text()), r = dd(t(e[2]).text());
8805
+ function md(e, t) {
8806
+ let n = fd(t(e[1]).text()), r = fd(t(e[2]).text());
8837
8807
  return e.length >= 5 ? {
8838
8808
  autorisationEngagement: n,
8839
8809
  creditPaiement: r,
8840
- autorisationEngagementAnnule: dd(t(e[3]).text()),
8841
- creditPaiementAnnule: dd(t(e[4]).text())
8810
+ autorisationEngagementAnnule: fd(t(e[3]).text()),
8811
+ creditPaiementAnnule: fd(t(e[4]).text())
8842
8812
  } : {
8843
8813
  autorisationEngagement: n,
8844
8814
  creditPaiement: r
8845
8815
  };
8846
8816
  }
8847
- function md(e, t) {
8817
+ function hd(e, t) {
8848
8818
  let n = [], r = null, i = null, a, o = e(t).find("tbody tr").toArray(), s = o.some((t) => {
8849
8819
  let n = (e(t).find("td").first().attr("style") || "").replace(/[\n\t]/g, " ");
8850
8820
  return /border-top/.test(n);
@@ -8854,7 +8824,7 @@ function md(e, t) {
8854
8824
  if (o.length < 3) continue;
8855
8825
  let c = e(o[0]), l = (c.attr("style") || "").replace(/[\n\t]/g, " "), u = Q(c.text());
8856
8826
  if (!u) continue;
8857
- let d = /^total/i.test(u), f = pd(o, e);
8827
+ let d = /^total/i.test(u), f = md(o, e);
8858
8828
  if (d) {
8859
8829
  a = f;
8860
8830
  continue;
@@ -8868,7 +8838,7 @@ function md(e, t) {
8868
8838
  }
8869
8839
  if (s ? /border-top/.test(l) : /border-bottom/.test(l)) {
8870
8840
  r && n.push(r);
8871
- let e = fd(c.text());
8841
+ let e = pd(c.text());
8872
8842
  if (e === void 0) {
8873
8843
  r = null, i = null;
8874
8844
  continue;
@@ -8882,7 +8852,7 @@ function md(e, t) {
8882
8852
  continue;
8883
8853
  }
8884
8854
  if (r) {
8885
- let e = fd(c.text());
8855
+ let e = pd(c.text());
8886
8856
  if (e === void 0) {
8887
8857
  i = null;
8888
8858
  continue;
@@ -8898,11 +8868,11 @@ function md(e, t) {
8898
8868
  total: a
8899
8869
  };
8900
8870
  }
8901
- function hd(e, t) {
8871
+ function gd(e, t) {
8902
8872
  let n = e(t).find("tr").slice(0, 3).find("th, td").toArray().map((t) => Q(e(t).text()).toLocaleLowerCase("fr"));
8903
8873
  return n.some((e) => e.includes("mission / programme")) && n.some((e) => e.includes("autorisation") && e.includes("engagement")) && n.some((e) => e.includes("crédit") && e.includes("paiement"));
8904
8874
  }
8905
- function gd(e) {
8875
+ function _d(e) {
8906
8876
  let t, n, r = !1, i = /* @__PURE__ */ new Map(), a = e("p, h1, h2, h3, h4, h5, h6, a:not([href]), table").toArray().filter((t) => e(t).parents("table").length === 0);
8907
8877
  for (let o of a) {
8908
8878
  let a = e(o);
@@ -8922,7 +8892,7 @@ function gd(e) {
8922
8892
  o !== /COMPTES\s+DE\s+CONCOURS\s+FINANCIERS/i.test(e) && (n = o ? "cas" : "ccf");
8923
8893
  continue;
8924
8894
  }
8925
- if (!hd(e, o)) continue;
8895
+ if (!gd(e, o)) continue;
8926
8896
  let s = t === "B" ? "bg" : t === "C" ? "ba" : t === "D" ? n : void 0;
8927
8897
  if (!s) continue;
8928
8898
  r = !0;
@@ -8932,7 +8902,7 @@ function gd(e) {
8932
8902
  continue;
8933
8903
  }
8934
8904
  i.set(s, {
8935
- ...ld[s],
8905
+ ...ud[s],
8936
8906
  tableEls: [o]
8937
8907
  });
8938
8908
  }
@@ -8940,8 +8910,8 @@ function gd(e) {
8940
8910
  }
8941
8911
  //#endregion
8942
8912
  //#region src/parsers/plf/index.ts
8943
- function _d(e) {
8944
- return e ? cd(e) === "depot" ? ed(e) : ad(e) : { subdivisions: [] };
8913
+ function vd(e) {
8914
+ return e ? ld(e) === "depot" ? td(e) : od(e) : { subdivisions: [] };
8945
8915
  }
8946
8916
  //#endregion
8947
- export { qu as iterRechercheAmendements, Ju as iterRechercheRawAmendements, _d as parsePlf, ud as parsePlfCredits, Uu as parseTexte };
8917
+ export { Ju as iterRechercheAmendements, Yu as iterRechercheRawAmendements, vd as parsePlf, dd as parsePlfCredits, Wu as parseTexte };