@x-wave/blog 1.0.21 → 1.0.23
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/index.js +801 -766
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useLocation as
|
|
4
|
-
import { useState as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { User as
|
|
9
|
-
import { createPortal as
|
|
10
|
-
const
|
|
11
|
-
tabContainer:
|
|
12
|
-
tab:
|
|
13
|
-
active:
|
|
1
|
+
import { jsxs as u, jsx as e, Fragment as z } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as E } from "react-i18next";
|
|
3
|
+
import { useLocation as G, useNavigate as F, useParams as re, Link as ge, Navigate as Ne, Routes as Se, Route as me } from "react-router-dom";
|
|
4
|
+
import { useState as L, useEffect as S, createContext as Pe, useContext as De, useRef as H } from "react";
|
|
5
|
+
import Be from "react-markdown";
|
|
6
|
+
import Me from "remark-gfm";
|
|
7
|
+
import ae from "i18next";
|
|
8
|
+
import { User as Ee, CalendarBlank as Re, X as le, Tag as Oe, MagnifyingGlass as _e, List as je, Sun as pe, Moon as fe, Monitor as ve, CaretDown as se, Globe as Ae, CaretRight as We } from "@phosphor-icons/react";
|
|
9
|
+
import { createPortal as $e } from "react-dom";
|
|
10
|
+
const He = "_tabContainer_zk6h4_1", qe = "_tab_zk6h4_1", Fe = "_active_zk6h4_45", Q = {
|
|
11
|
+
tabContainer: He,
|
|
12
|
+
tab: qe,
|
|
13
|
+
active: Fe
|
|
14
14
|
};
|
|
15
|
-
function
|
|
16
|
-
const { t: n } =
|
|
15
|
+
function Ue({ hasAdvanced: t }) {
|
|
16
|
+
const { t: n } = E(), o = G(), a = F();
|
|
17
17
|
if (!t) return null;
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
const h = new URLSearchParams(
|
|
18
|
+
const s = new URLSearchParams(o.search).has("advanced"), d = () => {
|
|
19
|
+
if (s) {
|
|
20
|
+
const h = new URLSearchParams(o.search);
|
|
21
21
|
h.delete("advanced");
|
|
22
|
-
const
|
|
23
|
-
a(`${
|
|
22
|
+
const f = h.toString(), m = f ? `?${f}` : "";
|
|
23
|
+
a(`${o.pathname}${m}${o.hash}`);
|
|
24
24
|
}
|
|
25
|
-
},
|
|
26
|
-
if (!
|
|
27
|
-
const h = new URLSearchParams(
|
|
28
|
-
h.set("advanced", ""), a(`${
|
|
25
|
+
}, g = () => {
|
|
26
|
+
if (!s) {
|
|
27
|
+
const h = new URLSearchParams(o.search);
|
|
28
|
+
h.set("advanced", ""), a(`${o.pathname}?${h.toString()}${o.hash}`);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ u("div", { className: Q.tabContainer, children: [
|
|
32
32
|
/* @__PURE__ */ e(
|
|
33
33
|
"button",
|
|
34
34
|
{
|
|
35
35
|
type: "button",
|
|
36
|
-
className: `${
|
|
37
|
-
onClick:
|
|
36
|
+
className: `${Q.tab} ${s ? "" : Q.active}`,
|
|
37
|
+
onClick: d,
|
|
38
38
|
children: n("ui.simple")
|
|
39
39
|
}
|
|
40
40
|
),
|
|
@@ -42,68 +42,68 @@ function He({ hasAdvanced: t }) {
|
|
|
42
42
|
"button",
|
|
43
43
|
{
|
|
44
44
|
type: "button",
|
|
45
|
-
className: `${
|
|
46
|
-
onClick:
|
|
45
|
+
className: `${Q.tab} ${s ? Q.active : ""}`,
|
|
46
|
+
onClick: g,
|
|
47
47
|
children: n("ui.advanced")
|
|
48
48
|
}
|
|
49
49
|
)
|
|
50
50
|
] });
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function Ke({ children: t }) {
|
|
53
53
|
return /* @__PURE__ */ e("div", { className: "xw-blog-root", children: t });
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
function n(
|
|
57
|
-
const a =
|
|
58
|
-
if (!a) return { frontmatter: {}, content:
|
|
59
|
-
const
|
|
60
|
-
let
|
|
55
|
+
function xe(t) {
|
|
56
|
+
function n(o) {
|
|
57
|
+
const a = o.match(/^---\s*\n([\s\S]*?)\n---\s*\n/);
|
|
58
|
+
if (!a) return { frontmatter: {}, content: o };
|
|
59
|
+
const c = {}, s = a[1];
|
|
60
|
+
let d = "", g = !1;
|
|
61
61
|
const h = [];
|
|
62
|
-
for (const
|
|
62
|
+
for (const m of s.split(`
|
|
63
63
|
`)) {
|
|
64
|
-
const b =
|
|
64
|
+
const b = m.trim();
|
|
65
65
|
if (b.startsWith("-")) {
|
|
66
|
-
if (
|
|
67
|
-
const
|
|
68
|
-
h.push(
|
|
66
|
+
if (g) {
|
|
67
|
+
const _ = b.substring(1).trim();
|
|
68
|
+
h.push(_);
|
|
69
69
|
}
|
|
70
70
|
continue;
|
|
71
71
|
}
|
|
72
|
-
if (
|
|
73
|
-
const [
|
|
74
|
-
if (
|
|
75
|
-
|
|
72
|
+
if (g && !b.startsWith("-") && (c[d] = h.slice(), h.length = 0, g = !1), b != null && b.includes(":")) {
|
|
73
|
+
const [_, ...i] = b.split(":"), l = i.join(":").trim();
|
|
74
|
+
if (d = _.trim(), !l) {
|
|
75
|
+
g = !0;
|
|
76
76
|
continue;
|
|
77
77
|
}
|
|
78
|
-
l === "true" ?
|
|
78
|
+
l === "true" ? c[d] = !0 : l === "false" ? c[d] = !1 : c[d] = l;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
const
|
|
81
|
+
g && h.length > 0 && (c[d] = h);
|
|
82
|
+
const f = o.replace(
|
|
83
83
|
/^---\s*\n[\s\S]*?\n---\s*\n/,
|
|
84
84
|
""
|
|
85
85
|
);
|
|
86
|
-
return { frontmatter:
|
|
86
|
+
return { frontmatter: c, content: f };
|
|
87
87
|
}
|
|
88
88
|
return {
|
|
89
89
|
/**
|
|
90
90
|
* Load MDX content for a given language and slug.
|
|
91
91
|
* Automatically loads the advanced variant if `advanced` is true.
|
|
92
92
|
*/
|
|
93
|
-
async loadMDXContent(
|
|
94
|
-
const
|
|
95
|
-
if (!
|
|
96
|
-
const h = await
|
|
97
|
-
return { content:
|
|
93
|
+
async loadMDXContent(o, a, c = !1) {
|
|
94
|
+
const s = c ? `${a}-advanced.mdx` : `${a}.mdx`, d = `./docs/${o}/${s}`, g = t[d];
|
|
95
|
+
if (!g) throw new Error(`File not found: ${d}`);
|
|
96
|
+
const h = await g(), { frontmatter: f, content: m } = n(h);
|
|
97
|
+
return { content: m, frontmatter: f };
|
|
98
98
|
},
|
|
99
99
|
/**
|
|
100
100
|
* Load English content for generating consistent heading IDs.
|
|
101
101
|
* All heading anchors are derived from English content for stability across translations.
|
|
102
102
|
*/
|
|
103
|
-
async loadEnglishContent(
|
|
104
|
-
const
|
|
105
|
-
if (!
|
|
106
|
-
const
|
|
103
|
+
async loadEnglishContent(o, a = !1) {
|
|
104
|
+
const s = `./docs/en/${a ? `${o}-advanced.mdx` : `${o}.mdx`}`, d = t[s];
|
|
105
|
+
if (!d) throw new Error(`File not found: ${s}`);
|
|
106
|
+
const g = await d(), { content: h } = n(g);
|
|
107
107
|
return h;
|
|
108
108
|
},
|
|
109
109
|
/**
|
|
@@ -113,55 +113,55 @@ function Ne(t) {
|
|
|
113
113
|
* @param language - Language code to scan (defaults to 'en')
|
|
114
114
|
* @returns Promise resolving to tag index mapping tag names to document info
|
|
115
115
|
*/
|
|
116
|
-
async buildTagIndex(
|
|
117
|
-
const a = {},
|
|
118
|
-
(
|
|
116
|
+
async buildTagIndex(o = "en") {
|
|
117
|
+
const a = {}, c = `./docs/${o}/`, s = Object.keys(t).filter(
|
|
118
|
+
(d) => d.startsWith(c)
|
|
119
119
|
);
|
|
120
|
-
for (const
|
|
120
|
+
for (const d of s)
|
|
121
121
|
try {
|
|
122
|
-
const
|
|
122
|
+
const g = t[d], h = await g(), { frontmatter: f, content: m } = n(h), b = d.split("/").pop() || "", _ = b.replace(".mdx", "").replace("-advanced", ""), i = m.match(/^#\s+(.+)$/m), l = i ? i[1].trim() : _;
|
|
123
123
|
if (b.includes("-advanced")) continue;
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
126
|
-
for (const w of
|
|
127
|
-
a[w] || (a[w] = []), a[w].some((
|
|
128
|
-
} catch (
|
|
129
|
-
console.warn(`Failed to process ${
|
|
124
|
+
const r = f.tags;
|
|
125
|
+
if (r && Array.isArray(r))
|
|
126
|
+
for (const w of r)
|
|
127
|
+
a[w] || (a[w] = []), a[w].some((C) => C.slug === _) || a[w].push({ slug: _, title: l });
|
|
128
|
+
} catch (g) {
|
|
129
|
+
console.warn(`Failed to process ${d}:`, g);
|
|
130
130
|
}
|
|
131
131
|
return a;
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
const n =
|
|
135
|
+
function Ja(t) {
|
|
136
|
+
const n = xe(t);
|
|
137
137
|
return {
|
|
138
138
|
mdxFiles: t,
|
|
139
139
|
loadContent: n.loadMDXContent,
|
|
140
140
|
loadEnglishContent: n.loadEnglishContent
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
|
-
const
|
|
144
|
-
const [t, n] =
|
|
143
|
+
const Ce = "app-theme", Ie = () => typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", be = (t) => t === "system" ? Ie() : t, ze = () => typeof window > "u" ? "system" : localStorage.getItem(Ce) || "system", ke = () => {
|
|
144
|
+
const [t, n] = L(ze);
|
|
145
145
|
return S(() => {
|
|
146
|
-
const a =
|
|
147
|
-
if (
|
|
148
|
-
const
|
|
149
|
-
const
|
|
150
|
-
h && (h.classList.remove("light", "dark"), h.classList.add(
|
|
146
|
+
const a = be(t), c = document.querySelector(".xw-blog-root");
|
|
147
|
+
if (c && (c.classList.remove("light", "dark"), c.classList.add(a)), t === "system") {
|
|
148
|
+
const s = window.matchMedia("(prefers-color-scheme: dark)"), d = () => {
|
|
149
|
+
const g = Ie(), h = document.querySelector(".xw-blog-root");
|
|
150
|
+
h && (h.classList.remove("light", "dark"), h.classList.add(g));
|
|
151
151
|
};
|
|
152
|
-
return
|
|
152
|
+
return s.addEventListener("change", d), () => s.removeEventListener("change", d);
|
|
153
153
|
}
|
|
154
154
|
}, [t]), {
|
|
155
155
|
theme: t,
|
|
156
156
|
setTheme: (a) => {
|
|
157
|
-
localStorage.setItem(
|
|
157
|
+
localStorage.setItem(Ce, a), n(a);
|
|
158
158
|
},
|
|
159
|
-
effectiveTheme:
|
|
159
|
+
effectiveTheme: be(t)
|
|
160
160
|
};
|
|
161
|
-
},
|
|
162
|
-
title:
|
|
163
|
-
items:
|
|
164
|
-
title:
|
|
161
|
+
}, Ge = (t) => "items" in t, te = (t, n) => t.map((o) => Ge(o) ? {
|
|
162
|
+
title: ae.getFixedT(n)(o.title),
|
|
163
|
+
items: o.items.map((a) => ({
|
|
164
|
+
title: ae.getFixedT(n)(a.title),
|
|
165
165
|
slug: a.slug,
|
|
166
166
|
...a.hasAdvanced && { hasAdvanced: a.hasAdvanced },
|
|
167
167
|
...a.showTableOfContents !== void 0 && {
|
|
@@ -169,214 +169,255 @@ const $e = "app-theme", xe = () => typeof window > "u" ? "light" : window.matchM
|
|
|
169
169
|
}
|
|
170
170
|
}))
|
|
171
171
|
} : {
|
|
172
|
-
title:
|
|
173
|
-
slug:
|
|
174
|
-
...
|
|
175
|
-
...
|
|
176
|
-
showTableOfContents:
|
|
172
|
+
title: ae.getFixedT(n)(o.title),
|
|
173
|
+
slug: o.slug,
|
|
174
|
+
...o.hasAdvanced && { hasAdvanced: o.hasAdvanced },
|
|
175
|
+
...o.showTableOfContents !== void 0 && {
|
|
176
|
+
showTableOfContents: o.showTableOfContents
|
|
177
177
|
}
|
|
178
|
-
}),
|
|
179
|
-
function
|
|
178
|
+
}), V = (t) => t.toString().toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, ""), ye = Pe(null);
|
|
179
|
+
function Za({
|
|
180
180
|
children: t,
|
|
181
181
|
config: n,
|
|
182
|
-
blog:
|
|
182
|
+
blog: o,
|
|
183
183
|
navigationData: a = []
|
|
184
184
|
}) {
|
|
185
|
-
|
|
186
|
-
const [
|
|
185
|
+
ke();
|
|
186
|
+
const [c, s] = L({});
|
|
187
187
|
S(() => {
|
|
188
|
-
const { buildTagIndex:
|
|
188
|
+
const { buildTagIndex: g } = xe(o.mdxFiles), h = n.supportedLanguages.map(async (f) => {
|
|
189
189
|
try {
|
|
190
|
-
const
|
|
191
|
-
return { language:
|
|
192
|
-
} catch (
|
|
193
|
-
return console.error(`Failed to build tag index for ${
|
|
190
|
+
const m = await g(f);
|
|
191
|
+
return { language: f, index: m };
|
|
192
|
+
} catch (m) {
|
|
193
|
+
return console.error(`Failed to build tag index for ${f}:`, m), { language: f, index: {} };
|
|
194
194
|
}
|
|
195
195
|
});
|
|
196
|
-
Promise.all(h).then((
|
|
197
|
-
const
|
|
198
|
-
for (const b of
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}).catch((
|
|
202
|
-
console.error("Failed to build tag indices:",
|
|
196
|
+
Promise.all(h).then((f) => {
|
|
197
|
+
const m = {};
|
|
198
|
+
for (const b of f)
|
|
199
|
+
m[b.language] = b.index;
|
|
200
|
+
s(m);
|
|
201
|
+
}).catch((f) => {
|
|
202
|
+
console.error("Failed to build tag indices:", f);
|
|
203
203
|
});
|
|
204
|
-
}, [
|
|
205
|
-
const
|
|
204
|
+
}, [o.mdxFiles, n.supportedLanguages]);
|
|
205
|
+
const d = { ...n, navigationData: a, tagIndex: c };
|
|
206
206
|
return /* @__PURE__ */ e(
|
|
207
|
-
|
|
207
|
+
ye.Provider,
|
|
208
208
|
{
|
|
209
209
|
value: {
|
|
210
|
-
config:
|
|
211
|
-
loadContent:
|
|
212
|
-
loadEnglishContent:
|
|
210
|
+
config: d,
|
|
211
|
+
loadContent: o.loadContent,
|
|
212
|
+
loadEnglishContent: o.loadEnglishContent
|
|
213
213
|
},
|
|
214
|
-
children: /* @__PURE__ */ e(
|
|
214
|
+
children: /* @__PURE__ */ e(Ke, { children: t })
|
|
215
215
|
}
|
|
216
216
|
);
|
|
217
217
|
}
|
|
218
218
|
function R() {
|
|
219
|
-
const t =
|
|
219
|
+
const t = De(ye);
|
|
220
220
|
if (!t)
|
|
221
221
|
throw new Error("useBlogConfig must be used within a BlogProvider");
|
|
222
222
|
return t;
|
|
223
223
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
224
|
+
function Le() {
|
|
225
|
+
return !!new URL(window.location.href).hash;
|
|
226
|
+
}
|
|
227
|
+
function Qe(t, n, o) {
|
|
228
|
+
const a = o ? `${o}/` : "";
|
|
229
|
+
return Le() ? `#${a}${n}/${t}` : `/${a}${n}/${t}`;
|
|
230
|
+
}
|
|
231
|
+
function Xe(t) {
|
|
232
|
+
const n = {
|
|
233
|
+
advanced: !1,
|
|
234
|
+
anchor: ""
|
|
235
|
+
};
|
|
236
|
+
if (!t) return n;
|
|
237
|
+
const a = (t.startsWith("?") ? t.substring(1) : t).split("&");
|
|
238
|
+
for (const c of a)
|
|
239
|
+
c === "advanced" ? n.advanced = !0 : c.startsWith("a=") && (n.anchor = c.substring(2));
|
|
240
|
+
return n;
|
|
241
|
+
}
|
|
242
|
+
function we(t, n = 80) {
|
|
243
|
+
const o = document.getElementById(t);
|
|
244
|
+
if (o) {
|
|
245
|
+
const c = o.getBoundingClientRect().top + window.pageYOffset - n;
|
|
246
|
+
window.scrollTo({
|
|
247
|
+
top: c,
|
|
248
|
+
behavior: "smooth"
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
function Ye(t, n = !1) {
|
|
253
|
+
const o = new URL(window.location.href);
|
|
254
|
+
if (Le()) {
|
|
255
|
+
const a = o.hash.split("?"), c = a[0], s = new URLSearchParams(a[1] || "");
|
|
256
|
+
s.set("a", t), n && s.set("advanced", "");
|
|
257
|
+
const d = s.toString();
|
|
258
|
+
o.hash = d ? `${c}?${d}` : c;
|
|
259
|
+
} else {
|
|
260
|
+
const a = new URLSearchParams(o.search);
|
|
261
|
+
a.set("a", t), n && a.set("advanced", ""), o.search = `?${a.toString()}`;
|
|
262
|
+
}
|
|
263
|
+
window.history.pushState(null, "", o.toString());
|
|
264
|
+
}
|
|
265
|
+
const Ve = "_metadata_bsge0_1", Je = "_author_bsge0_9", Ze = "_date_bsge0_10", oe = {
|
|
266
|
+
metadata: Ve,
|
|
267
|
+
author: Je,
|
|
268
|
+
date: Ze
|
|
228
269
|
};
|
|
229
|
-
function
|
|
230
|
-
const { t:
|
|
231
|
-
return !t && !n ? null : /* @__PURE__ */
|
|
232
|
-
n && /* @__PURE__ */
|
|
233
|
-
/* @__PURE__ */ e(
|
|
270
|
+
function ce({ date: t, author: n }) {
|
|
271
|
+
const { t: o } = E();
|
|
272
|
+
return !t && !n ? null : /* @__PURE__ */ u("div", { className: oe.metadata, children: [
|
|
273
|
+
n && /* @__PURE__ */ u("span", { className: oe.author, children: [
|
|
274
|
+
/* @__PURE__ */ e(Ee, { size: 16, weight: "regular" }),
|
|
234
275
|
n
|
|
235
276
|
] }),
|
|
236
|
-
t && /* @__PURE__ */
|
|
237
|
-
/* @__PURE__ */ e(
|
|
238
|
-
|
|
277
|
+
t && /* @__PURE__ */ u("span", { className: oe.date, children: [
|
|
278
|
+
/* @__PURE__ */ e(Re, { size: 16, weight: "regular" }),
|
|
279
|
+
o("ui.lastEdited"),
|
|
239
280
|
": ",
|
|
240
281
|
t
|
|
241
282
|
] })
|
|
242
283
|
] });
|
|
243
284
|
}
|
|
244
|
-
const
|
|
245
|
-
tableOfContents:
|
|
246
|
-
header:
|
|
247
|
-
title:
|
|
248
|
-
nav:
|
|
249
|
-
list:
|
|
250
|
-
link:
|
|
251
|
-
active:
|
|
252
|
-
level1:
|
|
253
|
-
level2:
|
|
254
|
-
level3:
|
|
255
|
-
level4:
|
|
256
|
-
level5:
|
|
257
|
-
level6:
|
|
285
|
+
const et = "_tableOfContents_11q9u_1", tt = "_header_11q9u_20", nt = "_title_11q9u_24", at = "_nav_11q9u_33", ot = "_list_11q9u_39", st = "_link_11q9u_46", ct = "_active_11q9u_70", rt = "_level1_11q9u_86", lt = "_level2_11q9u_92", it = "_level3_11q9u_97", dt = "_level4_11q9u_103", ut = "_level5_11q9u_109", ht = "_level6_11q9u_115", j = {
|
|
286
|
+
tableOfContents: et,
|
|
287
|
+
header: tt,
|
|
288
|
+
title: nt,
|
|
289
|
+
nav: at,
|
|
290
|
+
list: ot,
|
|
291
|
+
link: st,
|
|
292
|
+
active: ct,
|
|
293
|
+
level1: rt,
|
|
294
|
+
level2: lt,
|
|
295
|
+
level3: it,
|
|
296
|
+
level4: dt,
|
|
297
|
+
level5: ut,
|
|
298
|
+
level6: ht
|
|
258
299
|
};
|
|
259
|
-
function
|
|
300
|
+
function gt({
|
|
260
301
|
content: t,
|
|
261
302
|
englishContent: n
|
|
262
303
|
}) {
|
|
263
|
-
const { t:
|
|
304
|
+
const { t: o } = E(), a = G(), c = F(), [s, d] = L([]), [g, h] = L(""), f = H(null);
|
|
264
305
|
S(() => {
|
|
265
306
|
h(""), (() => {
|
|
266
|
-
const
|
|
267
|
-
let l =
|
|
268
|
-
const
|
|
307
|
+
const _ = /^(#{1,6})\s+(.+)$/gm, i = [];
|
|
308
|
+
let l = _.exec(t);
|
|
309
|
+
const r = [];
|
|
269
310
|
for (; l !== null; ) {
|
|
270
|
-
const
|
|
271
|
-
|
|
311
|
+
const p = l[1].length, N = l[2].trim();
|
|
312
|
+
r.push({ level: p, text: N }), l = _.exec(t);
|
|
272
313
|
}
|
|
273
314
|
const w = /^(#{1,6})\s+(.+)$/gm;
|
|
274
|
-
let
|
|
275
|
-
for (;
|
|
276
|
-
const
|
|
315
|
+
let C = w.exec(n), I = 0;
|
|
316
|
+
for (; C !== null && I < r.length; ) {
|
|
317
|
+
const p = C[2].trim(), N = V(p);
|
|
277
318
|
i.push({
|
|
278
319
|
id: N,
|
|
279
|
-
text:
|
|
320
|
+
text: r[I].text,
|
|
280
321
|
// Use localized text for display
|
|
281
|
-
level:
|
|
282
|
-
}),
|
|
322
|
+
level: r[I].level
|
|
323
|
+
}), I++, C = w.exec(n);
|
|
283
324
|
}
|
|
284
|
-
|
|
325
|
+
d(i);
|
|
285
326
|
})();
|
|
286
327
|
}, [t, n]), S(() => {
|
|
287
|
-
if (
|
|
328
|
+
if (s.length === 0) return;
|
|
288
329
|
const b = setTimeout(() => {
|
|
289
|
-
const
|
|
330
|
+
const _ = s.filter(
|
|
290
331
|
(i) => !document.getElementById(i.id)
|
|
291
332
|
);
|
|
292
|
-
|
|
333
|
+
_.length > 0 && console.warn("Some heading elements not found:", _);
|
|
293
334
|
}, 100);
|
|
294
335
|
return () => clearTimeout(b);
|
|
295
|
-
}, [
|
|
296
|
-
if (
|
|
297
|
-
|
|
336
|
+
}, [s]), S(() => {
|
|
337
|
+
if (s.length === 0) return;
|
|
338
|
+
f.current && f.current.disconnect();
|
|
298
339
|
const b = setTimeout(() => {
|
|
299
|
-
const
|
|
300
|
-
|
|
340
|
+
const _ = s.map((i) => document.getElementById(i.id)).filter(Boolean);
|
|
341
|
+
_.length !== 0 && (f.current = new IntersectionObserver(
|
|
301
342
|
(i) => {
|
|
302
|
-
const l = i.filter((
|
|
343
|
+
const l = i.filter((r) => r.isIntersecting);
|
|
303
344
|
if (l.length > 0) {
|
|
304
|
-
const
|
|
305
|
-
h(
|
|
345
|
+
const r = l.reduce((w, C) => w.boundingClientRect.top < C.boundingClientRect.top ? w : C);
|
|
346
|
+
h(r.target.id);
|
|
306
347
|
}
|
|
307
348
|
},
|
|
308
349
|
{
|
|
309
350
|
rootMargin: "-80px 0% -80% 0%",
|
|
310
351
|
threshold: 0
|
|
311
352
|
}
|
|
312
|
-
),
|
|
313
|
-
|
|
353
|
+
), _.forEach((i) => {
|
|
354
|
+
f.current && f.current.observe(i);
|
|
314
355
|
}));
|
|
315
356
|
}, 150);
|
|
316
357
|
return () => {
|
|
317
|
-
clearTimeout(b),
|
|
358
|
+
clearTimeout(b), f.current && f.current.disconnect();
|
|
318
359
|
};
|
|
319
|
-
}, [
|
|
320
|
-
|
|
360
|
+
}, [s]), S(() => () => {
|
|
361
|
+
f.current && f.current.disconnect();
|
|
321
362
|
}, []);
|
|
322
|
-
const
|
|
323
|
-
const
|
|
324
|
-
if (
|
|
363
|
+
const m = (b) => {
|
|
364
|
+
const _ = document.getElementById(b);
|
|
365
|
+
if (_) {
|
|
325
366
|
const i = new URLSearchParams(a.search);
|
|
326
|
-
i.set("a", b),
|
|
367
|
+
i.set("a", b), c(
|
|
327
368
|
`${a.pathname}?${i.toString()}${a.hash}`,
|
|
328
369
|
{
|
|
329
370
|
replace: !0
|
|
330
371
|
}
|
|
331
372
|
);
|
|
332
|
-
const w =
|
|
373
|
+
const w = _.getBoundingClientRect().top + window.pageYOffset - 80;
|
|
333
374
|
window.scrollTo({
|
|
334
375
|
top: w,
|
|
335
376
|
behavior: "smooth"
|
|
336
377
|
});
|
|
337
378
|
}
|
|
338
379
|
};
|
|
339
|
-
return
|
|
340
|
-
/* @__PURE__ */ e("div", { className:
|
|
341
|
-
/* @__PURE__ */ e("nav", { className:
|
|
380
|
+
return s.length === 0 ? null : /* @__PURE__ */ u("aside", { className: j.tableOfContents, children: [
|
|
381
|
+
/* @__PURE__ */ e("div", { className: j.header, children: /* @__PURE__ */ e("span", { className: j.title, children: o("ui.onThisPage", "On this page") }) }),
|
|
382
|
+
/* @__PURE__ */ e("nav", { className: j.nav, children: /* @__PURE__ */ e("ul", { className: j.list, children: s.map((b) => /* @__PURE__ */ e("li", { className: j.item, children: /* @__PURE__ */ e(
|
|
342
383
|
"button",
|
|
343
384
|
{
|
|
344
|
-
className: `${
|
|
345
|
-
onClick: () =>
|
|
385
|
+
className: `${j.link} ${j[`level${b.level}`]} ${g === b.id ? j.active : ""}`,
|
|
386
|
+
onClick: () => m(b.id),
|
|
346
387
|
type: "button",
|
|
347
388
|
children: b.text
|
|
348
389
|
}
|
|
349
390
|
) }, b.id)) }) })
|
|
350
391
|
] });
|
|
351
392
|
}
|
|
352
|
-
const
|
|
353
|
-
overlay:
|
|
354
|
-
modal:
|
|
355
|
-
header:
|
|
356
|
-
title:
|
|
357
|
-
closeButton:
|
|
358
|
-
results:
|
|
359
|
-
resultsList:
|
|
360
|
-
resultItem:
|
|
361
|
-
resultTitle:
|
|
362
|
-
resultSlug:
|
|
363
|
-
noResults:
|
|
393
|
+
const mt = "_overlay_1e1d4_1", _t = "_modal_1e1d4_26", pt = "_header_1e1d4_50", ft = "_title_1e1d4_58", vt = "_closeButton_1e1d4_65", bt = "_results_1e1d4_86", wt = "_resultsList_1e1d4_94", Nt = "_resultItem_1e1d4_100", $t = "_resultTitle_1e1d4_119", xt = "_resultSlug_1e1d4_124", Ct = "_noResults_1e1d4_130", O = {
|
|
394
|
+
overlay: mt,
|
|
395
|
+
modal: _t,
|
|
396
|
+
header: pt,
|
|
397
|
+
title: ft,
|
|
398
|
+
closeButton: vt,
|
|
399
|
+
results: bt,
|
|
400
|
+
resultsList: wt,
|
|
401
|
+
resultItem: Nt,
|
|
402
|
+
resultTitle: $t,
|
|
403
|
+
resultSlug: xt,
|
|
404
|
+
noResults: Ct
|
|
364
405
|
};
|
|
365
|
-
function
|
|
406
|
+
function It({
|
|
366
407
|
tag: t,
|
|
367
408
|
results: n,
|
|
368
|
-
language:
|
|
409
|
+
language: o,
|
|
369
410
|
onClose: a
|
|
370
411
|
}) {
|
|
371
|
-
const { t:
|
|
372
|
-
const
|
|
373
|
-
|
|
412
|
+
const { t: c } = E(), { config: s } = R(), d = F(), g = (h) => {
|
|
413
|
+
const f = s.basePath || "";
|
|
414
|
+
d(`${f}/${o}/${h}`), a();
|
|
374
415
|
};
|
|
375
|
-
return
|
|
376
|
-
/* @__PURE__ */ e("div", { className:
|
|
377
|
-
/* @__PURE__ */
|
|
378
|
-
/* @__PURE__ */
|
|
379
|
-
|
|
416
|
+
return $e(
|
|
417
|
+
/* @__PURE__ */ e("div", { className: O.overlay, onClick: a, children: /* @__PURE__ */ u("div", { className: O.modal, onClick: (h) => h.stopPropagation(), children: [
|
|
418
|
+
/* @__PURE__ */ u("div", { className: O.header, children: [
|
|
419
|
+
/* @__PURE__ */ u("h2", { className: O.title, children: [
|
|
420
|
+
c("ui.tagResults"),
|
|
380
421
|
": ",
|
|
381
422
|
t
|
|
382
423
|
] }),
|
|
@@ -384,22 +425,22 @@ function bt({
|
|
|
384
425
|
"button",
|
|
385
426
|
{
|
|
386
427
|
type: "button",
|
|
387
|
-
className:
|
|
428
|
+
className: O.closeButton,
|
|
388
429
|
onClick: a,
|
|
389
430
|
"aria-label": "Close",
|
|
390
|
-
children: /* @__PURE__ */ e(
|
|
431
|
+
children: /* @__PURE__ */ e(le, {})
|
|
391
432
|
}
|
|
392
433
|
)
|
|
393
434
|
] }),
|
|
394
|
-
/* @__PURE__ */ e("div", { className:
|
|
435
|
+
/* @__PURE__ */ e("div", { className: O.results, children: n.length === 0 ? /* @__PURE__ */ e("div", { className: O.noResults, children: c("ui.noTagResults") }) : /* @__PURE__ */ e("ul", { className: O.resultsList, children: n.map((h) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ u(
|
|
395
436
|
"button",
|
|
396
437
|
{
|
|
397
438
|
type: "button",
|
|
398
|
-
className:
|
|
399
|
-
onClick: () =>
|
|
439
|
+
className: O.resultItem,
|
|
440
|
+
onClick: () => g(h.slug),
|
|
400
441
|
children: [
|
|
401
|
-
/* @__PURE__ */ e("div", { className:
|
|
402
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ e("div", { className: O.resultTitle, children: h.title }),
|
|
443
|
+
/* @__PURE__ */ u("div", { className: O.resultSlug, children: [
|
|
403
444
|
"/",
|
|
404
445
|
h.slug
|
|
405
446
|
] })
|
|
@@ -410,116 +451,106 @@ function bt({
|
|
|
410
451
|
document.body
|
|
411
452
|
);
|
|
412
453
|
}
|
|
413
|
-
const
|
|
414
|
-
tags:
|
|
415
|
-
compact:
|
|
416
|
-
tagLabel:
|
|
417
|
-
tagIcon:
|
|
418
|
-
tagList:
|
|
419
|
-
tag:
|
|
454
|
+
const kt = "_tags_11t8a_1", yt = "_compact_11t8a_9", Lt = "_tagLabel_11t8a_15", Tt = "_tagIcon_11t8a_25", St = "_tagList_11t8a_30", Pt = "_tag_11t8a_1", K = {
|
|
455
|
+
tags: kt,
|
|
456
|
+
compact: yt,
|
|
457
|
+
tagLabel: Lt,
|
|
458
|
+
tagIcon: Tt,
|
|
459
|
+
tagList: St,
|
|
460
|
+
tag: Pt
|
|
420
461
|
};
|
|
421
|
-
function
|
|
422
|
-
const { t: a } =
|
|
462
|
+
function Dt({ tags: t, variant: n = "default", onTagClick: o }) {
|
|
463
|
+
const { t: a } = E();
|
|
423
464
|
if (!t || t.length === 0) return null;
|
|
424
|
-
const
|
|
425
|
-
|
|
465
|
+
const c = (s) => {
|
|
466
|
+
o && o(s);
|
|
426
467
|
};
|
|
427
|
-
return /* @__PURE__ */
|
|
468
|
+
return /* @__PURE__ */ u(
|
|
428
469
|
"div",
|
|
429
470
|
{
|
|
430
|
-
className: `${
|
|
471
|
+
className: `${K.tags} ${n === "compact" ? K.compact : ""}`,
|
|
431
472
|
children: [
|
|
432
|
-
n === "default" && /* @__PURE__ */
|
|
433
|
-
/* @__PURE__ */ e(
|
|
434
|
-
/* @__PURE__ */
|
|
473
|
+
n === "default" && /* @__PURE__ */ u("div", { className: K.tagLabel, children: [
|
|
474
|
+
/* @__PURE__ */ e(Oe, { className: K.tagIcon, weight: "duotone" }),
|
|
475
|
+
/* @__PURE__ */ u("span", { children: [
|
|
435
476
|
a("ui.tags"),
|
|
436
477
|
":"
|
|
437
478
|
] })
|
|
438
479
|
] }),
|
|
439
|
-
/* @__PURE__ */ e("div", { className:
|
|
480
|
+
/* @__PURE__ */ e("div", { className: K.tagList, children: t.map((s) => /* @__PURE__ */ e(
|
|
440
481
|
"button",
|
|
441
482
|
{
|
|
442
483
|
type: "button",
|
|
443
|
-
className:
|
|
444
|
-
onClick: () =>
|
|
445
|
-
"aria-label": `${a("ui.filterByTag")}: ${
|
|
446
|
-
children:
|
|
484
|
+
className: K.tag,
|
|
485
|
+
onClick: () => c(s),
|
|
486
|
+
"aria-label": `${a("ui.filterByTag")}: ${s}`,
|
|
487
|
+
children: s
|
|
447
488
|
},
|
|
448
|
-
|
|
489
|
+
s
|
|
449
490
|
)) })
|
|
450
491
|
]
|
|
451
492
|
}
|
|
452
493
|
);
|
|
453
494
|
}
|
|
454
|
-
const
|
|
455
|
-
contentPage:
|
|
456
|
-
loadingContainer:
|
|
457
|
-
errorContainer:
|
|
458
|
-
skeletonTitle:
|
|
459
|
-
skeletonParagraph:
|
|
460
|
-
skeletonParagraphShort:
|
|
461
|
-
errorText:
|
|
462
|
-
mdxContent:
|
|
463
|
-
withMetadata:
|
|
464
|
-
codeBlock:
|
|
465
|
-
codeLanguage:
|
|
495
|
+
const Bt = "_contentPage_1nxj5_1", Mt = "_loadingContainer_1nxj5_48", Et = "_errorContainer_1nxj5_49", Rt = "_skeletonTitle_1nxj5_71", Ot = "_skeletonParagraph_1nxj5_80", jt = "_skeletonParagraphShort_1nxj5_93", At = "_errorText_1nxj5_107", Wt = "_mdxContent_1nxj5_112", Ht = "_withMetadata_1nxj5_125", qt = "_codeBlock_1nxj5_300", Ft = "_codeLanguage_1nxj5_304", B = {
|
|
496
|
+
contentPage: Bt,
|
|
497
|
+
loadingContainer: Mt,
|
|
498
|
+
errorContainer: Et,
|
|
499
|
+
skeletonTitle: Rt,
|
|
500
|
+
skeletonParagraph: Ot,
|
|
501
|
+
skeletonParagraphShort: jt,
|
|
502
|
+
errorText: At,
|
|
503
|
+
mdxContent: Wt,
|
|
504
|
+
withMetadata: Ht,
|
|
505
|
+
codeBlock: qt,
|
|
506
|
+
codeLanguage: Ft
|
|
466
507
|
};
|
|
467
|
-
function
|
|
468
|
-
var
|
|
469
|
-
const { slug: n } =
|
|
470
|
-
const C = {
|
|
471
|
-
advanced: !1,
|
|
472
|
-
anchor: ""
|
|
473
|
-
};
|
|
474
|
-
if (!g) return C;
|
|
475
|
-
const $ = (g.startsWith("?") ? g.substring(1) : g).split("&");
|
|
476
|
-
for (const y of $)
|
|
477
|
-
y === "advanced" ? C.advanced = !0 : y.startsWith("a=") && (C.anchor = y.substring(2));
|
|
478
|
-
return C;
|
|
479
|
-
})(s.search), A = ee.advanced;
|
|
508
|
+
function Ut({ language: t }) {
|
|
509
|
+
var he;
|
|
510
|
+
const { slug: n } = re(), o = G(), { config: a, loadContent: c, loadEnglishContent: s } = R(), [d, g] = L(""), [h, f] = L(""), [m, b] = L({}), [_, i] = L(!0), [l, r] = L(null), [w, C] = L(!0), [I, p] = L(null), N = H(0), D = H([]), J = Xe(o.search), U = J.advanced;
|
|
480
511
|
if (S(() => {
|
|
481
512
|
(async () => {
|
|
482
513
|
if (!n) return;
|
|
483
|
-
i(!0),
|
|
484
|
-
const
|
|
485
|
-
let
|
|
486
|
-
for (const $ of
|
|
514
|
+
i(!0), r(null), N.current = 0;
|
|
515
|
+
const k = (a == null ? void 0 : a.navigationData) || [];
|
|
516
|
+
let P = !0;
|
|
517
|
+
for (const $ of k)
|
|
487
518
|
if ("items" in $) {
|
|
488
|
-
const y = $.items.find((
|
|
519
|
+
const y = $.items.find((q) => q.slug === n);
|
|
489
520
|
if (y) {
|
|
490
|
-
|
|
521
|
+
P = y.showTableOfContents !== !1;
|
|
491
522
|
break;
|
|
492
523
|
}
|
|
493
524
|
} else if ($.slug === n) {
|
|
494
|
-
|
|
525
|
+
P = $.showTableOfContents !== !1;
|
|
495
526
|
break;
|
|
496
527
|
}
|
|
497
|
-
|
|
528
|
+
C(P);
|
|
498
529
|
try {
|
|
499
530
|
let $;
|
|
500
531
|
try {
|
|
501
|
-
$ = await
|
|
532
|
+
$ = await c(t, n, U);
|
|
502
533
|
} catch {
|
|
503
|
-
if (
|
|
504
|
-
$ = await
|
|
534
|
+
if (U)
|
|
535
|
+
$ = await c(t, n, !1);
|
|
505
536
|
else
|
|
506
537
|
throw new Error("Content not found");
|
|
507
538
|
}
|
|
508
539
|
let y = "";
|
|
509
540
|
try {
|
|
510
|
-
y = await
|
|
541
|
+
y = await s(n, U);
|
|
511
542
|
} catch {
|
|
512
|
-
|
|
543
|
+
U && (y = await s(n, !1));
|
|
513
544
|
}
|
|
514
|
-
const
|
|
515
|
-
let
|
|
516
|
-
for (;
|
|
517
|
-
const
|
|
518
|
-
|
|
545
|
+
const q = /^(#{1,6})\s+(.+)$/gm, ee = [];
|
|
546
|
+
let ne = q.exec(y);
|
|
547
|
+
for (; ne !== null; ) {
|
|
548
|
+
const Te = ne[2].trim();
|
|
549
|
+
ee.push(Te), ne = q.exec(y);
|
|
519
550
|
}
|
|
520
|
-
D.current =
|
|
551
|
+
D.current = ee, f(y), g($.content), b($.frontmatter);
|
|
521
552
|
} catch ($) {
|
|
522
|
-
|
|
553
|
+
r($ instanceof Error ? $.message : "Failed to load content");
|
|
523
554
|
} finally {
|
|
524
555
|
i(!1);
|
|
525
556
|
}
|
|
@@ -527,290 +558,294 @@ function jt({ language: t }) {
|
|
|
527
558
|
}, [
|
|
528
559
|
n,
|
|
529
560
|
t,
|
|
530
|
-
|
|
561
|
+
U,
|
|
531
562
|
a.navigationData,
|
|
532
|
-
|
|
533
|
-
|
|
563
|
+
c,
|
|
564
|
+
s
|
|
534
565
|
]), S(() => {
|
|
535
|
-
if (!
|
|
536
|
-
const
|
|
537
|
-
|
|
538
|
-
if (C) {
|
|
539
|
-
const y = C.getBoundingClientRect().top + window.pageYOffset - 80;
|
|
540
|
-
window.scrollTo({
|
|
541
|
-
top: y,
|
|
542
|
-
behavior: "smooth"
|
|
543
|
-
});
|
|
544
|
-
}
|
|
566
|
+
if (!_ && J.anchor) {
|
|
567
|
+
const v = setTimeout(() => {
|
|
568
|
+
we(J.anchor);
|
|
545
569
|
}, 150);
|
|
546
|
-
return () => clearTimeout(
|
|
570
|
+
return () => clearTimeout(v);
|
|
547
571
|
}
|
|
548
|
-
}, [
|
|
549
|
-
return /* @__PURE__ */ e("div", { className: B.contentPage, children: /* @__PURE__ */
|
|
572
|
+
}, [_, J.anchor]), _)
|
|
573
|
+
return /* @__PURE__ */ e("div", { className: B.contentPage, children: /* @__PURE__ */ u("div", { className: B.loadingContainer, children: [
|
|
550
574
|
/* @__PURE__ */ e("div", { className: B.skeletonTitle }),
|
|
551
575
|
/* @__PURE__ */ e("div", { className: B.skeletonParagraph }),
|
|
552
576
|
/* @__PURE__ */ e("div", { className: B.skeletonParagraph }),
|
|
553
577
|
/* @__PURE__ */ e("div", { className: B.skeletonParagraphShort })
|
|
554
578
|
] }) });
|
|
555
579
|
if (l)
|
|
556
|
-
return /* @__PURE__ */ e("div", { className: B.contentPage, children: /* @__PURE__ */ e("div", { className: B.errorContainer, children: /* @__PURE__ */
|
|
580
|
+
return /* @__PURE__ */ e("div", { className: B.contentPage, children: /* @__PURE__ */ e("div", { className: B.errorContainer, children: /* @__PURE__ */ u("div", { className: B.errorText, children: [
|
|
557
581
|
"Error: ",
|
|
558
582
|
l
|
|
559
583
|
] }) }) });
|
|
560
584
|
N.current = 0;
|
|
561
|
-
let
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
585
|
+
let ue = !1;
|
|
586
|
+
const Z = (v, k) => {
|
|
587
|
+
v.preventDefault(), we(k), Ye(k, U);
|
|
588
|
+
};
|
|
589
|
+
return /* @__PURE__ */ u(z, { children: [
|
|
590
|
+
/* @__PURE__ */ u("div", { className: B.contentPage, children: [
|
|
591
|
+
/* @__PURE__ */ e(Ue, { hasAdvanced: m.hasAdvanced || !1 }),
|
|
565
592
|
/* @__PURE__ */ e("div", { className: B.mdxContent, children: /* @__PURE__ */ e(
|
|
566
|
-
|
|
593
|
+
Be,
|
|
567
594
|
{
|
|
568
|
-
remarkPlugins: [
|
|
595
|
+
remarkPlugins: [Me],
|
|
569
596
|
components: {
|
|
570
|
-
h1: ({ children:
|
|
571
|
-
const
|
|
572
|
-
|
|
573
|
-
const
|
|
574
|
-
return /* @__PURE__ */
|
|
597
|
+
h1: ({ children: v }) => {
|
|
598
|
+
const k = N.current++, P = D.current[k] || "", $ = V(P), y = !ue;
|
|
599
|
+
ue = !0;
|
|
600
|
+
const q = m.date || m.author;
|
|
601
|
+
return /* @__PURE__ */ u(z, { children: [
|
|
575
602
|
/* @__PURE__ */ e(
|
|
576
603
|
"h1",
|
|
577
604
|
{
|
|
578
605
|
id: $,
|
|
579
|
-
className:
|
|
606
|
+
className: y && q ? B.withMetadata : void 0,
|
|
580
607
|
children: /* @__PURE__ */ e(
|
|
581
608
|
"a",
|
|
582
609
|
{
|
|
583
|
-
href:
|
|
610
|
+
href: `#${$}`,
|
|
611
|
+
onClick: (ee) => Z(ee, $),
|
|
584
612
|
style: { color: "inherit", textDecoration: "none" },
|
|
585
|
-
children:
|
|
613
|
+
children: v
|
|
586
614
|
}
|
|
587
615
|
)
|
|
588
616
|
}
|
|
589
617
|
),
|
|
590
|
-
|
|
591
|
-
|
|
618
|
+
y && q && /* @__PURE__ */ e(
|
|
619
|
+
ce,
|
|
592
620
|
{
|
|
593
|
-
date:
|
|
594
|
-
author:
|
|
621
|
+
date: m.date,
|
|
622
|
+
author: m.author
|
|
595
623
|
}
|
|
596
624
|
)
|
|
597
625
|
] });
|
|
598
626
|
},
|
|
599
|
-
h2: ({ children:
|
|
600
|
-
const
|
|
627
|
+
h2: ({ children: v }) => {
|
|
628
|
+
const k = N.current++, P = D.current[k] || "", $ = V(P);
|
|
601
629
|
return /* @__PURE__ */ e("h2", { id: $, children: /* @__PURE__ */ e(
|
|
602
630
|
"a",
|
|
603
631
|
{
|
|
604
|
-
href:
|
|
632
|
+
href: `#${$}`,
|
|
633
|
+
onClick: (y) => Z(y, $),
|
|
605
634
|
style: { color: "inherit", textDecoration: "none" },
|
|
606
|
-
children:
|
|
635
|
+
children: v
|
|
607
636
|
}
|
|
608
637
|
) });
|
|
609
638
|
},
|
|
610
|
-
h3: ({ children:
|
|
611
|
-
const
|
|
639
|
+
h3: ({ children: v }) => {
|
|
640
|
+
const k = N.current++, P = D.current[k] || "", $ = V(P);
|
|
612
641
|
return /* @__PURE__ */ e("h3", { id: $, children: /* @__PURE__ */ e(
|
|
613
642
|
"a",
|
|
614
643
|
{
|
|
615
|
-
href:
|
|
644
|
+
href: `#${$}`,
|
|
645
|
+
onClick: (y) => Z(y, $),
|
|
616
646
|
style: { color: "inherit", textDecoration: "none" },
|
|
617
|
-
children:
|
|
647
|
+
children: v
|
|
618
648
|
}
|
|
619
649
|
) });
|
|
620
650
|
},
|
|
621
|
-
h4: ({ children:
|
|
622
|
-
const
|
|
651
|
+
h4: ({ children: v }) => {
|
|
652
|
+
const k = N.current++, P = D.current[k] || "", $ = V(P);
|
|
623
653
|
return /* @__PURE__ */ e("h4", { id: $, children: /* @__PURE__ */ e(
|
|
624
654
|
"a",
|
|
625
655
|
{
|
|
626
|
-
href:
|
|
656
|
+
href: `#${$}`,
|
|
657
|
+
onClick: (y) => Z(y, $),
|
|
627
658
|
style: { color: "inherit", textDecoration: "none" },
|
|
628
|
-
children:
|
|
659
|
+
children: v
|
|
629
660
|
}
|
|
630
661
|
) });
|
|
631
662
|
},
|
|
632
|
-
h5: ({ children:
|
|
633
|
-
const
|
|
634
|
-
return /* @__PURE__ */ e("h5", { id:
|
|
663
|
+
h5: ({ children: v }) => {
|
|
664
|
+
const k = `h5-${N.current++}`;
|
|
665
|
+
return /* @__PURE__ */ e("h5", { id: k, children: v });
|
|
635
666
|
},
|
|
636
|
-
h6: ({ children:
|
|
637
|
-
const
|
|
638
|
-
return /* @__PURE__ */ e("h6", { id:
|
|
667
|
+
h6: ({ children: v }) => {
|
|
668
|
+
const k = `h6-${N.current++}`;
|
|
669
|
+
return /* @__PURE__ */ e("h6", { id: k, children: v });
|
|
639
670
|
},
|
|
640
|
-
p: ({ children:
|
|
641
|
-
ul: ({ children:
|
|
642
|
-
ol: ({ children:
|
|
643
|
-
li: ({ children:
|
|
644
|
-
code: ({ className:
|
|
645
|
-
if (!
|
|
646
|
-
return /* @__PURE__ */ e("code", { ...
|
|
647
|
-
const y = (
|
|
648
|
-
return /* @__PURE__ */
|
|
671
|
+
p: ({ children: v }) => /* @__PURE__ */ e("p", { children: v }),
|
|
672
|
+
ul: ({ children: v }) => /* @__PURE__ */ e("ul", { children: v }),
|
|
673
|
+
ol: ({ children: v }) => /* @__PURE__ */ e("ol", { children: v }),
|
|
674
|
+
li: ({ children: v }) => /* @__PURE__ */ e("li", { children: v }),
|
|
675
|
+
code: ({ className: v, children: k, ...P }) => {
|
|
676
|
+
if (!v)
|
|
677
|
+
return /* @__PURE__ */ e("code", { ...P, children: k });
|
|
678
|
+
const y = (v == null ? void 0 : v.replace("language-", "")) || "";
|
|
679
|
+
return /* @__PURE__ */ u("div", { className: B.codeBlock, children: [
|
|
649
680
|
y && /* @__PURE__ */ e("div", { className: B.codeLanguage, children: y }),
|
|
650
|
-
/* @__PURE__ */ e("pre", { children: /* @__PURE__ */ e("code", { className:
|
|
681
|
+
/* @__PURE__ */ e("pre", { children: /* @__PURE__ */ e("code", { className: v, ...P, children: k }) })
|
|
651
682
|
] });
|
|
652
683
|
},
|
|
653
|
-
pre: ({ children:
|
|
684
|
+
pre: ({ children: v }) => /* @__PURE__ */ e(z, { children: v }),
|
|
654
685
|
// Let code component handle pre styling
|
|
655
|
-
blockquote: ({ children:
|
|
656
|
-
a: ({ href:
|
|
657
|
-
if (
|
|
658
|
-
const $ =
|
|
659
|
-
|
|
686
|
+
blockquote: ({ children: v }) => /* @__PURE__ */ e("blockquote", { children: v }),
|
|
687
|
+
a: ({ href: v, children: k, ...P }) => {
|
|
688
|
+
if (v != null && v.startsWith("./")) {
|
|
689
|
+
const $ = v.slice(2), y = Qe(
|
|
690
|
+
$,
|
|
691
|
+
t,
|
|
692
|
+
a.basePath
|
|
693
|
+
);
|
|
694
|
+
return /* @__PURE__ */ e("a", { href: y, ...P, children: k });
|
|
660
695
|
}
|
|
661
|
-
return
|
|
696
|
+
return v != null && v.startsWith("http://") || v != null && v.startsWith("https://") ? /* @__PURE__ */ e(
|
|
662
697
|
"a",
|
|
663
698
|
{
|
|
664
|
-
href:
|
|
699
|
+
href: v,
|
|
665
700
|
target: "_blank",
|
|
666
701
|
rel: "noopener noreferrer",
|
|
667
|
-
...
|
|
668
|
-
children:
|
|
702
|
+
...P,
|
|
703
|
+
children: k
|
|
669
704
|
}
|
|
670
|
-
) : /* @__PURE__ */ e("a", { href:
|
|
705
|
+
) : /* @__PURE__ */ e("a", { href: v, ...P, children: k });
|
|
671
706
|
},
|
|
672
|
-
strong: ({ children:
|
|
673
|
-
em: ({ children:
|
|
707
|
+
strong: ({ children: v }) => /* @__PURE__ */ e("strong", { children: v }),
|
|
708
|
+
em: ({ children: v }) => /* @__PURE__ */ e("em", { children: v })
|
|
674
709
|
},
|
|
675
|
-
children:
|
|
710
|
+
children: d
|
|
676
711
|
}
|
|
677
712
|
) }),
|
|
678
|
-
|
|
679
|
-
|
|
713
|
+
m.tags && m.tags.length > 0 && /* @__PURE__ */ e(
|
|
714
|
+
Dt,
|
|
680
715
|
{
|
|
681
|
-
tags:
|
|
716
|
+
tags: m.tags,
|
|
682
717
|
variant: "compact",
|
|
683
|
-
onTagClick: (
|
|
718
|
+
onTagClick: (v) => p(v)
|
|
684
719
|
}
|
|
685
720
|
)
|
|
686
721
|
] }),
|
|
687
|
-
w && /* @__PURE__ */ e(
|
|
688
|
-
|
|
689
|
-
|
|
722
|
+
w && /* @__PURE__ */ e(gt, { content: d, englishContent: h }),
|
|
723
|
+
I && ((he = a.tagIndex) == null ? void 0 : he[t]) && /* @__PURE__ */ e(
|
|
724
|
+
It,
|
|
690
725
|
{
|
|
691
|
-
tag:
|
|
692
|
-
results: a.tagIndex[t][
|
|
726
|
+
tag: I,
|
|
727
|
+
results: a.tagIndex[t][I] || [],
|
|
693
728
|
language: t,
|
|
694
|
-
onClose: () =>
|
|
729
|
+
onClose: () => p(null)
|
|
695
730
|
}
|
|
696
731
|
)
|
|
697
732
|
] });
|
|
698
733
|
}
|
|
699
|
-
const
|
|
700
|
-
searchButton:
|
|
701
|
-
searchIcon:
|
|
702
|
-
searchHint:
|
|
703
|
-
kbd:
|
|
704
|
-
searchOverlay:
|
|
705
|
-
searchModal:
|
|
706
|
-
searchHeader:
|
|
707
|
-
searchInput:
|
|
708
|
-
closeButton:
|
|
709
|
-
searchResults:
|
|
710
|
-
resultsList:
|
|
711
|
-
resultItem:
|
|
712
|
-
selected:
|
|
713
|
-
resultTitle:
|
|
714
|
-
resultSlug:
|
|
715
|
-
noResults:
|
|
716
|
-
searchHints:
|
|
717
|
-
hint:
|
|
734
|
+
const Kt = "_searchButton_1k9sl_1", zt = "_searchIcon_1k9sl_17", Gt = "_searchHint_1k9sl_23", Qt = "_kbd_1k9sl_27", Xt = "_searchOverlay_1k9sl_42", Yt = "_searchModal_1k9sl_67", Vt = "_searchHeader_1k9sl_91", Jt = "_searchInput_1k9sl_105", Zt = "_closeButton_1k9sl_123", en = "_searchResults_1k9sl_144", tn = "_resultsList_1k9sl_152", nn = "_resultItem_1k9sl_158", an = "_selected_1k9sl_173", on = "_resultTitle_1k9sl_176", sn = "_resultSlug_1k9sl_180", cn = "_noResults_1k9sl_186", rn = "_searchHints_1k9sl_193", ln = "_hint_1k9sl_210", T = {
|
|
735
|
+
searchButton: Kt,
|
|
736
|
+
searchIcon: zt,
|
|
737
|
+
searchHint: Gt,
|
|
738
|
+
kbd: Qt,
|
|
739
|
+
searchOverlay: Xt,
|
|
740
|
+
searchModal: Yt,
|
|
741
|
+
searchHeader: Vt,
|
|
742
|
+
searchInput: Jt,
|
|
743
|
+
closeButton: Zt,
|
|
744
|
+
searchResults: en,
|
|
745
|
+
resultsList: tn,
|
|
746
|
+
resultItem: nn,
|
|
747
|
+
selected: an,
|
|
748
|
+
resultTitle: on,
|
|
749
|
+
resultSlug: sn,
|
|
750
|
+
noResults: cn,
|
|
751
|
+
searchHints: rn,
|
|
752
|
+
hint: ln
|
|
718
753
|
};
|
|
719
|
-
function
|
|
720
|
-
const { t: n } =
|
|
754
|
+
function dn({ language: t }) {
|
|
755
|
+
const { t: n } = E(), o = F(), { config: a } = R(), [c, s] = L(!1), [d, g] = L(""), [h, f] = L([]), [m, b] = L(0), _ = H(null), i = H(null), r = typeof navigator < "u" && /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘K" : "Ctrl+K", w = (a.navigationData ? te(a.navigationData, t) : []).flatMap((p) => "items" in p ? p.items.map((N) => ({
|
|
721
756
|
title: N.title,
|
|
722
757
|
slug: N.slug
|
|
723
|
-
})) : [{ title:
|
|
758
|
+
})) : [{ title: p.title, slug: p.slug }]);
|
|
724
759
|
S(() => {
|
|
725
|
-
if (!
|
|
726
|
-
|
|
760
|
+
if (!d.trim()) {
|
|
761
|
+
f([]), b(0);
|
|
727
762
|
return;
|
|
728
763
|
}
|
|
729
|
-
const
|
|
730
|
-
(D) => D.title.toLowerCase().includes(
|
|
764
|
+
const p = d.toLowerCase(), N = w.filter(
|
|
765
|
+
(D) => D.title.toLowerCase().includes(p) || D.slug.toLowerCase().includes(p)
|
|
731
766
|
);
|
|
732
|
-
|
|
733
|
-
}, [
|
|
734
|
-
const
|
|
735
|
-
(N.metaKey || N.ctrlKey) && N.key === "k" && (N.preventDefault(),
|
|
767
|
+
f(N), b(0);
|
|
768
|
+
}, [d]), S(() => {
|
|
769
|
+
const p = (N) => {
|
|
770
|
+
(N.metaKey || N.ctrlKey) && N.key === "k" && (N.preventDefault(), s(!0), setTimeout(() => {
|
|
736
771
|
var D;
|
|
737
|
-
return (D =
|
|
738
|
-
}, 100)), N.key === "Escape" &&
|
|
772
|
+
return (D = _.current) == null ? void 0 : D.focus();
|
|
773
|
+
}, 100)), N.key === "Escape" && c && (s(!1), g(""));
|
|
739
774
|
};
|
|
740
|
-
return document.addEventListener("keydown",
|
|
741
|
-
}, [
|
|
742
|
-
const
|
|
743
|
-
|
|
775
|
+
return document.addEventListener("keydown", p), () => document.removeEventListener("keydown", p);
|
|
776
|
+
}, [c]), S(() => {
|
|
777
|
+
const p = () => {
|
|
778
|
+
s(!0), setTimeout(() => {
|
|
744
779
|
var D;
|
|
745
|
-
return (D =
|
|
780
|
+
return (D = _.current) == null ? void 0 : D.focus();
|
|
746
781
|
}, 100);
|
|
747
782
|
}, N = () => {
|
|
748
|
-
|
|
783
|
+
s(!1), g("");
|
|
749
784
|
};
|
|
750
|
-
return window.addEventListener("blog:open-search",
|
|
751
|
-
window.removeEventListener("blog:open-search",
|
|
785
|
+
return window.addEventListener("blog:open-search", p), window.addEventListener("blog:close-search", N), () => {
|
|
786
|
+
window.removeEventListener("blog:open-search", p), window.removeEventListener("blog:close-search", N);
|
|
752
787
|
};
|
|
753
788
|
}, []);
|
|
754
|
-
const
|
|
755
|
-
|
|
789
|
+
const C = (p) => {
|
|
790
|
+
p.key === "ArrowDown" ? (p.preventDefault(), b((N) => Math.min(N + 1, h.length - 1))) : p.key === "ArrowUp" ? (p.preventDefault(), b((N) => Math.max(N - 1, 0))) : p.key === "Enter" && h[m] && (p.preventDefault(), I(h[m].slug));
|
|
756
791
|
};
|
|
757
792
|
S(() => {
|
|
758
|
-
const
|
|
759
|
-
i.current && !i.current.contains(N.target) && (
|
|
793
|
+
const p = (N) => {
|
|
794
|
+
i.current && !i.current.contains(N.target) && (s(!1), g(""));
|
|
760
795
|
};
|
|
761
|
-
return
|
|
762
|
-
}, [
|
|
763
|
-
const
|
|
796
|
+
return c && document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
|
|
797
|
+
}, [c]);
|
|
798
|
+
const I = (p) => {
|
|
764
799
|
const N = a.basePath || "";
|
|
765
|
-
|
|
800
|
+
o(`${N}/${t}/${p}`), s(!1), g("");
|
|
766
801
|
};
|
|
767
|
-
return /* @__PURE__ */
|
|
768
|
-
/* @__PURE__ */
|
|
802
|
+
return /* @__PURE__ */ u(z, { children: [
|
|
803
|
+
/* @__PURE__ */ u(
|
|
769
804
|
"button",
|
|
770
805
|
{
|
|
771
806
|
type: "button",
|
|
772
807
|
className: T.searchButton,
|
|
773
808
|
onClick: () => {
|
|
774
|
-
|
|
775
|
-
var
|
|
776
|
-
return (
|
|
809
|
+
s(!0), setTimeout(() => {
|
|
810
|
+
var p;
|
|
811
|
+
return (p = _.current) == null ? void 0 : p.focus();
|
|
777
812
|
}, 100);
|
|
778
813
|
},
|
|
779
814
|
"aria-label": n("ui.search"),
|
|
780
815
|
children: [
|
|
781
|
-
/* @__PURE__ */ e(
|
|
816
|
+
/* @__PURE__ */ e(_e, { className: T.searchIcon }),
|
|
782
817
|
/* @__PURE__ */ e("span", { className: T.searchHint, children: n("ui.search") }),
|
|
783
|
-
/* @__PURE__ */ e("kbd", { className: T.kbd, children:
|
|
818
|
+
/* @__PURE__ */ e("kbd", { className: T.kbd, children: r })
|
|
784
819
|
]
|
|
785
820
|
}
|
|
786
821
|
),
|
|
787
|
-
|
|
822
|
+
c && $e(
|
|
788
823
|
/* @__PURE__ */ e(
|
|
789
824
|
"div",
|
|
790
825
|
{
|
|
791
826
|
className: T.searchOverlay,
|
|
792
827
|
onClick: () => {
|
|
793
|
-
|
|
828
|
+
s(!1), g("");
|
|
794
829
|
},
|
|
795
|
-
children: /* @__PURE__ */
|
|
830
|
+
children: /* @__PURE__ */ u(
|
|
796
831
|
"div",
|
|
797
832
|
{
|
|
798
833
|
className: T.searchModal,
|
|
799
834
|
ref: i,
|
|
800
|
-
onClick: (
|
|
835
|
+
onClick: (p) => p.stopPropagation(),
|
|
801
836
|
children: [
|
|
802
|
-
/* @__PURE__ */
|
|
803
|
-
/* @__PURE__ */ e(
|
|
837
|
+
/* @__PURE__ */ u("div", { className: T.searchHeader, children: [
|
|
838
|
+
/* @__PURE__ */ e(_e, { className: T.searchIcon }),
|
|
804
839
|
/* @__PURE__ */ e(
|
|
805
840
|
"input",
|
|
806
841
|
{
|
|
807
|
-
ref:
|
|
842
|
+
ref: _,
|
|
808
843
|
type: "text",
|
|
809
844
|
className: T.searchInput,
|
|
810
845
|
placeholder: n("ui.searchPlaceholder"),
|
|
811
|
-
value:
|
|
812
|
-
onChange: (
|
|
813
|
-
onKeyDown:
|
|
846
|
+
value: d,
|
|
847
|
+
onChange: (p) => g(p.target.value),
|
|
848
|
+
onKeyDown: C
|
|
814
849
|
}
|
|
815
850
|
),
|
|
816
851
|
/* @__PURE__ */ e(
|
|
@@ -819,40 +854,40 @@ function an({ language: t }) {
|
|
|
819
854
|
type: "button",
|
|
820
855
|
className: T.closeButton,
|
|
821
856
|
onClick: () => {
|
|
822
|
-
|
|
857
|
+
s(!1), g("");
|
|
823
858
|
},
|
|
824
859
|
"aria-label": "Close search",
|
|
825
|
-
children: /* @__PURE__ */ e(
|
|
860
|
+
children: /* @__PURE__ */ e(le, {})
|
|
826
861
|
}
|
|
827
862
|
)
|
|
828
863
|
] }),
|
|
829
|
-
|
|
864
|
+
d && /* @__PURE__ */ e("div", { className: T.searchResults, children: h.length === 0 ? /* @__PURE__ */ e("div", { className: T.noResults, children: n("ui.noSearchResults") }) : /* @__PURE__ */ e("ul", { className: T.resultsList, children: h.map((p, N) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ u(
|
|
830
865
|
"button",
|
|
831
866
|
{
|
|
832
867
|
type: "button",
|
|
833
|
-
className: `${T.resultItem} ${N ===
|
|
834
|
-
onClick: () =>
|
|
868
|
+
className: `${T.resultItem} ${N === m ? T.selected : ""}`,
|
|
869
|
+
onClick: () => I(p.slug),
|
|
835
870
|
onMouseEnter: () => b(N),
|
|
836
871
|
children: [
|
|
837
|
-
/* @__PURE__ */ e("div", { className: T.resultTitle, children:
|
|
838
|
-
/* @__PURE__ */
|
|
872
|
+
/* @__PURE__ */ e("div", { className: T.resultTitle, children: p.title }),
|
|
873
|
+
/* @__PURE__ */ u("div", { className: T.resultSlug, children: [
|
|
839
874
|
"/",
|
|
840
|
-
|
|
875
|
+
p.slug
|
|
841
876
|
] })
|
|
842
877
|
]
|
|
843
878
|
}
|
|
844
|
-
) },
|
|
845
|
-
!
|
|
846
|
-
/* @__PURE__ */
|
|
879
|
+
) }, p.slug)) }) }),
|
|
880
|
+
!d && /* @__PURE__ */ u("div", { className: T.searchHints, children: [
|
|
881
|
+
/* @__PURE__ */ u("div", { className: T.hint, children: [
|
|
847
882
|
/* @__PURE__ */ e("kbd", { children: "↑" }),
|
|
848
883
|
/* @__PURE__ */ e("kbd", { children: "↓" }),
|
|
849
884
|
/* @__PURE__ */ e("span", { children: n("ui.searchNavigate") })
|
|
850
885
|
] }),
|
|
851
|
-
/* @__PURE__ */
|
|
886
|
+
/* @__PURE__ */ u("div", { className: T.hint, children: [
|
|
852
887
|
/* @__PURE__ */ e("kbd", { children: "↵" }),
|
|
853
888
|
/* @__PURE__ */ e("span", { children: n("ui.searchSelect") })
|
|
854
889
|
] }),
|
|
855
|
-
/* @__PURE__ */
|
|
890
|
+
/* @__PURE__ */ u("div", { className: T.hint, children: [
|
|
856
891
|
/* @__PURE__ */ e("kbd", { children: "esc" }),
|
|
857
892
|
/* @__PURE__ */ e("span", { children: n("ui.searchClose") })
|
|
858
893
|
] })
|
|
@@ -866,36 +901,36 @@ function an({ language: t }) {
|
|
|
866
901
|
)
|
|
867
902
|
] });
|
|
868
903
|
}
|
|
869
|
-
const
|
|
870
|
-
header:
|
|
871
|
-
container:
|
|
872
|
-
content:
|
|
873
|
-
leftSection:
|
|
874
|
-
mobileMenuButton:
|
|
875
|
-
burgerIcon:
|
|
876
|
-
logo:
|
|
877
|
-
nav:
|
|
878
|
-
navLink:
|
|
879
|
-
externalIcon:
|
|
880
|
-
supportDropdown:
|
|
881
|
-
themeDropdown:
|
|
882
|
-
themeButton:
|
|
883
|
-
themeIcon:
|
|
884
|
-
supportButton:
|
|
885
|
-
caretIcon:
|
|
886
|
-
dropdownMenu:
|
|
887
|
-
dropdownItem:
|
|
888
|
-
dropdownIcon:
|
|
904
|
+
const un = "_header_jrobc_1", hn = "_container_jrobc_24", gn = "_content_jrobc_36", mn = "_leftSection_jrobc_43", _n = "_mobileMenuButton_jrobc_49", pn = "_burgerIcon_jrobc_87", fn = "_logo_jrobc_92", vn = "_nav_jrobc_98", bn = "_navLink_jrobc_109", wn = "_externalIcon_jrobc_135", Nn = "_supportDropdown_jrobc_141", $n = "_themeDropdown_jrobc_145", xn = "_themeButton_jrobc_149", Cn = "_themeIcon_jrobc_171", In = "_supportButton_jrobc_177", kn = "_caretIcon_jrobc_198", yn = "_dropdownMenu_jrobc_208", Ln = "_dropdownItem_jrobc_221", Tn = "_dropdownIcon_jrobc_244", x = {
|
|
905
|
+
header: un,
|
|
906
|
+
container: hn,
|
|
907
|
+
content: gn,
|
|
908
|
+
leftSection: mn,
|
|
909
|
+
mobileMenuButton: _n,
|
|
910
|
+
burgerIcon: pn,
|
|
911
|
+
logo: fn,
|
|
912
|
+
nav: vn,
|
|
913
|
+
navLink: bn,
|
|
914
|
+
externalIcon: wn,
|
|
915
|
+
supportDropdown: Nn,
|
|
916
|
+
themeDropdown: $n,
|
|
917
|
+
themeButton: xn,
|
|
918
|
+
themeIcon: Cn,
|
|
919
|
+
supportButton: In,
|
|
920
|
+
caretIcon: kn,
|
|
921
|
+
dropdownMenu: yn,
|
|
922
|
+
dropdownItem: Ln,
|
|
923
|
+
dropdownIcon: Tn
|
|
889
924
|
};
|
|
890
|
-
function
|
|
891
|
-
const { t: n, i18n:
|
|
925
|
+
function Sn({ onMobileMenuToggle: t }) {
|
|
926
|
+
const { t: n, i18n: o } = E(), { config: a } = R(), c = a.header ?? {}, s = c.navLinks ?? [], d = c.dropdownItems ?? [], [g, h] = L(!1), [f, m] = L(!1), { theme: b, setTheme: _ } = ke(), i = H(null), l = H(null);
|
|
892
927
|
return S(() => {
|
|
893
|
-
const
|
|
894
|
-
i.current && !i.current.contains(w.target) && h(!1), l.current && !l.current.contains(w.target) &&
|
|
928
|
+
const r = (w) => {
|
|
929
|
+
i.current && !i.current.contains(w.target) && h(!1), l.current && !l.current.contains(w.target) && m(!1);
|
|
895
930
|
};
|
|
896
|
-
return document.addEventListener("mousedown",
|
|
897
|
-
}, []), /* @__PURE__ */ e("header", { className: x.header, children: /* @__PURE__ */ e("div", { className: x.container, children: /* @__PURE__ */
|
|
898
|
-
/* @__PURE__ */
|
|
931
|
+
return document.addEventListener("mousedown", r), () => document.removeEventListener("mousedown", r);
|
|
932
|
+
}, []), /* @__PURE__ */ e("header", { className: x.header, children: /* @__PURE__ */ e("div", { className: x.container, children: /* @__PURE__ */ u("div", { className: x.content, children: [
|
|
933
|
+
/* @__PURE__ */ u("div", { className: x.leftSection, children: [
|
|
899
934
|
/* @__PURE__ */ e(
|
|
900
935
|
"button",
|
|
901
936
|
{
|
|
@@ -903,121 +938,121 @@ function In({ onMobileMenuToggle: t }) {
|
|
|
903
938
|
className: x.mobileMenuButton,
|
|
904
939
|
onClick: t,
|
|
905
940
|
"aria-label": "Open menu",
|
|
906
|
-
children: /* @__PURE__ */ e(
|
|
941
|
+
children: /* @__PURE__ */ e(je, { className: x.burgerIcon })
|
|
907
942
|
}
|
|
908
943
|
),
|
|
909
944
|
/* @__PURE__ */ e("div", { className: x.logo })
|
|
910
945
|
] }),
|
|
911
|
-
/* @__PURE__ */
|
|
912
|
-
/* @__PURE__ */ e(
|
|
913
|
-
/* @__PURE__ */
|
|
914
|
-
/* @__PURE__ */
|
|
946
|
+
/* @__PURE__ */ u("nav", { className: x.nav, children: [
|
|
947
|
+
/* @__PURE__ */ e(dn, { language: o.language }),
|
|
948
|
+
/* @__PURE__ */ u("div", { className: x.themeDropdown, ref: l, children: [
|
|
949
|
+
/* @__PURE__ */ u(
|
|
915
950
|
"button",
|
|
916
951
|
{
|
|
917
952
|
type: "button",
|
|
918
953
|
className: x.themeButton,
|
|
919
|
-
onClick: () =>
|
|
920
|
-
"aria-expanded":
|
|
954
|
+
onClick: () => m(!f),
|
|
955
|
+
"aria-expanded": f,
|
|
921
956
|
"aria-haspopup": "true",
|
|
922
957
|
"aria-label": n("ui.theme"),
|
|
923
958
|
children: [
|
|
924
|
-
b === "light" && /* @__PURE__ */ e(
|
|
925
|
-
b === "dark" && /* @__PURE__ */ e(
|
|
926
|
-
b === "system" && /* @__PURE__ */ e(
|
|
927
|
-
/* @__PURE__ */ e(
|
|
959
|
+
b === "light" && /* @__PURE__ */ e(pe, { className: x.themeIcon }),
|
|
960
|
+
b === "dark" && /* @__PURE__ */ e(fe, { className: x.themeIcon }),
|
|
961
|
+
b === "system" && /* @__PURE__ */ e(ve, { className: x.themeIcon }),
|
|
962
|
+
/* @__PURE__ */ e(se, { className: x.caretIcon })
|
|
928
963
|
]
|
|
929
964
|
}
|
|
930
965
|
),
|
|
931
|
-
|
|
932
|
-
/* @__PURE__ */
|
|
966
|
+
f && /* @__PURE__ */ u("div", { className: x.dropdownMenu, children: [
|
|
967
|
+
/* @__PURE__ */ u(
|
|
933
968
|
"button",
|
|
934
969
|
{
|
|
935
970
|
type: "button",
|
|
936
971
|
onClick: () => {
|
|
937
|
-
|
|
972
|
+
_("light"), m(!1);
|
|
938
973
|
},
|
|
939
974
|
className: x.dropdownItem,
|
|
940
975
|
children: [
|
|
941
|
-
/* @__PURE__ */ e(
|
|
976
|
+
/* @__PURE__ */ e(pe, { className: x.dropdownIcon }),
|
|
942
977
|
n("ui.light")
|
|
943
978
|
]
|
|
944
979
|
}
|
|
945
980
|
),
|
|
946
|
-
/* @__PURE__ */
|
|
981
|
+
/* @__PURE__ */ u(
|
|
947
982
|
"button",
|
|
948
983
|
{
|
|
949
984
|
type: "button",
|
|
950
985
|
onClick: () => {
|
|
951
|
-
|
|
986
|
+
_("dark"), m(!1);
|
|
952
987
|
},
|
|
953
988
|
className: x.dropdownItem,
|
|
954
989
|
children: [
|
|
955
|
-
/* @__PURE__ */ e(
|
|
990
|
+
/* @__PURE__ */ e(fe, { className: x.dropdownIcon }),
|
|
956
991
|
n("ui.dark")
|
|
957
992
|
]
|
|
958
993
|
}
|
|
959
994
|
),
|
|
960
|
-
/* @__PURE__ */
|
|
995
|
+
/* @__PURE__ */ u(
|
|
961
996
|
"button",
|
|
962
997
|
{
|
|
963
998
|
type: "button",
|
|
964
999
|
onClick: () => {
|
|
965
|
-
|
|
1000
|
+
_("system"), m(!1);
|
|
966
1001
|
},
|
|
967
1002
|
className: x.dropdownItem,
|
|
968
1003
|
children: [
|
|
969
|
-
/* @__PURE__ */ e(
|
|
1004
|
+
/* @__PURE__ */ e(ve, { className: x.dropdownIcon }),
|
|
970
1005
|
n("ui.system")
|
|
971
1006
|
]
|
|
972
1007
|
}
|
|
973
1008
|
)
|
|
974
1009
|
] })
|
|
975
1010
|
] }),
|
|
976
|
-
|
|
977
|
-
/* @__PURE__ */
|
|
1011
|
+
d.length > 0 && /* @__PURE__ */ u("div", { className: x.supportDropdown, ref: i, children: [
|
|
1012
|
+
/* @__PURE__ */ u(
|
|
978
1013
|
"button",
|
|
979
1014
|
{
|
|
980
1015
|
type: "button",
|
|
981
1016
|
className: x.supportButton,
|
|
982
|
-
onClick: () => h(!
|
|
983
|
-
"aria-expanded":
|
|
1017
|
+
onClick: () => h(!g),
|
|
1018
|
+
"aria-expanded": g,
|
|
984
1019
|
"aria-haspopup": "true",
|
|
985
1020
|
children: [
|
|
986
1021
|
n("ui.support"),
|
|
987
|
-
/* @__PURE__ */ e(
|
|
1022
|
+
/* @__PURE__ */ e(se, { className: x.caretIcon })
|
|
988
1023
|
]
|
|
989
1024
|
}
|
|
990
1025
|
),
|
|
991
|
-
|
|
992
|
-
const
|
|
993
|
-
return /* @__PURE__ */
|
|
1026
|
+
g && /* @__PURE__ */ e("div", { className: x.dropdownMenu, children: d.map((r, w) => {
|
|
1027
|
+
const C = r.target ?? (r.url.startsWith("http") ? "_blank" : "_self"), I = r.rel ?? (C === "_blank" ? "noopener noreferrer" : void 0), p = r.icon;
|
|
1028
|
+
return /* @__PURE__ */ u(
|
|
994
1029
|
"a",
|
|
995
1030
|
{
|
|
996
|
-
href:
|
|
997
|
-
target:
|
|
998
|
-
rel:
|
|
1031
|
+
href: r.url,
|
|
1032
|
+
target: C,
|
|
1033
|
+
rel: I,
|
|
999
1034
|
className: x.dropdownItem,
|
|
1000
1035
|
children: [
|
|
1001
|
-
|
|
1002
|
-
|
|
1036
|
+
p && /* @__PURE__ */ e(p, { className: x.dropdownIcon }),
|
|
1037
|
+
r.label
|
|
1003
1038
|
]
|
|
1004
1039
|
},
|
|
1005
1040
|
w
|
|
1006
1041
|
);
|
|
1007
1042
|
}) })
|
|
1008
1043
|
] }),
|
|
1009
|
-
|
|
1010
|
-
const
|
|
1011
|
-
return /* @__PURE__ */
|
|
1044
|
+
s.map((r, w) => {
|
|
1045
|
+
const C = r.target ?? (typeof r.url == "string" && r.url.startsWith("http") ? "_blank" : "_self"), I = r.rel ?? (C === "_blank" ? "noopener noreferrer" : void 0), p = r.icon;
|
|
1046
|
+
return /* @__PURE__ */ u(
|
|
1012
1047
|
"a",
|
|
1013
1048
|
{
|
|
1014
|
-
href:
|
|
1015
|
-
target:
|
|
1016
|
-
rel:
|
|
1017
|
-
className:
|
|
1049
|
+
href: r.url,
|
|
1050
|
+
target: C,
|
|
1051
|
+
rel: I,
|
|
1052
|
+
className: r.className ?? x.navLink,
|
|
1018
1053
|
children: [
|
|
1019
|
-
|
|
1020
|
-
|
|
1054
|
+
r.label,
|
|
1055
|
+
p && /* @__PURE__ */ e(p, { className: x.externalIcon })
|
|
1021
1056
|
]
|
|
1022
1057
|
},
|
|
1023
1058
|
w
|
|
@@ -1026,193 +1061,193 @@ function In({ onMobileMenuToggle: t }) {
|
|
|
1026
1061
|
] })
|
|
1027
1062
|
] }) }) });
|
|
1028
1063
|
}
|
|
1029
|
-
const
|
|
1030
|
-
function
|
|
1064
|
+
const X = (t) => "items" in t;
|
|
1065
|
+
function ie({
|
|
1031
1066
|
styles: t,
|
|
1032
1067
|
onLanguageChange: n
|
|
1033
1068
|
}) {
|
|
1034
|
-
const { i18n:
|
|
1035
|
-
const i =
|
|
1069
|
+
const { i18n: o } = E(), a = G(), c = F(), { config: s } = R(), [d, g] = L(!1), h = H(null), f = o.language, m = (_) => {
|
|
1070
|
+
const i = s.basePath || "";
|
|
1036
1071
|
let l = a.pathname;
|
|
1037
1072
|
i && l.startsWith(i) && (l = l.slice(i.length));
|
|
1038
|
-
const
|
|
1039
|
-
let
|
|
1040
|
-
|
|
1041
|
-
const
|
|
1042
|
-
|
|
1073
|
+
const r = l.split("/").filter(Boolean), w = r[0];
|
|
1074
|
+
let C = "";
|
|
1075
|
+
s.supportedLanguages.includes(w) ? (r[0] = _, C = `${i}/${r.join("/")}`) : C = `${i}/${_}${l}`;
|
|
1076
|
+
const I = C + a.search + a.hash;
|
|
1077
|
+
o.changeLanguage(_), c(I), g(!1), n == null || n();
|
|
1043
1078
|
};
|
|
1044
1079
|
S(() => {
|
|
1045
|
-
const
|
|
1046
|
-
h.current && !h.current.contains(i.target) &&
|
|
1080
|
+
const _ = (i) => {
|
|
1081
|
+
h.current && !h.current.contains(i.target) && g(!1);
|
|
1047
1082
|
};
|
|
1048
|
-
return document.addEventListener("mousedown",
|
|
1083
|
+
return document.addEventListener("mousedown", _), () => document.removeEventListener("mousedown", _);
|
|
1049
1084
|
}, []);
|
|
1050
|
-
const b = (
|
|
1051
|
-
return /* @__PURE__ */
|
|
1052
|
-
/* @__PURE__ */
|
|
1085
|
+
const b = (_) => o.getFixedT(_)("language") || _;
|
|
1086
|
+
return /* @__PURE__ */ u("div", { className: t.languageSelect, ref: h, children: [
|
|
1087
|
+
/* @__PURE__ */ u(
|
|
1053
1088
|
"button",
|
|
1054
1089
|
{
|
|
1055
1090
|
type: "button",
|
|
1056
1091
|
className: t.languageButton,
|
|
1057
|
-
onClick: () =>
|
|
1058
|
-
"aria-expanded":
|
|
1092
|
+
onClick: () => g(!d),
|
|
1093
|
+
"aria-expanded": d,
|
|
1059
1094
|
"aria-haspopup": "listbox",
|
|
1060
1095
|
children: [
|
|
1061
|
-
/* @__PURE__ */ e(
|
|
1062
|
-
b(
|
|
1063
|
-
/* @__PURE__ */ e(
|
|
1096
|
+
/* @__PURE__ */ e(Ae, { className: t.icon }),
|
|
1097
|
+
b(f),
|
|
1098
|
+
/* @__PURE__ */ e(se, { className: t.chevron })
|
|
1064
1099
|
]
|
|
1065
1100
|
}
|
|
1066
1101
|
),
|
|
1067
|
-
|
|
1102
|
+
d && /* @__PURE__ */ e("div", { className: t.languageDropdown, role: "listbox", children: s.supportedLanguages.map((_) => /* @__PURE__ */ e(
|
|
1068
1103
|
"button",
|
|
1069
1104
|
{
|
|
1070
1105
|
type: "button",
|
|
1071
|
-
className: `${t.languageOption} ${
|
|
1072
|
-
onClick: () => _
|
|
1106
|
+
className: `${t.languageOption} ${_ === f ? t.selected : ""}`,
|
|
1107
|
+
onClick: () => m(_),
|
|
1073
1108
|
role: "option",
|
|
1074
|
-
"aria-selected":
|
|
1075
|
-
children: b(
|
|
1109
|
+
"aria-selected": _ === f,
|
|
1110
|
+
children: b(_)
|
|
1076
1111
|
},
|
|
1077
|
-
|
|
1112
|
+
_
|
|
1078
1113
|
)) })
|
|
1079
1114
|
] });
|
|
1080
1115
|
}
|
|
1081
|
-
function
|
|
1082
|
-
const { i18n:
|
|
1083
|
-
if (!
|
|
1084
|
-
const i =
|
|
1085
|
-
return te(
|
|
1086
|
-
(
|
|
1087
|
-
if (
|
|
1088
|
-
const
|
|
1089
|
-
|
|
1116
|
+
function de({ styles: t, onLinkClick: n }) {
|
|
1117
|
+
const { i18n: o } = E(), a = G(), { config: c } = R(), [s, d] = L(() => {
|
|
1118
|
+
if (!c.navigationData) return {};
|
|
1119
|
+
const i = o.language;
|
|
1120
|
+
return te(c.navigationData, i).reduce(
|
|
1121
|
+
(r, w, C) => {
|
|
1122
|
+
if (X(w)) {
|
|
1123
|
+
const I = c.navigationData[C], p = X(I) && I.defaultOpen === !0;
|
|
1124
|
+
r[w.title] = p;
|
|
1090
1125
|
}
|
|
1091
|
-
return
|
|
1126
|
+
return r;
|
|
1092
1127
|
},
|
|
1093
1128
|
{}
|
|
1094
1129
|
);
|
|
1095
|
-
}),
|
|
1130
|
+
}), g = o.language, h = c.navigationData ? te(c.navigationData, g) : [];
|
|
1096
1131
|
S(() => {
|
|
1097
|
-
if (!
|
|
1132
|
+
if (!c.navigationData) return;
|
|
1098
1133
|
const l = te(
|
|
1099
|
-
|
|
1100
|
-
|
|
1134
|
+
c.navigationData,
|
|
1135
|
+
g
|
|
1101
1136
|
).reduce(
|
|
1102
|
-
(
|
|
1103
|
-
if (
|
|
1104
|
-
const
|
|
1105
|
-
|
|
1137
|
+
(r, w, C) => {
|
|
1138
|
+
if (X(w)) {
|
|
1139
|
+
const I = c.navigationData[C], p = X(I) && I.defaultOpen === !0;
|
|
1140
|
+
r[w.title] = p;
|
|
1106
1141
|
}
|
|
1107
|
-
return
|
|
1142
|
+
return r;
|
|
1108
1143
|
},
|
|
1109
1144
|
{}
|
|
1110
1145
|
);
|
|
1111
|
-
|
|
1112
|
-
}, [
|
|
1113
|
-
const
|
|
1114
|
-
|
|
1146
|
+
d(l);
|
|
1147
|
+
}, [g, c.navigationData]);
|
|
1148
|
+
const f = (i) => {
|
|
1149
|
+
d((l) => ({
|
|
1115
1150
|
...l,
|
|
1116
1151
|
[i]: !l[i]
|
|
1117
1152
|
}));
|
|
1118
|
-
},
|
|
1119
|
-
const l =
|
|
1120
|
-
let
|
|
1121
|
-
l &&
|
|
1122
|
-
const w =
|
|
1153
|
+
}, m = (i) => {
|
|
1154
|
+
const l = c.basePath || "";
|
|
1155
|
+
let r = a.pathname;
|
|
1156
|
+
l && r.startsWith(l) && (r = r.slice(l.length));
|
|
1157
|
+
const w = r.split("/").filter(Boolean);
|
|
1123
1158
|
return w[w.length - 1] === i;
|
|
1124
1159
|
}, b = (i) => {
|
|
1125
|
-
const l =
|
|
1126
|
-
let
|
|
1127
|
-
l &&
|
|
1128
|
-
const w =
|
|
1129
|
-
return w[0] &&
|
|
1130
|
-
},
|
|
1160
|
+
const l = c.basePath || "";
|
|
1161
|
+
let r = a.pathname;
|
|
1162
|
+
l && r.startsWith(l) && (r = r.slice(l.length));
|
|
1163
|
+
const w = r.split("/").filter(Boolean);
|
|
1164
|
+
return w[0] && c.supportedLanguages.includes(w[0]) ? `${l}/${w[0]}/${i}` : `${l}/${g}/${i}`;
|
|
1165
|
+
}, _ = () => {
|
|
1131
1166
|
n == null || n();
|
|
1132
1167
|
};
|
|
1133
|
-
return /* @__PURE__ */ e("div", { className: t.navigation, children: h.map((i) =>
|
|
1134
|
-
/* @__PURE__ */
|
|
1168
|
+
return /* @__PURE__ */ e("div", { className: t.navigation, children: h.map((i) => X(i) ? /* @__PURE__ */ u("div", { className: t.section, children: [
|
|
1169
|
+
/* @__PURE__ */ u(
|
|
1135
1170
|
"button",
|
|
1136
1171
|
{
|
|
1137
1172
|
type: "button",
|
|
1138
|
-
className: `${t.sectionButton} ${
|
|
1139
|
-
onClick: () =>
|
|
1173
|
+
className: `${t.sectionButton} ${s[i.title] ? t.expanded : ""}`,
|
|
1174
|
+
onClick: () => f(i.title),
|
|
1140
1175
|
children: [
|
|
1141
1176
|
i.title,
|
|
1142
|
-
/* @__PURE__ */ e(
|
|
1177
|
+
/* @__PURE__ */ e(We, { className: t.icon })
|
|
1143
1178
|
]
|
|
1144
1179
|
}
|
|
1145
1180
|
),
|
|
1146
|
-
|
|
1147
|
-
|
|
1181
|
+
s[i.title] && /* @__PURE__ */ e("div", { className: t.sectionItems, children: i.items.map((l) => /* @__PURE__ */ e(
|
|
1182
|
+
ge,
|
|
1148
1183
|
{
|
|
1149
1184
|
to: b(l.slug),
|
|
1150
|
-
className: `${t.navItem} ${
|
|
1151
|
-
onClick:
|
|
1185
|
+
className: `${t.navItem} ${m(l.slug) ? t.active : ""}`,
|
|
1186
|
+
onClick: _,
|
|
1152
1187
|
children: /* @__PURE__ */ e("div", { className: t.navItemContent, children: /* @__PURE__ */ e("span", { className: t.navItemTitle, children: l.title }) })
|
|
1153
1188
|
},
|
|
1154
1189
|
l.slug
|
|
1155
1190
|
)) })
|
|
1156
1191
|
] }, i.title) : /* @__PURE__ */ e(
|
|
1157
|
-
|
|
1192
|
+
ge,
|
|
1158
1193
|
{
|
|
1159
1194
|
to: b(i.slug),
|
|
1160
|
-
className: `${t.navItem} ${
|
|
1161
|
-
onClick:
|
|
1195
|
+
className: `${t.navItem} ${m(i.slug) ? t.active : ""}`,
|
|
1196
|
+
onClick: _,
|
|
1162
1197
|
children: /* @__PURE__ */ e("div", { className: t.navItemContent, children: /* @__PURE__ */ e("span", { className: t.navItemTitle, children: i.title }) })
|
|
1163
1198
|
},
|
|
1164
1199
|
i.slug
|
|
1165
1200
|
)) });
|
|
1166
1201
|
}
|
|
1167
|
-
function
|
|
1202
|
+
function eo({
|
|
1168
1203
|
styles: t,
|
|
1169
1204
|
onLinkClick: n,
|
|
1170
|
-
onLanguageChange:
|
|
1205
|
+
onLanguageChange: o
|
|
1171
1206
|
}) {
|
|
1172
|
-
return /* @__PURE__ */
|
|
1173
|
-
/* @__PURE__ */ e(
|
|
1174
|
-
/* @__PURE__ */ e(
|
|
1207
|
+
return /* @__PURE__ */ u(z, { children: [
|
|
1208
|
+
/* @__PURE__ */ e(ie, { styles: t, onLanguageChange: o }),
|
|
1209
|
+
/* @__PURE__ */ e(de, { styles: t, onLinkClick: n })
|
|
1175
1210
|
] });
|
|
1176
1211
|
}
|
|
1177
|
-
const
|
|
1178
|
-
backdrop:
|
|
1179
|
-
open:
|
|
1180
|
-
mobileMenu:
|
|
1181
|
-
header:
|
|
1182
|
-
brand:
|
|
1183
|
-
cloudIcon:
|
|
1184
|
-
title:
|
|
1185
|
-
closeButton:
|
|
1186
|
-
closeIcon:
|
|
1187
|
-
languageSection:
|
|
1188
|
-
languageSelect:
|
|
1189
|
-
languageButton:
|
|
1190
|
-
icon:
|
|
1191
|
-
chevron:
|
|
1192
|
-
languageDropdown:
|
|
1193
|
-
languageOption:
|
|
1194
|
-
selected:
|
|
1195
|
-
scrollArea:
|
|
1196
|
-
navigation:
|
|
1197
|
-
section:
|
|
1198
|
-
sectionButton:
|
|
1199
|
-
expanded:
|
|
1200
|
-
sectionItems:
|
|
1201
|
-
navItem:
|
|
1202
|
-
active:
|
|
1203
|
-
navItemContent:
|
|
1204
|
-
navItemTitle:
|
|
1212
|
+
const Pn = "_backdrop_1a7pu_1", Dn = "_open_1a7pu_13", Bn = "_mobileMenu_1a7pu_18", Mn = "_header_1a7pu_37", En = "_brand_1a7pu_46", Rn = "_cloudIcon_1a7pu_53", On = "_title_1a7pu_62", jn = "_closeButton_1a7pu_69", An = "_closeIcon_1a7pu_101", Wn = "_languageSection_1a7pu_106", Hn = "_languageSelect_1a7pu_112", qn = "_languageButton_1a7pu_117", Fn = "_icon_1a7pu_156", Un = "_chevron_1a7pu_162", Kn = "_languageDropdown_1a7pu_172", zn = "_languageOption_1a7pu_185", Gn = "_selected_1a7pu_226", Qn = "_scrollArea_1a7pu_231", Xn = "_navigation_1a7pu_237", Yn = "_section_1a7pu_241", Vn = "_sectionButton_1a7pu_245", Jn = "_expanded_1a7pu_285", Zn = "_sectionItems_1a7pu_289", ea = "_navItem_1a7pu_297", ta = "_active_1a7pu_310", na = "_navItemContent_1a7pu_316", aa = "_navItemTitle_1a7pu_322", M = {
|
|
1213
|
+
backdrop: Pn,
|
|
1214
|
+
open: Dn,
|
|
1215
|
+
mobileMenu: Bn,
|
|
1216
|
+
header: Mn,
|
|
1217
|
+
brand: En,
|
|
1218
|
+
cloudIcon: Rn,
|
|
1219
|
+
title: On,
|
|
1220
|
+
closeButton: jn,
|
|
1221
|
+
closeIcon: An,
|
|
1222
|
+
languageSection: Wn,
|
|
1223
|
+
languageSelect: Hn,
|
|
1224
|
+
languageButton: qn,
|
|
1225
|
+
icon: Fn,
|
|
1226
|
+
chevron: Un,
|
|
1227
|
+
languageDropdown: Kn,
|
|
1228
|
+
languageOption: zn,
|
|
1229
|
+
selected: Gn,
|
|
1230
|
+
scrollArea: Qn,
|
|
1231
|
+
navigation: Xn,
|
|
1232
|
+
section: Yn,
|
|
1233
|
+
sectionButton: Vn,
|
|
1234
|
+
expanded: Jn,
|
|
1235
|
+
sectionItems: Zn,
|
|
1236
|
+
navItem: ea,
|
|
1237
|
+
active: ta,
|
|
1238
|
+
navItemContent: na,
|
|
1239
|
+
navItemTitle: aa
|
|
1205
1240
|
};
|
|
1206
|
-
function
|
|
1207
|
-
const { config:
|
|
1241
|
+
function oa({ isOpen: t, onClose: n }) {
|
|
1242
|
+
const { config: o } = R(), a = o.logo;
|
|
1208
1243
|
return S(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "unset", () => {
|
|
1209
1244
|
document.body.style.overflow = "unset";
|
|
1210
1245
|
}), [t]), S(() => {
|
|
1211
|
-
const
|
|
1212
|
-
|
|
1246
|
+
const c = (s) => {
|
|
1247
|
+
s.key === "Escape" && t && n();
|
|
1213
1248
|
};
|
|
1214
|
-
return document.addEventListener("keydown",
|
|
1215
|
-
}, [t, n]), /* @__PURE__ */
|
|
1249
|
+
return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
|
|
1250
|
+
}, [t, n]), /* @__PURE__ */ u(z, { children: [
|
|
1216
1251
|
/* @__PURE__ */ e(
|
|
1217
1252
|
"div",
|
|
1218
1253
|
{
|
|
@@ -1220,11 +1255,11 @@ function Jn({ isOpen: t, onClose: n }) {
|
|
|
1220
1255
|
onClick: n
|
|
1221
1256
|
}
|
|
1222
1257
|
),
|
|
1223
|
-
/* @__PURE__ */
|
|
1224
|
-
/* @__PURE__ */
|
|
1225
|
-
/* @__PURE__ */
|
|
1258
|
+
/* @__PURE__ */ u("div", { className: `${M.mobileMenu} ${t ? M.open : ""}`, children: [
|
|
1259
|
+
/* @__PURE__ */ u("div", { className: M.header, children: [
|
|
1260
|
+
/* @__PURE__ */ u("div", { className: M.brand, children: [
|
|
1226
1261
|
a && /* @__PURE__ */ e(a, { className: M.cloudIcon }),
|
|
1227
|
-
/* @__PURE__ */ e("h1", { className: M.title, children:
|
|
1262
|
+
/* @__PURE__ */ e("h1", { className: M.title, children: o.title })
|
|
1228
1263
|
] }),
|
|
1229
1264
|
/* @__PURE__ */ e(
|
|
1230
1265
|
"button",
|
|
@@ -1233,178 +1268,178 @@ function Jn({ isOpen: t, onClose: n }) {
|
|
|
1233
1268
|
className: M.closeButton,
|
|
1234
1269
|
onClick: n,
|
|
1235
1270
|
"aria-label": "Close menu",
|
|
1236
|
-
children: /* @__PURE__ */ e(
|
|
1271
|
+
children: /* @__PURE__ */ e(le, { className: M.closeIcon })
|
|
1237
1272
|
}
|
|
1238
1273
|
)
|
|
1239
1274
|
] }),
|
|
1240
|
-
/* @__PURE__ */ e("div", { className: M.languageSection, children: /* @__PURE__ */ e(
|
|
1241
|
-
/* @__PURE__ */ e("div", { className: M.scrollArea, children: /* @__PURE__ */ e(
|
|
1275
|
+
/* @__PURE__ */ e("div", { className: M.languageSection, children: /* @__PURE__ */ e(ie, { styles: M, onLanguageChange: n }) }),
|
|
1276
|
+
/* @__PURE__ */ e("div", { className: M.scrollArea, children: /* @__PURE__ */ e(de, { styles: M, onLinkClick: n }) })
|
|
1242
1277
|
] })
|
|
1243
1278
|
] });
|
|
1244
1279
|
}
|
|
1245
|
-
const
|
|
1246
|
-
sidebar:
|
|
1247
|
-
header:
|
|
1248
|
-
brand:
|
|
1249
|
-
cloudIcon:
|
|
1250
|
-
title:
|
|
1251
|
-
languageSelect:
|
|
1252
|
-
languageButton:
|
|
1253
|
-
icon:
|
|
1254
|
-
chevron:
|
|
1255
|
-
languageDropdown:
|
|
1256
|
-
languageOption:
|
|
1257
|
-
selected:
|
|
1258
|
-
scrollArea:
|
|
1259
|
-
navigation:
|
|
1260
|
-
section:
|
|
1261
|
-
sectionButton:
|
|
1262
|
-
expanded:
|
|
1263
|
-
sectionItems:
|
|
1264
|
-
navItem:
|
|
1265
|
-
active:
|
|
1266
|
-
navItemContent:
|
|
1280
|
+
const sa = "_sidebar_1tdxt_1", ca = "_header_1tdxt_17", ra = "_brand_1tdxt_29", la = "_cloudIcon_1tdxt_35", ia = "_title_1tdxt_44", da = "_languageSelect_1tdxt_55", ua = "_languageButton_1tdxt_61", ha = "_icon_1tdxt_99", ga = "_chevron_1tdxt_104", ma = "_languageDropdown_1tdxt_114", _a = "_languageOption_1tdxt_128", pa = "_selected_1tdxt_147", fa = "_scrollArea_1tdxt_152", va = "_navigation_1tdxt_158", ba = "_section_1tdxt_164", wa = "_sectionButton_1tdxt_170", Na = "_expanded_1tdxt_213", $a = "_sectionItems_1tdxt_217", xa = "_navItem_1tdxt_225", Ca = "_active_1tdxt_238", Ia = "_navItemContent_1tdxt_243", W = {
|
|
1281
|
+
sidebar: sa,
|
|
1282
|
+
header: ca,
|
|
1283
|
+
brand: ra,
|
|
1284
|
+
cloudIcon: la,
|
|
1285
|
+
title: ia,
|
|
1286
|
+
languageSelect: da,
|
|
1287
|
+
languageButton: ua,
|
|
1288
|
+
icon: ha,
|
|
1289
|
+
chevron: ga,
|
|
1290
|
+
languageDropdown: ma,
|
|
1291
|
+
languageOption: _a,
|
|
1292
|
+
selected: pa,
|
|
1293
|
+
scrollArea: fa,
|
|
1294
|
+
navigation: va,
|
|
1295
|
+
section: ba,
|
|
1296
|
+
sectionButton: wa,
|
|
1297
|
+
expanded: Na,
|
|
1298
|
+
sectionItems: $a,
|
|
1299
|
+
navItem: xa,
|
|
1300
|
+
active: Ca,
|
|
1301
|
+
navItemContent: Ia
|
|
1267
1302
|
};
|
|
1268
|
-
function
|
|
1269
|
-
const { config: t } = R(), n = t.logo,
|
|
1270
|
-
return /* @__PURE__ */
|
|
1271
|
-
/* @__PURE__ */
|
|
1272
|
-
/* @__PURE__ */
|
|
1273
|
-
n && /* @__PURE__ */ e(n, { className:
|
|
1274
|
-
/* @__PURE__ */ e("div", { className:
|
|
1303
|
+
function ka() {
|
|
1304
|
+
const { config: t } = R(), n = t.logo, o = t.supportedLanguages.length > 1;
|
|
1305
|
+
return /* @__PURE__ */ u("div", { className: W.sidebar, children: [
|
|
1306
|
+
/* @__PURE__ */ u("div", { className: W.header, children: [
|
|
1307
|
+
/* @__PURE__ */ u("div", { className: W.brand, children: [
|
|
1308
|
+
n && /* @__PURE__ */ e(n, { className: W.cloudIcon }),
|
|
1309
|
+
/* @__PURE__ */ e("div", { className: W.title, children: t.title })
|
|
1275
1310
|
] }),
|
|
1276
|
-
|
|
1311
|
+
o && /* @__PURE__ */ e(ie, { styles: W })
|
|
1277
1312
|
] }),
|
|
1278
|
-
/* @__PURE__ */ e("div", { className:
|
|
1313
|
+
/* @__PURE__ */ e("div", { className: W.scrollArea, children: /* @__PURE__ */ e(de, { styles: W }) })
|
|
1279
1314
|
] });
|
|
1280
1315
|
}
|
|
1281
|
-
const
|
|
1282
|
-
app:
|
|
1283
|
-
layout:
|
|
1284
|
-
main:
|
|
1285
|
-
fullWidth:
|
|
1286
|
-
contentWrapper:
|
|
1316
|
+
const ya = "_app_wf6ni_1", La = "_layout_wf6ni_9", Ta = "_main_wf6ni_15", Sa = "_fullWidth_wf6ni_21", Pa = "_contentWrapper_wf6ni_30", Y = {
|
|
1317
|
+
app: ya,
|
|
1318
|
+
layout: La,
|
|
1319
|
+
main: Ta,
|
|
1320
|
+
fullWidth: Sa,
|
|
1321
|
+
contentWrapper: Pa
|
|
1287
1322
|
};
|
|
1288
|
-
function
|
|
1289
|
-
const { language: n } =
|
|
1323
|
+
function Da({ children: t }) {
|
|
1324
|
+
const { language: n } = re(), { i18n: o } = E(), { config: a } = R(), [c, s] = L(!1);
|
|
1290
1325
|
S(() => {
|
|
1291
|
-
n && a.supportedLanguages.includes(n) &&
|
|
1292
|
-
}, [n,
|
|
1293
|
-
const
|
|
1294
|
-
|
|
1295
|
-
},
|
|
1296
|
-
|
|
1326
|
+
n && a.supportedLanguages.includes(n) && o.changeLanguage(n);
|
|
1327
|
+
}, [n, o, a.supportedLanguages]);
|
|
1328
|
+
const d = () => {
|
|
1329
|
+
s(!c);
|
|
1330
|
+
}, g = () => {
|
|
1331
|
+
s(!1);
|
|
1297
1332
|
};
|
|
1298
1333
|
if (!n || !a.supportedLanguages.includes(n))
|
|
1299
|
-
return /* @__PURE__ */ e(
|
|
1300
|
-
const h = !!a.header,
|
|
1301
|
-
return /* @__PURE__ */
|
|
1302
|
-
h && /* @__PURE__ */ e(
|
|
1303
|
-
/* @__PURE__ */ e(
|
|
1304
|
-
/* @__PURE__ */
|
|
1305
|
-
|
|
1334
|
+
return /* @__PURE__ */ e(Ne, { to: "/en/welcome", replace: !0 });
|
|
1335
|
+
const h = !!a.header, f = a.showSideMenu !== !1, m = a.contentMaxWidth ? { width: "100%", maxWidth: a.contentMaxWidth } : void 0;
|
|
1336
|
+
return /* @__PURE__ */ u("div", { className: Y.app, children: [
|
|
1337
|
+
h && /* @__PURE__ */ e(Sn, { onMobileMenuToggle: d }),
|
|
1338
|
+
/* @__PURE__ */ e(oa, { isOpen: c, onClose: g }),
|
|
1339
|
+
/* @__PURE__ */ u("div", { className: Y.layout, children: [
|
|
1340
|
+
f && /* @__PURE__ */ e(ka, {}),
|
|
1306
1341
|
/* @__PURE__ */ e(
|
|
1307
1342
|
"main",
|
|
1308
1343
|
{
|
|
1309
|
-
className: `${
|
|
1310
|
-
children: /* @__PURE__ */ e("div", { className:
|
|
1344
|
+
className: `${Y.main} ${f ? "" : Y.fullWidth}`,
|
|
1345
|
+
children: /* @__PURE__ */ e("div", { className: Y.contentWrapper, style: m, children: t })
|
|
1311
1346
|
}
|
|
1312
1347
|
)
|
|
1313
1348
|
] })
|
|
1314
1349
|
] });
|
|
1315
1350
|
}
|
|
1316
|
-
const
|
|
1317
|
-
homePage:
|
|
1318
|
-
header:
|
|
1319
|
-
title:
|
|
1320
|
-
articlesList:
|
|
1321
|
-
articleCard:
|
|
1322
|
-
articleTitle:
|
|
1323
|
-
articleDescription:
|
|
1324
|
-
loading:
|
|
1325
|
-
empty:
|
|
1351
|
+
const Ba = "_homePage_1lc5u_1", Ma = "_header_1lc5u_20", Ea = "_title_1lc5u_24", Ra = "_articlesList_1lc5u_31", Oa = "_articleCard_1lc5u_37", ja = "_articleTitle_1lc5u_56", Aa = "_articleDescription_1lc5u_63", Wa = "_loading_1lc5u_70", Ha = "_empty_1lc5u_71", A = {
|
|
1352
|
+
homePage: Ba,
|
|
1353
|
+
header: Ma,
|
|
1354
|
+
title: Ea,
|
|
1355
|
+
articlesList: Ra,
|
|
1356
|
+
articleCard: Oa,
|
|
1357
|
+
articleTitle: ja,
|
|
1358
|
+
articleDescription: Aa,
|
|
1359
|
+
loading: Wa,
|
|
1360
|
+
empty: Ha
|
|
1326
1361
|
};
|
|
1327
|
-
function
|
|
1328
|
-
const { i18n: t, t: n } =
|
|
1362
|
+
function qa() {
|
|
1363
|
+
const { i18n: t, t: n } = E(), { config: o, loadContent: a } = R(), c = F(), [s, d] = L([]), [g, h] = L(!0);
|
|
1329
1364
|
S(() => {
|
|
1330
1365
|
(async () => {
|
|
1331
1366
|
try {
|
|
1332
|
-
const b =
|
|
1367
|
+
const b = o.navigationData || [], _ = [];
|
|
1333
1368
|
for (const l of b)
|
|
1334
1369
|
if ("items" in l)
|
|
1335
|
-
for (const
|
|
1336
|
-
|
|
1337
|
-
slug:
|
|
1338
|
-
title:
|
|
1370
|
+
for (const r of l.items)
|
|
1371
|
+
_.push({
|
|
1372
|
+
slug: r.slug,
|
|
1373
|
+
title: r.title
|
|
1339
1374
|
});
|
|
1340
1375
|
else
|
|
1341
|
-
|
|
1376
|
+
_.push({
|
|
1342
1377
|
slug: l.slug,
|
|
1343
1378
|
title: l.title
|
|
1344
1379
|
});
|
|
1345
1380
|
const i = await Promise.all(
|
|
1346
|
-
|
|
1381
|
+
_.map(async (l) => {
|
|
1347
1382
|
try {
|
|
1348
|
-
const
|
|
1383
|
+
const r = await a(t.language, l.slug);
|
|
1349
1384
|
return {
|
|
1350
1385
|
...l,
|
|
1351
|
-
title:
|
|
1352
|
-
date:
|
|
1353
|
-
author:
|
|
1354
|
-
description:
|
|
1386
|
+
title: r.frontmatter.title || l.title,
|
|
1387
|
+
date: r.frontmatter.date,
|
|
1388
|
+
author: r.frontmatter.author,
|
|
1389
|
+
description: r.frontmatter.description
|
|
1355
1390
|
};
|
|
1356
1391
|
} catch {
|
|
1357
1392
|
return l;
|
|
1358
1393
|
}
|
|
1359
1394
|
})
|
|
1360
1395
|
);
|
|
1361
|
-
i.sort((l,
|
|
1396
|
+
i.sort((l, r) => l.date && r.date ? new Date(r.date).getTime() - new Date(l.date).getTime() : l.date ? -1 : r.date ? 1 : l.title.localeCompare(r.title)), d(i.slice(0, 50));
|
|
1362
1397
|
} catch (b) {
|
|
1363
1398
|
console.error("Failed to load articles:", b);
|
|
1364
1399
|
} finally {
|
|
1365
1400
|
h(!1);
|
|
1366
1401
|
}
|
|
1367
1402
|
})();
|
|
1368
|
-
}, [t.language,
|
|
1369
|
-
const
|
|
1370
|
-
const b =
|
|
1371
|
-
|
|
1403
|
+
}, [t.language, o.navigationData, a]);
|
|
1404
|
+
const f = (m) => {
|
|
1405
|
+
const b = o.basePath || "";
|
|
1406
|
+
c(`${b}/${t.language}/${m}`);
|
|
1372
1407
|
};
|
|
1373
|
-
return
|
|
1374
|
-
/* @__PURE__ */
|
|
1375
|
-
/* @__PURE__ */ e("h1", { className:
|
|
1376
|
-
|
|
1408
|
+
return g ? /* @__PURE__ */ e("div", { className: A.loading, children: n("ui.loadingArticles") }) : s.length === 0 ? /* @__PURE__ */ e("div", { className: A.empty, children: n("ui.noArticlesFound") }) : /* @__PURE__ */ u("div", { className: A.homePage, children: [
|
|
1409
|
+
/* @__PURE__ */ u("div", { className: A.header, children: [
|
|
1410
|
+
/* @__PURE__ */ e("h1", { className: A.title, children: n("ui.latestPosts") }),
|
|
1411
|
+
s.length > 0 && /* @__PURE__ */ e(ce, { date: s[0].date, author: s[0].author })
|
|
1377
1412
|
] }),
|
|
1378
|
-
/* @__PURE__ */ e("div", { className:
|
|
1413
|
+
/* @__PURE__ */ e("div", { className: A.articlesList, children: s.map((m) => /* @__PURE__ */ u(
|
|
1379
1414
|
"button",
|
|
1380
1415
|
{
|
|
1381
|
-
className:
|
|
1382
|
-
onClick: () =>
|
|
1416
|
+
className: A.articleCard,
|
|
1417
|
+
onClick: () => f(m.slug),
|
|
1383
1418
|
type: "button",
|
|
1384
1419
|
children: [
|
|
1385
|
-
/* @__PURE__ */ e("h2", { className:
|
|
1386
|
-
|
|
1387
|
-
/* @__PURE__ */ e(
|
|
1420
|
+
/* @__PURE__ */ e("h2", { className: A.articleTitle, children: m.title }),
|
|
1421
|
+
m.description && /* @__PURE__ */ e("p", { className: A.articleDescription, children: m.description }),
|
|
1422
|
+
/* @__PURE__ */ e(ce, { date: m.date, author: m.author })
|
|
1388
1423
|
]
|
|
1389
1424
|
},
|
|
1390
|
-
|
|
1425
|
+
m.slug
|
|
1391
1426
|
)) })
|
|
1392
1427
|
] });
|
|
1393
1428
|
}
|
|
1394
|
-
function
|
|
1395
|
-
const { language: t } =
|
|
1396
|
-
return /* @__PURE__ */ e(
|
|
1397
|
-
/* @__PURE__ */ e(
|
|
1429
|
+
function to() {
|
|
1430
|
+
const { language: t } = re(), { config: n } = R();
|
|
1431
|
+
return /* @__PURE__ */ e(Da, { children: /* @__PURE__ */ u(Se, { children: [
|
|
1432
|
+
/* @__PURE__ */ e(me, { path: "/:slug", element: /* @__PURE__ */ e(Ut, { language: t }) }),
|
|
1398
1433
|
/* @__PURE__ */ e(
|
|
1399
|
-
|
|
1434
|
+
me,
|
|
1400
1435
|
{
|
|
1401
1436
|
index: !0,
|
|
1402
|
-
element: (n.defaultRoute || "latest") === "latest" ? /* @__PURE__ */ e(
|
|
1437
|
+
element: (n.defaultRoute || "latest") === "latest" ? /* @__PURE__ */ e(qa, {}) : /* @__PURE__ */ e(Ne, { to: `./${n.defaultRoute}`, replace: !0 })
|
|
1403
1438
|
}
|
|
1404
1439
|
)
|
|
1405
1440
|
] }) });
|
|
1406
1441
|
}
|
|
1407
|
-
function
|
|
1442
|
+
function no() {
|
|
1408
1443
|
return {
|
|
1409
1444
|
openSearchModal: () => {
|
|
1410
1445
|
window.dispatchEvent(new CustomEvent("blog:open-search"));
|
|
@@ -1414,44 +1449,44 @@ function Va() {
|
|
|
1414
1449
|
}
|
|
1415
1450
|
};
|
|
1416
1451
|
}
|
|
1417
|
-
function
|
|
1418
|
-
const { i18n: t } =
|
|
1419
|
-
return (
|
|
1420
|
-
const
|
|
1421
|
-
let
|
|
1422
|
-
|
|
1423
|
-
const
|
|
1424
|
-
let
|
|
1425
|
-
a.supportedLanguages.includes(h) ? (
|
|
1426
|
-
const
|
|
1427
|
-
t.changeLanguage(
|
|
1452
|
+
function ao() {
|
|
1453
|
+
const { i18n: t } = E(), n = G(), o = F(), { config: a } = R();
|
|
1454
|
+
return (c) => {
|
|
1455
|
+
const s = a.basePath || "";
|
|
1456
|
+
let d = n.pathname;
|
|
1457
|
+
s && d.startsWith(s) && (d = d.slice(s.length));
|
|
1458
|
+
const g = d.split("/").filter(Boolean), h = g[0];
|
|
1459
|
+
let f = "";
|
|
1460
|
+
a.supportedLanguages.includes(h) ? (g[0] = c, f = `${s}/${g.join("/")}`) : f = `${s}/${c}${d}`;
|
|
1461
|
+
const m = f + n.search + n.hash;
|
|
1462
|
+
t.changeLanguage(c), o(m);
|
|
1428
1463
|
};
|
|
1429
1464
|
}
|
|
1430
1465
|
export {
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1466
|
+
Ue as AdvancedModeToggle,
|
|
1467
|
+
Za as BlogProvider,
|
|
1468
|
+
Ke as BlogRoot,
|
|
1469
|
+
Ut as ContentPage,
|
|
1470
|
+
Da as DocumentationLayout,
|
|
1471
|
+
to as DocumentationRoutes,
|
|
1472
|
+
Sn as Header,
|
|
1473
|
+
qa as HomePage,
|
|
1474
|
+
ie as LanguageSelector,
|
|
1475
|
+
ce as Metadata,
|
|
1476
|
+
oa as MobileMenu,
|
|
1477
|
+
eo as NavigationContent,
|
|
1478
|
+
de as NavigationMenu,
|
|
1479
|
+
dn as SearchBar,
|
|
1480
|
+
ka as Sidebar,
|
|
1481
|
+
gt as TableOfContents,
|
|
1482
|
+
It as TagResultsModal,
|
|
1483
|
+
Dt as Tags,
|
|
1484
|
+
Ja as createBlogUtils,
|
|
1485
|
+
xe as createContentLoaders,
|
|
1486
|
+
V as generateHeadingId,
|
|
1452
1487
|
te as getNavigationData,
|
|
1453
1488
|
R as useBlogConfig,
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1489
|
+
ao as useLanguageChange,
|
|
1490
|
+
no as useSearchModal,
|
|
1491
|
+
ke as useTheme
|
|
1457
1492
|
};
|