mark-deco-cli 0.8.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +877 -790
- package/dist/cli.cjs.map +1 -1
- package/package.json +10 -9
package/dist/cli.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
2
3
|
/*!
|
|
3
4
|
* name: mark-deco-cli
|
|
4
|
-
* version: 0.
|
|
5
|
+
* version: 0.12.0
|
|
5
6
|
* description: Command-line interface for mark-deco Markdown to HTML conversion processor
|
|
6
7
|
* author: Kouji Matsui (@kekyo@mi.kekyo.net)
|
|
7
8
|
* license: MIT
|
|
8
9
|
* repository.url: https://github.com/kekyo/mark-deco.git
|
|
9
|
-
* git.commit.hash:
|
|
10
|
+
* git.commit.hash: aff53ffd52269533e39dd1090efe8b582e087d53
|
|
10
11
|
*/
|
|
11
|
-
"use strict";
|
|
12
12
|
const commander = require("commander");
|
|
13
13
|
const promises = require("fs/promises");
|
|
14
14
|
const path$1 = require("path");
|
|
@@ -4338,7 +4338,7 @@ function requireJs() {
|
|
|
4338
4338
|
return js$1.exports;
|
|
4339
4339
|
}
|
|
4340
4340
|
var jsExports = requireJs();
|
|
4341
|
-
const
|
|
4341
|
+
const ot$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsExports);
|
|
4342
4342
|
const htmlVoidElements = [
|
|
4343
4343
|
"area",
|
|
4344
4344
|
"base",
|
|
@@ -21417,12 +21417,12 @@ var load = loader.load;
|
|
|
21417
21417
|
var dump = dumper.dump;
|
|
21418
21418
|
/*!
|
|
21419
21419
|
* name: mark-deco
|
|
21420
|
-
* version: 0.
|
|
21420
|
+
* version: 0.12.0
|
|
21421
21421
|
* description: Flexible Markdown to HTML conversion library
|
|
21422
21422
|
* author: Kouji Matsui (@kekyo@mi.kekyo.net)
|
|
21423
21423
|
* license: MIT
|
|
21424
21424
|
* repository.url: https://github.com/kekyo/mark-deco.git
|
|
21425
|
-
* git.commit.hash:
|
|
21425
|
+
* git.commit.hash: aff53ffd52269533e39dd1090efe8b582e087d53
|
|
21426
21426
|
*/
|
|
21427
21427
|
const qd = (e) => {
|
|
21428
21428
|
try {
|
|
@@ -21460,12 +21460,12 @@ const qd = (e) => {
|
|
|
21460
21460
|
}, Ys = () => "width: 100%; height: auto; display: block; object-fit: contain; object-position: center;", ou = (e, t, u, r) => {
|
|
21461
21461
|
const a = Ys(), i = "", n = r ? ` ${r}` : "";
|
|
21462
21462
|
return `<img src="${e}" alt="${t}"${i} style="${a}"${n} />`;
|
|
21463
|
-
}, At = (e, t, u, r, a) => {
|
|
21463
|
+
}, At$1 = (e, t, u, r, a) => {
|
|
21464
21464
|
const i = ou(e, t, r, a);
|
|
21465
21465
|
return `<div class="${u}">
|
|
21466
21466
|
${i}
|
|
21467
21467
|
</div>`;
|
|
21468
|
-
}, vt
|
|
21468
|
+
}, vt = (e) => {
|
|
21469
21469
|
if (e instanceof TypeError) {
|
|
21470
21470
|
const t = e.message.toLowerCase();
|
|
21471
21471
|
return t.includes("cors") || t.includes("network") || t.includes("fetch");
|
|
@@ -21587,12 +21587,12 @@ const qd = (e) => {
|
|
|
21587
21587
|
if (h) {
|
|
21588
21588
|
const m = h[0].match(/href=['"]([^'"]+)['"]/i);
|
|
21589
21589
|
if (m && m[1]) {
|
|
21590
|
-
const f = m[1], T = $s(f),
|
|
21591
|
-
return u.info("getOEmbedUrl: Discovered oEmbed endpoint:",
|
|
21590
|
+
const f = m[1], T = $s(f), A = new URL(T, e).toString();
|
|
21591
|
+
return u.info("getOEmbedUrl: Discovered oEmbed endpoint:", A), A;
|
|
21592
21592
|
}
|
|
21593
21593
|
}
|
|
21594
21594
|
} catch (c) {
|
|
21595
|
-
vt
|
|
21595
|
+
vt(c) ? u.debug(
|
|
21596
21596
|
"getOEmbedUrl: Discovery blocked by CORS restrictions for",
|
|
21597
21597
|
e
|
|
21598
21598
|
) : u.warn("getOEmbedUrl: Discovery failed for", e, ":", c);
|
|
@@ -21613,15 +21613,15 @@ const qd = (e) => {
|
|
|
21613
21613
|
m.signal = i ? Tr(i, f) : f;
|
|
21614
21614
|
const T = await fetch(n, m);
|
|
21615
21615
|
if (T.status >= 300 && T.status < 400) {
|
|
21616
|
-
const
|
|
21617
|
-
if (
|
|
21618
|
-
n = new URL(
|
|
21616
|
+
const A = T.headers.get("location");
|
|
21617
|
+
if (A) {
|
|
21618
|
+
n = new URL(A, n).toString(), c++;
|
|
21619
21619
|
continue;
|
|
21620
21620
|
}
|
|
21621
21621
|
}
|
|
21622
21622
|
break;
|
|
21623
21623
|
} catch (h) {
|
|
21624
|
-
return vt
|
|
21624
|
+
return vt(h) ? a.debug(
|
|
21625
21625
|
"resolveRedirects: Browser CORS restrictions prevent redirect resolution for URL:",
|
|
21626
21626
|
n
|
|
21627
21627
|
) : a.warn(
|
|
@@ -21663,7 +21663,7 @@ const Gd = async (e, t, u, r, a) => {
|
|
|
21663
21663
|
);
|
|
21664
21664
|
return i.info("fetchOEmbedData: Parsed JSON data:", T), T.web_page || (T.web_page = h), T;
|
|
21665
21665
|
} catch (h) {
|
|
21666
|
-
throw vt
|
|
21666
|
+
throw vt(h) ? (typeof window < "u" ? i.debug(
|
|
21667
21667
|
"fetchOEmbedData: Browser CORS restrictions block oEmbed API access for URL:",
|
|
21668
21668
|
e
|
|
21669
21669
|
) : i.warn(
|
|
@@ -21745,7 +21745,7 @@ const Gd = async (e, t, u, r, a) => {
|
|
|
21745
21745
|
html: `<div class="oembed-description">${R(e.author_name)}</div>`
|
|
21746
21746
|
}), r.thumbnail !== void 0 && e.thumbnail_url && T.push({
|
|
21747
21747
|
order: r.thumbnail,
|
|
21748
|
-
html: At(
|
|
21748
|
+
html: At$1(
|
|
21749
21749
|
R(e.thumbnail_url),
|
|
21750
21750
|
R(i),
|
|
21751
21751
|
"oembed-thumbnail"
|
|
@@ -21773,8 +21773,8 @@ const Gd = async (e, t, u, r, a) => {
|
|
|
21773
21773
|
</div>`
|
|
21774
21774
|
});
|
|
21775
21775
|
}
|
|
21776
|
-
const
|
|
21777
|
-
|
|
21776
|
+
const A = T.sort((M2, ee2) => M2.order - ee2.order), w = [], v = [];
|
|
21777
|
+
A.forEach((M2) => {
|
|
21778
21778
|
M2.html.includes("oembed-title") || M2.html.includes("oembed-author") || M2.html.includes("oembed-provider") || M2.html.includes("oembed-description") ? w.push(M2.html) : v.push(M2.html);
|
|
21779
21779
|
});
|
|
21780
21780
|
let S = "";
|
|
@@ -21802,7 +21802,7 @@ const Gd = async (e, t, u, r, a) => {
|
|
|
21802
21802
|
html: `<div class="oembed-description">${R(e.author_name)}</div>`
|
|
21803
21803
|
}), r.thumbnail !== void 0 && e.thumbnail_url && m.push({
|
|
21804
21804
|
order: r.thumbnail,
|
|
21805
|
-
html: At(
|
|
21805
|
+
html: At$1(
|
|
21806
21806
|
R(e.thumbnail_url),
|
|
21807
21807
|
R(i),
|
|
21808
21808
|
"oembed-thumbnail"
|
|
@@ -21821,15 +21821,15 @@ const Gd = async (e, t, u, r, a) => {
|
|
|
21821
21821
|
</div>`
|
|
21822
21822
|
});
|
|
21823
21823
|
}
|
|
21824
|
-
const f = m.sort((S, U2) => S.order - U2.order), T = [],
|
|
21824
|
+
const f = m.sort((S, U2) => S.order - U2.order), T = [], A = [];
|
|
21825
21825
|
f.forEach((S) => {
|
|
21826
|
-
S.html.includes("oembed-title") || S.html.includes("oembed-author") || S.html.includes("oembed-provider") || S.html.includes("oembed-description") ? T.push(S.html) :
|
|
21826
|
+
S.html.includes("oembed-title") || S.html.includes("oembed-author") || S.html.includes("oembed-provider") || S.html.includes("oembed-description") ? T.push(S.html) : A.push(S.html);
|
|
21827
21827
|
});
|
|
21828
21828
|
let w = "";
|
|
21829
21829
|
T.length > 0 && (w = `<div class="oembed-header">${T.join("")}</div>`);
|
|
21830
21830
|
let v = "";
|
|
21831
|
-
return
|
|
21832
|
-
${
|
|
21831
|
+
return A.length > 0 && (v = `<div class="oembed-content">
|
|
21832
|
+
${A.join("")}
|
|
21833
21833
|
</div>`), `<div class="oembed-container oembed-video">
|
|
21834
21834
|
${w}
|
|
21835
21835
|
${v}
|
|
@@ -21850,7 +21850,7 @@ const Gd = async (e, t, u, r, a) => {
|
|
|
21850
21850
|
html: `<div class="oembed-description">${R(n)}</div>`
|
|
21851
21851
|
}), r.thumbnail !== void 0 && c && h.push({
|
|
21852
21852
|
order: r.thumbnail,
|
|
21853
|
-
html: At(
|
|
21853
|
+
html: At$1(
|
|
21854
21854
|
R(c),
|
|
21855
21855
|
R(i),
|
|
21856
21856
|
"oembed-thumbnail"
|
|
@@ -21871,11 +21871,11 @@ const Gd = async (e, t, u, r, a) => {
|
|
|
21871
21871
|
m.forEach((v) => {
|
|
21872
21872
|
v.html.includes("oembed-title") || v.html.includes("oembed-author") || v.html.includes("oembed-provider") || v.html.includes("oembed-description") ? f.push(v.html) : T.push(v.html);
|
|
21873
21873
|
});
|
|
21874
|
-
let
|
|
21875
|
-
f.length > 0 && (
|
|
21874
|
+
let A = "";
|
|
21875
|
+
f.length > 0 && (A = `<div class="oembed-header">${f.join("")}</div>`);
|
|
21876
21876
|
let w = "";
|
|
21877
21877
|
return T.length > 0 && (w = `<div class="oembed-content">${T.join("")}</div>`), `<div class="oembed-container oembed-link">
|
|
21878
|
-
${
|
|
21878
|
+
${A}
|
|
21879
21879
|
${w}
|
|
21880
21880
|
</div>`;
|
|
21881
21881
|
}, ta = (e, t) => {
|
|
@@ -21910,14 +21910,14 @@ const Gd = async (e, t, u, r, a) => {
|
|
|
21910
21910
|
} else
|
|
21911
21911
|
return `<div class="oembed-responsive-content">${e}</div>`;
|
|
21912
21912
|
};
|
|
21913
|
-
var L;
|
|
21913
|
+
var L$1;
|
|
21914
21914
|
(function(e) {
|
|
21915
21915
|
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";
|
|
21916
|
-
})(L || (L = {}));
|
|
21916
|
+
})(L$1 || (L$1 = {}));
|
|
21917
21917
|
function aa(e) {
|
|
21918
|
-
return e.type === L.Tag || e.type === L.Script || e.type === L.Style;
|
|
21918
|
+
return e.type === L$1.Tag || e.type === L$1.Script || e.type === L$1.Style;
|
|
21919
21919
|
}
|
|
21920
|
-
const cu = L.Root, gr = L.Text, ia = L.Directive, Ar = L.Comment, na = L.Script, oa = L.Style, zt = L.Tag, ca = L.CDATA, da = L.Doctype;
|
|
21920
|
+
const cu = L$1.Root, gr = L$1.Text, ia = L$1.Directive, Ar = L$1.Comment, na = L$1.Script, oa = L$1.Style, zt = L$1.Tag, ca = L$1.CDATA, da = L$1.Doctype;
|
|
21921
21921
|
class vr {
|
|
21922
21922
|
constructor() {
|
|
21923
21923
|
this.parent = null, this.prev = null, this.next = null, this.startIndex = null, this.endIndex = null;
|
|
@@ -21983,7 +21983,7 @@ class du extends vr {
|
|
|
21983
21983
|
}
|
|
21984
21984
|
class We extends du {
|
|
21985
21985
|
constructor() {
|
|
21986
|
-
super(...arguments), this.type = L.Text;
|
|
21986
|
+
super(...arguments), this.type = L$1.Text;
|
|
21987
21987
|
}
|
|
21988
21988
|
get nodeType() {
|
|
21989
21989
|
return 3;
|
|
@@ -21991,7 +21991,7 @@ class We extends du {
|
|
|
21991
21991
|
}
|
|
21992
21992
|
class hu extends du {
|
|
21993
21993
|
constructor() {
|
|
21994
|
-
super(...arguments), this.type = L.Comment;
|
|
21994
|
+
super(...arguments), this.type = L$1.Comment;
|
|
21995
21995
|
}
|
|
21996
21996
|
get nodeType() {
|
|
21997
21997
|
return 8;
|
|
@@ -21999,7 +21999,7 @@ class hu extends du {
|
|
|
21999
21999
|
}
|
|
22000
22000
|
class lu extends du {
|
|
22001
22001
|
constructor(t, u) {
|
|
22002
|
-
super(u), this.name = t, this.type = L.Directive;
|
|
22002
|
+
super(u), this.name = t, this.type = L$1.Directive;
|
|
22003
22003
|
}
|
|
22004
22004
|
get nodeType() {
|
|
22005
22005
|
return 1;
|
|
@@ -22035,7 +22035,7 @@ class mu extends vr {
|
|
|
22035
22035
|
}
|
|
22036
22036
|
class wr extends mu {
|
|
22037
22037
|
constructor() {
|
|
22038
|
-
super(...arguments), this.type = L.CDATA;
|
|
22038
|
+
super(...arguments), this.type = L$1.CDATA;
|
|
22039
22039
|
}
|
|
22040
22040
|
get nodeType() {
|
|
22041
22041
|
return 4;
|
|
@@ -22043,7 +22043,7 @@ class wr extends mu {
|
|
|
22043
22043
|
}
|
|
22044
22044
|
class Ne extends mu {
|
|
22045
22045
|
constructor() {
|
|
22046
|
-
super(...arguments), this.type = L.Root;
|
|
22046
|
+
super(...arguments), this.type = L$1.Root;
|
|
22047
22047
|
}
|
|
22048
22048
|
get nodeType() {
|
|
22049
22049
|
return 9;
|
|
@@ -22055,7 +22055,7 @@ class pu extends mu {
|
|
|
22055
22055
|
* @param attribs Object mapping attribute names to attribute values.
|
|
22056
22056
|
* @param children Children of the node.
|
|
22057
22057
|
*/
|
|
22058
|
-
constructor(t, u, r = [], a = t === "script" ? L.Script : t === "style" ? L.Style : L.Tag) {
|
|
22058
|
+
constructor(t, u, r = [], a = t === "script" ? L$1.Script : t === "style" ? L$1.Style : L$1.Tag) {
|
|
22059
22059
|
super(r), this.name = t, this.attribs = u, this.type = a;
|
|
22060
22060
|
}
|
|
22061
22061
|
get nodeType() {
|
|
@@ -22087,22 +22087,22 @@ class pu extends mu {
|
|
|
22087
22087
|
function I(e) {
|
|
22088
22088
|
return aa(e);
|
|
22089
22089
|
}
|
|
22090
|
-
function wt
|
|
22091
|
-
return e.type === L.CDATA;
|
|
22090
|
+
function wt(e) {
|
|
22091
|
+
return e.type === L$1.CDATA;
|
|
22092
22092
|
}
|
|
22093
22093
|
function se(e) {
|
|
22094
|
-
return e.type === L.Text;
|
|
22094
|
+
return e.type === L$1.Text;
|
|
22095
22095
|
}
|
|
22096
22096
|
function Nt$1(e) {
|
|
22097
|
-
return e.type === L.Comment;
|
|
22097
|
+
return e.type === L$1.Comment;
|
|
22098
22098
|
}
|
|
22099
22099
|
function Qt$1(e) {
|
|
22100
|
-
return e.type === L.Directive;
|
|
22100
|
+
return e.type === L$1.Directive;
|
|
22101
22101
|
}
|
|
22102
22102
|
function Te(e) {
|
|
22103
|
-
return e.type === L.Root;
|
|
22103
|
+
return e.type === L$1.Root;
|
|
22104
22104
|
}
|
|
22105
|
-
function B
|
|
22105
|
+
function B(e) {
|
|
22106
22106
|
return Object.prototype.hasOwnProperty.call(e, "children");
|
|
22107
22107
|
}
|
|
22108
22108
|
function ze(e, t = false) {
|
|
@@ -22114,7 +22114,7 @@ function ze(e, t = false) {
|
|
|
22114
22114
|
else if (I(e)) {
|
|
22115
22115
|
const r = t ? Mt(e.children) : [], a = new pu(e.name, { ...e.attribs }, r);
|
|
22116
22116
|
r.forEach((i) => i.parent = a), e.namespace != null && (a.namespace = e.namespace), e["x-attribsNamespace"] && (a["x-attribsNamespace"] = { ...e["x-attribsNamespace"] }), e["x-attribsPrefix"] && (a["x-attribsPrefix"] = { ...e["x-attribsPrefix"] }), u = a;
|
|
22117
|
-
} else if (wt
|
|
22117
|
+
} else if (wt(e)) {
|
|
22118
22118
|
const r = t ? Mt(e.children) : [], a = new wr(r);
|
|
22119
22119
|
r.forEach((i) => i.parent = a), u = a;
|
|
22120
22120
|
} else if (Te(e)) {
|
|
@@ -22167,12 +22167,12 @@ class ha {
|
|
|
22167
22167
|
this.options.withEndIndices && (t.endIndex = this.parser.endIndex), this.elementCB && this.elementCB(t);
|
|
22168
22168
|
}
|
|
22169
22169
|
onopentag(t, u) {
|
|
22170
|
-
const r = this.options.xmlMode ? L.Tag : void 0, a = new pu(t, u, void 0, r);
|
|
22170
|
+
const r = this.options.xmlMode ? L$1.Tag : void 0, a = new pu(t, u, void 0, r);
|
|
22171
22171
|
this.addNode(a), this.tagStack.push(a);
|
|
22172
22172
|
}
|
|
22173
22173
|
ontext(t) {
|
|
22174
22174
|
const { lastNode: u } = this;
|
|
22175
|
-
if (u && u.type === L.Text)
|
|
22175
|
+
if (u && u.type === L$1.Text)
|
|
22176
22176
|
u.data += t, this.options.withEndIndices && (u.endIndex = this.parser.endIndex);
|
|
22177
22177
|
else {
|
|
22178
22178
|
const r = new We(t);
|
|
@@ -22180,7 +22180,7 @@ class ha {
|
|
|
22180
22180
|
}
|
|
22181
22181
|
}
|
|
22182
22182
|
oncomment(t) {
|
|
22183
|
-
if (this.lastNode && this.lastNode.type === L.Comment) {
|
|
22183
|
+
if (this.lastNode && this.lastNode.type === L$1.Comment) {
|
|
22184
22184
|
this.lastNode.data += t;
|
|
22185
22185
|
return;
|
|
22186
22186
|
}
|
|
@@ -22462,20 +22462,20 @@ function Ir(e, t) {
|
|
|
22462
22462
|
return xt$1(e, t);
|
|
22463
22463
|
}
|
|
22464
22464
|
function ya(e, t) {
|
|
22465
|
-
return B
|
|
22465
|
+
return B(e) ? e.children.map((u) => Ir(u, t)).join("") : "";
|
|
22466
22466
|
}
|
|
22467
22467
|
function ot(e) {
|
|
22468
22468
|
return Array.isArray(e) ? e.map(ot).join("") : I(e) ? e.name === "br" ? `
|
|
22469
|
-
` : ot(e.children) : wt
|
|
22469
|
+
` : ot(e.children) : wt(e) ? ot(e.children) : se(e) ? e.data : "";
|
|
22470
22470
|
}
|
|
22471
22471
|
function Le(e) {
|
|
22472
|
-
return Array.isArray(e) ? e.map(Le).join("") : B
|
|
22472
|
+
return Array.isArray(e) ? e.map(Le).join("") : B(e) && !Nt$1(e) ? Le(e.children) : se(e) ? e.data : "";
|
|
22473
22473
|
}
|
|
22474
22474
|
function dt(e) {
|
|
22475
|
-
return Array.isArray(e) ? e.map(dt).join("") : B
|
|
22475
|
+
return Array.isArray(e) ? e.map(dt).join("") : B(e) && (e.type === L$1.Tag || wt(e)) ? dt(e.children) : se(e) ? e.data : "";
|
|
22476
22476
|
}
|
|
22477
22477
|
function It$1(e) {
|
|
22478
|
-
return B
|
|
22478
|
+
return B(e) ? e.children : [];
|
|
22479
22479
|
}
|
|
22480
22480
|
function Sr(e) {
|
|
22481
22481
|
return e.parent || null;
|
|
@@ -22580,7 +22580,7 @@ function Eu(e, t, u, r) {
|
|
|
22580
22580
|
const c = i[0][n[0]++];
|
|
22581
22581
|
if (e(c) && (a.push(c), --r <= 0))
|
|
22582
22582
|
return a;
|
|
22583
|
-
u && B
|
|
22583
|
+
u && B(c) && c.children.length > 0 && (n.unshift(0), i.unshift(c.children));
|
|
22584
22584
|
}
|
|
22585
22585
|
}
|
|
22586
22586
|
function Ua(e, t) {
|
|
@@ -22592,7 +22592,7 @@ function Tu(e, t, u = true) {
|
|
|
22592
22592
|
const i = r[a];
|
|
22593
22593
|
if (I(i) && e(i))
|
|
22594
22594
|
return i;
|
|
22595
|
-
if (u && B
|
|
22595
|
+
if (u && B(i) && i.children.length > 0) {
|
|
22596
22596
|
const n = Tu(e, i.children, true);
|
|
22597
22597
|
if (n)
|
|
22598
22598
|
return n;
|
|
@@ -22601,7 +22601,7 @@ function Tu(e, t, u = true) {
|
|
|
22601
22601
|
return null;
|
|
22602
22602
|
}
|
|
22603
22603
|
function yr(e, t) {
|
|
22604
|
-
return (Array.isArray(t) ? t : [t]).some((u) => I(u) && e(u) || B
|
|
22604
|
+
return (Array.isArray(t) ? t : [t]).some((u) => I(u) && e(u) || B(u) && yr(e, u.children));
|
|
22605
22605
|
}
|
|
22606
22606
|
function Fa(e, t) {
|
|
22607
22607
|
const u = [], r = [Array.isArray(t) ? t : [t]], a = [0];
|
|
@@ -22613,7 +22613,7 @@ function Fa(e, t) {
|
|
|
22613
22613
|
continue;
|
|
22614
22614
|
}
|
|
22615
22615
|
const i = r[0][a[0]++];
|
|
22616
|
-
I(i) && e(i) && u.push(i), B
|
|
22616
|
+
I(i) && e(i) && u.push(i), B(i) && i.children.length > 0 && (a.unshift(0), r.unshift(i.children));
|
|
22617
22617
|
}
|
|
22618
22618
|
}
|
|
22619
22619
|
const ht = {
|
|
@@ -22676,32 +22676,32 @@ function Ga(e) {
|
|
|
22676
22676
|
}
|
|
22677
22677
|
return e;
|
|
22678
22678
|
}
|
|
22679
|
-
var Z;
|
|
22679
|
+
var Z$1;
|
|
22680
22680
|
(function(e) {
|
|
22681
22681
|
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";
|
|
22682
|
-
})(Z || (Z = {}));
|
|
22682
|
+
})(Z$1 || (Z$1 = {}));
|
|
22683
22683
|
function Lr(e, t) {
|
|
22684
22684
|
const u = [], r = [];
|
|
22685
22685
|
if (e === t)
|
|
22686
22686
|
return 0;
|
|
22687
|
-
let a = B
|
|
22687
|
+
let a = B(e) ? e : e.parent;
|
|
22688
22688
|
for (; a; )
|
|
22689
22689
|
u.unshift(a), a = a.parent;
|
|
22690
|
-
for (a = B
|
|
22690
|
+
for (a = B(t) ? t : t.parent; a; )
|
|
22691
22691
|
r.unshift(a), a = a.parent;
|
|
22692
22692
|
const i = Math.min(u.length, r.length);
|
|
22693
22693
|
let n = 0;
|
|
22694
22694
|
for (; n < i && u[n] === r[n]; )
|
|
22695
22695
|
n++;
|
|
22696
22696
|
if (n === 0)
|
|
22697
|
-
return Z.DISCONNECTED;
|
|
22697
|
+
return Z$1.DISCONNECTED;
|
|
22698
22698
|
const c = u[n - 1], h = c.children, m = u[n], f = r[n];
|
|
22699
|
-
return h.indexOf(m) > h.indexOf(f) ? c === t ? Z.FOLLOWING | Z.CONTAINED_BY : Z.FOLLOWING : c === e ? Z.PRECEDING | Z.CONTAINS : Z.PRECEDING;
|
|
22699
|
+
return h.indexOf(m) > h.indexOf(f) ? c === t ? Z$1.FOLLOWING | Z$1.CONTAINED_BY : Z$1.FOLLOWING : c === e ? Z$1.PRECEDING | Z$1.CONTAINS : Z$1.PRECEDING;
|
|
22700
22700
|
}
|
|
22701
22701
|
function ke(e) {
|
|
22702
22702
|
return e = e.filter((t, u, r) => !r.includes(t, u + 1)), e.sort((t, u) => {
|
|
22703
22703
|
const r = Lr(t, u);
|
|
22704
|
-
return r & Z.PRECEDING ? -1 : r & Z.FOLLOWING ? 1 : 0;
|
|
22704
|
+
return r & Z$1.PRECEDING ? -1 : r & Z$1.FOLLOWING ? 1 : 0;
|
|
22705
22705
|
}), e;
|
|
22706
22706
|
}
|
|
22707
22707
|
function Wa(e) {
|
|
@@ -22715,20 +22715,20 @@ function za(e) {
|
|
|
22715
22715
|
items: De("entry", u).map((n) => {
|
|
22716
22716
|
var c;
|
|
22717
22717
|
const { children: h } = n, m = { media: Rr(h) };
|
|
22718
|
-
Q(m, "id", "id", h), Q(m, "title", "title", h);
|
|
22718
|
+
Q$1(m, "id", "id", h), Q$1(m, "title", "title", h);
|
|
22719
22719
|
const f = (c = lt("link", h)) === null || c === void 0 ? void 0 : c.attribs.href;
|
|
22720
22720
|
f && (m.link = f);
|
|
22721
22721
|
const T = fe("summary", h) || fe("content", h);
|
|
22722
22722
|
T && (m.description = T);
|
|
22723
|
-
const
|
|
22724
|
-
return
|
|
22723
|
+
const A = fe("updated", h);
|
|
22724
|
+
return A && (m.pubDate = new Date(A)), m;
|
|
22725
22725
|
})
|
|
22726
22726
|
};
|
|
22727
|
-
Q(r, "id", "id", u), Q(r, "title", "title", u);
|
|
22727
|
+
Q$1(r, "id", "id", u), Q$1(r, "title", "title", u);
|
|
22728
22728
|
const a = (t = lt("link", u)) === null || t === void 0 ? void 0 : t.attribs.href;
|
|
22729
|
-
a && (r.link = a), Q(r, "description", "subtitle", u);
|
|
22729
|
+
a && (r.link = a), Q$1(r, "description", "subtitle", u);
|
|
22730
22730
|
const i = fe("updated", u);
|
|
22731
|
-
return i && (r.updated = new Date(i)), Q(r, "author", "email", u, true), r;
|
|
22731
|
+
return i && (r.updated = new Date(i)), Q$1(r, "author", "email", u, true), r;
|
|
22732
22732
|
}
|
|
22733
22733
|
function Qa(e) {
|
|
22734
22734
|
var t, u;
|
|
@@ -22737,14 +22737,14 @@ function Qa(e) {
|
|
|
22737
22737
|
id: "",
|
|
22738
22738
|
items: De("item", e.children).map((n) => {
|
|
22739
22739
|
const { children: c } = n, h = { media: Rr(c) };
|
|
22740
|
-
Q(h, "id", "guid", c), Q(h, "title", "title", c), Q(h, "link", "link", c), Q(h, "description", "description", c);
|
|
22740
|
+
Q$1(h, "id", "guid", c), Q$1(h, "title", "title", c), Q$1(h, "link", "link", c), Q$1(h, "description", "description", c);
|
|
22741
22741
|
const m = fe("pubDate", c) || fe("dc:date", c);
|
|
22742
22742
|
return m && (h.pubDate = new Date(m)), h;
|
|
22743
22743
|
})
|
|
22744
22744
|
};
|
|
22745
|
-
Q(a, "title", "title", r), Q(a, "link", "link", r), Q(a, "description", "description", r);
|
|
22745
|
+
Q$1(a, "title", "title", r), Q$1(a, "link", "link", r), Q$1(a, "description", "description", r);
|
|
22746
22746
|
const i = fe("lastBuildDate", r);
|
|
22747
|
-
return i && (a.updated = new Date(i)), Q(a, "author", "managingEditor", r, true), a;
|
|
22747
|
+
return i && (a.updated = new Date(i)), Q$1(a, "author", "managingEditor", r, true), a;
|
|
22748
22748
|
}
|
|
22749
22749
|
const Ka = ["url", "type", "lang"], Xa = [
|
|
22750
22750
|
"fileSize",
|
|
@@ -22775,7 +22775,7 @@ function lt(e, t) {
|
|
|
22775
22775
|
function fe(e, t, u = false) {
|
|
22776
22776
|
return Le(De(e, t, u, 1)).trim();
|
|
22777
22777
|
}
|
|
22778
|
-
function Q(e, t, u, r, a = false) {
|
|
22778
|
+
function Q$1(e, t, u, r, a = false) {
|
|
22779
22779
|
const i = fe(u, r, a);
|
|
22780
22780
|
i && (e[t] = i);
|
|
22781
22781
|
}
|
|
@@ -22785,7 +22785,7 @@ function Za(e) {
|
|
|
22785
22785
|
const St$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
22786
22786
|
__proto__: null,
|
|
22787
22787
|
get DocumentPosition() {
|
|
22788
|
-
return Z;
|
|
22788
|
+
return Z$1;
|
|
22789
22789
|
},
|
|
22790
22790
|
append: Pa,
|
|
22791
22791
|
appendChild: ka,
|
|
@@ -22811,9 +22811,9 @@ const St$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
|
|
|
22811
22811
|
getSiblings: Cr,
|
|
22812
22812
|
getText: ot,
|
|
22813
22813
|
hasAttrib: La,
|
|
22814
|
-
hasChildren: B
|
|
22814
|
+
hasChildren: B,
|
|
22815
22815
|
innerText: dt,
|
|
22816
|
-
isCDATA: wt
|
|
22816
|
+
isCDATA: wt,
|
|
22817
22817
|
isComment: Nt$1,
|
|
22818
22818
|
isDocument: Te,
|
|
22819
22819
|
isTag: I,
|
|
@@ -22831,7 +22831,7 @@ const St$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
|
|
|
22831
22831
|
}, Symbol.toStringTag, { value: "Module" })), Ja = {
|
|
22832
22832
|
_useHtmlParser2: false
|
|
22833
22833
|
};
|
|
22834
|
-
function Kt
|
|
22834
|
+
function Kt(e, t) {
|
|
22835
22835
|
if (!e)
|
|
22836
22836
|
return t ?? Ja;
|
|
22837
22837
|
const u = {
|
|
@@ -22850,7 +22850,7 @@ function ei(e, t) {
|
|
|
22850
22850
|
function ti(e, t) {
|
|
22851
22851
|
const u = ei(e) ? (t = e, void 0) : e, r = {
|
|
22852
22852
|
...this === null || this === void 0 ? void 0 : this._options,
|
|
22853
|
-
...Kt
|
|
22853
|
+
...Kt(t)
|
|
22854
22854
|
};
|
|
22855
22855
|
return Dr(this, u, r);
|
|
22856
22856
|
}
|
|
@@ -22926,7 +22926,7 @@ function oi(e) {
|
|
|
22926
22926
|
function ci(e) {
|
|
22927
22927
|
return e.replace(/[A-Z]/g, "-$&").toLowerCase();
|
|
22928
22928
|
}
|
|
22929
|
-
function P
|
|
22929
|
+
function P(e, t) {
|
|
22930
22930
|
const u = e.length;
|
|
22931
22931
|
for (let r = 0; r < u; r++)
|
|
22932
22932
|
t(e[r], r);
|
|
@@ -22936,7 +22936,7 @@ var ve;
|
|
|
22936
22936
|
(function(e) {
|
|
22937
22937
|
e[e.LowerA = 97] = "LowerA", e[e.LowerZ = 122] = "LowerZ", e[e.UpperA = 65] = "UpperA", e[e.UpperZ = 90] = "UpperZ", e[e.Exclamation = 33] = "Exclamation";
|
|
22938
22938
|
})(ve || (ve = {}));
|
|
22939
|
-
function Xt(e) {
|
|
22939
|
+
function Xt$1(e) {
|
|
22940
22940
|
const t = e.indexOf("<");
|
|
22941
22941
|
if (t === -1 || t > e.length - 3)
|
|
22942
22942
|
return false;
|
|
@@ -22992,26 +22992,26 @@ function mi(e) {
|
|
|
22992
22992
|
var t;
|
|
22993
22993
|
return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : (t = li.get(e)) !== null && t !== void 0 ? t : e;
|
|
22994
22994
|
}
|
|
22995
|
-
var V;
|
|
22995
|
+
var V$1;
|
|
22996
22996
|
(function(e) {
|
|
22997
22997
|
e[e.NUM = 35] = "NUM", e[e.SEMI = 59] = "SEMI", e[e.EQUALS = 61] = "EQUALS", e[e.ZERO = 48] = "ZERO", e[e.NINE = 57] = "NINE", e[e.LOWER_A = 97] = "LOWER_A", e[e.LOWER_F = 102] = "LOWER_F", e[e.LOWER_X = 120] = "LOWER_X", e[e.LOWER_Z = 122] = "LOWER_Z", e[e.UPPER_A = 65] = "UPPER_A", e[e.UPPER_F = 70] = "UPPER_F", e[e.UPPER_Z = 90] = "UPPER_Z";
|
|
22998
|
-
})(V || (V = {}));
|
|
22998
|
+
})(V$1 || (V$1 = {}));
|
|
22999
22999
|
const pi = 32;
|
|
23000
23000
|
var be;
|
|
23001
23001
|
(function(e) {
|
|
23002
23002
|
e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE";
|
|
23003
23003
|
})(be || (be = {}));
|
|
23004
|
-
function Zt(e) {
|
|
23005
|
-
return e >= V.ZERO && e <= V.NINE;
|
|
23004
|
+
function Zt$1(e) {
|
|
23005
|
+
return e >= V$1.ZERO && e <= V$1.NINE;
|
|
23006
23006
|
}
|
|
23007
23007
|
function fi(e) {
|
|
23008
|
-
return e >= V.UPPER_A && e <= V.UPPER_F || e >= V.LOWER_A && e <= V.LOWER_F;
|
|
23008
|
+
return e >= V$1.UPPER_A && e <= V$1.UPPER_F || e >= V$1.LOWER_A && e <= V$1.LOWER_F;
|
|
23009
23009
|
}
|
|
23010
23010
|
function bi(e) {
|
|
23011
|
-
return e >= V.UPPER_A && e <= V.UPPER_Z || e >= V.LOWER_A && e <= V.LOWER_Z || Zt(e);
|
|
23011
|
+
return e >= V$1.UPPER_A && e <= V$1.UPPER_Z || e >= V$1.LOWER_A && e <= V$1.LOWER_Z || Zt$1(e);
|
|
23012
23012
|
}
|
|
23013
23013
|
function Ei(e) {
|
|
23014
|
-
return e === V.EQUALS || bi(e);
|
|
23014
|
+
return e === V$1.EQUALS || bi(e);
|
|
23015
23015
|
}
|
|
23016
23016
|
var q$1;
|
|
23017
23017
|
(function(e) {
|
|
@@ -23043,7 +23043,7 @@ let Ti = class {
|
|
|
23043
23043
|
write(t, u) {
|
|
23044
23044
|
switch (this.state) {
|
|
23045
23045
|
case q$1.EntityStart:
|
|
23046
|
-
return t.charCodeAt(u) === V.NUM ? (this.state = q$1.NumericStart, this.consumed += 1, this.stateNumericStart(t, u + 1)) : (this.state = q$1.NamedEntity, this.stateNamedEntity(t, u));
|
|
23046
|
+
return t.charCodeAt(u) === V$1.NUM ? (this.state = q$1.NumericStart, this.consumed += 1, this.stateNumericStart(t, u + 1)) : (this.state = q$1.NamedEntity, this.stateNamedEntity(t, u));
|
|
23047
23047
|
case q$1.NumericStart:
|
|
23048
23048
|
return this.stateNumericStart(t, u);
|
|
23049
23049
|
case q$1.NumericDecimal:
|
|
@@ -23064,7 +23064,7 @@ let Ti = class {
|
|
|
23064
23064
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
23065
23065
|
*/
|
|
23066
23066
|
stateNumericStart(t, u) {
|
|
23067
|
-
return u >= t.length ? -1 : (t.charCodeAt(u) | pi) === V.LOWER_X ? (this.state = q$1.NumericHex, this.consumed += 1, this.stateNumericHex(t, u + 1)) : (this.state = q$1.NumericDecimal, this.stateNumericDecimal(t, u));
|
|
23067
|
+
return u >= t.length ? -1 : (t.charCodeAt(u) | pi) === V$1.LOWER_X ? (this.state = q$1.NumericHex, this.consumed += 1, this.stateNumericHex(t, u + 1)) : (this.state = q$1.NumericDecimal, this.stateNumericDecimal(t, u));
|
|
23068
23068
|
}
|
|
23069
23069
|
addToNumericResult(t, u, r, a) {
|
|
23070
23070
|
if (u !== r) {
|
|
@@ -23085,7 +23085,7 @@ let Ti = class {
|
|
|
23085
23085
|
const r = u;
|
|
23086
23086
|
for (; u < t.length; ) {
|
|
23087
23087
|
const a = t.charCodeAt(u);
|
|
23088
|
-
if (Zt(a) || fi(a))
|
|
23088
|
+
if (Zt$1(a) || fi(a))
|
|
23089
23089
|
u += 1;
|
|
23090
23090
|
else
|
|
23091
23091
|
return this.addToNumericResult(t, r, u, 16), this.emitNumericEntity(a, 3);
|
|
@@ -23105,7 +23105,7 @@ let Ti = class {
|
|
|
23105
23105
|
const r = u;
|
|
23106
23106
|
for (; u < t.length; ) {
|
|
23107
23107
|
const a = t.charCodeAt(u);
|
|
23108
|
-
if (Zt(a))
|
|
23108
|
+
if (Zt$1(a))
|
|
23109
23109
|
u += 1;
|
|
23110
23110
|
else
|
|
23111
23111
|
return this.addToNumericResult(t, r, u, 10), this.emitNumericEntity(a, 2);
|
|
@@ -23129,11 +23129,11 @@ let Ti = class {
|
|
|
23129
23129
|
var r;
|
|
23130
23130
|
if (this.consumed <= u)
|
|
23131
23131
|
return (r = this.errors) === null || r === void 0 || r.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
23132
|
-
if (t === V.SEMI)
|
|
23132
|
+
if (t === V$1.SEMI)
|
|
23133
23133
|
this.consumed += 1;
|
|
23134
23134
|
else if (this.decodeMode === ue.Strict)
|
|
23135
23135
|
return 0;
|
|
23136
|
-
return this.emitCodePoint(mi(this.result), this.consumed), this.errors && (t !== V.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
|
|
23136
|
+
return this.emitCodePoint(mi(this.result), this.consumed), this.errors && (t !== V$1.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
|
|
23137
23137
|
}
|
|
23138
23138
|
/**
|
|
23139
23139
|
* Parses a named entity.
|
|
@@ -23155,7 +23155,7 @@ let Ti = class {
|
|
|
23155
23155
|
(i === 0 || // And there should be no invalid characters.
|
|
23156
23156
|
Ei(n)) ? 0 : this.emitNotTerminatedNamedEntity();
|
|
23157
23157
|
if (a = r[this.treeIndex], i = (a & be.VALUE_LENGTH) >> 14, i !== 0) {
|
|
23158
|
-
if (n === V.SEMI)
|
|
23158
|
+
if (n === V$1.SEMI)
|
|
23159
23159
|
return this.emitNamedEntityData(this.treeIndex, i, this.consumed + this.excess);
|
|
23160
23160
|
this.decodeMode !== ue.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
|
|
23161
23161
|
}
|
|
@@ -23233,10 +23233,10 @@ var x;
|
|
|
23233
23233
|
(function(e) {
|
|
23234
23234
|
e[e.Tab = 9] = "Tab", e[e.NewLine = 10] = "NewLine", e[e.FormFeed = 12] = "FormFeed", e[e.CarriageReturn = 13] = "CarriageReturn", e[e.Space = 32] = "Space", e[e.ExclamationMark = 33] = "ExclamationMark", e[e.Number = 35] = "Number", e[e.Amp = 38] = "Amp", e[e.SingleQuote = 39] = "SingleQuote", e[e.DoubleQuote = 34] = "DoubleQuote", e[e.Dash = 45] = "Dash", e[e.Slash = 47] = "Slash", e[e.Zero = 48] = "Zero", e[e.Nine = 57] = "Nine", e[e.Semi = 59] = "Semi", e[e.Lt = 60] = "Lt", e[e.Eq = 61] = "Eq", e[e.Gt = 62] = "Gt", e[e.Questionmark = 63] = "Questionmark", e[e.UpperA = 65] = "UpperA", e[e.LowerA = 97] = "LowerA", e[e.UpperF = 70] = "UpperF", e[e.LowerF = 102] = "LowerF", e[e.UpperZ = 90] = "UpperZ", e[e.LowerZ = 122] = "LowerZ", e[e.LowerX = 120] = "LowerX", e[e.OpeningSquareBracket = 91] = "OpeningSquareBracket";
|
|
23235
23235
|
})(x || (x = {}));
|
|
23236
|
-
var _;
|
|
23236
|
+
var _$1;
|
|
23237
23237
|
(function(e) {
|
|
23238
23238
|
e[e.Text = 1] = "Text", e[e.BeforeTagName = 2] = "BeforeTagName", e[e.InTagName = 3] = "InTagName", e[e.InSelfClosingTag = 4] = "InSelfClosingTag", e[e.BeforeClosingTagName = 5] = "BeforeClosingTagName", e[e.InClosingTagName = 6] = "InClosingTagName", e[e.AfterClosingTagName = 7] = "AfterClosingTagName", e[e.BeforeAttributeName = 8] = "BeforeAttributeName", e[e.InAttributeName = 9] = "InAttributeName", e[e.AfterAttributeName = 10] = "AfterAttributeName", e[e.BeforeAttributeValue = 11] = "BeforeAttributeValue", e[e.InAttributeValueDq = 12] = "InAttributeValueDq", e[e.InAttributeValueSq = 13] = "InAttributeValueSq", e[e.InAttributeValueNq = 14] = "InAttributeValueNq", e[e.BeforeDeclaration = 15] = "BeforeDeclaration", e[e.InDeclaration = 16] = "InDeclaration", e[e.InProcessingInstruction = 17] = "InProcessingInstruction", e[e.BeforeComment = 18] = "BeforeComment", e[e.CDATASequence = 19] = "CDATASequence", e[e.InSpecialComment = 20] = "InSpecialComment", e[e.InCommentLike = 21] = "InCommentLike", e[e.BeforeSpecialS = 22] = "BeforeSpecialS", e[e.BeforeSpecialT = 23] = "BeforeSpecialT", e[e.SpecialStartSequence = 24] = "SpecialStartSequence", e[e.InSpecialTag = 25] = "InSpecialTag", e[e.InEntity = 26] = "InEntity";
|
|
23239
|
-
})(_ || (_ = {}));
|
|
23239
|
+
})(_$1 || (_$1 = {}));
|
|
23240
23240
|
function ne(e) {
|
|
23241
23241
|
return e === x.Space || e === x.NewLine || e === x.Tab || e === x.FormFeed || e === x.CarriageReturn;
|
|
23242
23242
|
}
|
|
@@ -23250,7 +23250,7 @@ var re;
|
|
|
23250
23250
|
(function(e) {
|
|
23251
23251
|
e[e.NoValue = 0] = "NoValue", e[e.Unquoted = 1] = "Unquoted", e[e.Single = 2] = "Single", e[e.Double = 3] = "Double";
|
|
23252
23252
|
})(re || (re = {}));
|
|
23253
|
-
const F
|
|
23253
|
+
const F = {
|
|
23254
23254
|
Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
|
|
23255
23255
|
// CDATA[
|
|
23256
23256
|
CdataEnd: new Uint8Array([93, 93, 62]),
|
|
@@ -23281,10 +23281,10 @@ const F$1 = {
|
|
|
23281
23281
|
};
|
|
23282
23282
|
let Ai = class {
|
|
23283
23283
|
constructor({ xmlMode: t = false, decodeEntities: u = true }, r) {
|
|
23284
|
-
this.cbs = r, this.state = _.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.entityStart = 0, this.baseState = _.Text, this.isSpecial = false, this.running = true, this.offset = 0, this.currentSequence = void 0, this.sequenceIndex = 0, this.xmlMode = t, this.decodeEntities = u, this.entityDecoder = new Ti(t ? hi : di, (a, i) => this.emitCodePoint(a, i));
|
|
23284
|
+
this.cbs = r, this.state = _$1.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.entityStart = 0, this.baseState = _$1.Text, this.isSpecial = false, this.running = true, this.offset = 0, this.currentSequence = void 0, this.sequenceIndex = 0, this.xmlMode = t, this.decodeEntities = u, this.entityDecoder = new Ti(t ? hi : di, (a, i) => this.emitCodePoint(a, i));
|
|
23285
23285
|
}
|
|
23286
23286
|
reset() {
|
|
23287
|
-
this.state = _.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = _.Text, this.currentSequence = void 0, this.running = true, this.offset = 0;
|
|
23287
|
+
this.state = _$1.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = _$1.Text, this.currentSequence = void 0, this.running = true, this.offset = 0;
|
|
23288
23288
|
}
|
|
23289
23289
|
write(t) {
|
|
23290
23290
|
this.offset += this.buffer.length, this.buffer = t, this.parse();
|
|
@@ -23299,7 +23299,7 @@ let Ai = class {
|
|
|
23299
23299
|
this.running = true, this.index < this.buffer.length + this.offset && this.parse();
|
|
23300
23300
|
}
|
|
23301
23301
|
stateText(t) {
|
|
23302
|
-
t === x.Lt || !this.decodeEntities && this.fastForwardTo(x.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = _.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && t === x.Amp && this.startEntity();
|
|
23302
|
+
t === x.Lt || !this.decodeEntities && this.fastForwardTo(x.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = _$1.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && t === x.Amp && this.startEntity();
|
|
23303
23303
|
}
|
|
23304
23304
|
stateSpecialStartSequence(t) {
|
|
23305
23305
|
const u = this.sequenceIndex === this.currentSequence.length;
|
|
@@ -23315,7 +23315,7 @@ let Ai = class {
|
|
|
23315
23315
|
this.sequenceIndex++;
|
|
23316
23316
|
return;
|
|
23317
23317
|
}
|
|
23318
|
-
this.sequenceIndex = 0, this.state = _.InTagName, this.stateInTagName(t);
|
|
23318
|
+
this.sequenceIndex = 0, this.state = _$1.InTagName, this.stateInTagName(t);
|
|
23319
23319
|
}
|
|
23320
23320
|
/** Look for an end tag. For <title> tags, also decode entities. */
|
|
23321
23321
|
stateInSpecialTag(t) {
|
|
@@ -23331,10 +23331,10 @@ let Ai = class {
|
|
|
23331
23331
|
}
|
|
23332
23332
|
this.sequenceIndex = 0;
|
|
23333
23333
|
}
|
|
23334
|
-
(t | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === F
|
|
23334
|
+
(t | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === F.TitleEnd ? this.decodeEntities && t === x.Amp && this.startEntity() : this.fastForwardTo(x.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(t === x.Lt);
|
|
23335
23335
|
}
|
|
23336
23336
|
stateCDATASequence(t) {
|
|
23337
|
-
t === F
|
|
23337
|
+
t === F.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === F.Cdata.length && (this.state = _$1.InCommentLike, this.currentSequence = F.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = _$1.InDeclaration, this.stateInDeclaration(t));
|
|
23338
23338
|
}
|
|
23339
23339
|
/**
|
|
23340
23340
|
* When we wait for one specific character, we can speed things up
|
|
@@ -23357,7 +23357,7 @@ let Ai = class {
|
|
|
23357
23357
|
* - All characters but the start character of the sequence can be skipped.
|
|
23358
23358
|
*/
|
|
23359
23359
|
stateInCommentLike(t) {
|
|
23360
|
-
t === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === F
|
|
23360
|
+
t === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === F.CdataEnd ? this.cbs.oncdata(this.sectionStart, this.index, 2) : this.cbs.oncomment(this.sectionStart, this.index, 2), this.sequenceIndex = 0, this.sectionStart = this.index + 1, this.state = _$1.Text) : this.sequenceIndex === 0 ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : t !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0);
|
|
23361
23361
|
}
|
|
23362
23362
|
/**
|
|
23363
23363
|
* HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.
|
|
@@ -23369,47 +23369,47 @@ let Ai = class {
|
|
|
23369
23369
|
return this.xmlMode ? !st(t) : gi(t);
|
|
23370
23370
|
}
|
|
23371
23371
|
startSpecial(t, u) {
|
|
23372
|
-
this.isSpecial = true, this.currentSequence = t, this.sequenceIndex = u, this.state = _.SpecialStartSequence;
|
|
23372
|
+
this.isSpecial = true, this.currentSequence = t, this.sequenceIndex = u, this.state = _$1.SpecialStartSequence;
|
|
23373
23373
|
}
|
|
23374
23374
|
stateBeforeTagName(t) {
|
|
23375
23375
|
if (t === x.ExclamationMark)
|
|
23376
|
-
this.state = _.BeforeDeclaration, this.sectionStart = this.index + 1;
|
|
23376
|
+
this.state = _$1.BeforeDeclaration, this.sectionStart = this.index + 1;
|
|
23377
23377
|
else if (t === x.Questionmark)
|
|
23378
|
-
this.state = _.InProcessingInstruction, this.sectionStart = this.index + 1;
|
|
23378
|
+
this.state = _$1.InProcessingInstruction, this.sectionStart = this.index + 1;
|
|
23379
23379
|
else if (this.isTagStartChar(t)) {
|
|
23380
23380
|
const u = t | 32;
|
|
23381
|
-
this.sectionStart = this.index, this.xmlMode ? this.state = _.InTagName : u === F
|
|
23382
|
-
} else t === x.Slash ? this.state = _.BeforeClosingTagName : (this.state = _.Text, this.stateText(t));
|
|
23381
|
+
this.sectionStart = this.index, this.xmlMode ? this.state = _$1.InTagName : u === F.ScriptEnd[2] ? this.state = _$1.BeforeSpecialS : u === F.TitleEnd[2] || u === F.XmpEnd[2] ? this.state = _$1.BeforeSpecialT : this.state = _$1.InTagName;
|
|
23382
|
+
} else t === x.Slash ? this.state = _$1.BeforeClosingTagName : (this.state = _$1.Text, this.stateText(t));
|
|
23383
23383
|
}
|
|
23384
23384
|
stateInTagName(t) {
|
|
23385
|
-
st(t) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = _.BeforeAttributeName, this.stateBeforeAttributeName(t));
|
|
23385
|
+
st(t) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = _$1.BeforeAttributeName, this.stateBeforeAttributeName(t));
|
|
23386
23386
|
}
|
|
23387
23387
|
stateBeforeClosingTagName(t) {
|
|
23388
|
-
ne(t) || (t === x.Gt ? this.state = _.Text : (this.state = this.isTagStartChar(t) ? _.InClosingTagName : _.InSpecialComment, this.sectionStart = this.index));
|
|
23388
|
+
ne(t) || (t === x.Gt ? this.state = _$1.Text : (this.state = this.isTagStartChar(t) ? _$1.InClosingTagName : _$1.InSpecialComment, this.sectionStart = this.index));
|
|
23389
23389
|
}
|
|
23390
23390
|
stateInClosingTagName(t) {
|
|
23391
|
-
(t === x.Gt || ne(t)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = _.AfterClosingTagName, this.stateAfterClosingTagName(t));
|
|
23391
|
+
(t === x.Gt || ne(t)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = _$1.AfterClosingTagName, this.stateAfterClosingTagName(t));
|
|
23392
23392
|
}
|
|
23393
23393
|
stateAfterClosingTagName(t) {
|
|
23394
|
-
(t === x.Gt || this.fastForwardTo(x.Gt)) && (this.state = _.Text, this.sectionStart = this.index + 1);
|
|
23394
|
+
(t === x.Gt || this.fastForwardTo(x.Gt)) && (this.state = _$1.Text, this.sectionStart = this.index + 1);
|
|
23395
23395
|
}
|
|
23396
23396
|
stateBeforeAttributeName(t) {
|
|
23397
|
-
t === x.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = _.InSpecialTag, this.sequenceIndex = 0) : this.state = _.Text, this.sectionStart = this.index + 1) : t === x.Slash ? this.state = _.InSelfClosingTag : ne(t) || (this.state = _.InAttributeName, this.sectionStart = this.index);
|
|
23397
|
+
t === x.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = _$1.InSpecialTag, this.sequenceIndex = 0) : this.state = _$1.Text, this.sectionStart = this.index + 1) : t === x.Slash ? this.state = _$1.InSelfClosingTag : ne(t) || (this.state = _$1.InAttributeName, this.sectionStart = this.index);
|
|
23398
23398
|
}
|
|
23399
23399
|
stateInSelfClosingTag(t) {
|
|
23400
|
-
t === x.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = _.Text, this.sectionStart = this.index + 1, this.isSpecial = false) : ne(t) || (this.state = _.BeforeAttributeName, this.stateBeforeAttributeName(t));
|
|
23400
|
+
t === x.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = _$1.Text, this.sectionStart = this.index + 1, this.isSpecial = false) : ne(t) || (this.state = _$1.BeforeAttributeName, this.stateBeforeAttributeName(t));
|
|
23401
23401
|
}
|
|
23402
23402
|
stateInAttributeName(t) {
|
|
23403
|
-
(t === x.Eq || st(t)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = this.index, this.state = _.AfterAttributeName, this.stateAfterAttributeName(t));
|
|
23403
|
+
(t === x.Eq || st(t)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = this.index, this.state = _$1.AfterAttributeName, this.stateAfterAttributeName(t));
|
|
23404
23404
|
}
|
|
23405
23405
|
stateAfterAttributeName(t) {
|
|
23406
|
-
t === x.Eq ? this.state = _.BeforeAttributeValue : t === x.Slash || t === x.Gt ? (this.cbs.onattribend(re.NoValue, this.sectionStart), this.sectionStart = -1, this.state = _.BeforeAttributeName, this.stateBeforeAttributeName(t)) : ne(t) || (this.cbs.onattribend(re.NoValue, this.sectionStart), this.state = _.InAttributeName, this.sectionStart = this.index);
|
|
23406
|
+
t === x.Eq ? this.state = _$1.BeforeAttributeValue : t === x.Slash || t === x.Gt ? (this.cbs.onattribend(re.NoValue, this.sectionStart), this.sectionStart = -1, this.state = _$1.BeforeAttributeName, this.stateBeforeAttributeName(t)) : ne(t) || (this.cbs.onattribend(re.NoValue, this.sectionStart), this.state = _$1.InAttributeName, this.sectionStart = this.index);
|
|
23407
23407
|
}
|
|
23408
23408
|
stateBeforeAttributeValue(t) {
|
|
23409
|
-
t === x.DoubleQuote ? (this.state = _.InAttributeValueDq, this.sectionStart = this.index + 1) : t === x.SingleQuote ? (this.state = _.InAttributeValueSq, this.sectionStart = this.index + 1) : ne(t) || (this.sectionStart = this.index, this.state = _.InAttributeValueNq, this.stateInAttributeValueNoQuotes(t));
|
|
23409
|
+
t === x.DoubleQuote ? (this.state = _$1.InAttributeValueDq, this.sectionStart = this.index + 1) : t === x.SingleQuote ? (this.state = _$1.InAttributeValueSq, this.sectionStart = this.index + 1) : ne(t) || (this.sectionStart = this.index, this.state = _$1.InAttributeValueNq, this.stateInAttributeValueNoQuotes(t));
|
|
23410
23410
|
}
|
|
23411
23411
|
handleInAttributeValue(t, u) {
|
|
23412
|
-
t === u || !this.decodeEntities && this.fastForwardTo(u) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(u === x.DoubleQuote ? re.Double : re.Single, this.index + 1), this.state = _.BeforeAttributeName) : this.decodeEntities && t === x.Amp && this.startEntity();
|
|
23412
|
+
t === u || !this.decodeEntities && this.fastForwardTo(u) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(u === x.DoubleQuote ? re.Double : re.Single, this.index + 1), this.state = _$1.BeforeAttributeName) : this.decodeEntities && t === x.Amp && this.startEntity();
|
|
23413
23413
|
}
|
|
23414
23414
|
stateInAttributeValueDoubleQuotes(t) {
|
|
23415
23415
|
this.handleInAttributeValue(t, x.DoubleQuote);
|
|
@@ -23418,47 +23418,47 @@ let Ai = class {
|
|
|
23418
23418
|
this.handleInAttributeValue(t, x.SingleQuote);
|
|
23419
23419
|
}
|
|
23420
23420
|
stateInAttributeValueNoQuotes(t) {
|
|
23421
|
-
ne(t) || t === x.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(re.Unquoted, this.index), this.state = _.BeforeAttributeName, this.stateBeforeAttributeName(t)) : this.decodeEntities && t === x.Amp && this.startEntity();
|
|
23421
|
+
ne(t) || t === x.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(re.Unquoted, this.index), this.state = _$1.BeforeAttributeName, this.stateBeforeAttributeName(t)) : this.decodeEntities && t === x.Amp && this.startEntity();
|
|
23422
23422
|
}
|
|
23423
23423
|
stateBeforeDeclaration(t) {
|
|
23424
|
-
t === x.OpeningSquareBracket ? (this.state = _.CDATASequence, this.sequenceIndex = 0) : this.state = t === x.Dash ? _.BeforeComment : _.InDeclaration;
|
|
23424
|
+
t === x.OpeningSquareBracket ? (this.state = _$1.CDATASequence, this.sequenceIndex = 0) : this.state = t === x.Dash ? _$1.BeforeComment : _$1.InDeclaration;
|
|
23425
23425
|
}
|
|
23426
23426
|
stateInDeclaration(t) {
|
|
23427
|
-
(t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = _.Text, this.sectionStart = this.index + 1);
|
|
23427
|
+
(t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = _$1.Text, this.sectionStart = this.index + 1);
|
|
23428
23428
|
}
|
|
23429
23429
|
stateInProcessingInstruction(t) {
|
|
23430
|
-
(t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = _.Text, this.sectionStart = this.index + 1);
|
|
23430
|
+
(t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = _$1.Text, this.sectionStart = this.index + 1);
|
|
23431
23431
|
}
|
|
23432
23432
|
stateBeforeComment(t) {
|
|
23433
|
-
t === x.Dash ? (this.state = _.InCommentLike, this.currentSequence = F
|
|
23433
|
+
t === x.Dash ? (this.state = _$1.InCommentLike, this.currentSequence = F.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = _$1.InDeclaration;
|
|
23434
23434
|
}
|
|
23435
23435
|
stateInSpecialComment(t) {
|
|
23436
|
-
(t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = _.Text, this.sectionStart = this.index + 1);
|
|
23436
|
+
(t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = _$1.Text, this.sectionStart = this.index + 1);
|
|
23437
23437
|
}
|
|
23438
23438
|
stateBeforeSpecialS(t) {
|
|
23439
23439
|
const u = t | 32;
|
|
23440
|
-
u === F
|
|
23440
|
+
u === F.ScriptEnd[3] ? this.startSpecial(F.ScriptEnd, 4) : u === F.StyleEnd[3] ? this.startSpecial(F.StyleEnd, 4) : (this.state = _$1.InTagName, this.stateInTagName(t));
|
|
23441
23441
|
}
|
|
23442
23442
|
stateBeforeSpecialT(t) {
|
|
23443
23443
|
switch (t | 32) {
|
|
23444
|
-
case F
|
|
23445
|
-
this.startSpecial(F
|
|
23444
|
+
case F.TitleEnd[3]: {
|
|
23445
|
+
this.startSpecial(F.TitleEnd, 4);
|
|
23446
23446
|
break;
|
|
23447
23447
|
}
|
|
23448
|
-
case F
|
|
23449
|
-
this.startSpecial(F
|
|
23448
|
+
case F.TextareaEnd[3]: {
|
|
23449
|
+
this.startSpecial(F.TextareaEnd, 4);
|
|
23450
23450
|
break;
|
|
23451
23451
|
}
|
|
23452
|
-
case F
|
|
23453
|
-
this.startSpecial(F
|
|
23452
|
+
case F.XmpEnd[3]: {
|
|
23453
|
+
this.startSpecial(F.XmpEnd, 4);
|
|
23454
23454
|
break;
|
|
23455
23455
|
}
|
|
23456
23456
|
default:
|
|
23457
|
-
this.state = _.InTagName, this.stateInTagName(t);
|
|
23457
|
+
this.state = _$1.InTagName, this.stateInTagName(t);
|
|
23458
23458
|
}
|
|
23459
23459
|
}
|
|
23460
23460
|
startEntity() {
|
|
23461
|
-
this.baseState = this.state, this.state = _.InEntity, this.entityStart = this.index, this.entityDecoder.startEntity(this.xmlMode ? ue.Strict : this.baseState === _.Text || this.baseState === _.InSpecialTag ? ue.Legacy : ue.Attribute);
|
|
23461
|
+
this.baseState = this.state, this.state = _$1.InEntity, this.entityStart = this.index, this.entityDecoder.startEntity(this.xmlMode ? ue.Strict : this.baseState === _$1.Text || this.baseState === _$1.InSpecialTag ? ue.Legacy : ue.Attribute);
|
|
23462
23462
|
}
|
|
23463
23463
|
stateInEntity() {
|
|
23464
23464
|
const t = this.entityDecoder.write(this.buffer, this.index - this.offset);
|
|
@@ -23468,7 +23468,7 @@ let Ai = class {
|
|
|
23468
23468
|
* Remove data that has already been consumed from the buffer.
|
|
23469
23469
|
*/
|
|
23470
23470
|
cleanup() {
|
|
23471
|
-
this.running && this.sectionStart !== this.index && (this.state === _.Text || this.state === _.InSpecialTag && this.sequenceIndex === 0 ? (this.cbs.ontext(this.sectionStart, this.index), this.sectionStart = this.index) : (this.state === _.InAttributeValueDq || this.state === _.InAttributeValueSq || this.state === _.InAttributeValueNq) && (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = this.index));
|
|
23471
|
+
this.running && this.sectionStart !== this.index && (this.state === _$1.Text || this.state === _$1.InSpecialTag && this.sequenceIndex === 0 ? (this.cbs.ontext(this.sectionStart, this.index), this.sectionStart = this.index) : (this.state === _$1.InAttributeValueDq || this.state === _$1.InAttributeValueSq || this.state === _$1.InAttributeValueNq) && (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = this.index));
|
|
23472
23472
|
}
|
|
23473
23473
|
shouldContinue() {
|
|
23474
23474
|
return this.index < this.buffer.length + this.offset && this.running;
|
|
@@ -23482,107 +23482,107 @@ let Ai = class {
|
|
|
23482
23482
|
for (; this.shouldContinue(); ) {
|
|
23483
23483
|
const t = this.buffer.charCodeAt(this.index - this.offset);
|
|
23484
23484
|
switch (this.state) {
|
|
23485
|
-
case _.Text: {
|
|
23485
|
+
case _$1.Text: {
|
|
23486
23486
|
this.stateText(t);
|
|
23487
23487
|
break;
|
|
23488
23488
|
}
|
|
23489
|
-
case _.SpecialStartSequence: {
|
|
23489
|
+
case _$1.SpecialStartSequence: {
|
|
23490
23490
|
this.stateSpecialStartSequence(t);
|
|
23491
23491
|
break;
|
|
23492
23492
|
}
|
|
23493
|
-
case _.InSpecialTag: {
|
|
23493
|
+
case _$1.InSpecialTag: {
|
|
23494
23494
|
this.stateInSpecialTag(t);
|
|
23495
23495
|
break;
|
|
23496
23496
|
}
|
|
23497
|
-
case _.CDATASequence: {
|
|
23497
|
+
case _$1.CDATASequence: {
|
|
23498
23498
|
this.stateCDATASequence(t);
|
|
23499
23499
|
break;
|
|
23500
23500
|
}
|
|
23501
|
-
case _.InAttributeValueDq: {
|
|
23501
|
+
case _$1.InAttributeValueDq: {
|
|
23502
23502
|
this.stateInAttributeValueDoubleQuotes(t);
|
|
23503
23503
|
break;
|
|
23504
23504
|
}
|
|
23505
|
-
case _.InAttributeName: {
|
|
23505
|
+
case _$1.InAttributeName: {
|
|
23506
23506
|
this.stateInAttributeName(t);
|
|
23507
23507
|
break;
|
|
23508
23508
|
}
|
|
23509
|
-
case _.InCommentLike: {
|
|
23509
|
+
case _$1.InCommentLike: {
|
|
23510
23510
|
this.stateInCommentLike(t);
|
|
23511
23511
|
break;
|
|
23512
23512
|
}
|
|
23513
|
-
case _.InSpecialComment: {
|
|
23513
|
+
case _$1.InSpecialComment: {
|
|
23514
23514
|
this.stateInSpecialComment(t);
|
|
23515
23515
|
break;
|
|
23516
23516
|
}
|
|
23517
|
-
case _.BeforeAttributeName: {
|
|
23517
|
+
case _$1.BeforeAttributeName: {
|
|
23518
23518
|
this.stateBeforeAttributeName(t);
|
|
23519
23519
|
break;
|
|
23520
23520
|
}
|
|
23521
|
-
case _.InTagName: {
|
|
23521
|
+
case _$1.InTagName: {
|
|
23522
23522
|
this.stateInTagName(t);
|
|
23523
23523
|
break;
|
|
23524
23524
|
}
|
|
23525
|
-
case _.InClosingTagName: {
|
|
23525
|
+
case _$1.InClosingTagName: {
|
|
23526
23526
|
this.stateInClosingTagName(t);
|
|
23527
23527
|
break;
|
|
23528
23528
|
}
|
|
23529
|
-
case _.BeforeTagName: {
|
|
23529
|
+
case _$1.BeforeTagName: {
|
|
23530
23530
|
this.stateBeforeTagName(t);
|
|
23531
23531
|
break;
|
|
23532
23532
|
}
|
|
23533
|
-
case _.AfterAttributeName: {
|
|
23533
|
+
case _$1.AfterAttributeName: {
|
|
23534
23534
|
this.stateAfterAttributeName(t);
|
|
23535
23535
|
break;
|
|
23536
23536
|
}
|
|
23537
|
-
case _.InAttributeValueSq: {
|
|
23537
|
+
case _$1.InAttributeValueSq: {
|
|
23538
23538
|
this.stateInAttributeValueSingleQuotes(t);
|
|
23539
23539
|
break;
|
|
23540
23540
|
}
|
|
23541
|
-
case _.BeforeAttributeValue: {
|
|
23541
|
+
case _$1.BeforeAttributeValue: {
|
|
23542
23542
|
this.stateBeforeAttributeValue(t);
|
|
23543
23543
|
break;
|
|
23544
23544
|
}
|
|
23545
|
-
case _.BeforeClosingTagName: {
|
|
23545
|
+
case _$1.BeforeClosingTagName: {
|
|
23546
23546
|
this.stateBeforeClosingTagName(t);
|
|
23547
23547
|
break;
|
|
23548
23548
|
}
|
|
23549
|
-
case _.AfterClosingTagName: {
|
|
23549
|
+
case _$1.AfterClosingTagName: {
|
|
23550
23550
|
this.stateAfterClosingTagName(t);
|
|
23551
23551
|
break;
|
|
23552
23552
|
}
|
|
23553
|
-
case _.BeforeSpecialS: {
|
|
23553
|
+
case _$1.BeforeSpecialS: {
|
|
23554
23554
|
this.stateBeforeSpecialS(t);
|
|
23555
23555
|
break;
|
|
23556
23556
|
}
|
|
23557
|
-
case _.BeforeSpecialT: {
|
|
23557
|
+
case _$1.BeforeSpecialT: {
|
|
23558
23558
|
this.stateBeforeSpecialT(t);
|
|
23559
23559
|
break;
|
|
23560
23560
|
}
|
|
23561
|
-
case _.InAttributeValueNq: {
|
|
23561
|
+
case _$1.InAttributeValueNq: {
|
|
23562
23562
|
this.stateInAttributeValueNoQuotes(t);
|
|
23563
23563
|
break;
|
|
23564
23564
|
}
|
|
23565
|
-
case _.InSelfClosingTag: {
|
|
23565
|
+
case _$1.InSelfClosingTag: {
|
|
23566
23566
|
this.stateInSelfClosingTag(t);
|
|
23567
23567
|
break;
|
|
23568
23568
|
}
|
|
23569
|
-
case _.InDeclaration: {
|
|
23569
|
+
case _$1.InDeclaration: {
|
|
23570
23570
|
this.stateInDeclaration(t);
|
|
23571
23571
|
break;
|
|
23572
23572
|
}
|
|
23573
|
-
case _.BeforeDeclaration: {
|
|
23573
|
+
case _$1.BeforeDeclaration: {
|
|
23574
23574
|
this.stateBeforeDeclaration(t);
|
|
23575
23575
|
break;
|
|
23576
23576
|
}
|
|
23577
|
-
case _.BeforeComment: {
|
|
23577
|
+
case _$1.BeforeComment: {
|
|
23578
23578
|
this.stateBeforeComment(t);
|
|
23579
23579
|
break;
|
|
23580
23580
|
}
|
|
23581
|
-
case _.InProcessingInstruction: {
|
|
23581
|
+
case _$1.InProcessingInstruction: {
|
|
23582
23582
|
this.stateInProcessingInstruction(t);
|
|
23583
23583
|
break;
|
|
23584
23584
|
}
|
|
23585
|
-
case _.InEntity: {
|
|
23585
|
+
case _$1.InEntity: {
|
|
23586
23586
|
this.stateInEntity();
|
|
23587
23587
|
break;
|
|
23588
23588
|
}
|
|
@@ -23592,15 +23592,15 @@ let Ai = class {
|
|
|
23592
23592
|
this.cleanup();
|
|
23593
23593
|
}
|
|
23594
23594
|
finish() {
|
|
23595
|
-
this.state === _.InEntity && (this.entityDecoder.end(), this.state = this.baseState), this.handleTrailingData(), this.cbs.onend();
|
|
23595
|
+
this.state === _$1.InEntity && (this.entityDecoder.end(), this.state = this.baseState), this.handleTrailingData(), this.cbs.onend();
|
|
23596
23596
|
}
|
|
23597
23597
|
/** Handle any trailing data. */
|
|
23598
23598
|
handleTrailingData() {
|
|
23599
23599
|
const t = this.buffer.length + this.offset;
|
|
23600
|
-
this.sectionStart >= t || (this.state === _.InCommentLike ? this.currentSequence === F
|
|
23600
|
+
this.sectionStart >= t || (this.state === _$1.InCommentLike ? this.currentSequence === F.CdataEnd ? this.cbs.oncdata(this.sectionStart, t, 0) : this.cbs.oncomment(this.sectionStart, t, 0) : this.state === _$1.InTagName || this.state === _$1.BeforeAttributeName || this.state === _$1.BeforeAttributeValue || this.state === _$1.AfterAttributeName || this.state === _$1.InAttributeName || this.state === _$1.InAttributeValueSq || this.state === _$1.InAttributeValueDq || this.state === _$1.InAttributeValueNq || this.state === _$1.InClosingTagName || this.cbs.ontext(this.sectionStart, t));
|
|
23601
23601
|
}
|
|
23602
23602
|
emitCodePoint(t, u) {
|
|
23603
|
-
this.baseState !== _.Text && this.baseState !== _.InSpecialTag ? (this.sectionStart < this.entityStart && this.cbs.onattribdata(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + u, this.index = this.sectionStart - 1, this.cbs.onattribentity(t)) : (this.sectionStart < this.entityStart && this.cbs.ontext(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + u, this.index = this.sectionStart - 1, this.cbs.ontextentity(t, this.sectionStart));
|
|
23603
|
+
this.baseState !== _$1.Text && this.baseState !== _$1.InSpecialTag ? (this.sectionStart < this.entityStart && this.cbs.onattribdata(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + u, this.index = this.sectionStart - 1, this.cbs.onattribentity(t)) : (this.sectionStart < this.entityStart && this.cbs.ontext(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + u, this.index = this.sectionStart - 1, this.cbs.ontextentity(t, this.sectionStart));
|
|
23604
23604
|
}
|
|
23605
23605
|
};
|
|
23606
23606
|
const ye = /* @__PURE__ */ new Set([
|
|
@@ -23747,11 +23747,11 @@ let xi = class {
|
|
|
23747
23747
|
if (this.lowerCaseTagNames && (T = T.toLowerCase()), this.htmlMode && (ju.has(T) || Vu.has(T)) && this.foreignContext.shift(), this.isVoidElement(T))
|
|
23748
23748
|
this.htmlMode && T === "br" && ((n = (i = this.cbs).onopentagname) === null || n === void 0 || n.call(i, "br"), (h = (c = this.cbs).onopentag) === null || h === void 0 || h.call(c, "br", {}, true), (f = (m = this.cbs).onclosetag) === null || f === void 0 || f.call(m, "br", false));
|
|
23749
23749
|
else {
|
|
23750
|
-
const
|
|
23751
|
-
if (
|
|
23752
|
-
for (let w = 0; w <=
|
|
23750
|
+
const A = this.stack.indexOf(T);
|
|
23751
|
+
if (A !== -1)
|
|
23752
|
+
for (let w = 0; w <= A; w++) {
|
|
23753
23753
|
const v = this.stack.shift();
|
|
23754
|
-
(a = (r = this.cbs).onclosetag) === null || a === void 0 || a.call(r, v, w !==
|
|
23754
|
+
(a = (r = this.cbs).onclosetag) === null || a === void 0 || a.call(r, v, w !== A);
|
|
23755
23755
|
}
|
|
23756
23756
|
else this.htmlMode && T === "p" && (this.emitOpenTag("p"), this.closeCurrentTag(true));
|
|
23757
23757
|
}
|
|
@@ -23817,10 +23817,10 @@ let xi = class {
|
|
|
23817
23817
|
}
|
|
23818
23818
|
/** @internal */
|
|
23819
23819
|
oncdata(t, u, r) {
|
|
23820
|
-
var a, i, n, c, h, m, f, T,
|
|
23820
|
+
var a, i, n, c, h, m, f, T, A, w;
|
|
23821
23821
|
this.endIndex = u;
|
|
23822
23822
|
const v = this.getSlice(t, u - r);
|
|
23823
|
-
!this.htmlMode || this.options.recognizeCDATA ? ((i = (a = this.cbs).oncdatastart) === null || i === void 0 || i.call(a), (c = (n = this.cbs).ontext) === null || c === void 0 || c.call(n, v), (m = (h = this.cbs).oncdataend) === null || m === void 0 || m.call(h)) : ((T = (f = this.cbs).oncomment) === null || T === void 0 || T.call(f, `[CDATA[${v}]]`), (w = (
|
|
23823
|
+
!this.htmlMode || this.options.recognizeCDATA ? ((i = (a = this.cbs).oncdatastart) === null || i === void 0 || i.call(a), (c = (n = this.cbs).ontext) === null || c === void 0 || c.call(n, v), (m = (h = this.cbs).oncdataend) === null || m === void 0 || m.call(h)) : ((T = (f = this.cbs).oncomment) === null || T === void 0 || T.call(f, `[CDATA[${v}]]`), (w = (A = this.cbs).oncommentend) === null || w === void 0 || w.call(A)), this.startIndex = u + 1;
|
|
23824
23824
|
}
|
|
23825
23825
|
/** @internal */
|
|
23826
23826
|
onend() {
|
|
@@ -23948,11 +23948,11 @@ function Ci(e, t) {
|
|
|
23948
23948
|
if (typeof t == "function") {
|
|
23949
23949
|
if (typeof e != "string")
|
|
23950
23950
|
throw new Error("Bad combination of arguments.");
|
|
23951
|
-
return P
|
|
23951
|
+
return P(this, (u, r) => {
|
|
23952
23952
|
I(u) && Oe(u, e, t.call(u, r, u.attribs[e]));
|
|
23953
23953
|
});
|
|
23954
23954
|
}
|
|
23955
|
-
return P
|
|
23955
|
+
return P(this, (u) => {
|
|
23956
23956
|
if (I(u))
|
|
23957
23957
|
if (typeof e == "object")
|
|
23958
23958
|
for (const r of Object.keys(e)) {
|
|
@@ -24013,11 +24013,11 @@ function yi(e, t) {
|
|
|
24013
24013
|
if (typeof t == "function") {
|
|
24014
24014
|
if (typeof e == "object")
|
|
24015
24015
|
throw new TypeError("Bad combination of arguments.");
|
|
24016
|
-
return P
|
|
24016
|
+
return P(this, (r, a) => {
|
|
24017
24017
|
I(r) && Ft$1(r, e, t.call(r, a, $u(r, e, this.options.xmlMode)), this.options.xmlMode);
|
|
24018
24018
|
});
|
|
24019
24019
|
}
|
|
24020
|
-
return P
|
|
24020
|
+
return P(this, (r) => {
|
|
24021
24021
|
if (I(r))
|
|
24022
24022
|
if (typeof e == "object")
|
|
24023
24023
|
for (const a of Object.keys(e)) {
|
|
@@ -24072,7 +24072,7 @@ function Ri(e, t) {
|
|
|
24072
24072
|
if (!r || !I(r))
|
|
24073
24073
|
return;
|
|
24074
24074
|
const a = r;
|
|
24075
|
-
return (u = a.data) !== null && u !== void 0 || (a.data = {}), e == null ? Oi(a) : typeof e == "object" || t !== void 0 ? (P
|
|
24075
|
+
return (u = a.data) !== null && u !== void 0 || (a.data = {}), e == null ? Oi(a) : typeof e == "object" || t !== void 0 ? (P(this, (i) => {
|
|
24076
24076
|
I(i) && (typeof e == "object" ? Gu(i, e) : Gu(i, e, t));
|
|
24077
24077
|
}), this) : Li(a, e);
|
|
24078
24078
|
}
|
|
@@ -24110,7 +24110,7 @@ function pt(e) {
|
|
|
24110
24110
|
function ki(e) {
|
|
24111
24111
|
const t = pt(e);
|
|
24112
24112
|
for (const u of t)
|
|
24113
|
-
P
|
|
24113
|
+
P(this, (r) => {
|
|
24114
24114
|
I(r) && Mr(r, u);
|
|
24115
24115
|
});
|
|
24116
24116
|
return this;
|
|
@@ -24130,7 +24130,7 @@ function Pi(e) {
|
|
|
24130
24130
|
}
|
|
24131
24131
|
function Br(e) {
|
|
24132
24132
|
if (typeof e == "function")
|
|
24133
|
-
return P
|
|
24133
|
+
return P(this, (r, a) => {
|
|
24134
24134
|
if (I(r)) {
|
|
24135
24135
|
const i = r.attribs.class || "";
|
|
24136
24136
|
Br.call([r], e.call(r, a, i));
|
|
@@ -24158,11 +24158,11 @@ function Br(e) {
|
|
|
24158
24158
|
}
|
|
24159
24159
|
function Ur(e) {
|
|
24160
24160
|
if (typeof e == "function")
|
|
24161
|
-
return P
|
|
24161
|
+
return P(this, (a, i) => {
|
|
24162
24162
|
I(a) && Ur.call([a], e.call(a, i, a.attribs.class || ""));
|
|
24163
24163
|
});
|
|
24164
24164
|
const t = pt(e), u = t.length, r = arguments.length === 0;
|
|
24165
|
-
return P
|
|
24165
|
+
return P(this, (a) => {
|
|
24166
24166
|
if (I(a))
|
|
24167
24167
|
if (r)
|
|
24168
24168
|
a.attribs.class = "";
|
|
@@ -24179,7 +24179,7 @@ function Ur(e) {
|
|
|
24179
24179
|
}
|
|
24180
24180
|
function Fr(e, t) {
|
|
24181
24181
|
if (typeof e == "function")
|
|
24182
|
-
return P
|
|
24182
|
+
return P(this, (n, c) => {
|
|
24183
24183
|
I(n) && Fr.call([n], e.call(n, c, n.attribs.class || "", t), t);
|
|
24184
24184
|
});
|
|
24185
24185
|
if (!e || typeof e != "string")
|
|
@@ -24214,17 +24214,17 @@ var N;
|
|
|
24214
24214
|
(function(e) {
|
|
24215
24215
|
e.Attribute = "attribute", e.Pseudo = "pseudo", e.PseudoElement = "pseudo-element", e.Tag = "tag", e.Universal = "universal", e.Adjacent = "adjacent", e.Child = "child", e.Descendant = "descendant", e.Parent = "parent", e.Sibling = "sibling", e.ColumnCombinator = "column-combinator";
|
|
24216
24216
|
})(N || (N = {}));
|
|
24217
|
-
var H
|
|
24217
|
+
var H;
|
|
24218
24218
|
(function(e) {
|
|
24219
24219
|
e.Any = "any", e.Element = "element", e.End = "end", e.Equals = "equals", e.Exists = "exists", e.Hyphen = "hyphen", e.Not = "not", e.Start = "start";
|
|
24220
|
-
})(H
|
|
24220
|
+
})(H || (H = {}));
|
|
24221
24221
|
const Wu = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/, Bi = /\\([\da-f]{1,6}\s?|(\s)|.)/gi, Ui = /* @__PURE__ */ new Map([
|
|
24222
|
-
[126, H
|
|
24223
|
-
[94, H
|
|
24224
|
-
[36, H
|
|
24225
|
-
[42, H
|
|
24226
|
-
[33, H
|
|
24227
|
-
[124, H
|
|
24222
|
+
[126, H.Element],
|
|
24223
|
+
[94, H.Start],
|
|
24224
|
+
[36, H.End],
|
|
24225
|
+
[42, H.Any],
|
|
24226
|
+
[33, H.Not],
|
|
24227
|
+
[124, H.Hyphen]
|
|
24228
24228
|
]), Fi = /* @__PURE__ */ new Set([
|
|
24229
24229
|
"has",
|
|
24230
24230
|
"not",
|
|
@@ -24275,30 +24275,30 @@ function Ct$1(e) {
|
|
|
24275
24275
|
}
|
|
24276
24276
|
function Hr(e, t, u) {
|
|
24277
24277
|
let r = [];
|
|
24278
|
-
function a(
|
|
24279
|
-
const w = t.slice(u +
|
|
24278
|
+
function a(A) {
|
|
24279
|
+
const w = t.slice(u + A).match(Wu);
|
|
24280
24280
|
if (!w)
|
|
24281
24281
|
throw new Error(`Expected name, found ${t.slice(u)}`);
|
|
24282
24282
|
const [v] = w;
|
|
24283
|
-
return u +=
|
|
24283
|
+
return u += A + v.length, Be(v);
|
|
24284
24284
|
}
|
|
24285
|
-
function i(
|
|
24286
|
-
for (u +=
|
|
24285
|
+
function i(A) {
|
|
24286
|
+
for (u += A; u < t.length && zu(t.charCodeAt(u)); )
|
|
24287
24287
|
u++;
|
|
24288
24288
|
}
|
|
24289
24289
|
function n() {
|
|
24290
24290
|
u += 1;
|
|
24291
|
-
const
|
|
24291
|
+
const A = u;
|
|
24292
24292
|
let w = 1;
|
|
24293
24293
|
for (; w > 0 && u < t.length; u++)
|
|
24294
24294
|
t.charCodeAt(u) === 40 && !c(u) ? w++ : t.charCodeAt(u) === 41 && !c(u) && w--;
|
|
24295
24295
|
if (w)
|
|
24296
24296
|
throw new Error("Parenthesis not matched");
|
|
24297
|
-
return Be(t.slice(
|
|
24297
|
+
return Be(t.slice(A, u - 1));
|
|
24298
24298
|
}
|
|
24299
|
-
function c(
|
|
24299
|
+
function c(A) {
|
|
24300
24300
|
let w = 0;
|
|
24301
|
-
for (; t.charCodeAt(--
|
|
24301
|
+
for (; t.charCodeAt(--A) === 92; )
|
|
24302
24302
|
w++;
|
|
24303
24303
|
return (w & 1) === 1;
|
|
24304
24304
|
}
|
|
@@ -24306,17 +24306,17 @@ function Hr(e, t, u) {
|
|
|
24306
24306
|
if (r.length > 0 && qe(r[r.length - 1]))
|
|
24307
24307
|
throw new Error("Did not expect successive traversals.");
|
|
24308
24308
|
}
|
|
24309
|
-
function m(
|
|
24309
|
+
function m(A) {
|
|
24310
24310
|
if (r.length > 0 && r[r.length - 1].type === N.Descendant) {
|
|
24311
|
-
r[r.length - 1].type =
|
|
24311
|
+
r[r.length - 1].type = A;
|
|
24312
24312
|
return;
|
|
24313
24313
|
}
|
|
24314
|
-
h(), r.push({ type:
|
|
24314
|
+
h(), r.push({ type: A });
|
|
24315
24315
|
}
|
|
24316
|
-
function f(
|
|
24316
|
+
function f(A, w) {
|
|
24317
24317
|
r.push({
|
|
24318
24318
|
type: N.Attribute,
|
|
24319
|
-
name:
|
|
24319
|
+
name: A,
|
|
24320
24320
|
action: w,
|
|
24321
24321
|
value: a(1),
|
|
24322
24322
|
namespace: null,
|
|
@@ -24331,8 +24331,8 @@ function Hr(e, t, u) {
|
|
|
24331
24331
|
if (i(0), t.length === u)
|
|
24332
24332
|
return u;
|
|
24333
24333
|
e: for (; u < t.length; ) {
|
|
24334
|
-
const
|
|
24335
|
-
switch (
|
|
24334
|
+
const A = t.charCodeAt(u);
|
|
24335
|
+
switch (A) {
|
|
24336
24336
|
// Whitespace
|
|
24337
24337
|
case 32:
|
|
24338
24338
|
case 9:
|
|
@@ -24361,25 +24361,25 @@ function Hr(e, t, u) {
|
|
|
24361
24361
|
}
|
|
24362
24362
|
// Special attribute selectors: .class, #id
|
|
24363
24363
|
case 46: {
|
|
24364
|
-
f("class", H
|
|
24364
|
+
f("class", H.Element);
|
|
24365
24365
|
break;
|
|
24366
24366
|
}
|
|
24367
24367
|
case 35: {
|
|
24368
|
-
f("id", H
|
|
24368
|
+
f("id", H.Equals);
|
|
24369
24369
|
break;
|
|
24370
24370
|
}
|
|
24371
24371
|
case 91: {
|
|
24372
24372
|
i(1);
|
|
24373
24373
|
let w, v = null;
|
|
24374
24374
|
t.charCodeAt(u) === 124 ? w = a(1) : t.startsWith("*|", u) ? (v = "*", w = a(2)) : (w = a(0), t.charCodeAt(u) === 124 && t.charCodeAt(u + 1) !== 61 && (v = w, w = a(1))), i(0);
|
|
24375
|
-
let S = H
|
|
24375
|
+
let S = H.Exists;
|
|
24376
24376
|
const U2 = Ui.get(t.charCodeAt(u));
|
|
24377
24377
|
if (U2) {
|
|
24378
24378
|
if (S = U2, t.charCodeAt(u + 1) !== 61)
|
|
24379
24379
|
throw new Error("Expected `=`");
|
|
24380
24380
|
i(2);
|
|
24381
|
-
} else t.charCodeAt(u) === 61 && (S = H
|
|
24382
|
-
let M2 = "",
|
|
24381
|
+
} else t.charCodeAt(u) === 61 && (S = H.Equals, i(1));
|
|
24382
|
+
let M2 = "", ee2 = null;
|
|
24383
24383
|
if (S !== "exists") {
|
|
24384
24384
|
if (Ht$1(t.charCodeAt(u))) {
|
|
24385
24385
|
const ge = t.charCodeAt(u);
|
|
@@ -24397,7 +24397,7 @@ function Hr(e, t, u) {
|
|
|
24397
24397
|
}
|
|
24398
24398
|
i(0);
|
|
24399
24399
|
const ae = t.charCodeAt(u) | 32;
|
|
24400
|
-
ae === 115 ? (
|
|
24400
|
+
ae === 115 ? (ee2 = false, i(1)) : ae === 105 && (ee2 = true, i(1));
|
|
24401
24401
|
}
|
|
24402
24402
|
if (t.charCodeAt(u) !== 93)
|
|
24403
24403
|
throw new Error("Attribute selector didn't terminate");
|
|
@@ -24408,7 +24408,7 @@ function Hr(e, t, u) {
|
|
|
24408
24408
|
action: S,
|
|
24409
24409
|
value: M2,
|
|
24410
24410
|
namespace: v,
|
|
24411
|
-
ignoreCase:
|
|
24411
|
+
ignoreCase: ee2
|
|
24412
24412
|
};
|
|
24413
24413
|
r.push(he);
|
|
24414
24414
|
break;
|
|
@@ -24454,9 +24454,9 @@ function Hr(e, t, u) {
|
|
|
24454
24454
|
break;
|
|
24455
24455
|
}
|
|
24456
24456
|
let w = null, v;
|
|
24457
|
-
if (
|
|
24457
|
+
if (A === 42)
|
|
24458
24458
|
u += 1, v = "*";
|
|
24459
|
-
else if (
|
|
24459
|
+
else if (A === 124) {
|
|
24460
24460
|
if (v = "", t.charCodeAt(u + 1) === 124) {
|
|
24461
24461
|
m(N.ColumnCombinator), i(2);
|
|
24462
24462
|
break;
|
|
@@ -24496,12 +24496,12 @@ function Au(e) {
|
|
|
24496
24496
|
return !qr.has(e.type);
|
|
24497
24497
|
}
|
|
24498
24498
|
const Vi = /* @__PURE__ */ new Map([
|
|
24499
|
-
[H
|
|
24500
|
-
[H
|
|
24501
|
-
[H
|
|
24502
|
-
[H
|
|
24503
|
-
[H
|
|
24504
|
-
[H
|
|
24499
|
+
[H.Exists, 10],
|
|
24500
|
+
[H.Equals, 8],
|
|
24501
|
+
[H.Not, 7],
|
|
24502
|
+
[H.Start, 6],
|
|
24503
|
+
[H.End, 6],
|
|
24504
|
+
[H.Any, 5]
|
|
24505
24505
|
]);
|
|
24506
24506
|
function $i(e) {
|
|
24507
24507
|
const t = e.map(Yr);
|
|
@@ -24517,7 +24517,7 @@ function $i(e) {
|
|
|
24517
24517
|
function Yr(e) {
|
|
24518
24518
|
var t, u;
|
|
24519
24519
|
let r = (t = qr.get(e.type)) !== null && t !== void 0 ? t : -1;
|
|
24520
|
-
return e.type === N.Attribute ? (r = (u = Vi.get(e.action)) !== null && u !== void 0 ? u : 4, e.action === H
|
|
24520
|
+
return e.type === N.Attribute ? (r = (u = Vi.get(e.action)) !== null && u !== void 0 ? u : 4, e.action === H.Equals && e.name === "id" && (r = 9), e.ignoreCase && (r >>= 1)) : e.type === N.Pseudo && (e.data ? e.name === "has" || e.name === "contains" ? r = 0 : Array.isArray(e.data) ? (r = Math.min(...e.data.map((a) => Math.min(...a.map(Yr)))), r < 0 && (r = 0)) : r = 2 : r = 3), r;
|
|
24521
24521
|
}
|
|
24522
24522
|
const Gi = /[-[\]{}()*+?.,\\^$|#\s]/g;
|
|
24523
24523
|
function Ku(e) {
|
|
@@ -24775,11 +24775,11 @@ const eu = {
|
|
|
24775
24775
|
const { equals: a } = u;
|
|
24776
24776
|
return !r || r.length === 0 ? eu.root(e, t, u) : r.length === 1 ? (i) => a(r[0], i) && e(i) : (i) => r.includes(i) && e(i);
|
|
24777
24777
|
},
|
|
24778
|
-
hover: Yt
|
|
24779
|
-
visited: Yt
|
|
24780
|
-
active: Yt
|
|
24778
|
+
hover: Yt("isHovered"),
|
|
24779
|
+
visited: Yt("isVisited"),
|
|
24780
|
+
active: Yt("isActive")
|
|
24781
24781
|
};
|
|
24782
|
-
function Yt
|
|
24782
|
+
function Yt(e) {
|
|
24783
24783
|
return function(u, r, { adapter: a }) {
|
|
24784
24784
|
const i = a[e];
|
|
24785
24785
|
return typeof i != "function" ? C.falseFunc : function(c) {
|
|
@@ -24930,7 +24930,7 @@ const jt = (e, t, u, r, a) => {
|
|
|
24930
24930
|
if (!e(T))
|
|
24931
24931
|
return false;
|
|
24932
24932
|
c[0] = T;
|
|
24933
|
-
const
|
|
24933
|
+
const A = i.getChildren(T), w = f ? [...A, ...Vr(T, i)] : A;
|
|
24934
24934
|
return i.existsOne(m, w);
|
|
24935
24935
|
};
|
|
24936
24936
|
}
|
|
@@ -25049,10 +25049,10 @@ function un(e, t, u, r, a) {
|
|
|
25049
25049
|
const m = i.getSiblings(h);
|
|
25050
25050
|
let f;
|
|
25051
25051
|
for (let T = 0; T < m.length; T++) {
|
|
25052
|
-
const
|
|
25053
|
-
if (n(h,
|
|
25052
|
+
const A = m[T];
|
|
25053
|
+
if (n(h, A))
|
|
25054
25054
|
break;
|
|
25055
|
-
i.isTag(
|
|
25055
|
+
i.isTag(A) && (f = A);
|
|
25056
25056
|
}
|
|
25057
25057
|
return !!f && e(f);
|
|
25058
25058
|
};
|
|
@@ -25262,29 +25262,29 @@ function Jr(e, t, u) {
|
|
|
25262
25262
|
var r;
|
|
25263
25263
|
if (e.some(qe)) {
|
|
25264
25264
|
const a = (r = u.root) !== null && r !== void 0 ? r : bn(t[0]), i = { ...u, context: t, relativeSelector: false };
|
|
25265
|
-
return e.push(Tn), Et
|
|
25265
|
+
return e.push(Tn), Et(a, e, i, true, t.length);
|
|
25266
25266
|
}
|
|
25267
|
-
return Et
|
|
25267
|
+
return Et(t, e, u, false, t.length);
|
|
25268
25268
|
}
|
|
25269
25269
|
function gn(e, t, u = {}, r = 1 / 0) {
|
|
25270
25270
|
if (typeof e == "function")
|
|
25271
25271
|
return es(t, e);
|
|
25272
|
-
const [a, i] = wu(Ct$1(e)), n = i.map((c) => Et
|
|
25272
|
+
const [a, i] = wu(Ct$1(e)), n = i.map((c) => Et(t, c, u, true, r));
|
|
25273
25273
|
return a.length && n.push(uu(t, a, u, r)), n.length === 0 ? [] : n.length === 1 ? n[0] : ke(n.reduce((c, h) => [...c, ...h]));
|
|
25274
25274
|
}
|
|
25275
|
-
function Et
|
|
25275
|
+
function Et(e, t, u, r, a) {
|
|
25276
25276
|
const i = t.findIndex(bt$1), n = t.slice(0, i), c = t[i], h = t.length - 1 === i ? a : 1 / 0, m = fn(c.name, c.data, h);
|
|
25277
25277
|
if (m === 0)
|
|
25278
25278
|
return [];
|
|
25279
25279
|
const T = (n.length === 0 && !Array.isArray(e) ? It$1(e).filter(I) : n.length === 0 ? (Array.isArray(e) ? e : [e]).filter(I) : r || n.some(qe) ? uu(e, [n], u, m) : ru(e, [n], u)).slice(0, m);
|
|
25280
|
-
let
|
|
25281
|
-
if (
|
|
25282
|
-
return
|
|
25280
|
+
let A = _n(c.name, T, c.data, u);
|
|
25281
|
+
if (A.length === 0 || t.length === i + 1)
|
|
25282
|
+
return A;
|
|
25283
25283
|
const w = t.slice(i + 1), v = w.some(qe);
|
|
25284
25284
|
if (v) {
|
|
25285
25285
|
if (qe(w[0])) {
|
|
25286
25286
|
const { type: S } = w[0];
|
|
25287
|
-
(S === N.Sibling || S === N.Adjacent) && (
|
|
25287
|
+
(S === N.Sibling || S === N.Adjacent) && (A = zr(A, St$1, true)), w.unshift(En);
|
|
25288
25288
|
}
|
|
25289
25289
|
u = {
|
|
25290
25290
|
...u,
|
|
@@ -25294,15 +25294,15 @@ function Et$1(e, t, u, r, a) {
|
|
|
25294
25294
|
* Add a custom root func, to make sure traversals don't match elements
|
|
25295
25295
|
* that aren't a part of the considered tree.
|
|
25296
25296
|
*/
|
|
25297
|
-
rootFunc: (S) =>
|
|
25297
|
+
rootFunc: (S) => A.includes(S)
|
|
25298
25298
|
};
|
|
25299
25299
|
} else u.rootFunc && u.rootFunc !== ft.trueFunc && (u = { ...u, rootFunc: ft.trueFunc });
|
|
25300
|
-
return w.some(bt$1) ? Et
|
|
25300
|
+
return w.some(bt$1) ? Et(A, w, u, false, a) : v ? (
|
|
25301
25301
|
// Query existing elements to resolve traversal.
|
|
25302
|
-
uu(
|
|
25302
|
+
uu(A, [w], u, a)
|
|
25303
25303
|
) : (
|
|
25304
25304
|
// If we don't have any more traversals, simply filter elements.
|
|
25305
|
-
ru(
|
|
25305
|
+
ru(A, [w], u)
|
|
25306
25306
|
);
|
|
25307
25307
|
}
|
|
25308
25308
|
function uu(e, t, u, r) {
|
|
@@ -25375,13 +25375,13 @@ function Iu(e, ...t) {
|
|
|
25375
25375
|
let u = null;
|
|
25376
25376
|
const r = Nu((a, i) => {
|
|
25377
25377
|
const n = [];
|
|
25378
|
-
return P
|
|
25378
|
+
return P(i, (c) => {
|
|
25379
25379
|
for (let h; (h = a(c)) && !u?.(h, n.length); c = h)
|
|
25380
25380
|
n.push(h);
|
|
25381
25381
|
}), n;
|
|
25382
25382
|
})(e, ...t);
|
|
25383
25383
|
return function(a, i) {
|
|
25384
|
-
u = typeof a == "string" ? (c) => Qr(c, a, this.options) : a ? tt(a) : null;
|
|
25384
|
+
u = typeof a == "string" ? (c) => Qr(c, a, this.options) : a ? tt$1(a) : null;
|
|
25385
25385
|
const n = r.call(this, i);
|
|
25386
25386
|
return u = null, n;
|
|
25387
25387
|
};
|
|
@@ -25403,8 +25403,8 @@ function Sn(e) {
|
|
|
25403
25403
|
const r = {
|
|
25404
25404
|
xmlMode: this.options.xmlMode,
|
|
25405
25405
|
root: (t = this._root) === null || t === void 0 ? void 0 : t[0]
|
|
25406
|
-
}, a = typeof e == "string" ? (i) => Qr(i, e, r) : tt(e);
|
|
25407
|
-
return P
|
|
25406
|
+
}, a = typeof e == "string" ? (i) => Qr(i, e, r) : tt$1(e);
|
|
25407
|
+
return P(this, (i) => {
|
|
25408
25408
|
for (i && !Te(i) && !I(i) && (i = i.parent); i && I(i); ) {
|
|
25409
25409
|
if (a(i, 0)) {
|
|
25410
25410
|
u.includes(i) || u.push(i);
|
|
@@ -25426,7 +25426,7 @@ const Cn = xu((e) => fu(e)), yn = et((e) => {
|
|
|
25426
25426
|
return t;
|
|
25427
25427
|
}, Pe), Dn = Iu((e) => bu(e), Pe), kn = et((e) => Cr(e).filter((t) => I(t) && t !== e), ke), Pn = et((e) => It$1(e).filter(I), Pe);
|
|
25428
25428
|
function Mn() {
|
|
25429
|
-
const e = this.toArray().reduce((t, u) => B
|
|
25429
|
+
const e = this.toArray().reduce((t, u) => B(u) ? t.concat(u.children) : t, []);
|
|
25430
25430
|
return this._make(e);
|
|
25431
25431
|
}
|
|
25432
25432
|
function Bn(e) {
|
|
@@ -25444,7 +25444,7 @@ function Un(e) {
|
|
|
25444
25444
|
}
|
|
25445
25445
|
return this._make(t);
|
|
25446
25446
|
}
|
|
25447
|
-
function tt(e) {
|
|
25447
|
+
function tt$1(e) {
|
|
25448
25448
|
return typeof e == "function" ? (t, u) => e.call(t, u, t) : de(e) ? (t) => Array.prototype.includes.call(e, t) : function(t) {
|
|
25449
25449
|
return e === t;
|
|
25450
25450
|
};
|
|
@@ -25454,11 +25454,11 @@ function Fn(e) {
|
|
|
25454
25454
|
return this._make(Su(this.toArray(), e, this.options.xmlMode, (t = this._root) === null || t === void 0 ? void 0 : t[0]));
|
|
25455
25455
|
}
|
|
25456
25456
|
function Su(e, t, u, r) {
|
|
25457
|
-
return typeof t == "string" ? Xr(t, e, { xmlMode: u, root: r }) : e.filter(tt(t));
|
|
25457
|
+
return typeof t == "string" ? Xr(t, e, { xmlMode: u, root: r }) : e.filter(tt$1(t));
|
|
25458
25458
|
}
|
|
25459
25459
|
function Hn(e) {
|
|
25460
25460
|
const t = this.toArray();
|
|
25461
|
-
return typeof e == "string" ? Kr(t.filter(I), e, this.options) : e ? t.some(tt(e)) : false;
|
|
25461
|
+
return typeof e == "string" ? Kr(t.filter(I), e, this.options) : e ? t.some(tt$1(e)) : false;
|
|
25462
25462
|
}
|
|
25463
25463
|
function qn(e) {
|
|
25464
25464
|
let t = this.toArray();
|
|
@@ -25466,7 +25466,7 @@ function qn(e) {
|
|
|
25466
25466
|
const u = new Set(Xr(e, t, this.options));
|
|
25467
25467
|
t = t.filter((r) => !u.has(r));
|
|
25468
25468
|
} else {
|
|
25469
|
-
const u = tt(e);
|
|
25469
|
+
const u = tt$1(e);
|
|
25470
25470
|
t = t.filter((r, a) => !u(r, a));
|
|
25471
25471
|
}
|
|
25472
25472
|
return this._make(t);
|
|
@@ -25594,8 +25594,8 @@ function to(e, t) {
|
|
|
25594
25594
|
function ts(e) {
|
|
25595
25595
|
return function(...t) {
|
|
25596
25596
|
const u = this.length - 1;
|
|
25597
|
-
return P
|
|
25598
|
-
if (!B
|
|
25597
|
+
return P(this, (r, a) => {
|
|
25598
|
+
if (!B(r))
|
|
25599
25599
|
return;
|
|
25600
25600
|
const i = typeof t[0] == "function" ? t[0].call(r, a, this._render(r.children)) : t, n = this._makeDomArray(i, a < u);
|
|
25601
25601
|
e(n, r.children, r);
|
|
@@ -25610,10 +25610,10 @@ function _e(e, t, u, r, a) {
|
|
|
25610
25610
|
...r
|
|
25611
25611
|
], h = t === 0 ? null : e[t - 1], m = t + u >= e.length ? null : e[t + u];
|
|
25612
25612
|
for (let f = 0; f < r.length; ++f) {
|
|
25613
|
-
const T = r[f],
|
|
25614
|
-
if (
|
|
25615
|
-
const v =
|
|
25616
|
-
v !== -1 && (
|
|
25613
|
+
const T = r[f], A = T.parent;
|
|
25614
|
+
if (A) {
|
|
25615
|
+
const v = A.children.indexOf(T);
|
|
25616
|
+
v !== -1 && (A.children.splice(v, 1), a === A && t > v && c[0]--);
|
|
25617
25617
|
}
|
|
25618
25618
|
T.parent = a, T.prev && (T.prev.next = (i = T.next) !== null && i !== void 0 ? i : null), T.next && (T.next.prev = (n = T.prev) !== null && n !== void 0 ? n : null), T.prev = f === 0 ? h : r[f - 1], T.next = f === r.length - 1 ? m : r[f + 1];
|
|
25619
25619
|
}
|
|
@@ -25634,8 +25634,8 @@ function us(e) {
|
|
|
25634
25634
|
return function(t) {
|
|
25635
25635
|
const u = this.length - 1, r = this.parents().last();
|
|
25636
25636
|
for (let a = 0; a < this.length; a++) {
|
|
25637
|
-
const i = this[a], n = typeof t == "function" ? t.call(i, a, i) : typeof t == "string" && !Xt(t) ? r.find(t).clone() : t, [c] = this._makeDomArray(n, a < u);
|
|
25638
|
-
if (!c || !B
|
|
25637
|
+
const i = this[a], n = typeof t == "function" ? t.call(i, a, i) : typeof t == "string" && !Xt$1(t) ? r.find(t).clone() : t, [c] = this._makeDomArray(n, a < u);
|
|
25638
|
+
if (!c || !B(c))
|
|
25639
25639
|
continue;
|
|
25640
25640
|
let h = c, m = 0;
|
|
25641
25641
|
for (; m < h.children.length; ) {
|
|
@@ -25654,7 +25654,7 @@ const io = us((e, t, u) => {
|
|
|
25654
25654
|
const a = r.children, i = a.indexOf(e);
|
|
25655
25655
|
xe([e], t), _e(a, i, 0, u, r);
|
|
25656
25656
|
}), no = us((e, t, u) => {
|
|
25657
|
-
B
|
|
25657
|
+
B(e) && (xe(e.children, t), xe(u, e));
|
|
25658
25658
|
});
|
|
25659
25659
|
function oo(e) {
|
|
25660
25660
|
return this.parent(e).not("body").each((t, u) => {
|
|
@@ -25679,8 +25679,8 @@ function co(e) {
|
|
|
25679
25679
|
}
|
|
25680
25680
|
function ho(...e) {
|
|
25681
25681
|
const t = this.length - 1;
|
|
25682
|
-
return P
|
|
25683
|
-
if (!B
|
|
25682
|
+
return P(this, (u, r) => {
|
|
25683
|
+
if (!B(u) || !u.parent)
|
|
25684
25684
|
return;
|
|
25685
25685
|
const a = u.parent.children, i = a.indexOf(u);
|
|
25686
25686
|
if (i === -1)
|
|
@@ -25703,8 +25703,8 @@ function lo(e) {
|
|
|
25703
25703
|
}
|
|
25704
25704
|
function mo(...e) {
|
|
25705
25705
|
const t = this.length - 1;
|
|
25706
|
-
return P
|
|
25707
|
-
if (!B
|
|
25706
|
+
return P(this, (u, r) => {
|
|
25707
|
+
if (!B(u) || !u.parent)
|
|
25708
25708
|
return;
|
|
25709
25709
|
const a = u.parent.children, i = a.indexOf(u);
|
|
25710
25710
|
if (i === -1)
|
|
@@ -25717,7 +25717,7 @@ function po(e) {
|
|
|
25717
25717
|
const t = this._make(e);
|
|
25718
25718
|
this.remove();
|
|
25719
25719
|
const u = [];
|
|
25720
|
-
return P
|
|
25720
|
+
return P(t, (r) => {
|
|
25721
25721
|
const a = this.clone().toArray(), { parent: i } = r;
|
|
25722
25722
|
if (!i)
|
|
25723
25723
|
return;
|
|
@@ -25727,12 +25727,12 @@ function po(e) {
|
|
|
25727
25727
|
}
|
|
25728
25728
|
function fo(e) {
|
|
25729
25729
|
const t = e ? this.filter(e) : this;
|
|
25730
|
-
return P
|
|
25730
|
+
return P(t, (u) => {
|
|
25731
25731
|
Ie(u), u.prev = u.next = u.parent = null;
|
|
25732
25732
|
}), this;
|
|
25733
25733
|
}
|
|
25734
25734
|
function bo(e) {
|
|
25735
|
-
return P
|
|
25735
|
+
return P(this, (t, u) => {
|
|
25736
25736
|
const { parent: r } = t;
|
|
25737
25737
|
if (!r)
|
|
25738
25738
|
return;
|
|
@@ -25743,8 +25743,8 @@ function bo(e) {
|
|
|
25743
25743
|
});
|
|
25744
25744
|
}
|
|
25745
25745
|
function Eo() {
|
|
25746
|
-
return P
|
|
25747
|
-
if (B
|
|
25746
|
+
return P(this, (e) => {
|
|
25747
|
+
if (B(e)) {
|
|
25748
25748
|
for (const t of e.children)
|
|
25749
25749
|
t.next = t.prev = t.parent = null;
|
|
25750
25750
|
e.children.length = 0;
|
|
@@ -25754,10 +25754,10 @@ function Eo() {
|
|
|
25754
25754
|
function To(e) {
|
|
25755
25755
|
if (e === void 0) {
|
|
25756
25756
|
const t = this[0];
|
|
25757
|
-
return !t || !B
|
|
25757
|
+
return !t || !B(t) ? null : this._render(t.children);
|
|
25758
25758
|
}
|
|
25759
|
-
return P
|
|
25760
|
-
if (!B
|
|
25759
|
+
return P(this, (t) => {
|
|
25760
|
+
if (!B(t))
|
|
25761
25761
|
return;
|
|
25762
25762
|
for (const r of t.children)
|
|
25763
25763
|
r.next = r.prev = r.parent = null;
|
|
@@ -25769,8 +25769,8 @@ function _o() {
|
|
|
25769
25769
|
return this._render(this);
|
|
25770
25770
|
}
|
|
25771
25771
|
function go(e) {
|
|
25772
|
-
return e === void 0 ? Qe(this) : typeof e == "function" ? P
|
|
25773
|
-
if (!B
|
|
25772
|
+
return e === void 0 ? Qe(this) : typeof e == "function" ? P(this, (t, u) => this._make(t).text(e.call(t, u, Qe([t])))) : P(this, (t) => {
|
|
25773
|
+
if (!B(t))
|
|
25774
25774
|
return;
|
|
25775
25775
|
for (const r of t.children)
|
|
25776
25776
|
r.next = r.prev = r.parent = null;
|
|
@@ -25810,7 +25810,7 @@ const vo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
25810
25810
|
function wo(e, t) {
|
|
25811
25811
|
if (e != null && t != null || // When `prop` is a "plain" object
|
|
25812
25812
|
typeof e == "object" && !Array.isArray(e))
|
|
25813
|
-
return P
|
|
25813
|
+
return P(this, (u, r) => {
|
|
25814
25814
|
I(u) && rs(u, e, t, r);
|
|
25815
25815
|
});
|
|
25816
25816
|
if (this.length !== 0)
|
|
@@ -25943,26 +25943,26 @@ function ko(e, t) {
|
|
|
25943
25943
|
return function u(r, a, i = true) {
|
|
25944
25944
|
if (r == null)
|
|
25945
25945
|
throw new Error("cheerio.load() expects a string");
|
|
25946
|
-
const n = Kt
|
|
25946
|
+
const n = Kt(a), c = e(r, n, i, null);
|
|
25947
25947
|
class h extends ut {
|
|
25948
|
-
_make(T,
|
|
25949
|
-
const w = m(T,
|
|
25948
|
+
_make(T, A) {
|
|
25949
|
+
const w = m(T, A);
|
|
25950
25950
|
return w.prevObject = this, w;
|
|
25951
25951
|
}
|
|
25952
|
-
_parse(T,
|
|
25953
|
-
return e(T,
|
|
25952
|
+
_parse(T, A, w, v) {
|
|
25953
|
+
return e(T, A, w, v);
|
|
25954
25954
|
}
|
|
25955
25955
|
_render(T) {
|
|
25956
25956
|
return t(T, this.options);
|
|
25957
25957
|
}
|
|
25958
25958
|
}
|
|
25959
|
-
function m(f, T,
|
|
25959
|
+
function m(f, T, A = c, w) {
|
|
25960
25960
|
if (f && de(f))
|
|
25961
25961
|
return f;
|
|
25962
|
-
const v = Kt
|
|
25962
|
+
const v = Kt(w, n), S = typeof A == "string" ? [e(A, v, false, null)] : "length" in A ? A : [A], U2 = de(S) ? S : new h(S, null, v);
|
|
25963
25963
|
if (U2._root = U2, !f)
|
|
25964
25964
|
return new h(void 0, U2, v);
|
|
25965
|
-
const M2 = typeof f == "string" && Xt(f) ? (
|
|
25965
|
+
const M2 = typeof f == "string" && Xt$1(f) ? (
|
|
25966
25966
|
// $(<html>)
|
|
25967
25967
|
e(f, v, false, null).children
|
|
25968
25968
|
) : Po(f) ? (
|
|
@@ -25971,15 +25971,15 @@ function ko(e, t) {
|
|
|
25971
25971
|
) : Array.isArray(f) ? (
|
|
25972
25972
|
// $([dom])
|
|
25973
25973
|
f
|
|
25974
|
-
) : void 0,
|
|
25974
|
+
) : void 0, ee2 = new h(M2, U2, v);
|
|
25975
25975
|
if (M2)
|
|
25976
|
-
return
|
|
25976
|
+
return ee2;
|
|
25977
25977
|
if (typeof f != "string")
|
|
25978
25978
|
throw new TypeError("Unexpected type of selector");
|
|
25979
25979
|
let he = f;
|
|
25980
25980
|
const ae = T ? (
|
|
25981
25981
|
// If we don't have a context, maybe we have a root, from loading
|
|
25982
|
-
typeof T == "string" ? Xt(T) ? (
|
|
25982
|
+
typeof T == "string" ? Xt$1(T) ? (
|
|
25983
25983
|
// $('li', '<ul>...</ul>')
|
|
25984
25984
|
new h([e(T, v, false, null)], U2, v)
|
|
25985
25985
|
) : (
|
|
@@ -25993,7 +25993,7 @@ function ko(e, t) {
|
|
|
25993
25993
|
new h(Array.isArray(T) ? T : [T], U2, v)
|
|
25994
25994
|
)
|
|
25995
25995
|
) : U2;
|
|
25996
|
-
return ae ? ae.find(he) :
|
|
25996
|
+
return ae ? ae.find(he) : ee2;
|
|
25997
25997
|
}
|
|
25998
25998
|
return Object.assign(m, ni, {
|
|
25999
25999
|
load: u,
|
|
@@ -26056,7 +26056,7 @@ var o;
|
|
|
26056
26056
|
(function(e) {
|
|
26057
26057
|
e[e.EOF = -1] = "EOF", e[e.NULL = 0] = "NULL", e[e.TABULATION = 9] = "TABULATION", e[e.CARRIAGE_RETURN = 13] = "CARRIAGE_RETURN", e[e.LINE_FEED = 10] = "LINE_FEED", e[e.FORM_FEED = 12] = "FORM_FEED", e[e.SPACE = 32] = "SPACE", e[e.EXCLAMATION_MARK = 33] = "EXCLAMATION_MARK", e[e.QUOTATION_MARK = 34] = "QUOTATION_MARK", e[e.AMPERSAND = 38] = "AMPERSAND", e[e.APOSTROPHE = 39] = "APOSTROPHE", e[e.HYPHEN_MINUS = 45] = "HYPHEN_MINUS", e[e.SOLIDUS = 47] = "SOLIDUS", e[e.DIGIT_0 = 48] = "DIGIT_0", e[e.DIGIT_9 = 57] = "DIGIT_9", e[e.SEMICOLON = 59] = "SEMICOLON", e[e.LESS_THAN_SIGN = 60] = "LESS_THAN_SIGN", e[e.EQUALS_SIGN = 61] = "EQUALS_SIGN", e[e.GREATER_THAN_SIGN = 62] = "GREATER_THAN_SIGN", e[e.QUESTION_MARK = 63] = "QUESTION_MARK", e[e.LATIN_CAPITAL_A = 65] = "LATIN_CAPITAL_A", e[e.LATIN_CAPITAL_Z = 90] = "LATIN_CAPITAL_Z", e[e.RIGHT_SQUARE_BRACKET = 93] = "RIGHT_SQUARE_BRACKET", e[e.GRAVE_ACCENT = 96] = "GRAVE_ACCENT", e[e.LATIN_SMALL_A = 97] = "LATIN_SMALL_A", e[e.LATIN_SMALL_Z = 122] = "LATIN_SMALL_Z";
|
|
26058
26058
|
})(o || (o = {}));
|
|
26059
|
-
const z = {
|
|
26059
|
+
const z$1 = {
|
|
26060
26060
|
DASH_DASH: "--",
|
|
26061
26061
|
CDATA_START: "[CDATA[",
|
|
26062
26062
|
DOCTYPE: "doctype",
|
|
@@ -26166,10 +26166,10 @@ class Ho {
|
|
|
26166
26166
|
this.isEol = false;
|
|
26167
26167
|
}
|
|
26168
26168
|
}
|
|
26169
|
-
var O;
|
|
26169
|
+
var O$1;
|
|
26170
26170
|
(function(e) {
|
|
26171
26171
|
e[e.CHARACTER = 0] = "CHARACTER", e[e.NULL_CHARACTER = 1] = "NULL_CHARACTER", e[e.WHITESPACE_CHARACTER = 2] = "WHITESPACE_CHARACTER", e[e.START_TAG = 3] = "START_TAG", e[e.END_TAG = 4] = "END_TAG", e[e.COMMENT = 5] = "COMMENT", e[e.DOCTYPE = 6] = "DOCTYPE", e[e.EOF = 7] = "EOF", e[e.HIBERNATION = 8] = "HIBERNATION";
|
|
26172
|
-
})(O || (O = {}));
|
|
26172
|
+
})(O$1 || (O$1 = {}));
|
|
26173
26173
|
function os(e, t) {
|
|
26174
26174
|
for (let u = e.attrs.length - 1; u >= 0; u--)
|
|
26175
26175
|
if (e.attrs[u].name === t)
|
|
@@ -26235,21 +26235,21 @@ function Go(e) {
|
|
|
26235
26235
|
function Wo(e) {
|
|
26236
26236
|
return e === $.EQUALS || Go(e);
|
|
26237
26237
|
}
|
|
26238
|
-
var Y;
|
|
26238
|
+
var Y$1;
|
|
26239
26239
|
(function(e) {
|
|
26240
26240
|
e[e.EntityStart = 0] = "EntityStart", e[e.NumericStart = 1] = "NumericStart", e[e.NumericDecimal = 2] = "NumericDecimal", e[e.NumericHex = 3] = "NumericHex", e[e.NamedEntity = 4] = "NamedEntity";
|
|
26241
|
-
})(Y || (Y = {}));
|
|
26241
|
+
})(Y$1 || (Y$1 = {}));
|
|
26242
26242
|
var ce;
|
|
26243
26243
|
(function(e) {
|
|
26244
26244
|
e[e.Legacy = 0] = "Legacy", e[e.Strict = 1] = "Strict", e[e.Attribute = 2] = "Attribute";
|
|
26245
26245
|
})(ce || (ce = {}));
|
|
26246
26246
|
class zo {
|
|
26247
26247
|
constructor(t, u, r) {
|
|
26248
|
-
this.decodeTree = t, this.emitCodePoint = u, this.errors = r, this.state = Y.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = ce.Strict;
|
|
26248
|
+
this.decodeTree = t, this.emitCodePoint = u, this.errors = r, this.state = Y$1.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = ce.Strict;
|
|
26249
26249
|
}
|
|
26250
26250
|
/** Resets the instance to make it reusable. */
|
|
26251
26251
|
startEntity(t) {
|
|
26252
|
-
this.decodeMode = t, this.state = Y.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
|
|
26252
|
+
this.decodeMode = t, this.state = Y$1.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
|
|
26253
26253
|
}
|
|
26254
26254
|
/**
|
|
26255
26255
|
* Write an entity to the decoder. This can be called multiple times with partial entities.
|
|
@@ -26264,15 +26264,15 @@ class zo {
|
|
|
26264
26264
|
*/
|
|
26265
26265
|
write(t, u) {
|
|
26266
26266
|
switch (this.state) {
|
|
26267
|
-
case Y.EntityStart:
|
|
26268
|
-
return t.charCodeAt(u) === $.NUM ? (this.state = Y.NumericStart, this.consumed += 1, this.stateNumericStart(t, u + 1)) : (this.state = Y.NamedEntity, this.stateNamedEntity(t, u));
|
|
26269
|
-
case Y.NumericStart:
|
|
26267
|
+
case Y$1.EntityStart:
|
|
26268
|
+
return t.charCodeAt(u) === $.NUM ? (this.state = Y$1.NumericStart, this.consumed += 1, this.stateNumericStart(t, u + 1)) : (this.state = Y$1.NamedEntity, this.stateNamedEntity(t, u));
|
|
26269
|
+
case Y$1.NumericStart:
|
|
26270
26270
|
return this.stateNumericStart(t, u);
|
|
26271
|
-
case Y.NumericDecimal:
|
|
26271
|
+
case Y$1.NumericDecimal:
|
|
26272
26272
|
return this.stateNumericDecimal(t, u);
|
|
26273
|
-
case Y.NumericHex:
|
|
26273
|
+
case Y$1.NumericHex:
|
|
26274
26274
|
return this.stateNumericHex(t, u);
|
|
26275
|
-
case Y.NamedEntity:
|
|
26275
|
+
case Y$1.NamedEntity:
|
|
26276
26276
|
return this.stateNamedEntity(t, u);
|
|
26277
26277
|
}
|
|
26278
26278
|
}
|
|
@@ -26286,7 +26286,7 @@ class zo {
|
|
|
26286
26286
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
26287
26287
|
*/
|
|
26288
26288
|
stateNumericStart(t, u) {
|
|
26289
|
-
return u >= t.length ? -1 : (t.charCodeAt(u) | Vo) === $.LOWER_X ? (this.state = Y.NumericHex, this.consumed += 1, this.stateNumericHex(t, u + 1)) : (this.state = Y.NumericDecimal, this.stateNumericDecimal(t, u));
|
|
26289
|
+
return u >= t.length ? -1 : (t.charCodeAt(u) | Vo) === $.LOWER_X ? (this.state = Y$1.NumericHex, this.consumed += 1, this.stateNumericHex(t, u + 1)) : (this.state = Y$1.NumericDecimal, this.stateNumericDecimal(t, u));
|
|
26290
26290
|
}
|
|
26291
26291
|
addToNumericResult(t, u, r, a) {
|
|
26292
26292
|
if (u !== r) {
|
|
@@ -26417,16 +26417,16 @@ class zo {
|
|
|
26417
26417
|
end() {
|
|
26418
26418
|
var t;
|
|
26419
26419
|
switch (this.state) {
|
|
26420
|
-
case Y.NamedEntity:
|
|
26420
|
+
case Y$1.NamedEntity:
|
|
26421
26421
|
return this.result !== 0 && (this.decodeMode !== ce.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
|
|
26422
26422
|
// Otherwise, emit a numeric entity if we have one.
|
|
26423
|
-
case Y.NumericDecimal:
|
|
26423
|
+
case Y$1.NumericDecimal:
|
|
26424
26424
|
return this.emitNumericEntity(0, 2);
|
|
26425
|
-
case Y.NumericHex:
|
|
26425
|
+
case Y$1.NumericHex:
|
|
26426
26426
|
return this.emitNumericEntity(0, 3);
|
|
26427
|
-
case Y.NumericStart:
|
|
26427
|
+
case Y$1.NumericStart:
|
|
26428
26428
|
return (t = this.errors) === null || t === void 0 || t.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
26429
|
-
case Y.EntityStart:
|
|
26429
|
+
case Y$1.EntityStart:
|
|
26430
26430
|
return 0;
|
|
26431
26431
|
}
|
|
26432
26432
|
}
|
|
@@ -26459,10 +26459,10 @@ var we;
|
|
|
26459
26459
|
(function(e) {
|
|
26460
26460
|
e.TYPE = "type", e.ACTION = "action", e.ENCODING = "encoding", e.PROMPT = "prompt", e.NAME = "name", e.COLOR = "color", e.FACE = "face", e.SIZE = "size";
|
|
26461
26461
|
})(we || (we = {}));
|
|
26462
|
-
var X;
|
|
26462
|
+
var X$1;
|
|
26463
26463
|
(function(e) {
|
|
26464
26464
|
e.NO_QUIRKS = "no-quirks", e.QUIRKS = "quirks", e.LIMITED_QUIRKS = "limited-quirks";
|
|
26465
|
-
})(X || (X = {}));
|
|
26465
|
+
})(X$1 || (X$1 = {}));
|
|
26466
26466
|
var p;
|
|
26467
26467
|
(function(e) {
|
|
26468
26468
|
e.A = "a", e.ADDRESS = "address", e.ANNOTATION_XML = "annotation-xml", e.APPLET = "applet", e.AREA = "area", e.ARTICLE = "article", e.ASIDE = "aside", e.B = "b", e.BASE = "base", e.BASEFONT = "basefont", e.BGSOUND = "bgsound", e.BIG = "big", e.BLOCKQUOTE = "blockquote", e.BODY = "body", e.BR = "br", e.BUTTON = "button", e.CAPTION = "caption", e.CENTER = "center", e.CODE = "code", e.COL = "col", e.COLGROUP = "colgroup", e.DD = "dd", e.DESC = "desc", e.DETAILS = "details", e.DIALOG = "dialog", e.DIR = "dir", e.DIV = "div", e.DL = "dl", e.DT = "dt", e.EM = "em", e.EMBED = "embed", e.FIELDSET = "fieldset", e.FIGCAPTION = "figcaption", e.FIGURE = "figure", e.FONT = "font", e.FOOTER = "footer", e.FOREIGN_OBJECT = "foreignObject", e.FORM = "form", e.FRAME = "frame", e.FRAMESET = "frameset", e.H1 = "h1", e.H2 = "h2", e.H3 = "h3", e.H4 = "h4", e.H5 = "h5", e.H6 = "h6", e.HEAD = "head", e.HEADER = "header", e.HGROUP = "hgroup", e.HR = "hr", e.HTML = "html", e.I = "i", e.IMG = "img", e.IMAGE = "image", e.INPUT = "input", e.IFRAME = "iframe", e.KEYGEN = "keygen", e.LABEL = "label", e.LI = "li", e.LINK = "link", e.LISTING = "listing", e.MAIN = "main", e.MALIGNMARK = "malignmark", e.MARQUEE = "marquee", e.MATH = "math", e.MENU = "menu", e.META = "meta", e.MGLYPH = "mglyph", e.MI = "mi", e.MO = "mo", e.MN = "mn", e.MS = "ms", e.MTEXT = "mtext", e.NAV = "nav", e.NOBR = "nobr", e.NOFRAMES = "noframes", e.NOEMBED = "noembed", e.NOSCRIPT = "noscript", e.OBJECT = "object", e.OL = "ol", e.OPTGROUP = "optgroup", e.OPTION = "option", e.P = "p", e.PARAM = "param", e.PLAINTEXT = "plaintext", e.PRE = "pre", e.RB = "rb", e.RP = "rp", e.RT = "rt", e.RTC = "rtc", e.RUBY = "ruby", e.S = "s", e.SCRIPT = "script", e.SEARCH = "search", e.SECTION = "section", e.SELECT = "select", e.SOURCE = "source", e.SMALL = "small", e.SPAN = "span", e.STRIKE = "strike", e.STRONG = "strong", e.STYLE = "style", e.SUB = "sub", e.SUMMARY = "summary", e.SUP = "sup", e.TABLE = "table", e.TBODY = "tbody", e.TEMPLATE = "template", e.TEXTAREA = "textarea", e.TFOOT = "tfoot", e.TD = "td", e.TH = "th", e.THEAD = "thead", e.TITLE = "title", e.TR = "tr", e.TRACK = "track", e.TT = "tt", e.U = "u", e.UL = "ul", e.SVG = "svg", e.VAR = "var", e.WBR = "wbr", e.XMP = "xmp";
|
|
@@ -26705,7 +26705,7 @@ var d;
|
|
|
26705
26705
|
(function(e) {
|
|
26706
26706
|
e[e.DATA = 0] = "DATA", e[e.RCDATA = 1] = "RCDATA", e[e.RAWTEXT = 2] = "RAWTEXT", e[e.SCRIPT_DATA = 3] = "SCRIPT_DATA", e[e.PLAINTEXT = 4] = "PLAINTEXT", e[e.TAG_OPEN = 5] = "TAG_OPEN", e[e.END_TAG_OPEN = 6] = "END_TAG_OPEN", e[e.TAG_NAME = 7] = "TAG_NAME", e[e.RCDATA_LESS_THAN_SIGN = 8] = "RCDATA_LESS_THAN_SIGN", e[e.RCDATA_END_TAG_OPEN = 9] = "RCDATA_END_TAG_OPEN", e[e.RCDATA_END_TAG_NAME = 10] = "RCDATA_END_TAG_NAME", e[e.RAWTEXT_LESS_THAN_SIGN = 11] = "RAWTEXT_LESS_THAN_SIGN", e[e.RAWTEXT_END_TAG_OPEN = 12] = "RAWTEXT_END_TAG_OPEN", e[e.RAWTEXT_END_TAG_NAME = 13] = "RAWTEXT_END_TAG_NAME", e[e.SCRIPT_DATA_LESS_THAN_SIGN = 14] = "SCRIPT_DATA_LESS_THAN_SIGN", e[e.SCRIPT_DATA_END_TAG_OPEN = 15] = "SCRIPT_DATA_END_TAG_OPEN", e[e.SCRIPT_DATA_END_TAG_NAME = 16] = "SCRIPT_DATA_END_TAG_NAME", e[e.SCRIPT_DATA_ESCAPE_START = 17] = "SCRIPT_DATA_ESCAPE_START", e[e.SCRIPT_DATA_ESCAPE_START_DASH = 18] = "SCRIPT_DATA_ESCAPE_START_DASH", e[e.SCRIPT_DATA_ESCAPED = 19] = "SCRIPT_DATA_ESCAPED", e[e.SCRIPT_DATA_ESCAPED_DASH = 20] = "SCRIPT_DATA_ESCAPED_DASH", e[e.SCRIPT_DATA_ESCAPED_DASH_DASH = 21] = "SCRIPT_DATA_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN = 22] = "SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN = 23] = "SCRIPT_DATA_ESCAPED_END_TAG_OPEN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME = 24] = "SCRIPT_DATA_ESCAPED_END_TAG_NAME", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START = 25] = "SCRIPT_DATA_DOUBLE_ESCAPE_START", e[e.SCRIPT_DATA_DOUBLE_ESCAPED = 26] = "SCRIPT_DATA_DOUBLE_ESCAPED", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH = 27] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH = 28] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN = 29] = "SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END = 30] = "SCRIPT_DATA_DOUBLE_ESCAPE_END", e[e.BEFORE_ATTRIBUTE_NAME = 31] = "BEFORE_ATTRIBUTE_NAME", e[e.ATTRIBUTE_NAME = 32] = "ATTRIBUTE_NAME", e[e.AFTER_ATTRIBUTE_NAME = 33] = "AFTER_ATTRIBUTE_NAME", e[e.BEFORE_ATTRIBUTE_VALUE = 34] = "BEFORE_ATTRIBUTE_VALUE", e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED = 35] = "ATTRIBUTE_VALUE_DOUBLE_QUOTED", e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED = 36] = "ATTRIBUTE_VALUE_SINGLE_QUOTED", e[e.ATTRIBUTE_VALUE_UNQUOTED = 37] = "ATTRIBUTE_VALUE_UNQUOTED", e[e.AFTER_ATTRIBUTE_VALUE_QUOTED = 38] = "AFTER_ATTRIBUTE_VALUE_QUOTED", e[e.SELF_CLOSING_START_TAG = 39] = "SELF_CLOSING_START_TAG", e[e.BOGUS_COMMENT = 40] = "BOGUS_COMMENT", e[e.MARKUP_DECLARATION_OPEN = 41] = "MARKUP_DECLARATION_OPEN", e[e.COMMENT_START = 42] = "COMMENT_START", e[e.COMMENT_START_DASH = 43] = "COMMENT_START_DASH", e[e.COMMENT = 44] = "COMMENT", e[e.COMMENT_LESS_THAN_SIGN = 45] = "COMMENT_LESS_THAN_SIGN", e[e.COMMENT_LESS_THAN_SIGN_BANG = 46] = "COMMENT_LESS_THAN_SIGN_BANG", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH = 47] = "COMMENT_LESS_THAN_SIGN_BANG_DASH", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH = 48] = "COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH", e[e.COMMENT_END_DASH = 49] = "COMMENT_END_DASH", e[e.COMMENT_END = 50] = "COMMENT_END", e[e.COMMENT_END_BANG = 51] = "COMMENT_END_BANG", e[e.DOCTYPE = 52] = "DOCTYPE", e[e.BEFORE_DOCTYPE_NAME = 53] = "BEFORE_DOCTYPE_NAME", e[e.DOCTYPE_NAME = 54] = "DOCTYPE_NAME", e[e.AFTER_DOCTYPE_NAME = 55] = "AFTER_DOCTYPE_NAME", e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD = 56] = "AFTER_DOCTYPE_PUBLIC_KEYWORD", e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER = 57] = "BEFORE_DOCTYPE_PUBLIC_IDENTIFIER", e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED = 58] = "DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED = 59] = "DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER = 60] = "AFTER_DOCTYPE_PUBLIC_IDENTIFIER", e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS = 61] = "BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS", e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD = 62] = "AFTER_DOCTYPE_SYSTEM_KEYWORD", e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER = 63] = "BEFORE_DOCTYPE_SYSTEM_IDENTIFIER", e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED = 64] = "DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED = 65] = "DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER = 66] = "AFTER_DOCTYPE_SYSTEM_IDENTIFIER", e[e.BOGUS_DOCTYPE = 67] = "BOGUS_DOCTYPE", e[e.CDATA_SECTION = 68] = "CDATA_SECTION", e[e.CDATA_SECTION_BRACKET = 69] = "CDATA_SECTION_BRACKET", e[e.CDATA_SECTION_END = 70] = "CDATA_SECTION_END", e[e.CHARACTER_REFERENCE = 71] = "CHARACTER_REFERENCE", e[e.AMBIGUOUS_AMPERSAND = 72] = "AMBIGUOUS_AMPERSAND";
|
|
26707
26707
|
})(d || (d = {}));
|
|
26708
|
-
const K
|
|
26708
|
+
const K = {
|
|
26709
26709
|
DATA: d.DATA,
|
|
26710
26710
|
RCDATA: d.RCDATA,
|
|
26711
26711
|
RAWTEXT: d.RAWTEXT,
|
|
@@ -26817,7 +26817,7 @@ class rc {
|
|
|
26817
26817
|
//Token creation
|
|
26818
26818
|
_createStartTagToken() {
|
|
26819
26819
|
this.currentToken = {
|
|
26820
|
-
type: O.START_TAG,
|
|
26820
|
+
type: O$1.START_TAG,
|
|
26821
26821
|
tagName: "",
|
|
26822
26822
|
tagID: s.UNKNOWN,
|
|
26823
26823
|
selfClosing: false,
|
|
@@ -26828,7 +26828,7 @@ class rc {
|
|
|
26828
26828
|
}
|
|
26829
26829
|
_createEndTagToken() {
|
|
26830
26830
|
this.currentToken = {
|
|
26831
|
-
type: O.END_TAG,
|
|
26831
|
+
type: O$1.END_TAG,
|
|
26832
26832
|
tagName: "",
|
|
26833
26833
|
tagID: s.UNKNOWN,
|
|
26834
26834
|
selfClosing: false,
|
|
@@ -26839,14 +26839,14 @@ class rc {
|
|
|
26839
26839
|
}
|
|
26840
26840
|
_createCommentToken(t) {
|
|
26841
26841
|
this.currentToken = {
|
|
26842
|
-
type: O.COMMENT,
|
|
26842
|
+
type: O$1.COMMENT,
|
|
26843
26843
|
data: "",
|
|
26844
26844
|
location: this.getCurrentLocation(t)
|
|
26845
26845
|
};
|
|
26846
26846
|
}
|
|
26847
26847
|
_createDoctypeToken(t) {
|
|
26848
26848
|
this.currentToken = {
|
|
26849
|
-
type: O.DOCTYPE,
|
|
26849
|
+
type: O$1.DOCTYPE,
|
|
26850
26850
|
name: t,
|
|
26851
26851
|
forceQuirks: false,
|
|
26852
26852
|
publicId: null,
|
|
@@ -26888,7 +26888,7 @@ class rc {
|
|
|
26888
26888
|
}
|
|
26889
26889
|
emitCurrentTagToken() {
|
|
26890
26890
|
const t = this.currentToken;
|
|
26891
|
-
this.prepareToken(t), t.tagID = yt(t.tagName), t.type === O.START_TAG ? (this.lastStartTagName = t.tagName, this.handler.onStartTag(t)) : (t.attrs.length > 0 && this._err(b.endTagWithAttributes), t.selfClosing && this._err(b.endTagWithTrailingSolidus), this.handler.onEndTag(t)), this.preprocessor.dropParsedChunk();
|
|
26891
|
+
this.prepareToken(t), t.tagID = yt(t.tagName), t.type === O$1.START_TAG ? (this.lastStartTagName = t.tagName, this.handler.onStartTag(t)) : (t.attrs.length > 0 && this._err(b.endTagWithAttributes), t.selfClosing && this._err(b.endTagWithTrailingSolidus), this.handler.onEndTag(t)), this.preprocessor.dropParsedChunk();
|
|
26892
26892
|
}
|
|
26893
26893
|
emitCurrentComment(t) {
|
|
26894
26894
|
this.prepareToken(t), this.handler.onComment(t), this.preprocessor.dropParsedChunk();
|
|
@@ -26899,15 +26899,15 @@ class rc {
|
|
|
26899
26899
|
_emitCurrentCharacterToken(t) {
|
|
26900
26900
|
if (this.currentCharacterToken) {
|
|
26901
26901
|
switch (t && this.currentCharacterToken.location && (this.currentCharacterToken.location.endLine = t.startLine, this.currentCharacterToken.location.endCol = t.startCol, this.currentCharacterToken.location.endOffset = t.startOffset), this.currentCharacterToken.type) {
|
|
26902
|
-
case O.CHARACTER: {
|
|
26902
|
+
case O$1.CHARACTER: {
|
|
26903
26903
|
this.handler.onCharacter(this.currentCharacterToken);
|
|
26904
26904
|
break;
|
|
26905
26905
|
}
|
|
26906
|
-
case O.NULL_CHARACTER: {
|
|
26906
|
+
case O$1.NULL_CHARACTER: {
|
|
26907
26907
|
this.handler.onNullCharacter(this.currentCharacterToken);
|
|
26908
26908
|
break;
|
|
26909
26909
|
}
|
|
26910
|
-
case O.WHITESPACE_CHARACTER: {
|
|
26910
|
+
case O$1.WHITESPACE_CHARACTER: {
|
|
26911
26911
|
this.handler.onWhitespaceCharacter(this.currentCharacterToken);
|
|
26912
26912
|
break;
|
|
26913
26913
|
}
|
|
@@ -26917,7 +26917,7 @@ class rc {
|
|
|
26917
26917
|
}
|
|
26918
26918
|
_emitEOFToken() {
|
|
26919
26919
|
const t = this.getCurrentLocation(0);
|
|
26920
|
-
t && (t.endLine = t.startLine, t.endCol = t.startCol, t.endOffset = t.startOffset), this._emitCurrentCharacterToken(t), this.handler.onEof({ type: O.EOF, location: t }), this.active = false;
|
|
26920
|
+
t && (t.endLine = t.startLine, t.endCol = t.startCol, t.endOffset = t.startOffset), this._emitCurrentCharacterToken(t), this.handler.onEof({ type: O$1.EOF, location: t }), this.active = false;
|
|
26921
26921
|
}
|
|
26922
26922
|
//Characters emission
|
|
26923
26923
|
//OPTIMIZATION: The specification uses only one type of character token (one token per character).
|
|
@@ -26938,13 +26938,13 @@ class rc {
|
|
|
26938
26938
|
this._createCharacterToken(t, u);
|
|
26939
26939
|
}
|
|
26940
26940
|
_emitCodePoint(t) {
|
|
26941
|
-
const u = cs(t) ? O.WHITESPACE_CHARACTER : t === o.NULL ? O.NULL_CHARACTER : O.CHARACTER;
|
|
26941
|
+
const u = cs(t) ? O$1.WHITESPACE_CHARACTER : t === o.NULL ? O$1.NULL_CHARACTER : O$1.CHARACTER;
|
|
26942
26942
|
this._appendCharToCurrentCharacterToken(u, String.fromCodePoint(t));
|
|
26943
26943
|
}
|
|
26944
26944
|
//NOTE: used when we emit characters explicitly.
|
|
26945
26945
|
//This is always for non-whitespace and non-null characters, which allows us to avoid additional checks.
|
|
26946
26946
|
_emitChars(t) {
|
|
26947
|
-
this._appendCharToCurrentCharacterToken(O.CHARACTER, t);
|
|
26947
|
+
this._appendCharToCurrentCharacterToken(O$1.CHARACTER, t);
|
|
26948
26948
|
}
|
|
26949
26949
|
// Character reference helpers
|
|
26950
26950
|
_startCharacterReference() {
|
|
@@ -27617,9 +27617,9 @@ class rc {
|
|
|
27617
27617
|
// Script data double escape start state
|
|
27618
27618
|
//------------------------------------------------------------------
|
|
27619
27619
|
_stateScriptDataDoubleEscapeStart(t) {
|
|
27620
|
-
if (this.preprocessor.startsWith(z.SCRIPT, false) && rr(this.preprocessor.peek(z.SCRIPT.length))) {
|
|
27620
|
+
if (this.preprocessor.startsWith(z$1.SCRIPT, false) && rr(this.preprocessor.peek(z$1.SCRIPT.length))) {
|
|
27621
27621
|
this._emitCodePoint(t);
|
|
27622
|
-
for (let u = 0; u < z.SCRIPT.length; u++)
|
|
27622
|
+
for (let u = 0; u < z$1.SCRIPT.length; u++)
|
|
27623
27623
|
this._emitCodePoint(this._consume());
|
|
27624
27624
|
this.state = d.SCRIPT_DATA_DOUBLE_ESCAPED;
|
|
27625
27625
|
} else this._ensureHibernation() || (this.state = d.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(t));
|
|
@@ -27708,9 +27708,9 @@ class rc {
|
|
|
27708
27708
|
// Script data double escape end state
|
|
27709
27709
|
//------------------------------------------------------------------
|
|
27710
27710
|
_stateScriptDataDoubleEscapeEnd(t) {
|
|
27711
|
-
if (this.preprocessor.startsWith(z.SCRIPT, false) && rr(this.preprocessor.peek(z.SCRIPT.length))) {
|
|
27711
|
+
if (this.preprocessor.startsWith(z$1.SCRIPT, false) && rr(this.preprocessor.peek(z$1.SCRIPT.length))) {
|
|
27712
27712
|
this._emitCodePoint(t);
|
|
27713
|
-
for (let u = 0; u < z.SCRIPT.length; u++)
|
|
27713
|
+
for (let u = 0; u < z$1.SCRIPT.length; u++)
|
|
27714
27714
|
this._emitCodePoint(this._consume());
|
|
27715
27715
|
this.state = d.SCRIPT_DATA_ESCAPED;
|
|
27716
27716
|
} else this._ensureHibernation() || (this.state = d.SCRIPT_DATA_DOUBLE_ESCAPED, this._stateScriptDataDoubleEscaped(t));
|
|
@@ -27979,7 +27979,7 @@ class rc {
|
|
|
27979
27979
|
// Markup declaration open state
|
|
27980
27980
|
//------------------------------------------------------------------
|
|
27981
27981
|
_stateMarkupDeclarationOpen(t) {
|
|
27982
|
-
this._consumeSequenceIfMatch(z.DASH_DASH, true) ? (this._createCommentToken(z.DASH_DASH.length + 1), this.state = d.COMMENT_START) : this._consumeSequenceIfMatch(z.DOCTYPE, false) ? (this.currentLocation = this.getCurrentLocation(z.DOCTYPE.length + 1), this.state = d.DOCTYPE) : this._consumeSequenceIfMatch(z.CDATA_START, true) ? this.inForeignNode ? this.state = d.CDATA_SECTION : (this._err(b.cdataInHtmlContent), this._createCommentToken(z.CDATA_START.length + 1), this.currentToken.data = "[CDATA[", this.state = d.BOGUS_COMMENT) : this._ensureHibernation() || (this._err(b.incorrectlyOpenedComment), this._createCommentToken(2), this.state = d.BOGUS_COMMENT, this._stateBogusComment(t));
|
|
27982
|
+
this._consumeSequenceIfMatch(z$1.DASH_DASH, true) ? (this._createCommentToken(z$1.DASH_DASH.length + 1), this.state = d.COMMENT_START) : this._consumeSequenceIfMatch(z$1.DOCTYPE, false) ? (this.currentLocation = this.getCurrentLocation(z$1.DOCTYPE.length + 1), this.state = d.DOCTYPE) : this._consumeSequenceIfMatch(z$1.CDATA_START, true) ? this.inForeignNode ? this.state = d.CDATA_SECTION : (this._err(b.cdataInHtmlContent), this._createCommentToken(z$1.CDATA_START.length + 1), this.currentToken.data = "[CDATA[", this.state = d.BOGUS_COMMENT) : this._ensureHibernation() || (this._err(b.incorrectlyOpenedComment), this._createCommentToken(2), this.state = d.BOGUS_COMMENT, this._stateBogusComment(t));
|
|
27983
27983
|
}
|
|
27984
27984
|
// Comment start state
|
|
27985
27985
|
//------------------------------------------------------------------
|
|
@@ -28244,7 +28244,7 @@ class rc {
|
|
|
28244
28244
|
break;
|
|
28245
28245
|
}
|
|
28246
28246
|
default:
|
|
28247
|
-
this._consumeSequenceIfMatch(z.PUBLIC, false) ? this.state = d.AFTER_DOCTYPE_PUBLIC_KEYWORD : this._consumeSequenceIfMatch(z.SYSTEM, false) ? this.state = d.AFTER_DOCTYPE_SYSTEM_KEYWORD : this._ensureHibernation() || (this._err(b.invalidCharacterSequenceAfterDoctypeName), u.forceQuirks = true, this.state = d.BOGUS_DOCTYPE, this._stateBogusDoctype(t));
|
|
28247
|
+
this._consumeSequenceIfMatch(z$1.PUBLIC, false) ? this.state = d.AFTER_DOCTYPE_PUBLIC_KEYWORD : this._consumeSequenceIfMatch(z$1.SYSTEM, false) ? this.state = d.AFTER_DOCTYPE_SYSTEM_KEYWORD : this._ensureHibernation() || (this._err(b.invalidCharacterSequenceAfterDoctypeName), u.forceQuirks = true, this.state = d.BOGUS_DOCTYPE, this._stateBogusDoctype(t));
|
|
28248
28248
|
}
|
|
28249
28249
|
}
|
|
28250
28250
|
// After DOCTYPE public keyword state
|
|
@@ -28952,7 +28952,7 @@ const oe = {
|
|
|
28952
28952
|
createDocument() {
|
|
28953
28953
|
return {
|
|
28954
28954
|
nodeName: "#document",
|
|
28955
|
-
mode: X.NO_QUIRKS,
|
|
28955
|
+
mode: X$1.NO_QUIRKS,
|
|
28956
28956
|
childNodes: []
|
|
28957
28957
|
};
|
|
28958
28958
|
},
|
|
@@ -29181,21 +29181,21 @@ function Ec(e) {
|
|
|
29181
29181
|
}
|
|
29182
29182
|
function Tc(e) {
|
|
29183
29183
|
if (e.name !== hs)
|
|
29184
|
-
return X.QUIRKS;
|
|
29184
|
+
return X$1.QUIRKS;
|
|
29185
29185
|
const { systemId: t } = e;
|
|
29186
29186
|
if (t && t.toLowerCase() === mc)
|
|
29187
|
-
return X.QUIRKS;
|
|
29187
|
+
return X$1.QUIRKS;
|
|
29188
29188
|
let { publicId: u } = e;
|
|
29189
29189
|
if (u !== null) {
|
|
29190
29190
|
if (u = u.toLowerCase(), fc.has(u))
|
|
29191
|
-
return X.QUIRKS;
|
|
29191
|
+
return X$1.QUIRKS;
|
|
29192
29192
|
let r = t === null ? pc : ls;
|
|
29193
29193
|
if (or(u, r))
|
|
29194
|
-
return X.QUIRKS;
|
|
29194
|
+
return X$1.QUIRKS;
|
|
29195
29195
|
if (r = t === null ? ms : bc, or(u, r))
|
|
29196
|
-
return X.LIMITED_QUIRKS;
|
|
29196
|
+
return X$1.LIMITED_QUIRKS;
|
|
29197
29197
|
}
|
|
29198
|
-
return X.NO_QUIRKS;
|
|
29198
|
+
return X$1.NO_QUIRKS;
|
|
29199
29199
|
}
|
|
29200
29200
|
const cr = {
|
|
29201
29201
|
TEXT_HTML: "text/html",
|
|
@@ -29480,7 +29480,7 @@ class Es {
|
|
|
29480
29480
|
this._insertElement(t, E.HTML), this.tokenizer.state = u, this.originalInsertionMode = this.insertionMode, this.insertionMode = l.TEXT;
|
|
29481
29481
|
}
|
|
29482
29482
|
switchToPlaintextParsing() {
|
|
29483
|
-
this.insertionMode = l.TEXT, this.originalInsertionMode = l.IN_BODY, this.tokenizer.state = K
|
|
29483
|
+
this.insertionMode = l.TEXT, this.originalInsertionMode = l.IN_BODY, this.tokenizer.state = K.PLAINTEXT;
|
|
29484
29484
|
}
|
|
29485
29485
|
//Fragment parsing
|
|
29486
29486
|
/** @protected */
|
|
@@ -29503,7 +29503,7 @@ class Es {
|
|
|
29503
29503
|
switch (this.fragmentContextID) {
|
|
29504
29504
|
case s.TITLE:
|
|
29505
29505
|
case s.TEXTAREA: {
|
|
29506
|
-
this.tokenizer.state = K
|
|
29506
|
+
this.tokenizer.state = K.RCDATA;
|
|
29507
29507
|
break;
|
|
29508
29508
|
}
|
|
29509
29509
|
case s.STYLE:
|
|
@@ -29512,15 +29512,15 @@ class Es {
|
|
|
29512
29512
|
case s.NOEMBED:
|
|
29513
29513
|
case s.NOFRAMES:
|
|
29514
29514
|
case s.NOSCRIPT: {
|
|
29515
|
-
this.tokenizer.state = K
|
|
29515
|
+
this.tokenizer.state = K.RAWTEXT;
|
|
29516
29516
|
break;
|
|
29517
29517
|
}
|
|
29518
29518
|
case s.SCRIPT: {
|
|
29519
|
-
this.tokenizer.state = K
|
|
29519
|
+
this.tokenizer.state = K.SCRIPT_DATA;
|
|
29520
29520
|
break;
|
|
29521
29521
|
}
|
|
29522
29522
|
case s.PLAINTEXT: {
|
|
29523
|
-
this.tokenizer.state = K
|
|
29523
|
+
this.tokenizer.state = K.PLAINTEXT;
|
|
29524
29524
|
break;
|
|
29525
29525
|
}
|
|
29526
29526
|
}
|
|
@@ -29606,7 +29606,7 @@ class Es {
|
|
|
29606
29606
|
const r = u.location, a = this.treeAdapter.getTagName(t), i = (
|
|
29607
29607
|
// NOTE: For cases like <p> <p> </p> - First 'p' closes without a closing
|
|
29608
29608
|
// tag and for cases like <td> <p> </td> - 'p' closes without a closing tag.
|
|
29609
|
-
u.type === O.END_TAG && a === u.tagName ? {
|
|
29609
|
+
u.type === O$1.END_TAG && a === u.tagName ? {
|
|
29610
29610
|
endTag: { ...r },
|
|
29611
29611
|
endLine: r.endLine,
|
|
29612
29612
|
endCol: r.endCol,
|
|
@@ -29635,35 +29635,35 @@ class Es {
|
|
|
29635
29635
|
/** @protected */
|
|
29636
29636
|
_processToken(t) {
|
|
29637
29637
|
switch (t.type) {
|
|
29638
|
-
case O.CHARACTER: {
|
|
29638
|
+
case O$1.CHARACTER: {
|
|
29639
29639
|
this.onCharacter(t);
|
|
29640
29640
|
break;
|
|
29641
29641
|
}
|
|
29642
|
-
case O.NULL_CHARACTER: {
|
|
29642
|
+
case O$1.NULL_CHARACTER: {
|
|
29643
29643
|
this.onNullCharacter(t);
|
|
29644
29644
|
break;
|
|
29645
29645
|
}
|
|
29646
|
-
case O.COMMENT: {
|
|
29646
|
+
case O$1.COMMENT: {
|
|
29647
29647
|
this.onComment(t);
|
|
29648
29648
|
break;
|
|
29649
29649
|
}
|
|
29650
|
-
case O.DOCTYPE: {
|
|
29650
|
+
case O$1.DOCTYPE: {
|
|
29651
29651
|
this.onDoctype(t);
|
|
29652
29652
|
break;
|
|
29653
29653
|
}
|
|
29654
|
-
case O.START_TAG: {
|
|
29654
|
+
case O$1.START_TAG: {
|
|
29655
29655
|
this._processStartTag(t);
|
|
29656
29656
|
break;
|
|
29657
29657
|
}
|
|
29658
|
-
case O.END_TAG: {
|
|
29658
|
+
case O$1.END_TAG: {
|
|
29659
29659
|
this.onEndTag(t);
|
|
29660
29660
|
break;
|
|
29661
29661
|
}
|
|
29662
|
-
case O.EOF: {
|
|
29662
|
+
case O$1.EOF: {
|
|
29663
29663
|
this.onEof(t);
|
|
29664
29664
|
break;
|
|
29665
29665
|
}
|
|
29666
|
-
case O.WHITESPACE_CHARACTER: {
|
|
29666
|
+
case O$1.WHITESPACE_CHARACTER: {
|
|
29667
29667
|
this.onWhitespaceCharacter(t);
|
|
29668
29668
|
break;
|
|
29669
29669
|
}
|
|
@@ -29860,7 +29860,7 @@ class Es {
|
|
|
29860
29860
|
case l.IN_TABLE:
|
|
29861
29861
|
case l.IN_TABLE_BODY:
|
|
29862
29862
|
case l.IN_ROW: {
|
|
29863
|
-
Wt
|
|
29863
|
+
Wt(this, t);
|
|
29864
29864
|
break;
|
|
29865
29865
|
}
|
|
29866
29866
|
case l.IN_TABLE_TEXT: {
|
|
@@ -29868,11 +29868,11 @@ class Es {
|
|
|
29868
29868
|
break;
|
|
29869
29869
|
}
|
|
29870
29870
|
case l.IN_COLUMN_GROUP: {
|
|
29871
|
-
_t(this, t);
|
|
29871
|
+
_t$1(this, t);
|
|
29872
29872
|
break;
|
|
29873
29873
|
}
|
|
29874
29874
|
case l.AFTER_BODY: {
|
|
29875
|
-
gt
|
|
29875
|
+
gt(this, t);
|
|
29876
29876
|
break;
|
|
29877
29877
|
}
|
|
29878
29878
|
case l.AFTER_AFTER_BODY: {
|
|
@@ -29919,15 +29919,15 @@ class Es {
|
|
|
29919
29919
|
case l.IN_TABLE:
|
|
29920
29920
|
case l.IN_TABLE_BODY:
|
|
29921
29921
|
case l.IN_ROW: {
|
|
29922
|
-
Wt
|
|
29922
|
+
Wt(this, t);
|
|
29923
29923
|
break;
|
|
29924
29924
|
}
|
|
29925
29925
|
case l.IN_COLUMN_GROUP: {
|
|
29926
|
-
_t(this, t);
|
|
29926
|
+
_t$1(this, t);
|
|
29927
29927
|
break;
|
|
29928
29928
|
}
|
|
29929
29929
|
case l.AFTER_BODY: {
|
|
29930
|
-
gt
|
|
29930
|
+
gt(this, t);
|
|
29931
29931
|
break;
|
|
29932
29932
|
}
|
|
29933
29933
|
case l.AFTER_AFTER_BODY: {
|
|
@@ -30045,7 +30045,7 @@ class Es {
|
|
|
30045
30045
|
break;
|
|
30046
30046
|
}
|
|
30047
30047
|
case l.IN_BODY: {
|
|
30048
|
-
G
|
|
30048
|
+
G(this, t);
|
|
30049
30049
|
break;
|
|
30050
30050
|
}
|
|
30051
30051
|
case l.IN_TABLE: {
|
|
@@ -30065,7 +30065,7 @@ class Es {
|
|
|
30065
30065
|
break;
|
|
30066
30066
|
}
|
|
30067
30067
|
case l.IN_TABLE_BODY: {
|
|
30068
|
-
Rt(this, t);
|
|
30068
|
+
Rt$1(this, t);
|
|
30069
30069
|
break;
|
|
30070
30070
|
}
|
|
30071
30071
|
case l.IN_ROW: {
|
|
@@ -30305,7 +30305,7 @@ class Es {
|
|
|
30305
30305
|
case l.IN_TABLE:
|
|
30306
30306
|
case l.IN_TABLE_BODY:
|
|
30307
30307
|
case l.IN_ROW: {
|
|
30308
|
-
Wt
|
|
30308
|
+
Wt(this, t);
|
|
30309
30309
|
break;
|
|
30310
30310
|
}
|
|
30311
30311
|
case l.IN_TABLE_TEXT: {
|
|
@@ -30393,11 +30393,11 @@ function Ou(e, t) {
|
|
|
30393
30393
|
}
|
|
30394
30394
|
function Yc(e, t) {
|
|
30395
30395
|
e._setDocumentType(t);
|
|
30396
|
-
const u = t.forceQuirks ? X.QUIRKS : Tc(t);
|
|
30396
|
+
const u = t.forceQuirks ? X$1.QUIRKS : Tc(t);
|
|
30397
30397
|
Ec(t) || e._err(t, b.nonConformingDoctype), e.treeAdapter.setDocumentMode(e.document, u), e.insertionMode = l.BEFORE_HTML;
|
|
30398
30398
|
}
|
|
30399
30399
|
function Ue(e, t) {
|
|
30400
|
-
e._err(t, b.missingDoctype, true), e.treeAdapter.setDocumentMode(e.document, X.QUIRKS), e.insertionMode = l.BEFORE_HTML, e._processToken(t);
|
|
30400
|
+
e._err(t, b.missingDoctype, true), e.treeAdapter.setDocumentMode(e.document, X$1.QUIRKS), e.insertionMode = l.BEFORE_HTML, e._processToken(t);
|
|
30401
30401
|
}
|
|
30402
30402
|
function jc(e, t) {
|
|
30403
30403
|
t.tagID === s.HTML ? (e._insertElement(t, E.HTML), e.insertionMode = l.BEFORE_HEAD) : Ye(e, t);
|
|
@@ -30412,7 +30412,7 @@ function Ye(e, t) {
|
|
|
30412
30412
|
function $c(e, t) {
|
|
30413
30413
|
switch (t.tagID) {
|
|
30414
30414
|
case s.HTML: {
|
|
30415
|
-
G
|
|
30415
|
+
G(e, t);
|
|
30416
30416
|
break;
|
|
30417
30417
|
}
|
|
30418
30418
|
case s.HEAD: {
|
|
@@ -30433,7 +30433,7 @@ function je(e, t) {
|
|
|
30433
30433
|
function J(e, t) {
|
|
30434
30434
|
switch (t.tagID) {
|
|
30435
30435
|
case s.HTML: {
|
|
30436
|
-
G
|
|
30436
|
+
G(e, t);
|
|
30437
30437
|
break;
|
|
30438
30438
|
}
|
|
30439
30439
|
case s.BASE:
|
|
@@ -30445,20 +30445,20 @@ function J(e, t) {
|
|
|
30445
30445
|
break;
|
|
30446
30446
|
}
|
|
30447
30447
|
case s.TITLE: {
|
|
30448
|
-
e._switchToTextParsing(t, K
|
|
30448
|
+
e._switchToTextParsing(t, K.RCDATA);
|
|
30449
30449
|
break;
|
|
30450
30450
|
}
|
|
30451
30451
|
case s.NOSCRIPT: {
|
|
30452
|
-
e.options.scriptingEnabled ? e._switchToTextParsing(t, K
|
|
30452
|
+
e.options.scriptingEnabled ? e._switchToTextParsing(t, K.RAWTEXT) : (e._insertElement(t, E.HTML), e.insertionMode = l.IN_HEAD_NO_SCRIPT);
|
|
30453
30453
|
break;
|
|
30454
30454
|
}
|
|
30455
30455
|
case s.NOFRAMES:
|
|
30456
30456
|
case s.STYLE: {
|
|
30457
|
-
e._switchToTextParsing(t, K
|
|
30457
|
+
e._switchToTextParsing(t, K.RAWTEXT);
|
|
30458
30458
|
break;
|
|
30459
30459
|
}
|
|
30460
30460
|
case s.SCRIPT: {
|
|
30461
|
-
e._switchToTextParsing(t, K
|
|
30461
|
+
e._switchToTextParsing(t, K.SCRIPT_DATA);
|
|
30462
30462
|
break;
|
|
30463
30463
|
}
|
|
30464
30464
|
case s.TEMPLATE: {
|
|
@@ -30502,7 +30502,7 @@ function Ve(e, t) {
|
|
|
30502
30502
|
function zc(e, t) {
|
|
30503
30503
|
switch (t.tagID) {
|
|
30504
30504
|
case s.HTML: {
|
|
30505
|
-
G
|
|
30505
|
+
G(e, t);
|
|
30506
30506
|
break;
|
|
30507
30507
|
}
|
|
30508
30508
|
case s.BASEFONT:
|
|
@@ -30538,13 +30538,13 @@ function Qc(e, t) {
|
|
|
30538
30538
|
}
|
|
30539
30539
|
}
|
|
30540
30540
|
function $e(e, t) {
|
|
30541
|
-
const u = t.type === O.EOF ? b.openElementsLeftAfterEof : b.disallowedContentInNoscriptInHead;
|
|
30541
|
+
const u = t.type === O$1.EOF ? b.openElementsLeftAfterEof : b.disallowedContentInNoscriptInHead;
|
|
30542
30542
|
e._err(t, u), e.openElements.pop(), e.insertionMode = l.IN_HEAD, e._processToken(t);
|
|
30543
30543
|
}
|
|
30544
30544
|
function Kc(e, t) {
|
|
30545
30545
|
switch (t.tagID) {
|
|
30546
30546
|
case s.HTML: {
|
|
30547
|
-
G
|
|
30547
|
+
G(e, t);
|
|
30548
30548
|
break;
|
|
30549
30549
|
}
|
|
30550
30550
|
case s.BODY: {
|
|
@@ -30597,27 +30597,27 @@ function Ge(e, t) {
|
|
|
30597
30597
|
}
|
|
30598
30598
|
function Ot$1(e, t) {
|
|
30599
30599
|
switch (t.type) {
|
|
30600
|
-
case O.CHARACTER: {
|
|
30600
|
+
case O$1.CHARACTER: {
|
|
30601
30601
|
_s(e, t);
|
|
30602
30602
|
break;
|
|
30603
30603
|
}
|
|
30604
|
-
case O.WHITESPACE_CHARACTER: {
|
|
30604
|
+
case O$1.WHITESPACE_CHARACTER: {
|
|
30605
30605
|
Ts(e, t);
|
|
30606
30606
|
break;
|
|
30607
30607
|
}
|
|
30608
|
-
case O.COMMENT: {
|
|
30608
|
+
case O$1.COMMENT: {
|
|
30609
30609
|
iu(e, t);
|
|
30610
30610
|
break;
|
|
30611
30611
|
}
|
|
30612
|
-
case O.START_TAG: {
|
|
30613
|
-
G
|
|
30612
|
+
case O$1.START_TAG: {
|
|
30613
|
+
G(e, t);
|
|
30614
30614
|
break;
|
|
30615
30615
|
}
|
|
30616
|
-
case O.END_TAG: {
|
|
30616
|
+
case O$1.END_TAG: {
|
|
30617
30617
|
Lt$1(e, t);
|
|
30618
30618
|
break;
|
|
30619
30619
|
}
|
|
30620
|
-
case O.EOF: {
|
|
30620
|
+
case O$1.EOF: {
|
|
30621
30621
|
ws(e, t);
|
|
30622
30622
|
break;
|
|
30623
30623
|
}
|
|
@@ -30668,7 +30668,7 @@ function a0(e, t) {
|
|
|
30668
30668
|
e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._insertElement(t, E.HTML);
|
|
30669
30669
|
}
|
|
30670
30670
|
function i0(e, t) {
|
|
30671
|
-
e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._insertElement(t, E.HTML), e.tokenizer.state = K
|
|
30671
|
+
e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._insertElement(t, E.HTML), e.tokenizer.state = K.PLAINTEXT;
|
|
30672
30672
|
}
|
|
30673
30673
|
function n0(e, t) {
|
|
30674
30674
|
e.openElements.hasInScope(s.BUTTON) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(s.BUTTON)), e._reconstructActiveFormattingElements(), e._insertElement(t, E.HTML), e.framesetOk = false;
|
|
@@ -30687,7 +30687,7 @@ function h0(e, t) {
|
|
|
30687
30687
|
e._reconstructActiveFormattingElements(), e._insertElement(t, E.HTML), e.activeFormattingElements.insertMarker(), e.framesetOk = false;
|
|
30688
30688
|
}
|
|
30689
30689
|
function l0(e, t) {
|
|
30690
|
-
e.treeAdapter.getDocumentMode(e.document) !== X.QUIRKS && e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._insertElement(t, E.HTML), e.framesetOk = false, e.insertionMode = l.IN_TABLE;
|
|
30690
|
+
e.treeAdapter.getDocumentMode(e.document) !== X$1.QUIRKS && e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._insertElement(t, E.HTML), e.framesetOk = false, e.insertionMode = l.IN_TABLE;
|
|
30691
30691
|
}
|
|
30692
30692
|
function gs(e, t) {
|
|
30693
30693
|
e._reconstructActiveFormattingElements(), e._appendElement(t, E.HTML), e.framesetOk = false, t.ackSelfClosing = true;
|
|
@@ -30709,16 +30709,16 @@ function b0(e, t) {
|
|
|
30709
30709
|
t.tagName = p.IMG, t.tagID = s.IMG, gs(e, t);
|
|
30710
30710
|
}
|
|
30711
30711
|
function E0(e, t) {
|
|
30712
|
-
e._insertElement(t, E.HTML), e.skipNextNewLine = true, e.tokenizer.state = K
|
|
30712
|
+
e._insertElement(t, E.HTML), e.skipNextNewLine = true, e.tokenizer.state = K.RCDATA, e.originalInsertionMode = e.insertionMode, e.framesetOk = false, e.insertionMode = l.TEXT;
|
|
30713
30713
|
}
|
|
30714
30714
|
function T0(e, t) {
|
|
30715
|
-
e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = false, e._switchToTextParsing(t, K
|
|
30715
|
+
e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = false, e._switchToTextParsing(t, K.RAWTEXT);
|
|
30716
30716
|
}
|
|
30717
30717
|
function _0(e, t) {
|
|
30718
|
-
e.framesetOk = false, e._switchToTextParsing(t, K
|
|
30718
|
+
e.framesetOk = false, e._switchToTextParsing(t, K.RAWTEXT);
|
|
30719
30719
|
}
|
|
30720
30720
|
function hr(e, t) {
|
|
30721
|
-
e._switchToTextParsing(t, K
|
|
30721
|
+
e._switchToTextParsing(t, K.RAWTEXT);
|
|
30722
30722
|
}
|
|
30723
30723
|
function g0(e, t) {
|
|
30724
30724
|
e._reconstructActiveFormattingElements(), e._insertElement(t, E.HTML), e.framesetOk = false, e.insertionMode = e.insertionMode === l.IN_TABLE || e.insertionMode === l.IN_CAPTION || e.insertionMode === l.IN_TABLE_BODY || e.insertionMode === l.IN_ROW || e.insertionMode === l.IN_CELL ? l.IN_SELECT_IN_TABLE : l.IN_SELECT;
|
|
@@ -30741,7 +30741,7 @@ function x0(e, t) {
|
|
|
30741
30741
|
function lr(e, t) {
|
|
30742
30742
|
e._reconstructActiveFormattingElements(), e._insertElement(t, E.HTML);
|
|
30743
30743
|
}
|
|
30744
|
-
function G
|
|
30744
|
+
function G(e, t) {
|
|
30745
30745
|
switch (t.tagID) {
|
|
30746
30746
|
case s.I:
|
|
30747
30747
|
case s.S:
|
|
@@ -31111,14 +31111,14 @@ function M0(e, t) {
|
|
|
31111
31111
|
function B0(e, t) {
|
|
31112
31112
|
e._err(t, b.eofInElementThatCanContainOnlyText), e.openElements.pop(), e.insertionMode = e.originalInsertionMode, e.onEof(t);
|
|
31113
31113
|
}
|
|
31114
|
-
function Wt
|
|
31114
|
+
function Wt(e, t) {
|
|
31115
31115
|
if (e.openElements.currentTagId !== void 0 && bs.has(e.openElements.currentTagId))
|
|
31116
31116
|
switch (e.pendingCharacterTokens.length = 0, e.hasNonWhitespacePendingCharacterToken = false, e.originalInsertionMode = e.insertionMode, e.insertionMode = l.IN_TABLE_TEXT, t.type) {
|
|
31117
|
-
case O.CHARACTER: {
|
|
31117
|
+
case O$1.CHARACTER: {
|
|
31118
31118
|
xs(e, t);
|
|
31119
31119
|
break;
|
|
31120
31120
|
}
|
|
31121
|
-
case O.WHITESPACE_CHARACTER: {
|
|
31121
|
+
case O$1.WHITESPACE_CHARACTER: {
|
|
31122
31122
|
Ns(e, t);
|
|
31123
31123
|
break;
|
|
31124
31124
|
}
|
|
@@ -31139,7 +31139,7 @@ function q0(e, t) {
|
|
|
31139
31139
|
e.openElements.clearBackToTableContext(), e._insertElement(t, E.HTML), e.insertionMode = l.IN_TABLE_BODY;
|
|
31140
31140
|
}
|
|
31141
31141
|
function Y0(e, t) {
|
|
31142
|
-
e.openElements.clearBackToTableContext(), e._insertFakeElement(p.TBODY, s.TBODY), e.insertionMode = l.IN_TABLE_BODY, Rt(e, t);
|
|
31142
|
+
e.openElements.clearBackToTableContext(), e._insertFakeElement(p.TBODY, s.TBODY), e.insertionMode = l.IN_TABLE_BODY, Rt$1(e, t);
|
|
31143
31143
|
}
|
|
31144
31144
|
function j0(e, t) {
|
|
31145
31145
|
e.openElements.hasInTableScope(s.TABLE) && (e.openElements.popUntilTagNamePopped(s.TABLE), e._resetInsertionMode(), e._processStartTag(t));
|
|
@@ -31247,7 +31247,7 @@ function Fe(e, t) {
|
|
|
31247
31247
|
const Is = /* @__PURE__ */ new Set([s.CAPTION, s.COL, s.COLGROUP, s.TBODY, s.TD, s.TFOOT, s.TH, s.THEAD, s.TR]);
|
|
31248
31248
|
function G0(e, t) {
|
|
31249
31249
|
const u = t.tagID;
|
|
31250
|
-
Is.has(u) ? e.openElements.hasInTableScope(s.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(s.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = l.IN_TABLE, Re(e, t)) : G
|
|
31250
|
+
Is.has(u) ? e.openElements.hasInTableScope(s.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(s.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = l.IN_TABLE, Re(e, t)) : G(e, t);
|
|
31251
31251
|
}
|
|
31252
31252
|
function W0(e, t) {
|
|
31253
31253
|
const u = t.tagID;
|
|
@@ -31275,7 +31275,7 @@ function W0(e, t) {
|
|
|
31275
31275
|
function Lu(e, t) {
|
|
31276
31276
|
switch (t.tagID) {
|
|
31277
31277
|
case s.HTML: {
|
|
31278
|
-
G
|
|
31278
|
+
G(e, t);
|
|
31279
31279
|
break;
|
|
31280
31280
|
}
|
|
31281
31281
|
case s.COL: {
|
|
@@ -31287,7 +31287,7 @@ function Lu(e, t) {
|
|
|
31287
31287
|
break;
|
|
31288
31288
|
}
|
|
31289
31289
|
default:
|
|
31290
|
-
_t(e, t);
|
|
31290
|
+
_t$1(e, t);
|
|
31291
31291
|
}
|
|
31292
31292
|
}
|
|
31293
31293
|
function z0(e, t) {
|
|
@@ -31303,13 +31303,13 @@ function z0(e, t) {
|
|
|
31303
31303
|
case s.COL:
|
|
31304
31304
|
break;
|
|
31305
31305
|
default:
|
|
31306
|
-
_t(e, t);
|
|
31306
|
+
_t$1(e, t);
|
|
31307
31307
|
}
|
|
31308
31308
|
}
|
|
31309
|
-
function _t(e, t) {
|
|
31309
|
+
function _t$1(e, t) {
|
|
31310
31310
|
e.openElements.currentTagId === s.COLGROUP && (e.openElements.pop(), e.insertionMode = l.IN_TABLE, e._processToken(t));
|
|
31311
31311
|
}
|
|
31312
|
-
function Rt(e, t) {
|
|
31312
|
+
function Rt$1(e, t) {
|
|
31313
31313
|
switch (t.tagID) {
|
|
31314
31314
|
case s.TR: {
|
|
31315
31315
|
e.openElements.clearBackToTableBodyContext(), e._insertElement(t, E.HTML), e.insertionMode = l.IN_ROW;
|
|
@@ -31373,7 +31373,7 @@ function Dt(e, t) {
|
|
|
31373
31373
|
case s.TFOOT:
|
|
31374
31374
|
case s.THEAD:
|
|
31375
31375
|
case s.TR: {
|
|
31376
|
-
e.openElements.hasInTableScope(s.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = l.IN_TABLE_BODY, Rt(e, t));
|
|
31376
|
+
e.openElements.hasInTableScope(s.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = l.IN_TABLE_BODY, Rt$1(e, t));
|
|
31377
31377
|
break;
|
|
31378
31378
|
}
|
|
31379
31379
|
default:
|
|
@@ -31410,7 +31410,7 @@ function Ss(e, t) {
|
|
|
31410
31410
|
}
|
|
31411
31411
|
function Q0(e, t) {
|
|
31412
31412
|
const u = t.tagID;
|
|
31413
|
-
Is.has(u) ? (e.openElements.hasInTableScope(s.TD) || e.openElements.hasInTableScope(s.TH)) && (e._closeTableCell(), Dt(e, t)) : G
|
|
31413
|
+
Is.has(u) ? (e.openElements.hasInTableScope(s.TD) || e.openElements.hasInTableScope(s.TH)) && (e._closeTableCell(), Dt(e, t)) : G(e, t);
|
|
31414
31414
|
}
|
|
31415
31415
|
function K0(e, t) {
|
|
31416
31416
|
const u = t.tagID;
|
|
@@ -31441,7 +31441,7 @@ function K0(e, t) {
|
|
|
31441
31441
|
function Cs(e, t) {
|
|
31442
31442
|
switch (t.tagID) {
|
|
31443
31443
|
case s.HTML: {
|
|
31444
|
-
G
|
|
31444
|
+
G(e, t);
|
|
31445
31445
|
break;
|
|
31446
31446
|
}
|
|
31447
31447
|
case s.OPTION: {
|
|
@@ -31528,7 +31528,7 @@ function J0(e, t) {
|
|
|
31528
31528
|
break;
|
|
31529
31529
|
}
|
|
31530
31530
|
case s.TR: {
|
|
31531
|
-
e.tmplInsertionModeStack[0] = l.IN_TABLE_BODY, e.insertionMode = l.IN_TABLE_BODY, Rt(e, t);
|
|
31531
|
+
e.tmplInsertionModeStack[0] = l.IN_TABLE_BODY, e.insertionMode = l.IN_TABLE_BODY, Rt$1(e, t);
|
|
31532
31532
|
break;
|
|
31533
31533
|
}
|
|
31534
31534
|
case s.TD:
|
|
@@ -31537,7 +31537,7 @@ function J0(e, t) {
|
|
|
31537
31537
|
break;
|
|
31538
31538
|
}
|
|
31539
31539
|
default:
|
|
31540
|
-
e.tmplInsertionModeStack[0] = l.IN_BODY, e.insertionMode = l.IN_BODY, G
|
|
31540
|
+
e.tmplInsertionModeStack[0] = l.IN_BODY, e.insertionMode = l.IN_BODY, G(e, t);
|
|
31541
31541
|
}
|
|
31542
31542
|
}
|
|
31543
31543
|
function ed(e, t) {
|
|
@@ -31547,7 +31547,7 @@ function Os(e, t) {
|
|
|
31547
31547
|
e.openElements.tmplCount > 0 ? (e.openElements.popUntilTagNamePopped(s.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode(), e.onEof(t)) : Ou(e, t);
|
|
31548
31548
|
}
|
|
31549
31549
|
function td(e, t) {
|
|
31550
|
-
t.tagID === s.HTML ? G
|
|
31550
|
+
t.tagID === s.HTML ? G(e, t) : gt(e, t);
|
|
31551
31551
|
}
|
|
31552
31552
|
function Ls(e, t) {
|
|
31553
31553
|
var u;
|
|
@@ -31558,15 +31558,15 @@ function Ls(e, t) {
|
|
|
31558
31558
|
r && !(!((u = e.treeAdapter.getNodeSourceCodeLocation(r)) === null || u === void 0) && u.endTag) && e._setEndLocation(r, t);
|
|
31559
31559
|
}
|
|
31560
31560
|
} else
|
|
31561
|
-
gt
|
|
31561
|
+
gt(e, t);
|
|
31562
31562
|
}
|
|
31563
|
-
function gt
|
|
31563
|
+
function gt(e, t) {
|
|
31564
31564
|
e.insertionMode = l.IN_BODY, Ot$1(e, t);
|
|
31565
31565
|
}
|
|
31566
31566
|
function ud(e, t) {
|
|
31567
31567
|
switch (t.tagID) {
|
|
31568
31568
|
case s.HTML: {
|
|
31569
|
-
G
|
|
31569
|
+
G(e, t);
|
|
31570
31570
|
break;
|
|
31571
31571
|
}
|
|
31572
31572
|
case s.FRAMESET: {
|
|
@@ -31589,7 +31589,7 @@ function rd(e, t) {
|
|
|
31589
31589
|
function sd(e, t) {
|
|
31590
31590
|
switch (t.tagID) {
|
|
31591
31591
|
case s.HTML: {
|
|
31592
|
-
G
|
|
31592
|
+
G(e, t);
|
|
31593
31593
|
break;
|
|
31594
31594
|
}
|
|
31595
31595
|
case s.NOFRAMES: {
|
|
@@ -31602,7 +31602,7 @@ function ad(e, t) {
|
|
|
31602
31602
|
t.tagID === s.HTML && (e.insertionMode = l.AFTER_AFTER_FRAMESET);
|
|
31603
31603
|
}
|
|
31604
31604
|
function id(e, t) {
|
|
31605
|
-
t.tagID === s.HTML ? G
|
|
31605
|
+
t.tagID === s.HTML ? G(e, t) : ct(e, t);
|
|
31606
31606
|
}
|
|
31607
31607
|
function ct(e, t) {
|
|
31608
31608
|
e.insertionMode = l.IN_BODY, Ot$1(e, t);
|
|
@@ -31610,7 +31610,7 @@ function ct(e, t) {
|
|
|
31610
31610
|
function nd(e, t) {
|
|
31611
31611
|
switch (t.tagID) {
|
|
31612
31612
|
case s.HTML: {
|
|
31613
|
-
G
|
|
31613
|
+
G(e, t);
|
|
31614
31614
|
break;
|
|
31615
31615
|
}
|
|
31616
31616
|
case s.NOFRAMES: {
|
|
@@ -31775,7 +31775,7 @@ const pe = {
|
|
|
31775
31775
|
//Node construction
|
|
31776
31776
|
createDocument() {
|
|
31777
31777
|
const e = new Ne([]);
|
|
31778
|
-
return e["x-mode"] = X.NO_QUIRKS, e;
|
|
31778
|
+
return e["x-mode"] = X$1.NO_QUIRKS, e;
|
|
31779
31779
|
},
|
|
31780
31780
|
createDocumentFragment() {
|
|
31781
31781
|
return new Ne([]);
|
|
@@ -32315,7 +32315,7 @@ const Ld = (e) => {
|
|
|
32315
32315
|
} catch {
|
|
32316
32316
|
return false;
|
|
32317
32317
|
}
|
|
32318
|
-
}, j
|
|
32318
|
+
}, j = (e) => {
|
|
32319
32319
|
const t = {
|
|
32320
32320
|
"&": "&",
|
|
32321
32321
|
"<": "<",
|
|
@@ -32387,7 +32387,7 @@ const Ld = (e) => {
|
|
|
32387
32387
|
fieldCount: Object.keys(h).length
|
|
32388
32388
|
}), h;
|
|
32389
32389
|
} catch (n) {
|
|
32390
|
-
throw vt
|
|
32390
|
+
throw vt(n) ? typeof window < "u" ? r.debug(
|
|
32391
32391
|
"fetchMetadata: Browser CORS restrictions prevent fetching metadata for URL:",
|
|
32392
32392
|
e
|
|
32393
32393
|
) : r.warn(
|
|
@@ -32407,14 +32407,14 @@ const Ld = (e) => {
|
|
|
32407
32407
|
<div class="card-body">
|
|
32408
32408
|
<div class="card-header">
|
|
32409
32409
|
<div class="card-title">📄 External Content</div>
|
|
32410
|
-
<div class="card-provider">${j
|
|
32410
|
+
<div class="card-provider">${j(u)}</div>
|
|
32411
32411
|
</div>
|
|
32412
32412
|
<div class="card-description">
|
|
32413
32413
|
${r}${a ? ` - ${a}` : ""}
|
|
32414
32414
|
</div>
|
|
32415
32415
|
<div class="card-content">
|
|
32416
|
-
<a href="${j
|
|
32417
|
-
→ Open ${j
|
|
32416
|
+
<a href="${j(e)}" target="_blank" rel="noopener noreferrer" class="card-external-link">
|
|
32417
|
+
→ Open ${j(u)} in new tab
|
|
32418
32418
|
</a>
|
|
32419
32419
|
</div>
|
|
32420
32420
|
</div>
|
|
@@ -32435,13 +32435,13 @@ const Ld = (e) => {
|
|
|
32435
32435
|
}, a = u.displayFields || r, i = (y) => {
|
|
32436
32436
|
const W2 = e[y];
|
|
32437
32437
|
return typeof W2 == "string" ? W2 : void 0;
|
|
32438
|
-
}, n = fr(i("title") || "Untitled"), c = i("description") || "", h = i("image") || "", m = i("favicon"), f = u.useMetadataUrlLink && i("url") || t, T = i("siteName") || Bs(f),
|
|
32438
|
+
}, n = fr(i("title") || "Untitled"), c = i("description") || "", h = i("image") || "", m = i("favicon"), f = u.useMetadataUrlLink && i("url") || t, T = i("siteName") || Bs(f), A = pr(n, 80), w = pr(fr(c), 160), v = [];
|
|
32439
32439
|
h && a.image !== void 0 && v.push({
|
|
32440
32440
|
order: a.image,
|
|
32441
32441
|
section: "image",
|
|
32442
|
-
html: At(
|
|
32443
|
-
j
|
|
32444
|
-
j
|
|
32442
|
+
html: At$1(
|
|
32443
|
+
j(h),
|
|
32444
|
+
j(A),
|
|
32445
32445
|
"card-image",
|
|
32446
32446
|
void 0,
|
|
32447
32447
|
'loading="lazy"'
|
|
@@ -32449,7 +32449,7 @@ const Ld = (e) => {
|
|
|
32449
32449
|
});
|
|
32450
32450
|
let S = "";
|
|
32451
32451
|
m && a.favicon !== void 0 && (S = ou(
|
|
32452
|
-
j
|
|
32452
|
+
j(m),
|
|
32453
32453
|
"",
|
|
32454
32454
|
void 0,
|
|
32455
32455
|
'class="card-favicon"'
|
|
@@ -32459,19 +32459,19 @@ const Ld = (e) => {
|
|
|
32459
32459
|
order: a.title,
|
|
32460
32460
|
section: "header",
|
|
32461
32461
|
isHeader: true,
|
|
32462
|
-
html: `<div class="card-title">${j
|
|
32462
|
+
html: `<div class="card-title">${j(A)}</div>`
|
|
32463
32463
|
}), a.siteName !== void 0 && U2.push({
|
|
32464
32464
|
order: a.siteName,
|
|
32465
32465
|
section: "header",
|
|
32466
32466
|
isHeader: true,
|
|
32467
32467
|
html: `<div class="card-provider">
|
|
32468
32468
|
${a.favicon !== void 0 ? S : ""}
|
|
32469
|
-
<span>${j
|
|
32469
|
+
<span>${j(T)}</span>
|
|
32470
32470
|
</div>`
|
|
32471
32471
|
}), w && a.description !== void 0 && v.push({
|
|
32472
32472
|
order: a.description,
|
|
32473
32473
|
section: "body",
|
|
32474
|
-
html: `<div class="card-description">${j
|
|
32474
|
+
html: `<div class="card-description">${j(w)}</div>`
|
|
32475
32475
|
});
|
|
32476
32476
|
for (const [y, W2] of Object.entries(e)) {
|
|
32477
32477
|
if ([
|
|
@@ -32489,15 +32489,15 @@ const Ld = (e) => {
|
|
|
32489
32489
|
if (Ce !== void 0) {
|
|
32490
32490
|
let Me = "";
|
|
32491
32491
|
if (Array.isArray(W2)) {
|
|
32492
|
-
const
|
|
32492
|
+
const Pt2 = W2.slice(0, 3).map((Hs) => `<li>${j(String(Hs))}</li>`).join("");
|
|
32493
32493
|
Me = `<div class="card-field card-${y}">
|
|
32494
|
-
<div class="field-label">${j
|
|
32495
|
-
<ul class="field-list">${
|
|
32494
|
+
<div class="field-label">${j(y)}:</div>
|
|
32495
|
+
<ul class="field-list">${Pt2}</ul>
|
|
32496
32496
|
</div>`;
|
|
32497
32497
|
} else
|
|
32498
32498
|
Me = `<div class="card-field card-${y}">
|
|
32499
|
-
<span class="field-label">${j
|
|
32500
|
-
<span class="field-value">${j
|
|
32499
|
+
<span class="field-label">${j(y)}:</span>
|
|
32500
|
+
<span class="field-value">${j(String(W2))}</span>
|
|
32501
32501
|
</div>`;
|
|
32502
32502
|
v.push({
|
|
32503
32503
|
order: Ce,
|
|
@@ -32518,23 +32518,23 @@ const Ld = (e) => {
|
|
|
32518
32518
|
"locale",
|
|
32519
32519
|
"favicon"
|
|
32520
32520
|
].includes(y) || a[y] === void 0 && M2.push(y);
|
|
32521
|
-
let
|
|
32521
|
+
let ee2 = 1e3;
|
|
32522
32522
|
for (const y of M2) {
|
|
32523
32523
|
const W2 = e[y];
|
|
32524
32524
|
let Ce = "";
|
|
32525
32525
|
if (Array.isArray(W2)) {
|
|
32526
|
-
const Me = W2.slice(0, 3).map((
|
|
32526
|
+
const Me = W2.slice(0, 3).map((Pt2) => `<li>${j(String(Pt2))}</li>`).join("");
|
|
32527
32527
|
Ce = `<div class="card-field card-${y}">
|
|
32528
|
-
<div class="field-label">${j
|
|
32528
|
+
<div class="field-label">${j(y)}:</div>
|
|
32529
32529
|
<ul class="field-list">${Me}</ul>
|
|
32530
32530
|
</div>`;
|
|
32531
32531
|
} else
|
|
32532
32532
|
Ce = `<div class="card-field card-${y}">
|
|
32533
|
-
<span class="field-label">${j
|
|
32534
|
-
<span class="field-value">${j
|
|
32533
|
+
<span class="field-label">${j(y)}:</span>
|
|
32534
|
+
<span class="field-value">${j(String(W2))}</span>
|
|
32535
32535
|
</div>`;
|
|
32536
32536
|
v.push({
|
|
32537
|
-
order:
|
|
32537
|
+
order: ee2++,
|
|
32538
32538
|
section: "enhanced",
|
|
32539
32539
|
html: Ce
|
|
32540
32540
|
});
|
|
@@ -32552,7 +32552,7 @@ const Ld = (e) => {
|
|
|
32552
32552
|
const ku = ae || kt2 ? `<div class="card-body">
|
|
32553
32553
|
${ae}
|
|
32554
32554
|
${kt2}
|
|
32555
|
-
</div>` : "", Us = i("siteName")?.toLowerCase().includes("amazon") ? "card-container card-amazon" : "card-container", Fs = a.url !== void 0 ? `<a href="${j
|
|
32555
|
+
</div>` : "", Us = i("siteName")?.toLowerCase().includes("amazon") ? "card-container card-amazon" : "card-container", Fs = a.url !== void 0 ? `<a href="${j(f)}" target="_blank" rel="noopener noreferrer" class="card-link">
|
|
32556
32556
|
${Du}
|
|
32557
32557
|
${ku}
|
|
32558
32558
|
</a>` : `${Du}
|
|
@@ -32563,23 +32563,23 @@ const Ld = (e) => {
|
|
|
32563
32563
|
};
|
|
32564
32564
|
/*!
|
|
32565
32565
|
* name: mark-deco
|
|
32566
|
-
* version: 0.
|
|
32566
|
+
* version: 0.12.0
|
|
32567
32567
|
* description: Flexible Markdown to HTML conversion library
|
|
32568
32568
|
* author: Kouji Matsui (@kekyo@mi.kekyo.net)
|
|
32569
32569
|
* license: MIT
|
|
32570
32570
|
* repository.url: https://github.com/kekyo/mark-deco.git
|
|
32571
|
-
* git.commit.hash:
|
|
32571
|
+
* git.commit.hash: aff53ffd52269533e39dd1090efe8b582e087d53
|
|
32572
32572
|
*/
|
|
32573
|
-
function
|
|
32573
|
+
function Q(e) {
|
|
32574
32574
|
const t = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/, n = e.match(t);
|
|
32575
32575
|
if (!n)
|
|
32576
32576
|
return {
|
|
32577
32577
|
data: {},
|
|
32578
32578
|
content: e
|
|
32579
32579
|
};
|
|
32580
|
-
const
|
|
32580
|
+
const a = n[1] || "", r = e.slice(n[0].length);
|
|
32581
32581
|
try {
|
|
32582
|
-
const s2 = load(
|
|
32582
|
+
const s2 = load(a, { schema: JSON_SCHEMA });
|
|
32583
32583
|
return {
|
|
32584
32584
|
data: s2 && typeof s2 == "object" && !Array.isArray(s2) ? s2 : {},
|
|
32585
32585
|
content: r
|
|
@@ -32589,7 +32589,7 @@ function B(e) {
|
|
|
32589
32589
|
throw new Error(`Failed to parse frontmatter YAML: ${h}`);
|
|
32590
32590
|
}
|
|
32591
32591
|
}
|
|
32592
|
-
function
|
|
32592
|
+
function kt(e) {
|
|
32593
32593
|
if (!e || Object.keys(e).length === 0)
|
|
32594
32594
|
return "";
|
|
32595
32595
|
const t = dump(e, { lineWidth: 0 });
|
|
@@ -32597,27 +32597,27 @@ function gt(e) {
|
|
|
32597
32597
|
`) ? t : `${t}
|
|
32598
32598
|
`;
|
|
32599
32599
|
}
|
|
32600
|
-
function
|
|
32600
|
+
function V(e, t) {
|
|
32601
32601
|
const n = t ?? "";
|
|
32602
32602
|
return `${`---
|
|
32603
|
-
${
|
|
32603
|
+
${kt(e)}---
|
|
32604
32604
|
`}${n}`;
|
|
32605
32605
|
}
|
|
32606
|
-
const
|
|
32607
|
-
},
|
|
32608
|
-
debug:
|
|
32609
|
-
info:
|
|
32610
|
-
warn:
|
|
32611
|
-
error:
|
|
32612
|
-
},
|
|
32606
|
+
const _ = () => {
|
|
32607
|
+
}, bt = {
|
|
32608
|
+
debug: _,
|
|
32609
|
+
info: _,
|
|
32610
|
+
warn: _,
|
|
32611
|
+
error: _
|
|
32612
|
+
}, St = {
|
|
32613
32613
|
debug: console.debug,
|
|
32614
32614
|
info: console.info,
|
|
32615
32615
|
warn: console.warn,
|
|
32616
32616
|
error: console.error
|
|
32617
|
-
},
|
|
32618
|
-
const t = {}, n = e.slice(1, -1).trim(),
|
|
32619
|
-
if (
|
|
32620
|
-
const h =
|
|
32617
|
+
}, $t = () => bt, Gt = () => St, O = (e) => {
|
|
32618
|
+
const t = {}, n = e.slice(1, -1).trim(), a = n.match(/\.([a-zA-Z0-9_-]+)/g);
|
|
32619
|
+
if (a) {
|
|
32620
|
+
const h = a.map((u) => u.slice(1));
|
|
32621
32621
|
t.class = h.join(" ");
|
|
32622
32622
|
}
|
|
32623
32623
|
const r = n.match(/#([a-zA-Z0-9_-]+)/);
|
|
@@ -32625,30 +32625,30 @@ const P = () => {
|
|
|
32625
32625
|
const s2 = n.match(/([a-zA-Z0-9_-]+)=["']?([^"'\s]*)["']?/g);
|
|
32626
32626
|
if (s2)
|
|
32627
32627
|
for (const h of s2) {
|
|
32628
|
-
const [
|
|
32629
|
-
|
|
32628
|
+
const [u, p2] = h.split("=");
|
|
32629
|
+
u && p2 && u !== "class" && u !== "id" && (t[u] = p2.replace(/["']/g, ""));
|
|
32630
32630
|
}
|
|
32631
32631
|
return t;
|
|
32632
|
-
},
|
|
32632
|
+
}, xt = (e) => {
|
|
32633
32633
|
const t = e.lang ? ` class="language-${e.lang}"` : "", n = e.value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
32634
32634
|
return `<pre><code${t}>${n}</code></pre>`;
|
|
32635
|
-
},
|
|
32636
|
-
e.data || (e.data = {}), e.data.hProperties || (e.data.hProperties = {}), Object.entries(t).forEach(([n,
|
|
32635
|
+
}, L = (e, t) => {
|
|
32636
|
+
e.data || (e.data = {}), e.data.hProperties || (e.data.hProperties = {}), Object.entries(t).forEach(([n, a]) => {
|
|
32637
32637
|
if (n === "class") {
|
|
32638
32638
|
const r = e.data.hProperties.class;
|
|
32639
|
-
r ? typeof r == "string" && r.startsWith("language-") ? e.data.hProperties.class = `${r} ${
|
|
32639
|
+
r ? typeof r == "string" && r.startsWith("language-") ? e.data.hProperties.class = `${r} ${a}` : e.data.hProperties.class = `${r} ${a}` : e.data.hProperties.class = a;
|
|
32640
32640
|
} else
|
|
32641
|
-
e.data.hProperties[n] =
|
|
32641
|
+
e.data.hProperties[n] = a;
|
|
32642
32642
|
});
|
|
32643
|
-
},
|
|
32644
|
-
visit(e, (t, n,
|
|
32643
|
+
}, Ht = () => (e) => {
|
|
32644
|
+
visit(e, (t, n, a) => {
|
|
32645
32645
|
if (t.type === "heading" && t.children?.length > 0) {
|
|
32646
32646
|
const r = t.children[t.children.length - 1];
|
|
32647
32647
|
if (r?.type === "text" && r.value) {
|
|
32648
32648
|
const s2 = r.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
|
|
32649
32649
|
if (s2) {
|
|
32650
|
-
const h = s2[1].trim(),
|
|
32651
|
-
r.value = h,
|
|
32650
|
+
const h = s2[1].trim(), u = s2[2], p2 = O(u);
|
|
32651
|
+
r.value = h, L(t, p2);
|
|
32652
32652
|
}
|
|
32653
32653
|
}
|
|
32654
32654
|
}
|
|
@@ -32657,28 +32657,28 @@ const P = () => {
|
|
|
32657
32657
|
if (r?.type === "text" && r.value) {
|
|
32658
32658
|
const s2 = r.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
|
|
32659
32659
|
if (s2) {
|
|
32660
|
-
const h = s2[1].trim(),
|
|
32661
|
-
r.value = h,
|
|
32660
|
+
const h = s2[1].trim(), u = s2[2], p2 = O(u);
|
|
32661
|
+
r.value = h, L(t, p2);
|
|
32662
32662
|
}
|
|
32663
32663
|
}
|
|
32664
32664
|
}
|
|
32665
|
-
if (t.type === "link" &&
|
|
32666
|
-
const r =
|
|
32665
|
+
if (t.type === "link" && a && typeof n == "number") {
|
|
32666
|
+
const r = a.children[n + 1];
|
|
32667
32667
|
if (r?.type === "text" && r.value) {
|
|
32668
32668
|
const s2 = r.value.match(/^\s*(\{[^}]+\})/);
|
|
32669
32669
|
if (s2) {
|
|
32670
|
-
const h = s2[1],
|
|
32671
|
-
|
|
32670
|
+
const h = s2[1], u = O(h);
|
|
32671
|
+
L(t, u), r.value = r.value.replace(s2[0], "");
|
|
32672
32672
|
}
|
|
32673
32673
|
}
|
|
32674
32674
|
}
|
|
32675
|
-
if (t.type === "image" &&
|
|
32676
|
-
const r =
|
|
32675
|
+
if (t.type === "image" && a && typeof n == "number") {
|
|
32676
|
+
const r = a.children[n + 1];
|
|
32677
32677
|
if (r?.type === "text" && r.value) {
|
|
32678
32678
|
const s2 = r.value.match(/^\s*(\{[^}]+\})/);
|
|
32679
32679
|
if (s2) {
|
|
32680
|
-
const h = s2[1],
|
|
32681
|
-
|
|
32680
|
+
const h = s2[1], u = O(h);
|
|
32681
|
+
L(t, u), r.value = r.value.replace(s2[0], "");
|
|
32682
32682
|
}
|
|
32683
32683
|
}
|
|
32684
32684
|
}
|
|
@@ -32689,21 +32689,21 @@ const P = () => {
|
|
|
32689
32689
|
if (s2?.type === "text" && s2.value) {
|
|
32690
32690
|
const h = s2.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
|
|
32691
32691
|
if (h) {
|
|
32692
|
-
const
|
|
32693
|
-
s2.value =
|
|
32692
|
+
const u = h[1].trim(), p2 = h[2], i = O(p2);
|
|
32693
|
+
s2.value = u, L(t, i);
|
|
32694
32694
|
}
|
|
32695
32695
|
}
|
|
32696
32696
|
}
|
|
32697
32697
|
}
|
|
32698
|
-
if (t.type === "list" &&
|
|
32699
|
-
const r =
|
|
32698
|
+
if (t.type === "list" && a && typeof n == "number") {
|
|
32699
|
+
const r = a.children[n + 1];
|
|
32700
32700
|
if (r?.type === "paragraph" && r.children?.length === 1) {
|
|
32701
32701
|
const s2 = r.children[0];
|
|
32702
32702
|
if (s2?.type === "text" && s2.value) {
|
|
32703
32703
|
const h = s2.value.match(/^\s*(\{[^}]+\})\s*$/);
|
|
32704
32704
|
if (h) {
|
|
32705
|
-
const
|
|
32706
|
-
|
|
32705
|
+
const u = h[1], p2 = O(u);
|
|
32706
|
+
L(t, p2), a.children.splice(n + 1, 1);
|
|
32707
32707
|
}
|
|
32708
32708
|
}
|
|
32709
32709
|
}
|
|
@@ -32715,58 +32715,105 @@ const P = () => {
|
|
|
32715
32715
|
if (s2?.type === "text" && s2.value) {
|
|
32716
32716
|
const h = s2.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
|
|
32717
32717
|
if (h) {
|
|
32718
|
-
const
|
|
32719
|
-
s2.value =
|
|
32718
|
+
const u = h[1].trim(), p2 = h[2], i = O(p2);
|
|
32719
|
+
s2.value = u, L(t, i);
|
|
32720
32720
|
}
|
|
32721
32721
|
}
|
|
32722
32722
|
}
|
|
32723
32723
|
}
|
|
32724
|
-
if (t.type === "blockquote" &&
|
|
32725
|
-
const r =
|
|
32724
|
+
if (t.type === "blockquote" && a && typeof n == "number") {
|
|
32725
|
+
const r = a.children[n + 1];
|
|
32726
32726
|
if (r?.type === "paragraph" && r.children?.length === 1) {
|
|
32727
32727
|
const s2 = r.children[0];
|
|
32728
32728
|
if (s2?.type === "text" && s2.value) {
|
|
32729
32729
|
const h = s2.value.match(/^\s*(\{[^}]+\})\s*$/);
|
|
32730
32730
|
if (h) {
|
|
32731
|
-
const
|
|
32732
|
-
|
|
32731
|
+
const u = h[1], p2 = O(u);
|
|
32732
|
+
L(t, p2), a.children.splice(n + 1, 1);
|
|
32733
32733
|
}
|
|
32734
32734
|
}
|
|
32735
32735
|
}
|
|
32736
32736
|
}
|
|
32737
|
-
if (t.type === "inlineCode" &&
|
|
32738
|
-
const r =
|
|
32737
|
+
if (t.type === "inlineCode" && a && typeof n == "number") {
|
|
32738
|
+
const r = a.children[n + 1];
|
|
32739
32739
|
if (r?.type === "text" && r.value) {
|
|
32740
32740
|
const s2 = r.value.match(/^\s*(\{[^}]+\})/);
|
|
32741
32741
|
if (s2) {
|
|
32742
|
-
const h = s2[1],
|
|
32743
|
-
|
|
32742
|
+
const h = s2[1], u = O(h);
|
|
32743
|
+
L(t, u), r.value = r.value.replace(s2[0], "");
|
|
32744
32744
|
}
|
|
32745
32745
|
}
|
|
32746
32746
|
}
|
|
32747
32747
|
if (t.type === "code" && t.meta) {
|
|
32748
32748
|
const r = t.meta.match(/\{([^}]+)\}/);
|
|
32749
32749
|
if (r) {
|
|
32750
|
-
const s2 = `{${r[1]}}`, h =
|
|
32750
|
+
const s2 = `{${r[1]}}`, h = O(s2), u = {
|
|
32751
32751
|
type: "html",
|
|
32752
32752
|
value: `<div class="${h.class || ""}" ${Object.entries(
|
|
32753
32753
|
h
|
|
32754
|
-
).filter(([
|
|
32754
|
+
).filter(([p2]) => p2 !== "class").map(([p2, i]) => `${p2}="${i}"`).join(" ")}>${xt(t)}</div>`
|
|
32755
32755
|
};
|
|
32756
|
-
|
|
32756
|
+
a && typeof n == "number" && (a.children[n] = u), t.meta = t.meta.replace(r[0], "").trim() || null;
|
|
32757
32757
|
}
|
|
32758
32758
|
}
|
|
32759
32759
|
});
|
|
32760
|
-
},
|
|
32760
|
+
}, Ct = () => (e) => {
|
|
32761
32761
|
visit(e, "element", (t) => {
|
|
32762
32762
|
if (t.tagName === "img") {
|
|
32763
32763
|
const n = Ys();
|
|
32764
32764
|
t.properties || (t.properties = {});
|
|
32765
|
-
const
|
|
32765
|
+
const a = t.properties.style || "", r = a ? `${a}; ${n}` : n;
|
|
32766
32766
|
t.properties.style = r;
|
|
32767
32767
|
}
|
|
32768
32768
|
});
|
|
32769
|
-
},
|
|
32769
|
+
}, U = (e) => e ? "value" in e && typeof e.value == "string" ? e.value : "children" in e && Array.isArray(e.children) ? e.children.map((t) => U(t)).join("") : "" : "", Ft = (e) => {
|
|
32770
|
+
const { frontmatter: t, hasTitle: n, allowTitleWrite: a, onHeadingApplied: r } = e;
|
|
32771
|
+
return (s2) => {
|
|
32772
|
+
if (!t || !s2.children || s2.children.length === 0)
|
|
32773
|
+
return;
|
|
32774
|
+
let h = 0;
|
|
32775
|
+
for (; h < s2.children.length; h++) {
|
|
32776
|
+
const u = s2.children[h];
|
|
32777
|
+
if (u.type === "heading" && u.depth === 1) {
|
|
32778
|
+
const p2 = u, i = s2.children[h + 1], c = i && i.position ? i.position.start?.offset : void 0, l2 = U(p2).trim();
|
|
32779
|
+
s2.children.splice(h, 1);
|
|
32780
|
+
let o2 = false;
|
|
32781
|
+
!n && a && l2.length > 0 && (t.title = l2, o2 = true), r && r({
|
|
32782
|
+
headingText: l2,
|
|
32783
|
+
position: p2.position,
|
|
32784
|
+
nextNodeStartOffset: c,
|
|
32785
|
+
titleWritten: o2
|
|
32786
|
+
});
|
|
32787
|
+
break;
|
|
32788
|
+
}
|
|
32789
|
+
if (!(u.type === "thematicBreak" || u.type === "html" && typeof u.value == "string" && u.value.trim() === "") && !(u.type === "paragraph" && u.children?.length === 0))
|
|
32790
|
+
break;
|
|
32791
|
+
}
|
|
32792
|
+
};
|
|
32793
|
+
}, Z = (e, t, n) => {
|
|
32794
|
+
const a = t != null && Object.prototype.hasOwnProperty.call(t, "title") && t.title !== void 0 && t.title !== null;
|
|
32795
|
+
let r = false, s2 = false, h, u;
|
|
32796
|
+
const p2 = unified().use(remarkParse).use(Ft, {
|
|
32797
|
+
frontmatter: t,
|
|
32798
|
+
hasTitle: a,
|
|
32799
|
+
allowTitleWrite: n.allowTitleWrite,
|
|
32800
|
+
onHeadingApplied: (c) => {
|
|
32801
|
+
r = true, s2 = c.titleWritten;
|
|
32802
|
+
const l2 = c.position?.start?.offset ?? 0;
|
|
32803
|
+
let o2 = c.position?.end?.offset ?? l2;
|
|
32804
|
+
typeof c.nextNodeStartOffset == "number" && c.nextNodeStartOffset >= o2 ? o2 = c.nextNodeStartOffset : o2 = e.length, h = l2, u = o2;
|
|
32805
|
+
}
|
|
32806
|
+
}), i = p2.parse(e);
|
|
32807
|
+
return p2.runSync(i), r && h !== void 0 && u !== void 0 ? {
|
|
32808
|
+
content: e.slice(0, h) + e.slice(u),
|
|
32809
|
+
headingRemoved: true,
|
|
32810
|
+
titleWritten: s2
|
|
32811
|
+
} : {
|
|
32812
|
+
content: e,
|
|
32813
|
+
headingRemoved: false,
|
|
32814
|
+
titleWritten: false
|
|
32815
|
+
};
|
|
32816
|
+
}, { html: Tt } = ot$1, Ot = {
|
|
32770
32817
|
indent_size: 2,
|
|
32771
32818
|
indent_char: " ",
|
|
32772
32819
|
max_preserve_newlines: 2,
|
|
@@ -32778,22 +32825,22 @@ const P = () => {
|
|
|
32778
32825
|
unformatted: ["code", "pre", "textarea"],
|
|
32779
32826
|
content_unformatted: ["pre", "code", "textarea"],
|
|
32780
32827
|
extra_liners: []
|
|
32781
|
-
},
|
|
32828
|
+
}, W = (e) => {
|
|
32782
32829
|
if (e instanceof Date)
|
|
32783
32830
|
return e.toISOString();
|
|
32784
32831
|
if (Array.isArray(e))
|
|
32785
|
-
return e.map(
|
|
32832
|
+
return e.map(W);
|
|
32786
32833
|
if (e && typeof e == "object") {
|
|
32787
|
-
const t = Object.entries(e).filter(([,
|
|
32788
|
-
for (const [
|
|
32789
|
-
n[
|
|
32834
|
+
const t = Object.entries(e).filter(([, a]) => a !== void 0).sort(([a], [r]) => a < r ? -1 : a > r ? 1 : 0), n = {};
|
|
32835
|
+
for (const [a, r] of t)
|
|
32836
|
+
n[a] = W(r);
|
|
32790
32837
|
return n;
|
|
32791
32838
|
}
|
|
32792
32839
|
return e;
|
|
32793
|
-
},
|
|
32840
|
+
}, M = (e) => JSON.stringify(W(e ?? {})), It = (e, t) => `${e}-${t.join("-")}`, Nt = (e) => {
|
|
32794
32841
|
const t = [], n = [];
|
|
32795
|
-
for (const
|
|
32796
|
-
const r =
|
|
32842
|
+
for (const a of e) {
|
|
32843
|
+
const r = a.level;
|
|
32797
32844
|
for (; n.length > r; )
|
|
32798
32845
|
n.pop();
|
|
32799
32846
|
for (; n.length < r; )
|
|
@@ -32802,27 +32849,27 @@ const P = () => {
|
|
|
32802
32849
|
n[s2] = (n[s2] || 0) + 1;
|
|
32803
32850
|
const h = n.slice(0, r);
|
|
32804
32851
|
t.push({
|
|
32805
|
-
level:
|
|
32806
|
-
text:
|
|
32852
|
+
level: a.level,
|
|
32853
|
+
text: a.text,
|
|
32807
32854
|
numbers: h
|
|
32808
32855
|
});
|
|
32809
32856
|
}
|
|
32810
32857
|
return t;
|
|
32811
|
-
},
|
|
32812
|
-
const
|
|
32813
|
-
return
|
|
32814
|
-
},
|
|
32858
|
+
}, X = (e, t, n) => {
|
|
32859
|
+
const a = jd(t);
|
|
32860
|
+
return a !== void 0 ? `${e}-${a}` : n();
|
|
32861
|
+
}, Lt = (e) => {
|
|
32815
32862
|
const t = [], n = [];
|
|
32816
|
-
for (const
|
|
32863
|
+
for (const a of e) {
|
|
32817
32864
|
const r = {
|
|
32818
|
-
level:
|
|
32819
|
-
text:
|
|
32820
|
-
id:
|
|
32865
|
+
level: a.level,
|
|
32866
|
+
text: a.text,
|
|
32867
|
+
id: a.id,
|
|
32821
32868
|
children: []
|
|
32822
32869
|
};
|
|
32823
32870
|
for (; n.length > 0; ) {
|
|
32824
32871
|
const s2 = n[n.length - 1];
|
|
32825
|
-
if (s2 && s2.level >=
|
|
32872
|
+
if (s2 && s2.level >= a.level)
|
|
32826
32873
|
n.pop();
|
|
32827
32874
|
else
|
|
32828
32875
|
break;
|
|
@@ -32836,226 +32883,259 @@ const P = () => {
|
|
|
32836
32883
|
n.push(r);
|
|
32837
32884
|
}
|
|
32838
32885
|
return t;
|
|
32839
|
-
},
|
|
32840
|
-
const { plugins: t = [], logger: n =
|
|
32841
|
-
for (const
|
|
32842
|
-
if (r.has(
|
|
32886
|
+
}, Qt = (e) => {
|
|
32887
|
+
const { plugins: t = [], logger: n = $t(), fetcher: a } = e, r = /* @__PURE__ */ new Map();
|
|
32888
|
+
for (const o2 of t) {
|
|
32889
|
+
if (r.has(o2.name))
|
|
32843
32890
|
throw new Error(
|
|
32844
|
-
`Plugin with name '${
|
|
32891
|
+
`Plugin with name '${o2.name}' is already registered`
|
|
32845
32892
|
);
|
|
32846
|
-
r.set(
|
|
32893
|
+
r.set(o2.name, o2);
|
|
32847
32894
|
}
|
|
32848
|
-
const s2 = async (
|
|
32849
|
-
const
|
|
32850
|
-
return
|
|
32851
|
-
}, h = (
|
|
32852
|
-
const
|
|
32895
|
+
const s2 = async (o2, f, d2) => {
|
|
32896
|
+
const m = r.get(o2);
|
|
32897
|
+
return m ? await m.processBlock(f, d2) : `<pre><code class="language-${o2}">${R(f)}</code></pre>`;
|
|
32898
|
+
}, h = (o2, f, d2) => {
|
|
32899
|
+
const m = {
|
|
32853
32900
|
logger: n,
|
|
32854
32901
|
signal: f,
|
|
32855
|
-
frontmatter:
|
|
32856
|
-
getUniqueId:
|
|
32857
|
-
fetcher:
|
|
32902
|
+
frontmatter: o2,
|
|
32903
|
+
getUniqueId: d2,
|
|
32904
|
+
fetcher: a
|
|
32858
32905
|
};
|
|
32859
32906
|
return () => async (y) => {
|
|
32860
|
-
const
|
|
32907
|
+
const w = [];
|
|
32861
32908
|
visit(
|
|
32862
32909
|
y,
|
|
32863
32910
|
"code",
|
|
32864
|
-
(
|
|
32865
|
-
if (!
|
|
32911
|
+
(g2, v, $2) => {
|
|
32912
|
+
if (!g2.lang || !r.has(g2.lang))
|
|
32866
32913
|
return;
|
|
32867
|
-
const
|
|
32868
|
-
const
|
|
32914
|
+
const S = (async () => {
|
|
32915
|
+
const E2 = {
|
|
32869
32916
|
type: "html",
|
|
32870
32917
|
value: await s2(
|
|
32871
|
-
|
|
32872
|
-
|
|
32873
|
-
|
|
32918
|
+
g2.lang,
|
|
32919
|
+
g2.value,
|
|
32920
|
+
m
|
|
32874
32921
|
)
|
|
32875
32922
|
};
|
|
32876
|
-
|
|
32923
|
+
$2 && typeof v == "number" && ($2.children[v] = E2);
|
|
32877
32924
|
})();
|
|
32878
|
-
|
|
32925
|
+
w.push(S);
|
|
32879
32926
|
}
|
|
32880
|
-
), await Promise.all(
|
|
32927
|
+
), await Promise.all(w);
|
|
32881
32928
|
};
|
|
32882
|
-
},
|
|
32883
|
-
const
|
|
32884
|
-
visit(
|
|
32885
|
-
|
|
32929
|
+
}, u = (o2, f, d2 = false, m = false, y = "") => () => (w) => {
|
|
32930
|
+
const g2 = [], v = [];
|
|
32931
|
+
visit(w, "heading", (E2) => {
|
|
32932
|
+
E2.depth >= 1 && E2.depth <= 6 && v.push(E2);
|
|
32886
32933
|
});
|
|
32887
|
-
let
|
|
32888
|
-
if (
|
|
32889
|
-
const
|
|
32890
|
-
level:
|
|
32891
|
-
text: U(
|
|
32934
|
+
let $2 = [];
|
|
32935
|
+
if (d2) {
|
|
32936
|
+
const E2 = v.map((I2) => ({
|
|
32937
|
+
level: I2.depth,
|
|
32938
|
+
text: U(I2)
|
|
32892
32939
|
}));
|
|
32893
|
-
|
|
32894
|
-
}
|
|
32895
|
-
const
|
|
32896
|
-
|
|
32897
|
-
const
|
|
32898
|
-
let
|
|
32899
|
-
if (
|
|
32900
|
-
|
|
32901
|
-
else if (
|
|
32902
|
-
const
|
|
32940
|
+
$2 = Nt(E2);
|
|
32941
|
+
}
|
|
32942
|
+
const S = [];
|
|
32943
|
+
v.forEach((E2, I2) => {
|
|
32944
|
+
const T = U(E2), F2 = E2.data?.hProperties?.id;
|
|
32945
|
+
let b2;
|
|
32946
|
+
if (F2)
|
|
32947
|
+
b2 = F2;
|
|
32948
|
+
else if (d2 && m) {
|
|
32949
|
+
const N2 = X(
|
|
32903
32950
|
y,
|
|
32904
|
-
|
|
32905
|
-
() => f(
|
|
32951
|
+
T,
|
|
32952
|
+
() => f(T)
|
|
32906
32953
|
).replace(`${y}-`, "");
|
|
32907
|
-
for (;
|
|
32908
|
-
const
|
|
32909
|
-
if (
|
|
32910
|
-
|
|
32954
|
+
for (; S.length > 0; ) {
|
|
32955
|
+
const k2 = S[S.length - 1];
|
|
32956
|
+
if (k2 && k2.level >= E2.depth)
|
|
32957
|
+
S.pop();
|
|
32911
32958
|
else
|
|
32912
32959
|
break;
|
|
32913
32960
|
}
|
|
32914
|
-
const
|
|
32915
|
-
|
|
32916
|
-
level:
|
|
32917
|
-
contentId:
|
|
32961
|
+
const R2 = S.map((k2) => k2.contentId);
|
|
32962
|
+
b2 = R2.length > 0 ? `${y}-${R2.join("-")}-${N2}` : `${y}-${N2}`, S.push({
|
|
32963
|
+
level: E2.depth,
|
|
32964
|
+
contentId: N2
|
|
32918
32965
|
});
|
|
32919
|
-
} else if (
|
|
32920
|
-
const
|
|
32921
|
-
|
|
32966
|
+
} else if (d2 && I2 < $2.length) {
|
|
32967
|
+
const N2 = $2[I2];
|
|
32968
|
+
N2 ? b2 = It(
|
|
32922
32969
|
y,
|
|
32923
|
-
|
|
32924
|
-
) :
|
|
32970
|
+
N2.numbers
|
|
32971
|
+
) : b2 = f(T);
|
|
32925
32972
|
} else
|
|
32926
|
-
|
|
32927
|
-
|
|
32928
|
-
level:
|
|
32929
|
-
text:
|
|
32930
|
-
id:
|
|
32973
|
+
b2 = f(T);
|
|
32974
|
+
E2.data || (E2.data = {}), E2.data.hProperties || (E2.data.hProperties = {}), F2 || (E2.data.hProperties.id = b2), g2.push({
|
|
32975
|
+
level: E2.depth,
|
|
32976
|
+
text: T,
|
|
32977
|
+
id: b2
|
|
32931
32978
|
});
|
|
32932
32979
|
});
|
|
32933
|
-
const
|
|
32934
|
-
|
|
32935
|
-
},
|
|
32980
|
+
const x2 = Lt(g2);
|
|
32981
|
+
o2.push(...x2);
|
|
32982
|
+
}, p2 = (o2) => {
|
|
32936
32983
|
throw n.error(
|
|
32937
|
-
`Failed to process markdown: ${
|
|
32984
|
+
`Failed to process markdown: ${o2 instanceof Error ? o2.message : "Unknown error"}`
|
|
32938
32985
|
), new Error(
|
|
32939
|
-
`Failed to process markdown: ${
|
|
32986
|
+
`Failed to process markdown: ${o2 instanceof Error ? o2.message : "Unknown error"}`
|
|
32940
32987
|
);
|
|
32941
|
-
},
|
|
32988
|
+
}, i = async (o2, f, d2, m, y, w) => {
|
|
32942
32989
|
const {
|
|
32943
|
-
signal:
|
|
32944
|
-
useContentStringHeaderId:
|
|
32945
|
-
useHierarchicalHeadingId:
|
|
32946
|
-
advancedOptions:
|
|
32947
|
-
} =
|
|
32948
|
-
allowDangerousHtml:
|
|
32949
|
-
htmlOptions:
|
|
32950
|
-
gfmOptions:
|
|
32951
|
-
remarkPlugins:
|
|
32952
|
-
rehypePlugins:
|
|
32953
|
-
} =
|
|
32954
|
-
let
|
|
32955
|
-
const
|
|
32956
|
-
let
|
|
32957
|
-
if (
|
|
32958
|
-
for (const
|
|
32959
|
-
Array.isArray(
|
|
32960
|
-
let
|
|
32961
|
-
|
|
32962
|
-
|
|
32963
|
-
|
|
32964
|
-
|
|
32965
|
-
|
|
32990
|
+
signal: g2,
|
|
32991
|
+
useContentStringHeaderId: v = false,
|
|
32992
|
+
useHierarchicalHeadingId: $2 = true,
|
|
32993
|
+
advancedOptions: S
|
|
32994
|
+
} = d2 ?? {}, {
|
|
32995
|
+
allowDangerousHtml: x2 = true,
|
|
32996
|
+
htmlOptions: E2 = Ot,
|
|
32997
|
+
gfmOptions: I2 = {},
|
|
32998
|
+
remarkPlugins: T = [],
|
|
32999
|
+
rehypePlugins: F2 = []
|
|
33000
|
+
} = S || {}, b2 = [];
|
|
33001
|
+
let N2 = 0;
|
|
33002
|
+
const R2 = () => `${f}-${++N2}`;
|
|
33003
|
+
let C2 = unified().use(remarkParse);
|
|
33004
|
+
if (T)
|
|
33005
|
+
for (const H2 of T)
|
|
33006
|
+
Array.isArray(H2) ? C2 = C2.use(H2[0], H2[1]) : C2 = C2.use(H2);
|
|
33007
|
+
let k2 = C2.use(remarkGfm, I2).use(Ht).use(
|
|
33008
|
+
u(
|
|
33009
|
+
b2,
|
|
33010
|
+
v ? (H2) => X(f, H2, R2) : R2,
|
|
33011
|
+
$2,
|
|
33012
|
+
v,
|
|
32966
33013
|
f
|
|
32967
33014
|
)
|
|
32968
|
-
).use(h(
|
|
32969
|
-
if (
|
|
32970
|
-
for (const
|
|
32971
|
-
Array.isArray(
|
|
32972
|
-
const
|
|
33015
|
+
).use(h(m, g2, R2)).use(remarkRehype, { allowDangerousHtml: x2 }).use(Ct).use(rehypeStringify, { allowDangerousHtml: x2 });
|
|
33016
|
+
if (F2)
|
|
33017
|
+
for (const H2 of F2)
|
|
33018
|
+
Array.isArray(H2) ? k2 = k2.use(H2[0], H2[1]) : k2 = k2.use(H2);
|
|
33019
|
+
const B2 = await k2.process(y), A = String(B2);
|
|
32973
33020
|
return {
|
|
32974
|
-
html:
|
|
32975
|
-
frontmatter:
|
|
32976
|
-
changed:
|
|
32977
|
-
headingTree:
|
|
32978
|
-
composeMarkdown: () =>
|
|
33021
|
+
html: Tt(A, E2),
|
|
33022
|
+
frontmatter: m,
|
|
33023
|
+
changed: w,
|
|
33024
|
+
headingTree: b2,
|
|
33025
|
+
composeMarkdown: () => w ? V(m, y) : o2,
|
|
33026
|
+
uniqueIdPrefix: f
|
|
32979
33027
|
};
|
|
32980
33028
|
};
|
|
32981
33029
|
return {
|
|
32982
|
-
process: async (
|
|
33030
|
+
process: async (o2, f, d2 = {}) => {
|
|
32983
33031
|
try {
|
|
32984
|
-
const { data:
|
|
32985
|
-
|
|
32986
|
-
|
|
33032
|
+
const { data: m, content: y } = Q(o2), w = d2.applyTitleFromH1 ?? true;
|
|
33033
|
+
let g2 = y, v = false, $2 = false;
|
|
33034
|
+
if (w) {
|
|
33035
|
+
const x2 = Z(g2, m, {
|
|
33036
|
+
allowTitleWrite: true
|
|
33037
|
+
});
|
|
33038
|
+
g2 = x2.content, v = x2.headingRemoved, $2 = x2.titleWritten;
|
|
33039
|
+
}
|
|
33040
|
+
return await i(
|
|
33041
|
+
o2,
|
|
32987
33042
|
f,
|
|
32988
|
-
|
|
32989
|
-
|
|
32990
|
-
|
|
32991
|
-
|
|
33043
|
+
d2,
|
|
33044
|
+
m,
|
|
33045
|
+
g2,
|
|
33046
|
+
v || $2
|
|
32992
33047
|
);
|
|
32993
|
-
} catch (
|
|
32994
|
-
return
|
|
33048
|
+
} catch (m) {
|
|
33049
|
+
return p2(m);
|
|
32995
33050
|
}
|
|
32996
33051
|
},
|
|
32997
|
-
processWithFrontmatterTransform: async (
|
|
33052
|
+
processWithFrontmatterTransform: async (o2, f, d2, m, y = {}) => {
|
|
32998
33053
|
try {
|
|
32999
|
-
const { data:
|
|
33000
|
-
originalFrontmatter:
|
|
33001
|
-
markdownContent: g2
|
|
33054
|
+
const { data: w, content: g2 } = Q(o2), v = M(w), S = d2({
|
|
33055
|
+
originalFrontmatter: w,
|
|
33056
|
+
markdownContent: g2,
|
|
33057
|
+
uniqueIdPrefix: f
|
|
33002
33058
|
});
|
|
33003
|
-
if (
|
|
33059
|
+
if (S === void 0)
|
|
33004
33060
|
return;
|
|
33005
|
-
const
|
|
33006
|
-
|
|
33007
|
-
|
|
33008
|
-
|
|
33009
|
-
|
|
33010
|
-
|
|
33011
|
-
|
|
33012
|
-
|
|
33061
|
+
const { frontmatter: x2, uniqueIdPrefix: E2 } = S, I2 = E2 ?? f, T = y.applyTitleFromH1 ?? true;
|
|
33062
|
+
let F2 = g2, b2 = false;
|
|
33063
|
+
if (T) {
|
|
33064
|
+
const P2 = Z(F2, x2, {
|
|
33065
|
+
allowTitleWrite: true
|
|
33066
|
+
});
|
|
33067
|
+
F2 = P2.content, b2 = P2.headingRemoved || b2;
|
|
33068
|
+
}
|
|
33069
|
+
const R2 = M(x2) !== v || b2, C2 = await i(
|
|
33070
|
+
o2,
|
|
33071
|
+
I2,
|
|
33072
|
+
y,
|
|
33073
|
+
x2,
|
|
33074
|
+
F2,
|
|
33075
|
+
R2
|
|
33013
33076
|
);
|
|
33014
|
-
|
|
33015
|
-
|
|
33077
|
+
let k2 = C2.frontmatter;
|
|
33078
|
+
if (m) {
|
|
33079
|
+
const P2 = {
|
|
33080
|
+
frontmatter: k2,
|
|
33081
|
+
headingTree: C2.headingTree
|
|
33082
|
+
};
|
|
33083
|
+
k2 = m(P2);
|
|
33084
|
+
}
|
|
33085
|
+
const A = M(k2) !== v || b2, J2 = () => A ? V(k2, F2) : o2;
|
|
33086
|
+
return {
|
|
33087
|
+
html: C2.html,
|
|
33088
|
+
frontmatter: k2,
|
|
33089
|
+
changed: A,
|
|
33090
|
+
headingTree: C2.headingTree,
|
|
33091
|
+
composeMarkdown: J2,
|
|
33092
|
+
uniqueIdPrefix: C2.uniqueIdPrefix
|
|
33093
|
+
};
|
|
33094
|
+
} catch (w) {
|
|
33095
|
+
return p2(w);
|
|
33016
33096
|
}
|
|
33017
33097
|
}
|
|
33018
33098
|
};
|
|
33019
|
-
},
|
|
33020
|
-
const { maxRedirects: n = 5, timeoutEachRedirect:
|
|
33099
|
+
}, Vt = (e, t = {}) => {
|
|
33100
|
+
const { maxRedirects: n = 5, timeoutEachRedirect: a = 1e4 } = t;
|
|
33021
33101
|
return {
|
|
33022
33102
|
name: "oembed",
|
|
33023
33103
|
processBlock: async (s2, h) => {
|
|
33024
|
-
const
|
|
33025
|
-
if (!qd(
|
|
33026
|
-
throw new Error(`Invalid URL: ${
|
|
33104
|
+
const u = s2.trim();
|
|
33105
|
+
if (!qd(u))
|
|
33106
|
+
throw new Error(`Invalid URL: ${u}`);
|
|
33027
33107
|
try {
|
|
33028
|
-
const
|
|
33029
|
-
|
|
33108
|
+
const p2 = await Gd(
|
|
33109
|
+
u,
|
|
33030
33110
|
n,
|
|
33031
|
-
|
|
33111
|
+
a,
|
|
33032
33112
|
h,
|
|
33033
33113
|
e
|
|
33034
33114
|
);
|
|
33035
|
-
return Wd(
|
|
33036
|
-
} catch (
|
|
33037
|
-
h.logger.warn("oEmbed fetch failed for URL:",
|
|
33038
|
-
const
|
|
33039
|
-
return typeof window < "u" ? Xs(
|
|
33115
|
+
return Wd(p2, u, t);
|
|
33116
|
+
} catch (p2) {
|
|
33117
|
+
h.logger.warn("oEmbed fetch failed for URL:", u, p2);
|
|
33118
|
+
const i = Vd(p2);
|
|
33119
|
+
return typeof window < "u" ? Xs(u, i) : Xs(u, i);
|
|
33040
33120
|
}
|
|
33041
33121
|
}
|
|
33042
33122
|
};
|
|
33043
|
-
},
|
|
33123
|
+
}, Zt = (e = {}) => ({
|
|
33044
33124
|
name: "card",
|
|
33045
|
-
processBlock: async (n,
|
|
33125
|
+
processBlock: async (n, a) => {
|
|
33046
33126
|
const r = n.trim();
|
|
33047
33127
|
if (!Xd(r))
|
|
33048
33128
|
throw new Error(`Invalid URL: ${r}`);
|
|
33049
33129
|
try {
|
|
33050
|
-
const s2 = await Jd(r, e,
|
|
33130
|
+
const s2 = await Jd(r, e, a);
|
|
33051
33131
|
return th(s2, r, e);
|
|
33052
33132
|
} catch (s2) {
|
|
33053
|
-
|
|
33133
|
+
a.logger.warn("Card plugin fetch failed for URL:", r, s2);
|
|
33054
33134
|
const h = Vd(s2);
|
|
33055
33135
|
return typeof window < "u" ? eh(r, h) : eh(r, h);
|
|
33056
33136
|
}
|
|
33057
33137
|
}
|
|
33058
|
-
}),
|
|
33138
|
+
}), Xt = (e = {}) => {
|
|
33059
33139
|
const { className: t = "mermaid", includeId: n = true } = e;
|
|
33060
33140
|
return {
|
|
33061
33141
|
name: "mermaid",
|
|
@@ -33063,7 +33143,7 @@ const P = () => {
|
|
|
33063
33143
|
const h = r.trim();
|
|
33064
33144
|
if (!h) {
|
|
33065
33145
|
s2.logger.warn("Mermaid plugin received empty content");
|
|
33066
|
-
const
|
|
33146
|
+
const c = n ? ` id="${s2.getUniqueId()}"` : "";
|
|
33067
33147
|
return `<div class="${t}-wrapper">
|
|
33068
33148
|
<style>
|
|
33069
33149
|
.${t}-wrapper .${t} > svg {
|
|
@@ -33072,10 +33152,10 @@ const P = () => {
|
|
|
33072
33152
|
max-width: none !important;
|
|
33073
33153
|
}
|
|
33074
33154
|
</style>
|
|
33075
|
-
<div class="${t}"${
|
|
33155
|
+
<div class="${t}"${c}><!-- Empty mermaid content --></div>
|
|
33076
33156
|
</div>`;
|
|
33077
33157
|
}
|
|
33078
|
-
const
|
|
33158
|
+
const u = n ? ` id="${s2.getUniqueId()}"` : "", p2 = h.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), i = `<div class="${t}-wrapper">
|
|
33079
33159
|
<style>
|
|
33080
33160
|
.${t}-wrapper .${t} > svg {
|
|
33081
33161
|
width: auto !important;
|
|
@@ -33083,39 +33163,39 @@ const P = () => {
|
|
|
33083
33163
|
max-width: none !important;
|
|
33084
33164
|
}
|
|
33085
33165
|
</style>
|
|
33086
|
-
<div class="${t}"${
|
|
33166
|
+
<div class="${t}"${u}>${p2}</div>
|
|
33087
33167
|
</div>`;
|
|
33088
33168
|
return s2.logger.debug("Mermaid plugin processed content:", {
|
|
33089
33169
|
contentLength: h.length,
|
|
33090
33170
|
className: t,
|
|
33091
33171
|
includeId: n
|
|
33092
|
-
}),
|
|
33172
|
+
}), i;
|
|
33093
33173
|
}
|
|
33094
33174
|
};
|
|
33095
33175
|
};
|
|
33096
33176
|
/*!
|
|
33097
33177
|
* name: async-primitives
|
|
33098
|
-
* version: 1.
|
|
33178
|
+
* version: 1.4.0
|
|
33099
33179
|
* description: A collection of primitive functions for asynchronous operations
|
|
33100
33180
|
* author: Kouji Matsui (@kekyo@mi.kekyo.net)
|
|
33101
33181
|
* license: MIT
|
|
33102
33182
|
* repository.url: https://github.com/kekyo/async-primitives.git
|
|
33103
|
-
* git.commit.hash:
|
|
33183
|
+
* git.commit.hash: 147b7bee11bf17823a185e0492d7f73587748715
|
|
33104
33184
|
*/
|
|
33105
|
-
const
|
|
33106
|
-
},
|
|
33107
|
-
release:
|
|
33108
|
-
[Symbol.dispose]:
|
|
33109
|
-
},
|
|
33185
|
+
const Y = () => {
|
|
33186
|
+
}, tt = {
|
|
33187
|
+
release: Y,
|
|
33188
|
+
[Symbol.dispose]: Y
|
|
33189
|
+
}, Rt = (e, t) => {
|
|
33110
33190
|
if (!e)
|
|
33111
|
-
return
|
|
33191
|
+
return tt;
|
|
33112
33192
|
if (e.aborted) {
|
|
33113
33193
|
try {
|
|
33114
33194
|
t();
|
|
33115
33195
|
} catch (s2) {
|
|
33116
33196
|
console.warn("AbortHook callback error: ", s2);
|
|
33117
33197
|
}
|
|
33118
|
-
return
|
|
33198
|
+
return tt;
|
|
33119
33199
|
}
|
|
33120
33200
|
let n;
|
|
33121
33201
|
n = () => {
|
|
@@ -33128,16 +33208,16 @@ const W = () => {
|
|
|
33128
33208
|
}
|
|
33129
33209
|
}
|
|
33130
33210
|
};
|
|
33131
|
-
const
|
|
33211
|
+
const a = () => {
|
|
33132
33212
|
n && (e.removeEventListener("abort", n), n = void 0);
|
|
33133
33213
|
};
|
|
33134
33214
|
return e.addEventListener("abort", n, { once: true }), {
|
|
33135
|
-
release:
|
|
33136
|
-
[Symbol.dispose]:
|
|
33215
|
+
release: a,
|
|
33216
|
+
[Symbol.dispose]: a
|
|
33137
33217
|
};
|
|
33138
|
-
},
|
|
33218
|
+
}, Pt = (e) => {
|
|
33139
33219
|
typeof setImmediate == "function" ? setImmediate(e) : setTimeout(e, 0);
|
|
33140
|
-
},
|
|
33220
|
+
}, q = () => new Error("Lock acquisition was aborted"), At = (e) => {
|
|
33141
33221
|
let t = true;
|
|
33142
33222
|
const n = () => {
|
|
33143
33223
|
t && (t = false, e());
|
|
@@ -33149,59 +33229,59 @@ const W = () => {
|
|
|
33149
33229
|
release: n,
|
|
33150
33230
|
[Symbol.dispose]: n
|
|
33151
33231
|
};
|
|
33152
|
-
},
|
|
33232
|
+
}, z = (e = 20) => {
|
|
33153
33233
|
let t = false;
|
|
33154
33234
|
const n = [];
|
|
33155
|
-
let
|
|
33235
|
+
let a = 0;
|
|
33156
33236
|
const r = () => {
|
|
33157
|
-
var
|
|
33237
|
+
var c;
|
|
33158
33238
|
if (t || n.length === 0)
|
|
33159
33239
|
return;
|
|
33160
|
-
const
|
|
33161
|
-
if ((
|
|
33162
|
-
|
|
33240
|
+
const l2 = n.shift();
|
|
33241
|
+
if ((c = l2.signal) != null && c.aborted) {
|
|
33242
|
+
l2.reject(q()), s2();
|
|
33163
33243
|
return;
|
|
33164
33244
|
}
|
|
33165
33245
|
t = true;
|
|
33166
|
-
const
|
|
33167
|
-
|
|
33246
|
+
const o2 = At(h);
|
|
33247
|
+
l2.resolve(o2);
|
|
33168
33248
|
}, s2 = () => {
|
|
33169
|
-
|
|
33249
|
+
a++, a >= e ? (a = 0, Pt(r)) : r();
|
|
33170
33250
|
}, h = () => {
|
|
33171
33251
|
t && (t = false, s2());
|
|
33172
|
-
},
|
|
33173
|
-
const
|
|
33174
|
-
|
|
33175
|
-
},
|
|
33176
|
-
if (
|
|
33177
|
-
if (
|
|
33178
|
-
throw
|
|
33179
|
-
return new Promise((
|
|
33252
|
+
}, u = (c) => {
|
|
33253
|
+
const l2 = n.indexOf(c);
|
|
33254
|
+
l2 !== -1 && n.splice(l2, 1);
|
|
33255
|
+
}, p2 = async (c) => {
|
|
33256
|
+
if (c) {
|
|
33257
|
+
if (c.aborted)
|
|
33258
|
+
throw q();
|
|
33259
|
+
return new Promise((l2, o2) => {
|
|
33180
33260
|
const f = {
|
|
33181
33261
|
resolve: void 0,
|
|
33182
33262
|
reject: void 0,
|
|
33183
|
-
signal:
|
|
33184
|
-
},
|
|
33185
|
-
|
|
33263
|
+
signal: c
|
|
33264
|
+
}, d2 = Rt(c, () => {
|
|
33265
|
+
u(f), o2(q());
|
|
33186
33266
|
});
|
|
33187
|
-
f.resolve = (
|
|
33188
|
-
|
|
33189
|
-
}, f.reject = (
|
|
33190
|
-
|
|
33267
|
+
f.resolve = (m) => {
|
|
33268
|
+
d2.release(), l2(m);
|
|
33269
|
+
}, f.reject = (m) => {
|
|
33270
|
+
d2.release(), o2(m);
|
|
33191
33271
|
}, n.push(f), r();
|
|
33192
33272
|
});
|
|
33193
33273
|
} else
|
|
33194
|
-
return new Promise((
|
|
33274
|
+
return new Promise((l2, o2) => {
|
|
33195
33275
|
n.push({
|
|
33196
|
-
resolve:
|
|
33197
|
-
reject:
|
|
33276
|
+
resolve: l2,
|
|
33277
|
+
reject: o2
|
|
33198
33278
|
}), r();
|
|
33199
33279
|
});
|
|
33200
33280
|
};
|
|
33201
33281
|
return {
|
|
33202
|
-
lock:
|
|
33282
|
+
lock: p2,
|
|
33203
33283
|
waiter: {
|
|
33204
|
-
wait:
|
|
33284
|
+
wait: p2
|
|
33205
33285
|
},
|
|
33206
33286
|
get isLocked() {
|
|
33207
33287
|
return t;
|
|
@@ -33210,72 +33290,72 @@ const W = () => {
|
|
|
33210
33290
|
return n.length;
|
|
33211
33291
|
}
|
|
33212
33292
|
};
|
|
33213
|
-
},
|
|
33214
|
-
const e = /* @__PURE__ */ new Map(), t =
|
|
33215
|
-
const
|
|
33216
|
-
for (const [
|
|
33217
|
-
|
|
33218
|
-
for (const
|
|
33219
|
-
e.delete(
|
|
33220
|
-
return
|
|
33293
|
+
}, _t = () => {
|
|
33294
|
+
const e = /* @__PURE__ */ new Map(), t = z(), n = (p2 = Date.now()) => {
|
|
33295
|
+
const i = [];
|
|
33296
|
+
for (const [c, l2] of e.entries())
|
|
33297
|
+
l2.ttl !== void 0 && (l2.ttl === 0 || p2 > l2.timestamp + l2.ttl) && i.push(c);
|
|
33298
|
+
for (const c of i)
|
|
33299
|
+
e.delete(c);
|
|
33300
|
+
return i;
|
|
33221
33301
|
};
|
|
33222
33302
|
return {
|
|
33223
|
-
get: async (
|
|
33224
|
-
const
|
|
33225
|
-
if (!
|
|
33303
|
+
get: async (p2) => {
|
|
33304
|
+
const i = e.get(p2);
|
|
33305
|
+
if (!i)
|
|
33226
33306
|
return null;
|
|
33227
|
-
if (
|
|
33228
|
-
const
|
|
33307
|
+
if (i.ttl !== void 0 && (i.ttl === 0 || Date.now() > i.timestamp + i.ttl)) {
|
|
33308
|
+
const l2 = await t.lock();
|
|
33229
33309
|
try {
|
|
33230
|
-
const
|
|
33231
|
-
if (
|
|
33310
|
+
const o2 = e.get(p2);
|
|
33311
|
+
if (o2 && o2.ttl !== void 0) {
|
|
33232
33312
|
const f = Date.now();
|
|
33233
|
-
(
|
|
33313
|
+
(o2.ttl === 0 || f > o2.timestamp + o2.ttl) && e.delete(p2);
|
|
33234
33314
|
}
|
|
33235
33315
|
return null;
|
|
33236
33316
|
} finally {
|
|
33237
|
-
|
|
33317
|
+
l2.release();
|
|
33238
33318
|
}
|
|
33239
33319
|
}
|
|
33240
|
-
return
|
|
33320
|
+
return i.data;
|
|
33241
33321
|
},
|
|
33242
|
-
set: async (
|
|
33243
|
-
const
|
|
33244
|
-
data:
|
|
33322
|
+
set: async (p2, i, c) => {
|
|
33323
|
+
const l2 = {
|
|
33324
|
+
data: i,
|
|
33245
33325
|
timestamp: Date.now()
|
|
33246
33326
|
};
|
|
33247
|
-
|
|
33248
|
-
const
|
|
33327
|
+
c !== void 0 && (l2.ttl = c);
|
|
33328
|
+
const o2 = await t.lock();
|
|
33249
33329
|
try {
|
|
33250
|
-
e.set(
|
|
33330
|
+
e.set(p2, l2);
|
|
33251
33331
|
} finally {
|
|
33252
|
-
|
|
33332
|
+
o2.release();
|
|
33253
33333
|
}
|
|
33254
33334
|
},
|
|
33255
|
-
delete: async (
|
|
33256
|
-
const
|
|
33335
|
+
delete: async (p2) => {
|
|
33336
|
+
const i = await t.lock();
|
|
33257
33337
|
try {
|
|
33258
|
-
e.delete(
|
|
33338
|
+
e.delete(p2);
|
|
33259
33339
|
} finally {
|
|
33260
|
-
|
|
33340
|
+
i.release();
|
|
33261
33341
|
}
|
|
33262
33342
|
},
|
|
33263
33343
|
clear: async () => {
|
|
33264
|
-
const
|
|
33344
|
+
const p2 = await t.lock();
|
|
33265
33345
|
try {
|
|
33266
33346
|
e.clear();
|
|
33267
33347
|
} finally {
|
|
33268
|
-
|
|
33348
|
+
p2.release();
|
|
33269
33349
|
}
|
|
33270
33350
|
},
|
|
33271
33351
|
size: async () => {
|
|
33272
33352
|
if (Array.from(e.entries()).length === 0)
|
|
33273
33353
|
return 0;
|
|
33274
|
-
const
|
|
33354
|
+
const i = await t.lock();
|
|
33275
33355
|
try {
|
|
33276
33356
|
return n(), e.size;
|
|
33277
33357
|
} finally {
|
|
33278
|
-
|
|
33358
|
+
i.release();
|
|
33279
33359
|
}
|
|
33280
33360
|
}
|
|
33281
33361
|
};
|
|
@@ -33283,123 +33363,123 @@ const W = () => {
|
|
|
33283
33363
|
function D(e, t, n) {
|
|
33284
33364
|
return `fetch:${e}:${t}:${n}`;
|
|
33285
33365
|
}
|
|
33286
|
-
const
|
|
33366
|
+
const ee = (e, t = 6e4, n, a) => {
|
|
33287
33367
|
const {
|
|
33288
33368
|
cache: r = true,
|
|
33289
33369
|
cacheTTL: s2 = 3600 * 1e3,
|
|
33290
33370
|
// 1 hour default
|
|
33291
33371
|
cacheFailures: h = true,
|
|
33292
|
-
failureCacheTTL:
|
|
33372
|
+
failureCacheTTL: u = 300 * 1e3
|
|
33293
33373
|
// 5 minutes default for failures
|
|
33294
|
-
} = {},
|
|
33374
|
+
} = {}, p2 = r ? n || _t() : void 0;
|
|
33295
33375
|
return {
|
|
33296
|
-
rawFetcher: async (
|
|
33297
|
-
if (r &&
|
|
33298
|
-
const y = D(
|
|
33299
|
-
if (
|
|
33376
|
+
rawFetcher: async (c, l2, o2, f) => {
|
|
33377
|
+
if (r && p2) {
|
|
33378
|
+
const y = D(c, l2, e), w = await p2.get(y);
|
|
33379
|
+
if (w)
|
|
33300
33380
|
try {
|
|
33301
|
-
const
|
|
33302
|
-
if (
|
|
33303
|
-
return f?.info(`Cache HIT (success) for URL: ${
|
|
33381
|
+
const g2 = JSON.parse(w);
|
|
33382
|
+
if (g2.type === "success")
|
|
33383
|
+
return f?.info(`Cache HIT (success) for URL: ${c}`), new Response(g2.data, {
|
|
33304
33384
|
status: 200,
|
|
33305
33385
|
statusText: "OK",
|
|
33306
33386
|
headers: {
|
|
33307
|
-
"Content-Type":
|
|
33387
|
+
"Content-Type": l2,
|
|
33308
33388
|
"X-Cache": "HIT"
|
|
33309
33389
|
}
|
|
33310
33390
|
});
|
|
33311
|
-
if (
|
|
33312
|
-
throw f?.info(`Cache HIT (error) for URL: ${
|
|
33391
|
+
if (g2.type === "error" && h)
|
|
33392
|
+
throw f?.info(`Cache HIT (error) for URL: ${c}`), new Error("Cached error");
|
|
33313
33393
|
f?.debug(
|
|
33314
|
-
`Cache entry type ${
|
|
33394
|
+
`Cache entry type ${g2.type} not eligible for use, cacheFailures: ${h}`
|
|
33315
33395
|
);
|
|
33316
|
-
} catch (
|
|
33396
|
+
} catch (g2) {
|
|
33317
33397
|
if (f?.warn(
|
|
33318
|
-
`Failed to parse cached entry for URL ${
|
|
33319
|
-
|
|
33320
|
-
),
|
|
33398
|
+
`Failed to parse cached entry for URL ${c}:`,
|
|
33399
|
+
g2
|
|
33400
|
+
), g2 instanceof SyntaxError)
|
|
33321
33401
|
f?.debug("JSON parse error, continuing to network fetch");
|
|
33322
33402
|
else
|
|
33323
|
-
throw
|
|
33403
|
+
throw g2;
|
|
33324
33404
|
}
|
|
33325
33405
|
else
|
|
33326
|
-
f?.info(`Cache MISS for URL: ${
|
|
33406
|
+
f?.info(`Cache MISS for URL: ${c}`);
|
|
33327
33407
|
}
|
|
33328
|
-
let
|
|
33408
|
+
let d2, m = null;
|
|
33329
33409
|
try {
|
|
33330
|
-
|
|
33410
|
+
d2 = await Yd(
|
|
33411
|
+
c,
|
|
33331
33412
|
l2,
|
|
33332
|
-
i,
|
|
33333
33413
|
e,
|
|
33334
33414
|
t,
|
|
33335
|
-
|
|
33415
|
+
o2,
|
|
33336
33416
|
f
|
|
33337
33417
|
);
|
|
33338
33418
|
} catch (y) {
|
|
33339
|
-
if (
|
|
33419
|
+
if (m = y, r && p2 && h)
|
|
33340
33420
|
try {
|
|
33341
|
-
const
|
|
33421
|
+
const w = D(c, l2, e), g2 = {
|
|
33342
33422
|
type: "error",
|
|
33343
33423
|
data: "",
|
|
33344
33424
|
error: {
|
|
33345
|
-
message:
|
|
33346
|
-
...
|
|
33425
|
+
message: m.message,
|
|
33426
|
+
...m.message.includes("HTTP error, status:") && {
|
|
33347
33427
|
status: parseInt(
|
|
33348
|
-
|
|
33428
|
+
m.message.match(/status: (\d+)/)?.[1] || "0"
|
|
33349
33429
|
)
|
|
33350
33430
|
}
|
|
33351
33431
|
},
|
|
33352
33432
|
timestamp: Date.now()
|
|
33353
33433
|
};
|
|
33354
|
-
await
|
|
33355
|
-
|
|
33356
|
-
JSON.stringify(
|
|
33357
|
-
|
|
33358
|
-
), f?.debug(`Cached error for URL: ${
|
|
33359
|
-
} catch (
|
|
33360
|
-
f?.warn(`Failed to cache error for URL ${
|
|
33434
|
+
await p2.set(
|
|
33435
|
+
w,
|
|
33436
|
+
JSON.stringify(g2),
|
|
33437
|
+
u
|
|
33438
|
+
), f?.debug(`Cached error for URL: ${c}`);
|
|
33439
|
+
} catch (w) {
|
|
33440
|
+
f?.warn(`Failed to cache error for URL ${c}:`, w), console.warn("Failed to cache error:", w);
|
|
33361
33441
|
}
|
|
33362
|
-
throw
|
|
33442
|
+
throw m;
|
|
33363
33443
|
}
|
|
33364
|
-
if (r &&
|
|
33444
|
+
if (r && p2 && d2.ok)
|
|
33365
33445
|
try {
|
|
33366
|
-
const y = await
|
|
33446
|
+
const y = await d2.clone().text(), w = D(c, l2, e), g2 = {
|
|
33367
33447
|
type: "success",
|
|
33368
33448
|
data: y,
|
|
33369
33449
|
timestamp: Date.now()
|
|
33370
33450
|
};
|
|
33371
|
-
await
|
|
33372
|
-
|
|
33373
|
-
JSON.stringify(
|
|
33451
|
+
await p2.set(
|
|
33452
|
+
w,
|
|
33453
|
+
JSON.stringify(g2),
|
|
33374
33454
|
s2
|
|
33375
|
-
), f?.debug(`Cached successful response for URL: ${
|
|
33455
|
+
), f?.debug(`Cached successful response for URL: ${c}`);
|
|
33376
33456
|
} catch (y) {
|
|
33377
|
-
f?.warn(`Failed to cache response for URL ${
|
|
33457
|
+
f?.warn(`Failed to cache response for URL ${c}:`, y), console.warn("Failed to cache response:", y);
|
|
33378
33458
|
}
|
|
33379
|
-
return
|
|
33459
|
+
return d2;
|
|
33380
33460
|
},
|
|
33381
33461
|
userAgent: e
|
|
33382
33462
|
};
|
|
33383
33463
|
};
|
|
33384
33464
|
function setupProcessor(config) {
|
|
33385
33465
|
const plugins = [];
|
|
33386
|
-
const logger =
|
|
33387
|
-
const fetcher =
|
|
33466
|
+
const logger = Gt();
|
|
33467
|
+
const fetcher = ee(
|
|
33388
33468
|
"mark-deco-cli/0.0.1",
|
|
33389
33469
|
5e3,
|
|
33390
|
-
|
|
33470
|
+
_t()
|
|
33391
33471
|
);
|
|
33392
33472
|
const enabledPlugins = config.noPlugins ? [] : Array.isArray(config.plugins) ? config.plugins : ["oembed", "card", "mermaid"];
|
|
33393
33473
|
if (enabledPlugins.includes("oembed") && config.oembed?.enabled !== false) {
|
|
33394
|
-
plugins.push(
|
|
33474
|
+
plugins.push(Vt($d, {}));
|
|
33395
33475
|
}
|
|
33396
33476
|
if (enabledPlugins.includes("card") && config.card?.enabled !== false) {
|
|
33397
|
-
plugins.push(
|
|
33477
|
+
plugins.push(Zt({}));
|
|
33398
33478
|
}
|
|
33399
33479
|
if (enabledPlugins.includes("mermaid") && config.mermaid?.enabled !== false) {
|
|
33400
|
-
plugins.push(
|
|
33480
|
+
plugins.push(Xt({}));
|
|
33401
33481
|
}
|
|
33402
|
-
return
|
|
33482
|
+
return Qt({
|
|
33403
33483
|
plugins,
|
|
33404
33484
|
logger,
|
|
33405
33485
|
fetcher
|
|
@@ -33434,6 +33514,11 @@ async function main() {
|
|
|
33434
33514
|
"--content-based-heading-id",
|
|
33435
33515
|
"Use content-based heading IDs"
|
|
33436
33516
|
).default(false)
|
|
33517
|
+
).addOption(
|
|
33518
|
+
new commander.Option(
|
|
33519
|
+
"--no-apply-title-from-h1",
|
|
33520
|
+
"Disable applying the first H1 to frontmatter.title"
|
|
33521
|
+
)
|
|
33437
33522
|
).addOption(
|
|
33438
33523
|
new commander.Option(
|
|
33439
33524
|
"--frontmatter-output <file>",
|
|
@@ -33451,12 +33536,14 @@ async function main() {
|
|
|
33451
33536
|
const mergedOptions = { ...config, ...options2 };
|
|
33452
33537
|
const markdown = await readInput(options2.input);
|
|
33453
33538
|
const processor = setupProcessor(mergedOptions);
|
|
33539
|
+
const applyTitleFromH1 = options2.applyTitleFromH1 ?? config.applyTitleFromH1 ?? true;
|
|
33454
33540
|
const result = await processor.process(
|
|
33455
33541
|
markdown,
|
|
33456
33542
|
options2.uniqueIdPrefix || "section",
|
|
33457
33543
|
{
|
|
33458
33544
|
useHierarchicalHeadingId: options2.hierarchicalHeadingId ?? true,
|
|
33459
|
-
useContentStringHeaderId: options2.contentBasedHeadingId ?? false
|
|
33545
|
+
useContentStringHeaderId: options2.contentBasedHeadingId ?? false,
|
|
33546
|
+
applyTitleFromH1
|
|
33460
33547
|
}
|
|
33461
33548
|
);
|
|
33462
33549
|
await writeOutput(result.html, options2.output);
|