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